diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_content_list.json b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..417cdecb94da7f8547147605badb1e8a8a0f7303 --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:425158e043763e0290db10f151892acf6739b33311b744ea1570a7de471da0ef +size 201707 diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_model.json b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..472c257457236b71d2a8850734fc686f6a17a431 --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2931fa5aebf50d4d97503ed376b8d30a6a47aae672a158c60e9634d47e04f4e5 +size 239197 diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_origin.pdf b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb1b7c447efc33bfee3f416c4b6762b51ecfa8e1 --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/7db29ae2-8262-442b-8e38-35750011eeb5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d255b7754d4fdcc46ab1472f1ded5d11c26a8462618eea68585fc294766448aa +size 4113881 diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/full.md b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/full.md new file mode 100644 index 0000000000000000000000000000000000000000..70833edce08ca1e889eefedb6a432e62dba5798f --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/full.md @@ -0,0 +1,796 @@ +# Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance + +Yusong Wang $^{*12}$ Shiyin Tan $^{*2}$ Jialun Shen $^{*2}$ Yicheng Xu $^{2}$ Haobo Song $^{3}$ Qi Xu $^{4}$ Prayag Tiwari $^{5}$ Mingkun Xu + +# Abstract + +Graph Contrastive Learning (GCL) improves Graph Neural Network (GNN)-based protein representation learning by enhancing its generalization and robustness. Existing GCL approaches for protein representation learning rely on 2D topology, where graph augmentation is solely based on topological features, ignoring the intrinsic biological properties of proteins. Besides, 3D structure-based protein graph augmentation remains unexplored, despite proteins inherently exhibiting 3D structures. To bridge this gap, we propose novel biology-aware graph augmentation strategies from the perspective of invariance and integrate them into the protein GCL framework. Specifically, we introduce Functional Community Invariance (FCI)-based graph augmentation, which employs spectral constraints to preserve topology-driven community structures while incorporating residue-level chemical similarity as edge weights to guide edge sampling and maintain functional communities. Furthermore, we propose 3D Protein Structure Invariance (3-PSI)-based graph augmentation, leveraging dihedral angle perturbations and secondary structure rotations to retain critical 3D structural information of proteins while diversifying graph views. Extensive experiments on four different protein-related tasks demonstrate the superiority of our proposed GCL protein representation learning framework. + +*Equal contribution 1Guangdong Institute of Intelligence Science and Technology, Zhuhai, China 2School of Engineering, Institute of Science Tokyo, Tokyo, Japan 3Graduate School of Medicine, The University of Tokyo, Tokyo, Japan 4School of Computer Science and Technology, Dalian University of Technology, Dalian, China 5School of Information Technology, Halmstad University, Halmstad, Sweden. Correspondence to: Mingkun Xu† . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/e80506dc56cdc49e3e2d5c14e6b307f4bbbc5f7760482c80a64da548dc0ec80a.jpg) +(a) + +![](images/22b6875acb0e1ad52a7c8159d798ecf4d98c55aea229406e4c7aba6698714052.jpg) +(b) + +![](images/f24e94f54987f4018fad6c79ae8b3b8c67bf1fa14996b75e2c9b78a152f67490.jpg) +(c) +Figure 1. Visualization of limitations in existing graph augmentation approaches for protein representation learning. Figure (a) shows a functional domain where nodes and edges are erroneously removed during graph augmentation. Figure (b) depicts how traditional 3D augmentation with coordinate pernturbation distorts the peptide plane and critical bond relationships. Figure (c) compares the original protein structure (left) and its augmented views (right) generated by SWISS-MODEL, a protein homology modeling tool. High similarity limits diversity. + +# 1. Introduction + +Graph Neural Networks (GNNs) (Scarselli et al., 2009) enable efficient protein representation learning by modeling proteins as graphs, where residues represent nodes and bonds represent edges. GNN encoders map each protein into a vector representation, which is then processed by a prediction module to predict specific properties (Zhang et al., 2023; Wang et al., 2023b). Graph Contrastive Learning (GCL) enhances GNN-based protein representation learning in two ways: first, it improves the generalization and robustness of GNNs through diverse protein graph augmentation strategies; second, GCL effectively captures structural patterns across different protein conformations, leading to more discriminative protein representations (Li et al., 2022; Wang et al., 2022a; Tan et al., 2024). + +Current GCL approaches for protein representation learning focus on 2D topology-based graph augmentation (Suresh et al., 2021). They seek to minimize redundant information while preserving essential information across augmented views, assuming critical protein structures remain unchanged (Suresh et al., 2021). For instance, Wei et al. (2023) identify important edges between residues in a graph by measuring their semantic impacts based on the gradients of mutual information. Liu et al. (2022a) explores graph + +augmentation in the spectral space to preserve 2D protein topology through eigen-value-based transformations. However, only focusing on topological structures tends to neglect the inherent biological significance of proteins, which dilutes or even discards structural-functional associations tied to protein functionality. As Figure 1 (a) shows, such graph augmentation disrupts a functional domain which is essential for protein function (Heinemann et al., 2021). + +Furthermore, while integrating 3D structural information can enhance protein representation learning (Liu et al., 2022b), 3D structure-based graph augmentation remains unexplored. Although several 3D augmentation strategies exist, they face challenges when applied to GCL for protein representation learning: (1) applying traditional 3D augmentation (e.g., random coordinate perturbations, anisotropic scaling) (Hermosilla et al., 2021; Wang et al., 2023b) risks protein structure disruption. As Figure 1 (b) shows, the peptide plane is distorted by random coordinate perturbations, affecting protein representation learning. (2) using protein homology modeling tools like MODELLER (Eswar et al., 2006) and SWISS-MODEL (Waterhouse et al., 2018) to generate conformations (Li et al., 2022; Gao et al., 2023) reduces structural diversity. As Figure 1 (c) shows, generated structures are nearly identical to original structures. It could also introduce inaccurate protein structure (see Appendix A). Applying GCL with these compromised augmentation graphs can result in learning representations of biologically irrelevant proteins, undermining the model's performance on downstream tasks. + +To address aforementioned issues, we incorporate biological properties of proteins to guide graph augmentations, thereby helping the GCL model learn accurate protein representations. Specifically, we propose two biology-aware graph augmentation strategies from the perspective of (i) 2D topology-based Functional Community Invariance (FCI) and (ii) 3D Protein Structure Invariance (3-PSI) and integrate them into a unified GCL framework for protein representation learning. FCI ensures that functional communities, i.e., clusters of spatially and chemically similar residues collaborating to enable specific functions, remain intact. It considers both topological structures and chemical properties, ensuring the preservation of proteins' functional communities during graph augmentation. To generate augmented graphs while preserving 3D-related information of protein, 3-PSI uses two distinct coordinate perturbation strategies: (1) rotations of backbone dihedral angles, and (2) rotations of secondary structures ( $\alpha$ -helices and $\beta$ -sheets), preventing the disruption of peptide planes and secondary structures during graph augmentation. + +Main contributions of this research are summarized as: + +- Based on the perspective of invariance, we propose two novel biology-aware graph augmentation strategies to + +preserve biological integrity within proteins. + +- We develop a unified protein GCL framework that integrates both graph augmentation strategies to facilitate protein representation learning. +- Experimental results on four downstream protein-related tasks highlight the superior performance of our proposed GCL framework, demonstrating its effectiveness in learning protein representations. + +# 2. Related Work + +Protein representation learning. Protein representation learning methods can be broadly divided into two categories: sequence-based and structure-based approaches (Quan et al., 2024). Sequence-based methods primarily utilize word embedding techniques to capture the semantic relationships between residues (Asgari & Mofrad, 2015; Yang et al., 2018; Zhuo et al., 2024) and one-dimensional convolutional neural networks to extract local sequence patterns and motifs (Hou et al., 2017; Tsubaki et al., 2018; Kulmanov & Hoehndorf, 2019). For example, ProtBERT-BFD (Elnaggar et al., 2020a) trained a BERT model on a large corpus of protein sequences and demonstrated superior performance by capturing sequential dependencies and evolutionary relationships between residues. Structure-based approaches, predominantly based on GNN, are more effectively leverage structural information, such as spatial relationships, than sequence-based methods, enabling a more comprehensive understanding of protein structures (Zhang et al., 2023; Wang et al., 2023b; Jamasb et al., 2024). For instance, GraphTrans (Liu et al., 2022b) developed a graph transformer architecture that processes protein structures as spatial graphs to achieve state-of-the-art (SOTA) performance in protein property prediction tasks. Our research focuses on the latter. + +Graph Contrastive Learning. GCL has been widely adopted for enhancing GNN-based protein representation learning (Li et al., 2022; Tan et al., 2024; Wang et al., 2025). Current approaches focus on 2D topology-based graph augmentations, altering graph structures through node and edge modifications. Early methods, such as random node/edge dropping (Zhu et al., 2020; You et al., 2020; 2021) often disrupted semantic integrity of proteins by removing key residues and bonds. Recent methods enhance protein semantic preservation via learnable distributions, mutual-information gradients, adversarial training, and spectral constraints (Yin et al., 2021; Wei et al., 2023; Suresh et al., 2021; Liu et al., 2022a; Lin et al., 2023a). However, their focus on topology overlooks the biological significance of functional communities, missing key protein features. + +Despite proteins' inherent 3D nature, 3D structure-based protein graph augmentations remain unexplored. Existing + +3D augmentation strategies face challenges when applied to GCL for protein representation learning: traditional 3D augmentation methods, such as coordinate perturbations and anisotropic scaling (Hermosilla et al., 2021; Wang et al., 2023b; Feng et al., 2024), often disrupt peptide planes and protein hierarchical structures, yielding biologically implausible proteins; protein homology modeling tools (e.g., MODELLER (Eswar et al., 2006) and SWISS-MODEL (Waterhouse et al., 2018)) generate structural variants as augmented views (Li et al., 2022) with limited diversity or inaccuracies, undermining the model's performance. + +In this work, we incorporate inherently invariant properties of proteins into the augmented graphs and propose two graph augmentation strategies: FCI and 3-PSI, improving protein representation learning. + +# 3. Preliminary + +We employ GNN for its flexibility in integrating protein topology and geometry. + +Notations. Let $G = (\mathcal{V}, \mathcal{E}, \mathcal{P})$ be a protein graph with $n$ nodes (residues, each represented by its central carbon atom $C_{\alpha}$ ) and $m$ edges, where $\mathcal{V} = \{v_i\}_{i=1}^n$ denotes the set of nodes, and $\mathcal{E} = \{e_{ij}\}$ represents the set of edges. $\mathcal{P} = \{P_i\}_{i=1,\dots,n}$ denotes the set of position matrices, where each $P_i \in \mathbb{R}^{k_i \times 3}$ represents the position matrix for node $i$ . The protein graph construction, including node features, edge features and rotational invariance, are detailed in Appendix C.1. The graph can be represented as adjacency matrix $\mathbf{A} \in \{0,1\}^{n \times n}$ , where $\mathbf{A}_{i,j} = 1$ if an edge exists between node $i$ and $j$ , otherwise $\mathbf{A}_{i,j} = 0$ . The normalized Laplacian matrix is defined as $\mathbf{L}_{\mathrm{norm}} = \mathrm{Lap}(\mathbf{A}) = \mathbf{I}_n - \mathbf{D}^{-1/2} \mathbf{A} \mathbf{D}^{-1/2}$ , where $\mathbf{I}_n$ is an identity matrix, $\mathbf{D}$ is a degree matrix, $\mathbf{D}_{i,i}$ represents the degree of node $i$ , and $\mathbf{D}_{i,j} = 0$ if $i \neq j$ . The complement of adjacency matrix is represented as $\mathbf{A}^c$ . $\mathbf{A}_{i,j}^c = 1$ if an edge does not exist between node $i$ and $j$ , otherwise $\mathbf{A}_{i,j}^c = 0$ . + +Problem definition. A protein is represented as a quadruple $G = (\mathcal{V}, \mathcal{E}, \mathcal{P}, \mathcal{Y})$ . $\mathcal{Y}$ is the set of labels. The objective of protein classification is to learn a mapping $f: (\mathcal{V}, \mathcal{E}, \mathcal{P}) \to \mathcal{Y}$ . + +Graph Contrastive Learning. GCL trains an encoder to maximize the mutual information between an original graph and its augmented view generated through graph augmentation. Specifically, given an encoder $Enc(\cdot)$ , a readout function $Readout(\cdot)$ and an augmentation function $t(G)$ , the training objective of GCL is expressed as: + +$$ +\begin{array}{l} \min _ {E n c} \mathcal {L} _ {\mathrm {G C L}} (t (G), G, E n c, R e a d o u t) \tag {1} \\ = - \frac {1}{| \mathcal {G} |} \sum_ {n = 1} ^ {| \mathcal {G} |} \left(\log \frac {\exp (\sin (\hat {\mathbf {z}} _ {n} , \mathbf {z} _ {n}))}{\sum_ {n ^ {\prime} \neq n} \exp (\sin (\hat {\mathbf {z}} _ {n} , \hat {\mathbf {z}} _ {n ^ {\prime}}))}\right), \\ \end{array} +$$ + +where $|\mathcal{G}|$ is the number of samples, $\mathbf{z}$ is the graph embedding after encoder and readout functions, $\hat{\mathbf{z}}$ is the embedding of augmented graph, and $\mathrm{sim}(\cdot ,\cdot)$ is the similarity function of two embeddings. $\mathcal{L}_{\mathrm{GCL}}$ quantifies the disagreement between graphs. + +Graph Spectrum. The spectral decomposition of $\mathbf{L}_{\mathrm{norm}}$ is defined as $\mathbf{L}_{\mathrm{norm}} = \mathrm{Lap}(\mathbf{A}) = \mathbf{U}\boldsymbol{\Lambda}\mathbf{U}^{\top}$ , where the diagonal matrix $\boldsymbol{\Lambda} = \mathrm{eig}(\mathrm{Lap}(\mathbf{A})) = \mathrm{diag}(\lambda_1, \dots, \lambda_n)$ consists of real eigenvalues $\{\lambda_i | i = 1, \dots, n\}$ , known as the graph spectrum. And $\mathbf{U} = [\mathbf{u}_1, \dots, \mathbf{u}_n] \in \mathbb{R}^{n \times n}$ are the corresponding orthonormal eigenvectors known as the spectral bases (Gene et al., 2013). + +Key Protein-Related Terms. The hierarchical organization of protein structure emerges from the interplay of several fundamental elements. At its core, amino acid residues serve as the basic building blocks, with their variable side chains determining the chemical properties. These residues are connected by peptide bonds, forming rigid peptide planes that include the C - N bond and adjacent atoms $(\mathrm{C}_{\alpha}, \mathrm{C}, \mathrm{N},$ and O). The spatial arrangement of these planes is governed by dihedral angles $(\phi$ and $\psi)$ , which define the backbone's main conformation and give rise to distinct local conformations along the polypeptide chain. These local conformations are stabilized by hydrogen bonds leading to the formation of common secondary structures such as $\alpha$ -helices and $\beta$ -sheets. The combination of these elements determines the overall protein conformation, the three-dimensional shape that is essential for protein folding and function, thus influencing classification. The details are presented at Appendix B. + +# 4. Methodology + +In this section, we introduce two novel graph augmentation methods based on 2D topology-based Functional Community Invariance (FCI) in Sec 4.1 and 3D Protein Structure Invariance (3-PSI) in Sec 4.2. The overview of both augmentation methods is illustrated in Figure 2. Subsequently, we integrate both proposed augmentation methods into a unified GCL framework for protein representation learning in Sec 4.3. The overall architecture is illustrated in Figure 3. + +# 4.1. Functional Community Invariance + +Within proteins, there are specific regions where residues cluster together to form communities. These clustered residues have similar chemical properties, collaborating to enable specific functions, such as residues clustered around active sites catalyzing enzymatic reactions (Mehta & Beck, 2014). Breaking such clusters during graph augmentation fails to preserve proteins' functionality and thus loses the key information for protein prediction. To address this, we introduce 2D topology-based Functional Community + +![](images/b28be1301271c543d2617768a60c4e11e6fa7896a8e050b91b9021d5fb0231d1.jpg) +Figure 2. This is the overview of our proposed two invariance-based augmentation strategies. (a): FCI takes the adjacency matrix and side-chain similarity as input, optimizing the probability matrix in the spectral space to generate augmentations that preserve functional communities. (b): 3-PSI has two structure-invariance augmentation strategies: (1) Dihedral angle rotation that adjusts $\phi$ and $\psi$ angles to perturb residue coordinates while preserving peptide plane, and (2) $\alpha$ -helices and $\beta$ -sheets rotation that maintains secondary structures. Middle: The original protein structure with backbone edges and GNN-constructed edges. + +Invariance (FCI) to graph augmentation in GCL, which considers both topological structures and chemical properties (Figure 2 (a)), ensuring the preservation of proteins' functional communities during augmentation. In the following paragraphs, we formalize the FCI augmentation as an optimization problem. + +Augmentation Process. We first formulate the graph augmentation process as sampling from a probability matrix according to a Bernoulli distribution, $t(G) = \text{Bern}(\Delta, \epsilon)$ , where $\text{Bern}(\cdot) \in \{0, 1\}^{n \times n}$ is the sampling function from Bernoulli distribution, $\Delta \in [0, 1]^{n \times n}$ is the probability matrix that represents the edge perturbation rates, and $\epsilon$ controls the augmentation strength (the sampled number is less than $\epsilon \cdot m$ ). By designing a proper probability matrix $\Delta$ , we can ensure that key components of the graph are preserved during the augmentation process. + +CI-based Augmentation. To ensure the preservation of community structure, we introduce Community Invariance (CI)-based augmentation by controlling the spectral changes. According to the upper and lower bounds of spectral changes (Theorem 4.1), maximizing spectral changes involves maximizing their upper bound, which is achieved by flipping edges with largest distance in spectral space. And nodes with larger spectral distances typically belong to different communities (proven in Appendix E.6). + +Theorem 4.1. (Bounds of Spectral changes) For a single edge perturbation $A_{ij}$ , it induces absolute spectral changes given by $\sum_{y=1}^{n} |\Delta \lambda_y| = \sum_{y=1}^{n} |(U_{iy} - U_{jy})^2 + (\lambda_y - 1)(U_{iy}^2 + U_{jy}^2)|$ . It is upper bounded by $\| \mathbf{U}_i - \mathbf{U}_j \|_2^2 + \sum_{y=1}^{n} |\lambda_y - 1|$ and lower bounded by $\| \mathbf{U}_i - \mathbf{U}_j \|_2^2 -$ + +$\sum_{y=1}^{n}|\lambda_y - 1|$ , respectively. Here, $\mathbf{U}_i$ represents the $i$ -th row vector of $\mathbf{U}$ , denoting the $i$ -th node embedding in the spectral space. + +Therefore, to preserve communities, we drop edges that cause large spectral changes and add edges that cause small spectral changes, i.e., dropping edges between communities and adding edges within communities. The loss function of Community Invariance is: + +$$ +\max _ {\boldsymbol {\Delta} ^ {\mathrm {E D}}, \boldsymbol {\Delta} ^ {\mathrm {E A}}} \mathcal {L} _ {\mathrm {C I}} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}, \boldsymbol {\Delta} ^ {\mathrm {E A}}\right) = \mathcal {L} _ {\mathrm {E D}} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}\right) - \mathcal {L} _ {\mathrm {E A}} \left(\boldsymbol {\Delta} ^ {\mathrm {E A}}\right), \tag {2} +$$ + +$$ +\mathcal {L} _ {\mathrm {E D}} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}\right) = \left\| \operatorname {e i g} \left(\operatorname {L a p} (\mathbf {A} - \mathbf {A} \circ \boldsymbol {\Delta} ^ {\mathrm {E D}})\right) - \operatorname {e i g} (\operatorname {L a p} (\mathbf {A})) \right\| _ {2} ^ {2}, \tag {3} +$$ + +$$ +\mathcal {L} _ {\mathrm {E A}} \left(\boldsymbol {\Delta} ^ {\mathrm {E A}}\right) = \left\| \operatorname {e i g} \left(\operatorname {L a p} \left(\mathbf {A} + \mathbf {A} ^ {\mathbf {c}} \circ \boldsymbol {\Delta} ^ {\mathrm {E A}}\right)\right) - \operatorname {e i g} (\operatorname {L a p} (\mathbf {A})) \right\| _ {2} ^ {2}, \tag {4} +$$ + +where $\circ$ denotes element-wise product and $\mathbf{A}^c$ is to guide edge addition operations. To achieve CI, we split the probability matrix $\pmb{\Delta}$ to $\pmb{\Delta}^{\mathrm{ED}}$ and $\pmb{\Delta}^{\mathrm{EA}}$ for edge dropping and edge adding, respectively. + +FCI-based Augmentation. However, simply preserving communities without considering chemical properties may lead to incorrect assignment of residues with similar functional roles to different communities. To address this issue, we incorporate side-chains into CI-based augmentation, as they reflect the chemical properties of residues (Guy, 1985; Yan & Jernigan, 2005). Specifically, we calculate the similarity between the side-chains of two residues to measure their chemical similarities and use it as the edge weight. We refer to this similarity as chemical similarity, which is computed using side-chain embeddings $\mathbf{v}_{\mathrm{sc}}$ . These embeddings use the sine and cosine values of the first four torsion angles + +$\chi_{i}$ as elements, following Wang et al. (2023b): + +$$ +w _ {i j} = \frac {\mathbf {v} _ {\mathrm {s c} , i} \cdot \mathbf {v} _ {\mathrm {s c} , j}}{\| \mathbf {v} _ {\mathrm {s c} , i} \| \| \mathbf {v} _ {\mathrm {s c} , j} \|}, \mathbf {v} _ {\mathrm {s c}} = [ \sin (\chi_ {i}), \cos (\chi_ {i}) ] _ {i = 1} ^ {4}, \tag {5} +$$ + +where $\chi_{i,1}$ and $\chi_{i,2}$ denote the $i$ -th torsion angles of residues $r_i$ and $r_j$ , respectively. + +Lemma 4.2. For weighted graphs, the absolute spectral changes $\sum_{y=1}^{n}|\Delta\lambda_y|$ during edge dropping are upper bounded by $|w_{ij}|\cdot\left(\|\mathbf{U}_i-\mathbf{U}_j\|^2+\sum_{y=1}^{n}|\lambda_y-1|\right)$ . Here, $w_{ij}$ is the weight of the dropped edge $e_{ij}$ . + +By introducing chemical similarity (weights) for edges, clustering communities can better group residues that share similar chemical properties, leading to more biologically meaningful functional communities. According to Lemma 4.2, maximizing the spectral change during edge dropping results in the removal of edges with large edge weights. To ensure that edges with high chemical similarity are preserved while edges crossing functional communities are removed, Function Community Invariance (FCI) is computed as: + +$$ +\max _ {\boldsymbol {\Delta} ^ {\mathrm {E D}}, \boldsymbol {\Delta} ^ {\mathrm {E A}}} \mathcal {L} _ {\mathrm {F C I}} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}, \boldsymbol {\Delta} ^ {\mathrm {E A}}\right) = \mathcal {L} _ {\mathrm {E D}} ^ {\prime} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}\right) - \mathcal {L} _ {\mathrm {E A}} \left(\boldsymbol {\Delta} ^ {\mathrm {E A}}\right), \tag {6} +$$ + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {E D}} ^ {\prime} \left(\boldsymbol {\Delta} ^ {\mathrm {E D}}\right) = \left\| \boldsymbol {\Delta} ^ {E D} / \mathbf {W} \right\| ^ {2}. \tag {7} \\ \left\| \operatorname {e i g} (\operatorname {L a p} (\mathbf {W} - \mathbf {W} \circ \mathbf {A} \circ \boldsymbol {\Delta} ^ {\mathrm {E D}})) - \operatorname {e i g} (\operatorname {L a p} (\mathbf {W})) \right\| _ {2} ^ {2}, \\ \end{array} +$$ + +where the element of $\mathbf{W}$ is chemical similarity defined in Eq. 5, the first term of $\mathcal{L}_{ED}^{\prime}$ is for preservation of high chemical similarity and the second term is for removal of cross-community edges. $\mathcal{L}_{EA}$ remains the same as in CI since chemical similarity cannot affect edge adding. After solving Eq. 6, the augmented view is sampled by: $t(G) = \mathbf{A} - \mathbf{A} \circ \text{Bern}(\mathbf{\Delta}^{\mathrm{ED}}, \epsilon) + \mathbf{A}^{c} \circ \text{Bern}(\mathbf{\Delta}^{\mathrm{EA}}, \epsilon)$ . + +# 4.2.3D Protein Structure Invariance + +Exploring diverse 3D protein structures benefits models in understanding protein conformations and enhances the learning of protein representation. However, existing 3D augmentation methods applied for protein graph augmentation, such as ordinate perturbations and anisotropic scaling, disrupt essential structural features, including peptide planes and key secondary structures like $\alpha$ -helices and $\beta$ -sheets. Consequently, these disruptions in protein structures lead the model to learn inaccurate 3D spatial relationships between residues, degrading its performance on downstream tasks. To alleviate this problem, we propose 3-PSI, a novel graph augmentation method that incorporates two types of 3D protein structure invariance. As illustrated in Figure 2 (b), 3-PSI includes Dihedral Angle Rotation (3-PSIDiag) and $\alpha$ -helices and $\beta$ -sheets Rotation (3-PSIApha). These strategies make use of the flexible and dynamic nature of proteins + +in native states (Mishra & Jha, 2022), and reduce disruptions to the primary and secondary structures of proteins, preserving the integrity of proteins as much as possible. + +Dihedral Angle Rotation. The protein backbone consists of repeating $\mathrm{N - C_{\alpha} - C}$ units, with its folding largely governed by the backbone dihedral angles $\phi$ and $\psi$ (Jha et al., 2005). Directly perturbing absolute atomic coordinates disrupts the integrity of peptide planes and eventually disrupts hydrogen bond networks (Liwo et al., 1993; Nisius & Grzesiek, 2012). To mitigate this issue, we propose 3-PSIDiag, which applies guided and constrained rotations to dihedral angles, preserving the relative integrity of peptide planes. Specifically, we introduce small perturbations $\Delta \phi$ and $\Delta \psi$ : + +$$ +\phi^ {(\text {n e w})} = \phi^ {(\text {o l d})} + \Delta \phi , \quad \psi^ {(\text {n e w})} = \psi^ {(\text {o l d})} + \Delta \psi \tag {8} +$$ + +while ensuring that $\left(\phi^{\mathrm{(new)}},\psi^{\mathrm{(new)}}\right)$ remains within the allowed Ramachandran region (Ramachandran et al., 1963), thereby maintaining the energetic feasibility of the perturbed protein structure. After perturbing the dihedral angles, the coordinates of residues are adjusted correspondingly. It minimizes disruption to hydrogen bonds and secondary structure interfaces, avoiding generating unrealistic protein structures. + +$\alpha$ -helices and $\beta$ -sheets Rotation. Proteins have well-defined secondary structures, primarily $\alpha$ -helices and $\beta$ -sheets, which maintain protein stability and facilitate essential functions (Stanger et al., 2001). Existing 3D augmentation methods often disrupt the integrity of secondary structures, resulting in the learning of biologically irrelevant protein representations. To address this issue, we introduce 3-PSIAlpha, a controlled rotation method for $\alpha$ -helices and $\beta$ -sheets to preserve essential secondary structures throughout the augmentation process. Specifically, we first identify the secondary structures in a protein (i.e., $\alpha$ -helices and $\beta$ -sheets) using the DSSP algorithm (Kabsch & Sander, 1983). Each secondary structure is approximated as a planar region, with its corresponding normal vector denoted as $\mathbf{n}_i$ . We define the rotation axis of two adjacent secondary structures as the cross product of their normal vectors: + +$$ +\mathbf {a} = \mathbf {n} _ {i} \times \mathbf {n} _ {j} \tag {9} +$$ + +where $\times$ denotes the cross product operation, ensuring that a is perpendicular to both planes. A small random rotation angle $\theta$ is then sampled from a uniform distribution to determine the extent of the opening or closing motion around a: $\theta \sim \mathcal{U}(-\theta_{\mathrm{max}},\theta_{\mathrm{max}})$ . This controlled rotation ensures that secondary structures remain intact while introducing realistic conformational variations. A 3D rotation about the axis a by the angle $\theta$ can be described by the standard Rodrigues rotation matrix $\mathbf{R}_{\mathbf{a},\theta}$ . For a unit axis $\widehat{\mathbf{a}} = \frac{\mathbf{a}}{||\mathbf{a}||}$ , $\mathbf{R}_{\mathbf{a},\theta}$ is given by: + +$$ +\mathbf {R} _ {\hat {\mathbf {a}}, \theta} = \mathbf {I} \cos \theta + (1 - \cos \theta) \hat {\mathbf {a}} \hat {\mathbf {a}} ^ {\top} + [ \hat {\mathbf {a}} ] _ {\times} \sin \theta , \tag {10} +$$ + +where $[\widehat{\mathbf{a}}]_{\times}$ denotes the skew-symmetric matrix, as given in Appendix C.3. Next, we randomly select $n$ secondary structures and rotate them around a by the angle $\theta$ . This ensures that the secondary structure is preserved while still keep meaningful 3D structure perturbations for augmentation. + +![](images/1c87959fabcbcabab8b955a05ded47d8f150fcfe8f54f4714f9e2eca097e057c.jpg) +Figure 3. The architecture begins with three views of input graphs: the original view and two augmented views (FCI and 3-PSI). + +# 4.3. Optimization + +We follow the GCL framework introduced in Sec 3, where the original view and augmentation views (FCI and 3-PSI) are passed through the GNN encoder, as illustrated in Figure 3. Following Fan et al. (2023)'s work, each view undergoes four hierarchical pooling operations, with all views sharing the same GNN encoder at each hierarchical level. The output from the final GNN encoder represents each view and is used for contrastive learning. The original view also serves as input for downstream tasks. The GNN encoders are optimized using a combination of GCL loss and classification loss, defined as follows: + +$$ +\mathcal {L} _ {\mathrm {A L L}} = \mathcal {L} _ {\mathrm {C L S}} + \lambda \left(\mathcal {L} _ {\mathrm {G C L}} ^ {\left(\mathrm {F C I}\right)} + \mathcal {L} _ {\mathrm {G C L}} ^ {\left(3 - \mathrm {P S I}\right)}\right), \tag {11} +$$ + +where $\mathcal{L}_{\mathrm{CLS}}$ is the classification loss, $\mathcal{L}_{\mathrm{GCL}}^{(\cdot)}$ is the GCL loss based on different augmentation methods, and $\lambda$ is the weight to balance the GCL and classification loss. 3-PSI augmentation is selected either by 3-PSIDiag or 3-PSIAalpha. Details of the GNN encoder can be found in Appendix C.4. + +# 5. Experiments + +# 5.1. Experimental Settings + +Tasks. Building upon the evaluation protocols of Fan et al. (2023), we assess the effectiveness of our approach across four protein-related tasks: Protein Fold Classification (FOLD), Enzyme Reaction Classification (Reaction), Gene Ontology Term Prediction (GO), and Enzyme Commission (EC) number prediction. For FOLD, we evaluate performance under three scenarios: fold, superfamily, and family classification. For GO, we assess performance across three sub-tasks: biological process (BP), molecular function (MF), + +and cellular component (CC) ontology term prediction. Details of tasks and datasets are provided in Appendix D.1. + +Evaluation Metrics. FOLD and Reaction are single-label classification tasks, where accuracy serves as the evaluation metric. GO and EC are multi-label classification tasks, evaluated using the protein-centric maximum F-score $F_{max}$ , as detailed in Appendix D.2. + +Comparison Methods. We evaluate different combinations of all the proposed augmentation strategies and conduct ablation studies on each strategy to validate their effectiveness. For a comprehensive comparison, we select various SOTA methods from different categories as baselines. Protein-specific methods: GVP (Jing et al., 2021), GraphQA (Baldassarre et al., 2020), 3DCNN (Derevyanko et al., 2018), IEConv (Hermosilla & Ropinski, 2022), GearNet (Zhang et al., 2023), ProNet (Wang et al., 2023b), CDConv (Fan et al., 2023); 2D topology-based GCL: GraphCL (You et al., 2020), Auto-GCL (Yin et al., 2021), MolCLR (Wang et al., 2022b), T-MGCL (Guan & Zhang, 2023) GCL-Span (Lin et al., 2023a), GCS (Wei et al., 2023), CI-GCL (Tan et al., 2024); 3D structure-based GCL: protein homology modeling tool-based augmentation (Model. Tool) (Waterhouse et al., 2018), and traditional 3D augmentation (Trad. 3D) (Wang et al., 2023b). To our best knowledge, few GCL methods have been specifically designed for proteins. Therefore, we have additionally included two GCL approaches designed for molecules and leveraged their methodological concepts. We adopt a hierarchical Graph Convolutional Network (GCN) serving as the backbone (encoder) for all implemented GCL methods. Details of the baselines and training setup are in Appendix D.3 and C.2, respectively. + +# 5.2.Quantitative Results + +We summarize the performance comparison of different combinations of FCI and 3-PSI augmentations $^2$ across four tasks in Table 9. Extra quantitative results are provided in Appendix F. "Backbone" is learning without any graph augmentation and only supervised by classification loss. + +Compared to 2D topology-based GCL approaches, our proposed FCI consistently enhances performance across all tasks. Notably, it surpasses the best 2D topology-based GCL method, achieving a $4.4\%$ relative gain in GOCC. These results suggest that relying solely on 2D topological information may be insufficient for comprehensive protein representation learning. By preserving functional community information in augmented graphs, FCI enhances protein representation learning, leading to improved performance. + +Compared to 3D graph augmentation methods, our proposed 3-PSIDiag and 3-PSIalpha yield consistent improvements + +Table 1. This table shows the comparison of protein-specific methods, graph contrastive learning approaches (both 2D topology-based and 3D structure-based) and our proposed GCL approach on various protein-related tasks. We report the maximum of F1 score $(F_{max})$ for Enzyme Classification (EC) and Gene Ontology (GO) prediction tasks; and Top-1 accuracy $(\%)$ for Fold and Reaction classification tasks. The performance of CDConv is from our reproduction, while other baseline results are from Fan et al. (2023). + +
MethodECGOFOLDReaction
BPMFCCFoldSuper.Fam.Avg.
Protein-specificGVP0.4890.3260.4260.42016.022.582.840.465.5
3DCNN0.0770.2400.1470.30531.645.492.556.572.2
GraphQA0.5090.3080.3290.41323.732.584.446.960.8
IEConv-0.4210.6240.43147.670.299.272.387.2
GearNet-Edge-IEConv0.8100.4000.5810.43048.370.399.572.785.3
ProNet----52.770.399.374.186.4
CDConv0.8700.4500.6520.47556.976.799.577.088.6
2D Topo. GCLGraphCL0.8600.4320.6440.43256.977.899.277.986.7
Auto-GCL0.8520.4360.6410.41753.672.199.174.986.1
MolCLR0.8690.4430.6230.45554.077.999.577.187.7
T-MGCL0.8430.4220.6280.46855.077.699.577.385.3
GCL-Span0.8590.4340.6500.41958.279.199.478.986.1
GCS0.8640.4400.6450.43754.775.899.276.587.1
CI-GCL0.8700.4400.6510.45357.579.299.578.786.6
3DTrad. 3D Aug.0.8700.4320.6450.42056.678.599.478.186.5
Auto. Tool Aug.0.8630.4390.6430.43556.177.799.477.486.3
Ours (Ablation)Backbone0.8530.4370.6420.43256.576.999.377.886.3
+ FCI0.8780.4460.6560.47358.779.499.579.287.2
+ 3-PSIDiag0.8730.4490.6540.46858.178.699.578.786.9
+ 3-PSIAlpha0.8740.4440.6520.45356.780.499.578.888.3
+ 3-PSIDiag + FCI0.8830.4610.6620.48458.981.399.780.087.8
+ 3-PSIAlpha + FCI0.8850.4540.6590.47759.880.899.580.089.0
+ +across all tasks. In particular, 3-PSIDiag achieves relative improvements of $11.4\%$ in GOCC while 3-PSIalpha shows relative improvements of $2.1\%$ in Reaction compared with best-performing baselines. These improvements stem from the ability of 3-PSIDiag and 3-PSIAlpha to preserve essential protein structural information in augmented graphs, unlike traditional 3D augmentation methods that risk structural disruption or lack conformational diversity. + +Our combined graph augmentation approaches (3-PSIDiag + FCI and 3-PSIAlpha + FCI) achieves substantial improvements over all three categories of baselines. These comprehensive results highlight the synergistic effect of integrating both augmentation strategies, as they complement each other in preserving biological properties of proteins. By maintaining both functional communities and protein 3D structural integrity, our approach generates graphs with enriched protein properties, enabling models to learn better protein representations and enhancing the performance. + +# 5.3. Effect of Augmentation Strength + +In this section, we evaluate the effect of augmentation strength of our framework in 2D topology-based and 3D + +structure-based graph augmentations, using the optimal framework setting for each task (e.g., 3-PSIAlpha + FCI for EC, 3-PSIDiag + FCI for GO). The complete results are provided in Appendix F.6. + +2D Augmentation Strength Analysis. For 2D augmentation comparison, we select GraphCL as the baseline, which randomly drops and adds edges during augmentation. As illustrated in Figure 4, we vary the augmentation strength $\epsilon$ from 0.1 to 0.4, as performance degradation becomes significant beyond this range. Our approach consistently outperforms random augmentation, showing superior performance and stability across different strengths. Furthermore, the results suggest that an optimal $\epsilon$ is critical for generating effective graph views in GCL, as it balances augmentation diversity with the preservation of essential graph properties. The default $\epsilon$ for different tasks is provided in Appendix C.2. + +3D Rotation Strength Analysis. While our proposed $\alpha$ -helices and $\beta$ -sheets rotation preserves protein secondary structures, we vary the number of rotation operations from 1 to 5 across different tasks, as the number of rotations directly influences augmentation strength. As illustrated in Figure 5, we observe that FOLD and GOBP achieve + +![](images/a4136b2ea771f01cbec8a5197c0e1ea64be87ec52fce3f5bde543bb1f66c5045.jpg) +Figure 4. Performance comparison between GraphCL and our approach under different graph augmentation strengths $\epsilon$ (0.1-0.4). + +optimal performance with 2 rotations; Reaction and GOCC perform best with 3 rotations. These findings highlight that optimal augmentation strength (2-3 rotations) provides a balance between diversity and fidelity of protein structure. Additionally, the augmentation strength should be selected based on the specific requirements of each task, as too few rotations may not provide sufficient diversity, while rotating excessively can potentially distort the protein structure. The default number of rotations for different tasks is provided in Appendix C.2. + +![](images/24a32a52526884dda117a40d6b0f6d7744dd01362d7a40b37c9d57ba2f1a2f80.jpg) +Figure 5. Performance analysis under varying rotational strengths of $\alpha$ -helices and $\beta$ -sheets across protein-related tasks. + +# 5.4. Qualitative Evaluation + +In this section, we analyze the robustness of our proposed method, the sensitivity of parameter, and the visualization of representation. + +Robustness Analysis. In practical application, the protein structures of test data may undergo structural changes in response to environmental factors such as pH, temperature, or the presence of specific ions (Wang et al., 2008). This variability poses a challenge to the model's robustness against structural fluctuations during testing. To systematically evaluate such robustness of our proposed method, we randomly select a proportion (10% to 50%) of residues within each protein sample in the test set and apply rotational transformations to these residues along with their connected segments, mimicking intrinsic structural fluctuations in proteins. Higher proportion of transformed residues represents more significant structural deviations from the initial structure. We compare our method with three strong baselines: Trad. 3D Aug., CDConv and CI + +GCL. As presented in Figure 6, our method consistently outperforms baseline methods across all tasks, particularly at higher proportions, demonstrating strong robustness under high-noise conditions. While all methods experience performance degradation as the proportion increases, our approach exhibits less decline, maintaining $\sim 5\%$ better performance—particularly in the Reaction task—compared to the strongest baseline, Trad. 3D Aug. + +![](images/46eda4d532fdf08cf3f0b5a354ea2998c90004bff76b1ffa3c383ebe7fb64977.jpg) +Figure 6. Robustness analysis of models under varying proportion (0.1-0.5) of residues within protein structure. (a) EC, (b) RC. + +![](images/b33d99af6689243c28724b3703d6c4c035b0c7a20e03d6e835683dbcc2210e98.jpg) + +Recognizing that the resolution of protein data can present a challenge and affect precision, it is crucial to validate the robustness of our approach. Therefore, we provide a specific robustness test designed to evaluate the performance of our method confronted with input protein data of varying resolutions. We follow the resolution classification proposed by Rupp (2009) and divide the test set into low-resolution $(\geq 3\AA)$ and high-resolution $(< 3\AA)$ structures for three tasks (we cannot retrieve resolution of data in Fold task). Results are displayed in Table 2. The superior performance of our proposed method on low-resolution structures indicates that the model does not overfit to fine-grained coordinate noise but instead learns invariant features critical for function prediction. This behavior demonstrates strong robustness and generalization across inputs of varying quality. + +Table 2. Evaluation of robustness to input resolution across various protein function prediction tasks. + +
ResolutionECGO-BPGO-MFGO-CCReaction
Low0.9030.4850.6480.5040.921
High0.8880.4650.6870.4630.894
+ +Sensitivity Study. To evaluate the influence of weighting parameter $\lambda$ on model performance, we conducted a sensitivity analysis, the results of which are presented in Table 3. The results demonstrate that model performance exhibits only slight fluctuations across different $\lambda$ values, with $\lambda = 1$ generally yielding superior performance on the majority of metrics. This low sensitivity to $\lambda$ indicates that the model is relatively robust to this hyperparameter, suggesting a straightforward optimization process. The complete results are presented in Table 10. + +Visualization of Representation Learning. We use UMAP + +Table 3. Performance of the proposed method using various values for the hyperparameter $\lambda$ in the loss function. Optimal scores are highlighted in bold. + +
λECGO-BPGO-MFGO-CC
Value0.20.8820.4510.6560.467
0.60.8790.4430.6580.479
1.00.8850.4610.6620.484
1.40.8800.4570.6490.489
1.80.8770.4480.6530.475
+ +projection (McInnes et al., 2018) to visualize learned representations for the Reaction task, comparing our method with the best-performing baseline (Trad.3D Aug.) to assess representation quality. To demonstrate results clearly, we randomly select 6 classes from Reaction task, each containing more than 20 samples. As visualized in Figure 7, 3-PSIAlpha+FCI exhibits more distinct and compact clusters, with clearer boundaries. In contrast, Trad.3D Aug. shows more scattered distribution patterns with noticeable overlap between classes. Quantitatively, 3-PSIAlpha+FCI achieves both tighter intra-class clustering (distance: 19.90 vs 25.21) and better inter-class separation (distance: 43.33 vs 42.11), indicating its superior protein representation learning. + +![](images/cf9ddb5b3d75391ed02a18925366e5827e1a5832570c317ad06b5d3da68d3ac6.jpg) +Average Intra-class Distance: 25.21 +Average Inter-class Distance: 42.11 +Trad. 3D Aug. +Figure 7. UMAP projection of learned protein representations with quantified intra-class and inter-class distances, comparing 3-PSIAlpha+FCI and Trad.3D Aug. approaches. + +![](images/9d999142e84d63bfc9b568fa9fc74fd9fb0a3683a02d4b68ccfdf75ec4944d6e.jpg) +Average Intra-class Distance: 19.90 +Average Inter-class Distance: 43.33 +3-PSIAlpha + FCI + +# 5.5. Analysis on Complexity + +Here we provide the scalability and complexity analysis of our proposed approach. For FCI, preprocessing centers requires computing a probability matrix once, which guides edge perturbations during training. This involves spectral decomposition using the Lanczos algorithm, which efficiently reduces the complexity from $O(N_r^3)$ to $O(N_rK)$ , where $N_r$ is the average number of residues per graph and $K$ is the number of selected eigenvalues. With this matrix precomputed, FCI's augmentation during training (which samples edges based on this matrix) can achieve a highly efficient $O(1)$ time complexity. The augmentation operations are accelerated by NumPy's SIMD vectorization. Given that + +most of the training time is typically consumed by the GNN encoder, FCI demonstrates good scalability. For 3-PSI, its preprocessing is performed once per protein structure to determine dihedral angles and secondary structures with a time complexity of $O(N_{r})$ , where $N_{r}$ is the number of residues. During training, 3-PSI's 3D augmentation perturbs residues, also incurring an $O(N_{r})$ time complexity. The memory footprint for this augmentation scales as $O(B \cdot N_{r})$ , with $B$ denoting the batch size. Despite the linear time complexity for augmentation, these operations benefit significantly from NumPy's SIMD vectorization, leading to fast practical runtime. The resulting performance improvements are considered a justifiable trade-off for additional training time. + +# 5.6. Exploration on Ligand Binding Affinity + +Since protein structure and functionality are preserved, this motivates an assessment of the model's performance on ligand binding affinity datasets. Here, we briefly explore our best setting model on ligand binding affinity task on PDBbind dataset (Liu et al., 2014). We select a representative baseline Holoprot-Superpixel (Somnath et al., 2021) for comparison and results are represented at Table 4. Results demonstrate that our 3-PSIAlpha + FCI model achieves competitive performance. This superiority underscores the robustness and effectiveness of our approach in learning meaningful protein representations that can be successfully applied to predict complex biomolecular interactions. + +Table 4. Model performance comparison on ligand binding affinity task. Model performance comparison. Metrics are abbreviated as follows: R. (RMSE: lower is better), P. (Pearson: higher is better), and S. (Spearman: higher is better). The first three metrics are evaluated at $30\%$ sequence identity, while the last three are at $60\%$ . + +
MethodR.↓P.↑S.↑R.↓P.↑S.↑
Holoprot-Superpixel1.4910.4910.4821.4160.7240.715
3-PSIAlpha + FCI1.4620.5150.5101.3830.7530.749
+ +# 6. Conclusion + +In this work, we address two key limitations in current GCL approaches for protein representation learning: the lack of biologically meaningful 2D topology-based augmentation and the lack of exploring in 3D protein structural graph augmentation. Specifically, we propose two biology-aware graph augmentation strategies from an invariance perspective: 2D topology-based Functional Community Invariance (FCI) and 3D Protein Structure Invariance (3-PSI), integrating them into a unified GCL framework for protein representation learning. Extensive experiments on four widely used protein benchmarks demonstrate that these biology-aware graph augmentation strategies consistently enhance performance across multiple protein prediction tasks, validating their effectiveness in protein representation learning. + +# Impact Statement + +This work advances protein representation learning by introducing biologically-aware graph augmentation methods that preserve important structural and functional properties of proteins. We elaborate on the broader impacts of our work from the following two aspects: (1) Better preservation of protein integrity during graph augmentation, reducing the risk of learning biologically implausible representations; (2) A framework that bridges topology-based and structure-based protein analysis, potentially enabling new insights into protein related tasks. 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. + +# Acknowledgments + +This work was supported in part by Guangdong S&T Program (2021B0909060002) and National Natural Science Foundation of China (NSFC) under Grant No.62204140. We gratefully acknowledge all current related works in this field, which were crucial for completing our research. We also thank Keyu Mao for the discussions on structure retrieval approaches. + +# References + +Asgari, E. and Mofrad, M. R. K. Continuous distributed representation of biological sequences for deep proteomics and genomics. PLoS ONE, 10, 2015. URL https://api.sementicscholar.org/CorpusID:269010973. +Baldassarre, F., Hurtado, D. M., Elofsson, A., and Azizpour, H. Graphq: protein model quality assessment using graph convolutional networks. Bioinformatics, 37:360 - 366, 2020. URL https://api.sementicscholar.org/CorpusID:210848493. +Berkholz, D., Shapovalov, M., Dunbrack, R. L., and Karplus, P. Conformation dependence of backbone geometry in proteins. Structure, 17 10:1316-25, 2009. doi: 10.1016/j.str.2009.08.012. +Betancourt, M. and Skolnick, J. Local propensities and statistical potentials of backbone dihedral angles in proteins. Journal of molecular biology, 342 2:635-49, 2004. doi: 10.1016/J.JMB.2004.06.091. +Chothia, C. and Lesk, A. M. The relation between the divergence of sequence and structure in proteins. *The EMBO journal*, 5(4):823-826, 1986. +Derevyanko, G., Grudinin, S., Bengio, Y., and Lamoureux, G. Deep convolutional networks for quality assess + +ment of protein folds. Bioinformatics, 34:4046-4053, 2018. URL https://api(semanticscholar.org/CorpusID:21654213. +Derewenda, Z., Lee, L., and Derewenda, U. The occurrence of c-h...o hydrogen bonds in proteins. Journal of molecular biology, 252 2:248-62, 1995. doi: 10.1006/JMBI.1995.0492. +Doncheva, N., Klein, K., Domingues, F. S., and Albrecht, M. Analyzing and visualizing residue networks of protein structures. Trends in biochemical sciences, 36 4:179-82, 2011. doi: 10.1016/j.tibs.2011.01.002. +Elnaggar, A., Heinzinger, M., Dallago, C., Rehawi, G., Wang, Y., Jones, L., Gibbs, T., Feher, T., Angerer, C., Steinegger, M., BHOWMIK, D., and Rost, B. Protrans: Towards cracking the language of life's code through self-supervised deep learning and high performance computing. bioRxiv, 2020a. doi: 10.1101/2020.07.12.199554. +Elnaggar, A., Heinzinger, M., Dallago, C., Rehawi, G., Wang, Y., Jones, L., Gibbs, T., Fehér, T. B., Angerer, C., Steinegger, M., Bhowmik, D., and Rost, B. Protrans: Towards cracking the language of life's code through self-supervised deep learning and high performance computing. bioRxiv, 2020b. URL https://api-semanticscholar.org/CorpusID:220495861. +Eswar, N., Webb, B. M., Martí-Remon, M. A., Madhusudhan, M. S., Eramian, D., Shen, M.-Y., Pieper, U., and Sali, A. Comparative protein structure modeling using modeller. Current Protocols in Bioinformatics, 15, 2006. URL https://apisemanticscholar.org/CorpusID:54563862. +Fan, H., Wang, Z., Yang, Y., and Kankanhalli, M. Continuous-discrete convolution for geometry-sequence modeling in proteins. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=P5Z-Z19XJ7. +Feng, S., Ni, Y., Li, M., Huang, Y., Ma, Z.-M., Ma, W.-Y., and Lan, Y. Unicorn: a unified contrastive learning approach for multi-view molecular representation learning. In Proceedings of the 41st International Conference on Machine Learning, ICML'24. JMLR.org, 2024. +Gao, B., Qiang, B., Tan, H., Jia, Y., Ren, M., Lu, M., Liu, J., Ma, W.-Y., and Lan, Y. Drugclip: Contra- sive protein-molecule representation learning for virtual screening. In Neural Information Processing Systems, 2023. URL https://apisemanticscholar. org/CorpusID:268042441. + +Gene, G., Van Loan, C. F., and et al. Matrix computations. JHU press, 2013. +Glaser, F., Steinberg, D., Vakser, I., and Ben-Tal, N. Residue frequencies and pairing preferences at protein-protein interfaces. Proteins: Structure, 43, 2001. doi: 10.1002/1097-0134(20010501)43:2<89::AID-PROT1021>3.0.CO;2-H. +Gligorijevic, V., Renfrew, P. D., Kosciolek, T., Leman, J. K., Berenberg, D., Vatanen, T., Chandler, C., Taylor, B. C., Fisk, I., Vlamakis, H., Xavier, R. J., Knight, R., Cho, K., and Bonneau, R. Structure-based protein function prediction using graph convolutional networks. Nature Communications, 12, 2021. URL https://api-semanticscholar.org/CorpusID:235218243. +Goh, C., Milburn, D., and Gerstein, M. Conformational changes associated with protein-protein interactions. Current opinion in structural biology, 14 1:104-9, 2004. doi: 10.1016/J.SBI.2004.01.005. +Guan, X. and Zhang, D. T-mgcl: Molecule graph contrastive learning based on transformer for molecular property prediction. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 20(6):3851-3862, 2023. doi: 10.1109/TCBB.2023.3326145. +Guy, H. R. Amino acid side-chain partition energies and distribution of residues in soluble proteins. Biophysical journal, 47 1:61-70, 1985. URL https://api.sementicscholar.org/CorpusID:42820515. +Heinemann, P. M., Armbruster, D., and Hauer, B. Active-site loop variations adjust activity and selectivity of the cumene dioxygenase. Nature Communications, 12, 2021. URL https://api.sementicscholar.org/CorpusID:231952735. +Hermosilla, P. and Ropinski, T. Contrastive representation learning for 3d protein structures. ArXiv, abs/2205.15675, 2022. URL https://api_semanticscholar.org/CorpusID:249210008. +Hermosilla, P., Schäfer, M., Lang, M., Fackelmann, G., Vázquez, P.-P., Kozlikova, B., Krone, M., Ritschel, T., and Ropinski, T. Intrinsic-extrinsic convolution and pooling for learning on 3d protein structures. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=10mSUROpwY. +Hogben, L. Handbook of linear algebra. CRC press, 2013. +Hou, J., Adhikari, B., and Cheng, J. Deepsf: deep convolutional neural network for mapping protein sequences to folds. Bioinformatics, 34:1295 - 1303, + +2017. URL https://api_semanticscholar.org/CorpusID:4891436. +Hou, J., Adhikari, B., and Cheng, J. Deepsf: Deep convolutional neural network for mapping protein sequences to folds. In Proceedings of the 2018 ACM International Conference on Bioinformatics, Computational Biology, and Health Informatics, BCB '18, pp. 565, New York, NY, USA, 2018. Association for Computing Machinery. ISBN 9781450357944. doi: 10.1145/3233547.3233716. URL https://doi.org/10.1145/3233547.3233716. +Huang, Y., Li, S., Su, J., Wu, L., Zhang, O., Lin, H., Qi, J., Liu, Z., Gao, Z., Liu, Y., Zheng, J., and Li, S. Z. Protein 3d graph structure learning for robust structure-based protein property prediction. In AAAI Conference on Artificial Intelligence, 2023. URL https://api_semanticscholar.org/CorpusID:264288981. +Hus, J.-C., Salmon, L., Bouvignies, G., Lotze, J., Blackledge, M., and Bruschweiler, R. 16-fold degeneracy of peptide plane orientations from residual dipolar couplings: analytical treatment and implications for protein structure determination. Journal of the American Chemical Society, 130 47:15927-37, 2008. URL https://api_semanticscholar.org/CorpusID:597453. +Jamasb, A. R., Morehead, A., Joshi, C. K., Zhang, Z., Didi, K., Mathis, S. V., Harris, C., Tang, J., Cheng, J., Lio, P., and Blundell, T. L. Evaluating representation learning on the protein structure universe. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=sTYuRVrdK3. +Janin, J., Wodak, S., Levitt, M., and Maigret, B. Conformation of amino acid side-chains in proteins. Journal of molecular biology, 125 3:357-86, 1978. doi: 10.1016/0022-2836(78)90408-4. +Jha, A. K., Colubri, A., Zaman, M., Koide, S., Sosnick, T., and Freed, K. Helix, sheet, and polyproline ii frequencies and strong nearest neighbor effects in a restricted coil library. Biochemistry, 44 28:9691-702, 2005. doi: 10. 1021/BI0474822. +Jing, B., Eismann, S., Suriana, P., Townshend, R. J. L., and Dror, R. Learning from protein structure with geometric vector perceptrons. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=1YLJDvSx6J4. +Jones, D. C. Protein secondary structure prediction based on position-specific scoring matrices. Journal of molecular + +biology, 292 2:195-202, 1999. doi: 10.1006/JMBI.1999.3091. +Kabsch, W. and Sander, C. A. Dictionary of protein secondary structure: Pattern recognition of hydrogen-bonded and geometrical features. Biopolymers, 22, 1983. URL https://apisemantic scholar.org/CorpusID:29185760. +Kulmanov, M. and Hoehndorf, R. Deepgoplus: improved protein function prediction from sequence. Bioinformatics, 36:422 - 429, 2019. URL https://api.sementicscholar.org/CorpusID:146065857. +Li, S., Zhou, J., Xu, T., Dou, D., and Xiong, H. Geomgcl: Geometric graph contrastive learning for molecular property prediction. In Proceedings of the Thirty-Six AAAI Conference on Artificial Intelligence, pp. 4541-4549, 2022. +Liao, Y.-L., Wood, B., Das*, A., and Smidt*, T. EquiformerV2: Improved Equivariant Transformer for Scaling to Higher-Degree Representations. In International Conference on Learning Representations (ICLR), 2024. URL https://openreview.net/forum?id=mCOBKZmrzD. +Lin, L., Chen, J., and Wang, H. Spectral augmentation for self-supervised learning on graphs. In The Eleventh International Conference on Learning Representations, 2023a. URL https://openreview.net/forum?id=DjzBCrMBJ_p. +Lin, Z., Akin, H., Rao, R., Hie, B., Zhu, Z., Lu, W., Smetanin, N., Verkuil, R., Kabeli, O., Shmueli, Y., dos Santos Costa, A., Fazel-Zarandi, M., Sercu, T., Candido, S., and Rives, A. Evolutionary-scale prediction of atomic-level protein structure with a language model. Science, 379(6637):1123-1130, 2023b. doi: 10.1126/science.ade2574. URL https://www.science.org/doi/abs/10.1126/science.ade2574. +Liu, N., Wang, X., Bo, D., Shi, C., and Pei, J. Revisiting graph contrastive learning from the perspective of graph spectrum. In Proceedings of the 36th International Conference on Neural Information Processing Systems, NIPS '22, Red Hook, NY, USA, 2022a. Curran Associates Inc. ISBN 9781713871088. +Liu, S., Wang, H., Liu, W., Lasenby, J., Guo, H., and Tang, J. Pre-training molecular graph representation with 3d geometry. In International Conference on Learning Representations, 2022b. URL https://openreview.net/forum?id=xQUe1pOKPam. + +Liu, Z., Li, Y., Han, L., Li, J., Liu, J., Zhao, Z., Nie, W., Liu, Y., and Wang, R. Pdb-wide collection of binding data: current status of the pdbbind database. Bioinformatics, 31(3):405-412, 10 2014. ISSN 1367-4803. doi: 10.1093/bioinformatics/btu626. URL https://doi.org/10.1093/bioinformatics/btu626. +Liw, A., Pincus, M., Wawak, R., Rackovsky, S., and Scheraga, H. Calculation of protein backbone geometry from alpha-carbon coordinates based on peptide-group dipole alignment. Protein Science, 2, 1993. doi: 10.1002/PRO.5560021015. +Maier, J., Martinez, C., Kasavajhala, K., Wickstrom, L., Hauser, K., and Simmerling, C. ff14sb: Improving the accuracy of protein side chain and backbone parameters from ff99sb. Journal of chemical theory and computation, 11 8:3696-713, 2015. doi: 10.1021/acs.jctc.5b00255. +McInnes, L., Healy, J., Saul, N., and Großberger, L. Umap: Uniform manifold approximation and projection. J. Open Source Softw., 3:861, 2018. URL https://apisemanticscholar.org/CorpusID:53244226. +Mehta, I. D. and Beck, B. Modeling proteins as residue interaction networks to understand structure-function relationship. Biophysical Journal, 106, 2014. doi: 10.1016/J.BPJ.2013.11.358. +Meng, E. C., Goddard, T. D., Pettersen, E. F., Couch, G. S., Pearson, Z. J., Morris, J. H., and Ferrin, T. E. UCSF ChimeraX: Tools for structure building and analysis. Protein Science, 32(11):e4792, 2023. +Mishra, P. and Jha, S. K. The native state conformational heterogeneity in the energy landscape of protein folding. Biophysical Chemistry, 283:106761, 2022. +Murzin, A. G., Brenner, S. E., Hubbard, T., and Chothia, C. Scop: A structural classification of proteins database for the investigation of sequences and structures. Journal of Molecular Biology, 247(4):536-540, 1995. ISSN 0022-2836. doi: https://doi.org/10.1016/S0022-2836(05)80134-2. URL https://www.sciencedirect.com/science/article/pii/S0022283605801342. +Nisius, L. and Grzesiek, S. Key stabilizing elements of protein structure identified through pressure and temperature perturbation of its hydrogen bond network. Nature chemistry, 4 9:711-7, 2012. doi: 10.1038/nchem.1396. +Pothen, A., Simon, H. D., and Liou, K.-P. Partitioning sparse matrices with eigenvectors of graphs. SIAM journal on matrix analysis and applications, 11(3):430-452, 1990. + +Quan, R., Wang, W., Ma, F., Fan, H., and Yang, Y. Clustering for protein representation learning. 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 319-329, 2024. URL https://api_semanticscholar.org/CorpusID:268819344. +Ramachandran, G. N., Ramakrishnan, C., and Sasisekharan, V. Stereochemistry of polypeptide chain configurations. Journal of molecular biology, 7:95-9, 1963. URL https://api.sementicscholar.org/CorpusID:39021189. +Rives, A., Goyal, S., Meier, J., Guo, D., Ott, M., Zitnick, C. L., Ma, J., and Fergus, R. Biological structure and function emerge from scaling unsupervised learning to 250 million protein sequences. Proceedings of the National Academy of Sciences of the United States of America, 118, 2019. URL https://api_semanticscholar.org/CorpusID:155162335. +Rost, B. Review: protein secondary structure prediction continues to rise. Journal of structural biology, 134 2-3: 204-18, 2001. doi: 10.1006/JSBI.2001.4336. +Roterman, I. The geometrical analysis of peptide backbone structure and its local deformations. Biochimie, 77 3:204-16, 1995. URL https://apisemantic scholar.org/CorpusID:23130770. +Rupp, B. Biomolecular crystallography: Principles, practice, and application to structural biology. 2009. URL https://api_semanticscholar.org/CorpusID:92657569. +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, 2009. doi: 10.1109/TNN.2008.2005605. +Schulze, J. O., Saladino, G., Busschots, K., Neimanis, S., Süss, E., Odadzic, D., Zeuzem, S., Hindie, V., Herbrand, A. K., Lisa, M.-N., Alzari, P. M., Gervasio, F. L., and Biondi, R. M. Bidirectional allosteric communication between the atp-binding site and the regulatory pif pocket in pdk1 protein kinase. Cell chemical biology, 23 10:1193-1205, 2016. URL https://apisemanticscholar.org/CorpusID:12656413. +Shi, J. and Malik, J. Normalized cuts and image segmentation. In Conference on Computer Vision and Pattern Recognition, pp. 731-737. IEEE Computer Society, 1997. +Somnath, V. R., Bunne, C., and Krause, A. Multi-scale representation learning on proteins. In Ranzato, M., Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems, + +volume 34, pp. 25244-25255. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/d494020ff8ec181ef98ed97ac3f25453-Paper.pdf. +Stanger, H. E., Syud, F. A., Espinosa, J. F., Giriat, I., Muir, T. W., and Gellman, S. H. Length-dependent stability and strand length limits in antiparallel $\beta$ -sheet secondary structure. Proceedings of the National Academy of Sciences of the United States of America, 98:12015 - 12020, 2001. URL https://apisemantic scholar.org/CorpusID:15024912. +Sticke, D. F., Presta, L., Dill, K., and Rose, G. Hydrogen bonding in globular proteins. Journal of molecular biology, 226 4:1143-59, 1992. doi: 10.1016/0022-2836(92) 91058-W. +Suresh, S., Li, P., Hao, C., and Neville, J. Adversarial graph augmentation to improve graph contrastive learning. In Neural Information Processing Systems, 2021. URL https://api_semanticscholar.org/CorpusID:235391029. +Tan, S., Li, D., Jiang, R., Zhang, Y., and Okumura, M. Community-invariant graph contrastive learning. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net, 2024. URL https://openreview.net/forum?id=dskLpg8WFc. +Tsubaki, M., Tomii, K., and Sese, J. Compoundprotein interaction prediction with end-to-end learning of neural networks for graphs and sequences. Bioinformatics, 35:309-318, 2018. URL https://api. semanticscholar.org/CorpusID:51602254. +van Kempen, M., Kim, S., Tumescheit, C., Mirdita, M., Lee, J., Gilchrist, C. L., Söding, J., and Steinegger, M. Fast and accurate protein structure search with foldseek. Nature Biotechnology, 42:243 - 246, 2022. URL https://api-semanticscholar.org/CorpusID:257837735. +Wang, D., Pourmirzaei, M., Abbas, U. L., Zeng, S., Manshour, N., Esmaili, F., Poudel, B., Jiang, Y., Shao, Q., Chen, J., and Xu, D. S-plm: Structure-aware protein language model via contrastive learning between sequence and structure. Advanced Science, 12, 2023a. URL https://apisemantic scholar.org/CorpusID:260736975. +Wang, L., Liu, H., Liu, Y., Kurtin, J., and Ji, S. Learning hierarchical protein representations via complete 3d graph networks. In The Eleventh International Conference on Learning Representations, 2023b. URL https://openreview.net/forum?id=9X-hgLDLYkQ. + +Wang, Q., Shui, B., Kotlikoff, M. I., and Sondermann, H. Structural basis for calcium sensing by gcamp2. Structure, 16 12:1817-27, 2008. URL https://api-semanticscholar.org/CorpusID:205258893. +Wang, Y., Wang, J., Cao, Z., and Barati Farimani, A. Molecular contrastive learning of representations via graph neural networks. Nature Machine Intelligence, 4(3):279-287, 2022a. +Wang, Y., Wang, J., Cao, Z., and Farimani, A. B. Molecular contrastive learning of representations via graph neural networks. nature machine intelligence, 2022b. +Wang, Y., Fang, X., Yin, H., Li, D., Li, G., Xu, Q., Xu, Y., Zhong, S., and Xu, M. Big-fusion: Brain-inspired global-local context fusion framework for multimodal emotion recognition in conversations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 1574-1582, 2025. +Wang, Z., Combs, S. A., Brand, R., Rebollar, M. C., Xu, P., Price, G. D., Golovach, N., Salawu, E. O., Wise, C., Ponnapalli, S. P., and Clark, P. M. Lm-gvp: A generalizable deep learning framework for protein property prediction from sequence and structure. bioRxiv, 2021. URL https://api.sementicscholar.org/CorpusID:237610356. +Waterhouse, A. M., Bertoni, M., Bienert, S., Studer, G., Tauriello, G., Gumienny, R., Heer, F. T., de Beer, T. A. P., Rempfer, C., Bordoli, L., Lepore, R., and Schwede, T. SWISS-MODEL: homology modelling of protein structures and complexes. *Nucleic Acids Research*, 46:W296 - W303, 2018. URL https://api.sementicscholar.org/CorpusID:44079570. +Webb, E. C. Enzyme nomenclature 1992. recommendations of the nomenclature committee of the international union of biochemistry and molecular biology on the nomenclature and classification of enzymes. 1992. URL https://apisemantic scholar.org/CorpusID:83964422. +Wei, C., Wang, Y., Bai, B., Ni, K., Brady, D., and Fang, L. Boosting graph contrastive learning via graph contrastive saliency. 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. 36839-36855. PMLR, 23-29 Jul 2023. URL https://proceedings.mlr.press/v202/wei23c.html. + +Wood, M. J. and Hirst, J. Protein secondary structure prediction with dihedral angles. Proteins: Structure, 59, 2005. doi: 10.1002/prot.20435. +Yan, A. and Jernigan, R. L. How do side chains orient globally in protein structures? Proteins: Structure, 61, 2005. URL https://apisemantic scholar.org/CorpusID:20224659. +Yang, K. K., Wu, Z., Bedbrook, C. N., Arnold, F. H., and Wren, J. Learned protein embeddings for machine learning. Bioinformatics, 34:2642-2648, 2018. URL https://api_semanticscholar.org/CorpusID:263478963. +Yin, Y., Wang, Q., Huang, S., Xiong, H., and Zhang, X. Autogcl: Automated graph contrastive learning via learnable view generators. In AAAI Conference on Artificial Intelligence, 2021. URL https://api-semanticscholar.org/CorpusID:237581111. +You, Y., Chen, T., Sui, Y., Chen, T., Wang, Z., and Shen, Y. Graph contrastive learning with augmentations. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 5812-5823. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/3fe230348e9a12c13120749e3f9fa4cd-Paper.pdf. +You, Y., Chen, T., Shen, Y., and Wang, Z. Graph contrastive learning automated. In International Conference on Machine Learning, 2021. URL https://api-semanticscholar.org/CorpusID:235422690. +Zhang, Z., Xu, M., Jamasb, A. R., Chenthamarakshan, V., Lozano, A., Das, P., and Tang, J. Protein representation learning by geometric structure pretraining. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=to3qCB3tOh9. +Zhou, G., Gao, Z., Ding, Q., Zheng, H., Xu, H., Wei, Z., Zhang, L., and Ke, G. Uni-mol: A universal 3d molecular representation learning framework. In International Conference on Learning Representations, 2023. URL https://api_semanticscholar.org/CorpusID:259298651. +Zhu, Y., Xu, Y., Yu, F., Liu, Q., Wu, S., and Wang, L. Deep Graph Contrastive Representation Learning. In ICML Workshop on Graph Representation Learning and Beyond, 2020. URL http://arxiv.org/abs/2006.04131. + +Zhuo, L., Chi, Z., Xu, M., Huang, H., Zhao, J., Zheng, H., He, C., Mao, X.-L., and Zhang, W. ProtLLM: An interleaved protein-language LLM with protein-as-word pre-training. 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. 8950-8963, Bangkok, Thailand, August 2024. Association for Computational Linguistics. doi: 10.18653/v1/2024.acl-long.484. URL https://aclanthology.org/2024.acl-long.484. + +# A. Augmentation with Homology Modeling + +Homology modeling is a computational technique that predicts protein 3D structures by identifying and leveraging structural templates from homologous proteins with known conformations (Chothia & Lesk, 1986). For our implementation, we employ SWISS-MODEL (Waterhouse et al., 2018) for homology modeling and visualize the results using ChimeraX (Meng et al., 2023). The effectiveness of homology modeling varies significantly with template availability. In the upper panel of Figure 8 ('Matched' case), we demonstrate cases where high-identity templates exist (demonstrated with Protein IDs: 1AD6 and 9PCY). Here, we can compare multiple predicted structures against their known original structures, revealing high structural similarity regardless of which template is used. This consistency, while validating the prediction accuracy, also indicates limited structural diversity in the augmented outcomes. The lower panel illustrates a more challenging scenario ('Unmatched' case) using artificially constructed protein sequences that simulate novel proteins without known structures. For each sequence, we designate the prediction from the highest-identity template as a reference structure for comparison. Due to the lack of high-identity templates, these predictions, even when compared to their respective references, exhibit substantial variations in both local secondary structures and global folds, demonstrating the inherent uncertainty in structure prediction when suitable templates are scarce. It also raises concerns about whether such structural uncertainty would impact the reliability and effectiveness of graph augmentation. + +![](images/83693730642901bfb39006bd6e0b9dc083e5f39240695c85d2fe74d2c70afa33.jpg) +Figure 8. Structural variations in SWISS-MODEL predictions. Upper panel: Known proteins (1AD6 and 9PCY) serve as references to evaluate multiple predictions using different templates (template IDs in parentheses), showing high consistency across predictions. Lower panel: For each artificial sequence, the prediction using the highest-identity template is labeled as a reference, with subsequent predictions demonstrating structural diversity arising from template scarcity. + +# B. Key Terms Related to Protein + +Amino Acid Residue: An amino acid residue refers to a single amino acid unit within a polypeptide chain, formed after the loss of water during peptide bond formation. Residues are the basic units of protein sequences and structures, playing a key role in all four tasks: FOLD, Reaction, GO, and EC, as their properties and arrangements determine protein function and classification (Glaser et al., 2001; Doncheva et al., 2011). + +Dihedral Angle: A dihedral angle (or torsion angle) describes the rotation around a bond in a protein backbone, such as the phi $(\phi)$ and psi $(\psi)$ angles. These angles define the spatial arrangement of the polypeptide chain. Dihedral angles determine protein folding patterns and are crucial for predicting protein structure in tasks like FOLD and GO (Betancourt & Skolnick, 2004; Wood & Hirst, 2005). + +Hydrogen Bond: A hydrogen bond is a weak electrostatic interaction between a hydrogen atom (bound to an electronegative atom like nitrogen or oxygen) and another electronegative atom. In proteins, hydrogen bonds stabilize secondary structures like $\alpha$ -helices and $\beta$ -sheets. Hydrogen bonds are essential for maintaining protein structure and function, directly impacting tasks like FOLD and Reaction (Sticke et al., 1992; Derewenda et al., 1995). + +Peptide Plane: The peptide plane refers to the rigid, planar structure formed by the peptide bond (C-N) and its adjacent atoms $(\mathrm{C}_{\alpha}, \mathrm{C}, \mathrm{N},$ and O) in a protein backbone. This planar structure is a fundamental unit of protein conformation. The peptide plane's rigidity influences protein folding and secondary structure formation, which are critical for tasks like FOLD and GO (Roterman, 1995; Hus et al., 2008). + +Protein Conformation: Protein conformation refers to the three-dimensional shape or spatial arrangement of a protein, determined by the rotation of bonds and interactions between amino acids. Protein conformation is critical for all four tasks (FOLD, Reaction, GO, and EC) as it determines structural, functional, and interaction properties of proteins (Goh et al., 2004; Berkholz et al., 2009). + +Secondary Structure: The secondary structure of a protein refers to local, repetitive conformations of the polypeptide chain, primarily $\alpha$ -helices and $\beta$ -sheets, stabilized by hydrogen bonds. Secondary structures are the building blocks of protein folds and are directly relevant to tasks like FOLD and EC, as they influence enzyme active sites and catalytic mechanisms (Jones, 1999; Rost, 2001). + +Side Chain: The side chain (or R-group) is the variable part of an amino acid that extends from the backbone. Side chains determine the chemical properties and interactions of amino acids. Side chains are critical for protein function, including enzyme catalysis and binding, making them essential for tasks like Reaction and EC (Janin et al., 1978; Maier et al., 2015). + +# C. Details of Implementation + +# C.1. Graph Construction + +The node feature is derived from the Torch Embedding function ${}^{3}$ of residue types. Additionally, we incorporate the side chain embeddings ${\mathbf{v}}_{\mathrm{{sc}}}$ for each residue to enrich biological information in GNN representations. To achieve rotational invariance, we adopt the relative spatial encoding scheme from Fan et al. (2023) to construct edge features. For edge features between nodes $i$ and $j$ ,we combine sequence information from the original dataset with three spatial components: the normalized relative position vector, its projection in the local coordinate system, and the pairwise distance, ensuring protein structure representation remains invariant under global rotations. + +# C.2. Details of Training Setup + +Our approach is implemented using the PyTorch framework 2.1.0 and the PyTorch-Geometric library 2.6.0. The CUDA version is 12.4. It is trained on RTX 3090 GPUs. We utilize the SGD optimizer with a momentum of 0.9, a learning rate of 1e-2, and a weight decay of 5e-4. The initial graph construction radius is set to 4. All results are averaged over 5 runs with different random seeds. The training batch sizes for each task are as follows: FOLD (16), Reaction (32), GOCC (32), GOMF (24), GOBP (24), and EC (32). We simply set the weight of GCL loss to lambda=1 in our objective function throughout our experiments. For the augmentation strength of FCI, we set $\epsilon = 0.2$ for GO, EC, and Reaction, and $\epsilon = 0.3$ for FOLD. For the augmentation strength of 3-PSIAalpha, we set 2 rotations for EC, GOBP, and FOLD, and 3 rotations for GOCC and + +Reaction. For 3-PSIDiag, we perturb all dihedral angles. + +# C.3. Details of Skew-symmetric Matrix + +Here is the detail of the skew-symmetric matrix $[\widehat{\mathbf{a}}]_{\times}$ in Sec 4.2: + +$$ +[ \widehat {\mathbf {a}} ] _ {\times} = \left[ \begin{array}{c c c} 0 & - n _ {z} & n _ {y} \\ n _ {z} & 0 & - n _ {x} \\ - n _ {y} & n _ {x} & 0 \end{array} \right]. +$$ + +# C.4. Details of The Backbone + +We implement an Edge-aware Graph Convolutional Network (EdgeGCN) as our GNN encoder. It incorporates edge features into the message-passing framework. The encoder consists of $L$ stacked EdgeGCN layers, where each layer performs the following operations: + +$$ +\mathbf {h} _ {i} ^ {(l + 1)} = \sum_ {j \in \mathcal {N} (i)} \mathbf {h} _ {j} ^ {(l)} \odot \mathbf {W} _ {e} \mathbf {e} _ {i j} \tag {12} +$$ + +where $\mathbf{h}_i^{(l)}$ denotes the node features of node $i$ at layer $l$ , $\mathcal{N}(i)$ represents the neighborhood of node $i$ , $\mathbf{e}_{ij}$ is the edge feature vector between nodes $i$ and $j$ , and $\mathbf{W}_e$ is a learnable edge transformation matrix. The operator $\odot$ denotes element-wise multiplication. + +We introduce a structure-aware graph pooling mechanism from (Fan et al., 2023) that hierarchically reduces graph resolution while preserving critical structural information in protein graphs. The pooling operation is guided by sequence indices to ensure biologically meaningful node clustering. The pooling process first establishes clustering assignments by halving sequence indices, effectively grouping adjacent nodes in the protein chain. Within each formed cluster, the pooling mechanism aggregates different node attributes through specialized operations: node features and 3D coordinates are averaged to maintain spatial information, orientation vectors are averaged and re-normalized to preserve valid directional information, and sequence information is preserved through maximum pooling. This pooling strategy reduces the graph resolution by approximately half at each level while preserving the essential structural relationships, enabling the network to build hierarchical representations at multiple scales. + +# D. Details of Datasets, Evaluation, and Baselines + +# D.1. Details of Tasks and Datasets + +We use the same dataset settings as the previous work (Fan et al., 2023), and the details are shown as follows: + +Protein Fold Classification. Protein fold classification is crucial for understanding the relationship between protein structure and evolution. Fold classes capture secondary structure compositions, orientations, and connection orders. Following Hermosilla et al. (2021), we conduct fold classification using the SCOPe 1.75 dataset (Hou et al., 2018), comprising 16,712 proteins across 1,195 fold classes. The 3D coordinates are derived from the SCOPe 1.75 database (Murzin et al., 1995). The dataset provides three evaluation scenarios: Fold: Excludes proteins from the same superfamily during training; Superfamily: Excludes proteins from the same family during training; Family: Includes proteins from the same family during training. Mean accuracy is used as the evaluation metric. + +Enzyme Reaction Classification. This task involves classifying enzyme-catalyzed reactions based on all four levels of the Enzyme Commission (EC) number (Webb, 1992), representing a protein function classification problem. We utilize the dataset by Hermosilla et al. (2021), which includes 384 four-level Enzyme Commission classes and comprises 29,215/2,562/5,651 proteins for training/validation/test, respectively. Mean accuracy is the evaluation metric. + +Gene Ontology Term Prediction. This multi-label classification task predicts protein functions through Gene Ontology terms, organized into three hierarchical ontologies: biological process (BP, 1,943 classes), molecular function (MF, 489 classes), and cellular component (CC, 320 classes). Using the dataset from (Gligorijevic et al., 2021), we train/validate/test on 29,898/3,322/3,415 proteins, respectively. The $F_{max}$ metric (Fan et al., 2023) is used for evaluation. + +Enzyme Commission Number Prediction. This multi-label task predicts three-level and four-level EC numbers across 538 classes. Using the dataset from Gligorijević et al. (2021), we train/validate/test on 15,550/1,729/1,919 proteins, respectively. The $F_{max}$ metric is applied for evaluation. For GO term and EC number prediction, we adhere to the multi-cutoff splits from Gligorijević et al. (2021), ensuring the test set only includes PDB chains with a sequence identity $\leq 95\%$ to the training set, consistent with Zhang et al. (2023); Fan et al. (2023). + +# D.2. Details of Evaluation Matrix $F_{max}$ + +Multi-label classification can be interpreted as a set of binary classification tasks. The protein-centric maximum F-Score $(F_{max})$ , as defined by Gligorijević et al. (2021), is used to evaluate the accuracy of multi-label classification. Given a decision threshold $\lambda \in [0,1]$ , let $p_i^j$ denote the predicted probability for the $j$ -th class of the $i$ -th protein, $b_i^j \in \{0,1\}$ be the corresponding binary class label, and $J$ be the total number of classes. The precision and recall for the $i$ -th protein are calculated as follows, following the approach described in (Fan et al., 2023): + +$$ +\operatorname {p r e c i s i o n} _ {i} (\lambda) = \frac {\sum_ {j = 1} ^ {J} (p _ {i} ^ {j} \geq \lambda) \cap b _ {i} ^ {j}}{\sum_ {j = 1} ^ {J} (p _ {i} ^ {j} \geq \lambda)}, \quad \operatorname {r e c a l l} _ {i} (\lambda) = \frac {\sum_ {j = 1} ^ {J} (p _ {i} ^ {j} \geq \lambda)}{\sum_ {j = 1} ^ {J} b _ {i} ^ {j}}. +$$ + +The average precision and recall across all proteins are then defined as: + +$$ +\operatorname {p r e c i s i o n} (\lambda) = \frac {\sum_ {i = 1} ^ {N} \operatorname {p r e c i s i o n} _ {i} (\lambda)}{\sum_ {i = 1} ^ {N} \left(\left(\sum_ {j = 1} ^ {J} \left(p _ {i} ^ {j} \geq \lambda\right)\right) \geq 1\right)}, \quad \operatorname {r e c a l l} (\lambda) = \frac {\sum_ {i = 1} ^ {N} \operatorname {r e c a l l} _ {i} (\lambda)}{N}. +$$ + +Finally, $F_{\mathrm{max}}$ is calculated as the maximum F-Score across all thresholds $\lambda \in [0,1]$ : + +$$ +F _ {\max } = \max _ {\lambda \in [ 0, 1 ]} \left\{\frac {2 \times \operatorname {p r e c i s i o n} (\lambda) \times \operatorname {r e c a l l} (\lambda)}{\operatorname {p r e c i s i o n} (\lambda) + \operatorname {r e c a l l} (\lambda)} \right\}. +$$ + +# D.3. Details of Baselines + +For a comprehensive performance evaluation, we compare our approach with the following SOTA baselines, categorized into protein-specific methods, 2D topology-based GCL methods and 3D structure-based GCL: + +# Protein-specific methods: + +GVP (Jing et al., 2021) specifically handles scalar and geometric vector features in protein structures, incorporating geometric relationships between amino acids. The method introduces a novel neural network layer that maintains rotational and translational equivariance through specialized vector operations. + +GraphQA (Baldassarre et al., 2020) focuses on protein structure quality assessment using graph-based representations of proteins. It uniquely integrates both local and global structural features through a hierarchical graph representation. + +3DCNN (Derevyanko et al., 2018) uses 3D convolutional neural networks to analyze protein structures directly in their three-dimensional form. The method employs a voxelization strategy to convert continuous protein structures into discrete 3D grids. + +IEConv (Hermosilla & Ropinski, 2022) uses contrastive learning with a specific focus on maintaining geometric invariance and equivariance in protein structure analysis. It introduces specialized convolution operations that preserve geometric symmetries while processing protein structures. + +GearNet (Zhang et al., 2023) is specifically designed for protein structure analysis incorporating geometric information. It features a multi-scale message-passing mechanism that captures both short-range and long-range protein interactions. + +ProNet (Wang et al., 2023b) is a specialized protein structure learning framework. The framework stands out for its multi-view representation learning approach that jointly considers backbone geometry, side-chain orientations, and residue interactions. + +CDConv (Fan et al., 2023) bridges continuous and discrete representations in protein structure analysis. It features an adaptive sampling strategy that efficiently processes both continuous sequences and discrete atom coordinates. + +# 2D topology-based GCL methods: + +GraphCL (You et al., 2020) is a graph contrastive learning framework that applies various augmentation techniques including node dropping, edge perturbation, attribute masking, and subgraph sampling. + +Auto-GCL (Yin et al., 2021) automatically learns optimal augmentation strategies for graph contrastive learning through a bi-level optimization framework. + +GCL-Span (Lin et al., 2023a) uses spectral analysis for graph contrastive learning, leveraging graph spectral filtering to create diverse views. + +GCS (Wei et al., 2023) focuses on effective sampling strategies with an adaptive mechanism for informative negative samples. + +CI-GCL (Tan et al., 2024) incorporates causal inference principles, employing intervention mechanisms to generate counterfactual graph views. + +# 3D structure-based GCL methods: + +Traditional 3D augmentation (Wang et al., 2023b), which employs traditional transformations like random coordinate perturbations. + +Protein homology modeling tool (Waterhouse et al., 2018) leverages established protein modeling algorithms to generate physically plausible structural variants. + +# E. Proofs + +# E.1. The Proof of Theorem 4.1 in the Draft + +Definition E.1. (Eigenvalue Perturbation) Assume matrix $\mathbf{A}'$ , the altered portion is represented by $\Delta \mathbf{A} = \mathbf{A}' - \mathbf{A}$ , and the changed degree is denoted as $\Delta \mathbf{D}$ . According to matrix perturbation theory (Hogben, 2013), the change in amplitude for the $y$ -th eigenvalue can be represented as: + +$$ +\Delta \lambda_ {y} = \lambda_ {y} ^ {\prime} - \lambda_ {y} = \mathbf {u} _ {y} ^ {\top} \Delta \mathbf {A} \mathbf {u} _ {y} - \lambda_ {y} \mathbf {u} _ {y} ^ {\top} \Delta \mathbf {D} \mathbf {u} _ {y} + \mathcal {O} (\| \Delta \mathbf {A} \|). \tag {13} +$$ + +Lemma E.2. If we only flip one edge $(i,j)$ on adjacency matrix $\mathbf{A}$ , the change of $y$ -th eigenvalue can be write as + +$$ +\Delta \lambda_ {y} = \Delta c _ {i j} \left(2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right)\right), \tag {14} +$$ + +where $u_{yi}$ is the $i$ -th entry of $y$ -th eigenvector $\mathbf{u}_y$ , and $\Delta c_{ij} = (1 - 2A_{ij})$ indicates the edge flip, i.e. + +Proof. Let $\Delta \mathbf{A}$ be a matrix with only 2 non-zero elements, namely $\Delta A_{ij} = \Delta A_{ji} = 1 - 2A_{ij}$ corresponding to a single edge flip $(i,j)$ , and $\Delta \mathbf{D}$ the respective change in the degree matrix, i.e. $\mathbf{A}' = \mathbf{A} + \Delta \mathbf{A}$ and $\mathbf{D}' = \mathbf{D} + \Delta \mathbf{D}$ . + +Denote with $\mathbf{e}_i$ the vector of all zeros and a single one at position $i$ . Then, we have $\Delta \mathbf{A} = \Delta c_{ij}(\mathbf{e}_i\mathbf{e}_j^\top + \mathbf{e}_j\mathbf{e}_i^\top)$ and $\Delta \mathbf{D} = \Delta c_{ij}(\mathbf{e}_i\mathbf{e}_i^\top + \mathbf{e}_j\mathbf{e}_j^\top)$ . + +Based on eigenvalue perturbation formula (13) by removing the high-order term $\mathcal{O}(\| \Delta \mathbf{A}\|)$ , we have: + +$$ +\Delta \lambda_ {y} \approx \mathbf {u} _ {y} ^ {\top} (\Delta \mathbf {A} - \lambda_ {y} \Delta \mathbf {D}) \mathbf {u} _ {y} \tag {15} +$$ + +Substituting $\Delta \mathbf{A}$ and $\Delta \mathbf{D}$ , we conclude Eq. 14. + +Theorem E.3. For unweighted graph, the constraint on the lowest $k$ eigenvalues of the normalized Laplacian matrix $\mathbf{L}_{\mathrm{norm}}$ ensures the preservation of the community structure of nodes. + +Proof. Firstly, we separate $\Delta \mathbf{A} = \Delta_{\mathbf{A}+} - \Delta_{\mathbf{A}-}$ , where $\Delta_{\mathbf{A}+}$ and $\Delta_{\mathbf{A}-}$ indicate which edge is added and deleted, respectively. To analyze the change of eigenvalues in spectral space corresponding to the perturbation of edges in spatial + +space, we first consider the situation that only augments one edge for both edge-dropping $(\Delta c_{ij} = -1)$ and edge-adding $(\Delta c_{ij} = 1)$ : + +① In the case of edge dropping $(\Delta c_{ij} = -1$ in Lemma E.2), we have + +$$ +\Delta \lambda_ {y} = - 2 u _ {y i} \cdot u _ {y j} + \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {16} +$$ + +$$ += \left(u _ {y i} - u _ {y j}\right) ^ {2} + \left(\lambda_ {y} - 1\right) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {17} +$$ + +If we only drop the edge $(i,j)$ that makes a large change in the eigenvalues. We have the objective function as + +$$ +\underset {\{i, j \mid \Delta c _ {i j} = - 1 \}} {\arg \max } \sum_ {y = 1} ^ {n} | \Delta \lambda_ {y} | = | \left(u _ {y i} - u _ {y j}\right) ^ {2} + (\lambda_ {y} - 1) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) | \tag {18} +$$ + +$$ +\leq \sum_ {y = 1} ^ {n} \left| \left(u _ {y i} - u _ {y j}\right) ^ {2} \right| + \sum_ {y = 1} ^ {n} \left| \lambda_ {y} - 1 \right| \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {19} +$$ + +$$ += \left\| \mathbf {U} _ {i}. - \mathbf {U} _ {j}. \right\| ^ {2} + \sum_ {y = 1} ^ {n} \left| \lambda_ {y} - 1 \right| \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {20} +$$ + +$$ +\leq \left\| \mathbf {U} _ {i \cdot} - \mathbf {U} _ {j \cdot} \right\| ^ {2} + \sum_ {y = 1} ^ {n} \left| \lambda_ {y} - 1 \right| \left(u _ {y 1} ^ {2} + u _ {y 2} ^ {2} + \dots + u _ {y n} ^ {2}\right) \tag {21} +$$ + +$$ += \left\| \mathbf {U} _ {i}. - \mathbf {U} _ {j}. \right\| ^ {2} + \sum_ {y = 1} ^ {n} \left| \lambda_ {y} - 1 \right| \tag {22} +$$ + +Notice that $\mathbf{u}_y$ is the $y$ -th column of $\mathbf{U}$ , so $u_{yi} = U_{iy}$ and $\mathbf{U}_{i,\cdot} = [u_{0i}, u_{1i}, \ldots, u_{ni}]$ . From the first item in Eq. 35, we prefer to select the nodes with larger distances in the eigenvector spaces, i.e. two nodes belonging to different communities (The relationship between eigenvector and community structure is proved in Theorem E.6). + +② In the case of edge adding $(\Delta c_{ij} = 1$ in Lemma E.2), we have + +$$ +\Delta \lambda_ {y} = 2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {23} +$$ + +$$ += - \left(u _ {y i} - u _ {y j}\right) ^ {2} - \left(\lambda_ {y} - 1\right) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {24} +$$ + +If we only add the edge $(i,j)$ that makes a small change in the eigenvalues. We have the objective function as + +$$ +\underset {\{i, j \mid \Delta c _ {i j} = + 1 \}} {\arg \min } \sum_ {y = 1} ^ {n} | \Delta \lambda_ {y} | = | \left(u _ {y i} - u _ {y j}\right) ^ {2} + (\lambda_ {y} - 1) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) | \tag {25} +$$ + +$$ +\geq \sum_ {y = 1} ^ {n} \left| \left(u _ {y i} - u _ {y j}\right) ^ {2} \right| - \sum_ {y = 1} ^ {n} \left| 1 - \left(\lambda_ {y}\right) \right| \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {26} +$$ + +$$ +\geq \left\| \mathbf {U} _ {i.} - \mathbf {U} _ {j.} \right\| ^ {2} - \sum_ {y = 1} ^ {n} | (1 - \lambda_ {y}) | \left(u _ {y 1} ^ {2} + u _ {y 2} ^ {2} + \dots + u _ {y n} ^ {2}\right) \tag {27} +$$ + +$$ += \left\| \mathbf {U} _ {i}. - \mathbf {U} _ {j}. \right\| ^ {2} - \sum_ {y = 1} ^ {n} | (1 - \lambda_ {y}) | \tag {28} +$$ + +From the first item in Eq. 28, we prefer to select nodes with smaller distances in the eigenvector spaces, i.e. nodes belonging to one community (Theorem E.6). + +Previously, we have proven that the constraint on the lowest $k$ eigenvalues of $\mathbf{L}$ ensures the preservation of community structure when we only augment one edge. Next, we will demonstrate that the perturbation of more than one edge still aligns with this theory. + +Suppose we augment $m$ edges, similar to Lemma 14, we replace $\Delta \mathbf{A} = \sum_{(i,j)\in \{m\text{edges}\}}\Delta c_{ij}(\mathbf{e}_i\mathbf{e}_j^\top +\mathbf{e}_j\mathbf{e}_i^\top)$ , and $\Delta \mathbf{D} = \sum_{(i,j)\in \{m\text{edges}\}}\Delta c_{ij}(\mathbf{e}_i\mathbf{e}_i^\top +\mathbf{e}_j\mathbf{e}_j^\top)$ , we Substituting $\Delta \mathbf{A}$ and $\Delta \mathbf{D}$ of Eq. (31), we get: + +$$ +\Delta \lambda_ {y} = \sum_ {(i, j) \in \{m \text {e d g e s} \}} \Delta c _ {i j} \left(2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right)\right), \tag {29} +$$ + +By replacing $\Delta c_{ij}\left(2u_{yi} \cdot u_{yj} - \lambda_y\left(u_{yi}^2 + u_{yj}^2\right)\right)$ with Eqs. (35, 28), we could easily see that the community preserving theory is satisfied. + +# E.2. The Proof of Lemma 4.2 in the Draft + +Lemma E.4. If we only flip one edge $(i,j)$ on adjacency matrix $\mathbf{A}$ with edge weight $\mathbf{W}$ , the change of $y$ -th eigenvalue can be write as + +$$ +\Delta \lambda_ {y} = \left\{ \begin{array}{l l} - W _ {i j} \left(2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right)\right), & \text {i f e d g e d r o p p i n g} \\ 2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right), & \text {i f e d g e a d d i n g} \end{array} \right. \tag {30} +$$ + +where $u_{yi}$ is the $i$ -th entry of $y$ -th eigenvector $\mathbf{u}_y$ . + +Proof. Let $\Delta \mathbf{A}$ be a matrix with only 2 non-zero elements, namely $\Delta A_{ij} = \Delta A_{ji} = -W_{ij}$ corresponding to a single edge dropping $(i,j)$ , and $\Delta A_{ij} = \Delta A_{ji} = 1$ corresponding to a single edge adding $(i,j)$ . $\Delta \mathbf{D}$ is the respective change in the degree matrix, i.e. $\mathbf{A}' = \mathbf{A} + \Delta \mathbf{A}$ and $\mathbf{D}' = \mathbf{D} + \Delta \mathbf{D}$ . + +Denote with $\mathbf{e}_i$ the vector of all zeros and a single one at position $i$ . For edge dropping, we have $\Delta_{\mathbf{A} - } = -W_{ij}(\mathbf{e}_i\mathbf{e}_j^\top +\mathbf{e}_j\mathbf{e}_i^\top)$ and $\Delta_{\mathbf{D} - } = -W_{ij}(\mathbf{e}_i\mathbf{e}_i^\top +\mathbf{e}_j\mathbf{e}_j^\top)$ . For edge adding, we have $\Delta_{\mathbf{A} + } = (\mathbf{e}_i\mathbf{e}_j^\top +\mathbf{e}_j\mathbf{e}_i^\top)$ and $\Delta_{\mathbf{D} + } = (\mathbf{e}_i\mathbf{e}_i^\top +\mathbf{e}_j\mathbf{e}_j^\top)$ . + +Based on eigenvalue perturbation formula (13) by removing the high-order term $\mathcal{O}(\| \Delta \mathbf{A}\|)$ , we have: + +$$ +\Delta \lambda_ {y} \approx \mathbf {u} _ {y} ^ {\top} (\Delta \mathbf {A} - \lambda_ {y} \Delta \mathbf {D}) \mathbf {u} _ {y} \tag {31} +$$ + +Substituting $\Delta \mathbf{A}$ and $\Delta \mathbf{D}$ , for edge dropping and edge adding respectively, we conclude: + +$$ +\Delta \lambda_ {y} = \left\{ \begin{array}{l l} - W _ {i j} \left(2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right)\right), & \text {i f e d g e d r o p p i n g} \\ 2 u _ {y i} \cdot u _ {y j} - \lambda_ {y} \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right), & \text {i f e d g e a d d i n g} \end{array} \right. \tag {32} +$$ + +Lemma E.5. For weighted graphs, maximizing the spectral change during edge dropping ensures that edges between communities and those with large edge weights are more likely to be removed. + +Proof. For weighted graph (Lemma E.4), we have + +$$ +\Delta \lambda_ {y} = W _ {i j} \left(u _ {y i} - u _ {y j}\right) ^ {2} + W _ {i j} \left(\lambda_ {y} - 1\right) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) \tag {33} +$$ + +If we only drop the edge $(i,j)$ that makes a large change in the eigenvalues. We have the objective function (similar to the proof in Theorem E.3) as: + +$$ +\begin{array}{l} \underset {\{i, j \}} {\arg \max } \sum_ {y = 1} ^ {n} | \Delta \lambda_ {y} | = | W _ {i j} | \cdot | \left(u _ {y i} - u _ {y j}\right) ^ {2} + (\lambda_ {y} - 1) \left(u _ {y i} ^ {2} + u _ {y j} ^ {2}\right) | (34) \\ \leq \left| W _ {i j} \right| \cdot \left(\left\| \mathbf {U} _ {i}. - \mathbf {U} _ {j}. \right\| ^ {2} + \sum_ {y = 1} ^ {n} \left| \lambda_ {y} - 1 \right|\right), (35) \\ \end{array} +$$ + +In this case, edge $(i,j)$ across different communities $(\| \mathbf{U}_i - \mathbf{U}_j\|^2$ is large) and with large $|W_{ij}|$ are more likely to be removed. + +# E.3. The relation between community and spectrum + +Theorem E.6. The spectral decomposition can indicate a relaxed solution of graph vertex partition. Given a graph $G$ with a Laplacian matrix $\mathbf{L}$ , and the spectral decomposition is indicated as $\mathbf{D}^{-\frac{1}{2}}\mathbf{L}\mathbf{D}^{-\frac{1}{2}} = \mathbf{U}\boldsymbol{\Lambda}\mathbf{U}^{\top}$ , where $\mathbf{D}$ is the degree matrix and $\mathbf{U}$ , $\boldsymbol{\Lambda}$ are eigenvectors, eigenvalues correspondingly. The second smallest eigenvalue and its corresponding eigenvector indicate a bipartition of the graph. + +Proof. Given a partition of nodes of a graph (split $V$ into two disjoint sets $S_A$ and $S_B$ ), let $\mathbf{x}$ be an indicator vector for the partition, $x_i = 1$ if node $i$ is in $S_A$ , and $-1$ , otherwise. Let $d_i$ be the degree of node $i$ , and $w_{ij}$ is the weight of edge $(i,j)$ . Based on (Shi & Malik, 1997), a normalized cut could be write as + +$$ +N c u t \left(S _ {A}, S _ {B}\right) = \frac {\sum_ {x _ {i} > 0 , x _ {j} < 0} - w _ {i j} x _ {i} x _ {j}}{\sum_ {x _ {i} > 0} d _ {i}} + \frac {\sum_ {x _ {i} < 0 , x _ {j} > 0} - w _ {i j} x _ {i} x _ {j}}{\sum_ {x _ {i} > 0} d _ {i}}. \tag {36} +$$ + +The optimal partition is computed by minimizing the normalized cut: $\min_{\mathbf{x}} Ncut(\mathbf{x})$ . By setting $\mathbf{y} = (1 + \mathbf{x}) - b(1 - \mathbf{x})$ , $k = \frac{\sum_{x_i > 0} d_i}{\sum_i d_i}$ and $b = \frac{k}{1 - k}$ , we could rewrite it as + +$$ +\min _ {\mathbf {x}} N c u t (\mathbf {x}) = \min _ {\mathbf {y}} \frac {\mathbf {y} ^ {\top} \mathbf {L} \mathbf {y}}{\mathbf {y} ^ {\top} \mathbf {D} \mathbf {y}}. \tag {37} +$$ + +with the condition $y_{i}\in 1, - b$ , and $\mathbf{y}^{\top}\mathbf{D}\mathbf{1} = 0$ + +According to the Rayleigh quotient (Gene et al., 2013), we can minimize Eq. 37 by solving the generalized eigenvalue system, if $\mathbf{y}$ is relaxed to take on real values. + +$$ +\mathbf {L} \mathbf {y} = \lambda \mathbf {D} \mathbf {y} \tag {38} +$$ + +By writing $\mathbf{z} = \mathbf{D}^{\frac{1}{2}}\mathbf{y}$ , we could transform the Eq. 38 to a standard eigensystem: + +$$ +\mathbf {D} ^ {- \frac {1}{2}} \mathbf {L} \mathbf {D} ^ {- \frac {1}{2}} \mathbf {z} = \lambda \mathbf {z} \tag {39} +$$ + +Because the Laplacian matrix is positive semidefinite (Pothen et al., 1990), we can easily verify that $\mathbf{z}_0 = \mathbf{D}^{\frac{1}{2}}\mathbf{1}$ is the smallest eigenvector of Eq. 39 with eigenvalue 0. And correspondingly, $\mathbf{y}_0 = \mathbf{1}$ is the smallest eigenvector with an eigenvalue of 0 in the general eigensystem 38, but do not satisfy the condition $\mathbf{y}^\top \mathbf{D}\mathbf{1} = 0$ . According to the Lemma E.7, we could know that the second smallest eigenvector $\mathbf{z}_1$ is the solution of Eq. 37, because $\mathbf{z}_1^\top \mathbf{z}_0 = \mathbf{y}_1^\top \mathbf{D}\mathbf{1} = 0$ satisfy the condition in Eq. 37. + +Therefore, the second smallest eigenvalue and its corresponding eigenvector indicate a bipartition of the graph. While the next cut must be perpendicular to others, which is the third smallest eigenvalue corresponding eigenvector $\mathbf{z}_2^\top \mathbf{z}_1 = \mathbf{z}_2^\top \mathbf{z}_0$ . Recursively, the $k$ -dimensional eigenvectors can represent the community structure of a graph to some extent. + +Lemma E.7. A simple fact about the Rayleigh quotient (Gene et al., 2013): Let $\mathbf{A}$ be a real symmetric matrix. Under the constraint that $\mathbf{x}$ is orthogonal to the $j - 1$ smallest eigenvectors $\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_{j-1}$ , the quotient $\frac{\mathbf{x}^\top \mathbf{A} \mathbf{x}}{\mathbf{x}^\top \mathbf{x}}$ is minimized by the next smallest eigenvector $\mathbf{x}_j$ and its minimum value is the corresponding eigenvalue $\lambda_j$ . + +# F. More Detailed Experiments + +# F.1. Go and EC Prediction under Different Sequence Cutoffs + +For GO and EC, we follow the evaluation protocol established by (Gligorijevic et al., 2021), where proteins in the test set are divided based on their sequence similarity to the training set, using cutoffs of $30\%$ , $40\%$ , $50\%$ , $70\%$ , and $95\%$ . This systematic evaluation across different similarity thresholds helps assess model generalization ability and robustness. Table E.3 presents comprehensive results comparing our methods with existing approaches. Our complete framework demonstrates consistent improvements across all four protein-related tasks compared to existing methods. For instance, compared to the top-performing method CDConv, the combination of 3-PSIAlpha and FCI demonstrates superior performance, achieving a 0.0185 improvement at the $95\%$ similarity cutoff in EC. The ablation studies further validate the effectiveness of our design choices, showing that each component contributes to the overall performance improvement. Notably, the performance + +Table 5. This table shows the comparison of general protein approaches, graph contrastive learning approaches (both 2D topology-based and 3D structure-based) and our proposed GCL approach on Go and EC under different sequence cutoffs. We report the maximum F1 score $(F_{max})$ for Enzyme Classification (EC) and Gene Ontology (GO) prediction tasks; and Top-1 accuracy (\%) for Fold and Reaction classification tasks. The performance of CDConv is from our reproduction, while other baseline results are from (Fan et al., 2023). + +
CutoffGO-CCGO-MF
30%40%50%70%95%30%40%50%70%95%
Protein-specificCNN0.2580.2570.2600.2630.3870.2380.2430.2560.2920.354
ResNet0.2770.2730.2800.2780.3040.2820.2880.3080.3470.405
LSTM0.2630.2640.2690.2700.2830.2230.2290.2450.2760.321
Transformer0.3780.3820.3880.3950.4050.1840.1870.1950.2040.211
GearNet0.3810.3850.3930.3980.4140.3820.3970.4250.4740.503
GearNet-Edge0.3940.3940.4010.4080.4500.4440.4610.4900.5370.580
CDConv0.4290.4330.4420.4470.4750.5350.5510.5730.6200.652
2D Topo. GCLGraphCL0.3930.3780.4000.4050.4320.5160.5300.5440.6100.644
Auto-GCL0.3730.3740.3990.3940.4170.5100.5310.5560.6040.641
GCL-Span0.3810.3830.3940.4000.4190.5150.5270.5510.6200.650
GCS0.3890.3820.3950.4040.4370.5180.5360.5660.6130.645
CI-GCL0.3570.3730.3910.4100.4530.5190.5330.5610.6140.651
3DTrad. 3D Aug.0.3850.3840.3870.3940.4200.5210.5430.5470.6150.645
Auto. Tool Aug.0.3670.3760.3800.4050.4350.5150.5400.5350.6120.643
Ours (Ablation)Backbone0.3910.3970.4040.4280.4320.5090.5310.5580.6040.642
+ FCI0.4390.4410.4560.4540.4730.5320.5490.5750.6250.656
+ 3-PSIDiag0.4380.4370.4450.4560.4680.5320.5520.5780.6200.654
+ 3-PSIAlpha0.4250.4290.4310.4370.4530.5250.5440.5720.6180.652
+ 3-PSIDiag + FCI0.4590.4620.4670.4680.4840.5420.5590.5850.6290.662
+ 3-PSIAlpha + FCI0.4420.4500.4750.4550.4770.5330.5510.5780.6220.659
GO-BPEC
Cutoff30%40%50%70%95%30%40%50%70%95%
Protein-specificCNN0.1970.1950.1970.2110.2440.3660.3610.3720.4290.545
ResNet0.2300.2300.2340.2490.2800.4090.4120.4500.5260.605
LSTM0.1940.1920.1950.2050.2250.2470.2490.2700.3330.425
Transformer0.2670.2650.2620.2620.2640.1670.1730.1750.1970.238
GearNet0.3090.3090.3150.3360.3560.5570.5700.6150.6930.730
GearNet-Edge0.3450.3470.3540.3780.4030.6250.6460.6940.7570.810
CDConv0.3800.3870.4020.4310.4500.7210.7480.7820.8250.870
2D Topo. GCLGraphCL0.3820.3860.4100.4110.4320.7240.7430.7710.8290.860
Auto-GCL0.3650.3730.3850.4080.4360.7140.7460.7830.8340.852
GCL-Span0.3870.3950.4040.4080.4340.7390.7740.8040.8470.859
GCS0.3870.3860.4070.4140.4400.7240.7560.7920.8320.864
CI-GCL0.3920.3910.4110.4200.4400.7490.7830.8100.8440.870
3DTrad. 3D Aug.0.3780.3890.3880.4050.4320.7470.7600.7960.8430.870
Auto. Tool Aug.0.3680.3750.3830.3970.4390.7290.7610.7880.8390.863
Ours (Ablation)Backbone0.3510.3710.3850.4080.4370.7100.7370.7680.8180.853
+ FCI0.3850.3800.3980.4150.4460.7430.7710.8070.8500.878
+ 3-PSIDiag0.3770.3850.3940.4120.4490.7440.7690.8060.8520.873
+ 3-PSIAlpha0.3810.3800.3900.4130.4440.7380.7650.8030.8480.874
+ 3-PSIDiag + FCI0.3910.3990.4100.4360.4610.7450.7830.8150.8580.883
+ 3-PSIAlpha + FCI0.3780.3880.3990.4250.4540.7490.7730.8080.8590.885
+ +advantage of our methods is more pronounced at lower sequence similarity cutoffs (30-50%), which represents a more challenging and realistic scenario in protein function prediction, demonstrating remarkable robustness. This suggests that our supervised graph contrastive learning framework better captures fundamental protein structural features, leading to more robust and generalizable predictions. + +# F.2. Compare with Protein Language Models + +In recent years, protein representation learning has witnessed significant advances through the development of large-scale protein language models and self-supervised learning approaches (Hermosilla & Ropinski, 2022; Zhang et al., 2023). These methods typically rely on extensive pre-training with massive datasets to learn protein representations. For example, ESM-1b (Rives et al., 2019) utilizes UniRef50 (24M sequences), while ProtBERT-BFD (Elnaggar et al., 2020a) leverages the even larger BFD dataset (2.1B sequences). The underlying assumption is that utilizing large-scale protein data during pre-training enables these models to capture fundamental protein properties and patterns. A parallel line of research has explored self-supervised learning specifically for 3D protein structures. These approaches aim to learn effective representations by designing various pretext tasks. For instance, Hermosilla & Ropinski (2022) proposed a contrastive learning framework that maximizes similarity between sub-structures from the same protein while minimizing similarity between sub-structures from different proteins. Zhang et al. (2023) extended this idea by incorporating multiple self-supervised tasks, including: maximizing agreement between different augmented views of the same protein, predicting residue types, and learning to estimate geometric properties. + +However, some fundamental questions remain: (1) how can we select self-supervised tasks, which is sufficient to learn truly effective protein representations? (2) these methods typically require extensive computational resources for training on large-scale datasets with data cleaning, preprocessing, and significant effort in designing and validating multiple self-supervised tasks. Different from these works, our work concentrates on designing an effective supervised graph contrastive learning paradigm that enables graph neural networks to better capture protein structural information. Also, this invariant paradigm may improve the baseline for the pre-training or self-supervised learning works. Here, we compare our approach with various SOTA methods including protein language models and self-supervised learning approaches: DeepFRI (Gligorijevic et al., 2021), ESM-1b (Rives et al., 2019), ProtBERT-BFD (Elnaggar et al., 2020b), LM-GVP (Wang et al., 2021), residue-level IECov (Hermosilla & Ropinski, 2022), and GearNet-based methods (Zhang et al., 2023). As demonstrated in Table F.2 and Table F.2, our invariance-based supervised GCL framework achieves comparable or superior performance across multiple tasks, notably outperforming these methods on fold classification and enzyme reaction prediction, despite not using any pre-training or self-supervised learning strategies. + +Table 6. Accuracy of protein fold classification between different protein language models and our proposed GCL approach. Baseline results are from (Fan et al., 2023). + +
MethodPre-training Dataset (Size)Fold Classification
FoldSuperfamilyFamily
DeepFRIPfam (10M)15.320.673.2
ESM-1bUniRef50 (24M)26.860.197.8
ProtBERT-BFDBFD (2.1B)26.655.897.6
IEConv (residue level)PDB (476K)50.380.699.7
GearNet-Edge-IEConv with Multiview ContrastAlphaFoldDB (805K)54.180.599.9
GearNet-Edge-IEConv with Residue Type PredictionAlphaFoldDB (805K)48.871.099.4
GearNet-Edge-IEConv with Distance PredictionAlphaFoldDB (805K)50.973.599.4
GearNet-Edge-IEConv with Angle PredictionAlphaFoldDB (805K)56.576.399.6
GearNet-Edge-IEConv with Dihedral PredictionAlphaFoldDB (805K)51.877.899.6
3-PSIDiag + FCI-58.981.399.7
3-PSIAlpha + FCI-59.880.899.5
+ +# F.3. Functional Community Preservation Analysis + +In this section, we evaluate how well different 2D topology-based graph augmentation strategies preserve functional communities within protein graphs. Specifically, we focus on protein pockets (i.e., spatially contiguous sets of residues), + +Table 7. Accuracy of enzyme catalytic reaction classification and ${F}_{max}$ of gene ontology term prediction and enzyme commission number prediction between different protein language models and our proposed GCL approach. Baseline results are from (Fan et al., 2023). + +
MethodPre-training Dataset (Size)EnzymeGene OntologyEnzyme Commission
BPMFCC
DeepFRI*Pfam (10M)63.30.3990.460.4600.631
ESM-1b†UniRef50 (24M)83.10.4760.6570.4980.864
ProtBERT-BFDBFD (2.1B)72.20.2790.4560.4080.838
LM-GVPUniRef100 (216M)-0.4170.5450.5270.664
IEConv (residue level)PDB (476K)88.10.4680.6610.516-
GearNet-Edge with Multiview ContrastAlphaFoldDB (805K)87.50.4900.6540.4880.874
GearNet-Edge with Residue Type PredictionAlphaFoldDB (805K)86.60.4300.6040.4650.843
GearNet-Edge with Distance PredictionAlphaFoldDB (805K)87.50.4480.6160.4640.839
GearNet-Edge with Angle PredictionAlphaFoldDB (805K)86.80.4580.6250.4730.853
GearNet-Edge with Dihedral PredictionAlphaFoldDB (805K)87.00.4580.6260.4650.859
3-PSIDiag + FCI-87.80.4610.6620.4840.883
3-PSIAlpha + FCI-89.00.4520.6590.4770.885
+ +which naturally align with the radius-based graph construction used in GNNs. Protein pockets directly govern essential protein functions, such as substrate binding, catalysis, and allosteric regulation (Schulze et al., 2016). Although various functional annotation methods exist (such as domain partitioning or coevolutionary residue coupling), these approaches do not necessarily translate into local adjacency in a graph neural network. By contrast, pockets exhibit a spatially contiguous arrangement of residues that naturally aligns with the radius-based graph construction employed by GNNs to some extent. Thus, pockets offer a practical evaluation, unlike other globally defined or purely evolutionary methods that are not readily translated into graph-level representations. + +For quantitative evaluation, we first identify functional edges by detecting residues in pockets using fpocket ${}^{4}$ . These edges connecting residues within pockets are considered critical and should be preserved during augmentation. Then we evaluate how well our augmented graphs maintain these essential functional connections by calculating the preservation rate: + +Let $\mathcal{E}_{\mathrm{func}}$ be the set of functional edges (connections between residues within identified pockets) in the original graph, and $\mathcal{E}_{\mathrm{aug}}$ be the edges in the augmented graph. The preservation rate $\eta$ is calculated as: + +$$ +\eta = \frac {\left| \mathcal {E} _ {\text {func}} \cap \mathcal {E} _ {\text {aug}} \right|}{\left| \mathcal {E} _ {\text {func}} \right|} \times 100 \% \tag{40} +$$ + +where $|\mathcal{E}_{\mathrm{func}} \cap \mathcal{E}_{\mathrm{aug}}|$ represents the number of functional edges preserved after augmentation, and $|\mathcal{E}_{\mathrm{func}}|$ is the total number of functional edges in the original graph. + +As shown in Table 8, our FCI method achieves higher preservation rates across all tasks compared to other methods, demonstrating its effectiveness in maintaining the integrity of functional communities during graph augmentation. + +Table 8. Preservation rates (%) of functional communities across three graph augmentation methods (Auto-GCL, CI-GCL, and FCI) on four protein-related tasks: GO, EC, FOLD, and Reaction. + +
MethodGOECFOLDReaction
Auto-GCL75.2978.9370.8873.43
CI-GCL91.8794.2176.8888.05
FCI96.6998.0290.8797.45
+ +# F.4. Compare with Protein Learning Methods + +In this section, we further compare with our proposed method with protein structure learning models (PSL): Uni-mol (Zhou et al., 2023), P3G (Huang et al., 2023), ESM-2 (Lin et al., 2023b), S-PLM (Wang et al., 2023a); equivariant graph neural networks (EG) EquiformerV2 (Liao et al., 2024); and structure retrieval approaches (SR) Foldseek (van Kempen et al., 2022). We report results of S-PLM and P3G from their original papers, and ESM-2 from [1]. Uni-mol and EquiformerV2 are reproduced. For the GO task, we evaluated Foldseek on a subset of 150 samples as exploration. Despite this, our method achieves comparable performance, even though Foldseek relies on a larger external protein database (e.g., RCSB and PDB) for retrieval-based prediction. While our GO-BP result is lower, we outperform Foldseek on GO-MF and GO-CC. Trained from scratch on a smaller dataset, our model shows strong generalization and effective representation learning. Uni-mol and EquiformerV2 underperform due to their models being tailored to molecules rather than proteins. Compared to S-PLM, our method achieves competitive results on the EC and GO datasets, while consistently outperforming S-PLM on FOLD and Reaction. + +Table 9. Evaluation of our proposed method against several categories of protein learning models: protein structure learning (PSL), structure retrieval (SR), and equivariant graph networks (EG). Best scores are highlighted in bold. + +
MethodECGOFOLDReaction
BPMFCCFoldSuper.Fam.Avg.
PSLUni-mol0.7210.3470.4410.39731.461.090.560.974.2
P3G0.7840.3790.5480.448-----
ESM-20.8610.4600.6630.42738.581.599.273.0-
S-PLM0.8880.4950.6850.48437.778.098.871.586.71
SRFoldseek-0.5820.5700.472----90.60
EGEquiformerV20.7510.3510.4800.37529.965.288.061.076.42
Ours0.8850.4610.6620.48459.881.399.780.389.00
+ +# F.5. Sensitive Study of $\lambda$ + +Complete results of sensitive study are presented at Table 10. + +Table 10. Performance of the proposed method using various values for the hyperparameter $\lambda$ in the loss function. Optimal scores are highlighted in bold. + +
λECGOFOLDReaction
BPMFCCFoldSuper.Fam.Avg.
Value0.20.8820.4510.6560.46756.580.299.878.886.2
0.60.8790.4430.6580.47958.280.799.679.587.5
1.00.8850.4610.6620.48458.981.399.779.989.0
1.40.8800.4570.6490.48959.180.699.779.887.8
1.80.8770.4480.6530.47558.580.299.879.588.3
+ +# F.6. Complete Results in the Draft + +Figure 9 shows results of 2D augmentation strength analysis on all protein-related tasks. For both FOLD and GO, we report the mean performance of their subtasks. + +Figure 10 shows results of robustness analysis on GOMF, EC, FOLD and Reaction. + +Figure 11 shows results of 3D augmentation strength analysis on all tasks. + +![](images/de4e0239d989a51dad83e4265c22e9100d36855b98c38fe1502c903b9acf3553.jpg) + +![](images/8784dd3b4059dc0dc57751fab94723bd36a2fa643ee3e3d4c68fe9f2393d3034.jpg) +Figure 9. Performance comparison between GraphCL and our method under different graph augmentation strengths $\epsilon$ (0.1-0.4). For the GO, we report the average performance of three subtasks. + +![](images/fe6d4ae499badd61fd93d5e5310ef724ff1607d89597c03847f7aa02b5030bed.jpg) + +![](images/f7f11b23845a13742d1c53d312870fc24ed40447c03d87e35b373a7cb9fcd71b.jpg) + +![](images/7fc7b9b99dac711ae3f249d8d0a162b6ca206f1ebd3b42c019805ef36d7414ee.jpg) +Figure 10. Robustness analysis of models under varying perturbation ratios for protein structure. This figure shows model performance $(F_{max}$ for GOMF and EC tasks; accuracy for FOLD and RC tasks) across different noise ratios (0.1-0.5) on four distinct prediction tasks: (a) GOMF, (b) EC, (c) FOLD, and (d) RC. + +![](images/da3fd6b65c4376c3828282cbe655eaf2f1ee8a3661927504abd47677cf31f141.jpg) + +![](images/3c30d4ac538b7bd476a2afc1a0b8c9a1d5d5d46030791eb28e5ddbd91e28f86e.jpg) +Figure 11. Performance analysis of the model under varying $\alpha$ -helices and $\beta$ -sheets rotational fold strengths across all tasks. \ No newline at end of file diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/images.zip b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7c568e47ac9105f9e305660e8cb72f89655fd1db --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7cd302dd991032d83c99ca0becadda115d52aaf56a1ae2eadbab29b12a17f9d +size 1745232 diff --git a/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/layout.json b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..01594097f1c81a759ea21876333e580d117283d9 --- /dev/null +++ b/ICML/2025/Enhancing Graph Contrastive Learning for Protein Graphs from Perspective of Invariance/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c491c077cb36b7753bd797887a072d06d2697382c09aab0099f5cc9acb22fa2 +size 1017252 diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_content_list.json b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..26697beceb661713cd230d71f382df4e05dfdc68 --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c48f3f4d42f1d5bd956394f88714b158a0022a3dba9425bdaf7fa07ecc160acf +size 141177 diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_model.json b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_model.json new file mode 100644 index 0000000000000000000000000000000000000000..482076d20c923fa9787e0224d86e902673062cd9 --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a46903f1f93c5e4f09752e792b31563d9c6a3dd9a03d47bc63b002ec8a6486f4 +size 172586 diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_origin.pdf b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5661be1266ce2e8da15d3eccc1d7cbb73b2d24fd --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/e95f3c6e-55eb-4a69-aebc-454dbd1c1e40_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:137b18a550533ffa730f1c325e360c603ef2d6e0225ddb306b0f17e4d0ca5c42 +size 1019497 diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/full.md b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/full.md new file mode 100644 index 0000000000000000000000000000000000000000..28ba6faaa83423e36996ca21732a125939c37e81 --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/full.md @@ -0,0 +1,583 @@ +# Enhancing Graph Invariant Learning from a Negative Inference Perspective + +Kuo Yang $^{12\dagger}$ Zhengyang Zhou $^{12\dagger}$ Qihe Huang $^{12}$ Wenjie Du $^{12*}$ Limin Li $^{12}$ Wu Jiang $^{3}$ Yang Wang $^{12*}$ + +# Abstract + +The out-of-distribution (OOD) generalization challenge is a longstanding problem in graph learning. Through studying the fundamental cause of data distribution shift, i.e., the changes of environments, significant progress has been achieved in addressing this issue. However, we observe that existing works still fail to effectively address complex environment shifts. Existing practices place excessive attention on extracting causal subgraphs, inevitably treating spurious subgraphs as environment variables. While spurious subgraphs are controlled by environments, the space of environment changes encompass more than the scale of spurious subgraphs. Therefore, existing efforts have a limited inference space for environments, leading to failure under severe environment changes. To tackle this issue, we propose a negative inference graph OOD framework (NeGo) to broaden the inference space for environment factors. Inspired by the successful practice of prompt learning in capturing underlying semantics and causal associations in large language models, we design a negative prompt environment inference to extract underlying environment information. We further introduce the environment-enhanced invariant subgraph learning to effectively exploit inferred environment embedding, ensuring the robust extraction of causal subgraph in the environment shifts. Lastly, we conduct a comprehensive evaluation of NeGo on real-world datasets and synthetic datasets across domains. NeGo outperforms baselines on nearly all datasets, which verify the effectiveness of our framework. + +†Equal Contribution. 1University of Science and Technology of China (USTC), Hefei, China 2Suzhou Institute for Advanced Research, USTC, Suzhou, China 3China Mobile Communications Group Co.,Ltd. Correspondence to: Yang Wang* , Wenjie Du* . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Graph Neural Networks (GNNs) have emerged as the predominant approach for encoding graph data (Kipf & Welling, 2016; Xu et al., 2018), delivering notable achievements in various research fields including molecular property prediction (Jumper et al., 2021; Yang et al., 2022), recommendation systems (Wu et al., 2022b; Gao et al., 2022), and traffic flow forecasting (Liang et al., 2018; Zhou et al., 2020). However, as real-world data is evolving with complex patterns, the challenge of data distribution shift has become a major obstacle for GNNs (Gui et al., 2022; Ji et al., 2022; Wang et al., 2023; Zhou et al., 2022b; Zou et al., 2023; Sun et al., 2022c; 2024). Therefore, various studies concentrate on improving the Out-Of-Distribution (OOD) generalization ability of graph learning models (Chen et al., 2024; 2022; Gui et al., 2024; Miao et al., 2022; Sui et al., 2022; Li et al., 2022; Wu et al., 2022c; Sun et al., 2022b). + +Recently, environment-centered invariant learning methods achieved impressive OOD generalization performance with the aim of inferring underlying environment factors in data (Chen et al., 2024; Gui et al., 2024; Xia et al., 2023; Yuan et al., 2023). Those efforts demonstrate that the changes of environment are the fundamental reason for the shift of data distribution (Grice & White, 1961; Liu et al., 2021; Peters et al., 2016). However, existing approaches still lack the ability to decouple causal subgraphs from complex environments. As shown in Fig. 1(a), we double the scale of spurious substructures in the SPURIOUS-MOTIF(0.5), and observe a significant decrease in the performance of current methods when they are re-conducted on this modified dataset. The reason lies in that current methods, even those claiming to model environments, focus much of their attention on extracting causal subgraphs (Chen et al., 2022; Wu et al., 2022a;c; Sun et al., 2021). This results in the model being able to extract causal subgraphs only in known environments, and failing in modeling unseen complex environments. Therefore, this poses a challenging research question: how to broaden the inference space of environments, enabling model to handle complex environment shifts. + +We argue that this limitation arises from the positive learning paradigm that focuses solely on extracting causal subgraphs as its primary objective. In contrast, negative inference paradigm, modeling the sample space except the invariant + +![](images/1953bdf9fde07c99f13f20a7e9276bd155ef73c3b5bfc4362cc9e8a7c23fea9f.jpg) +(a) Degradation in performance. + +![](images/4d864d26bd4f1c9061c109696490c463212bf7fb6702b3345028d81c8e60ed7a.jpg) +(b) Prediction failure in complex environments. +Figure 1. The motivation of our work. (a) We double the scale of spurious substructures in the SPURIOUS-MOTIF(0.5) (Ying et al., 2019), and observe a significant decrease in the performance of current methods when they are re-conducted on this modified dataset. (b) The OOD methods, which treat spurious subgraphs as the environments, fail to address the shift of complex environments. + +subgraph as environments, has the potential to broaden the perception scope of environment. As shown in Fig. 1(b), the positive inference can only infer the specific ladder, wheel, and tree as environment variables, while the negative inference approach can model all variable space except the cycle and house as environments. However, the inaccessibility of environment information pose challenges to implementing such negative inference. Specifically, (1) how to formulate the negative inference learning to achieve environment awareness, and (2) how to fully utilize environment information for facilitating causal invariant learning. + +In this work, we propose a novel Negative inference Graph OOD framework (NeGo). NeGo aims to achieve causal invariant learning against complex environment shifts by a negative inference. Firstly, we design a negative prompt learning framework for inferring underlying environment factors. Given a specific sample with label $Y$ , we model all extra-class samples as the environment space for this sample. This design enables the model to capture a broader scale of environments, no more limiting to in-sample spurious subgraphs. Secondly, we introduce an environment-enhanced invariant learning strategy to effectively utilize inferred environment variables. Specifically, we design an interactive decoding scheme that utilizes an attention-based residual connection to encapsulate environment embedding into node representations. Different from traditional approaches that neglect the information of environment variables during subgraph extraction (Chen et al., 2024; Gui et al., 2024), our design incorporates the underlying environment patterns into the process of invariant subgraph learning. Lastly, we conduct a comprehensive evaluation of NeGo on real-world datasets across domains, and synthetic datasets. NeGo outperforms baselines on nearly all datasets. Our contributions can be summarized as follows: + +- We observe that existing environment-centered OOD practices encounter difficulties in handling complex environment shifts. Through a comprehensive investigation, we + +identify that limited environment space for positive inference is the main reason restricting the generalization capacity of existing OOD approaches. + +- We propose a novel invariant learning framework with negative inference $\mathsf{N e G o}$ . To be specific, we design an innovative environment inference strategy via negative inference, which effectively broadens the inference space of environment factors. Moreover, we introduce an attention-based residual connection to offer our model with the ability to resist complex environment shifts. +- We conduct extensive experiments on both synthetic and real-world datasets with distribution shifts to evaluate the performance of $\mathsf{N e G o}$ . The results from both visualization and quantitative analysis indicate that our framework successfully achieves accurate prediction in complex environmental scenarios. + +# 2. Background + +Preliminaries. A graph is denoted as $G = (\mathcal{X},\mathcal{A})\in \mathcal{G}$ where $\mathcal{G}$ is the observed graph dataset. $\mathcal{A}\in \mathbb{R}^{N\times N}$ represents the adjacency matrix and $\mathcal{X}\in \mathbb{R}^{N\times d}$ denotes node features, where $N$ indicates the number of nodes and $d$ is the feature dimension. Each graph is associated with a corresponding label $Y$ . From the perspective of causal theory, the graph data can be partitioned into a spurious subgraph $G_{S}$ and a causal subgraph $G_{C}$ , where $G_{C}$ directly determines its label $Y$ . The spurious subgraph $G_{S}$ is controlled by the spurious variable $C$ , while the causal subgraphs $G_{C}$ is controlled by the causal invariant factor $C$ , as shown in Fig. 4. Based on the different interdependencies among $C$ , $S$ and $Y$ , structural causal models (SCMs) can be further classified into Full Informative Invariant Features (FIIF) and Partially Informative Invariant Features (PIIF) (Ahuja et al., 2021; Chen et al., 2022). + +Problem definition. Our work aims to address the limitations of existing approaches in handling complex data + +distribution shifts. We specifically focus on broadening the inference scope of environments, enabling the network to handle intricate scenarios of environment shifts. Additionally, our framework is required to effectively tackle both FIIF and PIIF challenges. + +Environment inference with negative prompt. Our negative prompter is proposed to achieve a broader inference scale of environments, which is inspired by the success of prompt learning in language models (Brown et al., 2020; Gao et al., 2020). Prompt learning is designed to capture underlying semantic knowledge in language data, which improves the generalization ability of models by introducing appropriate prompt tokens to guide the network learn desired answers (Rao et al., 2022; Sordoni et al., 2024; White et al., 2023; Sun et al., 2023). For example, in the semantic emotion classification task, the language model constructs a template such as "the emotion expressed by this sentence is [class]", where [class] is trained to learn real label. In a similar way, our framework can be viewed as constructing a set of text prompts such as "the underlying environments of current sample are [answer]", where [answer] can be guided to capture the real environment states. + +Different from random data augmentation techniques (Han et al., 2022; Li et al., 2021; Lu et al., 2024; Rong et al., 2019; Wang et al., 2021; You et al., 2020; Zhao et al., 2021) and distributionally robust optimization (DRO) methods (Staib & Jegelka, 2019; Wu et al., 2024; Zhu et al., 2021), our prompt-based approach not only broadens the scale of environment inference but also deepens the understanding of underlying data generation process. Existing methods always expand the inference boundary of the model by incorporating stochastic perturbations. However, the introduction of randomness prevents the model from capturing the underlying semantics and hinders its ability to deepen the understanding of generation process. In contrast, our prompt-based approach allows us to deeply extract the underlying casual correlation of variables, which is the reason why we introduce the technique of prompt learning. + +# 3. Related works + +# 3.1. OOD Generalization. + +Out-of-Distribution (OOD) generalization refers to the task of adapting a model that has been trained on a specific distribution to effectively process data from a potentially different distribution. Various approaches can be employed for OOD generalization, including data augmentation (Rong et al., 2019; Wang et al., 2021; You et al., 2020), domain adaptation (Wang & Deng, 2018), and causal invariant learning (Sui et al., 2022; Wu et al., 2022c). Among them, causal invariant learning demonstrates impressive performance in + +various fields, due to its powerful interpretability (Chen et al., 2022; Li et al., 2022; Miao et al., 2022; Wu et al., 2022c). Most existing invariant learning methods focus on extracting the causal subgraph to achieve invariant learning. This strategy limits the inference space of the environments to the dimension of spurious subgraphs, which hinders the ability of models to capture the complex environment states. In this work, we propose an invariant learning mechanism based on negative inference to address this limitation. + +# 3.2. Prompt Learning + +Prompt learning is proposed in NLP models to infer underlying semantic and potential causal associations in linguistic data. Many effective prompt methods have developed with the introduction of large language models, including some hand-crafted prompts (Brown et al., 2020), discrete prompts (Gao et al., 2020; Shin et al., 2020), and learnable prompts design (Li & Liang, 2021). In recent years, prompt learning has also been developed in the graph learning field (Sun et al., 2022a; Li et al., 2024; Sun et al., 2023; Zi et al., 2024). Our approach is the pioneering effort to apply prompt learning to address the graph OOD generalization issue. + +# 3.3. Comparisons to Existing Graph OOD Works + +Environment-centered studies (Chen et al., 2024; Gui et al., 2024; Li et al., 2022; Wu et al., 2022a; Yang et al., 2022) consider that the data distribution shifts stem from the changes of environments. Therefore, these practices enable the model to withstand data distribution shifts by inferring environment variables. Concretely, the networks are often trained with the objective of equipping models to effectively handle mixed environments scenarios. However, this design allows the networks to make narrow inference about the environments, and makes the networks unable to handle with distribution shifts in complex environments. We attribute this limitation of inference scale to the shortcomings of positive inference, which is proved both empirically and theoretically. To this end, we propose a negative inference mechanism to broaden the inference space for environments, without relying on the mixed environments hypothesis. Our approach, which represents a pioneering practice in utilizing negative inference, is distinct from all existing practices in this field. + +# 4. Graph OOD generalization via environment inference + +Existing environment-centered practices aim to enable the networks with the ability to resist data distribution shifts. However, our empirical observations indicate that these approaches are insufficient in handling complex environment shifts. To address this issue, we conduct a theoretical + +![](images/bd60bfd1294f031663d76a6e2ffeba8ef67f77dc807fe73b47e0c97dbb396622.jpg) +Figure 2. The architecture of NeGo. We implements an environment-enhanced graph learning framework in which the environment is extracted through a negative prompt mechanism. The training process is guided by both a positive loss and a negative loss, aiming to broaden the modeling space for the environment. + +analysis of these methods, and identify that their failures stem from the limited environment inference space by only positively treating spurious subgraphs as environments. In contrast, we propose a promising method based on negative inference. + +# 4.1. Limited Environment Cognitive Space for Positive Inference + +From the perspective of causal theory (Pearl, 2009; 2010), the variables of generating the graph data include causal subgraph $G_{C}$ and spurious subgraph $G_{S}$ , where $G_{S}$ is controlled by environment variable $E$ . As shown in Fig. 4, $G_{C} \rightarrow Y$ demonstrates a stable casual relationship from $G_{C}$ to $Y$ in the data generation process. Consequently, the distribution shift between the training data and the test data can be attributed to the shifts of environment $E$ , which can be formally expressed as $\mathbb{P}_{train}(\mathcal{G},E) \neq \mathbb{P}_{test}(\mathcal{G},E)$ . Modeling environment variables becomes crucial for tackling OOD generalization issue (Chen et al., 2024; Gui et al., 2024; Xia et al., 2023; Yuan et al., 2023). With the observed training dataset $\mathcal{G}$ , environment-centered approaches strive to learn the distribution of the environment factor $E$ , + +$$ +\mathbb {P} (E | \mathcal {G}) = \frac {\mathbb {P} (\mathcal {G} , E)}{\mathbb {P} (\mathcal {G})} = \frac {\mathbb {P} (\mathcal {G} | E) \mathbb {P} (E)}{\int_ {E} \mathbb {P} (\mathcal {G} | E) \mathbb {P} (E) d E}. \tag {1} +$$ + +The prior distribution $\mathbb{P}(E)$ and the likelihood $\mathbb{P}(\mathcal{G}|E) = \prod_{i=1}^{N} \mathbb{P}(G_i|E)$ make the numerator theoretically computable. + +However, due to the uncertainty in the scale of environments $E$ , the denominator of Eq. 1 involving integration becomes intractable. To tackle this issue, we impose a distribution shift boundary based on following environment mixture assumption. + +Assumption 4.1. (Li et al., 2022) If $K$ different environment labels can be extracted from the observed dataset $\mathcal{G}$ , + +they are formulated by $K$ independent $D$ -dimensional Gaussian distributions $\mathcal{N}(\mu_i,I)$ , where $\mu_{i}\in \mathbb{R}^{1\times D}$ . Therefore, environment variables can be modeled from a vector space perspective, allowing us to approximate the environment space by exploring the mixture space of vectors. + +Given the Assumption 4.1, we can model the environments codebook $\pmb{\mu} = (\mu_1,\mu_2,\dots,\mu_K)\in \mathbb{R}^{K\times D}$ . This environment codebook serves as a proxy for the environment space, representing the entire environment space through the mixture of vectors. + +Therefore, the scale of environments is modeled as a mixing space of extracted environment variables. As a result, the new data $G_{i}$ is associated with the environment state $E_{i} \sim \mathcal{N}(e_{i} \cdot \boldsymbol{\mu}, I)$ , where $e_{i} \in \mathbb{R}^{1 \times K}$ representing the mixing weight. This indicates that the latent variables $e = (e_{1}, e_{2}, \dots, e_{N}) \in \mathbb{R}^{N \times K}$ be regarded as the proxy factor for the environment variable $E$ , directly determining the observed data $\mathcal{G}$ generation process. The posterior probability of the environments $\mathbb{P}(E | \mathcal{G})$ is transformed into, + +$$ +\mathbb {P} (\boldsymbol {e} | \mathcal {G}) = \frac {\mathbb {P} (\mathcal {G} , \boldsymbol {e})}{\mathbb {P} (\mathcal {G})} = \frac {\prod_ {i = 1} ^ {N} \mathbb {P} \left(e _ {i}\right) \mathbb {P} \left(G _ {i} \mid e _ {i}\right)}{\sum_ {e} \mathbb {P} (\boldsymbol {e}) \prod_ {i = 1} ^ {N} \mathbb {P} \left(G _ {i} \mid e _ {i}\right)} = \frac {\prod_ {i = 1} ^ {N} \mathbb {P} \left(e _ {i}\right)}{\sum_ {e} \mathbb {P} (\boldsymbol {e})}. \tag {2} +$$ + +The finite space of $e$ allows for the approximation strategy to be feasible. However, the limited scale of $e$ may limit the capacity of model to effectively counter complex environment shifts, which is verified by our empirical results. We next delve into the reason contributing to this limitation. We first present a definition of the basis and base environments of the environment space, similar to the concepts of basis and base vectors in the vector space. + +Assumption 4.2. Let $E_{b} = \{E_{1},\dots,E_{K}\}$ be the basis of environment space, and each element $E_{i}$ within it is referred + +to as the base environment. The linear combination of base environments can completely describe the entire environment space. + +Actually, the environment mixing assumption fundamentally relies on the expectation that extracted environment codebook can cover the basis $\mathbf{E}_b$ . However, we observe that such goal cannot be achieved by existing methods. Given a graph $G$ , current environment-centered methods aim to decompose it into causal subgraph $G_{C}$ and spurious subgraph $G_{S}$ . The spurious subgraph $G_{S}$ is inferred as the environment variable. Although $G_{S}$ is controlled by environment factor $(E \rightarrow G_{S})$ , the space of environment changes encompass more than the scale of spurious subgraphs. For example, consider the substructure $G_{C}$ that is causally associated with one graph-level property $l$ , but the variants of such $G_{C}$ act as environment factors for other properties. Existing methods fail to capture such other properties with invariance. + +Proposition 4.3. Given an observed graph dataset $\mathcal{G}$ , the inference process, considering $G_{S}$ as the environment factor, fails to capture the basis $\mathbf{E}_b$ that can represent the entire environment space. + +Proposition 4.3 indicates that the mixing of $\mu$ is unable to encompass the entire environment space. Existing environment-centered methods still have a narrow space of the environments, which leads to incapability of network to extract the causal graph from the complex environments. Therefore, the limitations of existing works are attributed to the narrow inference space of the model for environment variables. Detailed proof can be found in Appendix D.1. + +# 4.2. The Enhancement of Negative Inference + +Negative inference has a major advantage in effectively expanding the cognitive boundary of models. For example, the positive inference can only infer the specific ladder, wheel, and tree as environment variables, as shown in Fig. 1(b), while the negative inference approach can infer all variable space except the cycle and house as environments. While the ultimate objective is to extract invariant subgraphs, the negative inference mechanism prioritizes inferring the environment space, empowering the model with the capability to adapt to complex environment shifts. From the perspective of information theory, the training objective of negative inference can be formalized as, + +$$ +\begin{array}{l} \max I (E; G _ {C} | \overline {{G ^ {Y}}}) = \max I (E; \mathcal {G} - G _ {C} | Y) \tag {3} \\ = \max I (E; \mathcal {G} | \overline {{G ^ {Y}}}) - I (E; G _ {C} | Y), \\ \end{array} +$$ + +where $\overline{G^Y}$ denotes the extra-class samples of the graph $G$ which is labeled as $Y$ . + +Proposition 4.4. The learning objective of negative inference paradigm (Eq. 3) encompasses a broader cogni- + +tive space for environments, with its upper limit being the ground-truth environment distribution. + +Proposition 4.4 emphasizes that the negative inference paradigm enables a broader-scale environment inference space by cooperatively modeling both intra-class spurious subgraphs and extra-class samples. Detailed proof can be found in Appendix D.2. + +# 5. Graph Invariant Learning with Negative Inference + +In this section, we introduce a novel negative inference graph OOD framework NeGo to address the limitation of existing efforts in handling complex environments shifts. Specifically, NeGo is developed to design a negative inference learning task to capture underlying environments, and leverage inferred environment embeddings to enhance graph invariant learning. + +# 5.1. Negative Prompt Learning for Environment Inference + +Negative inference focuses on indirectly extracting invariant subgraph by investigating the information beyond the causal factors. This leads to the problem that the space of variables beyond causal information is infinite-dimensional. Given the insight from Theorem 4.4, we decouple the process of modeling the environment through negative inference into two components: the extraction of intra-class spurious subgraphs and the inference of extra-class samples. Modeling spurious subgraphs is relatively straightforward and extensively studied. The crucial challenge lies in achieving a comprehensive understanding of extra-class sample space. + +Formally, let the prior distribution of extra-class samples for $G$ be denoted as $\mathbb{P}(\overline{Y})$ , where $G$ is with the label $Y$ . We introduce a variational estimate of the environment variables denoted as $\mathbb{Q}_{\phi}(E|G)$ (a.k.a., $f_{\phi}$ ), where $\phi$ is the parameterized network. Denoting KL-divergence as $\mathrm{KL}(\cdot ||\cdot)$ , the training of $\mathbb{Q}_{\phi}$ is to implement the first term of Eq. 3, which can be formalized as following optimization, + +$$ +\min _ {\phi} \mathbb {E} [ \mathrm {K L} (\mathbb {Q} _ {\phi} (E | G)) | | \mathbb {P} (\overline {{G ^ {Y}}}) ]. \tag {4} +$$ + +Inspired by the success of prompt learning in capturing underlying semantic and causal associations in large language models (Floridi & Chiriatti, 2020; Sordoni et al., 2024), we introduce a negative prompter to achieve this goal. Specifically, given a sample $G$ belonging to class $l$ , the negative prompter treats all extra-class samples as environments. Designing appropriate prompt tokens to guide effective learning is the primary question that needs to be addressed when employing the concept of prompt learning. + +Given the proven efficacy of learnable prompts in various + +practices, we design class-specific learnable prompt tokens $\pmb{P} = [\pmb{v}^{(1)},\pmb{v}^{(2)},\dots,\pmb{v}^{(L)}]$ , where $\pmb{v}^{(i)}\in \mathbb{R}^{1\times d}$ and $L$ is the number of classes. The class-specific design manner aims to capture the extra-class sample space for each graph, in order to achieve the objective defined by Eq. 4. The negative prompter $f_{\phi}(\cdot)$ is guided to learn the prompt answers $\pmb{A}_N\in \mathbb{R}^{L\times d}$ by interacting the encoded graph embedding $\pmb{Z}_{G}\in \mathbb{R}^{1\times d}$ and the learnable prompts $\pmb{P}$ , + +$$ +\boldsymbol {A} _ {N} = f _ {\phi} \left(\boldsymbol {Z} _ {G}, \boldsymbol {P}\right). \tag {5} +$$ + +The negative prompter $f_{\phi}$ is parameterized by a cross-attention network in Transformer decoder (Vaswani et al., 2017), where $Z_{G}$ is obtained by a GNN backbone encoder $h_{\psi}(\cdot)$ . For a sample $G$ with label $l$ , such negative prompts answers $A_{N}$ should satisfy the following two properties: + +- The prompts answers $\mathbf{A}_N$ should produce a low match with graphs whose labels are $l$ . +- The prompts answers $\mathbf{A}_N$ should produce a high match with graphs whose labels are not $l$ . + +With the explanation in the language models, our negative prompt mechanism involves designing prompt tokens to learn the desired [answer] of "the underlying environments of current sample are [answer]". These two properties guide $f_{\phi}(\cdot)$ to learn a positive answer when interacting with each extra-class sample and a negative answer when interacting with each intra-class sample. Therefore, the training objective of our negative prompt mechanism can be formulated as, + +$$ +\begin{array}{l} \mathcal {L} _ {\text {n e g a}} = \mathbb {E} [ \mathrm {K L} (\mathbb {P} (\overline {{G ^ {Y}}}) | | \mathbb {Q} _ {\phi} (E | G)) ] \\ = - \mathbb {E} \left[ \log \mathbb {P} _ {\phi} (\bar {Y} | G, P) - \log \mathbb {P} _ {\phi} (Y | G, P) \right]. \tag {6} \\ \end{array} +$$ + +The environment variables we infer are class-specific, in contrast to the global environment factors constructed by previous methods. Our design is intuitively reasonable, as a specific subgraph may be perceived by one class as causal information, while its minor variations are perceived by other classes as environments. Moreover, it is worth noting that we never overlook the inference of the environments (spurious subgraphs) within intra-class samples. Given that the intra-class environments are always intertwined with causal factors, we incorporate the inference of intra-class environment variables into the discovery of the causal subgraph, which is provided in the next subsection. + +# 5.2. Environment-enhanced Graph Invariant Learning + +While inferring environment variables is a crucial step in understanding the data generation process, the ultimate goal of graph learning is to achieve casual invariant prediction. Thus, the next challenge to address is the disentanglement of + +the causal subgraph from environments. Existing methods often neglect the design of a graph-tailored environment exploitation algorithm, which can lead to the failure in extracting causal subgraphs when environment becomes complex (Gui et al., 2024). + +We propose an environment-enhanced invariant learning mechanism that leverages perceived latent environment embeddings to achieve the extraction of causal subgraphs with resistance to complex environment disturbances. Different from the negative prompter that investigates the extra-class sample space, we concentrate on the disentanglement of causal invariant substructures within the intra-class samples in this subsection. + +Let the marginal distribution of the causal subgraph $G_{C}$ be $\mathbb{P}(G_C)$ . We introduce a variational estimation of the subgraph extraction $\mathbb{Q}_{\xi}(G_C|G,E)$ (a.k.a., $g_{\xi}$ ), where $\xi$ is the parameterized networks. The model can make casual invariant predictions of the label distribution $\mathbb{P}_{\theta}(Y|G_C)$ (a.k.a., $g_{\theta}$ ), only when the causal graph is accurately extracted from complex environments. The learning objective for environment-enhanced graph invariant learning $\mathbb{P}_{\theta} \circ \mathbb{Q}_{\xi}(\cdot)$ is to implement the second term of Eq. 3, which can be formalized as following optimization, + +$$ +\min _ {\xi , \theta} \mathbb {E} [ \mathrm {K L} (\mathbb {Q} _ {\xi} (G _ {C} | G, E) | | \mathbb {P} (G _ {C})) - \log \mathbb {P} _ {\theta} (Y | G _ {C}) ]. \tag {7} +$$ + +The environment embedding $\mathbf{A}_N \in \mathbb{R}^{L \times d}$ is inferred at the graph level, but the extraction of substructures often requires node-level operations. Therefore, the primary focus of environment-enhanced invariant learning is to propagate the perceived environment embedding $\mathbf{A}_N$ to individual nodes. We design an interaction-decoding module $g_{\xi_1}(\cdot)$ to address this issue. + +Specifically, $g_{\xi_1}(\cdot)$ consists of three families of learnable parameters, i.e., $W^{Q}, W^{K}, W^{V} \in \mathbb{R}^{d \times d}$ . $g_{\xi_1}(\cdot)$ takes the node-level representation $\mathbf{Z} \in \mathbb{R}^{N \times d}$ encoded by the GNN encoder $h_{\psi}(\cdot)$ and the environment embedding $\mathbf{A}_N \in \mathbb{R}^{L \times d}$ obtained by negative prompt as inputs. Three hidden state matrices are calculated by, + +$$ +\boldsymbol {Z} ^ {Q} = \boldsymbol {Z} W ^ {Q}, \boldsymbol {A} ^ {K} = \boldsymbol {A} _ {N} W ^ {K}, \boldsymbol {A} ^ {V} = \boldsymbol {A} _ {N} W ^ {V}. \tag {8} +$$ + +The node embedding with environment information obtained through residual connections is, + +$$ +\boldsymbol {Z} _ {E} = \operatorname {s o f t m a x} \left(\frac {\boldsymbol {Z} ^ {Q} (\boldsymbol {A} ^ {K}) ^ {T}}{\sqrt {d}}\right) \boldsymbol {A} ^ {V} + \boldsymbol {Z}. \tag {9} +$$ + +We exploit a subgraph extractor $G_{C} = g_{\xi_{2}}(Z_{E})$ to realize invariant subgraph discovery. Then, $G_{C}$ is encoded by $h_{\psi}(\cdot)$ to obtain the causal representation for prediction. This representation is passed through an MLP layer $g_{\theta}$ to model the distribution of $Y$ . Therefore, the training objective of + +environment-enhanced invariant learning is, + +$$ +\begin{array}{l} \mathcal {L} _ {\text {p o s i}} = - \mathbb {E} [ \log \mathbb {P} _ {\xi , \theta} (Y | G _ {C}) ] \\ = - \mathbb {E} \left[ \log \mathbb {P} _ {\theta} \left(Y \mid G _ {C}\right) + \log \mathbb {P} _ {\xi_ {1}, \xi_ {2}} \left(G _ {C} \mid G, \boldsymbol {A} _ {N}\right) \right]. \tag {10} \\ \end{array} +$$ + +# 5.3. Optimization Objective and Theoretical Analysis + +Our NeGo achieves a graph learning framework with a wider space of environment inference. This is accomplished through two sequential approaches, first focusing on constructing the learning task for negative inference, and then leveraging the environment embeddings obtained from negative inference to enhance graph causal invariant learning. Thus, the training objective of our NeGo is, + +$$ +\mathcal {L} = \mathcal {L} _ {\text {n e g a}} + \lambda \cdot \mathcal {L} _ {\text {p o s i}}, \tag {11} +$$ + +where $\lambda$ is a hyperparameter, which is set to 1 in the implementation. The training process of NeGo is provided in Alg. 1. Note that the two sub-challenges addressed by NeGo are not independent but closely interconnected. The environment negative inference mechanism assists the network in comprehending the distribution shift of data, while the causal invariant learning with environment enhancement empowers the network to accurately extract causal invariant subgraphs even in complex environments. Thus, the former serves as a foundation for the latter. This design reflects the principle that understanding data generation process is crucial to enhance the generalization of models. We also provide theoretical evidence supporting the ability of NeGo to effectively address both FIIF and PIIF under both cases of $H(G_{C}|Y) < H(G_{S}|Y)$ and $H(G_{C}|Y) > H(G_{S}|Y)$ . Detailed proof can be found in Appendix D.3. + +Theorem 5.1. Given the FIIF or PIIF assumptions under both cases when $H(G_{C}|Y) < H(G_{S}|Y)$ and $H(G_{C}|Y) > H(G_{S}|Y)$ , the causal subgraph $G_{C}$ can be extracted by optimizing Eq. 11. + +# 6. Experiments + +We evaluate the effectiveness of NeGo by answering the following questions. Q1. Does our approach effectively address the issue unresolved in existing works? Q2. Is our framework sufficiently interpretable? Q3. Does each component in our NeGo effectively enhance the generalization capacity? Q4. Does our framework operate with high efficiency? + +# 6.1. Baselines + +We choose four representative OOD methods and seven graph-specific OOD approaches for comparison. The representative OOD frameworks we select consist of ERM, IRM (Arjovsky et al., 2019), V-Rex (Krueger et al., 2021), and + +# Algorithm 1 The training process of NeGo + +Input: training data $\mathcal{G}$ , negative prompts $P$ . + +Initial: the GNN encoder $h_{\psi}$ , the negative prompter $f_{\phi}$ , environment-enhanced invariant learning mechanism $g_{\xi}$ , final predictor $g_{\theta}$ , learnable prompt tokens $P$ , the number of epochs $K$ . + +for $i = 1$ to $K$ do + +$$ +\mathbf {Z} _ {G} = h _ {\psi} (G) +$$ + +$$ +\boldsymbol {A} _ {N} = f _ {\phi} (\boldsymbol {Z} _ {G}, \boldsymbol {P}) +$$ + +$$ +\boldsymbol {Z} ^ {Q} = \boldsymbol {Z} \boldsymbol {W} ^ {Q}, \boldsymbol {A} ^ {K} = \boldsymbol {A} _ {N} \boldsymbol {W} ^ {K}, \boldsymbol {A} ^ {V} = \boldsymbol {A} _ {N} \boldsymbol {W} ^ {V} +$$ + +$$ +\boldsymbol {Z} _ {E} = \operatorname {s o f t m a x} \left(\frac {\boldsymbol {Z} ^ {Q} (\boldsymbol {A} ^ {K}) ^ {T}}{\sqrt {d}}\right) \boldsymbol {A} ^ {V} +$$ + +$$ +Y = g _ {\theta} \left(G _ {C}\right), G _ {C} = g _ {2} \left(\mathbf {Z} _ {E} + \mathbf {Z}\right) +$$ + +Optimizing: + +$$ +\mathcal {L} _ {n a g a} \quad = \quad \mathbb {E} [ \mathrm {K L} (\mathbb {P} (\overline {{G ^ {Y}}}) | | \mathbb {Q} _ {\phi} (E | G)) ] \quad = +$$ + +$$ +- \mathbb {E} [ \log \mathbb {P} _ {\phi} (\bar {Y} | G, P) - \log \mathbb {P} _ {\phi} (Y | G, P) ] +$$ + +$$ +\mathcal {L} _ {\text {p o s i}} = - \mathbb {E} [ \log \mathbb {P} _ {\xi , \theta} (Y | G _ {C}) ] = - \mathbb {E} [ \log \mathbb {P} _ {\theta} (Y | G _ {C}) + +$$ + +$$ +\log \left. \mathbb {P} _ {\xi_ {1}, \xi_ {2}} \left(G _ {C} | G, \boldsymbol {A} _ {N}\right) \right] +$$ + +$$ +\min _ {\psi , \phi , \theta , \xi , \mathbf {P}} \mathcal {L} = \mathcal {L} _ {n e g a} + \mathcal {L} _ {p o s i} +$$ + +end for + +Return $h_{\psi},f_{\phi},g_{\xi},g_{\theta}$ and $\mathbf{P}$ + +IB-IRM (Ahuja et al., 2021). The Empirical Risk Minimization (ERM) baseline is a vanilla GNN with ERM objective, which is trained using the same settings with (Gui et al., 2024). Graph OOD approaches include DIR (Wu et al., 2022c), GSAT (Miao et al., 2022), CAL (Sui et al., 2022), CIGA (Chen et al., 2022), GIL (Li et al., 2022), LECI (Gui et al., 2024) and GALA (Chen et al., 2024). + +# 6.2. Datasets + +We adopt two synthetic datasets with distribution shift and six real-world scenario shift datasets from both molecular and social science domains. Synthetic datasets include GOOD-Motif (Wu et al., 2022c) and GOOD-CMNIST (Gui et al., 2022). In molecular property prediction fields, we select the scaffold and size splits of GOOD-HIV dataset (Gui et al., 2022; Wu et al., 2018) and the assay and size splits of DrugOOD LBAP-core-ic50 dataset (Ji et al., 2022). We also choose two social sentiment graph datasets with distribution shifts, including GOOD-SST2 and GOOD-Twitter (Yuan et al., 2022). Detailed statistics on the number of graphs in those datasets are provided in Tab. 6. + +# 6.3. Result Comparison and Analysis + +We comprehensively evaluate the OOD performance of NeGo on both real-world and synthetic datasets to answer Q1. Tab. 1 and 2 present the performance of NeGo on chemical and sentiment graph datasets. Tab. 8 showcases the performance of our framework on two synthetic datasets. Compared to existing methods, our method achieves optimal performance on almost all datasets. Besides, the per + +Table 1. The ROC-AUC performance of NeGo on four real-world datasets in chemical research field. ID val and OOD val represent the results of OOD test set using the in-distribution and out-of-distribution validation sets, respectively (Gui et al., 2024). The best results are shown in bold and the second best results are underlined. * indicates statistical significance against the second-best results. + +
ModelGOOD-HIV-scaffoldGOOD-HIV-sizeDrugOOD-assayDrugOOD-size
ID valOOD valID valOOD valID valOOD valID valOOD val
ERM69.61±1.3270.37±1.1961.66±2.4557.31±1.0670.03±0.1672.18±0.1862.97±0.2663.29±0.33
IRM73.35±2.3070.89±0.2958.52±0.8660.86±2.7871.56±0.3272.69±0.2963.24±0.2663.46±0.23
V-Rex71.73±3.5171.18±0.6958.39±1.5460.10±2.0970.22±0.8672.32±0.5863.87±0.4264.11±0.39
IB-IRM67.56±2.3166.25±0.9357.45±0.7456.65±1.2269.34±0.4871.32±0.7664.03±0.6164.59±0.70
DIR65.84±1.7168.59±3.7059.69±1.5960.85±0.5267.29±0.7369.70±0.6563.85±0.6564.73±0.54
GSAT71.55±3.5871.39±1.4160.92±1.0060.61±1.1971.01±0.5472.26±0.4565.12±0.3865.67±0.45
CAL73.48±2.6472.38±1.0362.83±1.2662.58±1.0471.89±0.9271.23±1.1363.85±0.4964.22±0.74
CIGA66.25±2.8971.47±1.2958.24±3.7862.56±1.7667.68±1.1470.54±0.5964.14±0.6664.83±0.79
GIL70.89±1.6070.23±1.2361.74±1.7661.29±1.3470.45±0.8970.73±1.3664.91±0.5165.43±0.64
LECI74.04±0.6574.43±1.6964.83±2.5965.44±1.7872.67±0.4673.45±0.1765.93±0.4366.49±0.60
GALA73.85±1.1074.02±1.3463.99±1.5464.45±2.2672.83±0.7373.23±0.2965.23±0.7265.84±0.52
NeGo75.21±0.73*75.87±1.0265.23±1.7465.92±1.82*73.20±0.18*73.94±0.25*65.49±0.7366.91±0.84*
+ +Table 2. The accuracy of NeGo on two sentiment graph datasets, where * indicates statistical significance against the second-best results. + +
ModelGOOD-SST2GOOD-Twitter
ID valOOD valID valOOD val
ERM78.37±2.6480.41±0.6954.93±0.9657.04±1.70
IRM79.73±1.4580.17±1.5255.27±1.1957.72±1.03
V-Rex79.31±1.4080.33±1.0956.46±0.9356.37±0.76
IB-IRM78.93±1.2380.22±0.5554.23±1.2156.73±1.02
DIR77.65±0.7181.50±0.5555.32±1.8556.81±0.91
GSAT79.25±1.0980.46±0.3855.09±0.6656.07±0.53
CAL81.20±1.2182.34±0.6756.77±0.8657.82±0.44
CIGA80.37±1.4682.93±0.7557.51±1.3657.19±1.15
GIL81.43±1.0283.31±0.5058.21±1.2457.82±1.18
LECI82.93±0.2283.44±0.2759.35±1.4459.64±0.15
GALA82.60±0.6682.98±0.4259.03±0.6560.45±1.36
NeGo82.72±0.5184.16±0.23*60.82±0.22*61.25±0.70*
+ +formance of environment-centered OOD methods, such as LECI and GALA, often achieves suboptimal or even optimal results on various datasets. This demonstrates the effectiveness of modeling environment factors in addressing data distribution shifts. + +Table 3. The performance comparison (ID val) of NeGo on new environment scenarios. + +
ModelGSATCALCIGALECIGALANeGo
Acc.(%)70.1375.2171.8278.4677.9379.75
+ +To further validate the effectiveness of our NeGo in new environment scenarios (nonlinear environment mixing), we conduct additional experimental discussion. Considering that the environments in SPURIOUS-MOTIF (Ying et al., 2019) include five specific label-irrelevant base subgraphs (wheel, tree, ladder, star, and path), we increase the environment complexity by diversifying these base subgraphs. Specifically, we randomly add connections to the base subgraphs in each sample, totaling $10\%$ of the original edge + +count. As shown in Tab. 3, we observe that the advantage of our NeGo on common OOD datasets is persists in complex environments, with a $1.29\%$ performance improvement. + +Moreover, we evaluate the performance of our framework in the complex environments scenario illustrated in Fig. 1(a). NeGo achieves $87.34\%$ and $80.29\%$ on the original and adjusted dataset, respectively. There is only a minor decrease in performance, suggesting that our method effectively tackles the limitations encountered by existing methods in handling complex environments. + +To answer the Q2, we visually represent the causal subgraphs extracted by NeGo on the modified dataset in Fig. 1(a). As depicted in Fig. 3, our method consistently extracts the ground-truth subgraph. The visualized results further validate the effectiveness of our proposed negative inference method. By modeling extensive extra-class samples as environments, our approach offers undeniable advantages in handling complex environment shifts. + +# 6.4. Ablation Studies + +To answer Q3, we investigate each component of NeGo. Specifically, we conduct ablation studies to explore the effectiveness of negative prompter and interactive decoding component. Tab. 4 shows that the performance drops significantly when there is either no negative prompter or interactive decoding component. NeGo-NoPro refers to the framework that eliminates negative prompter and negative loss, which causes the most performance drop. Therefore, the negative inference mechanism plays a vital role in enhancing the capability of environment perception. This further validates the rationale of our motivation for incorporating negative inference. NeGo-NoEnv indicates that the casual subgraphs are extracted directly using node embedding without integrating inferred environment information. + +![](images/99596c138b3cc04789cb97a6d8f6531e344f6291046bed7e31ebeea5789d716d.jpg) +Figure 3. The causal subgraphs extracted by NeGo on the modified dataset in Fig. 1(a). + +The performance decline emphasizes the significance of environment utilizing strategies overlooked by existing works. + +Table 4. Ablation studies of NeGo. + +
ModelDrugOOD(assay)GOOD(Twitter)
NeGo-NoPro70.3758.41
NeGo-NoEnv71.7159.17
NeGo73.2060.82
+ +# 6.5. Efficiency Analysis + +To address Q4, we explore the training efficiency of $\mathsf{NeGo}$ from both theoretical and practical perspectives. The time complexity of $\mathsf{NeGo}$ is $\mathcal{O}(|\mathcal{V}| \times d^2 + |\mathcal{V}| \times d \times h + |\mathcal{E}| \times d)$ , where $|\mathcal{V}|$ represents the number of nodes, $|\mathcal{E}|$ denotes the number of edges, $d$ is the feature dimension, and $h$ represents the number of cross-attention heads. Our method has linear time complexity with high training efficiency. + +We empirically compare the training efficiency of NeGo with other baselines on DrugOOD-size dataset as shown in Tab. 5. Compared with some earlier invariant learning methods (DIR and GSAT), the minor increase in running time of our mothod brings out the substantial performance boost. Additionally, our approach demonstrates greater competitiveness in both training efficiency and performance compared to existing environment-centered methods. + +Table 5. The training efficiency of NeGo with other baselines on DrugOOD-size (s/epoch). + +
ModelsGSATDIRCIGALECIGALANeGo
Time51.652.654.259.162.358.7
+ +# 7. Conclusion + +In this work, we propose a negative inference graph OOD framework NeGo to handle complex environment shift in OOD scenarios. By inheriting the practices of prompt learning in large language models, we design a negative prompter to model the environment on a larger scale. We then introduce an environment-enhanced invariant learning strategy to eliminate spurious subgraphs from the data. This strategy effectively leverages the inferred environment variables to + +enhance the ability to remove irrelevant information. Extensive experiments on real-world datasets across domains and synthetic datasets validate the effectiveness of NeGo. + +# Impact Statement + +This paper investigates the advanced application of graph learning in chemistry and social science domains, utilizing publicly available datasets. Consequently, there are no ethical concerns in this work. + +# Acknowledgment + +This work was supported by the National Natural Science Foundation of China (No.12227901), Natural Science Foundation of Jiangsu Province (BK.20240460, BK.20240461), the grant from State Key Laboratory of Resources and Environmental Information System. The AI-driven experiments, simulations and model training were performed on the robotic AI-Scientist platform of Chinese Academy of Science. + +# References + +Ahuja, K., Caballero, E., Zhang, D., Gagnon-Audet, J.-C., Bengio, Y., Mitliagkas, I., and Rish, I. Invariance principle meets information bottleneck for out-of-distribution generalization. Advances in Neural Information Processing Systems, 34:3438-3450, 2021. +Antol, S., Agrawal, A., Lu, J., Mitchell, M., Batra, D., Zitnick, C. L., and Parikh, D. Vqa: Visual question answering. In Proceedings of the IEEE international conference on computer vision, pp. 2425-2433, 2015. +Arjovsky, M., Bottou, L., Gulrajani, I., and Lopez-Paz, D. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019. +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, Y., Zhang, Y., Bian, Y., Yang, H., Kaili, M., Xie, B., Liu, T., Han, B., and Cheng, J. Learning causally invariant representations for out-of-distribution generalization on graphs. Advances in Neural Information Processing Systems, 35:22131-22148, 2022. +Chen, Y., Bian, Y., Zhou, K., Xie, B., Han, B., and Cheng, J. Does invariant graph learning via environment augmentation learn invariance? Advances in Neural Information Processing Systems, 36, 2024. +Floridi, L. and Chiriatti, M. Gpt-3: Its nature, scope, limits, and consequences. *Minds and Machines*, 30:681–694, 2020. +Gao, C., Wang, X., He, X., and Li, Y. Graph neural networks for recommender system. In Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, pp. 1623-1625, 2022. +Gao, T., Fisch, A., and Chen, D. Making pre-trained language models better few-shot learners. arXiv preprint arXiv:2012.15723, 2020. +Grice, H. P. and White, A. R. Symposium: The causal theory of perception. Proceedings of the Aristotelian Society, Supplementary Volumes, 35:121-168, 1961. +Gui, S., Li, X., Wang, L., and Ji, S. Good: A graph out-of-distribution benchmark. Advances in Neural Information Processing Systems, 35:2059-2073, 2022. +Gui, S., Liu, M., Li, X., Luo, Y., and Ji, S. Joint learning of label and environment causal independence for graph out-of-distribution generalization. Advances in Neural Information Processing Systems, 36, 2024. +Han, X., Jiang, Z., Liu, N., and Hu, X. G-mixup: Graph data augmentation for graph classification. In International Conference on Machine Learning, pp. 8230-8248. PMLR, 2022. +Ji, Y., Zhang, L., Wu, J., Wu, B., Huang, L.-K., Xu, T., Rong, Y., Li, L., Ren, J., Xue, D., et al. Drugood: Out-of-distribution (ood) dataset curator and benchmark for ai-aided drug discovery-a focus on affinity prediction problems with noise annotations. arXiv preprint arXiv:2201.09637, 2022. +Jia, T., Li, H., Yang, C., Tao, T., and Shi, C. Graph invariant learning with subgraph co-mixup for out-of-distribution generalization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 8562-8570, 2024. +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. + +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. +Krueger, D., Caballero, E., Jacobsen, J.-H., Zhang, A., Binas, J., Zhang, D., Le Priol, R., and Courville, A. Out-of-distribution generalization via risk extrapolation (rex). In International Conference on Machine Learning, pp. 5815-5826. PMLR, 2021. +Li, H., Zhang, Z., Wang, X., and Zhu, W. Learning invariant graph representations for out-of-distribution generalization. Advances in Neural Information Processing Systems, 35:11828-11841, 2022. +Li, J., Sun, X., Li, Y., Li, Z., Cheng, H., and Yu, J. X. Graph intelligence with large language models and prompt learning. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 6545-6554, 2024. +Li, P., Li, D., Li, W., Gong, S., Fu, Y., and Hospedales, T. M. A simple feature augmentation for domain generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8886-8895, 2021. +Li, X., Gui, S., Luo, Y., and Ji, S. Graph structure extrapolation for out-of-distribution generalization. In *Forty-first International Conference on Machine Learning*. +Li, X. L. and Liang, P. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190, 2021. +Liang, Y., Ke, S., Zhang, J., Yi, X., and Zheng, Y. Geoman: Multi-level attention networks for geo-sensory time series prediction. In *IJCAI*, volume 2018, pp. 3428-3434, 2018. +Liu, C., Sun, X., Wang, J., Tang, H., Li, T., Qin, T., Chen, W., and Liu, T.-Y. Learning causal semantic representation for out-of-distribution prediction. Advances in Neural Information Processing Systems, 34:6155-6170, 2021. +Lu, B., Zhao, Z., Gan, X., Liang, S., Fu, L., Wang, X., and Zhou, C. Graph out-of-distribution generalization with controllable data augmentation. IEEE Transactions on Knowledge and Data Engineering, 2024. +Miao, S., Liu, M., and Li, P. Interpretable and generalizable graph learning via stochastic attention mechanism. In International Conference on Machine Learning, pp. 15524-15543. PMLR, 2022. +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. + +Pearl, J. Causal inference in statistics: An overview. 2009. +Pearl, J. Causal inference. Causality: objectives and assessment, pp. 39-58, 2010. +Peters, J., Buhlmann, P., and Meinshausen, N. Causal inference by using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society Series B: Statistical Methodology, 78(5):947-1012, 2016. +Piao, Y., Lee, S., Lu, Y., and Kim, S. Improving out-of-distribution generalization in graphs via hierarchical semantic environments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 27631-27640, 2024. +Rao, Y., Zhao, W., Chen, G., Tang, Y., Zhu, Z., Huang, G., Zhou, J., and Lu, J. Denseclip: Language-guided dense prediction with context-aware prompting. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 18082-18091, 2022. +Rong, Y., Huang, W., Xu, T., and Huang, J. Droppedge: Towards deep graph convolutional networks on node classification. arXiv preprint arXiv:1907.10903, 2019. +Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., and Singh, S. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980, 2020. +Sordoni, A., Yuan, E., Côté, M.-A., Pereira, M., Trischler, A., Xiao, Z., Hosseini, A., Niedtner, F., and Le Roux, N. Joint prompt optimization of stacked llms using variational inference. Advances in Neural Information Processing Systems, 36, 2024. +Staib, M. and Jegelka, S. Distributionally robust optimization and generalization in kernel methods. Advances in Neural Information Processing Systems, 32, 2019. +Sui, Y., Wang, X., Wu, J., Lin, M., He, X., and Chua, T.-S. Causal attention for interpretable and generalizable graph classification. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1696-1705, 2022. +Sui, Y., Wu, Q., Wu, J., Cui, Q., Li, L., Zhou, J., Wang, X., and He, X. Unleashing the power of graph data augmentation on covariate distribution shift. Advances in Neural Information Processing Systems, 36, 2024. +Sun, M., Zhou, K., He, X., Wang, Y., and Wang, X. Gppt: Graph pre-training and prompt tuning to generalize graph neural networks. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1717-1727, 2022a. + +Sun, Q., Li, J., Peng, H., Wu, J., Ning, Y., Yu, P. S., and He, L. Sugar: Subgraph neural network with reinforcement pooling and self-supervised mutual information mechanism. In Proceedings of the web conference 2021, pp. 2081-2091, 2021. +Sun, Q., Li, J., Peng, H., Wu, J., Fu, X., Ji, C., and Philip, S. Y. Graph structure learning with variational information bottleneck. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 4165-4174, 2022b. +Sun, Q., Li, J., Yuan, H., Fu, X., Peng, H., Ji, C., Li, Q., and Yu, P. S. Position-aware structure learning for graph topology-imbalance by relieving under-reaching and oversquashing. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pp. 1848-1857, 2022c. +Sun, Q., Chen, Z., Yang, B., Ji, C., Fu, X., Zhou, S., Peng, H., Li, J., and Yu, P. S. Gc-bench: An open and unified benchmark for graph condensation. In Advances in Neural Information Processing Systems, 2024. +Sun, X., Cheng, H., Li, J., Liu, B., and Guan, J. All in one: Multi-task prompting for graph neural networks. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 2120-2131, 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. +Wang, M. and Deng, W. Deep visual domain adaptation: A survey. Neurocomputing, 312:135-153, 2018. +Wang, Y., Wang, W., Liang, Y., Cai, Y., and Hooi, B. Mixup for node and graph classification. In Proceedings of the Web Conference 2021, pp. 3663-3674, 2021. +Wang, Z., Liu, X., Li, H., Sheng, L., Yan, J., Wang, X., and Shao, J. Camp: Cross-modal adaptive message passing for text-image retrieval. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 5764-5773, 2019. +Wang, Z., Chen, Y., Duan, Y., Li, W., Han, B., Cheng, J., and Tong, H. Towards out-of-distribution generalizable predictions of chemical kinetics properties. arXiv preprint arXiv:2310.03152, 2023. +White, J., Fu, Q., Hays, S., Sandborn, M., Olea, C., Gilbert, H., Elnashar, A., Spencer-Smith, J., and Schmidt, D. C. A prompt pattern catalog to enhance prompt engineering with chatgpt. arXiv preprint arXiv:2302.11382, 2023. + +Wu, J., Chen, J., Wu, J., Shi, W., Wang, X., and He, X. Understanding contrastive learning via distributionally robust optimization. Advances in Neural Information Processing Systems, 36, 2024. +Wu, Q., Zhang, H., Yan, J., and Wipf, D. Handling distribution shifts on graphs: An invariance perspective. arXiv preprint arXiv:2202.02466, 2022a. +Wu, S., Sun, F., Zhang, W., Xie, X., and Cui, B. Graph neural networks in recommender systems: a survey. ACM Computing Surveys, 55(5):1-37, 2022b. +Wu, Y.-X., Wang, X., Zhang, A., He, X., and Chua, T.-S. Discovering invariant rationales for graph neural networks. arXiv preprint arXiv:2201.12872, 2022c. +Wu, Z., Ramsundar, B., Feinberg, E. N., Gomes, J., Geniesse, C., Pappu, A. S., Leswing, K., and Pande, V. Molecularnet: a benchmark for molecular machine learning. Chemical science, 9(2):513-530, 2018. +Xia, Y., Liang, Y., Wen, H., Liu, X., Wang, K., Zhou, Z., and Zimmermann, R. Deciphering spatio-temporal graph forecasting: A causal lens and treatment. arXiv preprint arXiv:2309.13378, 2023. +Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018. +Yang, N., Zeng, K., Wu, Q., Jia, X., and Yan, J. Learning substructure invariance for out-of-distribution molecular representations. Advances in Neural Information Processing Systems, 35:12964-12978, 2022. +Ying, Z., Bourgeois, D., You, J., Zitnik, M., and Leskovec, J. Gnnexplainer: Generating explanations for graph neural networks. Advances in neural information processing systems, 32, 2019. +You, Y., Chen, T., Sui, Y., Chen, T., Wang, Z., and Shen, Y. Graph contrastive learning with augmentations. Advances in neural information processing systems, 33:5812-5823, 2020. +Yuan, H., Yu, H., Gui, S., and Ji, S. Explainability in graph neural networks: A taxonomic survey. IEEE transactions on pattern analysis and machine intelligence, 45(5):5782-5799, 2022. +Yuan, H., Sun, Q., Fu, X., Zhang, Z., Ji, C., Peng, H., and Li, J. Environment-aware dynamic graph learning for out-of-distribution generalization. arXiv preprint arXiv:2311.11114, 2023. +Zhao, T., Liu, Y., Neves, L., Woodford, O., Jiang, M., and Shah, N. Data augmentation for graph neural networks. + +In Proceedings of the aaai conference on artificial intelligence, volume 35, pp. 11015-11023, 2021. +Zhou, K., Yang, J., Loy, C. C., and Liu, Z. Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9):2337-2348, 2022a. +Zhou, Y., Kutyniok, G., and Ribeiro, B. Ood link prediction generalization capabilities of message-passing gnns in larger test graphs. Advances in Neural Information Processing Systems, 35:20257-20272, 2022b. +Zhou, Z., Wang, Y., Xie, X., Chen, L., and Liu, H. Riskoracle: A minute-level citywide traffic accident forecasting framework. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 1258-1265, 2020. +Zhu, J.-J., Jitkrittum, W., Diehl, M., and Scholkopf, B. Kernel distributionally robust optimization: Generalized duality theorem and stochastic approximation. In International Conference on Artificial Intelligence and Statistics, pp. 280-288. PMLR, 2021. +Zi, C., Zhao, H., Sun, X., Lin, Y., Cheng, H., and Li, J. Prog: A graph prompt learning benchmark. arXiv preprint arXiv:2406.05346, 2024. +Zou, D., Liu, S., Miao, S., Fung, V., Chang, S., and Li, P. Gdl-ds: A benchmark for geometric deep learning under distribution shifts. arXiv preprint arXiv:2310.08677, 2023. + +# A. More Related works + +# A.1. OOD Generalization. + +Out-of-Distribution (OOD) generalization learning refers to the task of adapting a model that has been trained on a specific distribution to effectively process data from a potentially different distribution. This study holds significant importance because the issue of data distribution shifts is a common occurrence in the real world. External factors, such as changes in environmental conditions, technological advancements, or evolving user preferences, can lead to shifts in the data distribution. Various approaches can be employed for OOD generalization, including data augmentation (Rong et al., 2019; Wang et al., 2021; You et al., 2020), domain adaptation (Wang & Deng, 2018), and causal invariant learning (Sui et al., 2022; Wu et al., 2022c). Jia et al. (Jia et al., 2024) innovatively proposes a mixup-based environment modeling framework, IGM, to enhance graph invariant learning. IGM focuses on expanding the environment space through a mixing generation scheme, while our NeGo aims to mine environmental space as much as possible from the novel perspective of negative learning. Piao et al. creatively proposes a hierarchical environment inference paradigm to enhance graph invariant learning methods (Piao et al., 2024). This work focuses on generating sample-level hierarchical environments to expand the modeling of the environment space. Unlike this method, our NeGo focuses on class-level environment augmentation, collaborating with extra-class environment modeling and inter-class invariant learning to achieve global inference of environment space. + +Among them, causal invariant learning demonstrates impressive performance in various fields, due to its powerful interpretability (Chen et al., 2022; Li et al., 2022; Miao et al., 2022; Wu et al., 2022c). Our NeGo is aligned with this research line, as an environment-centered invariant learning method based on causal theory. However, in the field of graph learning, most existing invariant learning methods focus on extracting the causal graph to achieve invariant learning. This strategy limits the inference space of the environments to the dimension of spurious subgraphs, which hinders the ability of models to capture the complex environment states. In this work, we propose an invariant learning mechanism based on negative inference to address this limitation. + +# A.2. Prompt Learning + +Prompt learning is proposed in NLP models to infer underlying semantic and potential causal associations in linguistic data. Many effective prompt methods have developed with the introduction of large language models, including some hand-crafted prompts (Brown et al., 2020), discrete prompts (Gao et al., 2020; Shin et al., 2020), and learnable prompts design (Li & Liang, 2021). There have been various works on the interaction of computer vision and natural language processing fields, e.g., text-to-image retrieval text-to-image retrieval (Wang et al., 2019), visual question answering(Antol et al., 2015; Rao et al., 2022; Zhou et al., 2022a) and so on. + +In recent years, prompt learning has also been developed in the graph learning field (Sun et al., 2022a; Li et al., 2024; Sun et al., 2023; Zi et al., 2024). Our approach is the pioneering effort to apply prompt learning to address the challenge of graph OOD generalization issue. + +# A.3. Comparisons to Existing Graph OOD Works + +Environment-centered studies (Chen et al., 2024; Gui et al., 2024; Li et al., 2022; Wu et al., 2022a; Yang et al., 2022) consider that the data distribution shifts stem from the changes of environments. Therefore, these practices enable the model to withstand data distribution shifts by inferring environment variables. Concretely, the networks are often trained with the objective of equipping models to effectively handle mixed environments scenarios. However, this design allows the networks to make narrow inference about the environments, and makes the networks unable to handle with distribution shifts in complex environments. We attribute this limitation of inference scale to the shortcomings of positive inference, which is proved both empirically and theoretically. Therefore, we propose a negative inference mechanism to broaden the inference space for environments, without relying on the mixed environments hypothesis. + +Our approach, which represents a pioneering practice in utilizing negative inference, is distinct from all existing practices in this field. DIR (Wu et al., 2022c) aims to identify causal patterns that are stable across different distributions and filter out spurious patterns that are unstable. This work is a classic work in the early application of causal theory to address the challenge of graph OOD generalization. It focuses on obtaining invariant subgraphs with a positive inference manner. GIL (Li et al., 2022) aims to capture the invariant relationships between predictive graph structural information and labels in a mixture of latent environments through jointly optimizing three mutually promoting modules. This method relies on the mixing environment hypothesis and has limited inference space for environments. CIGA (Chen et al., 2022) build + +three Structural Causal Models (SCMs) to characterize the distribution shifts that could happen on graphs: one is to model the graph generation process, and the other two are to model two possible interactions between invariant and spurious features during the graph generation, i.e., FIIF and PIIF. This work provides a fresh perspective on existing research on out-of-distribution generalization based on causality. However, it still falls within the framework of positive inference, aiming to extract causal subgraphs. GALA (Chen et al., 2024) utilized proxy prediction mechanism to infer environment label. It is worth noting that the negative samples mentioned in this work are different from our negative inference, and their design is also to improve performance under the mixed environments hypothesis. Thus, it essentially follows a positive inferring process for environment variables. LECI (Gui et al., 2024) primarily focused on spurious substructures space to model the environment variables. Such environment inference strategy still relies on a positive inference with narrow cognitive space of the environments. Unlike existing graph OOD researches that centers on environment awareness, our work presents greater technical challenges, and targets scenarios that are more complex. G-Splice (Li et al.) focuses on linear mixed scenarios with spurious structures, whereas our work aims to address the effectiveness of models in nonlinear mixed scenarios. AIA (Sui et al., 2024) aims to model the environment factors in graph through the lens of data augmentation. Unlike AIA that focuses only on modifications within spurious subgraphs inside samples, our NeGo is more concerned with environment extraction in mixed scenarios at the class level. Thus, in scenarios where the spurious subgraphs within a sample are highly complex, we believe that our method is more effective. + +# B. Detailed Datasets + +- GOOD-Motif (Wu et al., 2022c) is a synthetic dataset designed for studying structure shifts. Each graph in the dataset is created by connecting a base graph and a motif, where the label is determined by the motif. This accessible ground-truth substructure brings a lot of convenience to the invariant subgraph learning with interpretability. This dataset includes five label-irrelevant base graphs (wheel, tree, ladder, star, and path) and three label-determining motifs (house, cycle, and crane) are used to generate the graphs in the dataset. In environment-centered invariant learning, such base graphs can be seen as environment factors and such motifs are be considered as the casual factors. +- GOOD-CMNIST (Gui et al., 2022) is a semi-synthetic dataset that has been purposefully created to evaluate node feature shifts. It comprises graphs constructed from hand-written digits extracted from the MNIST database, with the transformation applied using superpixel techniques (Monti et al., 2017). +- GOOD-HIV (Gui et al., 2022) is a compact and real-world molecular dataset that has been derived from (Wu et al., 2018). It comprises molecular graphs, where atoms represent nodes and chemical bonds represent edges. The primary task associated with this dataset is to predict a molecule's potential for inhibiting HIV replication. Its distribution shift scenario is developed into two, i.e., the scaffold, and the size of nodes in a molecular graph. +- DrugOOD(LBAP-core-ic50) (Ji et al., 2022) is utilized in the Ligand-based Affinity Prediction (LBAP) task, where the core noise level and IC50 measurement type serve as domain features. Its distribution shift scenario is developed into three, i.e., the scaffold, the size, and the assay. +- GOOD-SST2 (Yuan et al., 2022) is a real-world social sentiment dataset derived from natural language. This dataset represents each sentence as a graph, where individual words are treated as nodes, and their corresponding word embeddings serve as node features. The primary task in this dataset involves binary classification, aiming to predict the sentiment polarity of each sentence. +- GOOD-Twitter (Yuan et al., 2022) is a real-world natural language sentiment dataset that shares the same transformation process as the SST2 dataset. The classification task of this dataset involves predicting one of three sentiment polarities for each sentence. Similar to the GOOD-SST2 dataset, the sentence lengths are chosen as the domains. + +# C. Detailed Baselines + +- DIR (Wu et al., 2022c) is an early work using causal theory to address the distribution shifts issue in graph data. This work provides detailed theoretical proofs that demonstrate the feasibility of extracting invariant subgraph from graph data. +- GSAT (Miao et al., 2022) employ information bottleneck theory to select causal subgraphs under only the FIIF assumption. The proposed stochastic attention mechanism in this paper is highly robust in extracting casual subgraphs, + +Table 6. Statistics on the number of graphs in the datasets. + +
DatasetTrainingID validationID testOOD validationOOD test
GOOD-HIV-Scaffold246824112411241134108
GOOD-HIV-Size261694112411227733961
GOOD-SST2-Length24744530153011720617490
GOOD-Twitter-Length259055455417851457
GOOD-CMNIST-Color420007000700070007000
GOOD-Motif-Basis180003000300030003000
GOOD-Motif-Size180003000300030003000
DrugOOD-assay3417911314116831902819032
DrugOOD-size3659712153124111766016415
+ +Table 7. Comparison of existing methods on addressing OOD generalization issue. + +
MethodsSCMsInferred Environment Space
DIRFIIFSpurious subgraphs
GSATFIIFSpurious subgraphs
CIGAFIIF & PIIFSpurious subgraphs
GALAFIIF & PIIFSpurious subgraphs
LECIFIIF & PIIFSpurious subgraphs
NeGoFIIF & PIIFIntra-class spurious subgraphs and extra-class sample space
+ +and has emerged as a backbone model in numerous methods. Actually, the subgraph extractor used in our work is also inspired by GSAT. + +- CAL (Sui et al., 2022) is guided by the backdoor adjustment principle derived from causal theory. It encourages the Graph Neural Networks (GNNs) to focus on exploiting causal features while disregarding shortcut connections. +- CIGA (Chen et al., 2022) is the first graph OOD method considering both Fully Informative Invariant Feature (FIIF) and Partially Informative Invariant Feature (PIIF) assumptions. This work presents an OOD algorithm for graphs that is provably generalizable under different types of distribution shifts. +- GIL (Li et al., 2022) is designed to capture invariant graph patterns in a mixture of underlying environments and handle the distribution shift issue. This work introduces a GNN-based subgraph generator to identify potentially invariant subgraphs from the complex interaction between invariant and variant patterns. +- LECI (Gui et al., 2024) comprehensively reviews existing OOD approaches and identifies the current causalsubgraph discovery challenges. This work jointly optimize label and environment causal independence to achieve powerful causal subgraphs learning. +- GALA (Chen et al., 2024) designs an additional assistant model to enhance model with more powerful OOD generalization ability without explicit environment labels. Theoretical proofs establish that GALA possesses robust out-of-distribution generalization capabilities under the FIIF and PIIF assumptions. + +![](images/753c2ea81715c87a73cecaefb8c1fff7d3f7faa2038f9342d5c573ff4c55d559.jpg) +(a). Traditional SCM + +![](images/4d4289c338175f2b59f6a993475de2d2bea0d711cdae791a2eb8d8f42c4c893b.jpg) +(b). FIIF SCM + +![](images/d7f432846500ec479ad252316b834c24a2258f1d267f8859b7ee292ac1b1abbd.jpg) +(c).PIIF SCM +Figure 4. Illustrations of three structural causal models (SCMs). + +# D. Detailed Proofs + +# D.1. Proof of Proposition 4.3. + +The basis $E_{b}$ represents a set of fundamental components or features that can accurately represent the entire environment space. These components capture the essential variations, patterns, and characteristics present in the environment. However, if the inference process fails to capture this basis, it implies that the process is unable to fully understand and model the complexities of the environment. Thus, we next investigate that whether the environment variable inferred from $G_{S}$ covers such base environments. We consider two SCMs hypotheses FIIF and PIIF as shown in Fig. 4. + +Under the FIIF assumption, $Y \bot G_S|G_C$ , we have $P(Y,G_S|G_C) = P(Y|G_C) \cdot P(G_S|G_C)$ . This conditional independence assumption leads to an equivalent expression: $P(Y|G) = P(Y|G_S,G_C) = P(Y|G_C)$ . Therefore, the process of extracting the causal subgraph $G_C$ is equivalent to the process of modeling the spurious correlations $G_S$ . Traditional positive casual learning methods are capable of handling the FIIF assumption. + +Under the PIIF assumption, $Y \not\angle G_S|G_C$ , we have $P(Y,G_S|G_C) \neq P(Y|G_C) \cdot P(G_S|G_C)$ . Furthermore, we can obtain $P(Y|G) = P(Y|G_S,G_C) \neq P(Y|G_C)$ . Thus, the process of extracting the causal subgraph $G_C$ cannot be used to infer the labels of samples. More formally, using mutual information theory, we derive the following, + +$$ +I (Y; G _ {S} | G _ {C}) = H (Y | G _ {C}) - H (Y | G _ {S}, G _ {C}) > 0, \tag {12} +$$ + +$$ +H \left(Y \mid G _ {C}\right) > H \left(Y \mid G _ {S}, G _ {C}\right). \tag {13} +$$ + +This indicates that, given the causal subgraph $G_{C}$ , the uncertainty of $Y$ is higher than when both the spurious subgraph $G_{S}$ and the causal subgraph $G_{C}$ are given. It suggests that the spurious subgraph $G_{S}$ contains additional information of $Y$ . + +Therefore, the causal subgraph $\hat{G}_C$ learned by the model with the positive learning manner contains components of the spurious subgraph, i.e., $G_S \cap \hat{G}_C \neq \emptyset$ . At this point, if we can obtain the basis for the environment space, the model should be able to infer the spurious subgraph $G_S$ and treat it as part of the environment $E$ . The extracted causal subgraph $\hat{G}_C$ should be able to effectively remove the spurious subgraph, i.e., $G_S \cap \hat{G}_C = \emptyset$ . This clearly contradicts the PIIF assumption, indicating that the model currently lacks the capability to obtain a basis for the environmental space. Therefore, simply inferring the causal subgraph with a positive manner is not sufficient to address the PIIF assumption. Since $E \to G_S$ , modeling the spurious subgraph $G_S$ requires modeling and understanding its root $E$ . Existing methods that simply model $G - G_C$ also lack the capability to address the PIIF assumption. + +# D.2. Proof of Proposition 4.4. + +The optimization of Eq. 3 enables a broader scale environment inference space by cooperatively modeling intra-class spurious subgraphs and extra-class samples. Given that $\max - I(E; G_C|Y) = \max I(E; G_S|Y)$ , maximizing $I(E; G_S|Y)$ implements the inference process for intra-class spurious subgraphs. Consider $I(E; \mathcal{G}|\bar{Y}) = \sum_{y_i \in \bar{Y}} I(E; G^{(i)})$ , maximizing + +$I(E;\mathcal{G}|\overline{G^Y})$ implements the modeling of extra-class sample space. The optimization procedure of max $I(E;\mathcal{G}|\overline{G^Y})$ indicates that all other extra-class samples $\{G^{(i)}|y_i\in \bar{Y}\}$ are modeled as environment variables when making environment inference on samples with label $Y$ . Therefore, the optimization process for Eq. 3 encompasses a broader cognitive space for environments, with its upper limit being the ground-truth environment distribution. + +# D.3. Proof of Theorem 5.1. + +Given that PIIF shifts in the absence of environment labels are more challenging (Chen et al., 2024), our work focuses on the ability of NeGo on the PIIF assumption, namely PIIF implies that the causal variable $G_{C}$ indirectly influences the spurious variable $G_{S}$ through the mediator $Y$ . In the following analysis, we analyze the two specific scenarios under PIIF assumption, i.e., $H(G_{C}|Y) < H(G_{S}|Y)$ and $H(G_{C}|Y) > H(G_{S}|Y)$ . NeGo aims to comprehensively capture the underlying environment space by inferring the extra-class sample space and the intra-class spurious subgraphs. The learning objective of extracting casual subgraph $G_{C}$ can be rewritten as follows, + +$$ +\begin{array}{l} \arg \max _ {\hat {G} _ {C}} \left(I \left(\hat {G} _ {C} ^ {e _ {i}}, \hat {G} _ {C} ^ {e _ {j}} | C\right) - I \left(\hat {G} _ {C}, \bar {G} | Y\right)\right) \\ \forall e _ {i}, e _ {j} \in E \\ = \underset {\forall e _ {i}, e _ {j} \in E} {\arg \max } _ {\hat {G} _ {C}} (- I (\hat {G} _ {C}, \bar {G} | Y) + I (\hat {G} _ {C} ^ {e _ {i}}, \hat {G} _ {C} ^ {e _ {j}} | Y)), \tag {14} \\ \end{array} +$$ + +where $\hat{G}_C^{e_i}$ denotes the extracted causal subgraph under any environmental scenario $e_i$ . The first term represents the constraint of negative inference, meaning that NeGo models all extra-class samples as environmental space. The second term represents the constraint of positive causal inference, meaning that the causal subgraph extracted under any environmental condition remains consistent, and is most useful for label prediction. Next, we will demonstrate that NeGo can address the two scenarios of the PIIF assumption. + +For the case of $I(G_{C};Y) > H(G_{C}) - H(G_{S})$ , we can get following derivation, + +$$ +H \left(G _ {S} | Y\right) > H \left(G _ {C} | Y\right), \tag {15} +$$ + +$$ +H \left(G _ {S}\right) - I \left(G _ {S}; Y\right) > H \left(G _ {C}\right) - I \left(G _ {C}; Y\right), \tag {16} +$$ + +$$ +H \left(G _ {S}\right) - H \left(G _ {C}\right) + I \left(G _ {C}; Y\right) > I \left(G _ {S}; Y\right) > 0, \tag {17} +$$ + +$$ +I \left(G _ {C}; Y\right) > H \left(G _ {C}\right) - H \left(G _ {S}\right). \tag {18} +$$ + +We can get that inferring $G_{C}$ from $Y$ is more effective and seamless compared to simply separating causal and spurious substructures based on entropy differences. Thus, our positive inference approach, $\arg \max_{\forall e_i,e_j\in E}I(\hat{G}_C^{e_i},\hat{G}_C^{e_j}|Y)$ , is sufficient to achieve the decoupling of $G_{C}$ from the label $Y$ . + +For the case of $I(G_{C};Y) < H(G_{C}) - H(G_{S})$ , we get $I(G_{C};Y) < H(G_{C}) - H(G_{S})$ . This means that we need to consider entropy differences in the data composition to assess the differences between causal and spurious relationships. In other words, positive inference $\operatorname*{arg\max}_{\forall e_i,e_j\in E}I(\hat{G}_C^{e_i},\hat{G}_C^{e_j}|Y)$ alone may result in $\hat{G}_C$ containing spurious subgraph information, + +meaning $G_{S} \in \hat{G}_{C}$ . Fortunately, our negative inference strategy can further refines $\hat{G}_{C}$ by considering entropy differences $H(G_{C}) - H(G_{S})$ to better distinguish between causal and spurious relationships. Specifically, our $G_{C}$ is also subject to this constraint through a negative inference approach to learn $\hat{G}_{S}$ , + +$$ +G _ {C} \in G - \arg \max \left(I (Y | \hat {G} _ {S}) - I (\hat {G} _ {S} | \bar {Y})\right). \tag {19} +$$ + +# E. More Experiment Results + +# E.1. Implementation Details + +We implement our Nego and parts of baselines with PyTorch 1.10.1 on a server with NVIDIA A100-PCIE-40GB. All experiments are repeated with 10 different random seeds of [1,2,3,4,5,6,7,8,9,10]. The reported results include the mean and standard deviation obtained from these 10 runs. During the training stage, we employ the Adam optimizer. We set the maximum number of training epochs to 200. The batch size of training is set as 32 except for GOOD-CMNIST, which uses a batch size of 64. For GOOD-Motif, GOOD-CMNIST and GOODSST2, the learning rate is set to $5 \times 10^{-4}$ . For GOOD-HIV, GOOD-Twitter, and DrugOOD, we exploit a learning rate of $10^{-4}$ . Additionally, we utilize a weight decay of $10^{-4}$ to help with regularization and prevent overfitting. The experiment setup of all baselines is same as (Gui et al., 2024). + +# E.2. Performance on the Synthetic Datasets + +As shown in Tab. 8, our method achieves optimal performance on almost all datasets. Besides, the performance of environment-centered OOD methods, such as LECI and GALA, often achieves suboptimal or even optimal results on various datasets. This demonstrate the effectiveness of modeling environment factors in addressing data distribution shifts. + +# E.3. Hyperparameter Sensitivity Analysis + +To investigate the sensitivity of $\lambda$ to performance in Eq. 11, we conducted experiments on both GOOD-HIV-scaffold and DrugOOD-assay. As illustrated by the results from Fig. 5(b), the performance of NeGo improves significantly when $\lambda \approx 1$ . We also find that neither smaller nor larger values of $\lambda$ lead to improvements in performance. Therefore, only by jointly utilizing both positive learning and negative inference can better performance be achieved. + +Table 8. The accuracy of NeGo on two synthetic datasets, where GOOD-Motif has a structure shift and GOOD-CMNIST has a feature shift. * indicates statistical significance against the second-best results. + +
ModelGOOD-MotifGOOD-CMNIST
basissizecolorcovariate
ERM60.93±11.1156.63±7.1226.64±2.3757.56±9.59
IRM64.94±4.8554.52±3.2729.63±2.0658.11±5.14
V-Rex61.59±6.5855.85±9.4227.13±2.9048.78±7.81
IB-IRM63.45±5.4252.76±4.6728.95±1.9850.56±6.62
DIR34.39±2.0243.11±2.7822.53±2.5644.67±0.00
GSAT62.27±8.7950.03±5.7135.02±2.7868.22±7.23
CAL59.45±3.3451.27±2.5028.87±1.8052.59±2.76
CIGA37.81±2.4251.87±5.1525.06±3.0756.78±2.99
GIL68.48±2.4663.61±2.7547.32±2.2757.61±2.98
LECI84.56±2.2271.43±1.9651.80±2.7183.20±5.89
GALA80.95±1.3170.45±1.3052.68±2.4081.23±3.29
NeGo83.96±1.9072.65±1.47*53.28±1.7982.43±1.73
+ +# E.4. Case Studies + +We also explore whether incorporating prompt learning can enhance the model's performance, rather than our overall negative prompt framework. To this end, we develop a variant of our NeGo framework, referred to as PoGo, which incorporates the positive prompt practice. We evaluate the effectiveness (ROC-AUC) of PoGo on four distribution shift datasets. We present the final performance by averaging the results from two runs conducted on an NVIDIA A100-PCIE-40GB with different random seeds. As shown in Fig. 5(a), the performance of PoGo is competitive with recent successful practices like LECI and GALA, demonstrating that the design of positive prompt can still obtain excellent generalization. However, our framework of negative prompt shows superior performance. + +We further investigate the reason of such performance of positive prompt practice PoGo. We modify PoGo by masking the $\mathcal{L}_{posi}$ (the original Negative Loss $\mathcal{L}_{naga}$ ), obtaining PoGo (w/o. $\mathcal{L}_{posi}$ ). With all other configurations remaining the same, we observe a significant decrease in the performance of PoGo (w/o. $\mathcal{L}_{posi}$ ). Our analysis is as follows: although both $\mathcal{L}_{posi}$ and $\mathcal{L}_{pred}$ are positive losses in PoGo, we argue they serve different purposes and convey distinct information. $\mathcal{L}_{prompt}$ , as a guidance strategy for the positive prompt, guides the prompt module to learn more potential environment semantics, while $\mathcal{L}_{pred}$ enhances prediction accuracy. Without prompt guidance $\mathcal{L}_{prompt}$ , the advantage of prompt learning is not released. Therefore, we argue that positive prompt may also enhance the model to capture a broader scale of environments. A more in-depth investigation will be left for our future work. + +![](images/49a209e6567396af6c6c378c7a2503cb9259688691722c36758d0eec7ed79178.jpg) +Figure 5. Left: the performance comparison of PoGo, which is a variant of our NeGo framework by incorporating the positive prompt practice. Right: hyperparameter sensitivity analysis. + +![](images/7ce498a8f0672023e41610095c34cda161d79c24814f1d8bebebcaeb4de0cbd2.jpg) + +# F. Future Works + +Our design can effectively solve the existing challenges, but there still exist a limitation. The negative prompter in our approach learns class-specific environment embeddings by considering all extra-class samples as environment variables. This results in our method relying on the class information of the dataset. With a larger number of classes, the model is better equipped to capture and recognize complex underlying environment factors. When the dataset is limited to a binary classification task, environment factors always present within the in-class samples. In this case, our negative prompter may have reduced capability to expand the environment inference space. The reason for this limitation is that the model is sensitive to the characteristics of dataset. Actually, we can realize that environment variables are often shareable across datasets. Therefore, it is a promising research direction to study cross-task graph OOD work to capture broader environmental information. In the future, we aim to investigate transferable multi-task graph OOD generalization learning, which is not discussed in existing works. \ No newline at end of file diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/images.zip b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..76ed91ca0fc5bc50f2251bf22fd38071338c6e59 --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7704395155b38d95d6cd818617f7551513c11fedd44f917a2e9de6e9b01c7d51 +size 809678 diff --git a/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/layout.json b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..09389c0e07a9903fd21117a122c120854504a9e2 --- /dev/null +++ b/ICML/2025/Enhancing Graph Invariant Learning from a Negative Inference Perspective/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:287662d1960c3d05d72e0bc40fb9caed6dbb7f6d0eef63ece135d2927476e203 +size 731717 diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_content_list.json b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..976117b9b3f6fed31e5e95b9cfc8dd88f6328c17 --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea9b4f114b9e2071a00a7950231695257b4fedf315ccdda5bc6be1dfdb975ff0 +size 108723 diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_model.json b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b8c92778d16eae1e8ae20380a38c6aaa30623ab2 --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c35317a74aa297212019c4cc48c0bf8900fe12bc432651cce27bbfc81373f9f +size 124867 diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_origin.pdf b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..84857230d19728b007a40769f3c6060820e4f8f6 --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/b43735ca-9668-4624-9293-67e6d0796a53_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0ea2cebaf3b132e8a9cdb532d520678ac805ef19e060b732c6bdaab3c085843 +size 1296264 diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/full.md b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7db576c7109d8a7c1ca293b65f862d839bd058bc --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/full.md @@ -0,0 +1,433 @@ +# Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization + +Seungbeom Lee $^{*1}$ Munsun Jo $^{*2}$ Jungseul Ok $^{13}$ Dongwoo Kim $^{13}$ + +# Abstract + +Deep learning-based structure-based drug design aims to generate ligand molecules with desirable properties for protein targets. While existing models have demonstrated competitive performance in generating ligand molecules, they primarily focus on learning the chemical distribution of training datasets, often lacking effective steerability to ensure the desired chemical quality of generated molecules. To address this issue, we propose a multi-reward optimization framework that finetunes generative models for attributes, such as binding affinity, validity, and drug-likeness, together. Specifically, we derive direct preference optimization for a Bayesian flow network, used as a backbone for molecule generation, and integrate a reward normalization scheme to adopt multiple objectives. Experimental results show that our method generates more realistic ligands than baseline models while achieving higher binding affinity, expanding the Pareto front empirically observed in previous studies. + +# 1. Introduction + +Designing ligand molecules that simultaneously optimize multiple objectives – such as binding affinity, synthetic accessibility, and strain energy – is a central challenge in structure-based drug design (SBDD). Conventional deep-learning approaches typically address only one or two objectives at a time, most commonly focusing on high binding affinity and basic chemical feasibility, e.g., through simple validity checks via the valency rule. While these methods have advanced the generative capabilities of molecular mod + +*Equal contribution Graduate School of Artificial Intelligence, POSTECH, South Korea KT Corporation, South Korea Department of Computer Science & Engineering, POSTECH, South Korea. Correspondence to: Dongwoo Kim . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/581d00bfb1c22687e42c38cee12e19254de8d6320c36eae6291251f5ead11b88.jpg) +(a) Vina Dock vs. SA +Figure 1. Comparison of the median Vina docking score (lower is better) against Synthetic accessibility (SA, higher is better) and Strain Energy (SE, lower is better). The dashed blue line represents a Pareto front obtained from previous works. + +![](images/cbb2cb95fc840954b412fbd9d65c1ef51208cae986cc621e282f780d28da64ba.jpg) +(b) Vina Dock vs. SE + +els (Huang et al., 2024; Qu et al., 2024; Guan et al., 2023), they often neglect other crucial factors like ease of conformation stability such as strain energy or synthesis. In practice, drug discovery demands a careful balance of many properties, making single-objective or narrowly focused solutions insufficient. + +In current deep generative modeling for SBDD, standard strategies generally concentrate on minimizing the discrepancy between a generated ligand and a training set of protein-ligand complexes. Although this can lead to strong binding affinities, improving multiple objectives beyond binding, e.g., synthetic accessibility, usually requires careful tuning of loss terms or elaborate constraints. As a result, purely likelihood-based approaches can struggle to expand the Pareto front, which captures trade-offs among distinct objectives. + +Figure 1 illustrates the trade-offs among Vina docking score measuring binding affinity to target protein, synthetic accessibility (SA), and strain energy (SE) using results from nine different generative models, along with a reference dataset included in the test set. Although recently proposed methods such as MolCRAFT (Qu et al., 2024), IPDiff (Huang et al., 2024), and AliDiff (Gu et al., 2024), outperform the reference data in terms of Vina docking score, they underperform on SA and SE. Ideally, a design process would push + +the Pareto frontier toward both lower docking scores and higher SA (or lower SE). In contrast, these findings show that existing models remain overly focused on improving affinity, thus calling into question the practical utility of their generated molecules. + +Our Approach Building on recent developments in preference-based reinforcement learning, we introduce a multi-reward Direct Preference Optimization (DPO) framework adapted for Bayesian Flow Networks (BFNs), which recently show promising performance on ligand generation tasks (Qu et al., 2024). DPO refines a pretrained generative model using feedback from external software or metrics, enabling fine-grained control over multiple properties (Rafailov et al., 2024; Kim et al., 2024). In our setting, we treat each property, such as binding affinity, synthetic accessibility, and strain energy, as a separate reward. We then apply softmax-based normalization to ensure commensurability of metrics with different ranges and adopt an uncertainty-regularized ensemble strategy to penalize high variance in multi-reward predictions. This multi-reward scheme expands the trade-off frontier between objectives, thereby improving molecular candidates across multiple dimensions. + +# 2. Related Work + +Preference Alignment and Direct Preference Optimization (DPO) Preference alignment has emerged as a powerful paradigm for adjusting pretrained models to better reflect desired behaviors. Originally adopted in large language models (LLMs) to align with human feedback (Ouyang et al., 2022), DPO (Rafailov et al., 2024) provides a more direct means of incorporating user or expert preferences compared to traditional reinforcement learning. Subsequently, DPO-based methods have been extended to text-to-image generative models (Wallace et al., 2023), showing that preference alignment is not limited to language domains. In multi-objective settings, Kim et al. (2024) propose a confidence-based or variance-penalized approach to combine heterogeneous reward signals, further enhancing stability and interpretability. + +Structure-Based Drug Design Structure-based drug design (SBDD) focuses on generating or modifying small-molecule ligands to exhibit strong binding affinity for a target protein while maintaining favorable pharmacological properties. Classical computational approaches rely on de novo design or docking-based virtual screening (Schneider & Fechner, 2005) to identify candidate molecules, followed by iterative refinement and validation through experimental assays. + +Recent deep learning methods cast SBDD as a conditional + +generative modeling task, leveraging protein-ligand complex data to learn a distribution over valid 3D conformations. Autoregressive approaches place atoms or fragments within protein pockets in a sequential manner (Luo et al., 2021; Peng et al., 2022), while diffusion models generate candidate molecules by denoising from random noise, learning continuous atom positions and discrete atom types jointly (Guan et al., 2023; Huang et al., 2024; Guan et al., 2024; Zhou et al., 2024). Most recently, Qu et al. (2024) introduced MolCRAFT, which uses Bayesian Flow Networks (BFNs) (Graves et al., 2023) to sample in parameter space rather than directly in data space, leading to improved binding affinity and more stable 3D molecular structures. To further improve the quality of binding affinity, Gu et al. (2024) introduced AliDiff, which fine-tunes a diffusion-based generative model via DPO. + +On the other hand, Harris et al. (2023) raises questions about the evaluation practices with the deep generative models for SBDD. They find that many generated molecules from recent generative models violate physical constraints and call for an expanded evaluation of SBDD. A similar observation is made for deep learning based binding affinity prediction in Buttenschoen et al. (2024). Our approach builds upon this foundation by adopting a multi-reward perspective that jointly optimizes for binding affinity and other molecular properties (e.g., synthetic accessibility, strain energy), thereby expanding the Pareto frontier in multi-objective SBDD. + +# 3. Preliminaries + +We first introduce the problem formulation of structure-based drug design with notations used throughout this manuscript. We then provide an overview of Bayesian Flow Networks (BFNs)(Graves et al., 2023) and MolCRAFT(Qu et al., 2024), where the latter leverages BFNs to generate target molecules. + +# 3.1. Problem Formulation + +In structure-based drug design (SBDD), the goal is to generate ligand molecules conditioned on a given protein target. We denote a protein target by $\mathcal{P} = \{(\mathbf{x}_{\mathcal{P}}^{(i)},\mathbf{v}_{\mathcal{P}}^{(i)})\}_{i = 1}^{N_{\mathcal{P}}}$ where $\mathbf{x}_{\mathcal{P}}^{(i)}\in \mathbb{R}^3$ is the three-dimensional coordinate of the $i$ -th atom, and $\mathbf{v}_{\mathcal{P}}^{(i)}\in \mathbb{R}^{D_{\mathcal{P}}}$ is a one-hot vector encoding the atom type. A molecule is analogously represented as $\mathcal{M} = \{(\mathbf{x}_{\mathcal{M}}^{(i)},\mathbf{v}_{\mathcal{M}}^{(i)})\}_{i = 1}^{N_{\mathcal{M}}}$ , where $\mathbf{x}_{\mathcal{M}}^{(i)}\in \mathbb{R}^3$ and $\mathbf{v}_{\mathcal{M}}^{(i)}\in \mathbb{R}^{D_{\mathcal{M}}}$ denote the three-dimensional coordinate and the atom-type vector, respectively. For convenience, we denote each molecule by $\mathbf{m} = [\mathbf{x},\mathbf{v}]$ where $[\cdot ,\cdot ]$ is the concatenation of $\mathbf{x}\in \mathbb{R}^{N_{\mathcal{M}}\times 3}$ and $\mathbf{v}\in \mathbb{R}^{N_{\mathcal{M}}\times D_{\mathcal{M}}}$ given target protein as $\mathbf{p}$ . + +SBDD aims to discover a molecule $\mathbf{m}$ given protein and its binding site $\mathbf{p}$ . During training, a set of protein-reference molecule pairs is provided. As a primary performance metric, external software such as AutoDock Vina (Eberhardt et al., 2021) is employed to estimate the binding affinity between the protein and generated molecules. Along with affinity scores, additional molecular properties (e.g., validity, synthesizeability, and drug-likeness) can be evaluated to assess the quality of the generated compounds further. + +# 3.2. Bayesian Flow Networks + +Bayesian flow network (BFN) (Graves et al., 2023) is a class of generative models that integrate core ideas from both diffusion models (Ho et al., 2020) and Bayesian inference. Unlike traditional diffusion models that operate directly in the data space, BFNs perform their forward and reverse "diffusion" in the parameter space of the data distribution. This process ensures the generative process is continuous and differentiable regardless of whether data is discrete or continuous, making BFNs particularly suitable for molecule generation, where atom coordinates are continuous, and atom types are discrete. MolCRAFT (Qu et al., 2024) adopts the BFN as a backbone for conditional molecule generative model given proteins. Below, we outline the details of BFNs in the context of MolCRAFT. + +At a high level, BFNs can be conceptualized as an iterative message exchange between two components: a sender and a receiver. In each round, the sender transmits a noisy sample to the receiver, akin to the forward diffusion process in a standard diffusion model. The receiver then attempts to infer the sender's parameters from the noisy input, effectively performing a reverse "denoising" step analogous to the reverse diffusion phase. This iterative cycle continues until reaching the final estimate of the data distribution in parameter space. + +Sender distribution Formally, given a molecule $\mathbf{m} = [\mathbf{x},\mathbf{v}]$ , the sender injects continuous noise for both coordinates and types independently according to a predefined noise schedule. We denote the resulting noise-injected molecule by $\tilde{\mathbf{m}} = [\tilde{\mathbf{x}},\tilde{\mathbf{v}}]$ . The sender distribution is then factorized as: + +$$ +p _ {S} (\tilde {\mathbf {m}} | \mathbf {m}, t) = \prod_ {i} ^ {N _ {\mathcal {M}}} p (\tilde {\mathbf {x}} ^ {(i)} | \mathbf {x} ^ {(i)}, \alpha_ {t} ^ {\mathbf {x}}) \prod_ {i} ^ {N _ {\mathcal {M}}} p (\tilde {\mathbf {v}} ^ {(i)} | \mathbf {v} ^ {(i)}, \alpha_ {t} ^ {\mathbf {v}}), \tag {1} +$$ + +where $\alpha_{t}$ is an accuracy parameter such that the sender samples are entirely uninformative about $\mathbf{x}$ when $\alpha = 0$ and become more informative as $\alpha$ increases. One can use different schedules for the coordinate $\alpha_{t}^{\mathbf{x}}$ and atom type $\alpha_{t}^{\mathbf{y}}$ . + +Receiver distribution At time $t$ , the receiver uses parameters $\theta_{t-1}$ from the previous step and the noisy sample $\tilde{\mathbf{m}}$ from the sender to reconstruct a denoised $\mathbf{m}$ . Let $\Phi(\theta_{t-1}, \mathbf{p}, t)$ be an SE(3)-equivariant neural network that outputs $\hat{\mathbf{m}}$ from parameters $\theta_{t-1}$ , the protein pocket $\mathbf{p}$ , and time $t$ . Given that the distribution and noise schedule of the sender distribution is known, the receiver distribution is defined as + +$$ +p _ {R} \left(\tilde {\mathbf {m}} \mid \boldsymbol {\theta} _ {t - 1}, \mathbf {p}, t\right) = p _ {S} \left(\tilde {\mathbf {m}} \mid \boldsymbol {\Phi} \left(\boldsymbol {\theta} _ {t - 1}, \mathbf {p}, t\right), \alpha_ {t}\right). \tag {2} +$$ + +Hence the receiver distribution becomes close to the sender distribution as $\Phi$ accurately reconstructs the original molecule $\mathbf{m}$ . + +Bayesian update To ensure that distribution parameters $\theta_{t}$ can be updated in a tractable way, BFNs employ Bayesian inference. Given the previous parameter $\theta_{t - 1}$ and the noisy sample $\tilde{\mathbf{m}}_t$ , the updated parameter $\theta_{t}$ can be obtained via a Bayesian update function $h(\theta_{t - 1},\tilde{\mathbf{m}}_t,\alpha_t) = \theta_t$ . The update function infers the posterior after observing noisy sample $\tilde{\mathbf{m}}_t$ from the sender distribution $p_S(\tilde{\mathbf{m}}_t|\mathbf{m},\alpha_t)$ and an input distribution $p_I(\mathbf{m}|\boldsymbol {\theta}_{t - 1})$ , often selected as a conjugate prior of the sender distribution. + +This induces the Bayesian update distribution $p_U$ , which is a push-forward distribution of $p_S$ under transformation $h$ , i.e., $p_U(\pmb{\theta}') \coloneqq p_S(\{\tilde{\mathbf{m}} \mid h(\tilde{\mathbf{m}}) = \pmb{\theta}'\})$ , where we omit the conditions for brevity. By marginalizing out $\pmb{\theta}_{1:t-1}$ , one obtains the Bayesian flow distribution: + +$$ +p _ {F} \left(\boldsymbol {\theta} _ {t} \mid \mathbf {m}, \mathbf {p}, t\right) = p _ {U} \left(\boldsymbol {\theta} _ {t} \mid \boldsymbol {\theta} _ {0}, \mathbf {m}, \mathbf {p}, \alpha_ {0: t}\right), \tag {3} +$$ + +where $\theta_0$ is the initial parameter used to define a simple distribution such as the standard normal for continuous or uniform for discrete. A key advantage of BFNs is that, with suitable noise injections and the input distribution, $\theta_t$ can be calculated recursively without explicit simulation. + +Training objective Training proceeds by minimizing the Kullback-Leibler divergence between the sender distribution $p_S$ and the receiver distribution $p_R$ : + +$$ +L (\mathbf {m}, \mathbf {p}) = \mathbb {E} _ {t \sim U (1, T), \tilde {\mathbf {m}} _ {t} \sim p _ {S}, \boldsymbol {\theta} _ {t - 1} \sim p _ {F}} \left[ D _ {\mathrm {K L}} \left(p _ {S} \| p _ {R}\right) \right]. \tag {4} +$$ + +For the continuous-time extension of BFNs and additional technical details, we refer readers to Graves et al. (2023). + +# 3.3. Direct Preference Optimization + +Reinforcement learning with human feedback (RLHF) has been proposed to align the large language models with human preference (Ouyang et al., 2022). Let $\mathcal{D} = \{(c, x^w, x^l)\}$ be a preference dataset, where $x^w$ and $x^l$ are winning and losing responses given prompt $c$ . In standard + +RLHF pipelines, one first trains a reward model to capture these preferences and then uses policy optimization methods (e.g., PPO) to fine-tune the model such that it produces higher-scoring outputs. + +Direct Preference Optimization (DPO) offers an alternative that bypasses the need for an explicit reward-model approximation in the training loop (Rafailov et al., 2024). Let $p_{\theta}(\mathbf{x})$ be a model to be fine-tuned. Given a reference model $p_{\mathrm{ref}}$ , DPO is derived from the optimal solution to the RLHF objective and can be expressed as + +$$ +\begin{array}{l} L _ {\mathrm {D P O}} (\theta) = \\ - \mathbb {E} _ {\mathbf {c}, \boldsymbol {x} ^ {w}, \boldsymbol {x} ^ {l}} \left[ \log \sigma \left(\beta \log \frac {p _ {\theta} \left(\boldsymbol {x} ^ {w}\right)}{p _ {\text {r e f}} \left(\boldsymbol {x} ^ {w}\right)} - \beta \log \frac {p _ {\theta} \left(\boldsymbol {x} ^ {l}\right)}{p _ {\text {r e f}} \left(\boldsymbol {x} ^ {l}\right)}\right) \right], \tag {5} \\ \end{array} +$$ + +where we omit the condition $\mathbf{c}$ for brevity. Minimizing this loss encourages the fine-tuned model $p_{\theta}$ to assign higher relative likelihood to the winning samples than to the losing samples, while remaining close to $p_{\mathrm{ref}}$ . Recently, Diffusion-DPO extends DPO to diffusion-based generative models by expanding the reward model over the entire diffusion trajectory, enabling preference-driven fine-tuning in multi-step generative processes (Wallace et al., 2023). + +# 4. Multi-Reward Optimization for BFNs + +In this section, we present our Direct Preference Optimization for Bayesian Flow Networks (BFN-DPO), an end-to-end framework for controllable molecule generation. Our method draws on recent advances in DPO and adapts these ideas to BFNs. We then extend DPO-BFN to handle multiple reward signals via a softmax-based normalization strategy and an uncertainty-regularized ensemble, allowing fair comparisons among rewards with different numerical scales. + +# 4.1. Direct Preference Optimization on BFNs + +We consider a preference dataset $\mathcal{D} = \{(\mathbf{p},\mathbf{m}^w,\mathbf{m}^l)\}$ , where each triplet consists of a protein target $\mathbf{p}$ , a "winning" molecule $\mathbf{m}^w$ , and a "losing" molecule $\mathbf{m}^l$ . These preferences are determined by pre-computed reward values (e.g., binding affinity). We denote by $p_{\mathrm{ref}}(\cdot)$ and $p_{\phi}(\cdot)$ the reference and fine-tuned BFN models, respectively. Drawing on Diffusion-DPO (Wallace et al., 2023), we define the BFN-DPO objective for a single preference pair $(\mathbf{m}^w,\mathbf{m}^l)$ as + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} \left[ \log \sigma \left(\beta \log \frac {p _ {\phi} \left(\hat {\mathbf {m}} _ {1 : T} ^ {w} \mid \boldsymbol {\theta} _ {0 : T - 1} ^ {w}\right)}{p _ {\text {r e f}} \left(\hat {\mathbf {m}} _ {1 : T} ^ {w} \mid \boldsymbol {\theta} _ {0 : T - 1} ^ {w}\right)} \right. \right. \\ \left. - \beta \log \frac {p _ {\phi} \left(\hat {\mathbf {m}} _ {1 : T} ^ {l} \mid \boldsymbol {\theta} _ {0 : T - 1} ^ {l}\right)}{p _ {\text {r e f}} \left(\hat {\mathbf {m}} _ {1 : T} ^ {l} \mid \boldsymbol {\theta} _ {0 : T - 1} ^ {l}\right)} \right], \tag {6} \\ \end{array} +$$ + +where $\hat{\mathbf{m}}_t$ is a noisy sample drawn at time step $t$ (the "receiver" output), governed by the BFN's sender/receiver distributions, and $\theta_t$ are parameters sampled from the Bayesian flow distribution $p_F$ , which performs Bayesian updates in parameter space. + +Unlike Diffusion-DPO, the reconstruction at time $t$ depends on the parameter $\theta_{t-1}$ . Expanding the ratio into a sum over time steps with Jensen's inequality, one obtains an upper bound involving differences of KL terms at each time step. By approximating the receiver distribution in expectation with the sender distribution, we can obtain the following loss: + +$$ +\mathcal {L} _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} \left[ \mathcal {L} _ {t} ^ {\mathbf {x}} + \mathcal {L} _ {t} ^ {\mathbf {v}} \right], \tag {7} +$$ + +which is separated into two parts: atom loss $\mathcal{L}_t^{\mathbf{x}}$ and type loss $\mathcal{L}_t^{\mathbf{v}}$ . A complete derivation is provided in Appendix A. + +Let $\mathbf{x}^w$ and $\mathbf{x}^l$ be the clean coordinates for the winning and losing molecules at time $t = 0$ . Then the atom loss has the form of + +$$ +\mathcal {L} _ {t} ^ {\mathbf {x}} = - \mathbb {E} \left[ \log \sigma \left(- \beta T \frac {\alpha_ {t} ^ {\mathbf {x}}}{2} \left[ \Delta_ {\phi} ^ {w} - \Delta_ {\phi} ^ {l} \right]\right) \right], \tag {8} +$$ + +with + +$$ +\Delta_ {\phi} ^ {w} = \left\| \mathbf {x} ^ {w} - \Phi_ {\phi} ^ {\mathbf {x}} (\pmb {\theta} _ {t - 1} ^ {\mathbf {x}, w}) \right\| ^ {2} - \left\| \mathbf {x} ^ {w} - \Phi_ {\mathrm {r e f}} ^ {\mathbf {x}} (\pmb {\theta} _ {t - 1} ^ {\mathbf {x}, w}) \right\| ^ {2}, +$$ + +and analogously for $\Delta_{\phi}^{l}$ . Here, $\Phi_{\phi}^{\mathbf{x}}(\cdot)$ and $\Phi_{\mathrm{ref}}^{\mathbf{x}}(\cdot)$ generate coordinate predictions under the fine-tuned and reference BFNs, and $\alpha_{t}^{\mathbf{x}}$ is a concentration parameter for the coordinates at step $t$ . + +For the discrete atom types, we have a similar construction based on KL divergences. Each "winning" and "losing" noisy type $\hat{\mathbf{v}}_t^w$ and $\hat{\mathbf{v}}_t^l$ is compared to the true one-hot type vector $\mathbf{v}^w$ or $\mathbf{v}^l$ . The derivation yields: + +$$ +\mathcal {L} _ {t} ^ {\mathbf {v}} = - \mathbb {E} \left[ \log \sigma \left(- \beta T \left[ \left(\Delta_ {\phi} ^ {w}\right) _ {\mathbf {v}} - \left(\Delta_ {\phi} ^ {l}\right) _ {\mathbf {v}} \right]\right) \right], \tag {9} +$$ + +where + +$$ +\begin{array}{l} \left(\Delta_ {\phi} ^ {w}\right) _ {\mathbf {v}} = \\ \ln p _ {S} \left(\hat {\mathbf {v}} _ {t} ^ {w} | \mathbf {v} ^ {w}, \alpha_ {t} ^ {\mathbf {v}}\right) - \ln p _ {R} \left(\hat {\mathbf {v}} _ {t} ^ {w} \mid \Phi_ {\phi} ^ {\mathbf {v}} \left(\boldsymbol {\theta} _ {t - 1} ^ {\mathbf {v}, w}\right), \alpha_ {t} ^ {\mathbf {v}}\right) \\ - \left[ \ln p _ {S} \left(\hat {\mathbf {v}} _ {t} ^ {w} | \mathbf {v} ^ {w}, \alpha_ {t} ^ {\mathbf {v}}\right) - \ln p _ {R} \left(\hat {\mathbf {v}} _ {t} ^ {w} \mid \Phi_ {\text {r e f}} ^ {\mathbf {v}} \left(\boldsymbol {\theta} _ {t - 1} ^ {\mathbf {v}, w}\right), \alpha_ {t} ^ {\mathbf {v}}\right) \right], \\ \end{array} +$$ + +and similarly for $(\Delta_{\phi}^{l})_{\mathbf{v}}$ . In practice, these log-likelihood terms could be implemented as cross-entropy or KL divergences for categorical predictions. + +By minimizing $\mathcal{L}_{\mathrm{BFN - DPO}}(\phi)$ , the model $p_{\phi}$ is driven to generate noisy samples $\hat{\mathbf{m}}_t^w$ that better align with automated preferences than $\hat{\mathbf{m}}_t^l$ , all while remaining close to $p_{\mathrm{ref}}$ . + +# 4.2. Multi-Reward Normalization + +While one can fine-tune a Bayesian Flow Network (BFN) solely using a single reward signal (e.g., validity), doing so may degrade other desirable properties like binding affinity. To address this limitation, we adopt a multi-reward BFN-DPO scheme inspired by Kim et al. (2024), where multiple reward signals (e.g., binding affinity, validity) are simultaneously optimized. + +Suppose we have $K$ reward functions that evaluate a molecule-protein pair $(\mathbf{p},\mathbf{m})$ . Since these rewards may have different numerical ranges and may be preferred in different directions (e.g., negative for binding affinity, positive for strain energy), direct averaging can be misleading. To handle scale discrepancies, we normalize each reward via a softmax over a mini-batch of size $B$ : + +$$ +\hat {r} _ {i} ^ {(j)} = \frac {\exp \left(f _ {j} \left(r _ {i} ^ {(j)}\right)\right)}{\sum_ {b = 1} ^ {B} \exp \left(f _ {j} \left(r _ {b} ^ {(j)}\right)\right)}, \tag {10} +$$ + +where $r_i^{(j)}$ is the $j$ -th reward for the $i$ -th molecule, and $f_j(\cdot)$ is a simple transformation based on the $j$ -th reward, so that higher values consistently indicate better rewards across different metrics. This maps each reward to the (0,1) interval, ensuring that distinct reward signals become comparable despite inherently different numerical ranges. + +After normalization, one still must combine the m rewards into a single score. Following Kim et al. (2024), we reduce the influence of high-variance reward profiles by subtracting a variance-based penalty. Specifically, let $\mu_{\hat{r}_i}$ be the mean of the normalized rewards for molecule $i$ . The final multi-reward score for that molecule is + +$$ +\bar {r} _ {i} = \mu_ {\hat {r} _ {i}} - \gamma \frac {1}{K} \sum_ {j = 1} ^ {K} \left(\hat {r} _ {i} ^ {(j)} - \mu_ {\hat {r} _ {i}}\right) ^ {2} \tag {11} +$$ + +where $\gamma$ is a hyperparameter controlling how strongly to penalize high reward variance. This strategy promotes molecules that achieve balanced performance across all reward dimensions, rather than excelling at some while failing at others. More details on the hyperparameters can be found in Appendix B. + +We further stabilize training by adopting the $\mathrm{E}^2\mathrm{PO}$ , a variant of DPO (Gu et al., 2024), to avoid excessive focus on winning samples when their advantage is already large. Concretely, we replace the standard BFN-DPO loss $\mathcal{L}_{\mathrm{BFN - DPO}}$ with + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {B F N - E} ^ {2} \mathrm {P O}} = - \mathbb {E} \left[ \sigma (\bar {r} _ {w} - \bar {r} _ {l}) \mathcal {L} _ {\mathrm {B F N - D P O}} \right. \\ + \left. \left(1 - \sigma \left(\bar {r} _ {w} - \bar {r} _ {l}\right)\right) (2 - \mathcal {L} _ {\mathrm {B F N - D P O}}) \right], \tag {12} \\ \end{array} +$$ + +where $\bar{r}_w$ and $\bar{r}_l$ denote the final multi-reward scores for the winning and losing molecules, respectively. If the difference + +$\bar{r}_w - \bar{r}_l$ becomes too large (close to 1), the second term is nullified; thus, over-optimizing already "high-scoring" winners is discouraged. In effect, $\mathrm{E}^2\mathrm{PO}$ enables more balanced training and helps prevent mode collapse onto a narrow set of winning samples. + +# 5. Experiment + +In this section, we provide the result of the multi-object optimization approach with empirical experiments. Due to the space limit, missing implementation details are provided in Appendix B. + +# 5.1. Experimental Setting + +Datasets We fine-tune a pretrained model on the Cross-Docked dataset (Francoeur et al., 2020). The CrossDocked dataset comprises 100K training pairs and 100 target proteins for testing. For each protein, win-lose pairs are selected based on multi-reward scores described in Section 4.2 from molecules generated by the pretrained model. These pairs serve as input for fine-tuning via our proposed BFN-DPO procedure. We generate 100 new molecules per target protein in the test set for evaluation. + +Baselines We compare our method to the following baselines: AR (Luo et al., 2021) and Poket2Mol (Peng et al., 2022) generate molecules autoregressive, and FLAG (Zhang & Liu, 2023) generates at the fragment level. TargetDiff (Guan et al., 2023), DecompDiff (Guan et al., 2024), DecompOpt (Zhou et al., 2024), and IPDiff (Huang et al., 2024) are diffusion-based generative models. IPDiff incorporates protein-ligand interactions as a priori in the forward process. MolCRAFT (Qu et al., 2024) employs BFNs, where noise and denoise processes are performed in a fully continuous parameter space. AliDiff (Gu et al., 2024) applies a single reward optimization to improve the binding affinity based on IPDiff. + +Evaluation metrics We evaluate the generated molecules from three different perspectives: binding affinity, conformation validity, and molecular properties. For binding affinity, we use Vina Score, Vina Min, and Vina Dock measured by AutoDock Vina (Eberhardt et al., 2021) following the setup used in Ragoza et al. (2022). The Vina Score measures the binding affinity of the generated molecule as is. Vina Min measures the affinity after optimizing the molecular structure without changing the docking position. Vina Dock measures the binding affinity after re-docking the molecule; hence, reconsider the molecule's position and orientation. Low scores indicate stronger protein-ligand binding affinity. We report average and median scores for all Vina metrics. For conformation validity, we report strain energy (SE) measuring molecule conformation energy and protein-ligand + +Table 1. Performance comparison across different reward methods. We mark the best, and the second-best performances in bold and underline, respectively. $(\downarrow) / (\uparrow)$ indicate whether a smaller/larger number is better, respectively. + +
MethodBinding AffinityConformation StabilityMolecular PropertiesAvg. size
Vina Score (↓)Vina Min (↓)Vina Dock (↓)SE (↓)Clash (↓)SA (↑)QED (↑)
Avg.Med.Avg.Med.Avg.Med.25%50%75%Avg.Avg.Avg.
Reference-6.36-6.46-6.71-6.49-7.45-7.261.983.986.235.510.730.4822.8
AR-5.75-5.64-6.18-5.88-6.75-6.622.797.3916.344.460.640.5117.7
Pocket2Mol-5.14-4.70-6.42-5.82-7.15-6.790.221.504.826.240.740.5717.7
FLAG16.484.531.21-4.04-5.63-6.611.324.9616.8440.830.700.4921.5
TargetDiff-5.47-6.30-6.64-6.83-7.80-7.917.4816.8533.7010.840.580.4824.2
DecompDiff-5.19-5.27-6.03-6.00-7.03-7.164.1710.8122.778.160.660.5121.2
DecompOpt-5.67-6.04-7.04-7.09-8.39-8.4312.3421.3737.6914.560.610.4529.4
IPDiff-6.70-7.53-7.63-7.71-8.41-8.3910.3027.0565.498.790.610.5224.3
AliDiff-6.97-7.75-7.87-7.94-8.65-8.6410.0927.6067.008.760.560.5024.4
MolCRAFT-6.59-7.04-7.27-7.26-7.92-8.013.107.9214.877.090.690.5022.7
Ours-7.18-7.38-7.89-7.77-8.62-8.642.055.5611.626.690.740.5522.8
+ +clash measuring the number of potential overlaps between ligand atoms and protein (Harris et al., 2023). For molecular properties, we use synthetic accessibility (SA) (Ertl & Schuffenhauer, 2009) and quantitative estimation of drug-likeness (QED) (Bickerton et al., 2012). + +Multi-reward optimization We choose MolCRAFT (Qu et al., 2024) as a backbone for the multi-reward optimization. In the following analysis, we report the results of the fine-tuned model with Vina Score, SE, and QED. Although it is possible to optimize all seven evaluation metrics together with BFN-DPO, we find that this generally degrades the model performance. A more detailed analysis of reward selection is provided in Section 5.4. + +# 5.2. Results + +Table 1 shows the overall performance of ligand molecules generated by our method and baselines. Our approach achieves four best and four second-best results in eight metrics, indicating robust and well-rounded performance in SBDD. While autoregressive models ensure stable conformations and molecular properties but struggle with binding affinity, and diffusion-based models achieve high binding affinity at the cost of conformation stability and synthetic accessibility, MolCRAFT with BFNs balances both effectively. Qu et al. (2024) observes that binding affinity scores can be artificially boosted by generating larger molecules, which present more surface area for binding. The average size of our generated molecules remains comparable to those produced by MolCRAFT, indicating that no affinity hacking occurs. Note that smaller molecules often excel in SE and SA, which helps explain why AR and Pocket2Mol, both of which generate relatively smaller ligands, report particularly high SE and SA scores. + +![](images/d5f283801eb8110cf2d8d27b05d7def0b42c4c47329ff4db0c90161dd26edc26.jpg) +(a) Vina Dock vs. QED + +![](images/08b4b65f5810e293948b609952519643d8284a7ce8efe57fecd29acb1a50ca4d.jpg) +(b) SE vs. SA +Figure 2. Comparison between the median Vina docking score and QED, and SE and SA. + +Figure 1 illustrates how different models balance their average Vina Dock scores against SA and SE. In both subplots, previous approaches occupy a curve where improving one metric typically comes at the expense of the other. In contrast, our multi-reward method moves beyond this frontier by achieving stronger binding affinity while simultaneously preserving higher SA and lower SE. This outcome highlights the effectiveness of our framework in expanding the Pareto front for multi-objective structure-based drug design. + +We further illustrate the comparison between Vina Dock and QED in Figure 2a and SE and SA in Figure 2b. A similar trend can be observed from the Vina Dock and QED, but no clear trade-off between SE and SA is observable. Instead, we observe a strong correlation between SE and SA. + +# 5.3. Analysis + +Validity of generated molecules Although the conformation stability and molecular property metrics show the validity of generated molecules by our method, we con + +![](images/5083ae5c6233c664fc66fd0b5c802dbcf5bc1d57063d4b00f652b67476b1c188.jpg) +(a) The percentage of valid molecules. + +![](images/76ea5479abc62a77e84de1a42b356aa643a29688b9b602272f0d01aa4b920af7.jpg) +(b) Cumulative chart showing the remaining percent of valid molecules after each validity test. + +![](images/fa0d985d487b18c6e28e4a93f209f7d76680cadb45f29596dfbf14894e3c6483.jpg) +Figure 3. Validity check of the generated molecules from different models through PoseBuster (Buttenschoen et al., 2024). +Figure 4. Comparison of strain energy (SE) distributions for molecules generated by different methods. + +duct a more comprehensive validity check through the 20 validity tests proposed by PoseBuster (Buttenschoen et al., 2024). The test considers both intra-molecular and intermolecular validity with the protein. Figure 3a shows the percentage of molecules that pass all validity tests on the generated 10K molecules for the test proteins. Our multi-reward method generates significantly more valid ligands compared to other generative models. AliDiff, a fine-tuned IPDiff (Huang et al., 2024) with Vina Dock as a single reward, is known to achieve the best binding performance so far. However, the model fails to generate valid molecules in many cases. Figure 3b shows which test each model fails to satisfy the validity over 20 validity tests. Notably, many models, including IPDiff and AliDiff, fail to satisfy proper bond angles between atoms of generated molecules. Some models fail to keep a proper distance from the protein. + +Strain Energy (SE) Recent studies (Buttenschoen et al., 2024; Harris et al., 2023) caution that deep learning-based SBDD models may artificially inflate binding scores by producing ligands with unrealistically high SE. To examine + +Table 2. Comparison between different optimization approaches. GS is short for gradient surgery. A model fine-tuned with multi-rewards shows better binding affinity scores than the model with gradient surgery. + +
Binding AffinityConformation StabilityMolecular Properties
Vina Score Med. (↓)SE Med. (↓)Clash Avg. (↓)SA Avg. (↑)QED Avg. (↑)
Reference-7.463.965.510.730.48
Pretrained-7.047.627.090.690.50
3 GS-6.809.697.180.660.50
6 GS-6.878.627.110.690.52
Multi-Stage-7.165.157.540.740.54
Ours-7.385.566.690.740.55
+ +this issue, Figure 4 presents the SE distributions for different methods. Lower SE values correspond to more physically plausible, stable 3D conformations. Our method clearly generates molecules with lower SE distributions, indicating structurally sound ligands. These improvements do not come at the expense of binding affinity. + +Synthetic Accessibility (SA) Figure 5 presents the median SA scores of molecules generated by AliDiff, IPDiff, and MolCRAFT with reference molecules across target proteins in the test set. The compared models are recent state-of-the-art models for binding affinity. The results show that our model consistently generates molecules with high SA across all targets. We also report the proportion of proteins for which each model generated molecules with the highest median SA score. Our model obtains the best SA scores for $44\%$ of proteins. + +# 5.4. Ablation Studies + +Different optimization approaches Multi-reward optimization can be framed as a multi-task learning problem + +![](images/85b44a12c7c427ca476a7f1eccbe0fe186dac729c9a0d7711559a5156eb9e20b.jpg) +Figure 5. The median Synthetic Accessibility (SA) scores of the molecules generated for each of the 100 target proteins in the test set. We compare our model to the top three models from the highest median binding affinity (AliDiff, IPDiff, MolCRAFT), as well as the reference. The values in parentheses represent the proportion of the best SA score for each protein + +Table 3. Comparison based on the number of rewards. A model fine-tuned with three rewards shows better binding affinity scores than the model with all seven rewards. + +
# RewardsBinding AffinityConformation StabilityDrug-like Properties
Vina Score Avg. (↓)Vina Min Avg. (↓)Vina Dock Avg. (↓)SE Med. (↓)Clash Avg. (↓)SA Avg. (↑)QED Avg. (↑)
NoPretrained-6.59-7.27-7.927.627.090.690.50
SingleScore-6.63-7.36-8.016.857.250.710.53
Min-6.61-7.43-8.026.887.360.710.53
Dock-6.63-7.40-8.16.997.340.710.53
SE-6.51-7.25-7.796.797.400.700.50
Clash-6.44-7.09-7.589.877.160.660.48
QED-6.45-7.31-7.806.137.380.720.54
SA-6.50-7.29-7.807.337.470.710.53
Multi (Ours)Dock+SE+QED-7.18-7.89-8.625.566.690.740.55
All7 rewards-6.50-7.28-7.867.227.280.530.70
+ +when each reward is treated as a separate task. To explore this perspective, we adopt the widely used multi-task optimization technique known as gradient surgery (Yu et al., 2020). Specifically, we apply the gradient surgery to DPO losses of Vina score, SE, and QED (3GS). Since the DPO loss consists of atom and type losses as in Equation (7), we further apply the gradient surgery to these losses separately, resulting in six losses in total (6GS). In addition, we examine a multi-stage optimization procedure, wherein the model is iteratively fine-tuned using newly generated molecules from each preceding iteration. We report the result of the two-stage approach. + +Table 2 compares the performance of each approach to our uncertainty-based reward optimization. We only report the Vina Score among all Vina metrics, but they share similar trends. Neither the gradient surgery nor the multi-stage + +approach outperforms our uncertainty-based reward optimization. The gradient surgery methods perform worse than the reference model in all metrics except QED. + +Multi-reward selection Table 3 show the performances with different choices of metrics as rewards. Trying to optimize all seven rewards at once underperforms in several categories, implying the complex loss landscape with all rewards. In general, optimizing Vina metrics shows a strong correlation, i.e., optimizing one Vina metric can improve the performance of the other two Vina metrics. The optimization over QED improves the performance of SA, leading to our final choice of rewards. Note that Claw cannot be improved even by the corresponding single reward. We leave the improvement of Claw for future work. + +# 6. Conclusion + +In this work, we propose a multi-reward optimization framework to enhance deep learning-based structure-based drug design. Our method addresses the limitations of previous approaches by fine-tuning generative models to optimize multiple attributes, including binding affinity, validity, and drug-likeness. By utilizing direct preference optimization within a Bayesian flow network and integrating a reward normalization scheme, we enable the generation of more realistic ligands with improved binding affinity. Experimental results demonstrate that our approach outperforms the baseline models, offering a more robust solution for drug discovery tasks. + +# Acknowledgements + +This work was partly supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (RS-2019-II191906: Artificial Intelligence Graduate School Program (POSTECH), RS-2024-00457882: Artificial Intelligence Research Hub Project) and Korea Evaluation Institute of Industrial Technology (KEIT) grant funded by the Korea government (MOTIE, Korea) and the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (RS-2024-00337955, RS-2023-00217286) + +# 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 + +Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization, 2016. URL https://arxiv.org/abs/1607.06450. +Bickerton, G. R., Paolini, G. V., Besnard, J., Muresan, S., and Hopkins, A. L. Quantifying the chemical beauty of drugs. Nature chemistry, 4(2):90-98, 2012. +Buttenschoen, M., Morris, G. M., and Deane, C. M. Posebusters: Ai-based docking methods fail to generate physically valid poses or generalise to novel sequences. Chemical Science, 15(9):3130-3139, 2024. +Eberhardt, J., Santos-Martins, D., Tillack, A. F., and Forli, S. Autodock vina 1.2.0: New docking methods, expanded force field, and python bindings. Journal of chemical information and modeling, 61(8):3891-3898, 2021. +Ertl, P. and Schuffenhauer, A. Estimation of synthetic acces + +sibility score of drug-like molecules based on molecular complexity and fragment contributions. Journal of cheminformatics, 1:1-11, 2009. +Francoeur, P. G., Masuda, T., Sunseri, J., Jia, A., Iovanisci, R. B., Snyder, I., and Koes, D. R. Three-dimensional convolutional neural networks and a cross-docked data set for structure-based drug design. Journal of chemical information and modeling, 60(9):4200-4215, 2020. +Graves, A., Srivastava, R. K., Atkinson, T., and Gomez, F. Bayesian flow networks. arXiv preprint arXiv:2308.07037, 2023. +Gu, S., Xu, M., Powers, A., Nie, W., Geffner, T., Kreis, K., Leskovec, J., Vahdat, A., and Ermon, S. Aligning target-aware molecule diffusion models with exact energy optimization. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=EWcvxXtzNu. +Guan, J., Qian, W. W., qiang liu, Ma, W.-Y., Ma, J., and Peng, J. Energy-inspired molecular conformation optimization. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=7QfLW-XZT1. +Guan, J., Qian, W. W., Peng, X., Su, Y., Peng, J., and Ma, J. 3d equivariant diffusion for target-aware molecule generation and affinity prediction. In International Conference on Learning Representations, 2023. +Guan, J., Zhou, X., Yang, Y., Bao, Y., Peng, J., Ma, J., Liu, Q., Wang, L., and Gu, Q. Decompdf: diffusion models with decomposed priors for structure-based drug design. arXiv preprint arXiv:2403.07902, 2024. +Harris, C., Didi, K., Jamasb, A. R., Joshi, C. K., Mathis, S. V., Lio, P., and Blundell, T. Benchmarking generated poses: How rational is structure-based drug design with generative models? arXiv preprint arXiv:2308.07413, 2023. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020. +Huang, Z., Yang, L., Zhou, X., Zhang, Z., Zhang, W., Zheng, X., Chen, J., Wang, Y., Bin, C., and Yang, W. Protein-ligand interaction prior for binding-aware 3d molecule diffusion models. In The Twelfth International Conference on Learning Representations, 2024. +Kim, K., Jeong, J., An, M., Ghavamzadeh, M., Dvijotham, K., Shin, J., and Lee, K. Confidence-aware reward optimization for fine-tuning text-to-image models. arXiv preprint arXiv:2404.01863, 2024. + +Luo, S., Guan, J., Ma, J., and Peng, J. A 3d generative model for structure-based drug design. Advances in Neural Information Processing Systems, 34:6229-6239, 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. +Peng, X., Luo, S., Guan, J., Xie, Q., Peng, J., and Ma, J. Pocket2Mol: Efficient molecular sampling based on 3D protein pockets. 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. 17644-17655. PMLR, 17-23 Jul 2022. URL https://proceedings.mlr.press/v162/peng22b.html. +Qu, Y., Qiu, K., Song, Y., Gong, J., Han, J., Zheng, M., Zhou, H., and Ma, W.-Y. Molcraft: Structure-based drug design in continuous parameter space. arXiv preprint arXiv:2404.12141, 2024. +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. +Ragoza, M., Masuda, T., and Koes, D. R. Generating 3d molecules conditional on receptor binding sites with deep generative models. Chemical science, 13(9):2701-2713, 2022. +Schneider, G. and Fechner, U. Computer-based de novo design of drug-like molecules. Nature Reviews Drug Discovery, 4(8):649-663, 2005. +Wallace, B., Dang, M., Rafailov, R., Zhou, L., Lou, A., Purushwalkam, S., Ermon, S., Xiong, C., Joty, S., and Naik, N. Diffusion model alignment using direct preference optimization, 2023. URL https://arxiv.org/abs/2311.12908. +Yu, T., Kumar, S., Gupta, A., Levine, S., Hausman, K., and Finn, C. Gradient surgery for multi-task learning. Advances in Neural Information Processing Systems, 33: 5824-5836, 2020. +Zhang, Z. and Liu, Q. Learning subpocket prototypes for generalizable structure-based drug design. In International Conference on Machine Learning, pp. 41382-41398. PMLR, 2023. + +Zhou, X., Cheng, X., Yang, Y., Bao, Y., Wang, L., and Gu, Q. Decompopt: Controllable and decomposed diffusion models for structure-based molecular optimization. arXiv preprint arXiv:2403.13829, 2024. + +# A. Complete Derivation of BFN-DPO + +Given a preference molecular dataset as $\mathcal{D} = \{(\mathbf{p},\mathbf{m}^w,\mathbf{m}^l)\}$ where $\mathbf{p}$ is the target proteins and $\mathbf{m}^w, \mathbf{m}^l$ are winning-losing pair of molecules based on pre-computed rewards. With the similar argument used in Diffusion-DPO, one can define an objective for BFN over the entire timesteps as: + +$$ +\begin{array}{l} L _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} _ {\mathbf {m} ^ {w}, \mathbf {m} ^ {l}, \mathbf {p} \sim \mathcal {D}} \log \sigma \left(\beta \mathbb {E} _ {p _ {\phi} \left(\mathbf {m} _ {1: T} ^ {w} \mid \mathbf {m} ^ {w}\right) p _ {\phi} \left(\mathbf {m} _ {1: T} ^ {l} \mid \mathbf {m} ^ {l}\right)} \left[ \log \frac {p _ {\phi} \left(\mathbf {m} _ {1 : T} ^ {w}\right)}{p _ {\text {r e f}} \left(\mathbf {m} _ {1 : T} ^ {w}\right)} - \log \frac {p _ {\phi} \left(\mathbf {m} _ {1 : T} ^ {l}\right)}{p _ {\text {r e f}} \left(\mathbf {m} _ {1 : T} ^ {l}\right)} \right]\right) (13) \\ = - \mathbb {E} _ {\mathbf {m} ^ {w}, \mathbf {m} ^ {l}, \mathbf {p} \sim \mathcal {D}} \log \sigma \left(\beta \mathbb {E} _ { \begin{array}{c} p _ {\phi} (\mathbf {m} _ {1: T} ^ {w} | \mathbf {m} ^ {w}, \theta_ {0: T - 1} ^ {w}) p _ {\phi} (\theta_ {0: T - 1} ^ {w} | \mathbf {m} ^ {w}), \\ p _ {\phi} (\mathbf {m} _ {1: T} ^ {l} | \mathbf {m} ^ {l}, \theta_ {0: T - 1} ^ {l}) p _ {\phi} (\theta_ {0: T - 1} ^ {l} | \mathbf {m} ^ {l}) \end{array} } \left[ \log \frac {p _ {\phi} (\mathbf {m} _ {1 : T} ^ {w})}{p _ {\text {r e f}} (\mathbf {m} _ {1 : T} ^ {w})} - \log \frac {p _ {\phi} (\mathbf {m} _ {1 : T} ^ {l})}{p _ {\text {r e f}} (\mathbf {m} _ {1 : T} ^ {l})} \right]\right) (14) \\ = -\mathbb{E}_{\mathbf{m}^{w},\mathbf{m}^{l},\mathbf{p}\sim \mathcal{D}}\log \sigma \Bigg(\beta \mathbb{E}_{\substack{p_{\phi}(\mathbf{m}_{1:T}^{w}|\mathbf{m}^{w},\theta_{0:T - 1}^{w})\\ p_{\phi}(\theta_{0:T - 1}^{w}|\mathbf{m}^{w})\\ p_{\phi}(\mathbf{m}_{1:T}^{l}|\mathbf{m}^{l},\theta_{0:T - 1}^{l})\\ p_{\phi}(\theta_{0:T - 1}^{l}|\mathbf{m}^{l})}}\Bigg[\log \frac{p_{\phi}(\mathbf{m}_{1:T}^{w}|\theta_{0:T - 1}^{w})p_{\phi}(\theta_{0:T - 1}^{w}|\mathbf{m}^{w})}{p_{\mathrm{ref}}(\mathbf{m}_{1:T}^{w}|\theta_{0:T - 1}^{w})p_{\phi}(\theta_{1:T - 1}^{w}|\mathbf{m}^{w}) \\ \left. - \log \frac {p _ {\phi} \left(\mathbf {m} _ {1 : T} ^ {l}\right) p _ {\phi} \left(\theta_ {1 : T - 1} ^ {l} \mid \mathbf {m} ^ {l}\right)}{p _ {\text {r e f}} \left(\mathbf {m} _ {1 : T} ^ {l}\right) p _ {\phi} \left(\theta_ {0 : T - 1} ^ {l} \mid \mathbf {m} ^ {l}\right)} \right]\left. \right) (15) \\ = - \mathbb {E} _ {\mathbf {m} ^ {w}, \mathbf {m} ^ {l}, \mathbf {p} \sim \mathcal {D}} \log \sigma \left(\beta \mathbb {E} _ { \begin{array}{c} p _ {S} \left(\mathbf {m} _ {t} ^ {w} \mid \mathbf {m} ^ {w}, \alpha_ {t}\right) p _ {F} \left(\theta_ {t - 1} ^ {w} \mid \mathbf {m} ^ {w}\right) \\ p _ {S} \left(\mathbf {m} _ {t} ^ {l} \mid \mathbf {m} ^ {l}, \alpha_ {t}\right) p _ {F} \left(\theta_ {t - 1} ^ {l} \mid \mathbf {m} ^ {l}\right) \end{array} } \left[ \sum_ {t = 1} ^ {T} \left(\log \frac {p _ {\phi} \left(\mathbf {m} _ {t} ^ {w} \mid \theta_ {t - 1} ^ {w}\right)}{p _ {\text {r e f}} \left(\mathbf {m} _ {t} \mid \theta_ {t - 1} ^ {w}\right)} - \log \frac {p _ {\phi} \left(\mathbf {m} _ {t} ^ {l} \mid \theta_ {t - 1} ^ {l}\right)}{p _ {\text {r e f}} \left(\mathbf {m} _ {t} \mid \theta_ {t - 1} ^ {l}\right)}\right) \right]\right) + C, \\ \end{array} +$$ + +where we approximate the intractable $p_{\phi}(\theta|\mathbf{m}^w)$ via Bayesian flow distribution $p_F$ and $p_{\phi}(\mathbf{m}_{1:T}^w \mid \mathbf{m}^w, \theta_{0:T-1}^w)$ via the sender distribution. We omit the conditioning on the proteins $\mathbf{p}$ for brevity. + +By applying Jensen's inequality and dropping constant, we have + +$$ +L _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} _ {\substack {\mathbf {m} ^ {w}, \mathbf {m} ^ {l}, \mathbf {p} \sim \mathcal {D}, t \sim U (1, T), \\ p _ {F} \left(\theta_ {i} ^ {w} \mid \mathbf {m} ^ {w}\right), p _ {F} \left(\theta_ {i} ^ {l} \mid \mathbf {m} ^ {l}\right)}} \log \sigma \left(\beta T \mathbb {E} _ {\substack {p _ {S} \left(\mathbf {m} _ {i} ^ {w}\right) \\ p _ {S} \left(\mathbf {m} _ {i} ^ {l}\right)}} \left[ \left(\log \frac {p _ {\phi} \left(\mathbf {m} _ {i} ^ {w} \mid \theta_ {i - 1} ^ {w}\right)}{p _ {\text {ref}} \left(\mathbf {m} _ {i} ^ {w} \mid \theta_ {i - 1} ^ {w}\right)} - \log \frac {p _ {\phi} \left(\mathbf {m} _ {i} ^ {l} \mid \theta_ {i - 1} ^ {l}\right)}{p _ {\text {ref}} \left(\mathbf {m} _ {i} ^ {l} \mid \theta_ {i - 1} ^ {l}\right)}\right) \right]\right) \tag{17} +$$ + +Expanding the equation further gives us + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} \Big [ \log \sigma \Big (- \beta T \Big (\mathbb {D} _ {\mathrm {K L}} \big (p _ {S} (\mathbf {m} _ {t} ^ {w} \mid \mathbf {m} ^ {w}) \mid p _ {\phi} \left(\mathbf {m} _ {t} ^ {w} \mid \theta_ {t - 1} ^ {w}\right) - \mathbb {D} _ {\mathrm {K L}} \big (p _ {S} (\mathbf {m} _ {t} ^ {w} \mid \mathbf {m} ^ {w}) \mid p _ {\text {r e f}} (\mathbf {m} _ {t} ^ {w} \mid \theta_ {t - 1} ^ {w}) \Big) \\ \left.\left. - \mathbb {D} _ {\mathrm {K L}} \left(p _ {S} \left(\mathbf {m} _ {t} ^ {l} \mid \mathbf {m} ^ {l}\right) \mid p _ {\phi} \left(\mathbf {m} _ {t} ^ {l} \mid \theta_ {t - 1} ^ {l}\right)\right) + \mathbb {D} _ {\mathrm {K L}} \left(p _ {S} \left(\mathbf {m} _ {t} ^ {l} \mid \mathbf {m} ^ {l}\right) \mid p _ {\text {r e f}} \left(\mathbf {m} _ {t} ^ {l} \mid \theta_ {t - 1} ^ {l}\right)\right)\right)\right)\left. \right]. \tag {18} \\ \end{array} +$$ + +The latent parameters $\theta_{t} = [\theta_{t}^{\mathbf{x}},\theta_{t}^{\mathbf{v}}]$ , from which the noisy samples $\mathbf{m}_t = [\mathbf{x}_t,\mathbf{v}_t]$ are drawn with the noise factors $\alpha_{t} = [\alpha_{t}^{\mathbf{x}},\alpha_{t}^{\mathbf{v}}]$ , are assumed to follow distinct continuous distributions for each atom coordinates $\mathbf{x}$ and atom types $\mathbf{v}$ . With the neural network $\Phi$ representing the predicted atom coordinates and types as $[\Phi^{\mathbf{x}},\Phi^{\mathbf{v}}]$ , we can reformulate each of the above KL divergence terms as: + +$$ +\begin{array}{l} \mathbb {D} _ {\mathrm {K L}} \left(p _ {S} (\mathbf {m} _ {t} \mid \mathbf {x}) \mid p (\mathbf {m} _ {t} \mid \theta_ {t - 1})\right) \\ = \mathbb {D} _ {\mathrm {K L}} ^ {\mathbf {x}} \left(p _ {S} \left(\mathbf {x} _ {t} \mid \mathbf {x}\right) \mid p \left(\mathbf {x} _ {t} \mid \theta_ {t - 1} ^ {\mathbf {x}}\right)\right) + \mathbb {D} _ {\mathrm {K L}} ^ {\mathbf {v}} \left(p _ {S} \left(\mathbf {v} _ {t} \mid \mathbf {v}\right) \mid p \left(\mathbf {v} _ {t - 1} \mid \theta_ {t - 1} ^ {\mathbf {v}}\right)\right) (19) \\ = \frac {\alpha_ {t} ^ {\mathbf {x}}}{2} \| \mathbf {x} - \Phi^ {\mathbf {x}} (\theta) \| ^ {2} + \left(\log p _ {S} \left(\mathbf {v} _ {t} \mid \mathbf {v}, \alpha_ {t} ^ {\mathbf {v}}\right) - \log p _ {R} \left(\mathbf {v} _ {t} \mid \Phi^ {\mathbf {v}} \left(\theta_ {t - 1}\right), \alpha_ {t} ^ {\mathbf {v}}\right)\right). (20) \\ \end{array} +$$ + +As a result, we can show that the objective can be represented as a summation of the atom coordinates and atom type preference losses as follows: + +$$ +\mathcal {L} _ {\mathrm {B F N - D P O}} (\phi) = - \mathbb {E} _ {(\mathbf {p}, \mathbf {m} ^ {w}, \mathbf {m} ^ {l}) \sim \mathcal {D}, t \sim [ 0, T ], \theta_ {t} ^ {w} \sim p _ {F} (\cdot | \mathbf {m} _ {t} ^ {w}, \mathbf {p}; t), \theta_ {t} ^ {l} \sim p _ {F} (\cdot | \mathbf {m} _ {t} ^ {l}, \mathbf {p}; t)} \left[ \mathcal {L} _ {t - 1} ^ {\mathbf {x}} + \mathcal {L} _ {t - 1} ^ {\mathbf {v}} \right]. \tag {21} +$$ + +The atom coordinates loss is designed to directly train the model output $\Phi_0^{\mathbf{x}}(\theta_t^{\mathbf{x}})$ to approximate the clean coordinate values $\mathbf{x}_0$ . The concentration parameter $\alpha$ for each time $t$ is multiplied during training: + +$$ +\begin{array}{l} \mathcal{L}^{\mathbf{x}} = \operatorname *{-}\mathbb{E}_{\substack{(\mathbf{p},\mathbf{x}^{w},\mathbf{x}^{l})\sim \mathcal{D},t\sim [0,T],\\ \theta_{t}^{\mathbf{x},w}\sim p_{F}(\cdot |\mathbf{x}_{t}^{w},\mathbf{p};t),\theta_{t}^{\mathbf{x},l}\sim p_{F}(\cdot |\mathbf{x}_{t}^{l},\mathbf{p};t)}}\left[\log \sigma \Big(-\beta T\Big(\frac{\alpha_{t}^{\mathbf{x}}}{2}\Big)\Big(\| \mathbf{x}^{w} - \Phi_{\phi}^{\mathbf{x}}(\theta_{t - 1}^{\mathbf{x},w})\|^{2}- \| \mathbf{x}^{w} - \Phi_{\mathrm{ref}}^{\mathbf{x}}(\theta_{t - 1}^{\mathbf{x},w})\|^{2}\right) \\ \left.\left. - \| \mathbf {x} ^ {l} - \Phi_ {\phi} ^ {\mathbf {x}} \left(\theta_ {t - 1} ^ {\mathbf {x}, l}\right) \| ^ {2} + \| \mathbf {x} ^ {l} - \Phi_ {\mathrm {r e f}} ^ {\mathbf {x}} \left(\theta_ {t - 1} ^ {\mathbf {x}, l}\right) \| ^ {2}\right)\right)\left. \right]. \tag {22} \\ \end{array} +$$ + +Similarly, the atom types loss is designed to directly train the model output $\Phi^{\mathbf{v}}(\theta_t^{\mathbf{v}})$ to approximate the clean atom types $\mathbf{v}$ , which is the $N_{\mathcal{M}} \times K$ matrix with each row as $K$ -dimensional one-hot vector: + +$$ +\begin{array}{l} \mathcal {L} ^ {\mathbf {v}} = \underset { \begin{array}{c} (\mathbf {p}, \mathbf {v} ^ {w}, \mathbf {v} ^ {l}) \sim \mathcal {D}, t \sim [ 0, T ], \\ \theta_ {t - 1} ^ {\mathbf {v}, w} \sim p _ {F} (\cdot | \mathbf {v} ^ {w}, \mathbf {p}, t), \theta_ {t - 1} ^ {\mathbf {v}, l} \sim p _ {F} (\cdot | \mathbf {v} ^ {l}, \mathbf {p}, t) \end{array} } {- \mathbb {E}} \left[ \log \sigma \Big (- \beta T \left(\left(\ln p _ {S} (\cdot | \mathbf {v} ^ {w}, \alpha_ {t} ^ {\mathbf {v}}) - \ln p _ {R} (\cdot | \Phi_ {\phi} ^ {\mathbf {v}} (\theta_ {t - 1} ^ {\mathbf {v}, w}))\right) \right. \right. \\ - \left(\ln p _ {S} (\cdot | \mathbf {v} ^ {w}, \alpha_ {t} ^ {\mathbf {v}}) - \ln p _ {R} (\cdot | \Phi_ {\text {r e f}} ^ {\mathbf {v}} (\theta_ {t - 1} ^ {\mathbf {v}, w}))\right) \\ \left. - \left(\ln p _ {S} \left(\cdot | \mathbf {v} ^ {l}, \alpha_ {t} ^ {\mathbf {v}}\right) - \ln p _ {R} \left(\cdot | \Phi_ {\phi} ^ {\mathbf {v}} \left(\theta_ {t - 1} ^ {\mathbf {v}, l}\right)\right)\right) \right. \\ \left. \left. + \left(\ln p _ {S} \left(\cdot | \mathbf {v} ^ {l}, \alpha_ {t} ^ {\mathbf {v}}\right) - \ln p _ {R} \left(\cdot | \Phi_ {\text {r e f}} ^ {\mathbf {v}} \left(\theta_ {t - 1} ^ {\mathbf {v}, l}\right)\right)\right)\right) \right]. \tag {23} \\ \end{array} +$$ + +# B. Implementaton Details + +# B.1. SE-(3) Equivariant Network + +To model the interaction between ligand and protein pocket atoms, we employ an SE(3)-equivariant network, PosNet3D (Guan et al., 2022), as the foundational architecture $\Phi$ in the receiver distribution. A protein-ligand graph is initially constructed by performing a $k$ -nearest neighbor search on the atomic coordinates, represented as $G = \langle V, E \rangle$ . At each layer, the atomic hidden states $\mathbf{h}^l$ and coordinates $\mathbf{x}^l$ are iteratively updated as follows: + +$$ +\mathbf {h} _ {i} ^ {l + 1} = \mathbf {h} _ {i} ^ {l} + \sum_ {j \in N _ {G} (i)} \phi_ {h} \left(d _ {i j}, \mathbf {h} _ {i} ^ {l}, \mathbf {h} _ {j} ^ {l}, e _ {i j}, t\right) +$$ + +$$ +\Delta \mathbf {x} _ {i} = \sum_ {j \in N _ {G} (i)} \left(\mathbf {x} _ {j} ^ {l} - \mathbf {x} _ {i} ^ {l}\right) \phi_ {x} \left(d _ {i j}, \mathbf {h} _ {i} ^ {l + 1}, \mathbf {h} _ {j} ^ {l + 1}, e _ {i j}, t\right) +$$ + +$$ +\mathbf {x} _ {i} ^ {l + 1} = \mathbf {x} _ {i} ^ {l} + \Delta \mathbf {x} _ {i} \cdot \mathbf {1} _ {m o l} +$$ + +where $N_G(i)$ represents the neighborhood of atom $i$ in graph $G$ , while $\mathbf{h}_i, \mathbf{x}_i$ and $\mathbf{h}_j, \mathbf{x}_j$ denote the hidden states and coordinates of atoms $i$ and $j$ , respectively. The term $d_{ij}^l$ represents the Euclidean distance between atoms $i$ and $j$ , and $e_{ij}$ indicates whether the interaction is between protein atoms, ligand atoms, or a combination of both. The indicator function $\mathbf{1}_{mol}$ ensures that only ligand atom positions are updated. The functions $\phi_h$ and $\phi_x$ act as attention mechanisms, utilizing $\mathbf{h}_i^l$ as a query and $[\mathbf{h}_i^l, \mathbf{h}_j^l, e_{ij}]$ as keys and values. + +For the initial layer, the atomic positions and hidden states are initialized as $\mathbf{x}^0 = [\pmb{\mu},\mathbf{x}_{\mathcal{P}}]$ and $\mathbf{h}^0 = \mathrm{linear}(\theta^v,\mathbf{v}_P,t)$ . In the final layer, the network produces an estimation $\hat{\mathbf{x}} = \Phi^{\mathbf{x}}$ . Additionally, for the discrete variable $\mathbf{v}^{(d)}$ , the function $\Phi$ applies a softmax operation to yield the probability distribution: + +$$ +\hat {\mathbf {v}} ^ {(d)} = \operatorname {s o f t m a x} \left(\left(\boldsymbol {\Phi} ^ {\mathbf {v}}\right) ^ {(d)}\right). +$$ + +# B.2. Data Featurization + +Each protein atom is characterized by multiple features to effectively capture its structural and biochemical properties. These features include a one-hot encoded element identifier (comprising H, C, N, O, S, and Se) to specify the atomic type, a one-hot encoded amino acid type indicator of 20 dimensions to classify the amino acid identity, a binary flag to distinguish backbone atoms, and a one-hot encoded arm/scaffold region indicator that designates whether the atom is part of an arm or scaffold region based on its spatial proximity to the arm prior center. + +Similarly, ligand atoms are represented using a one-hot encoded element type indicator (spanning C, N, O, F, P, S, and Cl) and a one-hot encoded arm/scaffold indicator to differentiate between aromatic and non-aromatic atoms. + +For efficient message passing within the protein-ligand complex, two dynamically constructed graphs are employed: a k-nearest neighbors (k-NN) graph linking ligand and protein atoms and a fully connected graph for ligand atoms. The edge features in the k-NN graph are derived from the outer products of the distance embeddings, which are computed via radial basis function expansion, and a four-dimensional one-hot encoded edge type vector that classifies different types of atomic interactions. In contrast, the ligand graph represents ligand bonds through a one-hot encoded bond type vector, which categorizes bond types as non-bonded, single, double, triple, or aromatic. + +Following the existing work (Guan et al., 2023), proteins and ligands are represented through atomic coordinates alongside one-hot encoded atomic type vectors. Protein atoms are characterized by a one-hot encoded vector distinguishing among 20 amino acid types, while ligand atoms are encoded using a one-hot vector that identifies various elements, including H, C, N, O, F, P, S, and Cl. Additionally, a binary flag is incorporated to distinguish between protein and ligand atoms. To further refine these representations, two separate single-layer multi-layer perceptrons (MLPs) are applied, each mapping the input features into a 128-dimensional latent space, ensuring a compact yet informative feature embedding for subsequent computational processing. + +# B.3. Preference Pair Generation + +For each protein binding site, we initially generate ten molecular candidates from the pretrained model. The reward for each synthesized molecule is then evaluated based on a user-defined reward function specific to the corresponding binding site. To construct preference data, we identify a lower-performing sample with a comparatively lower reward and establish a preference ranking. The detailed procedure for reward computation and preference selection is provided in Section 4.2. + +# B.4. Model Hyperparameters + +For the SE(3)-equivariant network, we utilize k-nearest neighbors (kNN) graphs with a 32-nearest neighbor search to construct the graph. The model consists of nine layers, each with a hidden dimension of 128, employing a 16-head attention mechanism. ReLU activation functions are used in conjunction with Layer Normalization (Ba et al., 2016) to enhance stability and performance. + +Regarding the noise schedules, we set the parameters as follows: $\beta_{1} = 1.5$ for atom types and $\sigma_{1} = 0.03$ for atom coordinates. The model is trained using a discrete-time loss function over 1000 training steps. + +For pretraining, we adopt the same architecture as MolCRAFT, which is based on Bayesian Flow Networks (Graves et al., 2023). + +For finetuning, we employ the Adam optimizer with a learning rate of 0.005 and a batch size of 32. Additionally, an exponential moving average (EMA) of model parameters is maintained with a decay factor of 0.999. Training converges within two epochs on a single RTX 4090 GPU, requiring approximately six hours for completion. For sampling, we generate 100 sample steps using a noise-reduced sampling strategy. + +To ensure a higher value corresponds to a better reward across different metrics, we use a transformation function in Equation (10) as normalizing each rewards. + +$$ +\hat {r} _ {i} ^ {(j)} = \frac {\exp \big (f _ {j} (r _ {i} ^ {(j)}) \big)}{\sum_ {b = 1} ^ {B} \exp \big (f _ {j} (r _ {b} ^ {(j)}) \big)} +$$ + +$$ +f _ {j} (r) = \left\{ \begin{array}{l l} - r, & \text {i f j c o r r e s p o n d s t o t h e V i n a D o c k}, \\ \frac {1 0}{r}, & \text {i f j c o r r e s p o n d s t o s t r a i n e n e r g y}, \\ r, & \text {i f j c o r r e s p o n d s t o Q E D}. \end{array} \right. +$$ + +where $r_i^{(j)}$ is the $j$ -th reward for the $i$ -th molecule, and $f_j(\cdot)$ is a simple transformation function to ensure each reward is reasonable. This maps each reward to the $(0,1)$ interval, ensuring that distinct reward signals become comparable despite inherently different numerical ranges. We set $\gamma = 0.4$ in Equation (11) + +# B.5. Computation Time + +We report the time required for one epoch of pretraining and fine-tuning our model, comparing it to the AliDiff baseline trained with DPO. To measure the computation time, we use the official source code provided by the author and run the code on a single NVIDIA A6000 GPU. + +Table 4. Time needed for training per one epoch (in seconds) + +
ModelPretrainingFinetuning only
AliDiff (DPO with diffusion model)7461.7322,884
Ours (DPO with BFN model)5695.4016,354
+ +This shows applying DPO to a pre-trained model takes 16,354 seconds with our method per one epoch, compared to 22,884 seconds for AliDiff, representing a $28.5\%$ reduction. Our approach does not significantly increase overall training time; however, obtaining rewards from an external tool can be time-consuming. To address this, we preprocess and store rewards in advance, but this requires an offline DPO framework. A promising future direction for SBDD is reducing reliance on external tools, enabling a more iterative and efficient online training loop. \ No newline at end of file diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/images.zip b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c1b4a339425b3b5a6d411e64c3a935e054f32eb2 --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:856c9f8981b7582057a8cc04b06c0a8f5cacf13ce8c88c4bb3ab1dbaf2922885 +size 839302 diff --git a/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/layout.json b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9d8c87ba361d4ff23f12fa9416a11e947d2e8307 --- /dev/null +++ b/ICML/2025/Enhancing Ligand Validity and Affinity in Structure-Based Drug Design with Multi-Reward Optimization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2e0e76417f5fe036b2285166501c287726fab11048f6828ea6008c825bd2f84 +size 512129 diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_content_list.json" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_content_list.json" new file mode 100644 index 0000000000000000000000000000000000000000..e5d6770508a7cc1297387e796f76a780d7784a33 --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_content_list.json" @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc843cb132bf309887b84a260011b7dfa2418dc8833b9bb54b005d8012c64f85 +size 123264 diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_model.json" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_model.json" new file mode 100644 index 0000000000000000000000000000000000000000..fec3a68170a2ca333c17dad6faebe525ac785b2d --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_model.json" @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b89ff57b7e4457a547c90605d95d3da4cd049ed1c7a5388727fa33662bab5010 +size 145588 diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_origin.pdf" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_origin.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..ace15f327e16b205e11881d9a9d43dba9e528124 --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/afa85aa2-716f-44e3-b7ee-d01591de9515_origin.pdf" @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2029f650f7e13bc80d96e63c61d4807067d73e1d0491631fa31a5ef2f30241a0 +size 3447845 diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/full.md" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/full.md" new file mode 100644 index 0000000000000000000000000000000000000000..5838275a813597b7aaa726804054363bedda61b3 --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/full.md" @@ -0,0 +1,598 @@ +# Yuchen Guan\*1 Runxi Cheng\*1 Kang Liu 1 Chun Yuan + +# Abstract + +Knowledge distillation typically minimizes the Kullback-Leibler (KL) divergence between teacher and student logits. However, optimizing the KL divergence can be challenging for the student and often leads to sub-optimal solutions. We further show that gradients induced by KL divergence scale with the magnitude of the teacher logits, thereby diminishing updates on low-probability channels. This imbalance weakens the transfer of inter-class information and in turn limits the performance improvements achievable by the student. To mitigate this issue, we propose a plug-and-play auxiliary ranking loss based on Kendall's $\tau$ coefficient that can be seamlessly integrated into any logit-based distillation framework. It supplies inter-class relational information while rebalancing gradients toward low-probability channels. We demonstrate that the proposed ranking loss is largely invariant to channel scaling and optimizes an objective aligned with that of KL divergence, making it a natural complement rather than a replacement. Extensive experiments on CIFAR-100, ImageNet, and COCO datasets, as well as various CNN and ViT teacher-student architecture combinations, demonstrate that our plug-and-play ranking loss consistently boosts the performance of multiple distillation baselines. Code is available at https://github.com/OvernighTea/RankingLoss-KD + +# 1. Introduction + +The recent advancements in deep neural networks (DNN) have significantly enhanced performance in the field of computer vision. However, the heightened computational and + +*Equal contribution ${}^{1}$ Tsinghua Shenzhen International Graduate School, Tsinghua University, Shenzhen, China. Correspondence to: Kang Liu $<$ liuk22@mails.tsinghua.edu.cn>, Chun Yuan $<$ yuanc@sz.tsinghua.edu.cn>. + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/1f1b2439fa7fcf0724b0b82d4fac0fa76c4a31d85f723cb116387c8f1e4d12c5.jpg) +Figure 1. Suboptimal Case of the KL Divergence. + +storage costs associated with complex networks limit their applicability. To address this, knowledge distillation (KD) has been proposed to obtain performant lightweight models. Typically, knowledge distillation involves a well-trained heavy teacher model and an untrained lightweight student model. The same data is fed to both the teacher and the student, with the teacher's outputs serving as soft labels for training the student. By constraining the student to produce predictions that match the soft labels, the knowledge in the teacher model is transferred to the lightweight student model. + +Most logit-based KD methods adhere to the paradigm introduced by Hinton (Hinton et al., 2015), employing the Kullback-Leibler (KL) divergence (Kullback & Leibler, 1951) to align the logits output by the student and teacher models: + +$$ +\mathcal {L} _ {K L} \left(q ^ {t} \| q ^ {s}\right) = \sum_ {i = 1} ^ {C} q _ {i} ^ {t} \cdot \log \left(\frac {q _ {i} ^ {t}}{q _ {i} ^ {s}}\right). \tag {1} +$$ + +Where $q_{t}, q_{s} \in \mathbb{R}^{1 \times C}$ is the prediction vectors of teacher and student. The optimization goal of KL divergence is to achieve identical outputs between the student and teacher, thereby transferring as much knowledge as possible from the teacher to the student. However, the optimization process of KL divergence is not easy, as it is prone to suboptimal points, which can hinder further improvement in student performance. As illustrated in Fig. 1, compared to Student 2, Student 1 exhibits a smaller KL divergence with the teacher; however, Student 2 achieves the correct classification result + +![](images/605841a0222cfb9fbb3715ffd5b6db944595c4d2cfe285aa373c6df254bccc22.jpg) +Figure 2. Most Channels in the Distribution are Low-Probability Channels. + +consistent with the teacher, while Student 1 does not. This indicates that the optimization direction of KL divergence sometimes diverges from the task objective, leading students to suboptimal points. + +Intuitively, and as a preliminary observation, Eq. 1 shows that in the KL divergence each channel is weighted by the predicted probability of the teacher. Channels with small $q_{i}^{t}$ therefore contribute marginally to the loss, causing the student to tend to largely ignore them (the formal derivation is provided in Appendix A.5). In practice, most channels in a single prediction have lower probabilities, as illustrated in Fig. 2. Neglecting these channels hampers knowledge transfer for two reasons: + +R1: Gradient attenuation. Because low-probability channels carry tiny weights, the corresponding gradients are strongly damped, which makes alignment with the teacher network difficult.. + +R2: Impaired capture of inter-class information. Low-probability channels retain rich cross-category correlation information in the teacher logits; overlooking them deprives the student of these semantic correlations. For example, in Fig. 1, Student 1 may not learn the distinction between the cat and fox classes. + +Considering these challenges, we aim to find an auxiliary method that mitigates the issues caused by channel scale differences, learns inter-class relationship information, and avoids the suboptimal points that KL divergence might encounter while maintaining the optimization objective of KL divergence. To address this problem, we propose a ranking-based plug-and-play auxiliary loss. The benefits of imposing ranking constraints are as follows: + +B1: Gradients from the ranking term depend only weakly on the absolute channel scale. +B2: Ordered channel scores make cross-category relationships explicit. + +B3: Fixing relative channel order helps the model escape suboptimal solutions. + +Therefore, we propose to constrain the channel ranking similarity between student and teacher. We construct a plug-and-play ranking loss function based on Kendall's $\tau$ Coefficient. This ranking loss can supplement the attention to low-probability channels in the logits and provide inter-class relationship information. We demonstrate that the gradients provided by KL divergence are related to channel scale, whereas the proposed ranking loss is not. We also show that the optimization objective of the proposed ranking loss is consistent with that of KL divergence, and visualize the loss landscape to illustrate that the ranking loss helps avoid suboptimal points in the early stage and does not alter the optimization objective in the end. Extensive experiments on CNN and ViT show that the proposed plug-and-play ranking loss can enhance the performance of various logit-based methods. In conclusion, our contributions are as follows: + +- We introduce a plug-and-play ranking loss for assisting knowledge distillation tasks, addressing the issues of KL divergence's neglect of low-probability channels and its tendency to fall into suboptimal points, while also learning inter-class relationship information to further enhance student performance. +- We demonstrate that the gradients provided by KL divergence exhibit sensitivity to channel scales, while the proposed ranking loss remains more robust to such variations. We also prove and visualize that the optimization objective of the proposed ranking loss is consistent with that of KL divergence and helps avoid the suboptimal points of KL divergence. +- Extensive experiments are conducted on a variety of CNN and ViT teacher-student architectures using the CIFAR-100, ImageNet, and MS-COCO datasets. Our findings confirm the widespread effectiveness of the proposed ranking loss in various distillation tasks, and its role as a plug-and-play auxiliary function provides substantial support for the training of distillation tasks. + +# 2. Related Works + +Knowledge Distillation. Knowledge distillation, initially proposed by Hinton (Hinton et al., 2015), serves as a method for model compression and acceleration, aiming to transfer knowledge from a heavy teacher model to a lightweight student model. By feeding the same samples, the teacher can produce soft labels, and training the student with these soft labels allows the transfer of knowledge from the teacher model to the student. Knowledge distillation tasks can be mainly divided into two categories: feature-based distillation (Chen et al., 2022; Zhang & Ma, 2021; Yang et al., + +2022c; Guo et al., 2023; Park et al., 2019; Yang et al., 2022b) and logit-based distillation (Hinton et al., 2015; Li et al., 2023; Zhao et al., 2022; Jin et al., 2023; Sun et al., 2024; Chi et al., 2023; Wen et al., 2021; Yang et al., 2023b). Feature-based distillation additionally utilizes the model's intermediate features, providing more information to the student and enabling the student to learn at the feature level from the teacher, often resulting in better performance. Considering safety and privacy, the intermediate outputs of the model are often not obtainable; hence, logit-based methods that only use the model outputs for distillation offer better versatility and robustness. Our proposed method can act as a plug-and-play module added to logit-based methods, offering higher flexibility and further enhancing the performance of logit-based methods. + +Recent knowledge distillation methods have found that overly strict constraints can sometimes hinder the student's transfer of knowledge from the teacher's soft labels. For instance, (Cao et al., 2022) discovered that differences in feature sizes in feature-based methods could limit the student's learning; while (Sun et al., 2024) found that using the same temperature for both teacher and student in logit-based methods could affect further improvements in student performance. To reduce the learning difficulty for the student, (Sun et al., 2024; Cao et al., 2022) provided methods to ease the logit matching difficulty between student and teacher, yet we find that methods providing additional guidance to the student have not been fully explored. + +Ranking Loss in Knowledge Distillation. For knowledge distillation, ranking loss is a relaxed constraint that can provide rich inter-class information. It was first applied in the distillation of recommendation systems (Reddi et al., 2021; Tang & Wang, 2018; Choi et al., 2021; Qin et al., 2023; Yang et al., 2022a), (Li et al., 2022) explored the application of ranking loss in object detection tasks, and (Gao et al., 2020) discussed the role of ranking in the distillation of language model tasks. However, the exploration of ranking loss in logit-based image classification task distillation is not yet comprehensive. We find that the KL divergence used for distillation in classification tasks tends to overlook information from low-probability channels and may lead to suboptimal results. Our proposed method leverages ranking loss to balance the model's attention between high-probability and low-probability channels, while also using inter-class relationships to help the model avoid suboptimal outcomes. + +# 3. Preliminary + +Most logit-based distillation methods adhere to the original KD proposed by Hinton (Hinton et al., 2015), which transfers knowledge by matching the logit outputs of the student and teacher. This setting is more generalizable, + +allowing for distillation solely through outputs when the internal structures of the student and teacher are invisible. For a given dataset $\mathcal{D}$ , assuming there are $C$ categories and $N$ samples, we possess a teacher model $f_{t}$ and a student model $f_{s}$ . For a given sample $\mathcal{I} \in \mathcal{D}$ , we can obtain the outputs of the teacher and student model, denoted as $z^{t} = f_{t}(\mathcal{I}), z^{s} = f_{s}(\mathcal{I})$ where $z^{t}, z^{s} \in \mathbb{R}^{1 \times C}$ . Through a softmax function with temperature, the outputs are processed into the prediction vectors $q_{t}, q_{s} \in \mathbb{R}^{1 \times C}$ finally: + +$$ +q _ {i} ^ {t} = \frac {\exp \left(z _ {i} ^ {t} / \mathcal {T}\right)}{\sum_ {j = 1} ^ {C} \exp \left(z _ {j} ^ {t} / \mathcal {T}\right)}, \quad q _ {i} ^ {t} = \frac {\exp \left(z _ {i} ^ {s} / \mathcal {T}\right)}{\sum_ {j = 1} ^ {C} \exp \left(z _ {j} ^ {s} / \mathcal {T}\right)} \tag {2} +$$ + +where $\mathcal{T}$ is a temperature parameter, $z_{i}$ represents the logit value of the $i$ -th channel of the model output, $q_{i}$ represents the predicted probability for the target being the $i$ -th class. The KL divergence loss function used to constrain the student and teacher logits is of the following form: + +$$ +\mathcal {L} _ {K L} \left(q ^ {t} \| q ^ {s}\right) = \sum_ {i = 1} ^ {C} q _ {i} ^ {t} \cdot \log \left(\frac {q _ {i} ^ {t}}{q _ {i} ^ {s}}\right) \tag {3} +$$ + +It can be observed that in Eq. 3, the importance of the match between the student and teacher at the $i$ -th channel is influenced by the coefficient $q_{i}^{t}$ . This implies that channels with smaller logit values receive less attention, leading to the KL divergence's disregard for smaller channels. + +# 4. Ranking Loss Based on Kendall's $\tau$ Coefficient + +In this section, we introduce the plug-and-play ranking loss function designed to constrain the ranking of channels in the logits output by the student model. With the aid of the ranking loss, the knowledge distillation task can balance the overemphasis on larger logit values and the neglect of smaller ones as measured by the KL divergence. Additionally, the ranking loss imposes a constraint on the leading channel value, which helps to correct the optimization direction and avoid suboptimal solutions. In Sec. 4.1, we will introduce the ranking loss function and employ Kendall's $\tau$ coefficient to compute the ordinal consistency between the teacher and student logits. In Sec. 4.2, we discuss how ranking loss benefits optimizing logits distillation with KL divergence. Furthermore, we discuss the differentiable form of Kendall's $\tau$ coefficient and, based on this, design three distinct forms of ranking loss functions in Appendix A.3. + +# 4.1. Differentiable Kendall's $\tau$ Coefficient + +In order to make the loss function pay more attention to the information provided by low-probability channels as well as to help correct the suboptimal problem in Fig. 1, we introduce the ranking loss based on Kendall's $\tau$ coefficient. + +By pairing each of the $C$ channels, we can obtain $\frac{C(C - 1)}{2}$ pairs, whose Kendall's $\tau$ coefficient is expressed as follows: + +$$ +\tau = \frac {P _ {c} - P _ {d}}{\frac {1}{2} C (C - 1)} \tag {4} +$$ + +where $P_{c}$ represents concordant pairs and $P_{d}$ represents discordant pairs. Kendall's $\tau$ coefficient provides an expression of ordinal similarity. For the teacher and student logits, a channel pair $(i,j)$ is considered concordant if the signs of $(z_i^t - z_j^t)$ for the teacher and $(z_i^s - z_j^s)$ for the student are the same; otherwise, the pair is discordant. We substitute the logits of the teacher and student in the following manner: + +$$ +\tau = \frac {\sum_ {i} \sum_ {j < i} \operatorname {s g n} \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) \cdot \operatorname {s g n} \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)}{\frac {1}{2} C (C - 1)} \tag {5} +$$ + +where $\text{sgn}()$ represents sign function. While we have quantified the ordinal similarity between the teacher and student logits, the aforementioned formula is non-smooth. To utilize the ordinal similarity for gradient computation, we approximate the sign function with the tanh function to convert it into a differentiable form: + +$$ +\begin{array}{l} \tau_ {d} = \frac {\sum_ {i} \sum_ {j < i} \tanh (k \cdot (z _ {i} ^ {t} - z _ {j} ^ {t})) \cdot \tanh (k \cdot (z _ {i} ^ {s} - z _ {j} ^ {s}))}{\frac {1}{2} C (C - 1)} \\ = \frac {2}{C (C - 1)} \cdot \sum_ {i} \sum_ {j < i} \left(1 - \frac {2}{1 + e ^ {2 \cdot (z _ {i} ^ {t} - z _ {j} ^ {t}) \cdot k}}\right). \\ \left(1 - \frac {2}{1 + e ^ {2 \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right) \cdot k}}\right) \tag {6} \\ \end{array} +$$ + +where $k$ is a parameter that controls the steepness of the function; a larger $k$ causes the tanh function to more closely approximate the sign function. By negating the similarity measure in Eq. 6, it can serve as a loss function (bounded within $[-1,1]$ ) to enforce the consistency of the logits order between the teacher and student: + +$$ +\mathcal {L} _ {R K} = - \tau_ {d} \tag {7} +$$ + +The overall loss function is formulated as follows: + +$$ +\mathcal {L} = \alpha \mathcal {L} _ {K L} + \beta \mathcal {L} _ {C E} + \gamma \mathcal {L} _ {R K} \tag {8} +$$ + +where $\mathcal{L}_{KL}$ denotes KL divergence loss, $\mathcal{L}_{CE}$ denotes Cross-Entropy loss, $\mathcal{L}_{RK}$ denotes our ranking loss, and $\alpha, \beta, \gamma$ are hyper-parameters. + +# 4.2. How Ranking Loss Benefits Optimizing Logits Distillation with KL Divergence + +# 4.2.1. FROM THE PERSPECTIVE OF GRADIENT: RANKING LOSS CARES ABOUT LOW-PROBABILITY CHANNELS + +In this section, we analyze why ranking loss cares about low-probability channels. The gradient of KL divergence and + +![](images/6d996166169416a6aacda7279ed715322f343003ccb1c124e03326753b3fb70a.jpg) +Figure 3. The Gradient of Ranking Loss and KL Divergence for Different Values of Logits. + +![](images/77c91eb758cf0ccf240e299b052aea79831cb6b72c1c5e1bac9fc02d503d749f.jpg) + +ranking loss is written as follows. The specific calculation process of the gradient can be found in the appendix A.5: + +$$ +\frac {\partial \mathcal {L} _ {\mathrm {K D}}}{\partial z _ {i} ^ {s}} = - T \left(q _ {i} ^ {t} - q _ {i} ^ {s}\right). \tag {9} +$$ + +$$ +\begin{array}{l} \frac {\partial \mathcal {L} _ {R K}}{\partial z _ {i} ^ {s}} = - \frac {k}{C (C - 1)} \sum_ {j \neq i} \left[ 1 - \tanh ^ {2} \left(k (z _ {i} ^ {s} - z _ {j} ^ {s})\right) \right]. \\ \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \tag {10} \\ \end{array} +$$ + +The gradient scale of the KL divergence is influenced by the scales of the teacher and student models. Consequently, for outputs from low-probability channels, when the scales of the teacher and student are similar, the KL divergence's gradient for these components becomes negligible, leading to the neglect of information from low-probability channels. Although temperature scaling is typically employed to address this issue, it uniformly amplifies the gradients of all logits, thereby continuing to overlook the outputs of low-probability channels. In contrast, the gradients produced by ranking loss will be less affected by the scale of the teacher's logits. The gradient of a logit channel primarily depends on the difference between its rank and the target rank, effectively harnessing the knowledge from low-probability channels. Therefore, In the early stage of training, ranking loss helps the model quickly learn the overall ranking of the teacher model, which helps the model converge to a better initial solution faster. + +In our study, we conduct a visualization of the gradients associated with both the ranking loss and the KL divergence loss in Fig .3. The logits of the student model are randomly generated but maintain the same scale as those of the teacher model across each channel. Our findings indicate that the ranking loss consistently provides gradients of similar scale across varying logit values, whereas the gradients from the KL loss are heavily dependent on the specific logit values. This suggests that the ranking loss offers a more uniform attention distribution across different logits compared to the KL loss. Notably, the ranking loss assigns low-probability gradients to logits with larger values, as they are the clas + +Table 1. CIFAR-100 Heterogeneous Architecture Results. The Top-1 Accuracy (%) is reported as the evaluation metric. The teacher and student have heterogeneous architectures. We incorporate the proposed ranking loss into the existing logit-based methods, with the performance gains indicated in parentheses. The best and second best results are emphasized in bold and underlined. + +
KDTeacherResNet32×4ResNet32×4ResNet50ResNet32×4WRN-40-2
79.4279.4279.3479.4275.61
StudentWRN-16-2WRN-40-2MN-V2SHN-V1SHN-V1
73.2675.6164.6070.5070.50
FitNet (Adriana et al., 2015)74.7077.6963.1673.5973.73
CRD (Tian et al., 2019)75.6578.1569.1175.1176.05
ReviewKD (Chen et al., 2021)76.1178.9669.8977.4577.14
DIST (Huang et al., 2022)75.5878.0268.6676.3476.00
LSKD (Sun et al., 2024)77.5379.6671.1976.4876.93
KD (Hinton et al., 2015)74.977.767.3574.0774.83
KD+Ours75.18(+0.28)78.50(+0.80)70.45(+3.10)75.98(+1.91)76.13(+1.30)
CTKD (Li et al., 2023)74.5777.6668.6774.4875.61
CTKD+Ours75.71(+1.14)78.61(+0.95)70.18(+1.51)76.67(+2.19)76.80(+1.19)
DKD (Zhao et al., 2022)75.778.4670.3576.3576.33
DKD+Ours75.99(+0.29)78.75(+0.29)70.90(+0.55)77.36(+1.01)76.43(+0.10)
MLKD (Jin et al., 2023)76.5279.2671.0477.1877.44
MLKD+Ours76.83(+0.31)79.86(+0.60)71.66(+0.62)77.63(+0.45)77.87(+0.43)
+ +sification targets and reach the correct rank. Consequently, these logits receive less attention from the ranking loss. + +# 4.2.2. FROM THE PERSPECTIVE OF OPTIMAL SOLUTION DOMAIN: RANKING LOSS WON'T INTERFERE WITH KL DIVERGENCE AT THE END + +In this section, we analyze the optimal solution domain for Kullback-Leibler (KL) divergence and ranking loss to show how ranking loss affects the optimization process of KL divergence. For KL divergence, the optimal solution domain is achieved when the distribution of the student model aligns perfectly with that of the teacher model, which is equivalent to a linear mapping on the logits: + +$$ +q _ {i} ^ {t} = q _ {i} ^ {s} \quad \forall i \quad \Rightarrow \quad z _ {i} ^ {t} = z _ {i} ^ {s} + c \quad \forall i \tag {11} +$$ + +$q_{i}^{t}$ and $q_{i}^{s}$ respectively represent the probability outputs of the teacher and the student for the i-th class, and $c$ represents any constant number. For the ranking loss, the optimal solution domain is such that for any two indices, the order of the logits output by the teacher and the student is consistent: + +$$ +\begin{array}{l} s g n (z _ {i} ^ {t} - z _ {j} ^ {t}) \cdot s g n (z _ {i} ^ {s} - z _ {j} ^ {s}) = 1 \quad \forall i, j \\ \Longleftrightarrow \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right) > 0 \quad \forall i, j \tag {12} \\ \Longleftrightarrow z _ {i} ^ {t} = F \left(z _ {i} ^ {s}\right) \quad \forall i \quad w h e r e \quad F ^ {\prime} (x) > 0 \\ \end{array} +$$ + +It implies that the optimal solution domain for ranking loss is quite lenient and easily attainable, encompassing the optimal solution domain for KL divergence. Therefore, in the later stage of training, the ranking loss will not hinder the optimization of KL divergence, which means our ranking loss can perfectly be used as an auxiliary loss. + +# 4.2.3. FROM THE PERSPECTIVE OF CLASSIFICATION: RANKING LOSS HELPS STUDENT CLASSIFY CORRECTLY + +As illustrated in Fig. 1, using KL loss may lead to a smaller loss yet result in incorrect classification. The tendency to fall into local optima will hinder the optimization process in distillation. Although the use of cross-entropy loss can mitigate this issue, it does not incorporate information from the teacher model. Consequently, in experiments, cross-entropy loss is often assigned a very small weight, which also leads to a small gradient. For instance, KD (Hinton et al., 2015) $\mathcal{L}_{\mathrm{CE}}: \mathcal{L}_{\mathrm{KL}} = 0.1: 0.9$ ; DKD (Zhao et al., 2022) $\mathcal{L}_{\mathrm{CE}}: \mathcal{L}_{\mathrm{TCKL}}: \mathcal{L}_{\mathrm{NCKL}} = 1: 1: 8$ ; MLKD (Jin et al., 2023) $\mathcal{L}_{\mathrm{CE}}: \mathcal{L}_{\mathrm{KL}} = 0.1: 9$ ; LSKD (Sun et al., 2024) $\mathcal{L}_{\mathrm{CE}}: \mathcal{L}_{\mathrm{KL}} = 0.1: 9$ . As a result, cases with lower KL loss but incorrect classification still frequently occur. In contrast, by aligning the rank between student and teacher, ranking loss helps KL divergence avoid such suboptimal situations. Also, the ranking loss can incorporate information from the teacher model. In this way, ranking loss helps students classify correctly, avoiding the suboptimal case in logit distillation. Furthermore, a model with better generalization should have a more reasonable rank of logits. For instance, recognizing that a tiger is more similar to a cat than to a fish. By learning such inter-class relationships, the student can improve classification performance and enhance its representational capacity. + +# 5. Experiments + +Datasets. In order to validate the efficacy and robustness of our proposed method, we conduct extensive experiments + +Table 2. CIFAR-100 Homogenous Architecture Results. The Top-1 Accuracy (%) is reported as the evaluation metric. The teacher and student have homogeneous architectures. We incorporate the proposed ranking loss into the existing logit-based methods, with the performance gains indicated in parentheses. The best and second best results are emphasized in bold and underlined. + +
KDTeacherResNet32×4VGG13WRN-40-2ResNet110
79.4274.6475.6174.31
StudentResNet8×4VGG8WRN-40-1ResNet20
72.5070.3671.9869.06
FitNet (Adriana et al., 2015)73.5071.0272.2468.99
CRD (Tian et al., 2019)75.5173.9474.1471.46
ReviewKD (Chen et al., 2021)75.6374.8475.0971.34
DIST (Huang et al., 2022)76.3173.8074.7371.40
LSKD (Sun et al., 2024)78.2875.2275.5672.27
KD (Hinton et al., 2015)73.3372.9873.5470.67
KD+Ours74.74(+1.41)74.14(+1.16)74.49(+0.95)71.09(+0.42)
CTKD (Li et al., 2023)73.3973.5273.9370.99
CTKD+Ours75.59(+2.2)74.76(+1.24)74.86(+0.93)71.08(+0.09)
DKD (Zhao et al., 2022)76.3274.6874.8171.06
DKD+Ours76.61(+0.29)75.1(+0.42)74.94 (+0.13)71.84(+0.78)
MLKD (Jin et al., 2023)77.0875.1875.3571.89
MLKD+Ours77.25(+0.17)75.35(+0.17)76.08(+0.73)72.35(+0.46)
+ +on three datasets. 1) CIFAR-100 (Krizhevsky et al., 2009) is a significant dataset for image classification, comprising 100 categories, with 50,000 training images and 10,000 test images. 2) ImageNet (Russakovsky et al., 2015) is a large-scale dataset utilized for image classification, comprising 1,000 categories, with approximately 1.28 million training images and 50,000 test images. 3) MS-COCO (Lin et al., 2014) is a mainstream dataset for object detection comprising 80 categories, with 118,000 training images and 5,000 test images. + +Baselines. As a plug-and-play loss, we apply the proposed ranking loss to various logit-based methods, including KD (Hinton et al., 2015), CTKD (Li et al., 2023), DKD (Zhao et al., 2022), and MLKD (Jin et al., 2023), to verify whether it can bring performance gains to knowledge distillation methods. We also compare it with various feature-based methods, including FitNet (Adriana et al., 2015), CRD (Tian et al., 2019), and ReviewKD (Chen et al., 2021). Additionally, we compare it with other auxiliary losses and modified KL divergence methods, including DIST (Huang et al., 2022) and LSKD (Sun et al., 2024). + +Implementation Details. To ensure the robustness of the proposed plug-and-play loss without introducing excessive configurations, we maintain the same experimental settings as the baselines used (KD+Ours and KD share the same experimental setups for example). We set the batch size to 64 for CIFAR-100, 512 for ImageNet and 8 for COCO. We employ SGD (Sutskever et al., 2013) as the optimizer, with the number of epochs and learning rate settings consistent with the comparative baselines. The hyper-parameters $\alpha$ , $\beta$ + +in Eq. 6 are set to be the same as the compared baselines to maintain fairness, and $\gamma$ are set equal to $\alpha$ . We utilize 1 NVIDIA GeForce RTX 4090 to train models on CIFAR-100 and 4 NVIDIA GeForce RTX 4090 for training on ImageNet. The algorithm of our method can be found in Appendix A.4. + +Other Settings. In order to prevent the occasional gradient explosions at the start of optimization due to the too variant logits caused by random initialization of student, we add and only add normalization in ranking loss, which does not affect our fairness as a plug-and-play function. We conduct experiments about ablation of normalization in Appendix A.2, and the algorithm can be found in Appendix A.4. + +# 5.1. Main Result + +CIFAR-100 Results. In our study, we conduct a comparative analysis of Knowledge Distillation (KD) outcomes across various teacher-student (He et al., 2016; Simonyan & Zisserman, 2014; Zagoruyko & Komodakis, 2016; Zhang et al., 2018; Howard et al., 2017; Sandler et al., 2018) configurations. While Tab. 1 presents cases where the teacher and student models share the heterogeneous architecture, Tab. 2 illustrates instances of homogenous structures. Furthermore, as a plug-and-play method, we applied ranking loss in multiple logit-based distillation techniques. The incorporation of ranking loss resulted in an average improvement of $1.83\%$ in vanilla KD. In the context of existing state-of-the-art (SOTA) logits-based methods, including DKD, CTKD, and MLKD, significant gains are made. + +ImageNet Results. The results on ImageNet of KD in terms of top-1 and top-5 accuracy are compared in Tab. 3. + +Table 3. The top-1 and top-5 accuracy $(\%)$ on the ImageNet validation set. The teacher and student are ResNet50 and MN-V1 + +
ATOFDCRDKDKD+Ours
Top-169.5671.2571.3770.5071.54(+1.04)
Top-589.3390.3490.4189.8090.84(+1.04)
+ +Table 4. Knowledge Distillation for Transformer. The Top-1 Accuracy (\%) on the validation set of CIFAR-100. The Teacher model is ResNet56. + +
StudentDeiT-Tiny 65.08T2T-ViT-7 69.37PiT-Tiny 73.58PVT-Tiny 69.22
KD71.1171.7274.0372.46
KD+Ours73.25(+2.14)72.49(+0.77)74.33(+0.30)73.42(+0.96)
+ +Our proposed method can achieve consistent improvement on the large-scale dataset as well. Additional ImageNet experiments are provided in Appendix A.9 + +# 5.2. Extensions + +Knowledge Distillation for Transformer. To validate the effectiveness of our plug-and-play ranking loss on ViT and to assess its performance when facing larger teacher-student structural differences, we conduct experiments using ViT students. The experimental results indicate that the incorporation of ranking loss yields significant improvements over the conventional knowledge distillation, as shown in Tab. 4. This denotes that our proposed method is also applicable to distillation challenges predicated on transformer architectures. The implementation details of the Transformer experiments are attached in the Appendix. + +Knowledge Distillation for Object Detection. To further verify the generality of our proposed method in downstream tasks, we also conduct experiments under the setting of object detection. The results show that our proposed ranking loss can improve the performance of knowledge distillation method in object detection and achieve better performance than the same period of the feature-based object detection method, which is shown in Tab. 5. + +Ablation of Weight and Steepness Parameter. We conduct extensive ablation studies to investigate the effectiveness of ranking loss under various settings of $k$ and coefficients. Tab. 7 presents the distillation outcomes across different $k$ configurations. It is observed that a larger $k$ value yields superior performance, suggesting that the differential form of ranking loss more closely approximates the Kendall $\tau$ coefficient, thereby imparting stronger ranking knowledge. Tab. 6 delineates the performance of ranking loss under varying coefficients. This setting effectively aligns the classification outcomes of the teacher and student models, thus significantly enhancing the distillation effect. + +Table 5. Knowledge Distillation for Object Detection. All experiments are conducted on COCO2017 with the teacher as ResNet50 and the student as MobileNet-V2. + +
MethodAPAP50AP75
KD (Hinton et al., 2015)30.1350.2831.35
FitNet (Adriana et al., 2015)30.2049.8031.69
FGFI (Wang et al., 2019)31.1650.6832.92
CTKD (Li et al., 2023)31.3952.3431.35
KD+Ours31.99(+1.86)53.80(+3.52)33.37(+2.02)
+ +Ablation of Temperature. There has been extensive and detailed research on the temperature of the KL loss (e.g., CTKD(Li et al., 2023), MLKD(Jin et al., 2023), LSKD(Sun et al., 2024)), achieving significant results. Unlike these studies, our approach aims to move away from focusing on the KL divergence and instead explore plug-and-play auxiliary losses to guide the KL divergence. Therefore, in our experiments, the temperature and other parameters of the KL divergence are kept the same as those in the respective baselines (with dynamic/multi-level temperatures used in CTKD+Ours and MLKD+Ours). The proposed ranking loss does not have a temperature parameter because the temperature does not affect the order of logits. Instead, the control over the distribution can be achieved by manipulating the steepness parameter $k$ of the sign function, and ablation experiments for $k$ are shown in Tab. 7. Meanwhile, although the temperature helps control the logit distribution, additional measures are needed to prevent the KL divergence from falling into suboptimal. We conducted an ablation study on the temperature, as shown in Tab. 8. The results demonstrate that ranking loss as a plug-and-play loss can bring further improvements under multiple temperature settings. + +Comparison between Ranking loss and KL Divergence. We separately evaluate distillation with KL divergence alone and with the proposed ranking loss alone; the results are presented in Tab. 9. We observe that using the ranking loss alone achieves performance comparable to using KL divergence alone, and that combining the two objectives yields further gains. These findings substantiate the efficacy of the proposed ranking loss. + +More Experiments. Additional experiments and discus +Table 6. Ablation of Weight. The Top-1 Accuracy (\%) on the validation set of CIFAR-100. + +
TeacherResNet32×4WRN-40-2ResNet32×4ResNet50
79.4275.6179.4279.34
StudentResNet8×4WRN-40-1SHN-V2MN-V2
72.5071.9871.2864.60
KD(Baseline)73.3373.5474.4567.35
γ = 0.174.1574.1575.5269.25
γ = 0.574.8474.0776.3469.81
γ = 0.974.7474.4976.5870.45
γ = 274.6274.6577.0769.97
γ = 475.0773.6077.0570.59
γ = 674.7873.0976.9069.58
+ +![](images/1a4bc79df65bcf064177e6c12ee4924db67c7670d2f1b46400cfd7c9adc55175.jpg) +(a) + +![](images/c609a5c6dde8a7ffcb32c375246483af15254d0238fbfea6f721ac105f8f26a1.jpg) +(b) + +![](images/9b8b1c8f1638a40d26b04a2610d8ab4484bfe1efbb12abba84a9bea1f99577d2.jpg) +(c) +Figure 4. Ranking Loss using Top-K and Min-K channels. Top-1 Accuracy (\%) of Top-k/Min-k Ranking Loss. 0 and 100 on the x-axis represent KD and $\mathrm{KD + Rank}$ , respectively. + +![](images/f5626e61056710a2a9862dab107e5eb24ff8ef7f90b8322ac5973a3556bdcc12.jpg) +(d) + +Table 7. Ablation of $k$ . The Top-1 Accuracy (%) on the validation set of CIFAR-100. + +
TeacherResNet32×4WRN-40-2ResNet32×4ResNet50
79.4275.6179.4279.34
StudentResNet8×4WRN-40-1SHN-V2MN-V2
72.5071.9871.2864.60
KD(Baseline)73.3373.5474.4567.35
k=0.173.1373.7575.4768.9
k=0.574.3674.1775.7368.87
k=174.7474.4976.5870.45
k=274.7974.8777.0670.53
k=475.5674.4877.2170.81
k=675.7474.1176.1170.32
+ +Table 8. Ablation of Temperature. All experiments are conducted on CIFAR-100 with the teacher as ResNet32×4 and the student as ResNet8×4. + +
TemperatureT = 4T = 5T = 6T = 10
KD73.3373.3973.4373.55
KD+Ours73.56(+0.23)73.49(+0.10)74.36(+0.93)74.04(+0.49)
+ +sions, including Derivation of the KL Loss and Ranking Loss, Ablation of Normalization, and Different Forms of Ranking Loss, are provided in the Appendix. Please refer to the Sec. A for further details. + +# 5.3. Analysis + +Accuracy & Loss Curves with Ranking Loss. The accuracy and loss curves of KD and $\mathrm{KD + Ours}$ , as shown in Fig. 5, demonstrate how ranking loss aids in optimization. The middle figure shows that the precise alignment of KL divergence also makes channel ranking more ordered, but adding ranking loss achieves a more consistent ranking more quickly. The right figure shows that in the early stages, ranking loss accelerates the reduction of KL loss and reduces its oscillation in suboptimal regions. In the later stages, ranking loss does not interfere with KL divergence and ultimately reaches a better position. The left figure shows that with ranking loss, student achieves leading accuracy at all stages. This indicates that the addition of the ranking loss helps + +Table 9. Experiments on Combining DIST. + +
Teacher +StudentResNet32×4 +SHN-V1ResNet32×4 +WRN-40-2WRN-40-2 +SHN-V1VGG13 +VGG8WRN-40-2 +WRN-40-1
KD (Only KL)74.0777.7074.8372.9873.54
Only Ranking Loss75.6078.0475.8173.7274.00
KL+Ranking Loss75.9878.5076.1374.1474.49
+ +the model converge and achieve better generalization and performance. + +![](images/9a91756ddad704a85d5dbc34b4a9ec0a2c890967f41017546b168401ac42598f.jpg) +Figure 5. Accuracy & Loss Curves with Ranking Loss. Left: Top-1 Test Accuracy $(\%)$ Curve. Middle: Loss Curve of Ranking Loss. Right: Loss Curve of KL Divergence. + +![](images/d245c456305a3385622a33ce1422237a6bcb0af57ee15fa11e42e83e903df9c3.jpg) + +![](images/896fc0fa70192e9c7d3677c208f3f42776f9e7f695d619ceb76eac15865d8db6.jpg) + +Visualization of Loss Landscape. To further investigate the role of ranking loss in the distillation process, we visualized the loss landscapes (Li et al., 2018) of student models with and without the application of ranking loss during Knowledge Distillation (KD), as depicted in Fig. 4. It is evident that the student models distilled with ranking loss exhibit a markedly flatter loss landscape and fewer local optima compared to those without it. We hypothesize that during the optimization process, ranking loss can filter out certain local optima that, despite presenting a better overall loss performance, yield poorer classification outcomes. Consequently, ranking loss can effectively enhance the generalization performance of student models. + +Top-k & Min-k Ranking. To further validate the beneficial knowledge present in low-probability channels, we conducted comparative experiments using the top $10\%$ , top $30\%$ , top $50\%$ , and min $10\%$ , min $30\%$ , min $50\%$ channels. The experiments were performed across four combinations of homogeneous and heterogeneous teacher-student pairs, and the results are presented in Fig. 4. We observed that + +![](images/1063357110aa39fc66b05247e8a921fe66e02e957cb3eb6e32c1dd8ce4ab5559.jpg) +Figure 6. Loss Landscape. Left: The left landscape shows the suboptimal solutions in the distillation task. Right: After adding our ranking loss, the suboptimal solution is significantly reduced, as shown on the right. + +![](images/fc0d853059063d6c6397e7f195d45f6a8cdf3adac73a30df72ce2940b52d43e3.jpg) +Figure 8. Sensitivity Analysis. Left: Sensitivity of $\alpha -\gamma$ .Right: Sensitivity of $\beta -\gamma$ + +using the min-k channels achieves results similar to those obtained with top-k channels (as shown in Fig. 4(a),(b), and (c)). Additionally, in some cases, min-k channels provide even more beneficial information to aid student learning (as demonstrated in Fig. 4(d)), which indicates that the low-probability channels also contain rich knowledge. + +![](images/216767a3495b9689aac5eae3692cf815978d5df5af495e4d43602125133551ff.jpg) +Figure 7. Ranking Alignment Comparison. Left: KD. Right: KD+Ours. + +![](images/d8c4ac935dde8cde2e3bcaeb203f55aac2c389959d1f8da4b80b5798bd98e324.jpg) + +Further visualization of Ranking. We show in Fig. 3 that ranking loss balances the focus on high-probability and low-probability channels. To further illustrate the role of ranking loss, we present a visualization of the ranking results generated by KD and $\mathrm{KD + Ours}$ in Fig. 7. It can be seen that after adding ranking loss, the channels are more ordered overall, which is more obvious in the low-probability channel part. This is because KL divergence does not pay attention to sorting and neglects low-probability channels. Although the large channels in KD receive more attention, the alignment value alone cannot achieve order consistency, thus losing some knowledge. The results indicate that our approach consistently enhances channel alignment, underscoring the robustness and general applicability of our method, particularly in its focused attention on low-probability channels. + +Further Ablation Study of the Hyperparameters. To further substantiate the generalization capability and robustness of our method, we conducted comprehensive ablation studies using different combinations of coefficients. As illustrated in Fig. 8, our method consistently maintains high performance across various settings, underscoring the strong generalization ability and universal applicability of our method. + +![](images/04f2fb0359b0bd23873e86dcd6fe7541b2e0bc80a3708d5764497efe1e7e0193.jpg) + +![](images/9dc4896f16479bb03589efd4bfbc722dfb4921ac44956d04152a8666167273fd.jpg) + +# 6. Conclusion + +In this paper, we investigate the optimization process of logit distillation and identify that the Kullback-Leibler divergence tends to overlook the knowledge embedded in the low-probability channels of the output. Moreover, KL divergence does not guarantee alignment between the classification results of the student and teacher models. To address this issue, we introduce a plug-and-play ranking loss based on Kendall's $\tau$ Coefficient that encourages the student model to pay more attention to the knowledge contained within the low-probability channels, while also enforcing alignment with the teacher's predictive outcomes. We provide a theoretical analysis demonstrating that the gradients of the ranking loss are less affected by channel scale and that its optimization objective is consistent with that of KL divergence, making it an effective auxiliary loss for distillation. Extensive experiments validate that our approach significantly enhances the distillation performance across various datasets and teacher-student architectures. + +# Acknowledgements + +This work is supported by the National Key R&D Program of China (2022YFB4701400/4701402), SSTIC Grant (KJZD20230923115106012, KJZD20230923114916032, GJHZ20240218113604008), Beijing Key Lab of Networked Multimedia. + +# 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 + +Adriana, R., Nicolas, B., Ebrahimi, K. S., Antoine, C., Carlo, G., and Yoshua, B. Fitnets: Hints for thin deep nets. Proc. ICLR, 2(3):1, 2015. + +Cao, W., Zhang, Y., Gao, J., Cheng, A., Cheng, K., and Cheng, J. Pkd: General distillation framework for object detectors via pearson correlation coefficient. Advances in Neural Information Processing Systems, 35:15394-15406, 2022. +Chen, D., Mei, J.-P., Zhang, H., Wang, C., Feng, Y., and Chen, C. Knowledge distillation with the reused teacher classifier. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11933-11942, 2022. +Chen, P., Liu, S., Zhao, H., and Jia, J. Distilling knowledge via knowledge review. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5008-5017, 2021. +Cheng, R., Xiong, F., Wei, Y., Zhu, W., and Yuan, C. Whoever started the interference should end it: Guiding data-free model merging via task vectors. arXiv preprint arXiv:2503.08099, 2025. +Chi, Z., Zheng, T., Li, H., Yang, Z., Wu, B., Lin, B., and Cai, D. Normkd: Normalized logits for knowledge distillation. arXiv preprint arXiv:2308.00520, 2023. +Choi, J., Jung, E., Suh, J., and Rhee, W. Improving bi-encoder document ranking models with two rankers and multi-teacher distillation. In Proceedings of the 44th international ACM SIGIR conference on research and development in information retrieval, pp. 2192-2196, 2021. +Gao, L., Dai, Z., and Callan, J. Understanding bert rankers under distillation. In Proceedings of the 2020 ACM SIGIR on International Conference on Theory of Information Retrieval, pp. 149-152, 2020. +Guo, Z., Yan, H., Li, H., and Lin, X. Class attention transfer based knowledge distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11868-11877, 2023. +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. +Heo, B., Kim, J., Yun, S., Park, H., Kwak, N., and Choi, J. Y. A comprehensive overhaul of feature distillation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1921-1930, 2019. +Hinton, G., Vinyals, O., and Dean, J. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. + +Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D., Wang, W., Weyand, T., Andreetto, M., and Adam, H. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. +Huang, T., You, S., Wang, F., Qian, C., and Xu, C. Knowledge distillation from a stronger teacher. Advances in Neural Information Processing Systems, 35:33716-33727, 2022. +Jin, Y., Wang, J., and Lin, D. Multi-level logit distillation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24276-24285, 2023. +Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009. +Kullback, S. and Leibler, R. A. On information and sufficiency. The annals of mathematical statistics, 22(1): 79-86, 1951. +Li, G., Li, X., Wang, Y., Zhang, S., Wu, Y., and Liang, D. Knowledge distillation for object detection via rank mimicking and prediction-guided feature imitation. In Proceedings of the AAAI conference on artificial intelligence, volume 36, pp. 1306-1313, 2022. +Li, H., Xu, Z., Taylor, G., Studer, C., and Goldstein, T. Visualizing the loss landscape of neural nets. Advances in neural information processing systems, 31, 2018. +Li, Z., Li, X., Yang, L., Zhao, B., Song, R., Luo, L., Li, J., and Yang, J. Curriculum temperature for knowledge distillation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 1504-1512, 2023. +Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollar, P., and Zitnick, C. L. Microsoft coco: Common objects in context. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pp. 740-755. Springer, 2014. +Park, W., Kim, D., Lu, Y., and Cho, M. Relational knowledge distillation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3967-3976, 2019. +Qin, Z., Jagerman, R., Pasumarthi, R. K., Zhuang, H., Zhang, H., Bai, A., Hui, K., Yan, L., and Wang, X. Rd-suite: A benchmark for ranking distillation. Advances in Neural Information Processing Systems, 36, 2023. +Reddi, S., Pasumarthi, R. K., Menon, A., Rawat, A. S., Yu, F., Kim, S., Veit, A., and Kumar, S. Rankdistil: Knowledge distillation for ranking. In International Conference on Artificial Intelligence and Statistics, pp. 2368-2376. PMLR, 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. International journal of computer vision, 115: 211-252, 2015. +Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and Chen, L.-C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4510-4520, 2018. +Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +Sun, S., Ren, W., Li, J., Wang, R., and Cao, X. Logit standardization in knowledge distillation. arXiv preprint arXiv:2403.01427, 2024. +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. +Tang, J. and Wang, K. Ranking distillation: Learning compact ranking models with high performance for recommender system. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 2289-2298, 2018. +Tian, Y., Krishnan, D., and Isola, P. Contrastive representation distillation. arXiv preprint arXiv:1910.10699, 2019. +Wang, T., Yuan, L., Zhang, X., and Feng, J. Distilling object detectors with fine-grained feature imitation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4933-4942, 2019. +Wei, Y., Tang, A., Shen, L., Yuan, C., and Cao, X. Modeling multi-task model merging as adaptive projective gradient descent. arXiv preprint arXiv:2501.01230, 2025. +Wen, T., Lai, S., and Qian, X. Preparing lessons: Improve knowledge distillation with better supervision. Neurocomputing, 454:25-33, 2021. +Yang, S., Sanghavi, S., Rahmanian, H., Bakus, J., and SVN, V. Toward understanding privileged features distillation in learning-to-rank. Advances in Neural Information Processing Systems, 35:26658-26670, 2022a. +Yang, Z., Li, Z., Jiang, X., Gong, Y., Yuan, Z., Zhao, D., and Yuan, C. Focal and global knowledge distillation for detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4643-4652, 2022b. + +Yang, Z., Li, Z., Shao, M., Shi, D., Yuan, Z., and Yuan, C. Masked generative distillation. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XI, pp. 53-69. Springer, 2022c. +Yang, Z., Zeng, A., Li, Z., Zhang, T., Yuan, C., and Li, Y. From knowledge distillation to self-knowledge distillation: A unified approach with normalized loss and customized soft labels. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 17185-17194, October 2023a. +Yang, Z., Zeng, A., Li, Z., Zhang, T., Yuan, C., and Li, Y. From knowledge distillation to self-knowledge distillation: A unified approach with normalized loss and customized soft labels. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17185-17194, 2023b. +Zagoruyko, S. and Komodakis, N. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. +Zagoruyko, S. and Komodakis, N. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In International Conference on Learning Representations, 2017. +Zhang, L. and Ma, K. Improve object detection with feature-based knowledge distillation: Towards accurate and efficient detectors. In International Conference on Learning Representations, 2021. +Zhang, X., Zhou, X., Lin, M., and Sun, J. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6848-6856, 2018. +Zhao, B., Cui, Q., Song, R., Qiu, Y., and Liang, J. Decoupled knowledge distillation. In Proceedings of the IEEE/CVF Conference on computer vision and pattern recognition, pp. 11953-11962, 2022. +Zheng, K., Zhang, H., and Huang, W. Diffkendall: A novel approach for few-shot learning with differentiable kendl's rank correlation. Advances in Neural Information Processing Systems, 36:49403-49415, 2023. + +# A. Appendix + +# A.1. Implementation Details for Transformer + +We use the AdamW optimizer and train for 300 epochs with an initial learning rate of 5e-4 and a weight decay of 0.05. The minimum learning rate is 5e-6, and the patch size is 16. We set $\alpha = 1$ , $\beta = 1$ , $\gamma = 0.5$ , and batch size is 128. The value range of ranking loss is $[-1, 1]$ We use a single RTX4090 for CIFAR-100 and 4 RTX4090 for ImageNet. + +# A.2. Ablation of Normalization + +Due to the random initialization of student, the output logits will be too variant at the start of optimization and occasionally lead to gradient explosions. Therefore, we add normalization to the ranking loss to stabilize the ranking loss optimization at the very beginning. We also supplemented a set of small-scale ablation experiments that showed that the improvement in ranking performance did not come from the normalization added to the ranking loss, as shown in Tab. 10 below: + +Table 10. Ablation of Normalization. + +
TeacherResNet32×4WRN-40-2
79.4275.61
StudentSHN-V1WRN-40-1
70.3071.98
KD74.0773.54
KD+Ours w/o Norm76.38(+2.31)74.07(+0.53)
KD+Ours w Norm75.98(+1.91)74.49(+0.95)
+ +# A.3. Different Forms of Ranking Loss + +In the initial application of the ranking loss(Zheng et al., 2023), it is necessary to compute the gradients for two input vectors separately. However, in the scenario of distillation, the soft labels from the teacher model do not require gradients. Therefore, we propose three variants of the diff-Kendall ranking loss suitable for distillation scenarios, aimed at further exploring the role of ranking loss in distillation. Since the sample pair $(z_i^t - z_j^t)$ itself has a sign., we can derive an equivalent form from Eq. 5: + +$$ +\tau = \frac {\sum_ {i} \sum_ {j < i} \operatorname {s g n} \left(\left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right)}{\frac {1}{2} C (C - 1)} \tag {13} +$$ + +For Eq. 5 and Eq. 13, we can similarly transform them into differential forms of ranking loss by replacing $sgn$ with $tanh$ , and gradients are not computed for the output part corresponding to the teacher, which is: + +$$ +L _ {\tau} ^ {f o r m 1} = \frac {\sum_ {i} \sum_ {j < i} \tanh \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) _ {\text {d e t a c h}} \cdot \tanh \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)}{\frac {1}{2} C (C - 1)} \tag {14} +$$ + +$$ +L _ {\tau} ^ {f o r m 2} = \frac {\sum_ {i} \sum_ {j < i} \tanh \left[ \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) _ {\text {d e t a c h}} \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right) \right]}{\frac {1}{2} C (C - 1)} \tag {15} +$$ + +Where $(.)_{\text{detach}}$ means not participating in training. Further, since the gradient of the teacher's output is not required, we can directly use the sign function instead of the tanh function to obtain the ranking loss: + +$$ +L _ {\tau} ^ {f o r m 3} = \frac {\sum_ {i} \sum_ {j < i} s g n \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) _ {\text {d e t a c h}} \cdot \tanh \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)}{\frac {1}{2} C (C - 1)} \tag {16} +$$ + +Different Forms of Ranking Loss. In our investigation, we examined the performance of the three forms of distillation presented in Sec. A.3, as depicted in Tab. 11. Form1 exhibited the most superior performance, followed by Form2, with Form3 trailing yet still enhancing the efficacy of the original knowledge distillation. This suggests that within the ranking loss, it is imperative to optimize considering the magnitude of the teacher's logits differences as a coefficient for the loss, rather than merely optimizing as a sign function. + +Table 11. Different Forms of Ranking Loss. The experiments are conducted on the CIFAR-100, with 9 heterogeneous and 7 homogeneous architectures. The average Top-1 accuracy (%) is reported. + +
Loss FormKDKD+Form1KD+Form2KD+Form3
Similar Structure72.0173.47(+1.46)73.42(+1.41)73.38(+1.37)
Different Structure72.7473.50(+0.76)73.36(+0.62)73.05(+0.31)
+ +# A.4. Algorithm + +# Algorithm 1 Plug-and-Play Ranking Loss for Logit Distillation + +Input: Transfer set $\mathcal{D}$ with samples of image-label pair $\{x_{n},y_{n}\}_{n = 1}^{N}$ , base temperature $T$ , teacher $f_{t}$ , student $f_{s}$ , knowledge distillation Loss $\mathcal{L}_{\mathrm{KD}}$ , ranking Loss $\mathcal{L}_{\mathrm{RK}}$ , the weight of ranking Loss $\gamma$ . + +Output: Trained student model $f_{s}$ + +for $(x_{n},y_{n})$ in $\mathcal{D}$ do + +Get the logits of Teacher and student: $z^t = f_t(x_n)$ , $z^s = f_s(x_n)$ + +Calculate the probability with temperature: $q^{t} = \text{softmax}\left(\frac{z^{t}}{T}\right)$ , $q^{s} = \text{softmax}\left(\frac{z^{s}}{T}\right)$ . + +Get the normalized logits of Teacher and student: $\hat{z}^t = \frac{z^t - z^{\overline{t}}}{\text{std}(z^t)}$ , $\hat{z}^s = \frac{z^s - z^{\overline{s}}}{\text{std}(z^s)}$ + +Update $f_{s}$ towards minimizing: $\mathcal{L}_{\mathrm{total}} = \mathcal{L}_{\mathrm{KD}}(q^t,q^s) + \gamma \cdot \mathcal{L}_{\mathrm{RK}}(\hat{z}^t,\hat{z}^s)$ + +end + +# A.5. Derivation of the KL Loss and Ranking Loss + +# Derivation of the KL Divergence with Respect to Student Logits in Knowledge Distillation. + +Denote the teacher's logits as $\mathbf{z}^t = [z_1^t, z_2^t, \ldots, z_C^t]$ . + +Denote the student's logits as $\mathbf{z}^s = [z_1^s, z_2^s, \ldots, z_C^s]$ . + +Let $T$ be the temperature scaling factor used in the softmax function. + +Teacher probabilities can be calculated as: + +$$ +q _ {i} ^ {t} = \frac {\exp \left(\frac {z _ {i} ^ {t}}{T}\right)}{\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {t}}{T}\right)}, \quad \text {f o r} i = 1, 2, \dots , C. \tag {17} +$$ + +Student probabilities can be calculated as: + +$$ +q _ {i} ^ {s} = \frac {\exp \left(\frac {z _ {i} ^ {s}}{T}\right)}{\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)}, \quad \text {f o r} i = 1, 2, \dots , C. \tag {18} +$$ + +The loss function used in knowledge distillation is the scaled Kullback-Leibler (KL) divergence between the teacher and student probability distributions: + +$$ +L _ {\mathrm {K D}} = T ^ {2} \cdot \operatorname {K L} \left(q ^ {t} \| q ^ {s}\right) = T ^ {2} \sum_ {i = 1} ^ {C} q _ {i} ^ {t} \log \left(\frac {q _ {i} ^ {t}}{q _ {i} ^ {s}}\right). \tag {19} +$$ + +The derivative of the loss with respect to the student logits $z_{i}^{s}$ is: + +$$ +\frac {\partial L _ {\mathrm {K D}}}{\partial z _ {i} ^ {s}} = - T ^ {2} \sum_ {k = 1} ^ {C} q _ {k} ^ {t} \frac {\partial \log q _ {k} ^ {s}}{\partial z _ {i} ^ {s}}. \tag {20} +$$ + +Taking the natural logarithm: + +$$ +\log q _ {k} ^ {s} = \frac {z _ {k} ^ {s}}{T} - \log \left(\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)\right). \tag {21} +$$ + +Compute the partial derivative: + +$$ +\frac {\partial \log q _ {k} ^ {s}}{\partial z _ {i} ^ {s}} = \frac {\partial}{\partial z _ {i} ^ {s}} \left(\frac {z _ {k} ^ {s}}{T}\right) - \frac {\partial}{\partial z _ {i} ^ {s}} \left(\log \left(\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)\right)\right). \tag {22} +$$ + +Compute each term separately: + +$$ +\frac {\partial}{\partial z _ {i} ^ {s}} \left(\frac {z _ {k} ^ {s}}{T}\right) = \frac {1}{T} \delta_ {i k}, \quad \delta_ {i k} = \left\{ \begin{array}{l l} 1, & \text {i f} i = k, \\ 0, & \text {i f} i \neq k. \end{array} \right. \tag {23} +$$ + +$$ +\left. \frac {\partial}{\partial z _ {i} ^ {s}} \left(\log \left(\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)\right)\right) = \frac {1}{\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)} \cdot \frac {\partial}{\partial z _ {i} ^ {s}} \left(\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)\right). \right. \tag {24} +$$ + +The derivative inside the sum is: + +$$ +\frac {\partial}{\partial z _ {i} ^ {s}} \left(\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)\right) = \exp \left(\frac {z _ {i} ^ {s}}{T}\right) \cdot \frac {1}{T} = \frac {\exp \left(\frac {z _ {i} ^ {s}}{T}\right)}{T}. \tag {25} +$$ + +Therefore, the second term becomes: + +$$ +\frac {1}{\sum_ {j = 1} ^ {C} \exp \left(\frac {z _ {j} ^ {s}}{T}\right)} \cdot \frac {\exp \left(\frac {z _ {i} ^ {s}}{T}\right)}{T} = \frac {1}{T} q _ {i} ^ {s}. \tag {26} +$$ + +Thus, the total derivative is: + +$$ +\frac {\partial \log q _ {k} ^ {s}}{\partial z _ {i} ^ {s}} = \frac {1}{T} \delta_ {i k} - \frac {1}{T} q _ {i} ^ {s} = \frac {1}{T} (\delta_ {i k} - q _ {i} ^ {s}). \tag {27} +$$ + +We now substitute $\frac{\partial\log q_k^s}{\partial z_i^s}$ back into the expression for the derivative of the loss: + +$$ +\begin{array}{l} \frac {\partial L _ {\mathrm {K D}}}{\partial z _ {i} ^ {s}} = - T ^ {2} \sum_ {k = 1} ^ {C} q _ {k} ^ {t} \left(\frac {1}{T} \left(\delta_ {i k} - q _ {i} ^ {s}\right)\right) \tag {28} \\ = - T \sum_ {k = 1} ^ {C} q _ {k} ^ {t} \left(\delta_ {i k} - q _ {i} ^ {s}\right). \\ \end{array} +$$ + +Considering: + +$$ +\sum_ {k = 1} ^ {C} q _ {k} ^ {t} \delta_ {i k} = q _ {i} ^ {t}, \tag {29} +$$ + +$$ +\sum_ {k = 1} ^ {C} q _ {k} ^ {t} q _ {i} ^ {s} = q _ {i} ^ {s} \sum_ {k = 1} ^ {C} q _ {k} ^ {t} = q _ {i} ^ {s} \cdot 1 = q _ {i} ^ {s}, \quad \sum_ {k = 1} ^ {C} q _ {k} ^ {t} = 1. \tag {30} +$$ + +Therefore, the loss derivative simplifies to: + +$$ +\frac {\partial L _ {\mathrm {K D}}}{\partial z _ {i} ^ {s}} = - T \left(q _ {i} ^ {t} - q _ {i} ^ {s}\right). \tag {31} +$$ + +Derivation of the Ranking Loss with Respect to Student Logits in Knowledge Distillation. + +The Rank loss is calculated as: + +$$ +L _ {R K} = - \frac {\sum_ {i} \sum_ {j < i} \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \cdot \tanh \left(k \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right)}{\frac {C (C - 1)}{2}} \tag {32} +$$ + +The derivation is calculated as: + +$$ +\begin{array}{l} \frac {\partial L _ {R K}}{\partial z _ {i} ^ {s}} = \frac {1}{\frac {C (C - 1)}{2}} \sum_ {j \neq i} \frac {\partial}{\partial z _ {i} ^ {s}} \frac {1}{2} \cdot \left[ \tanh \left(k \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right) \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \right] (33) \\ = \frac {1}{C (C - 1)} \sum_ {j \neq i} \frac {\partial}{\partial z _ {i} ^ {s}} \left[ \tanh \left(k \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right) \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \right] (34) \\ \end{array} +$$ + +Denote $\phi_{ij}$ as: + +$$ +\phi_ {i j} = \tanh \left(k \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right) \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \tag {35} +$$ + +Its derivative w.r.t. $z_i^s$ is: + +$$ +\frac {\partial \phi_ {i j}}{\partial z _ {i} ^ {s}} = \left[ 1 - \tanh ^ {2} \left(k (z _ {i} ^ {s} - z _ {j} ^ {s})\right) \right] \cdot k \cdot \tanh \left(k (z _ {i} ^ {t} - z _ {j} ^ {t})\right) \tag {36} +$$ + +Finally, the gradient of $L_{RK}$ with respect to $z_i^s$ is: + +$$ +\frac {\partial L _ {R K}}{\partial z _ {i} ^ {s}} = - \frac {k}{C (C - 1)} \sum_ {j \neq i} \left[ 1 - \tanh ^ {2} \left(k \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right) \right] \tanh \left(k \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \tag {37} +$$ + +# A.6. Derivation of the Differential Ranking Loss + +In this section, we explain how we get the final form of Eq. 6. Noticed that: + +$$ +\tanh (x) = \frac {e ^ {x} - e ^ {- x}}{e ^ {x} + e ^ {- x}} = \frac {e ^ {2 x} - 1}{e ^ {2 x} + 1} = 1 - \frac {2}{e ^ {2 x} + 1} \tag {38} +$$ + +Then, we can get the final form of Eq. 6 by expanding the tanh function. + +$$ +\begin{array}{l} \tau_ {d} = \frac {\sum_ {i} \sum_ {j < i} \tanh \left(k \cdot \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right)\right) \cdot \tanh \left(k \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right)\right)}{\frac {1}{2} C (C - 1)} (39) \\ = \frac {2}{C (C - 1)} \cdot \sum_ {i} \sum_ {j < i} \left(1 - \frac {2}{1 + e ^ {2 \cdot \left(z _ {i} ^ {t} - z _ {j} ^ {t}\right) \cdot k}}\right) \cdot \left(1 - \frac {2}{1 + e ^ {2 \cdot \left(z _ {i} ^ {s} - z _ {j} ^ {s}\right) \cdot k}}\right) (40) \\ \end{array} +$$ + +# A.7. Does Temperature Solve the Problem of Ignoring Low-Probability Channels + +Some methods (Wei et al., 2025; Cheng et al., 2025) address the issue of neglecting low-probability channels by employing temperature scaling. We examined the probability distribution of LSKD (Sun et al., 2024), an approach using adaptive temperature that has shown promising results. As shown in Fig .9, while LSKD somewhat alleviates the problem of low-probability channels, the transformed probabilities still predominantly occupy these low-probability channels. Thus, using temperature scaling does not effectively resolve the issue of neglecting low-probability channels. + +![](images/784fe22ef35e9312af3b85c655bd1cf5d86505eb8d1952e550ca5e5790e7d334.jpg) +Figure 9. probability produced by KD and LSKD + +![](images/8f04980be1a652f8cc2a3919e850f5f4d9a8fece39b5ce2fe9a6f59c1b2c8ece.jpg) + +![](images/60d56a86375501faa214f10623e8e925bbe0b373b24ef440cb76a21e434505ad.jpg) + +# A.8. Combining with Other Correlation Coefficients. + +DIST (Huang et al., 2022) explores the use of the Pearson correlation coefficient for knowledge distillation. However, unlike our proposed method, the Pearson correlation coefficient measures the linear relationship between two variables. Our method focuses on the ranking relationship of logits, which is not strictly a linear relationship. Therefore, Kendall's $\tau$ correlation coefficient may be more suitable for capturing this non-linear ranking information. To further investigate the combined effect of using both linear and non-linear auxiliary functions, we incorporate ranking loss into DIST, which improves its performance. The results are shown in Tab. 12. + +Table 12. Experiments on Combining DIST. + +
Teacher +StudentResNet32×4 +WRN-16-2ResNet32×4 +WRN-40-2WRN-40-2 +SHN-V1VGG13 +VGG8WRN-40-2 +WRN-40-1
DIST (Huang et al., 2022)75.5878.0276.0073.8074.73
DIST+Ours75.85(+0.27)78.54(+0.52)76.23(+0.23)74.06(+0.26)74.86(+0.13)
+ +# A.9. More ImageNet Results + +We further augment CTKD (Li et al., 2023) and NKD (Yang et al., 2023a) with the proposed ranking loss and evaluate them on the ImageNet dataset; the results are reported in Tab. 13. + +Table 13. The top-1 and top-5 accuracy (%) on the ImageNet validation set. The teacher and student are ResNet34 and ResNet18 + +
MethodTop-1 Acc.Top-5 Acc.
AT (Zagoruyko & Komodakis, 2017)70.6990.01
OFD (Heo et al., 2019)70.8189.98
CRD (Tian et al., 2019)71.1790.13
CTKD (Li et al., 2023)71.3290.27
CTKD+Ours71.68(+0.36)90.30(+0.03)
NKD (Yang et al., 2023a)71.9690.27
NKD+Ours72.06(+0.10)90.49(+0.22)
\ No newline at end of file diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/images.zip" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/images.zip" new file mode 100644 index 0000000000000000000000000000000000000000..89273fad98dc5f5b02bfe068a5b49f7c68b83f87 --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/images.zip" @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0144a3ff21d76366577117ccb96608b97f0abf7056438909430f37fb234e67d0 +size 1028210 diff --git "a/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/layout.json" "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/layout.json" new file mode 100644 index 0000000000000000000000000000000000000000..de9f1f2a3b2feef99de8e171436f3a21e90a41a1 --- /dev/null +++ "b/ICML/2025/Enhancing Logits Distillation with Plug&Play Kendall\342\200\231s $\317\204$ Ranking Loss/layout.json" @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e14b221adb126f68add368995b28782a9f82abecf6126b98f5628a282fa0d01 +size 595707 diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_content_list.json b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..76660445eb8c175d0dd35a2ce8bad550a44e4640 --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f354703a977d2b2e8587b088d4d2af144c86ac6b8ac5e6c09dfcbc1dc4eeeeb9 +size 207103 diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_model.json b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ef61dbf8e1e58762b7db3e3d4a9277e862a762ed --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b353df5fe134aae370892e4472ae8edc6b8b4278af9ef8af4e4309a28f4d03bc +size 236055 diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_origin.pdf b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5c285f741870c47d516b7fe8eb2f5d19f87b3ab7 --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/76c93500-881a-40db-9104-c7ac294f23a3_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4229436e3daf735c519bd68e73e39f89daa8b530b8feb4897e2d67457e52b128 +size 1923926 diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/full.md b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2ee1515a2e67e36b66876783690104ebfb3ec779 --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/full.md @@ -0,0 +1,1156 @@ +# Enhancing Parallelism in Decentralized Stochastic Convex Optimization + +Ofri Eisen\*1 Ron Dorfman\*1 Kfir Y. Levy + +# Abstract + +Decentralized learning has emerged as a powerful approach for handling large datasets across multiple machines in a communication-efficient manner. However, such methods often face scalability limitations, as increasing the number of machines beyond a certain point negatively impacts convergence rates. In this work, we propose Decentralized Anytime SGD, a novel decentralized learning algorithm that significantly extends the critical parallelism threshold, enabling the effective use of more machines without compromising performance. Within the stochastic convex optimization (SCO) framework, we establish a theoretical upper bound on parallelism that surpasses the current state-of-the-art, allowing larger networks to achieve favorable statistical guarantees and closing the gap with centralized learning in highly connected topologies. + +# 1. Introduction + +Distributed learning has become a key paradigm for large-scale machine learning (ML), where multiple machines train an ML model by utilizing their collective data and computational resources (Verbraeken et al., 2020). This approach enables efficient ML scaling by accelerating training through parallel computation. Distributed ML systems are especially useful when data is inherently distributed across multiple users, as in federated learning (McMahan et al., 2017; Kairouz et al., 2021), where preserving local data privacy is a priority. + +Distributed learning systems are broadly categorized into two primary architectures: centralized and decentralized. Centralized systems rely on a central parameter server (PS) to coordinate training by aggregating local computations and distributing global model updates (Li et al., 2014). While + +*Equal contribution ${}^{1}$ Department of Electrical and Computer Engineering, Technion, Haifa, Israel. Correspondence to: Ofri Eisen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +this design simplifies training management, it faces scalability challenges due to communication bottlenecks and is inherently vulnerable to a single point of failure since the server is essential to system operation. + +In contrast, decentralized systems rely on direct interactions between neighboring machines, eliminating the need for a central PS (Kempe et al., 2003; Boyd et al., 2006; Nedic & Ozdaglar, 2009; Lian et al., 2017). While this architecture introduces challenges in coordination and maintaining global model consistency, it offers significant advantages. By reducing the risk of a single point of failure and enhancing communication efficiency, decentralized systems provide greater flexibility and resilience (Assran et al., 2019; Kong et al., 2021; Yuan et al., 2021; Li et al., 2022). + +A central trade-off in distributed learning, both centralized and decentralized, lies in balancing parallelism with statistical efficiency. While increasing parallelism—by incorporating more machines—can accelerate training, it may degrade learning efficiency beyond a certain point. This issue is particularly acute in decentralized systems, where sparse communication topologies amplify performance degradation, limiting the effective utilization of additional machines. + +Existing decentralized methods reveal a persistent gap between centralized and decentralized learning in their ability to scale with the number of machines (Koloskova et al., 2020; 2021; He et al., 2022). Surprisingly, this gap is observed even in highly connected network topologies, where information between nodes propagates faster, effectively mimicking the behavior of centralized systems. This raises the question of whether decentralized methods are fundamentally constrained in fully exploiting increased parallelism, even under ideal communication conditions. + +In this work, we propose Decentralized Anytime SGD (DATSGD), a novel and simple algorithm designed to enhance parallelism in decentralized systems. It relies on the Anytime SGD framework (Cutkosky, 2019), where stochastic gradient descent (SGD) updates are performed using gradients evaluated at averaged iterates. Each machine performs these updates locally and exchanges information with its neighbors. By relying on averaged query points that evolve more slowly than the iterates themselves, our approach effectively mitigates the bias caused by local model inconsistencies, also known as consensus distance. + +Table 1. Parallelism Bounds. Comparison of parallelism bounds for decentralized SCO across different network topologies for Decentralized SGD (D-SGD, Koloskova et al., 2020) and our method, expressed in terms of the total number of samples $N = M \cdot T$ . For reference, the centralized case achieves a bound of $\mathcal{O}(\sqrt{N})$ . NC stands for near-complete graph. Higher parallelism bounds are better, allowing us to accelerate the learning process without degrading performance. + +
TOPOLOGY1/ρD-SGDDAT-SGD
RINGO(M2)O(N1/8)O(N1/6)
TORUSO(M)O(N1/6)O(N1/4)
NC≈1O(ρ1/2N1/4)O(ρ√N)
+ +We perform our analysis within the stochastic convex optimization (SCO) framework—a powerful framework which captures several classical problems like SVMs and linear regression, as well as serving as a testbed towards designing and analyzing ML algorithms. + +For convex and smooth functions, our method achieves an error of $\epsilon$ over a decentralized network of $M$ machines in $T = \mathcal{O}(1 / M\epsilon^2 + 1 / \rho \epsilon)$ iterations, where $\rho \in (0,1]$ is the spectral gap of the network, a parameter that captures the connectivity of the network topology (see Definition 2.5 for a formal definition). This result implies that (1) for complete (or near-complete) topologies, where $\rho = \Omega(1)$ , our algorithm recovers the convergence rate of centralized methods (Dekel et al., 2012), thus filling the gap implied by prior methods; and (2) for general topologies, it improves upon the previously best-known rate of $\mathcal{O}(1 / M\epsilon^2 + 1 / \rho^{1/2}\epsilon^{3/2})$ (Koloskova et al., 2020), thereby enabling larger networks while maintaining linear speed-up; see Table 1 for a comparison of parallelism bounds for common network topologies. In Section 2.1, we elaborate on the computation of these parallelism bounds. + +# 1.1. Related Work + +Centralized learning systems are widely adopted in both industry and academia, thanks to their simplicity and the effectiveness of Minibatch SGD (Dekel et al., 2012), which is the most widespread approach to training in such systems. While alternative centralized methods like local-SGD have been explored in recent years (McMahan et al., 2017; Kairouz et al., 2021), Minibatch SGD still serves as a cornerstone in large-scale training due to its ease of implementation and strong empirical performance. + +Despite the enduring popularity of centralized training, decentralized systems present an appealing alternative by eliminating the need for a central parameter server and enabling direct communication among neighboring machines (Tsitsiklis, 1984; Kempe et al., 2003; Boyd et al., 2006; Nedic + +& Ozdaglar, 2009; Lian et al., 2017). This design not only mitigates the risk of a single point of failure but also offers greater scalability and flexibility (Assran et al., 2019; Kong et al., 2021; Yuan et al., 2021). A common mechanism underpinning these benefits is the gossip averaging protocol (Xiao & Boyd, 2004; Boyd et al., 2006), a low-overhead communication method that efficiently disseminates model updates across the network. + +In the context of stochastic optimization, decentralized training approaches have garnered considerable interest in recent years. The stochastic convex case was explored by Lian et al. (2017), who analyzed the Decentralized-SGD (D-SGD) method. Later, Koloskova et al. (2020) extended this approach within a unified framework that accounts for changing topologies and randomized gossip communication. While these aforementioned methods degrade in the face of data heterogeneity, Koloskova et al. (2021) completely eliminated this issue by employing an approach called gradient-tracking (Di Lorenzo & Scutari, 2016; Nedic et al., 2017; Pu & Nedic, 2021). See Table 2 for a comparison of convergence rates. + +Curiously, all existing methods present convergence bounds that imply a clear gap between the centralized and decentralized cases, even for highly connected topologies. Concretely, in centralized systems one may use up to $\mathcal{O}(\sqrt{N})$ machines to accelerate the learning process without degrading generalization (Dekel et al., 2012), where $N$ is the total number of samples used in the process. Conversely, in decentralized systems the best known parallelization limit is $M \leq \mathcal{O}((\rho \sqrt{N})^{1/2})$ , which is substantially smaller. See Table 1 for bounds regarding different topologies. + +Decentralized training has also been extensively studied in the context of stochastic non-convex optimization. This was done in (Lian et al., 2017; Koloskova et al., 2020; 2021), which have derived analogous bounds to the ones they achieved in the convex setting. Additionally, Kong et al. (2021) empirically studied the interplay between the local model parameters and gossip communication. More recently, He et al. (2022) improved convergence rates for non-convex problems by replacing local SGD updates with local momentum updates, establishing a parallelization limit of $M \leq \mathcal{O}((\rho \sqrt{N})^{2/3})$ . However, this remains below the centralized bound of $M \leq \mathcal{O}(\sqrt{N})$ , which applies in the non-convex setting. + +To further improve the parallelism bound, we build on a recent technique that involves gradually shifting query points in SCO (Cutkosky, 2019). This approach has been leveraged in recent works to improve asynchronous (Aviv et al., 2021) and local (Dahan & Levy, 2024) training methods, as well as to design universal accelerated algorithms (Kavis et al., 2019; Ene et al., 2021; Antonakopoulos et al., 2022). + +Table 2. Convergence to $\epsilon$ -accuracy. Comparison of convergence rates with prior work in convex decentralized learning. Here, $\sigma$ denotes noise variance, $\zeta$ represents data heterogeneity, and $\rho$ is the spectral gap. We note that the leading term $\sigma^2 / M\epsilon^2$ is statistically optimal (Nemirovski & Yudin, 1983). + +
REFERENCECONVERGENCE RATE
KOLOSKOVA ET AL. (2020)O(σ2/Mε2+ σ√ρ+ζ/ρε3/2+ 1/ρε)
KOLOSKOVA ET AL. (2021)O(σ2/Mε2+ σ/√ρε3/2+ 1/ρε)
THIS WORKO(σ2/Mε2+ √σ+√ζ/ρε+ 1/ε)
+ +# 2. Problem Setup and Background + +In this section, we formally define our problem setup and provide an overview of relevant background. + +We study decentralized SCO problems, where the objective is to minimize a convex loss function $f: \mathbb{R}^d \to \mathbb{R}$ defined as follows: + +$$ +f (x) := \frac {1}{M} \sum_ {i = 1} ^ {M} \left\{f _ {i} (x) := \mathbb {E} _ {z \sim \mathcal {D} _ {i}} \left[ f _ {i} (x, z) \right] \right\}, \tag {1} +$$ + +where $f_{i}:\mathbb{R}^{d}\to \mathbb{R}$ represents the loss function on machine $i\in \{1,\ldots ,M\}$ , $\mathcal{D}_i$ is the local data distribution, and $f_{i}(\cdot ,z)$ is the instance-dependent loss for a given sample $z$ on machine $i$ . + +We focus on first-order optimization methods, where in round $t$ , each machine $i$ samples $z_{t}^{i}\sim \mathcal{D}_{i}$ , computes a stochastic gradient estimate $\nabla f_{i}(x_{t}^{i},z_{t}^{i})$ , and uses it to update its local iterate $x_{t}^{i}$ . The method ultimately produces an output $x_{\mathrm{output}}$ , and its performance is measured by the expected excess loss, defined as: + +$$ +\mathbb {E} [ \text {E x c e s s - L o s s} ] := \mathbb {E} \left[ f \left(x _ {\text {o u t p u t}}\right) \right] - f \left(x ^ {*}\right), +$$ + +where $x^{*}\in \arg \min_{x\in \mathbb{R}^{d}}f(x)$ is a minimizer of $f$ , and the expectation is taken over the randomness of the samples. + +Throughout, we make the following standard assumptions. + +Assumption 2.1 (Smoothness). Each function $f_{i}$ is $L$ -smooth, i.e., for any $x, y \in \mathbb{R}^{d}$ we have: + +$$ +f _ {i} (y) \leq f _ {i} (x) + \nabla f _ {i} (x) ^ {T} (y - x) + \frac {L}{2} \| y - x \| ^ {2}. +$$ + +Assumption 2.2 (Bounded noise variance). There exists a constant $\sigma^2$ such that for all $x\in \mathbb{R}^d$ and $i\in [M]$ + +$$ +\mathbb {E} _ {z \sim \mathcal {D} _ {i}} \| \nabla f _ {i} (x, z) - \nabla f _ {i} (x) \| ^ {2} \leq \sigma^ {2}. +$$ + +Assumption 2.3 (Bounded heterogeneity). There exists a constant $\zeta^2$ such that for all $x\in \mathbb{R}^d$ : + +$$ +\frac {1}{M} \sum_ {i = 1} ^ {M} \| \nabla f _ {i} (x) - \nabla f (x) \| ^ {2} \leq \zeta^ {2}. +$$ + +We note that our bounded heterogeneity assumption has been widely adopted in prior works (Lian et al., 2017; Tang et al., 2018a; Li et al., 2019; He et al., 2022). Notably, some studies have explored milder assumptions, requiring bounded heterogeneity only at the optimum (Koloskova et al., 2020) or at the origin (Lu & De Sa, 2021), or even removing this assumption entirely by leveraging techniques such as gradient tracking (Nedic et al., 2017; Koloskova et al., 2021). In this work, we adopt the standard bounded heterogeneity assumption for simplicity, leaving potential relaxations to future work. + +Decentralized Training. We consider systems (networks) where nodes are connected through a communication graph, and each node can efficiently communicate with its neighbors. In such decentralized systems, nodes represent machines, and edges correspond to communication links. + +Gossip averaging is a robust communication protocol that efficiently and reliably propagates information across the decentralized network without relying on a central coordinator (Xiao & Boyd, 2004; Boyd et al., 2006; Nedic & Ozdaglar, 2009; Shi et al., 2014; Koloskova et al., 2020). + +Concretely, suppose each machine $i$ in the network holds a vector $x_0^i \in \mathbb{R}^d$ , and our goal is to efficiently and robustly communicate the consensus $\bar{x} := \frac{1}{M}\sum_{i}x_{0}^{i}$ to all of the machines in the network. Gossip averaging is a sequential process towards doing so, where each machine computes a sequence $\{x_t^i\}_t$ such that $x_{t}^{i}$ eventually converges to $\bar{x}$ for all $i$ . At every gossip step, each node $i$ updates its vector as a weighted average of its neighbors: + +$$ +x _ {t + 1} ^ {i} = \sum_ {j = 1} ^ {M} P _ {i j} x _ {t} ^ {j}, +$$ + +where $P_{ij} > 0$ if nodes $i$ and $j$ are connected, and $P \in [0,1]^{M \times M}$ is a given gossip matrix which satisfies the following properties. + +Definition 2.4 (Gossip matrix). A gossip matrix $P \in [0,1]^{M \times M}$ is a symmetric, doubly stochastic matrix. That is, $P$ satisfies $P = P^T$ as well as $P\mathbf{1} = \mathbf{1}$ and $\mathbf{1}^T P = \mathbf{1}^T$ . + +These properties imply that (i) for any node $i$ then $\{P_{ij}\}_{j\in [M]}$ is a weight vector (i.e., has positive entries which sum to 1), and that (ii) the consensus is preserved i.e. that $\forall t, \bar{x} = \frac{1}{M}\sum_{i = 1}^{M}x_0^i = \frac{1}{M}\sum_{i = 1}^{M}x_t^i$ . + +As is standard in the literature we shall assume that the matrix $P$ is given and satisfies the above properties. + +Note that gossip averaging can be written in matrix form as: + +$$ +X _ {t + 1} = X _ {t} P, +$$ + +where $X_{t}\coloneqq \left(x_{t}^{1}\quad x_{t}^{2}\quad \dots \quad x_{t}^{M}\right)\in \mathbb{R}^{d\times M}$ + +A key characteristic of the gossip matrix is the spectral gap, reflecting the connectivity degree of the network topology. + +Definition 2.5 (Spectral gap). For a gossip matrix $P$ with eigenvalues $1 = \lambda_{1} > |\lambda_{2}| \geq \dots \geq |\lambda_{M}|$ , the spectral gap is defined as: + +$$ +\rho := 1 - | \lambda_ {2} | \in (0, 1 ]. +$$ + +An important property of gossip averaging is its contractive effect on the distance from the average of local vectors. + +Property 2.6. Let $X \in \mathbb{R}^{d \times M}$ and define $\bar{X} \coloneqq X \frac{1}{M} \mathbf{11}^{\top}$ . Let $P \in \mathbb{R}^{M \times M}$ be a gossip matrix with spectral gap $\rho$ . Then, + +$$ +\left\| X P - \bar {X} \right\| _ {F} ^ {2} \leq (1 - \rho) \| X - \bar {X} \| _ {F} ^ {2}. \tag {2} +$$ + +The above, along with the consensus-preserving property, ensures that iterative gossip averaging converges to the consensus (i.e., the average of the local vectors) exponentially fast. Notably, in complete graph topologies where $\rho = 1$ , consensus is achieved in a single gossip step, effectively mimicking centralized behavior. + +# 2.1. Parallelism Bounds + +It has been well established in the literature that the convergence rate of SGD for convex functions is given by $\mathcal{O}(\sigma / \sqrt{T} + 1 / T)$ , where $T$ is the number of iterations (Nemirovski et al., 2009; Agarwal et al., 2012). Assuming each iteration processes a single sample, we have $N = T$ total samples. + +In distributed systems, computation is distributed across $M$ machines, therefore accelerating the training process. With $M$ machines, we process $N$ samples in just $T = N / M$ iterations. However, as we mentioned, this parallelization introduces a trade-off, as increasing $M$ can eventually reduce efficiency, as we show next. + +For centralized systems, Dekel et al. (2012) derived the following convergence rate for Mini-batch (Parallel) SGD: + +$$ +\mathbb {E} [ \text {E x c e s s - L o s s} ] = \mathcal {O} \left(\frac {\sigma}{\sqrt {M T}} + \frac {1}{T}\right) = \mathcal {O} \left(\frac {\sigma}{\sqrt {N}} + \frac {M}{N}\right). +$$ + +Thus, as long as $M \leq \mathcal{O}(\sqrt{N})$ (ignoring $\sigma$ ), we can increase $M$ without degrading performance. + +For decentralized systems, Koloskova et al. (2020) analyzed the Decentralized SGD (D-SGD) algorithm, obtaining the error rate: + +$$ +\begin{array}{l} \mathcal {O} \left(\frac {\sigma}{\sqrt {M T}} + \frac {\sigma^ {2 / 3} \rho^ {1 / 3} + \zeta^ {2 / 3}}{\rho^ {2 / 3} T ^ {2 / 3}} + \frac {1}{\rho T}\right) = \\ \mathcal {O} \left(\frac {\sigma}{\sqrt {N}} + \frac {\left(\sigma^ {2 / 3} \rho^ {1 / 3} + \zeta^ {2 / 3}\right) M ^ {2 / 3}}{\rho^ {2 / 3} N ^ {2 / 3}} + \frac {M}{\rho N}\right). \tag {3} \\ \end{array} +$$ + +Interestingly, the parallelism bound differs based on data heterogeneity. In homogeneous setups ( $\zeta = 0$ ), we can scale up to $M \leq \mathcal{O}(\rho^{1/2}N^{1/4})$ , whereas in heterogeneous settings ( $\zeta > 0$ ), the limit tightens to $M \leq \mathcal{O}(\rho N^{1/4})$ which can be significantly lower for sparse topologies. It is worth mentioning that Koloskova et al. (2021) enhanced this bound, by incorporating a gradient tracking mechanism, eliminating the dependence on $\zeta$ altogether. + +Note that even for dense graph topologies, where $\rho \approx 1$ , the rate in (3) does not match the centralized case. As we establish in Section 4, our approach bridges this gap, achieving an error rate of $\mathcal{O}(\sigma / \sqrt{MT} + (\sqrt{\sigma} + \sqrt{\zeta}) / \rho T + 1 / T)$ . This improvement increases the parallelism bound to $M \leq \mathcal{O}(\rho \sqrt{N})$ . Table 2 provides a comparison of convergence rates with prior work. + +# 3. The Pitfall of Decentralized SGD + +Next, we discuss the D-SGD algorithm and outline its key limitation. Given the structure of decentralized topologies, the D-SGD algorithm naturally extends SGD. As described in Algorithm 1, each machine alternates between updating its local model weights using the standard SGD rule and exchanging information with its neighbors via gossip averaging. However, unlike in centralized Minibatch SGD, where all machines compute gradients at the same query points, decentralized training lacks immediate synchronization. Since gossip-based communication does not instantly enforce consensus (unless $\rho = 1$ ), local models diverge, and each machine evolves independently. + +This lack of synchronization introduces a fundamental challenge: gradient estimates at each node become biased with respect to the global consensus, affecting convergence analysis. As shown in (Koloskova et al., 2019), this bias is closely tied to the consensus distance $\Xi_t \coloneqq \frac{1}{M} \sum_{i=1}^{M} \| w_t^i - \bar{w}_t \|^2$ , where $\bar{w}_t = \frac{1}{M} \sum_{i=1}^{M} w_t^i$ represents the global average of local models. The consensus distance quantifies the discrepancy between local models, and limited communication makes it challenging to minimize. This issue can be framed as a competition between the rate of consensus achievement and the rate at which local parameters evolve. If all machines synchronized instantly, D-SGD would closely resemble centralized Minibatch SGD. However, for any $\rho < 1$ , perfect synchronization remains unattainable, necessitating control and bound this bias. + +To gain intuition, consider the D-SGD update rule under the simplifying assumption that the gradient variance across nodes is bounded: $\Psi_t \coloneqq \frac{1}{M} \sum_{i=1}^{M} \| g_t^i - \bar{g}_t \|^2 \leq G^2$ for all $t \geq 1$ , where $\bar{g}_t = \frac{1}{M} \sum_{i=1}^{M} g_t^i$ is the global average of local stochastic gradients. + +Using standard gossip averaging analysis and the SGD update rule, we can obtain the following recursion for the + +Algorithm 1 Decentralized SGD (D-SGD) +Input: Initial point $w_{1}\in \mathbb{R}^{d}$ , learning rate $\eta$ , gossip matrix $P$ , number of rounds $T$ +Initialize $w_{1}^{i} = w_{1}$ for all $i\in [M]$ +for $t = 1,\ldots ,T$ do for $i\in [M]$ in parallel do Sample $z_{t}^{i}\sim \mathcal{D}$ and set $g_{t}^{i} = \nabla f_{i}(w_{t}^{i},z_{t}^{i})$ $w_{t + \frac{1}{2}}^i = w_t^i -\eta g_t^i$ $w_{t + 1}^{i} = \sum_{j = 1}^{M}w_{t + \frac{1}{2}}^{j}P_{ij}$ end for +end for + +consensus distance: + +$$ +\begin{array}{l} \Xi_ {t + 1} = \frac {1}{M} \sum_ {i = 1} ^ {M} \| w _ {t + 1} ^ {i} - \bar {w} _ {t + 1} \| ^ {2} \\ \leq \frac {1 - \rho}{M} \sum_ {i = 1} ^ {M} \| w _ {t + \frac {1}{2}} ^ {i} - \bar {w} _ {t + \frac {1}{2}} \| ^ {2} \\ = \frac {1 - \rho}{M} \sum_ {i = 1} ^ {M} \| \left(w _ {t} - \eta g _ {t} ^ {i}\right) - \left(\bar {w} _ {t} - \eta \bar {g} _ {t}\right) \| ^ {2} \\ \leq \left(1 - \frac {\rho}{2}\right) \Xi_ {t} + C \cdot \frac {G ^ {2} \eta^ {2}}{\rho}, \tag {4} \\ \end{array} +$$ + +for some constant $C > 0$ . Solving this recursion yields the bound $\Xi_t \leq \mathcal{O}(\eta^2 / \rho^2)$ for all $t \geq 1$ . In practice, Koloskova et al. (2020) conducted a more refined analysis, obtaining an improved bound of order $\mathcal{O}(\eta^2 / \rho)$ . This leads to an overall error rate of $\mathcal{O}(1 / \eta T + \eta + \eta^2 / \rho)$ . Optimizing the learning rate by balancing these terms suggests choosing $\eta \lesssim (\rho / T)^{1/3}$ , which in turn results in the $\mathcal{O}(1 / \rho^{1/3} T^{2/3})$ term in (3), ultimately limiting the parallelism bound. Ideally, if we could tighten the bound on the consensus distance, it would lead to a direct improvement in this term. In the next section, we achieve this by introducing gradually shifting anchor points. + +# 4. DAT-SGD: Decentralized Anytime SGD + +In this section, we introduce DAT-SGD. We begin in Section 4.1 by discussing the Anytime SGD method, which serves as the foundation of our approach. Then, in Section 4.2, we extend this framework to the decentralized setting. Finally, in Section 4.3, we provide an intuitive analysis and a proof sketch of the convergence statement, highlighting how Anytime SGD enables to mitigate the consensus distance—an idea we further elaborate on in Section 4.4. + +# 4.1. Anytime SGD + +For this part, consider a single-machine setup. The widely studied SGD method generates a sequence of iterates $\{w_{t}\}_{t}$ + +Algorithm 2 Decentralized Anytime SGD (DAT-SGD) +1: Input: Initial iterate $w_{1}$ , learning rate $\eta$ , gossip matrix $P$ , number of rounds $T$ , non-negative weights $\{\alpha_{t}\}_{t\geq 1}$ +2: Initialize $w_{1}^{i} = x_{1}^{i} = w_{1}$ for all $i\in [M]$ +3: for $t = 1,\dots ,T$ do +4: for $i\in [M]$ in parallel do +5: Sample $z_{t}^{i}\sim \mathcal{D}_{i}$ and set $g_{t}^{i} = \nabla f_{i}(x_{t}^{i},z_{t}^{i})$ +6: Local updates +7: $w_{t + \frac{1}{2}}^{i} = w_{t}^{i} - \eta \alpha_{t}g_{t}^{i}$ +8: $x_{t + \frac{1}{2}}^{i} = \frac{\alpha_{1:t - 1}}{\alpha_{1:t}} x_{t}^{i} + \frac{\alpha_{t}}{\alpha_{1:t}} w_{t + \frac{1}{2}}^{i}$ +9: Gossip communication +10: $w_{t + 1}^{i} = \sum_{j = 1}^{M}w_{t + \frac{1}{2}}^{j}P_{ij}$ +11: $x_{t + 1}^{i} = \sum_{j = 1}^{M}x_{t + \frac{1}{2}}^{j}P_{ij}$ +12: end for +13: end for + +using the update rule $w_{t + 1} = w_t - \eta g_t$ , where $g_t$ is a stochastic gradient estimate computed at the current iterate $w_t$ . In contrast, the Anytime SGD framework (Cutkosky, 2019) computes stochastic gradients at different query points—specifically, the weighted average of past iterates. + +Formally, given a sequence of non-negative weights $\{\alpha_{t}\}_{t}$ , Anytime SGD generates two sequences, $\{w_{t}\}_{t}$ and $\{x_{t}\}_{t}$ , according to the update rules: + +$$ +w _ {t + 1} = w _ {t} - \eta \alpha_ {t} g _ {t}, \tag {5} +$$ + +$$ +x _ {t + 1} = \frac {\alpha_ {1 : t - 1}}{\alpha_ {1 : t}} x _ {t} + \frac {\alpha_ {t}}{\alpha_ {1 : t}} w _ {t + 1}, \tag {6} +$$ + +where $x_{1} = w_{1}$ , $\alpha_{1:t} \coloneqq \sum_{\tau=1}^{t} \alpha_{\tau}$ for all $t > 0$ , and $\alpha_{1:0} \coloneqq 0$ . Here, $g_{t}$ is an estimate of the gradient at the weighted average $x_{t}$ . + +Cutkosky (2019) introduced the Anytime framework to ensure that the query points converge to the optimal solution—unlike standard SGD, where iterates may not. It was shown that Anytime SGD achieves the same convergence rates as SGD for convex functions. However, the averaged query points $\{x_{t}\}_{t}$ exhibit greater stability, changing slower than the iterates themselves. As we show next, this approach also enables establishing a last-iterate convergence guarantee. + +# 4.2. Extension to the Decentralized Setup + +Our approach extends Anytime SGD to the decentralized setting, as outlined in Algorithm 2. In round $t$ , each machine performs the updates given in Equations (5) and (6) locally and, similar to D-SGD, shares both its model weights, $w_{t}^{i}$ , and query points, $x_{t}^{i}$ , through gossip averaging. + +The convergence of Algorithm 2 is established in Theorem 4.1, with the full proof deferred to Appendix B. + +Theorem 4.1. Under Assumptions 2.1-2.3, consider Algorithm 2 with linear weights $\alpha_{t} = t$ and a learning rate given by + +$$ +\eta = \min \left\{\frac {1}{2 4 L T}, \frac {\rho^ {2}}{K}, \frac {D _ {1} \sqrt {M}}{\sqrt {3} \sigma T ^ {3 / 2}}, \sqrt {\frac {D _ {1}}{2 K \tilde {\sigma}}} \frac {\rho}{T} \right\}, +$$ + +where $D_1^2 \coloneqq \| w_1 - x^* \|^2$ , $K^2 \coloneqq 5120L^2$ , and $\tilde{\sigma}^2 \coloneqq 2\sigma^2 + \zeta^2$ . Then, for all $T \geq 1$ , the following bound holds: + +$$ +\mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] \leq \mathcal {O} \left(\frac {\sigma D _ {1}}{\sqrt {M T}} + \frac {D _ {1} ^ {3 / 2} \sqrt {L \tilde {\sigma}}}{\rho T} + \frac {L D _ {1} ^ {2}}{T}\right), +$$ + +where $\bar{x}_T\coloneqq \frac{1}{M}\sum_{i = 1}^{M}x_T^i$ + +Let $N = MT$ be the total number of samples after $T$ iterations. From Theorem 4.1, ignoring dependencies on $L$ , $D_{1}$ , $\sigma$ and $\zeta$ , we obtain the convergence rate $\mathcal{O}(1 / \sqrt{N} + M / \rho N)$ . This implies that the asymptotic upper bound on parallelism is $\mathcal{O}(\rho \sqrt{N})$ . Beyond this, the second term of $M / \rho N$ dominates, leading to a decline in learning efficiency when increasing the number of machines. This bound represents a significant improvement over the prior $\mathcal{O}(\rho^{1/2} N^{1/4})$ parallelism limit (Koloskova et al., 2020; 2021). + +In addition, we can establish the convergence of the local iterates, as follows. The proof is provided in Appendix B.1. + +Corollary 4.2. Under the same assumptions and parameter selections as in Theorem 4.1, the local iterate at each machine $i \in \{1, \ldots, M\}$ satisfies: + +$$ +\begin{array}{l} \mathbb {E} \left[ f (x _ {T} ^ {i}) - f ^ {*} \right] \leq \\ \mathcal {O} \left(\frac {\sigma D _ {1}}{\sqrt {M T}} + \frac {D _ {1} ^ {3 / 2} \sqrt {L \tilde {\sigma}}}{\rho T} + \frac {L D _ {1} ^ {2}}{T} + \frac {M \tilde {\sigma} D _ {1}}{\rho^ {2} T ^ {2}}\right). \\ \end{array} +$$ + +The additional last term does not affect the established upper bound on parallelism, which remains $M \leq \mathcal{O}(\rho \sqrt{N})$ . + +Transient Iteration Complexity. A complementary metric to the parallelism bound is the transient iteration complexity, which quantifies how many iterations are needed before the convergence rate matches that of centralized SGD, i.e., when the $\sigma/\sqrt{MT}$ term dominates (Pu et al., 2021). From Theorem 4.1, it follows that the transient iteration complexity of our method is $\mathcal{O}(M / \rho^2)$ , representing an improvement over D-SGD by a factor of $M^2$ . For instance, this complexity corresponds to $\mathcal{O}(M^5)$ for the ring topology and $\tilde{\mathcal{O}}(M)$ for the exponential graph (Ying et al., 2021). + +# 4.3. Proof Sketch + +To complement the analysis in Section 3, we first provide an intuitive analysis of the consensus distance. As formally shown in Appendices A and B, the bias in Anytime SGD is + +related to the average consensus distance between the query points, defined as + +$$ +\Gamma_ {t} := \frac {1}{M} \sum_ {i = 1} ^ {M} \| x _ {t} ^ {i} - \bar {x} _ {t} \| ^ {2}, \text {w h e r e} \bar {x} _ {t} = \frac {1}{M} \sum_ {i = 1} ^ {M} x _ {t} ^ {i}. +$$ + +Since the query points evolve more gradually than the iterates, we can derive a tighter bound on $\Gamma_t$ . To illustrate this, we consider a simplified setting with uniform weights $\alpha_t = 1$ for all $t$ and assume $\Psi_t \leq G^2$ for all $t \geq 1$ , as in Section 3. Using gossip averaging for the query points and the Anytime averaging, we can show that: + +$$ +\begin{array}{l} \Gamma_ {t + 1} = \frac {1}{M} \sum_ {i = 1} ^ {M} \| x _ {t + 1} ^ {i} - \bar {x} _ {t + 1} \| ^ {2} \\ \leq \frac {1 - \rho}{M} \sum_ {i = 1} ^ {M} \| x _ {t + \frac {1}{2}} ^ {i} - \bar {x} _ {t + \frac {1}{2}} \| ^ {2} \\ = \frac {1 - \rho}{M} \sum_ {i = 1} ^ {M} \left\| \right.\left(1 - \frac {1}{t}\right) (x _ {t} ^ {i} - \bar {x} _ {t}) + \frac {1}{t} (w _ {t + \frac {1}{2}} ^ {i} - \bar {w} _ {t + \frac {1}{2}})\left. \right)\left. \right\| ^ {2} \\ \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {C}{\rho t ^ {2}} \left(\Xi_ {t} + G ^ {2} \eta^ {2}\right). \tag {7} \\ \end{array} +$$ + +for some constant $C > 0$ . Recall that $\Xi_t$ satisfies its own recursion, as derived in Equation (4). Using the refined bound $\Xi_t \leq \mathcal{O}(G^2 \eta^2 / \rho)$ , we obtain: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \lesssim \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {C}{\rho t ^ {2}} \left(\frac {G ^ {2} \eta^ {2}}{\rho} + G ^ {2} \eta^ {2}\right) \\ \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + 2 C \cdot \frac {G ^ {2} \eta^ {2}}{\rho^ {2} t ^ {2}}. \tag {8} \\ \end{array} +$$ + +Summing over $t \in [T]$ and rearranging terms, we can get the bound $\sum_{t=1}^{T} \Gamma_t \leq \mathcal{O}(\eta^2 / \rho^3)$ . Since the final error rate is proportional to the average consensus distance over time, $\frac{1}{T} \sum_{t=1}^{T} \Gamma_t$ , the resulting error is of order $\mathcal{O}(1 / \eta T + \eta + \eta^2 / \rho^3 T)$ . Tuning the learning rate by setting $\eta \lesssim \rho$ yields the $\mathcal{O}(1 / \rho T)$ term, which enables enhanced parallelism. + +This simplified analysis provides intuition on how slowly changing query points improve the rate. Next, we present a more formal proof sketch capturing finer transition details. + +Proof Sketch of Theorem 4.1. As we show in Lemma B.1, the consensus query point sequence $\{\bar{x}_t\}_{t\geq 1}$ is an $\{\alpha_{t}\}_{t\geq 1}$ -weighted average of the consensus iterates sequence $\{\bar{w}_t\}_{t\geq 1}$ . Moreover, the average iterates sequence evolves similarly to Equation (5), following the update rule $\bar{w}_{t + 1} = \bar{w}_t - \eta \alpha_t\bar{g}_t$ . Thus, the consensus sequences $\{\bar{x}_t\}_{t\geq 1}$ and $\{\bar{w}_t\}_{t\geq 1}$ align with the structure of Anytime SGD, allowing us to leverage standard results applicable to Anytime SGD. Specifically, defining $\Delta_t\coloneqq \mathbb{E}[f(\bar{x}_t) - f^* ]$ it follows for all $t\geq 1$ that (cf. Lemma A.3): + +$$ +\alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \bar {g} _ {\tau} \| ^ {2} + 4 \eta T \cdot B _ {T}, \tag {9} +$$ + +where $B_{T}\coloneqq \mathbb{E}\left[\sum_{\tau = 1}^{T}\alpha_{\tau}^{2}\| \mathbb{E}\bar{g}_{\tau} - \nabla f(\bar{x}_{\tau})\|^{2}\right]$ . Focusing on the middle term, we show using standard arguments that: + +$$ +\mathbb {E} \| \bar {g} _ {\tau} \| ^ {2} \leq \frac {3 \sigma^ {2}}{M} + 3 \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} + 3 \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. +$$ + +Plugging this into Equation (9) allows us to derive the following bound: + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 8 \eta T B _ {T} \\ + 3 \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. \tag {10} \\ \end{array} +$$ + +A key component in our proof is bounding $B_T$ , which is essentially the sum of weighted squared biases. As we show in Section 4.4, this term is bounded as follows: + +$$ +B _ {T} \leq \frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{2 \rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}. +$$ + +Therefore, from Equation (10), we get: + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {4 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \\ + 3 \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. \tag {11} \\ \end{array} +$$ + +For the last sum, the smoothness of $f$ implies that $\| \nabla f(x) \|^2 \leq 2L(f(x) - f^*)$ for all $x \in \mathbb{R}^d$ , yielding: + +$$ +\sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2} \leq 2 L \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \Delta_ {\tau} \leq 4 L \sum_ {\tau = 1} ^ {T} \alpha_ {1: \tau} \Delta_ {\tau}, +$$ + +where the last inequality follows from $\alpha_{\tau}^{2} = \tau^{2}\leq 2\alpha_{1:\tau}$ Substituting this bound into (11) and recalling that $\eta \leq$ $\frac{1}{24LT}$ , we obtain: + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {4 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \\ + \frac {1}{2 T} \sum_ {\tau = 1} ^ {T} \alpha_ {1: \tau} \Delta_ {\tau}. \tag {12} \\ \end{array} +$$ + +Observe that $a_{t} \coloneqq \alpha_{1:t}\Delta_{t}$ follows the structure $a_{t} \leq b + \frac{1}{2T}\sum_{\tau = 1}^{T}a_{\tau}$ , $\forall t \in [T]$ , which implies that $a_{t} \leq 2b$ for all $t \in [T]$ (see Lemma D.3). In particular, for $t = T$ , we get: + +$$ +\alpha_ {1: T} \Delta_ {T} \leq \frac {2 D _ {1} ^ {2}}{\eta} + \frac {6 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {8 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}. +$$ + +Dividing by $\alpha_{1:T}$ , noting that $\frac{\sum_{\tau=1}^{T} \alpha_{\tau}^2}{\alpha_{1:T}} \leq T$ for linear weights, and appropriately tuning the learning rate concludes the proof. + +# 4.4. Bounding the Bias + +A central part of our analysis is bounding the bias introduced by local model differences. The bias bound is formally stated in Lemma 4.3, and the complete proof can be found in Appendix B.2. A brief proof sketch is provided below. + +Lemma 4.3. Consider the setting in Theorem 4.1 and let $\bar{g}_t\coloneqq \frac{1}{M}\sum_{i = 1}^M g_t^i$ and $\bar{x}_t\coloneqq \frac{1}{M}\sum_{i = 1}^M x_t^i$ denote the average gradient and query point across machines at round $t$ , respectively. Then, for linear weights $\alpha_{t} = t$ , and a learning rate bounded as $\eta \leq \frac{\rho^2}{K}$ , the following bound holds: + +$$ +B _ {T} := \mathbb {E} \left[ \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} \right] \leq \frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{2 \rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}. +$$ + +where we recall that $K^2 \coloneqq 5120L^2$ and $\tilde{\sigma}^2 \coloneqq 2\sigma^2 + \zeta^2$ . + +Proof Sketch. By Jensen's inequality and the smoothness of each $f_{i}$ , we can bound each term in the sum as follows: + +$$ +\begin{array}{l} \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} \leq \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \nabla f _ {i} (x _ {\tau} ^ {i}) - \nabla f _ {i} (\bar {x} _ {\tau}) \| ^ {2} \\ \leq \frac {L ^ {2}}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| x _ {\tau} ^ {i} - \bar {x} _ {\tau} \| ^ {2}. \\ \end{array} +$$ + +As previously defined, let $\Gamma_t \coloneqq \frac{1}{M} \sum_{i=1}^{M} \mathbb{E}\|x_t^i - \bar{x}_t\|^2$ denote the average consensus distance of the query points at round $t$ . Thus, + +$$ +B _ {T} \leq L ^ {2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \Gamma_ {\tau}. \tag {13} +$$ + +Our objective is therefore to bound $\Gamma_{\tau}$ for every $\tau \in [T]$ . Using standard gossip averaging analysis and the query points averaging, we derive the following recursion for $\Gamma_t$ : + +$$ +\Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \delta_ {t} ^ {2}}{\rho} \left(\Xi_ {t} + \eta^ {2} \alpha_ {t} ^ {2} \Psi_ {t}\right), \tag {14} +$$ + +recalling that $\Xi_t \coloneqq \frac{1}{M} \sum_{i=1}^{M} \mathbb{E} \| w_t^i - \bar{w}_t \|^2$ and $\Psi_t \coloneqq \frac{1}{M} \sum_{i=1}^{M} \mathbb{E} \| g_t^i - \bar{g}_t \|^2$ represent the average consensus distances of the iterates and gradients at round $t$ , respectively, and using $\delta_t \coloneqq \frac{\alpha_t}{\alpha_{1:t}}$ . Notably, $\Xi_t$ satisfies its own recursion (see Lemma C.4): + +$$ +\Xi_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Xi_ {t} + \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \Psi_ {t}. +$$ + +Solving this recursion yields the following for all $t \in [T]$ : + +$$ +\Xi_ {t} \leq \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}. +$$ + +Substituting this back into (14) gives: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} \\ + \frac {4 \eta^ {2} \alpha_ {t} ^ {2} \delta_ {t} ^ {2}}{\rho} \left(\Psi_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}\right). \\ \end{array} +$$ + +In Lemma C.2, we show that $\Psi_t \leq 5\tilde{\sigma}^2 + 10L^2\Gamma_t$ for all $t \in [T]$ . Plugging this bound, noting that for linear weights $\alpha_t^2\delta_t^2 = \mathcal{O}(1)$ , and using some algebra, we obtain: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa}\right) \Gamma_ {t} \\ + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} \Gamma_ {\tau} + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}}, \\ \end{array} +$$ + +where $\kappa = \frac{\rho}{2}$ , $c_{1}^{2} = \Theta (K^{2})$ , and $c_{2}^{2} = \Theta (\tilde{\sigma}^{2})$ . We have now derived a recursion for $\Gamma_t$ that no longer depends on $\Xi_t$ or $\Psi_t$ . For a sufficiently small learning rate, specifically $\eta \leq \frac{\rho^2}{K}$ , this recursion can be explicitly solved, yielding: + +$$ +\Gamma_ {t} \leq \frac {2 c _ {2} ^ {2} \eta^ {2}}{\kappa^ {4}} = \Theta \left(\frac {\tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}}\right). +$$ + +Injecting this bound into (13) yields the result: + +$$ +B _ {T} \leq L ^ {2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \Gamma_ {\tau} = \Theta \left(\frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}\right). +$$ + +![](images/8267ab1fd7510e50c40c34fa80bafb5abf7a9762db24cad4d6d8591a689994d9.jpg) + +# 5. Experiments + +In this section, we empirically evaluate our method on both a synthetic least squares problem and an image classification task. All experiments are conducted using three random seeds, and we report the averaged results. + +# 5.1. Least Squares on Synthetic Data + +We begin with a synthetic least squares problem to illustrate key theoretical properties of our algorithm. For each machine, the local objective function is defined as $f_{i}(x) = \frac{1}{2}\| A_{i}x - b_{i}\|^{2}$ , where $A_{i}\in \mathbb{R}^{d\times d}$ is drawn from a standard multivariate normal distribution. The targets vector is set as $b_{i} = A_{i}(x^{\sharp} - \delta_{i})$ , where $x^{\sharp}\sim \mathcal{N}(0,\frac{1}{d} I_d)$ is sampled once per configuration, and $\delta_i\sim \mathcal{N}(0,\frac{\zeta^2}{d} I_d)$ introduces heterogeneity across machines. To incorporate stochasticity, we add Gaussian noise $\xi \sim \mathcal{N}(0,\frac{\sigma^2}{d} I_d)$ when querying local gradients, resulting in the noisy gradient estimate $\nabla f_{i}(x) + \xi$ . In our experiments, we set $d = 50$ . + +We compare our method with D-SGD, evaluating performance across three network topologies: ring, torus, + +![](images/138496586fd113ce3756b34503a53f19bdf5c17eb9b454db8dfcd0d07d826379.jpg) + +![](images/c96a1676715f5b95d6dbbef6f3926b74e1e92f2acad001bdc95bfb568efbab4c.jpg) + +![](images/08fe150b949f27c5ffa56e59bdb8f5c54dc2d4cfb15563511904d877f843f1c0.jpg) +Figure 1. Final error on synthetic least squares problem for different numbers of machines and various gradient noise variance $(\sigma^2)$ and heterogeneity $(\zeta^2)$ levels over ring, torus, and exponential graph topologies. We plot $\frac{1}{M}\sum_{i=1}^{M}\|x_T^i - x^*\|^2$ and $\frac{1}{M}\sum_{i=1}^{M}\|w_T^i - x^*\|^2$ for DAT-SGD and D-SGD, respectively. + +![](images/472c0ed8ea259b157c7b6524e35a10c046d6fdbe100314e322bf5fbbcf2fe348.jpg) + +![](images/c998dbcfff3f9c14f2b08dd583c50e909f6edb0ac04ec04893291ec65ba09432.jpg) + +and 1-peer exponential graph (Ying et al., 2021). The exponential graph is a fast-mixing topology for which $1 / \rho = \mathcal{O}(\log M)$ . For each method and topology, we perform a grid search over the learning rate $\eta \in \{0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05, 0.1\}$ and select the value that yields the lowest error after 100K iterations. For DAT-SGD, we use constant weights $\alpha_{t} = 1$ for all $t$ . + +In Figure 1, we plot the final error as a function of the number of machines, across four configurations defined by $\sigma, \zeta \in \{1, 10\}$ , with different colors indicating the underlying topology. For D-SGD, we observe that performance degrades on the ring and torus topologies starting from $M = 4$ and $M = 9$ , respectively, while it remains relatively stable on the 1-peer exponential graph. In contrast, our method improves with larger $M$ : performance steadily improves on the torus and exponential graphs, and performs better on the ring topology up to $M = 25$ before deteriorating. This suggests that, beyond a certain threshold (between $M = 25$ and 49), the network-dependent error term (which scales as $\mathcal{O}(1 / \rho T) = \mathcal{O}(M^2 / T)$ for the ring) becomes dominant. Overall, the results align with our theoretical findings, as DAT-SGD enables performance improvement for larger $M$ . We provide complete convergence curves in Appendix E. + +# 5.2. Image Classification with a Neural Network + +Next, we evaluate our method on the Fashion MNIST (Xiao et al., 2017) image classification task using the LeNet (LeCun et al., 1998) architecture. The data is partitioned among + +![](images/e9d55d7b99260b03b5f2d1455b50cb6d48ea4eeed04001a216270e8301a56f60.jpg) + +![](images/9fbc4bbb0f8d3b7ba857108f9bd97781562b4cb333b12be48c711132ddfd0a0d.jpg) + +![](images/5511a4f6b9c91e63178186c2c4074ed1f73896d71be6ec0039ca913cd5a44837.jpg) +Figure 2. Test accuracy on Fashion MNIST for different numbers of machines (across rows) and varying heterogeneity levels (across columns) on the ring and the Base-2 graph topologies. + +![](images/cdfe68558faef8fe7e4ac1e8c31dbe7204030142b803495ce5d6e35509cc0526.jpg) +Figure 3. Final test accuracy on Fashion MNIST for varying number of machines on the ring topology with heterogeneous data. + +![](images/2e72dabc8705cd9ca4b0f63384f469643d0fc83a4072b1198ce7950beca92bd0.jpg) + +workers following a Dirichlet distribution with parameter $\alpha$ , which controls the heterogeneity level (Hsu et al., 2019). + +We compare our method against D-SGD and $\mathrm{D}^2$ (Tang et al., 2018b), a decentralized optimization method specifically designed to improve robustness to data heterogeneity. Experiments are performed on the ring topology and the Base-2 Graph (Takezawa et al., 2023)—a time-varying, state-of-the-art topology for decentralized learning. For our method and D-SGD, we use momentum with parameter $\beta = 0.9$ . For each method and topology, the learning rate was selected via grid search over $\eta \in \{0.001, 0.01, 0.1\}$ . + +Unlike the synthetic least squares problem, this task is nonconvex. Following the heuristic proposed by Dahan & Levy (2025), we adopt a momentum-like update for Anytime averaging of the form $x_{t + 1} = \gamma_t x_t + (1 - \gamma_t) w_t$ , using a fixed value of $\gamma_t = 0.9$ . This choice was shown to enhance training stability and adaptability in non-convex landscapes. + +Figure 2 depicts the test accuracy for $M = 8$ and 16 machines under heterogeneous $(\alpha = 0.1)$ and nearly homogeneous $(\alpha = 10)$ data, with different colors indicating the compared methods. In the heterogeneous case, our method consistently outperforms the baselines across both topologies, with results on the ring matching (for $M = 8$ ) or nearly matching (for $M = 16$ ) those of the baselines on the well-connected Base-2 Graph. Conversely, and perhaps unexpectedly, under homogeneous data, D-SGD and $\mathrm{D}^2$ achieve better performance, motivating further investigation into this gap across data regimes in non-convex settings. In Figure 3, similar to Figure 1, we show the final accuracy for different numbers of machines on the ring topology with + +![](images/fc9e5b1997558b5e0e33a9b0afe5728cafba7d4eeb554bbe4d446fda4abc22f2.jpg) + +heterogeneous data ( $\alpha = 0.1$ ). Notably, the largest accuracy drop for DAT-SGD occurs between $M = 8$ and 16, whereas D-SGD and $\mathrm{D}^2$ degrade most between $M = 4$ and 8, demonstrating our claim of improved parallelism. + +# 6. Conclusion and Future Work + +In this work, we presented DAT-SGD, a simple yet powerful approach to decentralized SCO that raises the parallelism threshold, enabling to increase the number of machines in the network while maintaining linear speed-up. This is achieved by effectively mitigating the consensus distance using the Anytime SGD mechanism, which computes stochastic gradients at gradually changing query points, thereby limiting local model divergence. + +Several promising directions emerge from our work. One is integrating our method with gradient tracking, which has been shown to remove dependence on data heterogeneity (Koloskova et al., 2021). Moreover, we assume the gossip matrix is symmetric and doubly stochastic, allowing us to use Property 2.6 for a clear and simple analysis. Extending our results to asymmetric or row/column stochastic matrices, as in, e.g., (Assran et al., 2019), remains an open problem. Finally, establishing convergence bounds in the non-convex setting is a compelling challenge for future research. + +# Acknowledgments + +We thank the reviewers for their valuable comments. This research was partially supported by Israel PBC-VATAT, by the Technion Artificial Intelligence Hub (Tech.AI), and by the Israel Science Foundation (grant No. 3109/24). + +# 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 + +Agarwal, A., Bartlett, P. L., Ravikumar, P., and Wainwright, M. J. Information-theoretic lower bounds on the oracle complexity of stochastic convex optimization. IEEE Transactions on Information Theory, 58(5):3235-3249, 2012. +Antonakopoulos, K., Vu, D. Q., Cevher, V., Levy, K., and Mertikopoulos, P. Undergrad: A universal black-box optimization method with almost dimension-free convergence rate guarantees. In International Conference on Machine Learning, pp. 772-795. PMLR, 2022. +Assran, M., Loizou, N., Ballas, N., and Rabbat, M. Stochastic gradient push for distributed deep learning. In International Conference on Machine Learning, pp. 344-353. PMLR, 2019. +Aviv, R. Z., Hakimi, I., Schuster, A., and Levy, K. Y. Asynchronous distributed learning: Adapting to gradient delays without prior knowledge. In International Conference on Machine Learning, pp. 436-445. PMLR, 2021. +Boyd, S., Ghosh, A., Prabhakar, B., and Shah, D. Randomized gossip algorithms. IEEE transactions on information theory, 52(6):2508-2530, 2006. +Cutkosky, A. Anytime online-to-batch, optimism and acceleration. In International conference on machine learning, pp. 1446-1454. PMLR, 2019. +Dahan, T. and Levy, K. Y. SLowcalSGD: Slow Query Points Improve Local-SGD for Stochastic Convex Optimization. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=B29B1Re26Z. +Dahan, T. and Levy, K. Y. Do Stochastic, Feel Noiseless: Stable Stochastic Optimization via a Double Momentum Mechanism. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=zCZnEXF3bN. +Dekel, O., Gilad-Bachrach, R., Shamir, O., and Xiao, L. Optimal distributed online prediction using mini-batches. Journal of Machine Learning Research, 13(1), 2012. +Di Lorenzo, P. and Scutari, G. Next: In-network nonconvex optimization. IEEE Transactions on Signal and Information Processing over Networks, 2(2):120-136, 2016. + +Ene, A., Nguyen, H. L., and Vladu, A. Adaptive gradient methods for constrained convex optimization and variational inequalities. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 7314-7321, 2021. +He, L., Karimireddy, S. P., and Jaggi, M. Byzantine-robust decentralized learning via clippedgossip. arXiv preprint arXiv:2202.01545, 2022. +Hsu, T.-M. H., Qi, H., and Brown, M. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019. +Kairouz, P., McMahan, H. B., Avent, B., Bellet, A., Dennis, M., Bhagoji, A. N., Bonawitz, K., Charles, Z., Cormode, G., Cummings, R., et al. Advances and open problems in federated learning. Foundations and Trends® in Machine Learning, 14(1-2):1-210, 2021. +Kavis, A., Levy, K. Y., Bach, F., and Cevher, V. Unixgrad: A universal, adaptive algorithm with optimal guarantees for constrained optimization. Advances in neural information processing systems, 32, 2019. +Kempe, D., Dobra, A., and Gehrke, J. Gossip-based computation of aggregate information. In 44th Annual IEEE Symposium on Foundations of Computer Science, 2003. Proceedings., pp. 482-491. IEEE, 2003. +Koloskova, A., Stich, S., and Jaggi, M. Decentralized stochastic optimization and gossip algorithms with compressed communication. In International Conference on Machine Learning, pp. 3478-3487. PMLR, 2019. +Koloskova, A., Loizou, N., Boreiri, S., Jaggi, M., and Stich, S. A unified theory of decentralized sgd with changing topology and local updates. In International Conference on Machine Learning, pp. 5381-5393. PMLR, 2020. +Koloskova, A., Lin, T., and Stich, S. U. An improved analysis of gradient tracking for decentralized machine learning. Advances in Neural Information Processing Systems, 34:11422-11435, 2021. +Kong, L., Lin, T., Koloskova, A., Jaggi, M., and Stich, S. Consensus control for decentralized deep learning. In International Conference on Machine Learning, pp. 5686-5696. PMLR, 2021. +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. +Li, M., Andersen, D. G., Smola, A. J., and Yu, K. Communication efficient distributed machine learning with the parameter server. Advances in Neural Information Processing Systems, 27, 2014. + +Li, S., Zhou, T., Tian, X., and Tao, D. Learning to collaborate in decentralized learning of personalized models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9766-9775, 2022. +Li, X., Yang, W., Wang, S., and Zhang, Z. Communication-efficient local decentralized sgd methods. arXiv preprint arXiv:1910.09126, 2019. +Lian, X., Zhang, C., Zhang, H., Hsieh, C.-J., Zhang, W., and Liu, J. Can decentralized algorithms outperform centralized algorithms? a case study for decentralized parallel stochastic gradient descent. Advances in neural information processing systems, 30, 2017. +Lu, Y. and De Sa, C. Optimal complexity in decentralized training. In International conference on machine learning, pp. 7111-7123. PMLR, 2021. +McMahan, B., Moore, E., Ramage, D., Hampson, S., and y Arcas, B. A. Communication-efficient learning of deep networks from decentralized data. In Artificial intelligence and statistics, pp. 1273-1282. PMLR, 2017. +Nedic, A. and Ozdaglar, A. Distributed subgradient methods for multi-agent optimization. IEEE Transactions on Automatic Control, 54(1):48-61, 2009. +Nedic, A., Olshovsky, A., and Shi, W. Achieving geometric convergence for distributed optimization over time-varying graphs. SIAM Journal on Optimization, 27(4): 2597-2633, 2017. +Nemirovski, A., Juditsky, A., Lan, G., and Shapiro, A. Robust stochastic approximation approach to stochastic programming. SIAM Journal on optimization, 19(4):1574-1609, 2009. +Nemirovski, A. S. and Yudin, D. B. Problem complexity and method efficiency in optimization. 1983. +Pu, S. and Nedic, A. Distributed stochastic gradient tracking methods. Mathematical Programming, 187(1):409-457, 2021. +Pu, S., Olshevsky, A., and Paschalidis, I. C. A sharp estimate on the transient time of distributed stochastic gradient descent. IEEE Transactions on Automatic Control, 67 (11):5900-5915, 2021. +Shi, W., Ling, Q., Yuan, K., Wu, G., and Yin, W. On the linear convergence of the admm in decentralized consensus optimization. IEEE Transactions on Signal Processing, 62(7):1750-1761, 2014. +Takezawa, Y., Sato, R., Bao, H., Niwa, K., and Yamada, M. Beyond exponential graph: Communication-efficient topologies for decentralized learning via finite-time convergence. Advances in Neural Information Processing Systems, 36:76692-76717, 2023. + +Tang, H., Gan, S., Zhang, C., Zhang, T., and Liu, J. Communication compression for decentralized training. Advances in Neural Information Processing Systems, 31, 2018a. +Tang, H., Lian, X., Yan, M., Zhang, C., and Liu, J. $D^2$ : Decentralized training over decentralized data. In International Conference on Machine Learning, pp. 4848-4856. PMLR, 2018b. +Tsitsiklis, J. N. Problems in decentralized decision making and computation. PhD thesis, Massachusetts Institute of Technology, 1984. +Verbraeken, J., Wolting, M., Katzy, J., Kloppenburg, J., Verbelen, T., and Rellermeyer, J. S. A survey on distributed machine learning. *Acm computing surveys (csur)*, 53(2): 1-33, 2020. +Xiao, H., Rasul, K., and Vollgraf, R. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747, 2017. +Xiao, L. and Boyd, S. Fast linear iterations for distributed averaging. Systems & Control Letters, 53(1):65-78, 2004. +Ying, B., Yuan, K., Chen, Y., Hu, H., Pan, P., and Yin, W. Exponential graph is provably efficient for decentralized deep training. Advances in Neural Information Processing Systems, 34:13975-13987, 2021. +Yuan, K., Chen, Y., Huang, X., Zhang, Y., Pan, P., Xu, Y., and Yin, W. Decentlam: Decentralized momentum sgd for large-batch deep training. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3029-3039, 2021. + +# A. Anytime SGD Analysis + +In this section, we discuss key properties of Anytime SGD with biased gradients. The main result is Lemma A.3, which will later be adapted to the decentralized, gossip-based communication setup in Appendix B + +For an initial iterate $w_{1} \in \mathbb{R}^{d}$ , learning rate $\eta > 0$ , and non-negative weights $\{\alpha_{t}\}_{t \geq 1}$ , we consider the sequences $\{w_{t}\}_{t \geq 1}$ and $\{x_{t}\}_{t \geq 1}$ , defined by the update rules: + +$$ +w _ {t + 1} = w _ {t} - \eta \alpha_ {t} g _ {t}, \tag {15} +$$ + +$$ +x _ {t + 1} = \frac {\alpha_ {1 : t - 1}}{\alpha_ {1 : t}} x _ {t} + \frac {\alpha_ {t}}{\alpha_ {1 : t}} w _ {t + 1}, \quad \text {w i t h} \quad x _ {1} = w _ {1}. \tag {16} +$$ + +Here, $g_{t}$ is a biased estimate of the gradient of some function $f$ at $x_{t}$ . + +The following result mimics the gradient inequality for the $\{\alpha_{t}\}_{t\geq 1}$ -weighted averages. + +Lemma A.1 (Cutkosky, 2019; Theorem 1, Dahan & Levy, 2024). Let $f: \mathbb{R}^d \to \mathbb{R}$ be a convex function with global minimum $f^* := f(x^*)$ , and let the sequence $\{x_t\}_{t \geq 1}$ be defined as in Equation (16). Then, for any $t \geq 1$ , the following holds: + +$$ +0 \leq \alpha_ {1: t} (f (x _ {t}) - f ^ {*}) \leq \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} \nabla f (x _ {\tau}) ^ {\top} (w _ {\tau} - x ^ {*}). +$$ + +Next, we present a regret bound for online gradient descent with weighted gradients. + +Lemma A.2 (Cutkosky, 2019; Lemma 2, Dahan & Levy, 2024). Consider the update rule in Equation (15). Then, for all $t \geq 1$ , it holds that: + +$$ +\sum_ {\tau = 1} ^ {t} \alpha_ {\tau} g _ {\tau} ^ {\top} (w _ {\tau} - x ^ {*}) \leq \frac {\| w _ {1} - x ^ {*} \| ^ {2}}{2 \eta} + \frac {\eta}{2} \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} ^ {2} \| g _ {\tau} \| ^ {2}. +$$ + +The following result is fundamental to our analysis and plays a key role in establishing our main proof. The analysis closely follows that of Dahan & Levy (2024) and is included here for completeness; see Appendix F therein for further details. + +Lemma A.3. For the sequences $\{w_t\}_{t > 1}$ and $\{x\}_{t > 1}$ defined in Equations (15) and (16), the following holds for any $t \geq 1$ : + +$$ +\alpha_ {1: t} \mathbb {E} [ f (x _ {t}) - f ^ {*} ] \leq \frac {\| w _ {1} - x ^ {*} \| ^ {2}}{\eta} + \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| g _ {\tau} \| ^ {2} + 4 \eta T \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2}. +$$ + +Proof. Lemma A.1 implies the following: + +$$ +\begin{array}{l} \alpha_ {1: t} \mathbb {E} [ f (x _ {t}) - f ^ {*} ] \leq \mathbb {E} \left[ \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} \nabla f (x _ {\tau}) ^ {\top} (w _ {t} - x ^ {*}) \right] \\ = \mathbb {E} \left[ \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} g _ {\tau} ^ {\top} \left(w _ {\tau} - x ^ {*}\right) \right] + \mathbb {E} \left[ \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} \left(\nabla f (x _ {\tau}) - g _ {\tau}\right) ^ {\top} \left(w _ {\tau} - x ^ {*}\right) \right] \\ \leq \frac {\left\| w _ {1} - x ^ {*} \right\| ^ {2}}{2 \eta} + \frac {\eta}{2} \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} ^ {2} \mathbb {E} \| g _ {\tau} \| ^ {2} + \sum_ {\tau = 1} ^ {t} \mathbb {E} \left[ \alpha_ {\tau} (\nabla f (x _ {\tau}) - g _ {\tau}) ^ {\top} (w _ {\tau} - x ^ {*}) \right], \tag {17} \\ \end{array} +$$ + +where the last inequality follows from Lemma A.2. Every element in the rightmost sum can be bounded using Cauchy-Schwarz inequality and Young's inequality, $a \cdot b \leq \frac{1}{2\theta} \| a \|^2 + \frac{\theta}{2} \| b \|^2$ , which holds for any $\theta > 0$ , yielding: + +$$ +\begin{array}{l} \mathbb {E} \left[ \alpha_ {\tau} (\nabla f (x _ {\tau}) - g _ {\tau}) ^ {\top} (w _ {\tau} - x ^ {*}) \right] = \mathbb {E} \left[ \alpha_ {\tau} (\nabla f (x _ {\tau}) - \mathbb {E} g _ {\tau}) ^ {\top} (w _ {\tau} - x ^ {*}) \right] \\ \leq \mathbb {E} \left[ \alpha_ {\tau} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| \cdot \| w _ {\tau} - x ^ {*} \| \right] \\ \leq \frac {\alpha_ {\tau} ^ {2}}{2 \theta} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f \left(x _ {\tau}\right) \| ^ {2} + \frac {\theta}{2} \mathbb {E} \| w _ {\tau} - x ^ {*} \| ^ {2}, \tag {18} \\ \end{array} +$$ + +where the first equality follows from the law of total expectation. + +Substituting (18) into (17) gives: + +$$ +\begin{array}{l} \alpha_ {1: t} \left(f (x _ {t}) - f ^ {*}\right) \leq \frac {\| w _ {1} - x ^ {*} \| ^ {2}}{2 \eta} + \frac {\eta}{2} \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} ^ {2} \mathbb {E} \| g _ {\tau} \| ^ {2} + \frac {1}{2 \theta} \sum_ {\tau = 1} ^ {t} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2} + \frac {\theta}{2} \sum_ {\tau = 1} ^ {t} \mathbb {E} \| w _ {\tau} - x ^ {*} \| ^ {2} \\ \leq \frac {\left\| w _ {1} - x ^ {*} \right\| ^ {2}}{2 \eta} + \frac {\eta}{2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| g _ {\tau} \| ^ {2} + \frac {1}{2 \theta} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2} + \frac {\theta}{2} \sum_ {\tau = 1} ^ {T} \mathbb {E} \| w _ {\tau} - x ^ {*} \| ^ {2}, \\ \end{array} +$$ + +where the last inequality follows from the last three terms being monotonically increasing with $t$ . Lemma 3 of Dahan & Levy (2024) guarantees that for sequences $\{w_t\}_{t \geq 1}$ and $\{x\}_{t \geq 1}$ as defined in Equations (15) and (16), the following holds: + +$$ +\sum_ {\tau = 1} ^ {T} \mathbb {E} \| w _ {t} - x ^ {*} \| ^ {2} \leq 2 T \| w _ {1} - x ^ {*} \| ^ {2} + 2 T \eta^ {2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| g _ {\tau} \| ^ {2} + 1 6 \eta^ {2} T ^ {2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2}, +$$ + +which in turn implies that for $\theta = \frac{1}{4\eta T}$ : + +$$ +\begin{array}{l} \alpha_ {1: t} \mathbb {E} [ f (x _ {t}) - f ^ {*} ] \leq \left(\frac {1}{2 \eta} + \theta T\right) \| w _ {1} - x ^ {*} \| ^ {2} + \left(\frac {\eta}{2} + \theta T \eta^ {2}\right) \sum_ {t = 1} ^ {T} \alpha_ {t} ^ {2} \mathbb {E} \| g _ {t} \| ^ {2} \\ + \left(\frac {1}{2 \theta} + 8 \theta \eta^ {2} T ^ {2}\right) \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2} \\ = \frac {3 \| w _ {1} - x ^ {*} \| ^ {2}}{4 \eta} + \frac {3 \eta}{4} \sum_ {t = 1} ^ {T} \alpha_ {t} ^ {2} \mathbb {E} \| g _ {t} \| ^ {2} + 4 \eta T \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \| ^ {2} \\ \leq \frac {\left\| w _ {1} - x ^ {*} \right\| ^ {2}}{\eta} + \eta \sum_ {t = 1} ^ {T} \alpha_ {t} ^ {2} \mathbb {E} \left\| g _ {t} \right\| ^ {2} + 4 \eta T \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \left\| \mathbb {E} g _ {\tau} - \nabla f (x _ {\tau}) \right\| ^ {2}, \\ \end{array} +$$ + +thus concluding the proof. + +# B. Proof of Theorem 4.1 + +In this section, we prove our main result. To simplify the presentation and analysis, we first introduce some notations: + +$$ +X _ {t} := \left( \begin{array}{c c c c} x _ {t} ^ {1} & x _ {t} ^ {2} & \dots & x _ {t} ^ {M} \end{array} \right) \in \mathbb {R} ^ {d \times M}, \qquad \bar {X} _ {t} := X _ {t} \frac {1}{M} \mathbf {1 1} ^ {\top} = \left( \begin{array}{c c c c} \bar {x} _ {t} & \bar {x} _ {t} & \dots & \bar {x} _ {t} \end{array} \right) \in \mathbb {R} ^ {d \times M}, +$$ + +$$ +W _ {t} := \left( \begin{array}{c c c c} w _ {t} ^ {1} & w _ {t} ^ {2} & \dots & w _ {t} ^ {M} \end{array} \right) \in \mathbb {R} ^ {d \times M}, \quad \bar {W} _ {t} := W _ {t} \frac {1}{M} \mathbf {1} ^ {\top} = \left( \begin{array}{c c c c} \bar {w} _ {t} & \bar {w} _ {t} & \dots & \bar {w} _ {t} \end{array} \right) \in \mathbb {R} ^ {d \times M}, +$$ + +$$ +G _ {t} := \left( \begin{array}{c c c c} g _ {t} ^ {1} & g _ {t} ^ {2} & \dots & g _ {t} ^ {M} \end{array} \right) \in \mathbb {R} ^ {d \times M}, \qquad \bar {G} _ {t} := G _ {t} \frac {1}{M} \mathbf {1 1} ^ {\top} = \left( \begin{array}{c c c c} \bar {g} _ {t} & \bar {g} _ {t} & \dots & \bar {g} _ {t} \end{array} \right) \in \mathbb {R} ^ {d \times M}, +$$ + +with $\bar{x}_t = \frac{1}{M}\sum_{i=1}^{M}x_t^i$ , $\bar{w}_t = \frac{1}{M}\sum_{i=1}^{M}w_t^i$ , and $\bar{g}_t = \frac{1}{M}\sum_{i=1}^{M}g_t^i$ . + +Denoting $\delta_t = \frac{\alpha_t}{\alpha_{1:t}}$ , our Decentralized Anytime SGD algorithm can be expressed using matrix notation as follows: + +Local update and averaging: $\left\{ \begin{array}{ll}W_{t + \frac{1}{2}} = W_t - \eta \alpha_tG_t\\ X_{t + \frac{1}{2}} = (1 - \delta_t)X_t + \delta_tW_{t + \frac{1}{2}} \end{array} \right.$ + +Gossip communication: $\left\{ \begin{array}{ll}W_{t + 1} = W_{t + \frac{1}{2}}P\\ X_{t + 1} = X_{t + \frac{1}{2}}P. \end{array} \right.$ + +We also define the expected average distance between local elements and their mean, commonly referred to as the consensus distance. Specifically, we define consensus distances for the iterates, the query points (i.e., the $\{\alpha_{t}\}_{t\geq 1}$ -weighted iterates), + +and the gradients: + +$$ +\begin{array}{l} \Gamma_ {t} := \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \big \| x _ {t} ^ {i} - \bar {x} _ {t} \big \| ^ {2} = \frac {1}{M} \mathbb {E} \big \| X _ {t} - \bar {X} _ {t} \big \| _ {F} ^ {2}, \\ \Xi_ {t} := \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \big \| w _ {t} ^ {i} - \bar {w} _ {t} \big \| ^ {2} = \frac {1}{M} \mathbb {E} \big \| W _ {t} - \bar {W} _ {t} \big \| _ {F} ^ {2}, \\ \Psi_ {t} := \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \left\| g _ {t} ^ {i} - \bar {g} _ {t} \right\| ^ {2} = \frac {1}{M} \mathbb {E} \left\| G _ {t} - \bar {G} _ {t} \right\| _ {F} ^ {2}. \\ \end{array} +$$ + +First, we establish that the sequence of query points average over machines $\{\bar{x}_t\}_{t\geq 1}$ is indeed an $\{\alpha_{t}\}_{t\geq 1}$ -weighted average of the sequence of iterates average over machines $\{\bar{w}_t\}_{t\geq 1}$ . This allows us to apply the results from Appendix A on Anytime SGD to analyze the consensus iterates. + +Lemma B.1. The sequence $\{\bar{x}_t\}_{t\geq 1}$ is an $\{\alpha_t\}_{t\geq 1}$ -weighted average of the sequence $\{\bar{w}_t\}_{t\geq 1}$ . + +Proof. Using matrix notation and the linearity of averaging, we have: + +$$ +\bar {X} _ {t + 1} = \bar {X} _ {t + \frac {1}{2}} P = \bar {X} _ {t + \frac {1}{2}} = \frac {\alpha_ {1 : t - 1}}{\alpha_ {1 : t}} \bar {X} _ {t} + \frac {\alpha_ {t}}{\alpha_ {1 : t}} \bar {W} _ {t + \frac {1}{2}} = \frac {\alpha_ {1 : t - 1}}{\alpha_ {1 : t}} \bar {X} _ {t} + \frac {\alpha_ {t}}{\alpha_ {1 : t}} \bar {W} _ {t + \frac {1}{2}} P = \frac {\alpha_ {1 : t - 1}}{\alpha_ {1 : t}} \bar {X} _ {t} + \frac {\alpha_ {t}}{\alpha_ {1 : t}} \bar {W} _ {t + 1}, +$$ + +where the second and fourth equalities follow from Lemma D.1, implying that gossip communication preserves averages. + +Next, we establish the convergence of Algorithm 2, as stated in Theorem 4.1, which we restate here for ease of reference. + +Theorem 4.1. Under Assumptions 2.1-2.3, consider Algorithm 2 with linear weights $\alpha_{t} = t$ and a learning rate given by + +$$ +\eta = \min \left\{\frac {1}{2 4 L T}, \frac {\rho^ {2}}{K}, \frac {D _ {1} \sqrt {M}}{\sqrt {3} \sigma T ^ {3 / 2}}, \sqrt {\frac {D _ {1}}{2 K \tilde {\sigma}}} \frac {\rho}{T} \right\}, +$$ + +where $D_1^2 \coloneqq \| w_1 - x^* \|^2$ , $K^2 \coloneqq 5120L^2$ , and $\tilde{\sigma}^2 \coloneqq 2\sigma^2 + \zeta^2$ . Then, for all $T \geq 1$ , the following bound holds: + +$$ +\mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] \leq \mathcal {O} \left(\frac {\sigma D _ {1}}{\sqrt {M T}} + \frac {D _ {1} ^ {3 / 2} \sqrt {L \tilde {\sigma}}}{\rho T} + \frac {L D _ {1} ^ {2}}{T}\right), +$$ + +where $\bar{x}_T\coloneqq \frac{1}{M}\sum_{i = 1}^{M}x_T^i$ + +Proof. For any $t \in [T]$ , define $\Delta_t \coloneqq \mathbb{E}[f(\bar{x}_t) - f^*]$ . We analyze the consensus iterates, which (according to Lemma B.1) follow the structure of Anytime SGD as defined in Equations (15) and (16), namely, + +$$ +\bar {w} _ {t + 1} = \bar {w} _ {t} - \eta \alpha_ {t} \bar {g} _ {t}, \quad \text {a n d} \quad \bar {x} _ {t + 1} = (1 - \delta_ {t}) \bar {x} _ {t} + \delta_ {t} \bar {w} _ {t + 1}. +$$ + +Therefore, by Lemma A.3, we have: + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {\| \bar {w} _ {1} - x ^ {*} \| ^ {2}}{\eta} + \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \bar {g} _ {\tau} \| ^ {2} + 4 \eta T \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} \\ = \frac {D _ {1} ^ {2}}{\eta} + \eta \underbrace {\sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \left\| \bar {g} _ {\tau} \right\| ^ {2}} _ {(A)} + 4 \eta T \cdot B _ {T}, \tag {19} \\ \end{array} +$$ + +where $B_{T} \coloneqq \sum_{\tau = 1}^{T}\alpha_{\tau}^{2}\mathbb{E}\| \mathbb{E}\bar{g}_{\tau} - \nabla f(\bar{x}_{\tau})\|^{2}$ , and we also used $\bar{w}_1 = w_1$ + +Bounding (A). We focus on $\mathbb{E}\| \bar{g}_{\tau}\|^{2}$ . By adding and subtracting $\mathbb{E}\bar{g}_{\tau}$ and $\nabla f(\bar{x}_{\tau})$ , and applying the inequality $\| a + b + c\| ^2\leq 3\| a\| ^2 +3\| b\| ^2 +3\| c\| ^2$ , we obtain: + +$$ +\begin{array}{l} \mathbb {E} \| \bar {g} _ {\tau} \| ^ {2} = \mathbb {E} \| \bar {g} _ {\tau} - \mathbb {E} \bar {g} _ {\tau} + \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) + \nabla f (\bar {x} _ {\tau}) \| ^ {2} \\ \leq 3 \mathbb {E} \| \bar {g} _ {\tau} - \mathbb {E} \bar {g} _ {\tau} \| ^ {2} + 3 \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} + 3 \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2} \\ \leq \frac {3 \sigma^ {2}}{M} + 3 \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} + 3 \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}, \\ \end{array} +$$ + +where the last inequality holds because $\left\{g_{\tau}^{i} - \nabla f_{i}(x_{\tau}^{i})\right\}_{i\in [M]}$ are independent, zero-mean, and have variance at most $\sigma^2$ + +$$ +\mathbb {E} \| \bar {g} _ {\tau} - \mathbb {E} \bar {g} _ {\tau} \| ^ {2} = \mathbb {E} \left\| \frac {1}{M} \sum_ {i = 1} ^ {M} \left(g _ {\tau} ^ {i} - \nabla f _ {i} (x _ {\tau} ^ {i})\right) \right\| ^ {2} = \frac {1}{M ^ {2}} \sum_ {i = 1} ^ {M} \mathbb {E} \left\| g _ {t} ^ {i} - \nabla f _ {i} (x _ {\tau} ^ {i}) \right\| ^ {2} \leq \frac {\sigma^ {2}}{M}. +$$ + +Thus, $(A)$ is bounded as follows, + +$$ +\sum_ {\tau = 1} ^ {T} \alpha_ {t} ^ {2} \mathbb {E} \| \bar {g} _ {\tau} \| ^ {2} \leq \frac {3 \sigma^ {2}}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 3 B _ {T} + 3 \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. +$$ + +Plugging this bound back into (19), we get: + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \eta \left(\frac {3 \sigma^ {2}}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 3 V _ {T} + 3 \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}\right) + 4 \eta T \cdot V _ {T} \\ = \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + (3 \eta + 4 \eta T) \cdot B _ {T} + 3 \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2} \\ \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 8 \eta T \cdot B _ {T} + 3 \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. \tag {20} \\ \end{array} +$$ + +For linear weights $\alpha_{t} = t$ and learning rate upper bounded by $\frac{\rho^2}{K}$ , Lemma 4.3 provides the following bound on $B_T$ (see proof in Appendix B.2 below): + +$$ +B _ {T} \leq \frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{2 \rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}. +$$ + +Substituting this bound back to Equation (20), we obtain: + +$$ +\alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {4 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 3 \eta \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2}. +$$ + +The rightmost term is be bounded as follows: + +$$ +\sum_ {\tau = 1} ^ {T} \alpha_ {t} ^ {2} \mathbb {E} \| \nabla f (\bar {x} _ {\tau}) \| ^ {2} \leq 2 L \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \Delta_ {\tau} \leq 4 L \sum_ {\tau = 1} ^ {T} \alpha_ {1: \tau} \Delta_ {\tau}, +$$ + +where the first inequality follows from Lemma D.2 (i.e., $\| \nabla f(\bar{x}_{\tau})\|^{2}\leq 2L(f(\bar{x}_{\tau}) - f^{*}))$ , and the second inequality arises from $\alpha_{t}^{2} = t^{2}\leq t(t + 1) = 2\alpha_{1:t}$ . Therefore, + +$$ +\begin{array}{l} \alpha_ {1: t} \Delta_ {t} \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {4 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + 1 2 L \eta \sum_ {\tau = 1} ^ {T} \alpha_ {1: \tau} \Delta_ {\tau} \\ \leq \frac {D _ {1} ^ {2}}{\eta} + \frac {3 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {4 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {1}{2 T} \sum_ {\tau = 1} ^ {T} \alpha_ {1: \tau} \Delta_ {\tau}, \\ \end{array} +$$ + +where the last inequality holds true for $\eta \leq \frac{1}{24LT}$ . Applying Lemma D.3 with $a_{t} = \alpha_{1:t}\Delta_{t}$ and $b = \frac{D_1^2}{\eta} +\frac{3\sigma^2\eta}{M}\sum_{\tau = 1}^{T}\alpha_\tau^2 +$ $\frac{4K^2\tilde{\sigma}^2\eta^3T}{\rho^4}\sum_{\tau = 1}^{T}\alpha_\tau^2$ yields (for $t = T$ ): + +$$ +\begin{array}{l} \alpha_ {1: T} \Delta_ {T} \leq 2 b \\ \leq \frac {2 D _ {1} ^ {2}}{\eta} + \frac {6 \sigma^ {2} \eta}{M} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} + \frac {8 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \\ \leq \frac {2 D _ {1} ^ {2}}{\eta} + \frac {6 \sigma^ {2} \eta T ^ {3}}{M} + \frac {8 K ^ {2} \tilde {\sigma} ^ {2} \eta^ {3} T ^ {4}}{\rho^ {4}}, \\ \end{array} +$$ + +where the second inequality holds as $\sum_{t=1}^{T} \alpha_t^2 = \sum_{t=1}^{T} t^2 \leq T^3$ . Thus, employing Lemma D.6 with $A = 2D_1^2$ , $B = \frac{6\sigma^2T^3}{M}$ , $C = \frac{8K^2\tilde{\sigma}^2T^4}{\rho^4}$ , and $\eta_1 = \min \left\{\frac{1}{24LT}, \frac{\rho^2}{K}\right\}$ , we get: + +$$ +\begin{array}{l} \alpha_ {1: T} \Delta_ {T} \leq \frac {A}{\eta_ {1}} + 2 \sqrt {A B} + 2 A ^ {3 / 4} C ^ {1 / 4} \\ \leq 2 D _ {1} ^ {2} \left(2 4 L T + \frac {K}{\rho^ {2}}\right) + 2 \sqrt {\frac {1 2 D _ {1} ^ {2} \sigma^ {2} T ^ {3}}{M}} + 2 \left(2 D _ {1} ^ {2}\right) ^ {3 / 4} \left(\frac {8 K ^ {2} \tilde {\sigma} ^ {2} T ^ {4}}{\rho^ {4}}\right) ^ {1 / 4} \\ = \frac {4 \sqrt {3} D _ {1} \sigma T ^ {3 / 2}}{\sqrt {M}} + \frac {4 \sqrt {2} D _ {1} ^ {3 / 2} \sqrt {K \tilde {\sigma}} T}{\rho} + 4 8 L D _ {1} ^ {2} T + \frac {2 K D _ {1} ^ {2}}{\rho^ {2}}. \\ \end{array} +$$ + +Finally, dividing by $\alpha_{1:T} = \frac{T(T + 1)}{2} \geq \frac{T^2}{2}$ , we obtain the result as: + +$$ +\begin{array}{l} \Delta_ {T} = \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] \leq \frac {8 \sqrt {3} D _ {1} \sigma}{\sqrt {M T}} + \frac {8 \sqrt {2} D _ {1} ^ {3 / 2} \sqrt {K \tilde {\sigma}}}{\rho T} + \frac {9 6 L D _ {1} ^ {2}}{T} + \frac {4 K D _ {1} ^ {2}}{\rho^ {2} T ^ {2}} \\ = \mathcal {O} \left(\frac {D _ {1} \sigma}{\sqrt {M T}} + \frac {D _ {1} ^ {3 / 2} \sqrt {L (\sigma + \zeta)}}{\rho T} + \frac {L D _ {1} ^ {2}}{T} + \frac {L D _ {1} ^ {2}}{\rho^ {2} T ^ {2}}\right). \\ \end{array} +$$ + +# B.1. Proof of Corollary 4.2 + +Next, we demonstrate the convergence of the local iterates. + +Proof. Let $i \in [M]$ . By the smoothness of the $f$ , it holds that: + +$$ +\begin{array}{l} \mathbb {E} \left[ f \left(x _ {T} ^ {i}\right) - f ^ {*} \right] = \mathbb {E} \left[ f \left(x _ {T} ^ {i}\right) - f (\bar {x} _ {T}) \right] + \mathbb {E} \left[ f (\bar {x} _ {T}) - f ^ {*} \right] \\ \leq \mathbb {E} \left[ \nabla f (\bar {x} _ {T}) ^ {\top} (x _ {T} ^ {i} - \bar {x} _ {T}) + \frac {L}{2} \left\| x _ {T} ^ {i} - \bar {x} _ {T} \right\| ^ {2} \right] + \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] \\ \leq \frac {1}{2 \theta} \mathbb {E} \left\| \nabla f (\bar {x} _ {T}) \right\| ^ {2} + \frac {\theta + L}{2} \mathbb {E} \left\| x _ {T} ^ {i} - \bar {x} _ {T} \right\| ^ {2} + \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ], \\ \end{array} +$$ + +where the last inequality holds for any $\theta > 0$ due to Young's inequality, $a^\top b \leq \frac{1}{2\theta} \| a \|^2 + \frac{\theta}{2} \| b \|^2$ . Setting $\theta = L$ and using Lemma D.2 to upper bound $\| \nabla f(\bar{x}_T) \|^2$ by $2L(f(\bar{x}_T) - f^*)$ , we get: + +$$ +\begin{array}{l} \mathbb {E} [ f (x _ {T} ^ {i}) - f ^ {*} ] \leq \frac {1}{2 L} \mathbb {E} \| \nabla f (\bar {x} _ {T}) \| ^ {2} + L \mathbb {E} \left\| x _ {T} ^ {i} - \bar {x} _ {T} \right\| ^ {2} + \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] \\ \leq 2 \mathbb {E} \left[ f (\bar {x} _ {T}) - f ^ {*} \right] + L \mathbb {E} \left\| x _ {T} ^ {i} - \bar {x} _ {T} \right\| ^ {2} \\ \leq 2 \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] + L \sum_ {i = 1} ^ {M} \mathbb {E} \left\| x _ {T} ^ {i} - \bar {x} _ {T} \right\| ^ {2} \\ = 2 \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] + L M \Gamma_ {T}. \\ \end{array} +$$ + +Using Lemma C.3, which applies under the conditions of Theorem 4.1, we can bound $\Gamma_T$ by $2560\tilde{\sigma}^2\eta^2 /\rho^4$ , where $\tilde{\sigma}^2\coloneqq 2\sigma^2 +\zeta^2$ . In addition, the learning rate in Theorem 4.1 satisfies $\eta^2\leq D_1\rho^2 /2K\tilde{\sigma} T^2$ , where $K\coloneqq \sqrt{5120} L$ . Therefore, we obtain: + +$$ +\mathbb {E} [ f (x _ {T} ^ {i}) - f ^ {*} ] \leq 2 \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] + \frac {2 5 6 0 L M \tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}} \leq 2 \mathbb {E} [ f (\bar {x} _ {T}) - f ^ {*} ] + \frac {8 \sqrt {5} M D _ {1} \tilde {\sigma}}{\rho^ {2} T ^ {2}}. +$$ + +Plugging the bound on $\mathbb{E}[f(\bar{x}_T) - f^*]$ from Theorem 4.1 establishes the result: + +$$ +\begin{array}{l} \mathbb {E} \left[ f \left(x _ {T} ^ {i}\right) - f ^ {*} \right] \leq \frac {1 6 \sqrt {3} D _ {1} \sigma}{\sqrt {M T}} + \frac {1 6 \sqrt {2} D _ {1} ^ {3 / 2} \sqrt {K \tilde {\sigma}}}{\rho T} + \frac {1 9 2 L D _ {1} ^ {2}}{T} + \frac {8 K D _ {1} ^ {2}}{\rho^ {2} T ^ {2}} + \frac {8 \sqrt {5} M D _ {1} \tilde {\sigma}}{\rho^ {2} T ^ {2}} \\ = \mathcal {O} \left(\frac {D _ {1} \sigma}{\sqrt {M T}} + \frac {D _ {1} ^ {3 / 2} \sqrt {L \tilde {\sigma}}}{\rho T} + \frac {L D _ {1} ^ {2}}{T} + \frac {M D _ {1} \tilde {\sigma}}{\rho^ {2} T ^ {2}}\right). \\ \end{array} +$$ + +![](images/71f404d677df132e49fa3284fd207832f4d30e8d04bc0950cca5c8f7d9802e9b.jpg) + +In terms on the total of samples $N = MT$ , the established rate is given by: + +$$ +\mathbb {E} \left[ f \left(x _ {T} ^ {i}\right) - f ^ {*} \right] \leq \mathcal {O} \left(\frac {D _ {1} \sigma}{\sqrt {N}} + \frac {M D _ {1} ^ {3 / 2} \sqrt {L \tilde {\sigma}}}{\rho N} + \frac {M L D _ {1} ^ {2}}{N} + \frac {M ^ {3} D _ {1} \tilde {\sigma}}{\rho^ {2} N ^ {2}}\right). +$$ + +Therefore, ignoring the dependence on $L$ , $D_{1}$ , $\sigma$ and $\zeta$ (i.e., assuming they all equal 1), the parallelism bound (i.e., the maximal asymptotic $M$ for which the rate is $\mathcal{O}(1 / \sqrt{N})$ ) is: + +$$ +M \leq \mathcal {O} \left(\min \left\{\rho \sqrt {N}, \sqrt {N}, \rho^ {2 / 3} \sqrt {N} \right\}\right) = \mathcal {O} (\rho \sqrt {N}). +$$ + +# B.2. Proof of Lemma 4.3 + +Proof. We aim to prove that: + +$$ +B _ {T} := \mathbb {E} \left[ \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} \right] \leq \frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{2 \rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}, +$$ + +where $K^2 \coloneqq 5120L^2$ and $\tilde{\sigma}^2 \coloneqq 2\sigma^2 + \zeta^2$ . + +Focusing on $\mathbb{E}\| \mathbb{E}\bar{g}_{\tau} - \nabla f(\bar{x}_{\tau})\|^{2}$ and using the convexity of $\| \cdot \| ^2$ , we apply Jensen's inequality to obtain: + +$$ +\begin{array}{l} \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} = \mathbb {E} \left\| \frac {1}{M} \sum_ {i = 1} ^ {M} \left(\nabla f _ {i} (x _ {\tau} ^ {i}) - \nabla f _ {i} (\bar {x} _ {\tau})\right) \right\| ^ {2} \\ \leq \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \left| \left| \nabla f _ {i} (x _ {\tau} ^ {i}) - \nabla f _ {i} (\bar {x} _ {\tau}) \right| \right| ^ {2} \\ \leq \frac {L ^ {2}}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \left\| x _ {\tau} ^ {i} - \bar {x} _ {\tau} \right\| ^ {2} \\ = L ^ {2} \Gamma_ {\tau}, \\ \end{array} +$$ + +where the second inequality follows from the smoothness of $f_{i}$ . Using Lemma C.3, which applies specifically to linear weights $\alpha_{t} = t$ and a learning rate bounded as $\eta \leq \frac{\rho^2}{K} = \frac{\rho^2}{8\sqrt{80}L}$ we bound $\Gamma_{\tau}$ and derive a corresponding bound for $B_{T}$ : + +$$ +B _ {T} = \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \mathbb {E} \| \mathbb {E} \bar {g} _ {\tau} - \nabla f (\bar {x} _ {\tau}) \| ^ {2} \leq L ^ {2} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} \Gamma_ {\tau} \leq \frac {2 5 6 0 L ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2} = \frac {K ^ {2} \tilde {\sigma} ^ {2} \eta^ {2}}{2 \rho^ {4}} \sum_ {\tau = 1} ^ {T} \alpha_ {\tau} ^ {2}, +$$ + +which concludes the proof. + +# C. Consensus Recursion Analysis + +In this section, we analyze the consensus distances $\Gamma_t, \Xi_t$ , and $\Psi_t$ . We begin by observing that $\Gamma_t$ follows a recursive relation (Equation (24)), where $\Gamma_{t+1}$ depends not only on $\Gamma_t$ but also on $\Xi_t$ and $\Psi_t$ . Similarly, $\Xi_t$ satisfies its own recursion, with $\Xi_{t+1}$ depending on $\Xi_t$ and $\Psi_t$ (Lemma C.4). + +To simplify the analysis, we first solve the recursion for $\Xi_t$ , allowing us to express $\Gamma_t$ in terms of $\Psi_t$ alone, eliminating the dependence on $\Xi_t$ (Lemma C.1). Finally, in Lemma C.2, we bound $\Psi_t$ in terms of the problem parameters $(\sigma$ and $\zeta)$ and $\Gamma_t$ , enabling us to explicitly solve the recursion for $\Gamma_t$ (Lemma C.3). + +# C.1. Consensus of the Query Points + +The next result establishes a recursion for the consensus distance of the query points $X_{t}$ . + +Lemma C.1. For all $t \geq 1$ , the consensus distance of the query points (i.e., averaged iterates) $\Gamma_t$ satisfies the following recursion: + +$$ +\Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \eta^ {2} \alpha_ {t} ^ {2} \delta_ {t} ^ {2}}{\rho} \left(\Psi_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}\right). +$$ + +Proof. The gossip averaging of the query points leads to the following inequality: + +$$ +M \Gamma_ {t + 1} = \mathbb {E} \| X _ {t + 1} - \bar {X} _ {t + 1} \| _ {F} ^ {2} = \mathbb {E} \| X _ {t + \frac {1}{2}} P - \bar {X} _ {t + \frac {1}{2}} \| _ {F} ^ {2} \leq (1 - \rho) \mathbb {E} \| X _ {t + \frac {1}{2}} - \bar {X} _ {t + \frac {1}{2}} \| _ {F} ^ {2}, \tag {21} +$$ + +where we used Lemma D.1, stating that $\bar{X}_{t + \frac{1}{2}}P = \bar{X}_{t + \frac{1}{2}}$ , and the mixing property of the gossip matrix (Property 2.6). Substituting the query points averaging, $X_{t + \frac{1}{2}} = (1 - \delta_t)X_t + \delta_tW_{t + \frac{1}{2}}$ , and using $\| a + b\|^2 \leq (1 + \beta^{-1})\| a\|^2 + (1 + \beta)\| b\|^2$ (which holds for any $\beta > 0$ ), we obtain: + +$$ +\begin{array}{l} M \Gamma_ {t + 1} \leq (1 - \rho) \mathbb {E} \| X _ {t + \frac {1}{2}} - \bar {X} _ {t + \frac {1}{2}} \| _ {F} ^ {2} \\ = (1 - \rho) \mathbb {E} \| (1 - \delta_ {t}) X _ {t} + \delta_ {t} W _ {t + \frac {1}{2}} - ((1 - \delta_ {t}) \bar {X} _ {t} + \delta_ {t} \bar {W} _ {t + \frac {1}{2}}) \| _ {F} ^ {2} \\ \leq (1 - \rho) \left(1 + \frac {1}{\beta}\right) (1 - \delta_ {t}) ^ {2} \mathbb {E} \| X _ {t} - \bar {X} _ {t} \| _ {F} ^ {2} + (1 - \rho) (1 + \beta) \delta_ {t} ^ {2} \mathbb {E} \| W _ {t + \frac {1}{2}} - \bar {W} _ {t + \frac {1}{2}} \| _ {F} ^ {2} \\ \leq (1 - \rho) \left(1 + \frac {1}{\beta}\right) M \Gamma_ {t} + (1 - \rho) (1 + \beta) \delta_ {t} ^ {2} \underbrace {\mathbb {E} \| W _ {t + \frac {1}{2}} - \bar {W} _ {t + \frac {1}{2}} \| _ {F} ^ {2}} _ {(\star)}, \tag {22} \\ \end{array} +$$ + +where the last inequality follows from $(1 - \delta_t)^2 \leq 1$ . Focusing on $(\star)$ and plugging the iterate update rule, we have for all $\gamma > 0$ : + +$$ +\begin{array}{l} \mathbb {E} \| W _ {t + \frac {1}{2}} - \bar {W} _ {t + \frac {1}{2}} \| _ {F} ^ {2} = \mathbb {E} \| W _ {t} - \eta \alpha_ {t} G _ {t} - (\bar {W} _ {t} - \eta \alpha_ {t} \bar {G} _ {t}) \| _ {F} ^ {2} \\ \leq \left(1 + \frac {1}{\gamma}\right) \mathbb {E} \| W _ {t} - \bar {W} _ {t} \| _ {F} ^ {2} + (1 + \gamma) \eta^ {2} \alpha_ {t} ^ {2} \mathbb {E} \| G _ {t} - \bar {G} _ {t} \| _ {F} ^ {2} \\ = \left(1 + \frac {1}{\gamma}\right) M \Xi_ {t} + (1 + \gamma) \eta^ {2} \alpha_ {t} ^ {2} M \Psi_ {t}. \tag {23} \\ \end{array} +$$ + +Substituting (23) into (22), setting $\beta = 2 / \rho$ and $\gamma = 1$ , and dividing by $M$ , we get: + +$$ +\Gamma_ {t + 1} \leq (1 - \rho) \left(1 + \frac {\rho}{2}\right) \Gamma_ {t} + (1 - \rho) \left(1 + \frac {2}{\rho}\right) \delta_ {t} ^ {2} \left(2 \Xi_ {t} + 2 \eta^ {2} \alpha_ {t} ^ {2} \Psi_ {t}\right) \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \delta_ {t} ^ {2}}{\rho} \left(\Xi_ {t} + \eta^ {2} \alpha_ {t} ^ {2} \Psi_ {t}\right), \tag {24} +$$ + +where in the second inequality we used $(1 - \rho)(1 + \frac{\rho}{2}) = 1 - \frac{\rho}{2} -\frac{\rho^2}{2}\leq 1 - \frac{\rho}{2}$ and $(1 - \rho)(1 + \frac{2}{\rho}) = -1 - \rho +\frac{2}{\rho}\leq \frac{2}{\rho}$ . Note that we derived a recursion for $\Gamma_t$ , which also involves $\Xi_t$ . The consensus distance of the iterates, $\Xi_t$ , satisfies its own + +recursion as stated in Lemma C.4, from which an explicit bound is provided in Lemma C.5. Substituting this bound yields: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \delta_ {t} ^ {2}}{\rho} \left(\frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau} + \eta^ {2} \alpha_ {t} ^ {2} \Psi_ {t}\right) \\ = \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \eta^ {2} \alpha_ {t} ^ {2} \delta_ {t} ^ {2}}{\rho} \left(\Psi_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}\right), \tag {25} \\ \end{array} +$$ + +thus concluding the proof. + +Note that the sequence $\Psi_1, \ldots, \Psi_t$ appears in the recursion given in Lemma C.1. We next provide an upper bound on $\Psi_t$ in terms of $\Gamma_t$ , which will enable us to derive an explicit bound for $\Gamma_t$ . + +Lemma C.2. For every $t \geq 1$ , $\Psi_t \leq 5(2\sigma^2 + \zeta^2) + 10L^2\Gamma_t$ . + +Proof. Using $\| \sum_{n = 1}^{N}u_{n}\|^{2}\leq N\sum_{n = 1}^{N}\| u_{n}\|^{2}$ , we have: + +$$ +\begin{array}{l} \Psi_ {t} = \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| g _ {t} ^ {i} - \bar {g} _ {t} \| ^ {2} \\ = \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| g _ {t} ^ {i} - \mathbb {E} g _ {t} ^ {i} + \mathbb {E} g _ {t} ^ {i} - \bar {g} _ {t} + \mathbb {E} \bar {g} _ {t} - \mathbb {E} \bar {g} _ {t} - \nabla f _ {i} (\bar {x} _ {t}) + \nabla f _ {i} (\bar {x} _ {t}) - \nabla f (\bar {x} _ {t}) + \nabla f (\bar {x} _ {t}) \| ^ {2} \\ \leq \frac {5}{M} \sum_ {i = 1} ^ {M} \left(\mathbb {E} \| g _ {t} ^ {i} - \mathbb {E} g _ {t} ^ {i} \| ^ {2} + \mathbb {E} \| \bar {g} _ {t} - \mathbb {E} \bar {g} _ {t} \| ^ {2} + \mathbb {E} \| \mathbb {E} g _ {t} ^ {i} - \nabla f _ {i} (\bar {x} _ {t}) \| ^ {2} + \mathbb {E} \| \mathbb {E} \bar {g} _ {t} - \nabla f (\bar {x} _ {t}) \| ^ {2} + \mathbb {E} \| \nabla f _ {i} (\bar {x} _ {t}) - \nabla f (\bar {x} _ {t}) \| ^ {2}\right). \tag {26} \\ \end{array} +$$ + +Next, we individually bound each sum. + +Bounding $\frac{1}{M}\sum_{i = 1}^{M}\mathbb{E}\| g_t^i -\mathbb{E}g_t^i\| ^2$ . By the bounded variance assumption, it holds that: + +$$ +\frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| g _ {t} ^ {i} - \mathbb {E} g _ {t} ^ {i} \| ^ {2} = \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \nabla f _ {i} (x _ {t} ^ {i}, z _ {t} ^ {i}) - \nabla f _ {i} (x _ {t} ^ {i}) \| ^ {2} \leq \frac {1}{M} \sum_ {i = 1} ^ {M} \sigma^ {2} = \sigma^ {2}. +$$ + +Bounding $\mathbb{E}\| \bar{g}_t - \mathbb{E}\bar{g}_t\|^2$ Since $g_t^i -\mathbb{E}g_t^i$ are independent, zero mean, and have variance bounded by $\sigma^2$ , it follows that: + +$$ +\mathbb {E} \| \bar {g} _ {t} - \mathbb {E} \bar {g} _ {t} \| ^ {2} = \mathbb {E} \left\| \frac {1}{M} \sum_ {i = 1} ^ {M} \left(g _ {t} ^ {i} - \mathbb {E} g _ {t} ^ {i}\right) \right\| ^ {2} = \frac {1}{M ^ {2}} \sum_ {i = 1} ^ {M} \mathbb {E} \| g _ {t} ^ {i} - \mathbb {E} g _ {t} ^ {i} \| ^ {2} \leq \frac {\sigma^ {2}}{M}. +$$ + +Bounding $\frac{1}{M}\sum_{i = 1}^{M}\mathbb{E}\| \mathbb{E}g_t^i -\nabla f_i(\bar{x}_t)\| ^2$ By the smoothness of $f_{i}$ + +$$ +\frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \mathbb {E} g _ {t} ^ {i} - \nabla f _ {i} (\bar {x} _ {t}) \| ^ {2} = \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \nabla f _ {i} (x _ {t} ^ {i}) - \nabla f _ {i} (\bar {x} _ {t}) \| ^ {2} \leq \frac {L ^ {2}}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| x _ {t} ^ {i} - \bar {x} _ {t} \| ^ {2} = L ^ {2} \Gamma_ {t}. +$$ + +Bounding $\mathbb{E}\| \mathbb{E}\bar{g}_t - \nabla f(\bar{x}_t)\| ^2$ . By Jensen's inequality and the smoothness of each $f_{i}$ , we have: + +$$ +\mathbb {E} \| \mathbb {E} \bar {g} _ {t} - \nabla f (\bar {x} _ {t}) \| ^ {2} = \mathbb {E} \left\| \frac {1}{M} \sum_ {i = 1} ^ {M} \left(\nabla f _ {i} \left(x _ {t} ^ {i}\right) - \nabla f _ {i} (\bar {x} _ {t})\right) \right\| ^ {2} \leq \frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \nabla f _ {i} \left(x _ {t} ^ {i}\right) - \nabla f _ {i} (\bar {x} _ {t}) \| ^ {2} \leq L ^ {2} \Gamma_ {t}. +$$ + +Bounding $\frac{1}{M}\sum_{i = 1}^{M}\mathbb{E}\| \nabla f_i(\bar{x}_t) - \nabla f(\bar{x}_t)\|^2$ . By the heterogeneity assumption (Assumption 2.3), + +$$ +\frac {1}{M} \sum_ {i = 1} ^ {M} \mathbb {E} \| \nabla f _ {i} (\bar {x} _ {t}) - \nabla f (\bar {x} _ {t}) \| ^ {2} \leq \zeta^ {2}. +$$ + +Substituting these bounds back into Equation (26) implies the result as, + +$$ +\Psi_ {t} \leq 5 \left(\sigma^ {2} + \frac {\sigma^ {2}}{M} + 2 L ^ {2} \Gamma_ {t} + \zeta^ {2}\right) \leq 5 \left(2 \sigma^ {2} + \zeta^ {2}\right) + 1 0 L ^ {2} \Gamma_ {t}. +$$ + +Using this, we now derive an explicit bound for $\Gamma_t$ , specifically for linear weights and a sufficiently small learning rate. + +Lemma C.3. For linear weights $\{\alpha_{t} = t\}_{t\geq 1}$ , and a learning rate $\eta \leq \frac{\rho^2}{8\sqrt{80}L}$ , the consensus distance of the query points $\Gamma_t$ is bounded as: + +$$ +\Gamma_ {t} \leq \frac {2 5 6 0 \tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}}, +$$ + +where $\tilde{\sigma}^2 \coloneqq 2\sigma^2 + \zeta^2$ . + +Proof. First, observe that for linear weights $\alpha_{t} = t$ , we have $\alpha_{1:t} = \sum_{\tau=1}^{t} \tau = \frac{t(t+1)}{2}$ , which implies that for all $t \geq 1$ : + +$$ +\delta_ {t} = \frac {\alpha_ {t}}{\alpha_ {1 : t}} = \frac {2}{t + 1}, \quad \text {a n d} \quad \alpha_ {t} \delta_ {t} = \frac {2 t}{t + 1} \leq 2. +$$ + +Thus, from Lemma C.1, we get: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {4 \eta \alpha_ {t} ^ {2} \delta_ {t} ^ {2}}{\rho} \left(\Psi_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}\right) \\ \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {1 6 \eta}{\rho} \left(\Psi_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}\right). \\ \end{array} +$$ + +where the second inequality follows from $\alpha_t^2\delta_t^2\leq 4$ . Let $\tilde{\sigma}^2\coloneqq 2\sigma^2 +\zeta^2$ . Then, by Lemma C.2, for all $t\geq$ we have $\Psi_{t}\leq 5\tilde{\sigma}^{2} + 10L^{2}\Gamma_{t}$ . Substituting this bound yields: + +$$ +\begin{array}{l} \Gamma_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Gamma_ {t} + \frac {8 0 \eta^ {2}}{\rho} \left(\tilde {\sigma} ^ {2} + 2 L ^ {2} \Gamma_ {t} + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \left(\tilde {\sigma} ^ {2} + 2 L ^ {2} \Gamma_ {\tau}\right)\right) \\ = \left(1 - \frac {\rho}{2} + 8 0 L ^ {2} \eta^ {2} \cdot \frac {2}{\rho}\right) \Gamma_ {t} + 8 0 L ^ {2} \eta^ {2} \left(\frac {2}{\rho}\right) ^ {2} \cdot \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Gamma_ {\tau} + \frac {8 0 \eta^ {2}}{\rho} \left(1 + \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau}\right) \tilde {\sigma} ^ {2} \\ \leq \left(1 - \frac {\rho}{2} + c _ {1} ^ {2} \eta^ {2} \cdot \frac {2}{\rho}\right) \Gamma_ {t} + c _ {1} ^ {2} \eta^ {2} \left(\frac {2}{\rho}\right) ^ {2} \cdot \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Gamma_ {\tau} + \frac {c _ {2} ^ {2} \eta^ {2}}{\rho} \left(1 + \frac {4}{\rho^ {2}}\right) \\ \leq \left(1 - \frac {\rho}{2} + c _ {1} ^ {2} \eta^ {2} \cdot \frac {2}{\rho}\right) \Gamma_ {t} + c _ {1} ^ {2} \eta^ {2} \left(\frac {2}{\rho}\right) ^ {2} \cdot \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Gamma_ {\tau} + c _ {2} ^ {2} \eta^ {2} \left(\frac {2}{\rho}\right) ^ {3}, \tag {27} \\ \end{array} +$$ + +where $c_1^2 \coloneqq 80L^2$ , $c_2^2 \coloneqq 80\tilde{\sigma}^2$ , the final inequality holds because $1 \leq \frac{4}{\rho^2}$ , and the second inequality stems from the following bound on the geometric sum: + +$$ +\sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} = \sum_ {\tau = 0} ^ {t - 2} \left(1 - \frac {\rho}{2}\right) ^ {\tau} \leq \sum_ {\tau = 0} ^ {\infty} \left(1 - \frac {\rho}{2}\right) ^ {\tau} = \frac {2}{\rho}. +$$ + +Equation (27) exhibits a recursive structure as in Lemma D.5. Since $\eta \leq \frac{\rho^2}{8\sqrt{80}L}$ , the condition required to apply the lemma is satisfied. Applying the lemma with $a_{t} = \Gamma_{t}$ and $\kappa = \frac{\rho}{2}$ yields the final result: + +$$ +\Gamma_ {t} \leq \frac {2 c _ {2} ^ {2} \eta^ {2}}{\kappa^ {4}} = \frac {2 5 6 0 \tilde {\sigma} ^ {2} \eta^ {2}}{\rho^ {4}}. +$$ + +# C.2. Consensus of the Iterates + +The following lemma provides a recursive relation for the consensus distance of the iterates $W_{t}$ . + +Lemma C.4. The consensus distance for the iterates $\Xi_t$ , satisfies the following recursive relation: + +$$ +\Xi_ {t + 1} \leq \left(1 - \frac {\rho}{2}\right) \Xi_ {t} + \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \Psi_ {t}. +$$ + +Proof. Similarly to Equation (21), we have by the gossip averaging of the iterates: + +$$ +M \Xi_ {t + 1} = \mathbb {E} \| W _ {t + 1} - \bar {W} _ {t + 1} \| _ {F} ^ {2} = \mathbb {E} \| W _ {t + \frac {1}{2}} P - \bar {W} _ {t + \frac {1}{2}} \| _ {F} ^ {2} \leq (1 - \rho) \mathbb {E} \| W _ {t + \frac {1}{2}} - \bar {W} _ {t + \frac {1}{2}} \| _ {F} ^ {2}, +$$ + +where the second equality is due to Lemma D.1, stating that $\bar{W}_{t + \frac{1}{2}}P = \bar{W}_{t + \frac{1}{2}}$ , and the inequality follows from the mixing property of the gossip matrix Property 2.6. Substituting the bound on $\mathbb{E}\| W_{t + \frac{1}{2}} - \bar{W}_{t + \frac{1}{2}}\| _F^2$ in Equation (23) then yields: + +$$ +M \Xi_ {t + 1} \leq (1 - \rho) \left(1 + \frac {1}{\gamma}\right) M \Xi_ {t} + (1 - \rho) (1 + \gamma) \eta^ {2} \alpha_ {t} ^ {2} M \Psi_ {t}. +$$ + +Dividing by $M$ and setting $\gamma = 2 / \rho$ finally gives: + +$$ +\Xi_ {t + 1} \leq (1 - \rho) \left(1 + \frac {\rho}{2}\right) \Xi_ {t} + (1 - \rho) \left(1 + \frac {2}{\rho}\right) \eta^ {2} \alpha_ {t} ^ {2} \Psi_ {t} \leq \left(1 - \frac {\rho}{2}\right) \Xi_ {t} + \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \Psi_ {t}, +$$ + +where in the last inequality we used $(1 - \rho)(1 + \frac{\rho}{2}) = 1 - \frac{\rho}{2} -\frac{\rho^2}{2}\leq 1 - \frac{\rho}{2}$ and $(1 - \rho)(1 + \frac{2}{\rho}) = -1 - \rho +\frac{2}{\rho}\leq \frac{2}{\rho}$ . + +Using this recursion, we derive an explicit bound on $\Xi_t$ as follows. + +Lemma C.5. For any non-decreasing sequence $\{\alpha_t\}_{t > 1}$ , the consensus distance $\Xi_t$ is bounded as: + +$$ +\Xi_ {t} \leq \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau} +$$ + +Proof. The recursion for $\Xi_t$ in Lemma C.4 exhibits the structure in Lemma D.4. Applying the lemma with $a_t = \Xi_t$ , $b_t = \eta^2\alpha_t^2\Psi_t$ , and $\kappa = \rho / 2$ , we obtain: + +$$ +\Xi_ {t} \leq \frac {2}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \eta^ {2} \alpha_ {\tau} ^ {2} \Psi_ {\tau} \leq \frac {2 \eta^ {2} \alpha_ {t} ^ {2}}{\rho} \sum_ {\tau = 1} ^ {t - 1} \left(1 - \frac {\rho}{2}\right) ^ {t - 1 - \tau} \Psi_ {\tau}, +$$ + +where in the last inequality we used $\alpha_{\tau}^{2}\leq \alpha_{t}^{2}$ for all $\tau \leq t$ + +# D. Technical Lemmas + +In this section, we list some technical lemmas, starting with the following property that establishes the invariance of gossip communication when all machines hold the same vector. + +Lemma D.1 (Proposition 1, Koloskova et al., 2020). Let $x \in \mathbb{R}^d$ . For any matrix $X = \left( \begin{array}{cccc}x & x & \dots & x \end{array} \right) \in \mathbb{R}^{d\times M}$ and a symmetric, doubly stochastic matrix $P \in \mathbb{R}^{M\times M}$ , we have $XP = X$ . + +Next, we state a classical result for smooth functions. + +Lemma D.2. Let $f: \mathbb{R}^d \to \mathbb{R}$ be an $L$ -smooth function and $x^* \in \arg \min_{x \in \mathbb{R}^d} f(x)$ . Then, for every $x \in \mathbb{R}^d$ , it holds that: + +$$ +\left\| \nabla f (x) \right\| ^ {2} \leq 2 L \left(f (x) - f (x ^ {*})\right). +$$ + +The following lemma proves to be useful as well. + +Lemma D.3. Consider a non-negative sequence $a_1, \ldots, a_T$ satisfying the following relation for any $t \in [T]$ : + +$$ +a _ {t} \leq b + \frac {1}{2 T} \sum_ {\tau = 1} ^ {T} a _ {\tau}, +$$ + +for some constant $b \in \mathbb{R}$ . Then, for all $t \in [T]$ , it holds that + +$$ +a _ {t} \leq 2 b. +$$ + +Proof. Summing over $t \in [T]$ , we have that: + +$$ +\sum_ {t = 1} ^ {T} a _ {t} \leq T b + \frac {1}{2 T} \sum_ {t = 1} ^ {T} \sum_ {\tau = 1} ^ {T} a _ {\tau} = T b + \frac {1}{2} \sum_ {t = 1} ^ {T} a _ {t}. +$$ + +Subtracting $\frac{1}{2}\sum_{t=1}^{T}a_{t}$ and multiplying by 2 results in $\sum_{t=1}^{T}a_{t} \leq 2Tb$ . Thus, we obtain: + +$$ +a _ {t} \leq b + \frac {1}{2 T} \sum_ {\tau = 1} ^ {T} a _ {\tau} \leq b + \frac {1}{2 T} 2 T b = 2 b. +$$ + +The following two lemmas are used to derive explicit bounds for the consensus recursions discussed in Appendix C. + +Lemma D.4. Let $\kappa \in (0,1]$ and consider a sequence $\{a_t\}_{t\geq 1}$ satisfying the recursion: + +$$ +a _ {t} \leq (1 - \kappa) a _ {t - 1} + \frac {b _ {t - 1}}{\kappa}, \quad w i t h \quad a _ {1} = 0, +$$ + +for some non-negative sequence $\{b_t\}_{t \geq 1}$ . Then, for all $t \geq 2$ , the following bound holds: + +$$ +a _ {t} \leq \frac {1}{\kappa} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} b _ {\tau}. +$$ + +Proof. We prove the statement using induction. + +Base case. For $t = 2$ , since $a_1 = 0$ , it trivially follows that: + +$$ +a _ {2} \leq (1 - \kappa) a _ {1} + \frac {b _ {1}}{\kappa} = \frac {b _ {1}}{\kappa} = \frac {1}{\kappa} \sum_ {\tau = 1} ^ {1} (1 - \kappa) ^ {1 - \tau} b _ {\tau}. +$$ + +Induction step. Assume that the induction hypothesis holds for some $t \geq 2$ . We show that it holds for index $t + 1$ : + +$$ +a _ {t + 1} \leq (1 - \kappa) a _ {t} + \frac {b _ {t}}{\kappa} \leq (1 - \kappa) \frac {1}{\kappa} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} b _ {\tau} + \frac {b _ {t}}{\kappa} = \frac {1}{\kappa} \left(\sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - \tau} b _ {\tau} + b _ {t}\right) = \frac {1}{\kappa} \sum_ {\tau = 1} ^ {t} (1 - \kappa) ^ {t - \tau} b _ {\tau}. +$$ + +![](images/9a42967a68ee03b1e7a56a47370bd957f3f9b277ba30b5cb226130e61236b048.jpg) + +Lemma D.5. Let $\kappa \in (0,1]$ and consider a sequence $\{a_t\}_{t\geq 1}$ satisfying the recursion: + +$$ +a _ {t} \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa}\right) a _ {t - 1} + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {t - 2} (1 - \kappa) ^ {t - 2 - \tau} a _ {\tau} + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}}, \quad w i t h \quad a _ {1} = 0, +$$ + +for some non-negative constants $c_{1}, c_{2}$ , and $\eta$ . Suppose $\eta \leq \frac{\kappa^2}{2c_1}$ . Then, for all $t \geq 1$ , the following bound holds: + +$$ +a _ {t} \leq \frac {2 c _ {2} ^ {2} \eta^ {2}}{\kappa^ {4}}. +$$ + +Proof. Similar to Lemma D.4, we prove this result by (strong) induction. + +Base cases. For $t = 1$ , the statement is trivial because $a_1 = 0 \leq 2c_2^2\eta^2 / \kappa^4$ . For $t = 2$ , we have: + +$$ +a _ {2} \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa}\right) a _ {1} + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {0} (1 - \kappa) ^ {- \tau} a _ {\tau} + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} = \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} \leq \frac {2 c _ {2} ^ {2} \eta^ {2}}{\kappa^ {4}}, +$$ + +where the last inequality follows from $1 \leq \frac{2}{\kappa}$ as $\kappa \leq 1$ , thus verifying the base cases. + +Induction step. Suppose that for some $t \geq 3$ , the induction hypothesis holds for all indices $s = 1, \ldots, t$ . We shall prove that it then holds for $t + 1$ . Specifically, denoting the upper bound by $B := \frac{2c_2^2\eta^2}{\kappa^4}$ , we assume that $a_s \leq B$ for $s = 1, \ldots, t$ and prove that $a_{t+1} \leq B$ . Plugging the induction hypothesis into the recursion, we get: + +$$ +\begin{array}{l} a _ {t + 1} \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa}\right) a _ {t} + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} a _ {\tau} + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} \\ \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa}\right) B + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} B + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} \\ = \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa} + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {2}} \sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau}\right) B + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} \\ \leq \left(1 - \kappa + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa} + \frac {c _ {1} ^ {2} \eta^ {2}}{\kappa^ {3}}\right) B + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} \\ \leq \left(1 - \kappa + \frac {2 c _ {1} ^ {2} \eta^ {2}}{\kappa^ {3}}\right) B + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}}, \\ \end{array} +$$ + +where the last inequality holds because $\frac{1}{\kappa} \leq \frac{1}{\kappa^3}$ for any $\kappa \leq 1$ , and the penultimate inequality results from the bound on the geometric series: + +$$ +\sum_ {\tau = 1} ^ {t - 1} (1 - \kappa) ^ {t - 1 - \tau} = \sum_ {s = 0} ^ {t - 2} (1 - \kappa) ^ {s} \leq \sum_ {s = 0} ^ {\infty} (1 - \kappa) ^ {s} = \frac {1}{\kappa}. +$$ + +From the condition on $\eta$ , it follows that $\frac{2c_1^2\eta^2}{\kappa^3} \leq \frac{\kappa}{2}$ . Substituting this inequality and noting that $\frac{c_2^2\eta^2}{\kappa^3} = \frac{\kappa}{2} B$ , we obtain: + +$$ +a _ {t + 1} \leq \left(1 - \frac {\kappa}{2}\right) B + \frac {c _ {2} ^ {2} \eta^ {2}}{\kappa^ {3}} = \left(1 - \frac {\kappa}{2}\right) B + \frac {\kappa}{2} B = B, +$$ + +thus establishing the result. + +We also utilize the following result, which we prove using simple algebraic manipulation. + +Lemma D.6. Let $A \geq 0$ and $B, C > 0$ , and define $\eta = \min \left\{\eta_1, \sqrt{A / B}, (A / C)^{1/4}\right\}$ for some $\eta_1 > 0$ . Then, + +$$ +\frac {A}{\eta} + B \eta + C \eta^ {3} \leq \frac {A}{\eta_ {1}} + 2 \sqrt {A B} + 2 A ^ {3 / 4} C ^ {1 / 4}. +$$ + +Proof. Since $\eta$ is the minimum between three terms, $1 / \eta$ is the maximum of their inverses. Therefore, + +$$ +\begin{array}{l} \frac {A}{\eta} + B \eta + C \eta^ {3} \leq A \max \left\{\frac {1}{\eta_ {1}}, \sqrt {\frac {B}{A}}, \left(\frac {C}{A}\right) ^ {1 / 4} \right\} + B \eta + C \eta^ {3} \\ \leq A \left(\frac {1}{\eta_ {1}} + \sqrt {\frac {B}{A}} + \left(\frac {C}{A}\right) ^ {1 / 4}\right) + B \sqrt {\frac {A}{B}} + C \left(\frac {A ^ {1 / 4}}{C ^ {1 / 4}}\right) ^ {3} \\ = \frac {A}{\eta_ {1}} + \sqrt {A B} + A ^ {3 / 4} C ^ {1 / 4} + \sqrt {A B} + A ^ {3 / 4} C ^ {1 / 4} \\ = \frac {A}{\eta_ {1}} + 2 \sqrt {A B} + 2 A ^ {3 / 4} C ^ {1 / 4}, \\ \end{array} +$$ + +where the second inequality follows from the fact that the maximum of non-negative terms is smaller than their sum, and from the monotonic increase of the terms $B\eta$ and $C\eta^3$ with $\eta$ . + +# E. Additional Experimental Results + +In Figures 4 to 6, we present the full convergence curves for DAT-SGD and D-SGD on the synthetic least squares problem over the ring, torus, and 1-peer exponential graph topologies, respectively. These results are shown for varying numbers of machines and correspond to the final errors reported in Figure 1. + +On the torus and exponential graph topologies, our method steadily improves with increasing numbers of machines, demonstrating the potential of our approach to effectively increase parallelism. For the ring topology, performance improves when transitioning from $M = 9$ to 25 machines but degrades at $M = 100$ machines, as the topology-related error term becomes dominant. Conversely, D-SGD does not improve when increasing the number of machines. On the ring and torus topologies, performance is initially better for larger $M$ , but then deteriorates, indicating that while we initially benefit from variance reduction, the optimization transitions to a regime where the leading error term depends on topology and inefficient information flow hinders further improvement. For the well-connected exponential graph, initial performance improves with $M$ , but all configurations eventually converge to approximately the same error level. + +![](images/c651555756dd10dc800459f5f4134bd0c41507511157464203b22a141207d588.jpg) +Ring + +![](images/926b3b255cd5393b31300946e2cb75af980e3e84f4fc2e6b914354897162183e.jpg) + +![](images/572c94a3d8e5e162b4796aa6c69a222ebbf8eeb786a220b5d19e9b4cd811d673.jpg) + +![](images/b08ccaf50bd22f1e4d00648ad2e24dbc3f3ebf73e901ac96bceaebcfbb614d7e.jpg) + +![](images/d0344c01e2d4f8fa0a4cb863f2715899c2b27a05e4d9b1e57f4731c053cf5644.jpg) +Figure 4. Error curves for the least squares problem with varying noise, data heterogeneity, and # of machines in the ring topology. + +![](images/ddd9bddea1274b690a08383404a700335357dadfd43afd9dcee0a7eeb747d907.jpg) +Torus + +![](images/9b2b08075ab4cf8032f41d65d4763954ad5cf215f3a07f5fba4fe4b220046e45.jpg) + +![](images/0b0ca7d531cfceae4f1b3740d8a6547efd0c9fc6a5f364c89aa8d5816f46405d.jpg) + +![](images/576c51c5d91cdf86765cdf230f75d348db17291ea5cd40b1af08cb1748ecbd40.jpg) + +![](images/a6d7a28427f552f1dd57b474ade696631ee0d91847e92696310f40173c6f843e.jpg) +Figure 5. Error curves for the least squares problem with varying noise, data heterogeneity, and # of machines in the torus topology. + +![](images/cae54638dfe1d5cb4eac421151e11353874ed25fb07f4f640c8c5a841180c61c.jpg) +Exponential Graph + +![](images/29d6c4595ccd30508fc3b91ecca01c5e3ce4d6d04ae88955e033d22e7fa08927.jpg) + +![](images/6e0feb03572ea7f0e902875ed4579a3108ef36955c3520f0ad7b81c054d359b6.jpg) + +![](images/e28886020fda066b3b6974095f641879f220250a7d9b84ab2f21ac1635729fbd.jpg) + +![](images/fd3e93b14e4897093cded59808da4e45ea6c437ea5ef25e3e9851d9c5ccb6be2.jpg) +Figure 6. Error curves for the least squares problem with varying noise, data heterogeneity, and # of machines in the 1-peer exponential graph topology. \ No newline at end of file diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/images.zip b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..77e5ca3ac1d3f2425cf2ad919b867cc039529550 --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a980cabe2b9733e77f809513f8db938d245d9f8de4558cd0625b395690b24409 +size 1841157 diff --git a/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/layout.json b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..223ba71c0fb76745ef6fae2c77816125e9601dac --- /dev/null +++ b/ICML/2025/Enhancing Parallelism in Decentralized Stochastic Convex Optimization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:457417a9ca618f6d4570a215ec5724675edc6465a87cde8e31607da1b52cc3d7 +size 1229093 diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_content_list.json b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2a2d376c059bae6cb400218105312601c6141d4e --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:426b05bc770397b98b14c1dabb1f1e1c8a3327294c48d9a6f18c2cfecc03be3a +size 266866 diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_model.json b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9ffd0dccc133e538dcccf21e71183fd16e4a3303 --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d62224e7d446b1dbafe6e9e8101c6ad10d3d657c4e276dc5b9086f5bcdfb08a3 +size 323302 diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_origin.pdf b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..422fe3a8a5bf371132df0ed1dd425599e394c8d6 --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/d6f6bd4f-0f2e-448e-8388-6b0e7d752679_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4de3e28fc0563f4f23d5cfff0a01b9650fecc20be09f3aef48061d9e08e59f19 +size 15064239 diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/full.md b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4451794aed88376777c2c8afed0164b423b2fdeb --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/full.md @@ -0,0 +1,1405 @@ +# Enhancing Performance of Explainable AI Models with Constrained Concept Refinement + +Geyu Liang1 Senne Michielssen2 Salar Fattahi1 + +# Abstract + +The trade-off between accuracy and interpretability has long been a challenge in machine learning (ML). This tension is particularly significant for emerging interpretable-by-design methods, which aim to redesign ML algorithms for trustworthy interpretability but often sacrifice accuracy in the process. In this paper, we address this gap by investigating the impact of deviations in concept representations—an essential component of interpretable models—on prediction performance and propose a novel framework to mitigate these effects. The framework builds on the principle of optimizing concept embeddings under constraints that preserve interpretability. Using a generative model as a test-bed, we rigorously prove that our algorithm achieves zero loss while progressively enhancing the interpretability of the resulting model. Additionally, we evaluate the practical performance of our proposed framework in generating explainable predictions for image classification tasks across various benchmarks. Compared to existing explainable methods, our approach not only improves prediction accuracy while preserving model interpretability across various large-scale benchmarks but also achieves this with significantly lower computational cost. + +# 1. Introduction + +ML algorithms are often caught in a dilemma between interpretability and performance. Models such as linear regression (Hastie, 2009) and decision trees (Quinlan, 1986) provide straightforward interpretability through parameter weights and rule-based predictions. However, they fre + +$^{1}$ Department of Industrial and Operations Engineering, University of Michigan, Ann Arbor, MI, US. $^{2}$ Department of Computer Science, Princeton University, Princeton, NJ, US. Correspondence to: Salar Fattahi . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +sequently underperform on complex tasks. On the other hand, high-performing models, such as deep neural networks (LeCun et al., 2015) and large language models (Vaswani, 2017), are notoriously opaque, given their large parameter spaces and intricate architectures. + +Numerous methods have been proposed to extract interpretability from complex models (Baehrens et al., 2010; Simonyan et al., 2013; Zeiler & Fergus, 2014; Shrikumar et al., 2017; Selvaraju et al., 2017; Smilkov et al., 2017; Kolek et al., 2020; Subramanya et al., 2019). However, these approaches typically adopt post-hoc strategies, utilizing sensitivity analysis to identify the key parameters that influence predictions. Consequently, these methods lack guarantees of providing explanations for random prediction or ensuring their trustworthiness (Adebayo et al., 2018; Rudin, 2019; Kindermans et al., 2019; Ghorbani et al., 2019; Slack et al., 2020). + +An alternative solution is to develop models that are interpretable by design. These models intrinsically integrate transparency into their architecture, providing explanations directly tied to their predictions. Concept Bottleneck Models (CBMs, (Koh et al., 2020)) exemplify this approach by mapping input data to an intermediate representation of human-defined concepts, which is then used for prediction. While concept-based models are promising, they require datasets annotated with concept scores, limiting their applicability. Extensions of CBMs aim to improve the approach by utilizing pretrained encoders like CLIP (Yuksekgonul et al., 2022; Oikarinen et al., 2023). A recent line of research (Chattopadhyay et al., 2022; 2023; 2024) has introduced a decision-tree-based architecture with enhanced explainability. The predictions of the model are generated through a sequence of queries, each closely associated with human-specified concepts. + +A high level design paradigm of explainable AI is illustrated in Figure 1. Within these models, concept embeddings play a pivotal role: they not only influence prediction generation but also serve as the source of interpretability. However, recent studies have raised several questions against its reliability. These challenges are centered around its ambiguity (Margeloiu et al., 2021; Watson, 2022; Kim et al., 2023; Marconato et al., 2023), fragility (Furby et al., 2024), and + +![](images/3a7bd93efb14572011793d8e34f4fee7e54ada0a6995d71abcd4df74cbf78949.jpg) +Figure 1. The red arrows represent the backpropagation training process for classic explainable AI models. This paper extends the training process to refine concept embeddings with constraints on their deviation from initial embeddings, represented by green arrows and box. + +low accuracy (Zarlenga et al., 2022; Chowdhury et al., 2024). For embeddings generated with pretrained models, their encoders are reported to face issues such as domain adaptation (Shao et al., 2023; Gondal et al., 2024; Feng et al., 2024; Wang & Kang, 2024), biases in pretraining data (Hamidieh et al., 2024), and sensitivity to encoding errors (Ranjan et al., 2024). + +Efforts to address these challenges include introducing unsupervised modules to enhance concept expressiveness (Sawada & Nakamura, 2022), training residual learning modules in parallel with concept encoders (Yuksekgonul et al., 2022), learning dual embeddings per concept (Zarlenga et al., 2022), and adding specialized data encoders to address domain shifts (Chowdhury et al., 2024). However, these approaches all involve introducing additional black-box learning modules, which undermines the purpose of explainable AI. Moreover, theoretical guarantees for such approaches, which is of particular interest for safety-critical domains, such as medical imaging (Barragán-Montero et al., 2021) and autonomous vehicles (Bensalem et al., 2023), remain largely unexplored. + +To address these challenges, this paper proposes a novel framework termed Constrained Concept Refinement (CCR). Unlike existing methods that introduce additional learning modules, our approach directly optimizes concept embeddings within a constrained parameter space. By restricting embeddings to a small neighborhood around their initialization, our framework offers a tunable trade-off between performance and interpretability, and in certain settings, it can simultaneously improve both. Specifically, we present the following contributions: + +- Theoretical necessity. We rigorously demonstrate the necessity of refining concept embeddings by establishing a non-vanishing worst-case lower bound on model performance when such refinements are not applied + +to the concepts (Theorem 2.6). This highlights and motivates the idea of concept embedding refinement, which is at the crux of our proposed method. + +- Accuracy and interpretability guarantees. We show that CCR overcomes the aforementioned challenge by eliminating performance degradation through the appropriate refinement of concepts (Theorem 3.3). Furthermore, to quantify the performance of CCR, we consider a generative model as a test-bed, where both "interpretability" and "accuracy" admit crisp mathematical definitions. Under this model, we demonstrate that CCR achieves zero training loss while progressively enhancing interpretability (Theorem 3.4). + +- Application in interpretable image classification. We demonstrate the practical efficacy of CCR on multiple image classification benchmarks including CIFAR 10/100 (Krizhevsky et al., 2009), ImageNet (Deng et al., 2009), CUB200 (Wah et al., 2011) and Places365 (Zhou et al., 2017). In all benchmarks except CUB-200, CCR outperforms two recently developed explainable methods for visual classification tasks—CLIP-IP-OMP (Chattopadhyay et al., 2024) and label-free CBM (lfCBM) (Oikarinen et al., 2023)—in terms of prediction accuracy while preserving interpretability, achieving this with a tenfold reduction in runtime. + +On a high level, our main contribution is the introduction of a framework in which concept embeddings in explainable AI models are refined within a restricted parameter space to attain a better balance between predictive performance and interpretability. The remainder of the paper substantiates this claim along two key dimensions: + +1. Theoretical validation. We demonstrate that our method is both necessary (Section 2.1) and effective (Section 3) under the theoretical framework introduced + +by (Chattopadhyay et al., 2024), whose background is reviewed in Section 2. This framework serves as a suitable testbed for our contributions for two main reasons: (1) Among interpretable-by-design models (Zhou et al., 2018; Koh et al., 2020; Yuksekgonul et al., 2022; Oikarinen et al., 2023; Chattopadhyay et al., 2023), only (Chattopadhyay et al., 2024) presents a generative model wherein both performance and interpretability are rigorously defined. (2) The algorithm motivated by this generative framework achieves state-of-the-art results within the class of interpretable AI methods. + +2. Empirical evaluation. We conduct experiments on multiple benchmark datasets for image classification tasks to assess the practical effectiveness of our approach (Section 4). + +Notations. For a matrix $\mathbf{A}$ , we denote its spectral norm by $\| \mathbf{A} \|_2$ , Frobenius norm by $\| \mathbf{A} \|_F$ , and maximum column-wise $\ell_2$ -norm by $\| \mathbf{A} \|_{1,2}$ . Define $[n] = \{1, 2, \dots, n\}$ . A matrix $\mathbf{A} \in \mathbb{R}^{n \times m}$ is called column-orthogonal if $\mathbf{A}^\top \mathbf{A} = \mathbf{I}_{m \times m}$ . Events with probability at least $1 - n^{-\omega(1)}$ are said to occur with high probability. + +# 2. Revisiting IP-OMP + +We consider a classical interpretable-by-design setting in the literature (Chattopadhyay et al., 2022; 2024), namely the task of predicting a random variable by sequentially selecting a list of related random variables, termed queries, and checking their values. The problem is defined as follows: + +Definition 2.1 (Single Variable Prediction by Query Selection). Given an input feature $\mathbf{x} \in \mathbb{R}^d$ , a set of queries $\{q_i\}_{i=1}^n \subset \mathbb{R}$ , and their associated query features (also referred to as concept embeddings) $\{\mathbf{d}_i\}_{i=1}^n \subset \mathbb{R}^d$ , the objective is to predict the target random variable $y \in \mathbb{R}$ by selecting at most $k$ queries from $\{q_i\}_{i=1}^n$ , leveraging the query features $\{\mathbf{d}_i\}_{i=1}^n$ to guide the selection process. Specifically, the query set $\{q_i\}_{i=1}^n$ consists of random variables that are correlated with $y$ , whose observed values can contribute to predicting $y$ . + +Definition 2.1 encompasses a broad spectrum of ML problems with applications in animal identification (Lampert et al., 2009), medical diagnosis (Graziani et al., 2018; Clough et al., 2019), visual question-answering (Yi et al., 2018), image retrieval (Bucher et al., 2019), and so on. + +One illustrative example is the game played among friends, where the target random variable refers to the answer to the question "what am I thinking now?". In this context, the queries $\{q_i\}_{i=1}^n$ are binary random variables representing "yes/no" answers to specific questions like "Is it an animal?" Here, the query feature is a vector embedding of each ques + +tion, encapsulating the information relevant to that question. Additionally, the participants are limited to asking at most $k$ questions. + +In (Geman & Jedynak, 1996), the authors introduced a classic greedy-style algorithm termed Information Pursuit (IP) to address the task outlined in Definition 2.1. Specifically, IP iteratively selects the most informative query based on the observed values of previously selected queries. We provide a formal definition of IP for subsequent discussion: + +Definition 2.2 (Information Pursuit). At every iteration $t = 1, \dots, k$ , IP selects $\pi(t)$ -th query according to: + +$$ +\begin{array}{l} \pi (t) = \operatorname * {a r g m a x} _ {1 \leq i \leq n} \left\{I (q _ {i}, y \mid q _ {\pi (1)} = r _ {\pi (1)}, \right. \\ \left. q _ {\pi (2)} = r _ {\pi (2)}, \dots , q _ {\pi (t - 1)} = r _ {\pi (t - 1)}\right) \Big \}. \\ \end{array} +$$ + +Here $I(\cdot, \cdot)$ denotes mutual information, $\pi(\cdot): [k] \to [n]$ is an injective map representing the selection of queries, and $r_i$ denotes the observed value for $q_i$ . The final output of IP is defined as the maximum likelihood estimator given all observed queries: + +$$ +\begin{array}{l} y _ {\mathrm {I P}} = \underset {\tilde {y}} {\arg \max} \left\{\mathbb {P} (y = \tilde {y} \mid q _ {\pi (1)} = r _ {\pi (1)}, \right. \\ \left. q _ {\pi (2)} = r _ {\pi (2)}, \dots , q _ {\pi (k)} = r _ {\pi (k)}\right) \}. \tag {1} \\ \end{array} +$$ + +In (Chattopadhyay et al., 2023), IP is demonstrated to achieve highly interpretable predictions with competitive accuracies. However, a significant limitation of IP is its substantial computational expense, as mutual information depends not only on the set $\{\mathbf{d}_i\}_{i=1}^n$ but also on previous observations, leading to an exponentially large input space. (Chattopadhyay et al., 2024) addresses this complexity by imposing additional assumptions on the underlying generative model. The first quantifies the connection between $y$ and $q_i$ , while the second defines their connections with $\mathbf{d}_i$ . + +Assumption 2.3 (Generative model for IP-OMP). There exists an unknown random vector $\mathbf{z} \in \mathbb{R}^d$ drawn from a standard Normal distribution that satisfies $y = \langle \mathbf{x}, \mathbf{z} \rangle$ . Moreover, the queries satisfy $q_i = \langle \mathbf{v}_i, \mathbf{z} \rangle$ , where $\mathbf{v}_i$ is a latent feature vector associated with query $i$ . + +Under the above assumption, the target random variable and the queries are correlated through the unknown random variable $\mathbf{z}$ . In this setting, a natural way to define the query features is by setting $\mathbf{d}_i = \mathbf{v}_i$ . This entails an exact prior knowledge of the latent feature vectors. + +Assumption 2.4 (Prior knowledge of latent feature vectors). The latent feature vectors $\{\mathbf{v}_i\}_{i = 1}^n$ are precisely observed. + +Under Assumption 2.3 and 2.4, (Chattopadhyay et al., 2024) establish a connection between IP and Orthogonal Matching Pursuit (OMP) (Pati et al., 1993), a seminal algorithm in the field of sparse coding. + +Theorem 2.5 (IP-OMP (Chattopadhyay et al., 2024)). Under Assumption 2.3 and 2.4 and upon setting $\mathbf{d}_i = \mathbf{v}_i$ for $i = 1, \ldots, n$ , the selection rule $\pi(\cdot)$ defined in Definition 2.2 admits a closed-form expression given by: + +$$ +\pi (t) = \underset {1 \leq i \leq n} {\arg \max} \frac {| \langle \Pi_ {\pmb {D} ^ {(t - 1)}} ^ {\perp} \mathbf {d} _ {i} , \Pi_ {\pmb {D} ^ {(t - 1)}} ^ {\perp} \mathbf {x} \rangle |}{\| \Pi_ {\pmb {D} ^ {(t - 1)}} ^ {\perp} \mathbf {d} _ {i} \| _ {2} \| \Pi_ {\pmb {D} ^ {(t - 1)}} ^ {\perp} \mathbf {x} \| _ {2}}, +$$ + +where $\pmb{D}^{(t - 1)} = \left[\mathbf{d}_{\pi (1)}\quad \mathbf{d}_{\pi (2)}\quad \dots \quad \mathbf{d}_{\pi (t - 1)}\right]$ . This selection criterion, referred to as $IP$ -OMP, differs from OMP solely by the inclusion of the normalization term $\| \Pi_{\overline{D}_{t - 1}}^{\perp}\mathbf{d}_i\| _2\| \Pi_{\overline{D}_{t - 1}}^{\perp}\mathbf{x}\| _2$ + +The main theoretical contribution of Theorem 2.5 lies in its ability to transform the computation of mutual information into that of a linear projection, thereby significantly reducing computational complexity. Although the equivalence is derived under simplifying assumptions, IP-OMP demonstrates remarkable generalization capabilities across various benchmark experiments, outperforming models based on the classical IP algorithm (Chattopadhyay et al., 2024). + +# 2.1. A Major Hurdle: Inaccurate Query Features + +As discussed in the previous section, Theorem 2.5, and as a result, the success of IP-OMP is contingent upon correctly choosing the query features $\{\mathbf{d}_i\}_{i=1}^n$ . + +For learning algorithms, the effective utilization of $\{\mathbf{d}_i\}_{i=1}^n$ is crucial for the accurate prediction of $y$ . On the other hand, humans derive comprehension from $\{\mathbf{d}_i\}_{i=1}^n$ as these elements are intended to embed concepts that are interpretable by humans. In practical applications, $\{\mathbf{d}_i\}_{i=1}^n$ are either embedded and learned from predefined datasets where concepts are explicitly labeled (Koh et al., 2020) or generated by pretrained multimodal models, with CLIP being the most popular example (Oikarinen et al., 2023). + +However, these learned embeddings are often misaligned or inaccurate due to the inherent ambiguity and noise in the training of the models used to generate. For example, unlike carefully curated datasets, CLIP relies on large-scale, noisy image-text pairs scraped from the internet. These pairs often include unlabeled data, vague descriptions, or culturally biased associations, resulting in inconsistencies in representation, as recently reported by (Dutta et al., 2023). + +This suggests that Assumption 2.4 may be overly optimistic. In this section, we will illustrate how the violation of Assumption 2.4—specifically, deviations of the available query features from the latent feature vectors—results in a proportional degradation in the performance of IP-OMP. For the remainder of this paper, we denote the observed query feature set compactly by the matrix $D = \left[ \begin{array}{cccc} \mathbf{d}_1 & \mathbf{d}_2 & \dots & \mathbf{d}_n \end{array} \right] \in \mathbb{R}^{d \times n}$ . This matrix $D$ is also referred to as a feature query matrix. We also refer to $D^* = \left[ \begin{array}{cccc} \mathbf{v}_1 & \mathbf{v}_2 & \dots & \mathbf{v}_n \end{array} \right] \in \mathbb{R}^{d \times n}$ as the ground truth + +latent feature matrix. Assumption 2.4 can now be interpreted as assuming $D = D^{*}$ , stating that we are using the ground truth latent feature vectors as the feature query matrix. This matrix can then be utilized to determine which queries should be observed. + +Let $f_{D}(\mathbf{x},\{r_{\pi (i)}\}_{i = 1}^{k})$ be the maximum likelihood estimator of $y$ , defined as Equation (1), when the selection rule $\pi (\cdot)$ is obtained by executing IP-OMP using $D$ as the query feature set in Theorem 2.5. For brevity, when the context is clear, we refer to this maximum likelihood estimator simply as $f_{D}$ . Moreover, define $\mathcal{L}(y_{\mathrm{pred}})$ as the squared population loss of any estimator $y_{\mathrm{pred}}$ : + +$$ +\mathcal {L} (y _ {\mathrm {p r e d}}) = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} (\mathbf {0}, I _ {d \times d})} \left[ (y - y _ {\mathrm {p r e d}}) ^ {2} \right]. +$$ + +where $\mathbf{z} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}_{d \times d})$ is the unknown random vector used in the generative model described in Assumption 2.3. + +To showcase the effect of deviation in the query features, we consider a scenario where the input $\mathbf{x}$ can be written as a linear combination of $k$ latent feature vectors (corresponding to $k$ columns of $D^{*}$ ). This assumption is prevalent in the sparse coding literature (Arora et al., 2015; Agarwal et al., 2016; Liang et al., 2022) and ensures that using $D^{*}$ as the query feature set guarantees good prediction performance. However, even in this ideal scenario, we demonstrate that even a small column-wise deviation from $D^{*}$ can lead to performance degradation of IP-OMP. + +Theorem 2.6. Suppose that Assumption 2.3 holds. Furthermore, suppose that $\pmb{D}^{*}$ is column-orthogonal and $\mathbf{x} = D^{*}\beta$ for some $k$ -sparse vector $\beta$ with $\| \beta \|_0 = k$ . Additionally, assume that the non-zero entries in $\beta$ have absolute values bounded below by $\gamma$ and above by $\Gamma$ . Then, for any $\epsilon \in \left(0,\frac{1}{\sqrt{1 + 16\Gamma^2 / \gamma^2}}\right)$ , there exists another orthonormal matrix $\tilde{\pmb{D}}\in \mathbb{R}^{d\times n}$ such that $\| \tilde{\pmb{D}} -\pmb {D}^{*}\|_{1,2}\leq \epsilon$ and + +$$ +\mathcal {L} \left(f _ {\tilde {D}}\right) - \mathcal {L} \left(f _ {D ^ {*}}\right) \geq \frac {8 1 (k - 1) \epsilon^ {2} \gamma^ {2}}{2 0 0}. \tag {2} +$$ + +We present the complete proof of Theorem 2.6 in Appendix C.1, which proceeds as follows: (1) we derive the closed form solution for $\mathcal{L}(f_D)$ using the columnorthogonality of $D$ and the distribution of $\mathbf{z}$ ; (2) we then construct the example that satisfies Equation (2) by rotating columns of $D^{*}$ alongside the subspace spanned by itself. + +When $\Gamma/\gamma$ is bounded by a constant, we have $\| \mathbf{x} \|_2^2 = \| \beta \|_2^2 = \Theta (k\gamma^2)$ which simplifies Equation (2) to $\mathcal{L}(f_{\tilde{D}}) - \mathcal{L}(f_{D^*}) = \Omega (\epsilon^2 \| \mathbf{x} \|_2^2)$ . This indicates that the perturbation $\epsilon$ is fully captured by the resulting gap in the squared loss, scaled by a factor of $\| \mathbf{x} \|_2^2$ . + +# 3. Our Proposed Framework + +Building upon our discussion in the preceding section, it is pertinent to consider the following question: + +Since an inaccurate $D$ can adversely affect the performance of IP-OMP, can $D$ be optimized to mitigate this effect while preserving—or even enhancing—interpretability? + +There are two critical challenges to address before answering this question. First, modifying $D$ may diminish the encoded information that is interpretable by humans, thereby compromising the interpretable-by-design principle of information pursuit. Second, treating the query features as variables introduces significant complexity in deriving the optimal decision rule, as the closed-form expression of IP-OMP presented in Theorem 2.5 is no longer valid. + +To overcome these challenges, we propose obtaining a correction $\Delta D$ that minimizes $\mathcal{L}(\tilde{f}_{D + \Delta D})$ , where $\tilde{f}_D$ serves as a differentiable surrogate of the original estimator produced by IP. To preserve interpretability, we constrain the corrected query feature matrix $D + \Delta D$ to remain within a small neighborhood around $D$ , where $D$ represents the potentially inaccurate initial query feature matrix (e.g., the one obtained from CLIP). This leads to the following constrained optimization problem: + +$$ +\min _ {\| \Delta D \| _ {1, 2} \leq \rho} \mathcal {L} (\tilde {f} _ {D + \Delta D}) \tag {3} +$$ + +Indeed, the choice of the correction radius $\rho$ is crucial as it controls the trade-off between prediction accuracy and interpretability. Setting $\rho = 0$ recovers the IP-OMP, and therefore, may suffer from the aforementioned performance degradation. Conversely, choosing a large value for $\rho$ can mitigate the performance degradation of IP-OMP, but at the cost of compromising the interpretability. + +Our meta-algorithm for Problem (3), called constrained concept refinement (CCR), is presented in Algorithm 1. + +# Algorithm 1 Constrained Concept Refinement + +1: Input: Initial query feature matrix $D$ , correction radius $\rho$ , training dataset $\mathcal{D}$ . +2: Initialize $\Delta D^{(0)} = 0_{d\times n}$ +3: while $t = 1,2,\ldots ,T$ do +4: Forward propagation: calculate $\mathcal{L}(\tilde{f}_{\pmb{D} + \Delta \pmb{D}^{(t - 1)}})$ +5: Backward propagation: update $\Delta D^{(t)}$ using the gradient $\partial \mathcal{L} / \partial \Delta D^{(t - 1)}$ . +6: Perform projection to ensure $\| \Delta D^{(t)}\|_{1,2}\leq \rho$ +7: end while +8: Return $\tilde{f}_{\pmb{D} + \Delta \pmb{D}^{(T)}}$ + +Below, we provide a description of its various steps. + +Choice of the surrogate estimator. To motivate the choice of the surrogate estimator $\tilde{f}_D$ , let us revisit the generative model in Assumption 2.3, and additionally assume that the ground truth latent feature matrix $D^{*}$ is column-orthogonal. By assuming $D^{*}$ to be column-orthogonal, we effectively assume an ideal scenario in which queries are mutually independent. Specifically, it follows that $\langle \mathbf{d}_i^*, \mathbf{z} \rangle$ is independent of $\langle \mathbf{d}_j^*, \mathbf{z} \rangle$ when $\mathbf{d}_i^* \perp \mathbf{d}_j^*$ and $\mathbf{z} \sim \mathcal{N}(\mathbf{0}, I_{d \times d})$ . The primary motivation for focusing on an column-orthogonal $D^{*}$ is that, under this assumption, the estimator $f_D$ obtained from IP-OMP becomes inherently differentiable with respect to $D$ : + +Lemma 3.1. Assuming that $D = D^{*}$ and $D^{*}$ is column-orthogonal, we have + +$$ +f _ {D} \left(\mathbf {x}, \left\{r _ {\pi (i)} \right\} _ {i = 1} ^ {k}\right) = \sum_ {i \in S} \langle \mathbf {d} _ {i}, \mathbf {x} \rangle r _ {i}, +$$ + +where $S = \arg \max_{T\subseteq [n],|T|\leq k}\sum_{i\in T}|\langle \mathbf{d}_i,\mathbf{x}\rangle |$ corresponds to the indices of the top- $k$ largest values of $\{\mid |\langle \mathbf{d}_i,\mathbf{x}\rangle |\}_{i = 1}^n$ + +The proof of Lemma 3.1 is deferred to Appendix C.4.1. Assuming a small initial error, i.e., $\| D^{*} - D\| \leq \rho$ for some small $\rho >0$ , the iterates $D^{(t)} = D + \Delta D^{(t)}$ of Algorithm 1 stay approximately column-orthogonal. This consideration motivates the introduction of the following surrogate estimator $\tilde{f}$ : + +$$ +\tilde {f} _ {\boldsymbol {D}} \left(\mathbf {x}, \left\{r _ {\pi (i)} \right\} _ {i = 1} ^ {k}\right) = \sum_ {i \in S} \langle \mathbf {d} _ {i}, \mathbf {x} \rangle r _ {i}, +$$ + +$$ +\text {w h e r e} \quad S = \underset {T \subseteq [ n ], | T | \leq k} {\arg \max } \sum_ {i \in T} | \langle \mathbf {d} _ {i}, \mathbf {x} \rangle |. \tag {4} +$$ + +It is important to note that we do not require $\tilde{f}$ to be differentiable everywhere; rather, differentiability is required only almost surely along the trajectory of Algorithm 1, which we will rigorously demonstrate. Alternative differentiable surrogates for $f$ include the task-driven dictionary learning method (Mairal et al., 2011) and the unrolled dictionary learning method (Malézieux et al., 2021; Tolooshams & Ba, 2021), which can be used in place of Equation (4). + +Backward propagation and projection For the backward propagation and projection steps, we propose to adopt gradient descent updates, followed by a projection step based on $\ell_2$ -norm. + +$$ +\begin{array}{l} \Delta \boldsymbol {D} ^ {(t + 1)} \\ = \underset {\| \Delta \boldsymbol {D} \| _ {1, 2} \leq \rho} {\arg \min } \left\| \Delta \boldsymbol {D} - \left(\Delta \boldsymbol {D} ^ {(t)} - \eta \frac {\partial \mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} + \Delta \boldsymbol {D} ^ {(t)}}\right)}{\partial \Delta \boldsymbol {D} ^ {(t)}}\right) \right\| _ {2}, \tag {5} \\ \end{array} +$$ + +We note that the specific instantiation of the proposed meta-algorithm and its steps is inherently task-dependent. For + +example, while we have only discussed the squared loss, a more common choice in image classification tasks is the cross-entropy loss. Additionally, our choice of the surrogate estimator relies on the assumption that the ground truth latent feature matrix is column-orthogonal. When this assumption is not met, it becomes necessary to enforce it via concept dispersion. Both of these modifications are discussed extensively within the context of image classification in Section 4. + +However, a more fundamental question has remained unanswered: how can "interpretability"—a concept inherently meaningful only to humans—be measured and quantified? One approach is to assess interpretability in an ad-hoc manner by running the candidate method and relying on human judgment to determine whether the predictions are interpretable for different individual samples. This has been the de facto approach adopted in nearly all previous works. An alternative way—which we seek in this work—is to study a simple test-bed for investigation, where "interpretability" admits a crisp mathematical formulation. + +# 3.1. Accuracy and Interpretability Guarantees + +Consider the following probabilistic generative model. + +Assumption 3.2 (Probabilistic generative model). Suppose that the target random variable $y$ and queries are generated according to Assumption 2.3. Moreover, suppose that ground truth latent feature matrix $D^{*}$ is column-orthogonal and the input $\mathbf{x}$ satisfies $\mathbf{x} = D^{*}\boldsymbol{\beta}$ , where: (1) the support of $\beta$ , denoted as $S^{*}$ , is drawn uniformly from the set of $k$ -element subsets of $[n]$ ; and (2) the non-zero elements of $\beta$ are i.i.d. and satisfy $\mathbb{E}[\beta_i] = 0$ , $\mathrm{Var}[\beta_i] = \sigma^2$ , and $\gamma \leq |\beta_i| \leq \Gamma$ . + +The generative model in Assumption 3.2 is akin to those explored in the sparse coding literature (Arora et al., 2015; Agarwal et al., 2016; Ravishankar et al., 2020; Liang et al., 2022). Under this model, prediction error can be evaluated using the squared loss, while interpretability can be assessed by the proximity of the query feature matrix $D^{(T)}$ , produced by CCR, to the ground truth latent feature matrix $D^{*}$ . + +Our next theorem shows that CCR effectively resolves the challenge faced by IP-OMP, as outlined in Theorem 2.6. $^{1}$ Let $D^{(t)} = D + \Delta D^{(t)}$ be the corrected query feature matrix generated by CCR at iteration $t$ . + +Theorem 3.3. Suppose that Assumption 3.2 holds. Moreover, suppose that the initial query feature matrix $\pmb{D}$ satisfies $\| \pmb{D} - \pmb{D}^{*}\|_{1,2} = \rho \leq \frac{\gamma}{8\sqrt{k}\Gamma}$ and the step-size $\eta$ satisfies $0 < \eta < \frac{1}{2\|\mathbf{x}\|_2^2}$ . Algorithm 1 with surrogate estimate + +tor (4) and update rule (5) satisfies: + +$$ +\mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t + 1)}}\right) \leq \left(1 - 2 \eta \| \mathbf {x} \| _ {2} ^ {2}\right) ^ {2} \mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t)}}\right). +$$ + +While Theorem 3.3 addresses the performance limitations of IP-OMP, it does not guarantee improved interpretability. This outcome is unsurprising, since the reliance of the method on only a single input $\mathbf{x}$ ensures that only the columns of $D$ with indices in $S^{*}$ can be improved, essentially leaving the columns outside $S^{*}$ unmodified. Moreover, if $D^{*}$ is not full-rank, our analysis shows that $D$ may deviate from $D^{*}$ in directions column-orthogonal to the column space of $D^{*}$ ; these deviations cannot be eliminated by Equation (5). This observation is further supported by numerical experiments (see Figure 4). + +To tackle these challenges, we assume that $D^{*}$ is full-rank. Moreover, it is essential to use a sufficient number of i.i.d. input samples to ensure that each column of $D^{*}$ contributes to at least one input sample. This aligns more closely with practical scenarios, such as image classification, where multiple samples are typically used during the training phase. We denote the i.i.d. input samples and their corresponding target random variables, generated according to Assumption 3.2, as $\{\mathbf{x}^h\}_{h=1}^m$ and $\{y^h\}_{h=1}^m$ , respectively. For any estimator $\mathbf{y}_{\mathrm{pred}} = \{y_{\mathrm{pred}}^h\}_{h=1}^m$ , the aggregated squared loss is defined as + +$$ +\mathcal {L} _ {m} (\mathbf {y} _ {\text {p r e d}}) = \frac {1}{m} \sum_ {h = 1} ^ {m} \mathbb {E} _ {\mathbf {z} ^ {h} \sim \mathcal {N} \left(\mathbf {0}, I _ {d \times d}\right)} \left[ \left(y ^ {h} - y _ {\text {p r e d}} ^ {h}\right) ^ {2} \right]. \tag {6} +$$ + +Theorem 3.4. Suppose that $\{\mathbf{x}^h\}_{h=1}^m$ and $\{y^h\}_{h=1}^m$ are i.i.d. samples generated from Assumption 3.2 with a fixed full-rank column-orthogonal $D^*$ . Suppose that $m = \Omega \left( \frac{\eta^6}{\sigma^2 k^5} \right)$ . Moreover, suppose that the initial query feature matrix $\pmb{D}$ satisfies $\| D - D^* \|_{1,2} = \rho \leq \frac{\gamma}{8 \sqrt{k} \Gamma}$ and the step-size $\eta$ satisfies $\eta = O\left( \frac{1}{\sigma^2} \right)$ . With high probability, Algorithm 1 with surrogate estimator (4) and update rule (5) applied to the aggregated squared loss (6) satisfies: + +- (Interpretability) $\| D^{(t + 1)} - D^* \|_{1,2} \leq \tau \| D^{(t)} -$ + +$$ +\boldsymbol {D} ^ {*} \left\| _ {1, 2}, \text {w h e r e} \tau = \sqrt {1 - \frac {k (k - 1) \sigma^ {2}}{2 n ^ {2}}} \eta . \right. +$$ + +$\mathcal{L}_m(\tilde{f}_{\pmb{D}^{(t)}})\leq \frac{k\sum_{h = 1}^m\|\mathbf{x}^h\|_2^2}{m}\| \pmb {D}^{(t)} - \pmb {D}^*\|_{1,2}^2.$ + +According to Theorem 3.4, by leveraging multiple samples, CCR achieves the best of both worlds: it guarantees convergence to the ground truth latent feature matrix $D^{*}$ , progressively enhancing interpretability, while simultaneously driving $\mathcal{L}_m$ to zero, thereby achieving perfect accuracy. + +Contrary to traditional analyses in dictionary learning (Arora et al., 2015; Liang et al., 2022), the proofs of Theorem 3.3 + +and Theorem 3.4 require a careful alignment of the updates from gradient descent with the direction of the true solution. In the setting of Theorem 3.4, this is even more challenging because the finite sample size $m$ inevitably causes deviations from the population-level behavior. Moreover, we must further control the deviation introduced by the projection step. The detailed proofs of these theorems are provided in Appendix C. We also include a detailed discussion on both theorems in Appendix B and experiments that validate them in Appendix D.1. + +# 4. Application: Interpretable Image Classification + +In this section, we showcase the performance of our proposed CCR framework from Algorithm 1 on interpretable image classification task. The Python implementation of algorithm can be found here: github.com/lianggeyuleo/CCR.git. + +The image classification setting differs slightly from the setting provided in Definition 2.1. Specifically, we are given a dataset $\{\mathbf{a}^i,\mathbf{y}^i\}_{i = 1}^m$ consisting of $m$ image (a)-label (y) pairs, where the goal is to predict the correct label for a given image. Here, $\mathbf{y}$ represents a one-hot label vector. Additionally, this setting provides access to a concept set $\{\mathbf{c}_i\}_{i = 1}^n$ , which consists of $n$ key concepts that can aid in classifying an image. These concepts are typically textual; for example, in the case of animal images, the concept set might include descriptors like "stocky body" or "black stripes". + +# Algorithm 2 CCR for Interpretable Image Classification + +1: Input: Dataset of image-label pairs $\{\mathbf{a}^i, \mathbf{y}^i\}_{i=1}^m$ , concept set $\{\mathbf{c}_i\}_{i=1}^n$ . +2: Use CLIP to embed the images $\{\mathbf{a}^i\}_{i=1}^m$ into input features $\{\mathbf{x}^i\}_{i=1}^m$ , and the concepts $\{\mathbf{c}_i\}_{i=1}^n$ into query features $\{\mathbf{d}_i\}_{i=1}^n$ . +3: Initialize $D^{(0)}$ via concept dispersion on $\{\mathbf{d}_i\}_{i = 1}^n$ +4: Initialize $\mathbf{s}_i^{(0)} = \mathrm{HT}_{\lambda}\left(\boldsymbol{D}^{(0)\top}\mathbf{x}^i\right)$ for $i = 1,\dots ,m$ +5: Initialize $L^{(0)}$ with random values. +6: while $t = 1,2,\ldots ,T$ do +7: Calculate $\mathcal{L}_m = \sum_i\mathrm{CE}\left(\boldsymbol {L}\mathbf{s}_i^{(t - 1)},\mathbf{y}^i\right)$ +8: Update $\pmb{D}^{(t)} = \pmb{D}^{(t - 1)} - \eta_{\pmb{D}}\partial \mathcal{L} / \partial \pmb{D}^{(t - 1)}$ +9:Normalize and project $D^{(t)}$ +10: Update $\pmb{L}^{(t)} = \pmb{L}^{(t - 1)} - \eta_{\pmb{L}}\partial \mathcal{L} / \partial \pmb{L}^{(t - 1)}$ +11: Update $\mathbf{s}_i^{(t)} = \mathrm{HT}_{\lambda}\left(\boldsymbol{D}^{(t)}^{\top}\mathbf{x}^i\right)$ for $i = 1,\dots,m$ +12: end while +13: Return $\pmb{D}^{(T)}, \pmb{L}^{(T)}$ , and $\{\mathbf{s}_i^{(T)}\}_{i=1}^m$ . + +We formally introduce our algorithm in Algorithm 2. Prior to comparing our approach with other interpretable AI meth + +ods, we provide a detailed explanation of the key components in Algorithm 2. + +CLIP embedding. We employ the multi-modal model CLIP (Radford et al., 2021)—a recently introduced large Vision-Language Model—to embed both images and concepts into the same latent space. + +Concept dispersion. After obtaining the CLIP embeddings, the query features tend to cluster too closely, making the query feature matrix $D^{(0)}$ far from column-orthogonal. To address this, we introduce a concept dispersion procedure (see Algorithm 3 in the appendix). This heuristic approach enhances the mutual orthogonality of query features by increasing their relative angles, thereby improving the orthogonality of $D^{(0)}$ . Notably, this is achieved while preserving interpretability by maintaining the relative positions of features in the embedded space. Further details on the dispersion step are provided in Appendix D.2. + +Hard-thresholding. In Equation (4), $\tilde{f}$ is computed in two steps: (1) constructing the sparse code $\mathbf{s}$ by keeping only the entries with the top- $k$ absolute values of $\pmb{D}^{\top}\mathbf{x}$ ; and (2) setting $\tilde{f}$ as the inner product of $\mathbf{s}$ with $\mathbf{r} = [r_1,\dots,r_i]^{\top}\in \mathbb{R}^n$ . Here, we replace the top- $k$ selection with the entry-wise hard-thresholding operator: + +$$ +\mathrm {H T} _ {\lambda} (x) = \left\{ \begin{array}{l l} x, & \text {i f} \quad | x | \geq \lambda , \\ 0, & \text {i f} \quad | x | < \lambda . \end{array} \right. +$$ + +This approach allows for parallelization and reduced computational cost, although the exact sparsity level $k$ can no longer be directly specified; instead, $k$ is determined implicitly by $\lambda$ . Nonetheless, adjusting $\lambda$ provides similar control over sparsity. + +Linear Layer. To compute $\tilde{f}_D$ as defined in Equation (4), access to $\mathbf{r}$ is required, which is unavailable in the image classification setting. To address this, we train a linear classifier that takes the sparse code s as input and outputs a weight vector over the possible labels. The label with the highest weight is selected as the prediction. The loss function is defined as the cross-entropy between the linear layer's output and the true label y. + +**Embedding normalization and projection.** After each iteration, we perform a projection step similar to Equation (5) for each updated concept embedding. Additionally, we normalize each embedding to ensure that it remains on the unit ball (see Algorithm 4 in Appendix D.2). + +# 4.1. Performance + +We compare the performance of Algorithm 2 against two recently proposed explainable AI methods, CLIP-IP-OMP (Chattopadhyay et al., 2024) and label-free CBM (If-CBM) (Oikarinen et al., 2023), as well as the CCR baseline without + +![](images/c0043767a04e785cabe46744b69807dc81ddde8226be61532bd68e3f8fac73b9.jpg) + +![](images/b6cac762a969051f01c0180fb41c4b4b29a04283bef8dd4a490d9ac45ef5cbd7.jpg) + +![](images/e5ad37ee3c9cba767b55963a80ae36b4ecccf2d225939ce3ec462b3b80c1a59b.jpg) + +![](images/26df2e6b7cf5e51fa0ca455357e9fe46c908ed0073ce07b47071541100c1ee97.jpg) + +Figure 2. Prediction accuracy of CCR and its baseline across iterations, with the final test accuracy of CLIP-IP-OMP and If-CBM indicated for reference. For CCR and its baseline, we run each experiment for five times and present the average test accuracy at each time step. The shaded area is bounded by the maximum and minimum accuracy obtained over five runs. +![](images/ee98f7a996aa7d1b62cc0a91eb2996196769bac7b7b39c2bedbe377ad3b6e29a.jpg) +Constrained Concept Refinement +Baseline without CCR +CLIP-IP-OMP +If-CBM + +the concept refinement step, in the context of explainable image classification. + +For the baseline version of CCR, we set $\eta_{D} = 0$ at Step 8 of Algorithm 2, ensuring that the comparison isolates the effect of concept refinement. The two methods we compare against represent state-of-the-art explainable AI approaches, particularly in terms of scalability. Lf-CBM was the first CBM-type model to be scaled to datasets as large as ImageNet, while CLIP-IP-OMP further improves computational efficiency while maintaining competitive accuracy. For a detailed introduction to both methods, we refer to Appendix A. + +The evaluation is conducted across five image classification benchmarks: CIFAR-10, CIFAR-100 (Krizhevsky et al., 2009), ImageNet (Deng et al., 2009), CUB-200 (Wah et al., 2011), and Places365 (Zhou et al., 2017). + +To ensure a fair comparison, all methods use the same concept set, which is generated by GPT-3 (Brown et al., 2020). A detailed description of the generation process can be found in (Oikarinen et al., 2023). For the CIFAR-10/100 and CUB-200 datasets, we tune CLIP-IP-OMP to match the average sparsity level of s, also referred to as the explanation + +length or $k$ , used in CCR. For ImageNet and Places365, we report the best accuracy achieved by CLIP-IP-OMP across all explanation lengths. Since Lf-CBM does not allow tuning of its explanation length, we directly report its accuracy. The constraint parameter $\rho$ for CCR is fixed at 0.1 for all experiments. + +As shown in Figure 2, CCR consistently outperforms its baseline, CLIP-IP-OMP, and If-CBM across all benchmarks except CUB-200. This exception is expected, as If-CBM was built on a ResNet-18 backbone specifically trained on CUB-200, whereas both CLIP-IP-OMP and CCR rely on CLIP as their encoder, which was trained on more diverse and general datasets. + +Additionally, we report the average explanation length (AEL, $k$ ), average sparsity ratio (ASR, $k / n$ ), and average concept embedding deviation (ACED, $\frac{1}{n}\sum_{i = 1}^{n}\| \mathbf{d}_i - \mathbf{d}_i^{(0)}\|_2$ ) of CCR in the following table: + +
AELASRACED
CIFAR1011.098.66%0.056
CIFAR10019.672.39%0.061
CUB20027.5213.2%0.062
ImageNet48.971.08%0.097
Places36544.432.01%0.041
+ +Table 1. Average explanation length (AEL), average sparsity ratio(ASR) and average concept embedding deviation (ACED) for CCR. + +Thanks to the parallelization enabled by hard thresholding and the computational efficiency of backpropagation, CCR significantly reduces computational costs compared to CLIP-IP-OMP and If-CBM, particularly when applied to large-scale datasets such as ImageNet ( $\approx 1.2$ million images) and Places365 ( $\approx 1.8$ million images). As reported in (Chattopadhyay et al., 2024), training If-CBM on ImageNet requires $\approx 50$ hours on an NVIDIA RTX A5000 GPU. Under the same experimental conditions, CLIP-IP-OMP, with an average explanation length of $\approx 50$ , incurs a computational cost of $\approx 40$ hours. In our computational environment, using an NVIDIA Tesla V100 GPU, CLIP-IP-OMP remains comparably expensive, requiring $\approx 33$ hours for $k = 50$ . In contrast, CCR (with $k \approx 49$ , as shown in Table 1) processes ImageNet in only $\approx 2$ hours (corresponding to 200 iterations) while achieving even higher accuracy, demonstrating a substantial improvement in computational efficiency. To make CLIP-IP-OMP more computationally feasible, one can reduce $k$ ; however, for $k = 10$ , while the processing time drops to $\approx 6$ hours, it comes at the cost of a significant accuracy decline to $\approx 63\%$ . + +![](images/fbda19673bbe22bb0acaa832270938e5a13e7cd44c2c7be16dfeeaee923fe317.jpg) +True label: dining room + +![](images/5c5e7cb9b6f1c0e6e3523f98e60ccd529c52a8972d8c3ee5e951e9acd1bd349f.jpg) +Predicted label: dining room + +![](images/9da4c73f3d94982ed7667a0c79ed37659c5b8b2e999b1dbbf2ac4f4646f27b00.jpg) +True label: golf course + +![](images/5f8c93306f98b37e472232a314d349e108c6bb3ea264404448541de0174b6a77.jpg) +Predicted label: golf course +Figure 3. The first example illustrates a simple case where CCR successfully learns the correct concepts. The second example represents a misleading case, where the image contains concepts like "a flag" that, while relevant and visually apparent, could potentially mislead classification. However, CCR effectively extracts both useful and misleading information, assigning appropriate weights to ensure the correct prediction. + +# 4.2. Interpretability + +To illustrate the interpretability of Algorithm 2, we follow the methodology outlined in (Chattopadhyay et al., 2024) and present the most significant coefficients and weights from the algorithm on different samples from the Places365 dataset. As shown in Figure 3, we highlight the top 10 concepts in s with the highest values (left) along with their corresponding weights in the linear layer $\mathbf{L}$ for the predicted label (right). The selected concepts are semantically relevant to the image, and the linear layer effectively assigns substantial weight to key concepts such as "designated fairways and greens", enabling accurate prediction while appropriately disregarding concepts that, although relevant, may be misleading, such as "a flag" or "a country". For additional case studies on other datasets, we refer the reader to Appendix D.5. + +# Impact Statement + +This paper introduces Constrained Concept Refinement (CCR), a principled framework that helps bridge the long-standing gap between interpretability and accuracy in machine learning. By constraining the refinement of concept embeddings to lie within a small neighborhood around their initial values, CCR enables interpretable-by-design models + +to improve prediction performance without compromising their explainability. Our theoretical and empirical results demonstrate the effectiveness of CCR across a variety of tasks and datasets, both in terms of predictive performance and computational efficiency. + +The broader impact of this work lies in its potential to advance the practical adoption of interpretable machine learning methods in real-world settings. In particular, the computational efficiency afforded by CCR may facilitate the deployment of explainable artificial intelligence (XAI) techniques in resource-constrained environments. + +From an ethical perspective, the capacity to generate explanations that are faithful, stable, and aligned with human-interpretable concepts contributes to addressing critical concerns related to algorithmic accountability and bias. For the proposed method, hyperparameter tuning remains a crucial yet underexplored component for ensuring effective performance in practical applications. This aspect warrants careful consideration to ensure that the resulting outputs are both reliable and justifiable. + +# Acknowledgements + +This research is supported, in part, by NSF CAREER Award CCF-2337776, NSF Award DMS-2152776, and ONR Award N00014-22-1-2127. + +# References + +Adebayo, J., Gilmer, J., Muelly, M., Goodfellow, I., Hardt, M., and Kim, B. Sanity checks for saliency maps. Advances in neural information processing systems, 31, 2018. +Agarwal, A., Anandkumar, A., Jain, P., and Netrapalli, P. Learning sparsely used overcomplete dictionaries via alternating minimization. SIAM Journal on Optimization, 26(4):2775-2799, 2016. +Aharon, M., Elad, M., and Bruckstein, A. K-svd: An algorithm for designing overcomplete dictionaries for sparse representation. IEEE Transactions on signal processing, 54(11):4311-4322, 2006. +Anderson, T. W., Anderson, T. W., Anderson, T. W., and Anderson, T. W. An introduction to multivariate statistical analysis, volume 2. Wiley New York, 1958. +Arora, S., Ge, R., Ma, T., and Moitra, A. Simple, efficient, and neural algorithms for sparse coding. In Conference on learning theory, pp. 113-149. PMLR, 2015. +Baehrens, D., Schroeter, T., Harmeling, S., Kawanabe, M., Hansen, K., and Muller, K.-R. How to explain individual + +classification decisions. The Journal of Machine Learning Research, 11:1803-1831, 2010. +Barragán-Montero, A., Javaid, U., Valdés, G., Nguyen, D., Desbordes, P., Macq, B., Willems, S., Vandewinckele, L., Holmström, M., Lofman, F., et al. Artificial intelligence and machine learning for medical imaging: A technology review. Physica Medica, 83:242-256, 2021. +Bensalem, S., Cheng, C.-H., Huang, W., Huang, X., Wu, C., and Zhao, X. What, indeed, is an achievable provable guarantee for learning-enabled safety-critical systems. In International Conference on Bridging the Gap between AI and Reality, pp. 55-76. Springer, 2023. +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., 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. +Bucher, M., Herbin, S., and Jurie, F. Semantic bottleneck for computer vision tasks. In Computer Vision-ACCV 2018: 14th Asian Conference on Computer Vision, Perth, Australia, December 2-6, 2018, Revised Selected Papers, Part II 14, pp. 695-712. Springer, 2019. +Chattopadhyay, A., Slocum, S., Haeffele, B. D., Vidal, R., and Geman, D. Interpretable by design: Learning predictors by composing interpretable queries. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45 (6):7430-7443, 2022. +Chattopadhyay, A., Chan, K. H. R., Haeffele, B. D., Geman, D., and Vidal, R. Variational information pursuit for interpretable predictions. arXiv preprint arXiv:2302.02876, 2023. +Chattopadhyay, A., Pilgrim, R., and Vidal, R. Information maximization perspective of orthogonal matching pursuit with applications to explainable ai. Advances in Neural Information Processing Systems, 36, 2024. +Chowdhury, T. F., Phan, V. M. H., Liao, K., To, M.-S., Xie, Y., van den Hengel, A., Verjans, J. W., and Liao, Z. Adacbm: An adaptive concept bottleneck model for explainable and accurate diagnosis. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 35-45. Springer, 2024. +Clough, J. R., Oksuz, I., Puyol-Anton, E., Ruijsink, B., King, A. P., and Schnabel, J. A. Global and local interpretability for cardiac mri classification. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 656-664. Springer, 2019. + +Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. IEEE, 2009. +Dutta, S., Wei, H., van der Laan, L., and Alaa, A. M. Estimating uncertainty in multimodal foundation models using public internet data. arXiv preprint arXiv:2310.09926, 2023. +Feng, R., Yu, T., Jin, X., Yu, X., Xiao, L., and Chen, Z. Rethinking domain adaptation and generalization in the era of clip. In 2024 IEEE International Conference on Image Processing (ICIP), pp. 2585-2591. IEEE, 2024. +Furby, J., Cunningham, D., Braines, D., and Preece, A. Can we constrain concept bottleneck models to learn semantically meaningful input features? arXiv preprint arXiv:2402.00912, 2024. +Geman, D. and Jedynak, B. An active testing model for tracking roads in satellite images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 18(1):1-14, 1996. +Ghorbani, A., Abid, A., and Zou, J. Interpretation of neural networks is fragile. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 3681-3688, 2019. +Gondal, M. W., Gast, J., Ruiz, I. A., Droste, R., Macri, T., Kumar, S., and Staudigl, L. Domain aligned clip for few-shot classification. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 5721-5730, 2024. +Graziani, M., Andrearczyk, V., and Müller, H. Regression concept vectors for bidirectional explanations in histopathology. In Understanding and Interpreting Machine Learning in Medical Image Computing Applications: First International Workshops, MLCN 2018, DLF 2018, and iMIMIC 2018, Held in Conjunction with MICCAI 2018, Granada, Spain, September 16-20, 2018, Proceedings 1, pp. 124-132. Springer, 2018. +Hamidieh, K., Zhang, H., Gerych, W., Hartvigsen, T., and Ghassemi, M. Identifying implicit social biases in vision-language models. In Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society, volume 7, pp. 547-561, 2024. +Hastie, T. The elements of statistical learning: data mining, inference, and prediction, 2009. +Kim, E., Jung, D., Park, S., Kim, S., and Yoon, S. Probabilistic concept bottleneck models. arXiv preprint arXiv:2306.01574, 2023. + +Kindermans, P.-J., Hooker, S., Adebayo, J., Alber, M., Schütt, K. T., Dähne, S., Erhan, D., and Kim, B. The (un) reliability of saliency methods. Explainable AI: Interpreting, explaining and visualizing deep learning, pp. 267-280, 2019. +Koh, P. W., Nguyen, T., Tang, Y. S., Mussmann, S., Pierson, E., Kim, B., and Liang, P. Concept bottleneck models. In International conference on machine learning, pp. 5338-5348. PMLR, 2020. +Kolek, S., Nguyen, D. A., Levie, R., Bruna, J., and Kutyniok, G. A rate-distortion framework for explaining black-box model decisions. In International Workshop on Extending Explainable AI Beyond Deep Models and Classifiers, pp. 91-115. Springer, 2020. +Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. 2009. +Lampert, C. H., Nickisch, H., and Harmeling, S. Learning to detect unseen object classes by between-class attribute transfer. In 2009 IEEE conference on computer vision and pattern recognition, pp. 951-958. IEEE, 2009. +LeCun, Y., Bengio, Y., and Hinton, G. Deep learning. nature, 521(7553):436-444, 2015. +Liang, G., Zhang, G., Fattahi, S., and Zhang, R. Y. Simple alternating minimization provably solves complete dictionary learning. arXiv preprint arXiv:2210.12816, 2022. +Liang, G., Shi, N., Al Kontar, R., and Fattahi, S. Personalized dictionary learning for heterogeneous datasets. Advances in Neural Information Processing Systems, 36, 2024. +Mairal, J., Bach, F., and Ponce, J. Task-driven dictionary learning. IEEE transactions on pattern analysis and machine intelligence, 34(4):791-804, 2011. +Malézieux, B., Moreau, T., and Kowalski, M. Understanding approximate and unrolled dictionary learning for pattern recovery. arXiv preprint arXiv:2106.06338, 2021. +Marconato, E., Passerini, A., and Teso, S. Interpretability is in the mind of the beholder: A causal framework for human-interpretable representation learning. Entropy, 25 (12):1574, 2023. +Margeloiu, A., Ashman, M., Bhatt, U., Chen, Y., Jamnik, M., and Weller, A. Do concept bottleneck models learn as intended? arXiv preprint arXiv:2105.04289, 2021. +Motwani, R. and Raghavan, P. Randomized algorithms. ACM Computing Surveys (CSUR), 28(1):33-37, 1996. + +Oikarinen, T., Das, S., Nguyen, L. M., and Weng, T.-W. Label-free concept bottleneck models. arXiv preprint arXiv:2304.06129, 2023. +Olshausen, B. A. and Field, D. J. Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision research, 37(23):3311-3325, 1997. +Pati, Y. C., Rezaifar, R., and Krishnaprasad, P. S. Orthogonal matching pursuit: Recursive function approximation with applications to wavelet decomposition. In Proceedings of 27th Asilomar conference on signals, systems and computers, pp. 40-44. IEEE, 1993. +Quinlan, J. R. Induction of decision trees. Machine learning, 1:81-106, 1986. +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. +Ranjan, A., Wen, D., and Bhat, K. Unveiling glitches: A deep dive into image encoding bugs within clip. arXiv preprint arXiv:2407.00592, 2024. +Ravishankar, S., Ma, A., and Needell, D. Analysis of fast structured dictionary learning. Information and Inference: A Journal of the IMA, 9(4):785-811, 2020. +Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nature machine intelligence, 1(5):206-215, 2019. +Sawada, Y. and Nakamura, K. Concept bottleneck model with additional unsupervised concepts. IEEE Access, 10: 41758-41765, 2022. +Selvaraju, R. R., Cogswell, M., Das, A., Vedantam, R., Parikh, D., and Batra, D. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE international conference on computer vision, pp. 618-626, 2017. +Shao, J.-J., Shi, J.-X., Yang, X.-W., Guo, L.-Z., and Li, Y.-F. Investigating the limitation of clip models: The worst-performing categories. arXiv preprint arXiv:2310.03324, 2023. +Shrikumar, A., Greenside, P., and Kundaje, A. Learning important features through propagating activation differences. In International conference on machine learning, pp. 3145-3153. PMIR, 2017. +Simonyan, K., Vedaldi, A., and Zisserman, A. Deep inside convolutional networks: Visualising image classification models and saliency maps. arXiv preprint arXiv:1312.6034, 2013. + +Slack, D., Hilgard, S., Jia, E., Singh, S., and Lakkaraju, H. Fooling lime and shap: Adversarial attacks on post hoc explanation methods. In Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society, pp. 180-186, 2020. +Smilkov, D., Thorat, N., Kim, B., Viégas, F., and Wattenberg, M. Smoothgrad: removing noise by adding noise. arXiv preprint arXiv:1706.03825, 2017. +Subramanya, A., Pillai, V., and Piriavash, H. Fooling network interpretation in image classification. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 2020-2029, 2019. +Sun, J., Qu, Q., and Wright, J. Complete dictionary recovery over the sphere i: Overview and the geometric picture. IEEE Transactions on Information Theory, 63(2):853-884, 2016. +Tolooshams, B. and Ba, D. Stable and interpretable unrolled dictionary learning. arXiv preprint arXiv:2106.00058, 2021. +Tropp, J. A. Greed is good: Algorithmic results for sparse approximation. IEEE Transactions on Information theory, 50(10):2231-2242, 2004. +Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017. +Vershynin, R. High-dimensional probability: An introduction with applications in data science, volume 47. Cambridge university press, 2018. +Wah, C., Branson, S., Welinder, P., Perona, P., and Belongie, S. The caltech-ucsd birds-200-2011 dataset. 2011. +Wang, Y. and Kang, G. Attention head purification: A new perspective to harness clip for domain generalization. arXiv preprint arXiv:2412.07226, 2024. +Watson, D. S. Conceptual challenges for interpretable machine learning. Synthese, 200(2):65, 2022. +Yi, K., Wu, J., Gan, C., Torralba, A., Kohli, P., and Tenenbaum, J. Neural-symbolic vqa: Disentangling reasoning from vision and language understanding. Advances in neural information processing systems, 31, 2018. +Yuksekgonul, M., Wang, M., and Zou, J. Post-hoc concept bottleneck models. arXiv preprint arXiv:2205.15480, 2022. +Zarlenga, M. E., Barbiero, P., Ciravegna, G., Marra, G., Giannini, F., Diligenti, M., Precioso, F., Melacci, S., Weller, A., Lio, P., et al. Concept embedding models. In NeurIPS 2022-36th Conference on Neural Information Processing Systems, 2022. + +Zeiler, M. D. and Fergus, R. Visualizing and understanding convolutional networks. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13, pp. 818-833. Springer, 2014. +Zhou, B., Lapedriza, A., Khosla, A., Oliva, A., and Torralba, A. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6):1452-1464, 2017. +Zhou, B., Sun, Y., Bau, D., and Torralba, A. Interpretable basis decomposition for visual explanation. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 119-134, 2018. + +# A. Related Literature + +In this section, we provide a more comprehensive literature review. + +Explainable AI. In the main body of the paper, we provided an overview of related methods in explainable AI. Here, we focus on two approaches that are closely related to and comparable with our proposed method. The first is the CLIP-IP-OMP method introduced by (Chattopadhyay et al., 2024), which leverages CLIP embeddings to greedily solve sparse coding problems for each input, subsequently passing the results through a linear layer to generate final predictions. Our method builds upon the same theoretical framework established in (Chattopadhyay et al., 2024). Notably, the baseline model (without concept refinement) considered in Section 3 and Section 4 serves as a differentiable surrogate for CLIP-IP-OMP. The second approach is the label-free CBM (lf-CBM) proposed by (Oikarinen et al., 2023), which employs the inner product between CLIP embeddings to achieve state-of-the-art results in interpretable models. Specifically, lf-CBM was the first CBM model scaled to ImageNet. A detailed comparison of the performance of our method against these two approaches is provided in Section 4. + +Sparse coding and dictionary learning. Sparse Coding (Olshausen & Field, 1997) refers to the process of representing a given signal (or vector) as a sparse linear combination of fixed signals, collectively referred to as a dictionary. Dictionary Learning (Aharon et al., 2006) extends Sparse Coding to a bi-variable setting, allowing the dictionary itself to be optimized. The objective is to identify a dictionary capable of generating effective sparse codes for a specific signal distribution. (Chattopadhyay et al., 2024) establishes a novel connection between sparse coding and explainable AI, treating concept embeddings as the dictionary. Our proposed method directly optimizes concept embeddings, which draws parallels to dictionary learning, although the two approaches address fundamentally different objectives. Among works on dictionary learning, (Mairal et al., 2011) is particularly relevant, as it optimizes dictionaries for downstream tasks. However, our method distinguishes itself through the constrained concept requirement. Interestingly, (Mairal et al., 2011) aligns with our framework as a differentiable learning module, and integrating this approach with our method presents an intriguing avenue for future work. Another promising direction for future research is leveraging the personalized dictionary learning framework proposed by (Liang et al., 2024) to extend our approach to Explainable AI in the context of heterogeneous datasets. + +Theoretical guarantees. To the best of our knowledge, our work is the first to establish a convergence guarantee in the setting where dictionary atoms are updated for downstream tasks. The most closely related work is (Chattopadhyay et al., 2024), which introduced IP-OMP. However, the connection between IP-OMP and column-orthogonal matching pursuit lacks rigor due to the presence of normalization terms (see Theorem 2.5), making it difficult to prove that IP-OMP minimizes the loss $\mathcal{L}$ or $\mathcal{L}_m$ using the optimality conditions of OMP (Tropp, 2004). Another related approach is task-driven dictionary learning (Mairal et al., 2011), which establishes the differentiability of the objective function but does not provide a convergence guarantee. + +# B. Further Discussion + +In this section, we provide further discussion on Theorem 3.3 and Theorem 3.4. + +Tolerance, Sample Size, and Convergence Speed. Both theorems establish that the population loss converges to zero, provided that the initial dictionary estimate is within $\frac{1}{\sqrt{k}}$ in the column-wise $\| \cdot \|_{1,2}$ -norm from the ground-truth dictionary $D^{*}$ . Assuming that a constant fraction of the queries in $D^{*}$ is utilized to generate each $\mathbf{x}^h$ , i.e., $k = \Omega(n)$ , Theorem 3.4 indicates that each column of $D^{*}$ can be accurately recovered with a sample size of $m = O(n)$ and a convergence rate of $\alpha = 1 - \Omega(1)$ . Notably, the linear sample size and linear convergence rate is consistent with the best-known results in dictionary learning (Arora et al., 2015; Liang et al., 2022). + +Sparsity Level. It is well established in the dictionary learning literature that higher sparsity levels in ground-truth sparse codes (i.e., larger values of $k$ in Assumption 3.2) present greater challenges for recovery; see (Arora et al., 2015). Indeed, (Arora et al., 2015) asserts that sparsity levels beyond $k = \Omega \left(\frac{n}{\log n}\right)$ rarely succeed in practice, even though several approaches have been proposed to handle cases where $k = \Omega(n)$ (Sun et al., 2016; Liang et al., 2022). In contrast, our results reveal that the sparsity level $k$ plays a nuanced role when optimizing $D$ for the downstream task $\mathcal{L}$ . On the one hand, a larger $k$ imposes a more stringent initial error bound for both theorems. On the other hand, a larger $k$ in Theorem 3.4 improves the convergence rate $\tau$ and reduces the required sample size $m$ . The former phenomenon is consistent with + +findings in dictionary learning literature, where exact support recovery becomes more feasible for sparser generative models. A high-level explanation for the latter is that a denser generative model for $\beta$ provides each $\mathbf{x}$ with more information, thereby expediting the training process. + +# C. Proof of Theorems + +# C.1. Proof of Theorem 2.6 + +Our proof strategy follows two main steps: + +- Step 1: We prove that $\mathcal{L}(f_{D^*}) = 0$ . To do so, we first derive an explicit form of $f_{D^*}$ , and then show $\mathcal{L}(f_{D^*}) = 0$ for this explicit form. +- Step 2: We explicitly design a column-orthogonal $\tilde{D}$ such that $\| \tilde{D} - D^{*} \|_{1,2} \leq \epsilon$ and $\mathcal{L}(f_{\tilde{D}}) \geq \frac{2(k - 1)\epsilon^2\gamma^2}{5}$ . + +To streamline the presentation, we denote the $i$ -th column of $\pmb{D}^{*}$ as $\mathbf{d}_i^*$ . Note that $\mathbf{d}_i^*$ is identical to $\mathbf{v}_i$ used in the paper. + +- Step 1: Establishing $\mathcal{L}(f_{D^*}) = 0$ . We first provide an explicit characterization of $f_{D^*}$ . + +Lemma C.1. We have + +$$ +f _ {\boldsymbol {D} ^ {*}} \left(\mathbf {x}, \left\{r _ {\pi (i)} \right\} _ {i = 1} ^ {k}\right) = \sum_ {i \in S} \langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \rangle r _ {i}, +$$ + +where $S = \{\pi (1),\pi (2),\dots,\pi (k)\}$ is the index set selected by IP-OMP applied to $\mathbf{x}$ and $D^{*}$ . + +Our next goal is to provide an explicit characterization of $S$ , introduced in the above lemma. + +Lemma C.2. For any column-orthogonal $D$ , the index set $S = \{\pi(1), \pi(2), \dots, \pi(k)\}$ selected by IP-OMP applied to $\mathbf{x}$ and $D$ corresponds to the indices of the top- $k$ largest values of $\{|\langle \mathbf{d}_i, \mathbf{x} \rangle| \}_{i=1}^n$ : + +$$ +S = \underset {T \subseteq [ n ], | T | \leq k} {\arg \max} \sum_ {i \in T} | \langle \mathbf {d} _ {i}, \mathbf {x} \rangle |. +$$ + +Moreover, if $\pmb{D} = \pmb{D}^{*}$ , we have $S = S^{*}$ , where $S^{*}$ is the support of $\beta$ defined in Theorem 2.6. + +We defer the proofs of Lemma C.1 and Lemma C.2 to Appendix C.4.2 and Appendix C.4.3, respectively. Combining the above two lemmas, we obtain: + +$$ +f _ {D ^ {*}} \left(\mathbf {x}, \left\{r _ {\pi (i)} \right\} _ {i = 1} ^ {k}\right) = \sum_ {i \in S} \langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \rangle r _ {i}, \text {w h e r e} S = \underset {T \subseteq [ n ], | T | \leq k} {\arg \max } \sum_ {i \in T} | \langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \rangle | +$$ + +Given this explicit form of $f_{D^{*}}$ generated by IP-OMP, we are now ready to investigate the population loss $\mathcal{L}$ of that estimator. + +For any column-column-orthogonal $D$ , one can write + +$$ +\begin{array}{l} \mathcal {L} \left(f _ {\boldsymbol {D}}\right) = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} \left(\mathbf {0}, \boldsymbol {I} _ {d \times d}\right)} \left[ \left(\sum_ {i \in S} \langle \mathbf {d} _ {i}, \mathbf {x} \rangle r _ {i} - \langle \mathbf {x}, \mathbf {z} \rangle\right) ^ {2} \right] \\ = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} (\mathbf {0}, I _ {d \times d})} \left[ \left(\sum_ {i \in S} \langle \mathbf {d} _ {i}, \mathbf {x} \rangle \langle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \rangle - \langle \mathbf {x}, \mathbf {z} \rangle\right) ^ {2} \right] \\ = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} (\mathbf {0}, I _ {d \times d})} \left[ \left(\sum_ {i \in S} \left\langle \mathbf {d} _ {i} ^ {*} \mathbf {d} _ {i} ^ {\top} \mathbf {x}, \mathbf {z} \right\rangle - \left\langle \mathbf {x}, \mathbf {z} \right\rangle\right) ^ {2} \right] \tag {7} \\ = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} (\mathbf {0}, I _ {d \times d})} \left[ \left(\left\langle D _ {S} ^ {*} D _ {S} ^ {\top} \mathbf {x}, \mathbf {z} \right\rangle - \left\langle \mathbf {x}, \mathbf {z} \right\rangle\right) ^ {2} \right] \\ = \mathbb {E} _ {\mathbf {z} \sim \mathcal {N} (\mathbf {0}, I _ {d \times d})} \left[ \left(\left\langle D _ {S} ^ {*} D _ {S} ^ {\top} \mathbf {x} - \mathbf {x}, \mathbf {z} \right\rangle\right) ^ {2} \right] \\ \end{array} +$$ + +It is easy to verify that random variable $\langle D_S^* D_S^\top \mathbf{x} - \mathbf{x},\mathbf{z}\rangle$ is distributed as $\mathcal{N}(0,\| D_S^* D_S^\top \mathbf{x} - \mathbf{x}\| _2^2)$ . As a result, we can conclude that + +$$ +\mathcal {L} \left(f _ {D}\right) = \left\| D _ {S} ^ {*} D _ {S} ^ {\top} \mathbf {x} - \mathbf {x} \right\| _ {2} ^ {2} \quad \text {f o r a n y c o l u m n - o r t h o g o n a l} D. \tag {8} +$$ + +Given Lemma C.2, we have $S = S^{*}$ . We can subsequently conclude that: + +$$ +D _ {S} ^ {*} D _ {S} ^ {* \top} \mathbf {x} = D _ {S ^ {*}} ^ {*} D _ {S ^ {*}} ^ {* \top} \mathbf {x} = D _ {S ^ {*}} ^ {*} D _ {S ^ {*}} ^ {* \top} D _ {S ^ {*}} ^ {*} \beta_ {S ^ {*}} = D _ {S ^ {*}} ^ {*} \beta_ {S ^ {*}} = \mathbf {x}, +$$ + +This leads to $\mathcal{L}(f_{\pmb{D}^*}) = \| \pmb{D}_S^*\pmb{D}_S^{*\top}\mathbf{x} - \mathbf{x}\| _2^2 = 0$ , thereby completing the proof of our first step. + +- Step 2: Constructing $\tilde{D}$ . Without loss of generality, let us assume $S^{*} = [k]$ , where $k$ to be even. The case where $k$ is odd is easily proved by following the argument below and replacing $k$ with $k - 1$ . Consider the following explicit form for $\tilde{D}$ : + +$$ +\left\{ \begin{array}{l l} \tilde {\mathbf {d}} _ {i} = \cos \theta \mathbf {d} _ {i} ^ {*} + \sin \theta \mathbf {d} _ {i + k / 2} ^ {*}, & 1 \leq i \leq k / 2, \\ \tilde {\mathbf {d}} _ {i + k / 2} = - \sin \theta \mathbf {d} _ {i} ^ {*} + \cos \theta \mathbf {d} _ {i + k / 2} ^ {*} & 1 \leq i \leq k / 2, \\ \tilde {\mathbf {d}} _ {i} = \mathbf {d} _ {i} ^ {*} & i > k, \end{array} \right. +$$ + +where $\theta$ is an angle to be determined later. + +Intuitively, $\bar{D}$ is constructed by iteratively selecting a pair of columns in $D_S^*$ and rotating them by an angle $\theta > 0$ within the two-dimensional subspace spanned by each pair. Based on its definition, we can establish the following properties for $\bar{D}$ : + +Lemma C.3. $\tilde{D}$ has the following properties: + +- $\tilde{D}$ is column-orthogonal. +$\| \tilde{D} - D^{*}\|_{1,2} = 2\sin \frac{\theta}{2}.$ + +The proof of Lemma C.3 is presented in Appendix C.4.4. + +Our next step is to calculate $\mathcal{L}(f_{\tilde{D}})$ . Note that $\tilde{D}$ is column-orthogonal according to Lemma C.3. Therefore, according to Equation (8), we have $\mathcal{L}(f_{\tilde{D}}) = \| D_S^*\tilde{D}_S^\top \mathbf{x} - \mathbf{x}\|_2^2$ . According to Lemma C.2, in order to obtain the index set $S$ selected by IP-OMP applied to $\mathbf{x}$ and $\tilde{D}$ , we need to find the indices of the top- $k$ largest values of $|\langle \tilde{\mathbf{d}}_i,\mathbf{x}\rangle |$ . For $1\leq i\leq k / 2$ , we have: + +$$ +\begin{array}{l} | \langle \tilde {\mathbf {d}} _ {i}, \mathbf {x} \rangle | = \left| \left\langle \cos \theta \mathbf {d} _ {i} ^ {*} + \sin \theta \mathbf {d} _ {i + k / 2} ^ {*}, \sum_ {j = 1} ^ {k} \beta_ {j} \mathbf {d} _ {j} ^ {*} \right\rangle \right| \\ = | \cos \theta \beta_ {i} + \sin \theta \beta_ {i + k / 2} | \\ \end{array} +$$ + +Upon choosing $\theta$ such that $\tan \theta < \gamma /\Gamma$ , we have + +$$ +| \cos \theta \beta_ {i} | \geq \left| \frac {\sin \theta \gamma}{\tan \theta} \right| > | \sin \theta \Gamma | \geq | \sin \theta \beta_ {i + k / 2} |, +$$ + +which guarantees that $|\langle \tilde{\mathbf{d}}_i, \mathbf{x} \rangle| > 0$ . Similarly, for $1 + k / 2 \leq i \leq k$ , we have: + +$$ +\begin{array}{l} | \langle \tilde {\mathbf {d}} _ {i}, \mathbf {x} \rangle | = \left| \left\langle \cos \theta \mathbf {d} _ {i} ^ {*} - \sin \theta \mathbf {d} _ {i - k / 2} ^ {*}, \sum_ {j = 1} ^ {k} \beta_ {j} \mathbf {d} _ {j} ^ {*} \right\rangle \right| \\ = | \cos \theta \beta_ {i} - \sin \theta \beta_ {i - k / 2} | \\ > 0. \\ \end{array} +$$ + +For $i > k$ , we have $|\langle \tilde{\mathbf{d}}_i, \mathbf{x} \rangle| = |\langle \mathbf{d}_i^*, \mathbf{x} \rangle| = 0$ . As a result, when $\tan \theta < \gamma/\Gamma$ , Lemma C.2 guarantees that the index set selected by IP-OMP is $S = [k] = S^*$ . Given this fact, we can calculate $\mathcal{L}(f_{\tilde{D}})$ as: + +$$ +\begin{array}{l} \mathcal {L} \left(f _ {\tilde {D}}\right) = \left\| D _ {S} ^ {*} \tilde {D} _ {S} ^ {\top} \mathbf {x} - \mathbf {x} \right\| _ {2} ^ {2} \\ = \left\| D _ {S ^ {*}} ^ {*} \tilde {D} _ {S ^ {*}} ^ {\top} \mathbf {x} - \mathbf {x} \right\| _ {2} ^ {2} \\ = \left\| \boldsymbol {D} _ {S ^ {*}} ^ {*} \tilde {\boldsymbol {D}} _ {S ^ {*}} ^ {\top} \sum_ {i = 1} ^ {k} \beta_ {i} \mathbf {d} _ {i} ^ {*} - \sum_ {i = 1} ^ {k} \beta_ {i} \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {(a)} {=} \left\| \sum_ {i = 1} ^ {k / 2} \left(\cos \theta \beta_ {i} + \sin \theta \beta_ {i + k / 2}\right) \mathbf {d} _ {i} ^ {*} + \sum_ {i = 1 + k / 2} ^ {k} \left(\cos \theta \beta_ {i} - \sin \theta \beta_ {i - k / 2}\right) \mathbf {d} _ {i} ^ {*} - \sum_ {i = 1} ^ {k} \beta_ {i} \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \tag {9} \\ = \left\| \sum_ {i = 1} ^ {k / 2} \left((\cos \theta - 1) \beta_ {i} + \sin \theta \beta_ {i + k / 2}\right) \mathbf {d} _ {i} ^ {*} + \sum_ {i = 1 + k / 2} ^ {k} \left((\cos \theta - 1) \beta_ {i} - \sin \theta \beta_ {i - k / 2}\right) \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ \stackrel {(b)} {=} \sum_ {i = 1} ^ {k / 2} \left((\cos \theta - 1) \beta_ {i} + \sin \theta \beta_ {i + k / 2}\right) ^ {2} + \sum_ {i = 1 + k / 2} ^ {k} \left((\cos \theta - 1) \beta_ {i} - \sin \theta \beta_ {i - k / 2}\right) ^ {2}, \\ \end{array} +$$ + +where (a) is based on the construction of $\tilde{D}$ , and (b) is due to the assumption that $D^{*}$ is column-orthogonal. When $\sin \frac{\theta}{2} \leq \frac{1}{\sqrt{1 + 16\Gamma^2 / \gamma^2}}$ , we have for $1 \leq i \leq k / 2$ : + +$$ +\begin{array}{l} \sin \theta = 2 \sin \frac {\theta}{2} \cos \frac {\theta}{2} \\ = 2 \sin \frac {\theta}{2} \sqrt {1 - \sin^ {2} \frac {\theta}{2}} \\ \geq 2 \sin \frac {\theta}{2} \cdot \frac {4 \Gamma}{\gamma} \frac {1}{\sqrt {1 + 1 6 \Gamma^ {2} / \gamma^ {2}}} \\ \geq \frac {8 \Gamma}{\gamma} \sin^ {2} \frac {\theta}{2} \\ = \frac {4 \Gamma}{\gamma} (1 - \cos \theta), \\ \end{array} +$$ + +which leads to + +$$ +\begin{array}{l} \left((\cos \theta - 1) \beta_ {i} + \sin \theta \beta_ {i + k / 2}\right) ^ {2} \\ = (\cos \theta - 1) ^ {2} \beta_ {i} ^ {2} + 2 (\cos \theta - 1) \sin \theta \beta_ {i} \beta_ {i + k / 2} + \sin^ {2} \theta \beta_ {i + k / 2} ^ {2} \\ \geq 2 (\cos \theta - 1) \sin \theta \beta_ {i} \beta_ {i + k / 2} + \sin^ {2} \theta \beta_ {i + k / 2} ^ {2} \\ \geq - \left| \frac {\gamma}{2 \Gamma} \sin^ {2} \theta \beta_ {i} \beta_ {i + k / 2} \right| + \sin^ {2} \theta \beta_ {i + k / 2} ^ {2} \\ \geq \frac {1}{2} \sin^ {2} \theta \beta_ {i + k / 2} ^ {2}. \\ \end{array} +$$ + +With identical arguments, we have for $1 + k / 2 \leq i \leq k$ : + +$$ +\left((\cos \theta - 1) \beta_ {i} + \sin \theta \beta_ {i - k / 2}\right) ^ {2} \geq \frac {1}{2} \sin^ {2} \theta \beta_ {i - k / 2} ^ {2}. +$$ + +As a result, Equation (9) reduces to: + +$$ +\begin{array}{l} \mathcal {L} \left(f _ {\tilde {D}}\right) \geq \sum_ {i = 1} ^ {k / 2} \frac {1}{2} \sin^ {2} \theta \beta_ {i + k / 2} ^ {2} + \sum_ {i = 1 + k / 2} ^ {k} \frac {1}{2} \sin^ {2} \theta \beta_ {i - k / 2} ^ {2} \\ \geq \frac {k}{2} \sin^ {2} \theta \gamma^ {2} \\ \end{array} +$$ + +Finally, we need to perform a change of variable by setting $\epsilon = 2\sin \frac{\theta}{2}$ . Elementary calculation gives $\sin \theta = \frac{\epsilon\sqrt{4 - \epsilon^2}}{2}$ and $\tan \theta = \frac{\epsilon\sqrt{4 - \epsilon^2}}{2 - \epsilon^2}$ . When $\epsilon < \frac{1}{2}$ , we have $\sin \theta \geq 9\epsilon / 10$ and $\tan \theta \leq 6\epsilon / 5$ . Recall that our proof requires $\tan \theta < \gamma / \Gamma$ and $\sin \frac{\theta}{2} \leq \frac{1}{\sqrt{1 + 16\Gamma^2 / \gamma^2}}$ . As a result, when $\epsilon = 2\sin \frac{\theta}{2} \leq \min \left(\frac{1}{2}, \frac{5\gamma}{6\Gamma}, \frac{1}{\sqrt{1 + 16\Gamma^2 / \gamma^2}}\right) = \frac{1}{\sqrt{1 + 16\Gamma^2 / \gamma^2}}$ , we have + +$$ +\mathcal {L} \left(f _ {\tilde {D}}\right) - \mathcal {L} \left(f _ {D ^ {*}}\right) = \mathcal {L} \left(f _ {\tilde {D}}\right) \geq \frac {8 1 k \epsilon^ {2} \gamma^ {2}}{2 0 0}. +$$ + +As we mentioned, for an odd value of $k$ , an analogous argument can be made to arrive at a similar bound of + +$$ +\mathcal {L} (f _ {\tilde {D}}) - \mathcal {L} (f _ {D ^ {*}}) = \mathcal {L} (f _ {\tilde {D}}) \geq \frac {8 1 (k - 1) \epsilon^ {2} \gamma^ {2}}{2 0 0}, +$$ + +This completes the proof of Theorem 2.6. + +![](images/07c011c7870426663be253566af55184a90b2fd6a23bb6616d5cb90007193d39.jpg) + +# C.2. Proof of Theorem 3.3 + +To prove the convergence of $\mathcal{L}\left(\tilde{f}_{\pmb{D}^{(t)}}\right)$ , we use an inductive approach where at each iteration, we will subsequently prove: (1) $\tilde{f}$ recovers the exact support $S^*$ ; (2) gradient descent will make progress towards one of the optimal minimizers which will be explicitly defined later; (3) $\mathcal{L}\left(\tilde{f}_{\pmb{D}^{(t)}}\right)$ will decrease linearly. + +Recall that $\pmb{D}^{(t)} = \pmb{D} + \Delta \pmb{D}^{(t)}$ . The equations below rewrite Equation (5) for each column $i \in [n]$ of $\pmb{D}^{(t)}$ . + +$$ +\mathbf {d} _ {i} ^ {(t + 0. 5)} = \mathbf {d} _ {i} ^ {(t)} - \eta \frac {\partial \mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t)}}\right)}{\partial \mathbf {d} _ {i} ^ {(t)}}, \tag {10} +$$ + +$$ +\mathbf {d} _ {i} ^ {(t + 1)} = \underset {\mathbf {d}: \| \mathbf {d} - \mathbf {d} _ {i} ^ {(0)} \| _ {2} \leq \rho} {\arg \min } \| \mathbf {d} - \mathbf {d} _ {i} ^ {(t + 0. 5)} \| _ {2}. \tag {11} +$$ + +It is easy to verify that the above update rules are equivalent to Equation (5). We will use induction to prove this theorem. In particular, define + +$$ +A (t): \mathcal {L} (\tilde {f} _ {\boldsymbol {D} ^ {(t)}}) \leq \tau^ {2} \mathcal {L} (\tilde {f} _ {\boldsymbol {D} ^ {(t - 1)}}), \text {w h e r e} \tau = 1 - 2 \eta \| \mathbf {x} \| _ {2} ^ {2}. +$$ + +To prove this we define an auxiliary feature vector which will play an important role in our arguments: + +$$ +\widehat {\mathbf {d}} _ {i} = \mathbf {d} _ {i} ^ {(0)} + \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x}, \quad \forall i \in [ n ]. \tag {12} +$$ + +Based on this auxiliary feature vector, we define the following event: + +$$ +B (t): \quad \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x}, \qquad \forall i \in [ n ]. +$$ + +Now, our proof strategy is to show that, for $t = 0,1,\ldots$ : + +- $B(t)$ implies $B(t + 1)$ , +$B(t)$ implies $A(t + 1)$ + +This two statements combined will establish the correctness of Theorem 3.3. Indeed, the base case $A(0)$ is trivially satisfied due to Equation (12). + +- Establishing $B(t) \Rightarrow B(t + 1)$ . To begin with, we use the following lemma to show that $\tilde{f}$ is able to find the correct support when $D^{(t)}$ is close enough to $D$ : + +Lemma C.4. For any $D$ such that $\| D - D^{*}\|_{1,2}\leq 2\rho < \frac{\gamma}{4\sqrt{k}\Gamma}$ , we have + +$$ +S = \underset {T \subseteq [ n ], | T | \leq k} {\arg \max} \sum_ {i \in T} | \langle \mathbf {d} _ {i}, \mathbf {x} \rangle | = S ^ {*}. +$$ + +We defer the proof of Lemma C.4 to Appendix C.4.5. To invoke Lemma C.4, we have + +$$ +\| \pmb {D} ^ {(t)} - \pmb {D} ^ {*} \| _ {1, 2} \leq \| \pmb {D} ^ {(t)} - \pmb {D} ^ {(0)} \| _ {1, 2} + \| \pmb {D} ^ {(0)} - \pmb {D} ^ {*} \| _ {1, 2} \leq \rho + \rho = 2 \rho . +$$ + +The bound on $\| D^{(t)} - D^{(0)}\|_{1,2}$ follows from the projection step in Equation (11) while the bound on $\| D^{(0)} - D^{*}\|_{1,2}$ follows from the initial error bound. We can then conclude that $S = S^{*}$ at every iteration $t$ , which means that Equation (10) and Equation (11) will only change $i\in S^*$ , while for other $i\notin S^*$ , we have $\mathbf{d}_i^{(t + 1)} = \mathbf{d}_i^{(t)}$ . This immediately implies that $B(t)$ is trivially satisfied for $\forall i\notin S^{*}$ and $\forall t$ . Now, the goal is to show that $B(t)\Rightarrow B(t + 1)$ for $\forall i\in S^{*}$ . + +Based on Equation (8), we have + +$$ +\mathcal {L} (\tilde {f} _ {\pmb {D} ^ {(t)}}) = \| \pmb {D} _ {S ^ {*}} ^ {*} \pmb {D} _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \mathbf {x} \| _ {2} ^ {2}, +$$ + +Subsequently, the gradient of $\mathcal{L}$ at $D_{S^*}^{(t)}$ can be written as: + +$$ +\begin{array}{l} \frac {\partial \mathcal {L} (\tilde {f} _ {\boldsymbol {D} ^ {(t)}})}{\partial \boldsymbol {D} _ {S ^ {*}} ^ {(t)}} = 2 \mathbf {x} \left(\boldsymbol {D} _ {S ^ {*}} ^ {*} \boldsymbol {D} _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \mathbf {x}\right) ^ {\top} \boldsymbol {D} _ {S ^ {*}} ^ {*} \\ = 2 \mathbf {x} \left(\boldsymbol {D} _ {S ^ {*}} ^ {*} \boldsymbol {D} _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \boldsymbol {D} _ {S ^ {*}} ^ {*} \boldsymbol {\beta} _ {S ^ {*}}\right) ^ {\top} \boldsymbol {D} _ {S ^ {*}} ^ {*} \\ = 2 \mathbf {x} \left(\boldsymbol {D} _ {S ^ {*}} ^ {(t) ^ {\top}} \mathbf {x} - \boldsymbol {\beta} _ {S ^ {*}}\right) ^ {\top} \boldsymbol {D} _ {S ^ {*}} ^ {*} ^ {\top} \boldsymbol {D} _ {S ^ {*}} ^ {*} \\ = 2 \mathbf {x} \left(\boldsymbol {D} _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \boldsymbol {\beta} _ {S ^ {*}}\right) ^ {\top}. \\ \end{array} +$$ + +For $i\in S^*$ , we have + +$$ +\frac {\partial \mathcal {L} (\tilde {f} _ {\pmb {D} ^ {(t)}})}{\partial \mathbf {d} _ {i} ^ {(t)}} = 2 (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \boldsymbol {\beta} _ {i}) \mathbf {x}. +$$ + +This implies that: + +$$ +\begin{array}{l} \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t + 0. 5)} = \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} + 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x} \\ \stackrel {A (t)} {=} \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} + 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x} \\ = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \left(\mathbf {d} _ {i} ^ {(t + 0 . 5)} + 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x}\right)}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} + 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x} \\ = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} - 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x} + 2 \eta (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \beta_ {i}) \mathbf {x} \\ = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x}. \\ \end{array} +$$ + +In other words, $B(t)$ implies $B(t + 0.5)$ . Suppose $\| \mathbf{d}_i^{(t + 0.5)} - \mathbf{d}_i^{(0)}\|_2 \leq \rho$ , then we have $\mathbf{d}_i^{(t + 1)} = \mathbf{d}_i^{(t + 0.5)}$ , which readily implies $B(t + 1)$ . On the other hand, if $\| \mathbf{d}_i^{(t + 0.5)} - \mathbf{d}_i^{(0)}\|_2 > \rho$ , we have: + +$$ +\begin{array}{l} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {(0)} = \left(\mathbf {d} _ {i} ^ {(t + 0. 5)} - \widehat {\mathbf {d}} _ {i}\right) - \left(\mathbf {d} _ {i} ^ {(0)} - \widehat {\mathbf {d}} _ {i}\right) \\ \stackrel {A (t + 0. 5), A (0)} {=} - \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} + \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} \tag {13} \\ = \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x}, \\ \end{array} +$$ + +Therefore, when $\| \mathbf{d}_i^{(t + 0.5)} - \mathbf{d}_i^{(0)}\| _2 > \rho$ we have: + +$$ +\begin{array}{l} \mathbf{d}_{i}^{(t + 1)} = \operatorname *{arg min}_{\substack{\mathbf{d}:||\mathbf{d} - \mathbf{d}_{i}^{(0)}||_{2}\leq \rho}}\| \mathbf{d} - \mathbf{d}_{i}^{(t + 0.5)}\|_{2} \\ = \mathbf {d} _ {i} ^ {(0)} + \rho \frac {\mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {d} _ {i} ^ {(0)} \| _ {2}} \tag {14} \\ = \mathbf {d} _ {i} ^ {(0)} + \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}}. \\ \end{array} +$$ + +This in turn implies + +$$ +\begin{array}{l} \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t + 1)} \\ = \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(0)} - \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}} \\ \end{array} +$$ + +$$ +\begin{array}{l} \stackrel {A (0)} {=} \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} - \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}} \\ = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \left(\mathbf {d} _ {i} ^ {(t + 1)} - \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}}\right)}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} - \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}} \\ = \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 1)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x}, \\ \end{array} +$$ + +establishing $B(t + 1)$ , as desired. + +- Establishing $B(t) \Rightarrow A(t + 1)$ . First, we establish $\| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 1)}\| _2 \leq \tau \| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t)}\| _2$ . We do so in two steps. First, we prove that $\| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 0.5)}\| _2 \leq \tau \| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t)}\| _2$ . Then, we show that $\| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 1)}\| _2 \leq \| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 0.5)}\| _2$ . + +To establish $\| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 1)}\| _2\leq \tau \| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t)}\| _2$ , one can write: + +$$ +\begin{array}{l} \left\| \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t + 0. 5)} \right\| _ {2} = \left\| \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} + 2 \eta \left(\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} - \boldsymbol {\beta} _ {i}\right) \mathbf {x} \right\| _ {2} \\ \stackrel {A (t)} {=} \left\| \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} - 2 \eta \| \mathbf {x} \| _ {2} ^ {2} \left(\widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)}\right) \right\| _ {2} \\ \leq \left| 1 - 2 \eta \| \mathbf {x} \| _ {2} ^ {2} \right| \| \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} \| _ {2} \\ = \tau \| \widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(t)} \| _ {2}. \\ \end{array} +$$ + +Next, we show that $\| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 1)}\| _2\leq \| \widehat{\mathbf{d}}_i - \mathbf{d}_i^{(t + 0.5)}\| _2$ . To do so, we need the following elementary lemma: + +Lemma C.5. Given a fixed vector $\mathbf{v}$ and $\mathbf{a} = a\mathbf{v}$ , $\mathbf{b} = b\mathbf{v}$ , $\mathbf{c} = c\mathbf{v}$ , where $\mathbf{a}$ , $\mathbf{b}$ , and $\mathbf{c}$ are vectors and $a$ , $b$ , $c$ are scalars, if $|c| \geq |b| \geq a$ and $bc > 0$ , we have $\|\mathbf{c} - \mathbf{a}\|_2 \geq \|\mathbf{b} - \mathbf{a}\|_2$ . + +We will prove Lemma C.5 in Appendix C.4.6. Now we invoke Lemma C.5 with: + +$$ +\begin{array}{l} \mathbf {v} = \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}}, \\ a = \frac {\boldsymbol {\beta} _ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2}}, \\ b = \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right), \\ c = \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2}}. \\ \end{array} +$$ + +Here $bc > 0$ is given by their definition. Moreover $|c| \geq |b|$ is established as: + +$$ +\begin{array}{l} | c | = \left| \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2}} \right| \\ = \left\| \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} \right\| _ {2} \\ \stackrel {(1 3)} {=} \left\| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {(0)} \right\| _ {2} \\ \geq \rho \\ = | b |. \\ \end{array} +$$ + +Finally, $|b| > a$ is given by: + +$$ +\begin{array}{l} a = \frac {\boldsymbol {\beta} _ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2}} \\ = \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {*} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2}} \\ \leq \frac {\left\| \mathbf {d} _ {i} ^ {*} - \mathbf {d} _ {i} ^ {(0)} \right\| _ {2} \left\| \mathbf {x} \right\| _ {2}}{\left\| \mathbf {x} \right\| _ {2}} \tag {15} \\ \leq \left\| \mathbf {D} ^ {*} - \mathbf {D} ^ {(0)} \right\| _ {1, 2} \\ = \rho \\ = | b |. \\ \end{array} +$$ + +Now, upon substituting these parameters in Lemma C.5, we have $\| \mathbf{c} - \mathbf{a}\| _2\geq \| \mathbf{b} - \mathbf{a}\| _2$ , which can be rewritten as: + +$$ +\begin{array}{l} \left\| \frac {\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0 . 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} - \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} \right\| _ {2} \geq \left\| \rho \mathrm {s i g n} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}\right) \frac {\mathbf {x}}{\| \mathbf {x} \| _ {2}} - \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(0)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} \right\| _ {2} \\ \left\| \left(\mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {(0)}\right) - \left(\widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(0)}\right) \right\| _ {2} \overset {(a)} {\geq} \left\| \left(\mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(0)}\right) - \left(\widehat {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {(0)}\right) \right\| _ {2} \\ \| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \widehat {\mathbf {d}} _ {i} \| _ {2} \geq \| \mathbf {d} _ {i} ^ {(t + 1)} - \widehat {\mathbf {d}} _ {i} \| _ {2} \\ \end{array} +$$ + +Here inequality (a) is obtained by Equation (13), Equation (12), and Equation (14). We can now conclude that: + +$$ +\left\| \mathbf {d} _ {i} ^ {(t + 1)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} \leq \left\| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} \leq \tau \left\| \mathbf {d} _ {i} ^ {(t)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2}. \tag {16} +$$ + +Finally, we are ready to establish $A(t + 1)$ . We rewrite $\mathcal{L}(\tilde{f}_{\pmb{D}^{(t)}})$ as: + +$$ +\begin{array}{l} \mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t)}}\right) = \left\| \boldsymbol {D} _ {S ^ {*}} ^ {*} \boldsymbol {D} _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \mathbf {x} \right\| _ {2} ^ {2} \\ = \left\| D _ {S ^ {*}} ^ {*} D _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - D _ {S ^ {*}} ^ {*} \beta_ {S ^ {*}} \right\| _ {2} ^ {2} \\ = \left\| D _ {S ^ {*}} ^ {(t) \top} \mathbf {x} - \boldsymbol {\beta} _ {S ^ {*}} \right\| _ {2} ^ {2} \\ = \sum_ {i \in S ^ {*}} \left(\mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t)} - \boldsymbol {\beta} _ {i}\right) ^ {2} \\ = \sum_ {i \in S ^ {*}} \left\| \frac {\beta_ {i} - \mathbf {x} ^ {\top} \mathbf {d} _ {i} ^ {(t)}}{\| \mathbf {x} \| _ {2} ^ {2}} \mathbf {x} \right\| _ {2} ^ {2} \| \mathbf {x} \| _ {2} ^ {2} \\ \stackrel {B (t)} {=} \sum_ {i \in S ^ {*}} \left\| \mathbf {d} _ {i} ^ {(t)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} ^ {2} \| \mathbf {x} \| _ {2} ^ {2} \\ \end{array} +$$ + +On the other hand, + +$$ +\mathcal {L} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t + 1)}}\right) = \sum_ {i \in S ^ {*}} \left\| \mathbf {d} _ {i} ^ {(t + 1)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} ^ {2} \| \mathbf {x} \| _ {2} ^ {2} +$$ + +can be established by identical arguments. Finally, we have + +$$ +\mathcal {L} (\tilde {f} _ {\pmb {D} ^ {(t + 1)}}) = \sum_ {i \in S ^ {*}} \left\| \mathbf {d} _ {i} ^ {(t + 1)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} ^ {2} \| \mathbf {x} \| _ {2} ^ {2} \stackrel {(1 6)} {\leq} \tau^ {2} \sum_ {i \in S ^ {*}} \left\| \mathbf {d} _ {i} ^ {(t)} - \widehat {\mathbf {d}} _ {i} \right\| _ {2} ^ {2} \| \mathbf {x} \| _ {2} ^ {2} = \mathcal {L} (\tilde {f} _ {\pmb {D} ^ {(t)}}), +$$ + +which is exactly $B(t + 1)$ . As a result, we have proved Theorem 3.3. + +# C.3. Proof of Theorem 3.4 + +To prove the statements of this theorem, we first establish the convergence of $\| \mathbf{d}_i^{(t)} - \mathbf{d}_i^*\| _2$ for every $i\in [n]$ . Then, we provide the desired upper bound on $\mathcal{L}_m\left(\tilde{f}_{\pmb{D}^{(t)}}\right)$ in terms of $\| D^{(t)} - D^{*}\|_{1,2}^2$ . + +We will follow the same index convention defined in Equation (10) and Equation (11), with $\mathcal{L}$ replaced by $\mathcal{L}_m$ . For each $h \in [m]$ , we use $\beta^h$ and $S^{h*}$ to denote the corresponding variables in Assumption 3.2. We define the set $Q_i$ as the index set of $h$ such that $i$ is in the support of $\beta^h$ : + +$$ +Q _ {i} := \left\{h \in [ m ] \mid i \in S ^ {h *} \right\}. +$$ + +Given Lemma C.4, we have: + +$$ +\frac {\partial \mathcal {L} _ {m} (\tilde {f} _ {\pmb {D} ^ {(t)}})}{\partial \mathbf {d} _ {i} ^ {(t)}} = \frac {1}{m} \sum_ {h \in Q _ {i}} 2 (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \boldsymbol {\beta} _ {i} ^ {h}) \mathbf {x} ^ {h}, \qquad \forall i \in [ n ]. +$$ + +To ensure that $\frac{\partial\mathcal{L}_m(\tilde{f}_D^{(t)})}{\partial\mathbf{d}_i^{(t)}}$ is indeed aligned with $\mathbf{d}_i^{(t)} - \mathbf{d}_i^*$ , we first need the following lemma: + +Lemma C.6. Suppose that $m = \Omega\left(\frac{n^6}{\sigma^2k^5}\right)$ . With probability at least $1 - 2\exp \{\log n - n\} - 2\exp \left\{\log n - \frac{km}{8n}\right\}$ , for all $i \in [n]$ , + +$$ +\frac {1}{m} \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h ^ {\top}}\right) \geq \frac {k (k - 1) \sigma^ {2}}{4 n ^ {2}}, +$$ + +$$ +\frac {1}{m} \sigma_ {1} \left(\sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h \top}\right) \leq \frac {4 k \sigma^ {2}}{n}. +$$ + +We defer the proof of Lemma C.6 to Appendix C.4.7. Now, we can bound $\| \mathbf{d}_i^{(t + 0.5)} - \mathbf{d}_i^*\| _2^2$ as: + +$$ +\begin{array}{l} \left\| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} = \left\| \mathbf {d} _ {i} ^ {(t)} - \frac {\eta}{m} \sum_ {h \in Q _ {i}} 2 \left(\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \boldsymbol {\beta} _ {i} ^ {h}\right) \mathbf {x} ^ {h} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ = \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} - 4 \eta \left\langle \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}, \frac {1}{m} \sum_ {h \in Q _ {i}} \left(\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \beta_ {i} ^ {h}\right) \mathbf {x} ^ {h} \right\rangle + 4 \eta^ {2} \left\| \frac {1}{m} \sum_ {h \in Q _ {i}} \left(\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \beta_ {i} ^ {h}\right) \mathbf {x} ^ {h} \right\| _ {2} ^ {2}. \tag {17} \\ \end{array} +$$ + +For the second term on the right hand side, we have: + +$$ +\begin{array}{l} \left\langle \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}, \frac {1}{m} \sum_ {h \in Q _ {i}} (\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \beta_ {i} ^ {h}) \mathbf {x} ^ {h} \right\rangle \\ = \left\langle \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}, \frac {1}{m} \sum_ {h \in Q _ {i}} \left(\mathbf {d} _ {i} ^ {(t) ^ {\top}} \mathbf {x} ^ {h} - \mathbf {d} _ {i} ^ {* ^ {\top}} \mathbf {x} ^ {h}\right) \mathbf {x} ^ {h} \right\rangle \\ = \left\langle \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}, \frac {1}{m} \sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h \top} \left(\mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}\right) \right\rangle \\ \geq \frac {1}{m} \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h \top}\right) \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ \stackrel {L e m m a C. 6} {\geq} \frac {k (k - 1) \sigma^ {2}}{4 n ^ {2}} \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2}. \\ \end{array} +$$ + +For the third term on the right hand side of Equation (17), we have: + +$$ +\begin{array}{l} \left\| \frac {1}{m} \sum_ {h \in Q _ {i}} \left(\mathbf {d} _ {i} ^ {(t) \top} \mathbf {x} ^ {h} - \boldsymbol {\beta} _ {i} ^ {h}\right) \mathbf {x} ^ {h} \right\| _ {2} ^ {2} \\ = \left\| \frac {1}{m} \sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h \top} \left(\mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*}\right) \right\| _ {2} ^ {2} \\ \leq \frac {1}{m ^ {2}} \sigma_ {1} ^ {2} \left(\sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h \top}\right) \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ \stackrel {L e m m a} {\leq} C. 6 \quad \frac {1 6 k ^ {2} \sigma^ {4}}{n ^ {2}} \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2}. \\ \end{array} +$$ + +When $\eta < \frac{k - 1}{128k\sigma^2}$ , the above two inequalities can be combined with Equation (17) to arrive at: + +$$ +\begin{array}{l} \left\| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \leq \left(1 - \frac {k (k - 1) \sigma^ {2}}{n ^ {2}} \eta + \frac {6 4 k ^ {2} \sigma^ {4}}{n ^ {2}} \eta^ {2}\right) \left\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \right\| _ {2} ^ {2} \\ \leq \left(1 - \frac {k (k - 1) \sigma^ {2}}{2 n ^ {2}} \eta\right) \| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2} \tag {18} \\ \leq \tau^ {2} \| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2}. \\ \end{array} +$$ + +Next, we aim to show that $\| \mathbf{d}_i^{(t + 1)} - \mathbf{d}_i^*\| _2^2\leq \| \mathbf{d}_i^{(t + 0.5)} - \mathbf{d}_i^*\| _2^2$ . Recall that: + +$$ +\mathbf{d}_{i}^{(t + 1)} = \operatorname *{arg min}_{\mathbf{d}\in D}\| \mathbf{d} - \mathbf{d}_{i}^{(t + 0.5)}\|_{2}^{2}\quad \text{where}\quad D = \{\mathbf{d}: \| \mathbf{d} - \mathbf{d}_{i}^{(0)}\|_{2}\leq \rho \} . +$$ + +It is obvious that $D$ is convex and $\| \mathbf{d} - \mathbf{d}_i^{(t + 0.5)}\| _2^2$ is strongly convex with respect to $\mathbf{d}$ . As a result, first order stationary condition requires that: + +$$ +\left\langle \nabla_ {\mathbf {d} = \mathbf {d} _ {i} ^ {(t + 1)}} \| \mathbf {d} - \mathbf {d} _ {i} ^ {(t + 0. 5)} \| _ {2} ^ {2}, \tilde {\mathbf {d}} - \mathbf {d} _ {i} ^ {(t + 1)} \right\rangle = 2 \left\langle \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(t + 0. 5)}, \tilde {\mathbf {d}} - \mathbf {d} _ {i} ^ {(t + 1)} \right\rangle \geq 0, +$$ + +for any $\tilde{\mathbf{d}}\in D$ . Given the initial error bound $\| D^{(0)} - D^{*}\|_{1,2}\leq \rho$ , we have $\mathbf{d}^*\in D$ , which results in: + +$$ +\left\langle \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(t + 0. 5)}, \mathbf {d} ^ {*} - \mathbf {d} _ {i} ^ {(t + 1)} \right\rangle \geq 0. +$$ + +We subsequently have: + +$$ +\begin{array}{l} \left\| \mathbf {d} _ {i} ^ {*} - \mathbf {d} _ {i} ^ {(t + 0. 5)} \right\| _ {2} ^ {2} = \left\| \left(\mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(t + 0. 5)}\right) + \left(\mathbf {d} ^ {*} - \mathbf {d} _ {i} ^ {(t + 1)}\right) \right\| _ {2} ^ {2} \\ = \| \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(t + 0. 5)} \| _ {2} ^ {2} + 2 \left\langle \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {(t + 0. 5)}, \mathbf {d} ^ {*} - \mathbf {d} _ {i} ^ {(t + 1)} \right\rangle + \| \mathbf {d} _ {i} ^ {*} - \mathbf {d} _ {i} ^ {(t + 1)} \| _ {2} ^ {2} \\ \geq \left\| \mathbf {d} _ {i} ^ {*} - \mathbf {d} _ {i} ^ {(t + 1)} \right\| _ {2} ^ {2}, \tag {19} \\ \end{array} +$$ + +where the last inequality follows from the fact that both $\| \mathbf{d}_i^{(t + 1)} - \mathbf{d}_i^{(t + 0.5)}\| _2^2$ and $\left\langle \mathbf{d}_i^{(t + 1)} - \mathbf{d}_i^{(t + 0.5)},\mathbf{d}^* -\mathbf{d}_i^{(t + 1)}\right\rangle$ are non-negative. Combining Equation (18) and Equation (19), we have + +$$ +\| \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2} \leq \| \mathbf {d} _ {i} ^ {(t + 0. 5)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2} \leq \tau^ {2} \| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2}. +$$ + +Finally, note that + +$$ +\| \pmb {D} ^ {(t + 1)} - \pmb {D} ^ {*} \| _ {1, 2} = \max _ {i \in [ n ]} \{\| \mathbf {d} _ {i} ^ {(t + 1)} - \mathbf {d} _ {i} ^ {*} \| _ {2} \} \leq \tau \max _ {i \in [ n ]} \{\| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \| _ {2} \} \leq \tau \| \pmb {D} ^ {(t)} - \pmb {D} ^ {*} \| _ {1, 2}, +$$ + +Next, we show that $\mathcal{L}_m\left(\pmb{D}^{(t)}\right)$ is upper bounded by $\| \pmb{D}^{(t)} - \pmb{D}^*\|_{1,2}$ : + +$$ +\begin{array}{l} \mathcal {L} _ {m} \left(\tilde {f} _ {\boldsymbol {D} ^ {(t)}}\right) = \frac {1}{m} \sum_ {h = 1} ^ {m} \| \boldsymbol {D} _ {S ^ {h *}} ^ {*} \boldsymbol {D} _ {S ^ {h *}} ^ {(t) \top} \mathbf {x} ^ {h} - \mathbf {x} ^ {h} \| _ {2} ^ {2} \\ = \frac {1}{m} \sum_ {h = 1} ^ {m} \| \boldsymbol {D} _ {S ^ {h *}} ^ {(t) \top} \mathbf {x} ^ {h} - \beta_ {S ^ {h *}} ^ {h} \| _ {2} ^ {2} \\ = \frac {1}{m} \sum_ {h = 1} ^ {m} \sum_ {i \in S ^ {h *}} \left(\mathbf {x} ^ {h \top} \mathbf {d} _ {i} ^ {(t)} - \mathbf {x} ^ {h \top} \mathbf {d} _ {i} ^ {*}\right) ^ {2} \\ \leq \frac {1}{m} \sum_ {h = 1} ^ {m} \sum_ {i \in S ^ {h *}} \| \mathbf {x} ^ {h} \| _ {2} ^ {2} \| \mathbf {d} _ {i} ^ {(t)} - \mathbf {d} _ {i} ^ {*} \| _ {2} ^ {2} \\ \leq \frac {1}{m} \sum_ {h = 1} ^ {m} k \| \mathbf {x} ^ {h} \| _ {2} ^ {2} \| \boldsymbol {D} ^ {(t)} - \boldsymbol {D} ^ {*} \| _ {1, 2} ^ {2} \\ = \frac {k \sum_ {h = 1} ^ {m} \| \mathbf {x} ^ {h} \| _ {2} ^ {2}}{m} \| \boldsymbol {D} ^ {(t)} - \boldsymbol {D} ^ {*} \| _ {1, 2} ^ {2}. \\ \end{array} +$$ + +To complete the proof of Theorem 3.4, we need to examine the success probability which the above linear convergence occurs with. The only probability statement we use is Lemma C.6 and we only invoke it once. So the total success probability is at least: + +$$ +1 - 2 \exp \{\log n - n \} - 2 \exp \left\{\log n - \frac {k m}{8 n} \right\}, +$$ + +which is $1 - n^{-\omega(1)}$ when $m = \Omega\left(\frac{n^6}{\sigma^2k^5}\right)$ . This completes the proof of Theorem 3.4. + +# C.4. Proof of Lemmas + +# C.4.1. PROOF OF LEMMA 3.1 + +Lemma 3.1 directly follows from Lemma C.1 and Lemma C.2. + +# C.4.2. PROOF OF LEMMA C.1 + +We can decompose $y$ as follows: + +$$ +y = \langle {\bf x}, {\bf z} \rangle = \langle \Pi_ {{\cal D} _ {S} ^ {*}} {\bf x}, {\bf z} \rangle + \langle \Pi_ {{\cal D} _ {S} ^ {*}} ^ {\perp} {\bf x}, {\bf z} \rangle +$$ + +Note that $\mathbf{z} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}_{d \times d})$ . This implies that $\Pi_{D_S^*}^\perp \mathbf{z}$ is independent of $\Pi_{D_S^*} \mathbf{z}$ (Anderson et al., 1958), which in turn entails that $\langle \Pi_{D_S^*}^\perp \mathbf{x}, \mathbf{z} \rangle$ is independent of $\langle \Pi_{D_S^*} \mathbf{x}, \mathbf{z} \rangle$ and the events $\{\langle \mathbf{d}_i^*, \mathbf{z} \rangle = r_i \quad \forall i \in S\}$ . Therefore, we have: + +$$ +\begin{array}{l} \operatorname {M L E} \left(\langle \mathbf {x}, \mathbf {z} \rangle \mid \langle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \rangle = r _ {i} \quad \forall i \in S\right) = \operatorname {M L E} \left(\left\langle \Pi_ {\mathcal {D} _ {S} ^ {*}} \mathbf {x}, \mathbf {z} \right\rangle \mid \langle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \rangle = r _ {i} \quad \forall i \in S\right) \\ + \operatorname {M L E} \left(\langle \Pi_ {\boldsymbol {D} _ {\mathcal {S}} ^ {*}} ^ {\perp} \mathbf {x}, \mathbf {z} \rangle\right). \\ \end{array} +$$ + +It turns out that the first term on the right hand side is deterministic: + +$$ +\begin{array}{l} \langle \Pi_ {D _ {S} ^ {*}} \mathbf {x}, \mathbf {z} \rangle = \langle D _ {S} ^ {*} D _ {S} ^ {* \top} \mathbf {x}, \mathbf {z} \rangle \\ = \left\langle \sum_ {i \in S} \left\langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \right\rangle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \right\rangle \\ = \sum_ {i \in S} \left\langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \right\rangle \left\langle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \right\rangle \\ = \sum_ {i \in S} \left\langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \right\rangle r _ {i}. \\ \end{array} +$$ + +For the last equality we used $q_{i} = r_{i}$ . For the second term, we have: + +$$ +\begin{array}{l} \operatorname {M L E} \left(\langle \Pi_ {\mathcal {D} _ {S} ^ {*}} ^ {\perp} \mathbf {x}, \mathbf {z} \rangle\right) = \operatorname {M L E} \left(\langle \Pi_ {\mathcal {D} _ {S} ^ {*}} ^ {\perp} \mathbf {x}, \Pi_ {\mathcal {D} _ {S} ^ {*}} ^ {\perp} \mathbf {z} \rangle\right) \\ \stackrel {(a)} {=} 0. \\ \end{array} +$$ + +The equality $(a)$ is due to the observation that $\Pi_{D_S^*}^\perp \mathbf{z}$ is indeed distributed as $\mathcal{N}(\mathbf{0},\mathbf{I}_{(d - k)\times (d - k)})$ after a simple dimensionality reduction (Anderson et al., 1958). The resulting random variable $\langle \Pi_{D_S^*}^\perp \mathbf{x},\Pi_{D_S^*}^\perp \mathbf{z}\rangle$ is distributed as $\mathcal{N}(0,\| \Pi_{D_S^*}^\perp \mathbf{x}\| _2^2)$ , leading to the equality $(a)$ . To sum up, we have + +$$ +\operatorname {M L E} \left(\langle \mathbf {x}, \mathbf {z} \rangle \mid \langle \mathbf {d} _ {i} ^ {*}, \mathbf {z} \rangle = r _ {i} \quad \forall i \in S\right) = \sum_ {i \in S} \langle \mathbf {d} _ {i} ^ {*}, \mathbf {x} \rangle r _ {i}. +$$ + +# C.4.3. PROOF OF LEMMA C.2 + +Let us define + +$$ +S _ {k} = \underset {T \subseteq [ n ], | T | \leq k} {\arg \max } \sum_ {i \in T} | \langle \mathbf {d} _ {i}, \mathbf {x} \rangle |. +$$ + +We will use induction to show that $S_{k}$ corresponds to the indices selected by IP-OMP after $k$ iterations. At the first iteration, according to (Chattopadhyay et al., 2024), IP-OMP simply selects the index $i = \arg \max_{j\in [n]}|\langle \mathbf{d}_j,\mathbf{x}\rangle | / \| \mathbf{d}_j\| _2\| \mathbf{x}\| _2 = \arg \max_{j\in [n]}\left|\langle \mathbf{d}_j,\mathbf{x}\rangle \right|$ , where the second equality is due to $\| \mathbf{d}_j\| _2 = 1$ for all $j\in [n]$ . As a result we have $S_{1} = \{i\}$ and the base case is established. + +Suppose that the statement holds for $S_{k-1} = \arg \max_{T \subseteq [n], |T| \leq k-1} \sum_{i \in T} |\langle \mathbf{d}_i, \mathbf{x} \rangle|$ . Let $D_{S_{k-1}}$ be the submatrix of $D$ which consists of columns indexed by $S_{k-1}$ . Then IP-OMP will select + +$$ +i = \underset {j \in [ n ], j \notin S _ {k - 1}} {\arg \max} \frac {| \langle \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j} , \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \rangle |}{\| \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j} \| _ {2} \| \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \| _ {2}}. +$$ + +As $D$ is column-orthogonal, we have $\Pi_{D_{S_{k - 1}}}^{\perp}\mathbf{d}_j = \mathbf{d}_j$ and $\Pi_{D_{S_{k - 1}}}\mathbf{d}_j = \mathbf{0}\forall j\notin S_{k - 1}$ . Therefore, for $\forall j\notin S_{k - 1}$ , we have + +$$ +\begin{array}{l} \langle \mathbf {d} _ {j}, \mathbf {x} \rangle = \left\langle \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j}, \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \right\rangle + \left\langle \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} \mathbf {d} _ {j}, \Pi_ {\boldsymbol {D} _ {S _ {k - 1}}} \mathbf {x} \right\rangle \\ = \langle \Pi_ {\pmb {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j}, \Pi_ {\pmb {D} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \rangle . \\ \end{array} +$$ + +As a result, we can rewrite the selection rule of IP-OMP as + +$$ +\begin{array}{l} i = \underset {j \in [ n ], j \notin S _ {k - 1}} {\arg \max} \frac {| \langle \Pi_ {\overline {{D}} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j} , \Pi_ {\overline {{D}} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \rangle |}{\| \Pi_ {\overline {{D}} _ {S _ {k - 1}}} ^ {\perp} \mathbf {d} _ {j} \| _ {2} \| \Pi_ {\overline {{D}} _ {S _ {k - 1}}} ^ {\perp} \mathbf {x} \| _ {2}} \\ = \operatorname * {a r g m a x} _ {j \in [ n ], j \not \in S _ {k - 1}} \frac {| \langle \mathbf {d} _ {j} , \mathbf {x} \rangle |}{\| \mathbf {d} _ {j} \| _ {2} \| \mathbf {x} \| _ {2}} \\ = \underset {j \in [ n ], j \notin S _ {k - 1}} {\arg \max } | \langle \mathbf {d} _ {j}, \mathbf {x} \rangle |. \\ \end{array} +$$ + +The last equality is due to $\| \mathbf{d}_j\| _2 = 1$ and the fact that $\| \mathbf{x}\| _2$ is the same for different $j$ . This implies that, at iteration $k$ , IP-OMP will select the index $j\notin S_{k - 1}$ with the largest $|\langle \mathbf{d}_j,\mathbf{x}\rangle |$ which completes the proof of our induction. + +Finally, when $D = D^{*}$ , one can verify that $\langle \mathbf{d}_i, \mathbf{x} \rangle = \langle \mathbf{d}_i^*, D^*\beta \rangle = 0$ for $i \notin S^{*}$ . This implies that $S_k = S^{*}$ . + +# C.4.4. PROOF OF LEMMA C.3 + +To prove $\tilde{D}$ is column-orthogonal, we first observe that, for $i\leq k$ , we have $\| \tilde{\mathbf{d}}_i\| _2^2 = \cos^2\theta +\sin^2\theta = 1$ . Moreover, for any pair $i < j\leq k / 2$ , we have + +$$ +\langle \tilde {\mathbf {d}} _ {i}, \tilde {\mathbf {d}} _ {j} \rangle = \langle \cos \theta \mathbf {d} _ {i} ^ {*} + \sin \theta \mathbf {d} _ {i + k / 2} ^ {*}, \cos \theta \mathbf {d} _ {j} ^ {*} + \sin \theta \mathbf {d} _ {j + k / 2} ^ {*} \rangle = 0, +$$ + +which follows since $\langle \mathbf{d}_i^*,\mathbf{d}_j^*\rangle = \langle \mathbf{d}_{i + k / 2}^*,\mathbf{d}_j^*\rangle = \langle \mathbf{d}_i^*,\mathbf{d}_{j + k / 2}^*\rangle = \langle \mathbf{d}_{i + k / 2}^*,\mathbf{d}_{j + k / 2}^*\rangle = 0$ . A similar argument can be made for any $i < j\leq k$ and $j\neq i + k / 2$ . For any $i\leq k$ and $j = i + k / 2$ , we have + +$$ +\langle \tilde {\mathbf {d}} _ {i}, \tilde {\mathbf {d}} _ {j} \rangle = \langle \cos \theta \mathbf {d} _ {i} ^ {*} + \sin \theta \mathbf {d} _ {i + k / 2} ^ {*}, - \sin \theta \mathbf {d} _ {i} ^ {*} + \cos \theta \mathbf {d} _ {i + k / 2} ^ {*} \rangle = - \sin \theta \cos \theta + \sin \theta \cos \theta = 0. +$$ + +Finally, for any $j > i > k$ we trivially have $\langle \tilde{\mathbf{d}}_i, \tilde{\mathbf{d}}_j \rangle = 0$ . This completes the proof of column-orthogonality of $\tilde{D}$ . + +To prove the second statement, note that $\| \tilde{\mathbf{d}}_i - \mathbf{d}_i^*\| _2 = 0$ for every $i > k$ . Moreover, for every $i\leq k$ , we have + +$$ +\| \tilde {\mathbf {d}} _ {i} - \mathbf {d} _ {i} ^ {*} \| _ {2} = \| (\cos \theta - 1) \mathbf {d} _ {i} ^ {*} + \sin \theta \mathbf {d} _ {i + k} ^ {*} \| _ {2} = \sqrt {(\cos \theta - 1) ^ {2} + \sin^ {2} \theta} = \sqrt {2 - 2 \cos \theta} = 2 \sin \frac {\theta}{2}. +$$ + +This completes the proof. + +# C.4.5. PROOF OF LEMMA C.4 + +The proof strategy we adopt here is similar with the proof of Lemma 3.1 in (Liang et al., 2022). However, we consider a different generative model in this paper, so we present the full proof for the purpose of completeness. We will show that for $i \in S^*$ , $|\langle \mathbf{d}_i, \mathbf{x} \rangle| > \gamma / 2$ and for $i \notin S^*$ , $|\langle \mathbf{d}_i, \mathbf{x} \rangle| < \gamma / 2$ , which will immediately result in $S = \arg \max_{T \subseteq [n], |T| \leq k} \sum_{i \in T} |\langle \mathbf{d}_i, \mathbf{x} \rangle| = S^*$ , which proves Lemma C.4. + +We decompose $\langle \mathbf{d}_i, \mathbf{x} \rangle$ as: + +$$ +\begin{array}{l} \langle \mathbf {d} _ {i}, \mathbf {x} \rangle = \langle \mathbf {d} _ {i}, \sum_ {j \in S ^ {*}} \mathbf {d} _ {j} ^ {*} \beta_ {j} \rangle \\ = \underbrace {\left\langle \mathbf {d} _ {i} , \mathbf {d} _ {i} ^ {*} \right\rangle \beta_ {i}} _ {:= \mathcal {A} _ {i}} + \underbrace {\sum_ {j \neq i , j \in S ^ {*}} \left\langle \mathbf {d} _ {i} , \mathbf {d} _ {j} ^ {*} \right\rangle \beta_ {j}} _ {:= \mathcal {B} _ {i}} \tag {20} \\ \end{array} +$$ + +For $\mathcal{A}_i$ , we have: + +$$ +\mathcal {A} _ {i} = \langle \mathbf {d} _ {i}, \mathbf {d} _ {i} ^ {*} \rangle \beta_ {i} = \langle \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {i} ^ {*} \rangle \beta_ {i} + \langle \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {i} ^ {*} \rangle \beta_ {i} = \beta_ {i} + \langle \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {i} ^ {*} \rangle \beta_ {i}. +$$ + +When $i\in S^{*}$ , we have + +$$ +\begin{array}{l} | \beta_ {i} + \langle \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {i} ^ {*} \rangle \beta_ {i} | \geq (1 - \| \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*} \| _ {2}) | \beta_ {i} | \\ \geq \left(1 - \| \boldsymbol {D} - \boldsymbol {D} ^ {*} \| _ {1, 2}\right) | \beta_ {i} | \\ \geq (1 - 2 \rho) | \beta_ {i} |. \\ \end{array} +$$ + +Given that $2\rho < \frac{\gamma}{4\sqrt{k}\Gamma} \leq \frac{1}{4}$ , we can conclude + +$$ +\left| \mathcal {A} _ {i} \right| \left\{ \begin{array}{l l} \geq \frac {3 \gamma}{4} & \text {i f} \quad i \in S ^ {*} \\ = 0 & \text {i f} \quad i \notin S ^ {*} \end{array} , \right. \tag {21} +$$ + +given that $\beta_{i} = 0$ when $i\notin S^{*}$ . For $\mathcal{B}_i$ , we have: + +$$ +\begin{array}{l} | \mathcal {B} _ {i} | = \left| \sum_ {j \neq i, j \in S ^ {*}} \langle \mathbf {d} _ {i}, \mathbf {d} _ {j} ^ {*} \rangle \beta_ {j} \right| \\ = \left| \sum_ {j \neq i, j \in S ^ {*}} \langle \mathbf {d} _ {i} ^ {*} + (\mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}), \mathbf {d} _ {j} ^ {*} \rangle \beta_ {j} \right| \\ = \left| \sum_ {j \neq i, j \in S ^ {*}} \left\langle \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {j} ^ {*} \right\rangle \beta_ {j} \right| \tag {22} \\ \leq \sum_ {j \neq i, j \in S ^ {*}} \left\langle \left| \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*}, \mathbf {d} _ {j} ^ {*} \right\rangle \right| \left| \beta_ {j} \right| \\ \leq \Gamma \| \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*} \| _ {1} \\ \leq \sqrt {k} \Gamma \| \mathbf {d} _ {i} - \mathbf {d} _ {i} ^ {*} \| _ {2} \\ \leq 2 \sqrt {k} \Gamma \rho \\ \leq \gamma / 4 \\ \end{array} +$$ + +Combining Equation (21) and Equation (22), we have that for all $i$ : + +$$ +\left| \langle \mathbf {d} _ {i}, \mathbf {x} \rangle \right| = \left| \mathcal {A} _ {i} + \mathcal {B} _ {i} \right| \left\{ \begin{array}{l l} > \frac {3 \gamma}{4} - \frac {\gamma}{4} = \frac {\gamma}{2} & \text {i f} i \in S ^ {*} \\ < \frac {\gamma}{4} & \text {i f} i \notin S ^ {*} \end{array} , \right. \tag {23} +$$ + +which proves the exact support recovery. + +# C.4.6. PROOF OF LEMMA C.5 + +It is easy to see that $\| \mathbf{c} - \mathbf{a}\| _2\geq \| \mathbf{b} - \mathbf{a}\| _2$ is equivalent to $|c - a|\geq |b - a|$ + +If $c > 0$ , by $bc > 0$ we must have $b > 0$ . Then $|c| \geq |b| \geq a$ becomes $c \geq b \geq a$ , which gives $|c - a| \geq |b - a|$ . + +If $c < 0$ , by $bc > 0$ we must have $b < 0$ . Then $|c| \geq |b| \geq a$ becomes $a \geq b \geq c$ , which gives $|c - a| \geq |b - a|$ as well. + +# C.4.7. PROOF OF LEMMA C.6 + +The proof of Lemma C.6 consists of two steps: + +1. We first use classic concentration inequalities from covariance estimation literature to bound $\sigma_{d}$ and $\sigma_{1}$ given $|Q_{i}|$ . +2. Then we will show that when $m$ is large enough, with high probability, we have $|Q_i|$ bounded above and below. + +Combining these two steps and taking the union bound will complete the proof of Lemma C.6. + +For the fist step, we first notice that: + +$$ +\begin{array}{l} \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \mathbf {x} ^ {h} \mathbf {x} ^ {h ^ {\top}}\right) = \sigma_ {d} \left(\sum_ {h \in Q _ {i}} D ^ {*} \boldsymbol {\beta} ^ {h} \boldsymbol {\beta} ^ {h ^ {\top}} D ^ {* ^ {\top}}\right) \\ = \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \beta^ {h} \beta^ {h ^ {\top}}\right) \\ \end{array} +$$ + +The last equation is due to the fact that $D^{*}$ is a full-rank orthogonal matrix. Consider the vector $\beta^{h}$ for $h \in Q_{i}$ . According to our generative model and the definition of $Q_{i}$ , we have $\beta_{i}^{h} \neq 0$ , and its support outside $i$ is selected uniformly over all $(k - 1)$ -element subsets of $[n] \setminus \{i\}$ . Each nonzero entry of $\beta^{h}$ has a zero mean, variance of $\sigma^2$ , and an absolute value bounded between $\gamma$ and $\Gamma$ . Therefore, its covariance matrix defined as $\boldsymbol{\Sigma} := \mathbb{E}\left[\beta^{h}\boldsymbol{\beta}^{h}^{\top}\right]$ is diagonal, with its $(i,i)$ -th entry corresponding to $\sigma^2$ , and its $(j,j)$ -th entry (with $j \neq i$ ) corresponding to $\frac{(k - 1)\sigma^2}{n}$ . We claim that when $|Q_{i}|$ is sufficiently large, $\sum_{h \in Q_i} x^h x^{h^\top}$ will concentrate around $|Q_{i}| \boldsymbol{\Sigma}$ . Specifically, we will use the following well-established result: + +Theorem C.7 ((Vershynin, 2018)). Let $\mathbf{w}$ be a zero-mean sub-Gaussian random vector in $\mathbb{R}^d$ with covariance matrix $\boldsymbol{\Sigma}$ , such that + +$$ +\| \langle \mathbf {w}, \mathbf {q} \rangle \| _ {\psi_ {2}} \leq K \left(\mathbb {E} [ \langle \mathbf {w}, \mathbf {q} \rangle^ {2} ]\right) ^ {1 / 2} \quad f o r a n y \mathbf {q} \in \mathbb {R} ^ {d}, +$$ + +for some $K \geq 1$ . Here $\|\cdot\|_{\psi_2}$ denotes the sub-Gaussian norm of a random variable. Let $\mathbf{W} \in \mathbb{R}^{d \times \widehat{m}}$ be a matrix whose columns have identical and independent distribution as $\mathbf{w}$ . Then, for any $u \geq 0$ and with probability at least $1 - 2\exp(-u)$ , we have + +$$ +\left\| \frac {1}{\widehat {m}} \boldsymbol {W} \boldsymbol {W} ^ {\top} - \boldsymbol {\Sigma} \right\| _ {2} \leq C K ^ {2} \left(\sqrt {\frac {d + u}{\widehat {m}}} + \frac {d + u}{\widehat {m}}\right) \| \boldsymbol {\Sigma} \| _ {2} +$$ + +for some universal constant $C$ . + +To invoke Theorem C.7, we note that $\beta^h$ is indeed zero-mean and sub-Gaussian. Therefore, upon setting $\mathbf{w} = \beta^h$ , we notice that for any unit-norm $\mathbf{q}$ : + +$$ +\| \langle \boldsymbol {\beta} ^ {h}, \mathbf {q} \rangle \| _ {\psi_ {2}} ^ {2} \leq \sum_ {j = 1} ^ {d} \mathbf {q} _ {j} ^ {2} \| \boldsymbol {\beta} _ {j} ^ {h} \| _ {\psi_ {2}} ^ {2} \leq C _ {0} \sigma^ {2}, +$$ + +for some universal constant $C_0$ . We also have + +$$ +\mathbb {E} \left[ \langle \pmb {\beta} ^ {h}, \mathbf {q} \rangle^ {2} \right] = \mathbf {q} ^ {\top} \Sigma \mathbf {q} \geq \frac {(k - 1) \sigma^ {2}}{n}. +$$ + +By setting $K^2 = \frac{C_0n}{k - 1}$ , we can invoke Theorem C.7 with $u = n$ and conclude that, with probability at least $1 - 2\exp \{-n\}$ : + +$$ +\sigma_ {d} \left(\sum_ {h \in Q _ {i}} \beta^ {h} \boldsymbol {\beta} ^ {h \top}\right) \geq | Q _ {i} | \sigma_ {d} (\boldsymbol {\Sigma}) - \frac {C n \sigma}{k - 1} \sqrt {2 n | Q _ {i} |} = \frac {| Q _ {i} | (k - 1) \sigma^ {2}}{n} - \frac {C n \sigma}{k - 1} \sqrt {2 n | Q _ {i} |}, \tag {24} +$$ + +$$ +\sigma_ {1} \left(\sum_ {h \in Q _ {i}} \boldsymbol {\beta} ^ {h} \boldsymbol {\beta} ^ {h ^ {\top}}\right) \leq | Q _ {i} | \sigma_ {1} (\boldsymbol {\Sigma}) + \frac {C n \sigma}{k - 1} \sqrt {2 n | Q _ {i} |} = | Q _ {i} | \sigma^ {2} + \frac {C n \sigma}{k - 1} \sqrt {2 n | Q _ {i} |}, \tag {25} +$$ + +for some universal constant $C$ , which concludes the first step. Here we recall that $d = n$ in the full-rank and orthogonal setting. + +For the second step, consider one specific $i$ from $[n]$ . The random variable $|Q_i|$ follows a binomial distribution with $m$ trials and $\frac{k}{n}$ success rate. We next recall the Chernoff bound: + +Theorem C.8 ((Motwani & Raghavan, 1996)). Let $X_{1}, X_{2}, \ldots, X_{N}$ be independent Bernoulli random variables with $\mathbb{P}(X_{i} = 1) = p_{i}$ , and let + +$$ +X = \sum_ {i = 1} ^ {N} X _ {i} \quad a n d \quad \mu = \mathbb {E} [ X ] = \sum_ {i = 1} ^ {N} p _ {i}. +$$ + +Then for any $0 < \delta < 1$ , we have + +$$ +\mathbb {P} \big (X \leq (1 - \delta) \mu \big) \leq \exp \left\{- \frac {\delta^ {2} \mu}{2} \right\}, +$$ + +and + +$$ +\mathbb {P} \big (X \geq (1 + \delta) \mu \big) \leq \exp \left\{- \frac {\delta^ {2} \mu}{2} \right\}. +$$ + +We can then invoke Theorem C.8 with $\delta = \frac{1}{2}$ to obtain + +$$ +\frac {k m}{2 n} \leq | Q _ {i} | \leq \frac {2 k m}{n}, \tag {26} +$$ + +with probability at least $1 - 2\exp \left\{-\frac{km}{8n}\right\}$ . Finally, by combining Equation (24) and Equation (26), we have + +$$ +\begin{array}{l} \frac {1}{m} \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \beta^ {h} \boldsymbol {\beta} ^ {h \top}\right) \geq \frac {\left| Q _ {i} \right| (k - 1) \sigma^ {2}}{n m} - \frac {C n \sigma}{(k - 1) m} \sqrt {2 n | Q _ {i} |} \\ \geq \frac {k (k - 1) \sigma^ {2}}{2 n ^ {2}} - \frac {C n \sigma}{(k - 1)} \sqrt {\frac {4 k}{m}}. \tag {27} \\ \end{array} +$$ + +When $m \geq \frac{64C^2n^6}{\sigma^2k(k - 1)^4}$ , we have + +$$ +\frac {C n \sigma}{(k - 1)} \sqrt {\frac {4 k}{m}} \leq \frac {k (k - 1) \sigma^ {2}}{4 n ^ {2}}, +$$ + +which reduces Equation (27) to: + +$$ +\frac {1}{m} \sigma_ {d} \left(\sum_ {h \in Q _ {i}} \beta^ {h} \beta^ {h ^ {\top}}\right) \geq \frac {k (k - 1) \sigma^ {2}}{2 n ^ {2}} - \frac {k (k - 1) \sigma^ {2}}{4 n ^ {2}} = \frac {k (k - 1) \sigma^ {2}}{4 n ^ {2}}. +$$ + +With a similar argument, we can combine Equation (25) and Equation (26) to get: + +$$ +\frac {1}{m} \sigma_ {1} \left(\sum_ {h \in Q _ {i}} \boldsymbol {\beta} ^ {h} \boldsymbol {\beta} ^ {h \top}\right) \leq | Q _ {i} | \sigma^ {2} + \frac {C n \sigma}{k - 1} \sqrt {2 n | Q _ {i} |} \leq \frac {4 k \sigma^ {2}}{n}. +$$ + +Finally, we take the union bound for all $i \in [n]$ , leading to the overall probability of $1 - 2n\exp \{-n\} - 2n\exp \left\{-\frac{km}{8n}\right\}$ . This completes the proof. + +# D. Detailed Experiments + +# D.1. Experiments on Generative Model + +All experiments reported in this section were performed in Python 3.9 on a MacBook Pro (14-inch, 2021) equipped with an Apple M1 Pro chip. + +We generate samples according to the described generative model in Assumption 3.2, we construct the input data $\mathbf{x}$ or $\{\mathbf{x}^h\}_{h=1}^m$ by sampling each non-zero entry from a uniform distribution over the interval $[\gamma, \Gamma]$ . The matrix $D^{*}$ is chosen to be a randomly generated orthonormal matrix, and we construct $D_{\mathrm{init}}$ by setting $D_{\mathrm{init}} = D^{*} + E$ , where each column of $\pmb{E}$ is uniformly drawn from the set $\{\mathbf{e} \mid \| \mathbf{e}\|_2 \leq \rho\}$ . For the results shown in Figure 4, we set $d = 10$ , $k = 5$ , $\rho = 0.2$ , $\gamma = 0.5$ , and $\Gamma = 1$ . The first column of Figure 4 illustrates the scenario corresponding to Theorem 3.3, in which only a single input feature $\mathbf{x}$ is available. Here, we choose $n = 8$ and $\eta = 10^{-2}$ . The plot showing $\mathcal{L}(\tilde{f}_{D^{(t)}})$ confirms the linear convergence of the loss function to zero, in agreement with Theorem 3.3. However, as previously noted, this setting does not ensure exact recovery for each queried feature. Indeed, as shown in the right panel of the first row, $\| D^{(t)} - D^{*}\|_{1,2}$ does not converge to zero. Even if we only consider columns that are activated at each iteration, $\| D_S^{(t)} - D_S^*\|_{1,2}$ also remains nonzero, indicating that optimizing $\mathcal{L}$ with a single $\mathbf{x}$ is insufficient to recover the ground-truth dictionary $D^{*}$ . + +In the second column of Figure 4, we apply projected gradient descent to minimize $\mathcal{L}_m$ , as defined in Equation (6), under the assumption that $D^{*}$ is rank-deficient. Specifically, we set $n = 8 < d$ and $\eta = 10^{-1}$ . Evidently, $\| D^{(t)} - D^{*}\|_{1,2}$ does not converge to zero because the component of $D^{(t)} - D^{*}$ orthogonal to the column space of $D^{*}$ remains unaffected throughout the iterations. In contrast, the third column of Figure 4 corresponds to the setting $n = d$ , which guarantees the full-rankness of $D^{*}$ is full rank. In this case, $\| D_S^{(t)} - D_S^*\|_{1,2}$ converges to zero, thus supporting the conclusion of Theorem 3.4. + +![](images/e54bc9634c7f8f8bff22bf1520c637fedb714956f8473e11e4d718029a656e38.jpg) + +![](images/d22e4d5c2308a66fdd79e1993dcebad9ede31660a835b938c587b9b2f1a81dd6.jpg) + +![](images/9758ed8ae0eb646f98c43e44d9fdda137e71426b7eea61dd532aaee6e091a1df.jpg) + +![](images/14cc7322ad23db50afa94bffdaaa5c27c9aa52fa623640f09d76ae26a2f24d45.jpg) +Figure 4. Results on synthetic dataset. + +![](images/0684714251f471c87768f864eb4df0e82296360881bee9f0b08581be32d61574.jpg) + +![](images/131691fc615e0e7f3ab7bd968a4e8fadb904f7acb8815f8a608e181e9a639c1b.jpg) + +# D.2. More Details on Algorithm 2 + +Here we provide a detailed description for the concept dispersion step and the embedding normalization and projection step in Algorithm 2. In Algorithm 3, we present the pseudo-code for concept dispersion. The algorithm first calculates the mean concept embedding for the given $\{\mathbf{d}_i\}_{i=1}^n$ and calculates the angle between each $\mathbf{d}$ and the mean. Then, Algorithm 3 increases these angles by a constant factor $r$ . + +# Algorithm 3 Concept dispersion + +1: Input: $\{\mathbf{d}_i\}_{i = 1}^n$ dispersion factor $r$ +2: Calculate the mean concept embedding $\bar{\mathbf{d}} = \sum_{i=1}^{n} \mathbf{d}_i / \|\sum_{i=1}^{n} \mathbf{d}_i\|_2$ . +3: for each $\mathbf{d}_i$ do +4: Decompose $\mathbf{d}_i$ as $\mathbf{d}_i = \cos \alpha_i\bar{\mathbf{d}} +\sin \alpha_i\mathbf{e}_i$ , where $\alpha_{i}\in [0,\pi /2]$ $\| \mathbf{e}_i\| _2 = 1$ , and $\mathbf{e}_i\perp \bar{\mathbf{d}}$ +5: Calculate the dispersed query feature $\mathbf{d}_i^{\mathrm{new}} = \cos (r\alpha_i)\bar{\mathbf{d}} +\sin (r\alpha_i)\mathbf{e}_i$ +6: Add $\mathbf{d}_i^{\mathrm{new}}$ as the $i$ th column of $D^{\mathrm{init}}$ . +7: end for +8: Return $D^{\mathrm{init}}$ . + +The effectiveness of Algorithm 3 is shown in Figure 5, where we compare the correlation between concept embeddings before and after this process across various datasets. + +Algorithm 4 presents the pseudo-code for the projection and normalization step in Algorithm 2. + +# Algorithm 4 Embedding normalization and projection + +1: Input: current query feature matrix $D$ , initial query feature matrix $D^{\mathrm{init}}$ , and radius $\rho$ . +2: for each query feature $\mathbf{d}_i$ in $D$ do +3:Normalize $\mathbf{d}_i$ as $\mathbf{d}_i = \mathbf{d}_i / \| \mathbf{d}_i\| _2$ +4: if $\| \mathbf{d}_i - \mathbf{d}_i^{\mathrm{init}}\| _2\geq \rho$ then +5: $\mathbf{d}_i = \arg \min_{\mathbf{d}:\| \mathbf{d} - \mathbf{d}_i^{\mathrm{init}}\| _2\leq \rho ,\| \mathbf{d}\| _2 = 1}\| \mathbf{d} - \mathbf{d}_i\| _2.$ +6: end if +7: end for +8: Return $D$ . + +![](images/5b80f2d3b053d9b263047b0f66c7321309274db8f4105e4553a2d7a3bb47bee4.jpg) +Before Atom Dispersion +CIFAR10 + +![](images/22859bc63635b42e97f4d08828aa6747f413a425e56c21e397d541614cbca1f7.jpg) +After Atom Dispersion + +![](images/7f3f9fdf714b6245e8463d4316744a7d4312424db1250a438e9d4b010dda3438.jpg) + +![](images/43e0a90678ab23ccc223ddec1233d19f770e9fcb2384a57e4fa121715fd94dba.jpg) +CIFAR100 + +![](images/aa0bbe8b41a27a5711431889186ac13682510e763ee712b3c2deba1609f62959.jpg) + +![](images/68b726ae8699c082a9acc2d5c0cd846d9f632354f4af6281dd9101fb156e618b.jpg) + +![](images/6eda31ca4f8fca923081544d241aedc41477844f374961ef25f92a83e8cadf72.jpg) +CUB + +![](images/6ea591c28e54b1709f5855f77ac04f079d8c68cff6868f772f236521ff8cc7de.jpg) + +![](images/388f0bd296af4b2e4abe82526d1ab25baa2753838f49f37de75c1455fd0c17f1.jpg) + +![](images/fa09eaada0157250863cc6b5c0a9eeb9a32017ce8f5c5df5beae864c602d7e17.jpg) +ImageNet + +![](images/18dfffe77069f7ddc3089c4764124d7b147272ca10c9065ac81fe1b8169fe45d.jpg) + +![](images/ad91b9fa6b50deae1b86e4bdb39d56b1aea0bd0fd1081ebf18c24b8dc18119df.jpg) + +![](images/baf535d9665f1b84ed1b8e52e19e0c63df08e6bc33fd7fd5e66b495e11da0a04.jpg) +Places365 +Figure 5. We calculate the correlation matrix $(\mathbf{D}^{\top}\mathbf{D})$ for dictionaries before and after Algorithm 3, and present them in the format of heatmaps. As can be seen, the proposed dispersion process effectively reduces the correlation between concept embeddings generated by CLIP. + +![](images/45546dd61a8ea4444a48355c210b753e444cf9a240c44d33327914b746f065ac.jpg) + +![](images/1614d77bbd31e339aefd5f6cd3b3d418f2f60ca60d6f1efb4893453e6c89f909.jpg) + +![](images/9a6633c5125e150ceba2f66ffd731c6a364ef6abe211015323c3b09f94ae8591.jpg) + +![](images/38136562e51cce2fc531152191f22b02745ca5f55faa037d599f9653879ac917.jpg) + +Figure 6. Ablation study for Algorithm 3 and Algorithm 4. +![](images/d4e87666da45dbcd4404ddcc30f63c9b0fe229f59f79e5012d04a234e47c8b2b.jpg) +- CCR —— CCR w/o Dispersion —— CCR w/o Projection + +![](images/107709af154a9b6f16d99c87c188b7b1be79ef3517f2bce7809d994e6ed9de50.jpg) + +# D.3. Ablation Study + +In this section, we present empirical findings from our ablation study. As a preliminary note, we emphasize that the comparison between CCR and its baseline shown in Figure 2 serves as a key ablation analysis for the CCR module as a whole. Here, we concentrate on evaluating the contributions of two critical components introduced in the preceding section: Atom Dispersion and Atom Projection. To this end, we individually exclude these two steps—Algorithm 3 and Algorithm 4—and compare the resulting models to the full CCR framework in terms of test accuracy, average sparsity, average column deviation, and maximum column deviation over the course of training. + +As illustrated in Figure 6, the omission of either step leads to an improvement in performance. However, these gains incur different trade-offs. Specifically, removing Algorithm 3 results in a substantial increase in the average sparsity of the learned sparse codes. In contrast, eliminating Algorithm 4 causes the concept atoms to drift significantly from their initial CLIP embeddings, thereby compromising the interpretability of the model. + +# D.4. Hyperparameter Tuning + +This section presents an empirical evaluation of two critical hyperparameters—namely, the hard-threshold parameter $\lambda$ and the radius bound $\rho$ —which significantly influence the performance of Algorithm 2. The corresponding results are illustrated in Figure 7 and Figure 8. + +As depicted in Figure 7, increasing the value of $\lambda$ results in sparser explanations by reducing the number of activated concepts. However, this sparsity comes at the cost of reduced test accuracy. Therefore, selecting an appropriate threshold entails balancing the trade-off between prediction accuracy and the level of explanation sparsity—a consideration of particular relevance in explainable AI applications. + +It is important to note that including more concepts does not inherently ensure improved accuracy. This point is exemplified + +![](images/5842cef6db9da9e7fab8698b26edc4a48f80ed7072ad64433a592c80e5b5be6d.jpg) +CIFAR10 + +![](images/c652770e86b00082520494d0c29fd684995b01620fc177c2dca00cf7d540b1f8.jpg) +CIFAR100 + +![](images/f8137a6f0ae5dc333d80e8a1b1f5495751fbc58a515c21b0bfb050a6e43e801e.jpg) +CUB + +![](images/2b1edb1cac9e709ea58a1ee4b8c42a122375b0dbf9fd547b34bb296399c6f78b.jpg) +Figure 7. Average sparsity and test accuracy for varying thresholds $\lambda$ . + +![](images/5af17865bc4318ee4100c34342a19d66f646bef80640f5e1d006258f618d539f.jpg) + +![](images/7b0a965bbc25ed351890f4d06bec8feb4385a54f7033f9d26d231ab6743c0140.jpg) + +in the left column of Figure 8, which shows that expanding the search radius enables the CCR algorithm to identify solutions that are simultaneously sparser and more accurate. Furthermore, the empirical results suggest that the performance gains of CCR saturate beyond $\rho > 0.1$ , indicating that $\rho = 0.1$ serves as a suitable choice for this hyperparameter. + +# D.5. More Experiments on Interpretability + +In this section, we expand on the discussion of CCR's interpretability from Section 4.2 by conducting a comprehensive case study across all five datasets used to evaluate CCR. For each dataset, we select three representative image-label pairs and present the ten highest-ranking concept scores on the left, alongside their corresponding weights associated with the predicted label on the right. To facilitate a comparison of explainability with and without CCR, we also report the corresponding results for the baseline model, which is obtained by setting $\eta_{\mathrm{D}} = 0$ in Algorithm 2, presented at the end of this section. Based on our case study, we derive several key observations: + +- Semantic correlation. In most cases, concepts with higher concept scores exhibit a strong semantic correlation with the input images. This finding substantiates the reliability of our algorithm as an interpretable AI model. A notable example is illustrated in Figure 16 and Figure 17, where the algorithm effectively identifies the primary distinguishing features between two visually similar bird species—their coloration—leading to an accurate classification. +- Weight distribution. In instances where misleading elements are present in an image, certain concepts unrelated to the ground truth label may receive high concept scores. Nevertheless, the linear layer appropriately assigns a small weight to such concepts. These weights encapsulate the algorithm's interpretation of the label, thereby rendering it comprehensible to human users. Examples of such cases include "a beak" in Figure 10, "a plow" in Figure 12, "a seagull"/"a bird" in Figure 14, "a highlighter" in Figure 18, "iridescent" in Figure 19, and "abandoned buildings"/"a sunset" in Figure 21. +- Debugging capability for incorrect predictions. Inevitably, our framework makes incorrect predictions for some samples. A key application of explainable AI is to help human experts understand the reasoning behind these errors. Our findings indicate that the proposed algorithm effectively captures interpretable misconceptions introduced by encoders. For instance, in Figure 22, concepts such as "a display case" and "exhibits" suggest that the primary misleading factor causing the model to predict "natural history museum" instead of the correct label "shopping mall" is the manner in which the store displays its goods. This insight is valuable for human intervention and model correction. + +![](images/393145bbe77d483f24eda28ef391279b5dd7b39e821d5ab50e3b6e91c10c166c.jpg) +CIFAR10 + +![](images/0cc62ea3e271b05b9ded9607f34e89cbe719d5acf1dfb617666b1af01d782504.jpg) +CIFAR100 + +![](images/82e25b6abfb942129d56f46fd5d3d192e7ce9705e64bec42edfa57e02254279e.jpg) +CUB + +![](images/10cd4365f63e166d4ffb644bba242c8c2030a9c7af31723d7807fbb5fd2ea9de.jpg) +Figure 8. Average sparsity and test accuracy for varying radius bounds $\rho$ . + +![](images/9c3082d7eafa830985ba1483ac02a55ac51dfc340c6915eb6ba3766e234b3b29.jpg) + +![](images/2c9134bd8a3cab31188db25700162dac06df4c6c66d18fafd9f7576768d64eff.jpg) + +- Reliance on the richness of the concept set. The effectiveness of the algorithm is inherently influenced by the quality of the concept set, a phenomenon that aligns with the fundamental motivation behind explainable AI. As demonstrated in Figure 23, the concept set lacks distinctive features that differentiate between "bus interior" and "train interior". Consequently, the model is unable to distinguish between these two labels. + +![](images/c0347049509fae77c1ff83af8d40faede0a6905978de6013f90eac300949cd9e.jpg) +True label: automobile + +![](images/c5fa60827587a140c46091c33885180f13c43cc71bf611b520e2aec8c9a1fe0a.jpg) +Predicted label: automobile + +![](images/c230312ee1fc8f1bb57f957e1f0491dbc1f75785a5d4463d771b1de72d0d26bc.jpg) +True label: airplane + +![](images/2ed246a199ba4877032b7b0967a0cc0d51a9837260df7d5bae7a1227cb75bebf.jpg) +Figure 9. CIFAR-10 (a) +Predicted label: airplane + +![](images/caf7439105fd72ce0d8e188e3db47d855a39b085ff9f701c51a8363a2443a285.jpg) +True label: ship + +![](images/b9f400498877425945562249c7b877c53c328933a98b5f2b0e709c0ed6707b18.jpg) +Figure 10. CIFAR-10 (b) +Predicted label: ship +Figure 11. CIFAR-10 (c) + +![](images/06896c0524db224687e754c2fddbb881eaabe21c64e7ca20de3631ef2d3e2e3f.jpg) + +![](images/d1d3a116b0504642da9f8d93bfa15cf2752de53284c0aa290fcdedf24933d3c8.jpg) +True label: pickup truck +Predicted label: pickup truck + +![](images/27e50e38f94d9b48e6e94d3f4796a1a91ae8190321bf6f9fe93204832675b154.jpg) +True label: couch +Predicted label: couch + +![](images/c6cafa3af06180a1ed489eabba5a0401d708f1992f198df6a68c27a67b00b8c0.jpg) +Figure 12. CIFAR-100 (a) + +![](images/613e2a441ea764d4da3ff882db79331096214d38fca5e84cf8ea45c4d741c53e.jpg) + +![](images/1bc8f281324d9a71b4a6de5af208bb272c72e95ce2a215b27382e32aec7d6cd0.jpg) +Figure 13. CIFAR-100 (b) +True label: shark +Predicted label: shark +Figure 14. CIFAR-100 (c) + +![](images/c436254061df6c987b5ec1f2e9e9cdeeb7425fbd3736e2b27af82ce551be60a2.jpg) + +![](images/acbc3bc5f2e4d6953871643cbd7568af54ed12be309a2567ae05d3993fc22b75.jpg) +True label:bronzed cowbird Predicted label:bronzed cowbird + +![](images/e7c848fd12520e782890626ed93ec497681003a3206bb1e111b55872a0b575b2.jpg) + +![](images/2e6c52c4405ebf7596a8f2968311e465fea316b36cae91b80871c0e99b099789.jpg) +Figure 15. CUB-200 (a) +True label: black footed albatross +Predicted label: black footed albatross + +![](images/8d47ba5828a5f9b81dcbdba74f976aea0dfd0a3e17919d53b637cd78b73654a0.jpg) + +![](images/cbf5bedd79ec4ac979b9265d0cb5bd4423101410c7862aacc3a8f3d2e447938a.jpg) +Figure 16. CUB-200 (b) +True label: Laysan albatross +Predicted label: Laysan albatros +Figure 17. CUB-200 (c) + +![](images/06f4aaa7f48838f559e61d821dd66aa62ef6c73174f26e9b720a720392c41ef0.jpg) + +![](images/bd7ce52601cebd933eea37c6b25aae871d1260ae03b17e60e0166e6215435c11.jpg) +True label: African chameleon +Predicted label: African chameleon + +Figure 18. ImageNet (a) +![](images/bb652a218f388963f55c755bc2f5f285ebac16f596d05fa8116dd881de6edb16.jpg) +True label: goldfish +Predicted label: goldfish + +![](images/627e843c048f9cea0e551498f25ad3131f758dcd8cbbd94cba303863165ab774.jpg) + +![](images/9dfd4a136499c863a636f9bdf7d18bd12be808b8cab48fd23986b8397015d7fd.jpg) + +Figure 19. ImageNet (b) +Figure 20. ImageNet (c) +![](images/80353b0f247902dceae3a70c5a8cc3acbb2965d8c0edc97adf4d5b7f9bed2d28.jpg) +True label: toilet tissue +Predicted label: car wheel + +![](images/95fabfef5d1dbbbc458144344a6415e8b767a8f3c639eace9e082e1f8f3d1670.jpg) +True label: campus +Predicted label: campus + +![](images/83c184ef6af11ac77c832e5da3ce8e5139963198fd56022ee9c46d7a29550ac2.jpg) +Figure 21. Places365 (a) + +![](images/cf20a038d1d21f5440be324eb8d831439ebf6b4b4966a7768835a331a2cbc2e2.jpg) +True label: shopping mall +Predicted label: natural history museum + +![](images/a1b4194706034de42b87f3c5643455bd36298661359137700d453462c2a218ab.jpg) + +![](images/6257369d376b29a94128008aaf8fbca1acc1c6e2f230bf6a5b77c2ebf6a10eca.jpg) +True label: bus interior +Predicted label: train interior + +![](images/ed45455cfd032b2d468a18d7965710aa830bcdb165993b9f04db53f43c4dcf9c.jpg) +Figure 22. Places365 (b) +Figure 23. Places365 (c) + +![](images/4e016c1811f13fb849f838f01dd1ce3e88175bf96f7b4e70beeaa3447277a645.jpg) +True label: dining room + +![](images/42264610f0fd22d07ad82e3d13c2b8bcedd340e6b769794eed25080e0b36d117.jpg) +Predicted label: dining room + +![](images/a92ce65d2943ca4e43d79b6d3d4df0f1d882c07f3ac197173ba45db827742675.jpg) +True label: golf course + +![](images/fd56523df76a90504d7b950e46ea6026b4f7503b88814e2b264f057b9be5a5f5.jpg) +Figure 24. Baseline comparison to the top figure in Figure 3 +Predicted label: golf course + +![](images/7be048d34ea18c5575df9a1c406f8ba8e53c30a3c14f8ef5320ed1aae5505e09.jpg) +Figure 25. Baseline comparison to the bottom figure in Figure 3 +True label: campus Predicted label: campus + +![](images/8da3724359bc24d90375d6216a3adafd5992394ff53746dbe2057872d9ca2a4d.jpg) +Figure 26. Baseline comparison to Figure 21 + +![](images/8cffa49b3f905f11f8cb2935052bb91221c4d28b91ef62b7563194986491e175.jpg) +True label: shopping mall +Predicted label: natural history museum + +![](images/efb01177dadc39ec0470cca16dc2639f3c62876ffd7d8e124149cd468737e137.jpg) +Figure 27. Baseline comparison to Figure 22 + +![](images/d1b4894543ee2f71d4131b268d63ea763a01669661869307e054501d8230c1cb.jpg) +True label: bus interior +Predicted label: bus interior + +![](images/9ac0fee8d46abe8c0bb1156102d46562dc2efc8255feecd7df6b4af6690755b8.jpg) +Figure 28. Baseline comparison to Figure 23 \ No newline at end of file diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/images.zip b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ca860a701289b68054312f1a90763b398b281b1b --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ad91aec55908554ead2e1db329d14bec95dfd52f83f80d583df4689abe7be06 +size 2488007 diff --git a/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/layout.json b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c9b88047b94f0f03e36d7bd67f34b673f7c74d7a --- /dev/null +++ b/ICML/2025/Enhancing Performance of Explainable AI Models with Constrained Concept Refinement/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51477a9e0d4ba656e81c03900d2f0556189d246c8cf418299959586b0490378 +size 1712966 diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_content_list.json b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f93d1d0c41f49dceb306c384760152078c97fdbf --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7912a129100485f5d04cc0d5ff4b823993254b1ec73c1fe210213b09b6cacf2f +size 223630 diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_model.json b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_model.json new file mode 100644 index 0000000000000000000000000000000000000000..06eb25658a7ee349d59c69fd34d29ce240585215 --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:168adb522eec5af0bd9f977f0f16c682b1bf7362c06f5cf7fc435aa0554c8eed +size 300357 diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_origin.pdf b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0b47527a53fd2183715835d2d1eaaad079bbcfff --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/a2563143-c7e0-44ce-bba3-b63b4f463637_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b8f0a326ebc04b3e1ce5a69457bc55e009ec49d1f34a97c880d71a714c89882 +size 4496408 diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/full.md b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bbbaaea9d9d12b86847a0a8ecedcb0592884ae51 --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/full.md @@ -0,0 +1,1279 @@ +# Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models + +Tung M. Luu $^{1}$ Younghwan Lee $^{1}$ Donghoon Lee $^{1}$ Sunho Kim $^{1}$ Min Jun Kim $^{1}$ Chang D. Yoo + +# Abstract + +Designing effective reward functions remains a fundamental challenge in reinforcement learning (RL), as it often requires extensive human effort and domain expertise. While RL from human feedback has been successful in aligning agents with human intent, acquiring high-quality feedback is costly and labor-intensive, limiting its scalability. Recent advancements in foundation models present a promising alternative—leveraging AI-generated feedback to reduce reliance on human supervision in reward learning. Building on this paradigm, we introduce ERL-VLM, an enhanced rating-based RL method that effectively learns reward functions from AI feedback. Unlike prior methods that rely on pairwise comparisons, ERL-VLM queries large vision-language models (VLMs) for absolute ratings of individual trajectories, enabling more expressive feedback and improved sample efficiency. Additionally, we propose key enhancements to rating-based RL, addressing instability issues caused by data imbalance and noisy labels. Through extensive experiments across both low-level and high-level control tasks, we demonstrate that ERL-VLM significantly outperforms existing VLM-based reward generation methods. Our results demonstrate the potential of AI feedback for scaling RL with minimal human intervention, paving the way for more autonomous and efficient reward learning. The code is available at: https://github.com/tunglm2203/erlglm. + +# 1. Introduction + +Reinforcement Learning (RL) has achieved remarkable success in various domains, including games (Silver et al., 2017; + +$^{1}$ Korea Advanced Institute of Science and Technology (KAIST). Correspondence to: Chang D. Yoo . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Vinyals et al., 2019; Perolat et al., 2022), robotics (Kalashnikov et al., 2018; Chen et al., 2022), and autonomous systems (Bellemare et al., 2020; Zhou et al., 2020; Kaufmann et al., 2023). A critical factor driving these successes is the design of an appropriate reward function, which both captures the task objective and allows an RL agent to learn efficiently. This reward function is often manually defined and refined by human domain experts, a process that is not only time-consuming but also susceptible to errors (Skalse et al., 2022). In this work, we aim to eliminate the dependence on manually designed reward functions by training agents with reward functions derived from data. In this context, RL from human feedback (RLHF) has emerged as a powerful paradigm, enabling the learning of reward functions directly from human feedback (Knox & Stone, 2009; Christiano et al., 2017; Ibarz et al., 2018). + +One obstacle for employing RLHF at scale is its reliance on a substantial amount of human feedback, which is both costly and labor-intensive. Recent advancements in vision-language models (VLMs) have demonstrated their ability to understand intricate relationships between images and text. When integrated with large language models, large VLMs have shown a high degree of alignment with human judgment (Gilardi et al., 2023; Ding et al., 2023; Bao et al., 2024; Yoon et al., 2025). These capabilities position large VLMs as promising proxies for human feedback in training RL agents. + +Recent studies have explored this approach for training robotic tasks by querying large VLMs for pairwise preferences between trajectories (Guan et al., 2024; Wang et al., 2024a). However, querying VLMs for preferences has a few disadvantages. First, individual preferences convey little information, requiring a large number of queries to learn meaningful reward functions, which can lead to sample inefficiency. In addition, since preferences are inherently derived by comparing at least two trajectories, the number of input and (potential) output tokens processed by the VLM effectively doubles. This leads to higher computational costs and a slower querying process, especially for long trajectories. Finally, when querying VLMs with trajectories of similar quality (e.g., negative-negative or positive-positive pairs), the model often provides invalid preferences by "hal + +lucinating” that one trajectory is better than the other (Guan et al., 2024). To address this, (Wang et al., 2024a) introduces an “unsure” label for indistinguishable trajectories and discards them during reward learning. While this mitigates query ambiguity, it is inefficient as it prevents the full utilization of all queried samples. + +To address these challenges, we propose ERL-VLM (Enhancing Rating-based Learning to Effectively Leverage Feedback from Vision-Language Models), a method that efficiently utilizes feedback from large VLMs, such as Gemini (Reid et al., 2024), to generate reward functions for training RL agents. Unlike prior approaches that rely on pairwise comparisons, ERL-VLM queries large VLMs for absolute evaluations of individual trajectories, represented on a Likert scale (i.e., a range of discrete ratings such as "very bad", "bad", "ok", "good", and "very good"). This approach allows VLMs to provide more expressive feedback, reduces query ambiguity, and ensures that all queried samples are fully utilized for reward learning. Additionally, we introduce simple yet effective enhancements to existing rating-based RL methods to mitigate instability in reward learning caused by data imbalance and noisy rating labels from VLMs. We demonstrate that ERL-VLM can generate reward functions that successfully train RL agents across a variety of vision-language navigation discrete action and continuous robotic control environments. Notably, ERL-VLM operates solely on image observations of the agent and a language task description, without requiring privileged state information or access to environment source code, as required in prior work (Ma et al., 2024; Xie et al., 2024; Wang et al., 2024b; Venuto et al., 2024; Han et al., 2024). Our contributions are summarized as follows: + +- We present ERL-VLM, a novel method for learning reward functions from VLM-provided feedback. ERL-VLM enables agents to learn new tasks using only a human-provided language task description, significantly reducing the need for extensive human effort in reward design. +- We propose simple yet effective enhancements to existing rating-based RL methods, improving stability in reward learning from VLM feedback and thereby improving the overall agent performance. +- We demonstrate that ERL-VLM outperforms prior VLM-based reward generation methods, successfully training RL agents across a variety of vision-language navigation and robotic control tasks. Additionally, we conduct extensive ablation studies to identify key factors driving ERL-VLM's performance gains and provide deeper insights into its effectiveness. + +# 2. Related Work + +Inverse Reinforcement Learning. Inverse Reinforcement Learning (IRL) aims to recover reward functions from + +expert demonstrations, enabling the learned reward functions to guide agents in replicating the demonstrated behaviors. Various IRL approaches have been developed, including maximum entropy IRL (Ziebart et al., 2008; Wulfmeier et al., 2015), non-linear IRL (Levine et al., 2011; Finn et al., 2016), adversarial IRL (Ho & Ermon, 2016; Fu et al., 2018), and behavioral cloning IRL (Szot et al., 2023). While these methods have shown success across different domains, they heavily rely on high-quality demonstrations, which are expensive and labor-intensive to obtain. In contrast, ERL-VLM eliminates the need for expert demonstrations by leveraging only human-provided task descriptions in language to learn a reward function. + +Learning from Feedback. Learning reward functions directly from human feedback has gained significant attention as it typically requires less effort compared to collecting expert demonstrations. Among the most widely used approaches is comparative feedback, where human evaluators perform pairwise comparisons of trajectories to express preferences. These preferences are then transformed into targets for the reward model (Wirth et al., 2017; Christiano et al., 2017; Ibarz et al., 2018; Leike et al., 2018; Lee et al., 2021a,b; Hejna III & Sadigh, 2023). Alternatively, evaluative feedback focuses on providing absolute assessments for individual trajectories (Knox & Stone, 2009; Warnell et al., 2018; MacGlashan et al., 2015; Arumugam et al., 2019; White et al., 2024), potentially offering more comprehensive insights than relative preferences (Casper et al., 2023; Yuan et al., 2024). + +While learning from feedback shows promise, it is often constrained by the requirement for extensive human participation to generate the necessary feedback. Recently, learning from AI feedback has emerged as a compelling alternative. Pretrained foundation models have been leveraged to approximate human feedback for RL finetuning in work on large language models (Bai et al., 2022; Li et al., 2023; Lee et al., 2024; Yu et al., 2024). Building on this paradigm, several studies have explored reducing the reliance on human feedback in training RL tasks by utilizing AI-generated preferences (Kwon et al., 2023; Klissarov et al., 2023; Wang et al., 2024a; Lin et al., 2024; Wang et al., 2025). In contrast to these preference-based approaches, our method obtains absolute evaluations instead of relative preferences, which we hypothesize to provide more expressive and informative feedback for RL tasks leveraging AI models. + +Vision-Language Models as Reward Functions. Recent research has also explored leveraging vision-language models (VLMs), such as Contrastive Language-Image Pretraining (CLIP; (Radford et al., 2021)), to directly generate reward signals for training agents. These rewards are typically computed by measuring the cosine similarity between the embeddings of a language task description and a visual representation of the current state or a sequence of states. For + +![](images/85b9b28538100218832bc2d942c2e4a9eae709628cb574cc0f206ac9a3bc1c64.jpg) +Figure 1. Overview of ERL-VLM: The figure illustrates an example of a PickupObject task in ALFRED along with its corresponding task description. During each feedback session, trajectory segments $\sigma$ are randomly sampled from the replay buffer and sent to the VLM teacher to obtain rating feedback $\tilde{y}$ . The reward model $\hat{r}_{\psi}$ is then trained using the collected rating dataset and subsequently used to compute rewards as the agent interacts with the environment. + +example, (Fan et al., 2022; Jiang et al., 2024) train a CLIP model and use it to reward agents in MineCraft environments. However, this approach requires a lot of labeled, environment-specific datasets, which are costly and difficult to scale. In robotics, similar approaches have been used to reward agents, either through fine-tuning or in zero-shot settings (Mahmoudieh et al., 2022; Cui et al., 2022; Baumli et al., 2023; Ma et al., 2023; Rocamonde et al., 2024; Sontakke et al., 2024). Despite their potential in some domains, these similarity score-based reward signals are often noisy, and their accuracy highly dependent on task descriptions and alignment of image observations with the pretraining data distribution (Rocamonde et al., 2024; Sontakke et al., 2024; Wang et al., 2024a). Moreover, most of these methods focus on utilizing the embedding space of VLMs rather than leveraging their reasoning capabilities. In contrast, our approach harnesses the emergent reasoning capabilities of large VLMs, such as Gemini (Reid et al., 2024), to provide rating feedback, which is then distilled into a reward function for training agents. The work most similar to ours is RL-VLM-F (Wang et al., 2024a), which generates preference feedback using VLMs. However, querying VLMs for preferences introduces the risk of query ambiguity. Also, prompting VLMs with multiple trajectories can be computationally inefficient. ERL-VLM instead queries VLMs for absolute ratings for individual trajectories, that improves computational efficiency and ensures all queried samples are fully utilized in reward learning, thereby enhancing the overall performance of training RL agents. + +# 3. Preliminaries + +In standard reinforcement learning (RL), an agent interacts with an environment in discrete time steps (Sutton & Barto, + +2018). At each time step $t$ , the agent observes the current state $s_t$ and selects an action $a_t$ according to its policy $\pi(\cdot | s)$ , which defines a probability distribution over actions for a given state. Then the environment responses a reward $r_t = r(s_t, a_t)$ and transitions to the next state $s_{t+1}$ . The objective of RL algorithms is to find the optimal policy that maximizes the expected return, $\mathcal{R}_0 = \sum_{t=0}^{\infty} \gamma^t r_t$ , which is defined as a discounted cumulative sum of the reward with the discount factor $\gamma$ . + +Rating-based RL. In scenarios where a reward function is unavailable, standard RL approaches may not be directly applied to derive policies. RL from human feedback is shown as an effective paradigm for transforming human feedback into guidance signals (Lee et al., 2021b; Casper et al., 2023; Yuan et al., 2024). In this work, we build on the recently introduced rating-based RL framework (White et al., 2024), where a teacher provides discrete ratings for the agent's behaviors (Knox & Stone, 2009; MacGlashan et al., 2017; Arumugam et al., 2019), and an estimated reward function $\hat{r}_{\psi}$ is trained to ensure that the distribution of predicted ratings matches the distribution of collected ratings. Formally, given a segment $\sigma$ as a sequence of states and actions $\{(s_1, a_1), \ldots, (s_H, a_H)\}$ , where $H \geq 1$ , a teacher assigns a rating label $\tilde{y}$ from the discrete set $\mathcal{C} = \{0, 1, \ldots, n-1\}$ , to indicate the segment's quality. Here, 0 denotes the lowest possible rating, while $n-1$ represents the highest. Descriptive labels can also be associated with rating levels; for example, with three rating levels, level 0 could be labeled "bad", level 1 as "average", and level 2 as "good". Each feedback is then stored in a dataset $\mathcal{D}$ as a tuple $(\sigma, \tilde{y})$ . Given the estimated reward function $\hat{r}_{\psi}$ , the estimated return for a length- $k$ trajectory segment is computed as $\hat{R}(\sigma) = \sum_{t=1}^{k} \hat{r}_{\psi}(s_t, a_t)$ . Then, the probability $P_{\sigma}(i)$ of assigning + +the segment $\sigma$ to the $i$ -th rating class is formulated as: + +$$ +P _ {\sigma} (i) = \frac {e ^ {- (\tilde {R} (\sigma) - \bar {R} _ {i}) (\tilde {R} (\sigma) - \bar {R} _ {i + 1})}}{\sum_ {j = 0} ^ {n - 1} e ^ {- (\tilde {R} (\sigma) - \bar {R} _ {j}) (\tilde {R} (\sigma) - \bar {R} _ {j + 1})}} \tag {1} +$$ + +where $\tilde{R} (\sigma)\in [0,1]$ denotes the normalized version of $\hat{R} (\sigma)$ , computed using min-max normalization within the current training batch. $\bar{R}_i$ represents the rating class boundaries, constrained as $0\coloneqq \bar{R}_0\leq \bar{R}_1\leq \dots \leq \bar{R}_n\coloneqq 1$ . These boundaries are determined to ensure that, within the batch, the number of samples in each rating category modeled by Equation (1) reflects the numbers of ratings assigned by the teacher. For details on how the boundaries are computed, we refer readers to (White et al., 2024). + +Based on the probabilistic rating model in Equation (1), the estimated reward function $\hat{r}_{\psi}$ is optimized by minimizing multi-class cross-entropy loss, defined as: + +$$ +\mathcal {L} _ {C E} (\psi , \mathcal {D}) = - \mathbb {E} _ {(\sigma , \tilde {y}) \sim \mathcal {U} (\mathcal {D})} [ \sum_ {i = 0} ^ {n - 1} \mu_ {\sigma} (i) \log P _ {\sigma} (i) ] \quad (2) +$$ + +where $\mu_{\sigma}(i)$ is an indicator function that takes the value 1 if $\tilde{y}$ equals $i$ , and 0 otherwise, and $\mathcal{U}$ represents uniform sampling. The policy $\pi$ can then be updated using any RL algorithm to maximize the expected return under the estimated reward function $\hat{r}_{\psi}$ . + +Vision-Language Models for Evaluative Feedback. In this work, we leverage large pretrained vision-language models (VLMs; (Zhang et al., 2024)) as teachers to provide feedback. We define VLMs as models capable of processing both language inputs, $p = (x_0, \ldots, x_m)$ , where $x_m \in \mathcal{V}$ , and visual inputs, $I \in \mathcal{I}$ . Here, $\mathcal{V}$ represents a finite vocabulary, and $\mathcal{I}$ denotes the space of RGB images. Given these inputs, a VLM $\mathcal{T}$ generates language outputs as $h = \mathcal{T}(p, I)$ , where $h = (h_0, \ldots, h_k)$ and $h_k \in \mathcal{V}$ . Our focus is on VLMs trained on diverse text and image datasets, which equip them with the ability to generalize effectively across a variety of environments. Additionally, these models must possess strong visual comprehension and question-answering capabilities, critical requirements for accurately evaluating and rating trajectories. In this work, we use Gemini (Reid et al., 2024) as the large pretrained VLM that meets these requirements. + +# 4. Method + +In this section, we introduce ERL-VLM, a method for learning reward functions from VLM feedback. We first describe the prompt design used to elicit rating feedback from VLMs for the agent's behaviors. Next, as the core contribution of this paper, we introduce enhancements to the existing rating-based RL framework to effectively utilize this feedback in learning the reward function. Finally, we outline how the learned reward function is used for policy learning. An overview of ERL-VLM is presented in Figure 1, and the + +![](images/5220c97b7ea5251ccf917d10974ebff26c90053a3ec0593830aa3fac4d18f90a.jpg) + +![](images/e032c7709e36f85895fe00f41ba46a61c632ad2adc95ff739da0d35e050a1aac.jpg) +(c) Estimated return from $\hat{r}_{\psi}$ . + +![](images/0ef219cd6b580902a126b82116dde47e8b3e3f3674d7a158b56c26ca166671b5.jpg) + +![](images/01589e73fbd6d334429e67b09fa9d243249859590db3aba13e93a6768c028020.jpg) +(d) Training performance. +Figure 2. Reward learning from rating feedback in the **Drawer Open** environment. Due to the imbalance of ratings, optimizing $\hat{r}_{\psi}$ using the conventional objective in Eq. (2) with uniform batch sampling often leads to poor performance. To mitigate this issue, we use stratified sampling to ensure that every training batch contains samples from all rating classes. + +complete procedure is detailed in Algorithm 1. + +Rating Generation with VLMs. In this work, we focus on tasks where the quality or success of an agent's behaviors can be evaluated based on a single image or a sequence of images. Building on prior work (Wang et al., 2024a), we elicit feedback from the VLM through a two-stage process: first analyzing the agent's behavior and then generating ratings based on this analysis. We observe that the quality of ratings heavily depends on the effectiveness of the analysis stage. For tasks with simple descriptions, the VLM is capable of producing plausible ratings from a single image observation. However, for tasks with complex and compositional descriptions, single observations often fail to capture the full context. To address this, we design a prompt that directs the VLM to analyze trajectory segments composed of multiple image observations and, if applicable, associated actions. This approach provides greater granularity, enabling a more comprehensive analysis that captures critical nuances in the agent's behavior. The prompt templates used in our experiments are shown in Table 6 and 7. Given these prompts, during each feedback session, we sample $N$ segments from the replay buffer and query the VLM to rate the segments according to the task description. The sampled segment, along with its corresponding rating, is then stored in the rating dataset $\mathcal{D}$ (lines 12-14 in Algorithm 1). + +Reward Learning from Ratings. Given the rating dataset $\mathcal{D}$ collected from the VLM teacher, the estimated reward function $\hat{r}_{\psi}$ can be optimized using the conventional objective in Equation (2). However, directly applying this + +Algorithm 1 ERL-VLM +1: Input: Text description of task goal $l$ +2: Initialize: Policy $\pi_{\theta}$ and reward function $\hat{r}_{\psi}$ RL replay buffer $\mathcal{B}\gets \emptyset$ dataset of rating $\mathcal{D}\gets \emptyset$ VLM query frequency $K$ number of queries $N$ per feedback session, horizon $T$ +3: for each iteration do +4: //DATA COLLECTION +5: for $t = 1$ to $T$ do +6: Collect $s_{t + 1}$ , image $I_{t + 1}$ by taking $a_{t}\sim \pi_{\theta}(a_{t}|s_{t})$ +7: Update $\mathcal{B}\leftarrow \mathcal{B}\cup \{(s_t,I_t,a_t,s_{t + 1},I_{t + 1},\hat{r}_t)\}$ +8: end for +9: //RATING BY VLM AND REWARD LEARNING +10: if iteration $\% K == 0$ then +11: for $m = 1$ to $N$ do +12: Randomly sample a segment $\sigma$ from $\mathcal{B}$ +13: Query VLM with $\sigma$ and task goal $l$ for label $\tilde{y}$ +14: Update $\mathcal{D}\gets \mathcal{D}\cup \{(\sigma ,\tilde{y})\}$ +15: end for +16: for each gradient step do +17: Stratified sampling minibatch $\{(\sigma ,\tilde{y})_j\}_{j = 1}^D\sim \mathcal{D}$ +18: Update $\hat{r}_{\psi}$ according to Equation (3) +19: end for +20: Relabel entire replay buffer $\mathcal{B}$ using updated $\hat{r}_{\psi}$ +21: end if +22: //POLICY LEARNING +23: for each gradient step do +24: Sample random batch $\{(s_t,a_t,s_{t + 1},\hat{r}_t)_j\}_{j = 1}^B\sim \mathcal{B}$ +25: Update the policy $\pi_{\theta}$ with any off-policy RL algorithm +26: end for +27: end for + +approach often leads to instability during reward learning, even when the teacher provides reasonable ratings, as shown in Figure 2a. This instability arises from two key challenges. + +First, the distribution of samples across rating classes is often highly imbalanced. For example, in the early stages of training, "bad" ratings dominate other rating classes, resulting in skewed datasets (Figure 2b). This imbalance negatively impacts reward learning because multiple training batches may contain samples from only a single rating class, which disrupts the effective selection of rating class boundaries. Consequently, the reward function tends to consistently predict the dominant rating class, leading to degraded performance, as shown in Figure 2c, 2d. It is worth noting that this issue is less prevalent in preference-based RL, as the binary comparisons inherently balance the preferences between two samples. To address this issue, we employ stratified sampling, ensuring that samples from all rating classes are represented in each training batch. Additionally, we use a weighted loss function, assigning weights based on class frequency to account for data imbalance. + +Second, the VLM teacher may provide noisy or imprecise labels due to hallucinations (Zhang et al., 2023b) or other errors. To mitigate the impact of noisy labels, we adopt the Mean Absolute Error (MAE) as the training objective, as it is provably more robust to label noise compared to Cross + +Entropy (Ghosh et al., 2017). The reward function $\hat{r}_{\psi}$ is then optimized using the following objective: + +$$ +\mathcal {L} _ {M A E} (\psi , \mathcal {D}) = \mathbb {E} _ {(\sigma , \tilde {y}) \sim \mathcal {U} _ {S} (\mathcal {D})} [ \sum_ {i = 0} ^ {n - 1} | \mu_ {\sigma} (i) - P _ {\sigma} (i) | ] \tag {3} +$$ + +where, $\mathcal{U}_S$ denotes the stratified sampling strategy. Prior works in preference-based RL often adopt label smoothing (Wei et al., 2021; Christiano et al., 2017; Ibarz et al., 2018) to handle corrupted labels, assuming a fixed rate of uniform noise in the preferences provided by the teacher. However, in our experiments, we find this approach to be ineffective, likely because it is challenging to estimate the percentage of corrupted labels produced by the VLM teacher, especially in the context of multi-class ratings. + +Implementation Details. Following prior works in RLHF (Lee et al., 2021a;b; White et al., 2024), we query the VLM teacher every $K$ training steps (Algorithm 1 lines 11-15). At the end of each feedback session, we optimize the reward function $\hat{r}_{\psi}$ using the objective defined in Equation 3 (Algo-. rithm 1 lines 17-18). Subsequently, all experiences in the replay buffer are relabeled with the newly updated reward function. Finally, the policy is trained using an RL algorithm with the relabeled data from the replay buffer. In this work, we adopt SAC (Haarnoja et al., 2018) and a variant of IQL (Kostrikov et al., 2022) as the base RL algorithms. + +# 5. Experiments + +The goal of our experiments is to evaluate ERL-VLM's effectiveness in generating reward functions for training RL agents. We compare ERL-VLM to VLM-based reward generation methods, which also operate on image observations and language task description, across three domains: low-level manipulation control tasks in MetaWorld (Yu et al., 2020), high-level vision-language navigation tasks in ALFRED (Shridhar et al., 2020), and real-world robotic manipulation using a Sawyer robotic arm. Concretely, we aim to answer the following questions: (1) Can ERL-VLM generate effective reward functions for policy learning? (2) How do reward functions generated by ERL-VLM compare to those produced by other pretrained VLMs? (3) What is the impact of our proposed enhancements on the overall effectiveness of ERL-VLM? + +# 5.1. Experimental Setup + +MetaWorld. In this environment, the agent generates low-level continuous actions to control a simulated Sawyer robot, enabling it to interact with objects on a table to complete tasks. We evaluate ERL-VLM on three tasks, following prior work (Sontakke et al., 2024; Wang et al., 2024a): + +- Sweep Into: Sweep a green puck into a hole on the table. +- **Drawer Open:** Pull open a drawer on the table. + +![](images/8806e555be7867a49db62f37ee34f4482ca0f9f4307938170899e8079ba69223.jpg) +Sweep Into + +![](images/825937b32ff52fa97d39ad192c5d0b2bda87e1e70e4b4a8fc0b0e453574f01ea.jpg) +Drawer Open + +![](images/5c8b72e2b531b418bf75cd9bc48f4132e427fd258a3f92928bf14d13799c1e7c.jpg) +Soccer +Figure 3. We evaluate ERL-VLM across three domains: two simulated environments and one real-world robotic manipulation setup. The first three images depict tasks from MetaWorld, the next four images illustrate examples from ALFRED, and the final image shows the real-world robotic setup. + +![](images/9e8b52f7248f9f1b9e219fb46498ddf5ee892474a7536be363eefcf6e188c9f0.jpg) +PickupObject + +![](images/a5a9a188423827a70e1a02212fc3f1c75cef6b833743a747223dd5f029ad8d55.jpg) +PutObject + +![](images/0b84315873ef49033b388c47d51974eeab4f1e30387ec2afadc2c6c99ff650c5.jpg) +CleanObject + +![](images/22b3e4ec5e242947a76fda25d5c312497bbffa2f34acdeb14cf84d005fe245cf.jpg) +CoolObject + +![](images/be08b89b3e41674ef988b3fa091bde515d8f09a0422a6b8aff3dfa95e7f9e47d.jpg) +Real robot tasks + +- Soccer: Kick a soccer into the goal on the table. + +ALFRED. In this domain, an embodied agent is randomly placed in a room and must select appropriate discrete actions to complete tasks specified by language instructions. ALFRED abstracts away low-level control into 12 discrete actions and along with 82 discrete object types. We leverage a modified version of the ALFRED simulator (Zhang et al., 2023a) that enables online RL training. We consider a set of 20 tasks drawn from 10 scenes in the Kitchen environment. These tasks can be categorized into four types: + +- PickupObject: Pick up a specified object from a location. +- PutObject: Place an object into a target location. +- CoolObject: Interact with a fridge to cool an object. +- CleanObject: Use a faucet to clean an object. + +The object types and desired locations are specified in the instructions. We use the original crowd-sourced language instructions from the benchmark as task descriptions. This allows us to test the robustness of the VLM teacher in providing feedback based on various human-provided task descriptions. Detailed task instructions are provided in Table 2. Unlike MetaWorld, this domain requires multi-task learning, where the policy is conditioned on a language instruction. At the start of each episode, a scene is randomly sampled from a set of 10 scenes, with objects initialized based on the scene's configuration. Each scene includes two sequential instructions, requiring the agent to complete the first task before proceeding to the next. + +The visualizations of these tasks are shown in Figure 3. Further details about the tasks and environment setups can be found in the Appendix. + +Baselines. We compare ERL-VLM to established methods that also leverage pretrained VLMs to generate rewards for robotic tasks based on the language task description and the agent's image observations. These methods involve (1) using similarity scores as reward signals and (2) utilizing feedback from VLMs to learn reward functions. Concretely, we compare against the following baselines: + +- CLIP Score (Rocamonde et al., 2024): Generate rewards by computing the cosine similarity between the current image observation and the task description in CLIP embedding space (Radford et al., 2021). This reward gen + +eration approach has also been explored in several prior works (Cui et al., 2022; Mahmoudieh et al., 2022). + +- RoboCLIP Score: We use the text-based version of RoboCLIP, where rewards are computed based on the similarity between the video embedding of a trajectory and a task description in S3D embedding space (Xie et al., 2018). +- RL-VLM-F (Wang et al., 2024a): Similar to our approach, this baseline leverages a pretrained VLM to provide feedback for reward learning; however, it queries for relative preferences rather than absolute ratings. +- Environment Reward: This baseline trains the agent using the reward function from environments. The reward function is dense in MetaWorld but sparse in ALFRED. + +Training and Evaluation Procedure. For MetaWorld tasks, we adopt Soft Actor-Critic (SAC) (Haarnoja et al., 2018) as the base RL algorithm, while for ALFRED tasks, we use an online variant of Implicit Q-Learning (IQL) (Kostrikov et al., 2022), which has been shown to effectively train agents in ALFRED (Zhang et al., 2023a). To ensure a fair comparison, we use the same hyperparameters for policy training across all methods, with the only difference being the reward function. For methods that require learning reward functions, we use Gemini-1.5-Pro (Reid et al., 2024) as the VLM for all tasks and use same query budget (10000 for MetaWorld and 1500 for ALFRED), and apply a uniform sampling scheme for queries. Additionally, the reward function in ALFRED also conditions in the task instruction, similar to the policy. For RL-VLM-F, we perform pairwise comparisons between trajectories generated from the same instruction in ALFRED. We evaluate performance using task success rate, as defined by each benchmark. Each evaluation run computes success rates over 10 episodes in MetaWorld and 100 episodes in ALFRED. Performance are reported as the mean and standard deviation over 3 runs. + +# 5.2. Main Results + +We present the learning curves of success rates for all compared methods across two simulated domains in Figure 4. As shown, ERL-VLM outperforms all baselines in 6 out of 7 tasks, demonstrating its effectiveness in learning reward functions from VLM feedback. For similarity score-based approaches, while they provide useful learning signals, their + +![](images/0bf6d9a414315bbd38fdc34bc70df9505b8926d68dc83f991054283c7acb2448.jpg) + +![](images/df5ddc9124458a2590c4bcc76ac4680be50540262b996cde5f105770b5012064.jpg) + +![](images/f4df5023e674b972cc878f5fa185fbd08ba7cff24b0eb6beb130d189adaf3123.jpg) + +![](images/866fc4faa742c7e3f46825aaee4c3ee6fe83e8ed937261ae74fb49f7da19bf63.jpg) +Figure 4. Success rate for ERL-VLM and baselines across 3 manipulation tasks from MetaWorld and 20 vision-language navigation tasks from ALFRED. Tasks of the same type in ALFRED are aggregated for clearer visualization. Our method achieves prominent performance on all tasks, and significantly outperforms baselines on ALFRED tasks. Results are means of 3 runs with standard deviation (shaded area). + +![](images/38491182c047a368968a76f970f9e258c2eecfcfa8d162cac7aad49a9c64a7a9.jpg) + +![](images/84f4e141818841c416eea4294a1f66327fc0421a605419c4f96031770955d3ba.jpg) + +performance often fluctuates throughout training. This inconsistency arises from the inherent noisiness of the reward signals, as also observed in prior works (Ma et al., 2023; Sontakke et al., 2024; Rocamonde et al., 2024; Wang et al., 2024a). This suggests that relying on direct embedding similarities results in unreliable reward values, leading to instability in policy optimization. + +For reward learning from VLM approaches, RL-VLM-F performs comparably to ERL-VLM in *Drawer Open* but struggles significantly in other tasks, particularly in ALFRED, where it nearly fails to learn meaningful policies. We attribute this to the limited query budget, which results in a relatively small number of preference feedback samples per task in ALFRED (e.g., 75 in our experiments). Given that each preference only conveys little information about relative ranking between two segments, the reward function struggles to capture the desired behavioral nuances effectively. In contrast, ERL-VLM leverages absolute ratings, which offer greater global value than preferences within the same query budget. This results in a more informative reward signal for policy training, enabling more effective utilization of VLM feedback. + +Interestingly, for the tasks of PickupObject and PutObject tasks, ERL-VLM outperforms even the sparse reward function. This suggests that learning a reward function from absolute ratings not only provides useful learning signals—similar to sparse rewards—but also introduces more shaping signals that emphasize critical states for task completion. We attribute this to the improved analysis in our prompt design, which enables the VLM to conduct a deeper assessment of agent behaviors. This result highlights the potential of VLMs to serve as effective substitutes for human providing feedback in reward learning. + +Table 1. Success rates on the 3 real-world robot evaluation tasks in table-top environment. + +
MethodSweep BowlDrawer OpenPickup Banana
BC0.50 ± 0.100.23 ± 0.060.17 ± 0.06
Sparse Rewards0.57 ± 0.060.37 ± 0.060.30 ± 0.10
ERL-VLM (Ours)0.73 ± 0.060.60 ± 0.100.47 ± 0.12
+ +# 5.3. Real Robot Evaluation + +We further evaluate ERL-VLM in a real-world robotic manipulation setting using a 7-DOF Rethink Sawyer robot interacting with objects in a tabletop environment. We compare our approach against two baseline approaches: (1) Behavior Cloning (BC), a supervised policy pretraining method, and (2) IQL with Sparse Rewards, an offline RL setting where the agent learns from sparsely provided rewards. Image observations are captured by a RealSense camera, as illustrated in Figure 3 (rightmost). We consider following tasks: + +- Sweep Bowl: Sweep a bowl across a red boundary line. +- **Drawer Open:** Pull open a drawer. +- Pickup Banana: Grasp a banana from a plate and lift it. + +For each task, we collect 50 demonstrations via human teleoperation and query Gemini to obtain rating feedback offline. The reward model is then trained using the objective in Equation 3. The learned reward function is subsequently used to relabel rewards in the offline dataset. We employ IQL (Kostrikov et al., 2022) to train the policy in an offline manner, following the setup in (Yuan et al., 2024). Results in Table 1 demonstrate that ERL-VLM is capable of generating useful reward functions that facilitate policy learning, indicating its potential for real-world robot manipulation tasks. More visualization results are shown in Figure 9. + +![](images/ca0738c5aab20340fbfc865bb64b070a7130824918a80b8afbbc1c8cefc828c2.jpg) +ERL-VLM No MAE No Stratified Sampling Vanilla RbRL + +![](images/3f1f5893ca222badd348b7499d91081b128624cc4132e0fdddbaaf546aa61635.jpg) + +![](images/6cb3b7c2365e835c13099a0f0f69ec4fa6fa212de633db4147ae66170d66e67f.jpg) + +![](images/8db8d544e47658ae791126674b484ae08d4e58e640052e0dbf98bc3f650bc2fa.jpg) +Figure 5. Ablation studies with different enhancements in ERL-VLM. Results are means of 3 runs with standard deviation (shaded area). +(a) +Figure 6. (a) The effect of label smoothing in handling the corrupted labels. (b/c) ERL-VLM with different numbers of rating classes. + +![](images/5b2c797f2720cbd2c891c0800464ba166bdf6f6ade0b166e12cfa8883164d56a.jpg) +(b) + +![](images/d2a6b6dcbc0bb7e2bf09c7c76a0fb8dd0d71c81d1de27acd247bec2b585d9614.jpg) +(c) + +# 5.4. Ablation Studies + +Enhancements to Rating-based RL. To better analyze the impact of our core contributions, we conduct ablation studies on MetaWorld tasks using the following variants: + +- Vanilla RbRL: The original rating-based RL framework (White et al., 2024), which optimizes the reward function using cross-entropy loss with uniform sampling, as defined in Equation (2). +- No MAE: A variant of ERL-VLM that replaces mean absolute error (MAE) loss with cross-entropy loss while retaining stratified sampling and weighted loss, mirroring Vanilla RbRL with data balancing improvements. +- No Stratified Sampling: A variant of ERL-VLM that removes stratified sampling and weighted loss, leaving only MAE as the enhancement over Vanilla RbRL. + +We report results in Figure 5. The analysis shows that each enhancement contributes to the performance of ERL-VLM when learning from rating feedback. Notably, adopting MAE loss provides the most significant improvement over Vanilla RbRL, demonstrating its robustness in handling noisy labels generated by VLMs. Additionally, stratified sampling and weighted loss effectively mitigate data imbalance, particularly in Sweep Into andDrawer Open. We further investigate the impact of label smoothing (LS) (Wei et al., 2021) as an alternative strategy for handling corrupted labels in Drawer Open (3 rating levels). Specifically, we + +replace the MAE loss with cross-entropy loss using a soft label: $(1 - r)\cdot \tilde{y} +r / 3\cdot [1,1,1]^{\top}$ , where $r = 0.1$ , following prior work (Ibarz et al., 2018; Lee et al., 2021b). The results, shown in Figure 6 (a), indicate that label smoothing is ineffective in our experiment. + +Different Number of Rating Classes. To evaluate the impact of the number of rating classes $n$ , we modify the prompt to query VLM with $n = \{2,3,4\}$ and evaluate performance on Sweep Into and Drawer Open. The results, shown in Figure 6 (b/c), reveal that increasing $n$ (e.g., $n = 4$ ) degrades performance in both tasks, likely due to increased ambiguity and inconsistency in VLM-generated ratings. Interestingly, while $n = 2$ performs best in Sweep Into, $n = 3$ yields superior results in Drawer Open. We attribute this to task-specific differences in evaluation clarity: in Sweep Into, evaluating whether the puck has placed in the hole is binary and unambiguous, whereas in Drawer Open, the degree of opening is more subjective, making a three-class rating scheme more suitable. We anticipate that more refined prompt engineering, with carefully crafted rating descriptions, could further exploit the potential of VLMs for feedback. + +# 6. Conclusion + +In this work, we propose ERL-VLM, a method for learning reward functions by querying VLMs for rating feedback based on a human-provided language task description and + +image observations. Unlike preference-based approaches, ours leverages VLM feedback more effectively and efficiently by querying for absolute evaluations rather than pairwise comparisons. We demonstrate its effectiveness across low-level continuous control, high-level vision-language navigation, and real-world robotic manipulation tasks. Our results highlight ERL-VLM's potential to reduce human effort in reward design, paving the way for more scalable and autonomous RL systems. + +# Impact Statement + +Our approach offers a promising approach to aligning RL agents with more fine-grained human intent by leveraging vision-language models (VLMs) for reward learning. By carefully designing natural language prompts, our method enables rapid and scalable feedback collection, significantly reducing human effort in prototyping and deploying RL systems in real-world applications. However, as our method relies on large foundation models, it inherits their inherent biases, which could propagate into RL agents. This raises important considerations regarding robustness and safety, especially in safety-critical applications. Ensuring the reliability of AI-driven feedback remains a crucial challenge. In this work, we use only visual observations and descriptive actions to analyze agent behavior. Future research can explore integrating additional sensing modalities to further enhance the accuracy and reliability of feedback from foundation models, ultimately leading to more trustworthy and effective RL systems. + +# Acknowledgements + +This work was supported by Institute for Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government(MSIT) (No.RS-2021-II211381, Development of Causal AI through Video Understanding and Reinforcement Learning, and Its Applications to Real Environments) and partly supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government(MSIT) (No.RS-2022-II220184, Development and Study of AI Technologies to Inexpensively Conform to Evolving Policy on Ethics). + +# References + +Arumugam, D., Lee, J. K., Saskin, S., and Littman, M. L. Deep reinforcement learning from policy-dependent human feedback. arXiv:1902.04257, 2019. +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:2212.08073, 2022. +Bao, H., Huang, Y., Wang, Y., Ye, J., Wang, X., Chen, X., Elhoseiny, M., and Zhang, X. Autobench-v: Can large vision-language models benchmark themselves? arXiv:2410.21259, 2024. +Baumli, K., Baveja, S., Behbahani, F., Chan, H., Comanici, G., Flennerhag, S., Gazeau, M., Holsheimer, K., Horgan, D., Laskin, M., et al. Vision-language models as a source of rewards. arXiv:2312.09187, 2023. +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, 2020. +Casper, S., Davies, X., Shi, C., Gilbert, T. K., Scheurer, J., Rando, J., Freedman, R., Korbak, T., Lindner, D., Freire, P., et al. Open problems and fundamental limitations of reinforcement learning from human feedback. Transactions on Machine Learning Research (TMLR), 2023. +Chen, Y., Wu, T., Wang, S., Feng, X., Jiang, J., Lu, Z., McAleer, S., Dong, H., Zhu, S.-C., and Yang, Y. Towards human-level bimanual dexterous manipulation with reinforcement learning. In Conference on Neural Information Processing Systems (NeurIPS), 2022. +Christiano, P. F., Leike, J., Brown, T., Martic, M., Legg, S., and Amodei, D. Deep reinforcement learning from human preferences. In Conference on Neural Information Processing Systems (NeurIPS), 2017. +Cui, Y., Niekum, S., Gupta, A., Kumar, V., and Rajeswaran, A. Can foundation models perform zero-shot task specification for robot manipulation? In Learning for Dynamics and Control Conference (L4DC), 2022. +Ding, B., Qin, C., Liu, L., Chia, Y. K., Joty, S., Li, B., and Bing, L. Is gpt-3 a good data annotator? In Association for Computational Linguistics (ACL), 2023. +Fan, L., Wang, G., Jiang, Y., Mandlekar, A., Yang, Y., Zhu, H., Tang, A., Huang, D.-A., Zhu, Y., and Anandkumar, A. Minedojo: Building open-ended embodied agents with internet-scale knowledge. In Conference on Neural Information Processing Systems (NeurIPS), 2022. +Finn, C., Levine, S., and Abbeel, P. Guided cost learning: Deep inverse optimal control via policy optimization. In International Conference on Machine Learning (ICML), 2016. +Fu, J., Luo, K., and Levine, S. Learning robust rewards with adversarial inverse reinforcement learning. International Conference on Learning Representations (ICLR), 2018. + +Ghosh, A., Kumar, H., and Sastry, P. S. Robust loss functions under label noise for deep neural networks. In Association for the Advancement of Artificial Intelligence (AAAI), 2017. +Gilardi, F., Alizadeh, M., and Kubli, M. Chatgpt outperforms crowd workers for text-annotation tasks. In PNAS, 2023. +Guan, L., Zhou, Y., Liu, D., Zha, Y., Amor, H. B., and Kambhampati, S. Task success is not enough: Investigating the use of video-language models as behavior critics for catching undesirable agent behaviors. Conference on Language Modeling (COLM), 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 International Conference on Machine Learning (ICML), 2018. +Han, X., Yang, Q., Chen, X., Cai, Z., Chu, X., and Zhu, M. Autoreward: Closed-loop reward design with large language models for autonomous driving. IEEE Transactions on Intelligent Vehicles, 2024. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. +Hejna III, D. J. and Sadigh, D. Few-shot preference learning for human-in-the-loop rl. In Conference on Robot Learning (CoRL), 2023. +Ho, J. and Ermon, S. Generative adversarial imitation learning. In Conference on Neural Information Processing Systems (NeurIPS), 2016. +Ibarz, B., Leike, J., Pohlen, T., Irving, G., Legg, S., and Amodei, D. Reward learning from human preferences and demonstrations in atari. In Conference on Neural Information Processing Systems (NeurIPS), 2018. +Jiang, H., Yue, J., Luo, H., Ding, Z., and Lu, Z. Reinforcement learning friendly vision-language model for northwest China: A deep learning approach (ECCV), 2024. +Kalashnikov, D., Irpan, A., Pastor, P., Ibarz, J., Herzog, A., Jang, E., Quillen, D., Holly, E., Kalakrishnan, M., Vanhoucke, V., et al. Scalable deep reinforcement learning for vision-based robotic manipulation. In Conference on Robot Learning (CoRL), 2018. +Kaufmann, E., Bauersfeld, L., Loquercio, A., Müller, M., Koltun, V., and Scaramuzza, D. Champion-level drone racing using deep reinforcement learning. Nature, 2023. + +Klissarov, M., D'Oro, P., Sodhani, S., Raileanu, R., Bacon, P.-L., Vincent, P., Zhang, A., and Henaff, M. Motif: Intrinsic motivation from artificial intelligence feedback. arXiv:2310.00166, 2023. +Knox, W. B. and Stone, P. Interactively shaping agents via human reinforcement: The tamer framework. In K-CAP, 2009. +Kostrikov, I., Nair, A., and Levine, S. Offline reinforcement learning with implicit q-learning. International Conference on Learning Representations (ICLR), 2022. +Kwon, M., Xie, S. M., Bullard, K., and Sadigh, D. Reward design with language models. In International Conference on Learning Representations (ICLR), 2023. +Lee, H., Phatale, S., Mansoor, H., Mesnard, T., Ferret, J., Lu, K. R., Bishop, C., Hall, E., Carbune, V., Rastogi, A., et al. Rlaif vs. rlhf: Scaling reinforcement learning from human feedback with ai feedback. In International Conference on Machine Learning (ICML), 2024. +Lee, K., Smith, L., and Abbeel, P. Pebble: Feedback-efficient interactive reinforcement learning via relabeling experience and unsupervised pre-training. arXiv:2106.05091, 2021a. +Lee, K., Smith, L., Dragan, A., and Abbeel, P. B-pref: Benchmarking preference-based reinforcement learning. Conference on Neural Information Processing Systems (NeurIPS), 2021b. +Leike, J., Krueger, D., Everitt, T., Martic, M., Maini, V., and Legg, S. Scalable agent alignment via reward modeling: a research direction. arXiv:1811.07871, 2018. +Levine, S., Popovic, Z., and Koltun, V. Nonlinear inverse reinforcement learning with gaussian processes. Conference on Neural Information Processing Systems (NeurIPS), 2011. +Li, L., Xie, Z., Li, M., Chen, S., Wang, P., Chen, L., Yang, Y., Wang, B., and Kong, L. Silkie: Preference distillation for large visual language models. arXiv:2312.10665, 2023. +Lin, M., Shi, S., Guo, Y., Chalaki, B., Tadiparthi, V., Pari, E. M., Stepputtis, S., Campbell, J., and Sycara, K. Navigating noisy feedback: Enhancing reinforcement learning with error-prone language models. Empirical Methods in Natural Language Processing (EMNLP), 2024. +Ma, Y. J., Kumar, V., Zhang, A., Bastani, O., and Jayaraman, D. Liv: Language-image representations and rewards for robotic control. In International Conference on Machine Learning (ICML), 2023. + +Ma, Y. J., Liang, W., Wang, G., Huang, D.-A., Bastani, O., Jayaraman, D., Zhu, Y., Fan, L., and Anandkumar, A. Eureka: Human-level reward design via coding large language models. International Conference on Learning Representations (ICLR), 2024. +MacGlashan, J., Babes-Vroman, M., desJardins, M., Littman, M. L., Muresan, S., Squire, S., Tellex, S., Arumugam, D., and Yang, L. Grounding english commands to reward functions. In Robotics Science and Systems (RSS), 2015. +MacGlashan, J., Ho, M. K., Loftin, R., Peng, B., Wang, G., Roberts, D. L., Taylor, M. E., and Littman, M. L. Interactive learning from policy-dependent human feedback. In International Conference on Machine Learning (ICML), 2017. +Mahmoudieh, P., Pathak, D., and Darrell, T. Zero-shot reward specification via grounded natural language. In International Conference on Machine Learning (ICML), 2022. +Nair, S., Rajeswaran, A., Kumar, V., Finn, C., and Gupta, A. R3m: A universal visual representation for robot manipulation. Conference on Robot Learning (CoRL), 2022. +Perolat, J., De Vylder, B., Hennes, D., Tarassov, E., Strub, F., de Boer, V., Muller, P., Connor, J. T., Burch, N., Anthony, T., et al. Mastering the game of strategy with model-free multiagent reinforcement learning. Science, 2022. +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 (ICML), 2021. +Reid, M., Savinov, N., Teplyashin, D., Lepikhin, D., Lillicrap, T., Alayrac, J.-b., Soricut, R., Lazaridou, A., First, O., Schrittwieser, J., et al. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv:2403.05530, 2024. +Rocamonde, J., Montesinos, V., Nava, E., Perez, E., and Lindner, D. Vision-language models are zero-shot reward models for reinforcement learning. International Conference on Learning Representations (ICLR), 2024. +Shridhar, M., Thomason, J., Gordon, D., Bisk, Y., Han, W., Mottaghi, R., Zettlemoyer, L., and Fox, D. Alfred: A benchmark for interpreting grounded instructions for everyday tasks. In Conference on Computer Vision and Pattern Recognition (CVPR), 2020. + +Silver, D., Schrittwieser, J., Simonyan, K., Antonoglou, I., Huang, A., Guez, A., Hubert, T., Baker, L., Lai, M., Bolton, A., et al. Mastering the game of go without human knowledge. Nature, 2017. +Skalse, J., Howe, N., Krasheninnikov, D., and Krueger, D. Defining and characterizing reward gaming. In Conference on Neural Information Processing Systems (NeurIPS), 2022. +Sontakke, S., Zhang, J., Arnold, S., Pertsch, K., Biryik, E., Sadigh, D., Finn, C., and Itti, L. Robocop: One demonstration is enough to learn robot policies. In Conference on Neural Information Processing Systems (NeurIPS), 2024. +Sutton, R. S. and Barto, A. G. Reinforcement learning: An introduction. MIT press, 2018. +Szot, A., Zhang, A., Batra, D., Kira, Z., and Meier, F. Bc-irl: Learning generalizable reward functions from demonstrations. arXiv:2303.16194, 2023. +Venuto, D., Islam, S. N., Klissarov, M., Precup, D., Yang, S., and Anand, A. Code as reward: Empowering reinforcement learning with vlms. International Conference on Machine Learning (ICML), 2024. +Vinyals, O., Babuschkin, I., Czarnecki, W. M., Mathieu, M., Dudzik, A., Chung, J., Choi, D. H., Powell, R., Ewalds, T., Georgiev, P., et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature, 2019. +Wang, R., Zhao, D., Yuan, Z., Obi, I., and Min, B.-C. Pref- clm: Enhancing preference-based reinforcement learning with crowdsourced large language models. IEEE Robotics and Automation Letters (RA-L), 2025. +Wang, Y., Sun, Z., Zhang, J., Xian, Z., Biyik, E., Held, D., and Erickson, Z. Rl-vlm-f: Reinforcement learning from vision language foundation model feedback. International Conference on Machine Learning (ICML), 2024a. +Wang, Y., Xian, Z., Chen, F., Wang, T.-H., Wang, Y., Fragkiadaki, K., Erickson, Z., Held, D., and Gan, C. Robogen: Towards unleashing infinite data for automated robot learning via generative simulation. In International Conference on Machine Learning (ICML), 2024b. +Warnell, G., Waytowich, N., Lawhern, V., and Stone, P. Deep tamer: Interactive agent shaping in high-dimensional state spaces. In Association for the Advancement of Artificial Intelligence (AAAI), 2018. +Wei, J., Liu, H., Liu, T., Niu, G., Sugiyama, M., and Liu, Y. To smooth or not? when label smoothing meets noisy labels. arXiv:2106.04149, 2021. + +White, D., Wu, M., Novoseller, E., Lawhern, V. J., Waytowich, N., and Cao, Y. Rating-based reinforcement learning. In Association for the Advancement of Artificial Intelligence (AAAI), 2024. +Wirth, C., Akrour, R., Neumann, G., and Furnkranz, J. A survey of preference-based reinforcement learning methods. Journal of Machine Learning Research (JMLR), 2017. +Wulfmeier, M., Ondruska, P., and Posner, I. Maximum entropy deep inverse reinforcement learning. arXiv:1507.04888, 2015. +Xie, S., Sun, C., Huang, J., Tu, Z., and Murphy, K. Rethinking spatiotemporal feature learning: Speed-accuracy trade-offs in video classification. In European Conference on Computer Vision (ECCV), 2018. +Xie, T., Zhao, S., Wu, C. H., Liu, Y., Luo, Q., Zhong, V., Yang, Y., and Yu, T. Text2reward: Automated dense reward function generation for reinforcement learning. In International Conference on Learning Representations (ICLR), 2024. +Yoon, E., Yoon, H. S., Hasegawa-Johnson, M. A., and Yoo, C. D. Can video llms refuse to answer? alignment for answerability in video large language models. In International Conference on Learning Representations (ICLR), 2025. +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 (CoRL), 2020. +Yu, T., Zhang, H., Yao, Y., Dang, Y., Chen, D., Lu, X., Cui, G., He, T., Liu, Z., Chua, T.-S., et al. Rlaif-v: Aligning mllms through open-source ai feedback for super gpt-4v trustworthiness. arXiv:2405.17220, 2024. +Yuan, Y., Hao, J., Ma, Y., Dong, Z., Liang, H., Liu, J., Feng, Z., Zhao, K., and Zheng, Y. Uni-rlhf: Universal platform and benchmark suite for reinforcement learning with diverse human feedback. International Conference on Learning Representations (ICLR), 2024. +Zhang, J., Zhang, J., Pertsch, K., Liu, Z., Ren, X., Chang, M., Sun, S.-H., and Lim, J. J. Bootstrap your own skills: Learning to solve new tasks with large language model guidance. Conference on Robot Learning (CoRL), 2023a. +Zhang, J., Huang, J., Jin, S., and Lu, S. Vision-language models for vision tasks: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2024. + +Zhang, Y., Li, Y., Cui, L., Cai, D., Liu, L., Fu, T., Huang, X., Zhao, E., Zhang, Y., Chen, Y., et al. Siren's song in the ai ocean: a survey on hallucination in large language models. arXiv:2309.01219, 2023b. +Zhou, M., Luo, J., Villella, J., Yang, Y., Rusu, D., Miao, J., Zhang, W., Alban, M., Fadakar, I., Chen, Z., Huang, A. C., Wen, Y., Hassanzadeh, K., Graves, D., Chen, D., Zhu, Z., Nguyen, N., Elsayed, M., Shao, K., Ahilan, S., Zhang, B., Wu, J., Fu, Z., Rezaee, K., Yadmellat, P., Rohani, M., Nieves, N. P., Ni, Y., Banijamali, S., Rivers, A. C., Tian, Z., Palenicek, D., bou Ammar, H., Zhang, H., Liu, W., Hao, J., and Wang, J. Smarts: Scalable multi-agent reinforcement learning training school for autonomous driving. Conference on Robot Learning (CoRL), 2020. +Ziebart, B. D., Maas, A. L., Bagnell, J. A., Dey, A. K., et al. Maximum entropy inverse reinforcement learning. In Association for the Advancement of Artificial Intelligence (AAAI), 2008. + +# Appendix + +# A. Details on Tasks and Environments + +# A.1. MetaWorld Tasks + +![](images/a32b56ea88bd4a2abfe2f0f0ac7a0f08ecbbb90d905edffa5f84c2d8b70e3655.jpg) +(a) Sweep Into + +![](images/a31d46496a84cbcec2ac88e65272eca563554f73d22d524218701f2a0dfb24e4.jpg) +(b)Drawer Open + +![](images/103e27ae30acfcf82c5e70f423231bb26affabaaf53cc24514ec7639257e3d64.jpg) +(c) Soccer + +![](images/b0a7c704e1615f18814dee99d9e25e03d0b0ff389c0a15bd24cffb2fedae3cf7.jpg) +Figure 7. Examples of image observations in MetaWorld for querying the VLM teacher and reward learning. +Figure 8. Example of trajectory segment from a "PickupObject" task in scene 4. + +We evaluate our methods on three tasks from MetaWorld (Yu et al., 2020), following prior work (Sontakke et al., 2024; Wang et al., 2024a). We describe tasks as follows: + +- Sweep Into: The goal is to sweep a green puck into a square hole on the table. The task is considered successful when the puck remains inside the hole. +- **Drawer Open:** The goal is to pull open a drawer on the table. The task is considered successful when the drawer extends beyond a certain threshold. +- Soccer: The goal is to kick a soccer ball into the goal. The task is considered successful when the ball remains inside the goal area. + +Observation Space. We use state-based observations for policy learning, whereas for reward learning, we use RGB image-based observations rendered from the simulator. Following the original MetaWorld setup (Yu et al., 2020), the state observation is a 39-dimensional vector consisting of the end-effector position, the gripper status, the object's position, the object's orientation, and the goal position. For image observations, we render RGB images at a resolution of $224 \times 224$ . Additionally, as these tasks are all object-centric, we follow (Wang et al., 2024a) to remove the robot from the image to facilitate the analyzing process of VLMs. The examples of image observation are shown in Figure 7. + +Action Space. The action is a 4-dimensional vector, normalized within $[-1, 1]$ . The first three dimensions represent the displacement in the position of the end-effector, and the last dimension is a normalized torque applied to the gripper fingers. + +# A.2. ALFRED Tasks + +We evaluate our methods in a modified version of the ALFRED simulator (Zhang et al., 2023a) to assess its effectiveness in solving high-level vision-language navigation tasks. We focus on 20 tasks drawn from 10 scenes in the Kitchen environment, which requires both navigation and object manipulation. Each scene includes two sequential instructions, and the agent must complete the first instruction before proceeding to the next. The detailed task instructions are provided in Table 2. + +Observation Space. For both policy learning and reward learning, we use input observations composed of the $224 \times 224$ egocentric RGB image and the robot's pose. The robot's pose is 4-dimensional vector, consisting of its $(x,y,z)$ coordinates and camera horizon angle. The camera horizon can take values from $\{-45,-30,\dots,30,45\}$ . For all methods, we preprocess the image observation using a frozen ResNet-18 encoder (He et al., 2016) pretrained on ImageNet, obtaining a visual representation of shape $512 \times 7 \times 7$ . The example of image observations are shown in Figure 8. + +Action Space. In ALFRED, the agent operates with a discrete action space of 12 high-level actions, including 5 navigation actions: MoveAhead, RotateRight, RotateLeft, LookUp, and LookDown, and 7 interaction actions: Put, Pickup, Open, Close, ToggleOn, ToggleOff, and Slice. For interaction actions, the policy additionally selects one of 82 object types to interact with. Note that for the VLM analysis prompt, we use only actions and not object types. Due to large discrete action space $(5 + 7 * 82)$ , we perform same masking as (Zhang et al., 2023a) to prevent agents from taking actions that are not possible (e.g., the policy cannot output Close for object Tomato). + +
SceneTask TypeTask Instruction
1PickupObjectPutObjectPick up the spoon from the counterPut the spoon in the white cup on the shelf.
2PickupObjectCoolObjectPick up the egg that is beside the fork in the sink.Open the refrigerator, then place the egg on the glass shelf and close the fridge. Wait then open the fridge and pick up the egg, then close the fridge.
3PickupObjectCoolObjectPick up the tomato from the sink.Open the fridge door, put the tomato inside of the fridge, close the door, open the door, take the tomato out, close the door.
4PickupObjectCoolObjectPick up the mug in the coffee makerOpen the fridge, put the cup in the fridge, close the fridge, wait, open the fridge, pick the cup, close the fridge
5PickupObjectCoolObjectPick up the bread.Open the fridge, put the bread in the fridge, close the fridge, open the fridge, get the bread, and close the fridge.
6PickupObjectCleanObjectPick up the white coffee cup to the right of the trophy.Put the coffee cup in the sink, turn on the water, turn off the water and pick up the coffee cup.
7PickupObjectPutObjectPick up the smaller silver knife on the counter.Put the knife in the green cup in the sink.
8PickupObjectPutObjectPick up a bowl from the shelfPut the bowl on the counter
9PickupObjectPutObjectGrab the knife from the counterPut the knife in the pan on the stove
10PickupObjectCleanObjectPick up the knife from the counter.Place the knife in the sink and turn the water on. Turn the water off and pick up the knife.
+ +Table 2. Task instructions from the Kitchen environment in ALFRED. + +# A.3. Real Robot Tasks + +Observation Space. For policy learning, we use input observations composed of the $480 \times 480$ RGB image captured by an Intel RealSense D435i and the end-effector's state. For all methods, we preprocess the image by first downsampling it to $224 \times 224$ and then transforming it into a 512-dimensional feature vector using a pretrained R3M image encoder (Nair et al., 2022). The end-effector state is a 5-dimensional vector consisting of the end-effector's position $(x, y, z)$ , yaw orientation, and gripper's binary state (open/close). We concatenate the image feature with the end-effector state to form the final input observation, resulting in a 517-dimensional vector. + +Action Space. The action space consists of (1) the displacement of the end-effector's position in Cartesian space and (2) a discrete value indicating whether the gripper should open or close. These actions are transmitted to the robot with $10\mathrm{Hz}$ and converted to the desired joint poses using the Sawyer robot's Intera SDK inverse kinematics solver. + +# B. Training Implementation Details and Hyperparameters + +# B.1. MetaWorld + +Policy Training. We build on RbRL (White et al., 2024) for training policy, which is similar to PEBBLE (Lee et al., 2021a), except that it learns from rating feedback. Original RbRL's implementation1 only supports locomotion tasks, we extend it to support manipulation tasks in MetaWorld. We use SAC (Haarnoja et al., 2018) as the off-policy RL algorithm, the detailed hyperparameters are shown in Table 3. For all methods, the policy is learned with state-based observations. + +
ParameterValue
Number of layers3
Hidden units per each layer256
Steps of unsupervised pre-training9000
# Training Steps1e6
Batch Size512
Learning rate0.0003
OptimizerAdam
Initial temperature0.1
Critic target update freq2
Critic EMA τ0.005
(β1, β2)(0.9, 0.999)
Discount γ0.99
VLM query frequency K5000
Number of queries N per session50
Maximum budget of queries10000
+ +Table 3. Hyperparameters for SAC in MetaWorld. + +Reward Learning. Following (Wang et al., 2024a), we use an image-based reward model consisting of a 4-layer Convolutional Neural Network, followed by a linear layer and a Tanh activation. Additionally, we employ an ensemble of three reward models. For all tasks, we use a segment size of 1 for reward learning. The reward models are optimized using loss function defined in Equation (3). We use batch size of 512 and Adam as the optimizer with the learning rate of 0.0003. + +# B.2. ALFRED + +Policy Learning. We use Implicit Q-Learning (IQL) (Kostrikov et al., 2022) with a transformer-based architecture for both the policy and critic networks, similar to (Zhang et al., 2023a). The hyperparameters are provided in Table 4. The main difference is that we set the quantile parameter $\tau = 0.5$ , making IQL a standard off-policy online RL algorithm, rather than one suited for offline RL as in (Zhang et al., 2023a). During training, to reduce exploration time—which is particularly challenging in ALFRED—we seed the buffer with 3 human-collected demonstrations for each task. It is important to note that while these demonstrations complete the task, they are not necessarily optimal. This is applied consistently across all baselines. Additionally, we relabel the rewards in the seed buffer to align with each baseline's reward function, ensuring compatibility during training. For all methods, the policy takes input as a sequence of states and actions as input, and each state is structured as mentioned in Section A.2. + +Reward Learning. For the reward model, we use the same transformer-based architecture as the policy, which also takes inputs same as the policy. The output of the reward model is bounded by a Tanh activation function. We also employ an ensemble of three reward models, similar to the setup in MetaWorld. Additionally, since the buffer is seeded with demonstrations, we first query the VLM for roughly 1000 feedback samples and perform warmup training on the reward model using these feedback. During online training, we continue training the reward model with remaining query budget. The reward models are optimized using the loss function defined in Equation (3). We use batch size of 512 and AdamW as the optimizer with a learning rate of 0.0001. This setup is applied to both RL-VLM-F and ERL-VLM. + +# B.3. Real Robot + +Policy Learning. We train the policy and critic networks using Implicit Q-Learning (IQL) (Kostrikov et al., 2022), employing a transformer-based architecture similar to ALFRED tasks. The hyperparameters are provided in Table 5. For the Sparse Rewards baseline, we assign a reward of one at the final step of the demonstrations. Since the gripper action space is discrete and the dataset is imbalanced, we adjust the gripper loss by applying inverse frequency weighting based on the number of examples in each class. + +Reward Learning. The reward model utilizes the same Convolutional Neural Network architecture as MetaWorld environment. We use a Tanh activation function to bound the output. We also employ an ensemble of three reward models. + +
ParameterValue
Batch Size128
# Training Steps5e5
Learning Rate0.0001
OptimizerAdamW
Dropout Rate0.1
Weight Decay0.1
Discount γ0.97
Q Update Polyak Averaging Coefficient0.005
Policy and Q Update Period8 per train iter
IQL Advantage Clipping[0, 100]
IQL Advantage Inverse Temperature β5
IQL Qunatile τ0.5
Maximum Context Length8
Warmup query~1000
# Epochs for warmup training reward model100
VLM query frequency K50 epochs
Number of queries N per session50
Maximum budget of queries1500
+ +We use a batch size of 512 and the Adam optimizer with learning rate 0.0001. + +Table 4. Hyperparameters for IQL in ALFRED. + +
ParameterValue
Batch Size256
# Training Steps1e5
Learning Rate0.0001
OptimizerAdam
Discount γ0.99
Q Update Polyak Averaging Coefficient0.005
IQL Advantage Clipping[0, 100]
IQL Advantage Inverse Temperature β3
IQL Qunatile τ0.7
+ +Table 5. Hyperparameters for IQL in Real Robot. + +# C. Baselines + +We rerun RL-VLM-F using its original implementation2, ensuring a fair comparison by using the same Gemini-1.5-Pro (Reid et al., 2024) as the VLM. While we can achieve similar reported performance in Sweep Into and OpenDrawer, we observe lower performance in Soccer. For CLIP Score, we also use the implementation from RL-VLM-F, and we extend RoboCLIP Score based on the RL-VLM-F framework. Additionally, we observe that both CLIP and RoboCLIP achieve higher performance than previously reported in RL-VLM-F. In MetaWorld, task descriptions for CLIP, RoboCLIP, and RL-VLM-F remain the same as those used in (Wang et al., 2024a), as shown in Tables 11, 12, and 13. For ALFRED, we use task instructions as task description for all methods. The prompt template used in RL-VLM-F is shown in Table 10. + +# D. Prompts and Task Descriptions + +The prompt templates used to obtain ratings in ERL-VLM are shown in Table 6 (for MetaWorld), Table 7 (for ALFRED), and Table 8. The prompt templates for obtaining preferences in RL-VLM-F are provided in Table 9 (for MetaWorld) and Table 10 (for ALFRED). + +# Prompt Template for ERL-VLM + +# Analyzing: + +```txt + +``` + +You will be presented an image of a robot arm performing the task . Please focus on the target object in the task and carefully analyze the image in term of completing the task. + +# Rating: + +```txt + +``` + +From the above analyses, based on this rating category: , how would you rate this image in terms of completing task + +Table 6. Prompt Template for ERL-VLM used in MetaWorld environment: Rating classes can be {Bad, Average, Good}. + +# Prompt Template for ERL-VLM + +# Analyzing: + +```txt + +``` + +You will be presented with an image containing a segment of the trajectory of a robot performing the task . The trajectory segment contains $<\mathbb{N}>$ time steps of visual observations, corresponding to $<\mathbb{N}-1>$ intermediate actions. + +The intermediate actions are: $<\text{Action}_1, \ldots, \text{Action}_{N-1}>$ . + +Note that when an object is picked up, it appears close to the bottom of the view. + +Please analyze the visual differences between consecutive time steps, reply the changes between consecutive time steps in each line explicitly. For example: + +- Timestep 0 to 1 (Executed action): Your analysis +- Timestep 1 to 2 (Executed action): Your analysis +- and so on + +The task is to , analyze this segment in terms of completing the task. + +# Rating: + +```txt + +``` + +You are tasked with rating the RL agent's performance in completing a task . From the above analyses for transitions, based on this rating category: , where: +- Bad: The task is not completed. +- Average: The task is partially completed, or you believe the transition is critical for achieving the goal, such as the target object appear in the agent's view, but falls short of completion. +- Good: The task is completed. + +How would you rate each transition in terms of completing task? + +Please reply a single line of list of ratings for $< \mathrm{N} - 1 >$ transitions. + +(For example: [rating of transition 1, rating of transition 2, ..., rating of transition $< \mathrm{N} - 1>$ ). + +Table 7. Prompt Template for ERL-VLM used in ALFRED environment. + +# Prompt Template for ERL-VLM + +# Analyzing: + +```txt + +``` + +You will be presented an image of a robot arm performing the task . Please focus on the target object in the task and carefully analyze the image in term of achieving the task. + +# Rating: + +```txt + +``` + +From the above analyses, based on this rating category: , how would you rate this image in terms of completing task ? + +Table 8. Prompt Template for ERL-VLM used in Real Robot environment. + +# Prompt Template for RL-VLM-F + +# Analysis Template: + +Consider the following two images: + +Image 1: + + + +Image 2: + + + +1. What is shown in Image 1? +2. What is shown in Image 2? +3. The goal is to . Is there any difference between Image 1 and Image 2 in terms of achieving the goal? + +# Labeling Template: + +Based on the text below to the questions: + +[Repeat the 3 questions in the Analysis Template] + + + +Is the goal better achieved in Image 1 or Image 2? Reply a single line of 0 if the goal is better achieved in Image 1, or 1 if it is better achieved in Image 2. + +Reply -1 if the text is unsure or there is no difference. + +Table 9. Prompt Template for RL-VLM-F used in MetaWorld environment. + +# Prompt Template for RL-VLM-F + +# Analysis Template: + +Consider the following two trajectory segments: + +Trajectory Segment 1: + + + +Trajectory Segment 2: + + + +Trajectory segment 1 contains $< N_{1} >$ time steps of visual observations, corresponding to $< N_{1} - 1 >$ intermediate actions. + +The intermediate actions are: $<\text{Action}_1, \ldots, \text{Action}_{N_1 - 1}>$ . + +Trajectory segment 2 contains $< N_{2} >$ time steps of visual observations, corresponding to $< N_{2} - 1 >$ intermediate actions. + +The intermediate actions are: $<\text{Action}_1, \ldots, \text{Action}_{N_2-1}>$ . + +Note that when an object is picked up, it appears close to the bottom of the view. + +Please analyze the visual differences between consecutive time steps of two trajectory segments, reply the changes between consecutive time steps in each line explicitly. For example: + +Trajectory Segment 1: + +- Timestep 0 to 1 (Executed action): Your analysis +- Timestep 1 to 2 (Executed action): Your analysis +- and so on + +Trajectory Segment 2: + +- Timestep 0 to 1 (Executed action): Your analysis +- Timestep 1 to 2 (Executed action): Your analysis +- and so on + +The goal is . Is there any difference between Trajectory Segment 1 and Trajectory Segment 2 in terms of achieving the goal? + +# Labeling Template: + +Based on the text below to the questions: + + + +Is the goal better achieved in the Trajectory Segment 1 or Trajectory Segment 2? + +Reply a single line of 0 if the goal is better achieved in Trajectory Segment 1, or 1 if it is better achieved in Trajectory Segment 2. + +Reply -1 if the text is unsure of there is no difference. + +Table 10. Prompt Template for RL-VLM-F used in ALFRED environment. + +
Task NameTask Description
Sweep IntoThe green cube is in the hole.
Drawer OpenThe drawer is opened.
SoccerThe soccer ball is in the goal.
+ +Table 11. Task descriptions for CLIP Score used in MetaWorld. + +
Task NameTask Description
Sweep Intorobot sweeping the green cube into the hole on the table
Drawer Openrobot opening green drawer
Soccerrobot pushing the soccer ball into the goal
+ +Table 12. Task descriptions for RoboCLIP used in MetaWorld. + +
Task NameTask Description
Sweep Intoto minimize the distance between the green cube and the hole
Drawer Opento open the drawer
Soccerto move the soccer ball into the goal
+ +Table 13. Task descriptions for RL-VLM-F used in MetaWorld. + +
Task NameTask Description
Sweep Intoplace the green cube so that it lies on the square hole
Drawer Openopen the drawer
Soccerplace the soccer ball so that it lies inside the goal
+ +Table 14. Task descriptions for ERL-VLM used in MetaWorld. + +
Task NameTask Description
Sweep BowlSweep the green bowl beyond the red line.
Drawer OpenOpen the drawer with the blue handle until the green line is fully visible.
Pickup BananaPick up the banana on the gray plate.
+ +Table 15. Task descriptions for ERL-VLM used in Real Robot environment. + +![](images/be50bec0bd2bd788ae50c584d62cdbfb23bee5f1200a7652c21aada58558d881.jpg) + +(a) The Sweep Bowl task is relatively simple, where the agent learns to push the bowl across the red line. As shown, all three methods achieve high success rates. + +![](images/b2cd0d589dc65540e00ca3e474b95f5e3576080d1d42de4d993eebd200ba3e82.jpg) + +(b) In the Drawer Open task, both BC and Sparse Rewards failed to position the gripper correctly on the handle. In contrast, ERL-VLM successfully placed the gripper in the right spot and pulled the handle horizontally to complete the task. + +![](images/37db39c7b00514815590c379d524486c1f215f1cf3ff4eddf05054741c8f2e15.jpg) +Figure 9. Visualizations of policy rollouts on three tasks in the real robot environment. + +(c) In the Pickup Banana task, ERL-VLM successfully grasped and lifted the banana from the plate. In contrast, BC and Sparse Rewards moved close to the banana but failed to close the gripper at the correct position, resulting in lifting without proper grasping. + +# E. Impact of MAE loss in Preference-based RL + +We further investigate the impact of MAE loss in handling corrupted labels in RL-VLM-F (VLM-based PbRL) by replacing Cross-Entropy with MAE loss. The results, shown in Figure 10, indicate that MAE provides a slight improvement. This suggests that the lower performance may stems more from the ambiguity of preference queries rather than noisy labels. + +![](images/211fae4800fbd6129125ae9c24de01505c2479df86b1f27156ee65acba6f19bc.jpg) +Figure 10. The impact of MAE on handling corrupted labels in RL-VLM-F. + +![](images/ae315f467263543a0481a13f99fcbbe48d8995e80ce65565219b6f9f2bd3a611.jpg) + +![](images/1b3a0ff5f60371d3024089c831823bcda7384ca41d48e63a53084ffdca47e514.jpg) + +# F. Additional Results & Analysis + +# F.1. Distribution of Ratings + +The rating distribution for the tasks is shown in Figure 11. As shown, for the three MetaWorld tasks, the percentage of Good ratings increases as the timestep progresses. For ALFRED tasks, the percentage of Average ratings increases over time, while the percentage of Good ratings remains almost constant. This is because, in ALFRED tasks, successful states occur at the end of the trajectory, so the VLM tends to assign Good ratings mostly at the final step, resulting in an increase in number of Good ratings, although the increase is relatively small compared to other ratings. + +![](images/8869a37dbbcb13c741985a0e312f7c4a7a09dee9ee686e423f4fc103af943afd.jpg) +Figure 11. Typical rating distribution over the course of training for ERL-VLM agents. The first three plots show the distribution of ratings in MetaWorld tasks, while the final plot displays the distribution in ALFRED tasks, aggregated across four different task types. + +![](images/5f18542eb97c198e419fb81cefdab09e862af08a80d9ec6554c386fba51808fb.jpg) + +![](images/681292dc58b3cca6511b14abee36eabc269c7f98efeae1da3e9c455b41709bcc.jpg) + +![](images/8fa2180405f15169dd4837ed2d4d9a4d75f9eb12e771975fa3272fe81016c893.jpg) + +# F.2. Examples of Segments Labeled with Different Ratings + +We provide examples of states in MetaWorld and trajectories in ALFRED, each labeled with different ratings, in Figures 15, 16, 17, and 18. The reasoning behind the VLM's ratings (obtained during the analysis stage of our prompts) is also illustrated in these figures. As shown, the VLM assigns appropriate ratings based on the status of the target object in relation to the task objectives specified in the task description. + +# F.3. Visualization of the Learned Reward + +We visualize the outputs of the learned reward models from ERL-VLM, RL-VLM-F, and CLIP along expert trajectories in three MetaWorld tasks and four ALFRED tasks, as shown in Figures 19 and 20. In MetaWorld tasks, CLIP rewards are generally noisy and poorly aligned with task progress. While both ERL-VLM and RL-VLM-F exhibit increasing reward trends along expert trajectories, ERL-VLM aligns more closely with the ground-truth task progress and shows significantly less noise compared to RL-VLM-F. In ALFRED, ERL-VLM produces smoother and more consistent reward signals along expert trajectories than the other methods. + +# F.4. Consistency of Ratings + +In practice, we observe that the large VLMs (e.g., Gemini) can produce stochastic ratings; identical segments may receive different labels, even when the temperature is set to zero. To investigate the consistency and reliability of these ratings, we + +repeatedly query the VLM along expert trajectories across different tasks. The results, shown in Figures 12 and 13, illustrate the degree of rating consistency. While some noise is present, the overall ratings along expert trajectories remain stable and reasonable. For example, by calculating the accuracy of ratings based on task success/failure (for $n = 3$ rating levels, we only count Bad and Good), we observe the following rating accuracies: for Sweep Into, $90 \pm 4.6$ ; for Sawyer Open, $65 \pm 3.8$ ; and for Soccer, $66.8 \pm 3.7$ . The low variance across trials suggests that the inconsistencies are minor and can be effectively addressed by our MAE-based objective. + +![](images/038216883c58050cd973e146eb8bed50ad7222bab1f9278840529feeafd97274.jpg) +Figure 12. Consistency of VLM-assigned ratings for MetaWorld tasks: Using the expert trajectories from Figure 19, we perform 10 repeated trials to query the VLM for ratings (using the prompt template from Table 6, with the VLM temperature set to 0). The top row indicates task-specific success or failure at each timestep. The bottom 10 rows show the ratings from these trials along the expert trajectories (with every other timestep skipped for better visualization). The number of ratings, $n$ , matches the value used in Figure 4. + +![](images/1e683f933eea79925d46cf2c32817c7f1a6d5dd40c9275e79c575501c13b4a51.jpg) + +![](images/2d346b64f8cffc863be15e0792d08a8276c5343cc645382e88afa8331962c8d0.jpg) + +![](images/e7140e1e07554a41256251ce2a5261a5c0ed7e80aa02e0b077c75f92f3f96fd1.jpg) +Figure 13. Consistency of VLM-assigned ratings for ALFRED tasks: Using the expert trajectories from Figure 20, we perform 10 repeated trials to query the VLM for ratings (using the prompt template from Table 7, with the VLM temperature set to 0). The top row indicates task-specific success or failure at each timestep. The bottom 10 rows show the ratings of trials along the expert trajectories. The number of ratings is equal to three across tasks. + +![](images/b30fbf58f60b4d5c2d71d729966f3c37338380460b97b81c104015079663ccbe.jpg) + +![](images/d520021e02b3032e99869a846d4bb27949cef86448ec6bdb30b0325fa81f4f6a.jpg) + +![](images/d349261f6fd5058854402f1c13f1397c11a4e0384164004c329d9cd88d16dcec.jpg) + +The influence of rating levels on the consistency of VLM feedback in the Drawer Open task is further examined in Figure 14. With $n = 3$ ratings levels, the VLM produces more consistent and intuitive feedback, with ratings generally increasing as the trajectory progresses toward task completion. However, with other values (e.g., $n = 2$ or $n = 4$ ), the VLM exhibits greater inconsistency. For instance, with $n = 2$ , the VLM sometimes assigns Bad ratings even when the state reflects successful task completion. Similarly, with $n = 4$ , it occasionally assigns Very Bad or Bad ratings to successful states. We hypothesize that this behavior stems from inherent biases in the VLM. Based on these observations, we recommend performing a simple consistency check when designing prompts for new tasks to guide the selection of an appropriate number of rating levels. + +![](images/d870bdb344c636300aeb842aed8a1ae46bedeec1f4cfcd9a0e6aeef9a78cdc57.jpg) +Figure 14. VLM-assigned ratings for the Drawer Open task with $n = \{2,3,4\}$ . Using the expert trajectory from Figure 19, we perform 10 repeated trials to query the VLM for ratings (using the prompt template from Table 6, with the VLM temperature set to 0). The top row indicates task-specific success or failure at each timestep. The bottom 10 rows show the ratings from these trials along the expert trajectories (with every other timestep skipped for better visualization). + +![](images/de9452ec9be026c453f3d666d1ebfa1f58f6630f28b5ff36a78761427923bc94.jpg) + +![](images/ef6447f6416677eb5370b52b6004c8017d3df9035e8e78ff32fa42b9c9cf5d1d.jpg) + +# Task: Sweep Into + +![](images/0f19a0e328936368e8f0c1844aa3ba5f0b97b09c5b478c291300e88e8fde879a.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The image shows the green cube is not in the square hole. The task is therefore incomplete. The robot arm needs to move the cube and position it correctly over and within the hole to complete the task. + +Rating: Bad + +![](images/9d077dd1b8f27e37f472d8846e946555dcd1f4e38405843bb4d77e25e2d3dd32.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The image shows the green cube already placed within the square hole. Therefore, the task of "place the green cube so that it lies on the square hole" is complete. + +Rating: Good + +# Task:Drawer Open + +![](images/9e434a640301f8e00e228b258c896efc4d28d9409132f994ad5e634f23b001ca.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The image shows a small, single-drawer cabinet with the drawer closed. The task is to open the drawer. Therefore, the task is not completed in this image. The robot arm would need to grasp the handle and pull it forward to complete the task. + +Rating: Bad + +![](images/69bd98fac8329c95f66efe4ef7fb9e9ccdf031cff9d53c429f6f7a208fee17ab.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The drawer is already slightly open, so the task is partially completed. To fully complete the task of opening the drawer, the robot arm would need to grasp the handle and pull it towards itself until the drawer is fully extended. + +Rating: Average + +![](images/944c204c9585a7c9599b32e141a5e54f40acef6f478e62297facfb79ae2db1fc.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The image shows the drawer already in an open state. Therefore, the task of opening the drawer is already completed. + +Rating: Good + +# Task: Soccer + +![](images/e149259bdefb9d2c31c531442956a945609aeaba311c0bed3a0fc6a18fd9d504.jpg) +Prompt in Table 6 + +# Gemini + +Analyzing: The image shows the soccer ball outside and in front of the goal. The task is not complete. The ball needs to be moved into the space between the posts and behind the net in order for it to be considered "inside the goal. + +Rating: Bad + +![](images/5184e8b39c6fb12a42a39ad21085e758610ee4ea8e83cb853b9fac606daa8d95.jpg) +Prompt in Table 6 +Figure 15. Examples of states with different ratings in MetaWorld tasks. We use the prompt template from Table 6 to obtain ratings. The images shown were used to query the VLM, and the text outputs are directly taken from the model's response. Following (Wang et al., 2024a), we remove the robot from the images to facilitate the VLM's analysis. + +# Gemini + +Analyzing: The image shows the soccer ball already inside the goal. Therefore, the task of placing the soccer ball inside the goal is complete. + +Rating: Good + +Task Instruction: "Pick up the mug in the coffee maker" + +![](images/663274c2b4f682615101022d5cff773bdd5747be99d98e7232c77991291a9e0c.jpg) +Timestep 0 +Timestep 1 +Timestep 2 +Timestep +Timestep : +Timestep 5 +Tim +step 6 +Timestep +Timestep +Time +ep 9 +Timestep 10 +Time +p 11 +Time + +# Prompt in Table 7 + +![](images/2b46eb9d251a499aab8ba680a362a049c4250f143cf6257e9c0ee2ef6d5a7294.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateRight): The robot rotates to the right, the view changes from the front of the counter to the side of the counter. +- Timestep 1 to 2 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 2 to 3 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 3 to 4 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 4 to 5 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 5 to 6 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 6 to 7 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 7 to 8 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 8 to 9 (MoveAhead): The robot moves forward, the view shows more of the counter and the coffee maker. +- Timestep 9 to 10 (RotateLeft): The robot rotates to the left, the view changes from the side of the counter to the front of the counter. +- Timestep 10 to 11 (LookDown): The robot looks down, the view changes from the front of the counter to a closer view of the coffee maker. +- Timesteps 11 to 12 (PickupObject): The robot picks up the mug, the mug is now close to the bottom of the view. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Average", "Good"] + +# Task Instruction: "Pick up the mug in the coffee maker" + +![](images/a759d0aa829395ce624c1bb70f5a0c5611899af6f6ba475a546aec0e81d44050.jpg) +Timestep 0 +Timestep +Timestep 2 +Tinsteep 3 +Timestep 1 +Tinesteep 5 +Tim +step 6 +Time +7 +Time +工 +□Tim +step 9 +T11 +step 1 +Time +11 +Tim +p.12 +Time + +# Prompt in Table 7 + +![](images/5b69c17149d63f275502a24660b43833253249927109735c01424bcbb9749728.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateLeft): The agent turns left from facing the sink to facing the window. +- Timestep 1 to 2 (MoveAhead): The agent moves closer to the window. +- Timestep 2 to 3 (MoveAhead): The agent moves closer to the window. +- Timestep 3 to 4 (MoveAhead): The agent moves closer to the window. +- Timestep 4 to 5 (MoveAhead): The agent moves closer to the window. +- Timestep 5 to 6 (MoveAhead): The agent moves closer to the window. +- Timestep 6 to 7 (RotateLeft): The agent turns left from facing the window to facing the coffee maker. +- Timestep 7 to 8 (RotateLeft): The agent turns left from facing the coffee maker to facing the kitchen island. +- Timestep 8 to 9 (RotateRight): The agent turns right from facing the kitchen island to facing the coffee maker. +- Timestep 9 to 10 (RotateRight): The agent turns right from facing the coffee maker to facing the window. +- Timestep 10 to 11 (MoveAhead): The agent moves closer to the window +- Timestep 11 to 12 (RotateLeft): The agent turns left from facing the window to facing the coffee maker. +- Timestep 12 to 13 (PickupObject): The agent picks up the mug from the coffee maker. +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Good"] + +# Task Instruction: "Pick up the mug in the coffee maker" + +![](images/aef5a804bf66e793f60ebd14f4366c1b683b962553c2057514e78e882ea39ded.jpg) + +# Prompt in Table 7 + +![](images/21c6c24b8118e2a46b4cfd9a57fbfc965adac7275c1044617d35adbcb4597134.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateLeft): The agent rotates to the left, bringing the counter into view. The bread is no longer visible. + +- Timestep 1 to 2 (MoveAhead): The agent moves closer to the counter. The coffee maker and the mug are larger in the view. + +- Timestep 2 to 3 (MoveAhead): The agent moves closer to the counter. The coffee maker and mug are even larger, and the apple is now visible. + +- Timestep 3 to 4 (MoveAhead): The agent moves closer to the counter, now very close to the coffee maker. The mug is now the primary object in view. + +- Timestep 4 to 5 (RotateRight): The agent rotates to the right, bringing the sink into view. The mug is still visible, but the coffee maker is mostly out of + +view. + +- Timestep 5 to 6 (LookDown): The agent looks down. The sink is closer in the view, and the mug is no longer visible. +- Timestep 6 to 7 (PickupObject): The agent picks up the bowl from the sink. The bowl is now large and at the bottom of the view. + +Rating: ["Average", "Average", "Average", "Average", "Bad", "Bad", "Bad"] + +Figure 16. Examples of trajectories with different ratings in a PickObject task in ALFRED. We use the prompt template from Table 7 to obtain ratings. The images shown were used to query the VLM, and the textual outputs are taken directly from the model's responses. + +Task Instruction: "Pick up the tomato from the sink" + +![](images/3cd10dedd547d19f4b41fc3db6d6ad1aee5f94432d5dc7e3337049a93e7c72e8.jpg) + +# Prompt in Table 7 + +![](images/20b78d9e1db940e9e1f3d92c4aacfc11a5bc7ca1dad8acb824532dcc9d63c2cf.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateRight): The robot rotates to the right, the view changes from the counter to the side of the kitchen. +- Timestep 1 to 2 (MoveAhead): The robot moves forward, the view changes to a closer view of the stove. +- Timestep 2 to 3 (MoveAhead): The robot moves forward, the view changes to a closer view of the stove. +- Timestep 3 to 4 (MoveAhead): The robot moves forward, the view changes to a closer view of the stove. +- Timestep 4 to 5 (MoveAhead): The robot moves forward, the view changes to a closer view of the stove. +- Timestep 5 to 6 (RotateRight): The robot rotates to the right, the view changes from the stove to the counter. +- Timestep 6 to 7 (RotateRight): The robot rotates to the right, the view changes from the counter to the side of the kitchen. +- Timestep 7 to 8 (MoveAhead): The robot moves forward, the view changes to a closer view of the counter. +- Timestep 8 to 9 (RotateLeft): The robot rotates to the left, the view changes from the side of the kitchen to the counter. +- Timestep 9 to 10 (MoveAhead): The robot moves forward, the view changes to a closer view of the sink. +- Timestep 10 to 11 (RotateRight): The robot rotates to the right, the view changes from the sink to the side of the kitchen. +- Timesteps 11 to 12 (MoveAhead): The robot moves forward, the view changes to a closer view of the counter. +- Timestep 12 to 13 (RotateLeft): The robot rotates to the left, the view changes from the side of the kitchen to the counter. +- Timestep 13 to 14 (LookDown): The robot looks down, the view changes to a closer view of the sink. +- Timestep 14 to 15 (PickupObject): The robot picks up the tomato, the tomato appears close to the bottom of the view. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Average", "Good"] + +Task Instruction: "Pick up the tomato from the sink" + +![](images/1deddea7c2c58203f5c6a43cb7cf33fbe17036c6a49bdca3e1b4efd89ab9891d.jpg) + +![](images/3d7a7cc7c25330a3714b555cdd1a5a16d2878f8d6deedd6be08edb6f8b1dd715.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateRight): The view rotates slightly to the right, now facing more of the floor and less of the counter. +- Timestep 1 to 2 (RotateLeft): The view rotates back to the left, returning to roughly the same position as in timestep 0. +- Timestep 2 to 3 (RotateRight): The view rotates to the right again, similar to timestep 1. +- Timestep 3 to 4 (MoveAhead): The view moves forward, now showing a wider view of the kitchen, including a ladder and part of the fridge. +- Timestep 4 to 5 (RotateLeft): The view rotates to the left, now facing the counter with the sink. +- Timestep 5 to 6 (RotateLeft): The view rotates further to the left, now showing the stove and a window. +- Timestep 6 to 7 (RotateRight): The view rotates back to the right, now facing the sink again. +- Timestep 7 to 8 (LookDown): The view tilts downwards, focusing on the sink and its contents. +- Timestep 8 to 9 (MoveAhead): The view moves slightly closer to the sink. +- Timestep 9 to 10 (MoveAhead): The view moves even closer to the sink. +- Timestep 10 to 11 (PickupObject): The tomato, which was previously in the sink, is now at the bottom of the view, indicating it has been picked up. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Average", "Good"] + +Task Instruction: "Pick up the tomato from the sink" + +![](images/72ae831077276aaafd5e6c5afda06a0a18795aa7921d86911f59e678c15887e2.jpg) + +# Prompt in Table 7 + +![](images/6eb8332b5ce786a3d1740fd8f1b16f094b561f51f94c24653178062d0a176e27.jpg) +Figure 17. Examples of trajectories with different ratings in a PickObject task in ALFRED. We use the prompt template from Table 7 to obtain ratings. The images shown were used to query the VLM, and the textual outputs are taken directly from the model's responses. + +# Gemini + +# Analyzing + +- Timestep 0 to 1 (RotateLeft): The agent rotates to the left, now facing the sink more directly. The tomato and potato are more centered in the view. +- Timestep 1 to 2 (RotateLeft): The agent rotates further left, now facing away from the sink and towards the cabinets. The sink is partially out of view. +- Timestep 2 to 3 (MoveAhead): The agent moves forward, closer to the cabinets. The sink is no longer visible. +- Timestep 3 to 4 (MoveAhead): The agent continues moving forward, still facing the cabinets. +- Timestep 4 to 5 (MoveAhead): The agent moves forward again, now close to the cabinets. +- Timestep 5 to 6 (RotateRight): The agent rotates right, now facing the sink and counter again. The knife is visible on the counter. +- Timestep 6 to 7 (LookDown): The agent looks down, bringing the knife closer to the bottom of the view. The sink is more visible. +- Timestep 7 to 8 (PickupObject): The agent picks up the knife. It is now large and at the bottom of the view. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad"] + +Task Instruction: "Open the fridge door, put the tomato inside of the fridge, close the door, open the door, take the tomato out, close the door." + +
+ +Timestop0 + +Time + +ep 1 + +Tin + +step1 + +三 + +3 + +top 4 + +T + +5 + +# + +6 + +Time + +7 + +step + +雪: + +step + +Tin + +ep 1 + +1 + +step + +1 + +00 + +12 + +# + +13 + +time + +p 24 + +1 + +# Prompt in Table 7 + +![](images/549cdb6a9c51fb583db7b1a096dc7f8d33e5f68531f6c181bb36004c80ea0ffc.jpg) + +# Gemini + +# Analyzing: + +- Timestep 0 to 1 (RotateRight): The robot rotates to the right, the view changes from the kitchen counter to the side of the fridge. +- Timestep 1 to 2 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 2 to 3 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 3 to 4 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 4 to 5 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 5 to 6 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 6 to 7 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 7 to 8 (MoveAhead): The robot moves forward, the view shows more of the fridge. +- Timestep 8 to 9 (RotateRight): The robot rotates to the right, the view changes to the front of the fridge. +- Timestep 9 to 10 (OpenObject): The robot opens the fridge door, the view shows the inside of the fridge. +- Timestep 10 to 11 (PutObject): The robot puts the tomato inside the fridge, the tomato is now on the top shelf of the fridge. +- Timestep 11 to 12 (CloseObject): The robot closes the fridge door, the view shows the front of the fridge. +- Timestep 12 to 13 (Object): The robot opens the fridge door, the view shows the inside of the fridge. +- Timestep 13 to 14 (PickupObject): The robot picks up the tomato, the tomato is now close to the bottom of the view. +- Timestep 14 to 15 (CloseObject): The robot closes the fridge door, the view shows the front of the fridge. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Average", "Good", "Good", "Average", "Good", "Good"] + +Task Instruction: "Open the fridge door, put the tomato inside of the fridge, close the door, open the door, take the tomato out, close the door." + +
+ +# Prompt in Table 7 + +![](images/ec7602fc00bf86e7b8c5b8e5a1ddedab6341b96271c23accd73c043a0098e4ef.jpg) + +# Gemini + +# Analyzing + +- Timestep 0 to 1 (RotateRight): The view rotates to the right, the tomato is stationary. +- Timestep 1 to 2 (MoveAhead): The view moves forward slightly, the tomato is stationary. +- Timestep 2 to 3 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 3 to 4 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 4 to 5 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 5 to 6 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 6 to 7 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 7 to 8 (MoveAhead): The view moves forward, the tomato is stationary. +- Timestep 8 to 9 (RotateRight): The view rotates to the right, the tomato is stationary. +- Timestep 9 to 10 (LookUp): The view looks up, the tomato is stationary. +- Timestep 10 to 11 (OpenObject): The fridge door opens, the tomato is stationary. +- Timestep 11 to 12 (PutObject): The tomato is placed inside the fridge. +- Timestep 12 to 13 (CloseObject): The fridge door is closed. +- Timestep 13 to 14 (OpenObject): The fridge door is opened. +- Timestep 14 to 15 (PickupObject): The tomato is picked up. +- Timestep 15 to 16 (CloseObject): The fridge door is closed. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Average", "Good", "Good", "Average", "Good", "Good"] + +Task Instruction: "Open the fridge door, put the tomato inside of the fridge, close the door, open the door, take the tomato out, close the door." + +![](images/f6e2b43870d07a05cdd261a22a7548093e35175359c2d7020ebdba93f2d84105.jpg) + +# Prompt in Table 7 + +![](images/2beb67f7057f8348ae1a721a59bcec078bafafd4ab622da2acc1606494753f31.jpg) + +# Gemini + +# Analyzing + +- Timestep 0 to 1 (RotateRight): The agent rotates to the right, the view changes from the counter with a mug, apple, golden statue, and bowl to a view facing the stove and fridge. +- Timestep 1 to 2 (MoveAhead): The agent moves closer to the stove and fridge. The mug is now closer to the camera. +- Timestep 2 to 3 (MoveAhead): The agent moves closer to the stove and fridge. The mug is even closer to the camera. +- Timestep 3 to 4 (RotateRight): The agent rotates right, now facing the sink. The mug is still held. +- Timestep 4 to 5 (LookDown): The agent looks down, providing a better view of the mug and the sink. +- Timestep 5 to 6 (LookUp): The agent looks up, providing a wider view of the sink area. +- Timestep 6 to 7 (PutObject): The agent places the mug in the sink +- Timestep 7 to 8 (ToggleObjectOn): The faucet is turned on, filling the sink with water. +- Timestep 8 to 9 (ToggleObjectOff): The faucet is turned off, the water stops filling the sink. +- Timestep 9 to 10 (PickupObject): The agent picks up the mug from the sink. It is now close to the bottom of the view. + +Rating: ["Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad", "Bad"] + +Figure 18. Examples of trajectories with different ratings in a CoolObject task in ALFRED. We use the prompt template from Table 7 to obtain ratings. The images shown were used to query the VLM, and the textual outputs are taken directly from the model's responses. + +![](images/ec32d08eeabb41b8f20e973344a4948943275c45caabff8dc8bba7abe0e0fd86.jpg) +t=0 +Sweep Into + +![](images/1588d7411b2e7b33f167f43b071873670919bbba4d813473c72431dd42a7852c.jpg) +t=5 + +![](images/65e70e7a587c2e36dcbaabe632ae59692d5470c6c4de3b5b4910a04895a141c1.jpg) +t=10 + +![](images/ef89921dec0a0320dbdd180837b1134ca823a033600e998687ef7c5fc2c0f860.jpg) +t=15 +Sweep Into + +![](images/9cbf98499895d117408e467635395ee734eb8c719f15d6fea0d220d216da4b2e.jpg) +t=20 + +![](images/f71c699e4c6f236ab36f57e9b7d0459dcd2a0874f1fd42d74e6fcc6ea0af6795.jpg) +t=25 + +![](images/70d03730880e6fd822cb0494841a0a1d5baa33f907f8883b0e39a06fbf55828a.jpg) +t=30 + +![](images/92c14babc98ecf9572f31e967cd55a9ac67eb90a956d6474345180625a034187.jpg) +t=35 + +![](images/153c2d7ccd279048770da252271b72666483a8a58d86b675b7a1bfe64b236b1c.jpg) + +![](images/816c7d53e09151ac71d0931a8342e4f19adc1569d4b270cd55e46d2f9c8b020a.jpg) + +![](images/1ee6e2ad26d298c143b4e74e177a1efbd57f0338aeb780f117a8b4ee3a676ecc.jpg) +Sweep Into + +![](images/c0f442c2533c4657650626a73223e4800dd3e5c8175c9a13a6b0ff4e158491dc.jpg) +t=15 + +![](images/ad06907fd48faaadadc575dbce2b23bd5338e173f36cb04cbcef76729290c607.jpg) +t=20 +Drawer Open + +![](images/f5f1ccbb48239643dec274e8ed7113729aeed749e8af492e17b3dec36582fbc1.jpg) +t=25 + +![](images/f76102e52292a2595a55f9c0d6f411f6e31fcabca19fe3fee33d9da74d9aec1b.jpg) +t=30 + +![](images/a2cfa682f5f9c4c6b05c69710544ac75f6a27a54949e2e0fdca8bf546a125b88.jpg) +t=35 +Drawer Open + +![](images/5a98c233c38be9142d5629a208888d105f26b79b89c82ec5788650f64c868e4f.jpg) +t=40 + +![](images/6fdfff169221bdcc93b31d5f948a1f067eebbd08186cd0df43fa06dfd8831845.jpg) +t=45 + +![](images/9c18e0d097f828e6fa77b331f0aacdfb73ee0d99f163ec5f116f7def0a995e64.jpg) +t=50 + +![](images/6ab1452a2c52f3b504f500d4f55cf006552f6f62252a73029a3a16bcdc9037de.jpg) +t=55 + +![](images/c308eca84b3d29df639e7e9859969af739c4beeaf48f9959e68d60483a2fd493.jpg) + +![](images/7d63c13db8bd04b3fa7dc02cfbb6e7e468f337d736cdf30f891cad83761b1e66.jpg) + +![](images/c1a8dd340f56956ea8e3c0dd52a09dd6358615d14e57467cb50556a73c6049f2.jpg) +Drawer Open + +![](images/4d02f435d5bd8f92fbbc23dd5695ed6f1dcf30a30ef27f2627597ac15838fadb.jpg) +t=0 + +![](images/085b3340bc683a34cbd8923d494b818bc4d5d795a0ff2ac3c4f888bed6be63e4.jpg) +t=5 + +![](images/9d11fd5e45596f7060b188ab138d198719e1912812599bbd22e48c639f3b8472.jpg) +t=10 + +![](images/8c7ad3baf52bb7c8b3fdca70cbc1eb3342570771f3ca0ae3a244173ac1ddb7e8.jpg) +t=15 + +![](images/2e8b81d2e67efb08884e9101cdf94e4f4f51656021ed60a07a04fed921b60bd6.jpg) +t=20 + +![](images/c30d8a2c2825ece4ddf42ec74d536751617c6ca89d82840f4e604f3d93a86be9.jpg) +t=25 + +![](images/04759d8937a6c91eaf9fbc4dca890d451afd523c1fcdcc5d0f11904bf4eb1c30.jpg) +t=30 + +![](images/7da2018cfe494e676973439a1afb54bc41bd0be06133e1c68d173352929281e2.jpg) +t=35 + +![](images/ce5291488205caeac1397f6a3042c29e484bea15da0bd95ad0be6bb9fd78b7da.jpg) +t=40 + +![](images/6006b808d76be41f1bbf4174a2143d0a9b0d297e7cf31f64a73cfef8305cf04f.jpg) +Soccer +Figure 19. Comparison of reward outputs from ERL-VLM, RL-VLM-F, and CLIP against ground-truth task progress in MetaWorld tasks. The ground-truth task progress is computed following (Wang et al., 2024a): for Sweep Into, it is measured as the negative distance between the cube and the hole; for Printer Open, as the distance the drawer has been pulled out; and for Soccer, as the negative distance between the soccer ball and the goal. We normalize both the reward values and ground-truth task progress into the range of [0, 1] for a better comparison between them. The learned rewards are averaged over three runs, with shaded regions indicating standard deviation. Images are rendered at corresponding timesteps from the expert trajectories. + +![](images/cdec79723e96c79fc2120385859988344cc4317880a3b44725738428f69621cf.jpg) +Soccer + +![](images/835a5513d004452e6619f7d06655b599f0bd1b8321fe06328cafc5884f4ec617.jpg) +Soccer + +![](images/18221a2e93893b34e0e45b3bebf5eced28b7b4e39f7f2f80cfaf09b07221fa89.jpg) +PickupObject: "Pick up the mug in the coffee maker" + +![](images/ab1c11f2f015fba0d97f19eef6d257a2f529c98084dc657907c002fe891330aa.jpg) + +![](images/f222b3da4910d227dcb75789d2c17cf05c578776829275f28c8ec6dcd1ed36aa.jpg) + +![](images/4fc3227422ab193b197f6cf00f6dd01c3da5b1ffa847bc44a106747127d59ff5.jpg) + +![](images/f93b5ecb319917ee4292555b8cc49f33c0c205ccef220373c44bc9930c23dff6.jpg) +PutObject: "Put the knife in the green cup in the sink" + +![](images/dce95045b6a74c85c5afa2ddeeb2b3caa2b5110588ec6374bda36fd9bafb0cf3.jpg) + +![](images/7799e98511ddb465a521047c31b1fae6b268196ff15fcabbddc24a57faa45e5c.jpg) + +![](images/34186a4867b03833f32a4cf61d74de241ec37456154bbf44216ff1b5e5a84678.jpg) + +![](images/f8d64baed01813fc7433ff35bb04139ed3c1e42ca6c4cc5b1eb91e1f85c13787.jpg) +CoolObject: "Open the fridge, put the cup in the fridge, close the fridge, wait, open the fridge, pick the cup, close the fridge" + +![](images/563a90ba7605b45c9998819e3dcc6d003e15b5364855d6e1e4c22ca45e7dfeca.jpg) + +![](images/e1d6406a8984079051a01b32ee2ab7988bcaa84798cb3f26bd758261b7e58975.jpg) + +![](images/e3b96101d15d5cda2741c59fcdb3d0cebf3b82bf14e3fa8321963ecbd906389a.jpg) + +![](images/29c41a816b0dedca80312f94f1c94277d50294b0254519a3e7ba4261818b59a6.jpg) +CleanObject: "Put the coffee cup in the sink, turn on the water, turn off the water and pick up the coffee cup" + +![](images/9e034b070f1753f176c9a31736a05e5054b7cdb7574cfe0ce7103c51cde56f28.jpg) +Figure 20. Comparison of reward outputs from ERL-VLM, RL-VLM-F, and CLIP across four ALFRED tasks along expert trajectories. Ground-truth task progress is omitted as it is not available in ALFRED. We normalize the reward values into the range of [0, 1] for a better comparison. Images are rendered at corresponding timesteps from the expert trajectories. + +![](images/286d4d2b5d738b22c77f05d692863587bf1fe80c7741a1ddbb238b8c276a6117.jpg) + +![](images/07b370e9081d5089b2a8f1d6bf6087d59484be441954d4a7fc8a69af4729f7e7.jpg) \ No newline at end of file diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/images.zip b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..edd28c56efd85dedc3e1522cc3c366d77a48e89b --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74fcd982286140d905aac2b434b876eb18357d355011b2bf8ac3bfba89eb1392 +size 2162802 diff --git a/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/layout.json b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6329f049986bca7bebb569d8be879da4ba47af2b --- /dev/null +++ b/ICML/2025/Enhancing Rating-Based Reinforcement Learning to Effectively Leverage Feedback from Large Vision-Language Models/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93a6e3b9c7bf1aa221683c3bf106018872a47fbc596171d5ec2ac3fefe4a6f37 +size 1364035 diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_content_list.json b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4f6c21b2a03d9df80f0aed145ab5bf879b0cef7f --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f8cb86e925d0fa2114ee8b854f70afe72dcb396bbb85f978e1140d844936ce6 +size 165192 diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_model.json b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8d15e15b6f4760f7860e3d8f81596eb898237d03 --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c406af609c135afbbecde952c60e6e0899376b37fea8b80f91d4b0f04b9e515 +size 196811 diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_origin.pdf b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8193a396532daabdcc9948c96c94bec0f2458f7d --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/583976fc-6544-4b04-9ba8-6c89b626857f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5344b01d5dc2313955acea28b11922db6c42456d8e76dc3e0966049a72b0d7eb +size 9657588 diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/full.md b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/full.md new file mode 100644 index 0000000000000000000000000000000000000000..166d6caf8f804f2056ca831a3e9e7e35dcff1e09 --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/full.md @@ -0,0 +1,753 @@ +# Enhancing Spectral GNNs: From Topology and Perturbation Perspectives + +Taoyang Qin1 Ke-Jia CHEN1,2 Zheng Liu1 + +# Abstract + +Spectral Graph Neural Networks process graph signals using the spectral properties of the normalized graph Laplacian matrix. However, the frequent occurrence of repeated eigenvalues limits the expressiveness of spectral GNNs. To address this, we propose a higher-dimensional sheaf Laplacian matrix, which not only encodes the graph's topological information but also increases the upper bound on the number of distinct eigenvalues. The sheaf Laplacian matrix is derived from carefully designed perturbations of the block form of the normalized graph Laplacian, yielding a perturbed sheaf Laplacian (PSL) matrix with more distinct eigenvalues. We provide a theoretical analysis of the expressiveness of spectral GNNs equipped with the PSL and establish perturbation bounds for the eigenvalues. Extensive experiments on benchmark datasets for node classification demonstrate that incorporating the perturbed sheaf Laplacian enhances the performance of spectral GNNs. + +# 1. Introduction + +Both spatial and spectral Graph Neural Networks (GNNs) have shown outstanding performance in various graph tasks (Kipf & Welling, 2017; Gilmer et al., 2017; Huang et al., 2023; Jin et al., 2024). Unlike spatial GNNs, spectral GNNs conduct frequency-domain convolution on normalized Laplacian matrices of graphs. However, in most graph datasets, the multiplicity of eigenvalues of the normalized graph Laplacian matrices is not small. The repeated eigenvalues limit the expressive power of spectral GNNs, resulting in a deteriorated performance (Wang & Zhang, 2022; Lu et al., 2024). + +$^{1}$ School of Computer Science, Nanjing University of Posts and Telecommunications, Nanjing, China $^{2}$ Jiangsu Key Laboratory of Big Data Security & Intelligent Processing, Nanjing, China. Correspondence to: Ke-Jia CHEN , Zheng Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/820f71eb6480327264e6f9b857561e626166ddfdc24e7d8ed7948703244a2678.jpg) +Figure 1. The perturbed sheaf Laplacian $\overline{\mathcal{L}_{\mathcal{F}}}$ can be viewed as a special perturbation of $\mathcal{L}_{block}$ ( $\mathcal{L}$ is the normalized graph Laplacian, $\otimes$ denotes the Kronecker product, $I$ is the $d \times d$ identity matrix, and all restriction maps are orthogonal). Specifically, for each $(v,z) \in E$ , if $Q_{vz}$ slightly deviates from the identity $I$ while satisfying the sheaf Laplacian constraints, the resulting matrix is both a valid normalized sheaf Laplacian and a perturbed version of $\mathcal{L}_{block}$ . + +Wang and Zhang (Wang & Zhang, 2022) highlight the issue of repeated eigenvalues and propose an orthogonal Jacobi basis approach in which each prediction dimension has a flexible filter design. However, the individual filter design does not fully resolve the performance degeneracy caused by different eigenvectors sharing the same eigenvalue. Lu et al. (Lu et al., 2024) tackle the issue by adding a diagonal matrix of uniformly sampled eigenvalues to the normalized Laplacian matrix. The polynomial filters integrated with the corrected eigenvalues yield improved node classification results. Although this method helps mitigate repeated eigenvalues, it also compromises the original topological information encoded in the normalized Laplacian matrix by reducing the operator's spectral gap, which reflects graph's connectivity and information flow (see Appendix F.2). + +Besides the above issues, both works focus only on linear settings, leaving the impact of nonlinear activation function unexplored. + +We focus on the challenge of repeated eigenvalues in a nonlinear context. We propose to utilize a higher dimensional sheaf Laplacian matrix, which guarantees a higher upper bound on the number of distinct eigenvalues (Hansen & Ghrist, 2018; Hansen, 2020). Specifically, we normalize the sheaf Laplacian matrix by applying perturbation on the block form of the normalized graph Laplacian matrix. The designed perturbation of the identity matrix serves as the restriction map, which increases the diversity of eigenvalue + +while retaining the topological information of the normalized Laplacian matrix (as shown in Figure 1). To summarize, our contributions are as follows: + +- We propose a perturbed sheaf Laplacian (PSL) matrix which has more distinct eigenvalues by carefully designing the perturbation on the basis of perturbation theory. +- We achieve optimal model performance by applying the PSL matrix on popular spectral GNNs architectures and optimizing the perturbation process. +- We theoretically analyze the expressiveness of the PSL-based GNNs, and characterize the impact of the perturbations by establishing the perturbation bounds for the eigenvalues. + +Experiments on benchmark datasets demonstrate the superiority of PSL-based spectral GNNs. The increased number of distinct eigenvalues of the learned perturbed sheaf Laplacian matrices validates the effectiveness of the proposed perturbation method. + +# 2. Preliminaries + +This section provides a brief introduction to spectral GNNs and highlights the key aspects of the theory of cellular sheaves. All important notations are given in Appendix A. + +# 2.1. Spectral Graph Neural Networks + +Spectral GNNs build on spectral graph theory (Chung, 1997), which applies the graph Fourier transform to define frequency-domain convolutions. For a graph $G = (V,E)$ with $n$ nodes, the normalized Laplacian is $\mathcal{L} = I - D^{-\frac{1}{2}}AD^{-\frac{1}{2}}$ . Its eigendecomposition is $\mathcal{L} = U\Lambda U^T$ , where $\Lambda$ is diagonal and $U$ holds the eigenvectors. The graph Fourier transform of a signal $X \in \mathbb{R}^{n \cdot f}$ is $\hat{X} = U^T X$ , with each row of $\hat{X}$ representing a distinct frequency component. The output $Z$ of a spectral convolution can be expressed as: + +$$ +Z = \mathbf {g} * _ {G} X = U \left(\left(U ^ {T} \mathbf {g}\right) \odot \left(U ^ {T} X\right)\right) = U \hat {G} U ^ {T} X \tag {1} +$$ + +where $\mathbf{g}$ is the spatial kernel, and $\hat{G} = \mathrm{diag}(\hat{\mathbf{g}}_1,\dots ,\hat{\mathbf{g}}_n)$ denotes the spectral kernel coefficients. For spectral GNNs, a polynomial function is commonly used to approximate different kernels, which can be expressed as follows: + +$$ +\begin{array}{l} Z = \varphi (U g (\Lambda) U ^ {T} X W) \\ = \varphi (U \left(\sum_ {k = 0} ^ {K} \alpha_ {k} \Lambda^ {k}\right) U ^ {T} X W) \tag {2} \\ = \varphi (\sum_ {k = 0} ^ {K} \alpha_ {k} \mathcal {L} ^ {k} X W), \\ \end{array} +$$ + +where $g$ is the filter function, $W$ is a learnable weight matrix, $\alpha_{k}$ is a trainable coefficient for the $k$ -th order polynomial approximation, and $\varphi$ is a function like multi-layer perceptrons (MLPs). + +Note that, if $\varphi$ is a linear function, spectral GNNs are termed linear spectral GNNs; if $\varphi$ is a nonlinear function, they are termed nonlinear spectral GNNs. + +# 2.2. Theory of Cellular Sheaves + +The theory of cellular sheaves, rooted in algebraic topology, has been incorporated into GNNs to additionally augment the graph's topological structure and thereby improve the performance of GNNs (Bodnar et al., 2022; Duta et al., 2023a). + +Definition 2.1. A cellular sheaf $(G,\mathcal{F})$ over an undirected graph $G = (V,E)$ consists of: + +- A vector space $\mathcal{F}(v)$ associated with each node $v \in V$ . +- A vector space $\mathcal{F}(e)$ associated with each edge $e\in E$ +- A linear map $\mathcal{F}_{v\leq e}$ for each incident node-edge pair $v\leq e$ , mapping vectors from $\mathcal{F}(v)$ to $\mathcal{F}(e)$ + +Here, the vector spaces for nodes and edges are termed stalks, and the linear maps between them are termed restriction maps. We set all the stalks to be $\mathbb{R}^d$ and confine all restriction maps to orthogonal mappings. The restriction map $\mathcal{F}_{v\leq e}:\mathcal{F}(v)\to \mathcal{F}(e)$ maps vectors from node stalk to edge stalk and $\mathcal{F}_{v\leq e}^{\top}:\mathcal{F}(e)\to \mathcal{F}(v)$ maps vectors from edge stalk to node stalk. It follows that $\mathcal{F}_{u\leq (v,u)}^{\top}\mathcal{F}_{v\leq (v,u)}$ maps vectors from $\mathcal{F}(v)$ to $\mathcal{F}(u)$ , where $(v,u)\in E$ . + +Definition 2.2. The sheaf Laplacian matrix of a sheaf over an undirected graph $G = (V,E)$ is a block matrix $\mathcal{L}_{\mathcal{F}}$ . The diagonal blocks are $\mathcal{L}_{\mathcal{F},vv} = \sum_{v\leq e}\mathcal{F}_{v\leq e}^{\top}\mathcal{F}_{v\leq e}$ , while the non-diagonal blocks are $\mathcal{L}_{\mathcal{F},vu} = -\mathcal{F}_{v\leq e}^{\top}\mathcal{F}_{u\leq e}$ , where $(v,u)\in E$ . + +The sheaf Laplacian matrix is positive semidefinite, which means that the eigenvalues are non-negative (Hansen, 2020; Bodnar et al., 2022). Additionally, when all the restriction maps are identity maps, the sheaf Laplacian matrix degenerates into the block form of the graph Laplacian matrix. + +Definition 2.3. The normalized form of the sheaf Laplacian matrix is given by $\overline{\mathcal{L}_{\mathcal{F}}} = D^{-\frac{1}{2}}\mathcal{L}_{\mathcal{F}}D^{-\frac{1}{2}}$ , where $D_v = \mathcal{L}_{\mathcal{F},vv}$ and the diagonal matrix of the sheaf Laplacian matrix is $D = \mathrm{diag}(D_1, \ldots, D_n)$ . + +In the following, we will refer to the normalized sheaf Laplacian matrix simply as the sheaf Laplacian. + +![](images/c2c04f04726583c0214c6edce2e0e6baabd61892b1743e947653038ad4038643.jpg) +(a) Limited predictive ability. + +![](images/07b3488a581aef0f0fa1899bdeadf99e019e570e33cabf6d14bc9be95232eecc.jpg) +(b) Loss of frequency components. +Figure 2. $X$ is the graph data, and $\hat{X}_{\lambda}$ its Fourier-transformed matrix. $g$ is the filter function. (a) Because the graph has only two distinct nonzero eigenvalues, each element in $Z$ is a linear combination of just two types of frequency components, thereby limiting the expressive power of spectral GNNs. (b) Poorly designed filter functions can lead to the loss of frequency components, thereby limiting the expressive power of spectral GNNs. + +# 3. Motivation + +In this section, we summarize and extend the discussion of repeated eigenvalue issues as presented by Wang and Zhang (Wang & Zhang, 2022) and Lu et al. (Lu et al., 2024), which contribute to the motivation for our work. + +# 3.1. Limited Predictive Ability + +The phenomenon of repeated eigenvalues limits the predictive ability of spectral GNNs, thus affecting their expressive power (as shown in Figure 2 (a)). Firstly, we use a lemma to describe this issue. + +Lemma 3.1. When there are only $k$ distinct eigenvalues of the normalized Laplacian matrix, linear spectral GNNs can produce at most $k$ different filter coefficients, and thus can only generate one-dimensional predictions with a maximum of $k$ arbitrary elements. + +The proof of this lemma can be found in Appendix A.1 of Lu et al. (Lu et al., 2024). This lemma reveals a key problem: the predictive ability of linear Spectral GNNs is limited by the number of distinct eigenvalues of the normalized graph Laplacian matrix. + +In this paper, we extend the lemma to the case of nonlinear spectral GNNs which use an activation function (Rosenblatt, 1958; Nair & Hinton, 2010; Goodfellow et al., 2016). + +Theorem 3.2. When there are only $k$ distinct eigenvalues of the normalized Laplacian matrix, and the nonlinear real-valued function $\sigma$ satisfies $\sigma(x) \neq 0$ for $x \neq 0$ , nonlinear spectral GNNs can produce at most $k$ different filter coefficients, and thus can only generate one-dimensional predictions with a maximum of $k$ arbitrary elements. + +Theorem 3.2 shows that, even with real-valued activation functions such as tanh and sigmoid, the predictive ability of nonlinear spectral GNNs remains equivalent to that of linear spectral GNNs, both of which are similarly limited. This limitation arises from the issue of repeated eigenval- + +ues of the normalized graph Laplacian matrix. The proof is in Appendix B. + +# 3.2. Loss of Frequency Components + +Another issue caused by repeated eigenvalues is that if the filter function $g(\lambda)$ is poorly designed, setting a specific eigenvalue to zero can lead to the disappearance of corresponding frequency components (As shown in Figure 2 (b)). + +Interestingly, for many commonly used graph datasets, the eigenvalue 1 of the corresponding normalized graph Laplacian matrix has the highest multiplicity (see Appendix F.5 for details). This observation may also provide a new perspective on why adding self-loops to the adjacency matrix leads to better GCN performance on certain datasets (Kipf & Welling, 2017; Wu et al., 2019). Given that the filter function of GCN is $1 - \lambda$ , it filters out all frequency components associated with the eigenvalue 1. By introducing self-loops, the distribution of eigenvalues is altered, thereby causing GCN to lose fewer frequency components. + +# 3.3. Restricted Frequency Processing Capability + +The phenomenon of repeated eigenvalues also restricts the frequency processing capability of spectral GNNs. Consider $\hat{X} = U^T X W$ , where $g(\Lambda)$ represents the filtering function, with $\Lambda$ being the eigenvalue matrix of the normalized Laplacian. Evidently, $g(\Lambda) \hat{X}$ is equivalent to $g(\lambda_i) \odot \hat{X}_i$ , where $g(\lambda_i)$ scales each $\hat{X}_i$ element-by-element. Thus, for identical eigenvalues $\lambda_i = \lambda_j$ , the associated frequency components $\hat{X}_i$ and $\hat{X}_j$ are scaled by the same factor, which limits the expressiveness of the spectral GNNs. + +# 3.4. Why Perturbed Sheaf Laplacian + +The solution to the above issues is to construct a Laplacian matrix with more distinct eigenvalues. The sheaf Lapla + +![](images/8b25e717e5b1e0e3de9b3c78aeae5fa38c9cc2b3b3ebbb25710d56031479d069.jpg) +Figure 3. Model workflow: The convert operation initially reduces feature dimensionality and reshapes the input to $X \in \mathbb{R}^{nd \times k}$ . The $l$ -th aggregation step, $\mathrm{avg}^{(l)}$ , is performed as $\mathrm{Combine}(\overline{\mathcal{L}_{\mathcal{F}}}^{(l)}, X^{(l)}, W^{(l)})$ . After final aggregation, and the convert operation means reshaping the output back to $n$ rows of $d \times k$ columns, followed by a linear transformation to yield $Z$ with columns equal to the number of node classes. + +cian is from the theory of cellular sheaves. When applied to graphs, the sheaf Laplacian naturally provides a larger set of eigenvalues while maintaining a positive semidefinite nature and the eigenvalue range in [0, 2] (Hansen, 2020). + +We carefully design the restriction map as a slight perturbation of the identity matrix in order to construct a sheaf Laplacian with more distinct eigenvalues. We call it the perturbed sheaf Laplacian (PSL). The perturbed sheaf Laplacian matrix achieves two advantages: (1) By aligning with perturbation theory, the PSL matrix increases the eigenvalue diversity; (2) the PSL matrix is structurally close to the normalized graph Laplacian matrix, retaining its topological information. + +# 4. Method + +This section introduces the proposed PSL-GNN model (with its general workflow illustrated in Figure 3). The complexity of our method is illustrated in Appendix F.1. + +# 4.1. Preprocessing of Graph Data + +To make the first dimension of the input matrix $X_0 \in \mathbb{R}^{n \times f_1}$ compatible with the second dimension of the sheaf Laplacian matrix $\overline{\mathcal{L}_{\mathcal{F}}} \in \mathbb{R}^{nd \times nd}$ , we first apply a linear projection: + +$$ +X _ {0} W _ {1} \in \mathbb {R} ^ {n \times d f _ {3}}, \tag {3} +$$ + +where $W_{1}\in \mathbb{R}^{f_{1}\times f_{2}}$ with $f_{2} = d\times f_{3}$ . Next, we reshape the resulting matrix: + +$$ +X = \mathcal {R} \left(X _ {0} W _ {1}, \mathbb {R} ^ {n d \times f _ {3}}\right), \tag {4} +$$ + +where $\mathcal{R}(X_0W_1,\mathbb{R}^{nd\times f_3})$ represents reshaping $X_0W_1$ into a matrix with nd rows and $f_{3}$ columns. + +# 4.2. Construction of Perturbed Sheaf Laplacian + +When there exists a restriction map that is not an identity map, $\overline{\mathcal{L}_{\mathcal{F}}}$ can be viewed as the result of a special perturbation applied to the block form of the normalized graph Laplacian matrix $\mathcal{L}_{\mathrm{block}}$ . For each block element $\mathcal{L}_{\mathrm{block},ij}$ , the corresponding perturbation matrix $Q_{ij} = \mathcal{F}_{i\triangleleft e}^{\top}\mathcal{F}_{j\triangleleft e}$ is applied, resulting in $\overline{\mathcal{L}_{\mathcal{F}}}$ . According to Section 3.4, when $\mathcal{F}_{i\triangleleft e}^{\top}\mathcal{F}_{j\triangleleft e}$ slightly deviates from the identity matrix, the corresponding sheaf Laplacian matrix is regarded as a perturbed sheaf Laplacian matrix. + +Based on this, $Q_{ij}$ can be viewed as a perturbation applied to $L_{\mathrm{block},ij}$ . To ensure that the overall perturbation effect increases the number of distinct eigenvalues of $\overline{\mathcal{L}_{\mathcal{F}}}$ , we propose the following theorem to guide the perturbations. + +Theorem 4.1. Let $P = \overline{\mathcal{L}_{\mathcal{F}}} - \mathcal{L}_{block}$ be the perturbation matrix applied to $\mathcal{L}_{block}$ , and let $\phi = \min_{i,j; i \neq j} |\lambda_i - \lambda_j|$ where $\lambda_i$ are the eigenvalues of $\mathcal{L}_{block}$ . If $\| P \|_2 < \frac{\phi}{2}$ , then the multiplicity of eigenvalues of $\mathcal{L}_{\mathcal{F}}$ will decrease. + +The proof is in Appendix B. According to Theorem 4.1, to reduce the multiplicity of eigenvalues, the orthogonal matrices of different blocks should be restricted to slightly deviate from the identity matrices. Considering that the reflection matrix can deviate from the identity matrix to varying extents by adjusting the reflection vector, we constrain every restriction map to the reflection matrix. Specifically, we assign every restriction map to $\mathcal{F}_{i\leq (i,j)} = I - 2\frac{\mathbf{u}_{ij}\mathbf{u}_{ij}^{\top}}{\|\mathbf{u}_{ij}\|^{2}}$ where $\mathbf{u}_{ij}$ is a vector of dimensions $d$ ( $d$ represents the dimension of the stalks). Here, $\mathbf{u}_{ij}$ is parameterized and learnable, allowing $Q_{ij}$ to deviate from the identity matrix. To ensure that the applied perturbations remain minimal, we constrain each component of $\mathbf{u}_{ij}$ within $[\frac{\eta}{10},\eta ]$ for the reflection matrix, where $\eta$ is a sufficiently small value. + +# 4.3. PSL-GNN: Perturbed Sheaf Laplacian-Based Graph Neural Network + +The proposed perturbed sheaf Laplacian matrix can be integrated with any spectral GNNs. In this section, we apply it within the GCN (Kipf & Welling, 2017) and GPRGNN (Chien et al., 2021) respectively as examples. + +# 4.3.1.PSL-GCN + +The architecture of GCN is often represented as: + +$$ +X _ {0} ^ {(l + 1)} = \sigma ((I - \Delta) X _ {0} ^ {(l)} W), \tag {5} +$$ + +where $\Delta$ represents the normalized graph Laplacian matrix, $l$ denotes the layer index, and $X^{(l)}$ represents the feature matrix at layer $l$ . Through integration, we obtain PSL-GCN, which can be expressed as follows: + +$$ +X ^ {(l + 1)} = \sigma \left(\left(I - \Delta_ {\mathcal {F}}\right) X ^ {(l)} W _ {2}\right), \tag {6} +$$ + +where $X^{(l + 1)}\in \mathbb{R}^{nd\times f_4}$ and $X^{(l)}\in \mathbb{R}^{nd\times f_3}$ . $\Delta_{\mathcal{F}}\in$ $\mathbb{R}^{nd\times nd}$ is the PSL matrix, and $W_{2}\in \mathbb{R}^{f_{3}\times f_{4}}$ is the parameter matrix used for linear transformations within the network. + +We need to reshape the output of the last layer and perform a series of transformations such as $W_{last} \in \mathbb{R}^{df_{last} \times c}$ and $\mathcal{R}$ to obtain the final prediction matrix $Z$ : + +$$ +Z = \mathcal {R} \left(X ^ {(l a s t)}, \mathbb {R} ^ {n \times d f _ {l a s t}}\right) W _ {l a s t}. \tag {7} +$$ + +# 4.3.2. PSL-GPR + +The structure of GPRGNN is represented as follows: + +$$ +Z = \sum_ {k = 0} ^ {K} \alpha_ {k} (I - \mathcal {L}) ^ {k} X _ {0}, \tag {8} +$$ + +where $X_0 \in \mathbb{R}^{n \times f_1}$ represents the feature matrix, and $\mathcal{L}$ represents the normalized graph Laplacian matrix. According to Equation (4), we have the converted feature matrix $X \in \mathbb{R}^{nd \times f_3}$ . Following the architecture of GPRGNN, our model, namely PSL-GPR, is expressed as: + +$$ +Y = \sum_ {k = 0} ^ {K} \alpha_ {k} \left(I - \overline {{\mathcal {L} _ {\mathcal {F}}}}\right) ^ {k} X. \tag {9} +$$ + +In this equation, $Y \in \mathbb{R}^{nd \times f_3}$ represents the output feature matrix, $I \in \mathbb{R}^{nd \times nd}$ is the identity matrix, $\overline{\mathcal{L}_{\mathcal{F}}} \in \mathbb{R}^{nd \times nd}$ is the PSL matrix, $K$ is the order of the polynomial, and $\alpha_k$ are the trainable coefficients. + +We reshape $Y$ into $\mathbb{R}^{n \times df_3}$ and apply a linear transformation with $W_3 \in \mathbb{R}^{df_3 \times c}$ to obtain the final prediction matrix $Z \in \mathbb{R}^{n \times c}$ , where $c$ represents the number of classes. This process can be expressed as: + +$$ +Z = \mathcal {R} (Y, \mathbb {R} ^ {n \times d f _ {3}}) W _ {3}. \tag {10} +$$ + +# 5. Theoretical Analysis + +In this section, we conduct a theoretical analysis of the expressive power of PSL-GNN and establish the perturbation bounds of the eigenvalues. All proofs are in Appendix C and Appendix D. + +# 5.1. Expressiveness of PSL-GNN + +We first discuss the expressive power of the block matrix form $\mathcal{L}_{\mathrm{block}}$ of the normalized graph Laplacian matrix $\mathcal{L}$ . + +Proposition 5.1. The number of distinct eigenvalues of $\mathcal{L}_{block} \in \mathbb{R}^{nd \times nd}$ is the same as that of $\mathcal{L} \in \mathbb{R}^{n \times n}$ , where $\mathcal{L}$ is the normalized graph Laplacian matrix and $\mathcal{L}_{block} = \mathcal{L} \otimes I$ , with $I \in \mathbb{R}^{d \times d}$ being the identity matrix. Also, their corresponding GNNs, which share the same architecture, are mutually equivalent. + +Proposition 5.1 indicates that when the applied orthogonal matrices are the identity matrices, PSL-GNN is equivalent to the corresponding GNN. + +Corollary 5.2. PSL-GNN has stronger one-dimensional prediction ability. + +For a given normalized graph Laplacian matrix, its PSL possesses a greater number of distinct eigenvalues, which underpins its enhanced predictive ability. + +Corollary 5.3. PSL-GNN loses fewer frequency components. + +With fewer repeated eigenvalues than the normalized Laplacian, PSL-GNN remains robust even if high-multiplicity frequency components are discarded. + +Corollary 5.4. PSL-GNN has a stronger capability in processing frequency components. + +The PSL possesses a greater number of distinct eigenvalues, allowing a more diverse treatment of frequency components. + +# 5.2. Perturbation Bounds of Eigenvalues + +We establish the perturbation bounds for the eigenvalues based on perturbation theory (Weyl, 1912; Dailey et al., 2014). + +Theorem 5.5. Let $\mathcal{L}_{\text{block}}$ and $\mathcal{L}_{\mathcal{F}} = \mathcal{L}_{\text{block}} + P$ be $N \times N$ symmetric positive semidefinite matrices, with eigenvalues $\lambda_1, \ldots, \lambda_N$ and $\tilde{\lambda}_1, \ldots, \tilde{\lambda}_N$ , respectively, where $\mathcal{L}_{\text{block}}$ is diagonally dominant. Suppose the perturbation matrix $P$ satisfies $|P_{ij}| \leq \epsilon |(L_{\text{block}})_{ij}|$ for all $i \neq j$ for all $i$ , where $0 < \epsilon < \frac{1}{2}$ . Hence, for each $i$ , $|\tilde{\lambda}_i - \lambda_i| \leq \frac{2\epsilon}{1 - 2\epsilon} \tilde{\lambda}_{\max}$ . + +As the size of the perturbation $\eta$ decreases, the corresponding $\epsilon$ also decreases, resulting in a smaller range of eigenvalue perturbations. + +# 6. Experiment + +In this section, we give the results of the performance comparison between PSL-GNN and GNN baselines on the node classification task. Besides, we validate the effectiveness of the proposed perturbed sheaf Laplacian matrix through ablation studies. We also perform a statistical analysis of the independent eigenvalues of the final learned perturbed sheaf Laplacian matrices. The experimental setup is in Appendix E. Additional experimental studies can be found in Appendix F. + +# 6.1. Evaluation on Real-World Datasets + +We conduct experiments on 7 benchmark graph datasets (all information about the datasets is summarized in Appendix E.2.), and the results are presented in Table 1. We evaluate the accuracy of the PSL-GNNs by comparing them with their corresponding GNN models. We also calculate the vertical average gain (VAG) of the perturbed sheaf Laplacian matrix for all models on each dataset. The formula for VAG is given as follows: + +$$ +V A G = \frac {1}{| \mathcal {M} |} \sum_ {m _ {i} \in \mathcal {M}} \left(\operatorname {A C C} \left(m _ {i} (\mathcal {F})\right) - \operatorname {A C C} \left(m _ {i} (G)\right)\right), \tag {11} +$$ + +where $\mathcal{M}$ is the set of GNN models, ACC is the short form of accuracy, $G$ is the original graph, and $\mathcal{F}$ is a sheaf over the graph. We also calculate the horizontal average gain (HAG) of the perturbed sheaf Laplacian matrix for all datasets on each model. The formula for HAG is given as follows: + +$$ +H A G = \frac {1}{| \mathcal {D} |} \sum_ {d _ {i} \in \mathcal {D}} \left(\operatorname {A C C} \left(d _ {i} (\mathcal {F})\right) - \operatorname {A C C} \left(d _ {i} (G)\right)\right), \tag {12} +$$ + +where $\mathcal{D}$ is the set of used datasets. + +By analyzing the results in Table 1, we have the following observations: (1) All models are enhanced by the perturbed sheaf Laplacian matrices. This improvement can be attributed to the fact that the perturbed sheaf Laplacian matrices have more distinct eigenvalues. Consequently, the PSL-GNNs have a stronger capability to handle various frequency components, thereby improving their performance in the node classification task; (2) For Texas and Cornell, which are characterized by a relatively small number of nodes, the performance improvement is particularly significant. The observed phenomenon can be attributed to the inherently lower structural stability of smaller graphs, which makes them more sensitive to perturbations. This heightened sensitivity facilitates the splitting of eigenvalues into distinct values, thereby significantly increasing the number of distinct eigenvalues; (3) The GCN shows the highest average gain compared to other baselines. This can be explained from the perspective of suppressing the loss + +of frequency components: Unlike the variable filter functions in other baselines, the GCN filter function is fixed, i.e., $g(\lambda) = 1 - \lambda$ , where $\lambda$ represents the eigenvalue of the normalized graph Laplacian matrix. The multiplicity of $\lambda = 1$ is relatively high (see Figure 5 for details), which leads to a significant loss of frequency components corresponding to $\lambda = 1$ , thereby severely affecting the expressive power of spectral GNNs. In contrast, the perturbed sheaf Laplacian can reduce the multiplicity of $\lambda = 1$ , resulting in a higher average gain. + +# 6.2. Ablation Study + +To further study the effectiveness of the perturbed sheaf Laplacian matrix, we compare it with both the general sheaf Laplacian matrix (GSL) (Bodnar et al., 2022) and the normalized graph Laplacian matrix. + +The construction of the GSL involves using $\frac{d(d - 1)}{2}$ parameters to generate each restriction map $\mathcal{F}_{v\leq e}$ . Besides, each parameter is no longer constrained by $\eta$ . Based on the above setup, the restriction maps are allowed to fully explore the orthogonal group. For the construction of normalized graph Laplacian matrix, we set $\eta = 0$ , which means no perturbation is applied. Consequently, the perturbed sheaf Laplacian matrix degenerates into the block matrix form of the normalized graph Laplacian matrix. We integrate these three types of Laplacian into vanilla GNN, creating PSL-GNN, GSL-GNN, GNN (vanilla). Subsequently, we compare their performance on node classification. All models share the same parameters, except $\eta$ , which is tuned for PSL-GPR and PSL-GCN ( $\{1e - 1, 1e - 2, 1e - 3, 1e - 4\}$ ) and set to 0 for GPR-GNN and GCN. This ensures fair and reliable comparisons. + +We conduct multiple training runs and averaged various metrics to obtain the reliable results in Table 2. The results demonstrate that: (1) GSL-GNN outperforms vanilla GNN, probably because the general sheaf Laplacian generalizes the graph Laplacian, offering greater learnability and flexibility for downstream tasks; (2) The performance of PSL-GNN is comparable to that of GSL-GNN. It indicates that the structure learned by the general sheaf Laplacian might align closely with that learned by the perturbed sheaf Laplacian. + +# 6.3. The Number of Distinct Eigenvalues + +We measure the number of distinct eigenvalues for both the normalized graph Laplacian matrix and the final learned perturbed sheaf Laplacian matrix when $\eta \geq 1\mathrm{e} - 3$ , respectively. In Table 3, $N_{G}$ denotes the number of distinct eigenvalues of the normalized graph Laplacian matrix, while the other entries represent the number of distinct eigenvalues of the learned perturbed sheaf Laplacian matrix. As the + +Table 1. Experimental results on node classification task: mean accuracy $(\%)\pm 95\%$ confidence interval. + +
DatasetsCoraPubmedCiteseerPhotoCornellTexasActorHAG
GCN86.62±1.0686.51±0.4775.32±1.9187.52±0.5875.32±1.9878.12±1.8734.23±1.541.93↑
PSL-GCN88.09±1.7588.21±2.4376.75±2.3290.12±0.9077.89±2.4580.45±2.2135.67±1.83
APPNP88.11±1.3587.39±0.8876.34±1.7190.23±0.5078.56±2.0180.12±1.8334.89±1.731.05↑
PSL-APPNP89.03±1.7988.23±2.3976.92±2.3690.58±0.9479.89±2.3782.34±2.1936.01±2.11
Graph-Heat86.85±1.2987.12±1.6974.75±2.4489.32±0.7475.78±1.8879.45±1.7234.01±1.621.22↑
PSL-Heat87.38±1.7588.74±2.4276.72±2.5289.43±0.9377.34±2.2980.67±2.1435.56±1.94
BernNet88.29±0.6388.50±1.1976.78±0.4994.02±1.2686.23±2.1485.67±1.9936.12±1.491.13↑
PSL-BernNet89.67±1.7989.54±2.4077.46±2.3894.19±0.9488.34±2.4886.89±2.3237.45±1.91
GPRGNN87.59±1.3188.01±1.1476.83±1.6792.98±1.0986.32±2.1185.17±1.8736.42±1.651.21↑
PSL-GPR88.45±1.4889.11±1.8977.42±2.0294.23±1.4788.67±2.3386.45±2.0437.45±1.92
Jacobi88.83±1.6588.03±0.7576.89±1.8493.72±1.5387.11±2.0784.45±1.9636.56±1.781.08↑
PSL-Jacobi89.01±1.8089.02±2.4277.71±2.5094.43±0.9688.98±2.4286.23±2.1537.78±2.05
VAG0.89↑1.22↑1.01↑0.86↑1.96↑1.68↑1.28↑
+ +table shows, the number of distinct eigenvalues of the perturbed sheaf Laplacian matrix significantly exceeds that of the normalized graph Laplacian matrix. + +# 7. Related work + +In this section, we outline the research developments related to the issues of interest, along with the background and tools employed. + +# 7.1. Expressiveness of GNNs + +The research on expressive power of GNNs originates from the Weisfeiler-Lehman (WL) test for graph isomorphism (Weisfeiler & Leman, 1968). Building on this foundation, GIN (Xu et al., 2019b) establishes a direct connection between the expressive power of GNNs and the 1-WL test. Since then, various works have attempted to analyze GNNs with the WL test and graph isomorphism testing (Morris et al., 2019; Maron et al., 2019a; Chen et al., 2019; Zhang et al., 2021). Besides, some studies measure the expressive power of GNNs by using alternative approaches, such as expressing universal invariant functions (Maron et al., 2019b) and counting graph's substructures (Chen et al., 2020). Balcilar et al.(Balcilar et al., 2021) first analyze the expressive power of GNNs from a spectral perspective. Wang and Zhang (Wang & Zhang, 2022) show that the number of distinct eigenvalues in the normalized graph Laplacian matrix impacts the expressive power of linear spectral GNNs. Besides, they also build a bridge between the expressive power of spectral GNNs and 1-WL test. Lu et al. (Lu et al., 2024) further analyze that the presence of repeated eigenvalues imposes limitations on the predictive ability of linear spectral GNNs. In this paper, we summarize and extend the work of Wang and Zhang, as well as Lu et al., to address the limitations posed by repeated eigen- + +values of normalized graph Laplacian matrix. + +# 7.2. Sheaf Neural Networks on Graphs + +Sheaf Neural Networks (SNNs), introduced by Hansen and Gebhart (Hansen & Gebhart, 2020), extend graph neural networks by using the sheaf Laplacian matrix for dealing with non-constant, heterogeneous, and signed node relationships. Building on this foundation, Bodnar et al. (Bodnar et al., 2022) apply sheaf Laplacian matrix to address heterophily and oversmoothing problems in graph neural networks. This is achieved by concatenating node features as parameters, which are then used to construct restriction maps. Barbero et al. (Barbero et al., 2022) generate a sheaf Laplacian matrix through a pre-trained approach, which is suitable for manifold data and effectively incorporates the underlying geometric characteristics of the data. Duta et al. (Duta et al., 2023b) construct the hyper sheaf Laplacian to capture both linear and non-linear diffusion by selecting the most discrepant feature pairs within hyperedges. Battiloro et al. (Battiloro et al., 2024) use VDM (Singer & Wu, 2012) to construct the sheaf Laplacian and design a tangent bundle filter. This method requires a large amount of specialized data and involves high complexity. Our method simplifies the process by perturbing the block form of the normalized graph Laplacian, which has been proven both efficient and effective. + +# 7.3. Eigenvalue Perturbation Theory + +Early research mainly focuses on eigenvalue perturbation of general symmetric matrices. Tools such as Weyl's theorem (Weyl, 1912) and Gershgorin's disk theorem (Gerschgorin, 1931) are applied to derive the fundamental effects of perturbations on eigenvalues. Due to the stability of semidefinite matrices and diagonally dominant matrices, + +Table 2. Comparison of models based on three Laplacian matrices (GNN vs. GSL-GNN vs. PSL-GNN): mean accuracy $(\%)$ ±95 $(\%)$ on seven datasets. + +
DatasetsCoraPubmedCiteseerPhotoTexasCornellActor
GCN86.8±1.186.4±0.875.4±2.287.6±1.578.4±1.975.2±1.734.1±1.5
GSL-GCN87.6±0.986.9±2.076.4±2.189.4±1.180.1±1.377.7±1.335.3±1.9
PSL-GCN88.1±0.887.9±1.877.4±1.890.1±1.180.2±1.777.8±1.435.5±2.2
APPNP88.0±1.587.4±0.976.2±1.590.1±0.678.5±2.080.1±1.634.9±1.5
GSL-APPNP89.0±1.488.1±2.177.0±2.690.6±0.979.9±2.182.4±2.536.0±2.3
PSL-APPNP89.0±1.188.0±2.677.0±2.390.3±1.079.7±2.182.3±1.936.0±1.6
Graph-Heat86.6±1.487.1±1.674.8±2.589.2±1.175.8±2.079.3±1.634.0±1.6
GSL-Heat87.4±1.888.7±2.576.6±2.289.4±1.377.4±1.980.7±2.135.6±2.1
PSL-Heat87.2±1.488.3±1.876.7±2.489.1±1.576.6±2.980.4±1.135.3±1.9
BernNet88.2±0.788.4±1.376.6±0.794.0±1.286.3±1.985.8±1.436.0±1.6
GSL-BernNet89.7±1.689.5±2.477.6±2.094.1±1.088.3±2.486.8±1.737.3±2.2
PSL-BernNet89.9±1.389.7±1.977.3±1.894.2±1.088.4±2.886.9±1.237.5±2.3
GPRGNN87.1±0.987.9±1.176.7±1.592.8±1.285.2±1.786.2±2.136.3±1.5
GSL-GPR88.1±1.188.6±2.276.8±1.993.6±1.086.1±1.887.8±2.036.7±2.4
PSL-GPR88.4±1.289.3±1.677.4±1.893.2±1.686.7±1.588.2±2.437.0±2.5
Jacobi88.7±1.488.0±0.776.7±1.893.6±1.387.4±1.884.2±2.136.5±1.7
GSL-Jacobi89.0±1.889.1±2.277.7±2.294.4±1.089.0±2.386.3±2.037.7±2.0
PSL-Jacobi89.0±1.489.3±1.977.8±2.394.2±1.388.9±2.486.6±1.137.8±1.5
+ +Table 3. Distinct eigenvalues statistics of normalized Laplacian on real-world datasets across multiple training runs using PSL-GNN models (95% confidence interval). + +
DatasetsCoraPubmedCiteseerPhotoTexasCornellActor
||V||270819717332776501831837600
NG226276471969751173604837
NPSL-GCN2389±339031±452339±437604±19147±11142±166181±42
NPSL-APPNP2408±318977±602300±417602±15145±6147±106234±37
NPSL-Heat2376±258981±542301±377604±13145±8148±96225±40
NPSL-BernNet2434±369018±562308±357609±10144±13149±66240±46
NPSL-GPR2436±359024±572311±347603±19145±12148±76243±45
NPSL-Jacobi2442±369030±582316±357567±30147±13150±86249±46
+ +some works focus on establishing perturbation bounds of these two matrices. Dailey et al. (Dailey et al., 2014) conduct in-depth research on the perturbation bounds of symmetric positive semidefinite matrices and propose a strong relative perturbation bounds. For diagonally dominant matrices, a strong relative perturbation bound is proposed by Bai et al. (Ye, 2009). In this paper, we primarily focus on symmetric positive semidefinite and also diagonally dominant matrices, aiming to study the changes in their eigenvalues after perturbation. + +# 8. CONCLUSION + +In this paper, we propose a novel sheaf Laplacian by perturbing the normalized graph Laplacian, which enhances the spectral GNNs. Our approach addresses the limitations posed by repeated eigenvalues in the normalized + +graph Laplacian, thereby improving the expressive power of GNNs. Extensive experiments on benchmark datasets demonstrate the effectiveness of our method, showing notable improvements in node classification performance. Although our approach has been validated through both theoretical analysis and experiments, further exploration is required to fully reduce the multiplicity of eigenvalues and refine the matrix construction methods. Additionally, we have not yet investigated the impact of the perturbed sheaf Laplacian (PSL) on graph-level tasks, which remains an interesting direction for future research. + +# Acknowledgements + +We sincerely thank the anonymous reviewers for their constructive comments and thoughtful suggestions. + +# 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 + +Balcilar, M., Renton, G., Héroux, P., Gaüzère, B., Adam, S., and Honeine, P. Analyzing the expressive power of graph neural networks in a spectral perspective. In Proceedings of the International Conference on Learning Representations, 2021. +Barbero, F., Bodnar, C., de Oca'riz Borde, H. S., Bronstein, M., Velickovic, P., and Lio, P. Sheaf neural networks with connection laplacians. In ICML 2022 Workshop on Topology, Algebra, and Geometry in Machine Learning, pp. 28-36, 2022. +Battiloro, C., Wang, Z., Riess, H., Di Lorenzo, P., and Ribeiro, A. Tangent bundle convolutional learning: from manifolds to cellular sheaves and back. *IEEE Transactions on Signal Processing*, 2024. +Bodnar, C., Giovanni, F. D., Chamberlain, B. P., Lio', P., and Bronstein, M. M. Neural sheaf diffusion: A topological perspective on heterophily and oversmoothing in gnns. In Advances in Neural Information Processing Systems, pp. 18527-18541, 2022. +Chen, Z., Villar, S., Chen, L., and Bruna, J. On the equivalence between graph isomorphism testing and function approximation with gnns. In Proceedings of the Neural Information Processing Systems, 2019. +Chen, Z., Chen, L., Villar, S., and Bruna, J. Can graph neural networks count substructures? In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M. F., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 10383-10395. Curran Associates, Inc., 2020. +Chien, E., Peng, J., Li, P., and Milenkovic, O. Adaptive universal generalized pagerank graph neural network. In International Conference on Learning Representations, 2021. +Chung, F. R. K. Spectral Graph Theory, volume 92. American Mathematical Soc., 1997. +Dailey, M., Dopico, F. M., and Ye, Q. Relative perturbation theory for diagonally dominant matrices. SIAM J. Matrix Anal. Appl., 35:1303-1328, 2014. +Duta, I., Cassara, G., Silvestri, F., and Lio, P. Sheaf hypergraph networks. In Advances in Neural Information Processing Systems, volume 36, 2023a. + +Duta, I., Cassara, G., Silvestri, F., and Lio, P. Sheaf hypergraph networks. In Oh, A., Neumann, T., Globerson, A., Saenko, K., Hardt, M., and Levine, S. (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 12087-12099. Curran Associates, Inc., 2023b. +Gerschgorin, S. Uber die abgrenzung der eigenwerte einer matrix. Izvestija Akademii Nauk SSSR, Serija Matematika, 7(3):749-754, 1931. +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. +Gilmer, J., Schoenholz, S. S., Riley, P. F., Vinyals, O., and Dahl, G. E. Neural message passing for quantum chemistry. In Proceedings of the International Conference on Machine Learning, pp. 1263-1272, 2017. +Goodfellow, I., Bengio, Y., and Courville, A. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org. +Hansen, J. Laplacians of Cellular Sheaves: Theory and Applications. PhD thesis, University of Pennsylvania, 2020. +Hansen, J. and Gebhart, T. Sheaf neural networks. *ArXiv*, abs/2012.06333, 2020. +Hansen, J. and Ghrist, R. Toward a spectral theory of cellular sheaves. Journal of Applied and Computational Topology, 3:315-358, 2018. +He, M., Wei, Z., Huang, Z., and Xu, H. Bernnet: Learning arbitrary graph spectral filters via bernstein approximation. In Advances in Neural Information Processing Systems, volume 34, pp. 14239-14251, 2021. +Huang, Q., Yamada, M., Tian, Y., Singh, D., and Chang, Y. Graphlime: Local interpretable model explanations for graph neural networks. IEEE Transactions on Knowledge and Data Engineering, 35(7):6968-6972, 2023. doi: 10.1109/TKDE.2022.3187455. +Jamadandi, A., Rubio-Madrigal, C., and Burkholz, R. Spectral graph pruning against over-squashing and oversmoothing. In Globerson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., and Zhang, C. (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 10348-10379. Curran Associates, Inc., 2024. +Jin, G., Liang, Y., Fang, Y., Shao, Z., Huang, J., Zhang, J., and Zheng, Y. Spatio-temporal graph neural networks for predictive learning in urban computing: A survey. IEEE Transactions on Knowledge and Data Engi + +neering, 36(10):5388-5408, 2024. doi: 10.1109/TKDE.2023.3333824. +Kipf, T. and Welling, M. Semi-supervised classification with graph convolutional networks. In Proceedings of the International Conference on Learning Representations, pp. 1-14, 2017. +Kipf, T. N. and Welling, M. Variational graph autoencoders. NIPS Workshop on Bayesian Deep Learning, 2016. +Klicpera, J., Bojchevski, A., and Gunnemann, S. Predict then propagate: Graph neural networks meet personalized pagerank. In International Conference on Learning Representations, 2018. +Lu, K., Yu, Y., Fei, H., Li, X., Yang, Z., Guo, Z., Liang, M., Yin, M., and Chua, T.-S. Improving expressive power of spectral graph neural networks with eigenvalue correction. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 14158-14166, 2024. +Maron, H., Ben-Hamu, H., Serviansky, H., and Lipman, Y. Provably powerful graph 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., 2019a. +Maron, H., Fetaya, E., Segol, N., and Lipman, Y. On the universality of invariant networks. In Chaudhuri, K. and Salakhutdinov, R. (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 4363-4371. PMLR, 09-15 Jun 2019b. URL https://proceedings.mlrpress/v97/maron19a.html. +McCallum, A., Nigam, K., Rennie, J. D. M., and Seymore, K. Automating the construction of internet portals with machine learning. Information Retrieval, 3:127-163, 2000. +Morris, C., Ritzert, M., Fey, M., Hamilton, W. L., Lenssen, J. E., Rattan, G., and Grohe, M. Weisfeiler and leman go neural: Higher-order graph neural networks. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 4602-4609, 2019. +Nair, V. and Hinton, G. E. Rectified linear units improve restricted boltzmann machines. In Proceedings of the International Conference on Machine Learning, pp. 807-814, 2010. +Obukhov, A. Efficient householder transformation in pytorch, 2021. URL www.github.com/toshas/torch-householder. Version: 1.0.1, DOI: 10.5281/zenodo.5068733. + +Rosenblatt, F. The perceptron: a probabilistic model for information storage and organization in the brain. Psychological review, 65 6:386-408, 1958. +Sen, P., Namata, G., Bilgic, M., Getoor, L., Gallagher, B., and Eliassi-Rad, T. Collective classification in network data. In The AI Magazine, pp. 93-93, 2008. +Shchur, O., Mumme, M., Bojchevski, A., and Gunnemann, S. Pitfalls of graph neural network evaluation. ArXiv, abs/1811.05868, 2018. +Singer, A. and Wu, H.-T. Vector diffusion maps and the connection laplacian. Communications on pure and applied mathematics, 65(8):1067-1144, 2012. +Wang, X. and Zhang, M. How powerful are spectral graph neural networks. In Proceedings of the International Conference on Learning Representations, pp. 23341-23362, 2022. +Weisfeiler, B. and Leman, A. The reduction of a graph to canonical form and the algebra which appears therein. nti, Series, 2(9):12-16, 1968. +Weyl, H. V. Das asymptotische verteilungsgesetz der eigenwerte linearer partieller differentialgleichungen (mit einer anwendung auf die theorie der hohlraumstrahlung). Mathematische Annalen, 71:441-479, 1912. +Wu, F., Souza, A., Zhang, T., Fifty, C., Yu, T., and Weinberger, K. Simplifying graph convolutional networks. In International conference on machine learning, pp. 6861-6871. PMLR, 2019. +Xu, B., Shen, H., Cao, Q., Cen, K., and Cheng, X. Graph convolutional networks using heat kernel for semi-supervised learning. In Proceedings of the 28th International Joint Conference on Artificial Intelligence, pp. 1928-1934. AAAI Press, 2019a. +Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? In International Conference on Learning Representations, 2019b. URL https://openreview.net/forum?id=ryGs6iA5Km. +Ye, Q. Relative perturbation bounds for eigenvalues of symmetric positive definite diagonally dominant matrices. SIAM J. Matrix Anal. Appl., 31:11-17, 2009. +Zhang, M., Li, P., Xia, Y., Wang, K., and Jin, L. Labeling trick: A theory of using graph neural networks for multi-node representation learning. In Advances in Neural Information Processing Systems, volume 34, pp. 9061-9073, 2021. + +# A. IMPORTANT NOTATIONS. + +Table 4. IMPORTANT NOTATIONS + +
SymbolDefinition
G,Fa graph, vector spaces over the graph
V,Eset of nodes, set of edges
A,Dadjacency matrix, degree matrix
L,LFnormalized graph laplacian, sheaf laplacian
Lblock,LFblock form of normalized graph laplacian, perturbed sheaf laplacian
n,N,dthe dimension of L , the dimension of LF , the dimension of stalks
λ,λthe eigenvalue of Lblock, the eigenvalue of LF
X,X̂feature matrix (input matrix), the input matrix after the Fourier transform
Y,Zthe output matrix after the Laplace transform, the final predication matrix
P,Qthe applied perturbation matrix, the transport matrix (the transpose product of the restriction maps)
g,Rthe filter function, the reshape operation
ureflection vector
φ,φthe minimum eigenvalue gap in Lblock, a function like multi-layer perceptrons
ε,ηthe maximum perturbation ratio for every block, the upper limit of perturbations for all parameters in u
+ +# B. Proofs. + +# B.1. Proof of Theorem 3.2 + +Theorem B.1. When there are only $k$ distinct eigenvalues of the normalized Laplacian matrix, and the nonlinear real-valued function $\sigma$ satisfies $\sigma(x) \neq 0$ for $x \neq 0$ , nonlinear spectral GNNs can produce at most $k$ different filter coefficients, and thus can only generate one-dimensional predictions with a maximum of $k$ arbitrary elements. + +Proof. Let $Z = [z_{1}, \ldots, z_{n}]^{T}$ be the output, where $z_{i} \in \mathbb{R}$ and $z_{i} \neq 0$ for $i = 1, 2, \ldots, n$ . Here, $k$ is the number of distinct eigenvalues of the normalized graph Laplacian matrix. Assume that the filter function is $g(\lambda)$ , where $\lambda$ is the eigenvalue of the normalized graph Laplacian matrix. When $\lambda_{i} = \lambda_{j}$ , $g(\lambda_{i}) = g(\lambda_{j})$ . Therefore, when the number of distinct eigenvalues of the Laplacian matrix is $k$ , there are only $k$ different filter coefficients. + +For the Fourier transform $Z = U\mathrm{diag}(g(\lambda))U^{\top}XW$ , we assume that all elements of $X$ are non-negative. Let the vector $\mathbf{m} = U^{\top}XW$ and $\mathbf{q} = \mathrm{diag}(g(\lambda))\cdot \mathbf{m}$ . Then $Z = U\mathbf{q}$ , where $Z\in \mathbb{R}^{n\times 1}$ . If $\lambda_{i} = \lambda_{j}$ , then $q_{i} = q_{j}\frac{m_{i}}{m_{j}}$ . Since there are $k$ independent eigenvalues, there are only $k$ arbitrary elements in the vector $\mathbf{q}$ . Therefore, any element in the vector $\mathbf{q}$ can be represented as a linear combination of these $k$ arbitrary elements, that is: + +$$ +q _ {i} = \alpha_ {1} q _ {\ell_ {1}} + \alpha_ {2} q _ {\ell_ {2}} + \dots + \alpha_ {k} q _ {\ell_ {k}}, \quad \forall i \in [ 1, n ] \tag {13} +$$ + +where $q_{\ell_1}, \ldots, q_{\ell_k}$ are the $k$ arbitrary elements in $\mathbf{q}$ . Then we can use a matrix $U'$ with $n$ rows and $k$ columns, and a vector $\mathbf{q}'$ with $k$ elements to represent $Z$ , i.e. $U' \mathbf{q}' = Z$ . To illustrate this process, we group all eigenvectors according to their corresponding eigenvalues. For each distinct eigenvalue $\lambda_{\ell_s}$ (where $s = 1, 2, \ldots, k$ ), define the set: $S_s = \{j \mid \lambda_j = \lambda_{\ell_s}\}$ . + +$Z$ could be expressed as follow: + +$$ +\left[ \begin{array}{c c c} \sum_ {j \in S _ {1}} U _ {1, j} \frac {m _ {j}}{m _ {\ell_ {1}}} & \dots & \sum_ {j \in S _ {k}} U _ {1, j} \frac {m _ {j}}{m _ {\ell_ {k}}} \\ \sum_ {j \in S _ {1}} U _ {2, j} \frac {m _ {j}}{m _ {\ell_ {1}}} & \dots & \sum_ {j \in S _ {k}} U _ {2, j} \frac {m _ {j}}{m _ {\ell_ {k}}} \\ \vdots & \vdots & \vdots \\ \sum_ {j \in S _ {1}} U _ {n, j} \frac {m _ {j}}{m _ {\ell_ {1}}} & \dots & \sum_ {j \in S _ {k}} U _ {n, j} \frac {m _ {j}}{m _ {\ell_ {k}}} \end{array} \right] \left[ \begin{array}{c} q _ {\ell_ {1}} \\ q _ {\ell_ {2}} \\ \vdots \\ q _ {\ell_ {k}} \end{array} \right] = \left[ \begin{array}{c} z _ {1} \\ z _ {2} \\ \vdots \\ z _ {n} \end{array} \right] \tag {14} +$$ + +Since $U'$ has rank at most $k$ , it spans a subspace of dimension at most $k$ . Thus, $Z = U' \mathbf{q}'$ is confined within this subspace. We can choose up to $k$ linearly independent elements $z_{\ell_1}, z_{\ell_2}, \ldots, z_{\ell_k}$ as a basis. Therefore, any $z_i$ can be expressed as a linear combination: + +$$ +z _ {i} = \beta_ {1} z _ {\ell_ {1}} + \beta_ {2} z _ {\ell_ {2}} + \dots + \beta_ {k} z _ {\ell_ {k}}, \quad \text {f o r} \beta_ {j} \in \mathbb {R} \tag {15} +$$ + +Let the activation function $\sigma(x)$ be a real-valued function, where $\sigma(x) \neq 0$ for $x \neq 0$ . Since the elements in $Z$ are nonzero, let $Z' = \sigma(Z)$ and $\operatorname{rank}(U') = k$ , then $z_i' = r_i \cdot z_i$ , where $r_i \in \mathbb{R}$ . According to Equation (15), we have: + +$$ +\begin{array}{l} z _ {i} ^ {\prime} = \beta_ {1} \cdot \frac {r _ {i}}{r _ {\ell_ {1}}} \cdot z _ {\ell_ {1}} ^ {\prime} + \dots + \beta_ {k} \cdot \frac {r _ {i}}{r _ {\ell_ {k}}} \cdot z _ {\ell_ {k}} ^ {\prime} \tag {16} \\ = \beta_ {1} ^ {\prime} \cdot z _ {\ell_ {1}} ^ {\prime} + \dots + \beta_ {k} ^ {\prime} \cdot z _ {\ell_ {k}} ^ {\prime} \\ \end{array} +$$ + +Therefore with the nonlinear activation function, spectral GNNs can still only generate at most $k$ arbitrary elements. + +# B.2. Proof of Theorem 4.1 + +Theorem B.2. Let $P = \overline{\mathcal{L}_{\mathcal{F}}} - \mathcal{L}_{block}$ be the perturbation matrix applied to $\mathcal{L}_{block}$ , and let $\phi = \min_{i,j; i \neq j} |\lambda_i - \lambda_j|$ , where $\lambda_i$ are the eigenvalues of $\mathcal{L}_{block}$ . If $\| P \|_2 < \frac{\phi}{2}$ , then the eigenvalue multiplicity of $\mathcal{L}_{\mathcal{F}}$ will decrease. + +Proof. When the perturbation matrix $P$ is applied to $\mathcal{L}_{\text{block}}$ , the new eigenvalues $\mu_i$ and $\mu_j$ of $\overline{\mathcal{L}_{\mathcal{F}}}$ corresponding to $\lambda_i$ and $\lambda_j$ will lie within a neighborhood of these eigenvalues. According to Weyl's inequality, we have: $|\mu_i - \lambda_i| \leq \|P\|_2$ and $|\mu_j - \lambda_j| \leq \|P\|_2$ . This implies that $\mu_i$ lies in the interval: $[\lambda_i - \|P\|_2, \lambda_i + \|P\|_2]$ , and $\mu_j$ lies in the interval: $[\lambda_j - \|P\|_2, \lambda_j + \|P\|_2]$ . + +Now, since $\phi = \min_{i,j; i \neq j} |\lambda_i - \lambda_j|$ and we assume $\|P\|_2 < \frac{\phi}{2}$ , the length of each interval is $2\|P\|_2$ , which is strictly less than $\phi$ . The distance between the centers of these intervals is $\phi$ , which is greater than the sum of the half-lengths of the intervals, $2\|P\|_2$ . Thus, $[\lambda_i - \|P\|_2, \lambda_i + \|P\|_2]$ and $[\lambda_j - \|P\|_2, \lambda_j + \|P\|_2]$ do not overlap. This guarantees that the perturbed eigenvalues $\mu_i$ and $\mu_j$ remain distinct. + +Since $\lambda_{i}$ and $\lambda_{j}$ represent the pair of eigenvalues with the smallest distance $\phi$ , if their perturbation intervals do not overlap, then for any other pair of eigenvalues $\lambda_{k}$ and $\lambda_{l}$ (where $k \neq l$ ), their perturbation intervals will also not overlap due to $|\lambda_{k} - \lambda_{l}| \geq \phi$ . + +Therefore, no two perturbation intervals overlap, ensuring that the eigenvalue multiplicity of $\overline{\mathcal{L}_{\mathcal{F}}}$ will decrease as eigenvalues associated with higher multiplicities split into distinct values within their respective intervals. + +# C. Expressiveness of PSL-GNN + +# C.1. Proof of Proposition 5.1 + +Proposition C.1. The number of distinct eigenvalues of $\mathcal{L}_{block} \in \mathbb{R}^{nd \times nd}$ is the same as that of $\mathcal{L} \in \mathbb{R}^{n \times n}$ , where $\mathcal{L}$ is the normalized graph Laplacian matrix and $\mathcal{L}_{block} = \mathcal{L} \otimes I$ , with $I \in \mathbb{R}^{d \times d}$ being the identity matrix. Also, their corresponding GNNs, which share the same architecture, are mutually equivalent. + +Proof. We prove the first part of the proposition as follows. Let $\mathcal{L}$ have eigenvalues $\{\lambda_1, \lambda_2, \dots, \lambda_n\}$ , and let $I \in \mathbb{R}^{d \times d}$ be the identity matrix with eigenvalues $\{1, 1, \dots, 1\}$ . According to the eigenvalue property of the Kronecker product, the eigenvalues of $\mathcal{L}_{\mathrm{block}} = \mathcal{L} \otimes I$ are $\lambda_i \cdot 1 = \lambda_i$ for each $i = 1, 2, \dots, n$ . Since $I$ only introduces eigenvalues of 1, the + +Kronecker product does not add new eigenvalues. Each eigenvalue $\lambda_{i}$ of $\mathcal{L}$ is repeated $d$ times, meaning the number of distinct eigenvalues of $\mathcal{L}_{\mathrm{block}}$ is the same as that of $\mathcal{L}$ . + +Consider an input matrix $\mathbf{X} \in \mathbb{R}^{n \times f}$ , where $f = d \times k$ . Reshape $\mathbf{X}$ into $\mathbf{X}' \in \mathbb{R}^{nd \times k}$ . Let $\mathbf{Y} = \mathcal{L}\mathbf{X}$ and $\mathbf{Y}' = \mathcal{L}_{\mathrm{block}}\mathbf{X}'$ . We partition $\mathbf{X}$ into $n$ row blocks: $\mathbf{X} = \left[(\mathbf{X}^{(1)})^\top, \ldots, (\mathbf{X}^{(n)})^\top\right]^\top$ , where each $\mathbf{X}^{(i)} \in \mathbb{R}^{1 \times f}$ . Reshape each $\mathbf{X}^{(i)}$ into a block matrix $\mathbf{X}'^{(i)} \in \mathbb{R}^{d \times k}$ . The reshaped matrix $\mathbf{X}' \in \mathbb{R}^{nd \times k}$ is formed by stacking these blocks. + +Now compute $\mathbf{Y}' = \mathcal{L}_{\mathrm{block}}\mathbf{X}'$ . The Kronecker product $\mathcal{L}_{\mathrm{block}} = \mathcal{L} \otimes I_d$ implies that each element $\mathcal{L}_{ij}$ of $\mathcal{L}$ is multiplied by the $d \times d$ identity matrix $I_d$ . Thus, $\mathbf{Y}'$ can be expressed as: $\mathbf{Y}' = \left[\sum_{j=1}^{n} \mathcal{L}_{1j}\mathbf{X}'^{(j)} \dots \sum_{j=1}^{n} \mathcal{L}_{nj}\mathbf{X}'^{(j)}\right]^\top$ . + +Next, we reshape $\mathbf{Y}'$ back to $\mathbf{Y}_{\mathrm{reshaped}}'\in \mathbb{R}^{n\times f}$ . For each $i,s,t$ , the element $\mathbf{Y}_{i,(s - 1)d + t}$ in $\mathbf{Y}$ corresponds to $\mathbf{Y}_{s,t}^{\prime (i)}$ in $\mathbf{Y}'$ . Thus, we have: $\mathbf{Y}_{i,(s - 1)d + t} = \mathbf{Y}_{\mathrm{reshaped}}'(i,(s - 1)d + t)$ . + +Since this holds for all $i, s, t$ , we conclude that $\mathbf{Y} = \mathbf{Y}_{\mathrm{reshaped}}'$ . + +# C.2. Proof of Corollary 5.2 + +Corollary C.2. PSL-GNN has stronger one-dimensional prediction ability. + +Proof. Consider a block form matrix $\mathcal{L}_{block}$ and its corresponding perturbed sheaf Laplacian matrix $\overline{\mathcal{L}_{\mathcal{F}}}$ . Let the input matrix be $X \in \mathbb{R}^{n \times 1}$ . Their outputs are given as $Z_{1} = U_{1}g(\lambda)U_{1}^{\top}XW_{1}$ and $Z_{2} = U_{2}g(\lambda)U_{2}^{\top}XW_{2}$ , respectively. Define vectors $\mathbf{m}_1 = XW_1$ and $\mathbf{m}_2 = XW_2$ , and let $\mathbf{q}_1 = g(\lambda) \cdot \mathbf{m}_1$ and $\mathbf{q}_2 = g(\lambda) \cdot \mathbf{m}_2$ . + +Suppose the number of distinct eigenvalues of $\overline{\mathcal{L}_{\mathcal{F}}}$ and $\mathcal{L}$ are $k_{1}$ and $k_{2}$ , respectively. According to the Proposition 5.1, the number of distinct eigenvalues of $\mathcal{L}_{\mathrm{block}}$ is equal to that of $\mathcal{L}$ , so the number of distinct eigenvalues of $\mathcal{L}_{\mathrm{block}}$ is $k_{2}$ . When $\lambda_{i} = \lambda_{j}$ , $g(\lambda_{i}) = g(\lambda_{j})$ . + +Therefore, the outputs can be expressed as $Z_{1} = U_{1}^{\prime}\mathbf{q}_{1}^{\prime}$ and $Z_{2} = U_{2}^{\prime}\mathbf{q}_{2}^{\prime}$ , where $U_{1}^{\prime}$ is an $n\times k_{1}$ matrix, $U_{2}^{\prime}$ is an $n\times k_{2}$ matrix, and $\mathbf{q}_1^\prime$ and $\mathbf{q}_2^\prime$ are vectors with $k_{1}$ and $k_{2}$ elements, respectively. + +Since the ranks of $U_1'$ and $U_2'$ are at most $k_1$ and $k_2$ , $Z_1$ and $Z_2$ each have at most $k_1$ and $k_2$ arbitrary elements, respectively. Given that $k_1 > k_2$ , the number of arbitrary elements in $Z_1$ is greater than that in $Z_2$ . + +# C.3. Proof of Corollary 5.3 + +Corollary C.3. PSL-GNN loses fewer frequency components. + +Proof. Consider a block form matrix $\mathcal{L}_{block}$ and its corresponding perturbed sheaf Laplacian matrix $\overline{\mathcal{L}_{\mathcal{F}}}$ . Let the maximum multiplicity of the eigenvalues of $\mathcal{L}_{block}$ be $m$ , and the maximum multiplicity of the eigenvalues of $\overline{\mathcal{L}_{\mathcal{F}}}$ be $\hat{m}$ . Since $\hat{m} < m$ , PSL-GNN is able to lose fewer frequency components even in the worst-case design of the filtering function. + +# C.4. Proof of Corollary 5.4 + +Corollary C.4. PSL-GNN has a stronger capability in processing frequency components. + +Proof. Consider a block form matrix $\mathcal{L}_{block}$ and its corresponding perturbed sheaf Laplacian matrix $\overline{\mathcal{L}_F}$ . Let the number of distinct eigenvalues of $\mathcal{L}_{block}$ and $\overline{\mathcal{L}_F}$ be $k_{1}$ and $k_{2}$ , respectively. Since $k_{1} < k_{2}$ , the PSL-GNN filter has more coefficients, implying that it can handle frequency components in a more diverse manner. + +Remark C.5. We explain Corollary 5.4 more clearly: the eigenvalues of $\mathcal{L}_{\mathrm{block}}$ are divided into $k_{1}$ groups, while those of $\mathcal{L}_{\mathcal{F}}$ are divided into $k_{2}$ groups, with $k_{2} > k_{1}$ . Accordingly, the filter coefficients are divided into $k_{1}$ and $k_{2}$ groups, with identical coefficients within each group. This means that the frequency components associated with each eigenvalue in a group are scaled by the same factor. Since $k_{2} > k_{1}$ , PSL-GNN can independently scale more frequency components. + +# D. Perturbation Bounds of Eigenvalues + +Theorem D.1. Let $\mathcal{L}_{block}$ and $\mathcal{L}_{\mathcal{F}} = \mathcal{L}_{block} + P$ be $N\times N$ symmetric positive semidefinite matrices, with eigenvalues $\lambda_1,\ldots ,\lambda_N$ and $\tilde{\lambda}_1,\dots ,\tilde{\lambda}_N$ , respectively, where $\mathcal{L}_{block}$ is diagonally dominant. Suppose the perturbation matrix $P$ satisfies $|P_{ij}|\leq \epsilon |(L_{block})_{ij}|$ for all $i\neq j$ for all $i$ , where $0 < \epsilon < \frac{1}{2}$ . Hence, for each $i$ $|\tilde{\lambda}_i - \lambda_i|\leq \frac{2\epsilon}{1 - 2\epsilon}\tilde{\lambda}_{\mathrm{max}}.$ + +Proof. First, we bound the spectral norm of $P$ . For each row $i$ , we have: + +$$ +\sum_ {j = 1} ^ {n} \left| P _ {i j} \right| = \left| P _ {i i} \right| + \sum_ {j \neq i} \left| P _ {i j} \right| \leq \epsilon v _ {i} + \epsilon \sum_ {j \neq i} \left| \left(\mathcal {L} _ {\mathrm {b l o c k}}\right) _ {i j} \right| = \epsilon \left(v _ {i} + \sum_ {j \neq i} \left| \left(\mathcal {L} _ {\mathrm {b l o c k}}\right) _ {i j} \right|\right) = \epsilon \left(\mathcal {L} _ {\mathrm {b l o c k}}\right) _ {i i}. \tag {17} +$$ + +Therefore: + +$$ +\| P \| _ {\infty} \leq \epsilon \max _ {1 \leq i \leq n} \left(\mathcal {L} _ {\text {b l o c k}}\right) _ {i i}. \tag {18} +$$ + +Since $\mathcal{L}_{\mathrm{block}}$ is diagonally dominant and positive semidefinite: + +$$ +\left\| \mathcal {L} _ {\text {b l o c k}} \right\| _ {\infty} = \max _ {1 \leq i \leq n} \sum_ {j = 1} ^ {n} | (\mathcal {L} _ {\text {b l o c k}}) _ {i j} | \leq 2 \max _ {1 \leq i \leq n} (\mathcal {L} _ {\text {b l o c k}}) _ {i i} \leq 2 \| \mathcal {L} _ {\text {b l o c k}} \| _ {2}, \tag {19} +$$ + +where $\| \mathcal{L}_{\mathrm{block}}\| _2$ denotes the spectral norm of $\mathcal{L}_{\mathrm{block}}$ . Thus: + +$$ +\| P \| _ {2} \leq \| P \| _ {\infty} \leq \epsilon \| \mathcal {L} _ {\mathrm {b l o c k}} \| _ {\infty} \leq 2 \epsilon \| \mathcal {L} _ {\mathrm {b l o c k}} \| _ {2}. \tag {20} +$$ + +Next, we apply Weyl's theorem, which states that for symmetric matrices $\mathcal{L}_{\mathrm{block}}$ and $P$ : $|\tilde{\lambda}_i - \lambda_i| \leq \| P\|_2$ . Substituting the norm bound derived above: + +$$ +\left| \tilde {\lambda} _ {i} - \lambda_ {i} \right| \leq \| P \| _ {2} \leq 2 \epsilon \| \mathcal {L} _ {\text {b l o c k}} \| _ {2}. \tag {21} +$$ + +We now relate $\| \mathcal{L}_{\mathrm{block}}\| _2$ to $\tilde{\lambda}_i$ . Since $\mathcal{L}_{\mathcal{F}} = \mathcal{L}_{\mathrm{block}} + P$ : + +$$ +\left\| \mathcal {L} _ {\text {b l o c k}} \right\| _ {2} \leq \left\| \mathcal {L} _ {\mathcal {F}} \right\| _ {2} + \| P \| _ {2} \leq \left\| \mathcal {L} _ {\mathcal {F}} \right\| _ {2} + 2 \epsilon \left\| \mathcal {L} _ {\text {b l o c k}} \right\| _ {2}. \tag {22} +$$ + +Rearranging gives: + +$$ +\left\| \mathcal {L} _ {\text {b l o c k}} \right\| _ {2} \leq \frac {\left\| \mathcal {L} _ {\mathcal {F}} \right\| _ {2}}{1 - 2 \epsilon}. \tag {23} +$$ + +Given that $\| \mathcal{L}_{\mathcal{F}}\| _2 = \tilde{\lambda}_{\mathrm{max}}\geq \tilde{\lambda}_i$ , it follows that: + +$$ +\left| \tilde {\lambda} _ {i} - \lambda_ {i} \right| \leq 2 \epsilon \| \mathcal {L} _ {\text {b l o c k}} \| _ {2} \leq \frac {2 \epsilon}{1 - 2 \epsilon} \| \mathcal {L} _ {\mathcal {F}} \| _ {2} = \frac {2 \epsilon}{1 - 2 \epsilon} \tilde {\lambda} _ {\max } \tag {24} +$$ + +Thus, the bound is proven. + +# E. Experimental Setup + +# E.1. Experimental Details + +We construct every reflection matrix $\mathcal{F}_{i\leq (i,j)}$ based on the method in (Obukhov, 2021). For downstream task, we update the perturbed sheaf Laplacian matrix every 10 epochs. Given its high dimensionality, we employ sparse matrix storage to reduce computational overhead. Additionally, we apply an early stopping mechanism with a maximum of 1500 epochs and a patience threshold of 100. For each PSL-GNN and its corresponding GNN, we train them for the same number of times and take the average of their respective accuracies as the final result for each model. For model training, we use the Adam optimizer to optimize all models on an NVIDIA GeForce RTX 4090 GPU. + +# E.2. Datasets + +We use seven benchmark datasets, categorized as follows: (1) Citation Networks: Cora (McCallum et al., 2000), Citeseer (Giles et al., 1998), and Pubmed (Sen et al., 2008) are citation networks with nodes as publications, edges as citation links, and labels indicating topics or fields; (2) Co-purchase Networks: Photo (Shchur et al., 2018) is a co-purchase network with nodes as products, edges as co-purchases, and labels categorizing products; (3) Webpage Networks: Texas and Cornell + +(Shchur et al., 2018) are webpage networks with nodes as webpages, edges as hyperlinks, and labels indicating categories; (4) Actor Co-occurrence Network: Actor (Shchur et al., 2018) is a co-occurrence network with nodes as actors, edges as co-occurrences, and labels classifying actors. + +The information of each dataset is shown in Table 5. Additionally, due to the diagonal dominance of the normalized graph Laplacian $\mathcal{L}$ , its eigenvalue $\lambda = 1$ has higher multiplicity. Thus we also compute the proportion $P_{\lambda=1}$ of this multiplicity for analysis. + +Table 5. The statistical information of the datasets. + +
DatasetsCoraPubmedCiteSeerPhotoTexasCornellActor
Nodes270819717332776501831837600
Edges527844324455224586128727826705
Features1433500370374517031703932
Classes7368555
\(P_{\lambda=1}\)0.1250.6390.1710.0480.3620.3490.155
+ +# E.3. GNN Baselines + +To evaluate the performance of our proposed method, we choose six different spectral GNNs as follows. + +GCN (Kipf & Welling, 2016) is a spectral graph neural network that uses a mean aggregator to combine information from neighboring nodes, bridging the gap between spectral and spatial GNN methods. APPNP (Klicpera et al., 2018) employs personalized PageRank to propagate node features, addressing the oversmoothing problem in deep networks. Graph-Heat (Xu et al., 2019a) incorporates the heat kernel for graph signal filtering, providing a natural mechanism to smooth or diffuse signals over the graph. BernNet (He et al., 2021) improves spectral graph convolutions using Bernstein polynomials, offering better flexibility to handle varying graph structures. GPRGNN (Chien et al., 2021) generalizes PageRank algorithms to enhance performance on graphs with heterophilic structures. Lastly, JacobiConv (Wang & Zhang, 2022) leverages orthogonal Jacobi polynomials to enhance expressiveness and optimization in spectral graph neural networks. + +For all baseline models, we use either their official implementations or implementations provided by PyTorch Geometric to ensure fair comparisons. + +# E.4. Hyper-Parameters + +To ensure a fair comparison, we keep all hyper-parameters the same for each PSL-GNN and its corresponding baseline GNN, except for $\eta$ and $d$ . Specifically, for all models, we set the learning rate to 0.05, weight decay to $5e - 4$ , and the number of hidden units to 64. We set the order of the polynomial filters—BernNet, APPNP, Graph-Heat, and Jacobi—to 10. For all PSL-GNN models, we search $\eta$ within $\{1e - 1, 1e - 2, 1e - 3, 1e - 4\}$ and $d$ within $\{2, 3, 4\}$ to achieve the best model performance. + +# F. Additional Experimental Studies + +# F.1. Complexity Analysis + +We first analyze the space and time costs of constructing the perturbed sheaf Laplacian, then the per-epoch cost of PSL-GCN (with and without PSL reconstruction), and finally report empirical runtimes. + +# F.1.1. SPACE COMPLEXITY & PARAMETERS. + +Each restriction map uses $d$ free parameters, so forming the edge-incidence matrix $\mathcal{B}_{\mathcal{F}}$ (with two entries per edge) requires space $= O(2E \cdot d^2 + n \cdot d)$ , + +# F.1.2. PSL CONSTRUCTION TIME. + +We build the signed incidence matrix $\mathcal{B}_{\mathcal{F}}$ (size $nd\times \mathrm{nnz}_{\mathcal{B}}$ ), then compute $\overline{\mathcal{L}_{\mathcal{F}}} = \mathcal{B}_{\mathcal{F}}\mathcal{B}_{\mathcal{F}}^{T}$ . Since $\mathcal{B}_{\mathcal{F}}$ has $\mathrm{nnz}_{\mathcal{B}}$ nonzeros, this sparse-sparse product costs $O\big(\mathrm{nnz}_{\mathcal{B}}^2\big)$ . + +# F.1.3. PER-EPOCH COST OF PSL-GCN. + +Every 10 epochs we rebuild the PSL; thus per-epoch we either include or omit the $O(\mathrm{m} \mathrm{z}_{B}^{2})$ term: + +- Including PSL construction: $O\left( {{\mathrm{{nnz}}}_{\mathcal{B}}^{2}}\right) + O\left( {n{f}_{1}{df}_{3}}\right) + O\left( {{2nd}{f}_{3}\left( {r + {f}_{4}}\right) }\right) + O\left( {{nd}{f}_{\text{last }}c}\right)$ . +- Amortized (excluding PSL construction): $O\left( {{n}^{2}{d}_{1}{d}_{3} + {n}^{2}{d}_{2}{d}_{4}}\right) + O\left( {{n}^{2}{d}_{3}\left( {r + {f}_{4}}\right) }\right) + O\left( {{n}^{2}{d}_{4}\left( {r + {f}_{3}}\right) }\right)$ . + +# F.1.4. EMPIRICAL RUNTIMES. + +Table 6 reports average epoch time (ms) / total runtime per fold (s) for PSL-GCN vs. Neural Sheaf Diffusion (Diag-NSD, O(d)-NSD, Gen-NSD) (Bodnar et al., 2022): + +Table 6. Average epoch time (ms) / total runtime per fold (s). + +
DatasetCoraPubmedCiteseerPhotoTexasCornellActor
Diag-NSD26.4/5.9124.3/34.725.2/5.890.6/17.48.3/1.68.1/1.598.4/21.5
O(d)-NSD57.0/12.3204.5/66.364.1/13.6143.5/26.326.8/6.727.4/7.2128.2/31.9
Gen-NSD85.3/17.6231.1/74.392.4/20.6166.7/34.634.3/14.431.4/14.2177.6/45.2
PSL-GCN16.0/4.683.7/17.418.3/5.265.3/15.86.3/1.16.4/1.172.7/17.3
+ +# F.2. Comparison of Spectral Gap + +The Laplacian spectrum measures graph connectivity. Cheeger's inequality $2h_{G} > \lambda_{1} > \frac{h_{G}^{2}}{2}$ shows that a larger spectral gap $\lambda_{1}$ implies better connectivity (Jamadandi et al., 2024). The Cheeger constant $h_{G}$ quantifies the tightest connectivity bottleneck in a graph. In (Lu et al., 2024), the new operator's (H) eigenvalues are defined as $u_{i} = \beta \lambda_{i} + (1 - \beta)v_{i}$ , where $v_{i} = 2i / n - 2$ . When $v_{1} < \lambda_{1}$ , it follows that $u_{1} < \lambda_{1}$ (because $u_{1} - \lambda_{1} = (1 - \beta)(v_{1} - \lambda_{1})$ with $\beta < 1$ ), which reduces the spectral gap and impairs information flow, especially in large graphs, where $v_{1} = 2 / n - 2$ is very, very small. However, our approach perturbs the normalized Laplacian in a way that maintains subtle eigenvalue differences regardless of graph size, thereby preserving the topological information. + +Below, we verify our argument above by presenting the spectral gaps' orders of magnitude for the normalized graph Laplacian and PSL across various datasets. As shown in the Table 7, for each dataset, $v_{1} < \lambda_{1}$ , $u_{1} < \lambda_{1}$ , and $\lambda_{1} \leq \hat{\lambda}_{1}$ which indicates that Lu et al.'s approach (Lu et al., 2024) indeed reduces the spectral gap, thus compromising the original topological information encoded in the normalized Laplacian matrix. + +Table 7. Comparison of spectral gap + +
CoraPubmedCiteseerPhotoTexasCornellActor
n270819717332776501831837600
v17e-41e-46e-42e-41e-21e-22e-4
λ14e-31e-21e-31e-35e-27e-23e-2
ˆλ15e-31e-22e-31e-35e-27e-23e-2
+ +# F.3. Node Classification in A Fully-Supervised Split + +We train all models in a fully-supervised split (60% / 20% / 20%). For each baseline (including the EC-GNN variants), we adopt the best hyperparameter settings reported in the original paper. For all PSL-GNN variants, we use the same settings as their corresponding baselines, with $\eta = 1 \times 10^{-3}$ and $d = 2$ . The results are summarized in Table 8 and Table 9. + +Table 8. Results on real-world datasets in the dense splitting $\left( {{60}\% /{20}\% /{20}\% }\right)$ . + +
DatasetsCoraCiteseerPubMedComputersPhoto
GCN87.16±1.0379.84±0.7386.79±0.3283.31±1.0188.24±0.78
EC-GCN88.73±0.8980.63±1.0187.68±0.8383.94±1.1790.45±1.20
PSL-GCN89.09±1.1481.04±0.6388.75±1.2484.12±1.6591.48±0.81
APPNP88.23±1.0580.61±0.9488.17±0.3885.35±0.3890.48±0.57
EC-APPNP89.54±1.4381.48±1.2388.42±1.3686.10±1.0790.75±1.06
PSL-APPNP90.91±1.1481.92±1.3688.88±1.4286.43±0.6891.82±0.96
Graph-Heat87.34±1.4178.82±1.2687.52±0.8983.23±1.3789.97±0.82
EC-Heat88.13±1.0279.44±1.1288.93±0.9183.86±1.2490.57±0.86
PSL-Heat88.51±1.3880.02±1.3189.21±1.5784.64±1.5890.87±0.91
BernNet88.48±1.1480.08±1.0788.73±1.4287.68±0.5394.31±0.86
EC-BernNet88.64±0.5580.30±0.9889.07±1.3788.34±1.0394.50±1.01
PSL-BernNet90.01±0.9380.86±1.1590.13±1.4488.74±0.5694.79±1.03
GPRGNN88.54±0.8280.09±1.0388.52±0.4687.01±0.7493.87±0.34
EC-GPR89.41±0.6980.66±1.0189.64±0.5389.91±0.6894.76±1.02
PSL-GPR90.13±0.9281.11±0.7689.82±1.8989.93±1.7094.87±0.96
Jacobi88.96±0.6880.73±0.8889.67±0.8290.42±0.3195.52±0.33
EC-Jacobi89.06±0.6781.28±0.9689.87±0.4290.33±0.2895.54±0.36
PSL-Jacobi90.73±1.3481.54±1.1290.42±1.1390.83±0.6195.69±0.52
+ +Table 9. Results on real-world datasets in the dense splitting $\left( {{60}\% /{20}\% /{20}\% }\right)$ . + +
DatasetsChameleonActorSquirrelTexasCornell
GCN59.65±2.5234.63±1.6246.64±1.2878.65±2.9876.42±5.21
EC-GCN61.81±1.9436.12±1.4450.31±0.8480.72±2.3977.38±4.37
PSL-GCN62.04±2.7136.74±1.4352.73±1.5481.45±2.4378.13±4.32
APPNP51.78±1.9139.59±0.8334.74±0.6090.89±1.5391.84±2.12
EC-APPNP52.93±2.1240.32±0.9435.33±0.8491.32±1.3491.97±1.64
PSL-APPNP54.49±1.7440.67±0.9135.63±0.5891.53±1.4992.07±1.94
Graph-Heat63.46±0.9235.74±1.3144.35±2.1480.06±0.9476.87±0.85
EC-Heat64.86±1.2236.51±0.9445.01±1.8781.25±1.3677.91±0.63
PSL-Heat65.60±1.2336.93±1.4545.32±1.8981.49±1.1080.94±1.05
BernNet68.25±1.5941.82±0.9951.37±0.7594.14±1.6792.16±1.77
EC-BernNet74.20±1.3341.87±1.0262.79±0.7894.37±1.4493.77±1.26
PSL-BernNet75.09±1.4641.93±1.3063.82±1.3394.54±1.8094.01±0.93
GPRGNN67.14±1.1039.92±0.6550.08±1.9592.97±1.4191.32±2.02
EC-GPR74.24±1.0640.42±0.7762.48±2.0392.27±1.9290.79±2.22
PSL-GPR74.78±1.3441.17±0.9663.65±0.8794.74±1.6592.44±1.85
Jacobi74.23±1.4541.16±0.7057.38±1.2493.45±2.0392.94±2.38
EC-Jacobi75.64±1.5141.01±0.7459.87±0.9193.48±1.4993.29±2.33
PSL-Jacobi75.87±1.4441.94±0.7561.47±0.9894.20±1.7593.91±1.96
+ +From the above results, PSL-GNNs consistently outperform the baselines, which validates the effectiveness of the perturbed sheaf Laplacian (PSL). + +# F.4. Eigenvalue Perturbation Study + +Every restriction map $\mathcal{F}_{v\leq e}$ is generated using $d$ parameters, and is bounded by $\eta$ , where $d$ represents the dimension of the stalks. To evaluate the impact of different perturbation scales $\eta$ on the eigenvalues, we compare the maximum relative eigenvalue perturbation between the resulting sheaf Laplacian matrix and the normalized graph Laplacian matrix. The + +maximum relative perturbation is defined as: + +$$ +\Delta \lambda = \max \left| \frac {\hat {\lambda} _ {i} - \lambda_ {i}}{\lambda_ {i}} \right|, \quad \text {f o r} i = 1, 2, \dots , N, \tag {25} +$$ + +where $\mathbf{N}$ is the dimension of the matrix, $\hat{\lambda}_i$ denotes the eigenvalues of the sheaf Laplacian matrix, and $\lambda_{i}$ represents the + +![](images/3b8c00a6bdfe3678366fada980ec0770e48b7d8514c2a7a4cd21d0f746f4ccc5.jpg) +$\Delta \lambda :d = 2$ + +![](images/086cbf108a039f57c25073ba29afdf414abbd90285d2244af1617586f659f047.jpg) +$\Delta \lambda :d = 3$ + +![](images/5ed2bcc169501240a41452060a5ada118b417d65b431c76b9f08ffdc40e9c6af.jpg) +$\Delta \lambda :d = 4$ + +![](images/00d424db4e02979d02ffd8a1d8a7a1a76d5e2c188e9d301da7ec1c1476b8318e.jpg) +proportion : $d = 2$ + +![](images/074aaaa73a29f9f7e6606e184705e4463c74dc9d609c996719aaef86fb1f3859.jpg) +proportion: $d = 3$ + +![](images/a7f3d0e17b10f8657b7587d3f8b36d5b1ee292b72530f41a22311fb2c7568f68.jpg) +proportion: $d = 4$ +Figure 4. The relative eigenvalue perturbations and the proportion of distinct eigenvalues of the perturbed sheaf Laplacian across different datasets under varying $\eta$ and $d$ . + +eigenvalues of the normalized graph Laplacian matrix. We also examine how the proportion of distinct eigenvalues, defined as $k / |v|$ (where $k$ is the number of distinct eigenvalues), varies with different $\eta$ . The results for each dataset are shown in the Figure 4. + +As shown in Figure 4, when $\eta$ decreases, $\Delta \lambda$ also decreases, which is consistent with the theoretical analysis for the perturbation of eigenvalues in Theorem 5.5. At $\eta = 1\mathrm{e} - 3$ , the number of distinct eigenvalues peaks but decreases for $\eta > 1\mathrm{e} - 3$ , as larger perturbations may cause eigenvalues to overlap, violating Theorem 4.1. Furthermore, the impact of $d$ is negligible. + +# F.5. Visualization of Eigenvalues Distribution + +To better illustrate whether the multiplicities of eigenvalues in the perturbed sheaf Laplacian $\overline{\mathcal{L}_{\mathcal{F}}}$ are reduced across different datasets, we visualize its eigenvalue distribution alongside that of the normalized graph Laplacian $\mathcal{L}$ . Figure 5 shows the eigenvalues distributions under a perturbation scale of $\eta = 1e - 3$ , where the vertical axis (density) represents the proportion of each distinct eigenvalue relative to the total, and the horizontal axis ( $\lambda$ ) represents the eigenvalues. Based on the analysis of these figures, we observe the following: + +1. For almost every graph dataset, the perturbed sheaf Laplacian matrix consistently exhibits fewer repeated eigenvalues compared to the corresponding normalized graph Laplacian matrix. +2. On small graph datasets, the reduction in eigenvalue multiplicity is more pronounced, which aligns with the greater average performance gains observed in Table 1. +3. For every graph dataset, the eigenvalue 1 always has the highest multiplicity. This explains why GCN performs worse than other baselines, as its filtering function removes frequency components associated with eigenvalue 1. In contrast, $\mathcal{L}_{\mathcal{F}}$ reduces the multiplicity of eigenvalue 1, which explains the highest average improvement for GCN, as it preserves the frequency components. + +![](images/60383e782d2e9a76a05a20cf4ba581410c40be8a697c8284c935ed261c7b67d6.jpg) + +![](images/eade96d5548e8d8f73937236407d1b1f5aa3030d49b0b4bafd05ce258f1812b1.jpg) + +![](images/0cdd7f955a9a030541690892407e61b3e42ed7245123d935da437b3c94c34e7b.jpg) + +![](images/19ff4f3d5bca154b1ab4ec6e2d41e538a1acb46b9b64df6c86cdff7359ad831c.jpg) + +![](images/401d418880c0c76dc18021cb6b4bdf00e31b2ad482dcdece2db155ca1b3354dd.jpg) + +![](images/81cf916cc7fe3c29e116fbcb57e5eaa4d5b855955c9b6b9a97e48b09e420b49b.jpg) + +![](images/53ed1f4b22a278538b600d89d4b17fc4837dd9b9fc8d0d5df0aa77ef90ee7117.jpg) + +![](images/a05eac8c2daf6cd1908bbc808928e14636a6962277e818ed6d1a2b71707cee29.jpg) + +![](images/5aed5d928d9e5c9b8a115c3f22fac0d2e1ff86866524ecfa2383029383b884bc.jpg) +$\overline{\mathcal{L}_{\mathcal{F}}}$ on Cora + +![](images/8e4076ada7a832c134d0d24824687b0ab1a316439fe9e3fbf3de3463d8abf2b7.jpg) + +![](images/a631dd8bbf9290cb49329fe1c05cb7c135488f098ced53d7d8bbad3b7c2ec588.jpg) +$\overline{\mathcal{L}_{\mathcal{F}}}$ on Photo + +![](images/530df7f81b6593c58969bfbdfbdea261a825126dba73874336f89b402f3dc2c6.jpg) +$\overline{\mathcal{L}_{\mathcal{F}}}$ on Texas + +![](images/894d80de00f7403dba45801cb66cef3a33d70b37806c8499f6be4eb7f55a4c54.jpg) +L + +![](images/ef3c477a3b9efdd7dd7e195bfb2044a7186413ba915019e78f077ad9dfc2c2ff.jpg) +$\overline{\mathcal{L}_{\mathcal{F}}}$ on Actor +Figure 5. Eigenvalues distribution of normalized graph Laplacian matrices and perturbed sheaf Laplacian matrices. + +# F.6. Hyper-Parameters Study + +To demonstrate how hyper-parameters influence the performance of the model, we study the effect of the two main hyperparameters of PSL-GPF and PSL-GCN, i.e. perturbation size $\eta$ and stalk dimension $d$ . For the remaining parameters, we set the same configuration across Cora, Texas, and Actor. + +The results are shown in the Figure 6. From the results, we have the following observations: + +1. These models perform best when $\eta = 1e - 3$ and $\eta = 1e - 2$ . This could be explained by Figure 5: when $\eta = 1e - 3$ , the proportion of distinct eigenvalues in the fixed perturbed sheaf Laplacian matrix is maximized. Parameters of the restriction mapping are constrained within the range $[1e - 4, 1e - 3]$ , and the parameters might gradually approach the upper bound of $1e - 3$ . When $\eta = 1e - 2$ , the performance is similar, as the parameters are constrained within the range $[1e - 3, 1e - 2]$ , they might gradually approach the lower bound of $1e - 3$ . +2. When $\eta = 1e - 4$ , the model's performance is similar to that when no perturbation is applied (i.e., $\eta = 0$ ). As shown in Figure 5, the perturbation effect is nearly negligible in this case, and the perturbed sheaf Laplacian matrix becomes almost identical to the normalized graph Laplacian matrix. + +# F.7. Comparison between PSL and GSL + +In the fully-supervised split, we compared the performance of PSL and GSL. The results are shown below: + +![](images/351a278f090dcc1e10254ad55cdc7c30e579663f5e17a2426161cc9d25c74c79.jpg) + +![](images/a3ef5c601be5e58fda301c326a730b719fdf0a696f76cc39e624459d04181491.jpg) + +![](images/c4656a706aed3e07b37da80f93dcd1f0a2c95ca07f2bae0e78256e113e8504a5.jpg) + +![](images/6af8e2859714db913d09fe178a6ddb2f3f1fcc30d7e7f0e58fce33d7ea4bcca4.jpg) +PSL-GPR on Cora + +![](images/45b49aa1a12fa9f13a1dc9b38d0fa1f591ac0be7a96bd54e961a833d05492fa0.jpg) +PSL-GPR on Texas + +![](images/38a54031fdaf2949e51522239a7a7e96db5809700f82afd0da5f9108ebcfb63a.jpg) +PSL-GPR on Actor + +![](images/11d5233928fe7c73ceef6a3d9278b0fc4a04dab20a8a4cdac52afc3ed2ff0bcc.jpg) +PSL-GCN on Cora + +![](images/9e29c9bac597486504c8458ab70aba4b2852f0feb0f32f132223f18b5c4010d7.jpg) +PSL-GCN on Texas + +![](images/4ed8dc6fbe396d124a9e878ce115e4c39f1ad85d128dec960a64655a56be5058.jpg) +PSL-GCN on Actor + +![](images/f99baaed1edb80ec27f1417013087c35a038272b16448259dc6c6f78c5bb969c.jpg) +PSL-APPNP on Cora + +![](images/71f88356d7b731d6bd00fc4666fe70023574cd46a12847f5cdd437df2e59732f.jpg) +PSL-APPNP on Texas + +![](images/cbffcc476b7df7f63ecb2161861848a565ff8c1ec8e188c95f9235f95c25edb3.jpg) +PSL-APPNP on Actor + +![](images/56b03c6131eee4535d2837555848f7fbe0824302ca77da5b22811d0874ebf000.jpg) +PSL-Heat on Cora + +![](images/8441de66bc061eae231cf97a196213cac56c7bebb730f29acdd86f8a3ab7ebcc.jpg) +PSL-Heat on Texas + +![](images/1677b5739290292374cd796dda96fb67d9b83a9d67f462452140eee8afe15c85.jpg) +PSL-Heat on Actor + +![](images/80dd44a336c399b96643bcfe3243db2e7aa02e3f416fa341e3096a4025828caa.jpg) +PSL-BernNet on Cora +PSL-Jacobi on Cora + +![](images/b30644066a39005b3bdbe73d2e3174c02185f83e73ccde56982d7497ccda645c.jpg) +PSL-BernNet on Texas +PSL-Jacobi on Texas +Figure 6. Hyper-Parameters Study. + +![](images/ef59f8c4268cfd24902d696d9fac9c4701c2e62d5f29446e91608f0876ee2e70.jpg) +PSL-BernNet on Actor +PSL-Jacobi on Actor + +Table 10. Comparison of models based on three Laplacian matrices (GNN vs. GSL-GNN vs. PSL-GNN): Mean accuracy $(\%)$ ±95 $(\%)$ on seven datasets (in dense splitting: $60\% /20\% /20\%$ ). + +
DatasetsCoraPubmedCiteseerPhotoTexasCornellActor
GCN87.16±1.0386.79±0.3279.84±0.7388.24±0.7878.65±2.9876.42±5.2134.63±1.62
GSL-GCN88.73 ±0.9887.04 ±0.9780.89 ±0.5189.67 ±0.8880.75 ±2.6477.93 ±4.3735.94 ±1.29
PSL-GCN89.09±1.1488.75±1.2481.04±0.6391.48±0.8181.45±2.4378.13±4.3236.74±1.43
APPNP88.23±1.0588.17±0.3880.61±0.9490.48±0.5790.89±1.5391.84±2.1239.59±0.83
GSL-APPNP89.88±0.9588.46±1.3881.52±1.1690.89±0.9391.19±1.4791.93±2.2339.81±0.84
PSL-APPNP90.91±1.1488.88±1.4281.92±1.3691.82±0.9691.53±1.4992.07±1.9440.67±0.91
Graph-Heat87.34±1.4187.52±0.8978.82±1.2689.97±0.8280.06±0.9476.84±0.8535.74±1.31
GSL-Heat87.71±1.2289.14±0.8979.23±1.0290.34±1.3180.79±1.980.87±0.7036.36±1.87
PSL-Heat88.51±1.3889.21±1.5780.02±1.3190.87±0.9181.49±1.1080.94±1.0536.93±1.45
BernNet88.48±1.1488.73±1.4280.08±1.0794.31±0.8694.14±1.6792.16±1.7741.82±0.99
GSL-BernNet89.96±1.1189.84±1.5080.77±0.8194.67±1.1094.23±1.7692.68±1.0741.88±1.44
PSL-BernNet90.01±0.9390.13±1.4480.86±1.1594.79±1.0394.54±1.8094.01±0.9341.93±1.30
GPRGNN88.54±0.8288.52±0.4680.09±1.0393.87±0.3492.97±1.4191.32±2.0239.92±0.65
GSL-GPR89.82±1.2389.04±1.0180.56±0.9394.12±1.2593.47±1.3891.87±1.7240.64±0.82
PSL-GPR90.13±0.9289.82±1.8981.11±0.7694.87±0.9694.74±1.6592.44±1.8541.17±0.96
Jacobi88.96±0.6889.67±0.8280.73±0.8895.52±0.3393.45±2.0392.94±2.3841.16±0.70
GSL-Jacobi89.43±0.9489.92±1.3381.24±1.1695.55±0.3693.84±1.9793.45±1.7141.21±0.45
PSL-Jacobi90.73±1.3490.42±1.1381.54±1.1295.69±0.5294.20±1.7593.91±1.9641.94±0.75
+ +It can be observed that PSL outperforms GSL, further validating the effectiveness of the perturbed sheaf Laplacian. \ No newline at end of file diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/images.zip b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..dcf1349de6d5791cf50aeeeafc46c1f64b184448 --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fcaef4629079a45173a6767228d56bfce40d12338410440e9b9c8e0f20fe12d +size 1554339 diff --git a/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/layout.json b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6ac2ff216360c1539b4ec2b588ac4eadc589e80c --- /dev/null +++ b/ICML/2025/Enhancing Spectral GNNs_ From Topology and Perturbation Perspectives/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1df713b17757133b48e47d7dd747bfeed96b59bda776a411e8eac1128feece3 +size 1106983 diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_content_list.json b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2a7a2b2e5330ef9be13d23a349bffa1b435f2a19 --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77d2be0daac0ad4ab4f155439a3a07bbb92524963b6f0901e0a064b9c1de4604 +size 202121 diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_model.json b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_model.json new file mode 100644 index 0000000000000000000000000000000000000000..10c08d472e38f35dc30cd5d41e32122b9640e10a --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f284fba2bc39e92b6df127738b9d45348d4f491c0261057a145f09f8b582e73 +size 248354 diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_origin.pdf b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..31a241a7bf2900f552dfaeced05c8d300f122cfe --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/6830f9ec-958d-4c99-b34f-47eaf7b95125_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a494a25ace7bad914dfc9adf25d2348bc5485873ac0b9997d66e3659470fc7f0 +size 1620081 diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/full.md b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e95e0fcfef57d6e525eed03890aa1a183dc626bb --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/full.md @@ -0,0 +1,985 @@ +# Enhancing Statistical Validity and Power in Hybrid Controlled Trials: A Randomization Inference Approach with Conformal Selective Borrowing + +Ke Zhu1 2 Shu Yang1 Xiaofei Wang2 + +# Abstract + +External controls from historical trials or observational data can augment randomized controlled trials when large-scale randomization is impractical or unethical, such as in drug evaluation for rare diseases. However, non-randomized external controls can introduce biases, and existing Bayesian and frequentist methods may inflate the type I error rate, particularly in small-sample trials where external data borrowing is most critical. To address these challenges, we propose a randomization inference framework that ensures finite-sample exact and model-free type I error rate control, adhering to the "analyze as you randomize" principle to safeguard against hidden biases. Recognizing that biased external controls reduce the power of randomization tests, we leverage conformal inference to develop an individualized test-then-pool procedure that selectively borrows comparable external controls to improve power. Our approach incorporates selection uncertainty into randomization tests, providing valid post-selection inference. Additionally, we propose an adaptive procedure to optimize the selection threshold by minimizing the mean squared error across a class of estimators encompassing both no-borrowing and full-borrowing approaches. The proposed methods are supported by non-asymptotic theoretical analysis, validated through simulations, and applied to a randomized lung cancer trial that integrates external controls from the National Cancer Database. + +$^{1}$ Department of Statistics, North Carolina State University, Raleigh, NC 27695, U.S.A. $^{2}$ Department of Biostatistics and Bioinformatics, Duke University, Durham, NC 27710, U.S.A.. Correspondence to: Shu Yang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Randomized controlled trials (RCTs) are the gold standard for making causal inferences on the treatment effect of a new treatment relative to a control treatment. However, large RCTs are often infeasible to conduct in practice when the indications of interest involve rare diseases (U.S. Food and Drug Administration, 2022) or common conditions where few patients are willing to participate due to a lack of equipoise (Miller & Joffe, 2011). RCTs in such a context often lack sufficient statistical power to detect realistic treatment effect sizes. Meanwhile, historical studies or large external databases provide real-world data under control conditions, often referred to as external controls (ECs). By integrating RCT with ECs, hybrid controlled trials have garnered significant interest as an effective approach to enhance the power of RCTs with small sample sizes. However, most existing methods for hybrid controlled trials rely on model-based or asymptotic $p$ -values, which can lead to inflated type I error rates when the randomized sample size is small, or the model is misspecified. Moreover, since ECs are not randomized, they may systematically differ from randomized controls, even after adjusting for measured confounders. Directly incorporating these ECs may introduce hidden bias, compromising the validity of the statistical inference. Strictly controlling the type I error rate in hybrid controlled trials, especially with small sample sizes and unmeasured confounding, remains an open problem. + +To address this problem, we extend the randomization inference framework to hybrid controlled trials. To utilize ECs, we use a doubly robust estimator of the average treatment effect (ATE) as the test statistic, which incorporates both RCT and EC data and effectively balances the measured confounders between RCT and EC (Li et al., 2023b). Then, Fisher randomization tests (FRTs) are performed using only the randomization in the RCT. In contrast to the asymptotic inference in Li et al. (2023b), which relies on (i) large sample sizes for both the RCT and EC, (ii) correct specification of at least one of the two nuisance models, and (iii) no unmeasured confounders, the FRT strictly controls the type I error rate without requiring any of these conditions, thus achieving model-free, finite-sample exact inference. The validity of the FRT relies solely on the randomization + +within the RCT, which is typically well-managed by the study design. Furthermore, we perform a power analysis for FRT in hybrid controlled trials and show that incorporating unbiased ECs with correctly specified models can enhance statistical power. However, EC borrowing is not a free lunch, as including biased ECs may diminish power. + +The power issue motivates us to develop a method that selectively incorporates unbiased ECs rather than indiscriminately borrowing all ECs. Unlike observational studies, where the assumption of no unmeasured confounders is untestable, a key advantage of hybrid controlled trials is that the bias in ECs can be identified by comparing EC units to randomized control units. Existing methods mitigate hidden bias by penalized bias estimation and selective borrowing (Gao et al., 2025), where selection consistency depends on asymptotic arguments, potentially leading to inferior performance in small samples. + +We propose a novel approach called Conformal Selective Borrowing (CSB), which tests the comparability of ECs and selectively incorporates them using conformal inference (Vovk et al., 2005; Lei et al., 2018). We measure the bias of each EC using a score function that can flexibly accommodate parametric or machine-learning models. We then calibrate this score to a conformal $p$ -value, which test the exchangeability of each EC. These conformal $p$ -values are valid in finite samples, distribution-free, and do not depend on the asymptotic properties of models. CSB offers three advantages: (i) individual borrowing decisions for each EC, (ii) flexibility in using parametric or machine learning models for bias estimation, and (iii) finite-sample guarantees with stable performance in small samples. + +In summary, the proposed methods leverage the two key advantages of hybrid controlled trials: (i) randomization within the RCT data allows us to use FRT to control the type I error rate, and (ii) the presence of randomized controls enables us to evaluate bias in ECs using conformal $p$ -values, selectively borrow unbiased ECs, and enhance power. We account for selection uncertainty in FRT and offer valid post-selection inference. Both FRT and CSB are model-free, distribution-free, and maintain finite-sample exact properties, allowing them to flexibly incorporate state-of-the-art machine learning methods while remaining valid for any sample size or data distribution. To ensure robust performance across varying bias magnitudes, we propose a data-adaptive procedure for determining the selection threshold to minimize the MSE of the CSB estimator. Our MSE-guided adaptive threshold offers key advantages: (i) it improves FRT power over RCT-only analysis when EC bias is negligible or detectable; when the bias is non-negligible yet difficult to detect, it may lead to power loss, though FRT still maintains valid Type I error control; (ii) it enables CSB to serve as both a powerful test statistic and an accurate ATE estimator; (iii) the em + +pirical MSE of CSB can be approximated leveraging the RCT-only estimator, making the procedure practically feasible, and we provide a non-asymptotic excess risk bound for its performance. The advantages of our approach are shown via simulations and a lung cancer RCT with ECs from the National Cancer Database. + +# 1.1. Related work + +Hybrid controlled trials aim to integrate ECs to boost RCT efficiency (Pocock, 1976). For an overview of RCT and RWD integration, see Colnet et al. (2024). A key challenge is biases in ECs, which stem from factors like selection bias, non-concurrence, and measurement error (U.S. Food and Drug Administration, 2023). Statistically, biases are categorized as measured and unmeasured confounding. Measured confounding, or covariate shift, refers to systematic differences in observed covariates between RCs and ECs. To address measured confounding, covariate balancing techniques such as matching, inverse propensity score weighting, calibration weighting, and their augmented counterparts can be employed (Li et al., 2023b; Valancius et al., 2024; Li & Luedtke, 2023). When there is unmeasured confounding between RCT and EC, a rich body of literature addresses the hidden bias through various strategies, including test-then-pool (Viele et al., 2014; Yuan et al., 2019; Li et al., 2020; Ventz et al., 2022; Liu et al., 2022; Yang et al., 2023; Gao & Yang, 2023; Dang et al., 2023), weighted combination (Chen et al., 2020; 2021a; Cheng & Cai, 2021; Li et al., 2022; Oberst et al., 2022; Rosenman et al., 2023; Chen et al., 2023; Karlsson et al., 2024), selective borrowing (Chen et al., 2021b; Li et al., 2023a; Zhai & Han, 2022; Gao et al., 2025; Huang et al., 2023), bias modeling (Stuart & Rubin, 2008; Cheng et al., 2023; Li & Jemielita, 2023; van der Laan et al., 2024; Yang et al., 2024; Gu et al., 2024), control variates or prognostic adjustment (Yang & Ding, 2020; Guo et al., 2022; Schuler et al., 2022; Gagnon-Bartsch et al., 2023), Bayesian methods (Hobbs et al., 2011; Schmidli et al., 2014; Jiang et al., 2023; Kwiatkowski et al., 2024; Alt et al., 2024; Lin et al., 2024; 2025), and sensitivity analysis (Yi et al., 2023). None of them use randomization inference or conformal inference to address unmeasured confounding in hybrid controlled trials with a small sample size. + +Randomization inference, introduced by Fisher (1935), provides finite-sample exact $p$ -values for any test statistic and is widely endorsed (Rosenberger et al., 2019; Proschan & Dodd, 2019; Young, 2019; Bind & Rubin, 2020; Carter et al., 2023). Randomization tests are useful for small sample trials or complex designs, including cluster experiments with few clusters (Rabideau & Wang, 2021) and adaptive experiments (Simon & Simon, 2011; Plamadeala & Rosenberger, 2012; Nair & Janson, 2023; Freidling et al., 2024). Randomization tests have appeared in regulatory guidance documents to ensure type I error rate control in adaptive + +designs when conventional statistical methods fail (European Medicines Agency, 2015; U.S. Food and Drug Administration, 2019; Carter et al., 2023). For an overview of randomization inference, see Zhang & Zhao (2023) and Ritzwoller et al. (2024). Nevertheless, the randomization inference hasn't been applied to hybrid controlled trials, especially with selective borrowing to address unmeasured confounding. + +Conformal inference, or conformal prediction, is a model-free method providing finite-sample valid uncertainty quantification for individual predictions (Vovk et al., 2005), particularly useful in high-stakes scenarios with black-box machine learning models (Angelopoulos & Bates, 2023). Two main applications are most relevant to this paper. The first involves using conformal inference to infer individual treatment effects (Chernozhukov et al., 2021; Lei & Candès, 2021). The second line is in outlier detection (Guan & Tibshirani, 2022; Bates et al., 2023; Liang et al., 2024). These studies inspire us to treat biased ECs as outliers and use conformal $p$ -values to test their exchangeability. Our primary goal, however, is to boost FRT power by selectively borrowing unbiased ECs with conformal $p$ -values. The adaptive selection threshold that minimized the estimator's MSE is also a novel approach. + +# 2. Randomization inference framework + +# 2.1. Preliminaries + +Consider $n_{\mathcal{R}}$ patients in the RCT, $n_{\mathcal{E}}$ patients in the EC group, and $n = n_{\mathcal{R}} + n_{\mathcal{E}}$ patients in total. Let $S = 1$ for patients in RCT and $S = 0$ for patients in the EC group. Let $A$ denote the binary treatment, where $A = 1$ stands for treatment and $A = 0$ stands for control. We denote $\mathcal{T} = \{i : A_i = 1, S_i = 1\}$ , $\mathcal{C} = \{i : A_i = 0, S_i = 1\}$ , $\mathcal{R} = \mathcal{T} \cup \mathcal{C}$ , and $\mathcal{E} = \{i : S_i = 0\}$ . Let $X$ denote the baseline covariates, $Y$ denote the observed outcome, and $Y(0)$ and $Y(1)$ denote the potential outcomes. In an RCT, we randomize $n_{\mathcal{R}}$ patients into either the treatment or control groups based on the known propensity score $e(x) = \mathbb{P}(A = 1 \mid X = x, S = 1)$ . This results in $n_1$ patients in the treatment group and $n_0$ patients in the control group. For $n_{\mathcal{E}}$ patients in the EC group, since all of them are under control, we have $A = 0$ for $S = 0$ . Let $\pi(x) = \mathbb{P}(S = 1 \mid X = x)$ denote the sampling score of participating in the RCT. We consider the average treatment effect in the RCT population as our estimand $\tau = \mathbb{E}\{Y(1) - Y(0) \mid S = 1\}$ . For RCT data, the following standard identification assumptions are considered (Imbens & Rubin, 2015). + +Assumption 2.1 (RCT identification). (i) (Consistency) $Y = AY(1) + (1 - A)Y(0)$ . (ii) (Positivity) $0 < e(x) < 1$ for all $x$ such that $f_{X|S}(x|1) > 0$ , where $f_{X|S}(x|s)$ is the conditional p.d.f. of $X$ given $S = s$ . (iii) (Randomization) + +$$ +Y (a) \perp A \mid (X, S = 1), a = 0, 1. +$$ + +Under Assumption 2.1, $\tau$ is identifiable based on RCT data. We denote the conditional outcome mean functions by $\mu_{a}(x) = \mathbb{E}(Y\mid X = x,A = a,S = 1),a = 0,1$ . We estimate $\mu_{a}(x)$ and $e(x)$ with only RCT data and denote the estimated functions by $\hat{\mu}_{a,\mathcal{R}}(x)$ and $\hat{e} (x)$ , respectively. An RCT-only doubly robust estimator of $\tau$ is + +$$ +\begin{array}{l} \hat {\tau} _ {\mathcal {R}} = \frac {1}{n _ {\mathcal {R}}} \sum_ {i = 1} ^ {n} S _ {i} \left[ \hat {\mu} _ {1, \mathcal {R}} (X _ {i}) + \frac {A _ {i}}{\hat {e} (X _ {i})} \left\{Y _ {i} - \hat {\mu} _ {1, \mathcal {R}} (X _ {i}) \right\} \right. \\ \left. - \hat {\mu} _ {0, \mathcal {R}} (X _ {i}) - \frac {1 - A _ {i}}{1 - \hat {e} (X _ {i})} \{Y _ {i} - \hat {\mu} _ {0, \mathcal {R}} (X _ {i}) \} \right], \\ \end{array} +$$ + +which is referred to as the No Borrowing (NB) approach hereafter. In RCTs, since the propensity score model $e(x)$ is known, $\hat{\tau}_{\mathcal{R}}$ is consistent and asymptotically normal regardless of whether $\mu_{a}(x)$ is correctly specified for $a = 0,1$ . Thus, $\hat{\tau}_{\mathcal{R}}$ serves as a model-assisted covariate-adjusted ATE estimator whose asymptotic variance attains the semiparametric efficiency bound if $\mu_{a}(x)$ is correctly specified for $a = 0,1$ . The efficiency of $\hat{\tau}_{\mathcal{R}}$ could be further improved by borrowing information from EC data. To incorporate EC data for estimating $\tau$ , many scholars have considered the following assumption (Li et al., 2023b). + +Assumption 2.2 (Mean exchangeability). $\mathbb{E}\{Y(0) \mid X, S = 0\} = \mathbb{E}\{Y(0) \mid X, S = 1\}$ . + +Under Assumptions 2.1 and 2.2, $\tau$ could be identified with both RCT and EC data. We estimate $\mu_0(x)$ with RCT and EC data and denote the estimated functions by $\hat{\mu}_{0,\mathcal{R} + \mathcal{E}}(x)$ . Let $\hat{\pi}_{\mathcal{E}}(x)$ denote the estimated sampling score. The variance ratio between randomized controls and ECs is denoted by $r(x) = \mathbb{V}\{Y(0)\mid X = x,A = 0,S = 1\} /\mathbb{V}\{Y(0)\mid X = x,A = 0,S = 0\}$ . Let $\hat{r}_{\mathcal{E}}(x)$ denote the estimated variance ratio. Li et al. (2023b) proposed a doubly robust estimator of $\tau$ : + +$$ +\begin{array}{l} \hat {\tau} _ {\mathcal {R} + \mathcal {E}} = \frac {1}{n _ {\mathcal {R}}} \sum_ {i = 1} ^ {n} \left[ S _ {i} \hat {\mu} _ {1, \mathcal {R}} \left(X _ {i}\right) + S _ {i} \frac {A _ {i}}{\hat {e} \left(X _ {i}\right)} \left\{Y _ {i} - \hat {\mu} _ {1, \mathcal {R}} \left(X _ {i}\right) \right\} \right. \\ \left. \left. - S _ {i} \hat {\mu} _ {0, \mathcal {R} + \mathcal {E}} (X _ {i}) - W _ {i} \{Y _ {i} - \hat {\mu} _ {0, \mathcal {R} + \mathcal {E}} (X _ {i}) \} \right] \right], \tag {1} \\ \end{array} +$$ + +$$ +W _ {i} = \hat {\pi} _ {\mathcal {E}} (X _ {i}) \frac {S _ {i} (1 - A _ {i}) + (1 - S _ {i}) \hat {r} _ {\mathcal {E}} (X _ {i})}{\hat {\pi} _ {\mathcal {E}} (X _ {i}) \{1 - \hat {e} (X _ {i}) \} + \{1 - \hat {\pi} _ {\mathcal {E}} (X _ {i}) \} \hat {r} _ {\mathcal {E}} (X _ {i})}. +$$ + +$\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ is referred to as the Full Borrowing (FB) approach hereafter. The term "Full" here refers to incorporating the full set of ECs to construct $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ , while down-weighting those ECs based on similarity measured by $X$ , thereby addressing bias caused by observed confounders. $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ is consistent and asymptotically normal if either (i) $\mu_{a}(x)$ is correctly specified for $a = 0,1$ , or (ii) both $\pi (x)$ and $e(x)$ are correctly specified. If all models for $\mu_{a}(x)$ , $a = 0,1$ , $\pi (x)$ , and $e(x)$ are correctly specified, $\hat{\tau}_{\mathcal{R}}$ achieves the semi-parametric efficiency bound. + +However, asymptotic inference for $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ may be invalid due to three main reasons: (i) it assumes $n_{\mathcal{R}} \to \infty$ , which contradicts the motivation for EC borrowing, where the sample size of the RCT is typically small; (ii) it relies on the correct specification of at least one of the two nuisance models, which may be violated because sophisticated models are difficult to work with under small sample sizes; and (iii) it depends on Assumption 2.2, which may be violated due to unmeasured confounders. To address these issues, we consider a finite-sample exact randomization inference framework that maintains strict type I error rate control even if all models are misspecified and Assumption 2.2 fails. We consider $\hat{\tau}_{\mathcal{R}}$ and $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ as candidate test statistics and propose a new class of test statistics in Section 3 to achieve improved power across various scenarios. + +# 2.2. Fisher randomization test + +In the randomization inference framework, we are conditional on the potential outcomes $Y_{i}(a)$ and covariates $X_{i}$ for $i \in \mathcal{R} \cup \mathcal{E}$ , and consider the randomized assignment $\mathbf{A} = (A_1, \ldots, A_n)$ as the sole source of randomness. Since $A_{i}$ for $i \in \mathcal{R}$ is well controlled and known in the RCT, we can leverage this advantage to guarantee the validity of inference without any additional assumptions. Let $\mathcal{A}$ denote the set of all possible assignments generated by the actual RCT design. Since all external units are under control, we have $A_{i} = 0$ for $i \in \mathcal{E}$ . Randomization inference accommodates not only Bernoulli trials with $A_{i} \stackrel{i.i.d.}{\sim}$ Bernoulli(p) for $i \in \mathcal{R}$ but also complex designs like covariate-adaptive randomization (Rosenberger & Lachin, 2015). + +Consider Fisher's sharp null hypothesis $H_0: Y_i(0) = Y_i(1), \forall i \in \mathcal{R}$ , which states no treatment effect for any units in RCT. Based on $H_0$ , we could impute all potential outcomes $Y_i^{\mathrm{imp}}(0) = Y_i^{\mathrm{imp}}(1) = Y_i$ for $i \in \mathcal{R}$ . Let $T(\mathbf{A})$ denote the test statistic, which depends on the assignment $\mathbf{A} \in \mathcal{A}$ . $T(\mathbf{A})$ could be $|\hat{\tau}_{\mathcal{R}}(\mathbf{A})|, |\hat{\tau}_{\mathcal{R} + \mathcal{E}}(\mathbf{A})|$ , or the estimator introduced in Section 3. The theoretical guarantee of type I error rate control holds for any test statistic, including those involving ECs, even if these ECs have hidden biases. This is one of the key merits of randomization inference. We define the $p$ -value for measuring the extremeness of the observed $T(\mathbf{A})$ against $H_0$ as + +$$ +p ^ {\mathrm {F R T}} = \mathbb {P} _ {\boldsymbol {A} ^ {*}} \left\{T (\boldsymbol {A} ^ {*}) \geq T (\boldsymbol {A}) \right\}, +$$ + +where $A^{*} \in \mathcal{A}$ has the same distribution as $A$ and is independent of $A$ , and $\mathbb{P}_{A^*}$ is taken over the distribution of $A^{*}$ . + +Theorem 2.3. Under $H_0$ , for $\alpha \in (0,1)$ , we have $\mathbb{P}_A(p^{\mathrm{FRT}} \leq \alpha) \leq \alpha$ , where $\mathbb{P}_A$ is taken over the distribution of $A$ . If we further assume that $T(A)$ takes distinct values for different $A \in \mathcal{A}$ , then we have $\mathbb{P}_A(p^{\mathrm{FRT}} \leq \alpha) = \lfloor \alpha |\mathcal{A}| \rfloor / |\mathcal{A}| > \alpha - 1 / |\mathcal{A}|$ , where $\lfloor x \rfloor$ represents the greatest integer less than or equal to $x$ . + +In practice, we use Monte Carlo to approximate $p^{\mathrm{FRT}}$ . Based on the RCT's actual randomization, we generate the new assignment $A_{i}^{b}$ for $i \in \mathcal{R}$ and set $A_{i}^{b} \equiv 0$ for $i \in \mathcal{E}$ since the randomization in the RCT does not affect the assignments of the ECs. A caveat is that the assignment of ECs should not be permuted, as this would violate the "analyze as you randomize" principle and compromise the validity of the FRT. The new assignment vector is denoted as $\pmb{A}^{b} = (A_{1}^{b},\dots ,A_{n}^{b})$ . We generate assignments for $B$ times and obtain $\hat{p}^{\mathrm{FRT}} = \left[\sum_{b = 1}^{B}\mathbb{I}\{T(\pmb{A}^{b}) \geq T(\pmb{A})\} +1\right] / (B + 1)$ , where the "+" term accounts for $\pmb{A}$ itself. + +Theorem 2.3 shows that FRT exactly controls the type I error rate in finite samples, regardless of Assumption 2.2, because, under $H_0$ , the reference distribution is derived from true randomization, which is well-controlled in clinical trials. However, the power of FRT heavily depends on the choice of test statistic, making it the most critical decision in randomization inference. + +# 2.3. Model-based power analysis + +There are two primary approaches for conducting a power analysis of FRT: model-based or simulation-based (Rosenberger & Lachin, 2015). We first perform a model-based power analysis under Assumption 2.2, highlighting how low variance of a consistent test statistic enhances the power of FRT. In the following section, we conduct a simulation-based power analysis for a more challenging scenario where Assumption 2.2 does not hold, showing that the bias of an inconsistent test statistic reduces the power of FRT. + +Let $M$ denote the total number of possible assignments, $F_{1,n,M}(t) = \mathbb{P}_{\mathbf{A}}(T(\mathbf{A})\leq t)$ denote the randomization distribution of $T(A)$ , and $F_{0,n,M}(t) = \mathbb{P}_{\mathbf{A}^*}(T(\mathbf{A}^*)\leq t)$ denote the reference distribution of $T(\mathbf{A}^*)$ under $H_0$ . Both $F_{1,n,M}$ and $F_{0,n,M}$ are discrete in finite samples. To apply empirical process theory and derive asymptotic rates for testing power, we assume continuous super-population distributions $F_{1,n}$ and $F_{0,n}$ , with $F_{1,n,M}$ and $F_{0,n,M}$ representing the empirical distribution functions based on $M$ independent samples drawn from $F_{1,n}$ and $F_{0,n}$ , respectively. In cases where these assumptions do not hold, FRT still controls the type I error rate, and we will investigate its power through simulation in Section 4. Based on those notations, the $p$ -value and the power can be expressed as $p^{\mathrm{FRT}} = \mathbb{P}_{\mathbf{A}^*}\{T(\mathbf{A}^*)\geq T(\mathbf{A})\} = 1 - F_{0,n,M}\big(T(\mathbf{A})\big)$ , and $\psi_{n,M} = \mathbb{P}_{\mathbf{A}}(p^{\mathrm{FRT}}\leq \alpha) = \mathbb{P}_{\mathbf{A}}\{1 - F_{0,n,M}\big(T(\mathbf{A})\big)\leq \alpha \} = 1 - F_{1,n,M}\big(F_{0,n,M}^{-1}(1 - \alpha)\big)$ . + +# Theorem 2.4. For fixed $n > 0$ , suppose + +(a) There are continuous cumulative distribution functions (c.d.f.) $F_{0,n}$ and $F_{1,n}$ , such that $F_{0,n,M}$ and $F_{1,n,M}$ are the empirical distribution functions based on $M$ independent samples drawn from $F_{0,n}$ and $F_{1,n}$ , respectively. + +(b) There is $\sigma_{n} > 0$ and a continuous c.d.f. $F$ such that $F_{0,n}(t) = F(t / \sigma_n)$ for all $t\in \mathbb{R}$ +(c) For ATE $\tau$ , $F_{1,n}(t) = F_{0,n}(t - \tau) = F\big((t - \tau) / \sigma_n\big)$ , for all $t \in \mathbb{R}$ . + +For $0 < \iota < 0.5$ and sufficiently large $M$ , + +$$ +\mathbb {E} \left(\psi_ {n, M}\right) \geq 1 - F \left(F ^ {- 1} (1 - \alpha) - \tau / \sigma_ {n}\right) - O \left(M ^ {- 0. 5 + \iota}\right), +$$ + +where $\mathbb{E}$ is over $M$ independent samples from $F_{0,n}$ and $F_{1,n}$ . + +For a given $\tau \neq 0$ , significance level $\alpha$ , and design with possible assignments $M$ , Theorem 2.4 shows that the power of the FRT also depends on the variance of the test statistic, $\sigma_{n}$ . Under Assumptions 2.1 and 2.2, and with all working models correctly specified, $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ is consistent and has a variance that is less than or equal to that of $\hat{\tau}_{\mathcal{R}}$ (Li et al., 2023b). Thus, when there is no hidden bias, using $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ as the test statistic improves the power of the FRT compared to $\hat{\tau}_{\mathcal{R}}$ , as shown in subplot (B) of Figure 1. + +# 2.4. Simulation-based power analysis + +When unmeasured confounding exists between RCT and EC data, Assumption 2.2 is violated, rendering $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ inconsistent. In such cases, asymptotic inference based on $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ is invalid and fails to control the type I error rate. In contrast, since Theorem 2.3 holds for any test statistic, FRT can still control the type I error with the inconsistent test statistic $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ , highlighting a core merit of FRTs. However, the violation of Assumption 2.2 subsequently causes Assumption (c) in Theorem 2.4 to be unfulfilled, rendering FRT with $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ unable to achieve a power improvement over FRT with $\hat{\tau}_{\mathcal{R}}$ . Furthermore, employing $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ as the test statistic results in a substantial loss of power compared to using $\hat{\tau}_{\mathcal{R}}$ , as illustrated in subplot (D) of Figure 1. + +The trade-off between $\hat{\tau}_{\mathcal{R}}$ and $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ generally arises between a causal estimator that ignores additional information and assumptions and one that incorporates them but risks bias if the assumptions fail (Rothenhäusler, 2020; Rothenhäusler et al., 2021). In the next section, instead of choosing between $\hat{\tau}_{\mathcal{R}}$ and $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ , we construct a class of ATE estimators, $\hat{\tau}_{\gamma}$ , indexed by a tuning parameter $\gamma$ and encompassing $\hat{\tau}_{\mathcal{R}}$ and $\hat{\tau}_{\mathcal{R} + \mathcal{E}}$ as special cases. We then propose a data-adaptive procedure to select $\gamma$ that minimizes the MSE of $\hat{\tau}_{\gamma}$ , thereby enhancing the power of FRT by using $\hat{\tau}_{\gamma}$ as the test statistic. + +# 3. Conformal Selective Borrowing + +# 3.1. A class of estimators + +Motivated by heterogeneous scenarios where some ECs satisfy Assumption 2.2 while others do not, we propose an + +individualized test-then-pool approach that leverages conformal inference to select comparable ECs. The conformal $p$ -value $p_j^* \in (0,1]$ is used to test the exchangeability of each EC $j \in \mathcal{E}$ . The selected EC set is then defined as $\hat{\mathcal{E}}(\gamma) = \{j \in \mathcal{E} : p_j^* > \gamma\}$ , where $\gamma \in [0,1]$ is a selection threshold. Substituting $\mathcal{E}$ with $\hat{\mathcal{E}}(\gamma)$ in (1), we obtain the Conformal Selective Borrowing (CSB) estimator: + +$$ +\begin{array}{l} \hat {\tau} _ {\gamma} = \frac {1}{n _ {\mathcal {R}}} \sum_ {i = 1} ^ {n} \left[ S _ {i} \hat {\mu} _ {1, \mathcal {R}} (X _ {i}) + S _ {i} \frac {A _ {i}}{\hat {e} (X _ {i})} \{Y _ {i} - \hat {\mu} _ {1, \mathcal {R}} (X _ {i}) \} \right. \\ \left. \left. - S _ {i} \hat {\mu} _ {0, \mathcal {R} + \hat {\mathcal {E}} (\gamma)} (X _ {i}) - V _ {i} \{Y _ {i} - \hat {\mu} _ {0, \mathcal {R} + \hat {\mathcal {E}} (\gamma)} (X _ {i}) \} \right], \right. \tag {2} \\ \end{array} +$$ + +$$ +\begin{array}{l} V _ {i} = \hat {\pi} _ {\hat {\mathcal {E}} (\gamma)} (X _ {i}) \\ \times \frac {S _ {i} (1 - A _ {i}) + (1 - S _ {i}) \mathbb {I} \{i \in \hat {\mathcal {E}} (\gamma) \} \hat {r} _ {\hat {\mathcal {E}} (\gamma)} (X _ {i})}{\hat {\pi} _ {\hat {\mathcal {E}} (\gamma)} (X _ {i}) \{1 - \hat {e} (X _ {i}) \} + \{1 - \hat {\pi} _ {\hat {\mathcal {E}} (\gamma)} (X _ {i}) \} \hat {r} _ {\hat {\mathcal {E}} (\gamma)} (X _ {i})}. \\ \end{array} +$$ + +CSB represents a class of ATE estimators: when $\gamma = 1$ , no ECs borrowed and $\hat{\mathcal{E}}(1) = \emptyset$ , we have $\hat{\tau}_1 \equiv \hat{\tau}_{\mathcal{R}}$ ; when $\gamma = 0$ , all ECs borrowed and $\hat{\mathcal{E}}(0) = \mathcal{E}$ , we have $\hat{\tau}_0 = \hat{\tau}_{\mathcal{R} + \mathcal{E}}$ . For $0 < \gamma < 1$ , $\hat{\tau}_{\gamma}$ balances the trade-off between borrowing more ECs with a smaller $\gamma$ and discarding more ECs with a larger $\gamma$ . By using $T(\mathbf{A}) = |\hat{\tau}_{\gamma}|$ as the test statistic for FRT and allowing $\hat{\mathcal{E}}(\gamma)$ to vary with resampling $\mathbf{A}$ in FRT could account for selection uncertainty and provide valid post-selection inference. The following sections introduce various conformal $p$ -values and a data-adaptive procedure for selecting $\gamma$ to minimize the MSE of $\hat{\tau}_{\gamma}$ . + +# 3.2. Conformal $p$ -value + +Split conformal $p$ -value. We first consider split conformal inference (Papadopoulos et al., 2002). We randomly split $\mathcal{C}$ into a calibration set $\mathcal{C}_1$ and a training set $\mathcal{C} \setminus \mathcal{C}_1$ according to a prespecified sample size ratio, for example, $1:3$ . We use a score function $s(x,y)$ to measure the "nonconformity" of $(x,y)$ . For example, we can use the absolute residual as the score function: $s_i = |Y_i - \hat{f}_{-C_1}(X_i)|$ for $i \in \mathcal{C}_1$ and $s_j = |Y_j - \hat{f}_{-C_1}(X_j)|$ , where $\hat{f}_{-C_1}(x)$ is a prediction model fitted by the training set $\mathcal{C} \setminus \mathcal{C}_1$ . Intuitively, if $(X_j,Y_j)$ is not exchangeable (see Remark 3.2 for a formal definition) with $\{(X_i,Y_i)\}_{i \in \mathcal{C}_1}$ , $s_j$ should be large compared to $\{s_i\}_{i \in \mathcal{C}_1}$ . Thus, we define the split conformal $p$ -value as the proportion of $\{s_i\}_{i \in \mathcal{C}_1}$ that are larger than $s_j$ , that is, $p_j^{\mathrm{split}} = \{\sum_{i \in \mathcal{C}_1} \mathbb{I}(s_i \geq s_j) + 1\} / (|\mathcal{C}_1| + 1)$ , where $\mathbb{I}$ is the indicator function, and the "+" accounts for including $s_j$ itself. If $p_j^{\mathrm{split}}$ is smaller than a threshold $\gamma$ , we reject the hypothesis of exchangeability and discard EC $j$ . The following theoretical guarantee states that if EC $j$ is exchangeable, the rejection rate is less than $\gamma$ . + +Proposition 3.1. For $j \in \mathcal{E}$ , suppose that $(X_j, Y_j)$ and $\{(X_i, Y_i)\}_{i \in \mathcal{C}}$ are exchangeable. For $\gamma \in (0,1)$ , we have + +![](images/13d9f6d34746ddebb4e96f195d9229caab51e1952d4422a09d412e922087933e.jpg) +(A) $\mathsf{H}_0$ , unbiased ECs + +(B) $\mathrm{H}_{1}$ , unbiased ECs +![](images/18fdd2ea46fa94e62a1e766837ae006fd7cb2974577c1f86b21da177883b3b4d.jpg) +Method +$= 1)$ + +![](images/7fdea5a6c38dbff733359818ad44e38b2ebe97730d11bc135da1940a8e6f1529.jpg) +Full Borrow $(\gamma = 0)$ + +![](images/063afd6ecd8b86115c92d58348e57ea931f53b60f339e70c108ac80124a32f82.jpg) +(D) $H_{1}$ , biased ECs +Figure 1. Simulated distributions of $p$ -values under $H_0$ and $H_1$ . + +$\mathbb{P}(p_j^{\mathrm{split}} \leq \gamma) \leq \gamma$ . If $s_j$ and $\{s_i\}_{i \in \mathcal{C}}$ have distinct values, we have $\mathbb{P}(p_j^{\mathrm{split}} \leq \gamma) = \left\{\lfloor \gamma(|\mathcal{C}_1| + 1) \rfloor \right\} / (|\mathcal{C}_1| + 1) > \gamma - 1 / (|\mathcal{C}_1| + 1)$ . + +Remark 3.2 (Definition of exchangeability). The random variables $z_{1}, \ldots, z_{n}$ are exchangeable if, for any permutation $\omega$ of $1, \ldots, n$ , the random variables $z_{\omega(1)}, \ldots, z_{\omega(n)}$ have the same joint distribution as $z_{1}, \ldots, z_{n}$ . The i.i.d. assumption is stronger than exchangeability, as the latter can hold with dependence (Shafer & Vovk, 2008). The exchangeability required by conformal inference is stronger than the mean exchangeability (Assumption 2.2), which allows the construction of a statistically valid estimator within the asymptotic inference framework. + +$\mathbf{CV} + p$ -value. While split conformal $p$ -values are computationally efficient, they lose statistical efficiency due to data splitting. $\mathrm{CV + }$ (Barber et al., 2021) fully utilize training data and remain computationally feasible. We randomly split $\mathcal{C}$ into $K$ disjoint folds: $\mathcal{C} = \cup_{k = 1}^{K}\mathcal{C}_{k}$ . We use the training set $\mathcal{C}\setminus \mathcal{C}_k$ to fit prediction models $\hat{f}_{-C_k}(x)$ and use the absolute residual as the score function: $s_i = |Y_i - \hat{f}_{-C_{k(i)}}(X_i)|$ and $s_j^{(i)} = |Y_j - \hat{f}_{-C_{k(i)}}(X_j)|$ for $i\in \mathcal{C}$ , where $k(i)\in \{1,\dots ,K\}$ is a function that indicates $i\in \mathcal{C}_k$ . Thus, for $i\neq i^{\prime}$ and $k(i) = k(i^{\prime})$ , we have $s_j^{(i)} = s_j^{(i')}$ . We define the $\mathrm{CV + }p$ -value as the proportion of $\{s_i\}_{i\in \mathcal{C}}$ that are larger than the corresponding $\{s_j^{(i)}\}_{i\in \mathcal{C}}$ , that is, $p_j^{\mathrm{cv + }} = \{\sum_{i\in \mathcal{C}}\mathbb{I}(s_i\geq s_j^{(i)}) + 1\} /(|\mathcal{C}| + 1)$ . + +Proposition 3.3. For $j \in \mathcal{E}$ , suppose that $(X_j, Y_j)$ and $\{(X_i, Y_i)\}_{i \in \mathcal{C}}$ are exchangeable. For $\gamma \in (0,1)$ , we have $\mathbb{P}(p_j^{\mathrm{cv + }} \leq \gamma) \leq 2\gamma + \{(1 - 2\gamma)(m - 1) - 1\} / (|\mathcal{C}| + m) < 2\gamma + (1 - K / |\mathcal{C}|) / (K + 1)$ , where $m = |\mathcal{C}| / K$ is assumed to be an integer for simplicity. + +# 3.3. Adaptive selection threshold + +Since we construct $p_j^*$ individually and make borrowing decisions collectively, one might consider choosing a selection + +threshold $\gamma$ that controls the family-wise type I error rate or false discovery rate for testing the exchangeability of all ECs (Bates et al., 2023). However, in our context, the power of the conformal tests is of greater concern. The classical test-then-pool approach has been criticized for its low power in detecting hidden bias, especially with small randomized control sample sizes (Li et al., 2020). Even with effective control of the family-wise type I error rate, low-power conformal tests can allow many biased ECs to be incorrectly borrowed, increasing the MSE of $\hat{\tau}_{\gamma}$ and reducing the power of the FRT. Therefore, we propose a data-adaptive procedure to directly minimize the MSE of $\hat{\tau}_{\gamma}$ . + +We decompose $\mathrm{MSE}(\gamma) \equiv \mathbb{E}(\hat{\tau}_{\gamma} - \tau)^2 = \{\mathbb{E}(\hat{\tau}_{\gamma}) - \tau\}^2 + \mathbb{V}(\hat{\tau}_{\gamma})$ . The main challenge lies in estimating the squared bias $\{\mathbb{E}(\hat{\tau}_{\gamma} - \tau)\}^2$ as the true $\tau$ is unknown. Fortunately, since the NB estimator $\hat{\tau}_1$ is consistent for $\tau$ , we approximate $\{\mathbb{E}(\hat{\tau}_{\gamma} - \tau)\}^2$ by $\{\mathbb{E}(\hat{\tau}_{\gamma} - \hat{\tau}_1)\}^2 = \mathbb{E}(\hat{\tau}_{\gamma} - \hat{\tau}_1)^2 - \mathbb{V}(\hat{\tau}_{\gamma} - \hat{\tau}_1)$ . We then use $(\hat{\tau}_{\gamma} - \hat{\tau}_1)^2$ to estimate $\mathbb{E}(\hat{\tau}_{\gamma} - \hat{\tau}_1)^2$ and apply bootstrap to estimate $\mathbb{V}(\hat{\tau}_{\gamma})$ and $\mathbb{V}(\hat{\tau}_{\gamma} - \hat{\tau}_1)$ . Combining these provides the estimated MSE for each $\gamma$ over finite grids, and we select the $\gamma$ that minimizes it. The complete procedure is detailed in Algorithm 1. + +# Algorithm 1: Adaptive Selection Threshold + +Input: Grid $\Gamma = \{0, 0.1, \dots, 1\}$ ; bootstrap times $L$ . + +for $\gamma \in \Gamma$ do + +Compute $\hat{\tau}_{\gamma}$ from the original sample. + +for $l = 1,\dots ,L$ do + +$\lfloor$ Compute $\hat{\tau}_{\gamma}^{(l)}$ from the $l$ -th bootstrap sample. + +for $\gamma \in \Gamma$ do + +Compute $\widehat{\mathbb{V}} (\hat{\tau}_{\gamma} - \hat{\tau}_{1})$ using $\hat{\tau}_{\gamma}^{(l)} - \hat{\tau}_{1}^{(l)}$ + +Compute $\widehat{\mathbb{V}} (\hat{\tau}_{\gamma})$ using $\hat{\tau}_{\gamma}^{(l)}$ + +$\widehat{\mathrm{MSE}} (\gamma) = (\hat{\tau}_{\gamma} - \hat{\tau}_{1})^{2} - \widehat{\mathbb{V}} (\hat{\tau}_{\gamma} - \hat{\tau}_{1}) + \widehat{\mathbb{V}} (\hat{\tau}_{\gamma}).$ + +Output: $\hat{\gamma} = \arg \min_{\gamma \in \Gamma}\widehat{\mathrm{MSE}} (\gamma)$ + +We theoretically analyze the procedure from a non-asymptotic perspective (Wainwright, 2019). Decomposing $\hat{\tau}_{\gamma} = \tau + \delta_{\gamma} + \epsilon_{\gamma}$ , where $\delta_{\gamma} \equiv \mathbb{E}(\hat{\tau}_{\gamma}) - \tau$ and $\mathbb{E}(\epsilon_{\gamma}) = 0$ . Let $\kappa_{\gamma}^{2} \equiv \mathbb{V}(\hat{\tau}_{\gamma} - \hat{\tau}_{1}) = \mathbb{V}(\epsilon_{\gamma} - \epsilon_{1})$ and $\sigma_{\gamma}^{2} \equiv \mathbb{V}(\hat{\tau}_{\gamma}) = \mathbb{V}(\epsilon_{\gamma})$ . + +Theorem 3.4. For fixed $n > 0$ and $\gamma \in \Gamma$ , let $\epsilon_{\gamma}$ be a centered sub-Gaussian variable with parameter $\phi_{\gamma} > 0$ , i.e., $\mathbb{E}\exp (\lambda \epsilon_{\gamma}) \leq \exp (\phi_{\gamma}^{2}\lambda^{2} / 2)$ for all $\lambda \in \mathbb{R}$ . For $\iota > 0$ , there exists $c > 0$ such that with probability at least $1 - 4\iota$ : + +$$ +\begin{array}{l} \max _ {\gamma \in \Gamma} \left| \widehat {\operatorname {M S E}} (\gamma) - \operatorname {M S E} (\gamma) \right| \leq c \Delta | \delta_ {1} | + c \Delta \Phi \sqrt {\log (| \Gamma | / \iota)} \\ + \max \left\{c \Phi^ {2} \sqrt {\log \left(| \Gamma | / \iota\right)}, c \Phi^ {2} \log \left(| \Gamma | / \iota\right) \right\} \\ + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma} - \widehat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} |, \\ \end{array} +$$ + +where $\Delta = \max_{\gamma \in \Gamma}|\delta_{\gamma}|$ , $\Phi = \max_{\gamma \in \Gamma}\phi_{\gamma}$ , $\delta_{1}$ is the bias of $\hat{\tau}_{1}$ , and $|\Gamma|$ is the cardinality of $\Gamma$ . + +Theorem 3.4 shows that the discrepancy between the estimated and true MSE vanishes if $\Delta$ is bounded and the bias of the consistent estimator $\hat{\tau}_1$ , the maximum standard deviation proxy $\Phi$ , and the variance estimation errors are sufficiently small. + +Theorem 3.5. Under the same assumptions as in Theorem 3.4, for any $\iota >0$ , there exists a constant $c > 0$ such that, with probability at least $1 - 8\iota$ , the following holds: + +$$ +\begin{array}{l} \left(\hat {\tau} _ {\hat {\gamma}} - \tau\right) ^ {2} - \min _ {\gamma \in \Gamma} \left(\hat {\tau} _ {\gamma} - \tau\right) ^ {2} \leq 2 c \Delta \left| \delta_ {1} \right| + 2 c \Delta \Phi \sqrt {\log \left(| \Gamma | / \iota\right)} \\ + 2 \max \left\{c \Phi^ {2} \sqrt {\log (| \Gamma | / \iota)}, c \Phi^ {2} \log (| \Gamma | / \iota) \right\} \\ + 2 \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + 2 \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} |. \\ \end{array} +$$ + +Theorem 3.5 provides a bound for the excess risk of $\hat{\tau}_{\hat{\gamma}}$ in comparison to the oracle estimator. Although $\hat{\tau}_{\hat{\gamma}}$ generally outperforms $\hat{\tau}_{1}$ in terms of MSE, it may exhibit excess risk in certain challenging cases, as shown in Figure 2 (C) in the simulation. This phenomenon highlights that $\hat{\tau}_{\hat{\gamma}}$ behaves similarly to the Hodges estimator (Le Cam, 1953) and to integrated estimators in data fusion (Yang et al., 2023; Oberst et al., 2022): improving upon the baseline estimator (here, the No Borrow estimator) in certain regions of the parameter space (where there is no bias in ECs) inevitably leads to worse performance in other regions (where the bias in ECs is difficult to detect). FRT still controls the type I error rate even if excess risk is present or the assumptions in Theorem 3.4 are not satisfied. + +# 4. Simulation + +We conduct simulations to evaluate the repeated sampling performance of the proposed methods under small sample sizes and varying magnitudes of hidden bias, including challenging cases where separating biased ECs is difficult. Specifically, the sample sizes for the randomized + +treatment, randomized control, and EC groups are set as $(n_{1}, n_{0}, n_{\mathcal{E}}) = (50, 25, 50)$ . Similar results for a larger EC sample size $(n_{\mathcal{E}} = 300)$ are included in the Appendix. We generate covariates $X \sim \mathrm{Unif}(-2, 2)$ with dimension $p = 2$ . The sampling indicator $S \sim \mathrm{Bernoulli}(\pi(X))$ is generated with $\pi(X) = \{1 + \exp(\eta_0 + X^{\mathrm{T}}\eta)\}^{-1}$ , where $\eta_0$ is chosen to ensure $\mathbb{E}(S) = n_{\mathcal{R}} / n$ , and $\eta = (0.1, 0.1)$ . The assignment is generated by $A \sim \mathrm{Bernoulli}(n_{1} / n_{\mathcal{R}})$ for $S = 1$ and $A = 0$ for $S = 0$ . Let $\varepsilon \sim N(0, 1)$ denote the noise. For the RCT sample $(S = 1)$ , we generate the potential outcomes as $Y(0) = X^{\mathrm{T}}\beta_0 + \varepsilon$ with $\beta_0 = (1, 1)$ , and $Y(1) = \tau_0 + X^{\mathrm{T}}\beta_1 + \varepsilon$ with $\tau_0 = 0.4$ and $\beta_1 = (2, 2)$ . For the EC sample $(S = 0)$ , we consider two scenarios: (i) the scenario without hidden bias, where $Y(0) = X^{\mathrm{T}}\beta_0 + 0.5\varepsilon$ ; (ii) the scenario where part of the ECs have hidden bias $b$ , where a random proportion $\rho$ of the ECs is biased, with $Y(0) = -b + X^{\mathrm{T}}\beta_0 + 0.5\varepsilon$ , and the remaining proportion $(1 - \rho)$ are unbiased, with $Y(0) = X^{\mathrm{T}}\beta_0 + 0.5\varepsilon$ . We consider proportions of biased ECs $\rho = 50\%$ and magnitudes of hidden bias $b = 1, 2, \ldots, 8$ . Note that hidden bias refers to bias that remains due to unmeasured confounders, even after balancing the observed covariates. Under the alternative hypothesis, the observed outcome is $Y = AY(1) + (1 - A)Y(0)$ ; under the sharp null hypothesis, the observed outcome is $Y = Y(0)$ . We consider NB, FB, and CSB with the adaptive selection threshold as estimators of $\tau$ and test statistics for FRT. We also consider Adaptive Lasso Selective Borrowing (ALSB) by Gao et al. (2025). Given its higher computational cost (approximately 10 times slower than CSB), we omit FRTs for this method and instead compare CSB+FRT with ALSB+asymptotic inference in the Appendix. CV+ $p$ -values are used with 10 folds. We set $B = 5000$ to approximate $p^{\mathrm{FRT}}$ and replicate the simulation 500 times per scenario. + +Figure 2 displays performance metrics for $b = 0,1,\dots ,8$ . In the first case $(b = 0)$ : (i) all methods exhibit negligible bias; (ii) FB and CSB reduce MSE by $42\%$ and $20\%$ , respectively, compared to NB; (iii) all methods effectively control the type I error rate; and (iv) FB and CSB increase power by $46\%$ and $45\%$ , respectively, compared to NB. In the following eight cases $(b = 1,\ldots ,8)$ : (i) FB exhibits a large bias, approximately $125\% -203\%$ of its standard deviation (SD). The absolute bias of FB decreases with $b$ when $b\geq 3$ because large $b$ values increase $\mathbb{V}\{Y(0)\mid X = x,A = 0,S = 0\}$ , causing FB to downweight ECs with small $\hat{r} (X_i)$ in (1). CSB performs better at bias control, with bias ranging from $0\% -22\%$ of its SD; (ii) compared to NB, FB increases MSE by up to $454\%$ , and CSB decreases MSE by $13\% -16\%$ except when $b = 1,2$ , where MSE increases by $1\% -18\%$ . (iii) In line with Theorem 2.3, all methods control the type I error rate well; (iv) compared to NB, FB decreases power by up to $51\%$ . In contrast, CSB increases power by $13\% -36\%$ except when $b = 2,3,4$ , where + +![](images/8837dcc82e56fbb555232d49c0899a37f925101196aa22ed2d54d07fb45196b7.jpg) + +![](images/44d281765aa7766aeaacb7a49be1b163ab4f564de7be25c03aa4a909e7a12a8b.jpg) + +![](images/f1b7a6970bfe9bbb715e2547fe425cc1b689e2adf311ebd9fbd17504e55ebb65.jpg) + +![](images/11a88fec3ceea889561ebbd741e4941811e1d94307c1b136f0b25cb325934907.jpg) + +![](images/f13708e9a85038cdec6e7c49632e22fffecee19f6b1fac1c637aa12008fb274a.jpg) + +Method No Borrow $(\gamma = 1)$ Full Borrow $(\gamma = 0)$ Conformal Selective Borrow $(\hat{\gamma})$ + +![](images/97cd6188b022475248bb0820943de4ea0b116f74c310ff431926ba48473bccee.jpg) +Figure 2. Simulation results across different hidden bias magnitudes $b$ . + +power decreases by $7\% - 20\%$ . In challenging cases where $0 < b \leq 4$ , the efficiency loss of CSB occurs because small biases make it hard to distinguish biased ECs from unbiased ECs. Such loss is inevitable when aiming to gain efficiency in scenarios without hidden bias, a phenomenon known in the transfer learning literature as the cost of transferability detection (Cai et al., 2024). This phenomenon also occurs for other data integration estimators under hidden bias (see Figure 2 in Yang et al. (2023), Figure 4 in Oberst et al. (2022), and Figure 2 in Lin et al. (2024)). Finally, we examine the selection performance of CSB. We do not expect CSB to perfectly separate biased ECs from unbiased ones due to (i) the small sample size of randomized controls and (ii) finite sample noise. As shown in Figure 2, CSB discards biased ECs and some unbiased ones that aren't sufficiently similar to randomized controls, demonstrating satisfactory selection performance. + +# 5. Real data application + +The CALGB 9633 and NCDB data. We apply the proposed methods to an RCT conducted by the Cancer and Leukemia Group B (CALGB), known as CALGB 9633, which investigated the treatment effect of adjuvant chemotherapy in patients with stage IB non-small-cell lung cancer (Strauss et al., 2008). In CALGB 9633 ( $S = 1$ ), $n_1 = 167$ patients were randomized to adjuvant chemotherapy ( $A = 1$ ), and $n_0 = 168$ were randomized to observation ( $A = 0$ ). We extract data for 11,700 patients from the National Cancer Database (NCDB) as the EC sample + +$(A = 0, S = 0)$ to improve CALGB 9633's statistical efficiency. The NCDB is a clinical oncology database sourced from hospital registry data, jointly run by the American Cancer Society and the American College of Surgeons, covering $70\%$ of U.S. cancer cases. + +RMST and pseudo-observations We use the Restricted Mean Survival Time (RMST), $Y = \min (T, t^{*})$ , as the primary endpoint, where $T$ represents the survival time and $t^{*}$ is the truncation time. RMST measures survival time up to a clinically relevant truncation point and serves as a compelling alternative to the hazard ratio when the proportional hazards assumption is violated (Hernán, 2010). We consider the difference in 3-year RMST between the treatment and control groups for the RCT population $\tau = E\{Y(1) - Y(0) \mid S = 1\}$ as the estimand, where $Y(a) = \min \{T(a), 3\}$ and $T(a)$ is the potential survival time, $a = 0, 1$ . Five baseline covariates in CALGB 9633 and NCDB are considered: sex, age, race, histology, and tumor size. The censoring rates of $T$ in CALGB 9633 and NCDB are $42\%$ and $48\%$ , respectively. We use a "once-for-all" approach to transform right-censored survival times into pseudo-observations for RMST, allowing standard causal inference methods as if outcomes were non-censored (Andersen et al., 2003; Overgaard et al., 2017). To address covariate-dependent censoring, we stratified by sex, race, and histology, applying transformations separately within each dataset (Andersen & Pohar Perme, 2010). The stratified Kaplan-Meier estimator is used to estimate survival functions, with pseudo-observations generated via the jack + +Table 1. Analysis results for CALGB 9633 + NCDB. + +
MethodEstSECIAsym pExact p#EC
No Borrow (Dif-in-Means)0.1350.072(-0.007, 0.276)0.0620.0600
No Borrow (AIPW)0.1420.074(-0.003, 0.286)0.0550.0510
Full Borrow0.2410.061(0.122, 0.361)<0.0010.031335
Conformal Selective Borrow0.1380.058(0.024, 0.252)0.0180.046264
+ +"Est" is the estimate. "SE", "CI", and "Asym $p$ " are the asymptotic standard error, confidence interval, and $p$ -value, respectively. "Exact $p$ " is the exact $p$ -value. "#EC" is the number of borrowed ECs. + +knife method, as implemented in the R package eventglm (Sachs & Gabriel, 2022). We treat the pseudo-observations for 3-year RMST as the outcome hereafter. More details about the real data are provided in Appendix Section D. + +Data analysis. We apply NB, FB, and CSB to estimate the ATE and perform FRTs. For comparison, we also apply NB without covariate adjustment, i.e., difference-in-means estimator. In addition to the proposed exact $p$ -value, we also compute the standard error, confidence interval, and $p$ -value based on asymptotic inference for all approaches (Li et al., 2023b). Since the outcome shows a high proportion of truncation at 3 years, resulting in a highly skewed distribution, we apply the conformal quantile regression (Romano et al., 2019) to compute the conformal score. We use the Jackknife+ $p$ -value (Barber et al., 2021) to achieve a better balance between statistical and computational efficiency. Table 1 presents the analysis results. For NB using Dif-in-Means and AIPW, asymptotic and exact $p$ -values range from 0.051 to 0.062. In contrast, FB (using all 335 ECs) gives an asymptotic $p$ -value of $< 0.001$ and an exact $p$ -value of 0.031, indicating a significantly positive ATE. Similarly, CSB (using 178 ECs) shows an asymptotic $p$ -value of 0.018 and an exact $p$ -value of 0.046, also indicating a significantly positive ATE. The ATE estimate from CSB falls between NB and FB, indicating a trade-off between these two approaches. + +# 6. Discussion + +This paper proposes using FRT in hybrid controlled trials and introduces CSB for selectively incorporating comparable ECs, mitigating hidden bias. FRT with CSB maintains type I error control and improves power compared to RCT-only analysis. The proposed CSB estimator with an adaptive selection threshold enhances efficiency over the NB approach. + +One limitation of our procedure is that, when the bias is nonnegligible yet difficult to detect, it may incur some power loss, though it still maintains valid Type I error control. This no-free-lunch limitation is acknowledged in existing papers (Oberst et al., 2022; Lin et al., 2024), which point out that without assuming mean exchangeability of ECs, no + +method can uniformly and significantly outperform RCT-only analysis across varying levels of hidden bias, although different approaches optimize the risk-reward trade-off from different perspectives. The most challenging scenarios are those where bias is non-negligible but complex to correct or difficult to detect. Our key distinctions from existing literature are twofold: (i) we prioritize exact Type I error control in small samples before seeking power gains; (ii) we optimize the risk-reward trade-off between no borrowing and full borrowing through conformal selective borrowing, motivated by real data in which some ECs are unbiased while others are not. + +Heterogeneity among data sources is common in integration and transfer learning, often leading to bias or efficiency loss even after balancing measured confounders. While penalized bias estimation is a common solution, our work demonstrates that conformal inference provides greater stability and flexibility in finite samples. Extending this approach to tasks like developing individual treatment regimes (Chu et al., 2023), exploring treatment effect heterogeneity (Wu & Yang, 2022), and improving experimental design (Ruan et al., 2024) shows great potential. + +Beyond the sharp null, FRTs can test the weak null asymptotically using studentized or prepivoted statistics (Wu & Ding, 2021; Cohen & Fogarty, 2022). Randomization-based confidence intervals can be constructed by inverting FRTs (Luo et al., 2021; Zhu & Liu, 2023; Fiksel, 2024), and randomization inference can test bounded nulls and construct confidence intervals for treatment effect quantiles (Caughey et al., 2023). Extending these methods to hybrid controlled trials would be valuable. + +# Software and Data + +A user-friendly R package, intFRT, is available at: https://github.com/ke-zhu/intFRT. + +# Acknowledgment + +We thank the anonymous reviewers and meta-reviewers of ICML 2025 for their helpful comments, which significantly + +improved the manuscript. This project is supported by the Food and Drug Administration (FDA) of the U.S. Department of Health and Human Services (HHS) as part of a financial assistance award U01FD007934 totaling $1,674,013 over two years funded by FDA/HHS. It is also supported by the National Institute On Aging of the National Institutes of Health under Award Number R01AG06688, totaling$ 1,565,763 over four years. The contents are those of the authors and do not necessarily represent the official views of, nor an endorsement by, FDA/HHS, the National Institutes of Health, or the U.S. Government. + +# Impact Statement + +This paper presents work aimed at advancing data integration, conformal inference, and their applications in biomedical science. The potential societal impact of this research is substantial, including fostering the reliable and efficient use of real-world data, accelerating drug development processes, improving the understanding of rare diseases, and ultimately enhancing patient outcomes. + +# References + +Alt, E. M., Chang, X., Jiang, X., Liu, Q., Mo, M., Xia, H. A., and Ibrahim, J. G. LEAP: The latent exchangeability prior for borrowing information from historical data. Biometrics, 80(3):ujae083, 2024. +Andersen, P. K. and Pohar Perme, M. Pseudo-observations in survival analysis. Statistical Methods in Medical Research, 19(1):71-99, 2010. +Andersen, P. K., Klein, J. P., and Rosthøj, S. Generalised linear models for correlated pseudo-observations, with applications to multi-state models. *Biometrika*, 90(1): 15–27, 2003. +Angelopoulos, A. N. and Bates, S. Conformal prediction: A gentle introduction. Foundations and Trends® in Machine Learning, 16(4):494-591, 2023. +Barber, R. F., Candes, E. J., Ramdas, A., and Tibshirani, R. J. Predictive inference with the jackknife+. The Annals of Statistics, 49(1):486-507, 2021. +Bates, S., Candès, E., Lei, L., Romano, Y., and Sesia, M. Testing for outliers with conformal $p$ -values. The Annals of Statistics, 51(1):149-178, 2023. +Bind, M.-A. C. and Rubin, D. B. When possible, report a Fisher-exact $P$ value and display its underlying null randomization distribution. Proceedings of the National Academy of Sciences, 117(32):19151-19158, 2020. + +Cai, T., Li, M., and Liu, M. Semi-supervised triply robust inductive transfer learning. Journal of the American Statistical Association, in press, 2024. +Carter, K., Scheffold, A. L., Renteria, J., Berger, V. W., Luo, Y. A., Chipman, J. J., and Sverdlov, O. Regulatory guidance on randomization and the use of randomization tests in clinical trials: A systematic review. Statistics in Biopharmaceutical Research, 16(4):428-440, 2023. +Caughey, D., Dafoe, A., Li, X., and Miratrix, L. Randomisation inference beyond the sharp null: Bounded null hypotheses and quantiles of individual treatment effects. Journal of the Royal Statistical Society Series B: Statistical Methodology, 85(5):1471-1491, 2023. +Chen, C., Wang, M., and Chen, S. An efficient data integration scheme for synthesizing information from multiple secondary datasets for the parameter inference of the main analysis. Biometrics, 79(4):2947-2960, 2023. +Chen, S., Zhang, B., and Ye, T. Minimax rates and adaptivity in combining experimental and observational data. arXiv preprint arXiv:2109.10522, 2021a. +Chen, W.-C., Wang, C., Li, H., Lu, N., Tiwari, R., Xu, Y., and Yue, L. Q. Propensity score-integrated composite likelihood approach for augmenting the control arm of a randomized controlled trial by incorporating real-world data. Journal of Biopharmaceutical Statistics, 30(3):508-520, 2020. +Chen, Z., Ning, J., Shen, Y., and Qin, J. Combining primary cohort data with external aggregate information without assuming comparability. Biometrics, 77(3):1024-1036, 2021b. +Cheng, D. and Cai, T. Adaptive combination of randomized and observational data. arXiv preprint arXiv:2111.15012, 2021. +Cheng, Y., Wu, L., and Yang, S. Enhancing treatment effect estimation: A model robust approach integrating randomized experiments and external controls using the double penalty integration estimator. In Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence, volume 216 of Proceedings of Machine Learning Research, pp. 381-390, 2023. +Chernozhukov, V., Wüthrich, K., and Zhu, Y. An exact and robust conformal inference method for counterfactual and synthetic controls. Journal of the American Statistical Association, 116(536):1849-1864, 2021. +Chu, J., Lu, W., and Yang, S. Targeted optimal treatment regime learning using summary statistics. Biometrika, 110(4):913-931, 2023. + +Cohen, P. L. and Fogarty, C. B. Gaussian prepivoting for finite population causal inference. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84 (2):295-320, 2022. +Colnet, B., Mayer, I., Chen, G., Dieng, A., Li, R., Varoquaux, G., Vert, J.-P., Josse, J., and Yang, S. Causal inference methods for combining randomized trials and observational studies: A review. Statistical Science, 39 (1):165-191, 2024. +Dang, L. E., Tarp, J. M., Abrahamsen, T. J., Kvist, K., Buse, J. B., Petersen, M., and van der Laan, M. A cross-validated targeted maximum likelihood estimator for data-adaptive experiment selection applied to the augmentation of RCT control arms with external data. arXiv preprint arXiv:2210.05802v3, 2023. +European Medicines Agency. Guideline on adjustment for baseline covariates in clinical trials. https://www.ema.europa.eu/en/adjustment-baseline-covariates-clinica 2015. +Fiksel, J. On exact randomization-based covariate-adjusted confidence intervals. Biometrics, 80(2):ujae051, 2024. +Fisher, R. A. The Design of Experiments. Oliver and Boyd, Edinburgh, 1st edition, 1935. +Freidling, T., Zhao, Q., and Gao, Z. Selective randomization inference for adaptive experiments. arXiv preprint arXiv:2405.07026, 2024. +Gagnon-Bartsch, J. A., Sales, A. C., Wu, E., Botelho, A. F., Erickson, J. A., Miratrix, L. W., and Heffernan, N. T. Precise unbiased estimation in randomized experiments using auxiliary observational data. Journal of Causal Inference, 11(1):20220011, 2023. +Gao, C. and Yang, S. Pretest estimation in combining probability and non-probability samples. Electronic Journal of Statistics, 17(1):1492-1546, 2023. +Gao, C., Yang, S., Shan, M., Ye, W., Lipkovich, I., and Faries, D. Improving randomized controlled trial analysis via data-adaptive borrowing. Biometrika, 112(2):asae069, 2025. +Gu, Y., Liu, H., and Ma, W. Incorporating external data for analyzing randomized clinical trials: A transfer learning approach. arXiv preprint arXiv:2409.04126, 2024. +Guan, L. and Tibshirani, R. Prediction and outlier detection in classification problems. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84(2):524-546, 2022. + +Guo, W., Wang, S. L., Ding, P., Wang, Y., and Jordan, M. Multi-source causal inference using control variates under outcome selection bias. Transactions on Machine Learning Research, 2022. ISSN 2835-8856. URL https://openreview.net/forum?id=CrimIjBa64. +Hernan, M. A. The hazards of hazard ratios. Epidemiology, 21(1):13-15, 2010. +Ho, D., Imai, K., King, G., and Stuart, E. A. Matchit: Nonparametric preprocessing for parametric causal inference. Journal of Statistical Software, 42(8):1-28, 2011. +Ho, D. E., Imai, K., King, G., and Stuart, E. A. Matching as nonparametric preprocessing for reducing model dependence in parametric causal inference. Political Analysis, 15(3):199-236, 2007. +Hobbs, B. P., Carlin, B. P., Mandrekar, S. J., and Sargent, D. J. Hierarchical commensurate and power prior models for adaptive incorporation of historical information in clinical trials. Biometrics, 67(3):1047-1056, 2011. +trials-scientific-guideline, +Huang, Y., Huang, C.-Y., and Kim, M.-O. Simultaneous selection and incorporation of consistent external aggregate information. Statistics in Medicine, 42(30):5630-5645, 2023. +Imbens, G. W. and Rubin, D. B. Causal Inference in Statistics, Social, and Biomedical Sciences. Cambridge University Press, 2015. +Jiang, L., Nie, L., and Yuan, Y. Elastic priors to dynamically borrow information from historical data in clinical trials. Biometrics, 79(1):49-60, 2023. +Karlsson, R., Wang, G., Krijthe, J. H., and Dahabreh, I. J. Robust integration of external control data in randomized trials. arXiv preprint arXiv:2406.17971, 2024. +Kwiatkowski, E., Zhu, J., Li, X., Pang, H., Lieberman, G., and Psioda, M. A. Case weighted power priors for hybrid control analyses with time-to-event data. Biometrics, 80 (2):ujae019, 2024. +Le Cam, L. On some asymptotic properties of maximum likelihood estimates and related Bayes estimates. University of California Publications in Statistics, 1:277-330, 1953. +Lei, J., G'Sell, M., Rinaldo, A., Tibshirani, R. J., and Wasserman, L. Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523):1094-1111, 2018. +Lei, L. and Candès, E. J. Conformal inference of counterfactuals and individual treatment effects. Journal of the Royal Statistical Society Series B: Statistical Methodology, 83(5):911-938, 2021. + +Li, H., Tiwari, R., and Li, Q. H. Conditional borrowing external data to establish a hybrid control arm in randomized clinical trials. Journal of Biopharmaceutical Statistics, 32(6):954-968, 2022. +Li, L. and Jemielita, T. Confounding adjustment in the analysis of augmented randomized controlled trial with hybrid control arm. Statistics in Medicine, 42(16):2855-2872, 2023. +Li, R., Lin, R., Huang, J., Tian, L., and Zhu, J. A frequentist approach to dynamic borrowing. Biometrical Journal, 65 (7):2100406, 2023a. +Li, S. and Luedtke, A. Efficient estimation under data fusion. Biometrika, 110(4):1041-1054, 2023. +Li, W., Liu, F., and Snavely, D. Revisit of test-then-pool methods and some practical considerations. Pharmaceutical Statistics, 19(5):498-517, 2020. +Li, X., Miao, W., Lu, F., and Zhou, X.-H. Improving efficiency of inference in clinical trials with external control data. Biometrics, 79(1):394-403, 2023b. +Liang, Z., Sesia, M., and Sun, W. Integrative conformal $p$ -values for out-of-distribution testing with labelled outliers. Journal of the Royal Statistical Society Series B: Statistical Methodology, pp. qkad138, 2024. +Lin, X., Tarp, J. M., and Evans, R. J. Data fusion for efficiency gain in ATE estimation: A practical review with simulations. arXiv preprint arXiv:2407.01186, 2024. +Lin, X., Tarp, J., and Evans, R. Combining experimental and observational data through a power likelihood. Biometrics, 2025. +Liu, Y., Lu, B., Foster, R., Zhang, Y., Zhong, Z. J., Chen, M.-H., and Sun, P. Matching design for augmenting the control arm of a randomized controlled trial using real-world data. Journal of Biopharmaceutical Statistics, 32 (1):124-140, 2022. +Luo, X., Dasgupta, T., Xie, M., and Liu, R. Y. Leveraging the Fisher randomization test using confidence distributions: Inference, combination and fusion learning. Journal of the Royal Statistical Society Series B: Statistical Methodology, 83(4):777-797, 2021. +Miller, F. and Joffe, S. Equipoise and the dilemma of randomized clinical trials. The New England Journal of Medicine, 364(5):476-480, 2011. +Nair, Y. and Janson, L. Randomization tests for adaptively collected data. arXiv preprint arXiv:2301.05365, 2023. + +Oberst, M., D'Amour, A., Chen, M., Wang, Y., Sontag, D., and Yadowsky, S. Understanding the risks and rewards of combining unbiased and possibly biased estimators, with applications to causal inference. arXiv preprint arXiv:2205.10467, 2022. +Overgaard, M., Parner, E. T., and Pedersen, J. Asymptotic theory of generalized estimating equations based on jackknife pseudo-observations. The Annals of Statistics, 45 (5):1988-2015, 2017. +Papadopoulos, H., Proedrou, K., Vovk, V., and Gammerman, A. Inductive confidence machines for regression. In Machine learning: ECML 2002: 13th European conference on machine learning Helsinki, Finland, August 19-23, 2002 proceedings 13, pp. 345-356. Springer, 2002. +Plamadeala, V. and Rosenberger, W. F. Sequential monitoring with conditional randomization tests. The Annals of Statistics, 40(1):30-44, 2012. +Pocock, S. J. The combination of randomized and historical controls in clinical trials. Journal of Chronic Diseases, 29(3):175-188, 1976. +Proschan, M. A. and Dodd, L. E. Re-randomization tests in clinical trials. Statistics in Medicine, 38(12):2292-2302, 2019. +Puelz, D., Basse, G., Feller, A., and Toulis, P. A graph-theoretic approach to randomization tests of causal effects under general interference. Journal of the Royal Statistical Society Series B: Statistical Methodology, 84 (1):174-204, 2022. +Rabideau, D. J. and Wang, R. Randomization-based confidence intervals for cluster randomized trials. Biostatistics, 22(4):913-927, 2021. +Ritzwoller, D. M., Romano, J. P., and Shaikh, A. M. Randomization inference: Theory and applications. arXiv preprint arXiv:2406.09521, 2024. +Romano, Y., Patterson, E., and Candès, E. J. Conformalized quantile regression. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 3543-3553, 2019. +Rosenberger, W. F. and Lachin, J. M. Randomization in Clinical Trials: Theory and Practice. John Wiley & Sons, 2015. +Rosenberger, W. F., Uschner, D., and Wang, Y. Randomization: The forgotten component of the randomized clinical trial. Statistics in Medicine, 38(1):1-12, 2019. +Rosenman, E. T., Basse, G., Owen, A. B., and Baiocchi, M. Combining observational and experimental datasets + +using shrinkage estimators. Biometrics, 79(4):2961-2973, 2023. +Rothenhausler, D. Model selection for estimation of causal parameters. arXiv preprint arXiv:2008.12892, 2020. +Rothenhausler, D., Meinshausen, N., Buhlmann, P., and Peters, J. Anchor regression: Heterogeneous data meet causality. Journal of the Royal Statistical Society Series B: Statistical Methodology, 83(2):215-246, 2021. +Ruan, X., Wang, J., Wang, Y., and Wei, W. Electronic medical records assisted digital clinical trial design. In Proceedings of The 27th International Conference on Artificial Intelligence and Statistics, volume 238 of Proceedings of Machine Learning Research, pp. 2836-2844, 2024. +Sachs, M. C. and Gabriel, E. E. Event history regression with pseudo-observations: computational approaches and an implementation in R. Journal of Statistical Software, 102:1-34, 2022. +Schmidli, H., Gsteiger, S., Roychoudhury, S., O'Hagan, A., Spiegelhalter, D., and Neuenschwander, B. Robust meta-analytic-predictive priors in clinical trials with historical control information. Biometrics, 70(4):1023-1032, 2014. +Schuler, A., Walsh, D., Hall, D., Walsh, J., Fisher, C., for Alzheimer's Disease, C. P., Initiative, A. D. N., and Study, A. D. C. Increasing the efficiency of randomized trial estimates via linear adjustment for a prognostic score. The International Journal of Biostatistics, 18(2):329-356, 2022. +Shafer, G. and Vovk, V. A tutorial on conformal prediction. Journal of Machine Learning Research, 9(3):371-421, 2008. +Simon, R. and Simon, N. R. Using randomization tests to preserve type I error with response adaptive and covariate adaptive randomization. Statistics & Probability Letters, 81(7):767-772, 2011. +Strauss, G. M., Herndon, J. E., Maddaus, M. A., Johnstone, D. W., Johnson, E. A., Harpole, D. H., Gillenwater, H. H., Watson, D. M., Sugarbaker, D. J., Schilsky, R. L., et al. Adjuvant paclitaxel plus carboplatin compared with observation in stage IB non-small-cell lung cancer: CALGB 9633 with the cancer and leukemia group B, radiation therapy oncology group, and north central cancer treatment group study groups. Journal of Clinical Oncology, 26(31):5043-5051, 2008. +Stuart, E. A. and Rubin, D. B. Matching with multiple control groups with adjustment for group differences. Journal of Educational and Behavioral Statistics, 33(3): 279-306, 2008. + +U.S. Food and Drug Administration. Adaptive design clinical trials for drugs and biologics guidance for industry. https://www.fda.gov/media/78495/download, 2019. +U.S. Food and Drug Administration. Rare Diseases at FDA. https://www.fda.gov/patients/rare-diseases-fda, 2022. +U.S. Food and Drug Administration. Considerations for the design and conduct of externally controlled trials for drug and biological products guidance for industry. https://www.fda.gov/media/164960/download, 2023. +Valancius, M., Pang, H., Zhu, J., Cole, S. R., Funk, M. J., and Kosorok, M. R. A causal inference framework for leveraging external controls in hybrid trials. Biometrics, 80(4):ujae095, 2024. +van der Laan, M., Qiu, S., and van der Laan, L. AdaptiveTMLE for the average treatment effect based on randomized controlled trial augmented with real-world data. arXiv preprint arXiv:2405.07186, 2024. +Ventz, S., Khozin, S., Louv, B., Sands, J., Wen, P. Y., Rahman, R., Comment, L., Alexander, B. M., and Trippa, L. The design and evaluation of hybrid controlled trials that leverage external data and randomization. Nature Communications, 13(1):5783, 2022. +Viele, K., Berry, S., Neuenschwander, B., Amzal, B., Chen, F., Enas, N., Hobbs, B., Ibrahim, J. G., Kinnersley, N., Lindborg, S., et al. Use of historical control data for assessing treatment effects in clinical trials. Pharmaceutical Statistics, 13(1):41-54, 2014. +Vovk, V., Gammerman, A., and Shafer, G. Algorithmic Learning in a Random World, volume 29. Springer, 2005. +Wainwright, M. J. High-dimensional statistics: A nonasymptotic viewpoint, volume 48. Cambridge University Press, 2019. +Wu, J. and Ding, P. Randomization tests for weak null hypotheses in randomized experiments. Journal of the American Statistical Association, 116(536):1898-1913, 2021. +Wu, L. and Yang, S. Integrative $R$ -learner of heterogeneous treatment effects combining experimental and observational studies. In Proceedings of the First Conference on Causal Learning and Reasoning, volume 177 of Proceedings of Machine Learning Research, pp. 904-926, 2022. +Yang, S. and Ding, P. Combining multiple observational data sources to estimate causal effects. Journal of the + +American Statistical Association, 115(531):1540-1554, 2020. +Yang, S., Gao, C., Zeng, D., and Wang, X. Elastic integrative analysis of randomised trial and real-world data for treatment heterogeneity estimation. Journal of the Royal Statistical Society Series B: Statistical Methodology, 85 (3):575-596, 2023. +Yang, S., Liu, S., Zeng, D., and Wang, X. Data fusion methods for the heterogeneity of treatment effect and confounding function. Bernoulli, in press, 2024. +Yi, Y., Zhang, Y., Du, Y., and Ye, T. Testing for treatment effect twice using internal and external controls in clinical trials. Journal of Causal Inference, 11(1):20220018, 2023. +Young, A. Channeling Fisher: Randomization tests and the statistical insignificance of seemingly significant experimental results. The Quarterly Journal of Economics, 134 (2):557-598, 2019. +Yuan, J., Liu, J., Zhu, R., Lu, Y., and Palm, U. Design of randomized controlled confirmatory trials using historical control data to augment sample size for concurrent controls. Journal of biopharmaceutical statistics, 29(3): 558-573, 2019. +Zhai, Y. and Han, P. Data integration with oracle use of external information from heterogeneous populations. Journal of Computational and Graphical Statistics, 31(4):1001-1012, 2022. +Zhang, Y. and Zhao, Q. What is a randomization test? Journal of the American Statistical Association, 118(544): 2928-2942, 2023. +Zhu, K. and Liu, H. Pair-switching rerandomization. Biometrics, 79(3):2127-2142, 2023. + +# A. Additional conformal $p$ -values + +Full conformal $p$ -value. Full conformal inference (Vovk et al., 2005) fully utilizes all data in $\mathcal{C}$ for both training and calibration. We can still use the absolute residual as the score function: $s_i = |Y_i - \hat{f}_j(X_i)|$ for $i \in \mathcal{C}$ and $s_j = |Y_j - \hat{f}_j(X_j)|$ , where $\hat{f}_j(x)$ is a prediction model fitted by the augmented set $\mathcal{C} \cup \{j\}$ . To measure the extremeness of observing $s_j$ under the exchangeability, we define the full conformal $p$ -value as the proportion of the elements in $\{s_i\}_{i \in \mathcal{C}}$ that are larger than or equal to $s_j$ , that is, $p_j^{\mathrm{full}} = \{\sum_{i \in \mathcal{C}} \mathbb{I}(s_i \geq s_j) + 1\} / (|\mathcal{C}| + 1)$ . + +Proposition A.1. For $j \in \mathcal{E}$ , suppose that $(X_j, Y_j)$ and $\{(X_i, Y_i)\}_{i \in \mathcal{C}}$ are exchangeable. For $\gamma \in (0, 1)$ , we have $\mathbb{P}(p_j^{\mathrm{full}} \leq \gamma) \leq \gamma$ . If $s_j$ and $\{s_i\}_{i \in \mathcal{C}}$ have distinct values, we have $\mathbb{P}(p_j^{\mathrm{full}} \leq \gamma) = \left\{ \lfloor \gamma(|\mathcal{C}| + 1) \rfloor \right\} / (|\mathcal{C}| + 1) > \gamma - 1 / (|\mathcal{C}| + 1)$ . + +To compute full conformal $p$ -values for all ECs $j \in \mathcal{E}$ , the prediction model must be refit $n_{\mathcal{E}}$ times, which is time-consuming for large EC samples. + +Jackknife+ $p$ -value. Jackknife+ $p$ -values (Barber et al., 2021) is a special case of CV+ with $K = |\mathcal{C}|$ . We use the leave-one-out training set $\mathcal{C} \setminus \{i\}$ to fit prediction models $\hat{f}_{-i}(x)$ and use the absolute residual as the score function: $s_i = |Y_i - \hat{f}_{-i}(X_i)|$ and $s_j^{(i)} = |Y_j - \hat{f}_{-i}(X_j)|$ for $i \in \mathcal{C}$ . We define the Jackknife+ $p$ -value as the proportion of $\{s_i\}_{i \in \mathcal{C}}$ that are larger than the corresponding $\{s_j^{(i)}\}_{i \in \mathcal{C}}$ , that is, $p_j^{\mathrm{jackknife} + } = \{\sum_{i \in \mathcal{C}} \mathbb{I}(s_i \geq s_j^{(i)}) + 1\} / (|\mathcal{C}| + 1)$ . + +Proposition A.2. For $j \in \mathcal{E}$ , suppose that $(X_{j}, Y_{j})$ and $\{(X_{i}, Y_{i})\}_{i \in \mathcal{C}}$ are exchangeable. For $\gamma \in (0,1)$ , we have $\mathbb{P}(p_{j}^{\mathrm{jackknife+}} \leq \gamma) \leq 2\gamma - 1 / (|\mathcal{C}| + 1) < 2\gamma$ . + +Remark A.3. The factor of 2 cannot be reduced without further assumptions, as shown by pathological cases in Barber et al. (2021), though the empirical error rate is close to $\gamma$ . + +# B. Proofs + +# B.1. Proof of Theorem 2.3 + +Proof of Theorem 2.3. Under $H_0$ , the imputed potential outcomes are the same as the true potential outcomes. Thus, the distribution of $T^{*} \equiv T(\mathbf{A}^{*})$ is the same as that of $T \equiv T(\mathbf{A})$ . With simplified notations, we have + +$$ +\mathbb {P} _ {\boldsymbol {A}} (p ^ {\mathrm {F R T}} \leq \alpha) = \mathbb {P} _ {\boldsymbol {A}} \left\{\mathbb {P} _ {\boldsymbol {A} ^ {*}} \left(T ^ {*} \geq T\right) \leq \alpha \right\}. +$$ + +In a finite sample, $A$ can take only a finite set of values, which implies that $T$ must also take on a finite set of values. Suppose these values are + +$$ +T _ {1} > \dots > T _ {m} > \dots > T _ {M}, +$$ + +and + +$$ +\mathbb {P} _ {\boldsymbol {A}} (T = T _ {m}) = \mathbb {P} _ {\boldsymbol {A} ^ {*}} (T ^ {*} = T _ {m}) = \alpha_ {m}, \quad m = 1, \dots , M. +$$ + +For $T \in \{T_1, \ldots, T_M\}$ , we have $\alpha_1 \leq \mathbb{P}_{\mathbf{A}^*}(T^* \geq T) \leq \sum_{m=1}^{M} \alpha_m = 1$ . If $0 < \alpha < \alpha_1$ , we have + +$$ +\mathbb {P} _ {\boldsymbol {A}} \left(p ^ {\mathrm {F R T}} \leq \alpha\right) = \mathbb {P} _ {\boldsymbol {A}} \left\{\mathbb {P} _ {\boldsymbol {A} ^ {*}} \left(T ^ {*} \geq T\right) \leq \alpha \right\} = 0 \leq \alpha . +$$ + +If $\alpha_{1} \leq \alpha < 1$ , $\exists \tilde{M} \in \{1, \ldots, M - 1\}$ , such that $\sum_{m=1}^{\tilde{M}} \alpha_{m} \leq \alpha$ and $\sum_{m=1}^{\tilde{M} + 1} \alpha_{m} > \alpha$ . Then, we have + +$$ +\mathbb {P} _ {\boldsymbol {A}} (p ^ {\mathrm {F R T}} \leq \alpha) = \mathbb {P} _ {\boldsymbol {A}} \left\{\mathbb {P} _ {\boldsymbol {A} ^ {*}} (T ^ {*} \geq T) \leq \alpha \right\} = \mathbb {P} _ {\boldsymbol {A}} \left\{T \in \{T _ {1}, \ldots , T _ {\bar {M}} \} \right\} = \sum_ {m = 1} ^ {\tilde {M}} \alpha_ {m} \leq \alpha . +$$ + +If $T(\mathbf{A})$ takes distinct values for different $\mathbf{A} \in \mathcal{A}$ , $p^{\mathrm{FRT}}$ is uniformly distributed: + +$$ +\mathbb {P} _ {\boldsymbol {A}} \left(p ^ {\mathrm {F R T}} = \frac {a}{| \mathcal {A} |}\right) = \frac {1}{| \mathcal {A} |}, \quad a = 1, \dots , | \mathcal {A} |. +$$ + +Thus, we have + +$$ +\mathbb {P} _ {\boldsymbol {A}} (p ^ {\mathrm {F R T}} \leq \alpha) = \frac {\lfloor \alpha | \mathcal {A} | \rfloor}{| \mathcal {A} |} > \frac {\alpha | \mathcal {A} | - 1}{| \mathcal {A} |} = \alpha - \frac {1}{| \mathcal {A} |}. +$$ + +![](images/35b2bce09f8d43e227758e0e9c08dfd021f5c3a674415b300a566e2c612c63f2.jpg) + +Remark B.1. If $T$ is a continuous random variable, suppose its distribution function is $F(t) = P(T \leq t)$ , then the proof could be simplified as + +$$ +\begin{array}{l} \mathbb {P} _ {\boldsymbol {A}} \left\{\mathbb {P} _ {\boldsymbol {A} ^ {*}} (T ^ {*} \geq T) \leq \alpha \right\} = P \left\{1 - F (T) \leq \alpha \right\} \\ = P \left\{T \geq F ^ {- 1} (1 - \alpha) \right\} \\ = 1 - F \{F ^ {- 1} (1 - \alpha) \} \\ = \alpha . \\ \end{array} +$$ + +However, $T$ is discrete with finite values, and we provide a rigorous proof in the finite-sample setting. + +# B.2. Proof of Theorem 2.4 + +We invoke two lemmas from the Supplementary Material of Puelz et al. (2022). + +Lemma B.2 (Lemma 5 in Puelz et al. (2022)). Suppose Assumptions (b) and (c) in Theorem 2.4 hold, for some $r \in (0.5, 1 + O(\log^{-1}M))$ , we have + +$$ +\mathbb {E} \left(F _ {1, n} \left(q _ {\alpha}\right) - F _ {1, n} \left(q _ {\alpha , M}\right)\right) \geq - O \left(M ^ {- r}\right), +$$ + +Lemma B.3 (Lemma 4 in Puelz et al. (2022)). Suppose Assumption (a) of Theorem 2.4 holds, for any $0 < \iota < 0.5$ and large enough $M$ , we have + +$$ +\mathbb {E} \left(F _ {1, n, M} (z) - F _ {1, n} (z)\right) = O \left(M ^ {- 0. 5 + \iota}\right), \quad f o r a n y z \in \mathbb {R}. +$$ + +Proof of Theorem 2.4. Let $q_{\alpha, M} = F_{0,n, M}^{-1}(1 - \alpha)$ and $q_{\alpha} = F_{0,n}^{-1}(1 - \alpha)$ . Thus, we have + +$$ +\begin{array}{l} \psi_ {N, M} = 1 - F _ {1, n, M} \left(F _ {0, n, M} ^ {- 1} (1 - \alpha)\right) \\ = 1 - F _ {1, n, M} \left(q _ {\alpha , M}\right) \\ = \underbrace {1 - F _ {1 , n} \left(q _ {\alpha}\right)} _ {T _ {1}} + \underbrace {F _ {1 , n} \left(q _ {\alpha}\right) - F _ {1 , n} \left(q _ {\alpha , M}\right)} _ {T _ {2}} + \underbrace {F _ {1 , n} \left(q _ {\alpha , M}\right) - F _ {1 , n , M} \left(q _ {\alpha , M}\right)} _ {T _ {3}}. \tag {3} \\ \end{array} +$$ + +By Assumptions (b) and (c), we have + +$$ +T _ {1} = 1 - F _ {1, n} \left(F _ {0, n} ^ {- 1} (1 - \alpha)\right) = 1 - F \left(F ^ {- 1} (1 - \alpha) - \tau / \sigma_ {N}\right). +$$ + +Combined with Lemmas B.2 and B.3, we have + +$$ +\mathbb {E} \left(\psi_ {N, M}\right) \geq 1 - F \left(F ^ {- 1} (1 - \alpha) - \tau / \sigma_ {N}\right) - O \left(M ^ {- r}\right) - O \left(M ^ {- 0. 5 + \iota}\right). +$$ + +The result follows from that $r > 0.5 > 0.5 - \iota > 0$ . + +# B.3. Proof of Proposition A.1 + +Proof of Proposition A.1. Since the calibration set $(X_{i},Y_{j})_{i\in \mathcal{C}}$ and external control $(X_{j},Y_{j})$ are exchangeable, we have $(s_i)_{i\in \mathcal{C}}$ and $s_j$ are exchangeable. Thus, we have + +$$ +\begin{array}{l} \mathbb {P} \left(p _ {j} ^ {\text {f u l l}} \leq \gamma\right) = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C}} \mathbb {I} \left(s _ {i} \geq s _ {j}\right) + 1}{| \mathcal {C} | + 1} \leq \gamma\right) \\ \leq \frac {\lfloor \gamma (| \mathcal {C} | + 1) \rfloor}{| \mathcal {C} | + 1} \\ \leq \gamma , \\ \end{array} +$$ + +where the first inequality is due to exchangeability and the possibility of ties in $(s_i)_{i\in \mathcal{C}}$ and $s_j$ . + +If $s_j$ and $\{s_i\}_{i \in \mathcal{C}}$ have distinct values, $p_j^{\mathrm{full}}$ is uniformly distributed due to exchangeability. That is, + +$$ +\mathbb {P} \left(p _ {j} ^ {\text {f u l l}} = \frac {a}{| \mathcal {C} | + 1}\right) = \frac {1}{| \mathcal {C} | + 1}, \quad a = 1, \dots , | \mathcal {C} | + 1. +$$ + +Thus, we have + +$$ +\mathbb {P} \left(p _ {j} ^ {\text {f u l l}} \leq \gamma\right) = \frac {\left\lfloor \gamma \left(\left| \mathcal {C} \right| + 1\right) \right\rfloor}{\left| \mathcal {C} \right| + 1} > \frac {\gamma \left(\left| \mathcal {C} \right| + 1\right) - 1}{\left| \mathcal {C} \right| + 1} = \gamma - \frac {1}{\left| \mathcal {C} \right| + 1}. +$$ + +# B.4. Proof of Proposition 3.1 + +Proof of Proposition 3.1. Since the calibration set $(X_{i},Y_{j})_{i\in \mathcal{C}}$ and external control $(X_{j},Y_{j})$ are exchangeable, we have $(s_i)_{i\in \mathcal{C}_1}$ and $s_j$ are exchangeable. Thus, we have + +$$ +\begin{array}{l} \mathbb {P} \left(p _ {j} ^ {\text {s p l i t}} \leq \gamma\right) = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C} _ {1}} \mathbb {I} \left(s _ {i} \geq s _ {j}\right) + 1}{\left| \mathcal {C} _ {1} \right| + 1} \leq \gamma\right) \\ \leq \frac {\left\lfloor \gamma (| \mathcal {C} _ {1} | + 1) \right\rfloor}{| \mathcal {C} _ {1} | + 1} \\ \leq \gamma , \\ \end{array} +$$ + +where the first inequality is due to exchangeability and the possibility of ties in $(s_i)_{i\in \mathcal{C}_1}$ and $s_j$ + +If $s_j$ and $\{s_i\}_{i \in \mathcal{C}_1}$ have distinct values, $p_j^{\mathrm{split}}$ is uniformly distributed due to exchangeability. That is, + +$$ +\mathbb {P} \left(p _ {j} ^ {\text {s p l i t}} = \frac {a}{| \mathcal {C} _ {1} | + 1}\right) = \frac {1}{| \mathcal {C} _ {1} | + 1}, \quad a = 1, \dots , | \mathcal {C} _ {1} | + 1. +$$ + +Thus, we have + +$$ +\mathbb {P} (p _ {j} ^ {\mathrm {s p l i t}} \leq \gamma) = \frac {\lfloor \gamma (| \mathcal {C} _ {1} | + 1) \rfloor}{| \mathcal {C} _ {1} | + 1} > \frac {\gamma (| \mathcal {C} _ {1} | + 1) - 1}{| \mathcal {C} _ {1} | + 1} = \gamma - \frac {1}{| \mathcal {C} _ {1} | + 1}. +$$ + +# B.5. Proof of Proposition A.2 + +Lemma B.4. Consider a matrix $R \in \mathbb{R}^{(n + 1) \times (n + 1)}$ with elements $R_{ij}$ . Define the set + +$$ +\mathcal {S} = \left\{j \in \{1, \dots , n + 1 \}: \sum_ {i = 1} ^ {n + 1} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) (n + 1) \right\}, \quad \gamma \in (0, 1). +$$ + +Then, we have + +$$ +s \leq 2 \gamma (n + 1) - 1 < 2 \gamma (n + 1), +$$ + +where $s = |\mathcal{S}|$ + +Proof. Since + +$$ +\sum_ {i = 1} ^ {n + 1} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) (n + 1) \quad \Leftrightarrow \quad \sum_ {i = 1} ^ {n + 1} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \leq \gamma (n + 1), +$$ + +by summing over all $j \in S$ , we have + +$$ +\sum_ {j \in S} \sum_ {i = 1} ^ {n + 1} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \leq s \gamma (n + 1). +$$ + +For $i\neq j$ , since $\mathbb{I}(R_{ij}\geq R_{ji}) + \mathbb{I}(R_{ji}\geq R_{ij})\geq 1$ , we have + +$$ +\begin{array}{l} \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}} \mathbb {I} (R _ {i j} \geq R _ {j i}) = \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \neq j} \mathbb {I} (R _ {i j} \geq R _ {j i}) + s \\ \geq \frac {s (s - 1)}{2} + s. \\ \end{array} +$$ + +By combining these two inequalities, we obtain + +$$ +\begin{array}{l} \frac {s (s - 1)}{2} + s \leq \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \\ \leq \sum_ {j \in \mathcal {S}} \sum_ {i = 1} ^ {n + 1} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \\ \leq s \gamma (n + 1). \\ \end{array} +$$ + +Thus, we have + +$$ +\frac {(s - 1)}{2} + 1 \leq \gamma (n + 1) \Rightarrow s \leq 2 \gamma (n + 1) - 1 < 2 \gamma (n + 1). +$$ + +![](images/e236f0c5241695187c30cf3ac5e18a1c21348623fbfda195dfc88fa62088bb0b.jpg) + +Proof of Proposition A.2. For $i', j' \in \mathcal{C} \cup \{j\}$ , we define + +$$ +R _ {i ^ {\prime} j ^ {\prime}} = \left\{ \begin{array}{l l} + \infty & i ^ {\prime} = j ^ {\prime}, \\ \left| Y _ {i ^ {\prime}} - \hat {f} _ {- (i ^ {\prime}, j ^ {\prime})} \left(X _ {i ^ {\prime}}\right) \right| & i ^ {\prime} \neq j ^ {\prime}, \end{array} \right. +$$ + +where $\hat{f}_{-(i',j')}$ is a prediction model fitted by the leave-two-out augmented set $(\mathcal{C} \cup \{j\}) \setminus \{i',j'\}$ . For $i \in \mathcal{C}$ , since $(\mathcal{C} \cup \{j\}) \setminus \{i,j\} = \mathcal{C} \setminus \{i\}$ , we have $\hat{f}_{-i}(x) = \hat{f}_{-(i,j)}(x)$ , thereby, + +$$ +s _ {i} = | Y _ {i} - \hat {f} _ {- i} (X _ {i}) | = R _ {i j}, +$$ + +$$ +s _ {j} ^ {(i)} = | Y _ {j} - \hat {f} _ {- i} (X _ {j}) | = R _ {j i}. +$$ + +Thus, we have + +$$ +\begin{array}{l} \mathbb {P} \left(p _ {j} ^ {\text {j a c k k n i f e} +} \leq \gamma\right) = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C}} \mathbb {I} \left(s _ {i} \geq s _ {j} ^ {(i)}\right) + 1}{| \mathcal {C} | + 1} \leq \gamma\right) \\ = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C} \cup \{j \}} \mathbb {I} (R _ {i j} \geq R _ {j i})}{| \mathcal {C} | + 1} \leq \gamma\right) \\ = \mathbb {P} \left(\sum_ {i \in \mathcal {C} \cup \{j \}} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) (| \mathcal {C} | + 1)\right) \\ \leq 2 \gamma - \frac {1}{| \mathcal {C} | + 1} \\ < 2 \gamma , \\ \end{array} +$$ + +where first inequality is due to exchangeability and Lemma B.4. + +![](images/570f350d37a16af0beb2e493803884ac5324c89f13c5b1c601121ae70d6c5bf9.jpg) + +# B.6. Proof of Proposition 3.3 + +Lemma B.5. Suppose $m = n / K$ is an integer, and the $n + m$ units are evenly divided into $K + 1$ sets, denoted by $\mathcal{C}_1,\ldots ,\mathcal{C}_{K + 1}$ . Consider a matrix $R\in \mathbb{R}^{(n + m)\times (n + m)}$ with elements $R_{ij} = R_{ji}$ if $i$ and $j$ belong to the same set. Define the set + +$$ +\mathcal {S} = \left\{j \in \{1, \dots , n + m \}: \sum_ {i = 1} ^ {n + m} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) (n + 1) \right\}, \quad \gamma \in (0, 1). +$$ + +Then, we have + +$$ +s \leq 2 \gamma (n + 1) + m - 2, +$$ + +where $s = |\mathcal{S}|$ + +Proof. For $j \in S$ , by definition, we have + +$$ +\sum_ {i = 1} ^ {n + m} \mathbb {I} (R _ {i j} \geq R _ {j i}) \leq (n + m) - (1 - \gamma) (n + 1). +$$ + +Since $R_{ij} = R_{ji}$ if $i$ and $j$ belong to the same set, we have + +$$ +\begin{array}{l} \sum_ {i = 1} ^ {n + m} \mathbb {I} (R _ {i j} \geq R _ {j i}) = \sum_ {i \notin \mathcal {C} _ {k (j)}} \mathbb {I} (R _ {i j} \geq R _ {j i}) + \sum_ {i \in \mathcal {C} _ {k (j)}} \mathbb {I} (R _ {i j} \geq R _ {j i}) \\ = \sum_ {i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) + m, \\ \end{array} +$$ + +where $\mathcal{C}_{k(j)}$ is the set containing unit $j$ . Thus, we have + +$$ +\begin{array}{l} \sum_ {i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \leq (n + m) - (1 - \gamma) (n + 1) - m \\ = \gamma (n + 1) - 1. \\ \end{array} +$$ + +By summing over all $j \in S$ , we have + +$$ +\sum_ {j \in \mathcal {S}} \sum_ {i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \leq s \left\{\gamma (n + 1) - 1 \right\}. \tag {4} +$$ + +On the other hand, for $i\neq j$ , since $\mathbb{I}(R_{ij}\geq R_{ji}) + \mathbb{I}(R_{ji}\geq R_{ij})\geq 1$ , we have + +$$ +\sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \neq j} \mathbb {I} (R _ {i j} \geq R _ {j i}) \geq \frac {s (s - 1)}{2}. +$$ + +Since $R_{ij} = R_{ji}$ if $i$ and $j$ belong to the same set, we have + +$$ +\begin{array}{l} \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \neq j} \mathbb {I} (R _ {i j} \geq R _ {j i}) = \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \notin \mathcal {C} _ {k (j)}} \mathbb {I} (R _ {i j} \geq R _ {j i}) + \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \in \mathcal {C} _ {k (j)}, i \neq j} \mathbb {I} (R _ {i j} \geq R _ {j i}) \\ = \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) + \sum_ {k = 1} ^ {K + 1} \frac {s _ {k} \left(s _ {k} - 1\right)}{2}, \\ \end{array} +$$ + +where $s_k = |\mathcal{C}_k\cap \mathcal{S}|$ . Thus, we have + +$$ +\sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \geq \frac {s (s - 1)}{2} - \sum_ {k = 1} ^ {K + 1} \frac {s _ {k} \left(s _ {k} - 1\right)}{2}. \tag {5} +$$ + +By combining (4) and (5), we have + +$$ +\begin{array}{l} \frac {s (s - 1)}{2} - \sum_ {k = 1} ^ {K + 1} \frac {s _ {k} \left(s _ {k} - 1\right)}{2} \leq \sum_ {j \in \mathcal {S}} \sum_ {i \in \mathcal {S}, i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \\ \leq \sum_ {j \in \mathcal {S}} \sum_ {i \notin \mathcal {C} _ {k (j)}} \mathbb {I} \left(R _ {i j} \geq R _ {j i}\right) \\ \leq s \{\gamma (n + 1) - 1 \}. \\ \end{array} +$$ + +Since $s_k \leq m$ , we have + +$$ +\sum_ {k = 1} ^ {K + 1} \frac {s _ {k} (s _ {k} - 1)}{2} \leq \frac {s (m - 1)}{2}. +$$ + +Thus, we have + +$$ +s \leq 2 \gamma (n + 1) + m - 2. +$$ + +Proof of Proposition 3.3. We consider $m = |\mathcal{C}| / K$ is an integer for simplicity. Let $\mathcal{C}_{K + 1}$ contain $j$ and other $m - 1$ hypothetical points. For $i^{\prime}, j^{\prime} \in \cup_{k = 1}^{K + 1} \mathcal{C}_k$ , we define + +$$ +R _ {i ^ {\prime} j ^ {\prime}} = \left\{ \begin{array}{l l} + \infty & k (i ^ {\prime}) = k (j ^ {\prime}), \\ \left| Y _ {i ^ {\prime}} - \hat {f} _ {- (\mathcal {C} _ {k (i ^ {\prime})}, \mathcal {C} _ {k (j ^ {\prime})})} (X _ {i ^ {\prime}}) \right| & k (i ^ {\prime}) \neq k (j ^ {\prime}), \end{array} \right. +$$ + +where $\hat{f}_{-(\mathcal{C}_{k(i')},\mathcal{C}_{k(j'})})}$ is a prediction model fitted by the leave-two-set-out augmented set $(\cup_{k = 1}^{K + 1}\mathcal{C}_k)\setminus (\mathcal{C}_{k(i')} \cup \mathcal{C}_{k(j'}))$ . Since $\mathcal{C} = \cup_{k = 1}^{K}\mathcal{C}_k$ and $\mathcal{C}_{k(j)} = \mathcal{C}_{K + 1}$ , we have $(\cup_{k = 1}^{K + 1}\mathcal{C}_k)\setminus (\mathcal{C}_{k(i)}\cup \mathcal{C}_{k(j)}) = \mathcal{C}\setminus \mathcal{C}_{k(i)}$ for $i\in \mathcal{C}$ . Thus, for $i\in \mathcal{C}$ , we have $\hat{f}_{-}\mathcal{C}_{k(i)}(x) = \hat{f}_{-(\mathcal{C}_{k(i)},\mathcal{C}_{k(j)})}(x)$ , thereby, + +$$ +s _ {i} = | Y _ {i} - \hat {f} _ {-} \mathcal {C} _ {k (i)} (X _ {i}) | = R _ {i j}, +$$ + +$$ +s _ {j} ^ {(i)} = \left| Y _ {j} - \hat {f} _ {- \mathcal {C} _ {k (i)}} (X _ {j}) \right| = R _ {j i}. +$$ + +Thus, we have + +$$ +\begin{array}{l} \mathbb {P} \left(p _ {j} ^ {\mathrm {c v} +} \leq \gamma\right) = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C}} \mathbb {I} \left(s _ {i} \geq s _ {j} ^ {(i)}\right) + 1}{| \mathcal {C} | + 1} \leq \gamma\right) \\ = \mathbb {P} \left(\frac {\sum_ {i \in \mathcal {C} \cup \{j \}} \mathbb {I} (R _ {i j} \geq R _ {j i})}{| \mathcal {C} | + 1} \leq \gamma\right) \\ = \mathbb {P} \left(\sum_ {i \in \mathcal {C} \cup \{j \}} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) \left(| \mathcal {C} | + 1\right)\right) \\ \leq \mathbb {P} \left(\sum_ {i \in \cup_ {k = 1} ^ {K + 1} \mathcal {C} _ {k}} \mathbb {I} \left(R _ {i j} < R _ {j i}\right) \geq (1 - \gamma) (| \mathcal {C} | + 1)\right) \\ \leq \frac {2 \gamma (| \mathcal {C} | + 1) + m - 2}{| \mathcal {C} | + m} \\ \leq 2 \gamma + \frac {(1 - 2 \gamma) (m - 1) - 1}{| \mathcal {C} | + m} \\ \leq 2 \gamma + \frac {1 - K / | \mathcal {C} |}{K + 1}, \\ \end{array} +$$ + +where the second inequality is due to exchangeability and Lemma B.5. + +# B.7. Proof of Theorem 3.4 + +Proof of Theorem 3.4. Since $\epsilon_{\gamma}$ is a centered sub-Gaussian variable with parameter $\phi_{\gamma}$ , we have $\epsilon_{\gamma} - \epsilon_{1}$ as a centered sub-Gaussian variable with parameter $2\Phi$ , where $\Phi = \max_{\gamma \in \Gamma} \phi_{\gamma}$ . Moreover, we have $(\epsilon_{\gamma} - \epsilon_{1})^{2} - \kappa_{\gamma}^{2}$ is a centered sub-exponential variable with parameters $(c_{1}\Phi^{2}, c_{1}\Phi^{2})$ , where $c_{1}$ is a constant. By $\hat{\tau}_{\gamma} - \hat{\tau}_{1} = (\delta_{\gamma} - \delta_{1}) + (\epsilon_{\gamma} - \epsilon_{1})$ and using the concentration inequalities for sub-Gaussian and sub-exponential variables (Wainwright, 2019), it follows that, with probability at least $1 - 4\iota$ , + +$$ +\begin{array}{l} \max _ {\gamma \in \Gamma} \left| \left(\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}\right) ^ {2} - \left(\delta_ {\gamma} - \delta_ {1}\right) ^ {2} - \kappa_ {\gamma} ^ {2} \right| \\ = \max _ {\gamma \in \Gamma} | 2 (\delta_ {\gamma} - \delta_ {1}) (\epsilon_ {\gamma} - \epsilon_ {1}) + (\epsilon_ {\gamma} - \epsilon_ {1}) ^ {2} - \kappa_ {\gamma} ^ {2} | \\ \leq 8 \sqrt {2} \Delta \Phi \sqrt {\log (| \Gamma | / \iota)} + \max \left\{\sqrt {2} c _ {1} \Phi^ {2} \sqrt {\log (| \Gamma | / \iota)}, 2 c _ {1} \Phi^ {2} \log (| \Gamma | / \iota) \right\}, \tag {6} \\ \end{array} +$$ + +where $\Delta = \max_{\gamma \in \Gamma}|\delta_{\gamma}|$ + +By (6), it follows that, with probability at least $1 - 4\iota$ + +$$ +\begin{array}{l} \max _ {\gamma \in \Gamma} \left| \widehat {\mathrm {M S E}} (\gamma) - \mathrm {M S E} (\gamma) \right| \\ = \max _ {\gamma \in \Gamma} \left| (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) ^ {2} - \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) + \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \delta_ {\gamma} ^ {2} - \sigma_ {\gamma} ^ {2} \right| \\ \leq \max _ {\gamma \in \Gamma} \left| \left(\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}\right) ^ {2} - \kappa_ {\gamma} ^ {2} + \sigma_ {\gamma} ^ {2} - \delta_ {\gamma} ^ {2} - \sigma_ {\gamma} ^ {2} \right| + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} | \\ \leq \max _ {\gamma \in \Gamma} \left| \left(\delta_ {\gamma} - \delta_ {1}\right) ^ {2} - \delta_ {\gamma} ^ {2} \right| + c \Delta \Phi \sqrt {\log \left(| \Gamma | / \iota\right)} + \max \left\{c \Phi^ {2} \sqrt {\log \left(| \Gamma | / \iota\right)}, c \Phi^ {2} \log \left(| \Gamma | / \iota\right) \right\} \\ + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma} - \widehat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} | \\ \leq c \Delta | \delta_ {1} | + c \Delta \Phi \sqrt {\log (| \Gamma | / \iota)} + \max \left\{c \Phi^ {2} \sqrt {\log (| \Gamma | / \iota)}, c \Phi^ {2} \log (| \Gamma | / \iota) \right\} \\ + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma} - \widehat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\widehat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} |, \\ \end{array} +$$ + +where $c$ is a constant. + +# B.8. Proof of Theorem 3.5 + +Proof of Theorem 3.5. Since $\epsilon_{\gamma}$ is a centered sub-Gaussian variable with parameter $\phi_{\gamma}$ , we have $\epsilon_{\gamma}^{2} - \sigma_{\gamma}^{2}$ as a centered subexponential variable with parameter $(c_2\Phi^2, c_2\Phi^2)$ , where $c_2$ is a constant. By $\hat{\tau}_{\gamma} - \tau = \delta_{\gamma} + \epsilon_{\gamma}$ and using the concentration inequalities for sub-Gaussian and sub-exponential variables (Wainwright, 2019), it follows that, with probability at least $1 - 4\iota$ , + +$$ +\begin{array}{l} \max _ {\gamma \in \Gamma} | (\hat {\tau} _ {\gamma} - \tau) ^ {2} - \delta_ {\gamma} ^ {2} - \sigma_ {\gamma} ^ {2} | \\ = \max _ {\gamma \in \Gamma} | 2 \delta_ {\gamma} \epsilon_ {\gamma} + \epsilon_ {\gamma} ^ {2} - \sigma_ {\gamma} ^ {2} | \\ \leq 2 \sqrt {2} \Delta \Phi \sqrt {\log (| \Gamma | / \iota)} + \max \left\{\sqrt {2} c _ {2} \Phi^ {2} \sqrt {\log (| \Gamma | / \iota)}, 2 c _ {2} \Phi^ {2} \log (| \Gamma | / \iota) \right\}. \tag {7} \\ \end{array} +$$ + +By (6) and (7), it follows that, with probability at least $1 - 8t$ , + +$$ +\begin{array}{l} \max _ {\gamma \in \Gamma} \left| \widehat {\operatorname {M S E}} (\gamma) - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right| \\ = \max _ {\gamma \in \Gamma} \left| (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) ^ {2} - \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) + \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right| \\ \leq \max _ {\gamma \in \Gamma} \left| (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) ^ {2} - \kappa_ {\gamma} ^ {2} + \sigma_ {\gamma} ^ {2} - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right| + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} | \\ \leq \max _ {\gamma \in \Gamma} \left| \left(\delta_ {\gamma} - \delta_ {1}\right) ^ {2} - \delta_ {\gamma} ^ {2} \right| + c \Delta \Phi \sqrt {\log \left(| \Gamma | / \iota\right)} + \max \left\{c \Phi^ {2} \sqrt {\log \left(| \Gamma | / \iota\right)}, c \Phi^ {2} \log \left(| \Gamma | / \iota\right) \right\} \\ + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} | \\ \leq c \Delta | \delta_ {1} | + c \Delta \Phi \sqrt {\log (| \Gamma | / \iota)} + \max \left\{c \Phi^ {2} \sqrt {\log (| \Gamma | / \iota)}, c \Phi^ {2} \log (| \Gamma | / \iota) \right\} \\ + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma} - \hat {\tau} _ {1}) - \kappa_ {\gamma} ^ {2} | + \max _ {\gamma \in \Gamma} | \widehat {\mathbb {V}} (\hat {\tau} _ {\gamma}) - \sigma_ {\gamma} ^ {2} |, \tag {8} \\ \end{array} +$$ + +where $c$ is a constant. + +Since + +$$ +\left| \min _ {\gamma \in \Gamma} \widehat {\operatorname {M S E}} (\gamma) - \min _ {\gamma \in \Gamma} (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right| \leq \max _ {\gamma \in \Gamma} \left| \widehat {\operatorname {M S E}} (\gamma) - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right|, +$$ + +and + +$$ +\left| \min _ {\gamma \in \Gamma} \widehat {\mathrm {M S E}} (\gamma) - (\hat {\tau} _ {\hat {\gamma}} - \tau) ^ {2} \right| = \left| \widehat {\mathrm {M S E}} (\hat {\gamma}) - (\hat {\tau} _ {\hat {\gamma}} - \tau) ^ {2} \right| \leq \max _ {\gamma \in \Gamma} \left| \widehat {\mathrm {M S E}} (\gamma) - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right|, +$$ + +![](images/e898e6b2c7f7e4c58173a25aa91f7ef43005140d1af3a84066c0c1b711eddd1e.jpg) +Figure 3. Power curves when $b = 0$ and $b = 8$ . + +we have + +$$ +\bigl (\hat {\tau} _ {\hat {\gamma}} - \tau \bigr) ^ {2} - \min _ {\gamma \in \Gamma} (\hat {\tau} _ {\gamma} - \tau) ^ {2} \leq 2 \max _ {\gamma \in \Gamma} \left| \widehat {\mathrm {M S E}} (\gamma) - (\hat {\tau} _ {\gamma} - \tau) ^ {2} \right|. +$$ + +The result follows from (8). + +# C. Additional simulation results + +# C.1. Power curve + +For the scenario where there is no hidden bias $(b = 0)$ and another where half of the ECs exhibit hidden bias with a magnitude of $b = 8$ , we vary $\tau$ to plot the power curve, as shown in Figure 3. CSB outperforms NB in both cases, while FB demonstrates low power in the presence of hidden bias. + +# C.2. Adaptivity of the selection threshold + +Figure 4 illustrates how $\hat{\gamma}$ changes with the magnitude of $b$ : (i) When there is no bias ( $b = 0$ ), $\hat{\gamma}$ approaches 0 to borrow all ECs and maximize power; (ii) with moderate bias ( $b = 1,2,3$ ), where distinguishing between biased and unbiased ECs is challenging, $\hat{\gamma}$ increases to help discard the biased ECs; (iii) when the bias is large ( $b \geq 4$ ), $\hat{\gamma}$ decreases but remains non-zero, retaining more unbiased ECs, while easily discarding the biased ones. + +# C.3. Various selection thresholds + +Figure 5 shows the performance of the fixed selection threshold $\gamma$ and the adaptive selection threshold $\hat{\gamma}$ when $n_{\mathcal{E}} = 50$ . As discussed in Section 3.3, smaller $\gamma$ selects more ECs but risks greater bias when distinguishing between biased and unbiased ECs is difficult. This creates a power trade-off across different bias levels, similar to MSE simulation results in data integration (Yang et al., 2023; Oberst et al., 2022; Lin et al., 2024). We find that (i) CSB with $\gamma = 0.6$ improves power compared to NB, except in extreme cases like $b = 2, 3$ , where it decreases power slightly, and (ii) CSB with $\hat{\gamma}$ further improves power but also risks power loss in difficult scenarios. The power trade-off does not compromise the Type I error rate, which remains controlled with all selection thresholds. + +# C.4. Comparison to Adaptive Lasso Selective Borrowing + +Figure 6 presents the simulation results for ALSB with asymptotic inference. Unlike CSB + FRT, ALSB with asymptotic inference fails to control the type I error rate in this small sample size scenario. Additionally, CSB demonstrates better estimation and selection performance in most cases. + +![](images/d9a4759a11f4b1666b3ebaf4bd8ff11ea6857a36b25886a242273c4c0d798100.jpg) +Figure 4. $\hat{\gamma}$ versus $b$ when $n_{\varepsilon} = 50$ + +Figure 5. Simulation results for various selection threshold $\gamma$ 's when $n_{\mathcal{E}} = 50$ +![](images/09292e7b2322e787c0f88daf0445ebc168874b93a40aab87e11a45b719f4b7a4.jpg) +Method No Borrow $(\gamma = 1)$ Conformal Selective Borrow $(\gamma = 0.6)$ Conformal Selective Borrow $(\hat{\gamma})$ Conformal Selective Borrow $(\gamma = 0.8)$ Conformal Selective Borrow $(\gamma = 0.4)$ + +![](images/e74d8546559cbb47a3a4d2babf079e9445d942f61cd6a511d3aa2c7db440bb25.jpg) + +![](images/5962b80cc45d2ecfe5027af3652e8fc0779f6d0a0dc11a26bf1657039360bbb8.jpg) + +![](images/e3000f03b8156350da86bb377e4fc8e5f0ba7ba2687ec5ff408f9fb308243a7f.jpg) + +![](images/fc23941de79cc45626eede521754e9edbc0c63b3d74c3b1c088b38d7980791de.jpg) + +We further compared CSB with asymptotic inference to ALSB with asymptotic inference. Figure 7 shows that CSB+Asym Inf generally achieves better Type I error control than ALSB+Asym Inf, while performing comparably when $b = 1$ . + +We did not compare to $\mathrm{ALS} + \mathrm{FRT}$ because, while CSB is compatible with FRT, ALSB is not readily applicable due to its computational complexity. This highlights an advantage of CSB when exact finite-sample inference is desired. + +# C.5. A larger sample size of ECs + +Figures 8, 9, 10, 11, and 12 show the simulation results for $n_{\mathcal{E}} = 300$ . The conclusion is similar to that in the main text. + +# C.6. Dependent covariates with $p = 5$ + +We additionally consider $p = 5$ and $X \sim N(0, \Sigma)$ , where $\Sigma$ is a Toeplitz matrix with $\rho = 0.6$ to introduce dependence among the coordinates of $X$ . We did not consider larger $p$ since the sample size is small, with only 25 RCT controls. The simulation results (see Figure 13) show similar conclusions and demonstrate the robustness of our method. + +# D. More details about the real data + +Pseudo-observations. Figure 14 shows the pseudo-observations versus censored times for CALGB 9633 and NCDB, illustrating that (i) all pseudo-observations are less than or equal to the truncation time of 3 years; (ii) when an event occurs before 3 years, pseudo-observations are generally equal to the event time; and (iii) when censoring occurs before 3 years, pseudo-observations are typically greater than the censored time. + +Matching. We use nearest-neighbor matching to mitigate the covariate imbalance between CALGB 9633 and NCDB. Tumor size was imputed for eight missing values in CALGB 9633 using the median of 4. NCDB samples with missing values + +![](images/eeca79418eff048c22fdd7b4d878e6972cd28d4750c2ffce90193038792373c5.jpg) +(A) Absolute Bias + +(B) Variance +![](images/ea1077ba1b3956950c9bc14dcdff71c9d425e7a12c41b2b596cf9c0dd3fc7003.jpg) +Method No Borrow $(\gamma = 1)$ + +(C) MSE +![](images/64adae9d1268acf1592c80459e8f5a63282d1a94240910908ddd0854142c5f4e.jpg) +Adaptive Lasso Selective Borrow + +(D) Type I Error Rate +![](images/c11d340f125dca6b6b957974a1cb47fba88f74df55927d954843e5e434b48e4b.jpg) +Conformal Selective Borrow $(\hat{\mathcal{V}})$ + +![](images/b030cc7ecef276375f065dc99ed0d277afbbcde298450b19008faa03bec640bc.jpg) +(E) Power + +![](images/dbfdaa55a2a24e6c16574d324ba68cd6bd45b805c7726db89ac1ad7b978bee0a.jpg) +Figure 6. Comparison of CSB + FRT and ALSB + asymptotic inference when $n_{\mathcal{E}} = 50$ . + +![](images/2564f4c4959449f22866f88a2501570cad3ab1f45f2521ad89062efccc5dd688.jpg) +Figure 7. Comparison of CSB + asymptotic inference and ALSB + asymptotic inference when $n_{\mathcal{E}} = 50$ . + +![](images/c0730e062b3159f17bcac8bcc48700603389fdc6b4ece1086f04adcc20ab4be2.jpg) +Method + +![](images/2eb4bbe8f1c131c97a11245baf0a9ec2bd3e978f7b4601b17fbad2a4be4f2503.jpg) + +![](images/ed236b7752bbe519a14b0435d4cadf0be34f24e7f6375906b7fcd7844a9885bf.jpg) + +![](images/c66f5b035fa7a487eb7e4d2a27859be728d38a62e758cacb802c980f8aef6050.jpg) +$\gamma = 1)$ +AsymInf + +![](images/a29728db3aee8dc9728e7d47820a7609b52632288a086059e6073c186681164e.jpg) +Adaptive + +![](images/7adcbfc0c29e50791300c09faf900ed3163a31be9f39c796371b970ab370e676.jpg) +Selective Borrow + Asym Inf + +![](images/071ff37b72002b9efd787e94ca898998bfa54091365d1611e33bc7c13cc72297.jpg) + +![](images/dbfe13d608c277191d8b9e18b0911290d06f1be606aef04beb74d36bff004603.jpg) +Conf. + +![](images/2dc7aa1d894c3f6720faa8238b0f1bb0931ab0f775cb8ac7e1efdb5861503a64.jpg) +al S + +![](images/fc2720ac6f046e92a4066708fecac8a7abd588086715b0cd6bb874a4666face2.jpg) +ve Borrc + +![](images/8e7ef6088885f17772d8e5a97ab5649acb1178c3b8ec9ccad9ba14af9f9447f8.jpg) ++ Asym Inf + +or covariates outside the CALGB 9633 range were excluded, leaving 10,241 samples. We perform 1:1 nearest-neighbor matching using MatchIt (Ho et al., 2011), treating the sampling indicator $S$ as a "treatment" and targeting the average treatment effect on the treated (ATT). This preserves all RCT samples and matches 335 NCDB samples. Distributional balance for the baseline covariates and the estimated sampling score $\hat{\mathbb{P}}(S = 1|X)$ improves significantly after matching, with a visual comparison in Figure 15. However, certain covariates, such as tumor size, remain imbalanced, which could not be addressed by matching without resorting to methods that would undesirably discard RCT samples. This motivates the use of the doubly robust estimator in Sections 2.1 and 3. Notably, while a doubly robust estimator alone can address covariate imbalance, matching as a pre-processing step reduces reliance on correct model specification (Ho et al., 2007). A summary table of the pre-processed data is in Table 2. + +Selection performance. Figure 16 shows that, given the observed confounder $X$ , CSB tends to select ECs whose outcomes are more similar to randomized controls, reducing hidden bias that cannot be addressed by balancing $X$ alone. + +![](images/42ee6890259a8ff5f1f851e57e274b0f186c68fdaa59687a4ff0763b809db49f.jpg) +(A) Absolute Bias + +(B) Variance +![](images/b8cd3bfe0d759b6af5caf1db2c106efb4681d9cd05027c613781b3e54d79b364.jpg) +Method No Borrow $(\gamma = 1)$ Full Borrow $(\gamma = 0)$ Conformal Selective Borrow $(\hat{\gamma})$ + +![](images/badd1bb15fca7dcc7c266b69b4e9db0ddfbdcbe74dd7bf04af100119e70c5759.jpg) +(C) MSE + +![](images/bb318f25d951c7694c7a1fc02b68da386778fe3397ed2185e23e8cff07999515.jpg) +(D) Type I Error Rate + +![](images/6a6b33103abd06b9ff2065b9d9fc88f2f16f91102fba640b99bffe199eff1301.jpg) +(E) Power + +![](images/9a749043725d5300d8759bc0c7be1b11a03269f5bad726352f86299b80a1c7d4.jpg) +Figure 8. Simulation results when $n_{\varepsilon} = 300$ . ALSB's exact $p$ -value is unavailable due to computation. + +![](images/4d9b461c0eac82fee395b9037c28060df3cd9a5d8a2966249d55834c35ba557d.jpg) +Figure 9. Selection performance of CSB $(\hat{\gamma})$ when $n_{\mathcal{E}} = 300$ +Figure 10. $\hat{\gamma}$ versus $b$ when $n_{\mathcal{E}} = 300$ + +![](images/5918176f4d93f76e9cd9b66e2272f7f1d8cfdcba6b7e943cb78b864856db414f.jpg) +(A) Absolute Bias +Figure 11. Simulation results for various selection threshold $\gamma$ 's when $n_{\mathcal{E}} = 300$ + +(B) Variance +![](images/82d608705d0c131ea5ad712973a3c36ed74c6559ff7598142c96a0d1b821e980.jpg) +No Borrow $(\gamma = 1)$ +Conformal Selective Borrow $(\gamma = 0.8)$ + +(C) MSE +![](images/a6cd1b08d61a4c53265d6653f5f0dd62646d7e0138b181f251dab02992cdb30a.jpg) +Conformal Selective Borrow $(\gamma = 0.6)$ +Conformal Selective Borrow $(\gamma = 0.4)$ + +(D) Type I Error Rate +![](images/469380741d61f228086bb7d4c5ac02afc98bed033ff2f38e66c8f1fd651a5cb1.jpg) +Conformal Selective Borrow (Y) + +![](images/613500f16e1016efc8b06479c0199d60b70af1ec8dd3e047dbe79439c815c20d.jpg) +(E) Power + +![](images/0136d122d37f6bcc5bf14dfe586077c77072deac3efa7560aa8a9fa54d79f296.jpg) +Figure 12. Comparison of CSB + FRT and ALSB + asymptotic inference when $n_{\varepsilon} = 300$ . + +![](images/5d672add5559d2456058c9e0b88189d3c1bc9e1d17094933f252c21ccc2dcd50.jpg) +Method No Borrow $(\gamma = 1)$ + +![](images/3dd65470d378a44d65790dc29a061a901a3fd41d7be7be97b4ee0cabd63e2340.jpg) +Adaptive Lasso Selective Borrow + +![](images/caf6202899ddb9eaff87e4d9a745be544eb47ce2698b9ef1c7bdbc4cd5587986.jpg) +Conformal Selective Borrow $(\hat{\gamma})$ + +![](images/0cf374acd0821fe63082bbfbe2b537f6440dcab734739547e16d34b6f526a595.jpg) + +![](images/ac7d5dfc5bc44f1880275e9b2da811edd1c868b614cd9aa536a5b28361f39638.jpg) +Figure 13. Simulation results across different hidden bias magnitudes $b$ for dependent covariates with $p = 5$ . + +![](images/16530a6ef7a2ae15d1f4bfc6d7f5868125e23cbe761fd190dc759579ae9b9af8.jpg) +Method No Borrow $(\gamma = 1)$ Full Borrow $(\gamma = 0)$ Conformal Selective Borrow $(\hat{\gamma})$ + +![](images/d2b46713a5b99d8f97d47819725d0be0bffaa53ddfc0ebe674faca80665fc924.jpg) + +![](images/21f1b2bf670fedbc9ab0963b441ce9d30238033b03dd3d90c51abd1813a59b2e.jpg) + +![](images/2c91a3dba59e42ecec5f1261b19e9e6e96d78585307cb631da40e1eae33a3d4d.jpg) + +Table 2. Summary statistics of the pre-processed data. + +
C9633 Treated (n1=167)C9633 Controlled (n0=168)NCDB Controlled (nε=335)
Sex
Male109 (65.3%)106 (63.1%)219 (65.4%)
Female58 (34.7%)62 (36.9%)116 (34.6%)
Age (years)
Mean (SD)60.4 (10.2)61.2 (9.28)60.8 (9.69)
Median [Min, Max]61.0 [34.0, 78.0]62.0 [40.0, 81.0]61.0 [34.0, 80.0]
Race
White151 (90.4%)148 (88.1%)300 (89.6%)
Non-white16 (9.6%)20 (11.9%)35 (10.4%)
Histology
Squamous66 (39.5%)65 (38.7%)131 (39.1%)
Other101 (60.5%)103 (61.3%)204 (60.9%)
Tumor Size (cm)
Mean (SD)4.60 (2.04)4.56 (2.05)4.77 (1.42)
Median [Min, Max]4.00 [1.00, 12.0]4.00 [1.00, 12.0]4.50 [3.10, 12.0]
Outcome: 3-year RMST*
Mean (SD)2.77 (0.596)2.64 (0.720)2.43 (0.947)
Median [Min, Max]3.00 [0.383, 3.00]3.00 [0.181, 3.00]3.00 [0.0242, 3.00]
+ +*Pseudo-observations transformed from censored survival time. + +![](images/1ca3fab139b01ea5fd9cfa6118b6279575b8eb7fb5538a8a8be3949c1e33e0ba.jpg) +Figure 14. Pseudo-observation vs. Censored Time for CALGB 9633 and NCDB datasets. + +![](images/2e5cef786af9a98b4b2b4cb9d1f2a1d63bf683f6d5ce750112701f3a2b9bf47a.jpg) + +![](images/d11117124333aedba7847f4216fbce67efa53e764fcf6d86bd0d6bae1f9652a3.jpg) + +![](images/049e67abca784f1656c8c007b98426f0927fe7395e5e53fe8026b8ec43eb2515.jpg) + +Figure 15. Distributional balance (unmatched and matched) between CALGB 9633 ( $S = 1$ ) and NCDB ( $S = 0$ ) for baseline covariates and the estimated sampling score $\hat{\mathbb{P}}(S = 1|X)$ . +![](images/e8225e121d2f4ff5c6e67621bd445b9aa955e264716daae1e87341fa45da196e.jpg) +Sample NCDB (S = 0) CALGB 9633 (S = 1) + +![](images/fbdcfa3c826fdef219432cfc238bc0cd7386d15af7eaa99d66105bc2f1c91d20.jpg) + +![](images/91da4b91d418b7fcfde5f8b5db7d26ac9969c59b82fa1f7bf9868fdc73640471.jpg) + +![](images/2f13fa54852badefd5aaa6e63f30b3ed7062d3f27083f34fc299bdbc6ae5fc28.jpg) +Figure 16. 3-year RMST (Outcome) vs. Sampling Score estimated by 5 covariates. The shaded area is constructed using quantile regression on the CALGB 9633 controlled data. \ No newline at end of file diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/images.zip b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..838ee061bdc0558a13eba60e3a0e301cd3dd535a --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8b489adac06afaaa101c0ce0b99925add0c9f872961d2d7b34d0eca8973ad5e +size 1769558 diff --git a/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/layout.json b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e0b67d7773b8068afcb98b02e558b81ee6163cbc --- /dev/null +++ b/ICML/2025/Enhancing Statistical Validity and Power in Hybrid Controlled Trials_ A Randomization Inference Approach with Conformal Selective Borrowing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0389cd172f756683537e904289588133e8c8b8b518e2a0bed495f348f6ff7bbf +size 1447691 diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_content_list.json b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..45984e8738e068afbf1ed846cd7067582ace155b --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9babcfeeb23c3ce96786a5b00b2355a1f0827deb9940483758490a6e3f2fdb5b +size 102072 diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_model.json b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7d9b50ba6796cd3f6061ea205560cc35612f4c77 --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73abe5251ac7ddebd55a01e6739a235b4c7b3f25b1f55687fcd6a9f92b552b17 +size 128682 diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_origin.pdf b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ef288cecb566fad586387ae911bc153141001cf4 --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/b38b084a-7119-4031-920c-b2a285122b3d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f71327c8392b5da90f43544fda1f076836588b9755b7005ea17d43a4a181f2d3 +size 978851 diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/full.md b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1a6d03dc6544d880bc606300771690ff1085cbaa --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/full.md @@ -0,0 +1,381 @@ +# Enhancing Target-unspecific Tasks through a Features Matrix + +Fangming Cui $^{1}$ Yonggang Zhang $^{2}$ Xuan Wang $^{3}$ Xinmei Tian $^{4}$ Jun $\mathbf{Yu}^{\dagger 5}$ + +# Abstract + +Recent developments in prompt learning of large Vision-Language Models (VLMs) have significantly improved performance in target-specific tasks. However, these prompting methods often struggle to tackle the target-unspecific or generalizable tasks effectively. It may be attributed to the fact that overfitting training causes the model to forget its general knowledge. The general knowledge has a strong promotion on target-unspecific tasks. To alleviate this issue, we propose a novel Features Matrix (FM) approach designed to enhance these models on target-unspecific tasks. Our method extracts and leverages general knowledge, shaping a Features Matrix (FM). Specifically, the FM captures the semantics of diverse inputs from a deep and fine perspective, preserving essential general knowledge, which mitigates the risk of overfitting. Representative evaluations demonstrate that: 1) the FM is compatible with existing frameworks as a generic and flexible module, and 2) the FM significantly showcases its effectiveness in enhancing target-unspecific tasks (base-to-novel generalization, domain generalization, and cross-dataset generalization), achieving state-of-the-art performance. + +# 1. Introduction + +Large vision-language models such as CLIP (Radford et al., 2021) have attracted increasing attention for remarkable generalization performance. Vision-Language Models (VLMs) are trained to align textual and visual modalities by leveraging extensive datasets. For instance, a prominent example of such models is CLIP, which has achieved remarkable success across a wide range of downstream tasks (Greer et al., 2024; Sanghi et al., 2022; Etchegaray et al., 2024). + +$^{1}$ Shanghai Jiao Tong University $^{2}$ Hong Kong Baptist University $^{3}$ Meituan Inc. $^{4}$ University of Science and Technology of China $^{5}$ Harbin Institute of Technology (Shenzhen). Correspondence to: Jun Yu† . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +CLIP utilizes a large collection of 400 million text-image pairs. One of CLIP's most appealing features is its ability to perform zero-shot inference. During inference, CLIP utilizes hand-crafted text inputs, known as prompts, to generate classification weights to predict image features, all without requiring any target-specific parameters training. + +In contrast to hand-crafted prompts, a model-parameter tuning method has been proposed as prompt learning to automatically learn prompt embeddings (Zhou et al., 2022a). For instance, CoOp (Zhou et al., 2022b) represents the first method that specifically focuses on learning the text embeddings of prompts with few-shot samples training while keeping the CLIP model frozen. Although CoOp (Zhou et al., 2022b) has shown significant performance improvements over hand-crafted prompts in target-specific base classes, it may yield inferior performance compared to the hand-crafted prompt CLIP in generalization tasks, e.g., the novel class of generalization from base-to-novel (see Table 1). To overcome this challenge, some effective methods (Lu et al., 2022; Zhu et al., 2023; Zhou et al., 2022a;b; Yao et al., 2023a; Chen et al.; Li et al., 2024a) with tuning textual embeddings have been proposed. These methods aim to enhance the performance of novel classes, surpassing the novel performance of the previous CoOp. Although the novel ability of these methods surpasses that of CoOp (67.96%), it is unfortunate that the novel ability of these methods still falls short compared to the hand-crafted prompt method (CLIP: 74.22%), as shown in Table 1 (Novel). A possible reason (Zhou et al., 2022a) may be that these methods with tuning text embeddings tend to overfit the downstream data distributions. This overfitting can result in the model losing its inherent generalization capabilities (Yao et al., 2023a) obtained from hand-crafted prompts (Radford et al., 2021). + +To alleviate this problem, we propose a novel Features Matrix (FM) with CLIP for target-unspecific tasks. Our method incorporates multiple hand-crafted prompts to extract general information as a pre-trained matrix from frozen CLIP to enhance generalization. The matrix of pre-trained features can delve into the semantics of different hand-crafted prompts finely and deeply, which reduces the risk of forgetting the essential general knowledge of pre-trained CLIP. Importantly, our method is compatible with current prompt learning frameworks for textual or multi-modal prompt learning and serves as a flexible and generic module. As + +![](images/b1e5e8929172adb461c790e8546f4de7858aa985739fc38adcd99d32bf9dd559.jpg) +Figure 1. Our method is orthogonal to representative architectures, such as MaPLe (M) and PromptSRC (S), surpassing the existing easy-to-use DePT (Zhang et al., 2024a) by a significant margin. + +demonstrated in Figure 1, our method, integrated with the representative MaPLe (Khattak et al., 2023a) and PromptSRC (Khattak et al., 2023b), exhibits competitive results in base-to-novel generalization, domain generalization, and cross-dataset generalization across 11 datasets. Meanwhile, our method surpasses the existing easy-to-use DePT (Zhang et al., 2024a) by a significant margin. This underscores the robustness of our method across various tasks. + +Our contributions can be summarized as follows: + +- The proposed method incorporates multiple handcrafted prompts with classes to extract general knowledge as a pre-trained Features Matrix (FM). +- We propose an easy-to-use design, which is compatible with representative textual or multi-modal prompt learning frameworks for adapting CLIP. +- Various target-unspecific tasks (base-to-novel generalization, cross-dataset generalization, and domain generalization) across 11 datasets demonstrate that our method demonstrates its effectiveness. + +# 2. Preliminaries + +Notations. Considering a pre-trained VLM, let $\mathcal{E}_v(\cdot)$ be its image encoder and $\mathcal{E}_t(\cdot)$ be its text encoder. The image encoder transforms input images into feature embeddings, capturing the visual information within the images. The text encoder generates representations for word embedding sequences, capturing the semantic information conveyed by the text prompts $\mathbf{p}$ . Generally, a hand-crafted prompt $\mathbf{p}$ may have the form of "a photo of a [Class]". In this paper, $\mathbf{x}$ represents an arbitrary image, and $l$ denotes the label. + +Hand-Crafted CLIP. During the pre-training phase of CLIP (Radford et al., 2021), the image and text encoders are jointly trained on large-scale text-image pairs using a contrastive loss. This loss maximizes the cosine similarity between matching pairs and minimizes it between non-matching pairs, enabling the encoders to learn aligned visual and textual representations effectively. The final prediction score between the image $\mathbf{x}$ and text prompt $\mathbf{p}$ is computed using contrastive learning. The final prediction probability of alignment is computed by the matching score as follows: + +$$ +p (l = k \mid \mathbf {x}) = \frac {\exp \left\{\cos \left(\mathcal {E} _ {t} \left(\mathbf {p} _ {k}\right) , \mathcal {E} _ {v} (\mathbf {x})\right) / \tau \right\}}{\sum_ {k ^ {\prime} = 1} ^ {K} \exp \left\{\cos \left(\mathcal {E} _ {t} \left(\mathbf {p} _ {k ^ {\prime}}\right), \mathcal {E} _ {v} (\mathbf {x})\right) / \tau \right\}}, \tag {1} +$$ + +where $l$ is the label of $\mathbf{x}$ , $\cos (\cdot ,\cdot)$ stands for cosine similarity between two vectors, and $\tau >0$ represents a temperature parameter. Here, the classifier consists of $K$ textual features derived from prompts $\{\mathbf{p}_{k^{\prime}}\}_{k^{\prime} = 1}^{C}$ , where the prompt $\mathbf{p}_{k^{\prime}}$ for the $k^{\prime}$ -th class may have the form of "a photo of a". + +Textual Prompting. In textual prompting, the class name is retained as prior knowledge, while the word embeddings (referred to as context) of prompts are treated as learnable parameters, as shown in CoOp (Zhou et al., 2022b) and CoCoOp (Zhou et al., 2022a) of Figure 2. By modeling these context embeddings as trainable parameters, the model can optimize the prompts based on the specific requirements, enhancing the alignment between images and prompts. For class $k$ , the tuning feature of the text encoder is denoted as $t_k^{tun}$ in a dataset with a total of $K$ classes. The final prediction probability of cross-entropy loss for two-modalities alignment is computed as: + +$$ +p (l = k \mid \mathbf {x}) = \frac {\exp \left\{\cos \left(t _ {k} ^ {t u n} , \mathcal {E} _ {v} (\mathbf {x})\right) / \tau \right\}}{\sum_ {k ^ {\prime} = 1} ^ {K} \exp \left\{\cos \left(t _ {k ^ {\prime}} ^ {t u n}, \mathcal {E} _ {v} (\mathbf {x})\right) / \tau \right\}}, \tag {2} +$$ + +where $\cos (\cdot ,\cdot)$ stands for cosine similarity, and $\tau$ denotes a temperature parameter. In some learned text embedding methods, the method aligns with the CoOp methodology by setting the embeddings to be shared across different classes. During the inference phase, the prompts, along with the learned embeddings, can generate textual features that are used for classification purposes. By leveraging these learned embeddings, the model can produce more effective representations, leading to improved target-specific classification performance (Zhou et al., 2022b). + +Multi-Modal Prompting. Based on textual deep prompting, this design uses only a limited number of trainable parameters based on the image encoder, as shown in MaPLe (Khattak et al., 2023a) and PromptSRC (Khattak et al., 2023b) of Figure 2. The visual prompts are introduced at every transformer layer's input space. In the visual branch, the input image $\mathbf{x} \in \mathbb{R}^{C \times H \times W}$ is divided into $M$ patches. And, a tuning embedding of class $i_{\text{class}}$ is appended with the input + +![](images/bcb1d1f850116adacd7f4757d49e4a10c1f68080fe3d9f0bb36a5378c34b1fff.jpg) +Figure 2. Illustration of representative textual prompting frameworks (CoOp and CoCoOp) and multi-modal prompting frameworks (MaPLe and PromptSRC). We propose a flexible and generic design, which is compatible with these representative architectures. In the figure, "snowflake pattern" represents parameter freezing, "flame pattern" represents learnable pattern, "Deep" represents learnable tokens embedded in several layers of the encoder, where "T" represents learnable text embedding, "V" represents learnable visual embedding, "Class priors" represents which category it belongs to, "Tuning Similarity" represents the calculation of cosine similarity for fine-tuning architecture, and the light gray "Similarity" represents the calculation of cosine similarity for frozen architecture. In the MaPLe architecture diagram, the "e" represents the matrix function that connects the encoders of two modalities in several layers. + +![](images/bffa00712334840f9ccfbd0cfbb97415f29589182557c8bfbdfb0f043728c824.jpg) + +patches. The foundation of vision prompting is ViT (Vision Transformer) (Dosovitskiy et al., 2020) backbone, which shares the same image encoder as CLIP. Let $\mathcal{P}_v$ denote the visual embeddings of prompts, and the image encoder processes the input tokens to generate tuning visual features, as follows (Jia et al., 2022): + +$$ +\tilde {\mathbf {x}} _ {p} = \left\{\mathcal {P} _ {v}, i _ {\text {c l a s s}}, i _ {1}, i _ {2}, \dots , i _ {M} \right\}. \tag {3} +$$ + +The tuning of visual embeddings are introduced in the image encoder for deep prompt tuning. + +# 3. Methodology + +# 3.1. Current Challenge + +As shown in Table 1, such as textual prompting (Zhou et al., 2022a;b; Yao et al., 2023a; Lu et al., 2022) and multi-modal prompting (Chen et al.), have shown significant improvements in target-specific base classes. However, these methods often suffer from overfitting, leading to poor generalization in novel classes. To improve the novel performance of models, prompting regularization involves constraining the pre-trained and fine-tuning features in the text branch through computed loss. This constraint helps prevent forgetting general knowledge and ensures that the model retains essential information for downstream tasks. The objective of this design is to activate and maintain the pre-trained general knowledge, leveraging its remarkable generalization + +abilities to mitigate performance degradation when dealing with target-unspecific classes. + +Table 1. Our method is an easy-to-use design, integrated into CoOp, obtaining a higher average performance (11 datasets) on novel (target-unspecific) classes. + +
MethodHand FeaturesBaseNovel
CLIP (ICML2021)Single69.3474.22
CoCoOp (CVPR2022)No80.4771.69
ProDA (CVPR2022)No81.5672.30
PLOT (ICLR2023)No81.2472.98
ProGrad (ICCV2023)No82.4870.75
CoOp (IJCV2022)No82.3867.96
+ DePT (CVPR2024)No83.6671.82
+ Kg (CVPR2023)Single80.7372.70
+ OursMatrix81.1574.66
+ +It is important to recognize that the fixed CLIP's fundamental pre-trained characteristics demonstrate robust generalization capabilities. Recently, KgCoOp (Yao et al., 2023a) incorporates the constraint with $L1$ loss on fine-tuning feature with the pre-trained feature for the textual branch, avoiding the loss of CLIP's original generalization capability. + +Motivation. However, the novel class performance of handcrafted-based KgCoOp (72.70%) is still lower than pretrained CLIP (74.22%) (Radford et al., 2021) of Table 1. It + +![](images/eeeb3451879b592b6c8048c0680fc6fd1019252c80393db367f0b47414c0ca24.jpg) +Figure 3. Illustration of our easy-to-use method. We propose a novel Features Matrix (FM) for enhancing target-unspecific tasks. Our method incorporates multiple hand-crafted prompts with classes to extract general knowledge as a pre-trained features matrix. Various generalization tasks across 11 datasets demonstrate that our method outperforms existing prompt learning methods. + +may be attributed to the fact that this single hand-crafted prompting regularization with CLIP cannot fully release and excavate the diverse semantics for utilizing essential general knowledge (Khattak et al., 2023b). + +# 3.2. Proposed Features Matrix (FM) + +To tackle this challenge and problem, we propose a novel design called Features Matrix (FM) for enhancing target-unspecific tasks. Our method incorporates multiple handcrafted prompts with classes of the same datasets to extract general information as a pre-trained features matrix from CLIP to enhance generalization. In this way, we can explore and excavate the semantic information brought by each hand-crafted prompt more finely and deeply. By specifically aligning these multiple pre-trained hand-crafted unexpected features and tuning image features, our method aims to enhance the model's generalization and robustness. This involves focusing on indistinguishable features that pose a challenge to the model during training. As shown in Figure 3, we employ a set of hand-crafted prompt templates (P1, P2, P3, P4, etc) as inputs in the text encoder of pretrained frozen CLIP. These prompt templates, such as "a photo of one", "a photo of a", "a picture of a", "a drawing of a", etc. The number of prompt templates (Radford et al., 2021) is set to 60. In a dataset containing $K$ classes, the input to the text encoder is the frozen embeddings of hand-crafted prompts, consisting of different classes. The output of the frozen text encoder can be viewed as a features matrix, as depicted in Figure 3. Specifically, we let $t$ denote the sets of pre-trained text features extracted by a frozen text encoder + +through a set of hand-crafted prompt templates (P1, P2, P3, P4, etc) with classes. In a dataset with a total of $K$ classes, features belonging to the current label $k$ of image samples are referred to as designated features $t_k$ , while features from other classes are considered non-designated features $t_{\hat{k}}$ . + +$$ +- \log \frac {\exp \left\{\cos \left(t _ {k} , v ^ {t u n}\right) \right\}}{\exp \left\{\cos \left(t _ {k} , v ^ {t u n}\right) \right\} + \exp \left\{\cos \left(t _ {\hat {k}}, v ^ {t u n}\right) \right\}}, \tag {4} +$$ + +Our method computes the matching scores with the cosine distance for each visual output feature $v^{tun}$ and designated pre-trained text features of the features matrix as $\cos (t_k, v^{tun})$ . Similarly, we compute the matching scores between each visual output feature and the non-designated pre-trained text features, denoted as $\cos (t_{\hat{k}}, v^{tun})$ . In correspondence with the features matrix, these matching scores can be viewed as a scores matrix, as depicted in Figure 3. Subsequently, we identify the textual feature with lower scores (low- $\beta$ ) among the designated features, which is referred to as the unexpected designated features set $F_{un}^k$ . The low- $\beta$ is that there is a list of scores sorted from low to high, with $\beta$ values assigned from the front of the list. Similarly, we identify textual features with higher scores (top- $\beta$ ) among the non-designated features, which are referred to as unexpected non-designated feature sets $F_{un}^k$ . Accordingly, the contrastive loss $\mathcal{L}_{\mathrm{CL}}$ of unexpected features similarity is denoted as follows, + +where the $t_k \in F_{un}^k$ and $t_{\hat{k}} \in F_{un}^{\hat{k}}$ denote the selected unexpected features for designated unexpected features and non-designated unexpected features. The objective is to explore and excavate the unexpected features of general + +information. We train the objective for aligning the unexpected text features and tuning visual features, and the contrastive loss $\mathcal{L}_{\mathrm{CL}}$ optimizes visual embeddings. For two-modal alignment, let $\mathcal{L}_{\mathrm{CE}}(\cdot ,\cdot)$ denote the cross-entropy loss with prompts $\mathbf{p}$ for samples $S$ , as follows, + +$$ +\mathcal {L} _ {\mathrm {C E}} = \arg \min _ {\mathbf {p}} \mathbb {E} _ {(\mathbf {x}, y) \sim \mathcal {S}} \mathcal {L} \left\{\cos (t ^ {t u n}, v ^ {t u n}), l \right\}. \tag {5} +$$ + +Accordingly, the objective $\mathcal{L}_{\mathrm{total}}$ with a hyper-parameter $\gamma$ of our method can be formulated as follows, + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\mathrm {C E}} + \gamma \mathcal {L} _ {\mathrm {C L}}. \tag {6} +$$ + +Consequently, optimizing models with $\mathcal{L}_{\mathrm{CL}}$ between the pre-trained textual unexpected features and image tuning features. The $\mathcal{L}_{\mathrm{CE}}$ represents two modalities of alignment of deep vision-language prompting. Importantly, our method is compatible with representative prompt learning frameworks as a generic and flexible module for textual prompt learning, such as CoOp and CoCoOp, or multi-modal prompt learning, such as MaPLe and PromptSRC. + +# 4. Main Generalization Tasks + +We evaluate our method on generalization tasks. As evidenced by systematic benchmarking in Figure 1, our framework, when synergistically integrated with MaPLe (Khattak et al., 2023a) and PromptSRC (Khattak et al., 2023b), achieves state-of-the-art performance across three critical generalization dimensions (base-to-novel generalization, domain generalization, and cross-dataset generalization) spanning 11 heterogeneous benchmarks. Notably, our method surpasses the existing easy-to-use DePT (Zhang et al., 2024a) by a significant margin in generalization scenarios through low-resource training. + +# 4.1. Benchmark Setting + +Compared Methods. In three generalization experiments, we compare our method with CoOp (IJCV2022) (Zhou et al., 2022b), CoCoOp (CVPR2022) (Zhou et al., 2022a), MaPLe (CVPR2023) (Khattak et al., 2023a), PromptSRC (ICCV2023) (Khattak et al., 2023b), and DePT (CVPR2024) (Zhang et al., 2024a). The DePT is an easy-to-use method. We process frozen CLIP using a linear probe method. Comparison methods are based on the ViT-B/16 architecture for fair comparison. + +Implementation Details. We employ CLIP (Radford et al., 2021) model based on the ViT-B/16 architecture. For the PromptSRC-based and MaPLe-based frameworks, we set the visual and textual embedding length to 4. We set the easy-to-use module $\gamma$ to 0.1 and matching scores (top and low) $\beta$ to 5. Training for 30 epochs for a base-to-novel setting in the first 9 transformer layers. Training for 20 + +epochs for the domain generalization setting and the cross-dataset evaluation setting in the first 3 transformer layers. We use a SGD optimizer with a learning rate of 0.0025 on a single GPU. Following the hand-crafted CLIP, we use the hand-crafted template sets from (Radford et al., 2021). + +Datasets. In Table 10, the datasets cover multiple recognition tasks including ImageNet (Deng et al., 2009) and Caltech101 (Fei-Fei et al., 2004) which consists of generic objects, OxfordPnts (Parkhi et al., 2012), StanfordCars (Krause et al., 2013), Flowers102 (Nilsback & Zisserman, 2008), Food101 (Bossard et al., 2014), and FGVCAircraft (Maji et al., 2013) for fine-grained classification, SUN397 (Xiao et al., 2010) for scene recognition, UCF101 (Soomro et al., 2012) for action recognition, DTD (Cimpoi et al., 2014) for texture classification, and EuroSAT (Helber et al., 2019) which consists of satellite images. We leverage datasets such as ImageNetA (Hendrycks et al., 2021b), ImageNetR (Hendrycks et al., 2021a), ImageNet-Sketch (Wang et al., 2019), and ImageNetV2 (Recht et al., 2019) to assess the model's performance across different domain distributions. + +# 4.2. Base-to-Novel Generalization Task + +In the base-to-novel generalization task, the datasets are divided into base and novel classes. The model is trained on the base classes in a 16-shot setting, and tested on both the base and novel classes across 11 different datasets. The number of classes for base and novel is the same, which means that all classes in a dataset are evenly divided into two groups of classes. The process of dividing all classes in the dataset is randomly selected. HM refers to harmonic mean. The HM evaluates the generalizable and non-generalizable ability of our methods. + +Discussion. In Table 2, our method demonstrates significant improvements on all 11 datasets on HM. We found that our performance is higher than DePT (Zhang et al., 2024a) (CVPR2024) when integrated with different methods. Compared to DePT, our method significantly enhances the performance of base classes while also improving the accuracy on novel classes. In terms of average performance, our method based on PromptSRC (S) attains $85.70\%$ accuracy on the base classes, and $77.35\%$ accuracy on the novel classes. Our method, as an easy-to-use module, achieves performance improvements for various baseline frameworks, such as CoOp, CoCoOp, MaPLe (M), and PromptSRC (S). + +# 4.3. Domain Generalization Task + +We train our model using the ImageNet in 16 shots and we leverage ImageNetA, ImageNet-R, ImageNet-Sketch, and ImageNetV2 to assess the model's performance. The training ImageNet is a non-generalizable setting in Table 3 (column-1). This experiment aims to validate the potential of our method in domain shifts (Fang et al., 2023). + +Table 2. Base-to-novel generalization. In the base-to-novel generalization task, the datasets are divided into base and novel classes. The model is trained on the base classes in a 16-shot setting, and tested on both the base and novel classes across 11 different datasets. Compared with easy-to-use DePT (CVPR2024) in detail, our method achieves consistent average performance improvement over different representative baselines (CoOp, CoCoOp, MaPLe, PromptSRC). +(a) Average over 11 datasets + +
BaseNovelHM
CoOp82.6963.2271.66
+DePT83.6671.8277.29
+ Ours81.1574.6677.79
Co80.4771.6975.83
+DePT83.8072.8977.97
+ Ours81.6875.5578.52
M82.2875.1478.55
+DePT84.8574.8279.52
+ Ours84.4576.5380.32
S84.2676.1079.97
+ DePT85.1976.1780.43
+ Ours85.7077.3581.32
+ +(b) ImageNet + +
BaseNovelHM
76.4767.8871.92
77.1370.1073.45
75.8571.3373.53
75.9870.4373.10
76.8770.4773.53
77.3572.3674.79
76.6670.5473.47
77.8770.2373.85
78.1871.3874.62
77.6070.7374.01
78.2070.2774.02
78.9071.5875.07
+ +(c) Caltech101 + +
BaseNovelHM
CoOp98.0089.8193.73
+DePT98.3394.3396.29
+ Ours97.5896.6097.13
Co97.9693.8195.84
+DePT98.3793.8796.06
+ Ours98.6196.7597.70
M97.7494.3696.02
+DePT98.5395.0396.75
+ Ours98.3596.1197.22
S98.1094.0396.02
+ DePT98.5794.1096.28
+ Ours98.6295.8897.27
+ +(d) OxfordPets + +
BaseNovelHM
CoOp93.6795.2994.47
+DePT94.7097.6396.14
+ Ours93.7897.8095.78
Co95.2097.6996.43
+DePT94.0397.2095.59
+ Ours95.3398.1596.76
M95.4397.7696.58
+DePT95.0397.8396.41
+ Ours95.8598.2297.04
S95.3397.3096.30
+ DePT95.4397.3396.37
+ Ours95.9597.9296.95
+ +(e) EuroSAT + +
BaseNovelHM
CoOp92.1954.7468.69
+DePT88.2766.2775.70
+ Ours88.3565.3375.13
Co87.4960.0471.21
+DePT90.2766.8776.82
+ Ours88.1570.1178.12
M94.0773.2382.35
+DePT94.4376.2384.36
+ Ours94.2275.6583.93
S92.9073.9082.32
+ DePT92.2377.9084.88
+ Ours95.5076.8585.17
+ +(f)UCF101 + +
BaseNovelHM
CoOp84.6956.0567.46
+ DePT85.4372.1778.24
+ Ours83.1078.8580.94
Co82.3373.4577.64
+ DePT85.7072.8078.73
+ Ours82.9577.2180.00
M83.0078.6680.77
+ DePT86.8778.1082.25
+ Ours87.3379.1083.02
S87.1078.8082.74
+ DePT87.7377.7082.46
+ Ours88.8079.5083.93
+ +(g) StanfordCars + +
BaseNovelHM
CoOp78.1260.4068.13
+ DePT79.6772.4075.86
+ Ours74.3276.8775.58
Co70.4973.5972.01
+ DePT79.8773.3376.46
+ Ours72.8876.1074.46
M72.9474.0073.47
+ DePT80.9371.7376.06
+ Ours78.6675.1376.86
S78.2774.9776.58
+ DePT80.8075.0077.79
+ Ours80.9176.5178.68
+ +(h) Flowers102 + +
BaseNovelHM
CoOp97.6059.6774.06
+ DePT98.2072.0083.08
+ Ours96.2272.3282.57
Co94.8771.7581.71
+ DePT98.3372.5783.51
+ Ours95.6174.9384.03
M95.9272.4682.56
+ DePT98.0373.1783.79
+ Ours98.2175.0085.07
S98.0776.5085.95
+ DePT98.4077.1086.46
+ Ours98.8178.1087.26
+ +(i) Food101 + +
BaseNovelHM
CoOp88.3382.2685.19
+ DePT90.4391.3390.88
+ Ours89.9892.8591.41
Co90.7091.2990.99
+ DePT90.3091.3090.80
+ Ours90.6191.9391.28
M90.7192.0591.38
+ DePT90.3391.5390.93
+ Ours90.3192.8191.57
S90.6791.5391.10
+ DePT90.8791.5791.22
+ Ours90.6192.3091.45
+ +(j) FGVCAircraft + +
BaseNovelHM
CoOp40.4422.3028.75
+ DePT42.5322.5329.46
+ Ours37.3234.6135.92
Co33.4123.7127.74
+ DePT43.0731.3036.25
+ Ours37.8734.9136.33
M37.4435.6136.50
+ DePT44.5332.8037.78
+ Ours42.4637.6239.89
S42.7337.8740.15
+ DePT45.7036.7340.73
+ Ours45.8139.1142.20
+ +(k) SUN397 + +
BaseNovelHM
CoOp80.6065.8972.51
+ DePT82.3775.0778.55
+ Ours79.1278.3878.77
Co79.7476.8678.27
+ DePT82.2076.7379.37
+ Ours80.3279.0079.68
M80.8278.7079.75
+ DePT82.9076.4079.52
+ Ours82.3579.8181.07
S82.6778.4780.52
+ DePT83.2778.9781.06
+ Ours83.9080.5182.20
+ +(1) DTD + +
BaseNovelHM
CoOp79.4441.1854.24
+ DePT83.2056.1367.04
+ Ours77.1056.3865.15
Co77.0156.0064.85
+ DePT82.7755.4066.37
+ Ours78.9059.6167.93
M80.3659.1868.16
+ DePT83.8759.9369.91
+ Ours83.0160.9870.32
S83.3762.9771.75
+ DePT84.8061.2071.09
+ Ours84.9062.5872.07
+ +Table 3. Domain generalization. We train our model using the ImageNet in 16 shots and test its performance on 4 different variants of the ImageNet. When compared to DePT, our method consistently outperforms it across all ImageNet variant datasets. + +
SourceTargetAverage
ImageNet-V2-S-A-R
CoOp71.5164.247.9949.7175.2159.28
+ DePT72.6364.8048.0550.0075.5059.58
+ Ours71.8265.1348.1050.1576.1359.87
CoCoOp71.0264.0748.7550.6376.1859.91
+ DePT72.7765.1049.1051.0076.8560.51
+ Ours72.1065.2550.1352.1177.1861.16
MaPLe70.7264.0749.1550.976.9860.27
+ DePT73.2765.3349.0551.2577.5060.78
+ Ours71.5665.4550.3352.3278.1061.55
PromptSRC71.2764.3549.5550.9077.8060.65
+ DePT71.6064.5150.1551.8877.1860.93
+ Ours71.4165.5051.3352.0078.8561.92
+ +Discussion. In Table 3, our method based on PromptSRC demonstrates the highest average improvement of $1.27\%$ over the PromptSRC method. Additionally, when compared to DePT, our method consistently outperforms it across all ImageNet variant datasets. + +# 4.4. Cross-Dataset Generalization Task + +We train our model with 16 shots on the ImageNet dataset and test the model on 10 other unseen datasets. The training ImageNet is a non-generalizable setting in Table 4 (column-1). This experiment aims to validate the potential of our method in a wide range of cross-dataset transfers. + +Discussion. As shown in Table 4, our method based on PromptSRC shows competitive performance in $10 / 10$ over the generic and flexible method DePT. These findings suggest that our method excels in achieving better generalization across a diverse range of unseen datasets. However, our method for training ImageNet is lower than that of DePT. + +# 5. Further Studies + +In this section, we discuss further studies, focusing on the impact of embedding length and depth, computational cost, applying to other ViT instances, analysis of $\gamma$ for $\mathcal{L}_{\mathrm{CL}}$ , and analysis of Top- $\beta$ and Low- $\beta$ for pre-trained features matrix. + +# 5.1. Learning Depth + +In Table 5, we note that increasing the learning depth generally increases the performance based on PromptSRC. As the number of layers increases to 11, the HM value decreases. + +# 5.2. Embeddings Length + +In Table 7, our findings indicate that the performance based on PromptSRC reaches its peak when the length of embeddings is set to 4 on HM for an average of 11 datasets. Our ablation studies are based on keeping all other settings unchanged. It indicates excessive fine-tuning of the model, causing it to lose CLIP generalization. + +# 5.3. Analysis of $\gamma$ for $\mathcal{L}_{\mathrm{CL}}$ + +In Table 9, it is observed that as the number of $\gamma$ increases to 0.1, there is a peak in HM for an average of 11 datasets. We conduct analysis based on the PromptSRC model. + +# 5.4. Analysis of Top- $\beta$ and Low- $\beta$ + +In Table 8, it is observed that as the number of Top- $\beta$ and Low- $\beta$ increases to 5, there is a peak in HM. We conduct analysis based on the PromptSRC model for an average of 11 datasets. We keep other hyper-parameters unchanged. + +# 5.5. Applying to Other ViT Instances + +In Table 6, we apply our method in various types of ViT instances. Our experimental performance is based on the average performance of 11 datasets. Our generic and flexible module based on PromptSRC has the lowest performance of ViT-B/32, with a value of $79.70\%$ . And, our method, which leverages PromptSRC, achieves the best performance with ViT-L/14, with a value of $84.20\%$ . + +# 5.6. Inference Stage Computational Cost + +In Table 11, the compute cost analysis is performed using the SUN397 dataset over 10 epochs on a single GPU. Our method (row 3) may have a slower inference speed as a result of multiple cosine similarity calculations. The number of parameters we introduced has remained relatively consistent and stable in training. This implies that usually, our parameter quantity is lower than that of DePT. + +# 6. Related Work + +Vision-Language Models (VLMs). Recently, researchers have demonstrated strong generalization capability of Vision-Language Models (VLMs) (Alayrac et al., 2022; Shao et al., 2025), which involve training on large-scale datasets of image-text pairs. Using a large number of samples for training is indeed one of the most effective methods (Yang et al., 2021; Wang et al., 2023). Such as CLIP (Radford et al., 2021), which is a prominent and straightforward framework among existing VLMs. The strong generalization capability of CLIP has made it a foundation for many methods in adapting pre-trained VLMs for downstream tasks (Sanghi et al., 2022; Maaz et al., 2022; + +Table 4. Cross-dataset generalization. Our method achieves overall favorable performance. + +
SourceTargetAverage
ImageNetCaltech101OxfordPetsStanfordCarsFlowers102Food101AircraftSUN397DTDEuroSATUCF101
CoOp (Zhou et al., 2022b)71.5193.7089.1464.5168.7185.3018.4764.1541.9246.3966.5563.88
+ DePT72.6393.3090.0065.5370.5085.9721.9066.0743.1744.9768.8065.02
+ Ours71.8294.1090.3365.8270.0186.1020.7165.1143.9846.5568.0065.07
CoCoOp (Zhou et al., 2022a)71.0294.4390.1465.3271.8886.0622.9467.3645.7345.3768.2165.74
+ DePT72.7794.1090.6366.2372.1786.2722.9067.3045.5044.1769.5365.88
+ Ours72.1094.8890.5765.8072.1587.0022.7868.1245.9846.1569.1066.25
MaPLe (Khattak et al., 2023a)70.7293.5390.4965.5772.2386.2024.7467.0146.4948.0668.6966.30
+ DePT73.2792.5390.1064.6070.1085.5723.6366.4045.0340.1367.5364.56
+ Ours71.5694.0090.9165.9273.1086.7824.3368.3546.1349.0168.8166.73
PromptSRC (Khattak et al., 2023b)71.2793.6090.2565.7070.2586.1523.9067.1046.8745.5068.7565.81
+ DePT71.6093.8090.1366.0070.9386.2724.3067.2346.6045.8369.1066.02
+ Ours71.4194.9592.1466.5073.2587.5325.8168.1049.0149.2069.7467.62
+ +Table 5. Analysis of learning depth based on PromptSRC for an average of 11 datasets. HM refers to harmonic mean. + +
Learning Depth1357911
HM77.1178.0379.1280.0181.3280.21
+ +Table 6. Applying to other ViT instances. + +
Avg. (11 datasets)
B/32B/16L/14
HM (ViT)79.7081.3284.20
+ +Bangalath et al., 2022; Zhang et al., 2021; Wang et al., 2022; Xu et al., 2025). To enhance the generalization ability of VLMs, researchers have explored various approaches (Zhou et al., 2025b;a). Some approaches involve enhancing the text encoder or the visual encoder (Vaswani et al., 2017). By improving the capabilities of the text encoder, the model can better capture the semantics and contextual information in the textual input (Zhang et al., 2024b). Similarly, enhancing the visual encoder allows the model to extract discriminative features from the visual input. + +Prompt Tuning in VLMs. Prompt tuning (Zhang & Tian, 2025; Pan et al., 2024; Cao et al., 2025; Zhou et al., 2024; Li et al., 2024a) is a commonly employed technique in the field of Natural Language Processing (NLP) for training on downstream tasks (Yu et al., 2025; 2024b;a). Leveraging text prompts, which are instructions given to the language model component of VLMs, is a prevalent practice to improve + +Table 7. Analysis of embeddings length based on PromptSRC for an average of 11 datasets. HM refers to harmonic mean. + +
Prompt Length1246810
HM77.0180.0581.3280.3079.1178.54
+ +Table 8. Identifying scores of Top- $\beta$ and Low- $\beta$ for an average of 11 datasets. We conduct analysis based on the PromptSRC (Khattak et al., 2023b) model. HM refers to harmonic mean. + +
Avg. (11 datasets)
3456
HM (β)78.2179.8181.3280.51
+ +Table 9. Analysis of $\gamma$ for $\mathcal{L}_{\mathrm{CL}}$ in pre-trained features matrix. We conduct analysis based on the PromptSRC (Khattak et al., 2023b) model for an average of 11 datasets. HM refers to harmonic mean. + +
Avg. (11 datasets)
0.050.10.50.9
HM (γ)80.1381.3281.0079.88
+ +task comprehension (Cui et al., 2025b). Full fine-tuning and linear probes are two commonly employed approaches for adapting VLMs to downstream tasks (Fang et al., 2025; Liu et al., 2025). The constraints of both methods have prompted research into innovative techniques influenced by prompt tuning within the realm of VLMs (Yin et al., 2025). CoOp (Zhou et al., 2022b), ProDA (Lu et al., 2022), and + +Table 10. Training and testing datasets. The dataset consists of 11 image classification datasets and four variant datasets of ImageNet. + +
DatasetClassesTrainValTest
ImageNet (Deng et al., 2009)1,0001.28 MN/A50,000
Caltech101 (Fei-Fei et al., 2004)1004,1281,6492,465
OxfordPets (Parkhi et al., 2012)372,9447363,669
StanfordCars (Krause et al., 2013)1966,5091,6358,041
Flowers102 (Nilsback & Zisserman, 2008)1024,0931,6332,463
Food101 (Bossard et al., 2014)10150,50020,20030,300
FGVCAircraft (Maji et al., 2013)1003,3343,3333,333
SUN397 (Xiao et al., 2010)39715,8803,97019,850
DTD (Cimpoi et al., 2014)472,8201,1281,692
EuroSAT (Helber et al., 2019)1013,5005,4008,100
UCF101 (Soomro et al., 2012)1017,6391,8983,783
-V2 (Recht et al., 2019)1,000N/AN/A10,000
-Sketch (Wang et al., 2019)1,000N/AN/A50,889
-A (Hendrycks et al., 2021b)200N/AN/A7,500
-R (Hendrycks et al., 2021a)200N/AN/A30,000
+ +Table 11. The compute cost analysis is performed using the SUN397 (Xiao et al., 2010) dataset over 10 epochs on a single GPU. 'N': the num of classes in the base task (Zhang et al., 2024a). + +
MethodTrain timeLearnable para.HM
CoOp10.88min8K71.65
+ DePT10.91min+ (2+N/2)K77.30
+ Ours13.56min+ 0K78.66
+ +CoCoOp (Zhou et al., 2022a) fine-tune the CLIP model for few-shot image recognition by optimizing a continuous set of embeddings within the textual branch. The image-conditional prompt utilized in CoCoOp significantly contributes to improving generalization to unseen classes (Peng et al., 2025; 2023). By conditioning prompts on visual features, CoCoOp (Zhou et al., 2022a) ensures that the language model focuses on pertinent visual information when making predictions. Moreover, some approaches (Yao et al., 2023b;a; Cui et al., 2024; 2025a) constrain the learnable prompts to contain the essential general knowledge. In addition, the approach (Zhang et al., 2024a) introduces a flexible approach to align its vision and language representations. + +# 7. Future Works and Limitations + +In the future, we plan to investigate the potential of our method in other tasks (Tian et al., 2024; Yang et al., 2023; Li et al., 2019; Yu et al., 2023; Li et al., 2024c; Zhang et al., 2022; Wang et al., 2021; Li et al., 2025a;c; Jia et al., 2025; Liu et al., 2023b;a; Li et al., 2024b) and downstream scenarios (Pan et al., 2025; Jin et al., 2025; Li et al., 2025b; Liu et al., 2024; Wu et al., 2024; Liu et al., 2023c;d). Due to multiple processes of our method, the training speed is slower. And, the ImageNet training in Table 4 is lower. + +# 8. Conclusion + +Prompt learning is a promising method for adapting pretrained Visual-Language Models (VLMs) for target-specific classification tasks. However, these optimization frameworks exhibit limited efficacy when applied to target-unspecific or generalizable scenarios. This performance degradation may stem from overfitting-induced catastrophic forgetting, where the model loses generalizable knowledge critical for adapting to unseen tasks during the fine-tuning process. In this paper, we propose a Features Matrix (FM) for vision-language models. Our method incorporates multiple hand-crafted prompts to extract general information as a pre-trained features matrix from CLIP to enhance generalization. The matrix of pre-trained features can delve into the semantics of different hand-crafted prompts at a more profound level, which reduces the risk of forgetting the essential general knowledge of pre-trained CLIP. Our method focuses on the challenge of various target-unspecific tasks and scenarios across a wide range of real datasets. Importantly, our method is compatible with representative prompt learning frameworks for textual or multi-modal prompts as a generic and flexible module. + +# Acknowledgement + +XM T was supported in part by the NSFC No. 62222117. J Y was supported in part by the NSFC No. 62125201 and U24B20174. + +# Impact Statement + +The societal implications of our work involve democratizing the availability of potent AI resources, as our plug-and-play method can achieve impressive performance even in the absence of extensive labeled data. + +# References + +Alayrac, J.-B., Donahue, J., Luc, P., Miech, A., Barr, I., Hasson, Y., Lenc, K., Mensch, A., Millican, K., Reynolds, M., et al. Flamingo: a visual language model for few-shot learning. Advances in Neural Information Processing Systems, 35:23716-23736, 2022. +Bangalath, H., Maaz, M., Khattak, M. U., Khan, S. H., and Shahbaz Khan, F. Bridging the gap between object and image-level representations for open-vocabulary detection. Advances in Neural Information Processing Systems, 35:33781-33794, 2022. +Bossard, L., Guillaumeun, M., and Van Gool, L. Food-101-mining discriminative components with random forests. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part VI 13, pp. 446-461. Springer, 2014. +Cao, Q., Chen, Y., Lu, L., Sun, H., Zeng, Z., Yang, X., and Zhang, D. Generalized domain prompt learning for accessible scientific vision-language models. *Nexus*, 2(2), 2025. +Chen, G., Yao, W., Song, X., Li, X., Rao, Y., and Zhang, K. Plot: Prompt learning with optimal transport for vision-language models. In The Eleventh International Conference on Learning Representations. +Cimpoi, M., Maji, S., Kokkinos, I., Mohamed, S., and Vedaldi, A. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3606-3613, 2014. +Cui, F., Yang, X., Wu, C., Xiao, L., and Tian, X. Advancing prompt learning through an external layer. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 807-816, 2024. +Cui, F., Fong, J., Zeng, R., Tian, X., and Yu, J. A similarity paradigm through textual regularization without forgetting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 16100-16108, 2025a. +Cui, F., Zhang, Y., Wang, X., Wang, X., and Xiao, L. Generalizable prompt learning of clip: A brief overview. arXiv preprint arXiv:2503.01263, 2025b. +Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. IEEE, 2009. +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. + +Etchegaray, D., Huang, Z., Harada, T., and Luo, Y. Find n'propagate: Open-vocabulary 3d object detection in urban environments. arXiv preprint arXiv:2403.13556, 2024. +Fang, Z., Lu, J., and Zhang, G. An extremely simple algorithm for source domain reconstruction. IEEE Transactions on Cybernetics, 54(3):1921-1933, 2023. +Fang, Z., Yu, H., Xu, C., Li, Z., Ying, J., and Xie, S. Contrastive zero-shot relational learning for knowledge graph completion. Knowledge-Based Systems, pp. 113425, 2025. +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 2004 conference on computer vision and pattern recognition workshop, pp. 178-178. IEEE, 2004. +Greer, R., Antoniussen, B., Andersen, M. V., Møgelmose, A., and Trivedi, M. M. The why, when, and how to use active learning in large-data-driven 3d object detection for safe autonomous driving: An empirical exploration. arXiv preprint arXiv:2401.16634, 2024. +Helber, P., Bischke, B., Dengel, A., and Borth, D. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217-2226, 2019. +Hendrycks, D., Basart, S., Mu, N., Kadavath, S., Wang, F., Dorundo, E., Desai, R., Zhu, T., Parajuli, S., Guo, M., et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 8340-8349, 2021a. +Hendrycks, D., Zhao, K., Basart, S., Steinhardt, J., and Song, D. Natural adversarial examples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15262-15271, 2021b. +Jia, M., Tang, L., Chen, B.-C., Cardie, C., Belongie, S., Hariharan, B., and Lim, S.-N. Visual prompt tuning. In European Conference on Computer Vision, pp. 709-727. Springer, 2022. +Jia, Y., Wang, Z., Han, Z., Li, J., Zhang, M., Lao, Z., Han, Y., Gao, R., Gao, J., Zheng, Z., et al. Variable and intelligent catalyst design based on local chemical environments in sulfur redox reactions. Joule, 9(5), 2025. +Jin, K., Liu, Z., Wang, J., and Wang, H. Unmanned surface vehicle navigation under disturbances: World model enhanced reinforcement learning. IEEE/ASME Transactions on Mechatronics, 2025. + +Khattak, M. U., Rasheed, H., Maaz, M., Khan, S., and Khan, F. S. Maple: Multi-modal prompt learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19113-19122, 2023a. +Khattak, M. U., Wasim, S. T., Naseer, M., Khan, S., Yang, M.-H., and Khan, F. S. Self-regulating prompts: Foundational model adaptation without forgetting. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15190-15200, 2023b. +Krause, J., Stark, M., Deng, J., and Fei-Fei, L. 3d object representations for fine-grained categorization. In Proceedings of the IEEE international conference on computer vision workshops, pp. 554-561, 2013. +Li, H., Huang, B., Chuai, M., Zheng, Z., Chen, H., Piao, Z., Zhou, G., and Fan, H. J. Dual-plating aqueous zn-iodine batteries enabled via halogen-complexation chemistry for large-scale energy storage. Energy & Environmental Science, 18(7):3160-3168, 2025a. +Li, H., Mai, Y., Gao, M., He, J., Liu, Z., and Wang, H. Large-scale lidar-based loop closing via combination of equivariance and invariance on se (3). IEEE/ASME Transactions on Mechatronics, 2025b. +Li, H., Zhang, M., Zheng, Z., Wu, X., Xiao, X., Piao, Z., Li, C., Jia, Y., Yang, J., and Zhou, G. High-capacity and long-life aqueous zn-span batteries with tandem catalysis. Advanced Materials, 37(5):2409771, 2025c. +Li, J., Zhang, Y., Liu, X., Liu, P., Yin, H., and Liu, D. C. A robust automatic ultrasound spectral envelope estimation. Information, 10(6):199, 2019. +Li, J., Li, H., Erfani, S. M., Feng, L., Bailey, J., and Liu, F. Visual-text cross alignment: Refining the similarity score in vision-language models. In International Conference on Machine Learning, pp. 28018-28039. PMLR, 2024a. +Li, Q., Hu, Z., Wang, Y., Li, L., Fan, Y., King, I., Jia, G., Wang, S., Song, L., and Li, Y. Progress and opportunities of foundation models in bioinformatics. *Briefings in Bioinformatics*, 25(6):bbae548, 2024b. +Li, W., Guo, Y., Zheng, J., Lin, H., Ma, C., Fang, L., and Yang, X. Sparseformer: Detecting objects in hrw shots via sparse vision transformer. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 4851-4860, 2024c. +Liu, J., Zhuo, D., Feng, Z., Zhu, S., Peng, C., Liu, Z., and Wang, H. Dvlo: Deep visual-lidar odometry with local-to-global feature fusion and bi-directional structure alignment. In European Conference on Computer Vision, pp. 475-493. Springer, 2024. + +Liu, S., Chen, Z., Wu, M., Liu, C., and Chen, L. Wisr: Wireless domain generalization based on style randomization. IEEE Transactions on Mobile Computing, 23(5): 4520-4532, 2023a. +Liu, S., Chen, Z., Wu, M., Wang, H., Xing, B., and Chen, L. Generalizing wireless cross-multiple-factor gesture recognition to unseen domains. IEEE Transactions on Mobile Computing, 23(5):5083-5096, 2023b. +Liu, Z., Li, K., Hao, T., and Wang, H. Visual servoing of rigid-link flexible-joint manipulators in the presence of unknown camera parameters and boundary output. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 53(8):5096-5105, 2023c. +Liu, Z., Zhai, Y., Li, J., Wang, G., Miao, Y., and Wang, H. Graph relational reinforcement learning for mobile robot navigation in large-scale crowded environments. IEEE Transactions on Intelligent Transportation Systems, 24 (8):8776-8787, 2023d. +Liu, Z., Yu, H., and Luo, X. Federated graph anomaly detection via disentangled representation learning. In Proceedings of the ACM on Web Conference 2025, pp. 1216-1224, 2025. +Lu, Y., Liu, J., Zhang, Y., Liu, Y., and Tian, X. Prompt distribution learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5206-5215, 2022. +Maaz, M., Rasheed, H., Khan, S., Khan, F. S., Anwer, R. M., and Yang, M.-H. Class-agnostic object detection with multi-modal transformer. In European Conference on Computer Vision, pp. 512-531. Springer, 2022. +Maji, S., Rahtu, E., Kannala, J., Blaschko, M., and Vedaldi, A. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013. +Nilsback, M.-E. and Zisserman, A. Automated flower classification over a large number of classes. In 2008 Sixth Indian conference on computer vision, graphics & image processing, pp. 722-729. IEEE, 2008. +Pan, B., Li, Q., Tang, X., Huang, W., Fang, Z., Liu, F., Wang, J., Yu, J., and Shi, Y. Nlprompt: Noise-label prompt learning for vision-language models. arXiv preprint arXiv:2412.01256, 2024. +Pan, Y., Xu, Y., Liu, Z., and Wang, H. Planning from imagination: Episodic simulation and episodic memory for vision-and-language navigation. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 6345-6353, 2025. + +Parkhi, O. M., Vedaldi, A., Zisserman, A., and Jawahar, C. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pp. 3498-3505. IEEE, 2012. +Peng, Z., Tian, Q., Xu, J., Jin, Y., Lu, X., Tan, X., Xie, Y., and Ma, L. Generalized category discovery in semantic segmentation. arXiv preprint arXiv:2311.11525, 2023. +Peng, Z., Ma, J., Sun, Z., Yi, R., Song, H., Tan, X., and Ma, L. Mos: Modeling object-scene associations in generalized category discovery. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 15118-15128, 2025. +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. +Recht, B., Roelofs, R., Schmidt, L., and Shankar, V. Do imagenet classifiers generalize toImagenet? In International conference on machine learning, pp. 5389-5400. PMLR, 2019. +Sanghi, A., Chu, H., Lambourne, J. G., Wang, Y., Cheng, C.-Y., Fumero, M., and Malekshan, K. R. Clip-forge: Towards zero-shot text-to-shape generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18603-18613, 2022. +Shao, Z., Wang, M., Yu, Z., Pan, W., Yang, Y., Wei, T., Zhang, H., Mao, N., Chen, W., and Yu, J. Growing a twig to accelerate large vision-language models. arXiv preprint arXiv:2503.14075, 2025. +Soomro, K., Zamir, A. R., and Shah, M. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. +Tian, F., Li, Y., Yan, Y., Guan, S., Ge, Y., and Yang, X. Postedit: Posterior sampling for efficient zero-shot image editing. arXiv preprint arXiv:2410.04844, 2024. +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. +Wang, H., Ge, S., Lipton, Z., and Xing, E. P. Learning robust global representations by penalizing local predictive power. Advances in Neural Information Processing Systems, 32, 2019. +Wang, Y., Liu, C., Li, S., Wang, T., Lin, W., and Yu, X. A multi-target tracking algorithm for fast-moving workpieces based on event camera. In *IECON* 2021-47th + +Annual Conference of the IEEE Industrial Electronics Society, pp. 1-5. IEEE, 2021. +Wang, Y., Yan, Y., Shi, D., Zhu, W., Xia, J., Jeff, T., Jin, S., Gao, K., Li, X., and Yang, X. Nerf-ibvs: visual servo based on nerf for visual localization and navigation. Advances in Neural Information Processing Systems, 36: 8292-8304, 2023. +Wang, Z., Xu, Q., Yang, Z., He, Y., Cao, X., and Huang, Q. Openauc: Towards auc-oriented open-set recognition. Advances in Neural Information Processing Systems, 35: 25033-25045, 2022. +Wu, W., Wang, Q., Wang, G., Wang, J., Zhao, T., Liu, Y., Gao, D., Liu, Z., and Wang, H. Emie-map: Large-scale road surface reconstruction based on explicit mesh and implicit encoding. In European Conference on Computer Vision, pp. 370-386. Springer, 2024. +Xiao, J., Hays, J., Ehinger, K. A., Oliva, A., and Torralba, A. Sun database: Large-scale scene recognition from abbey to zoo. In 2010 IEEE computer society conference on computer vision and pattern recognition, pp. 3485-3492. IEEE, 2010. +Xu, Y., Pan, Y., Liu, Z., and Wang, H. Flame: Learning to navigate with multimodal llm in urban environments. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 9005-9013, 2025. +Yang, Z., Xu, Q., Bao, S., Cao, X., and Huang, Q. Learning with multiclass auc: Theory and algorithms. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44 (11):7747-7763, 2021. +Yang, Z., Xu, Q., Bao, S., He, Y., Cao, X., and Huang, Q. Optimizing two-way partial auc with an end-to-end framework. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(8):10228-10246, 2023. doi: 10.1109/TPAMI.2022.3185311. +Yao, H., Zhang, R., and Xu, C. Visual-language prompt tuning with knowledge-guided context optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6757-6767, June 2023a. +Yao, H., Zhang, R., and Xu, C. Visual-language prompt tuning with knowledge-guided context optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6757-6767, 2023b. +Yin, H., Ren, Y., Yan, K., Ding, S., and Hao, Y. Rod-mllm: Towards more reliable object detection in multimodal large language models. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 14358-14368, 2025. + +Yu, H., Liu, W., Zhu, N., Li, P., and Luo, X. In-gfd: An interpretable graph fraud detection model for spam reviews. IEEE Transactions on Artificial Intelligence, 2024a. +Yu, H., Wen, J., Sun, Y., Wei, X., and Lu, J. Ca-gnn: A competence-aware graph neural network for semi-supervised learning on streaming data. IEEE Transactions on Cybernetics, 2024b. +Yu, H., Wen, J., and Zheng, Z. Camel: Cross-modality adaptive meta-learning for text-based person retrieval. IEEE Transactions on Information Forensics and Security, 2025. +Yu, Z., Zheng, L., Zhao, Z., Wu, F., Fan, J., Ren, K., and Yu, J. Anetqa: a large-scale benchmark for fine-grained compositional reasoning over untrimmed videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23191-23200, 2023. +Zhang, J., Wu, S., Gao, L., Shen, H. T., and Song, J. Dept: Decoupled prompt tuning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12924-12933, 2024a. +Zhang, R., Fang, R., Zhang, W., Gao, P., Li, K., Dai, J., Qiao, Y., and Li, H. Tip-adapter: Training-free clip-adapter for better vision-language modeling. arXiv preprint arXiv:2111.03930, 2021. +Zhang, W., Lyu, S., Xue, F., Yao, C., Zhu, Z., and Jia, Z. Predict the rover mobility over soft terrain using articulated wheeled bevameter. IEEE Robotics and Automation Letters, 7(4):12062-12069, 2022. +Zhang, W., Wu, L., Zhang, Z., Yu, T., Ma, C., Jin, X., Yang, X., and Zeng, W. Unleash the power of vision-language models by visual attention prompt and multimodal interaction. IEEE Transactions on Multimedia, 2024b. +Zhang, Y. and Tian, X. Consistent prompt learning for vision-language models. Knowledge-Based Systems, 310: 112974, 2025. +Zhou, C., Han, S., Yang, L., Zhou, Y., Cheng, X., Wang, Y., and Li, H. Rank adaptor: Hierarchical rank allocation for efficient fine-tuning pruned llms via performance model. In Findings of the Association for Computational Linguistics: NAACL 2025, pp. 5781-5795, 2025a. +Zhou, C., Zhou, Y., Zhang, S., Wang, Y., and Liu, Z. Dynamic operator optimization for efficient multi-tenant lora model serving. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 22910-22918, 2025b. + +Zhou, K., Yang, J., Loy, C. C., and Liu, Z. Conditional prompt learning for vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16816-16825, 2022a. +Zhou, K., Yang, J., Loy, C. C., and Liu, Z. Learning to prompt for vision-language models. International Journal of Computer Vision, 130(9):2337-2348, 2022b. +Zhou, Y., Xia, X., Lin, Z., Han, B., and Liu, T. Few-shot adversarial prompt learning on vision-language models. Advances in Neural Information Processing Systems, 37: 3122-3156, 2024. +Zhu, B., Niu, Y., Han, Y., Wu, Y., and Zhang, H. Prompt-aligned gradient for prompt tuning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15659-15669, 2023. \ No newline at end of file diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/images.zip b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..31f6924ea3d6a64e98c1f1b0a63f570567af3266 --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efc3923883d4acbd183d1290702a15aa743f7d0b6cf1c88a7334694f6c36e40d +size 993478 diff --git a/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/layout.json b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4b93b61f6584cb580677a84868c9bd6c5a4806f7 --- /dev/null +++ b/ICML/2025/Enhancing Target-unspecific Tasks through a Features Matrix/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca228790492045b45275fa87e0a1c1c491369537b9127e8435acdfab423f8092 +size 483064 diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_content_list.json b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..091262e32cd066d081eb9ebee1cec78badf5d644 --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ee3b645a08e383f30f958f24c62f4365f4e472845d5e45273007320eb53a36 +size 226673 diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_model.json b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_model.json new file mode 100644 index 0000000000000000000000000000000000000000..d79f6e17dfea4e2b93d5f408ad46838ea3f63cbf --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4413df32f00a264364d71e60c487f9387ffc71eff91bf152f193f39f1e25c5f +size 266956 diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_origin.pdf b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5996b442a812bef0af4861f450628b3efd951dae --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/f6d0043a-65c6-443c-a967-a4329ac5b161_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5cab36f0a075e8c70b8dfaefa6630d50623ea3ea1fed57c58aa835dca2986b2 +size 7501215 diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/full.md b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/full.md new file mode 100644 index 0000000000000000000000000000000000000000..300352c74b96ec62bcf242396468f224511f70f1 --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/full.md @@ -0,0 +1,1054 @@ +# Enhancing Treatment Effect Estimation via Active Learning: A Counterfactual Covering Perspective + +Hechuan Wen $^{1}$ Tong Chen $^{1}$ Mingming Gong $^{2,3}$ Li Kheng Chai $^{4}$ Shazia Sadiq $^{1}$ Hongzhi Yin $^{1}$ + +# Abstract + +Although numerous complex algorithms for treatment effect estimation have been developed in recent years, their effectiveness remains limited when handling insufficiently labeled training sets due to the high cost of labeling the post-treatment effect, e.g., the expensive tumor imaging or biopsy procedures needed to evaluate treatment effects. Therefore, it becomes essential to actively incorporate more high-quality labeled data, all while adhering to a constrained labeling budget. To enable data-efficient treatment effect estimation, we formalize the problem through rigorous theoretical analysis within the active learning context, where the derived key measures – factual and counterfactual covering radii determine the risk upper bound. To reduce the bound, we propose a greedy radius reduction algorithm, which excels under an idealized, balanced data distribution. To generalize to more realistic data distributions, we further propose FCCM, which transforms the optimization objective into the Factual and Counterfactual Coverage Maximization to ensure effective radius reduction during data acquisition. Furthermore, benchmarking FCCM against other baselines demonstrates its superiority across both fully synthetic and semi-synthetic datasets. Code: https://github.com/uqhwen2/FCCM. + +# 1. Introduction + +Understanding the causal effects of interventions is essential for making informed decisions, positioning treatment effect estimation as a fundamental tool with broad applications + +$^{1}$ School of EECS, The University of Queensland, Australia $^{2}$ School of Mathematics and Statistics, The University of Melbourne, Australia $^{3}$ Department of Machine Learning, Mohamed bin Zayed University of Artificial Intelligence, United Arab Emirates $^{4}$ Health and Wellbeing Queensland, Australia. Correspondence to: Hongzhi Yin . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +across diverse domains, including randomized control trials (RCTs) in medication (Pilat et al., 2015), A/B testing for business decision-making (Kohavi & Longbotham, 2015) and government policy evaluation (MacKay, 2020), etc. However, real-world scenarios often involve the trade-off between cost and return, e.g., the high cost of tumor imaging or biopsy at scale frequently limits the amount of treatment effects (labels) collected from the individuals given a particular drug, which in turn impacts the accuracy of estimation. Such a challenge highlights the need for designing data-efficient treatment effect estimation methods, which can be described as the following optimization problem: + +$$ +\min _ {\mathcal {S} \subset \mathcal {D}} \epsilon (f _ {\mathcal {S}}) \quad \text {s . t .} | \mathcal {S} | \leq B, \tag {1} +$$ + +where $\epsilon$ is a risk metric e.g. precision in estimation of heterogeneous effect (PEHE) (Shalit et al., 2017), $\mathcal{D}$ is the pool set containing all candidate samples, $f_{\mathcal{S}}$ is the regression model trained on subset $\mathcal{S}$ , and $B$ is the labeling budget. + +Depending on whether or not the treatment indicator $t$ is readily available alongside the covariates in $\mathcal{D}$ , there are two branches of research related to the formulation in Eq. (1). If $t$ is not given, one is to build the dataset $S$ via active experimental design (Addanki et al., 2022; Connolly et al., 2023; Ghadiri et al., 2024), i.e., a subset of $\mathcal{D}$ consisting only of covariates is selected, which is then partitioned to receive treatments, and subsequently annotated with treatment effects. Otherwise, given the pool set $\mathcal{D}$ consisting of both the covariates and the treatment indicator (Sundin et al., 2019; Qin et al., 2021; Jesson et al., 2021b; Wen et al., 2025), the algorithm only deals with selection from the pool set, then let the oracle label the selected samples. Although both aim to facilitate reliable, data-efficient predictions by selectively expanding the labeled dataset for training, studies on the latter are scarcer compared with those on the former. Despite the under-exploration of the latter setting, it has been widely encountered in real-world applications, such as collecting customer preferences from those who have already received different services, tracking patients' side effects from those who have already been administered different drugs, etc. Therefore, in this paper, we study the latter scenario where both the covariates and the treatment indicator are known in the pool set, while in the presence of high treatment effect + +annotation cost and a limited labeling budget, only a subset of them are selected for the oracle to label. + +Unlike traditional optimization problems where abundant training data is assumed for treatment effect estimation (Shalit et al., 2017; Shi et al., 2019; Jesson et al., 2020; Wang et al., 2024), Eq. (1) is in-essence an active learning (AL) problem (Settles, 2009) and considers the practical issue of the scarcity of labeled training data, in conjunction with a limited labeling budget to expand the dataset for training a more generalizable model. Despite the simple formulation, solving the problem is NP-hard due to the combinatorial nature of selecting the optimal subset of data points to label (Tsang et al., 2005; Settles, 2009). From a general AL perspective, by simplifying the pre-assigned treatment as a feature variable, AL-based regression methods (Gal et al., 2017; Sener & Savarese, 2018; Ash et al., 2019) might be directly applicable to Eq. (1). However, straightforward adoption of AL for Eq. (1) is suboptimal as it omits the distribution alignment between different treatment groups during data acquisition. + +Thus far, some designated AL approaches have been proposed to address the constrained regression problem in Eq. (1) with observational data. Qin et al. (2021) formalize a theoretical framework QHTE that directly extends the treatment effect estimation risk upper bound (Shalit et al., 2017) by the core-set (Tsang et al., 2005) approach; however, the derived estimable objectives do not account for the importance of promoting distribution alignment during label acquisition. Following that, Jesson et al. (2021b) propose $\mu \rho$ BALD from an information theory perspective, which reduces the distributional discrepancy between treatment groups by scaling the acquisition criterion with the inverse of counterfactual uncertainty. However, such a method relies heavily on the accuracy of the quantified uncertainty and the training of complex estimators, e.g., deep kernel learning (Wilson et al., 2016). To get the best of both worlds, Wen et al. (2025) devise a simple yet performant algorithm MACAL, which considers the reduction of distributional discrepancy while remaining model-independent during data acquisition. However, MACAL has to query the data in pairs (i.e., one each from treated/control group), which hinders its generalizability when optimality can be achieved by querying from one treatment group. Additionally, it is hard to obtain the overall risk upper bound convergence despite the convergence analysis on sub-objectives. + +Contribution. Considering the aforementioned theoretical and practical limitations of existing methods for data-efficient treatment effect estimation, this paper presents a three-fold contribution to this area of research. 1). We establish a theoretical framework rooted in the active learning paradigm, specifically tailored to address Eq. (1) which is not directly estimizable. Unlike $\mu \rho$ BALD (Jesson + +et al., 2021b), the proposed theorem outlines the model-independent reducible quantities as the optimization alternative, i.e., factual and counterfactual covering radius. Our theorem further generalizes QHTE by additionally accounting for the distribution alignment with the counterfactual covering radius. 2). In contrast to MACAL (Wen et al., 2025), we propose two model-independent algorithms, both of which obtain optimality via single data point acquisition instead of pairwise queries, to minimize the covering radius-based objective: a greedy radius reduction method that works well in idealized distributions, and a greedy factual and counterfactual coverage maximization method - FCCM that allows for greater flexibility on the data distribution of the pool set; 3). We demonstrate the superiority of FCCM on real-world covariates with extensive performance comparisons and qualitative visualizations. + +# 2. Preliminaries + +Treatment effect estimation. In this paper, we estimate the treatment effect under the potential outcome framework (Imbens & Rubin, 2015). Let the covariate, treatment, and treatment outcome space be denoted as $\mathcal{X}$ , $\mathcal{T}$ , and $\mathcal{V}$ , respectively. We train the treatment effect estimator $f_{\mathcal{D}}: \mathcal{X} \times \mathcal{T} \to \mathcal{V}$ based on the dataset $\mathcal{D} = \{(x_i, t_i, y_i)\}_{i=1}^N$ , where $x_i, t_i, y_i$ are respectively the feature vectors, treatment assignment, and treatment outcome that correspond to the $i$ -th individual. Without loss of generality, we consider binary treatments $t \in \{0,1\}$ , and use $Y^{t=1}$ and $Y^{t=0}$ to denote the potential outcomes of corresponding treatments. The ground truth individual treatment effect (ITE) for individual $x$ is defined as (Shalit et al., 2017): + +$$ +\tau (\mathbf {x}) = \mathbb {E} \left[ Y ^ {t = 1} - Y ^ {t = 0} \mid \mathbf {x} \right]. \tag {2} +$$ + +To evaluate the performance of the trained model $f_{\mathcal{D}}$ , we adopt the expected precision in estimation of heterogeneous effect (PEHE) (Hill, 2011), which is the go-to choice for various treatment effect estimation tasks (Shalit et al., 2017; Louizos et al., 2017; Shi et al., 2019; Jesson et al., 2021b; Wang et al., 2024): + +Definition 2.1. The expected PEHE of the estimator $f$ with squared loss metric $\xi(\cdot)$ is defined as: + +$$ +\epsilon_ {\mathrm {P E H E}} (f) = \int_ {\mathcal {X}} \xi (\mathbf {x}; f) p (\mathbf {x}) d \mathbf {x}, \tag {3} +$$ + +where $\xi (\mathbf{x};f) = (\hat{\tau} (\mathbf{x}) - \tau (\mathbf{x}))^{2}$ , $\tau (\mathbf{x})$ is the ground truth effect defined in (2), and $\hat{\tau} (\mathbf{x}) = f(\mathbf{x},t = 1) - f(\mathbf{x},t = 0)$ is its estimation. The lower the PEHE value, the better the model performance. + +For the identifiability of the treatment effect $\tau(\mathbf{x})$ , the following assumptions from the causal inference literature are the sufficient conditions to let it hold (Shalit et al., 2017; Pearl, 2009): + +Assumption 2.2 (Consistency). Only one potential outcome is seen by each unit given the treatment $t$ , i.e., $y = Y^{t=0}$ if $t = 0$ or $y = Y^{t=1}$ if $t = 1$ . + +Assumption 2.3 (Strong Ignorability). The independence relation $\{Y^{t = 0}, Y^{t = 1}\} \perp t \mid \mathbf{x}$ and the conditional probability $0 < p(t = 1 \mid \mathbf{x}) < 1$ hold for all $\mathbf{x}$ . + +Integrating active learning. In situations where the labels $y_{i}$ in $\mathcal{D}$ are unavailable, we thus introduce AL to build a labeled training set $S$ out of $\mathcal{D}$ . To enhance treatment effect estimators via AL, we 1). feed the oracle-labeled dataset $S = \{(\mathbf{x}_i, t_i, y_i)\}_{i=1}^k$ for training estimator $f_S$ ; 2). evaluate the performance of the model; 3). determine if training can be terminated based on performance or labeling budget; 4). if no to the above, select the unlabeled subset $\tilde{S}^*$ from pool set $\mathcal{D} = \{(x_i, t_i)\}_{i=1}^n$ for the oracle to label; 5). expand the fully labeled subset $S$ with newly labeled data points $\tilde{S}^*$ and return to step 1). This recursive procedure terminates when the desired performance is reached or the labeling budget is exhausted, and to achieve the objective in Eq. (1), the key is to identify the best strategy to construct $S$ . + +Related work. In addition to the analysis in Section 1, we include a more detailed review of existing work on treatment effect estimation, AL, and data-efficient treatment effect estimation in Appendix B. + +# 3. Bounds: A Counterfactual Covering Perspective + +We upper-bound Eq. (1) in a general form under the AL paradigm, using a formulation similar to that defined in (Sener & Savarese, 2018) for the classification problem. Thus, the population risk $-\epsilon_{\mathrm{PEHE}}(f_S)$ is constrained as: + +$$ +\begin{array}{l} \epsilon_ {\mathrm {P E H E}} (f _ {S}) \\ = \epsilon_ {\mathrm {P E H E}} (f _ {\mathcal {S}}) - \frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {\mathcal {S}}) + \frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {\mathcal {S}}) - \\ \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l (\mathbf {x} _ {j}, y _ {j}, t _ {j}; f _ {\mathcal {S}}) + \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l (\mathbf {x} _ {j}, y _ {j}, t _ {j}; f _ {\mathcal {S}}) \\ \leq \underbrace {\left| \epsilon_ {\mathrm {P E H E}} \left(f _ {S}\right) - \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i} ; f _ {S}\right) \right|} _ {\text {G e n e r a l i z a t i o n E r r o r}} + \tag {4} \\ \underbrace {\left\lfloor \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i} ; f _ {\mathcal {S}}\right) - \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l \left(\mathbf {x} _ {j} , y _ {j} , t _ {j} ; f _ {\mathcal {S}}\right) \right\rfloor} _ {\text {S u b s e t G e n e r a l i z a t i o n G a p} \Delta} + \\ \underbrace{\frac{1}{|S|}\sum_{j = 1}^{|S|}l(\mathbf{x}_{j},y_{j},t_{j};f_{\mathcal{S}})}_{\text{Empirical Training Loss}}, \\ \end{array} +$$ + +where $\xi (\cdot ;f_{\mathcal{S}})$ is in Definition 2.1 (incalculable without the counterfactual outcomes), and $l(\cdot ;f_{\mathcal{S}})$ a loss function for the labeled training set $S$ with observed potential outcomes. + +The expected model risk $\epsilon_{\mathrm{PEHE}}(f_S)$ at the population level with trained estimator $f_{S}$ on subset $S$ is controlled by three terms as shown in Eq. (4). The generalization error is bounded w.r.t. the size $n$ as in the general machine learning research (Vapnik, 1999). Commonly, the counterfactual effect for the same unit is rarely observable, e.g., a patient undergoes only one type of surgery, or a customer experiences only a single version of the software in an A/B test. Consequently, rendering the term $\xi (\mathbf{x}_i;f_S)$ non-computable. Nonetheless, the key is that we can bound the gap between the critical yet incalculable term with the training loss on $S$ in the remaining two terms. By assuming zero training loss in the same fashion as (Sener & Savarese, 2018), we can explicitly formalize Eq. (1) into: + +$$ +\begin{array}{l} \min _ {\mathcal {S} \subset \mathcal {D}} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) - \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l \left(\mathbf {x} _ {i}, y _ {i}, t _ {i}; f _ {\mathcal {S}}\right) \right| \tag {5} \\ \begin{array}{l l} \text {s . t .} & | \mathcal {S} | \leq B, \end{array} \\ \end{array} +$$ + +where the subset generalization gap $\Delta$ in $\epsilon_{\mathrm{PEHE}}(f_S)$ is maintained as the final objective. + +To optimize the objective in Eq. (5) that is incalculable because of $\xi (\mathbf{x}_i;f_S)$ , we instead focus on identifying reducible quantities by capping the objective with a probabilistic risk upper bound outlined in Theorem 3.4. The key reducible quantities, i.e., factual covering radius $\delta_{(t,t)}$ , and the counterfactual covering radius $\delta_{(t,1 - t)}$ are defined below. + +Definition 3.1. The covering radius $\delta_{(t,t^{\prime})}$ is defined as the radius of the smallest ball centered at the labeled samples from treatment group $t$ , such that the union of these balls covers all samples within group $t^{\prime}, \forall t^{\prime} \in \{t, 1 - t\}$ , with factual covering induced by $t^{\prime} = t$ and counterfactual covering induced by $t^{\prime} = 1 - t$ . + +To derive Theorem 3.4, we further assume the Lipschitz continuity and the existence of the constant $\kappa$ , with the discussions on their practicability given in Appendix C.5. + +Assumption 3.2 (Lipschitz Continuity). Assume that the conditional probability density function $p^t(y|\mathbf{x})$ is $\lambda_t$ -Lipschitz, the squared loss function $l$ is $\lambda_l$ -Lipschitz and $l$ is further bounded by $L_l$ . + +Assumption 3.3 (Constant $\kappa$ ). Let $\mathcal{H} = \{h|h:\mathcal{X}\to \mathbb{R}\}$ be a family of functions and $f:\mathcal{X}\times \mathcal{T}\rightarrow \mathcal{V}$ be the hypothesis. Assume that there exists a constant $\kappa >0$ , such that $h_f(\mathbf{x},t)\coloneqq \frac{1}{\kappa} l_f(\mathbf{x},t)\in \mathcal{H}$ . + +Theorem 3.4. Let $\mathbf{x}$ be sampled i.i.d. $n$ times from domain $\mathcal{X}$ . Under Assumption 3.2 and Assumption 3.3, with probability at least $1 - \gamma$ , where $\gamma \in (0,1)$ , the subset + +![](images/2be12735605a368340de9a59e07aa95d2ca91038e2b063a91910428c88683754.jpg) +Figure 1. Visualization of the factual covering (FC) and the counterfactual covering (CFC) on the dataset by the acquired samples from each group. Note that each covering is constrained by the full coverage on the desired dataset with the minimum radius. + +generalization gap $\Delta$ is upper-bounded as: + +$$ +\begin{array}{l} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {\mathcal {S}}) - \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l (\mathbf {x} _ {i}, y _ {i}, t _ {i}; f _ {\mathcal {S}}) \right| \\ \leq \sum_ {t \in \{0, 1 \}} \kappa_ {t} \left(\delta_ {(t, t)} + \delta_ {(t, 1 - t)}\right) + 2 \kappa_ {\mathcal {H}} + \sqrt {\frac {L _ {l} ^ {2} \log \frac {1}{\gamma}}{2 n}}, \tag {6} \\ \end{array} +$$ + +where the constants $\kappa_{t} = 2\left(\lambda_{l} + \frac{1}{3}\lambda_{t}L_{l}^{\frac{3}{2}}\right)$ , and $\kappa_{\mathcal{H}} = \kappa \cdot IPM_{\mathcal{H}}(p^{t=1}(\mathbf{x}), p^{t=0}(\mathbf{x}))$ with $IPM_{\mathcal{H}}(\cdot, \cdot)$ being the integral probability metric induced by $\mathcal{H}$ , and $p^t(\mathbf{x})$ denotes the density distribution of treatment group $t$ . + +Proof of the theorem is provided in Appendix A.1. To enhance interpretation, we visualize the factual and counterfactual covering radius in Figure 1 with four labeled samples from a random two-dimensional toy dataset. For example, Figure 1(a) shows the factual covering with radius $\delta_{(1,1)}$ such that the union of the circles centered at the two labeled $t = 1$ samples covers all samples from group $t = 1$ . Noting that the covering radius $\delta_{(t,t^{\prime})}$ decreases monotonically as the size of labeled set $S$ grows under the AL paradigm, we present a further corollary to reveal the convergence of the subset generalization gap $\Delta$ given the fixed-size pool set $\mathcal{D}$ . + +Corollary 3.5 (Informal). Let $n$ be fixed, given $\delta_{(t,t^{\prime})}$ decreases monotonically as $S$ grows under the AL paradigm, then, with probability at least $1 - \gamma$ , we have: + +$$ +\Delta = \mathcal {O} \left(\delta_ {(1, 1)}\right) + \mathcal {O} \left(\delta_ {(1, 0)}\right) + \mathcal {O} \left(\delta_ {(0, 0)}\right) + \mathcal {O} \left(\delta_ {(0, 1)}\right). \tag {7} +$$ + +Qualitatively, the factual covering radius is inversely related to the sample diversity, e.g., if the two marked samples in Figure 1(a) are overlapped (low diversity), the radius $\delta_{(1,1)}$ is larger. The counterfactual covering radius is also inversely related to the distributional discrepancy, e.g., if the two marked $t = 1$ samples in Figure 1(b) are further + +away from the center of the group $t = 0$ , the radius $\delta_{(1,0)}$ is larger. Thus, it is evident that the objective is to minimize the covering radius as much as possible within the labeling budget, thereby reducing the risk upper bound. Intuitively, the radius reduction given limited centers is analogous to the $k$ -Center problem (Wolf, 2011). However, under the treatment effect estimation setting, the derived bound introduces the counterfactual covering radius which fundamentally differs from the classical $k$ -Center problem, where the centers only cover data points from the same class (i.e., treatment group in our case), as per Figure 1(a) and 1(c). + +# 4. Methodologies + +In this section, we propose two greedy algorithms to minimize the four covering radii in Eq. (7). The first algorithm draws direct inspiration from the Corollary 3.5 and extends the core-set solution (Tsang et al., 2005; Sener & Savarese, 2018) into the counterfactual covering perspective, while the second algorithm provides more flexibility on the data distribution and relaxes the full coverage constraint to achieve stronger radius reduction under the same labeling budget. + +# 4.1. Factual and Counterfactual Radii Reduction + +Denote $\mathbf{x}_i^t$ , $\mathcal{D}_t$ , and $\mathcal{S}_t$ as the individual covariate vector, pool set, and labeled training set for the treatment group $t$ , respectively. Note that $d(\cdot, \cdot)$ is a distance metric, and $\tilde{\mathcal{S}}_t$ is a proxy collection which is explicitly explained in Appendix C.1. Motivated by the Corollary 3.5, the objective is to find the optimal subset $\mathcal{S}$ that minimizes the sum of the factual and the counterfactual covering radii as follows: + +$$ +\min _ {\mathcal {S} = \mathcal {S} _ {0} \cup \mathcal {S} _ {1}, | \mathcal {S} | \leq B} \delta_ {(1, 1)} + \delta_ {(1, 0)} + \delta_ {(0, 0)} + \delta_ {(0, 1)}, \tag {8} +$$ + +and for $t\in \{0,1\}$ $\delta_{(t,t)} = \max_{i\in \mathcal{D}_t\setminus \mathcal{S}_t}\min_{j\in \mathcal{S}_t}d(\mathbf{x}_i^t,\mathbf{x}_j^t),$ $\delta_{(t,1 - t)} = \max_{i\in \mathcal{D}_{1 - t}\setminus \tilde{S}_{1 - t}}\min_{j\in \mathcal{S}_t}d(\mathbf{x}_i^{1 - t},\mathbf{x}_j^t).$ + +However, to say the least, this minimization is as difficult + +Algorithm 1 Greedy Radius Reduction (Sketch) +1: Input: $\mathcal{D}_1, \mathcal{D}_0$ ; randomly initialized $S_1, S_0$ ; budget $B$ ; pseudo operator $\Gamma := \arg \max \min d(\cdot, \cdot)$ +2: $\mathcal{S}^{\mathrm{init}} \gets S_1 \cup S_0, \mathcal{S} \gets \mathcal{S}^{\mathrm{init}}, \tilde{S}_1 \gets \emptyset, \tilde{S}_0 \gets \emptyset$ +#Labels in $S$ is not used in querying. +3: while $|S| < |S^{\mathrm{init}}| + B$ do +4: Calculate $\delta \gets \max \{\delta_{(1,1)}, \delta_{(1,0)}, \delta_{(0,0)}, \delta_{(0,1)}\}$ +5: if $\delta == \delta_{(1,1)}$ or $\delta == \delta_{(0,0)}$ then +6: Find point $a$ to reduce the factual radius via $\Gamma$ . +7: else +8: Find proxy point $a'$ to reduce the counterfactual radius via $\Gamma$ , and then compute corresponded $a$ . +9: end if +10: $S \gets S \cup \{a\} \# a$ is not labeled. +11: end while +12: Output: $S$ + +as solving the classic $k$ -Center problem that is NP-hard (Cook et al., 1998). The minimization of the factual covering radii, i.e., $\delta_{(1,1)}$ and $\delta_{(0,0)}$ , is essentially the classical $k$ -Center problem, while the minimization of the counterfactual covering radii, i.e., $\delta_{(1,0)}$ and $\delta_{(0,1)}$ , involves the unconventional covering of one group by the centers from the other group, e.g., covering all samples within group $t = 1$ by the centers from group $t = 0$ or vise versa, as visually depicted in Figure 1(b) and 1(d). + +To solve Eq. (8), we provide a greedy radius reduction method in Algorithm 1 (sketch, with details in Appendix C.1), where the largest radius among the four radii is prioritized to be reduced. Recall Assumption 2.3 (Strong Ignorability), the counterfactual covering radii returned by our proposed algorithm can be effectively reduced under this assumption for the data distribution between the treatment groups, i.e., $0 < p(t = 1|\mathbf{x}) < 1$ . Furthermore, denoting the minimal covering radius under the optimal solution as $OPT_{\delta_{(\cdot ,\cdot)}}$ , we give the theoretical guarantee for Algorithm 1 as follows: + +Theorem 4.1. Under Assumption 2.3, the sum of the covering radii returned by Algorithm 1 is upper-bounded by $2 \times \sum_{t \in \{0,1\}} (OPT_{\delta_{(t,t)}} + OPT_{\delta_{(t,1 - t)}})$ . + +Proof is provided in Appendix A.5. It is noted that data distribution can strongly affect the effectiveness of radius reduction by Algorithm 1. For example, if two treatment groups share identical distributions, Eq. (8) simply reduces to the conventional $k$ -Center problem, for which a quick convergence of the covering radii is foreseeable. However, partially overlapped data distributions between groups can bring exponential challenges in effectively minimizing the sum of radii. In Figure 2, we illustrate the reduction of radii and their sum (denoted as Bound) in the normalized form against the size of acquired data, e.g., 1.0 represents the max value, 0.5 represents half of the max value. Under the + +![](images/bb188c4c8ed987c4a2e12877662cbc73ceaad1968b7583348469236fed0d3b8c.jpg) +(a) Identical Distribution +Figure 2. Visuals of the radius reduction and the descent of the Bound under ideal and realistic data distributions by Algorithm 1. + +![](images/8c6c4d8d4b04abfbd7d3897fba6dd9945531fc1fdf98b78ab563fa890dcda6f1.jpg) +(b) CMNIST + +identical distribution scenario, in Figure 2(a), the factual and counterfactual covering radii decline synchronously (five plots fully overlap with each other) under a quick risk convergence to zero, because Eq. (8) is reduced to the simple $k$ -Center problem (where Assumption 2.3 surely satisfies) which guarantees a $2-\mathrm{OPT}$ approximation and the greedy nature of Algorithm 1 forces the synchronous reduction. However, real-world data distribution commonly witnesses large group-wise discrepancies, e.g., in CMNIST benchmark (Jesson et al., 2021a), a significantly slower bound convergence is observed in Figure 2(b) due to the difficulty of consistently reducing the counterfactual covering radii $\delta_{(1,0)}$ and $\delta_{(0,1)}$ . Note that the synchronous reduction of $\delta_{(1,1)}$ and $\delta_{(0,0)}$ is also forced by the greedy nature of Algorithm 1. + +Discussions: Given the probability threshold $\gamma$ and fixed-size pool set $\mathcal{D}$ , Theorem 3.4 provides an adjustable upper-bound which depends on the declining covering radii as $S$ grows. However, the derivation of the upper bound is constrained by the full coverage on the pool set, which challenges the counterfactual covering radius reduction due to the uncontrollable real-world data distribution. In light of this, we further explore the possibility of relaxing the full coverage constraint to a more flexible condition, i.e., approximating the full coverage given the relatively smaller fixed covering radius. This underlying mentality resonates with the duality discussion of the core-set and the max coverage problem in (Yehuda et al., 2022). In the following section, we propose the factual and counterfactual coverage maximization (FCCM) solution to solve the radius reduction problem under compromised data distributions while maintaining high satisfaction with the constraint. + +# 4.2. Counterfactual-integrated Coverage Maximization + +Let the factual and the counterfactual covering balls, for treatment group $t$ be defined as follows: + +Definition 4.2. Given the fixed covering radius $\delta_{(t,t^{\prime})} > 0$ + +# Algorithm 2 FCCM + +1: Input: Covariate matrix $\mathbf{X} \in \mathcal{D}$ , random $S^{\mathrm{init}}$ ; $S \gets S^{\mathrm{init}}$ ; radius $\delta_{(t,t')}, \forall t, t' \in \{0,1\}$ ; weight $\alpha$ ; budget $B$ +2: $\mathcal{E}_{(t,t)} = \{(\mathbf{x}^t,\mathbf{x}') : \mathbf{x}' \in \mathcal{A}_F^t(\mathbf{x}^t)\}$ , $\mathcal{E}_{(t,1 - t)} = \{(\mathbf{x}^t,\mathbf{x}') : \mathbf{x}' \in \mathcal{A}_{CF}^t(\mathbf{x}^t)\}$ , $\mathcal{E}^{t=1} = \mathcal{E}_{(t,t)} \cup \mathcal{E}_{(t,1 - t)}$ +$W(\mathbf{x}^t,\mathbf{x}') = \left\{ \begin{array}{ll}1, & \mathrm{if}\mathbf{x}'\in \mathcal{A}_F^t (\mathbf{x}^t)\\ \alpha , & \mathrm{if}\mathbf{x}'\in \mathcal{A}_{CF}^t (\mathbf{x}^t), \end{array} \right.$ +Weighted $\mathcal{G} = (\mathcal{V} = \mathbf{X},\mathcal{E} = \mathcal{E}^{t = 1}\cup \mathcal{E}^{t = 0},\mathcal{W} = W)$ +3: for $v \in S^{\mathrm{init}}$ do +4: Remove the edges to the covered vertices: $\left\{(\mathbf{x}',\mathbf{x}^t)\in \mathcal{E}_{(t,t)},(\mathbf{x}^t,\mathbf{x}')\in \mathcal{E}_{(t,1 - t)}:(v^t,\mathbf{x}^t)\in \right.$ $\mathcal{E}_{(t,t)},\forall t\in \{0,1\})\}$ +5: end for +6: while $|S| \leq |S^{\mathrm{init}}| + B$ do +7: $S \gets S \cup \{v\}$ , where $v$ is the vertex with the highest scaled out-degree in graph $\mathcal{G}$ (see Appendix C.2). +8: Remove the edges to the covered vertices: $\left\{(\mathbf{x}',\mathbf{x}^t)\in \mathcal{E}_{(t,t)},(\mathbf{x}^t,\mathbf{x}')\in \mathcal{E}_{(t,1 - t)}:(v^t,\mathbf{x}^t)\in \right.$ $\mathcal{E}_{(t,t)},\forall t\in \{0,1\} \}$ +9: end while +10: Output: $\mathcal{S}$ + +the covering ball $\mathcal{A}_{(t,t^{\prime})}$ centered at $\mathbf{x}\in S_t$ is defined as: $\mathcal{A}_{(t,t^{\prime})}(\mathbf{x}) = \{\mathbf{x}^{\prime}\in \mathcal{D}_{t^{\prime}}:\| \mathbf{x} - \mathbf{x}^{\prime}\| \leq \delta_{(t,t^{\prime})}\} ,\forall t^{\prime}\in$ $\{t,1 - t\}$ , with the factual covering ball induced by $t^\prime = t$ and the counterfactual covering ball induced by $t^\prime = 1 - t$ + +Therefore, let the union of the factual covering balls be $\mathcal{A}_F^t = \bigcup_{\mathbf{x} \in S_t} \mathcal{A}_{(t,t)}(\mathbf{x})$ and the factual coverage be $P(\mathcal{A}_F^t) = \frac{|\mathcal{A}_F^t|}{|S_t|} \in (0,1]$ ; let the union of the counterfactual covering balls be $\mathcal{A}_{CF}^t = \bigcup_{\mathbf{x} \in S_t} \mathcal{A}_{(t,1 - t)}(\mathbf{x})$ and the counterfactual coverage be $P(\mathcal{A}_{CF}^t) = \frac{|\mathcal{A}_{CF}^t|}{|S_{1 - t}|} \in [0,1]$ . Then, we further define the mean coverage $P(\mathcal{A})$ and sum of the radii $\delta_{\mathrm{sum}}$ : + +$$ +\begin{array}{l} P (\mathcal {A}) = \frac {1}{4} \left(P \left(\mathcal {A} _ {F} ^ {t = 1}\right) + P \left(\mathcal {A} _ {C F} ^ {t = 1}\right) + P \left(\mathcal {A} _ {F} ^ {t = 0}\right) + P \left(\mathcal {A} _ {C F} ^ {t = 0}\right)\right), \\ \delta_ {\text {s u m}} = \delta_ {(1, 1)} + \delta_ {(1, 0)} + \delta_ {(0, 0)} + \delta_ {(0, 1)}. \tag {9} \\ \end{array} +$$ + +With the underlying full coverage constraint, Eq. (8) can be explicitly expressed as: + +$$ +\min _ {\mathcal {S} \in \mathcal {D}} \delta_ {\text {s u m}} \quad \text {s . t .} P (\mathcal {A}) - 1 = 0. \tag {10} +$$ + +Noting that in Section 4.1, we discuss the dilemma of reducing $\delta_{(t,1 - t)}$ due to the large discrepancy that exists in the realistic dataset. To further suppress the interested bound - $\delta_{\mathrm{sum}}$ , we transform Eq. (10) into the mean coverage maximization in Eq. (11) to maximally satisfy the equality constraint given smaller radius for the bound: + +$$ +\max _ {\mathcal {S} \in \mathcal {D}} P (\mathcal {A}). \tag {11} +$$ + +![](images/c2ce9d834bd526f895ea4760761c42286b0a257ad2450a65dc26a719ca7ca980.jpg) +(a) Coverage on CMNIST + +![](images/3844bbedf26ae368f78f0df28dc40ba0c9458175536c549462e07fe60997bd81.jpg) +(b) Gain vs. Loss +Figure 3. Visualization of the high coverage by Algorithm 2 on CMNIST, and reduction gain over mean coverage loss by Algorithm 2 when compared to Algorithm 1. + +To solve (11), we propose a greedy solution - factual and counterfactual coverage maximization (FCCM) in Algorithm 2. Specifically, FCCM constructs a weighted graph $\mathcal{G}$ with the node $V$ by the entire covariate matrix $\mathbf{X} \in \mathcal{D}$ and each node $v^t \in \mathcal{D}_t$ builds the directed edge $e(v^t, u^t)$ (with unit weight) pointing to the node $u^t$ within the ball $\mathcal{A}_{(t,t)}(v^t)$ , thus constructing a directed graph $\mathcal{G}_t$ . Then, graph $\mathcal{G}_t$ is further expanded by adding the weighted edges $e(v^t, u^{1-t})$ (with weight $\alpha$ ) for $v^t \in \mathcal{D}_t$ pointing to the node $u^{1-t}$ within the counterfactual ball $\mathcal{A}_{(t,1-t)}(v^t)$ . Once $\mathcal{G}_{t=1}$ and $\mathcal{G}_{t=0}$ are both obtained, they are naturally connected to build the final weighted graph $\mathcal{G}$ . Note that FCCM differs from ProbCover (Yehuda et al., 2022) which only works on a single class/group, whereas FCCM not only handles binary treatment groups but also integrates the distinctive counterfactual covering to solve Eq. (11). + +Unlike Algorithm 1, which can be regarded as a top-down approach that optimizes the risk upper bound throughout the AL process with the equality constraint satisfied at each step, Algorithm 2 adopts a bottom-up approach, working on satisfying the equality constraint under a fixed bound. To further give Algorithm 2 a theoretical guarantee in Theorem 4.4 (with proof provided in Appendix A.6), we assume that the full factual and counterfactual coverage are possible by the returned labeled set $S$ as follows: + +Assumption 4.3. Given the fixed covering radius $\delta_{(t,t)}$ and $\delta_{(t,1 - t)}$ , there exists the optimal solution $S_t^*$ , $S_t^* \subset S^*$ for treatment group $t$ , $\forall t \in \{0,1\}$ , such that $\mathcal{A}_F^t \bigcup \mathcal{A}_{CF}^t = \mathcal{D}$ . + +Theorem 4.4. Under Assumption 4.3, Algorithm 2 is a $(1 - \frac{1}{e})$ approximation for the full coverage constraint on the equally weighted graph and unscaled out-degree. + +Exploratory analysis: Following our discussions on Algorithm 1, we conduct the exploratory analysis on the CM-NIST benchmark (Jesson et al., 2021a) in Figure 3(a) to demonstrate the high coverage efficiency by Algorithm 2 on the real-world covariates. Further experiment on the per + +![](images/d86894a00333c48002a6033fe28c0f9ba2412648281c4c7d2f1f6a88d883d12c.jpg) +(a) TOY + +![](images/a3467980aab377001d0ab4381522e8a6a48bc77173242164f44eae10d170d096.jpg) +(b) IBM + +![](images/d1e81c1a74618fb627de0ebd8a0a5c28b630bb57bd8f695eb7831f65319153b9.jpg) +(c) CMNIST +Figure 4. Estimating a smaller range for the covering radius $\delta$ around the $95\%$ coverage threshold by Algorithm 2. + +formance compared to Algorithm 1 is accessible in Figure 3(b), where both the high reduction of the sum of the radii and the low compromise of the coverage are observed, e.g., maximally $25\%$ reduction (red line) with $1\%$ mean coverage loss (blue line) around the training size of 2500. + +# 4.3. Approximating the Covering Radius + +The hyperparameters, i.e., $\delta_{(t,t)}$ and $\delta_{(t,1 - t)}$ are crucial for the success of obtaining a relatively lower upper bound without heavily intruding into the full coverage constraint. For simplicity, we set the same size for all four radii and denote them as $\delta$ uniformly, in Figure 4, we experiment different values of $\delta$ (normalized w.r.t. the max distance between points), and calculate the converged coverage on the growing training set given the pre-set covering radius. Thus, we estimate a narrower range for the relatively small radius with an achievable high mean coverage around the $95\%$ threshold, to reduce the search space for further hyperparameter tuning. + +Uniform $\delta$ : The rationale to use uniform $\delta$ is to avoid making the search space prohibitively large – on the order of $\mathcal{O}(m^4)$ if each radius has $m$ candidate settings. The key insight to reduce the search complexity is that, by the definition of the mean coverage $P(\mathcal{A})$ in Eq. (9), Definition 3.1, and Definition 4.2, each radius is independent and each sub-term of $P(\mathcal{A})$ increases monotonically with its corresponding radius, which leads to the mean coverage $P(\mathcal{A})$ increases monotonically. Thus, by the independence and monotonicity, the search for four radii stays in the same direction, making the initial search space $\mathcal{O}(m)$ to identify the smallest radius for satisfying the $95\%$ mean coverage threshold. + +Different $\delta$ : Though the shared value among four radii allows for effective and efficient initial hyperparameter tuning, it could potentially fail if the distribution discrepancy between the two treatment groups is very large. This is because the counterfactual covering radius can be far larger than the factual covering radius, i.e., $\delta_{(t,1 - t)} \gg \delta_{(t,t)}$ , to let the counterfactual coverage $P(\mathcal{A}_{CF}^t)$ to get close to full, lowering the utility of the uniform radius value. As such, + +Table 1. Summary of the Acquisition Setup and Testing + +
DatasetStartLengthStepsPoolValTest
TOYALL*150720028801600
IBMALL*5050289131806250
CMNISTALL*5050167061050018000
+ +if the distribution discrepancy between treatment groups is large, it is then viable to identify a different value for each covering radius to maintain the high coverage under the linear complexity due to the independence and monotonicity. + +# 5. Experiments + +Datasets: Toy - a simulated 2-dimensional toy dataset based on 16,000 randomly generated samples. IBM (Shimoni et al., 2018) - a high-dimensional tabular dataset based on the publicly available Linked Births and Infant Deaths Database. Each simulation contains 25,000 samples with 177 real-world covariates randomly selected from a cohort of 100,000 individuals; CMNIST (Jesson et al., 2021a) - This dataset contains 60,000 image samples (10 classes) of size $28 \times 28$ , which are adapted from MINIST (LeCun, 1998) benchmark. Further simulation details are deferred to the Appendix C.3. + +Metric: The PEHE defined in Definition 2.1 with the squared root empirical expression: $\sqrt{\epsilon_{\mathrm{PEHE}}} = \sqrt{\sum_{i=1}^{N} \left( \left( y_i^{t=1} - y_i^{t=0} \right) - \tau_i \right)^2 / N}$ , is used for measuring the risk of the estimator at the individual level. + +Baselines: We compare FCCM to two groups of models, namely, the general AL model from the broader research field: BADGE (Ash et al., 2019), BAIT (Ash et al., 2021), and LCMD (Holzmüller et al., 2023). And the designated model for treatment effect estimation with AL: QHTE (Qin et al., 2021), Causal-Bald (Jesson et al., 2021b) (with variants $\mu$ BALD, $\rho$ BALD, and $\mu \rho$ BALD), and MACAL (Wen et al., 2025) are the designated algorithms proposed to deal with the treatment effect estimation with AL. + +Estimators: The same setup as described in (Jesson et al., 2021b; Wen et al., 2025) is adopted here by utilizing the following two open-source estimators: DUE-DNN (Van Amersfoort et al., 2021) for tabular data, and DUE-CNN (Van Amersfoort et al., 2021) for image data. Model training details can be found in Appendix C.6. + +Evaluation scheme: The details of the data acquisition setup is summarized in Table 1, where we initialize the training set $S$ with the entire labeled samples (denoted as ALL*) from group $t = 0$ and start acquisition only on the sample from $t = 1$ , which simulates scenarios with a significant number of missing counterfactual samples. Then, a fixed step length is enforced at each acquisition step with fifty data acquisition steps. Note that for Toy dataset we + +![](images/2939b2c521fadb2475319142cbce8aadf8fd6978a9d9276a24e8e3a9d95113fb.jpg) +(a) TOY + +![](images/006df4a065ffdc9250a325da9b2081c2828784bc03106b13c5f5845b63271ce4.jpg) +(b) IBM + +![](images/721c6efb49d47abc096d70568bf40a9b508433f01c1b8835f666314a1f028c87.jpg) +(c) CMNIST + +![](images/4749f9059d0f9bc7e3e91a3e7e4ddcfd4f01b4b658df8d1003cee314ae3a7df1.jpg) +Figure 5. All plots are the mean values averaged from 10 simulations associated with the standard deviation as the error bar. Note that all models at $0\%$ exhibit the same performance given the fixed estimators and are thus neglected. The performance under $2\%$ granularity is presented in Appendix C.7. +(a) Data Distribution +Figure 6. Visualizations of the toy dataset distribution, and the actual acquisition of the data by FCCM, $\mu \rho$ BALD, and BAIT. The size of the data point and color from (b) to (c) is adjusted to its associated density, with deeper color representing higher density and vice versa. + +![](images/743d3b79629b85fc2180f825406d0c812b8fdfe4f26bffbb85d8964e5da6fb01.jpg) +(b) FCCM + +![](images/4f16c08de599ea34f81b23bd12c7ba1a64806ca2ac9f26c6f931da6570f23b23.jpg) +(c) $\mu \rho$ BALD + +![](images/2f6fbf11cb66e56db32019c75b8f3c91ab3c0710a24439297e219d01cdecfca3.jpg) +(d) BAIT + +do single data acquisition to show fine-granularity results, and batch-mode acquisition for the other two datasets. Each evaluation is done by the estimator trained from the last best checkpoint without completely re-train from scratch. + +# 5.1. Risk Evaluations + +In Figure 5, it is observed that our proposed method is generally served as the risk lower bound in all three datasets. Its outstanding performance empirically proves the superiority of our method which considers the joint coverage on the factual and counterfactual data throughout the process of the querying. This acquisition scheme leads to a lower estimation risk that can be further explained qualitatively with the two underlying properties: i). querying from a high-density region; ii). considering the satisfactions of the positivity assumption alongside. The first property leverages the generalizability of the trained estimator to the acquired samples' neighborhoods, where a high-density neighborhood accounts for higher loss. The second property considers the pivotal overlapping assumption for treatment effect estimation, for which robust estimation toward an individual can be derived by pairing such an individual's factual or counterfactual part from the overlapping region. Thus, our proposed method outperforms the other baselines + +by prioritizing the data acquisition toward the overlapping region with high density, while others cannot do both essentially. + +Given the above qualitative analysis, it is explainable that the other method designed for data-efficient treatment effect estimation (DTEE), e.g., $\mu \rho$ BALD, underperforms our method. For example, although $\mu \rho$ BALD bias the data acquisition toward the overlapping region, it does not further embed the property to query from the high-density region, and thus accounts for less risk. The same mentality applies to the other DTEE methods, e.g., MACAL, QHTE, etc. Also, it is observed that the baselines from the general AL field, e.g., LCMD and BAIT, underperform our method by not directly considering the data acquisition toward the overlapping region, which is pivotal for treatment effect estimation. However, it is interestingly observed that BAIT can outperform many DTEE baselines on CMNIST, but it underperforms on TOY and IBM. Furthermore, the current DTEE baselines cannot consistently outperform the general AL methods across various datasets. + +# 5.2. Acquisition Visualization + +The original distribution of the two-dimensional toy dataset is given in Figure 6(a) for reference, where the overlapping + +region is plotted in a dashed purple line by kernel density estimation (Scott, 2015). From Figure 6(c) to 6(d), the density of each data point is calculated in by Line 2 in Algorithm 2, the higher the out-degree of each node, the denser it is as visually observed in the overlapped region. Under the fine granularity of querying one sample at a time, it's observed that in Figure 6(b) FCCM consistently delivers the high priority to query from the overlapping region with high density, while $\mu \rho$ BALD is witnessed to have more queries fall outside the overlapping region and less priority on query from the high-density region (query No.2 is fall at the edge of the distribution, where sparse and no overlapping is observed) as shown in Figure 6(c). Also, BAIT's acquisition spreads out the entire data on group $t = 1$ without considering the presence of the counterfactual samples and thus queries the least from the desired region as shown in Figure 6(d). Their associated performance by 20 acquired samples (40% consumption of budget) also seen with a significant gap as illustrated in Figure 5(a). + +# 5.3. Ablation and Sensitivity Study + +Table 2. Ablation Study of the Counterfactual Covering Radii + +
DatasetMethodConsumption of the Total Budget
1/52/53/54/55/5
TOYFCCM-FCCM4.76802.24961.33721.05450.9024
4.76641.86551.09780.86370.7565
Gain+0%+17%+18%+18%+16%
IBMFCCM-FCCM0.47450.40880.37970.35120.3291
0.48130.41320.38450.35070.3286
Gain-1%-1%-1%+0%+0%
CMNISTFCCM-FCCM2.92502.66272.46522.31052.2073
2.22071.86811.77351.73441.6790
Gain+24%+30%+28%+25%+24%
+ +The ablation study is conducted to study the effect of maximizing the counterfactual coverage, e.g., $P(\mathcal{A}_{CF}^{t = 1})$ . Essentially, two models are compared, our proposed method FCCM, and the FCCM $^{-}$ (by setting counterfactual covering radii $\delta_{(1,0)} = 0$ and $\delta_{(0,1)} = 0$ , and this action tailors the ProbCover (Yehuda et al., 2022) to align with the context for binary-class AL). In Table 2, we capture five stages of the total query steps, and calculate the performance gain by $\frac{\sqrt{\epsilon_{\mathrm{PEHE}}}}{\sqrt{\epsilon_{\mathrm{PEHE}}}} \frac{\mathrm{FCCM}^{-} - \sqrt{\epsilon_{\mathrm{PEHE}}}}{\mathrm{FCCM}^{-}} \times 100\%$ . It is noted that the performance gain on Toy and CMNIST datasets are significant, however, with neck-to-neck performance observed on the IBM dataset. This phenomenon is explainable since the treated and control distributions on IBM are heavily overlapped such that the high-density region on the treated sample $(t = 1)$ is in fact the high-density region on the counterfactual side $(t = 0)$ . We provide the visualization of the IBM and CMNIST in Appendix C.4 for further discussions + +of the underlying rationale. Additionally, the sensitivity analysis of $\alpha$ and the covering radii $\delta_{(1,1)}$ and $\delta_{(1,0)}$ is presented in Appendix C.8. There, we generally observe that a non-zero weight $\alpha$ is influential for dataset with less overlap, and that a larger covering radius can lead to greater risk reduction in the early stage, albeit at the cost of reduced performance in the later stage. + +# 6. Conclusion + +We formalize the data-efficient treatment effect estimation problem under a solid theoretical framework, where the convergence of the risk upper bound is governed by the reduction of the derived factual and counterfactual covering radii. To reduce the bound, we propose a greedy radius reduction algorithm, which is 2 - OPT-like under an idealized data distribution assumption. To generalize to more realistic data distributions for higher radius reduction, we further propose FCCM, which transforms the optimization objective into the factual and counterfactual coverage maximization with a $(1 - \frac{1}{e})$ -approximation to the full coverage constraint. Also, benchmarking with other baselines further proves the superiority of FCCM on solving the data-efficient treatment effect estimation problem. + +Limitation: FCCM is designed to better handle the partially overlapped data for a quicker bound reduction while maintaining high coverage (Figure 3(b)). As such, in scenarios where the two treatment groups have non-overlapping regions in the raw feature space (e.g., biased treatment assignment), the data acquisition of FCCM will be challenged as there are no overlapping, counterfactual pairs to be identified. One possible remedy is to operate FCCM in the latent space where the inter-group distributions are aligned by methods like (Shalit et al., 2017; Zhang et al., 2020; Wang et al., 2024), but it also offsets the model-independent advantage of FCCM. + +# Acknowledgements + +The Australian Research Council partially supports this work under the streams of Future Fellowship (Grant No. FT210100624), Discovery Early Career Researcher Award (Grant No. DE230101033 and DE210101624), Discovery Project (Grant No. DP240101108, DP240101814 and DP240102088), Industrial Transformation Training Centre (Grant No. IC200100022), and Linkage Project (Grant No. LP230200892 and LP240200546). Additional support from Health and Wellbeing Queensland is also gratefully acknowledged. We also thank the reviewers and area chair for their insightful suggestions during the rebuttal and discussion phase. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Causal Inference. Our work entails many potential societal benefits, including enhanced accuracy in treatment estimation for new drugs and improved robustness in causal inference models under data sparsity. + +# References + +Addanki, R., Arbour, D., Mai, T., Musco, C., and Rao, A. Sample constrained treatment effect estimation. Advances in Neural Information Processing Systems, 35: 5417-5430, 2022. +Alaa, A. M. and Van Der Schaar, M. Bayesian inference of individualized treatment effects using multi-task gaussian processes. Advances in Neural Information Processing Systems, 2017. +Ash, J., Goel, S., Krishnamurthy, A., and Kakade, S. Gone fishing: Neural active learning with fisher embeddings. Advances in Neural Information Processing Systems, 34: 8927-8939, 2021. +Ash, J. T., Zhang, C., Krishnamurthy, A., Langford, J., and Agarwal, A. Deep batch active learning by diverse, uncertain gradient lower bounds. In International Conference on Learning Representations, 2019. +Chen, W., Cai, R., Yang, Z., Qiao, J., Yan, Y., Li, Z., and Hao, Z. Doubly robust causal effect estimation under networked interference via targeted learning. In Proceedings of the 41st International Conference on Machine Learning, pp. 6457-6485, 2024. +Connolly, B., Moore, K., Schwedes, T., Adam, A., Willis, G., Feige, I., and Frye, C. Task-specific experimental design for treatment effect estimation. In International Conference on Machine Learning, pp. 6384-6401. PMLR, 2023. +Cook, W. J., Cunningham, W. H., Pulleyblank, W. R., and Schrijver, A. Combinatorial Optimization. Springer, 1998. +Deng, K., Pineau, J., and Murphy, S. Active learning for personalizing treatment. In 2011 IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL), pp. 32-39. IEEE, 2011. +Dinitz, M. Lecture 4: Approximation algorithms - vertex cover and set cover. https://www.cs.jhu.edu/~mdinitz/classes/ApproxAlgorithms/Spring2019/Lectures/lecture4.pdf, 2019. + +Fujii, K. and Kashima, H. Budgeted stream-based active learning via adaptive submodular maximization. Advances in Neural Information Processing Systems, 29, 2016. +Gal, Y., Islam, R., and Ghahramani, Z. Deep bayesian active learning with image data. In International Conference on Machine Learning, pp. 1183-1192. PMLR, 2017. +Ghadiri, M., Arbour, D., Mai, T., Musco, C., and Rao, A. B. Finite population regression adjustment and nonasymptotic guarantees for treatment effect estimation. Advances in Neural Information Processing Systems, 36, 2024. +Hill, J. L. Bayesian nonparametric modeling for causal inference. Journal of Computational and Graphical Statistics, 20(1):217-240, 2011. +Holzmüller, D., Zaverkin, V., Kästner, J., and Steinwart, I. A framework and benchmark for deep batch active learning for regression. Journal of Machine Learning Research, 24(164):1-81, 2023. +Imbens, G. W. and Rubin, D. B. Causal inference in statistics, social, and biomedical sciences. Cambridge University Press, 2015. +Jesson, A., Mindermann, S., Shalit, U., and Gal, Y. Identifying causal-effect inference failure with uncertainty-aware models. Advances in Neural Information Processing Systems, 33:11637-11649, 2020. +Jesson, A., Mindermann, S., Gal, Y., and Shalit, U. Quantifying ignorance in individual-level causal-effect estimates under hidden confounding. In International Conference on Machine Learning, pp. 4829-4838. PMLR, 2021a. +Jesson, A., Tigas, P., van Amersfoort, J., Kirsch, A., Shalit, U., and Gal, Y. Causal-bald: Deep bayesian active learning of outcomes to infer treatment-effects from observational data. Advances in Neural Information Processing Systems, 34:30465-30478, 2021b. +Kallus, N. Deepmatch: Balancing deep covariate representations for causal inference using adversarial training. In International Conference on Machine Learning, pp. 5067-5077. PMLR, 2020. +Kirsch, A., Farquhar, S., Atighehchian, P., Jesson, A., Branchaud-Charron, F., and Gal, Y. Stochastic batch acquisition: A simple baseline for deep active learning. Transactions on Machine Learning Research, 2023. +Kohavi, R. and Longbotham, R. Online controlled experiments and a/b tests. Encyclopedia of machine learning and data mining, pp. 1-11, 2015. + +LeCun, Y. The mnist database of handwritten digits. http://yann.lecun.com/exdb/mnist/, 1998. +Lin, X., Zhang, G., Lu, X., Bao, H., Takeuchi, K., and Kashima, H. Estimating treatment effects under heterogeneous interference. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 576-592. Springer, 2023. +Lin, X., Zhang, G., Lu, X., and Kashima, H. Treatment effect estimation under unknown interference. In Pacific-Asia Conference on Knowledge Discovery and Data Mining, pp. 28-42. Springer, 2024. +Lin, X., Bao, H., Cui, Y., Takeuchi, K., and Kashima, H. Scalable individual treatment effect estimator for large graphs. Machine Learning, 114(1):1-19, 2025. +Louizos, C., Shalit, U., Mooij, J. M., Sontag, D., Zemel, R., and Welling, M. Causal effect inference with deep latent-variable models. Advances in Neural Information Processing Systems, 30, 2017. +Ma, J., Wan, M., Yang, L., Li, J., Hecht, B., and Teevan, J. Learning causal effects on hypergraphs. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1202-1212, 2022. +Ma, Y. and Tresp, V. Causal inference under networked interference and intervention policy enhancement. In International Conference on Artificial Intelligence and Statistics, pp. 3700-3708. PMLR, 2021. +MacKay, D. Government policy experiments and the ethics of randomization. Philosophy & Public Affairs, 48(4): 319-352, 2020. +Pearl, J. Causality. Cambridge university press, 2009. +Pilat, C., Frech, T., Wagner, A., Krüger, K., Hillebrecht, A., Pons-Kühnemann, J., Scheibelhut, C., Bödeker, R.-H., and Mooren, F.-C. Exploring effects of a natural combination medicine on exercise-induced inflammatory immune response: A double-blind rct. Scandinavian Journal of Medicine & Science in Sports, 25(4):534-542, 2015. +Pinsler, R., Gordon, J., Nalisnick, E., and Hernández-Lobato, J. M. Bayesian batch active learning as sparse subset approximation. Advances in Neural Information Processing Systems, 32, 2019. +Piskorz, J., Astorga, N., Berrevoets, J., and van der Schaar, M. Active feature acquisition for personalised treatment assignment. In The 28th International Conference on Artificial Intelligence and Statistics, 2025. + +Qin, T., Wang, T.-Z., and Zhou, Z.-H. Budgeted heterogeneous treatment effect estimation. In International Conference on Machine Learning, pp. 8693-8702. PMLR, 2021. +Rakesh, V., Guo, R., Moraffah, R., Agarwal, N., and Liu, H. Linked causal variational autoencoder for inferring paired spillover effects. In Proceedings of the 27th ACM International Conference on Information and Knowledge Management, pp. 1679-1682, 2018. +Ren, P., Xiao, Y., Chang, X., Huang, P.-Y., Li, Z., Gupta, B. B., Chen, X., and Wang, X. A survey of deep active learning. ACM computing surveys (CSUR), 54(9):1-40, 2021. +Robins, J. M., Rotnitzky, A., and Zhao, L. P. Estimation of regression coefficients when some regressors are not always observed. Journal of the American statistical Association, 89(427):846-866, 1994. +Rosenbaum, P. R. and Rubin, D. B. The central role of the propensity score in observational studies for causal effects. Biometrika, 70(1):41-55, 1983. +Scott, D. W. Multivariate density estimation: theory, practice, and visualization. John Wiley & Sons, 2015. +Sener, O. and Savarese, S. Active learning for convolutional neural networks: A core-set approach. In International Conference on Learning Representations, 2018. +Settles, B. Active learning literature survey. Computer Sciences Technical Report, 2009. +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. +Shimoni, Y., Yanover, C., Karavani, E., and Goldschmmidt, Y. Benchmarking framework for performance-evaluation of causal inference analysis. arXiv preprint arXiv:1802.05046, 2018. +Smith, K. On the standard deviations of adjusted and interpolated values of an observed polynomial function and its constants and the guidance they give towards a proper choice of the distribution of observations. Biometrika, 12 (1/2):1-85, 1918. +Sundin, I., Schulam, P., Siivola, E., Vehtari, A., Saria, S., and Kaski, S. Active learning for decision-making from imbalanced observational data. In International Conference on Machine Learning, pp. 6046-6055. PMLR, 2019. + +Tsang, I. W., Kwok, J. T., Cheung, P.-M., and Cristianini, N. Core vector machines: Fastsvm training on very large data sets. Journal of Machine Learning Research, 6(4), 2005. +Van Amersfoort, J., Smith, L., Jesson, A., Key, O., and Gal, Y. On feature collapse and deep kernel learning for single forward pass uncertainty. arXiv preprint arXiv:2102.11409, 2021. +Vapnik, V. N. An overview of statistical learning theory. IEEE transactions on neural networks, 10(5):988-999, 1999. +Wang, H., Fan, J., Chen, Z., Li, H., Liu, W., Liu, T., Dai, Q., Wang, Y., Dong, Z., and Tang, R. Optimal transport for treatment effect estimation. Advances in Neural Information Processing Systems, 36, 2024. +Wang, L., Hu, X., Yuan, B., and Lu, J. Active learning via query synthesis and nearest neighbour search. Neurocomputing, 147:426-434, 2015. +Wen, H., Chen, T., Ye, G., Chai, L. K., Sadiq, S., and Yin, H. Progressive generalization risk reduction for data-efficient causal effect estimation. In Proceedings of 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, volume V.1, pp. 1575-1586, 2025. +Wilson, A. G., Hu, Z., Salakhutdinov, R., and Xing, E. P. Deep kernel learning. In Artificial intelligence and statistics, pp. 370-378. PMLR, 2016. +Wolf, G. W. Facility location: concepts, models, algorithms and case studies, 2011. +Wu, D. Pool-based sequential active learning for regression. IEEE transactions on neural networks and learning systems, 30(5):1348-1359, 2018. +Yao, L., Li, S., Li, Y., Huai, M., Gao, J., and Zhang, A. Representation learning for treatment effect estimation from observational data. Advances in Neural Information Processing Systems, 31, 2018. +Yehuda, O., Dekel, A., Hacohen, G., and Weinshall, D. Active learning through a covering lens. Advances in Neural Information Processing Systems, 35:22354-22367, 2022. +Yoon, J., Jordan, J., and Van Der Schaar, M. Ganite: Estimation of individualized treatment effects using generative adversarial nets. In International Conference on Learning Representations, 2018. +Zhan, X., Wang, Q., Huang, K.-h., Xiong, H., Dou, D., and Chan, A. B. A comparative survey of deep active learning. arXiv preprint arXiv:2203.13450, 2022. + +Zhang, Y., Bellot, A., and Schaar, M. Learning overlapping representations for the estimation of individualized treatment effects. In International Conference on Artificial Intelligence and Statistics, pp. 1005-1014. PMLR, 2020. + +# A. Theory + +# A.1. Proof of Theorem 3.4 + +Assumption 3.2 (Lipschitz Continuity). Assume that the conditional probability density function $p^t(y|\mathbf{x})$ is $\lambda_t$ -Lipschitz, the squared loss function $l$ is $\lambda_l$ -Lipschitz and $l$ is further bounded by $L_l$ . + +Assumption 3.3 (Constant $\kappa$ ). Let $\mathcal{H} = \{h|h:\mathcal{X}\to \mathbb{R}\}$ be a family of functions and $f:\mathcal{X}\times \mathcal{T}\rightarrow \mathcal{Y}$ be the hypothesis. Assume that there exists a constant $\kappa >0$ , such that $h_f(\mathbf{x},t)\coloneqq \frac{1}{\kappa} l_f(\mathbf{x},t)\in \mathcal{H}$ . + +Theorem 3.4. Let $\mathbf{x}$ be sampled i.i.d. $n$ times from domain $\mathcal{X}$ . Under Assumption 3.2 and Assumption 3.3, with probability at least $1 - \gamma$ , where $\gamma \in (0,1)$ , the subset generalization gap $\Delta$ is upper-bounded as: + +$$ +\begin{array}{l} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) - \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l \left(\mathbf {x} _ {i}, y _ {i}, t _ {i}; f _ {\mathcal {S}}\right) \right| \tag {12} \\ \leq \sum_ {t \in \{0, 1 \}} \kappa_ {t} \left(\delta_ {(t, t)} + \delta_ {(t, 1 - t)}\right) + 2 \kappa_ {\mathcal {H}} + \sqrt {\frac {L _ {l} ^ {2} \log \frac {1}{\gamma}}{2 n}}, \\ \end{array} +$$ + +where the constants $\kappa_{t} = 2\left(\lambda_{l} + \frac{1}{3}\lambda_{t}L_{l}^{\frac{3}{2}}\right)$ , and $\kappa_{\mathcal{H}} = \kappa \cdot IPM_{\mathcal{H}}(p^{t=1}(\mathbf{x}), p^{t=0}(\mathbf{x}))$ with $IPM_{\mathcal{H}}(\cdot, \cdot)$ denotes the integral probability metric induced by $\mathcal{H}$ and $p^t(\mathbf{x})$ denotes the density distribution of treatment group $t$ . + +Proof of Theorem 3.4. The proof is done in three main steps: Firstly, we bound the expected value of the interested term $\frac{1}{n}\sum_{i=1}^{n}\xi(\mathbf{x}_i;f_S)$ with factual and counterfactual loss, namely, $\epsilon_F$ and $\epsilon_{CF}$ over the domain of the pool set. Secondly, we constrain the $\epsilon_F$ with the factual covering radius $\delta_{(t,t)}$ and the $\epsilon_{CF}$ with the counterfactual covering radius $\delta_{(t,1-t)}$ . Lastly, we conclude the probabilistic bound by Hoeffding's inequality. + +$$ +\begin{array}{l} \mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) \right] \leq 2 \left(\epsilon_ {F} + \epsilon_ {C F}\right) (13a) \\ \leq \sum_ {t \in \{0, 1 \}} 2 \mu_ {t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right) + \sum_ {t \in \{0, 1 \}} 2 \mu_ {1 - t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, 1 - t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right) + 2 \kappa_ {\mathcal {H}} (13b) \\ \leq \sum_ {t \in \{0, 1 \}} 2 \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right) \left(\delta_ {(t, t)} + \delta_ {(t, 1 - t)}\right) + 2 \kappa_ {\mathcal {H}}. (13c) \\ \end{array} +$$ + +The inequality (13a) is by Lemma A.2, the inequality (13b) is by Lemma A.3 and A.5, the equality in (13c) is by the zero training loss assumption and the fact that $\mu_t \leq 1, \forall t \in \{0, 1\}$ . With Hoeffding's inequality, we have: + +$$ +\mathbb {P} \left(\frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) - \mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) \right] \geq \epsilon\right) = \exp \left(- \frac {2 n \epsilon^ {2}}{L _ {l} ^ {2}}\right). \tag {13d} +$$ + +By setting $\gamma = \exp \left(-\frac{2n\epsilon^2}{L_l^2}\right)$ , we solve for the bounding gap $\epsilon = \sqrt{\frac{L_l^2\log\frac{1}{\gamma}}{2n}}$ . Thus, we can derive that with probability at least $1 - \gamma$ , the following inequality holds: + +$$ +\frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {\mathcal {S}}) \leq \mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {\mathcal {S}}) \right] + \sqrt {\frac {L _ {l} ^ {2} \log \frac {1}{\gamma}}{2 n}}. \tag {13e} +$$ + +To conclude, we have: + +$$ +\begin{array}{l} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) - \frac {1}{| \mathcal {S} |} \sum_ {j = 1} ^ {| \mathcal {S} |} l \left(\mathbf {x} _ {i}, y _ {i}, t _ {i}; f _ {\mathcal {S}}\right) \right| (13f) \\ = \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) (13g) \\ \leq \mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi (\mathbf {x} _ {i}; f _ {S}) \right] + \sqrt {\frac {L _ {l} ^ {2} \log \frac {1}{\gamma}}{2 n}} (13h) \\ \leq \sum_ {t \in \{0, 1 \}} 2 \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right) \left(\delta_ {(t, t)} + \delta_ {(t, 1 - t)}\right) + 2 \kappa_ {\mathcal {H}} + \sqrt {\frac {L _ {l} ^ {2} \log \frac {1}{\gamma}}{2 n}}. (13i) \\ \end{array} +$$ + +The equality (13g) is by the zero training loss assumption, the inequality (13h) is by incorporating (13e), the final inequality (13i) is concluded by incorporating (13c). + +Discussion on the bound: Given the i.i.d. sampled pool set from the domain $\mathcal{X}$ , it is noted that in the final probabilistic bound, if the sampled two distributions were identical and we selected the entire pool set for training, simply by definition, we have both the factual and counterfactual covering radius be completely zero, and also the distributional discrepancy term $\kappa_{\mathcal{H}}$ counted by IPM be completed zero, leaving the tightness of the risk upper bound solely depends on the size of the pool set $n$ and for the given probability threshold $\gamma$ . + +![](images/11aa31a2ba14a240297b1952cf66c3641d98970b27e81cb9c2fd8bc884c06d76.jpg) + +# A.2. Proof of Lemma A.2 + +Definition A.1. Given the loss metric $l$ , the expected factual loss $\epsilon_F$ and counterfactual loss $\epsilon_{CF}$ are defined in a manner consistent with (Shalit et al., 2017) as follows: + +$$ +\begin{array}{l} \epsilon_ {F} = \int_ {\mathcal {X} \times \mathcal {T}} l (\mathbf {x}, t) p (\mathbf {x}, t) d \mathbf {x} d t, \tag {14} \\ \epsilon_ {C F} = \int_ {\mathcal {X} \times \mathcal {T}} l (\mathbf {x}, t) p (\mathbf {x}, 1 - t) d \mathbf {x} d t. \\ \end{array} +$$ + +Lemma A.2. Let $\mathbf{x}$ to be sampled i.i.d. $n$ times from the domain $\mathcal{X}$ . With the two-headed trained model $f_{\mathcal{S}} = \{\hat{f}^{t=1}, \hat{f}^{t=0}\}$ on the selected subset $\mathcal{S}$ , where $\hat{f}^{t=1}, \hat{f}^{t=0}: \mathcal{X} \to \mathcal{Y}$ are the estimators for the treatment effect $y^t$ respectively. The expected value of $\frac{1}{n} \sum_{i=1}^{n} \xi(\mathbf{x}_i; f_{\mathcal{S}})$ is upper-bounded as follows: + +$$ +\mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) \right] \leq 2 \left(\epsilon_ {F} + \epsilon_ {C F}\right). \tag {15} +$$ + +Proof of Lemma A.2. Note that the overall estimator is denoted as $f_{S}$ , which is a two-headed model with $\hat{f}^t$ representing the estimation for the treatment effect $y^{t}$ under treatment assignment $t$ . With a slight abuse of notation, we write the expected loss over $\mathbf{x}$ where $y$ is implicitly assumed to be a function of $\mathbf{x}$ , i.e., each $\mathbf{x}$ has an associated label $y$ , as is typical in + +supervised learning setting: + +$$ +\mathbb {E} \left[ \frac {1}{n} \sum_ {i = 1} ^ {n} \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) \right] = \frac {1}{n} \sum_ {i = 1} ^ {n} \mathbb {E} \left[ \xi \left(\mathbf {x} _ {i}; f _ {\mathcal {S}}\right) \right] \tag {16a} +$$ + +$$ += \mathbb {E} _ {\mathbf {x} \sim \mathcal {X}} [ \xi (\mathbf {x}; f _ {\mathcal {S}}) ] \tag {16b} +$$ + +$$ += \int_ {\mathcal {X}} (\tau (\mathbf {x}) - \hat {\tau} (\mathbf {x})) ^ {2} p (\mathbf {x}) d \mathbf {x} \tag {16c} +$$ + +$$ += \int_ {\mathcal {X}} \left(\left(y ^ {t = 1} - y ^ {t = 0}\right) - \left(\hat {f} ^ {t = 1} (\mathbf {x}) - \hat {f} ^ {t = 0} (\mathbf {x}))\right) ^ {2} p (\mathbf {x}) d \mathbf {x} \right. \tag {16d} +$$ + +$$ += \int_ {\mathcal {X}} \left(\underbrace {\left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) - \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right)} _ {\text {S w a p} y ^ {t = 0} \text {a n d} \hat {f} ^ {t = 1} (\mathbf {x})}\right) ^ {2} p (\mathbf {x}) d \mathbf {x} \tag {16e} +$$ + +$$ +\leq 2 \int_ {\mathcal {X}} \left(\left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} + \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2}\right) p (\mathbf {x}) d \mathbf {x} \tag {16f} +$$ + +$$ += \underbrace {2 \int_ {\mathcal {X}} \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} p (\mathbf {x} , t = 1) d \mathbf {x}} _ {\text {A p p l y} p (\mathbf {x}) = \int p (x, t) d t = p (\mathbf {x}, t = 1) + p (\mathbf {x}, t = 0)} p (\mathbf {x}, t = 0) d \mathbf {x}} + \tag {16g} +$$ + +$$ +2 \int_ {\mathcal {X}} \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2} p (\mathbf {x}, t = 0) d \mathbf {x} + 2 \int_ {\mathcal {X}} \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2} p (\mathbf {x}, t = 1) d \mathbf {x} \tag {16h} +$$ + +$$ += \underbrace {2 \int_ {\mathcal {X}} \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} p (\mathbf {x} , t = 1) d \mathbf {x}} _ {\text {R e - a r r a n g e a n d t h i s t e r m e q u a l s} 2 \epsilon_ {F} \text {b y d e f i n i t i o n}} + \tag {16i} +$$ + +$$ +\underbrace {2 \int_ {\mathcal {X}} \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} p (\mathbf {x} , t = 0) d \mathbf {x}} _ {\text {R e - a r r a n g e a n d t h i s t e r m e q u a l s} 2 \epsilon_ {C F} \text {b y d e f i n i t i o n}} \tag {16j} +$$ + +$$ += 2 \left(\epsilon_ {F} + \epsilon_ {C F}\right). \tag {16k} +$$ + +Discussion: Lemma A.2 indicates an interesting decomposition of the expected loss into factual and counterfactual errors, which is a prelude to our final probabilistic bound under AL paradigm. It is worth mentioning that a similar intermediate conclusion appears to align with observations in (Shalit et al., 2017). + +# A.3. Proof of Lemma A.3 + +Lemma A.3. Denote the expected loss on subset $S_{t}$ as $\epsilon_{S_t}$ , the factual covering radius as $\delta_{(t,t)}$ , let the constant $\mu_t = p(t)$ be the marginal probability. Assume that the conditional probability density function $p^t (y|\mathbf{x})$ is $\lambda_{t}$ -Lipschitz, the squared loss function $l$ is $\lambda_{l}$ -Lipschitz and $l$ is further bounded by $L_{l}$ , the expected factual loss is bounded as follows: + +$$ +\epsilon_ {F} \leq \sum_ {t \in \{0, 1 \}} \mu_ {t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right). \tag {17} +$$ + +Proof of Lemma A.3. We start with the Tower Law for the key of the proof, let the estimation be $\hat{y} = \hat{f}(\mathbf{x})$ given the fixed treatment $t$ , we have the expected loss to be decomposed in the general form: + +$$ +\begin{array}{l} \mathbb {E} _ {\mathcal {X}} \left[ (y - \hat {f} (\mathbf {x})) ^ {2} \right] = \mathbb {E} _ {\mathcal {X}} \left[ \mathbb {E} _ {\mathcal {Y}} \left[ (y - \hat {f} (\mathbf {x})) ^ {2} \mid \mathbf {x} \right] \right] (18a) \\ = \mathbb {E} _ {\mathcal {X}} \left[ \int_ {\mathcal {Y}} (y - \hat {f} (\mathbf {x})) ^ {2} p (y \mid \mathbf {x}) d y \right]. (18b) \\ \end{array} +$$ + +Denote $p^t(y|\mathbf{x}) = p(y|\mathbf{x}, t)$ and $p^t(\mathbf{x}) = p(\mathbf{x}|t)$ , we apply the Tower Law conclusion in Eq. (18b) by Tow Law and further bound the expected factual error $\epsilon_F^t$ for the treatment group $t$ : + +$$ +\begin{array}{l} \epsilon_ {F} ^ {t} = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ (y - \hat {f} ^ {t} (\mathbf {x})) ^ {2} \right] (19a) \\ = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \mathbb {E} _ {\mathcal {Y} ^ {t}} \left[ (y - \hat {f} ^ {t} (\mathbf {x})) ^ {2} \mid \mathbf {x} \right] \right] (19b) \\ = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} (y | \mathbf {x}) d y \right] (19c) \\ = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) \underbrace {- p ^ {t} \left(y | \mathbf {x} ^ {\prime}\right) + p ^ {t} \left(y | \mathbf {x} ^ {\prime}\right)} _ {\text {A d d u p t o Z e r o}}\right) d y \right] (19d) \\ = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y + \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y \right]. (19e) \\ \end{array} +$$ + +We decompose the first term within the expectation in (19e) into the followings, by the selected $\mathbf{x}' \in S_t$ that covers the $\mathbf{x}$ from group $t$ within the factual radius $\delta_{(t,t)}$ , we bound the term as: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} \left(y \mid \mathbf {x} ^ {\prime}\right) d y = \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t} + l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} \left(y \mid \mathbf {x} ^ {\prime}\right) d y (20a) \\ = \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} (y | \mathbf {x} ^ {\prime}) d y + \int_ {\mathcal {Y}} l _ {y ^ {\prime}} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (20b) \\ \leq \delta_ {(t, t)} \lambda_ {l} + \int_ {\mathcal {Y}} l _ {y ^ {\prime}} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (20c) \\ = \delta_ {(t, t)} \lambda_ {l} + \epsilon_ {\mathcal {S} _ {t}} \left(\mathbf {x} ^ {\prime}\right), (20d) \\ \end{array} +$$ + +where the inequality in (20c) is because: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} (y | \mathbf {x} ^ {\prime}) d y \leq | \mathbf {x} - \mathbf {x} ^ {\prime} | \int_ {\mathcal {Y}} \left| \frac {l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}}{\mathbf {x} - \mathbf {x} ^ {\prime}} \right| p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (21a) \\ \leq \left| \mathbf {x} - \mathbf {x} ^ {\prime} \right| \int_ {\mathcal {Y}} \lambda_ {l} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (21b) \\ \leq \delta_ {(t, t)} \int_ {\mathcal {Y}} \lambda_ {l} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (21c) \\ = \delta_ {(t, t)} \lambda_ {l} \int_ {\mathcal {Y}} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (21d) \\ = \delta_ {(t, t)} \lambda_ {l}, (21e) \\ \end{array} +$$ + +for which the equality in (21e) is because the integral of the density across the domain is 1: + +$$ +\int_ {\mathcal {Y}} p ^ {t} (y \mid \mathbf {x} ^ {\prime}) d y = 1. \tag {22} +$$ + +The second term within the expectation in (19e) is bounded by: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} \left(y | \mathbf {x}\right) - p ^ {t} \left(y | \mathbf {x} ^ {\prime}\right)\right) d y \leq | \mathbf {x} - \mathbf {x} ^ {\prime} | \int_ {\mathcal {Y}} l _ {y} ^ {t} \left| \frac {p ^ {t} \left(y | \mathbf {x}\right) - p ^ {t} \left(y | \mathbf {x} ^ {\prime}\right)}{\mathbf {x} - \mathbf {x} ^ {\prime}} \right|\left. \right) d y (23a) \\ \leq \delta_ {(t, t)} \lambda_ {t} \int_ {\mathcal {Y}} l _ {y} ^ {t} d y (23b) \\ = \frac {1}{3} \delta_ {(t, t)} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}. (23c) \\ \end{array} +$$ + +Combining all the inequalities together, we have: + +$$ +\begin{array}{l} \epsilon_ {F} ^ {t} = \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y + \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y \right] (24a) \\ \leq \mathbb {E} _ {\mathcal {X} ^ {t}} \left[ \epsilon_ {\mathcal {S} _ {t}} \left(\mathbf {x} ^ {\prime}\right) + \delta_ {(t, t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right) \right] (24b) \\ = \epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right), (24c) \\ \end{array} +$$ + +where the last equality holds due to $\mathbb{E}[\epsilon_{\mathcal{S}_t}(\mathbf{x}')] = \epsilon_{\mathcal{S}_t}$ and the invariance of constants under expectation, i.e., $\mathbb{E}(c) = c$ for any constant $c$ . + +Given that $\mu_{t=1} = p(t = 1)$ and $\mu_{t=0} = p(t = 0)$ , where $\mu_{t=1} + \mu_{t=0} = 1$ , we conclude the proof by expanding the expected factual loss $\epsilon_F$ by definition: + +$$ +\begin{array}{l} \epsilon_ {F} = \int_ {\mathcal {X} \times \mathcal {T}} l (\mathbf {x}, t) p (\mathbf {x}, t) d \mathbf {x} d t (25a) \\ = \int_ {\mathcal {X}} l ^ {t = 1} (\mathbf {x}) p (\mathbf {x}, t = 1) d \mathbf {x} + \int_ {\mathcal {X}} l ^ {t = 0} (\mathbf {x}) p (\mathbf {x}, t = 0) d \mathbf {x} (25b) \\ = \int_ {\mathcal {X}} l ^ {t = 1} (\mathbf {x}) p ^ {t = 1} (\mathbf {x}) p (t = 1) d \mathbf {x} + \int_ {\mathcal {X}} l ^ {t = 0} (\mathbf {x}) p ^ {t = 0} (\mathbf {x}) p (t = 0) d \mathbf {x} (25c) \\ = p (t = 1) \cdot \mathbb {E} _ {\mathcal {X} ^ {t = 1}} \left[ (y - \hat {f} ^ {t = 1} (\mathbf {x})) ^ {2} \right] + p (t = 0) \cdot \mathbb {E} _ {\mathcal {X} ^ {t = 0}} \left[ (y - \hat {f} ^ {t = 0} (\mathbf {x})) ^ {2} \right] (25d) \\ = \mu_ {t = 1} \cdot \mathbb {E} _ {\mathcal {X} ^ {t = 1}} \left[ \mathbb {E} _ {\mathcal {Y} ^ {t = 1}} \left[ (y - \hat {f} ^ {t = 1} (\mathbf {x})) ^ {2} \mid \mathbf {x} \right] \right] + \mu_ {t = 0} \cdot \mathbb {E} _ {\mathcal {X} ^ {t = 0}} \left[ \mathbb {E} _ {\mathcal {Y} ^ {t = 0}} \left[ (y - \hat {f} ^ {t = 0} (\mathbf {x})) ^ {2} \mid \mathbf {x} \right] \right] (25e) \\ \leq \sum_ {t \in \{0, 1 \}} \mu_ {t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right). (25f) \\ \end{array} +$$ + +Discussion: Lemma A.3 establishes a general upper bound on the factual loss under the core-set paradigm, which has been explored in prior studies (Sener & Savarese, 2018; Qin et al., 2021). Building on this foundation, we provide a more rigorous and comprehensive proof to strengthen the theoretical underpinnings. Also, we visualize the factual covering radius in Figure 1(a) and 1(c) to enhance interpretation, where the full coverage on the same class is required. + +# A.4. Proof of Lemma A.5 + +Definition A.4. Let $\mathcal{H} = \{h|h:\mathcal{X}\to \mathbb{R}\}$ be a family of functions. The distribution distance measure - integral probability metric (IPM) between two data distributions $p^{t = 1}(\mathbf{x})$ and $p^{t = 0}(\mathbf{x})$ over the domain $\mathcal{X}$ is defined as: + +$$ +\operatorname {I P M} _ {\mathcal {H}} \left(p ^ {t = 1} (\mathbf {x}), p ^ {t = 0} (\mathbf {x})\right) = \sup _ {h \in \mathcal {H}} \left| \int_ {\mathcal {X}} h (\mathbf {x}) \left(p ^ {t = 1} (\mathbf {x}) - p ^ {t = 0} (\mathbf {x})\right) d \mathbf {x} \right|. \tag {26} +$$ + +Lemma A.5. Denote the expected loss on subset $S_{t}$ as $\epsilon_{S_t}$ , the constant $\mu_t = p(t)$ , counterfactual covering radius as $\delta_{(t,1 - t)}$ . Assume that the conditional probability density function $p^t (y|\mathbf{x})$ is $\lambda_{t}$ -Lipschitz, the squared loss function $l$ is $\lambda_{l}$ -Lipschitz and $l$ is further bounded by $L_{l}$ . Also, let $\mathcal{H} = \{h|h:\mathcal{X}\to \mathbb{R}\}$ be a family of functions and $f:\mathcal{X}\times \mathcal{T}\rightarrow \mathcal{V}$ be the hypothesis. Assume that there exists a constant $\kappa >0$ , such that $h_f(\mathbf{x},t)\coloneqq \frac{1}{\kappa} l_f(\mathbf{x},t)\in \mathcal{H}$ . The counterfactual expected loss is bounded as follows: + +$$ +\epsilon_ {C F} \leq \sum_ {t \in \{0, 1 \}} \mu_ {1 - t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, 1 - t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right) + \kappa_ {\mathcal {H}}, \tag {27} +$$ + +where constant $\kappa_{\mathcal{H}} = \kappa \cdot IPM_{\mathcal{H}}(p^{t=1}(\mathbf{x}), p^{t=0}(\mathbf{x}))$ describes the distributional discrepancy between the treatment groups' distributions ( $p^{t=1}(\mathbf{x})$ and $p^{t=0}(\mathbf{x})$ ) over the domain $\mathcal{X}$ , e.g., its i.i.d realization set $\mathcal{S}$ induced by AL. + +Proof of Lemma A.5. For notation simplicity, we denote $l_y^t = (y - \hat{f}^t(\mathbf{x}))^2$ , and denote $p^{1-t}(\mathbf{x}) = p(\mathbf{x} \mid 1 - t)$ , for + +$\mathbf{x} \sim p^{1 - t}(\mathbf{x})$ , we have the counterfactual loss on the group $1 - t$ as: + +$$ +\begin{array}{l} \epsilon_ {C F} ^ {t} = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ (y - \hat {f} ^ {t} (\mathbf {x})) ^ {2} \right] (28a) \\ = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \mathbb {E} _ {\mathcal {Y} ^ {t}} \left[ (y - \hat {f} ^ {t} (\mathbf {x})) ^ {2} \mid \mathbf {x} \right] \right] (28b) \\ = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} (y | \mathbf {x}) d y \right] (28c) \\ = \mathbb {E} _ {\chi^ {1 - t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime}) + p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y \right] (28d) \\ = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y + \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y \right]. (28e) \\ \end{array} +$$ + +Note, that in (28d) we introduce the selected $\mathbf{x}' \in S_t$ from the distribution $p^t(\mathbf{x})$ ( $\mathbf{x}'$ is not directly sampled from $p^t(\mathbf{x})$ but from $S_t$ ), which can be considered counterfactual sample w.r.t. $\mathbf{x} \sim p^{1 - t}(\mathbf{x})$ . That is, the sample $\mathbf{x}$ from the group $1 - t$ is covered by the counterfactual sample $\mathbf{x}' \in S_t$ from group $t$ within the counterfactual radius $\delta_{(t,1 - t)}$ . + +Similar to the deduction in Appendix A.3, the first term within the expectation in (28e) is bounded by: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} \left(y \mid \mathbf {x} ^ {\prime}\right) d y = \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t} + l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} \left(y \mid \mathbf {x} ^ {\prime}\right) d y (29a) \\ = \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} (y | \mathbf {x} ^ {\prime}) d y + \int_ {\mathcal {Y}} l _ {y ^ {\prime}} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29b) \\ \leq \delta_ {(t, 1 - t)} \lambda_ {l} + \int_ {\mathcal {Y}} l _ {y ^ {\prime}} ^ {t} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29c) \\ = \delta_ {(t, 1 - t)} \lambda_ {l} + \epsilon_ {\mathcal {S} _ {t}} \left(\mathbf {x} ^ {\prime}\right). (29d) \\ \end{array} +$$ + +The inequality in (29c) is because: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} \left(l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}\right) p ^ {t} (y | \mathbf {x} ^ {\prime}) d y \leq | \mathbf {x} - \mathbf {x} ^ {\prime} | \int_ {\mathcal {Y}} \left| \frac {l _ {y} ^ {t} - l _ {y ^ {\prime}} ^ {t}}{\mathbf {x} - \mathbf {x} ^ {\prime}} \right| p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29e) \\ \leq | \mathbf {x} - \mathbf {x} ^ {\prime} | \int_ {\mathcal {Y}} \lambda_ {l} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29f) \\ \leq \delta_ {(t, 1 - t)} \int_ {\mathcal {Y}} \lambda_ {l} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29g) \\ = \delta_ {(t, 1 - t)} \lambda_ {l} \int_ {\mathcal {Y}} p ^ {t} (y | \mathbf {x} ^ {\prime}) d y (29h) \\ = \delta_ {(t, 1 - t)} \lambda_ {l}. (29i) \\ \end{array} +$$ + +The equality in (29i) is because the integral of the density across the domain is 1: + +$$ +\int_ {\mathcal {Y}} p ^ {t} \left(y \mid \mathbf {x} ^ {\prime}\right) d y = 1. \tag {29j} +$$ + +The second term within the expectation in (28e) is bounded by: + +$$ +\begin{array}{l} \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y = | \mathbf {x} - \mathbf {x} ^ {\prime} | \int_ {\mathcal {Y}} l _ {y} ^ {t} \frac {\left| p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime}) \right|}{| \mathbf {x} - \mathbf {x} ^ {\prime} |} d y (30a) \\ \leq \delta_ {(t, 1 - t)} \lambda_ {t} \int_ {\mathcal {Y}} l _ {y} ^ {t} d y (30b) \\ = \frac {1}{3} \delta_ {(t, 1 - t)} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}. (30c) \\ \end{array} +$$ + +Combining all the inequalities together, we have: + +$$ +\begin{array}{l} \epsilon_ {C F} ^ {t} = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \int_ {\mathcal {Y}} l _ {y} ^ {t} p ^ {t} \left(y | \mathbf {x} ^ {\prime}\right) d y + \int_ {\mathcal {Y}} l _ {y} ^ {t} \left(p ^ {t} (y | \mathbf {x}) - p ^ {t} (y | \mathbf {x} ^ {\prime})\right) d y \right] (31a) \\ \leq \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \epsilon_ {\mathcal {S} _ {t}} \left(\mathbf {x} ^ {\prime}\right) \right] + \delta_ {(t, 1 - t)} \lambda_ {l} + \frac {1}{3} \delta_ {(t, 1 - t)} \lambda_ {t} L _ {l} ^ {\frac {3}{2}} (31b) \\ = \mathbb {E} _ {\mathcal {X} ^ {1 - t}} \left[ \epsilon_ {\mathcal {S} _ {t}} \left(\mathbf {x} ^ {\prime}\right) \right] + \delta_ {(t, 1 - t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right), (31c) \\ \end{array} +$$ + +where the first term is the counterfactual loss on the subset $S_{t}$ induced by AL. + +Extending the expected counterfactual error $\epsilon_{CF}$ by definition: + +$$ +\begin{array}{l} \epsilon_ {C F} = \int_ {\mathcal {X} \times \mathcal {T}} l (\mathbf {x}, t) p (\mathbf {x}, 1 - t) d \mathbf {x} d t (32a) \\ = \int_ {\mathcal {X}} \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} p (\mathbf {x}, t = 0) d \mathbf {x} + \int_ {\mathcal {X}} \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2} p (\mathbf {x}, t = 1) d \mathbf {x} (32b) \\ = \int_ {\mathcal {X}} \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} p ^ {t = 0} (\mathbf {x}) p (t = 0) d \mathbf {x} + \int_ {\mathcal {X}} \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2} p ^ {t = 1} (\mathbf {x}) p (t = 1) d \mathbf {x} (32c) \\ = p (t = 0) \cdot \mathbb {E} _ {\chi^ {t = 0}} \left[ \left(y ^ {t = 1} - \hat {f} ^ {t = 1} (\mathbf {x})\right) ^ {2} \right] + p (t = 1) \cdot \mathbb {E} _ {\chi^ {t = 1}} \left[ \left(y ^ {t = 0} - \hat {f} ^ {t = 0} (\mathbf {x})\right) ^ {2} \right] (32d) \\ \leq \mu_ {t = 1} \left[ \mathbb {E} _ {\mathcal {X} ^ {t = 1}} \left[ \epsilon_ {\mathcal {S} _ {t = 0}} \left(\mathbf {x} ^ {\prime}\right) \right] + \delta_ {(0, 1)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t = 0} L _ {l} ^ {\frac {3}{2}}\right) \right] + \mu_ {t = 0} \left[ \mathbb {E} _ {\mathcal {X} ^ {t = 0}} \left[ \epsilon_ {\mathcal {S} _ {t = 1}} \left(\mathbf {x} ^ {\prime}\right) \right] + \delta_ {(1, 0)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t = 1} L _ {l} ^ {\frac {3}{2}}\right) \right] (32e) \\ = \left(\epsilon_ {C F}\right) _ {S} + \mu_ {t = 1} \cdot \delta_ {(0, 1)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t = 0} L _ {l} ^ {\frac {3}{2}}\right) + \mu_ {t = 0} \cdot \delta_ {(1, 0)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t = 1} L _ {l} ^ {\frac {3}{2}}\right). (32f) \\ \end{array} +$$ + +Noticing that the counterfactual loss over the selected set $S$ induced by AL: $(\epsilon_{CF})_S$ in (32f) can be further bounded by the IPM, e.g., Wasserstein distance, by adapting the proof of "Lemma 1" of the main text in (Shalit et al., 2017) to the subset $S$ induced by AL. Let $p(t = 1) = \mu$ be the marginal probability of treatment in $S$ , thus $p(t = 0) = 1 - \mu$ by noting that $p(t = 1) + p(t = 0) = 1$ , we bound the first term in (32f) as follows: + +$$ +\begin{array}{l} \left(\epsilon_ {C F}\right) _ {\mathcal {S}} - \left[ (1 - \mu) \cdot \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 1}} + \mu \cdot \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 0}} \right] (33a) \\ = \left[ (1 - \mu) \cdot \left(\epsilon_ {C F}\right) _ {\mathcal {S} _ {t = 1}} + \mu \cdot \left(\epsilon_ {C F}\right) _ {\mathcal {S} _ {t = 0}} \right] - \left[ (1 - \mu) \cdot \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 1}} + \mu \cdot \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 0}} \right] (33b) \\ = (1 - \mu) \cdot \left[ \left(\epsilon_ {C F}\right) _ {\mathcal {S} _ {t = 1}} - \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 1}} \right] + \mu \cdot \left[ \left(\epsilon_ {C F}\right) _ {\mathcal {S} _ {t = 0}} - \left(\epsilon_ {F}\right) _ {\mathcal {S} _ {t = 0}} \right] (33c) \\ = (1 - \mu) \int_ {\mathcal {X}} l _ {x} ^ {t = 1} \left(p ^ {t = 0} (\mathbf {x}) - p ^ {t = 1} (\mathbf {x})\right) d \mathbf {x} + \mu \int_ {\mathcal {X}} l _ {x} ^ {t = 0} \left(p ^ {t = 1} (\mathbf {x}) - p ^ {t = 0} (\mathbf {x})\right) d \mathbf {x} (33d) \\ = (1 - \mu) \kappa \cdot \int_ {\mathcal {X}} \frac {1}{\kappa} l _ {x} ^ {t = 1} \left(p ^ {t = 0} (\mathbf {x}) - p ^ {t = 1} (\mathbf {x})\right) d \mathbf {x} + \mu \kappa \cdot \int_ {\mathcal {X}} \frac {1}{\kappa} l _ {x} ^ {t = 0} \left(p ^ {t = 1} (\mathbf {x}) - p ^ {t = 0} (\mathbf {x})\right) d \mathbf {x} (33e) \\ \leq (1 - \mu) \kappa \cdot \sup _ {h \in \mathcal {H}} \left| \int_ {\chi} h (x) \left(p ^ {t = 0} (\mathbf {x}) - p ^ {t = 1} (\mathbf {x})\right) d \mathbf {x} \right| + \mu \kappa \cdot \sup _ {h \in \mathcal {H}} \left| \int_ {\chi} h (x) \left(p ^ {t = 1} (\mathbf {x}) - p ^ {t = 0} (\mathbf {x})\right) d \mathbf {x} \right| (33f) \\ = \kappa \cdot \sup _ {h \in \mathcal {H}} \left| \int_ {\mathcal {X}} h (x) \left(p ^ {t = 1} (\mathbf {x}) - p ^ {t = 0} (\mathbf {x})\right) d \mathbf {x} \right| = \kappa \cdot \operatorname {I P M} _ {\mathcal {H}} \left(p ^ {t = 1} (\mathbf {x}), p ^ {t = 0} (\mathbf {x})\right). (33g) \\ \end{array} +$$ + +Thus, noting that $(\epsilon_F)_{S_{t=1}}$ is indeed the expected factual loss over the subset $S_{t=1}$ induced by AL, thus implying the notation to $\epsilon_{S_t}$ , we conclude the proof by plugging (33g) back to (32f): + +$$ +\epsilon_ {C F} \leq \sum_ {t \in \{0, 1 \}} \mu_ {1 - t} \left(\epsilon_ {\mathcal {S} _ {t}} + \delta_ {(t, 1 - t)} \left(\lambda_ {l} + \frac {1}{3} \lambda_ {t} L _ {l} ^ {\frac {3}{2}}\right)\right) + \kappa_ {\mathcal {H}}, \tag {34a} +$$ + +where the constant $\kappa_{\mathcal{H}} = \kappa \cdot \mathrm{IPM}_{\mathcal{H}}(p^{t=1}(\mathbf{x}), p^{t=0}(\mathbf{x}))$ is derived in the similar fashion in (Shalit et al., 2017). + +Discussion: Thus, we provide an adjustable bound depending on the size of the covering radius, where the infimum of the upper bound value is by labeling all the pool set to make the covering radius the least, the gap originates from the labeling less data but with some covering radius. Note, that generalization bound by Shalit et al. (2017) quantifies well the risk upper bound given the fully labeled pool set. The work (Qin et al., 2021) builds upon (Shalit et al., 2017), but certain aspects remain underexplored, that is, it does not show the importance of the counterfactual covering radius. We fill this crucial theoretical gap by providing an informative and complete bound under the data-expanding context from scratch to derive a new bound tailored specifically to treatment effect estimation with AL. Furthermore, Lemma A.5 unveils the distinctive counterfactual covering radius which originates from the unique nature of the counterfactual prediction. We visualize the counterfactual covering radius $\delta_{(t,1 - t)}$ in Figure 1(b) and 1(d) to facilitate the conceptualization of Lemma A.5 in the treatment effect estimation setting under AL paradigm, where the full coverage on the counterfactual class is required. + +# A.5. Proof of Theorem 4.1 + +Definition A.6. Let $S_{(t,t)}^{*}$ of size $B_{(t,t)}$ denote the optimal (OPT) subset for treatment group $t$ . For each point $v^t \in S_{(t,t)}^*$ , let the cluster of $v^t$ be $C_{v^t}^* = \{u^t \in \mathcal{D}_t : d(u^t, v^t) = \min_{v' \in S_{(t,t)}^*} d(u^t, v')\}$ . As such, we have partitions $C_{v_1^t}^*, C_{v_2^t}^*, \ldots, C_{v_{B_{(t,t)}}^t}$ , where each point $u^t \in \mathcal{D}_t$ is placed in the closest $C_{v_i^t}^*$ w.r.t. $v_i^t \in S_{(t,t)}^*$ . + +Theorem 4.1. Under Assumption 2.3, the sum of the covering radii returned by Algorithm 1 is upper-bounded by $2 \times \sum_{t\{0,1\}}(OPT_{\delta_{(t,t)}} + OPT_{\delta_{(t,1 - t)}})$ + +Proof of Theorem 4.1. Let the output of the Algorithm 1 be $S$ , specifically, the total budget $B$ , additive arithmetically, is split into four parts with $B = B_{(1,1)} + B_{(1,0)} + B_{(0,0)} + B_{(0,1)}$ , i.e., with each part to acquire designated point to reduce one of the four radius $\delta_{(1,1)}$ , $\delta_{(1,0)}$ , $\delta_{(0,0)}$ , and $\delta_{(0,1)}$ at a time. Thus, we have $S = S_{(1,1)} \cup S_{(1,0)} \cup S_{(0,0)} \cup S_{(0,1)}$ , and noting that $S_1 = S_{(1,1)} \cup S_{(1,0)}$ , and $S_0 = S_{(0,0)} \cup S_{(0,1)}$ . To bound each of the radius: + +- For $u^{t = 1} \in \mathcal{D}_1$ to reduce $\delta_{(1,1)}$ : + +$$ +d \left(u ^ {t = 1}, \mathcal {S} _ {1}\right) \leq d \left(u ^ {t = 1}, \mathcal {S} _ {(1, 1)}\right) \leq 2 \times O P T _ {\delta_ {(1, 1)}}, \tag {35} +$$ + +where the first inequality is because $S_{(1,1)} \subset S_1$ , and the second inequality is by Lemma A.8. + +- For $u^{t = 0}\in \mathcal{D}_0$ to reduce $\delta_{(1,0)}$ .. + +$$ +d \left(u ^ {t = 0}, \mathcal {S} _ {1}\right) \leq d \left(u ^ {t = 0}, \mathcal {S} _ {(1, 0)}\right) \leq 2 \times O P T _ {\delta_ {(1, 0)}}, \tag {36} +$$ + +where the first inequality is because $S_{(1,0)} \subset S_1$ , and the second inequality is by Lemma A.9. + +- For $u^{t = 0}\in \mathcal{D}_0$ to reduce $\delta_{(0,0)}$ .. + +$$ +d \left(u ^ {t = 0}, \mathcal {S} _ {0}\right) \leq d \left(u ^ {t = 0}, \mathcal {S} _ {(0, 0)}\right) \leq 2 \times O P T _ {\delta_ {(0, 0)}}, \tag {37} +$$ + +where the first inequality is because $S_{(0,0)} \subset S_0$ , and the second inequality is by Lemma A.8. + +- For $u^{t = 1}\in \mathcal{D}_1$ to reduce $\delta_{(0,1)}$ .. + +$$ +d \left(u ^ {t = 1}, \mathcal {S} _ {0}\right) \leq d \left(u ^ {t = 0}, \mathcal {S} _ {(0, 1)}\right) \leq 2 \times O P T _ {\delta_ {(0, 1)}}, \tag {38} +$$ + +where the first inequality is because $S_{(0,1)} \subset S_0$ , and the second inequality is by Lemma A.9. + +Since for all $u$ the above holds, thus it follows that + +$$ +\max _ {u \in \mathcal {D} _ {1} \backslash \mathcal {S} _ {1}} d \left(u ^ {t = 1}, \mathcal {S} _ {1}\right) + \max _ {u \in \mathcal {D} _ {0} \backslash \tilde {\mathcal {S}} _ {0}} d \left(u ^ {t = 0}, \mathcal {S} _ {1}\right) + \max _ {u \in \mathcal {D} _ {0} \backslash \mathcal {S} _ {0}} d \left(u ^ {t = 0}, \mathcal {S} _ {0}\right) + \max _ {u \in \mathcal {D} _ {1} \backslash \tilde {\mathcal {S}} _ {1}} d \left(u ^ {t = 1}, \mathcal {S} _ {0}\right) \tag {39a} +$$ + +$$ +\leq 2 \times O P T _ {\delta_ {(1, 1)}} + 2 \times O P T _ {\delta_ {(1, 0)}} + 2 \times O P T _ {\delta_ {(0, 0)}} + 2 \times O P T _ {\delta_ {(0, 1)}} \tag {39b} +$$ + +$$ +\Rightarrow \delta_ {(1, 1)} + \delta_ {(1, 0)} + \delta_ {(0, 0)} + \delta_ {(0, 1)} \leq 2 \times \sum_ {t \{0, 1 \}} \left(\mathrm {O P T} _ {\delta_ {(t, t)}} + \mathrm {O P T} _ {\delta_ {(t, 1 - t)}}\right) \tag {39d} +$$ + +![](images/f419367ae318dcac4f8b09c59ef93e66b20f0266b32550be56447a8fa3d70c14.jpg) + +In the following, we define $d(u, \mathcal{Q}) \coloneqq \min_{v \in \mathcal{Q}} d(u, v)$ where $\mathcal{Q}$ can be any set, e.g., the optimal solution $S_{(t,t)}^*$ , also we denote the OPT as the minimal covering radius returned by the optimal set $S^*$ , i.e., $OPT = \max_{u \in \mathcal{D}} \min_{v \in S^*} d(u,v)$ . + +Lemma A.7. Without loss of generality to Definition A.6, we have $\forall u,w\in \mathcal{C}_v$ for $v\in \mathcal{Q}$ , then $d(u,w)\leq 2\times OPT$ + +Proof of Lemma A.7. + +$$ +\begin{array}{l} d (u, w) \leq d (u, v) + d (w, v) (40a) \\ = d (u, \mathcal {Q}) + d (w, \mathcal {Q}) (40b) \\ \leq O P T + O P T = 2 \times O P T, (40c) \\ \end{array} +$$ + +where the inequality (40a) is by the triangular inequality, the equality (40b) is by Definition A.6, and we complete the proof with the inequality (40c) due to $d(u,\mathcal{Q}) = \min_{v\in \mathcal{Q}}d(u,v)\leq \max_{u\in \mathcal{D}}\min_{v\in \mathcal{Q}}d(u,v) = OPT.$ + +Note, that the minimal covering radius $\delta_{(\cdot ,\cdot)}$ under the optimal solution $S_{(\cdot ,\cdot)}^{*}$ is denoted as $\mathrm{OPT}_{\delta_{(\cdot ,\cdot)}}$ + +Lemma A.8. With budget $B_{(t,t)}$ Subset $S_{(t,t)}$ for the treatment group $t$ returned by Algorithm 1 is a $2 - OPT_{\delta_{(t,t)}}$ for covering the set $\mathcal{D}_t$ of the treatment group $t$ . + +Proof of Lemma A.8. When covering the treatment group $t$ , we dose not have any assumption for the data distribution, thus we split the proof into two scenarios in a similar fashion by Dinitz (2019), i.e., $\forall v \in S_{(t,t)}^*, S_{(t,t)} \cap C_v^* \neq \emptyset$ and $\exists v \in S_{(t,t)}^*, S_{(t,t)} \cap C_v^* = \emptyset$ : + +- $\forall v \in S_{(t,t)}^*, S_{(t,t)} \cap \mathcal{C}_v^* \neq \emptyset$ : Let $w \in S_{(t,t)} \cap \mathcal{C}_v^*$ , for $u \in D_t$ , let $u \in \mathcal{C}_v^*$ with $v \in S_{(t,t)}^*$ (noting that $\mathcal{C}_v^* \subset \mathcal{D}_t$ ), we have: + +$$ +d (u, \mathcal {S} _ {(t, t)}) \leq d (u, w) \leq 2 \times \mathrm {O P T} _ {\delta_ {(t, t)}} \tag {41} +$$ + +where the first inequality is because $w \in S_{(t,t)}$ , and the second inequality is by Lemma A.7 for $u, w \in C_v^*$ . Note, that Eq. (41) holds $\forall u \in \mathcal{D}_t$ as $C_v^* \subset \mathcal{D}_t$ , then $\delta_{(t,t)} = \max_{u \in \mathcal{D}} d(u, S_{(t,t)}) \leq 2 \times \mathrm{OPT}_{\delta_{(t,t)}}$ . + +- $\exists v \in S_{(t,t)}^{*}, S_{(t,t)} \cap \mathcal{C}_{v}^{*} = \emptyset$ : Since $|\mathcal{S}_{(t,t)}| = |\mathcal{S}^{*}| = B_{(t,t)}$ , by the pigeonhole principle, $\exists v' \in S_{(t,t)}^{*}$ , s.t. $|\mathcal{S}_{(t,t)} \cap \mathcal{C}_{v'}^{*}| \geq 2$ . Thus, assume that for $z, m \in S_{(t,t)} \cap \mathcal{C}_{v'}^{*}$ and $z$ is added to $S_{(t,t)}$ before $m$ . Let $S_{(t,t)}' = S_{(t,t)} \backslash m$ , then for $u \in \mathcal{D}_t$ , we have: + +$$ +\begin{array}{l} d (u, \mathcal {S} _ {(t, t)}) \leq d (u, \mathcal {S} _ {(t, t)} ^ {\prime}) (42a) \\ \leq d \left(m, S _ {(t, t)} ^ {\prime}\right) (42b) \\ \leq d (m, z) (42c) \\ \leq 2 \times \operatorname {O P T} _ {\delta_ {(t, t)}}, (42d) \\ \end{array} +$$ + +where inequality in (42a) is because $S_{(t,t)}' \subset S_{(t,t)}$ (the radius decreases monotonically with larger set), the inequality in (42b) is because the greedy selection with larger distance with set $S_{(t,t)}'$ ( $m$ is selected before $u$ ), the inequality in (42c) is by definition that $d(m, S_{(t,t)}') = \min_{v \in S_{(t,t)}'} d(m,v)$ and $z \in S_{(t,t)}'$ , the last inequality in (42d) is by Lemma A.7. + +Since for all $u \in \mathcal{D}_t$ , we have $d(u, S_{(t,t)}) \leq 2 \times OPT_{\delta_{(t,t)}}$ , then it follows that $\max_{u \in \mathcal{D}_t} d(u, S_{(t,t)}) \leq 2 \times OPT_{\delta_{(t,t)}}$ to conclude the proof for A.8 by enumerating all the scenarios. + +![](images/0dad20eee7267914c8e4bc38dd2d0f7a2e2e11f14f4f2c1d76dafa2d853b8cc2.jpg) + +Lemma A.9. With budget $B_{(t,1 - t)}$ Subset $S_{(t,1 - t)}$ for the treatment group $t$ returned by Algorithm 1 is a $2 - OPT_{\delta_{(t,1 - t)}}$ for covering the set $D_{1 - t}$ of the treatment group $1 - t$ . + +Proof of Lemma A.9. Note, that the reduction of the counterfactual covering radius $\delta_{(t,1 - t)}$ requires the acquisition from group $t$ , which is complex because the radius $\delta_{(t,1 - t)}$ is calculated by $\delta_{(t,1 - t)} = \max_{i\in \mathcal{D}_{1 - t}\backslash \tilde{S}_{1 - t}}\min_{j\in S_{(t,1 - t)}}d(\mathbf{x}_i^{1 - t},\mathbf{x}_j^t)$ , noting that the proxy collection $\tilde{S}_{1 - t}$ is from the treatment group $1 - t$ , however, the acquisition targeting querying the sample from group $t$ to reduce the counterfactual covering radius $\delta_{(t,1 - t)}$ . + +Thus, by the greedy nature of the Algorithm 1, when $\delta_{(t,1 - t)}$ is the one to be reduced, the mentality for the query step is to calculate the proxy point $a_{1 - t} = \arg \max_{i\in \mathcal{D}_{1 - t}\backslash \tilde{S}_{1 - t}}\min_{j\in S_{(t,1 - t)}}d(\mathbf{x}_i^{1 - t},\mathbf{x}_j^t)$ from group $1 - t$ , then find the nearest point $a_{t}\in \mathcal{D}_{t}$ to $a_{1 - t}$ as the factual query to expand $\mathcal{S}_{(t,1 - t)}$ . If there always exists $d(a_{t},a_{1 - t}) = 0$ , the radius reduction can be real quick. + +Definition A.10. Let cluster $\mathcal{F}_{v^t}^* = \{u^{1 - t}\in \mathcal{D}_{1 - t}:d(u^{1 - t},v^t) = \min_{v'\in \mathcal{S}_{(t,1 - t)}^*}d(u^{1 - t},v')\}$ for $v^t\in S_{(t,1 - t)}^*$ . + +The proof adopts the similar mentality as shown in Proof of Lemma A.8, For now we show the proof for the first scenario and the second scenarios follows. + +$\forall v \in S_{(t,1 - t)}^{*}, \tilde{S}_{1 - t} \cap \mathcal{F}_{v}^{*} \neq \emptyset$ : Let $w \in \tilde{S}_{1 - t} \cap \mathcal{F}_{v}^{*}$ , let $u \in \mathcal{F}_{v}^{*}$ with $v \in S_{(t,1 - t)}^{*}$ (noting that $\mathcal{F}_{v}^{*} \subset \mathcal{D}_{1 - t}$ ), we have: + +$$ +d \left(u ^ {1 - t}, \mathcal {S} _ {(t, 1 - t)}\right) = d \left(u ^ {1 - t}, \tilde {\mathcal {S}} _ {1 - t}\right) \tag {43a} +$$ + +$$ +\leq d \left(u ^ {1 - t}, w ^ {1 - t}\right) \tag {43b} +$$ + +$$ +\leq d \left(u ^ {1 - t}, v ^ {t}\right) + d \left(u ^ {1 - t}, v ^ {t}\right) \tag {43c} +$$ + +$$ +\leq d \left(u ^ {1 - t}, \mathcal {S} _ {(t, 1 - t)} ^ {*}\right) + d \left(w ^ {1 - t}, \mathcal {S} _ {(t, 1 - t)} ^ {*}\right) \tag {43d} +$$ + +$$ +\leq 2 \times \operatorname {O P T} _ {\delta_ {(t, 1 - t)}}, \tag {43e} +$$ + +where the equality (43a) is by the Assumption (Strong Ignorability) 2.3 (i.e., $0 < p(t|\mathbf{x}) < 1$ ), s.t., for $\tilde{S}_{1-t}$ returned by Algorithm 1, we can have identical set $\mathcal{S}_{(t,1-t)} \in \mathcal{D}_t$ to the proxy collection $\tilde{S}_{1-t}$ , the inequality in (43b) is because $w^{1-t} \in \tilde{S}_{1-t}$ , the inequality (43c) is by the triangular inequality, the inequality (43d) is by Definition A.10, and inequality (43e) is by $d(u^{1-t}, \mathcal{S}_{(t,1-t)}^*) = \min_{v \in \mathcal{S}_{(t,1-t)}^*} d(u^{1-t}, v) \leq \max_{u^{1-t} \in \mathcal{D}_{1-t}} \min_{v \in \mathcal{S}_{(t,1-t)}^*} d(u^{1-t}, v) = OPT_{\delta_{(t,1-t)}}$ . + +# A.6. Proof of Theorem 4.4 + +Assumption 4.3 Given the fixed covering radius $\delta_{(t,t)}$ and $\delta_{(t,1 - t)}$ , there exists the optimal solution $S_t^*$ , $S_t^* \subset S^*$ for treatment group $t$ , such that $\mathcal{A}_F^{t = 1} \bigcup \mathcal{A}_{CF}^{t = 1} = \mathcal{D}$ . + +Definition A.11. Let the pool set be $\mathcal{D}$ of size $n$ , $\mathcal{S}_t$ of size $B_t$ be the solution for group $t$ returned by Algorithm 2. A family of sets $\mathcal{U} = \{\mathcal{U}_i\}_{i = v_1}^{v_m}$ , where $\forall i, \mathcal{U}_i \subset \mathcal{D}$ . Note, that the subscript $i$ of $\mathcal{U}_i$ denotes a single selected point $v_i$ in $\mathcal{S}_t \subseteq [v_m]$ due to the fact that each $v_i$ as the center with the fixed radius covers a set of points, i.e., by definition $\mathcal{U}_i = \mathcal{A}_{(t,t)}(v_i) \cup \mathcal{A}_{(t,1 - t)}(v_i)$ . Let the uncovered set be $\Omega_r = \mathcal{D} \setminus \bigcup_{i \in S_t} \mathcal{U}_i$ up to iteration $r$ , and assume that Algorithm 2 were to pick $\mathcal{U}_1', \mathcal{U}_2', \dots, \mathcal{U}_k'$ , for which $\mathcal{U}_i'$ is one of the set in $\mathcal{U}$ . Denote the set covered by optimal solution $\mathcal{S}_t^*$ as $\Theta$ , $\omega_r = |\mathcal{U}_r' \cap \Omega_{r-1}|$ , and $\eta_i = |\Theta| - \sum_{j \leq i} \omega_j$ . + +Theorem 4.4. Under Assumption 4.3, Algorithm 2 is a $\left(1 - \frac{1}{e}\right)$ -approximation for the full coverage constraint on the equally weighted graph and unscaled out-degree. + +Proof of Theorem 4.4. We prove the $(1 - \frac{1}{e})$ -approximation for the full coverage constraint by Algorithm 2 by extending the method by Dinitz (2019) for solving the conventional Max $k$ -Cover Problem into our Factual and Counterfactual Coverage Maximization for the data-efficient treatment effect estimation problem. The objective is to query $\mathcal{S} = \mathcal{S}_1 \cup \mathcal{S}_0$ that maximizes the mean coverage $P(\mathcal{A})$ . + +As defined in Section 4.2, $\mathcal{A}_F^{t = 1} = \bigcup_{\mathbf{x}\in S_1}\mathcal{A}_{(1,1)}(\mathbf{x})$ and $\mathcal{A}_{CF}^{t = 1} = \bigcup_{\mathbf{x}\in S_1}\mathcal{A}_{(1,0)}(\mathbf{x})$ , by further in Definition A.11, for the + +factual $(\mathcal{A}_F^{t = 1})$ and counterfactual $(\mathcal{A}_{CF}^{t = 1})$ covered region by $S_{1}$ , we have: + +$$ +\begin{array}{l} \mathcal {A} _ {F} ^ {t = 1} \cup \mathcal {A} _ {C F} ^ {t = 1} = | \bigcup_ {j \leq B _ {t}} \mathcal {U} _ {j} ^ {\prime} | (44a) \\ = \sum_ {j \leq B _ {t}} \omega_ {j} (44b) \\ = | \Theta | - \eta_ {B _ {t}} (44c) \\ \geq | \Theta | - | \Theta | e ^ {- 1} = (1 - e ^ {- 1}) | \Theta |, (44d) \\ \end{array} +$$ + +where the equality in (44a) is by definition of the covered region in Section 4.2 and the set $\mathcal{U}_i$ in Definition A.11, the equality in (44b) and (44c) is by Definition A.11, and the inequality in (44d) is by Lemma A.14. + +Under Assumption 4.3, there exists optimal solution s.t. $\Theta = \mathcal{D}$ , which further implies: + +$$ +\mathcal {A} _ {F} ^ {t = 1} \cup \mathcal {A} _ {C F} ^ {t = 1} \geq (1 - e ^ {- 1}) | \mathcal {D} | \Rightarrow P \left(\mathcal {A} _ {F} ^ {t = 1} \cup \mathcal {A} _ {C F} ^ {t = 1}\right) \geq \frac {(1 - e ^ {- 1}) | \mathcal {D} |}{| \mathcal {D} |} = 1 - e ^ {- 1}. \tag {45} +$$ + +Without loss of generality, the proof above applies for proving that + +$$ +P \left(\mathcal {A} _ {F} ^ {t = 0} \cup \mathcal {A} _ {C F} ^ {t = 0}\right) \geq 1 - e ^ {- 1}. \tag {46} +$$ + +To conclude, as we have: + +$$ +\begin{array}{l} P (\mathcal {A}) = \frac {1}{4} P \left(\mathcal {A} _ {F} ^ {t = 1}\right) + \frac {1}{4} P \left(\mathcal {A} _ {C F} ^ {t = 1}\right) + \frac {1}{4} P \left(\mathcal {A} _ {F} ^ {t = 0}\right) + \frac {1}{4} P \left(\mathcal {A} _ {C F} ^ {t = 0}\right) (47a) \\ = \frac {1}{2} P \left(\mathcal {A} _ {F} ^ {t = 1} \cup \mathcal {A} _ {C F} ^ {t = 1}\right) + \frac {1}{2} P \left(\mathcal {A} _ {F} ^ {t = 0} \cup \mathcal {A} _ {C F} ^ {t = 0}\right) (47b) \\ \geq 1 - e ^ {- 1}, (47c) \\ \end{array} +$$ + +where the equality in (47a) is by the definition for the mean coverage $P(\mathcal{A})$ and note that our maximization goal in Eq. (10) leaves out the constant coefficient $1/4$ , which does not affect the ultimate goal. The equality in (47b) is by the independence between the factual covering and counterfactual covering, the inequality in (47c) is by conclusion in Eq. (45) and (46). + +Lemma A.12. For set $\mathcal{P}$ , $\mathcal{Q}$ and let $|\mathcal{P}| \geq |\mathcal{Q}|$ , we have $|\mathcal{P} \backslash \mathcal{Q}| \geq |\mathcal{P}| - |\mathcal{Q}|$ . + +Proof of Lemma A.12. $|\mathcal{P} \backslash \mathcal{Q}| = |\mathcal{P}| - |\mathcal{P} \cap \mathcal{Q}| \geq |\mathcal{P}| - |\mathcal{Q}|$ due to the fact that $|\mathcal{P} \cap \mathcal{Q}| \leq |\mathcal{Q}|$ for $|\mathcal{P}| \geq |\mathcal{Q}|$ . + +Lemma A.13. $\eta_{i}\leq \left|\Theta \backslash \bigcup_{j\leq i}\mathcal{U}_{j}^{\prime}\right|$ + +Proof of Lemma A.13. + +$$ +\eta_ {i} = | \Theta | - \sum_ {j \leq i} \omega_ {j} = | \Theta | - \left| \bigcup_ {j \leq i} \mathcal {U} _ {j} ^ {\prime} \right| \leq | \Theta \backslash \bigcup_ {j \leq i} \mathcal {U} _ {j} ^ {\prime} |. \tag {48} +$$ + +The first and second equality is straightforward by definition and observation, and the inequality is by Lemma A.12 due to the fact that the optimal cover $\Theta$ is the larger. + +Lemma A.14. $\eta_{B_t} \leq |\Theta|e^{-1}$ . + +Proof of Lemma A.14. Construct the subtraction: + +$$ +\begin{array}{l} \eta_ {i} - \eta_ {i - 1} = | \Theta | - \sum_ {j \leq i} \omega_ {j} - \left(| \Theta | - \sum_ {j \leq i - 1} \omega_ {j}\right) = - \omega_ {i} (49a) \\ \Longrightarrow \eta_ {i} = \eta_ {i - 1} - \omega_ {i} (49b) \\ \end{array} +$$ + +Lemma A.13 implies that optimal solution $\Theta$ covers at least $\eta_{i}$ uncovered samples (the uncovered samples are w.r.t. to the covered set by $S_{t}$ ) with $B_{t}$ sets, thus by the pigeonhole principle, when $\eta_{i}$ filled into $B_{t}$ sets, each set assigned averagely $\eta_{i} / B_{t}$ , however, there are less than $B_{t}$ sets available for the Algorithm 2 to query, thus there exists the set covers at least $\eta_{i} / B_{t}$ uncovered samples. By the greedy nature of the Algorithm 2, we have $\omega_{i + 1} \geq \frac{\eta_i}{B_t}$ , then it further implies that: + +$$ +\eta_ {i} = \eta_ {i - 1} - \omega_ {i} \leq \eta_ {i - 1} - \frac {\eta_ {i - 1}}{B _ {t}} = \eta_ {i - 1} \left(1 - \frac {1}{B _ {t}}\right) \tag {50a} +$$ + +$$ +\Longrightarrow \frac {\eta_ {i}}{\eta_ {i - 1}} = \frac {1}{B _ {t}} \tag {50b} +$$ + +For $\omega_0 = 0$ implies that $\eta_0 = |\Theta|$ , and maximally with budget $B_t$ , we have $\eta_{B_t}$ , and then construct the following: + +$$ +\frac {\eta_ {B _ {t}}}{\eta_ {0}} = \underbrace {\frac {\eta_ {B _ {t}}}{\eta_ {B _ {t} - 1}} \times \frac {\eta_ {B _ {t} - 1}}{\eta_ {B _ {t} - 2}} \times \cdots \times \frac {\eta_ {2}}{\eta_ {1}} \times \frac {\eta_ {1}}{\eta_ {0}}} _ {B _ {t} \text {q u a n t i t i e s a b o v e}} = (1 - \frac {1}{B _ {t}}) ^ {B _ {t}} \tag {51} +$$ + +Noting that: + +$$ +\lim _ {B _ {t} \rightarrow \infty} \left(1 - \frac {1}{B _ {t}}\right) ^ {B _ {t}} = \frac {1}{e} \Rightarrow \frac {\eta_ {B _ {t}}}{\eta_ {0}} \leq \frac {1}{e}. \tag {52} +$$ + +Thus, it can be concluded that $\eta_{B_t} \leq |\Theta|e^{-1}$ . + +# B. Related Work + +Treatment effect estimation. Many early works in causal effect estimation (a.k.a., the treatment effect estimation) focus on group-level estimation, e.g., conditional average treatment effect (CATE). The widely used inverse probability weighting method (Rosenbaum & Rubin, 1983; Imbens & Rubin, 2015) and the doubly robust model (Robins et al., 1994) are designed to mitigate the selection bias in CATE estimation, but are not generalizable to the unseen individuals or groups without labels. So far, various methods (Shalit et al., 2017; Louizos et al., 2017; Alaa & Van Der Schaar, 2017; Yao et al., 2018; Yoon et al., 2018; Shi et al., 2019; Zhang et al., 2020; Kallus, 2020; Jesson et al., 2020; Wang et al., 2024) have been proposed due to the proliferation of deep learning (DL). These parametric models are good at modeling the individual-level causal effect and are generalizable to unseen instances. Furthermore, the strong expressive power of such deep models can handle the high-dimensional data and relax the pivot assumptions in causal effect estimation, e.g., unconfoundedness assumption, by learning the deconfounded latent representations via neural mapping for treated and control groups. Additionally, there is another branch of work that investigates the treatment effect estimation under interference (e.g., the violation of the SUTVA assumptions) (Rakesh et al., 2018; Ma & Tresp, 2021; Ma et al., 2022; Lin et al., 2023; 2024; Chen et al., 2024; Lin et al., 2025), which is out-of-scope to the foucs of this paper. + +Active learning. The concept of active learning (AL) dates back over a century (Smith, 1918). Over time, it has evolved into a prominent branch of machine learning research (Settles, 2009; Ren et al., 2021; Zhan et al., 2022). The primary goal of AL is to optimize model performance in a cost-efficient manner, achieving low model risk while minimizing the number of labeled samples required. AL methods are typically categorized into three main scenarios: query synthesis (Wang et al., 2015), stream-based (Fujii & Kashima, 2016), and pool-based approaches (Wu, 2018). This paper focuses on pool-based AL, particularly in regression problems, where key acquisition strategies include uncertainty-based sampling (Gal et al., 2017), density-based querying (Sener & Savarese, 2018), and hybrid methods (Ash et al., 2019). For example, Bayesian Active Learning by Disagreement (BALD) (Gal et al., 2017) uses epistemic uncertainty to select unlabeled samples, while core-set (Sener & Savarese, 2018) prioritizes samples based on their maximum distance to the nearest neighbor in the hidden space. ACS-FW (Pinsler et al., 2019) combines core-set and Bayesian approaches, balancing sample diversity and uncertainty in batch-mode acquisition. Although general AL methods are not specifically designed for CEE, benchmarking these methods can yield valuable insights. + +Treatment effect estimation with active learning. Thus far, some progress has been made in this area of research. For instance, (Sundin et al., 2019) proposes a querying criterion based on the estimated S-type error rate—the probability that the model incorrectly infers the sign of the treatment effect. However, this work focuses on estimating the correct sign of the treatment effect, which differs from the risk metric used in our study. For research aligned with the same risk metric, + +Qin et al. (2021) introduce a theoretical framework that extends the upper-bound formulation from (Shalit et al., 2017) mainly by a core-set approach (Tsang et al., 2005). Despite this, their proposed algorithm QHTE does not adequately address distribution alignment during data acquisition. To mitigate acquisition imbalance, Causal-BALD (Jesson et al., 2021b) adopts an information-theoretic perspective, introducing the $\mu \rho$ BALD criterion. This criterion scales the acquisition metric inversely with counterfactual variance, encouraging the selection of samples that align with similar counterfactuals when certain treatments are underrepresented. This represents a notable improvement over its predecessor, $\mu$ BALD, an uncertainty-based softmax-BALD method (Kirsch et al., 2023). However, Causal-BALD depends heavily on accurate uncertainty quantification and computationally intensive training using complex estimators, such as deep kernel learning (Wilson et al., 2016). Recently, Wen et al. (2025) introduced a straightforward yet effective algorithm, MACAL, which reduces distributional discrepancies while remaining model-independent. Despite its advantages, MACAL requires querying data in pairs (one from the treated group and one from the control group), limiting its generalizability in scenarios where optimality can be achieved by querying from only one treatment group. Furthermore, while MACAL includes convergence analysis for sub-objectives, it lacks guarantees on overall risk upper-bound convergence. Additionally, some studies (Deng et al., 2011; Addanki et al., 2022; Connolly et al., 2023; Ghadiri et al., 2024) leverage AL for efficient experimental trial design, where treatment information is applied only after sample acquisition, rather than being included in the initial pool. This setup differs fundamentally from our focus, where treatment information is available from the start. Besides, the recent exploration of AL for treatment effect estimation on the feature level (Piskorz et al., 2025) differs from our individual-level data acquisition task. + +Algorithm 1 Greedy Radius Reduction +1: Input: Pool set $D = \mathcal{D}_1\cup \mathcal{D}_0$ ; random initialization $S^{\mathrm{init}} = S_1\cup S_0$ , where $S_{1}$ and $S_0$ are the random initialization set for the treated and control group respectively; budget $B$ ; distance metric $d(\cdot ,\cdot)$ +2: $S\gets S^{\mathrm{init}},\tilde{S}_1\gets \emptyset ,\tilde{S}_0\gets \emptyset$ +3: while $|S| < |S^{\mathrm{init}}| + B$ do +4: $\delta \leftarrow \max \{\delta_{(1,1)},\delta_{(1,0)},\delta_{(0,0)},\delta_{(0,1)}\}$ +5: if $\delta = = \delta_{(1,1)}$ then +6: $a\gets \arg \max_{i\in \mathcal{D}_1\backslash S_1}\min_{j\in S_1}d(\mathbf{x}_i^{t = 1},\mathbf{x}_j^{t = 1})$ {To reduce $\delta_{(1,1)}$ by querying data point from group $t = 1$ } +7: else if $\delta = = \delta_{(0,0)}$ then +8: $a\gets \arg \max_{i\in \mathcal{D}_0\backslash S_0}\min_{j\in S_0}d(\mathbf{x}_i^{t = 0},\mathbf{x}_j^{t = 0})$ {To reduce $\delta_{(0,0)}$ by querying data point from group $t = 0$ } +9: else if $\delta = = \delta_{(1,0)}$ then +10: $a^\prime \gets \arg \max_{i\in \mathcal{D}_0\backslash \tilde{S}_0}\min_{j\in S_1}d(\mathbf{x}_i^{t = 0},\mathbf{x}_j^{t = 1})$ {To reduce $\delta_{(1,0)}$ by querying data point from group $t = 0$ } +11: $b\gets \arg \min_{i\in \mathcal{D}_1}d(\mathbf{x}_i^{t = 1},a')$ {Find the nearest point from $t = 1$ to $a^\prime$ to reduce counterfactual radius $\delta_{(1,0)}$ } +12: if $b\notin S_1$ then +13: $a\gets b,\tilde{S}_0\gets \tilde{S}_0\cup \{a'\}$ {Counterfactual radius $\delta_{(1,0)}$ can be reduced, add $b$ into the training set} +14: else +15: Repeat Line 4-25 by excluding. $\delta_{(1,0)}$ from the max function {Counterfactual radius $\delta_{(1,0)}$ cannot be reduced, go back to other reducible covering radii from the largest one} +16: end if +17: else if $\delta = = \delta_{(0,1)}$ then +18: $a^\prime \gets \arg \max_{i\in \mathcal{D}_1\backslash \tilde{S}_1}\min_{j\in S_0}d(\mathbf{x}_i^{t = 1},\mathbf{x}_j^{t = 0})$ {To reduce $\delta_{(0,1)}$ by querying data point from group $t = 1$ } +19: $b\gets \arg \min_{i\in \mathcal{D}_0}d(\mathbf{x}_i^{t = 0},a')$ {Find the nearest point from $t = 0$ to $a^\prime$ to reduce counterfactual radius $\delta_{(0,1)}$ } +20: if $b\notin S_0$ then +21: $a\gets b,\tilde{S}_1\gets \tilde{S}_1\cup \{a'\}$ {Counterfactual radius $\delta_{(0,1)}$ can be reduced, add $b$ into the training set} +22: else +23: Repeat Line 4-25 by excluding. $\delta_{(0,1)}$ from the max function {Counterfactual radius $\delta_{(0,1)}$ cannot be reduced, go back to other reducible covering radii from the largest one} +24: end if +25: end if +26: $S\gets S\cup \{a\}$ +27: end while +28: Output: S + +# C. Additional Details + +# C.1. Algorithm 1 + +Proxy collection $\tilde{S}_{1 - t}$ . To promote sample diversity in the acquired data, the reduction of the counterfactual covering radius $\delta_{(t,1 - t)}$ queries the data from group $t$ , however, such radius is calculated by $\delta_{(t,1 - t)} = \max_{i\in \mathcal{D}_{1 - t}\setminus \tilde{S}_{1 - t}}\min_{j\in S_t}d(\mathbf{x}_i^{1 - t},\mathbf{x}_j^t)$ , where a direct acquisition from the treatment group $1 - t$ is performed. But our actual acquisition targets the query from group $t$ to reduce the counterfactual covering radius $\delta_{(t,1 - t)}$ by covering the counterfactual samples. Thus, by the greedy nature of the Algorithm 1, when $\delta_{(t,1 - t)}$ is the one to be reduced, the mentality for the query step is to calculate the proxy point $a^\prime = \arg \max_{i\in \mathcal{D}_{1 - t}\setminus \tilde{S}_{1 - t}}\min_{j\in S_{(t,1 - t)}}d(\mathbf{x}_i^{1 - t},\mathbf{x}_j^t)$ from group $1 - t$ , then find the nearest point $a_{t}\in \mathcal{D}_{t}$ to $a^\prime$ as the eventual query to expand $S_{t}$ , and adding the proxy pint $a^\prime$ into the proxy collection $\tilde{S}_{1 - t}$ as a already marked position. + +Rationale of querying factual samples: Note that querying the factual sample to reduce the counterfactual covering radius is not a necessity to help reduce the counterfactual covering radius, because a direct acquisition on the counterfactual samples can indeed reduce the counterfactual covering radius by the rigorous math definition. However, only acquiring counterfactual samples impedes the sample diversity in the counterfactual group. For example, querying the counterfactual sample fall under the neighborhood of an acquired counterfactual sample to reduce the counterfactual covering radius can cause redundancy under limited budget. + +# C.2. Algorithm 2 + +The data acquisition performed in this algorithm is mainly repeating the two steps: 1). Pick the node with the highest scaled out-degree (which is recalculated each round for new point selection); 2). remove the incoming factual/out-going counterfactual edges to the picked node and its neighbors. Note that the scaled out-degree is by multiplying the out-degree with an coefficient $c$ that is directly associated with the covering radii and the covered points to further balance the distribution discrepancy. That is, given the union of factual and counterfactual covering ball induced by center $\mathbf{x}$ : $\mathcal{A}_{(t,t)}(\mathbf{x}) \bigcup \mathcal{A}_{(t,1 - t)}(\mathbf{x})$ , three main possible scenarios are: + +![](images/733750db1def740aa0d3d3247ef4aa704002cdcb951324257990ec6d0e9a3aea.jpg) +(a) $\mathcal{A}_{(t,t)}(\mathbf{x})\neq \emptyset \wedge \mathcal{A}_{(t,1 - t)}(\mathbf{x})\neq \emptyset$ + +![](images/e432687c9dfb611e001717d68ec3039c974e54893d72b03035d2a0a09e58600d.jpg) +(b) $\mathcal{A}_{(t,t)}(\mathbf{x}) = \varnothing \wedge \mathcal{A}_{(t,1 - t)}(\mathbf{x})\neq \varnothing$ + +![](images/10cbb8957f4b6b9538f84b825bab5d2e56283e5a92d4b2c0f99fe343fd92a2d9.jpg) +(c) $\mathcal{A}_{(t,t)}(\mathbf{x})\neq \emptyset \wedge \mathcal{A}_{(t,1 - t)}(\mathbf{x}) = \emptyset$ +Figure 7. Visualization of the factual covering (dashed manifold) and the counterfactual covering (solid manifold) on the local neighborhood from the center $\mathbf{x}$ . Note that the zero-neighbor scenario is omitted as it is the least preferred to maximize the coverage. + +Thus, the scaling coefficient $c$ is calculated as: + +$$ +c (\mathbf {x}) = \zeta (\mathbf {x}) (1 - \zeta (\mathbf {x})), \forall \zeta (\mathbf {x}) = \frac {\left| \mathcal {A} _ {(t , t)} (\mathbf {x}) \right|}{\left| \mathcal {A} _ {(t , t)} (\mathbf {x}) \bigcup \mathcal {A} _ {(t , 1 - t)} (\mathbf {x}) \right|} \in [ 0, 1 ], \tag {53} +$$ + +where the minimum and maximum of the coefficient $c$ is obtained respectively by $\zeta = 0$ (Figure 7(b) and 7(c)) and $\zeta = \frac{1}{2}$ (Figure 7(a)). Noting that the shape of the coefficient $c$ w.r.t. $\zeta$ over the interval [0,1] is a downward-opening parabola, which gives the maximum $c$ on the evenly divided scenario, with $c$ declines when $\zeta$ departing from $\frac{1}{2}$ . Additionally, when $c = 0$ , + +scenario 7(b) is preferred to scenario 7(c) from overlapping perspective with higher number of counterfactual neighbors prioritized. + +# C.3. Dataset Details + +Toy: The 2-dimensional dataset is generated by creating multiple clusters for each treatment group $t$ . Let center of cluster $v_{i}^{t} = (x_{i,1}^{t}, x_{i,2}^{t})$ to be drawn randomly from the uniform distribution: + +$$ +x _ {i, 1} ^ {t}, x _ {i, 2} ^ {t} \sim \operatorname {U n i f o r m} \left(\left[ - 9 + \beta_ {t}, 9 + \beta_ {t} \right]\right), \tag {54} +$$ + +where the $\beta_{t}$ is a offset to create larger distribution discrepancy between two treatment groups. Let the collection of the centers of size $k$ for group $t$ be $\mathcal{V}_k^t = \{v_i^t\}_{i=1}^k$ , the randomly added center $v_k^t$ should satisfy: + +$$ +d _ {v ^ {\prime} \in \mathcal {V} _ {k - 1} ^ {t}} \left(v _ {k} ^ {t}, v ^ {\prime}\right) \geq 1. 5 \times 0. 9 ^ {j}, \tag {55} +$$ + +where $j$ counts from 0 with unit increment each time when Eq. (55) is not satisfied for the randomly generated center $v_{k}^{t}$ over 100 times. That is, we reduce the minimum distance to a smaller one if the qualified sample cannot be found from the remaining pool set. + +Given the centers, $\mathcal{V}_{n_t'}^t$ , we define the mean $\mu_j^t = \mathcal{V}_{n_t'}^t [j]$ and variance $\sigma_j^2 = 1$ and generating $\mathbf{X}^t (i)\in \mathbb{R}^{n_t\times 2}$ for cluster $i$ : + +$$ +\mathbf {X} _ {j} ^ {t} (i) \sim \mathcal {N} \left(\mu_ {j} ^ {t}, \sigma_ {j} ^ {2}\right), \forall j \leq n _ {t} \Rightarrow \mathbf {X} ^ {t} = \bigcup_ {i \leq n _ {t} ^ {\prime}} \mathbf {X} ^ {t} (i). \tag {56} +$$ + +Thus, set $\beta_{1} = 2$ and $\beta_{0} = -2$ , number of clusters $n_1' = 50$ and $n_0' = 30$ , number of samples for each cluster $n_{1} = n_{0} = 200$ , such that we generate covariate matrix $\mathbf{X}^{t=1} \in \mathbb{R}^{10000 \times 2}$ for treatment group $t = 1$ and covariate matrix $\mathbf{X}^{t=0} \in \mathbb{R}^{6000 \times 2}$ for treatment group $t = 1$ . See visualization in main text Figure 6(a) for the generated data. Furthermore, let $\mathbf{T} \in \mathbb{R}^{(n_t' \cdot n_t) \times 1}$ be the treatment indicator, to simulate the response curve $y$ , we have: + +$$ +y _ {i} ^ {t} = \sin \left(1. 5 \times x _ {i, 1} ^ {t}\right) + \cos \left(1. 5 \times x _ {i, 2} ^ {t}\right) + 5 t, \forall \left(\mathbf {x} _ {i} ^ {t}, t\right) \in \left(\mathbf {X} ^ {t}, \mathbf {T}\right). \tag {57} +$$ + +IBM (Shimoni et al., 2018): This dataset is based on the real-world 177 covariates from a cohort of 100,000 individuals, from the publicly available Linked Births and Infant Deaths Database. The generated response curve is based on the randomly selected 25,000 individuals out of the 100,000 base, and the potential outcomes have 10 different simulations according to (Shimoni et al., 2018). + +CMNIST (Jesson et al., 2021a): This dataset contains 60,000 image samples (10 classes) of size $28 \times 28$ , which are adapted from MINIST (LeCun, 1998) benchmark. CMNIST is completely distinct from the previous tabular datasets by leveraging the image data for the treatment effect estimation. The potential outcomes are simulated 10 times and generated by projecting the digits into a 1-dimensional latent manifold as described in (Jesson et al., 2021a). + +# C.4. Further Discussions + +It is seen that in Section 5.3 for ablation study, the performance difference shown in Table 2 indicates that the no measurable and significant performance gain on IBM and CMNIST dataset, respectively. Here, we qualitatively discuss the causes for this phenomenon from the data distribution perspective. + +The entire data distribution for IBM is plot in Figure 8(a), where a well-blended distribution is seen. We further split the entire data distribution into sole plots on Figure 8(b) ( $t = 1$ ) and Figure 8(c) ( $t = 0$ ). It is observed that data distributions on different treatment groups are almost identical, which is aligned to the dataset description in the original paper that generates the IBM benchmark (Shimoni et al., 2018). Thus, the high-density region is built on the overlapping region since two groups are fully overlapped. Therefore, given all the samples on group $t = 0$ known, when data acquisition starts on group $t = 1$ , algorithm only needs to acquire the sample from the high-density regions as the overlapping condition is synchronously satisfied. Thus, FCCM and $\mathrm{FCCM}^{-}$ is indistinguishable on such data distribution. In the meanwhile, it is observed that the entire CMNIST data distribution (Figure 8(d)) embeds significantly less overlapping regions with the covariates extracted from the MNIST (LeCun, 1998) benchmark which has 10 classes of data (10 digits). Unlike IBM (Shimoni et al., 2018), the data generating process in (Jesson et al., 2021a) creates significant distribution discrepancy for two treatment groups, where + +![](images/b201a857ecf5632ca2c17c6ca7cd7ddc62dbd35913823a766a70d916da6b35af.jpg) +(a) IBM + +![](images/188a76d0db97ceeb127e64124aa44bf74577aaed7417e3ed00155800c8432203.jpg) +(b) $t = 1$ + +![](images/cefec0bde589cef808dbb9bdc642c40c798c885bc1f5f04a1eab568d669e7f5b.jpg) +(c) $t = 0$ + +![](images/d3673357d56329cec5390fc71e7b4b4a511563f288f63a9d3e560aea5b2f5bfa.jpg) +(d) CMNIST + +![](images/e26e0b6a3d3813922ca5b05a0aa0710ff754896afbb81d9a360b93dbf2f5f451.jpg) +(e) $t = 1$ + +![](images/a1f425f85811c2eab8c21574850a2dad25e2a0a319205db251a2b11195cd1bbc.jpg) +(f) $t = 0$ +Figure 8. High dimensional data projected into 2-dimensional space via t-SNE, with colors indicating overlapping, group $t = 1$ , and group $t = 0$ . Left: entire data distribution; Mid: distribution on group $t = 1$ ; Right: distribution on group $t = 0$ . + +the high-density regions for group $t = 1$ (Figure 8(e)) and group $t = 0$ (Figure 8(f)) are well-distinguished, leaving less overlapping regions on the entire data distribution. Therefore, our proposed method – FCCM prioritizes the data acquisition toward the high-density and overlapping region, while $\mathrm{FCCM}^{-}$ only focuses on high-density region where less overlapping is seen, thus resulting in significant performance difference as seen in Table 2. + +# C.5. Practicability of the Assumptions + +Strong ignorability: The validity of the SI can be approximated by carefully selecting sufficient relevant covariates and constructing a more balanced dataset. + +Lipschitz continuity: Theorem 3.3 assumes the Lipschitzness of the $p^t(y|\mathbf{x})$ , this can be a practical assumption if the regression model $f$ , e.g., a well-regularized neural network (NN), learns a smooth mapping from $\mathbf{x}$ to $y$ , which implies the Lipschitzness for $p^t(y|\mathbf{x})$ . Also, the NN $f$ is differentiable w.r.t. $\mathbf{x}$ , thus the squared loss $l_f$ is also bounded and sufficiently differentiable w.r.t. $\mathbf{x}$ , further implying the Lipschitzness of $l_f$ . + +Constant $\kappa$ : The existence of the constant $\kappa$ is thoroughly discussed by Shalit et al. (2017) in Appendix A.3 and A.4. + +Additionally, we discuss consequence for the proposed theorems when the above-mentioned assumptions are not satisfied: + +Lipschitz continuity for Theorem 3.4: If the Lipschitzness does not hold, the multiplicative constant will be unbounded, and thus the reduction of the radii may not help control the risk upper bound. Strong ignorance for Theorem 4.1: Strong ignorance provides an ideal scenario for acquiring the counterfactual samples, where a quick bound reduction by Algorithm 1 is seen in Figure 2(a). If strong ignorance cannot be guaranteed in real-world data, e.g., CMNIST, the reduction of the bound will be significantly slower and less effective for Algorithm 1, as shown in Figure 2(b). Thus, it motivates us to propose Algorithm 2 that can handle compromised data distributions more effectively via a slight trade-off on coverage. + +# C.6. Hyperparameters Tuning + +We conduct all the experiments with 24GB NVIDIA RTX-3090 GPU on Ubuntu 22.04 LTS platform with the 12th Gen Intel i7-12700K 12-Core 20-Thread CPU. As stated in the main text, for fair comparison, we take the consistent hyperparameters tuned in (Jesson et al., 2021b; Wen et al., 2025) for the estimators: DUE-DNN (Van Amersfoort et al., 2021) and DUE-CNN (Van Amersfoort et al., 2021) shown in Table 3. Additionally, we search the best hyperparameters, i.e., covering radius $\delta$ and edge weight $\alpha$ for counterfactual linkage, for Algorithm 2 with the validation set shown in Table 4. Note, that in Section 4.3, we approximating a narrower range around $95\%$ threshold to further determine the covering radius for the best performance. + +Table 3. Hyperparameters for Estimators + +
HyperparametersDNNCNN
KernelRBFMatern
Inducing Points100100
Hidden Neurons200200
Depth32
Dropout Rate0.10.05
Spectral Norm0.953.0
Learning Rate\( 1e^{-3} \)\( 1e^{-3} \)
+ +Table 4. Hyperparameters for Algorithm 2 + +
HyperparametersSearch SpaceTuned
δ(1,1) for TOY[0.11, 0.12, 0.13]0.11
δ(1,0) for TOY[0.11, 0.12, 0.13]0.11
δ(1,1) for IBM[0.11, 0.13, 0.15]0.11
δ(1,0) for IBM[0.11, 0.13, 0.15]0.11
δ(1,1) for CMNIST[0.40, 0.45, 0.50]0.50
δ(1,0) for CMNIST[0.40, 0.45, 0.50]0.40
Edge weight α[1.0, 2.5, 5.0]2.5
+ +# C.7. Main Results under Highest Resolution + +![](images/cbdab73505caf26ccb737e02d959b9a9f05e784766c0826e9dc7d7489c2a182f.jpg) +(a) $2\%$ increment on TOY dataset + +![](images/e17d3c4150a1179e65698f3082b090fb1e4d76667ade3d9724eb5b5842e727bb.jpg) +(b) $2\%$ increment on IBM dataset + +![](images/50607533c078b2d2b1eb184d6df45e620dd9364cd5fbeee691c5bd38ad91dcd8.jpg) +(c) $2\%$ increment on CMNIST dataset + +# C.8. Sensitivity Study + +Note that the acquisition on treatment sample $t = 1$ is insensitive on $\delta_{(0,0)}$ and $\delta_{(0,1)}$ in our setting, as all control samples $(t = 0)$ are seen. For $\alpha$ , our setting of $\alpha = 2.5$ has an overall lower error across different acquisition budgets. + +![](images/a517155a7dac6944fc1344336d472da55436b20f487585eb9b26a92a038faaa4.jpg) +(d) Analysis for the weight $\alpha$ on TOY + +![](images/eedb61517b1a1b9619b648781fdea0a58706f784d76f96d1153fff05fa118b02.jpg) +(e) Analysis for the weight $\alpha$ on IBM + +![](images/cf0ebd50bbfec9bd2b846b19dd0164761944ca0ecc6919ad1166149c0d881340.jpg) +(f) Analysis for the weight $\alpha$ on CMNIST + +![](images/c8c35f00a4b68b93accebadee7eefbaf953520a8fcd84d9001e1ba57ca2e85e6.jpg) +(g) Analysis for $\delta_{(1,1)}$ on TOY + +![](images/91134da06aecf39de22e61c82ef0ddcd898fbee9524a3650753f83b1df51be22.jpg) +(h) Analysis for $\delta_{(1,1)}$ on IBM + +![](images/7f3c4ab685d56b8918dd1b9625e0e6f5d3be87e986840c363b0fbb32d479c6d9.jpg) +(i) Analysis for $\delta_{(1,1)}$ on CMNIST + +![](images/78f5db1c12e023dea900c5b3c0f768d9beb163bf731edc9d467512615301a82a.jpg) +(j) Analysis for $\delta_{(1,0)}$ on TOY + +![](images/80d298dd185a3e4df3ac060ff356d17bf403413ad81703408f483a5713cd23ad.jpg) +(k) Analysis for $\delta_{(1,0)}$ on IBM + +![](images/026e166787ba3dd2cb156e57db177e58b7b88408fe08d9c6844228e3433681e7.jpg) +(1) Analysis for $\delta_{(1,0)}$ on CMNIST \ No newline at end of file diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/images.zip b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec7b8e4a21f892f6c1674aa6e1435b29caf2b8d8 --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57dbb2dba40dd01e9a4ecd3eb228c8b3208bca1ad268deba997e32ae3b7f651b +size 1937117 diff --git a/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/layout.json b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6cf0795170601e58eab8bb472ca5c298d8b4cde7 --- /dev/null +++ b/ICML/2025/Enhancing Treatment Effect Estimation via Active Learning_ A Counterfactual Covering Perspective/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c0c255cf5a7f71f9acd4e5adb1ab702dbe73119320826c296694387a04b65574 +size 1502438 diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_content_list.json b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0551ae22bfa0cf1ed7710b5c60ed9840212e0d2e --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e9970a633a2b3324b0066a02028b9869cac91ced222e3ce3afa0b2a1c68a7df +size 100457 diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_model.json b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2bd4d790237c92687b72481256c5473b7093eec4 --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09ced2f950b5431351a903c6b1ded09dd1d7f24461aaf306d7a4c4e6e5a246d2 +size 119815 diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_origin.pdf b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c190f6a31ed5620cf759bee0ab513658874a4b45 --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/1255a9eb-1c92-42ca-902f-b002ecf74b9b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e6faf27dd3c4c85add23d3ddaf5b08af0e76b9194266aaa90a0e2cac321bf1f +size 3685545 diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/full.md b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f884b04c1cfce7c7ebfd721701f3c3d8d6342186 --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/full.md @@ -0,0 +1,368 @@ +# Enhancing Visual Localization with Cross-Domain Image Generation + +Yuanze Wang1 Yichao Yan1 Shiming Song2 Songchang Jin2 Yilan Huang2 Xingdong Sheng3 Dianxi Shi14 + +# Abstract + +Visual localization aims to predict the absolute camera pose for a single query image. However, predominant methods focus on single-camera images and scenes with limited appearance variations, limiting their applicability to cross-domain scenes commonly encountered in real-world applications. Furthermore, the long-tail distribution of cross-domain datasets poses additional challenges for visual localization. In this work, we propose a novel cross-domain data generation method to enhance visual localization methods. To achieve this, we first construct a cross-domain 3DGS to accurately model photometric variations and mitigate the interference of dynamic objects in large-scale scenes. We introduce a text-guided image editing model to enhance data diversity for addressing the long-tail distribution problem and design an effective fine-tuning strategy for it. Then, we develop an anchor-based method to generate high-quality datasets for visual localization. Finally, we introduce positional attention to address data ambiguities in cross-camera images. Extensive experiments show that our method achieves state-of-the-art accuracy, outperforming existing cross-domain visual localization methods by an average of $59\%$ across all domains. Project page: https://yzwang-sjtu.github.io/CDG-Loc. + +# 1. Introduction + +Visual localization is the process of estimating the position and orientation of a query image in 3D space. It is crucial in applications such as robotics, autonomous driving, and + +![](images/cadcbffd5d0de7aa18ba9be547f9787edc82eecb6b57ca57796e8fe63944086c.jpg) +Figure 1. Demonstration of the proposed method. Our method achieves state-of-the-art cross-domain localization performance by rendering domain-consistent images with positional attention for data augmentation. + +augmented reality. Successful visual localization methods have been developed, such as feature matching-based techniques (Zhou et al., 2022; Sarlin et al., 2021; Zhou et al., 2025), scene coordinate regression methods (Wang et al., 2023; Brachmann et al., 2023; 2025; Wang et al., 2024a), and absolute pose regression methods (Chen et al., 2024b; Shavit & Keller, 2022; Chen et al., 2022a; Shavit et al., 2021). Current methods focus on single-domain visual localization, typically applied to images from a single camera (e.g., pinhole cameras) and scenes with limited appearance variations. However, single-domain methods encounter two major challenges in real-world applications: 1) Query images captured by pinhole cameras, 360 cameras, fisheye cameras, and other cameras exhibit significant differences due to variations in distortion and field of view. 2) The appearance of scenes undergoes substantial variations over time, influenced by factors such as lighting conditions and dynamic objects. Due to the limited training data of single-domain methods, significant domain differences arise between these methods and the real-world domain, leading to a drop in localization performance. Recently, 360Loc(Huang + +et al., 2024) pioneered the exploration of these challenges by mapping limited 360 images to cross-camera images for data augmentation, achieving state-of-the-art performance. However, there remains considerable room for improvement due to the limited diversity of the generated data. + +In light of these challenges, our research focuses on developing an advanced cross-domain dataset generation method to enhance visual localization performance, as illustrated in Fig. 1. This paper concentrates on data augmentation for absolute pose regression (APR) methods, which require image-pose pairs as training datasets. To achieve this, we adopt 3D Gaussian Splatting (3DGS) (Kerbl et al., 2023) for its capability to synthesize high-fidelity images from arbitrary views in real time, thus enhancing the diversity of data for visual localization. However, generating cross-domain datasets based on 3DGS faces two main challenges: 1) Photometric variations and dynamic objects disrupt the multi-view consistency required by 3DGS methods, making it difficult to reconstruct accurate and domain-consistent scene appearances. 2) Due to the high costs in time and labor, training datasets often exhibit a long-tail distribution, which prevents 3DGS from fully learning the scene representations across all domains. For instance, data collected under daytime conditions is abundant (primary domain), while data from nighttime conditions is extremely sparse (secondary domain) in our evaluated dataset. + +To address these challenges, we propose a novel cross-domain 3D Gaussian Splating to model large-scale scene photometric variations while mitigating the interference of dynamic objects. We introduce learnable photometric embeddings that encode image photometric histograms to represent scene photometry. These embeddings are integrated with the anchor-based Gaussian features proposed by Scaffold-GS(Lu et al., 2024) to model scene photometric variations, achieving strong scene fitting and reduced Gaussian storage. Additionally, we introduce dynamic photometric embeddings, Gaussian dynamic confidence, and Gaussian dynamic photometry to ignore dynamic objects and compensate for photometric losses. Unlike WildGausians (Kulhanek et al., 2024), our method encodes photometric histograms and is not constrained by the performance bottlenecks of pre-trained detectors (Oquab et al., 2023). Considering that sparse secondary domain images hinder 3DGS from accurately learning cross-domain scene representations, we employ a text-guided image editing model (Brooks et al., 2023) to augment secondary domain images by transforming primary domain images. Recognizing the domain inconsistencies between the pre-trained editing model and real-world domains, as well as the presence of hallucination noise, we carefully design an efficient fine-tuning strategy to adapt the editing model to our task. Furthermore, we propose a two-phase training strategy for cross-domain 3DGS to mitigate hallucination noise intro + +duced by the editing model. + +To ensure that cross-domain 3DGS generates high-quality images for visual localization, we develop an anchor-based image generation method. This method guarantees that the generated images are correctly associated with photometric embeddings and uniformly distributed within the range of accurate reconstruction. We then generate cross-camera images by leveraging the camera models. These images exhibit different distortions and fields of view, leading to the misalignment of appearance features across images corresponding to the same pose. This introduces data ambiguity, making it difficult for visual localization methods to learn effectively. To address this, we propose an efficient positional attention mechanism to align appearance features, thereby eliminating data ambiguity. + +Extensive experiments demonstrate that our method achieves state-of-the-art visual localization performance, with more than $59\%$ average improvement across domains. Our main contributions are summarized as follows: + +- We developed a cross-domain 3DGS to generate real-domain consistent images by modeling photometric variations and mitigating the interference of dynamic objects in large-scale scenes. Furthermore, we designed a two-stage training strategy to reduce the interference of hallucination noise. +- We introduce a text-guided image editing model to enhance data diversity for addressing the long-tail distribution problem and design an efficient fine-tuning strategy to adapt the model to our task. +- We develop an anchor-based method to generate high-quality datasets for visual localization and introduce positional attention to eliminate data ambiguity. + +# 2. Related Work + +# 2.1. Visual Localization + +Several studies have explored cross-domain visual localization under pinhole camera settings. To enhance localization performance, (Porav et al., 2018) uses invertible generators to produce synthetic images, while (Anoosheh et al., 2019) converts nighttime images to a more discriminative daytime representation. Other methods focus on learning domain-invariant features to bridge the gap between varying environmental conditions (Hu et al., 2019). Additionally, several works (Tang et al., 2020; Chen et al., 2023) advocate for disentangling image representations into separate codes that isolate place-specific cues from appearance and occlusion factors, ensuring reliable place recognition. However, these methods are limited to single-camera localization and rely on image retrieval. Compared to APR methods + +(Clark et al., 2017; Moreau et al., 2022; Chen et al., 2024a), the retrieval-based methods suffer from significantly higher computational costs and storage requirements due to the need to construct and maintain a retrieval database. This paper enhances APR-based cross-domain localization, including cross-camera scenarios, by proposing a novel cross-domain image generation method. Unlike the prior method (Huang et al., 2024) with limited image augmentation, our method facilitates diverse cross-domain image generation. + +# 2.2. Neural Rerendering for Unconstrained Scenes + +Recent advances in neural rendering have enabled the 3D reconstruction from unconstrained scenes. Neural Rerendering in the Wild (Meshry et al., 2019) combines traditional 3D reconstruction with neural networks to handle unconstrained scenes. Extensions to the Neural Radiance Field (NeRF) (Martin-Brualla et al., 2021; Chen et al., 2022b) further address challenges in unconstrained scenes by embedding appearance information and transient uncertainty. In addition, methods such as Neural Scene Chronology (Lin et al., 2023) focus on capturing temporal variations by employing modules for appearance hallucination and temporal step function encoding. However, their slow training and rendering make large-scale scene modeling and data generation time-consuming. Additionally, the limited parameters of NeRF (Mildenhall et al., 2021) hinder its ability to effectively represent large outdoor scenes. Recently, 3DGS-based methods have garnered attention due to their faster optimization and rendering efficiency compared to NeRF. Among them, SpotLessSplats (Sabour et al., 2025), GS-W (Zhang et al., 2025), WE-GS (Wang et al., 2024b), and WildGaussians (Kulhanek et al., 2024) have shown potential in modeling appearance variations and dynamic objects in wild scenes. However, they cannot explicitly control photometric properties and are constrained by the performance bottlenecks of pre-trained detectors (Oquab et al., 2023). Existing methods are also not suitable for scenes with long-tail distribution problems. In this paper, we propose a method that models appearance variations by encoding photometric histograms, mitigates the impact of dynamic objects without relying on pre-trained detectors, and employs a fine-tuned image editing model to effectively address the long-tail distribution problem. + +# 2.3. Image Editing + +Traditional methods focused on tasks like style transfer (Gatys, 2015; Liu et al., 2024; Ojha et al., 2021), while recent approaches incorporate text-based guidance (Bao et al., 2023) (e.g., CLIP embeddings) to enhance editing. Recent progress in image editing (Zhang et al., 2023; Chefer et al., 2023; Li et al., 2024; Ceylan et al., 2023) leverages large pretrained models and generative techniques for targeted manipulations. Text-to-image diffusion models like Stable + +Diffusion (Rombach et al., 2022) enable complex transformations through realistic image generation from text prompts. In 3D scene editing, instruction-guided methods (Chen et al., 2024c; Haque et al., 2023) allow manipulation of scene elements, such as object location, shape, and lighting, using natural language instructions. The state-of-the-art techniques (Tschernezki et al., 2022) distill knowledge from generated multi-view images using pre-trained models. However, the images generated directly using the pre-trained model are misaligned with the target domain, which undermines localization accuracy. To address this, we carefully design an effective fine-tuning strategy to train the editing model to generate domain-consistent images. + +# 3. Preliminaries + +Scaffold-GS (Lu et al., 2024) uses a set of 3D anchor structures to model the entire scene. Each anchor stores learnable Gaussian features $f_{gs}$ and employs a multilayer perceptron to predict the properties of Gaussians inherited from the anchor representation. Compared to the original 3D Gaussian structure (Kerbl et al., 2023), Scaffold-GS offers a more compact representation and stronger scene modeling capabilities, allowing for flexible modeling of dynamic scene appearances. Similar to traditional 3DGS, it utilizes tile-based rasterization for efficient image rendering. The geometry of each 3D Gaussian $G_{i}$ is defined in world space: + +$$ +G _ {i} (\mathbf {x}) = e ^ {- \frac {1}{2} \left(\mathbf {x} - \mathbf {p} _ {i}\right) ^ {T} \Sigma_ {i} ^ {- 1} \left(\mathbf {x} - \mathbf {p} _ {i}\right)}, \tag {1} +$$ + +where $\mathbf{x}$ is an arbitrary position within the 3D scene, $\mathbf{p}_i$ and $\Sigma_{i}$ denote the position and covariance matrix of 3D Gaussians, respectively. $\Sigma_{i}$ uses semi-definite parameterization to constrain itself to the space of valid covariance matrices: + +$$ +\Sigma = R S S ^ {T} R ^ {T}, \tag {2} +$$ + +where $R$ is rotation matrix and $S$ is scaling matrix. Additionally, each 3D Gaussian includes opacity $\alpha_{i}$ and color $c_{i}$ for image rendering. To render an image from a given view, 3D Gaussians are first projected onto the image plane to obtain 2D Gaussians $G_{i}^{\prime}$ . The 2D Gaussians are then processed using tile-based rasterization and alpha-blending to produce the final rendered image: + +$$ +C \left(\mathbf {x} ^ {\prime}\right) = \sum_ {i \in N} c _ {i} \alpha_ {i} G _ {i} ^ {\prime} \left(\mathbf {x} ^ {\prime}\right) \prod_ {j = 1} ^ {i - 1} \left(1 - \alpha_ {j} G _ {j} ^ {\prime} \left(\mathbf {x} ^ {\prime}\right)\right), \tag {3} +$$ + +where $\mathbf{x}'$ and $N$ denote the queried pixel position and the number of 2D Gaussians associated with the queried pixel, respectively. All parameters of the 3D Gaussians are optimized end-to-end using a differentiable rasterizer. + +# 4. Method + +We aim to develop a visual localization method to accurately estimate the poses of cross-domain query images, given a + +![](images/6a24a185daa81c7d42538629cb951b5d4c0f8528de0ec1a06728c8e8b44d5826.jpg) +Figure 2. Overview of our method. We first construct a cross-domain 3DGS to accurately model photometric variations and mitigate the interference of dynamic objects. Specifically, we construct learnable embeddings to encode photometric histograms. These embeddings, along with Gaussian features, are fed into two separate MLPs to predict the static and dynamic attributes of the Gaussians. We fine-tune an image editing model to generate secondary domain images for augmenting the sparse secondary domain dataset. Furthermore, we propose a two-stage training strategy for cross-domain 3DGS to mitigate the hallucination noise introduced by the editing model. Next, we develop an anchor-based generation method to create high-quality datasets for visual localization. Finally, we implement an online mapping mechanism to reduce data storage costs and introduce positional attention to resolve data ambiguities. + +limited training set consisting of 360 image-pose pairs as shown in Fig. 2. To achieve this, we first construct a cross-domain 3DGS to accurately model photometric variations and mitigate the interference of dynamic objects in large-scale scenes. Next, we introduce image editing models that transform images from the primary domain to augment sparse secondary domains, addressing the long-tail distribution problem. Finally, we propose an anchor-based method to generate high-quality datasets for visual localization and introduce positional attention to resolve data ambiguities. + +# 4.1. Cross-Domain 3D Gaussian Splitting + +To accurately model photometric variations and ignore the interference from dynamic objects in the large scenes, we carefully design an efficient cross-domain 3DGS. The main components of this module include: (a) photometric variation modeling, (b) suppression of dynamic objects, and (c) a two-phase training strategy. + +Photometric Variation Modeling. The photometry in images varies significantly with position and time in real-world scenes, leading to the failure of 3DGS that depends on multi-view consistency. To address this challenge, we construct $L$ learnable photometric embeddings $e$ uniformly distributed across the entire scene based on mapping images. These embeddings encode the photometric histogram $\mathcal{H}$ of the corresponding mapping images, introducing photometric + +prriors that vary with position and time. We employ the multi-layer perceptron (MLP) to predict Gaussian attributes by combining Gaussian features $f_{gs}$ proposed by Scaffold-GS (Lu et al., 2024) with the photometric embeddings, thereby achieving strong scene modeling capabilities. Please refer to the supplementary materials for more details. + +Dynamic Object Suppression. Dynamic objects introduce noise that hinders the accurate reconstruction of scenes. To suppress the influence of dynamic objects, we introduce dynamic confidence $\beta$ for the Gaussian attributes and render dynamic confidence maps $M$ using alpha-blending: + +$$ +M (x) = \sum_ {i \in N} \beta_ {i} \sigma_ {i} \prod_ {j = 1} ^ {i - 1} (1 - \sigma_ {j}), \tag {4} +$$ + +Inspired by NeRF-W (Martin-Brualla et al., 2021), we assign lower weights to the training loss in the regions with high dynamic confidence to ignore the dynamic objects. However, varying photometry is partially treated as dynamic objects and thus ignored, distorting the photometric rendering of the scene. To address this, we introduce a dynamic photometric embedding $e_d$ to incorporate photometric variation priors, assisting in the prediction of dynamic confidence. We also add a dynamic photometric $h_d$ to the Gaussians to compensate for photometric loss. To prevent entanglement, two separate MLP networks $MLP_s$ , $MLP_d$ are used to + +predict static and dynamic attributes independently: + +$$ +\begin{array}{l} c _ {s} = M L P _ {s} \left(e _ {s}, f _ {g s}\right), \\ \begin{array}{l} s _ {s} \quad M L P _ {s} (s, f _ {g s}), \\ h _ {d}, \beta = M L P _ {d} \left(e _ {d}, f _ {g s}\right), \end{array} \tag {5} \\ \end{array} +$$ + +where $c_{s}$ and $e_{s}$ represent static color and static photometric embeddings. We can obtain the rendered image $\hat{\mathbf{C}}$ : + +$$ +\hat {\mathbf {C}} (x) = \sum_ {i \in N} \left(c _ {s} + h _ {d}\right) \sigma_ {i} \prod_ {j = 1} ^ {i - 1} \left(1 - \sigma_ {j}\right), \tag {6} +$$ + +Two-phase Training Strategy. Since the training dataset consists of only 360 images, we first convert them into pinhole camera images for training the cross-domain 3DGS, then map the rendered pinhole images back to 360 images. Due to the significant photometric differences in cross-domain images and hallucination noise in the augmented secondary domain images (Sec. 4.2), directly training cross-domain 3DGS on all domain images makes it difficult to learn accurate scene representations. Therefore, we train cross-domain 3DGS in two stages. In the first stage, we only use images from the primary domain, learning the accurate appearance of the primary domain and the global scene geometry. Inspired by NeRF-W (Martin-Brualla et al., 2021), we use D-SSIM loss and the photometric loss with uncertainty to mitigate the interference of dynamic objects: + +$$ +\mathcal {L} = \lambda \left(\frac {\| \mathbf {C} - \hat {\mathbf {C}} \| _ {2} ^ {2}}{2 M ^ {2}} + \frac {\log M ^ {2}}{2}\right) + (1 - \lambda) \mathcal {L} _ {\mathrm {D - S S I M}}, \tag {7} +$$ + +Where $\lambda$ is the loss weight, $\mathbf{C}$ and $\hat{\mathbf{C}}$ represent the ground truth and the rendered result, respectively. In the second stage, we fine-tune the first-stage 3DGS using augmented secondary domain images. Specifically, we freeze parameters related to scene geometry and only train parameters related to photometric variations. This prevents hallucination noise from damaging the already reconstructed scene geometry. Finally, we use $\mathcal{L}_1(\mathbf{C},\hat{\mathbf{C}})$ and LPIPS losses (Haque et al., 2023) effectively reduce the hallucination noise. + +# 4.2. Secondary Domain Augmentation. + +The scarcity of secondary domain data due to the long-tailed distribution problem of cross-domain datasets limits the ability of cross-domain 3DGS to learn accurate scene representations. We introduce a text-guided image editing model to address the long-tail distribution problem and design an efficient fine-tuning strategy to adapt the model to our task, as shown in Fig. 3. Inspired by the powerful InstructPix2Pix (Brooks et al., 2023) based on diffusion, we define a temporal prompt $T_{c}$ for temporal transformation (e.g., make it nighttime) and leverage the editing model to transform primary domain images into the secondary domain. However, directly using the pre-trained model results in domain inconsistencies. To address this, we fine-tune + +![](images/d972e3c5a8fd905725b7047407f04b0eef54dc0fd1698496f99e7b13910b85dc.jpg) +Figure 3. Illustration of secondary domain augmentation. + +the image editing model using a carefully constructed temporal transformation dataset. Specifically, we render the primary domain images $I_{a}$ corresponding to the sparse secondary domain images $I_{b}$ using the first-stage 3DGS. Then, the temporal transformation datasets pair the original images $I_{a}$ , the edited images $I_{b}$ , and the editing text $T_{c}$ . We further randomly rotate the 360 images $I_{o}$ by the latitude $\theta_{i}$ and longitude $\phi_{i}$ using the 360-camera projection function $\psi_{o}$ for dataset augmentation: + +$$ +\hat {I} _ {o} = \psi_ {o} \left(R \left(\theta_ {i}, \phi_ {i}\right) \psi_ {o} ^ {- 1} \left(I _ {o}\right)\right). \tag {8} +$$ + +Considering that sparse temporal transformation datasets fail to cover the entire global scene, leading to hallucination phenomena when the model encounters unseen areas. We constructed a scene prior dataset, which also helps prevent dynamic objects in the fine-tuning dataset from introducing dynamic noise into the model. Specifically, the scene prior datasets pair the rendered static images and dynamic images from the primary domain with editing text, such as add dynamic objects to the scene. + +# 4.3. Training for Visual Localization + +Anchor-based Image Generation Method. To generate high-quality datasets for training visual localization methods, we need to ensure that the generated images are correctly associated with photometric embeddings and uniformly distributed within the range of accurate reconstruction. Therefore, we develop an anchor-based image generation method. Specifically, photometric embeddings uniformly distributed across the scene are used as anchors, with each anchor associated with a pose $P_{a}$ , where $P_{a}$ denotes the pose of the image encoded by the photometric embedding. Then, we randomly generate $m$ poses $P_{g}$ within a 3D spherical range with a radius $L$ , centered at the anchor. The radius is empirically determined as the distance between adjacent anchors to ensure that the generated images fall within the range of accurate reconstruction. The pose $P_{g}$ is computed using random displacements $t$ and random rotation $R$ : + +$$ +P _ {g} = R P _ {a} + t, \quad \| t - t _ {a} \| \leq L, \tag {9} +$$ + +![](images/e662dcb53d607340d3f7cb8c9a7da1d6faf4b49a9a237986e9de1f2038a02997.jpg) +Figure 4. Visualization of positional attention mapping across different camera domains in the global coordinate space. + +where $t_a$ represents the position of the anchor. Finally, we render the image using the pose $P_g$ and the photometric embedding of its anchor. This ensures that the correct photometric embedding is associated during image rendering, which is crucial for generating domain-consistent images. + +Online Cross-Camera Images Generation. The generated images are currently in the 360 format, we need to generate cross-camera images. Thanks to the full field of view of 360 images, any camera image can be directly mapped from the 360 images using the mapping $\Phi_{i}$ : + +$$ +I _ {c _ {n}} = \Phi_ {i} (I _ {o}) = \psi_ {c _ {n}} \left(\psi_ {o} ^ {- 1} (I _ {o})\right), \tag {10} +$$ + +where $\psi_{o}^{-1}$ denote the unprojection function of 360 camera and $\psi_{c_n}$ is the projection function of camera domain $c_{n}$ . If there are $j$ camera domains, this requires generating $m\times j$ images for each anchor. However, storing images for all camera domains incurs high storage costs. To address this, we store only the mapping relationships $\Phi_i$ , rendering the cross-camera images online during the training of the visual localization method. Since the mapping relationships are precomputed offline and dominate the computational cost of cross-camera mapping, the additional overhead introduced by online mapping is acceptable. + +Positional Attention. The appearance features of cross-camera images with the same pose are not aligned in the image coordinate space due to different distortions and fields of view. We define this problem as data ambiguity, which lowers the accuracy of visual localization methods. To address this, we propose position attention to guide the alignment of appearance features. First, we construct a global image coordinate space $S^o$ based on 360 images, which can cover the field of view of any camera domain. Then, we convert the image coordinates $S_{c_n}$ from different camera domains to the global coordinate space $S_{c_n}^o$ as shown in Fig. 4, which are used as position attention: + +$$ +S _ {c _ {n}} ^ {o} = \psi_ {o} \left(\psi_ {c _ {n}} ^ {- 1} \left(S _ {c _ {n}}\right)\right). \tag {11} +$$ + +Table 1. The settings for the mapping and query datasets. + +
Mapping
SceneAtriumConcourseHallPiatrium
Primary/Secondary (Frames)581/10491/10540/20632/20
Camera Model360360360360
Spatial Extent (m2)2340139554606860
Query
Camera Model360Fisheye1/Fisheye2/Fisheye3Pinhole
Field of View360°120°/150°/195°85°
Resolution6144×30721280×10241920×1200
+ +We obtain the normalized positional attention $S_{c_n}^n$ by using the dimensions $D$ of the global coordinate space: + +$$ +S _ {c _ {n}} ^ {n} = \frac {2 S _ {c _ {n}} ^ {o}}{D - 1} - 1. \tag {12} +$$ + +Finally, the positional attention maps are concatenated with the images along the channel and fed into the visual localization method, guiding cross-camera image alignment. + +# 5. Experiments + +# 5.1. Datasets and Baselines + +We conduct experiments using the large-scale dataset 360Loc (Huang et al., 2024), which includes dynamic objects and significant variations in lighting conditions. The dataset consists of five camera domains, covering both daytime (primary domain) and nighttime (secondary domain). We construct a long-tailed distribution dataset by selectively sparse secondary domain data based on scene size. The settings for the mapping and query datasets are detailed in the Tab. 1. To facilitate training and evaluation, we use SAM2 (Ravi et al., 2024) to remove the fixed base at the bottom of the image. For comparison, we employ state-of-the-art baselines provided by cross-domain visual localization benchmarks (Huang et al., 2024). To ensure a fair comparison, we reproduce the baselines using the same setup as our method. Please refer to the supplementary materials for more details. + +# 5.2. Implementation Details + +Our method is built upon the widely-used open-source Scaffold-GS (Lu et al., 2024) codebase and employs the MS-T (Shavit et al., 2021) for visual localization. During cross-domain 3DGS training, we scale images to $400 \times 400$ and train for 60,000 iterations in the first stage, followed by fine-tuning for 20,000 iterations in the second stage. For the editing model, we fine-tune it for 10,000 iterations at a resolution of $512 \times 512$ . The number $L$ of photometric embeddings is set to half the number of the mapping dataset and the parameter $m$ is set to 24. During visual localization training, + +Table 2. Comparison of median translation and orientation error $\left( {m,{}^{ \circ }}\right)$ on the primary domain dataset. + +
SceneAtrium_DayConcourse_Day
CameraPinholeFisheye1Fisheye2Fisheye3360AveragePinholeFisheye1Fisheye2Fisheye3360Average
PN (Kendall et al., 2015)15.5/85.511.8/79.911.3/80.410.1/79.84.5/82.610.6/81.618.6/95.010.7/88.710.1/87.77.7/85.92.6/39.09.9/79.3
MS-T (Shavit et al., 2021)20.1/77.714.5/73.714.0/71.712.5/65.613.2/54.714.9/68.717.0/69.111/60.810.5/59.69.9/63.44.9/34.610.7/57.5
PN-VC2 (Huang et al., 2024)11.5/31.29.1/19.58.9/19.38.4/18.17.7/17.19.1/21.07.0/18.94.7/11.54.4/11.23.9/9.93.2/6.94.6/11.7
MS-T-VC2 (Huang et al., 2024)10.0/46.76.3/36.36.2/36.54.9/28.15.2/47.66.5/39.03.5/19.61.9/12.71.8/12.81.7/12.71.6/13.52.1/14.3
Ours5.2/21.82.2/12.72.1/12.31.8/11.51.6/14.12.6/14.52.7/9.71.5/5.71.3/5.51.1/5.41.0/5.71.5/6.4
SceneHall_DayPiatrium_Day
CameraPinholeFisheye1Fisheye2Fisheye3360AveragePinholeFisheye1Fisheye2Fisheye3360Average
PN (Kendall et al., 2015)19.8/90.811.1/95.710.4/95.97.5/92.32.7/97.310.1/96.121.3/88.013.8/86.513.0/87.110.9/84.45.7/69.812.9/83.2
MS-T (Shavit et al., 2021)21.8/96.014.1/94.013.5/92.711.2/91.711.4/88.514.4/92.630.0/78.523.4/71.322.7/72.719.3/72.611.3/52.021.3/69.4
PN-VC2 (Huang et al., 2024)7.0/26.44.4/15.54.3/14.73.9/14.23.2/12.24.6/16.610.4/24.56.9/13.36.8/12.86.8/11.55.0/9.87.2/14.4
MS-T-VC2 (Huang et al., 2024)4.0/36.92.2/25.82.1/25.21.8/26.21.7/26.92.4/28.28.1/32.74.0/24.53.9/23.63.8/24.13.3/22.14.6/25.4
Ours2.3/17.41.0/8.91.0/8.60.9/8.40.7/7.51.2/10.24.4/18.02.5/11.32.4/10.52.4/10.12.3/10.12.8/12.0
+ +Table 3. Comparison of median translation and orientation error $\left( {m,{}^{ \circ }}\right)$ on the secondary domain datasets. + +
SceneAtrium_NightConcourse_Night
CameraPinholeFisheye1Fisheye2Fisheye3360AveragePinholeFisheye1Fisheye2Fisheye3360Average
PN (Kendall et al., 2015)19.8/90.816.4/87.316.1/86.715.7/83.58.7/22.815.3/74.219.8/96.213.3/85.513.0/88.411.1/87.55.5 / 45.612.5/80.6
MS-T (Shavit et al., 2021)24.8/84.717.8/80.517.0/80.115.1/80.05.0/46.315.9/74.322.1/74.717.7/69.517.0/68.317.2/72.78.4/57.316.5/68.5
PN-VC2 (Huang et al., 2024)13.6/50.211.5/38.111.6/38.311.4/ 37.89.7/45.711.6/42.010.7/25.48.3/ 16.48.4/15.78.1/ 14.75.5/13.58.2/17.1
MS-T-VC2 (Huang et al., 2024)13.5/70.69.1/64.19.0/63.88.6/ 64.47.3/ 61.59.5/64.95.5/28.74.0/20.13.9/20.33.5/20.93.4/23.74.1/22.7
Ours4.6/25.31.8/11.01.7/10.11.6/10.11.4/7.32.2/12.83.3/11.41.7/6.61.6/6.31.4/6.91.1/6.11.8/7.5
SceneHall_NightPiatrium_Night
CameraPinholeFisheye1Fisheye2Fisheye3360AveragePinholeFisheye1Fisheye2Fisheye3360Average
PN (Kendall et al., 2015)22.8/95.618.3/93.817.9/93.616.8/91.310.9 /100.117.3/94.933.2/89.729.3/89.628.8/90.429.2/89.830.6/98.530.2/91.6
MS-T (Shavit et al., 2021)32.1/96.129.9/94.229.7/93.631.8/93.122.3/94.429.2/94.337.7/91.337.3/89.136.2/89.035.7/85.637.2/83.036.8/87.6
PN-VC2 (Huang et al., 2024)13.1/56.110.5/43.710.1/43.09.7/40.57.5/34.710.2/43.615.8/51.913.2/ 34.912.8/ 34.812.5/ 32.610.6/ 30.913.0/37.0
MS-T-VC2 (Huang et al., 2024)8.9/73.15.6/67.65.3/66.34.8/ 68.93.8/ 67.25.7/68.616.0/ 63.913.0/ 53.812.4/53.711.9/49.911.9/49.913.0/54.2
Ours4.2/32.52.2/18.52.1/17.51.9/15.71.5/18.02.4/20.47.2/27.94.6/16.14.3/16.13.7/14.12.6/9.64.5/16.8
+ +images from all domains are resized to $256 \times 256$ . Training and evaluation are performed on an NVIDIA GeForce GTX 4090 GPU. Please refer to the supplementary materials for more details. + +# 5.3. Quantitative and Qualitative Results + +Quantitative Results. To evaluate the performance of cross-domain localization, we apply the widely-used median translation (m) and rotation $(\circ)$ . The cross-domain localization performance is reported in Tab. 2 for daytime and Tab. 3 for nighttime. Our method achieves state-of-the-art results across all cross-domain scenes, significantly outperforming the previously leading MS-T-VC2 by an average of $51\%$ during the day and $67\%$ at night. Additionally, our method significantly outperforms the original MS-T without data augmentation, achieving an $85\%$ improvement in domain average. This demonstrates that visual localization is highly data-hungry, particularly in more challenging large-scale cross-domain scenes. Although MS-T-VC2 also utilizes data augmentation methods, it relies on limited mapping data, which restricts the diversity of the augmented data. Furthermore, the baselines fail to address the long-tail problem of cross-domain data, preventing visual localization methods from learning sufficient scene features and leading to poor performance in secondary domains. This emphasizes the importance of augmenting data diversity + +for visual localization and validates the effectiveness of our secondary domain augmentation method. + +According to the cross-camera localization results, we observe that visual localization performance decreases as the field of view (FOV) of the camera narrows. Notably, for pinhole images with a small FOV, localization performance is significantly worse than the average of the other four cameras with a wide FOV (5.2/21.8 vs. 1.9/12.7 in Atrium_Day), even when effective data augmentation methods are employed. The poor performance of pinhole images significantly lowers the overall average localization accuracy of our method. This demonstrates that visual localization performance faces a bottleneck due to the inherent limitations of a narrow FOV. These findings suggest that selecting cameras with a wide FOV is crucial for achieving better performance in practical visual localization applications. + +Qualitative Results. The Fig. 5 shows the cross-domain image generation results of our method, covering both diverse appearance domains and camera domains. It is evident that our method generates domain-consistent images across all target domains, even in highly sparse secondary domain scenes. Moreover, the generated images successfully ignore dynamic interference to ensure accurate scene reconstruction, which is essential for achieving robust visual localization performance. These results demonstrate that + +![](images/635ad6bbef69fe670950757f722158c94e505b0cafe1ef7886339d96af5a490e.jpg) +Figure 5. Cross-domain image generation results. Our method can generate accurate and domain-consistent images, even in sparse secondary domain scenes. Furthermore, our generated images effectively ignore dynamic interference to ensure accurate scene reconstruction. + +the proposed method can generate high-quality and diverse training data for cross-domain visual localization. + +# 5.4. Ablation Study + +Effectiveness of Cross-Domain 3DGS. To evaluate the effectiveness of cross-domain 3DGS, we conducted a qualitative comparison with the Scaffold-GS in terms of dynamic interference removal, photometric variation modeling, and sparse secondary domain scene reconstruction, as shown in Fig. 6. Our method achieves accurate static appearance reconstruction by effectively suppressing dynamic interference while precisely reconstructing domain-consistent appearances in regions with significant photometric variations. As shown in the bottom row of the figure, the baseline fails to model scenes in the sparse secondary domain, while our method successfully reconstructs domain-consistent scenes. We perform a quantitative comparison using PSNR and LPIPS metrics on the Atrium datasets. As shown in Tab. 4, our method significantly outperforms the baseline. This demonstrates that cross-domain 3DGS can accurately reconstruct scene representations across all domains, even in the sparse secondary domain. + +Table 4. Ablation study on cross-domain 3DGS with metrics "PSNR $\uparrow /$ LPIPS $\downarrow$ ". The symbol " $/$ " indicates an invalid result. + +
DomaindaynightDomaindaynight
Scaffold-GS22.38/0.38/Ours24.64/0.2326.07/0.22
+ +Effectiveness of Fine-Tuning Strategy. We effectively fine-tune the image editing model to generate domain-consistent images while reducing hallucinations and dynamic noise. To better demonstrate the effectiveness of this strategy, we perform a qualitative comparison with a pre-trained model, as shown in Fig. 7. The top row shows that the pre-trained editing model fails to generate domain-consistent images, such as in photometric distribution and color. In contrast, our fine-tuned model generates domain-consistent images. Furthermore, as illustrated in the middle and bottom rows, our fine-tuned model effectively prevents the introduction of hallucinations and dynamic noise. We also conducted quantitative experiments on the atrium scene. We employed image similarity metrics SSIM and LPIPS to evaluate the + +![](images/4b0d434a166baff5372ea716bea6cb7176d4b7646b72f15b5971309404af49ef.jpg) +Figure 6. Ablation study on cross-domain 3DGS. The top two rows show qualitative comparisons in scenes with dynamic object interference and significant photometric variations, respectively. The bottom two rows show the comparison results for panoramic images. The red box indicates the zoomed-in region. + +Table 5. Ablation study on fine-tuning strategy. + +
MetricsSSIM ↑LPIPS ↓
Pretrained Model0.3380.428
Finetuned Model0.7090.337
+ +similarity between the images generated and the ground truth. As shown in the Tab. 5, the image similarity significantly improved after fine-tuning. It demonstrates that our fine-tuning strategy effectively reduces the domain inconsistencies between the pre-trained editing model and real-world domains. + +Effectiveness of Positional Attention. Positional attention effectively resolves data ambiguity by aligning appearance features of cross-camera images in global coordinate space, thereby enhancing visual localization performance. To evaluate the effectiveness of positional attention, we assess the visual localization performance without positional attention in the primary domain scenes, as shown in Tab. 6. The positional attention significantly improves overall localization performance (2.0/10.8 vs. 2.8/14.6), demonstrating that it effectively resolves data ambiguity. + +# 6. Limitation + +In real-world scenarios, the geometric structure of the scene may change over time. Significant geometric changes within + +![](images/9300b9d879f4566129e5d41fadda1086e2ad6bb345a8fe57ec08b9d0911828d1.jpg) +Figure 7. Ablation study on fine-tuning strategy. Top row: Our fine-tuned model generates domain-consistent images compared to the pre-trained model. Middle row: Our fine-tuned model reduces hallucination noise relative to the pre-trained model. Bottom row: Our method introduces scene priors to the model without introducing dynamic noise. + +Table 6. Ablation study on positional attention on primary datasets. + +
CameraPinholeFisheye1Fisheye2Fisheye3360Average
w/o Positional Attention4.7/20.62.4/12.92.3/12.62.3/12.62.1/14.42.8/14.6
Full Model3.7/16.71.8/9.71.7/9.21.6/8.91.4/9.42.0/10.8
+ +the query images can impair cross-domain localization performance. Future improvements could involve continual learning to adapt the model to evolving scene geometry. + +# 7. Conclusion + +In conclusion, this work presents a novel cross-domain data generation method designed to enhance visual localization performance. We develop a cross-domain 3DGS that accurately models photometric variations while effectively suppressing dynamic object interference in large-scale scenes. We introduce an image editing model to enhance data diversity for addressing the long-tail distribution problem and design an effective fine-tuning strategy for it. Furthermore, we propose an anchor-based dataset generation method to produce high-quality training data for visual localization and incorporate positional attention to address data ambiguities in cross-camera images. Experimental results demonstrate that our method significantly improves the performance of visual localization methods, providing a promising direction for advancing cross-domain visual localization. + +# 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 + +Anoosheh, A., Sattler, T., Timofte, R., Pollefeys, M., and Van Gool, L. Night-to-day image translation for retrieval-based localization. In 2019 International conference on robotics and automation (ICRA), pp. 5958-5964, 2019. +Bao, C., Zhang, Y., Yang, B., Fan, T., Yang, Z., Bao, H., Zhang, G., and Cui, Z. Sine: Semantic-driven image-based nerf editing with prior-guided editing field. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20919-20929, 2023. +Brachmann, E., Cavallari, T., and Prisacariu, V. A. Accelerated coordinate encoding: Learning to relocalize in minutes using rgb and poses. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5044-5053, 2023. +Brachmann, E., Wynn, J., Chen, S., Cavallari, T., Monszpart, Á., Turmukhambetov, D., and Prisacariu, V. A. Scene coordinate reconstruction: Posing of image collections via incremental learning of a relocalizer. In European Conference on Computer Vision, pp. 421-440, 2025. +Brooks, T., Holynski, A., and Efros, A. A. Instructpix2pix: Learning to follow image editing instructions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18392-18402, 2023. +Ceylan, D., Huang, C.-H. P., and Mitra, N. J. Pix2video: Video editing using image diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 23206-23217, 2023. +Chefer, H., Alaluf, Y., Vinker, Y., Wolf, L., and Cohen-Or, D. Attend-and-excite: Attention-based semantic guidance for text-to-image diffusion models. ACM Transactions on Graphics (TOG), 42(4):1-10, 2023. +Chen, S., Li, X., Wang, Z., and Prisacariu, V. A. Dfnet: Enhance absolute pose regression with direct feature matching. In European Conference on Computer Vision, pp. 1-17, 2022a. +Chen, S., Bhalgat, Y., Li, X., Bian, J.-W., Li, K., Wang, Z., and Prisacariu, V. A. Neural refinement for absolute pose regression with feature synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20987-20996, 2024a. +Chen, S., Cavallari, T., Prisacariu, V. A., and Brachmann, E. Map-relative pose regression for visual re-localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20665-20674, 2024b. +Chen, X., Zhang, Q., Li, X., Chen, Y., Feng, Y., Wang, X., and Wang, J. Hallucinated neural radiance fields in + +the wild. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12943-12952, 2022b. +Chen, Y., Chen, X., and Li, Y. Place recognition under occlusion and changing appearance via disentangled representations. In 2023 IEEE International Conference on Robotics and Automation (ICRA), pp. 1882-1888, 2023. +Chen, Y., Chen, Z., Zhang, C., Wang, F., Yang, X., Wang, Y., Cai, Z., Yang, L., Liu, H., and Lin, G. Gaussianeditor: Swift and controllable 3d editing with gaussian splatting. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 21476-21485, 2024c. +Clark, R., Wang, S., Markham, A., Trigoni, N., and Wen, H. Vidloc: A deep spatio-temporal model for 6-dof videoclip relocalization. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6856-6864, 2017. +Gatys, L. A. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. +Haque, A., Tancik, M., Efros, A. A., Holynski, A., and Kanazawa, A. Instruct-nerf2nerf: Editing 3d scenes with instructions. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 19740-19750, 2023. +Hu, H., Wang, H., Liu, Z., Yang, C., Chen, W., and Xie, L. Retrieval-based localization based on domain-invariant feature learning under changing environments. In 2019 IEEE/RSJ international conference on intelligent robots and systems (IROS), pp. 3684-3689, 2019. +Huang, H., Liu, C., Zhu, Y., Cheng, H., Braud, T., and Yeung, S.-K. 360loc: A dataset and benchmark for omnidirectional visual localization with cross-device queries. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22314-22324, 2024. +Kendall, A., Grimes, M., and Cipolla, R. Posenet: A convolutional network for real-time 6-dof camera relocalization. In Proceedings of the IEEE international conference on computer vision, pp. 2938-2946, 2015. +Kerbl, B., Kopanas, G., Leimkuhler, T., and Drettakis, G. 3d gaussian splatting for real-time radiance field rendering. ACM Trans. Graph., 42(4):139-1, 2023. +Kulhanek, J., Peng, S., Kukelova, Z., Pollefeys, M., and Sattler, T. Wildgaussians: 3d gaussian splatting in the wild. arXiv preprint arXiv:2407.08447, 2024. + +Li, D., Li, J., and Hoi, S. Blip-diffusion: Pre-trained subject representation for controllable text-to-image generation and editing. Advances in Neural Information Processing Systems, 36, 2024. +Lin, H., Wang, Q., Cai, R., Peng, S., Averbuch-Elor, H., Zhou, X., and Snavely, N. Neural scene chronology. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20752-20761, 2023. +Liu, K., Zhan, F., Xu, M., Theobalt, C., Shao, L., and Lu, S. Stylegaussian: Instant 3d style transfer with gaussian splatting. In SIGGRAPH Asia 2024 Technical Communications, pp. 1-4. 2024. +Lu, T., Yu, M., Xu, L., Xiangli, Y., Wang, L., Lin, D., and Dai, B. Scaffold-gs: Structured 3d gaussians for view-adaptive rendering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20654-20664, 2024. +Martin-Brualla, R., Radwan, N., Sajjadi, M. S., Barron, J. T., Dosovitskiy, A., and Duckworth, D. Nerf in the wild: Neural radiance fields for unconstrained photo collections. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 7210-7219, 2021. +Meshry, M., Goldman, D. B., Khamis, S., Hoppe, H., Pandey, R., Snavely, N., and Martin-Brualla, R. Neural rerendering in the wild. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6878-6887, 2019. +Mildenhall, B., Srinivasan, P. P., Tancik, M., Barron, J. T., Ramamoorthi, R., and Ng, R. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM, 65(1):99-106, 2021. +Moreau, A., Piasco, N., Tsishkou, D., Stanciulescu, B., and de La Fortelle, A. Lens: Localization enhanced by nerf synthesis. In Conference on Robot Learning, pp. 1347-1356, 2022. +Ojha, U., Li, Y., Lu, J., Efros, A. A., Lee, Y. J., Shechtman, E., and Zhang, R. Few-shot image generation via cross-domain correspondence. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10743-10752, 2021. +Oquab, M., Darcet, T., Moutakanni, T., Vo, H., Szafraniec, M., Khalidov, V., Fernandez, P., Haziza, D., Massa, F., ElNouby, A., et al. Dinov2: Learning robust visual features without supervision. arXiv preprint arXiv:2304.07193, 2023. +Porav, H., Maddern, W., and Newman, P. Adversarial training for adverse conditions: Robust metric localisation using appearance transfer. In 2018 IEEE international + +conference on robotics and automation (ICRA), pp. 1011-1018, 2018. +Ravi, N., Gabeur, V., Hu, Y.-T., Hu, R., Ryali, C., Ma, T., Khedr, H., Radle, R., Rolland, C., Gustafson, L., et al. Sam 2: Segment anything in images and videos. arXiv preprint arXiv:2408.00714, 2024. +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. +Sabour, S., Goli, L., Kopanas, G., Matthews, M., Lagun, D., Guibas, L., Jacobson, A., Fleet, D., and Tagliasacchi, A. Spotlessplats: Ignoring distractors in 3d gaussian splatting. ACM Transactions on Graphics, 44(2):1-11, 2025. +Sarlin, P.-E., Unagar, A., Larsson, M., Germain, H., Toft, C., Larsson, V., Pollefeys, M., Lepetit, V., Hammarstrand, L., Kahl, F., et al. Back to the feature: Learning robust camera localization from pixels to pose. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3247-3257, 2021. +Shavit, Y. and Keller, Y. Camera pose auto-encoders for improving pose regression. In European Conference on Computer Vision, pp. 140–157, 2022. +Shavit, Y., Ferens, R., and Keller, Y. Learning multi-scene absolute pose regression with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2733-2742, 2021. +Tang, L., Wang, Y., Luo, Q., Ding, X., and Xiong, R. Adversarial feature disentanglement for place recognition across changing appearance. In 2020 IEEE International Conference on Robotics and Automation (ICRA), pp. 1301-1307, 2020. +Tschernezki, V., Laina, I., Larlus, D., and Vedaldi, A. Neural feature fusion fields: 3d distillation of self-supervised 2d image representations. In 2022 International Conference on 3D Vision (3DV), pp. 443-453, 2022. +Wang, F., Jiang, X., Galliani, S., Vogel, C., and Pollefeys, M. Glace: Global local accelerated coordinate encoding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 21562-21571, 2024a. +Wang, Y., Yan, Y., Shi, D., Zhu, W., Xia, J., Jeff, T., Jin, S., Gao, K., Li, X., and Yang, X. Nerf-ibvs: visual servo based on nerf for visual localization and navigation. Advances in Neural Information Processing Systems, 36: 8292-8304, 2023. + +Wang, Y., Wang, J., and Qi, Y. We-gs: An in-the-wild efficient 3d gaussian representation for unconstrained photo collections. arXiv preprint arXiv:2406.02407, 2024b. +Zhang, D., Wang, C., Wang, W., Li, P., Qin, M., and Wang, H. Gaussian in the wild: 3d gaussian splatting for unconstrained image collections. In European Conference on Computer Vision, pp. 341-359, 2024. +Zhang, D., Wang, C., Wang, W., Li, P., Qin, M., and Wang, H. Gaussian in the wild: 3d gaussian splatting for unconstrained image collections. In European Conference on Computer Vision, pp. 341-359, 2025. +Zhang, L., Rao, A., and Agrawala, M. Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3836-3847, 2023. +Zhou, Q., Agostinho, S., Osep, A., and Leal-Taixe, L. Is geometry enough for matching in visual localization? In European Conference on Computer Vision, pp. 407-425, 2022. +Zhou, Q., Maximov, M., Litany, O., and Leal-Taixe, L. The nefect match: Exploring nef features for visual localization. In European Conference on Computer Vision, pp. 108-127, 2025. + +# A. Implementation Details + +Cross-Domain 3D Gaussian Splatting. We use static photometric embeddings with a dimension of $L \times 5$ and dynamic photometric embeddings with a dimension of $L \times 2$ , while the photometric histogram has a dimension of 10. The photometric embeddings encoding the histogram are concatenated with the Gaussian features and fed into two separate MLPs to predict the static and dynamic attributes of the Gaussians. Each MLP has a depth of 2 and hidden layer dimensions of 64. To avoid division by zero in the training loss, we add a bias of 0.1 to the dynamic confidence map. For the first stage of cross-domain 3DGS, we set the loss weight $\lambda = 0.8$ . The loss weight of the second stage is set to 1 for both components. We utilize even-indexed images for training the cross-domain 3DGS, while using odd-indexed images for evaluation purposes. We map panoramic images to pinhole images using cubemap projections to train the 3DGS. + +For data augmentation, we rotate the temporal transformation dataset by 8 randomly sampled angles. During fine-tuning of the instruct-pix2pix editing model, we set the random flip, mixed precision, an initial learning rate of $\lambda = 10^{-5}$ , and a batch size of 4. When converting primary domain data to secondary domain data, we set the image-guided and text-guided weights to 1.5 and 7, respectively, and configure 50 iterations for inference. + +Training for Visual Localization. The original mapping dataset (Huang et al., 2024) does not contain any secondary domain (nighttime) scenes. Therefore, we construct a long-tailed distribution mapping dataset by selecting secondary domain images from the query set based on scene size. The specific sources of the selected images are shown in Tab. 7. To prevent data leakage, the selected mapping images are removed from the query images. For a fair comparison, we reproduce all baselines on the long-tailed distribution data constructed in this paper. Additionally, all images from all domains are resized to $256 \times 256$ . We set an initial learning rate of $\lambda = 10^{-4}$ and a batch size of 32 for 300 epochs for both our method and the baselines. + +Relationship between Rendering Quality and Localization Performance. To evaluate the impact of rendering quality, we conduct a quantitative experiment on the Atrium scene. Specifically, we compare the original Scaffold-GS (which produces lower-quality renderings compared to our cross-domain 3DGS) combined with our proposed data generation and positional attention mechanism. Localization performance drops (2.4/13.65 vs. 5.95/27.85) when using the lower-quality images generated by Scaffold-GS. This result demonstrates a positive correlation between rendering quality and localization accuracy. + +Table 7. The specific sources of sparse secondary domain images. + +
atrium/query_360/nighttime_360_1
2458114221226283353394527
concourse/query_360/nighttime_360_0
253132155232257321366410
hall/query_360/nighttime_360_1
125480110136162188214240
292318348374403426452555582
piatrium/query_360/nighttime_360_0
226507498122146170194
254266362386410434458482663
+ +# B. More Results + +Effectiveness of Cross-Domain 3DGS. We have included comparative experiments with the advanced GS-W (Zhang et al., 2024), which is designed for unconstrained scenes. Since GS-W does not address the long-tail data distribution issue, we conduct quantitative experiments on the Atrium-Day scene, which contains sufficient data. Additionally, we extend its training iterations to 140,000 for the large-scale evaluation scene. As shown in the Tab. 8, our method significantly outperforms GS-W while using fewer iterations (60,000). This demonstrates that our method has stronger scene modeling capabilities for large-scale scenes. + +Table 8. Ablation study on fine-tuning strategy. + +
MetricsPSNR ↑SSIM ↑LPIPS ↓
GS-W (Zhang et al., 2024)18.850.6350.594
Cross-domain 3DGS (Ours)24.640.7580.231
+ +Effectiveness of Anchor-Based Image Generation. To ensure that randomly generated images for visual localization are correctly associated with photometric embeddings and uniformly distributed within the range of accurate reconstruction, we develop an anchor-based image generation method. To validate the effectiveness of anchor-based approach, we compare it qualitatively with the method that randomly associates photometric embeddings. As shown in Fig. 8, it is evident that random association of photometric embeddings often leads to inconsistency with the photometric distribution of the current pose, resulting in domain-inconsistent images. Since we first render pinhole images and then map them to 360 images, this process exacerbates the aforementioned photometric inconsistencies, leading to issues such as the formation of dark or bright spots. In contrast, our method is associated with accurate photometric embeddings, generating domain-consistent and globally photometrically consistent images. This demonstrates the effectiveness of our proposed anchor-based image generation method. + +Effectiveness of Fine-Tuning Strategy. We designed an effective fine-tuning strategy to train the image editing model (Brooks et al., 2023) in order to transfer the pre-trained domain to the real domain. To demonstrate the effectiveness of the proposed fine-tuning strategy, we compare it qualitatively with the pre-trained model, as shown in Fig. 9. It is evident that the pre-trained model not only generates images that are inconsistent with the real domain in terms of photometric and color distribution but also suffers from hallucination effects due to the lack of scene prior knowledge. In contrast, our method generates domain-consistent images and reduces hallucination noise by incorporating scene priors. + +![](images/7f4af5f9d3bcd4b33bda9f34ac0f3be564f9645ceaeea1fab121659e9dba5a09.jpg) +Figure 8. Ablation study on anchor-based image generation, we observe that using random embeddings to generate images results in photometric inconsistencies with the current pose, leading to global photometric artifacts such as bright and dark spots. In contrast, our method accurately associates the generated images with precise photometric embeddings, ensuring globally photometrically consistent images. The experimental results validate the effectiveness of the Anchor-Based Image Generation method. + +![](images/d0dbbf92afec5ed4172d1302ec562644280fb1003f7b5204143bebe62143e113.jpg) + +![](images/345a65e98fc284873f2cb4fbbb5ad19bdc36896ee943de7f59e15d7ee62b2295.jpg) + +![](images/73ce2d07f172b358ff14701e2d77a4507651bc147f94cc5c35b7cc9cded93bd9.jpg) + +![](images/799cc651910ed02d588d587ddac18f539a64ddeb24686c01737877cbc671d914.jpg) + +![](images/731ccb631c696fc19f380710726f430478286d59d30dfe3c4a8ac46f78eea953.jpg) +Ground Truth +Figure 9. Ablation study on the fine-tuning strategy, we observe that the pre-trained model not only generates images that are inconsistent with the real domain but also suffers from hallucination effects due to the lack of scene information. In contrast, our fine-tuned model generates domain-consistent images and reduces hallucination noise by incorporating scene prior knowledge. + +![](images/ac0f3d0dd11cf28bbc90d1ec9298716bebdcec45caa8dd274d89e16107549a92.jpg) + +![](images/dfd412ef5057c6c540a17f2102399daf38fc71818da477f2dfee1c27746ad7da.jpg) + +![](images/ddb8657820df0e49689f2bb973b643974688213920d0240957bbf8e0326a7973.jpg) + +![](images/c16b74bd99f8c4fa88bc91da3a068d9973992c2fe44d6feec3c346798ee25869.jpg) + +![](images/da4bc0c7e54235f77a7794c1e1f89fbc1ca10baa3fc4c4822d3fb8e8c535938d.jpg) +Pretrained Model + +![](images/ba50111046e967891a891c813f2fdacd02fed9a104f4f7de59ae3730760c89dd.jpg) + +![](images/8a2e20c21107f19f5abbf9ef14eb57e32fe26af0d0d92482d839e7892c405fd0.jpg) + +![](images/9a44b36833e366c9eea3c9d9bfc9413c7fc84053f67a04efe03c23540b5f03c2.jpg) + +![](images/d29a7daec5e7d79c9c2eedc6c4cea7bb5bd2f6ad9d91ecfb661c0c89bc5f44a7.jpg) + +![](images/e7f9e06c4ea0435c5e811e5df45c46304f72582ea3978b6d41fdbda6362fa307.jpg) +Finetuned Model \ No newline at end of file diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/images.zip b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..4ed9e1c01f458d13c0c83f84540098de16f29e5b --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dadc3463499b86f415e24f5320f2ed0e241ee3e944c2f43f9764905156c10b97 +size 1276031 diff --git a/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/layout.json b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..85d081e882b77a3d9b511c371e72586d92d1eac1 --- /dev/null +++ b/ICML/2025/Enhancing Visual Localization with Cross-Domain Image Generation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f9127d680db99f58b0696edb87a2f6b2f370103a6c75fb64cbda48798f80168 +size 455796 diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_content_list.json b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9ac2e6f2a3a85f8e7d5c23d95e1c764dcfdc8016 --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e5fc4a0d2e3a7b1ef8ae2b0c3f6a2bfc1ef34c5c8b216cd1ef6f340381b4a9c +size 154640 diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_model.json b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b0e4d734b555b5fae15922bf33009a6e634df457 --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc32474295baa2acecf73eb964eec1d5efc1bacd5c22595a603901cd053e3d22 +size 183889 diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_origin.pdf b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8c6fc49dbeb32cd1b0f6c3ebd7e0adcbb2391030 --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/96356db8-3c09-4cca-9dc0-8f9fd2180238_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e2a8c7ccd6248a38cad6ca0ae558f69653a0325fdc79aa90b3d1865dc9aff05 +size 3030410 diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/full.md b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5de573122310262889ea5c98ad8ab58d61c986b1 --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/full.md @@ -0,0 +1,688 @@ +# Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks + +Jincheng Huang1 Yujie Mo1 Xiaoshuang Shi1,2 Lei Feng3 Xiaofeng Zhu1,4 + +# Abstract + +The message-passing mechanism of graph convolutional networks (i.e., GCNs) enables label information to reach more unlabeled neighbors, thereby increasing the utilization of labels. However, the additional label information does not always contribute positively to the GCN. To address this issue, we propose a new two-step framework called ELU-GCN. In the first stage, ELU-GCN conducts graph learning to learn a new graph structure (i.e., ELU-graph), which allows the additional label information to positively influence the predictions of GCN. In the second stage, we design a new graph contrastive learning on the GCN framework for representation learning by exploring the consistency and mutually exclusive information between the learned ELU graph and the original graph. Moreover, we theoretically demonstrate that the proposed method can ensure the generalization ability of GCNs. Extensive experiments validate the superiority of our method. + +# 1. Introduction + +Graph Convolutional Networks (GCNs) (Kipf & Welling, 2017; Gasteiger et al., 2018; Huang et al., 2023a; Xu et al., 2018; Hamilton et al., 2017) have demonstrated remarkable capabilities, primarily due to their ability to propagate label information. This capability has driven their widespread applications in semi-supervised learning. To do this, GCN propagates the representations of unlabeled neighbors to labeled nodes by the message passing mechanism, thereby enabling label information to supervise not only the labeled nodes but also their unlabeled neighbors (Ji et al., 2023; + +$^{1}$ School of Computer Science and Engineering, University of Electronic Science and Technology of China, Chengdu, China $^{2}$ Sichuan Artificial Intelligence Research Institute, Yibin, 644000, China $^{3}$ School of Computer Science and Engineering, Southeast University, Nanjing, China $^{4}$ Hainan University, Haikou, China. Correspondence to: Xiaofeng Zhu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Dong et al., 2021). Consequently, the framework of optimizing label utilization in GCNs (LU-GCN) has become an increasingly prominent research topic (Wang et al., 2021; Yue et al., 2022; Huang et al., 2024; Yu et al., 2022). + +Previous LU-GCN can be partitioned into three categories, i.e., self-training methods, combination methods, and graph learning methods. self-training methods (Dong et al., 2021; Li et al., 2018; Sun et al., 2020; Ji et al., 2023) select unlabeled nodes with the highest classification probability by GCN as training data with pseudo-labels, thus adding the number of labels to improve the GCN. Combination methods (Wang et al., 2021; Yue et al., 2022; Shi et al., 2021) regard the labels as the augmented features so that labels can be used for both representation learning and classification tasks. The feature propagation mechanism allows GCNs to use labels to supervise the representation of both the node itself (i.e., traditional label utilization) and its unlabeled neighbors (i.e., neighboring label utilization). However, the two LU-GCN methods mentioned above primarily focus on optimizing traditional label utilization, neglecting the critical importance of neighboring label utilization in semi-supervised scenarios. Yet, due to noise in the original graph structure, GCNs often struggle to utilize the neighboring labels effectively. To address this issue, recent graph learning methods (Zheng et al., 2020; Luo et al., 2021; Liu et al., 2022) are designed to improve the relationship of every node and its neighbors by updating the graph structure, and thus may potentially improve the neighboring label utilization. For example, Bi et al. (2022) adopt the own and neighbors' label similarity to rewire the graph, which can make features propagate on the same category nodes as possible. + +Although existing graph learning methods have achieved promising performance, there are still some limitations that need to be addressed. First, previous methods have used heuristic approaches to learn the graph structure, they have not explored what kind of graph structures can make GCNs effectively propagate the labeled nodes' information to unlabeled nodes. As a result, on the learned graph structure, the label information propagated via message passing may not always contribute positively to the predictions of GCNs. Second, existing graph learning methods fail to explore both the consistency information and the mutually exclusive information between the new graph and the original graph, + +where they have consistent information (i.e., consistency (Xu et al., 2024)), which helps recognize the node effectively, and every graph contains unique and useful information different from another graph, i.e., mutually exclusive information (Wang et al., 2017). + +Based on the above observations, a possible solution to improving the effectiveness of GCNs is to define a graph structure that can maximize label utilization during the message-passing process and efficiently combine the original graph. To achieve this, two crucial challenges must be solved, i.e., (i) it is difficult to evaluate whether a graph structure enables GCN to use labels effectively. (ii) it is necessary to mine the consistency and mutually exclusive information between the original graph and the new graph. + +In this paper, to address the above issues, different from previous structure improvement methods, we investigate a new framework, i.e., Effectively Label-Utilizing GCN (ELUGCN for brevity), to conduct effective GCN. To achieve this, we first analyze the influence of each class provided by labeled nodes on every unlabeled node. We then optimize the graph structure (i.e., the ELU-graph) by encouraging the label information propagated through the graph to have a positive impact on GCN's prediction results. This ensures that the GCN with the ELU-graph can effectively utilize the label information, thereby addressing challenge (i). Moreover, we address challenge (ii) by designing contrasting constraints to bring the consistent information between two graph views (i.e., the original graph and the ELU-graph) closer and push the mutually exclusive information further apart. Finally, we theoretically analyze that the proposed ELU-graph can ensure GCN effectively utilizes labels and improve the generalization ability of the model. Compared with previous methods, our main contributions can be summarized as follows: + +- To the best of our knowledge, this is the first work to investigate the limitation of GCNs in effectively utilizing label information under the graph-based learning paradigm. Moreover, we introduce a quantitative framework to analyze which unlabeled nodes struggle to benefit from label supervision by neighborhood. +- We propose an adaptive and parameter-free construction of the ELU-graph to enhance GCNs' ability to utilize label information, particularly for unlabeled nodes. Furthermore, we design a contrastive loss to exploit both the consistency and complementary differences between the ELU-graph and the original graph. +- We theoretically prove that the ELU-graph construction provides generalization guarantees for GCNs. Empirical results on diverse benchmark datasets further validate the superior performance of our method over competitive baselines. + +# 2. Related Works + +This section briefly reviews the topics related to this work, including GCNs and LPA as well as graph structure learning. + +# 2.1. GCNs and LPA + +GCNs are the most popular and commonly used model in the field of graph deep learning. Early work attempted to apply the successful convolutional neural network (CNN) to graph structures. For example, CheybNet (Defferrard et al., 2016) first proposes to transform the graph signal from the spatial domain to the spectral domain through the discrete Fourier transform, and then use polynomials to fit the filter shape (i.e., convolution). CheybNet laid the foundation for the development of spectral-domain graph neural networks. The popular GCN was proposed by Kipf et al. (Kipf & Welling, 2017), which is a simplified version of CheybNet and has demonstrated strong efficiency and effectiveness, thereby promoting the development of the graph deep learning field. + +Recently, some works have focused on the combination of LPA and GCN. This is because LPA can characterize the distribution of labels spread on the graph, which can help GCN obtain more category information. Existing combined LPA and GCN methods can be classified into two categories, i.e., pseudo label methods and masked label methods. Pseudo-label methods let the output of LPA serve as the pseudo-labels to guide the representation learning. For example, PTA (Dong et al., 2021) first propagates the known labels along the graph to generate pseudo-labels for the unlabeled nodes, and second, trains normal neural network classifiers on the augmented pseudo-labeled data. GPL (Wu et al., 2024) uses the output of LPA to preserve the edges between nodes of the same class, thereby reducing the intraclass distance. The masked label methods employ LPA as regularization to assist the GCN update parameters or structures. For example, UniMP (Shi et al., 2021) makes some percentage of input label information masked at random, and then predicts it for updating parameters. GCN-LPA (Wang & Leskovec, 2021) also randomly masked a part of the labels and utilized the remaining label nodes to predict them in learning proper edge weights within labeled nodes. Although the above methods achieve excellent results on various tasks, they all overlook whether the additional label information propagated through message passing is effectively utilized by GCNs to improve unlabeled nodes. + +# 2.2. Graph Structure Learning + +Graph structure learning is an important technology in the graph field. It can improve the graph structure and infer new relationships between samples, thereby promoting the development of graph representation learning or other fields. + +Existing Graph structure learning methods can be classified into three categories, i.e., traditional unsupervised graph structure learning methods, supervised graph structure learning methods, and graph rewiring methods. + +Traditional unsupervised graph structure learning methods aim to directly learn a graph structure from a set of data points in an unsupervised manner. Early works (Wang & Zhang, 2006; Daitch et al., 2009) exploit the neighborhood information of each data point for graph construction by assuming that each data point can be optimally reconstructed using a linear combination of its neighbors (i.e., $\min_A\| \mathbf{AX} - \mathbf{X}\| _F^2$ ). Similarly, (Daitch et al., 2009) introduce the weight (i.e., $\min \sum_{i}\left\| \mathbf{D}_{i,i}\mathbf{X}_i - \sum_j\mathbf{A}_{i,j}\mathbf{X}_j\right\| ^2$ ). Smoothness (Jiang et al., 2019) is another widely adopted assumption on natural graph signals; the smoothness of the graph signals is usually measured by the Dirichlet energy (i.e., $\min_{\mathbf{A}}\frac{1}{2}\sum_{i,j}\mathbf{A}_{i,j}\left\| \mathbf{X}_i - \mathbf{X}_j\right\|^2$ and $\min_{\mathbf{L}}\mathrm{tr}\left(\mathbf{X}^\top \mathbf{L}\mathbf{X}\right)$ ). The above objective has inspired many advanced graph structure learning methods. + +Supervised graph structure learning methods aim to use the downstream task to supervise the structure learning, which can learn a suitable structure for the downstream task. For example, NeuralSparse (Zheng et al., 2020) and PTDNet (Luo et al., 2021) directly use the adjacency matrix of the graph as a parameter and update the adjacency matrix through the downstream task. SA-SGC (Huang et al., 2023b) learns a binary classifier by distinguishing the edges connecting nodes with the same label and the edges connecting nodes with different labels in the training set, thereby deleting the edges between nodes belonging to different categories in the test set. BAGCN (Zhang et al., 2024) uses metric learning to obtain new graph structures and learns suitable metric spaces through downstream tasks. + +The goal of graph rewiring methods is to prevent the oversquashing (Alon & Yahav, 2021) problem. For example, FA (Alon & Yahav, 2021) proposed to use a fully connected graph as the last layer of GCN to overcome over-squashing. SDRF (Topping et al., 2022), SJLR (Giraldo et al., 2023), and BORF (Nguyen et al., 2023) aim to enhance the curvature of the neighborhood by rewiring connecting edges with small curvature. They increase local connectivity in the graph topology, indirectly expanding the influence range of labels. Despite their success, existing graph structure learning methods fail to guarantee that the learned structures enable GNNs to propagate label information to unlabeled nodes effectively. + +# 3. Method + +Notations. Given a graph $\mathcal{G} = (V, E, \mathbf{X}, \mathbf{Y})$ , where $V$ is the node set and $E$ is the edge set. Original node represent + +tation is denoted by the feature matrix $\mathbf{X} \in \mathbb{R}^{n \times d}$ where $n$ is the number of nodes and $d$ is the number of features for each node. The label matrix is denoted by $\mathbf{Y} \in \mathbb{R}^{n \times c}$ with a total of $c$ classes. The first $m$ points $\mathbf{x}_i (i \leq m)$ are labeled as $\mathbf{Y}_l$ , and the remaining $u$ points $\mathbf{x}_i (m + 1 \leq i \leq n)$ are unlabeled. The sparse matrix $\mathbf{A} \in \mathbb{R}^{n \times n}$ is the adjacency matrix of $\mathcal{G}$ . Let $\mathbf{D} = \mathrm{diag}(d_1, d_2, \dots, d_n)$ be the degree matrix, where $d_i = \sum_{j \in \mathcal{N}_i} a_{ij}$ is the degree of node $i$ , the symmetric normalized adjacency matrix is represented as $\widetilde{\mathbf{A}} = \widetilde{\mathbf{D}}^{-\frac{1}{2}} \widetilde{\mathbf{A}} \widetilde{\mathbf{D}}^{-\frac{1}{2}}$ where $\widetilde{\mathbf{A}} = \mathbf{A} + \mathbf{I}$ , $\mathbf{I}$ is the identity matrix and $\widetilde{\mathbf{D}}$ is the degree matrix of $\widetilde{\mathbf{A}}$ . + +# 3.1. Motivation + +Given a classification function $f: \mathbf{X} \to \mathbb{R}^{n \times c}$ , the cross entropy losses of Deep Neural Network (DNN) and GCN are formulated by: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {D N N}} = \operatorname {C E} \left(f _ {\theta} (\mathbf {X}), \mathbf {Y}\right) = - \sum_ {i \in V _ {l}, k \in C} y _ {i k} (\log f _ {i k}) \\ \mathcal {L} _ {\mathrm {G C N}} = \operatorname {C E} \left(\widehat {\mathbf {A}} f _ {\theta} (\mathbf {X}), \mathbf {Y}\right) = - \sum_ {i \in V _ {l}, k \in C} y _ {i k} (\log \sum_ {j \in \mathcal {N} _ {i}} \widehat {a} _ {i j} f _ {j k}), \end{array} \tag {1} +$$ + +where $\theta$ is the parameters of the function $f$ . In Eq. (1), the cross entropy loss of DNN is a one-to-one mapping between the feature space and the label space because every label $y_{i}$ ( $l = 1, \dots, n$ ) is only used to supervise the representation learning of one node $v_{i}$ . The mapping $f$ efficiently captures the pattern and distribution of labeled nodes, but it overlooks unlabeled nodes so that the generalization ability of unlabeled nodes is limited. In contrast, the cross entropy loss of the GCN is a one-to-many mapping because its message-passing mechanism can propagate the information from labeled nodes to their neighbors including labeled nodes and unlabeled nodes. As a result, every label $y_{i}$ is used to supervise the representation learning of both labeled nodes and unlabeled nodes, as shown in the second row of Eq. (1). Hence, unlabeled nodes in the GCN are able to use the label information of labeled nodes to improve the learning of their representations. Obviously, it is critical to ensure that the label information propagated to unlabeled nodes makes a positive contribution to GCN. However, to the best of our knowledge, this issue has not yet received sufficient attention. A related work, GCN-LPA (Wang & Leskovec, 2021), investigates the influence of labeled nodes; however, it primarily focuses on reinforcing mutual influence among labeled nodes, while overlooking their impact on unlabeled nodes. To address this issue, we first quantify how much influence each class, through its labeled nodes, has on the unlabeled nodes. + +The recent study in (Xu et al., 2018) reveals that nodes follow the way of random walks to affect other nodes on the graph. Therefore, in this paper, we extend it to obtain the influence of every class of labeled nodes on the unlabeled node by Proposition 3.1, whose proof is provided in Appendix B.1. + +![](images/ef36bc24c95a676070eb0aee3969795f2eaf0a3e382da1fa0ca212868f47f79a.jpg) +Figure 1. An illustration of effective label utilization. Sub-figure (a) wants to assign the label information to node $a$ (gray node) by one unlabeled node (gray node) and two labeled nodes with different classes, i.e., one blue node and one orange node. Moreover, the LPA algorithm is employed to obtain the probability of each labeled node to the node $a$ , where the blue node has more influence (or higher probability) than the orange node based on the histogram in the upper right of the sub-figure (a). If the GCN predicts the node $a$ as the orange color (as shown in sub-figure (b)), which is inconsistent with the class with most label information (i.e., blue). It indicates that the label information provided by the message passing of the GCN does not help classify the node $a$ , and may even hinder its correct classification. On the contrary, if GCN predicts the node $a$ as the blue color, i.e., sub-figure (c), it implies that the label information provided by the message passing of the GCN helps to classify the node $a$ . + +Proposition 3.1. Given an unlabeled node $v_{i}$ ( $i = 1, \dots, n$ ), for an arbitrary category $C_l$ ( $l = 1, \dots, c$ ), the influence of labeled nodes belong to $C_l$ on the $i$ -th node $v_{i}$ is proportional to the probability that node $v_{i}$ is classified as $C_l$ by the Label Propagation Algorithm (LPA) in (Zhu, 2005), in the GCN framework. + +Based on Proposition 3.1, LPA can be used to estimate the class-wise probability for unlabeled nodes in the GCN framework. The class with the highest probability is regarded as the most influential, as it contributes the most label information to the node. If this most influential class matches the GCN prediction, it indicates that the label information provided through message passing positively influences the GCN's classification for that node. In this way, the GCN is regarded as having effectively utilized the label information on this node. We provide a case study to illustrate this in Figure 1 and give a formal definition as follows. + +Definition 3.2. (Effective label-utilization) The GCN effectively utilizes label information if the prediction of the GCN is consistent with the output of LPA. This condition is defined at the node level: + +$$ +V _ {\mathrm {E L U}} = \{V | \operatorname {L P A} (\mathcal {G}) = \operatorname {G C N} (\mathcal {G}) \}, \tag {2} +$$ + +where $V_{\mathrm{ELU}}$ and $V_{\mathrm{NELU}}$ (i.e., $V_{\mathrm{NELU}} = \{V|\mathrm{LPA}(\mathcal{G})\neq \mathrm{GCN}(\mathcal{G})\}$ ), respectively, represent the sets of nodes on which the GCN effectively and ineffectively utilizes label information, respectively. + +In real applications, not all unlabeled nodes in GCN frameworks may effectively utilize the label information due to all kinds of reasons, including noise and the distribution of + +labeled nodes in the graph. Figure 2 shows that not all unlabeled nodes effectively use label information in the GCN framework (i.e., Figure 2 (a)) and the classification accuracy of $V_{\mathrm{NELU}}$ is lower than that of $V_{\mathrm{ELU}}$ in the same datasets (i.e., Figure 2 (b)). Obviously, NELU nodes influence the effectiveness of the GCN. To address this issue, first, it is crucial to make unlabeled nodes effectively utilize label information. Since label information is propagated through the graph structure. As a result, the graph structure will be updated. Second, the original graph structures often contain noise to influence the message-passing mechanism. Hence, graph learning is obviously a feasible solution. + +# 3.2. ELU Graph + +Previous graph learning methods generally use either heuristic methods or downstream tasks to conduct graph learning, i.e., updating the graph structure. For example, Pro-GNN (Jin et al., 2020) updates the graph structure through a heuristic approach to constrain the sparsity and smoothness of the graph. PTD-Net (Luo et al., 2021) updates the graph structure by the downstream task, such as the node classification task. However, heuristic methods rely on predefined rules, making it difficult for unlabeled nodes to fully access label-related global information. Downstream task methods focus too much on the performance of labeled nodes, neglecting the role of unlabeled nodes in the graph structure. Therefore, these methods fail to guarantee that the GCN effectively leverages label information for unlabeled nodes. To solve this issue, based on Definition 3.2, we investigate new graph learning methods that ensure unlabeled nodes effectively utilize label information. + +![](images/70cf411581de61fa1a86cda4400372b4bced159c41d5addf158d2b83a0eea2af.jpg) +(a) Proportion + +![](images/4bf203c90d6d061154ba3dfef06094e57612f1f95175a64b86f11e2211b18aac.jpg) +(b) Accuracy +Figure 2. Visualization of both ELU nodes and NELU nodes in three real datasets, i.e., Cora, Citerseer, and Pubmed. (a) every dataset contains NELU nodes and (b) the classification comparison between ELU nodes and NELU nodes, where ELU nodes have higher classification ability than NELU nodes. + +Specifically, denoting the adjacency matrix $\mathbf{S}$ as the ELU graph can ensure the GCN effectively uses the label information. We use Proposition 3.1 to measure the influence of each class on every unlabeled node by the LPA: + +$$ +\mathbf {Q} = \mathbf {S Y}, \tag {3} +$$ + +where the $i$ -th row of $\mathbf{Q} \in \mathbb{R}^{n \times c}$ (i.e., $\mathbf{Q}_{i,:}$ ) represents the influence of each class on node $i$ . It is noteworthy that $\mathbf{S}$ in Eq. (3) can be the $k$ -order of the graph structure. After that, the prediction of GCN with ELU graph can be written as follows (Yang et al., 2023): + +$$ +\hat {\mathbf {Y}} = \mathbf {S} \mathbf {H}, \quad s. t. \mathbf {H} = \operatorname {M L P} (\mathbf {X}), \tag {4} +$$ + +where $\mathrm{MLP}(\cdot)$ denotes a Multi-Layer Perceptron. Note that the MLP is pre-trained. Therefore, based on Definition 3.2, the ELU graph (i.e., S) can be obtained by minimizing the following objective function: + +$$ +\min \left\| \mathbf {Q} - \hat {\mathbf {Y}} \right\| _ {F} ^ {2} = \min _ {\mathbf {S}} \| \mathbf {S Y} - \mathbf {S H} \| _ {F} ^ {2}. \tag {5} +$$ + +In Eq. (5), the prediction of GCN and the influence of each class are encouraged to be consistent for every node. This item can make all nodes satisfy $\mathrm{LPA}(\mathcal{G}) = \mathrm{GCN}(\mathcal{G})$ in Eq. (2), i.e., this objective function can ensure all nodes can effectively utilize label information by GCN. Therefore, + +we can obtain the S through the optimization algorithm by minimizing the Eq. (5). However, there are some problems with the above objective function. First, it is impractical to solve the above problem directly, as it has a trivial solution: $s_{i,j} = 0, \forall i, \forall j$ . Second, LPA generates the prediction for every labeled node to possibly revise the original labels, i.e., the ground truth, adding noisy labels for representation learning. To overcome the above issues, We propose to iteratively update in two steps, i.e., update labels by LPA and update the graph structure S. + +In the first step, we calculate the result of LPA $\mathbf{Q}^{(i)}$ , i.e., $\mathbf{Q}^{(i)} = \mathbf{S}^{(i - 1)}\mathbf{Q}^{(i - 1)}$ , $(i = 1,\dots ,k)$ , where $\mathbf{Q}^{(0)} = \mathbf{Y}$ . As a result, Eq.(5) is changed as follows: + +$$ +\min _ {\mathbf {S}} \left\| \mathbf {Q} ^ {(i)} - \mathbf {S H} \right\| _ {F} ^ {2} + \beta \sum_ {i, j = 1} s _ {i, j} ^ {2}, s. t. \quad \mathbf {Q} _ {l} ^ {(i)} = \mathbf {Y} _ {l}, \tag {6} +$$ + +where $\beta$ is a non-negative parameter to trade off two terms, the second term can make the subsequent matrix inversion more stable. Eq. (6) holds the closed-form solution to address the first issue. The constraint term "s.t. $\mathbf{Q}_l^{(i)} = \mathbf{Y}_l$ " term solves the second issue. + +In the second step, we can obtain its closed-form solution as follows: + +$$ +\begin{array}{l} \mathcal {L} = \left\| \mathbf {Q} ^ {(i)} - \mathbf {S H} \right\| _ {F} ^ {2} + \beta \sum_ {i, j = 1} s _ {i, j} ^ {2} \tag {7} \\ = T r \left(\left(\mathbf {Q} ^ {(i)} - \mathbf {S H}\right) ^ {T} \left(\mathbf {Q} ^ {(i)} - \mathbf {S H}\right)\right) + 2 \beta \mathbf {S} \\ \end{array} +$$ + +where $Tr(\cdot)$ indicates the trace of matrix. Then we have + +$$ +\frac {\partial \mathcal {L}}{\partial \mathbf {S}} = - 2 \mathbf {Q} ^ {(i)} \mathbf {H} ^ {T} + 2 \mathbf {S} \mathbf {H} \mathbf {H} ^ {T} + 2 \beta \mathbf {S} \tag {8} +$$ + +Let Eq. (8) equal to 0, we can obtain the closed-form solution $\mathbf{S}^{(i)}$ i.e., + +$$ +\mathbf {S} ^ {(i)} = \mathbf {Q} ^ {(i)} \mathbf {H} ^ {T} \left(\mathbf {H} \mathbf {H} ^ {T} + \beta \mathbf {I} _ {N}\right) ^ {- 1}. \tag {9} +$$ + +where $\mathbf{I}_N\in \mathbb{R}^{n\times n}$ is the identity matrix. + +Finally, we iteratively optimize Eq. (9) and $\mathbf{Q}^{(i)} = \mathbf{S}^{(i - 1)}\mathbf{Q}^{(i - 1)}$ to obtain the ELU graph $\mathbf{S}^*$ . + +However, the calculation of $\mathbf{S}^{(i)}$ in Eq. (9) is with the time complexity of $\mathcal{O}(n^3)$ . In this paper, we use the Woodbury identity (Woodbury, 1950) to avoid calculating $\mathbf{S}^{(i)}$ during the iteration process by $\mathbf{Q}^{(i)} = \mathbf{S}^{(i - 1)}\mathbf{Q}^{(i - 1)}$ , i.e., + +$$ +\mathbf {Q} ^ {(i)} = +$$ + +$$ +\mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {I} _ {N} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right) \mathbf {Q} ^ {(i - 1)}, +$$ + +$$ +s. t. \mathbf {Q} _ {l} ^ {(i)} = \mathbf {Y} _ {l}, \tag {10} +$$ + +where $\mathbf{I}_c\in \mathbb{R}^{c\times c}$ is the identity matrix and the specific derivation process is listed in the Appendix B.3. Based on the literature (Woodbury, 1950), we can obtain the time complexity of Eq. (10) is $\mathcal{O}(nc^2 +c^3)$ , where $c^3\ll n$ . The details are provided in Appendix A.1. + +Based on Eq. (10), we obtain $\mathbf{Q}^{(i)}$ $(i = 1,\dots ,k)$ from $\mathbf{Q}^{(i - 1)}$ . After obtaining $\mathbf{Q}^{(k)}$ , we obtain the ELU graph $\mathbf{S}^*$ by calculating Eq. (9) only one time. To achieve efficiency, we employ the Woodbury identity to reduce the time complexity of calculating from cubic to quadratic, i.e., + +$$ +\mathbf {S} ^ {*} = \mathbf {Q} ^ {(k)} \left(\frac {1}{\beta} \mathbf {H} ^ {T} - \frac {1}{\beta^ {2}} \mathbf {H} ^ {T} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right). \tag {11} +$$ + +The details of Eq. (11) are listed in Section A.2. The pseudocode of calculating Eq. (10) and $\mathbf{S}^*$ is presented in Algorithm 1. In the implementation, we make $\mathbf{S}^*$ sparse by assigning its element less than a threshold as zero, for achieving efficiency. We also use the pseudo labels of ELU nodes to expand the initial $\mathbf{Y}$ , for avoiding the issue of limited labels in semi-supervised learning. + +# Algorithm 1 Pseudo code of calculating $\mathbf{S}^*$ + +Input: Feature matrix $\mathbf{X}$ , label matrix $\mathbf{Y}$ , normalized adjacency matrix $\hat{\mathbf{A}}$ , and index of ELU nodes $V_{\mathrm{ELU}}$ ; + +Output: ELU graph $\mathbf{S}^{*}$ + +1: $\mathbf{H} = MLP(\mathbf{X})$ +2: Expand initial labels by pseudo labels of ELU nodes; +3: for $\mathrm{i} \gets 1,2,\cdots ,k\mathbf{d}\mathbf{o}$ +4: Calculate $\mathbf{Q}^{(i)}$ by Eq. (10); +5: $\mathbf{Q}_l^{(i)} = \mathbf{Y}_l$ in Eq. (10); +6: end for +7: Calculate $\mathbf{S}^*$ Eq. (11); +8: Return $\mathbf{S}^*$ . + +# 3.3. Contrastive Constraint + +Given the ELU graph $\mathbf{S}^*$ and the original graph $\widehat{\mathbf{A}}$ , previous graph learning methods often conduct a weighted fusion. For instance, SimP-GCN (Jin et al., 2021) employs a hyperparameter as a weight to fuse the node representation from the original graph with those from the feature similarity graph. However, only performing the weighted sum method may result in incorporating undesirable information from the original graph into the ELU graph. For example, the representation of a NELU node from the original graph might interfere with the learned representation of the corresponding node in the ELU graph. To solve this issue, in this paper, we propose a new contrastive learning paradigm to capture the consistency and mutually exclusive information between these two graphs. + +In the ELU graph $\mathbf{S}^*$ , all nodes are theoretically ELU nodes. However, the original graph $\hat{\mathbf{A}}$ includes ELU nodes and + +NELU nodes. Obviously, in representation learning, the representations of ELU nodes in both $\mathbf{S}^*$ and $\widehat{\mathbf{A}}$ should be consistent for keeping common information related to the class, the representations of NELU nodes in $\widehat{\mathbf{A}}$ should be different from their representation in $\mathbf{S}^*$ . + +To do this, we first propose to learn a projection head $p_{\theta}$ to map both the ELU graph representations and the original graph representations into the same latent space, i.e., $\overline{\mathbf{P}} = p_{\theta}(\overline{\mathbf{H}})$ and $\widetilde{\mathbf{P}} = p_{\theta}(\widetilde{\mathbf{H}})$ , where $\overline{\mathbf{H}}$ is the representation of the output layer of the GCN dominated by the original graph, and $\widetilde{\mathbf{H}}$ is the representation of the output layer of the GCN dominated by the ELU graph, the output of the model is $\widehat{\mathbf{Y}} = \mathrm{Softmax}((1 - \eta)\overline{\mathbf{H}} + \eta \widetilde{\mathbf{H}})$ , where $\eta$ is a hyperparameter. We then design a contrastive loss as follows: + +$$ +\mathcal {L} _ {\mathrm {c o n}} = - \log \frac {\mathrm {P o s}}{\mathrm {P o s} + \mathrm {N e g}} - \frac {1}{n} \sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {c} \hat {y} _ {i, j} \log \hat {y} _ {i, j} +$$ + +$$ +s. t. \left\{ \begin{array}{l} \operatorname {P o s} = \frac {1}{| V _ {\mathrm {E L U}} |} \sum_ {i = 0} ^ {V _ {\mathrm {E L U}}} \exp \left(d \left(\overline {{\mathbf {P}}} _ {i}, \widetilde {\mathbf {P}} _ {i}\right) / \tau\right) \\ \operatorname {N e g} = \frac {1}{| V _ {\mathrm {N E L U}} |} \sum_ {j = 0} ^ {V _ {\mathrm {N E L U}}} \exp \left(d \left(\overline {{\mathbf {P}}} _ {j}, \widetilde {\mathbf {P}} _ {j}\right) / \tau\right) \end{array} \right. \tag {12} +$$ + +where $d(\cdot)$ is the distance function, $\tau$ denotes the temperature parameter, and $\hat{y}_{i,j}$ is the element in row $i$ and column $j$ in $\widehat{\mathbf{Y}}$ . + +In Eq. (12), the first term encourages minimizing the distance between every ELU node in the ELU graph and its corresponding node in the original graph, while maximizing the distance between every NELU node in the original graph and its corresponding node in the ELU graph. The second term encourages the decision boundary to be positioned in low-density regions, enhancing the distinction between nodes and ensuring the underlying assumption of semi-supervised learning (Berthelot et al., 2019). As a result, Eq. (12) is available to extract the consistency and mutually exclusive information between the representations dominated by the ELU graph and the original graph. + +Finally, the final objective function of our proposed method is obtained by integrating the contrastive loss with the supervised loss (i.e., cross entropy) as follows: + +$$ +\mathcal {L} = C E (\widehat {\mathbf {Y}}, \mathbf {Y}) + \lambda \mathcal {L} _ {c o n} \tag {13} +$$ + +where $\lambda \in [0,1]$ is a hyperparameter to fuse the predicted results of two views and two objective functions. + +# 3.4. Theoretical Analysis + +The ELU graph has been shown to enable the GCN to effectively utilize label information, as demonstrated in Section 3.1. In this section, we theoretically analyze that the generalization ability of the GCN is related to the graph structure and the training labels by Theorem 3.3 (The proof can be found in Appendix B.4): + +Theorem 3.3. Given a graph $\mathcal{G}$ with its adjacency matrix $\mathbf{A}$ , the label matrix in the training set $\mathbf{Y}$ and the label matrix of the ground truth $\mathbf{Y}_{\mathrm{true}}$ , for any unlabeled nodes, if a graph structure makes the labels in training set be consistent to the ground truth, i.e., $\mathbf{Y}_{\mathrm{true}} = \mathbf{A}\mathbf{Y}$ , then the upper bound of the generalization ability of the GCN is optimal. + +Based on Theorem 3.3, the graph structure $\mathbf{A}$ maximizes the generalization ability of the GCN if the following equation holds, i.e., $\min_{\mathbf{A}}\| \mathbf{A}\mathbf{Y} - \mathbf{Y}_{\mathrm{true}}\| _F^2$ . Therefore, the graph structure can be used to measure if it is suitable for GCN. However, the true labels $\mathbf{Y}_{\mathrm{true}}$ are fixed and unknown. Moreover, the original graph is also fixed so that it is difficult to achieve $\min_{\mathbf{A}}\| \mathbf{A}\mathbf{Y} - \mathbf{Y}_{\mathrm{true}}\| _F^2$ . Hence, the original graph should be updated. We then present the following theorem. The proof is listed in Appendix B.5. + +Theorem 3.4. The optimization Eq. (5) is equivalent to an approximate optimization of $\min_{\mathbf{A}}\| \mathbf{A}\mathbf{Y} - \mathbf{Y}_{\mathrm{true}}\| _F^2$ + +Theorem 3.4 indicates that the ELU graph can ensure the generalization ability of the GCN. + +# 4. Experiments + +In this section, we conduct experiments on eleven public datasets to evaluate the proposed method (including citation networks, Amazon networks, social networks, and web page networks), compared to structure improvement methods1. Detailed settings are shown in Appendix E. Additional experimental results are shown in Appendix F. + +# 4.1. Experimental Setup + +# 4.1.1. DATASETS + +The used datasets include three benchmark citation datasets (Sen et al., 2008) (i.e., Cora, Citeseer, and Pubmed), two co-purchase networks (Shchur et al., 2018) (i.e., Computers and Photo), two web page networks (Pei et al., 2020) (i.e., Chameleon and Squirrel), which are heterophilic graph data), and four social network datasets (Traud et al., 2012) (i.e., Caltech, UF, Hamilton, and Tulane). + +# 4.1.2. COMPARISON METHODS + +The comparison methods include three traditional GNN methods, two advanced GNN methods, and seven structure improvement-based GCN methods. Traditional GNN methods include GCN (Kipf & Welling, 2017), GAT (Velickovic et al., 2018), and APPNP (Gasteiger et al., 2018). The advanced GNN methods include GPRGNN (Chien et al., 2021) and PCNet (Li et al., 2024). The structure improvement-based GCN methods include GCN-LPA (Wang & Leskovec, + +2021), NeuralSparse-GCN (Zheng et al., 2020), PTDNet-GCN (Luo et al., 2021), CoGSL (Liu et al., 2022), NodeFormer (Wu et al., 2022), GSR (Zhao et al., 2023) and BAGCN (Zhang et al., 2024). + +# 4.1.3. EVALUATION PROTOCOL + +To evaluate the effectiveness of the proposed method, we follow the commonly used setting. Specifically, for the citation network (i.e., Cora, Citeseer, and Pubmed), we use the public split recommended by (Kipf & Welling, 2017) with fixed 20 nodes per class for training, 500 nodes for validation, and 1000 nodes for testing. For Social networks (i.e., Caltech, UF, Hamilton, and Tulane), we randomly generate different data splits with an average train/val/test split ratio of $60\% / 20\% / 20\%$ . For the Webpage network (i.e., Chameleon, Squirrel) and co-purchase networks (i.e., Computers, Photo), we use the public splits recommended in the original papers. + +# 4.2. Effectiveness Analysis + +We first evaluate the effectiveness of the proposed method by reporting the results of node classification in Table 1 and Appendix F, respectively. Obviously, the proposed method obtains better performance on seven datasets than comparison methods. + +First, compared with traditional GNN methods and advanced GNN methods, the proposed ELU-GCN outperforms them by large margins on most datasets. For example, the proposed ELU-GCN on average improves by $4.05\%$ compared to GCN, and improves by $3.26\%$ compared to the best advanced GCN method (i.e., PCNet), on all datasets. This demonstrates the superiority of graph structure learning methods, as the label information cannot be effectively utilized for many nodes in the original graph. + +Second, compared to the improvement methods, the proposed ELU-GCN achieves the best results, followed by GSR, GCN-LPA, CoGSL, PTDNet-GCN, NeuralSparse-GCN, and NodeFormer. For example, our method on average improves by $2.21\%$ compared to the best comparison method GSR on all seven datasets. This can be attributed to the fact that the proposed ELU-GCN, which can obtain a graph structure (i.e., the ELU graph) that is more suitable for the GCN model to effectively utilize the label information and efficiently mine the consistency and mutually exclusive information between the original graph and the newly obtained graph. In addition, the Webpage networks (i.e., Chameleon and Squirrel) are heterophilic graphs. As mentioned in the theoretical analysis section, the original graph is difficult to guarantee the generalization ability of GCN, especially for heterophilic graphs. Experimental results show that the proposed ELU-GCN outperforms the GCN using the original heterophilic graph by an average of $9.5\%$ , confirming the results of our theoretical analysis. + +Table 1. Performance on node classification task. The highest results are highlighted in bold. "OOM" denotes out of memory. + +
MethodCoraCiteseerpubmedComputersPhotoChameleonsquirrel
GCN81.61±0.4270.35±0.4579.01±0.6281.62±2.4390.44±1.2360.82±2.2443.43±2.18
GAT83.03±0.7171.54±1.1279.17±0.3878.01±19.185.71±20.340.72±1.5530.26±2.50
APPNP83.33±0.6271.80±0.8480.10±0.2182.12±3.1388.63±3.7356.36±1.5346.53±2.18
GPRGNN80.55±1.0568.57±1.2277.02±2.5981.71±2.8491.23±2.5946.85±1.7131.61±1.24
PCNet82.81±0.5069.92±0.7080.01±0.8881.82±2.3189.63±2.4159.74±1.4348.53±1.12
GCN-LPA83.13±0.5172.60±0.8078.64±1.3283.54±1.4190.13±1.5350.26±1.3842.78±2.36
N.S.-GCN82.12±0.1471.55±0.1479.14±0.1281.16±1.5389.86±1.8655.37±1.6446.86±2.02
PTDNet-GCN82.81±0.2372.73±0.1878.81±0.2482.21±2.1390.23±2.8453.26±1.4441.96±2.16
CoGSL81.76±0.2472.79±0.42OOMOOM89.63±2.2452.23±2.0339.96±3.31
NodeFormer80.28±0.8271.31±0.9878.21±1.4380.35±2.7589.37±2.0334.71±4.1238.54±1.51
GSR83.08±0.4872.10±0.2578.09±0.5381.63±1.3590.02±1.3262.28±1.6350.53±1.93
BAGCN83.70±0.2172.96±0.7578.54±0.7279.63±2.5291.25±0.9652.63±1.7842.36±1.53
ELU-GCN84.29±0.3974.23±0.6280.51±0.2183.73±2.3190.81±1.3370.90±1.7656.91±1.81
+ +Consequently, the effectiveness of the proposed method is verified in node classification tasks. + +We further evaluate the effectiveness of the proposed method on social network datasets and report the results of node classification in Appendix F.1. We can observe that the proposed method also achieves competitive results on the social network datasets compared to other baselines. For example, the proposed method outperforms the best baseline (i.e., GSR), on almost all datasets. + +# 4.3. Ablation Study + +The proposed ELU-GCN framework investigates the ELU graph to enable the GCN to utilize label information effectively. Additionally, a contrastive loss function (i.e., $\mathcal{L}_{con}$ ) is introduced to efficiently minimize consistency and mutually exclusive information between the original graph and the ELU graph. To verify the effectiveness of each component of the proposed method and the results are reported in Table 2. + +According to Table 2, we can draw the following conclusions. First, our proposed method achieves the best performance when each component is present, indicating that each is essential. This demonstrates the importance of both learning the ELU graph and extracting information from the original graph, as they not only enable GCN to effectively utilize labels but also retain important information in the original graph. + +Second, the ELU graph component provided the biggest improvement. For example, the ELU graph improves performance by an average of $2.9\%$ compared to not considering it, and the $\mathcal{L}_{con}$ term improves performance by an average of $1.3\%$ compared to not considering it. This illustrates the + +importance of unlabeled nodes being affected by effectively labeled information in message passing. + +# 4.4. Visualization + +To provide an intuitive and clear understanding of the effectiveness of the learned ELU graph, we visualize the adjacency matrix of the ELU graph in the heatmap on the Cora, Computers, Photo, and Chameleon datasets and report the results in Figure 3. + +Specifically, the rows and columns of heatmaps are reordered by node labels. In the heatmaps, the lighter a pixel, the larger the value of the ELU graph matrix weight. From Figure 3, we observe that the heatmaps exhibit a clear block diagonal structure, with each block corresponding to a category. This indicates that the obtained ELU graph tends to increase the weight of connections between nodes of the same category and avoid noisy connections from different classes. As a result, under the GCN framework, the training nodes are likely to propagate the label information to unlabeled nodes of the same category with a high probability, thereby reducing intra-class variance and increasing interclass distance. Especially on the Chameleon dataset, where the original graph tends to connect nodes with different labels with a high probability (i.e., heterophily). Fortunately, our method can still obtain a graph structure where nodes are connected with the same category, as shown by the experimental results, demonstrating the universality of the proposed method. + +# 4.5. Analyze the Trade-off Between Running Time and Accuracy + +The biggest limitation of graph structure learning methods is the need to query in $\mathcal{O}(n^2)$ space when learning the adja + +Table 2. Classification performance of each component in the proposed method on all datasets. + +
MethodCoraCiteseerpubmedComputersPhotoChameleonsquirrel
GCN81.61±0.4270.35±0.4579.01±0.6281.62±2.4390.44±1.2360.82±2.2443.43±2.18
+ELU graph83.49±0.5572.02±0.3680.25±0.7982.56±1.2390.52±1.3365.12±1.4354.12±1.32
+Lcon84.29±0.3974.23±0.6280.51±0.2183.73±2.3190.81±1.3370.90±1.7656.91±1.81
+ +![](images/73f441ca8451a059f2eca23b3d15f7b3c59252badbf42ba9816cfa2dcc6f58cf.jpg) +(a) Cora + +![](images/8c0adadb5ed72c6dfd72737f4f17e5e506e030d0b8c86f672bc5c829d768d4c2.jpg) +(b) Computers + +![](images/86075454ccff46aea01bdba77799982a60c1c1b814b0e180d88ef3e386dae0ff.jpg) +(c) Photo +Figure 3. Visualization of the adjacency matrix of the ELU graph on Cora, Computers, Photo, and Chameleon datasets. The rows and columns are nodes that are reordered based on node labels, the lighter a pixel, the larger the value of the ELU graph matrix weight. + +![](images/2f3842d4662fbf62fdd2d6f55e1b829fd8c90ffd9beaeea5bed3304cae245158.jpg) +(d) Chameleon + +cency matrix of graph structures. In our proposed method, we cleverly leverage the inverse matrix transformation trick to avoid the computational complexity of $\mathcal{O}(n^2)$ or even higher. Although we have previously analyzed that the complexity of the proposed algorithm in graph construction is $\mathcal{O}(nc^3)$ ( $c^3 \ll n$ ), plus the final graph structure is $\mathcal{O}(n^2)$ (only one calculation is required), we further test the overall actual running time and accuracy of the proposed ELU-GCN and compared with the commonly used baseline (i.e., GCN and GAT). The results are in Figure 4. + +![](images/b13d727969619120e2ea21006216907def431ed635bb1f6583754b9b810a07af.jpg) +Figure 4. Scatter plot showing the relationship between model runtime and accuracy, where the x-axis represents the runtime of different models on different datasets and the y-axis represents their corresponding accuracy $(\%)$ . + +From Figure 4, we have the observations as follows. First, the overall running time of the proposed method is slightly inferior to GCN, but significantly ahead of GAT. This indicates that the proposed ELU graph learning method does not incur too much time overhead and is comparable to the basic GNN model. Second, the proposed method achieves the best classification performance. Combining the above two points, the proposed method achieves the optimal trade-off between running time and model performance. + +# 5. Conclusion + +In this paper, we study the label utilization of GCN and reveal that a considerable number of unlabeled nodes cannot effectively utilize label information in the GCN framework. Furthermore, we propose a standard for determining which unlabeled nodes can effectively utilize label information in the GCN framework. To enable more unlabeled nodes to utilize label information effectively. We propose an effective label-utilizing graph convolutional network framework. To do this, we optimize the graph structure following the above standard, enabling every unlabeled node to effectively leverage label information. Moreover, we design a novel contrastive loss to capture consistency or mutually exclusive information between the original graph and the ELU graph. Our theoretical analysis demonstrates that ELU-GCN provides superior generalization capabilities compared to conventional GCNs. Extensive experimental results further validate that our method consistently outperforms state-of-the-art methods. + +# Acknowledgement + +Xiaofeng Zhu was supported in part by the National Key Research and Development Program of China under Grant (No.2022YFA1004100). Xiaoshuang Shi was supported in part by the Sichuan Science and Technology Program under Grant (No. 2024YFHZ0268). + +# 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 + +Alon, U. and Yahav, E. On the bottleneck of graph neural networks and its practical implications. In International Conference on Learning Representations(ICLR), 2021. +Berthelot, D., Carlini, N., Goodfellow, I., Papernot, N., Oliver, A., and Raffel, C. A. Mixmatch: A holistic approach to semi-supervised learning. Advances in neural information processing systems(NeurIPS), 32:5050-5060, 2019. +Bi, W., Du, L., Fu, Q., Wang, Y., Han, S., and Zhang, D. Make heterophily graphs better fit gnn: A graph rewiring approach. arXiv preprint arXiv:2209.08264, 2022. +Chien, E., Peng, J., Li, P., and Milenkovic, O. Adaptive universal generalized pagerank graph neural network. In International Conference on Learning Representations, (ICLR). OpenReview.net, 2021. +Daitch, S. I., Kelner, J. A., and Spielman, D. A. Fitting a graph to vector data. In Proceedings of the 26th annual international conference on machine learning (ICML), pp. 201-208, 2009. +Davies, D. L. and Bouldin, D. W. A cluster separation measure. IEEE transactions on pattern analysis and machine intelligence(TPAMI), pp. 224-227, 1979. +Defferrard, M., Bresson, X., and Vandergheynst, P. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in neural information processing systems(NeurIPS), volume 29, pp. 3837-3845, 2016. +Dong, H., Chen, J., Feng, F., He, X., Bi, S., Ding, Z., and Cui, P. On the equivalence of decoupled graph convolution network and label propagation. In Proceedings of the Web Conference (WWW), pp. 3651-3662, 2021. + +Gasteiger, J., Bojchevski, A., and Gunnemann, S. Predict then propagate: Graph neural networks meet personalized pagerank. In International Conference on Learning Representations, (ICLR), 2018. +Giraldo, J. H., Skianis, K., Bouwmans, T., and Malliaros, F. D. On the trade-off between over-smoothing and oversquashing in deep graph neural networks. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management (CIKM), pp. 566-576, 2023. +Gong, S., Zhou, J., Xie, C., and Xuan, Q. Neighborhood homophily-guided graph convolutional network. In Proceedings of the 32nd ACM International Conference on Information and Knowledge Management (CIKM), pp. 3908-3912, 2023. +Hamilton, W. L., Ying, R., and Leskovec, J. Inductive representation learning on large graphs. In Advances in neural information processing systems(Neurips), pp. 1025-1035, 2017. +Huang, J., Du, L., Chen, X., Fu, Q., Han, S., and Zhang, D. Robust mid-pass filtering graph convolutional networks. In Proceedings of the Web Conference (WWW), pp. 328-338, 2023a. +Huang, J., Li, P., Huang, R., Chen, N., and Zhang, A. Revisiting the role of heterophily in graph representation learning: An edge classification perspective. ACM Transactions on Knowledge Discovery from Data(TKDD), 18: 13:1-13:17, 2023b. +Huang, J., Shen, J., Shi, X., and Zhu, X. On which nodes does GCN fail? enhancing GCN from the node perspective. In *Forty-first International Conference on Machine Learning (ICML)*, 2024. +Ji, F., Lee, S. H., Meng, H., Zhao, K., Yang, J., and Tay, W. P. Leveraging label non-uniformity for node classification in graph neural networks. In International Conference on Machine Learning(ICML), pp. 14869-14885, 2023. +Jiang, B., Zhang, Z., Lin, D., Tang, J., and Luo, B. Semi-supervised learning with graph learning-convolutional networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11313-11320, 2019. +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 (SIGKDD), pp. 66-74, 2020. + +Jin, W., Derr, T., Wang, Y., Ma, Y., Liu, Z., and Tang, J. Node similarity preserving graph convolutional networks. In Proceedings of the 14th ACM international conference on web search and data mining (WSDM), pp. 148-156, 2021. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, (ICLR), 2017. +Li, B., Pan, E., and Kang, Z. Pc-conv: Unifying homophily and heterophily with two-fold filtering. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 13437-13445, 2024. +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, volume 32, 2018. +Liu, N., Wang, X., Wu, L., Chen, Y., Guo, X., and Shi, C. Compact graph structure learning via mutual information compression. In Proceedings of the ACM Web Conference (WWW)), pp. 1601-1610, 2022. +Luo, D., Cheng, W., Yu, W., Zong, B., Ni, J., Chen, H., and Zhang, X. Learning to drop: Robust graph neural network via topological denoising. In Proceedings of the 14th ACM international conference on web search and data mining(WSDM), pp. 779-787, 2021. +Natekar, P. and Sharma, M. Representation based complexity measures for predicting generalization in deep learning. arXiv preprint arXiv:2012.02775, 2020. +Neyshabur, B., Bhojanapalli, S., McAllester, D., and Srebro, N. Exploring generalization in deep learning. Advances in neural information processing systems(NeurIPS), 30: 5947-5956, 2017. +Nguyen, K., Hieu, N. M., Nguyen, V. D., Ho, N., Osher, S., and Nguyen, T. M. Revisiting over-smoothing and oversquashing using ollivier-ricci curvature. In International Conference on Machine Learning(ICML), volume 202, pp. 25956-25979, 2023. +Pei, H., Wei, B., Chang, K. C., Lei, Y., and Yang, B. Geom-gcn: Geometric graph convolutional networks. In 8th International Conference on Learning Representations (ICLR), 2020. +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. +Shchur, O., Mumme, M., Bojchevski, A., and Gunnemann, S. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018. + +Shi, Y., Huang, Z., Feng, S., Zhong, H., Wang, W., and Sun, Y. Masked label prediction: Unified message passing model for semi-supervised classification. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence (IJCAI), pp. 1548-1554. ijcai.org, 2021. +Sun, K., Lin, Z., and Zhu, Z. Multi-stage self-supervised learning for graph convolutional networks on graphs with few labeled nodes. In Proceedings of the AAAI conference on artificial intelligence (AAAI), volume 34, pp. 5892-5899, 2020. +Topping, J., Di Giovanni, F., Chamberlain, B. P., Dong, X., and Bronstein, M. M. Understanding over-squashing and bottlenecks on graphs via curvature. In International Conference on Learning Representations(ICLR), 2022. +Traud, A. L., Mucha, P. J., and Porter, M. A. Social structure of facebook networks. Physica A: Statistical Mechanics and its Applications, 391(16):4165-4180, 2012. +Velickovic, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. In International Conference on Learning Representations, (ICLR). OpenReview.net, 2018. +Wang, F. and Zhang, C. Label propagation through linear neighborhoods. In Proceedings of the 23rd International Conference on Machine Learning (ICML), pp. 985-992, 2006. +Wang, H. and Leskovec, J. Combining graph convolutional neural networks and label propagation. ACM Transactions on Information Systems (TOIS), 40(4):1-27, 2021. +Wang, X., Guo, X., Lei, Z., Zhang, C., and Li, S. Z. Exclusivity-consistency regularized multi-view subspace clustering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 923-931, 2017. +Wang, Y., Jin, J., Zhang, W., Yu, Y., Zhang, Z., and Wipf, D. Bag of tricks for node classification with graph neural networks. arXiv preprint arXiv:2103.13355, 2021. +Woodbury, M. A. Inverting modified matrices. Department of Statistics, Princeton University, 1950. +Wu, Q., Zhao, W., Li, Z., Wipf, D. P., and Yan, J. Nodeformer: A scalable graph structure learning transformer for node classification. Advances in Neural Information Processing Systems (NeurIPS), 35:27387-27401, 2022. +Wu, Y., Yao, J., Han, B., Yao, L., and Liu, T. Unraveling the impact of heterophilic structures on graph positive-unlabeled learning. arXiv preprint arXiv:2405.19919, 2024. + +Xu, J., Ren, Y., Wang, X., Feng, L., Zhang, Z., Niu, G., and Zhu, X. Investigating and mitigating the side effects of noisy views for self-supervised clustering algorithms in practical multi-view scenarios. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22957-22966, 2024. +Xu, K., Li, C., Tian, Y., Sonobe, T., Kawarabayashi, K.-i., and Jegelka, S. Representation learning on graphs with jumping knowledge networks. In International Conference on Machine Learning(ICML), pp. 5453-5462. PMLR, 2018. +Yang, C., Wu, Q., Wang, J., and Yan, J. Graph neural networks are inherently good generalizers: Insights by bridging gnns and mlps. In International Conference on Learning Representations (ICLR), 2023. +Yang, C., Yang, C., Shi, C., Li, Y., Zhang, Z., and Zhou, J. Calibrating graph neural networks from a data-centric perspective. In Proceedings of the ACM on Web Conference (WWW), pp. 745-755, 2024. +Yu, L., Sun, L., Du, B., Zhu, T., and Lv, W. Label-enhanced graph neural network for semi-supervised node classification. IEEE Transactions on Knowledge and Data Engineering, 2022. +Yue, H., Zhang, C., Zhang, C., and Liu, H. Label-invariant augmentation for semi-supervised graph classification. In Advances in Neural Information Processing Systems (Neurips), volume 35, pp. 29350-29361, 2022. +Zhang, A., Huang, J., Li, P., and Zhang, K. Building shortcuts between distant nodes with biaffine mapping for graph convolutional networks. ACM Transactions on Knowledge Discovery from Data (TKDD), 18(6):1-21, 2024. +Zhao, J., Wen, Q., Ju, M., Zhang, C., and Ye, Y. Self-supervised graph structure refinement for graph neural networks. In Proceedings of the Sixteenth ACM International Conference on Web Search and Data Mining (WSDM), pp. 159-167, 2023. +Zheng, C., Zong, B., Cheng, W., Song, D., Ni, J., Yu, W., Chen, H., and Wang, W. Robust graph representation learning via neural sparsification. In International Conference on Machine Learning, pp. 11458-11468. PMLR, 2020. +Zhu, X. Semi-supervised learning with graphs. Carnegie Mellon University, 2005. + +# A. Complexity + +# A.1. Complexity of Eq. 10 + +As mentioned above, by changing the order of matrix multiplication, the time complexity can be reduced, the Eq. 10 is as follows: + +$$ +\begin{array}{l} \mathbf {Q} ^ {(i)} = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {I} _ {N} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right) \mathbf {Q} ^ {(i - 1)} \tag {14} \\ = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {Y} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T} \mathbf {Q} ^ {(i - 1)}\right). \\ \end{array} +$$ + +We first let $\mathbf{B} = \frac{1}{\beta^2}\mathbf{H}\left(\mathbf{I}_c + \frac{1}{\beta}\mathbf{H}^T\mathbf{H}\right)^{-1}\mathbf{H}^T\mathbf{Q}^{(i - 1)}$ and compute it from right to left. Specifically, the matrix inversion operation on a $c\times c$ matrix is $\mathcal{O}(c^3)$ . Therefore, the overall time complexity of $\mathbf{S}\in \mathbb{R}^{n\times c}$ is $\mathcal{O}(nc^2 +c^3)$ , where $c\ll n$ . Then we can compute $\mathbf{Q}^{(i - 1)}\mathbf{H}^T\mathbf{B}$ , likewise, we calculate it from right to left, this can reduce the time complexity from $\mathcal{O}(n^2c)$ to $\mathcal{O}(nc^2)$ . Therefore the overall time complexity of calculating Eq. 10 is $\mathcal{O}(nc^2 +c^3)$ . This significantly improves the model efficiency. + +# A.2. Complexity of Eq. 11 + +Calculating $\mathbf{S}^*$ by eq.(9) will result in $\mathcal{O}(n^3)$ computational cost, which leads to significant memory overhead on large datasets. Thus, we first use the Woodbury identity matrix transformation by Appendix B.3, then the Eq. 9 can be transformed as: + +$$ +\mathbf {S} ^ {*} = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\mathbf {H} \mathbf {H} ^ {T} + \beta \mathbf {I} _ {N}\right) ^ {- 1} = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {I} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right). \tag {15} +$$ + +Then, we can transform the calculation order to reduce memory and time overhead as follows: + +$$ +\begin{array}{l} \mathbf {S} ^ {*} = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {I} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right) \tag {16} \\ \mathbf {\Lambda} = \mathbf {Q} ^ {(i - 1)} (\frac {1}{\beta} \mathbf {H} ^ {T} - \frac {1}{\beta^ {2}} \mathbf {H} ^ {T} \mathbf {H} (\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}) ^ {- 1} \mathbf {H} ^ {T}) \\ \end{array} +$$ + +We first let $\mathbf{P} = \frac{1}{\beta^2}\mathbf{H}\mathbf{H}^T\left(\mathbf{I}_c + \frac{1}{\beta}\mathbf{H}^T\mathbf{H}\right)^{-1}\mathbf{H}^T$ and calculate $\mathbf{H}^T\mathbf{H}$ , which time complexity is $\mathcal{O}(nc^2)$ , then we can get a $c\times c$ matrix $\mathbf{H}^T\mathbf{H}$ , the time complexity of $\left(\mathbf{I}_c + \frac{1}{\beta}\mathbf{H}^T\mathbf{H}\right)^{-1}$ is $\mathcal{O}(c^3)$ , thus the overall complexity of $\mathbf{P}$ is $\mathcal{O}(nc^2 +c^3)$ . Finally, the complexity of $\mathbf{Q}^{(i - 1)}\mathbf{P}$ is $\mathcal{O}(n^2c)$ , since $c$ is the number of classes, it has $c\ll n$ . Therefore, the complexity grows quadratically with the number of samples i.e., $\mathcal{O}(n^2)$ . + +# B. Theoretical Proof + +# B.1. Proof for Proposition 3.1 + +Proof. We follow the proof idea of (Wang & Leskovec, 2021), we first introduce a lemma to describe the influence of a node on the other node: + +Lemma B.1. (Xu et al., 2018) Assume that the activation function of GCN is ReLU. Let $P_{k}^{a\rightarrow b}$ be a path $[v^{(k)},v^{(k - 1)},\dots ,v^{(0)}]$ of length $k$ from node $v_{a}$ to node $v_{b}$ , where $v^{(k)} = v_{a},v^{(0)} = v_{b}$ , and $v^{(i - 1)}\in \mathcal{N}_{v^{(i)}}$ for $i = k,\dots ,1$ . Then we have the influence of node $v_{a}$ on $v_{b}$ is: + +$$ +I \left(v _ {b}, v _ {a}; k\right) = \sum_ {P _ {k} ^ {b \rightarrow a}} \prod_ {i = k} ^ {1} \tilde {a} _ {v ^ {(i - 1)}, v ^ {(i)}}, \tag {17} +$$ + +where $\tilde{a}_{v^{(i-1)}, v^{(i)}}$ is the weight of the edge $(v^{(i)}, v^{(i-1)})$ . + +The total influence is to sum over all lengths of the path. From Lemma B.1, we can easily obtain the influence of all labeled nodes with label $y_{1}$ on $v_{a}$ is + +$$ +I \left(\left\{v _ {b}: y _ {v} = y _ {1} \right\}, v _ {a}\right) = \sum_ {v _ {b}: y _ {b} = y _ {1}} \sum_ {j = 1} ^ {k} \sum_ {P _ {j} ^ {b \rightarrow a}} \prod_ {i = j} ^ {1} \tilde {a} _ {v ^ {(i - 1)}, v ^ {(i)}}. \tag {18} +$$ + +For LPA, is a random walk algorithm starting from the label node, we denote the classified probability of node $v_{a}$ in the $y_{1}$ dimension (i.e., $y_{1}$ category) as $y_{a}[y_{1}]$ . It is clear that + +$$ +y _ {a} \left[ y _ {1} \right] = \frac {y _ {a} \left[ y _ {1} \right] ^ {\prime}}{\sum_ {y _ {i} \in y} y _ {a} \left[ y _ {i} \right]} \quad s. t., \quad y _ {a} \left[ y _ {1} \right] ^ {\prime} = \sum_ {v _ {b}: y _ {b} = y _ {1}} \sum_ {j = 1} ^ {k} \sum_ {P _ {j} ^ {b \rightarrow a}} \prod_ {i = j} ^ {1} \tilde {a} _ {v ^ {(i - 1)}, v ^ {(i)}}. \tag {19} +$$ + +Thus, we can get $y_{a}[y_{1}] \propto I(\{v_{b}:y_{v} = y_{1}\}, v_{a})$ . + +![](images/d0609b235cc4bed910b746c44e752aa5a6df92ace20f4de094821d4d5a1ac99d.jpg) + +# B.2. Closed-Form Solution + +Given the objective function in Eq. 6, we let + +$$ +\begin{array}{l} \mathcal {L} = \left\| \mathbf {Q} ^ {(i)} - \mathbf {S H} \right\| _ {F} ^ {2} + \beta \sum_ {i, j = 1} s _ {i, j} ^ {2} \tag {20} \\ = T r \left(\left(\mathbf {Q} ^ {(i)} - \mathbf {S H}\right) ^ {T} \left(\mathbf {Q} ^ {(i)} - \mathbf {S H}\right)\right) + 2 \beta \mathbf {S} \\ \end{array} +$$ + +where $Tr(\cdot)$ indicates the trace of matrix. Then we have + +$$ +\frac {\partial \mathcal {L}}{\partial \mathbf {S}} = - 2 \mathbf {Q} ^ {(i)} \mathbf {H} ^ {T} + 2 \mathbf {S} \mathbf {H} \mathbf {H} ^ {T} + 2 \beta \mathbf {S} \tag {21} +$$ + +Let Eq. 21 equal to 0, we can obtain the closed-form solution $\mathbf{S}^{(i)}$ i.e., + +$$ +\mathbf {S} ^ {(i)} = \mathbf {Q} ^ {(i)} \mathbf {H} ^ {T} \left(\mathbf {H} \mathbf {H} ^ {T} + \beta \mathbf {I} _ {N}\right) ^ {- 1}. \tag {22} +$$ + +# B.3. The Woodbury identity + +Given four matrices i.e., $\mathbf{A} \in \mathbb{R}^{n \times n}$ , $\mathbf{U} \in \mathbb{R}^{n \times k}$ , $\mathbf{B} \in \mathbb{R}^{k \times k}$ , $\mathbf{V} \in \mathbb{R}^{k \times n}$ . We adopt a variation commonly used by the Woodbury identity (Woodbury, 1950) is as follows: + +$$ +\left(\mathbf {A} + \mathbf {U B V}\right) ^ {- 1} = \mathbf {A} ^ {- 1} - \mathbf {A} ^ {- 1} \mathbf {U} \left(\mathbf {B} ^ {- 1} + \mathbf {V A} ^ {- 1} \mathbf {U}\right) ^ {- 1} \mathbf {V A} ^ {- 1} \tag {23} +$$ + +Without loss of generality, the matrix $\mathbf{A}$ and $\mathbf{B}$ can be replaced with the identity matrix, therefore, we further have + +$$ +\left(\mathbf {I} + \mathbf {U V}\right) ^ {- 1} = \mathbf {I} - \mathbf {U} \left(\mathbf {I} + \mathbf {V U}\right) ^ {- 1} \mathbf {V} \tag {24} +$$ + +We can replace the matrices $\mathbf{U},\mathbf{V}$ with the matrix $\mathbf{H}$ in Eq. 24, thus, we have: + +$$ +\left(\mathbf {H} \mathbf {H} ^ {T} + \beta \mathbf {I} _ {N}\right) ^ {- 1} = \frac {1}{\beta} \mathbf {I} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}. \tag {25} +$$ + +Therefore, based on Eq. 25, we can transform $\mathbf{Q}^{(i)} = \mathbf{S}^{(i - 1)}\mathbf{Q}^{(i - 1)}$ as: + +$$ +\begin{array}{l} \mathbf {Q} ^ {(i)} = \mathbf {S} ^ {(\mathbf {i} - \mathbf {1})} \mathbf {Q} ^ {(i - 1)} \\ = \mathbf {Q} ^ {(i - 1)} \mathbf {H} ^ {T} \left(\frac {1}{\beta} \mathbf {I} _ {N} - \frac {1}{\beta^ {2}} \mathbf {H} \left(\mathbf {I} _ {c} + \frac {1}{\beta} \mathbf {H} ^ {T} \mathbf {H}\right) ^ {- 1} \mathbf {H} ^ {T}\right) \mathbf {Q} ^ {(i - 1)}. \tag {26} \\ \end{array} +$$ + +# B.4. Proof for Theorem 3.3 + +Theorem B.2. Given a graph $\mathcal{G}$ with adjacency matrix $\mathbf{A}$ , training set node label $\mathbf{Y}$ and ground truth label $\mathbf{Y}_{\mathrm{true}}$ . For any unknown-label nodes, if $\mathbf{Y}_{\mathrm{true}} = LPA(\mathbf{A},\mathbf{Y})$ , then the upper bound of the GCN's generalization ability reaches optimal on graph $\mathcal{G}$ . + +Proof. To prove the Theorem 3.3, We first introduce the Complexity Measure to help us understand the generalization ability of GCN. It is the current mainstream method to measure the generalization ability of the model (Neyshabur et al., 2017), which describes the a lower complexity measure means a better generalization ability. We follow (Natekar & Sharma, 2020) to adopt Consistency of Representations as our Complexity Measure, which is designed based on the Davies-Bouldin Index (Davies & Bouldin, 1979). Formally, for a given dataset and a given layer of a model, the Davies-Bouldin Index can be written as follows: + +$$ +S _ {a} = \left(\frac {1}{n _ {a}} \sum_ {\tau} ^ {n _ {a}} \left| O _ {a} ^ {(i)} - \mu_ {O _ {a}} \right| ^ {p}\right) ^ {1 / p} \text {f o r} a = 1 \dots k \tag {27} +$$ + +$$ +M _ {a, b} = \left\| \mu_ {O _ {a}} - \mu_ {O _ {b}} \right\| _ {p} \quad \text {f o r} a, b = 1 \dots k, \tag {28} +$$ + +where $a, b$ are two different classes, $O_{a}^{(i)}$ is the GCN smoothed feature of node $i$ belonging to class $a$ , $\mu_{O_a}$ is the cluster centroid of the representations of class $a$ , here we set $p = 2$ , thus $S_{a}$ measures the intra-class distance of class $a$ and $M_{a,b}$ is a measure of inter-class distance between class $a$ and $b$ . Then, we can define complexity measure based on the Davies-Bouldin Index as follows: + +$$ +C = \frac {1}{k} \sum_ {i = 0} ^ {k - 1} \max _ {a \neq b} \frac {S _ {a} + S _ {b}}{M _ {a , b}}. \tag {29} +$$ + +We define $P_0$ as the probability that a node's neighbor belongs to the '0-th' class, and $I_0$ as the probability that the node itself belongs to the '0-th' class. Thus, we can calculate the cluster centroid after GCN smoothed features: + +$$ +\begin{array}{l} \mu_ {O _ {0}} = \mathbb {E} \left[ O _ {0} ^ {i} \right] = \mathbb {E} \left[ \mathbf {W} \sum_ {j \in \mathcal {N} _ {i}} \frac {1}{d _ {i}} \mathbf {X} ^ {j} \right] \tag {30} \\ = \mathbf {W} \left(I _ {0} P _ {0} \mu_ {X _ {0}} + I _ {0} (1 - P _ {0}) \mu_ {X _ {1}}\right), \\ \end{array} +$$ + +where $\mathbf{X}^j$ is the 'j-th' node feature and $\mu_{X_i}$ is the cluster centroid of the node features of class $i$ . Likewise, we have: + +$$ +\mu_ {O _ {1}} = \mathbf {W} \left(I _ {1} P _ {1} \mu_ {X _ {1}} + I _ {1} \left(1 - P _ {1}\right) \mu_ {X _ {0}}\right). \tag {31} +$$ + +Then, the $M_{0,1}$ can be computed by: + +$$ +\begin{array}{l} M _ {0, 1} = \left\| \mu_ {O _ {a}} - \mu_ {O _ {b}} \right\| \\ = \| \mathbf {W} \left(I _ {0} P _ {0} \mu_ {X _ {0}} + I _ {0} (1 - P _ {0}) \mu_ {X _ {1}} - \left(I _ {1} P _ {1} \mu_ {X _ {1}} + I _ {1} (1 - P _ {1}) \mu_ {X _ {0}}\right)\right) \| \\ = \left\| \mathbf {W} \left(I _ {0} P _ {0} \mu_ {X _ {0}} + I _ {0} \mu_ {X _ {1}} - I _ {0} P _ {0} \mu_ {X _ {1}} - I _ {1} P _ {1} \mu_ {X _ {1}} - I _ {1} \mu_ {X _ {0}} + I _ {1} P _ {1} \mu_ {X _ {0}}\right) \right\| \tag {32} \\ = \left(I _ {0} P _ {0} + I _ {1} P _ {1}\right) \| \mathbf {W} \left(\mu_ {X _ {0}} - \mu_ {X _ {1}}\right) \| + \| I _ {0} \mu_ {X _ {1}} - I _ {1} \mu_ {X _ {0}} \| \\ \leq \left(I _ {0} P _ {0} + I _ {1} P _ {1}\right) \| \mathbf {W} \left(\mu_ {X _ {0}} - \mu_ {X _ {1}}\right) \| + \| \mu_ {X _ {1}} \| + \| \mu_ {X _ {0}} \|. \\ \end{array} +$$ + +Then $S_0^2$ is calculated by: + +$$ +\begin{array}{l} S _ {0} ^ {2} = \mathbb {E} \left[ \left\| O _ {0} ^ {(i)} - \mu_ {O _ {0}} \right\| ^ {2} \right] = \mathbb {E} \left[ < O _ {0} ^ {(i)} - \mu_ {O _ {0}}, O _ {0} ^ {(i)} - \mu_ {O _ {0}} > \right] \\ = \mathbb {E} \left[ \left(I _ {0} P _ {0}\right) \left(I _ {0} P _ {0} \left(X _ {0} - \mu_ {X _ {0}}\right) ^ {T} \mathbf {W} ^ {T} \mathbf {W} \left(X _ {0} - \mu_ {X _ {0}}\right)\right) \right] \tag {33} \\ + \mathbb {E} \left[ I _ {0} \left(1 - P _ {0}\right) I _ {0} \left(1 - P _ {0}\right) \left(X _ {1} - \mu_ {X _ {1}}\right) ^ {T} \mathbf {W} ^ {T} \mathbf {W} \left(X _ {1} - \mu_ {X _ {1}}\right) \right] \\ = I _ {0} ^ {2} P _ {0} ^ {2} \mathbb {E} [ \| \mathcal {W} (X _ {0} - \mu_ {X _ {0}}) \| ] + I _ {0} ^ {2} (1 - P _ {0}) ^ {2} \mathbb {E} [ \| \mathcal {W} (X _ {1} - \mu_ {X _ {1}}) \| ]. \\ \end{array} +$$ + +Similarly, we have: + +$$ +\begin{array}{l} S _ {1} ^ {2} = \mathbb {E} \left[ \left\| O _ {1} ^ {(i)} - \mu_ {O _ {1}} \right\| ^ {2} \right] = \mathbb {E} \left[ < O _ {1} ^ {(i)} - \mu_ {O _ {1}}, O _ {1} ^ {(i)} - \mu_ {O _ {1}} > \right] \\ = \mathbb {E} \left[ \left(I _ {1} P _ {1}\right) \left(I _ {1} P _ {1} \left(X _ {1} - \mu_ {X _ {1}}\right) ^ {T} \mathbf {W} ^ {T} \mathbf {W} \left(X _ {1} - \mu_ {X _ {1}}\right)\right) \right] \tag {34} \\ + \mathbb {E} \left[ I _ {1} \left(1 - P _ {1}\right) I _ {1} \left(1 - P _ {1}\right) \left(X _ {0} - \mu_ {X _ {0}}\right) ^ {T} \mathbf {W} ^ {T} \mathbf {W} \left(X _ {0} - \mu_ {X _ {0}}\right) \right] \\ = I _ {1} ^ {2} P _ {1} ^ {2} \mathbb {E} [ \| \mathcal {W} (X _ {1} - \mu_ {X _ {1}}) \| ] + I _ {1} ^ {2} (1 - P _ {1}) ^ {2} \mathbb {E} [ \| \mathcal {W} (X _ {0} - \mu_ {X _ {0}}) \| ], \\ \end{array} +$$ + +where $<\cdot, \cdot>$ is inner production. For simplicity, let $\sigma_0^2 = \mathbb{E}[\|\mathcal{W}(X_0 - \mu_{X_0})\|]$ and $\sigma_1^2 = \mathbb{E}[\|\mathcal{W}(X_1 - \mu_{X_1})\|]$ , then the above equation can then be simplified to: + +$$ +S _ {0} ^ {2} = \left(I _ {0} P _ {0}\right) ^ {2} \sigma_ {0} ^ {2} + \left(I _ {0} \left(1 - P _ {0}\right)\right) ^ {2} \sigma_ {1} ^ {2} \geq I _ {0} ^ {2} \frac {\sigma_ {0} ^ {2} \sigma_ {1} ^ {2}}{\sigma_ {0} ^ {2} + \sigma_ {1} ^ {2}}. \tag {35} +$$ + +Similarly, we have: + +$$ +S _ {1} ^ {2} = \left(I _ {1} P _ {1}\right) ^ {2} \sigma_ {1} ^ {2} + \left(I _ {1} \left(1 - P _ {1}\right)\right) ^ {2} \sigma_ {1} ^ {2} \geq I _ {1} ^ {2} \frac {\sigma_ {0} ^ {2} \sigma_ {1} ^ {2}}{\sigma_ {0} ^ {2} + \sigma_ {1} ^ {2}}. \tag {36} +$$ + +Then the complexity measure can be represented as: + +$$ +C = \frac {\sqrt {S _ {0} ^ {2} + S _ {1} ^ {2} + 2 S _ {0} \cdot S _ {1}}}{M _ {0 , 1}} \geq \frac {2 \sigma_ {0} \sigma_ {1} \left(I _ {0} + I _ {1}\right) ^ {2}}{\sqrt {\sigma_ {0} ^ {2} + \sigma_ {1} ^ {2}} \cdot \left(\left(I _ {0} P _ {0} + I _ {1} P _ {1}\right) \| \mathbf {W} \left(\mu_ {X _ {0}} - \mu_ {X _ {1}}\right) \| + \| \mu_ {X _ {1}} \| + \| \mu_ {X _ {0}} \|\right)}. \tag {37} +$$ + +Thus, we obtain a lower bound of complexity measure. Also this is the upper bound of the generalization ability. Notice that $\sigma_0$ and $\sigma_{1}$ could not be zero, otherwise, the classification problem is meaningless. We observe the above equation for nodes with unknown labels and analysis the relationship between the distribution of label $I_0$ , $I_{1}$ and the lower bound of complexity measure, we find that the probability of their own label (i.e., $I_0$ or $I_{1}$ ) and the probability of their neighbors' labels (i.e., $P_0$ or $P_{1}$ ) affect the upper bound on their generalization ability. Since $I_0 + I_1 = 1$ , we analyze term $(I_0P_0 + I_1P_1)$ , + +$$ +\left(I _ {0} P _ {0} + I _ {1} P _ {1}\right) = \frac {1}{n} \sum_ {i} ^ {n} I _ {0, i} P _ {0, i} + I _ {1, i} P _ {1, i} \tag {38} +$$ + +where $I_{0,i} \in \{0,1\}$ is the binary probability that the 'i-th' node label belongs to class 0 where $I_{1,i} = 1 - I_{0,i}$ and $P_{0,i}$ is the probability that the 'i-th' node whose neighbor belongs to class 0. In order to minimize the lower bound of complexity measure, i.e., to maximize the upper bound of generalization ability, it is necessary to maximize $(I_0P_0 + I_1P_1)$ here. Obviously, the maximum $(I_0P_0 + I_1P_1)$ is obtained at $I_{0,i} = \arg\max(P_{1,i}P_{0,i})$ . + +Let's look at the Label Propagation Algorithm(LPA). For nodes with unknown labels, + +$$ +\widehat {y} _ {i} = \frac {1}{d _ {i}} \sum_ {j \in \mathcal {N} _ {i}} y _ {j}. \tag {39} +$$ + +Then the probability that the LPA predicts that the 'i-th' node belongs to class 0 can be obtained: + +$$ +\widehat {I} _ {0, i} = \operatorname {a r g m a x} \left(\frac {1}{d _ {i}} \sum_ {j \in \mathcal {N} _ {i}} y _ {i} = = 1, \frac {1}{d _ {i}} \sum_ {j \in \mathcal {N} _ {i}} y _ {i} = = 0\right) = \operatorname {a r g m a x} \left(P _ {1, i} P _ {0, i}\right). \tag {40} +$$ + +Similarly, the probability of predicting the 'i-th' node to belong to class 1 is: + +$$ +\widehat {I} _ {1, i} = \operatorname {a r g m a x} \left(\frac {1}{d _ {i}} \sum_ {j \in \mathcal {N} _ {i}} y _ {i} = = 0, \frac {1}{d _ {i}} \sum_ {j \in \mathcal {N} _ {i}} y _ {i} = = 1\right) = \operatorname {a r g m a x} \left(P _ {0, i} P _ {1, i}\right). \tag {41} +$$ + +Thus, the upper bound on the generalization ability is maximized when the labels of the unknown label set are distributed as LPA-generated labels. + +# B.5. Proof for Theorem 3.4 + +Theorem B.3. The ELU graph can ensure the generalization ability of the GCN, potentially bringing it closer to optimal performance. + +Proof. Recall our objective function (i.e., Eq. (5)) $\min_{\mathbf{S}}\| \mathbf{S}\mathbf{Y} - \mathbf{S}\mathbf{H}\| _F^2$ , and we first pre-training a GCN (i.e., SH, where $\mathbf{H} = MLP(X)$ is trained in advance) to predict labels for all nodes (i.e., $\widehat{\mathbf{Y}}$ ), thus our objective function can be rewritten as $\min_{\mathbf{S}}\left\| \mathbf{S}\mathbf{Y} - \widehat{\mathbf{Y}}\right\| _F^2$ , which align with the form of $\min_{\mathbf{A}}\| \mathbf{A}\mathbf{Y} - \mathbf{Y}_{\mathrm{true}}\| _F^2$ and $\widehat{\mathbf{Y}}$ is often used to estimate $\mathbf{Y}_{\mathrm{true}}$ (Yang et al., 2024; Gong et al., 2023). Therefore, the ELU graph (i.e., S) can ensure the GCN's generalization ability to a certain extent. Moreover, a better adjacency matrix S can further improve the GCN's predictions (i.e., $\widehat{\mathbf{Y}}$ ), making $\widehat{\mathbf{Y}}$ increasingly closer to ground truth (i.e., $\mathbf{Y}_{\mathrm{true}}$ ). Ultimately, we can obtain a graph structure to ensure the GCN's generalization ability is closer to optimal performance. + +# C. Related Works + +This section briefly reviews the topics related to this work, including graph convolutional networks, label propagation algorithms, and graph structure learning. + +# C.1. GCNs and LPA + +Graph convolutional networks (GCNs) are the most popular and commonly used model in the field of graph deep learning. Early work attempted to apply the successful convolutional neural network (CNN) to graph structures. For example, CheybNet (Defferrard et al., 2016) first proposes to transform the graph signal from the spatial domain to the spectral domain through the discrete Fourier transform, and then use polynomials to fit the filter shape (i.e., convolution). CheybNet laid the foundation for the development of spectral-domain graph neural networks. The popular GCN was proposed by Kipf et al. (Kipf & Welling, 2017), which is a simplified version of CheybNet and has demonstrated strong efficiency and effectiveness, thereby promoting the development of the graph deep learning field. + +Recently, some works have focused on the combination of LPA and GCN. This is because LPA can characterize the distribution of labels spread on the graph, which can help GCN obtain more category information. Existing combined LPA and GCN methods can be classified into two categories, i.e., pseudo label methods and masked label methods. Pseudo-label methods let the output of LPA serve as the pseudo-labels to guide the representation learning. For example, PTA (Dong et al., 2021) first propagates the known labels along the graph to generate pseudo-labels for the unlabeled nodes, and second, trains normal neural network classifiers on the augmented pseudo-labeled data. GPL (Wu et al., 2024) uses the output of LPA to preserve the edges between nodes of the same class, thereby reducing the intra-class distance. The masked label methods employ LPA as regularization to assist the GCN update parameters or structures. For example, UniMP (Shi et al., 2021) makes some percentage of input label information masked at random, and then predicts it for updating parameters. GCN-LPA (Wang & Leskovec, 2021) also randomly masked a part of the labels and utilized the remaining label nodes to predict them in learning proper edge weights within labeled nodes. Although the above methods achieve excellent results on various tasks, they fail to explore under what conditions the labels propagated by LPA can best enhance the representation learning of GCNs on unlabeled nodes. + +# C.2. Graph Structure Learning + +Prior to the recent surge in Graph Neural Networks, the study of graph structure learning had already been extensively explored from multiple perspectives within traditional machine learning. + +Graph structure learning is an important technology in the graph field. It can improve the graph structure and infer new relationships between samples, thereby promoting the development of graph representation learning or other fields. Existing Graph structure learning methods can be classified into three categories, i.e., traditional unsupervised graph structure learning methods, supervised graph structure learning methods, and graph rewiring methods. Traditional unsupervised graph structure learning methods aim to directly learn a graph structure from a set of data points in an unsupervised manner. Early works (Wang & Zhang, 2006; Daitch et al., 2009) exploit the neighborhood information of each data point for graph construction by assuming that each data point can be optimally reconstructed using a linear combination of its neighbors (i.e., $\min_A\| \mathbf{AX} - \mathbf{X}\| _F^2$ ). Similarly, (Daitch et al., 2009) introduce the weight (i.e., $\min \sum_{i}\left\| \mathbf{D}_{i,i}\mathbf{X}_i - \sum_j\mathbf{A}_{i,j}\mathbf{X}_j\right\|^2$ ). + +Smoothness (Jiang et al., 2019) is another widely adopted assumption on natural graph signals; the smoothness of the graph signals is usually measured by the Dirichlet energy (i.e., $\min_{\mathbf{A}}\frac{1}{2}\sum_{i,j}\mathbf{A}_{i,j}\|\mathbf{X}_i - \mathbf{X}_j\|^2 = \min_{\mathbf{L}}\operatorname{tr}(\mathbf{X}^\top \mathbf{L}\mathbf{X})$ ). Until now, there have been a lot of works based on the above objective function to learn graph structure. Supervised graph structure learning methods aim to use the downstream task to supervise the structure learning, which can learn a suitable structure for the downstream task. For example, NeuralSparse (Zheng et al., 2020) and PTDNet (Luo et al., 2021) directly use the adjacency matrix of the graph as a parameter and update the adjacency matrix through the downstream task. SA-SGC (Huang et al., 2023b) learns a binary classifier by distinguishing the edges connecting nodes with the same label and the edges connecting nodes with different labels in the training set, thereby deleting the edges between nodes belonging to different categories in the test set. BAGCN (Zhang et al., 2024) uses metric learning to obtain new graph structures and learns suitable metric spaces through downstream tasks. The goal of graph rewiring methods is to prevent the over-squashing (Alon & Yahav, 2021) problem. For example, FA (Alon & Yahav, 2021) proposed to use a fully connected graph as the last layer of GCN to overcome over-squashing. SDRF (Topping et al., 2022), SJLR (Giraldo et al., 2023), and BORF (Nguyen et al., 2023) aim to enhance the curvature of the neighborhood by rewiring connecting edges with small curvature. They increase local connectivity in the graph topology, indirectly expanding the influence range of labels. Despite their success, existing graph structure learning methods cannot ensure that the learned graph structure effectively enables GNN models to leverage supervisory information for unlabeled nodes. + +# D. Model Detail + +# D.1. Pretaining MLP + +As mentioned in the method section MLP has been trained in advance. Specifically, we employ the two-layer MLP and crosse-entropy to pre-train the MLP: + +$$ +\mathcal {L} _ {m l p}: \min _ {\Theta_ {1}, \Theta_ {2}} C E \left(\mathbf {X} \boldsymbol {\Theta} ^ {(1)} \boldsymbol {\Theta} ^ {(2)}, \mathbf {Y}\right) \tag {42} +$$ + +where $\Theta^{(1)}$ and $\Theta^{(2)}$ are learnable parameters. After the above objective function converges by the gradient descent algorithm, we can get $\mathbf{H}$ as follows: + +$$ +\mathbf {H} = \mathbf {X} \boldsymbol {\Theta} ^ {(1)} \boldsymbol {\Theta} ^ {(2)}. \tag {43} +$$ + +# D.2. Details of Sparse $\mathbf{S}^*$ and Initialize Y + +Sparse $\mathbf{S}^*$ . $\mathbf{S}^*$ is a fully-connected adjacency matrix. It will bring computationally expensive overhead in message passing, especially for large-scale graph datasets. To mitigate this, we set the elements with small absolute values to 0; Specifically, $\forall i,j$ where $|\mathbf{S}_{i,j}^{*}| < \eta$ , we set $|\mathbf{S}_{i,j}^{*}| = 0$ , while elements with $|\mathbf{S}_{i,j}^{*}| > \eta$ remain unchanged, where $\eta$ is a non-negative parameter that we usually set to correspond to the top 10 percent of element values. The graph described by $\mathbf{S}^*$ is referred to as the effectively label-utilizing graph (ELU-graph) in this paper. + +Initialize Y. Since the number of initial label information is very limited in a semi-supervised scenario, having too many rows of all zeros in Y can cause the algorithm to be unstable. Thus, we propose a label initialization strategy to expand the initial labels with high quality. Specifically, since ELU nodes can effectively utilize the label information and demonstrate high accuracy as shown in Figure 2 (b), we use the pseudo labels of ELU nodes to expand the initial Y. + +# E. Experiments Details + +# E.1. Datasets + +The used datasets include three benchmark citation datasets (Sen et al., 2008) (i.e., Cora, Citeseer, Pubmed), two co-purchase networks (Shchur et al., 2018) (i.e., Computers, Photo), two web page networks (Pei et al., 2020) (i.e., Chameleon and Squirrel, note that these two datasets are heterophilic graph data), and four social network datasets (Traud et al., 2012) (i.e., Caltech, UF, Hamilton, and Tulane). Table 3 summarizes the data statistics. We list the details of the datasets as follows. + +- Citation networks include Cora, Citeseer, and Pubmed. They are composed of papers as nodes and their relationships such as citation relationships, and common authoring. Node feature is a one-hot vector that indicates whether a word is present in that paper. Words with a frequency of less than 10 are removed. +- Co-purchase networks include Photo and Computers, containing 7,487 and 13,752 products, respectively. Edges in + +Table 3. The statistics of the datasets + +
DatasetsNodesEdgesTrain/Valid/Test NodesFeaturesClasses
Cora2,7085,429140/500/10001,4337
Citeseer3,3274,732120/500/1,0003,7036
Pubmed19,71744,33860/500/1,0005003
Amazon Computers13,381245,778200/300/12,88176710
Amazon Photo7,487119,043160/240/7,0847458
Chameleon2,27736,1011,093/729/4552,3255
Squirrel5,201217,0732,496/1,665/1,0402,0895
Caltech13,882763,8688,240/2,776/2,77666
UF35,1232,931,32021,074/7,024/7,02466
Hamilton2,314192,7881,388/463/46366
Tulane7,752567,8364,652/1,550/1,55066
+ +each dataset indicate that two products are frequently bought together. The feature of each product is bag-of-words encoded product reviews. Products are categorized into several classes by the product category. + +- Webpage networks include Squirrel and Chameleon, which are two subgraphs of web pages in Wikipedia. Our task is to classify nodes into five categories based on their average amounts of monthly traffic. +- Social networks include Caltech, UF, Hamilton, and Tulane, each graph describes the social relationship in a university. Each graph has categorical node attributes with practical meaning (e.g., gender, major, class year.). Moreover, nodes in each dataset belong to six different classes (a student/teacher status flag). + +# F. Additional Experiments + +# F.1. Node Classification on Social Networks + +
ModelCaltechUFHamiltonTulane
GCN88.47±1.9183.94±0.6192.26±0.3587.93±0.97
GAT81.17±2.1581.68±0.5991.43±1.2584.45±1.45
APPNP90.76±2.3883.07±0.5493.29±0.4788.52±0.44
GCN-LPA89.12±2.1183.78±0.6992.56±0.8788.32±1.02
GSR90.23±2.4184.01±0.6392.45±0.8488.75±1.01
Ours91.93±0.6985.62±0.5393.65±0.7889.30±0.77
+ +We further evaluate the effectiveness of the proposed method on the social network datasets by reporting the results of node classification. Obviously, our method achieves the best effectiveness on node classification tasks. + +Specifically, the proposed method achieves competitive results on the social network datasets compared to other baselines. For example, the proposed method on average improves by $1.27\%$ , compared to the best baseline (i.e., GSR), on almost all datasets. This demonstrates the universality of our method, which can achieve excellent results in most datasets. + +# F.2. Parameter Analysis + +In the proposed method, we employ the non-negative parameters (i.e., $\lambda$ , $\tau$ , and $\eta$ ) to achieve a trade-off between the supervised loss and the contrastive loss, the temperature control, and the fusion of the ELU graph and the original graph. To investigate the impact of $\lambda$ , $\tau$ , and $\eta$ with different settings, we conduct the node classification on the Cora and Citeseer datasets by varying the value of $\lambda$ , $\tau$ , and $\eta$ in the range of [0.1, 1.0]. Note that the smaller the $\tau$ , the closer the model brings the positive samples and the further apart the negative samples. The results are reported in Figure 5 and 6, respectively. + +From Figure 5, we have the following observations: First, the proposed method achieves significant performance when the parameter $\tau$ is in the range of [0.1, 0.3] if $\tau$ values are too large (e.g., $\tau > 0.3$ ), the performance degrades. For $\tau$ , setting it + +to 1 is equivalent to not using the temperature coefficient. The lower the temperature coefficient, the stronger the effect, indicating that $\tau$ is essential for the proposed method. Note that $\tau$ cannot be set to 0 because it is the denominator. Second, when $\lambda$ is set in the range of [0.3, 0.6], the model can get a higher performance, if the value of $\lambda$ is too high or too small (e.g., $= 0$ , the results shown in the Table 2), the performance degrades. This indicates that the proposed contrastive loss is necessary for the model. + +From Figure 6, for the parameter $\eta$ , the proposed method achieves the best results while the value of the parameter is set in the range of [0.1,0.5]. This further confirms the importance of both the ELU graph and the original graph. + +![](images/2fd94e972e71aef214b91867e45bb177b15cf27d9fb6742044d9702974acf66e.jpg) +(a) Cora + +![](images/3c75d4b71d5120c9b366e59292f7fd7b91f68b7906896c94bae4938b3c5ab77d.jpg) +(b)CiteSeer +Figure 5. The classification performance of the proposed method at different parameter settings (i.e., $\tau$ , $\lambda$ ) on the Cora and Citeseer datasets. + +# F.3. Analysis the Improve on $V_{\mathrm{NELU}}$ + +To better examine the effectiveness of the proposed ELU-GCN on $V_{\mathrm{NELU}}$ , we further evaluate the model's improvement over GCN on $V_{\mathrm{NELU}}$ on Cora, Citeseer, and Pubmed datasets. The results are shown in Figure 7. + +Specifically, the proposed ELU-GCN shows a particularly significant improvement on $V_{\mathrm{NELU}}$ across the three datasets. For example, our method on average improves by $3.7\%$ on $V_{\mathrm{NELU}}$ and $2.1\%$ on all test nodes compared to GCN on these three datasets. This can be attributed to the fact that the proposed ELU-GCN provides the ELU graph that can make $V_{\mathrm{NELU}}$ utilize the label information more effectively under the GCN framework, and this also indicates that the main improvement of the proposed ELU-GCN is on $V_{\mathrm{NELU}}$ . + +![](images/2e461f98bf364c367146756618658bf4a639f691e165936632c1b2edff0e9892.jpg) +Figure 6. The classification performance of the proposed method at different parameter settings (i.e., $\eta$ ) on the Cora and CiteSeer datasets. + +![](images/467acac9eeddfc0745fbb79e750b8fa7a240283a78abee9fa0e23a19b2856033.jpg) +Figure 7. The accuracy of ELU-GCN and GCN of $V_{\mathrm{NELU}}$ on Cora, CiteSeer, and Pubmed datasets. \ No newline at end of file diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/images.zip b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ee2f1bd41edc1c2e24feb10913574b3a24a990e7 --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d35a3a9cb32767aeb120eec739de362d588822766c1a55ff5c175485c7defb82 +size 962697 diff --git a/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/layout.json b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..73f31a2a0b0af6e1485f3da3143795e523c68a2e --- /dev/null +++ b/ICML/2025/Enhancing the Influence of Labels on Unlabeled Nodes in Graph Convolutional Networks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:445b1e78e2d1d7a26b5865fb4748ecc7d6c8def92a781dc491caa84dfbfbd449 +size 842830 diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_content_list.json b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7a7ca8599513d9847fceecf446507cfd67a90f36 --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:867ec4857d0a09febcc0fcc12d5ec51a1b38facdced89b1b5cc65415ba902611 +size 171338 diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_model.json b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..963fd893b89c47ef669b2e3df1b361ac335244b9 --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cd8c8d77fdb6787743ae7027d890ee60380da4e4c768606bcd1a2eb9cb5c6f5 +size 211609 diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_origin.pdf b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..15f3c22501edf473784aa594ccb6f64fd2d6561d --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/482904ce-5e6a-45df-8965-812a1819f5dd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a08a6c624101ade22eae48774ec52222d8dcb1cadb806cb1535f0c0249f3e63 +size 586385 diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/full.md b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0fa65af21dc8890c0a61a732946582cb48bdfa34 --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/full.md @@ -0,0 +1,819 @@ +# ENSLOSS: Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification + +Ben Dai + +# Abstract + +Empirical risk minimization (ERM) with a computationally feasible surrogate loss is a widely accepted approach for classification. Notably, the convexity and calibration (CC) properties of a loss function ensure consistency of ERM in maximizing accuracy, thereby offering a wide range of options for surrogate losses. In this article, we propose a novel ensemble method, namely ENSLOSS, which extends the ensemble learning concept to combine loss functions within the ERM framework. A key feature of our method is the consideration on preserving the "legitimacy" of the combined losses, i.e., ensuring the CC properties. Specifically, we first transform the CC conditions of losses into loss-derivatives, thereby bypassing the need for explicit loss functions and directly generating calibrated loss-derivatives. Therefore, inspired by Dropout, ENSLOSS enables loss ensembles through one training process with doubly stochastic gradient descent (i.e., random batch samples and random calibrated loss-derivatives). We theoretically establish the statistical consistency of our approach and provide insights into its benefits. The numerical effectiveness of ENSLOSS compared to fixed loss methods is demonstrated through experiments on a broad range of 45 pairs of CIFAR10 datasets, the PCam image dataset, and 14 OpenML tabular datasets and with various deep learning architectures. Python repository and source code are available on GitHub. + +# 1. Introduction + +The objective of binary classification is to categorize each instance into one of two classes. Given a feature vector $\mathbf{X} \in \mathcal{X} \subset \mathbb{R}^d$ , a classification function $f: \mathbb{R}^d \to \mathbb{R}$ + +$^{1}$ Department of Statistics, The Chinese University of Hong Kong. Correspondence to: Ben Dai . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +produces a predicted class $\mathrm{sign}(f(\mathbf{x}))$ to predict the true class $Y\in \{-1, + 1\}$ . The performance of the classification function $f$ is typically evaluated using the risk function based on the zero-one loss: + +$$ +R (f) = \mathbb {E} \left(\mathbf {1} (Y f (\mathbf {X}) \leq 0)\right), \tag {1} +$$ + +where $\mathbf{1}(\cdot)$ is an indicator function, and the classification accuracy is defined as $\mathrm{Acc}(f) = 1 - R(f)$ . Clearly, the Bayes decision rule $f^{*}(\mathbf{x}) = \mathrm{sgn}(\mathbb{P}(Y = 1|\mathbf{X} = \mathbf{x}) - 1 / 2)$ is a minimizer of the risk function $R(f)$ . Due to the discontinuity of the indicator function, the zero-one loss is usually replaced by a convex and classification-calibrated loss $\phi$ to facilitate the empirical computation (Lin, 2004; Zhang, 2004b; Bartlett et al., 2006). For example, typical losses including the hinge loss $\phi(z) = (1 - z)_+$ for SVMs (Cortes & Vapnik, 1995), the exponential loss $\phi(z) = \exp(-z)$ for AdaBoost (Freund & Schapire, 1995; Hastie et al., 2009), and the logistic loss $\phi(z) = \log(1 + \exp(-z))$ for logistic regression (Cox, 1958), and others (Lin et al., 2017; Leng et al., 2022). Then, the risk based on $\phi(\cdot)$ is defined as: + +$$ +R _ {\phi} (f) = \mathbb {E} \big (\phi (Y f (\mathbf {X})) \big). +$$ + +Note that convexity and classification-calibration (hereafter referred to as calibration for simplicity) are widely accepted requirements for a loss function $\phi(z)$ . The primary motivations behind these requirements are that convexity facilitates computations, while calibration ensures the statistical consistency of the empirical estimator derived from $R_{\phi}$ , as formally defined below. + +Definition 1.1 (Bartlett et al. (2006)). A loss function $\phi(\cdot)$ is classification-calibrated, if for every sequence of measurable function $f_n$ and every probability distribution on $\mathcal{X} \times \{\pm 1\}$ , + +$$ +R _ {\phi} (f _ {n}) \rightarrow \inf _ {f} R _ {\phi} (f) \text {i m p l i e s t h a t} R (f _ {n}) \rightarrow \inf _ {f} R (f), +$$ + +as $n$ approaches infinity. + +According to Definition 1.1, a calibrated loss function $\phi$ guarantees that any sequence $f_{n}$ that optimizes $R_{\phi}$ will eventually also optimize $R$ , thereby ensuring consistency in maximizing classification accuracy. To achieve this, the most commonly used and direct approach is ERM, which directly minimizes the empirical version of $R_{\phi}$ to obtain + +$f_{n}$ . Specifically, given a training dataset $(\mathbf{x}_i,y_i)_{i = 1}^n$ , the $\phi$ -classification framework is formulated as: + +$$ +\widehat {f} _ {n} = \underset {f \in \mathcal {F}} {\operatorname {a r g m i n}} \widehat {R} _ {\phi} (f), \quad \widehat {R} _ {\phi} (f) := \frac {1}{n} \sum_ {i = 1} ^ {n} \phi \left(y _ {i} f \left(\mathbf {x} _ {i}\right)\right), \tag {2} +$$ + +where $\mathcal{F} = \{f_{\theta} : \theta \in \Theta\}$ is a candidate class of classification functions. For instance, $\mathcal{F}$ can be specified as, a Reproducing kernel Hilbert space (Aronszajn, 1950; Wahba, 2003), neural networks, or deep learning (DL) models (LeCun et al., 2015). Notably, most successful classification methods fall within the ERM framework of (2), utilizing various loss functions and functional spaces. + +Given a functional space $\mathcal{F}$ , the training process of ERM in (2) focuses on optimizing the parameters $\pmb{\theta}$ within $\Theta$ . Stochastic gradient descent (SGD; (Bottou, 1998; LeCun et al., 2002)) is widely adopted for its scalability and generalization when dealing with large-scale datasets and DL models. Specifically, in the $t$ -th iteration, SGD randomly selects one or a batch of samples $(\mathbf{x}_{i_b}, y_{i_b})_{b=1}^B$ with the index set $\mathcal{I}_B$ , and subsequently updates the model parameter $\pmb{\theta}$ as: + +$$ +\begin{array}{l} \boldsymbol {\theta} ^ {(t + 1)} = \boldsymbol {\theta} ^ {(t)} - \gamma \frac {1}{B} \sum_ {i \in \mathcal {I} _ {B}} \nabla_ {\boldsymbol {\theta}} \phi \left(y _ {i} f _ {\boldsymbol {\theta} ^ {(t)}} \left(\mathbf {x} _ {i}\right)\right) \\ = \boldsymbol {\theta} ^ {(t)} - \gamma \frac {1}{B} \sum_ {i \in \mathcal {I} _ {B}} y _ {i} \partial \phi \left(y _ {i} f _ {\boldsymbol {\theta} ^ {(t)}} (\mathbf {x} _ {i})\right) \nabla_ {\boldsymbol {\theta}} f _ {\boldsymbol {\theta} ^ {(t)}} (\mathbf {x} _ {i}), \tag {3} \\ \end{array} +$$ + +where $\gamma > 0$ represents a learning rate in SGD, the second equality follows from the chain rule, and $\nabla_{\theta}f_{\theta}(\mathbf{x})$ can be explicitly computed when the form of $f_{\theta}$ or $\mathcal{F}$ is specified. + +The ERM paradigm (2) with calibrated losses, when combined with ML models and optimized using SGD, has achieved tremendous success in numerous real-world applications. Notably, with deep neural networks, it has become a cornerstone of supervised classification in modern datasets (Goodfellow et al., 2016; Krizhevsky et al., 2012; He et al., 2016; Vaswani, 2017). + +Overfitting. The overparameterized nature of deep neural networks is often necessary to capture complex patterns and various datasets in the real world, thereby achieving state-of-the-art performance. However, one of the most pervasive challenges in DL models is the problem of overfitting, where a model becomes overly specialized to the training data and struggles to generalize well to testing datasets. Particularly, DL models can even lead to a phenomenon where they perfectly fit the training data, achieving nearly zero training error, but typically, with a significant gap often persisting between the training (close to zero) and testing errors, a discrepancy attributable to overfitting. Given this fact, many regularization methods (c.f. Section 2) have been proposed, achieving remarkable improvements in alleviating overfitting in overparameterized models. The purpose of this + +article is to also propose a novel regularization method ENSLoss, which differs from existing regularization methods, or rather, regularizes the model from a different perspective. + +Our motivation. The primary motivation for ENSLOSS stems from ensemble learning, but it specifically focuses the perspective of loss functions, applying the ensemble concept to combine various "valid" losses. As mentioned previously, numerous CC losses can act as a valid surrogate loss in (2), yielding favorable statistical properties in terms of the zero-one loss in (1). Yet, pinpointing the optimal surrogate loss in practical scenarios remains a challenge. A potentially effective idea is loss ensembles, by implementing an ensemble of classification functions fitted from various valid loss functions. However, for large models, particularly those involving deep learning, the computational cost associated with multiple training sessions can often be prohibitively expensive. It is worth mentioning that a similar computation challenge is also prevalent with model ensembles or model combination. This issue, has been effectively addressed by Dropout (Srivastava et al., 2014): by randomly taking different network structures during each SGD update, thereby achieving the outcome akin to model ensembles. In our content, we employ a loosely analogous of Dropout, adopt different surrogate losses in each SGD update to achieve the objective of loss ensembles. This motivating idea behind ENSLOSS is roughly outlined in Table 1. + +# 2. Related Works + +This section provides a literature review of related works on regularization methods for mitigating overfitting, as well as related ML literature focused on the loss function. + +Dropout. One simple yet highly effective method for preventing overfitting is dropout (Srivastava et al., 2014). The key advantage of Dropout lies in its ability to simulate an ensemble approach during SGD updates, thereby mitigating overfitting without substantial computational costs. Thus, Dropout has become a standard component in many DL architectures, and its advantages have been widely recognized. Notably, the direction of ensemble in Dropout is achieved through different model architectures, whereas our method achieves ensemble through different "valid" loss functions. Thus, the proposed method and Dropout exhibit a complementary relationship and can be used simultaneously, as implemented in Section 4.4. + +Penalization methods. Another approach to mitigate overfitting is to impose penalties or constraints (such as a $L_{1} / L_{2}$ norm) on model parameters, which aims to reduce model complexity and thus prevent overfitting (Hoerl & Kennard, 1970; Tibshirani, 1996; Zou & Hastie, 2005). Similar approaches include weight decay during SGD (Loshchilov & Hutter, 2017). The underlying intuition is to strike a balance + +between model complexity and data fitting, thereby mitigating overfitting through the bias-variance tradeoff. Thus, these methods can also be seamlessly integrated with the proposed method, as demonstrated in Section 4.4. + +Classification-calibration. Note that the zero-one loss (or accuracy) cannot be directly optimized due to its discontinuous nature, and thus, a surrogate loss is introduced to facilitate the computation. A natural question that arises is: how can we ensure that the classifier obtained under the new loss performs well in terms of accuracy? The answer leads to the definition of classification-calibration for a loss function (Definition 1.1). Meanwhile, a series of works (Lin, 2004; Zhang, 2004b; Lugosi & Vayatis, 2004; Bartlett et al., 2006) have finally summarized loss calibration to a simple if-and-only-if condition, as stated in Theorem 3.1. Calibration is an extensively validated condition through both empirical and theoretical consideration, and is widely regarded as a necessary minimal condition for a loss function. + +Post loss ensembles. A straightforward approach to constructing loss ensembles is to fit separate classifiers for each calibrated losses (e.g., SVM and logistic regression) and then combining their outputs using simple ensemble methods, such as bagging, stacking, or voting (Breiman, 1996; Wolpert, 1992). This approach has empirically achieved satisfactory performance; however, its major drawback is that it requires refitting a classifier for each loss, resulting in substantial computational costs that make it impractical for large complex models. + +Loss Meta-learn. A recently related topic is the learning of loss functions via the meta-learn framework in multiple-task learning or domain adaptation (Gonzalez & Miikkulainen, 2021; Bechtle et al., 2021; Gao et al., 2022; Raymond, 2024). These methods primarily employ a two-step approach: first, learning a loss function from source datasets/tasks via bilevel optimization under Model-Agnostic Meta-Learning (Finn et al., 2017), and then applying the learned loss to traditional ERM in the target tasks/datasets. While they share some similarities with our approach in relaxing the fixed loss in ERM, they are mainly applied in transfer learning and typically require additional source tasks or datasets to learn the loss, differing from our setting and objectives. + +# 3. Calibrated Loss Ensembles + +As previously mentioned in the introduction, the motivation behind ENSLOSS lies in incorporating different loss functions into SGD updates. The proposed method can be delineated roughly within an informal outline in Table 1 (refer to Algorithm 1 for the formal details). + +Key empirical results. Before delving into the technical details of our method, we begin by providing a representative "epoch-vs-test.accuracy" curve (Figure 1), to underscore + +Table 1. Stochastic calibrated loss ensembles under SGD. Upper: A standard SGD updates (based on a fixed surrogate loss). Lower: Informal outline for the proposed loss ensembles method (please refer to Algorithm 1 for the formal details). + +# SGD + Fixed Loss + +For each iteration: + +- batch sampling from a training set; +- implement SGD on batch samples and a fixed surrogate loss. + +# SGD + Ensemble Loss (ENSLOSS; our) + +For each iteration: + +- batch sampling from a training set; ++ randomly generate a new "valid" surrogate loss; +$\rightarrow$ implement SGD on batch samples and the generated surrogate loss. + +the notable advantages of our proposed method over fixed losses. The experimental results in Figure 1 and Section 4 are highly promising, suggesting that ENSLoss has the potential to significantly improve the performance of the fixed loss framework, with this improvement exhibiting a universal nature across epochs and various network models. The detailed setup and comprehensive evaluation of our method's empirical performance, along with related exploratory experiments, can be found in Section 4. + +Based on the empirical evidence of its promising performance, we are now prepared to discuss the proposed loss ensembles method in detail. Certainly, the generation of surrogate loss functions is not arbitrary; it must still satisfy the requirements for consistency or calibration (Lin, 2004; Zhang, 2004b; Bartlett et al., 2006). Furthermore, the impact of the loss function under SGD is solely reflected in the loss-derivative, as discussed in subsequent sections. Thus, our primary focus is on the development of conditions of "valid" losses or loss-derivatives, as well as how to randomly produce them. + +# 3.1. Calibrated loss-derivative + +In this section, we aim to list the conditions for a valid loss and transform them into loss-derivative conditions, thereby facilitating the usage in SGD training; ultimately, these conditions directly inspire the implementation of our algorithm, with the overall motivation illustrated in Figure 2. + +As indicated in the literature (c.f. Section 2), the well-accepted conditions for a valid surrogate loss $\phi$ are: (i) convexity; (ii) calibration. The key observation of SGD in (3) is that the impact of the loss function $\phi$ on SGD or other (sub)gradient-based algorithms is solely reflected in its lossderivative $\partial \phi$ . Interestingly, the convexity and calibration + +![](images/71a90ee5c3184dbdb2899f77a15cf4579b00e32f4abc6d6b520e35174749783b.jpg) +Figure 1. Comparison of epoch-vs-test\_accuracy curves for various models on CIFAR2 (cat-dog) dataset using ENSLoss (ours) and other fixed losses (logistic, hinge, and exponential losses). The training accuracy curves are omitted, as they have largely stabilized at 1 after few epochs. The pattern shown in the figure, where ENSLoss consistently outperforms the fixed losses across epochs, is a phenomenon observed in almost all CIFAR10 label-pairs and the PCam dataset, and with different scales of ResNet, MobileNet, and VGG architectures. + +![](images/263486238caaea577713532c85915eda77c183a17e9bbd80b0f9bff303ce8491.jpg) + +![](images/22b42d66ea420fb5d52e34a94bcdb3ee35201a0ab9e6e4e2194c07b5252ba02a.jpg) + +![](images/802d0ad2958289d24dbcec5a421f30bc858882e33d390ff58d3c02dbbd95f2bd.jpg) +Figure 2. The overall motivation behind generating "valid" loss-derivatives in our algorithm: first transform the loss conditions (left) into loss-derivative (middle), thereby bypassing the loss and directly generating loss-derivatives in SGD algorithms (right). + +conditions for $\phi$ can also be transformed to $\partial \phi$ : (i) convexity can be ensured by stipulating that its loss-derivative is non-decreasing, and (ii) a series of literature (Lin, 2004; Zhang, 2004b; Lugosi & Vayatis, 2004; Bartlett et al., 2006) is finally summarized in the subsequent theorem, which provides a necessary and sufficient condition for calibration. + +Theorem 3.1 (Classification-calibration; (Bartlett et al., 2006)). Let $\phi$ be convex. Then $\phi$ is classification-calibrated if and only if it is differentiable at $0$ and $\phi'(0) < 0$ . + +Theorem 3.1 effectively transfers the properties of convex calibration from $\phi$ to its loss-derivative $\partial \phi$ , offering a straightforward and convenient approach to validate, design and implement a convex calibrated loss or loss-derivative under SGD implementation. + +# 3.2. Superlinear raising-tail + +Notably, there is one condition that could be easily overlooked yet remains crucial: the surrogate loss function $\phi$ must be nonnegative or bounded below (since we can always add a constant to make it a nonnegative loss, without affecting the optimization). Its importance lies in two-folds. Firstly, it directly influences calibration: the bounded below condition is a necessary condition of calibration, see + +Corollary D.1. Secondly, although some unbounded below losses are proved calibrated in certain specific data distributions, yet they may introduce instability in the training process when using SGD in our numerical experiments, see more discussion in Appendix D. Therefore, we impose the bounded below condition for a loss $\phi$ , or a form of regularity condition on the loss-gradient $\partial \phi$ , see Lemma 3.2. + +Lemma 3.2. Let $\phi$ is convex and calibrated. If there exists a continuous function $g(z) > 0$ such that $\int_{z_0}^{\infty} g(z) dz$ converges, and $\partial \phi(z) / g(z)$ is nondecreasing when $z \geq z_0$ for some $z_0 > 0$ . Then, $\phi$ is bounded below. + +Lemma 3.2 offers an implementation to translate the bounded below condition of loss functions into requirements on the loss-derivatives. Without loss of generality, we set $z_0 = 1$ in the subsequent discussion. This is analogous to the cut-off point in the hinge loss, which can be nullified through scaling $f(\mathbf{x})$ and does not significantly affect performance. Additionally, $g(z)$ can be chosen as $p$ -integrals, i.e., $g(z) = 1 / z^p$ for $p > 1$ . Naturally, a smaller value of $p$ provides more flexibility to $\partial \phi$ . Figure 3 illustrates the rights tails of loss-derivatives for some widely-used loss functions. Intuitively, Lemma 3.2 essentially indicates that the right tail of a valid loss-derivative needs to rise rapidly from $\phi'(0) < 0$ towards zero, either surpassing zero (as in the case of squared loss), or vanishing faster than $1 / z$ when $z$ is large (ignoring the logarithm). We refer to this condition in Lemma 3.2 as a superlinear raising-tailed loss-derivative. + +We now present all the conditions for the loss-derivative of a bounded below convex calibrated loss. Convexity implies that the loss-derivative is nondecreasing, while calibration requires the loss to be differentiable at 0 with $\phi'(0) < 0$ . Additionally, the bounded below assumption yields that the loss-derivative exhibits a superlinear raising-tail. We refer this particular form of loss-derivatives as superlinear raising-tailed calibrated (RC) loss-derivatives. The follow + +![](images/62b8703b363a4766b4d7d7f26284e8f617a4962646fca75649610b065d25c5dd.jpg) +Figure 3. Plot of loss-derivatives of existing losses when $z > 1$ . Conclusion. Lemma 3.2 essentially indicates that the right tail of the loss-derivatives needs to rise rapidly from $\phi'(0) < 0$ towards zero, either surpassing zero (as in the case of squared loss) or vanishing faster than $1/z$ when $z$ is large (ignoring the logarithm). + +ing lemma indicates that RC loss-derivatives essentially correspond to a bounded below convex calibrated loss. + +Lemma 3.3. Given a set of samples $(\mathbf{x}_i, y_i)_{i=1,\dots,B}$ and a classification function $f$ , let $z_i = y_i f(\mathbf{x}_i)$ , and denote $\mathbf{g} = (g_1, \dots, g_B)^\top$ as RC loss-derivatives, that is, satisfying the following conditions: + +1. (Convexity) $g_{i} \leq g_{j}$ if $z_{i} < z_{j}$ , and $g_{i} = g_{j}$ if $z_{i} = z_{j}$ . +2. (Calibration) $g_{i} < 0$ if $z_{i}\leq 0$ +3. (Superlinear) $z_{i}^{p}g_{i}\leq z_{j}^{p}g_{j}$ if $1\leq z_{i} < z_{j},$ for $p > 1$ + +Then, there exists a bounded below convex calibrated loss function $\phi$ , such that $\partial \phi(z_i) = g_i$ for all $i = 1, \dots, B$ . + +Lemma 3.3 sheds light upon the conditions for RC loss-derivatives (or its implicitly corresponding CC loss). Hence, it allows us to bypass the generation of loss and directly generate the loss-derivatives in SGD, thereby inspires doubly stochastic gradients in Algorithm 1. + +Given that Conditions 1 and 3 require at least two samples to demonstrate the properties, our primarily focus on implementing our algorithm using mini-batch SGD. For sake of simplicity in implementation, we directly choose $p = 1$ , as the numerical difference between $z$ and $z^p$ when $p$ is very close to 1 is exceedingly tiny. Our empirical experiments also demonstrate that $p = 1$ does not significantly affect the performance compared with $p$ close to 1, yet not performing superlinear raising tail adjustment on loss-derivatives can significantly impact the performance. + +Doubly stochastic gradients. The most important implication of Lemma 3.3 is that it provides a guideline for generating RC loss-derivatives, as Conditions 1-3 are straightforward to satisfy. For example, we can obtain a set of RC + +# Algorithm 1 (Minibatch) Calibrated ensemble SGD. + +1: Input: a train set $\mathcal{D} = (x_i, y_i)_{i=1}^n$ , a minibatch size $B$ ; +2: Initialize $\theta$ . +3: for number of epochs do +4: /\* Minibatch sampling \*/ +5: Sample a minibatch from $\mathcal{D}$ without replacement: $\mathcal{B} = \{(\mathbf{x}_{i_1},y_{i_1}),\dots ,(\mathbf{x}_{i_B},y_{i_B})\}$ . +6: Compute $\mathbf{z} = (z_{1},\dots ,z_{B})^{\top}$ , where $z_{b} = y_{i_{b}}f_{\theta}(\mathbf{x}_{i_{b}})$ for $b = 1,\dots ,B$ +7: /\* Generate random RC loss-derivs \*/ +8: /* calibration and convexity */ +9: Generate $\mathbf{g} = (g_1, \dots, g_B)^\top$ , where $g_b \stackrel{iid}{\sim} -\xi$ , where $\xi$ is a positive random variable (accomplished through Algorithm 2) +10: Sort $\mathbf{z}$ and $\mathbf{g}$ decreasingly, that is + +$$ +z _ {\pi (1)} > \dots > z _ {\pi (B)}, \quad g _ {\sigma (1)} > \dots > g _ {\sigma (B)}; +$$ + +11: (the derivative corresponding to $z_{b}$ is $g_{\sigma(\pi^{-1}(b))}$ ). +12: /\* bounded below \*/ +13: For $b = 1,\dots ,B$ + +$$ +g _ {\sigma (\pi^ {- 1} (b))} \leftarrow g _ {\sigma (\pi^ {- 1} (b))} / z _ {b}, \quad \text {i f} z _ {b} > 1. +$$ + +14: /\* Update parameters \*/ +15: Compute gradients and update + +$$ +\boldsymbol {\theta} \leftarrow \boldsymbol {\theta} - \frac {\gamma}{B} \sum_ {b = 1} ^ {B} y _ {i _ {b}} g _ {\sigma (\pi^ {- 1} (b))} \nabla_ {\boldsymbol {\theta}} f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i _ {b}}\right) +$$ + +16: end for + +17: Return the estimated $\theta$ + +loss-derivatives by sampling from a positive random variable $\xi$ , then sorting and rescaling. Specifically, in Algorithm $1^{1}$ , the lines 8 to 11 (sampling and sorting) are dedicated to satisfy Conditions 1 and 2; the line 13 (rescaling) is for Condition 3. This implementation approach, which builds upon stochastic gradients by adding an another level of "stochasticity", is thus referred to as doubly stochastic gradients. + +Note that Algorithm 1 does not explicitly implement Condition 2. In fact, for simplicity, we consider a sufficient condition that $g_{i} < 0$ for all $i = 1,\dots ,B$ . This adaptation, made only for implementation simplicity, does not fundamentally alter the framework inspired by Lemma 3.3. Furthermore, the choice of the positive random variable $\xi$ impacts the diversity of the random loss-derivatives. To address this, we propose Algorithm 2 to generate distribution of $\xi$ using the inverse Box-Cox transformation (see discussion in Appendix A). + +# 3.3. Enhance loss diversity via the inverse Box-Cox transformation + +In addition to considering the RC regularity and stochastic generating of loss-derivatives, it is also interesting to further boost the diversity of the loss functions or loss-derivatives generated from our proposed method (Algorithm 1). This could potentially improve the performance of loss ensembles, based on previous experience with ensemble learning (Breiman, 1996; 2001; Wood et al., 2023). + +In fact, the diversity of loss functions in Algorithm 1 is partly associated with the loss-derivatives generated from the variety of positive random distributions. Consequently, a crucial consideration is to generate a sufficiently diverse range of positive random distributions. This naturally invokes the concept of the Box-Cox transformation (Box & Cox, 1964), which transforms (any) positive data via a power transformation with a hyperparameter $\lambda$ such that the transformed data closely approximates a normal distribution. + +$$ +\operatorname {B C} _ {\lambda} (\xi) = \left\{ \begin{array}{l l} \lambda^ {- 1} (\xi^ {\lambda} - 1), & \text {i f} \lambda \neq 0, \\ \log (\xi), & \text {i f} \lambda = 0. \end{array} \right. +$$ + +Interestingly, the Box-Cox transformation is to transform a diverse range of positive random distributions into a normal distribution. This represents our exact "inverse" direction: we need to generate a sufficiently diverse range of positive random distributions. Consequently, we propose the inverse Box-Cox transformation, defined as $\mathrm{invBC}_{\lambda}(\cdot)$ in (4). + +$$ +\operatorname {i n v B C} _ {\lambda} (\xi) = \left\{ \begin{array}{l l} (1 + \lambda \xi) _ {+} ^ {1 / \lambda}, & \text {i f} \lambda \neq 0, \\ \exp (\xi), & \text {i f} \lambda = 0. \end{array} \right. \tag {4} +$$ + +On this ground, the final loss-derivatives can be generated in this manner, see Algorithm 2. First, we generate derivatives from a standard normal distribution, then using the inverse Box-Cox transformation (4) (with a random $\lambda$ ) transforms them into an arbitrary positive random distribution. This guarantees a variety in the loss function during the ensemble process over SGD. Here, the randomness of $\lambda$ is used to control a diverse range of loss-derivatives. + +In our numerical experiments, we fix $\lambda = 0$ (no hyperparameter tuning) for a fair comparison, which corresponds to an exponential transformation of normally distributed random variables. In practice, to further enhance loss diversity, we can implement random sampling of $\lambda$ every $T$ epochs. This approach presents beneficial in certain cases, as demonstrated in our ablation studies presented in Table 6. However, determining a reasonable value of $T$ in a straightforward manner likely requires further investigation in future research. + +Algorithm 2 Inverse Box-Cox transform of loss-derivatives. + +1: Input: a minibatch size $B$ , a hyperparameter $\lambda$ (default $\lambda = 0$ ) +2: /* Generate normal grad */ +3: Generate $\mathbf{g} = (g_1, \dots, g_B)^\intercal$ , where $g_b \stackrel{iid}{\sim} N(0, 1)$ +4: /\* Inverse Box-Cox transformation \*/ + +$$ +g _ {b} \leftarrow - \operatorname {i n v B C} _ {\lambda} (g _ {b}) +$$ + +5: Return the generated loss-derivatives $\mathbf{g} = (g_1, \dots, g_B)^\top$ . + +# 3.4. Statistical consistency of loss ensembles + +In this section, we establish a theoretical framework to analyze the statistical behavior and consistency of the proposed loss ensemble framework. Our idea comprises two primary steps: first, aligning the proposed method with a novel risk function; second, leveraging learning theory to evaluate the calibration and consistency of the risk function. + +To proceed, we introduce relevant definitions to construct the corresponding risk function for the proposed method. Specifically, we denote $\mathcal{L}$ as a measurable space consisting of bounded below convex calibrated (BCC) losses. A random surrogate loss $\Phi$ is considered as a $\mathcal{L}$ -valued random variable, where a loss $\phi$ represents an observation or sample of $\Phi$ . Note that in our analysis, $\Phi$ is assumed independent of $(\mathbf{X}, Y)$ ; for detailed probabilistic definitions of random variables in functional spaces, refer to (Mourier, 1953; Vakhania et al., 2012). On this ground, we introduce the calibrated ensemble risk function as follows: + +$$ +\bar {R} (f) := \mathbb {E} _ {\mathbf {X}, Y} \left(\mathbb {E} _ {\Phi} \Phi (Y f (\mathbf {X}))\right), \tag {5} +$$ + +where $\mathbb{E}_{\Phi}$ is the expectation taken with respect to $\Phi$ . In this content, given a classification function $f_{\theta}$ , with a minibatch data $(\mathbf{x}_i,y_i)_{i\in \mathcal{I}_B}$ and the sampled loss $\Phi = \phi$ , the stochastic gradient of $\overline{R}$ in SGD is defined as: + +$$ +\widehat {\mathbf {g}} = \frac {1}{| \mathcal {I} _ {B} |} \sum_ {i \in \mathcal {I} _ {B}} \nabla_ {\boldsymbol {\theta}} \phi \left(y _ {i} f _ {\boldsymbol {\theta}} \left(\mathbf {x} _ {i}\right)\right). \tag {6} +$$ + +Thus, the proposed method (Algorithm 1) can be regarded as the SGD updating based on $\widehat{\mathbf{g}}$ , and $\overline{R}(\cdot)$ is an appropriate risk function for characterizing the proposed method. + +Next, we discuss the loss space $\mathcal{L}$ . To ensure the calibration of the proposed method, we require that $\mathcal{L}$ is a measurable subspace of the collection of all BCC losses: + +$$ +\mathcal {L} \subset \left\{\phi \text {i s c o n v e x} \mid \inf _ {z} \phi (z) > - \infty , \phi^ {\prime} (0) < 0 \right\}. +$$ + +Assumption 3.4. Let $(\Omega, \mu)$ be a probability space and $\mathcal{L}$ be a measurable space. Suppose $\Phi: \Omega \to \mathcal{L}$ is a $\mathcal{L}$ -valued random variable satisfies following conditions. + +1. $\mathbb{E}\Phi (z)$ exists and $\mathbb{E}\Phi (z) < \infty$ for any given $z\in \mathbb{R}$ +2. There exists a random variable $U:\Omega \to \mathbb{R}$ such that $\Phi (z)\geq U$ a.s.for all $z$ and $\mathbb{E}U > - \infty$ +3. There exist a random variable $G:\Omega \to \mathbb{R}$ and a constant $\delta_0 > 0$ , such that $|\partial \Phi (\delta)|\leq G$ a.s. for any $\delta \in [-\delta_0,\delta_0]$ and $\mathbb{E}G < \infty$ . + +Assumption 3.4 characterizes the feasibility of the loss space $\mathcal{L}$ and probability measure $\mu$ , thereby establishing the scope of applicability for our proposed method. Notably, a finite loss space automatically satisfies Assumption 3.4. + +Lemma 3.5. If the loss space $\mathcal{L}$ is finite, then Assumption 3.4 is automatically satisfied. + +Indeed, $\mathcal{L}$ can be extended to a more general functional space, subject to the mild uniform assumptions in Assumption 3.4, which are necessary to preserve the completeness of BCC properties. For example, limiting over $\mathcal{L}$ without uniform assumptions may violate the calibration condition. In practice, during SGD training, the number of epochs is typically fixed, which implies that the number of ensemble losses implemented is also fixed. As a result, our analysis of the proposed method in practical scenarios can be exclusively focused on a finite $\mathcal{L}$ case. + +Now, we have aligned the proposed method with the proposed ensemble risk (5). Hence, we can infer the statistical behavior of our method by analyzing $\overline{R}$ . Of primary requirement is the calibration or Fisher-consistency, as formally stated in the following theorem. + +Theorem 3.6 (Calibration). Suppose Assumption 3.4 holds, and $\overline{R}(\cdot)$ is defined as in (5) for any distributions $\mathbb{P}_{\mathbf{X},Y}$ and $\mathbb{P}_{\Phi}$ , then for every sequence of measurable function $f_{n}$ , + +$$ +\bar {R} \left(f _ {n}\right)\rightarrow \inf _ {f} \bar {R} (f) \quad \text {i m p l i e s t h a t} \quad R \left(f _ {n}\right)\rightarrow \inf _ {f} R (f). \tag {7} +$$ + +Moreover, the excess risk bound is provided as: + +$$ +R (f) - \inf _ {f} R (f) \leq \psi^ {- 1} \left(\bar {R} (f) - \inf _ {f} \bar {R} (f)\right), \tag {8} +$$ + +where $\psi^{-1}$ is the inverse function of $\psi$ , and $\psi$ is defined as: + +$$ +\psi (\theta) = \mathbb {E} \bigl (\Phi (0) \bigr) - \inf _ {\alpha \in \mathbb {R}} \mathbb {E} \bigl (\frac {1 + \theta}{2} \Phi (\alpha) + \frac {1 - \theta}{2} \Phi (- \alpha) \bigr). +$$ + +Theorem 3.6 ensures the classification-calibration of the proposed method, indicating that minimizing the ensemble calibrated risk $\overline{R}$ would provide a reasonable surrogate for minimizing $R(f)$ . Furthermore, the excess risk bound is also provided in (8), which enables presenting the relationship between $R(f) - R^{*}$ and $\overline{R}(f) - \overline{R}^{*}$ when the distribution of $\Phi$ is given. + +In addition, there is a substantial amount of literature that discusses the convergence results based on (batch) SGD + +(Moulines & Bach, 2011; Shamir & Zhang, 2013; Fehrman et al., 2020; Garrigos & Gower, 2023). Given that the stochastic gradient $\widehat{\mathbf{g}}$ in (6) for the proposed method offers an unbiased estimate of $\nabla_{\theta}\overline{R}(f_{\theta})$ , many existing SGD convergence results can be extended to our ensemble setting, ensuring that $\overline{R}(f_n) \to \inf_f \overline{R}(f)$ . + +By combining the convergence results from SGD and the calibration established in Theorem 3.6, we demonstrate that the proposed loss ensemble preserves statistical consistency for classification accuracy. We illustrate the usage of the theorem by a toy example in Example C.1 of Appendix C. + +The proposed method appears to have an analogous effect to bagging (Buhlmann & Yu, 2002; Soloff et al., 2024). We next provide theoretical insights into a natural question: what advantages do loss ensembles offer over a fixed loss approach? We partially address this question by examining the Rademacher complexity. Specifically, given a classification function space $\mathcal{F}$ , the Rademacher complexity of $\phi$ -classification are defined as follows: + +$$ +\operatorname {R a d} _ {\phi} (\mathcal {F}) := \sup _ {f \in \mathcal {F}} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \tau_ {i} \phi \left(Y _ {i} f \left(\mathbf {X} _ {i}\right)\right) \right|, +$$ + +where $(\tau_{i})_{i = 1}^{n}$ are i.i.d. Rademacher random variables independent of $(\mathbf{X}_i,Y_i)_i^n$ . The Rademacher complexity plays a crucial role in many existing concentration inequalities (Talagrand, 1996a;b; Bousquet, 2002), determining the convergence rate of the excess risk (Bartlett & Mendelson, 2002) (with smaller values yielding a faster rate). On this ground, the corresponding Rademacher complexity for the proposed ensemble loss method can be formulated as: + +$$ +\begin{array}{l} \overline {{\operatorname {R a d}}} (\mathcal {F}) := \sup _ {f \in \mathcal {F}} \left| \frac {1}{n} \sum_ {i = 1} ^ {n} \tau_ {i} \mathbb {E} _ {\Phi} \Phi (Y _ {i} f (\mathbf {X} _ {i})) \right| \\ \leq \mathbb {E} _ {\Phi} \left(\operatorname {R a d} _ {\Phi} (\mathcal {F})\right), \tag {9} \\ \end{array} +$$ + +where the inequality follows from the Jensen's inequality. This simple deduction yields a positive result, that is, the Rademacher complexity of the ensemble loss is no worse than the average based on the set of fixed losses. Yet, (9) only partially showcases potential benefits of loss ensemble, but it does not provide conclusive evidence of its superiority over fixed losses, as a comparison of their excess risk bounds is also crucial. In fact, ensemble loss appears suboptimal in terms of distribution-free excess risk bounds. Furthermore, achieving definitive and practical conclusions across specific datasets or distributions remains a longstanding challenge for statistical analysis. The development of more effective combining weights, as in ensemble learning (Yang, 2004; Audibert, 2004; Dalalyan & Tsybakov, 2007), may provide a promising solution for future research. + +# 4. Experiments + +This section presents experiments comparing ENSLOSS with fixed loss methods and assessing its compatibility with regularization methods. All Python codes is openly accessible at our GitHub. All experimental results, up to the epoch level, are publicly available on our W&B projects ENSLOSS-IMG and ENSLOSS-TAB, enabling transparent and detailed tracking and analysis. + +# 4.1. Datasets, models and losses + +Image datasets. We present the empirical results for image benchmark datasets: the CIFAR10 (Krizhevsky et al., 2009) and the PatchCamelyon (PCam; (Veeling et al., 2018)). CIFAR10 was originally designed for multiclass image classification. In our study, we construct 45 binary CIFAR datasets, denoted as CIFAR2, by selecting all possible pairs of two classes from CIFAR10, which enables the evaluation of our method. PCam is a binary image classification dataset comprising 327,680 96x96 images from histopathologic scans of lymph node sections, each annotated with a label indicating the presence or absence of metastatic tissue. CIFAR and PCam datasets are widely recognized benchmarks in image classification, frequently employed in various studies, such as (He et al., 2016; Huang et al., 2017; Srinidhi et al., 2021). + +Tabular datasets. We applied a filtering $(n\geq 1000,d\geq$ 1000) across all OpenML (Vanschoren et al., 2014) binary classification dense datasets, resulting 14 datasets: Biore-sponse, guillermo, riccardo, christine, hiva-agnostic, and 9 OVA datasets: Breast, Uterus, Ovary, Kidney, Lung, Omentum, Colon, Endometrium, and Prostate. + +Models. To assess the effectiveness of the proposed method, we explore a range of commonly used neural network structures, including Multilayer Perceptrons (MLPs; (Hinton, 1990)) with varying depths for tabular data, as well as VGG (Simonyan & Zisserman, 2014), ResNet (He et al., 2016), and MobileNet (Sandler et al., 2018) for image data. + +Fixed losses. ENSLOSS is benchmarked against with the ERM framework (2) using three widely adopted fixed classification losses: the logistic loss (BCE; binary cross entropy), the hinge loss (HINGE), and the exponential loss (EXP). + +# 4.2. Evaluation + +All experiments are replicated 5 (for image data) or 10 (for tabular data) times, and the resulting accuracy values are reported. Moreover, to evaluate the statistical significance, p-values are calculated using a one-tailed paired sample $t$ -test, with the null and alternative hypotheses defined as: + +$$ +H _ {0}: \operatorname {A c c} _ {\mathcal {A}} \leq \operatorname {A c c} _ {\mathcal {B}}, \quad H _ {1}: \operatorname {A c c} _ {\mathcal {A}} > \operatorname {A c c} _ {\mathcal {B}}, \tag {10} +$$ + +where $\mathrm{Acc}_{\mathcal{A}}$ and $\mathrm{Acc}_{\mathcal{B}}$ are accuracies provided by two compared methods. A p-value of $\leq 0.05$ indicates strong evi + +dence suggesting that $\mathcal{A}$ outperforms $\mathcal{B}$ . Pairwise hypothesis tests are performed for each pair of methods. If a method exhibits statistical significance compared to all other methods, it will be highlighted in bold font in the tables. Our primary focus is on accuracy, but we also provide AUC results in our accompanying W&B projects and GitHub repository. + +# 4.3. ENSLOSS vs fixed loss methods + +This section presents our experimental results, wherein we examine the numerical performance of ENSLOSS and compare it with other fixed loss methods across various setups. + +Design. The experiment design is straightforward: we compare various methods on 46 image datasets (including 45 CIFAR2 datasets and the PCam dataset) and 14 OpenML tabular datasets and using different network architectures. The implementation settings for each method are identical, with the only difference in loss functions. + +Results. Due to space limitations, we only present the summary statistics of significant testing results across all datasets in Table 2 (for 14 tabular datasets) and Table 3 (for 45 CIFAR2 datasets). Moreover, some highlighting detailed empirical results are provided in Appendix B, and all performance metrics for all experiments are publicly accessible at the epoch level via our W&B projects. + +Conclusion. The key findings are summarized as follows. + +Image data. Tables 9 - 10 and Figure 4 demonstrate that ENSLOSS consistently outperforms existing fixed loss methods. (i) The improvement is universal across experiments. As shown in Table 9, ENSLOSS achieves non-inferior performance in all 45 CIFAR2 datasets, and significantly outperforms ALL other methods in at least $60\%$ of the datasets. (ii) The improvement is remarkable, with substantial gains of $3.84\%$ and $3.79\%$ observed in CIFAR2 (cat-dog) and PCam, respectively, surpassing the best fixed loss method paired with the optimal network architecture. + +Tabular data. Table 11 reveals that: (i) When dealing with overparameterized models, ENSLOSS tends to be a more desirable option compared to fixed losses, whereas for less complex models, ENSLOSS may underperform or outperform on certain datasets compared to the optimal fixed loss, yet it remains a viable alternative worth considering overall. (ii) The effectiveness of ENSLOSS exhibits a clear upward trend as model complexity increases, as evident from the performance comparison from MLP(1) to MLP(5). + +The superiority of ENSLOSS is more pronounced in image data than in tabular data, likely attributable to the increased risk of overfitting associated in high-dimensional inputs and complex models characteristic of image datasets. + +The improvement is also prominently reflected at the epoch level, particularly after the training accuracy for the pro + +posed ENSLOSS reaches or approaches one, as suggested by the epoch-vs-test.accuracy curves in Figure 1 (and those for all experiments in our W&B projects). This is crucial for practitioners: by specifying a relatively large number of epochs, ENSLOSS is a promising choice compared to fixed loss methods; furthermore, its training accuracy can sometimes serve as a key indicator for early-stopping, obviating the need of a validation set. + +Table 2. The summary statistics of datasets exhibiting statistical significance when comparing the proposed ENSLOSS against all other fixed loss methods in 45 CIFAR2 binary classification datasets (provided by pairwise labels subset of CIFAR10) are presented. The significance of "better", "no diff", and "worse" are suggested by the significance test, as described in Section 4.2. + +
(ENSLOSS) MODELS(vs BCE) (better, no diff, worse)(vs EXP) with p < 0.05(vs HINGE)
ResNet34(41, 4, 0)(45, 0, 0)(36, 9, 0)
ResNet50(42, 3, 0)(45, 0, 0)(43, 2, 0)
ResNet101(39, 6, 0)(45, 0, 0)(40, 5, 0)
VGG16(36, 9, 0)(45, 0, 0)(29, 16, 0)
VGG19(36, 9, 0)(45, 0, 0)(27, 18, 0)
MobileNet(45, 0, 0)(45, 0, 0)(44, 1, 0)
MobileNetV2(45, 0, 0)(45, 0, 0)(45, 0, 0)
+ +Table 3. The summary statistics of datasets exhibiting statistical significance when comparing the proposed ENSLOSS against all other fixed loss methods in 14 OpenML datasets are presented. + +
(ENSLOSS) +MODELS(vs BCE) +(better, no diff, worse)(vs EXP) +with p < 0.05(vs HINGE)
MLP(1)(9, 4, 1)(7, 5, 2)(5, 4, 5)
MLP(3)(7, 7, 0)(8, 5, 1)(9, 3, 2)
MLP(5)(11, 3, 0)(11, 2, 1)(13, 0, 1)
+ +# 4.4. Compatibility of prevent-overfitting methods + +As discussed in Section 2, the proposed ENSLOSS complements most existing prevent-overfitting methods, suggesting the potential for their simultaneous use. In this experiment, we empirically investigate the compatibility of ENSLOSS with widely used regularization methods: DROPOUT, L2-regularization (or equivalently weight decay, denoted as WEIGHTD), and data augmentation (DATAAUG; (Wong et al., 2016; Xu et al., 2016)). + +Design and results. To illustrate the compatibility, we conduct on the CIFAR-2 (cat-dog) dataset and ResNet50, using the same experimental setup as the main experiment. Specifically, we compare the performance of ENSLOSS with fixed losses under various regularization methods, and the results are presented in Table 4, which illustrates their compatibility and effectiveness in preventing overfitting. + +Conclusion. According to Table 4, our prior hypothesis is confirmed: ENSLoss is compatible with other regularization methods, and their combination yields additional + +Table 4. The averaged accuracy (with AUC included in our Github repository, exhibiting similar patterns) and their standard errors (in parentheses) for all methods with various regularization on the CIFAR2 (cat-dog) image dataset are presented. "HP" indicates the corresponding hyperparameter for each regularization method. + +
REGHPBCEEXPHINGEENSLOSS
NO REG; +baseline—67.99(0.30)60.09(0.19)68.19(0.40)69.52(1.38)
WEIGHTD5e-567.64(0.14)60.43(0.23)68.26(0.65)71.01(1.04)
5e-467.59(0.35)61.57(0.56)67.57(0.28)72.04(0.35)
5e-368.00(0.31)62.26(0.45)68.26(0.35)70.84(0.67)
DROPOUT0.167.50(0.39)60.70(0.34)67.89(0.30)72.48(0.22)
0.268.13(0.54)60.02(0.52)67.78(0.44)70.08(1.28)
0.367.65(0.29)59.70(0.46)67.78(0.49)72.44(0.68)
DATAAUG—79.22(0.12)58.96(0.31)80.47(0.26)83.00(0.25)
+ +benefits in mitigating overfitting. Moreover, the advantages of ENSLOSS is further demonstrated by its consistent superior performance compared to other fixed losses, even with additional regularization methods. Another benefit of ENSLOSS is its relative insensitivity from time-consuming hyperparameter tuning, as a simple strategy of setting a large epoch often yields improved performance. + +# 5. Conclusion + +ENSLOSS is a framework designed to enhance ML performance by mitigating overfitting. The proposed method has shown potential to improve performance across a wide variety of datasets and models, particularly for overparameterized models. The primary motivation behind consists of two components: "ensemble" and the "calibration" of the loss functions. Therefore, this concept can be extensively applied to various ML problems, by identify the specific conditions for loss consistency or calibration. Fortunately, some consistency conditions have been extensively studied in the literature, including Section 4 in (Zhang, 2004a), Theorem 1 in (Zou et al., 2008), gamma-phi losses in (Wang & Scott, 2023), Theorem 7 in (Tewari & Bartlett, 2007) and encoding methods in (Lee et al., 2004) for multi-class classification, Theorem 2 in (Gao & Zhou, 2015) for bipartite ranking or AUC optimization, and Theorem 3.4 in (Scott, 2012) for asymmetric classification. In addition, new discussions regarding consistency, such as $H$ -consistency (Awasthi et al., 2022), would also be intriguing in the context of ensembles with specific functional spaces. + +A limitation of ENSLOSS is that it often requires more epochs to achieve stable training (see Table 8), resulting in longer training times. This issue is also seen in stochastic regularization methods like Dropout. Additionally, the selection of the positive random variable $\xi$ during random loss-derivative generation, currently done using the inverse Box-Cox transformation, needs further investigation. + +# Acknowledgements + +We thank the anonymous Area Chair and some reviewers for their valuable feedback, suggestions and support. This work was supported by the Hong Kong RGC-ECS Grant 24302422 and Hong Kong RGC Grant 14304823. + +# 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 + +Aronszajn, N. Theory of reproducing kernels. Transactions of the American Mathematical Society, 68(3):337-404, 1950. +Audibert, J.-Y. Aggregated estimators and empirical complexity for least square regression. In Annales de l'IHP Probabilités et Statistiques, volume 40, pp. 685-736, 2004. +Awasthi, P., Mao, A., Mohri, M., and Zhong, Y. H-consistency bounds for surrogate loss minimizers. In International Conference on Machine Learning, pp. 1117-1174. PMLR, 2022. +Bartlett, P. L. and Mendelson, S. Rademacher and gaussian complexities: Risk bounds and structural results. Journal of Machine Learning Research, 3(Nov):463-482, 2002. +Bartlett, P. L., Jordan, M. I., and McAuliffe, J. D. Convexity, classification, and risk bounds. Journal of the American Statistical Association, 101(473):138-156, 2006. +Bechtle, S., Molchanov, A., Chebotar, Y., Grefenstette, E., Righetti, L., Sukhatme, G., and Meier, F. Meta learning via learned loss. In 2020 25th International Conference on Pattern Recognition (ICPR), pp. 4161-4168. IEEE, 2021. +Bottou, L. Online algorithms and stochastic approximations. Online Learning in Neural Networks, 1998. +Bousquet, O. A pennett concentration inequality and its application to suprema of empirical processes. Comptes Rendus Mathematique, 334(6):495-500, 2002. +Box, G. E. and Cox, D. R. An analysis of transformations. Journal of the Royal Statistical Society Series B: Statistical Methodology, 26(2):211-243, 1964. +Breiman, L. Bagging predictors. Machine Learning, 24: 123-140, 1996. + +Breiman, L. Random forests. Machine Learning, 45:5-32, 2001. +Buhlmann, P. and Yu, B. Analyzing bagging. Annals of Statistics, 30(4):927-961, 2002. +Cortes, C. and Vapnik, V. Support-vector networks. Machine Learning, 20:273-297, 1995. +Cox, D. R. The regression analysis of binary sequences. Journal of the Royal Statistical Society Series B: Statistical Methodology, 20(2):215-232, 1958. +Dalalyan, A. S. and Tsybakov, A. B. Aggregation by exponential weighting and sharp oracle inequalities. In International Conference on Computational Learning Theory, pp. 97-111. Springer, 2007. +Evans, L. Measure Theory and Fine Properties of Functions. Routledge, 2018. +Fehrman, B., Gess, B., and Jentzen, A. Convergence rates for the stochastic gradient descent method for non-convex objective functions. Journal of Machine Learning Research, 21(136):1-48, 2020. +Finn, C., Abbeel, P., and Levine, S. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126-1135. PMLR, 2017. +Freund, Y. and Schapire, R. E. A desicion-theoretic generalization of on-line learning and an application to boosting. In European Conference on Computational Learning Theory, pp. 23-37. Springer, 1995. +Gao, B., Gouk, H., Yang, Y., and Hospedales, T. Loss function learning for domain generalization by implicit gradient. In International Conference on Machine Learning, pp. 7002-7016. PMLR, 2022. +Gao, W. and Zhou, Z.-H. On the consistency of auc pairwise optimization. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, pp. 939-945, 2015. +Garrigos, G. and Gower, R. M. Handbook of convergence theorems for (stochastic) gradient methods. arXiv preprint arXiv:2301.11235, 2023. +Gonzalez, S. and Miikkulainen, R. Optimizing loss functions through multi-variate taylor polynomial parameterization. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 305-313, 2021. +Goodfellow, I., Bengio, Y., and Courville, A. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org. + +Hastie, T., Rosset, S., Zhu, J., and Zou, H. Multi-class adaboost. Statistics and its Interface, 2(3):349-360, 2009. +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. Connectionist learning procedures. In Machine Learning, pp. 555-610. Elsevier, 1990. +Hiriart-Urruty, J.-B. and Lemarechal, C. Convex Analysis and Minimization Algorithms I: Fundamentals, volume 305. Springer science & business media, 1996. +Hoerl, A. E. and Kennard, R. W. Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1):55-67, 1970. +Huang, G., Liu, Z., Van Der Maaten, L., and Weinberger, K. Q. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4700-4708, 2017. +Krizhevsky, A., Hinton, G., et al. Learning multiple layers of features from tiny images. Toronto, ON, Canada, 2009. +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., Orr, G. B., and Müller, K.-R. Efficient backprop. In Neural Networks: Tricks of the Trade, pp. 9-50. Springer, 2002. +LeCun, Y., Bengio, Y., and Hinton, G. Deep learning. Nature, 521(7553):436-444, 2015. +Lee, Y., Lin, Y., and Wahba, G. Multicategory support vector machines: Theory and application to the classification of microarray data and satellite radiance data. Journal of the American Statistical Association, 99(465):67-81, 2004. +Leng, Z., Tan, M., Liu, C., Cubuk, E. D., Shi, X., Cheng, S., and Anguelov, D. Polyloss: A polynomial expansion perspective of classification loss functions. arXiv preprint arXiv:2204.12511, 2022. +Lin, T.-Y., Goyal, P., Girshick, R., He, K., and Dólár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2980-2988, 2017. +Lin, Y. A note on margin-based loss functions in classification. Statistics & probability letters, 68(1):73-82, 2004. + +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. +Lugosi, G. and Vayatis, N. On the bayes-risk consistency of regularized boosting methods. Annals of Statistics, 32(1): 30-55, 2004. +Moulines, E. and Bach, F. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. Advances in Neural Information Processing Systems, 24, 2011. +Mourier, E. Éléments aléatoires dans un espace de banach. In Annales de l'institut Henri Poincaré, volume 13, pp. 161-244, 1953. +Raymond, C. Meta-learning loss functions for deep neural networks. arXiv preprint arXiv:2406.09713, 2024. +Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., and Chen, L.-C. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4510-4520, 2018. +Scott, C. Calibrated asymmetric surrogate losses. Electronic Journal of Statistics, 6:958-992, 2012. +Shamir, O. and Zhang, T. Stochastic gradient descent for non-smooth optimization: Convergence results and optimal averaging schemes. In International Conference on Machine Learning, pp. 71-79. PMLR, 2013. +Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +Soloff, J. A., Barber, R. F., and Willett, R. Bagging provides assumption-free stability. Journal of Machine Learning Research, 25(131):1-35, 2024. +Srinidhi, C. L., Ciga, O., and Martel, A. L. Deep neural network models for computational histopathology: A survey. Medical Image Analysis, 67:101813, 2021. +Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I., and Salakhutdinov, R. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929-1958, 2014. +Talagrand, M. New concentration inequalities in product spaces. Inventiones Mathematicae, 126(3):505-563, 1996a. +Talagrand, M. A new look at independence. Annals of Probability, pp. 1-34, 1996b. +Tewari, A. and Bartlett, P. L. On the consistency of multiclass classification methods. Journal of Machine Learning Research, 8(5), 2007. + +Tibshirani, R. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society Series B: Statistical Methodology, 58(1):267-288, 1996. +Vakhania, N., Tarieladze, V., and Chobanyan, S. Probability distributions on Banach spaces, volume 14. Springer Science & Business Media, 2012. +Vanschoren, J., Van Rijn, J. N., Bischl, B., and Torgo, L. Openml: networked science in machine learning. ACM SIGKDD Explorations Newsletter, 15(2):49-60, 2014. +Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017. +Veeling, B. S., Linmans, J., Winkens, J., Cohen, T., and Welling, M. Rotation equivariant CNNs for digital pathology. June 2018. +Wahba, G. An introduction to reproducing kernel hilbert spaces and why they are so useful. In Proceedings of the 13th IFAC Symposium on System Identification (SYSID 2003), pp. 525-528, 2003. +Wang, Y. and Scott, C. On classification-calibration of gamma-phi losses. In The Thirty Sixth Annual Conference on Learning Theory, pp. 4929–4951. PMLR, 2023. +Wolpert, D. H. Stacked generalization. Neural Networks, 5 (2):241-259, 1992. +Wong, S. C., Gatt, A., Stamatescu, V., and McDonnell, M. D. Understanding data augmentation for classification: when to warp? In 2016 International Conference on Digital Image Computing: Techniques and Applications (DICTA), pp. 1-6. IEEE, 2016. +Wood, D., Mu, T., Webb, A. M., Reeve, H. W., Lujan, M., and Brown, G. A unified theory of diversity in ensemble learning. Journal of Machine Learning Research, 24 (359):1-49, 2023. +Xu, Y., Jia, R., Mou, L., Li, G., Chen, Y., Lu, Y., and Jin, Z. Improved relation classification by deep recurrent neural networks with data augmentation. In Proceedings of COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, pp. 1461-1470. The COLING 2016 Organizing Committee, December 2016. +Yang, Y. Combining forecasting procedures: some theoretical results. *Econometric Theory*, 20(1):176-222, 2004. +Zhang, T. Statistical analysis of some multi-category large margin classification methods. Journal of Machine Learning Research, 5(Oct):1225-1251, 2004a. + +Zhang, T. Statistical behavior and consistency of classification methods based on convex risk minimization. Annals of Statistics, 32(1):56-85, 2004b. +Zou, H. and Hastie, T. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society Series B: Statistical Methodology, 67(2):301-320, 2005. +Zou, H., Zhu, J., and Hastie, T. New multicategory boosting algorithms based on multicategory fisher-consistent losses. Annals of Applied Statistics, 2(4):1290, 2008. + +# A. Ablation studies + +The necessity of the bounded below condition. The bounded below condition is an important yet easily overlooked condition. Here, we present ablation studies to demonstrate its significance. Our experimental setup is straightforward—we simply remove the superlinear raising-tail condition induced by the bounded below condition (Line 13 in Algorithm 1). + +Table 5 presents typical training and test performance metrics at 20-epoch intervals for CIFAR2 (dog-cat) using VGG16, comparing models with and without this condition. Similar patterns are consistently observed across all datasets and network architectures. + +
epoch20406080100120140160180200
w/o B-below
Train Acc0.4980.5030.4990.4980.4910.4990.5010.5060.5020.502
Test Acc0.4880.5080.5070.4950.5080.4880.5070.4910.4920.493
w/ B-below
Train Acc0.9611.0001.0001.0001.0001.0001.0001.0001.0001.000
Test Acc0.7410.8260.8270.8270.8270.8270.8290.8270.8260.828
+ +According to Table 5, without the bounded below condition, the model fails to learn, achieving only random-level performance ( $\sim 50\%$ accuracy) throughout training. In contrast, with the bounded below condition implemented, the model achieves high training accuracy ( $100\%$ ) and demonstrates good generalization with approximately $83\%$ test accuracy. + +From a loss-derivative perspective, the explanation is straightforward: Line 13 implements a superlinear loss-derivative that effectively discounts gradients for correctly classified samples ( $z = yf(\mathbf{x}) > 1$ ). This focuses optimization efforts on misclassified or boundary samples, a common design principle in classification loss functions. + +When this condition (Line 13) is reflected into a loss function as a boundedness below constraint, the result is somewhat counterintuitive and unexpected. However, within the framework of convexity and calibration, the boundedness below condition appears to take on additional significance: Lemma 3.2 suggests that this condition provides essential regularity for the right tail of the loss-derivative. Additionally, in the Appendix D, we provide a more comprehensive theoretical investigation of the importance of the bounded below condition for loss calibration. + +Randomly updating the inverse Box-Cox transformation. The performance of ENSLOSS, based on ResNet50 and CIFAR2 datasets, with varying values of $T$ , is presented in Table 6, under the same experimental setting as described in Section 4.3. + +Table 5. Comparison of training and testing accuracy with and without the bounded below (B-below) condition across different epochs. The results indicate that the absence of the bounded below condition leads to model fail to learn. + +
DATASETSfixed λ = 0 +(used in Section 4)T = 10T = 20T = 50
CIFAR2 (cat-dog)70.04(1.21)70.87(0.72)71.48(0.62)70.22(1.11)
CIFAR2 (bird-cat)81.12(0.28)80.45(0.30)80.58(0.38)80.63(0.47)
CIFAR2 (cat-deer)83.11(0.29)83.05(0.12)82.82(0.25)83.47(0.15)
+ +Table 6. The averaged classification Accuracy and their standard errors (in parentheses), for different periods $T$ of randomly updating inverse Box-Cox transformation based on ResNet50 are reported for CIFAR2 datasets. + +These preliminary experiments suggest that randomly updating $\lambda$ over epochs can be beneficial in certain cases; however, the effects are not particularly significant, and identifying the optimal value for this tuning parameter seems challenging. Consequently, we implement experiments in Section 4 with a fixed $\lambda = 0$ , which corresponds to an exponential transformation of normally distributed random variables, and defer further investigation of this topic for future research. + +Baseline of post-ensemble over fixed losses. We supplement our comparison by evaluating our approach against baselines of post-ensembling fixed losses. For illustration, we report test performance for model averaging (AVERAGE) and majority + +
BCEEXPHINGEAVERAGEVOTINGENSLOSS
(Acc)67.53 (1.05)67.30 (0.38)67.90 (1.33)70.61 (1.09)69.67 (1.59)72.37 (1.04)
(AUC)74.31 (0.73)73.94 (0.75)74.39 (0.93)77.63 (0.37)—79.81 (1.14)
+ +voting (VOTING) on CIFAR2 (dog-cat) using ResNet50 trained with three fixed losses. Similar patterns are observed across all datasets and network architectures. The results are presented in Table 7. + +As shown, post-ensembling indeed improves single fixed loss methods, but the proposed ENSLOSS still performs better. The challenge with post-ensembling is that selecting too many fixed losses requires substantial computational costs of training, while combining too few losses produces less effect. A key advantage of ENSLOSS is that it requires only a single model training. Therefore, ENSLOSS differs from post-ensembling methods in practical application. + +# B. Highlighting empirical results + +In this section, we highlight some detailed empirical results of our proposed method, ENSLOSS, and compare it with other fixed loss methods on various image and tabular datasets. All detailed performance metrics for all experiments are publicly accessible at the epoch level via our Github repository and W&B projects. + +Training time comparison. To more accurately compare the computational differences between ENSLOSS and fixed loss training, we provide detailed time comparisons between BCE, Hinge, and ENSLOSS in Table 8. Specifically, we report the minimum number of epochs required for training accuracy to stabilize (defined as remaining within an error margin of 0.005 thereafter) across different neural network architectures on the CIFAR2 (cat-dog) dataset. + +Table 7. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of model combination methods in the image dataset CIFAR2 (cat-dog) based on ResNet50 are presented. Bold font is used to denote statistical significant improvements over ALL other competitors. + +
LossMobileNetMobileNetV2ResNet101ResNet34ResNet50VGG16VGG19
BCE90808070451545
HINGE40356025352535
ENSLOSS1109016014515055150
+ +Table 8. Comparison of minimum epochs required for training accuracy to stabilize (within an error margin of 0.005) across different neural network architectures on the CIFAR2 (cat-dog) dataset. + +As indicated in Table 8, ENSLOSS training typically requires 2-3 times more epochs than traditional BCE or Hinge loss training to stabilize the training procedure. This computational overhead is acceptable for practical applications, and we are actively exploring methods to reduce the training time in future work. + +Performance on CIFAR2 datasets. Figure 4 illustrates the overall pattern of performance of all methods in 45 CIFAR2 binary classification datasets. Table 9 presents the performance results (accuracy and AUC values) for a representative single CIFAR2 dataset (CIFAR2 (cat-dog)). Additional detailed results for other network architectures and datasets available in our accompanying W&B projects and GitHub repository. + +Performance on PCam dataset. Table 10 presents the performance results (accuracy and AUC values) for the PCam dataset for all different network architectures. + +Performance on OpenML datasets. Table 11 presents the accuracy results for the 14 OpenML datasets using MLP(5), with additional detailed results for other network architectures available in our accompanying W&B projects and GitHub repository. + +# C. Technical proofs + +# C.1. Auxiliary definitions + +To proceed, let us first introduce or recall the definitions and notations: + +![](images/1d14143c889fd2f660ba823e7f7af6b88bf688a03201412d1fa57d7d7725e673.jpg) +Figure 4. The overall pattern of performance (Accuracy) of ENSLoss against all other fixed loss methods in 45 CIFAR2 binary classification datasets (provided by pairwise labels subset of CIFAR10), based on VGG16, is illustrated. The $x$ -axis represents label-paired binary CIFAR datasets, where, for example, CIFAR35 corresponds to the CIFAR2 (cat-dog) dataset. + +- Classification probability: $\eta(\mathbf{X}) \coloneqq \mathbb{P}(Y = 1|\mathbf{X})$ . +- The Bayes classifier: $f^{*}(\mathbf{x}) = \operatorname{sgn}(\eta(\mathbf{x}) - 1/2)$ . +- The pointwise minimization of $R$ : + +$$ +C _ {0} (\eta , \alpha) = \eta \mathbf {1} (\alpha \geq 0) + (1 - \eta) \mathbf {1} (\alpha \leq 0), \quad H _ {0} (\eta) = \inf _ {\alpha \in \mathbb {R}} C _ {0} (\eta , \alpha). +$$ + +- The pointwise minimization of $R_{\phi}$ : + +$$ +C _ {\phi} (\eta , \alpha) = \eta \phi (\alpha) + (1 - \eta) \phi (- \alpha), \quad H _ {\phi} (\eta) = \inf _ {\alpha \in \mathbb {R}} C _ {\phi} (\eta , \alpha), +$$ + +$$ +H _ {\phi} ^ {-} (\eta) = \inf _ {\alpha : \alpha (2 \eta - 1) \leq 0} C _ {\phi} (\eta , \alpha), \quad H _ {\phi} ^ {+} (\eta) = \inf _ {\alpha : \alpha (2 \eta - 1) > 0} C _ {\phi} (\eta , \alpha). +$$ + +# Proof of Theorem 3.6 + +Proof. We begin by defining the ensemble loss, denoted by $\bar{\phi}(z)$ , as the expected value of $\Phi(z)$ with respect to the distribution of $\Phi$ , i.e., $\bar{\phi}(z) \coloneqq \mathbb{E}_{\Phi} \Phi(z)$ . Note that the expectation is well-defined according to Assumption 3.4. Consequently, the calibrated ensemble risk function can be reformulated as follows: + +$$ +\overline {{R}} (f) = \mathbb {E} _ {\mathbf {X}, Y} \big (\bar {\phi} (Y f (\mathbf {X})) \big). +$$ + +Thus, we can rewrite the ensemble risk in the classical form of a fixed loss, namely, $\overline{R}(f) = R_{\bar{\phi}}(f)$ , thereby enabling us to leverage Theorems 1 and 2 in (Bartlett et al., 2006) to facilitate statistical analysis of the proposed method. Therefore, it suffices to verify the BCC condition of the ensemble loss $\bar{\phi}$ , that is, convexity, the bounded below condition, and having a negative derivative at 0. + +To clarify, we sometimes denote $\Phi(z)$ as $\Phi(z,\omega)$ to emphasize that $\Phi: \Omega \to \mathcal{L}$ is a $\mathcal{L}$ -valued random variable, equipped with a probability measure $\mu$ . Now, we start with considering a simple finite space case, which provides insight into the underlying proof strategy. + +Specific case: a finite space. Suppose $\mathcal{L} = \{\phi_1, \dots, \phi_Q\}$ is a finite space, $\bar{\phi}(z)$ can be simplified as $\bar{\phi}(z) = \sum_{q=1}^{Q} \pi_q \phi_q(z)$ , where $\pi_q = \mathbb{P}(\Phi = \phi_q) > 0$ and $\sum_{q=1}^{Q} \pi_q = 1$ . Next, we check the BCC conditions of $\bar{\phi}$ . (i) $\bar{\phi}$ is a convex combination of convex functions, thus $\bar{\phi}$ is convex; (ii) since $\phi_q$ is bounded below by $c_q$ , thus $\bar{\phi}$ is bounded below by $\min_{q=1,\dots,Q} c_q$ ; (iii) $\phi_q$ is differentiable at 0 for all $q$ , thus $\bar{\phi}$ is also differentiable at 0, and $\bar{\phi}'(0) := \mathbb{E} \Phi'(0) = \sum_{q=1}^{Q} \pi_q \phi_q'(0) < 0$ . Therefore, $\bar{\phi}$ satisfies the BCC conditions. + +Table 9. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of all methods in the image dataset CIFAR2 (cat-dog) are presented. Bold font is used to denote statistical significant improvements over ALL other competitors. + +
MODELSBCEEXPHINGEENSLoss
(Acc)
ResNet3468.94(0.45)60.10(0.44)70.39(0.37)72.03(0.71)
ResNet5067.59(0.35)61.57(0.56)67.57(0.28)72.04(0.35)
ResNet10167.32(0.23)53.57(0.41)67.12(0.32)70.07(0.90)
VGG1677.36(0.68)69.27(0.44)78.13(0.87)81.13(0.77)
VGG1976.96(1.03)66.38(1.17)78.06(0.68)80.57(0.76)
MobileNet66.77(0.86)55.89(1.69)67.66(1.03)69.98(1.08)
MobileNetV273.34(1.12)62.94(1.09)73.45(1.02)78.40(1.56)
(AUC)
ResNet3475.97(0.44)64.39(0.52)76.02(0.32)79.24(1.09)
ResNet5073.96(0.29)65.52(0.60)74.37(0.23)79.40(0.31)
ResNet10173.35(0.24)54.88(0.34)68.61(0.66)76.60(0.87)
VGG1685.42(0.71)76.13(0.94)86.20(0.63)89.54(0.29)
VGG1985.61(0.97)72.88(1.12)84.47(1.07)87.55(1.08)
MobileNet73.12(0.97)58.51(1.77)73.96(1.34)76.61(1.23)
MobileNetV281.29(0.96)67.53(1.11)81.31(0.74)86.22(1.37)
+ +Table 10. The averaged classification Accuracy and AUC and their standard errors (in parentheses) of all methods in the image dataset PCam are presented. Bold font is used to denote statistical significant improvements over ALL other competitors. + +
MODELSBCEEXPHINGEENSLOSS
(Acc)
ResNet3476.91(0.52)73.78(0.52)77.20(0.18)82.33(0.30)
ResNet5077.23(0.51)74.10(0.49)77.96(0.34)82.00(0.07)
VGG1680.97(0.25)77.11(0.50)82.69(0.30)85.77(0.35)
VGG1981.58(0.25)76.13(0.35)82.77(0.41)85.91(0.19)
(AUC)
ResNet3488.69(0.34)83.30(0.57)76.11(0.37)92.24(0.13)
ResNet5088.75(0.30)83.51(0.46)77.24(0.67)92.07(0.49)
VGG1693.35(0.26)88.77(0.59)86.18(0.56)95.44(0.24)
VGG1993.49(0.17)87.89(0.46)84.09(0.60)95.51(0.14)
+ +General cases. Now, suppose $\mathcal{L}$ is a general measurable BCC subspace satisfying Assumption 3.4. The crucial issue is whether the BCC conditions are complete in the space $\mathcal{L}$ over limiting. Let us check the BCC conditions of $\bar{\phi}$ . (i) Convexity. Note that + +$$ +\begin{array}{l} \bar {\phi} \left(\lambda z _ {1} + (1 - \lambda) z _ {2}\right) = \int_ {\Omega} \Phi \left(\lambda z _ {1} + (1 - \lambda) z _ {2}, \omega\right) d \mu (\omega) \leq \int_ {\Omega} \lambda \Phi \left(z _ {1}, \omega\right) + (1 - \lambda) \Phi \left(z _ {2}, \omega\right) d \mu (\omega) \\ = \lambda \bar {\phi} (z _ {1}) + (1 - \lambda) \bar {\phi} (z _ {2}), \\ \end{array} +$$ + +where the inequality follows from the fact that $\mathcal{L}$ is a BCC subspace and thus $\Phi (z,\omega)$ is convex for any $\omega \in \Omega$ . Thus, $\bar{\phi}$ is a convex function. (ii) Bounded below. + +$$ +\bar {\phi} (z) = \int_ {\Omega} \Phi (z, \omega) d \mu (\omega) \geq \int_ {\Omega} U (\omega) d \mu (\omega) = \mathbb {E} U > - \infty , +$$ + +where the inequality follows from the second condition in Assumption 3.4 such that $\Phi(z, \omega) \geq U(\omega)$ for any $z$ almost surely. (iii) Calibration. For every sequence $\delta_n$ with $\delta_n \to 0$ , without loss of generality, we assume $|\delta_n| \leq \delta_0$ , which can be satisfied for sufficiently large $n$ . We now check the definition of differentiability of $\bar{\phi}$ at $z = 0$ : + +$$ +\lim _ {n \rightarrow \infty} \frac {\bar {\phi} (\delta_ {n}) - \bar {\phi} (0)}{\delta_ {n}} = \lim _ {n \rightarrow \infty} \int_ {\Omega} \frac {\Phi (\delta_ {n} , \omega) - \Phi (0 , \omega)}{\delta_ {n}} d \mu (\omega) = \lim _ {n \rightarrow \infty} \int_ {\Omega} G _ {n} (\omega) d \mu (\omega), +$$ + +Table 11. The averaged classification Accuracy and its standard errors (in parentheses) of all methods with MLP(5) in 14 OpenML datasets are presented. Bold font is used to denote statistical significant improvements over ALL other competitors. + +
MLP(5)(n,d)×103BCEEXPHINGEENSLOSS (our)
Bioresponse(3.75, 1.78)76.84(1.33)77.49(1.44)76.03(0.67)77.18(1.18)
guillermo(20.0, 4.30)70.35(0.44)70.26(0.67)69.67(0.63)75.34(0.78)
riccardo(20.0, 4.30)98.68(0.21)98.69(0.13)98.62(0.23)99.14(0.23)
hiva-agnostic(4.23, 1.62)91.02(0.85)91.65(1.30)95.55(0.53)90.61(1.49)
christine(5.42, 1.64)69.62(1.07)69.42(1.30)67.48(0.72)69.94(0.93)
OVA-Breast(1.54, 10.9)94.27(1.33)94.38(1.41)92.61(1.75)95.45(1.30)
OVA-Uterus(1.54, 10.9)80.54(1.54)82.09(1.50)84.22(1.75)86.68(1.66)
OVA-Ovary(1.54, 10.9)81.83(1.69)82.82(2.19)82.76(1.69)87.16(1.40)
OVA-Kidney(1.54, 10.9)97.59(0.83)97.72(0.65)96.47(0.95)98.06(0.48)
OVA-Lung(1.54, 10.9)88.17(1.70)89.31(2.36)89.76(1.53)93.00(1.31)
OVA-Om(1.54, 10.9)71.42(3.53)74.91(1.84)79.25(2.19)82.00(1.98)
OVA-Colon(1.54, 10.9)95.73(0.87)95.73(0.88)95.15(0.79)96.27(0.63)
OVA-En(1.54, 10.9)71.66(3.79)74.33(1.73)81.68(1.87)83.19(2.01)
OVA-Prostate(1.54, 10.9)97.39(0.51)96.96(0.77)97.22(0.84)97.93(0.60)
+ +where $G_{n}(\omega) \coloneqq \left( \Phi(\delta_{n}, \omega) - \Phi(0, \omega) \right) / \delta_{n}$ . Next, the proof involves usage of the Dominated Convergence Theorem (c.f. Theorem 1.19 in (Evans, 2018)) to exchange the limit and the integration. To proceed, since $\Phi(z, \omega)$ is differentiable at 0 for any $\omega \in \Omega$ , it follows that $\lim_{n \to \infty} G_{n}(\omega) = \Phi'(0, \omega)$ pointwise. Note that $\Phi(z, \omega)$ is convex w.r.t. $z$ for any $\omega \in \Omega$ , then by the definition of the subderivative, we have, + +$$ +\Phi (\delta_ {n}, \omega) - \Phi (0, \omega) \geq \Phi^ {\prime} (0, \omega) \delta_ {n}, \text {a n d} \Phi (0, \omega) - \Phi (\delta_ {n}, \omega) \geq - \partial \Phi (\delta_ {n}, \omega) \delta_ {n}, +$$ + +which yields that + +$$ +|G_{n}(\omega)|\leq \max \left(|\partial \Phi (\delta_{n},\omega)|,|\Phi^{\prime}(0,\omega)|\right)\leq \sup_{|\delta |\leq \delta_{0}}|\partial \Phi (\delta ,\omega)|\leq G(\omega), +$$ + +$$ +\int_ {\Omega} G (\omega) d \mu (\omega) = \mathbb {E} G < \infty . +$$ + +Thus, $G_{n}$ is dominated by $G$ , then the Dominated Convergence Theorem yields that the limit exists and equals to, + +$$ +\lim _ {n \to \infty} \frac {\bar {\phi} (\delta_ {n}) - \bar {\phi} (0)}{\delta_ {n}} = \int_ {\Omega} \lim _ {n \to \infty} G _ {n} (\omega) d \mu (\omega) = \int_ {\Omega} \Phi^ {\prime} (0, \omega) d \mu (\omega) = \mathbb {E} \bigl (\Phi^ {\prime} (0) \bigr) := \bar {\phi} ^ {\prime} (0) < 0, +$$ + +where the last inequality follows from that $\Phi'(0, \omega) < 0$ for all $\omega \in \Omega$ . + +In summary, we have proved that $\bar{\phi}:\mathbb{R}\to \mathbb{R}$ satisfies the BCC conditions. Consequently, according to Theorem 1 and Theorem 2 (part 2) in (Bartlett et al., 2006), we can draw the following conclusions: + +1. $\bar{\phi}$ is classification-calibrated, as stated in Definition 1.1. +2. The excess risk bound of $\overline{R} (\cdot)$ is provided as: + +$$ +R (f) - R ^ {*} \leq \psi^ {- 1} \big (\bar {R} (f) - \bar {R} ^ {*} \big), +$$ + +where $\psi$ is defined as: + +$$ +\psi (\theta) = \bar {\phi} (0) - H _ {\bar {\phi}} \left(\frac {1 + \theta}{2}\right) = \mathbb {E} \left(\Phi (0)\right) - \bar {H} \left(\frac {1 + \theta}{2}\right), +$$ + +where $\overline{H} (\eta)\coloneqq \inf_{\alpha \in \mathbb{R}}\mathbb{E}_{\Phi}C_{\Phi}(\eta ,\alpha)$ + +This completes the proof. + +# Proof of Lemma 3.2 + +Proof. Since $\phi$ is convex and calibrated, $\phi'(0) < 0$ , and $\phi(z) \geq \phi(0) + \phi'(0)z \geq \phi(0)$ when $z \leq 0$ , thus $\phi(z)$ is bounded below when $z \leq 0$ . Next, we aim to establish a lower bound of $\phi(z)$ for $z > 0$ . + +CASE 1. If there exists a constant $z_0 > 0$ such that $\partial \phi(z_0) \geq 0$ , then $\phi(z) \geq \phi(z_0) + \partial \phi(z_0)(z - z_0) \geq \phi(z_0)$ for $z \geq z_0$ . For $0 \leq z \leq z_0$ , $\phi(z)$ is bounded according to the boundedness theorem. Then, $\phi(z)$ is bounded below. + +CASE 2. If $\partial \phi(z) < 0$ for all $z > 0$ . Then, for any $z > 0$ , we partition $[0, z]$ as $n$ intervals with $d_0 = 0, d_1 = z/n, \dots, d_{n-1} = (n-1)z/n, d_n = z$ , for the $i$ -th interval, we have + +$$ +\phi \left(d _ {i + 1}\right) \geq \phi \left(d _ {i}\right) + \partial \phi \left(d _ {i}\right) z / n. +$$ + +Taking the summation for both sides, and $\partial \phi (z)$ is nondecreasing according to Lemma C.2, + +$$ +\begin{array}{l} \phi (z) = \phi (d _ {n}) \geq \phi (d _ {0}) + \sum_ {i = 0} ^ {n - 1} \frac {\partial \phi (d _ {i}) z}{n} = \phi (0) + \frac {\phi^ {\prime} (0) z}{n} + \sum_ {i = 1} ^ {n - 1} \frac {\partial \phi (d _ {i}) z}{n} \\ \geq \phi (0) + \frac {\phi^ {\prime} (0) z}{n} + \int_ {0} ^ {z} \partial \phi (z) d z \geq \phi (0) + \frac {\phi^ {\prime} (0) z}{n} + \int_ {0} ^ {\infty} \partial \phi (z) d z, \\ \end{array} +$$ + +where the second last inequality follows from the integral test, and the last inequality again follows from Lemma C.2. Taking the limit for $n \to \infty$ , for any $z > 0$ , we have + +$$ +\begin{array}{l} \phi (z) = \lim _ {n \rightarrow \infty} \phi (z) \geq \phi (0) + \int_ {0} ^ {\infty} \partial \phi (z) d z = \phi (0) + \int_ {0} ^ {z _ {0}} \partial \phi (z) d z + \int_ {z _ {0}} ^ {\infty} \frac {\partial \phi (z)}{g (z)} g (z) d z \\ \geq \phi (0) + \phi^ {\prime} (0) z _ {0} + \frac {\partial \phi (z _ {0})}{g (z _ {0})} \int_ {z _ {0}} ^ {\infty} g (z) d z \geq \phi (0) + \phi^ {\prime} (0) z _ {0} + \frac {\phi^ {\prime} (0)}{g (z _ {0})} \int_ {z _ {0}} ^ {\infty} g (z) d z > - \infty . \\ \end{array} +$$ + +The desirable result then follows. + +# Proof of Lemma 3.3 + +Proof. Before proceeding, we add $z = 0$ into the batch points as $\{z_1,\dots ,z_{B + 1}\}$ . Without loss generality, we assume (i) $z_{i}\neq z_{j}$ , as we can duplicate the gradient by merging and treating them as one point; and assume that (ii) $z_{1} < z_{2}\dots < z_{B + 1}$ and $z_{b_0} = 0$ , as we can always sort the batch points. Next, we also design and add the loss-derivative for $z_{b_0} = 0$ into the given loss-derivatives $\mathbf{g}$ to form a new gradient vector $\tilde{\mathbf{g}}$ , specifically, + +$$ +\tilde {g} _ {i} := g _ {i}, \quad \text {i f} i < z _ {0}, \qquad \tilde {g} _ {i} := g _ {i - 1} \quad \text {i f} i > z _ {0}, +$$ + +where $\tilde{g}_{b_0} = \min (\tilde{g}_{b_0 - 1} / 2,(\tilde{g}_{b_0 - 1} + \tilde{g}_{b_0 + 1}) / 2)$ , if $b_{0} > 1$ ; $\tilde{g}_{b_0} = \min (\tilde{g}_{b_0 + 1}, - 1)$ , if $b_{0} = 1$ . Hence, $\tilde{g}_{b_0} < 0$ and $\tilde{g}_{b_0 - 1}\leq \tilde{g}_{b_0}\leq \tilde{g}_{b_0 + 1}$ . + +Then, we define $u_{1} = (z_{1} + z_{2}) / 2, \dots, u_{i} = (z_{i} + z_{i+1}) / 2, \dots, u_{B} = (z_{B} + z_{B+1}) / 2, u_{B+1} = z_{B+1} + 1$ , and the corresponding loss function $\phi$ can be formulated as follows. + +$$ +\phi (z): \left\{ \begin{array}{l l} l _ {1} (z) = \tilde {g} _ {1} z, & \text {i f} z \leq u _ {1}, \\ l _ {2} (z) = \tilde {g} _ {2} (z - u _ {1}) + l _ {1} (u _ {1}), & \text {i f} u _ {1} < z \leq u _ {2}, \\ \dots , \\ l _ {b _ {0}} (z) = \tilde {g} _ {b _ {0}} (z - u _ {b _ {0} - 1}) + l _ {b _ {0} - 1} (u _ {b _ {0} - 1}), & \text {i f} u _ {b _ {0} - 1} < z \leq u _ {b _ {0}}, \\ \dots , \\ l _ {B + 1} (z) = \tilde {g} _ {B + 1} (z - u _ {B}) + l _ {B} (u _ {B}), & \text {i f} u _ {B} < z \leq u _ {B + 1}, \\ l _ {B + 2} (z) = \max (\tilde {g} _ {B + 1}, 1) (z - u _ {B + 1}) + l _ {B + 1} (u _ {B + 1}), & \text {i f} z > u _ {B + 1}. \end{array} \right. +$$ + +By definition, $\phi$ provides the loss-derivatives for original sample points, that is, $\phi'(z_i) = g_i$ for all $i \neq b_0$ . Now, we verify that $\phi(z)$ is a BCC loss. Specifically, (i) $\phi(z)$ is a continuous piecewise linear function with coefficients $\tilde{g}_1 \leq \tilde{g}_2 \leq \dots \leq \tilde{g}_{B+1} \leq \max(\tilde{g}_{B+1}, 1)$ according to Condition 1 and the definition of $\tilde{\mathbf{g}}$ . $\phi(z)$ is a convex function. (ii) Note that $z_{b_0} = 0 \in (u_{b_0 - 1}, u_{b_0}]$ , hence $\phi(z)$ is differentiable at 0 and $\phi'(0) = l_{b_0}'(0) = \tilde{g}_{b_0} < 0$ . $\phi$ is calibrated. (iii) $\phi(z)$ is increasing function when $z \geq u_{B+1}$ , thus it is bounded below. This completes the proof. + +# Proof of Lemma 3.5 + +Proof. Suppose $\mathcal{L} = \{\phi_1, \dots, \phi_Q\}$ is a finite space, then $\mathbb{E}\Phi(z)$ is defined as $\mathbb{E}\Phi(z) := \sum_{q=1}^{Q} \pi_q \phi_q(z) < \infty$ , where $\pi_q = \mathbb{P}(\Phi = \phi_q) > 0$ and $\sum_{q=1}^{Q} \pi_q = 1$ , which leads to Condition 1. Since $\phi_q$ is bounded below, that is, there exists a constant $U_q > -\infty$ , such that $\phi_q(z) \geq U_q$ , thus $\mathbb{E}\Phi(z) \geq \min_{q=1,\dots,Q}(U_q) := U > -\infty$ , which leads to Condition 2. Finally, $\phi_q$ is convex and differentiable at 0, then $\partial \phi_q(z)$ converges to $\phi_q'(0)$ when $z \to 0$ , see Corollary 4.2.3 in (Hiriart-Urruty & Lemarechal, 1996). Therefore, for each $q = 1,\dots,Q$ , there exists constants $\delta_q > 0$ and $G_q > 0$ , such that $|\partial \phi_q(z)| \leq G_q$ for all $z \in [-\delta_q,\delta_q]$ , which leads to Condition 3 by the fact that $|\partial \phi_q(z)| \leq \max_{q=1,\dots,Q} G_q := G < \infty$ for $z \in [-\delta_0,\delta_0]$ with $\delta_0 = \min_{q=1,\dots,Q} \delta_q$ for all $q = 1,\dots,Q$ . This completes the proof. + +# Auxiliary lemmas + +Lemma C.1. For $C_{\phi}(\eta ,\alpha)$ $H_{\phi}(\eta)$ $H_{\phi}^{-}(\eta)$ and $H_{\phi}^{+}(\eta)$ defined in Appendix C.1 with a convex and bounded below $\phi$ , then + +a. $C_{\phi}(\eta ,\alpha)$ is convex with respect to $\alpha$ +b. For any $\eta \neq 1 / 2$ , $H_{\phi}^{-}(\eta) > H_{\phi}(\eta)$ is equivalent to $H_{\phi}^{-}(\eta) > H_{\phi}^{+}(\eta)$ . +c. If $\partial \phi (0) < 0$ , then $H_{\phi}^{-}(\eta) = \phi (0)$ . + +Proof. (a). Since $0 \leq \eta \leq 1$ , $C_{\phi}(\eta, \alpha) = \eta \phi(\alpha) + (1 - \eta) \phi(-\alpha)$ is a convex combination of $\phi(\alpha)$ and $\phi(-\alpha)$ . Then, $C_{\phi}(\eta, \alpha)$ is convex with respect to $\alpha$ since both $\phi(\alpha)$ and $\phi(-\alpha)$ are both convex. + +(b). Denote $\mathcal{A} = \{\alpha | \alpha(2\eta - 1) \leq 0\}$ , then $H_{\phi}(\eta) = \inf_{\alpha \in \mathcal{A} \cup \mathcal{A}^c} C_{\phi}(\eta, \alpha)$ , $H_{\phi}^{-}(\eta) = \inf_{\alpha \in \mathcal{A}} C_{\phi}(\eta, \alpha)$ , and $H_{\phi}^{+}(\eta) = \inf_{\alpha \in \mathcal{A}^c} C_{\phi}(\eta, \alpha)$ . Given that $\eta \neq 1/2$ , both $\mathcal{A}$ and $\mathcal{A}^c$ are nonempty. + +We first show that $H_{\phi}(\eta) = \min \left(H_{\phi}^{-}(\eta),H_{\phi}^{+}(\eta)\right)$ . Note that $H_{\phi}(\eta) \leq H_{\phi}^{-}(\eta)$ and $H_{\phi}(\eta) \leq H_{\phi}^{+}(\eta)$ , then $H_{\phi}(\eta) \leq \min \left(H_{\phi}^{-}(\eta),H_{\phi}^{+}(\eta)\right)$ . On the other hand, for any $\alpha \in \mathbb{R}$ , then either $\alpha \in \mathcal{A}$ or $\alpha \in \mathcal{A}^c$ , thus $C_{\phi}(\eta ,\alpha) \geq \min \left(H_{\phi}^{-}(\eta),H_{\phi}^{+}(\eta)\right)$ , and $H_{\phi}(\eta) \geq \min \left(H_{\phi}^{-}(\eta),H_{\phi}^{+}(\eta)\right)$ . + +Now, $H_{\phi}^{-}(\eta) > H_{\phi}(\eta) = \min \left(H_{\phi}^{-}(\eta),H_{\phi}^{+}(\eta)\right)$ if and only if $H_{\phi}^{+}(\eta) < H_{\phi}^{-}(\eta)$ . + +(c). Since $\phi$ is convex, $C_{\phi}(\eta ,\alpha) = \eta \phi (\alpha) + (1 - \eta)\phi (-\alpha)\geq \phi \big((2\eta -1)\alpha \big)$ . Hence, + +$$ +\phi (0) = C _ {\phi} (\eta , 0) \geq H _ {\phi} ^ {-} (\eta) = \inf _ {\alpha (2 \eta - 1) \leq 0} C _ {\phi} (\eta , \alpha) \geq \inf _ {z \leq 0} \phi (z) = \phi (0), +$$ + +where the last equality follows from the fact that $\phi$ is convex and $\phi(z) \geq \phi(0) + \partial \phi(0)z \geq \phi(0)$ when $z \leq 0$ . The desirable result then follows. + +Lemma C.2. Let $\phi :\mathbb{R}\to \mathbb{R}$ be a convex function. Then + +a. The sub-derivative $\partial \phi$ is nondecreasing. +b. If $\phi (x) > \phi (y)$ for some $(x,y)$ , then for any $z$ between $x$ and $y$ (excluding $x$ and $y$ ), $\phi (x) > \phi (z)$ . + +Proof. (a). By the definition of sub-derivative, for any $y > x$ , we have + +$$ +\phi (y) \geq \phi (x) + \phi^ {\prime} (x) (y - x), \quad \phi (x) \geq \phi (y) + \phi^ {\prime} (y) (x - y), +$$ + +providing that $(y - x)(\phi'(x) - \phi'(y)) \leq 0$ . Thus, $\phi'$ is a nondecreasing function. + +(b). For any $z$ between $x$ and $y$ , there exists $\lambda > 0$ , such that $z = \lambda x + (1 - \lambda)y$ , then + +$$ +\phi (z) = \phi (\lambda x + (1 - \lambda) y) \leq \lambda \phi (x) + (1 - \lambda) \phi (y) < \phi (x). +$$ + +# An example illustrating Theorem 3.6 + +Let $\mathcal{L} = \{\phi_1, \phi_2\}$ , where $\phi_1(z) = \exp(-z)$ is the exponential loss, and $\phi_2(z) = \log(1 + e^{-2z})$ is the logistic loss, and $\mathbb{P}(\Phi = \phi_q) = \pi_q > 0$ , then $\overline{R}(\cdot)$ is classification-calibrated, and the excess risk bound is provided as: + +$$ +\psi \big (R (f) - R ^ {*} \big) \leq \bar {R} (f) - \bar {R} ^ {*}, +$$ + +where $\psi (\theta) = \pi_1\big(1 - \sqrt{1 - \theta^2}\big) + \pi_2 / 2\big((1 - \theta)\log (1 - \theta) + (1 + \theta)\log (1 + \theta)\big)$ for $\theta \in [0,1]$ , which can be simplified as: + +$$ +R (f) - R ^ {*} \leq \frac {2}{\sqrt {2 \pi_ {1} + \pi_ {2}}} \sqrt {\bar {R} (f) - \bar {R} ^ {*}}. +$$ + +# D. Calibration for unbounded below losses + +In this section, we discuss the relationship between the unbounded below condition and calibration for surrogate loss functions. First, we present that the bounded below condition is indeed a necessary condition for classification-calibration. + +Corollary D.1. Suppose a convex loss function $\phi(\cdot)$ is unbounded below, then it is not classification-calibrated. + +Proof. Since $\phi(z)$ is convex and unbounded below, then $\phi(z) \to -\infty$ for $z \to \infty$ . Let's consider the case where there exists a domain $\mathcal{X}_0$ such that $1 > \mathbb{P}(\mathbf{X} \in \mathcal{X}_0) > 0$ and $\eta(\mathbf{x}) = 1$ for $\mathbf{x} \in \mathcal{X}_0$ . Then, define $f_l(\mathbf{x}) = l$ when $\mathbf{x} \in \mathcal{X}_0$ , and $f_l(\mathbf{x}) = 0$ when $\mathbf{x} \notin \mathcal{X}_0$ . In this case, + +$$ +R _ {\phi} (f _ {l}) = \mathbb {E} \big (\mathbf {1} (\mathbf {X} \in \mathcal {X} _ {0}) \phi (l) \big) + \mathbb {E} \big (\mathbf {1} (\mathbf {X} \notin \mathcal {X} _ {0}) \phi (0) \big) \to - \infty = R _ {\phi} ^ {*}, +$$ + +however, it is clear that $R(f_{l}) \nrightarrow R^{*}$ , since $f_{l}$ fails to match the Bayes rule when $\mathbf{x} \notin \mathcal{X}_0$ . Thus, if $\phi$ is calibrated, it must be bounded below. + +The concept of classification-calibration is considered "universal", as it requires the loss function to ensure consistency for all data distributions. We then investigate a weak version of calibration: can unbounded below loss functions guarantee calibration for some specific data distributions? + +To address this question, we start by extending the if and only if condition for the equivalent definitions of classification-calibration in (Bartlett et al., 2006). + +Lemma D.2. For any loss function $\phi : \mathbb{R} \to (-\infty, \infty)$ , $R_{\phi}^{*} > -\infty$ if and only if the statements (a) and (b) are equivalent, where statements (a) and (b) are defined as: + +a. For any $\eta \neq 1 / 2$ , $H_{\phi}^{-}(\eta) > H_{\phi}(\eta)$ . +b. For every sequence of measurable function $f_{l}:\mathcal{X}\to \mathbb{R}$ and every probability distribution on $\mathcal{X}\times \{\pm 1\}$ + +$$ +R _ {\phi} (f _ {l}) \rightarrow R _ {\phi} ^ {*} \quad \text {i m p l i e s t h a t} \quad R (f _ {l}) \rightarrow R ^ {*}. +$$ + +Proof. The necessity $(\Rightarrow)$ . Suppose $R_{\phi}^{*} > -\infty$ , then $(a) \Rightarrow (b)$ can be proved by following the proof of Theorem 1 (the last paragraph) in (Bartlett et al., 2006). Next, we tend to prove $(b) \Rightarrow (a)$ by contradiction. Suppose there exist a sequence of $\{f_l\}$ and some probability distribution, such that + +$$ +R _ {\phi} \left(f _ {l}\right)\rightarrow R _ {\phi} ^ {*}, \text {b u t} R \left(f _ {l}\right) \nrightarrow R ^ {*}. \tag {11} +$$ + +Define + +$$ +\Omega_ {\phi} := \left\{\mathbf {X}: \lim _ {l \rightarrow \infty} C _ {\phi} \big (\eta (\mathbf {X}), f _ {l} (\mathbf {X}) \big) = H _ {\phi} \big (\eta (\mathbf {X}) \big) \right\}, +$$ + +$$ +\Omega := \left\{\mathbf {X}: \lim _ {l \rightarrow \infty} C _ {0} \big (\eta (\mathbf {X}), f _ {l} (\mathbf {X}) \big) = H _ {0} \big (\eta (\mathbf {X}) \big) \right\}. +$$ + +Since $\phi(0) \geq R_{\phi}^{*} > -\infty$ , and $1 \geq R^{*} \geq 0$ , (11) implies that $\mathbb{P}(\Omega_{\phi}) = 1$ and $\mathbb{P}(\Omega) < 1$ , and thus $\mathbb{P}(\Omega^c) - \mathbb{P}(\Omega_{\phi}^c) > 0$ . Therefore, there exists a subset $\mathcal{A} \subseteq \Omega^c \setminus \Omega_{\phi}^c$ with $\mathbb{P}(\mathcal{A}) > 0$ , such that for any $\mathbf{x} \in \mathcal{A}$ , we have + +$$ +C _ {\phi} (\eta , \alpha_ {l}) \rightarrow H _ {\phi} (\eta), \text {b u t} C _ {0} (\eta , \alpha_ {l}) \nrightarrow H _ {0} (\eta), +$$ + +where $\eta \coloneqq \eta (\mathbf{x})$ and $\alpha_{l}\coloneqq f_{l}(\mathbf{x})$ . This implies that $\exists \epsilon >0,\forall L_0,\exists l > L_0$ , such that, $C_0(\eta ,\alpha_l) > H_0(\eta)$ , and thus $\alpha_{l}(2\eta -1)\leq 0$ . Now, $H_{\phi}^{-}(\eta) = H_{\phi}(\eta)$ follows from by taking limits of $H_{\phi}(\eta)\leq H_{\phi}^{-}(\eta)\leq C_{\phi}(\eta ,\alpha_{l})$ , and the fact that $C_\phi (\eta ,\alpha_l)\to H_\phi (\eta)$ , which contradicts to the calibration definition of $\phi$ in (a). This completes the proof of the necessity. + +The sufficiency $(\Longleftarrow)$ . We construct the proof by contradiction. Suppose $R_{\phi}^{*} = -\infty$ , we can find an example that (a) does not imply (b). Specifically, assume that $\phi$ is classification calibrated and $R_{\phi}(f_l) \to R_{\phi}^{*} = -\infty$ , then there exists a sequence $\{f_l\}$ such that $\mathbb{P}(\Omega_{\phi}) = 1$ , and a set $\mathcal{A}$ with $\mathbb{P}(\mathcal{A}) = c > 0$ , such that $H_{\phi}(\eta(\mathbf{x})) = -\infty$ , for $\mathbf{x} \in \mathcal{A}$ . Now, we split $\mathcal{A}$ as two disjoint sets $\mathcal{A}_1$ and $\mathcal{A}_2$ each with probability measure $c/2$ , and define a new sequence $\tilde{f}_l(\mathbf{x}) := f_l(\mathbf{x})$ for $\mathbf{x} \in \mathcal{A}_1^c$ , and $\tilde{f}_l(\mathbf{x}) := 0$ for $\mathbf{x} \in \mathcal{A}_1$ . In this case, + +$$ +R _ {\phi} (\tilde {f} _ {l}) = \mathbb {P} (\mathbf {X} \in \mathcal {A} _ {1}) \phi (0) + \mathbb {E} \Big ((\mathbf {1} (\mathbf {X} \in \mathcal {A} _ {2}) + \mathbf {1} (\mathbf {X} \notin \mathcal {A})) C _ {\phi} (\eta (\mathbf {X}), f _ {l} (\mathbf {X})) \Big) \to - \infty = R _ {\phi} ^ {*}. +$$ + +However, $R(\tilde{f}_l) \nrightarrow R^*$ since $\mathbf{x} \in \mathcal{A}_1$ , $C_0(\eta(\mathbf{x}), \tilde{f}_l(\mathbf{x})) = 1 > \min(\eta(\mathbf{x}), 1 - \eta(\mathbf{x})) = H_0(\eta(\mathbf{x}))$ and $\mathbb{P}(\mathcal{A}_1) = c/2 > 0$ . This completes the proof. + +Lemma D.2 relaxes the non-negativeness or bounded below condition for calibration in (Bartlett et al., 2006), which helps extend the if and only if conditions of classification-calibration to more general loss functions. For example, if we work with specific data distributions, many calibrated surrogate losses do not need to be unbounded below, as illustrated in the following examples. + +Hinge loss with varying right tails. In this example, we examine the impact of various right tails on calibration of loss functions. Specifically, we adopt the shape of hinge loss function $\phi(z) = 1 - z$ , when $z < 1$ , and explore different right tails when $z \geq 1$ , then discuss calibration. + +- When $z \leq 1$ , $\phi(z) = 1 - z$ ; +- When $z > 1$ , (zero tail) $\phi(z) = 0$ ; (exponential tail) $\phi(z) = e^{-(z - 1)} - 1$ ; (inverse tail) $\phi(z) = 1/z - 1$ ; (inv-log tail) $\phi(z) = e / \log(z + e - 1) - e$ ; (logarithm tail) $\phi(z) = -\log(z)$ . + +Lemma D.3. Suppose $\eta(\mathbf{X}) \in [\epsilon, 1 - \epsilon]$ almost surely for any fixed $\epsilon > 0$ , then the hinge loss, with the zero, exponential, inverse, inverse-logarithm, and logarithm tails, are all classification-calibrated. + +Proof. We can check that $R_{\phi}^{*} > -\infty$ for all pre-defined losses, and $\phi$ is convex with $\phi'(0) < 0$ then $\phi$ is classification-calibrated. + +Therefore, some unbounded below loss functions can still provide calibration for particular data distributions. Unfortunately, unbounded below loss functions often exhibit instability during training with SGD, even if they are calibrated in simulated cases (see our GITHUB). One possible explanation is that the batch sampling may disrupt the distribution assumptions necessary for calibration of unbounded below losses. Conversely, bounded below calibrated loss functions do not rely on data distribution assumptions to maintain calibration. + +This appendix delineates the relationship between the bounded below condition and calibration. First, the bounded below condition is a necessary condition for calibration. Next, by introducing additional distribution assumptions, it is demonstrated that certain unbounded below loss functions can still be calibrated. Lastly, through numerical experiments, it is suggested that unbounded below loss functions may exhibit potential instability during SGD training. In conclusion, the unbounded below condition (or superlinear raising tail) is identified as a critical yet often underestimated criterion for loss functions, both theoretically and in numerical implementations. \ No newline at end of file diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/images.zip b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..096c7d31596e97c5932b65e6d541624b538ce166 --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:015d08ff0dc12e7098e460ad2523fb1978f3ba5815de53b0811f12939b01176f +size 991862 diff --git a/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/layout.json b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d6ca8ad420d6749996117e6c071da99e5e0c1bea --- /dev/null +++ b/ICML/2025/EnsLoss_ Stochastic Calibrated Loss Ensembles for Preventing Overfitting in Classification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e72da2047274b365604f4403ce302ea6ec212951ecda9436d0308230a86f2ca0 +size 1126798 diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_content_list.json b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..06c6c437d7b27ec15af1665f2c7eacd074f58444 --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c37829dd57ffaf7db0c18d76b11df0f39eafcd75afa05622e10bf2ebc6b8103 +size 162762 diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_model.json b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_model.json new file mode 100644 index 0000000000000000000000000000000000000000..85043214846aa3e719495534f4001b4c00ad5fce --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aabe320a46649071be926ac9af5402c053137935e198e4292ef657bf6b0005e3 +size 201813 diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_origin.pdf b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..91e890a57ce9b6c618a689da97a12f615cd07285 --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/7aa7dd6c-d3fb-4b16-8121-6b76970eee00_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c3c6f22d7ee299d04ee75332efa0b386c6193732c873f1abf87c54a366d4952 +size 589769 diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/full.md b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b6a00a4b599511295a5b11c37835723e596ed0bd --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/full.md @@ -0,0 +1,660 @@ +# Ensemble Distribution Distillation via Flow Matching + +Jonggeon Park\* Giung Nam\* Hyunsu Kim' Jongmin Yoon' Juho Lee + +# Abstract + +Neural network ensembles have proven effective in improving performance across a range of tasks; however, their high computational cost limits their applicability in resource-constrained environments or for large models. Ensemble distillation, the process of transferring knowledge from an ensemble teacher to a smaller student model, offers a promising solution to this challenge. The key is to ensure that the student model is both cost-efficient and achieves performance comparable to the ensemble teacher. With this in mind, we propose a novel ensemble distribution distillation method, which leverages flow matching to effectively transfer the diversity from the ensemble teacher to the student model. Our extensive experiments demonstrate the effectiveness of our proposed method compared to existing ensemble distillation approaches. + +# 1. Introduction + +The concept of ensembling neural networks has long been a foundational approach in machine learning (Hansen and Salamon, 1990), based on the idea of constructing a strong hypothesis by combining multiple weaker ones (Kearns, 1988). Interestingly, ensemble methods remain highly relevant in the era of deep learning, offering a simple but effective way to improve the performance of deep neural networks (Ciresan et al., 2012; Krizhevsky et al., 2012). However, despite its benefits, a notable drawback of the ensemble method becomes more pronounced with deep neural networks: "many ensembles are large and slow" (Bucilua et al., 2006). To address this, the machine learning community has naturally gravitated toward compressing the ensembles into a single, more efficient model (Bucilua et al., 2006; Ba and Caruana, 2014; Hinton et al., 2014). + +*Equal contribution ${}^{1}$ Korea Advanced Institute of Science and Technology,Republic of Korea. Correspondence to: Juho Lee . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/bbb5d9d4ad41475ed64850a46456acdf93d9d9821ff703322881d56d7b0409af.jpg) +Figure 1. How good is ensemble distribution distillation? It illustrates how effectively different ensemble distribution distillation methods learn the diversity of the ensemble teacher. The x-axis represents the teacher diversity under different diversification strategies (§ 5.1), while the y-axis shows the performance of the distilled student in each setting (NLL; lower is better). The size of each circle marker indicates the level of diversity learned by the student, demonstrating how well each distillation method absorbs the teacher diversity and mimics the ensemble behavior of producing diverse predictions (§ 5.2). Our proposed EDFM approach effectively learns teacher diversity as it becomes more pronounced, continually absorbing it and outperforming baselines. + +Ensemble distillation is a specific form of knowledge distillation (Hinton et al., 2014), where the teacher model is an ensemble. Unlike the typical knowledge distillation setup, in which a single teacher model provides one prediction per training instance, ensemble distillation incorporates predictions from multiple teacher models, introducing diversity. While this diversity is a key distinguishing feature, simply adopting the basic knowledge distillation objective (Ba and Caruana, 2014; Hinton et al., 2014), i.e., averaging the distillation losses or teacher predictions, overlooks the diversity within the ensemble teacher. Consequently, the main goal in the ensemble distillation literature is to effectively leverage the multiple predictions, or the empirical predictive distribution, produced by the ensemble teacher (Cui et al., 2020; Malinin et al., 2020; Penso et al., 2022). + +Despite recent advances, a significant performance gap remains between ensemble teachers and their distilled students. This gap arises primarily from two key limitations: First, deep neural networks are typically trained to achieve near-zero training errors, causing ensemble models to produce highly correlated predictions on the training set. As a + +result, ensemble distillation methods operating on the same dataset struggle to transfer meaningful diversity to student models (Nam et al., 2021). Second, the capacity of student models is inherently constrained. Since ensemble distillation aims to approximate ensemble predictions efficiently, there exists a tradeoff between inference speed and predictive performance, e.g., embedding multiple subnetworks within a single model (Nam et al., 2021; Penso et al., 2022) fundamentally limits the expressiveness, making it difficult to capture the full diversity of ensemble predictions. + +Recently, Kim et al. (2024) reformulated ensemble distillation as a distribution-matching problem, leveraging the diffusion Schrödinger bridge (DSB) to map a single model's predictions to ensemble outputs. Unlike traditional methods, DSB enables flexible student modeling by iteratively refining predictions through a lightweight score network. However, their approach remains limited to approximating the ensemble's point estimates rather than modeling the full distribution of teacher predictions. + +In this paper, we propose a novel ensemble distribution distillation algorithm based on flow matching (Lipman et al., 2023). Our approach introduces a lightweight network that learns the vector field mapping a single model's prediction to the distribution of ensemble teacher predictions. Crucially, we emphasize the role of teacher diversity in distillation and show that existing methods fail to capture this diversity effectively, whereas ours succeeds (Fig. 2). Furthermore, our method enables fast, parallelizable inference, significantly reducing wall-clock time compared to prior approaches. We substantiate our claims through extensive experiments, covering a range of tasks including image classification and language modeling. Our contributions are summarized as follows. + +- We present a comprehensive analysis of ensemble distribution distillation with respect to both diversity and fidelity. In particular, we investigate when ensemble teachers exhibit diversity (§ 5.1) and how effectively distillation methods can learn from it (§§ 5.2 and 5.3). +- We propose a novel ensemble distribution distillation algorithm, Ensemble Distillation via Flow Matching (EDFM), which, as the name suggests, is based on the flow matching framework ( $\S 4$ ). Our extensive experiments on image classification and language tasks validate both the efficiency ( $\S 5.4$ ) and effectiveness ( $\S \S 5.5$ and $5.6$ ) of the approach. + +# 2. Preliminaries + +Notation. We focus on a $K$ -way classification problem, where a neural network parameterized by $\pmb{\theta} \in \Theta$ takes inputs $x \in \mathcal{X}$ and produces predictions for the corresponding labels $y \in \mathcal{Y}$ , with logits $\pmb{z}(x, \pmb{\theta}) \in \mathbb{R}^K$ . We also denote the + +categorical probabilities as $\pmb{p}(\pmb{x},\pmb{\theta}) = \mathrm{softmax}(\pmb{z}(\pmb{x},\pmb{\theta}))$ and their element-wise logarithm as $\log \pmb{p}(\pmb{x},\pmb{\theta})$ . For notational simplicity, we will often omit the dependence of logits and probabilities on inputs, e.g., $\pmb{p}(\pmb{x},\pmb{\theta})$ is written as $p_{\theta}$ when $x$ is clear from the context. + +Ensembles. We view ensembles within a Bayesian framework, where the model parameters $\theta$ are treated as random variables. More precisely, the predictive categorical distribution is approximated by an ensemble of neural networks defined by the set of parameters $\{\pmb{\theta}_m\}_{m=1}^M$ : + +$$ +p (y | x) = \mathbb {E} _ {\boldsymbol {\theta} \sim q (\boldsymbol {\theta})} [ p (y | x, \boldsymbol {\theta}) ] \approx \frac {1}{M} \sum_ {m = 1} ^ {M} p (y | x, \boldsymbol {\theta} _ {m}), \tag {1} +$$ + +assuming the parameters are sampled from the approximate posterior $q(\pmb{\theta})$ . In Bayesian literature, $q(\pmb{\theta})$ is commonly modeled using a Gaussian or a mixture of Gaussians to facilitate tractable sampling (Maddox et al., 2019; Shen et al., 2024). Focusing on the classification problem, $p(y|x,\pmb{\theta}) = \mathrm{Cat}(y|\pmb{p}_{\pmb{\theta}}(x))$ represents a $K$ -way categorical distribution with event probabilities $\pmb{p}_{\pmb{\theta}}(x)$ . + +Ensemble distillation. The most straightforward way to distill the ensemble teacher, defined by $q(\pmb{\theta})$ , into the student model, parameterized by $\phi$ , is to minimize + +$$ +\mathbb {E} _ {\boldsymbol {\theta} \sim q (\boldsymbol {\theta})} \left[ \mathcal {H} \left(\boldsymbol {p} _ {\boldsymbol {\theta}}, \boldsymbol {p} _ {\boldsymbol {\phi}}\right) \right], \tag {2} +$$ + +where $\mathcal{H}[\cdot ,\cdot ]$ computes the cross-entropy between two categorical probabilities, and $p_{\phi}$ is the categorical output from the student model. Eq. 2 is the average of standard distillation losses (Hinton et al., 2014), and it is equivalent to + +$$ +\mathcal {H} \left(\mathbb {E} _ {\boldsymbol {\theta} \sim q (\boldsymbol {\theta})} [ \boldsymbol {p} _ {\boldsymbol {\theta}} ], \boldsymbol {p} _ {\phi}\right), \tag {3} +$$ + +which is the standard distillation loss with the mean of the ensemble predictions. Unfortunately, this basic strategy entirely eliminates the diversity in ensemble predictions. + +Ensemble distribution distillation approaches make the student model capture the distribution of teacher predictions. Specifically, $\pmb{p}:\mathcal{X}\times \Theta \to \Delta^{K - 1}$ can be interpreted as a parametric function that maps the input space to the classprobability simplex. The random variable $\pi_{x}\coloneqq p(x,\theta)$ then represents the distribution of categorical probabilities for a given $x$ under the posterior over parameters $q(\pmb {\theta})$ . By introducing the induced distribution $q(\pi_x|x)$ , we obtain + +$$ +\begin{array}{l} p (y | x) = \int_ {\Theta} \operatorname {C a t} (y | \boldsymbol {p} (x, \boldsymbol {\theta})) q (\boldsymbol {\theta}) \mathrm {d} \boldsymbol {\theta} \tag {4} \\ = \int_ {\Delta^ {K - 1}} \operatorname {C a t} (y | \boldsymbol {\pi} _ {x}) q (\boldsymbol {\pi} _ {x} | x) \mathrm {d} \boldsymbol {\pi} _ {x}. \\ \end{array} +$$ + +Ultimately, the core idea of the ensemble distribution distillation scheme is to use a single student model, parameterized by $\phi$ , to model the induced distribution $q_{\phi}(\pi_x|x)$ . + +For example, a Dirichlet Prior Network (DPN; Malinin and Gales, 2018) could serve as the student model if we assume that $q(\pi_x|x)$ follows a Dirichlet distribution. While the Dirichlet distribution is a common choice for the induced distribution (Cui et al., 2020; Malinin et al., 2020), due to its conjugacy with the categorical distribution and its ability to facilitate tractable integration in Eq. 4, it is not necessarily required. The induced distribution is defined indirectly through the observations $\{\pmb{p}(\pmb{x},\pmb{\theta}_m)\}_{m=1}^M$ , with no guarantee that they follow the Dirichlet distribution. It motivates modeling the induced distribution as arbitrary, rather than necessarily Dirichlet (Penso et al., 2022). + +Flow matching. Flow Matching (FM; Lipman et al., 2023) is a framework for training simulation-free continuous normalizing flows (Chen et al., 2018) by learning vector fields that transport a base density $p_0(x)$ to a target density $p_1(x)$ along a deterministic probability path whose density function at time $t$ is specified as $p_t(x)$ . The probability path follows the neural ordinary differential equation (ODE) + +$$ +\mathrm {d} x _ {t} = u _ {t} \left(x _ {t}\right) \mathrm {d} t, \quad x _ {0} \sim p _ {0} \left(x _ {0}\right) \tag {5} +$$ + +where $u_{t}(x)$ represents the vector field that satisfies the continuity equation for mass conservation. FM is trained to minimize the discrepancy between the learned vector field $u_{t}$ and the ground-truth $v_{t}$ derived from data: + +$$ +\mathcal {L} _ {\mathrm {F M}} (\phi) = \mathbb {E} _ {t, x _ {t}} \left[ \lambda (t) \| u _ {t} \left(x _ {t}; \phi\right) - v _ {t} \left(x _ {t}\right) \| ^ {2} \right], \tag {6} +$$ + +where $t \sim \mathcal{T}$ defined over [0,1], $x_{t} \sim p_{t}$ , and $\lambda$ is a time-dependent weighting function. However, such a formulation Eq. 6 is challenging in general as obtaining the (marginal) ground-truth $v_{t}(x)$ is typically intractable. Instead, we model FM in logit space conditioned on input $x$ , requiring a Conditional Flow Matching (CFM) formulation conditioned by the base density $p_0$ , where both the base and target distributions depend on an auxiliary variable $c$ : + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C F M}} (\phi) \\ = \mathbb {E} _ {t, x _ {t}, x _ {0}} \left[ \lambda (t) \| u _ {t} \left(x _ {t} \mid x _ {0}, c; \phi\right) - v _ {t} \left(x _ {t} \mid x _ {0}, c\right) \| ^ {2} \right], \tag {7} \\ \end{array} +$$ + +where $t \sim \mathcal{T}, x_0 \sim p_0(x_0|c)$ , and $x_t \sim p_t(x_t|x_0,c)$ . FM has been successfully applied to generative modeling due to improved training stability and computational efficiency. + +# 3. Related Work + +Ensemble distillation. In recent years, extensive research on ensemble distillation using deep neural networks has focused on three key design components: “how to construct the ensemble teacher” (Ba and Caruana, 2014; Korattikara et al., 2015; Bulò et al., 2016), “how to design the student model” (Cui et al., 2020; Malinin et al., 2020; Tran et al., 2020; Mariet et al., 2021; Penso et al., 2022), and, most + +importantly, "how to distill the ensemble teacher into a single student model" (Cui et al., 2020; Malinin et al., 2020; Du et al., 2020; Ryabinin et al., 2021; Nam et al., 2021; Nam et al., 2022; Penso et al., 2022). A central philosophy shared by most of these studies is that "diversity matters when learning from ensembles" (Nam et al., 2021), highlighting the importance of effectively accounting for the diversity inherent in the ensemble teacher during the distillation process. To this end, 1) one-to-one ensemble distillation approaches design the student model to handle multiple predictions, using methods such as multi-headed modeling (Tran et al., 2020) or weight-sharing techniques (Mariet et al., 2021; Nam et al., 2021), while 2) ensemble distribution distillation methods model the distribution of the ensemble predictions (Cui et al., 2020; Malinin et al., 2020; Ryabinin et al., 2021; Penso et al., 2022). + +Fast and efficient ensembling. There has been a persistent demand for more cost-efficient ensemble methods, as ensembles of deep neural networks are typically associated with high computational costs during both training and inference. Research under the terms fast or efficient ensembling has aimed to address this demand, including: "how to reduce training costs for ensemble construction" (Huang et al., 2017; Garipov et al., 2018; Benton et al., 2021), and "how to reduce inference costs for ensemble behaviour" (Lee et al., 2015; Wen et al., 2020; Havasi et al., 2021; Yun et al., 2023). In particular, Yun et al. (2023) emphasized the importance of reducing test-time costs for practical applications and proposed a framework that mimics the output of one ensemble component based on the output of another using a lightweight neural network. Kim et al. (2024) further extended this approach by utilizing the Schrödinger bridge algorithm (Liu et al., 2023a), mimicking the mean of the ensemble predictions. Our approach is most closely related to these works, as it also leverages the outputs of a single ensemble component. However, the key difference is that we perform ensemble distribution distillation via flow matching, sampling from the ensemble's predictive distribution rather than producing a single point estimate, thereby better capturing the ensemble's diversity. + +Flow matching and knowledge distillation. Meanwhile, there have also been efforts (Shao et al., 2024; Huang et al., 2023; Yao et al., 2024) to incorporate flow matching or diffusion models into knowledge distillation. These methods, however, bear greater resemblance to DBN (Kim et al., 2024) than to EDFM, as they primarily rely on one-to-one alignment of logits or intermediate features between teacher and student models. Distilling the knowledge of the diffusion model itself, especially in terms of synthesis efficiency, has also been widely investigated (Salimans and Ho, 2022; Song et al., 2023; Yin et al., 2024a; Yin et al., 2024b). We expect that these contributions might offer meaningful insights for further improvements of EDFM. + +# 4. Approach + +# 4.1. Flow matching in logit space + +For a given input $x$ , we consider the logits $z(x, \theta)$ with $\theta \sim q(\theta)$ , predicted by the ensemble teacher with the approximate posterior $q(\theta)$ . These logits are assumed to follow the distribution $p_1$ : + +$$ +\boldsymbol {z} _ {1} ^ {x} \sim p _ {1} \left(\boldsymbol {z} _ {1} ^ {x} | x\right), \tag {8} +$$ + +where the dependence on $\theta$ is omitted for simplicity, and we denote $z_1^x \equiv z(x, \theta)$ . Our goal is to construct a probability path whose density function at time $t$ is specified as $p_t$ for $t \in (0, 1)$ , starting from the source distribution $p_0(\cdot | x) \coloneqq \mathcal{N}(\cdot; \mathbf{0}, \sigma^2 \mathbf{I})$ and transitioning to the target distribution $p_1(\cdot | x)$ . To achieve this, we introduce a conditional vector field $u: [0, 1] \times \mathbb{R}^K \times \mathcal{X} \to \mathbb{R}^K$ in the $K$ -dimensional logit space: + +$$ +u (t, \boldsymbol {z} _ {t} ^ {x}, x) := \frac {\boldsymbol {z} _ {1} ^ {x} - \boldsymbol {z} _ {t} ^ {x}}{1 - t}, \tag {9} +$$ + +which induces a conditional probability path: + +$$ +p _ {t \mid 1} \left(\boldsymbol {z} _ {t} ^ {x} \mid \boldsymbol {z} _ {1} ^ {x}, x\right) = \mathcal {N} \left(\boldsymbol {z} _ {t} ^ {x} \mid t \boldsymbol {z} _ {1} ^ {x}, (1 - t) ^ {2} \mathbf {I}\right), \tag {10} +$$ + +for $0 \leq t \leq 1$ . Conditioned on $\mathbf{z}_1^x \sim p_1(\mathbf{z}_1^x | x)$ , the random variables $\mathbf{z}_{t|1}^x$ conditioned on $t \in [0, 1]$ are given by: + +$$ +\boldsymbol {z} _ {t | 1} ^ {x} = t \boldsymbol {z} _ {1} ^ {x} + (1 - t) \boldsymbol {z} _ {0} ^ {x} \sim p _ {t | 1}, \tag {11} +$$ + +and the marginal random variable $z_{t}^{x}\sim p_{t}$ is defined as a linear combination of $z_0^x\sim p_0$ and $z_{1}^{x}\sim p_{1}$ : + +$$ +\boldsymbol {z} _ {t} ^ {x} = t \boldsymbol {z} _ {1} ^ {x} + (1 - t) \boldsymbol {z} _ {0} ^ {x} \sim p _ {t} ^ {x}. \tag {12} +$$ + +Building on these formulations, we model $u$ using $u_{\phi}$ , a neural network parameterized by $\phi$ . The network is trained by minimizing the conditional flow matching loss: + +$$ +\mathcal {L} (\phi) = \mathbb {E} _ {t, \boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} [ \lambda (t) \| u _ {\phi} (t, \boldsymbol {z} _ {t} ^ {x}, x) - (\boldsymbol {z} _ {1} ^ {x} - \boldsymbol {z} _ {0} ^ {x}) \| ^ {2} ], \tag {13} +$$ + +where $t\sim \mathcal{T}$ $z_0^x\sim p_0$ $z_{1}^{x}\sim p_{1}$ , and $\lambda$ denotes a timedependent weighting function (cf. $\S 4.3$ + +It is important to note that our formulation of flow matching represents one of the simplest instances, corresponding to a rectified flow (Liu et al., 2023b) between Gaussian noise and the data distribution. More sophisticated approaches are conceivable, including 1) incorporating the geometric structure of logits, such as flow matching constrained to the probability simplex, or 2) modifying the perturbation schedule, for example, adopting diffusion models instead of flow matching. Nonetheless, empirical evaluation revealed that many of these more complex formulations underperform relative to the simple approach presented here. Further ablation studies examining various formulations are provided in Appendix A.1. + +# 4.2. Student network + +The student network $u_{\phi}$ is designed to condition on the input data by incorporating relevant information associated with $x$ . To this end, we utilize features extracted from the penultimate layer of a pretrained teacher network—for example, representations prior to the average pooling layer in the ResNet architecture (He et al., 2016)—as conditioning inputs. Leveraging such pretrained features not only enhances the student network's ability to discriminate between different inputs but also transfers valuable knowledge embedded in the teacher network, thereby facilitating faster convergence and improved performance. Since the pretrained teacher network serving as a feature extractor remains fixed during flow matching training, the computational overhead incurred is substantially lower than that required for training the teacher network itself. + +For the student network architecture, we employ a denoising multilayer perceptron (MLP) structure as proposed by Li et al. (2024). This lightweight architecture consists of a limited number of residual MLP blocks. Within each block, the perturbed sample $z_{t}^{x}$ is concatenated with the conditioning input, followed by the integration of time-embedding information via an adaptive layer normalization mechanism with zero initialization (Peebles and Xie, 2023). This processed representation then passes through an MLP layer with a skip connection. Despite being simple, this simple architecture proves sufficient to capture the target distribution, given the inherently low-dimensional nature of the logit space. Additionally, due to the computational efficiency of MLP layers on modern hardware accelerators such as GPUs, the MLP-based student network offers significant advantages in execution time, particularly for parallel sampling, as will be shown in § 5.4. It should be noted, however, that the denoising MLP is not the sole practical option for EDFM. While the MLP architecture offers a favorable balance between computational efficiency and performance, alternative architectures, such as transformers, may be more suitable in specific contexts, particularly when scalable student networks are required. Further analysis of the impact of network architecture on EDFM performance is provided in Appendix A.2. + +# 4.3. Training and inference + +We identified the variance of the initial Gaussian noise $\sigma$ and the time distribution $\mathcal{T}$ as critical factors influencing the performance of EDFM. Through extensive ablation studies, we set $\sigma = 4$ and defined $\mathcal{T}$ as a distribution over [0,1] that places exponentially greater weight near $t = 1$ , i.e., near the data. Additionally, we adopted the preconditioning technique proposed by Karras et al. (2022) for the student network, ensuring that the network input and loss function maintain comparable scales with unit variance, + +# Algorithm 1 Training EDFM + +Require: Train dataset $\mathcal{D} = \{(x_i)\}_{i=1}^N$ , noise distribution $p_0 := \mathcal{N}(\cdot; \mathbf{0}, \sigma^2 \mathbf{I})$ , time distribution $\mathcal{T}$ , time-dependent weighting function $\lambda$ , empirical distribution of ensemble teacher logits conditioned on data $x$ , $p_1(z_1^x | x)$ , learning rate $\eta$ , pretrained teacher network $\theta$ , and student network $\phi$ + +1: repeat +2: Sample $x\sim \mathcal{D}$ +3: Sample $z_0^x \sim p_0, z_1^x \sim p_1(z_1^x | x), t \sim \mathcal{T}$ +4: Extract feature $\bar{x}$ of input $x$ from teacher $\theta$ +5: Obtain perturbed sample $z_{t}^{x}$ according to (12) +6: Compute student network output $u_{\phi}(t,z_t^x,\bar{x})$ +7: Compute loss $\mathcal{L}_{\phi}$ according to (13) +8: Update parameters: $\phi \gets \phi -\eta \nabla_{\phi}\mathcal{L}_{\phi}$ +9: until $\phi$ is converged + +while the variance of the network output is minimized. The time-dependent weighting function $\lambda$ was selected under this principle. The training algorithm for EDFM is detailed in Algorithm 1. + +For sampling, the choice of ODE solver, the scheduling of sampling steps, and the total number of steps proved essential to performance. After thorough evaluation, we employed the Heun solver (Karras et al., 2022) and scheduled sampling steps to be exponentially concentrated near the data. Because our flow matching formulation reduces to rectified flow, it generates relatively straight trajectories toward the logits, facilitating efficient sampling with a reduced number of network function evaluations (NFEs). Empirically, we observed that high-quality logits can be obtained with as few as two steps (equivalent to five NFEs), even in relatively high-dimensional spaces of up to 100 dimensions. We emphasize here that the iterative nature of flow matching sampling does not substantially increase the overall sampling time. This efficiency arises because the pretrained teacher network, which serves as a fixed feature extractor, is executed only once per input, as the conditioning information remains constant throughout the sampling iterations. The algorithm for sampling from EDFM is presented in Algorithm 2. Please refer to Appendix A.3 for further details on the design choices of EDFM. + +# 5. Experiments + +We utilize Multi-SWAG (Wilson and Izmailov, 2020) and Multi-IVON (Shen et al., 2024) as ensemble teachers for image and language tasks, respectively, owing to their scalability and proven effectiveness (Wilson et al., 2022). For the image classification experiments in § 5.5, we use a ResNet with a depth of 32, projection shortcuts, filter response normalization, and Swish activation, as described + +# Algorithm 2 Sampling from EDFM + +Require: Test dataset $\mathcal{D} = \{(x_i)\}_{i=1}^N$ , noise distribution $p_0 \coloneqq \mathcal{N}(\cdot; \mathbf{0}, \sigma^2 \mathbf{I})$ , number of sampling steps $N$ , truncation $\epsilon$ , sampling step schedule $\{1 = t_N, \dots, t_0 = \epsilon\}$ , ODE solver, pretrained teacher network $\theta$ , and trained student network $\phi$ + +1: Sample $x\sim \mathcal{D}$ +2: Sample $z_0^x \sim p_0$ +3: Extract feature $\bar{x}$ of input $x$ from teacher $\theta$ +4: $z\gets z_0^x$ +5: for $i = N$ to 2 in reverse do +6: $z\gets \mathrm{ODE}$ solver $(z,t_i,t_{i - 1},u_{\phi}(t_i,z,\bar{x}))$ +7: end for +8: $z\gets z - (t_1 - t_0)u_{\phi}(t_1,z,\bar{x})$ +9: Return $z$ + +in Kim et al. (2024). For the commonsense reasoning experiments in § 5.6, we employ a pretrained LLaMA-2-7B base model (Touvron et al., 2023). For details on ensemble teacher construction, please see Appendices B.1 and B.2. + +Unless specified, 'Mean±Std' results are reported as the mean and standard deviation calculated over three trials across tables. The best and second-best values are highlighted using bold-faced underline and underline, respectively. As baselines, we include KD (Hinton et al., 2014), EnDD (Ryabinin et al., 2021), FED (Penso et al., 2022), and DBN (Kim et al., 2024), and the ensemble teacher. We refer readers to Appendices B.3 and B.4 for details on evaluation metrics and baseline methods. + +# 5.1. When do teacher predictions get diverse? + +The existing ensemble distillation literature emphasizes the importance of ensuring sufficiently diverse teacher predictions for effective distillation (Malinin et al., 2020; Nam et al., 2021). However, deep neural networks tend to produce over-confident predictions on training data, making it difficult to capture the ensemble diversity of the teachers when this data is reused during distillation. To address this, various strategies have been employed to diversify teacher predictions. For instance, Malinin et al. (2020) employed auxiliary datasets, Nam et al. (2021) and Nam et al. (2022) developed diversifying perturbations, and Penso et al. (2022), Yun et al. (2023), and Kim et al. (2024) utilized mixup augmentation applied to the training data. + +Building on these established conventions in the ensemble distillation literature, we present a comprehensive analysis of teacher diversity across various diversification strategies for image classification tasks, including: 1) RandAugment (RA; Cubuk et al., 2020) and 2) mixup (Zhang et al., 2018), both of which are strong image augmentation techniques; 3) TDiv (Nam et al., 2022), a perturbation-based di + +Table 1. Diversity analysis of teacher predictions. We analyze teacher diversity by computing ensemble variance decomposition, which consists of EnsUnc, AvgUnc, and VAR. Higher VAR indicates greater diversity in ensemble predictions. + +
DatasetSplitDiversificationDecomposition
RAmixupTDivEnsUncAvgUncVAR (↑)
C10TRN0.00870.00690.0018
TRN✓0.07050.03500.0355
TRN✓✓0.12120.05390.0673
TRN✓0.12780.06380.0640
TRN✓✓0.18500.09020.0948
TRN✓✓✓0.18680.08530.1014
VAL0.08450.04090.0436
AUX0.26800.12440.1436
+ +versifying approach; and 4) $AUX$ , which uses CINIC-10 as an auxiliary dataset. To quantify diversity without relying on ground-truth labels, we compute the ensemble variance (VAR), with higher VAR values indicating greater diversity. For detailed definitions of $\text{EnsUnc}$ , $\text{AvgUnc}$ , and VAR, we refer readers to Appendix B.3. + +Table 1 presents the diversity of ensemble teacher predictions across the training (TRN) and validation (VAL) splits of CIFAR-10/100, as well as the auxiliary (AUX) CINIC-10 dataset. The results clearly show that, without explicit diversification strategies, ensemble teachers produce predictions with limited diversity on training images. We hypothesize that this lack of teacher diversity can hinder effective ensemble distribution distillation when these images are reused. In § 5.2, we experimentally validate this hypothesis, demonstrating that ensemble distribution distillation improves as the teacher provides more diverse predictions through diversification strategies. In other words, a good distillation method should capture and leverage as much diversity as possible from the ensemble teacher. + +# 5.2. When do ensemble distillation methods work? + +In our CIFAR-10 setup, we examine the following scenarios for distilling the ensemble teacher, each capturing different levels of teacher diversity: 1) TRN, 2) TRN w/ mixup, 3) TRN w/ mixup and RA, and 4) AUX. As shown in Table 1, the diversity of the ensemble teacher gradually increases, with VAR values of [.0018, .0355, .0948, .1436]. In the AUX setup, CINIC-10 is used as an auxiliary dataset, with images from CIFAR-10 excluded (see Appendix B.1 for details), introducing a slight distribution shift (De Silva et al., 2023). We also exclude TDiv from our analysis, as its computation requires a backward pass for perturbation, which significantly increases training costs. + +Fig. 1 summarizes the results of ensemble distribution distillation using EnDD, FED, and our proposed EDFM algorithms across four setups. The x-axis represents the setups + +and their corresponding teacher diversity during distillation (VAR; higher values indicate greater diversity), while the y-axis shows the test performance and calibration of the distilled model (NLL and ECE; lower values indicate better performance and calibration). The size of the circle markers reflects the diversity of the distilled model on the test split (VAR; larger markers indicate greater diversity). The VAR values are computed by sampling 30 predictions for each, even for EnDD, which typically omits the sampling process when computing the mean prediction. + +Fig. 1 conveys a key insight into ensemble distribution distillation: to be where the diversity is. As ensemble distribution distillation methods are applied to setups where teacher diversity becomes more prominent, they tend to more effectively mimic the ensemble behavior of generating diverse predictions (as reflected by the increasing circle marker sizes). However, while the student model's ability to replicate the teacher's diversity improves, this does not always lead to consistent performance gains for EnDD and FED. For EnDD, the best performance occurs in the second setup, while for FED, the highest performance is observed in the third setup. Beyond these points, despite the increased diversity, performance begins to decline. + +Notably, our proposed EDFM approach not only shows higher prediction diversity but also demonstrates a consistent improvement in performance. As we will discuss in § 5.3, our method exhibits strong fidelity to the teacher; that is, the student learns not merely to generate predictions with high variance, but to genuinely replicate the ensemble teacher's behavior, thereby producing diverse predictions in a more meaningful way. To summarize, ensemble distribution distillation only can be done effectively when the teacher exhibits a certain level of diversity. However, simply learning to generate high variance is insufficient; the student must genuinely mimic the ensemble teacher's behavior, and we will validate this in our method. + +# 5.3. How effective ensemble distillation methods are? + +We evaluate the effectiveness of ensemble distribution distillation methods in three aspects: 1) diversity, which measures how well the student exhibits prediction diversity, a key characteristic of the ensemble; 2) fidelity, which assesses how closely the student mimics the teacher; and 3) generalization, which determines whether the student can achieve performance on par with the ensemble teacher across a range of tasks. The in-depth analysis of generalization will be discussed in §§ 5.5 and 5.6, while here we focus on the diversity and fidelity analyses. + +Diversity analysis. The operational principle of ensemble methods is diversity; ensembles achieve better performance when their individual members offer diverse predictions (Krogh and Vedelsby, 1994; Dietterich, 2000), a prin + +![](images/3c7798b329f3c956cc29cf962ee952859e4f34d80157f8fe0a0502bd8442d14d.jpg) +Figure 2. Diversity analysis. We compute the ambiguity decomposition to assess the diversity of the distilled model's predictions and its contribution to the ensemble gain, as shown in the shaded portion of each bar (AMB). + +ciple that holds true even in the deep learning era (Lakshminarayanan et al., 2017; Wilson and Izmailov, 2020; Ortega et al., 2022). To this end, we compute the ensemble ambiguity (AMB) decomposition to assess how diverse the set of predictions is and how much this diversity contributes to the ensemble gain. In particular, AMB provides insights into the performance improvement of the ensemble over the average individual performance through ambiguity decomposition, revealing the gain derived from diversity. For more details, please refer to Appendix B.3. + +Fig. 2 illustrates the results of our diversity analysis on the CIFAR-10 test split. The diversity of the distilled student increase as the distillation setup more effectively captures the teacher's diversity; from (A) to (D), the shaded area, representing AMB, expands. It again highlights that ensemble distribution distillation methods successfully learn the ensemble behavior of generating diverse predictions, particularly when teacher diversity is evident; in the (A) setup, where no diversification strategies are applied, all methods fall short of the ensemble teacher's level of AMB, resulting in limited performance improvements from AMB. Notably, our EDFM not only consistently exhibits higher diversity but also shows significant gains from that diversity, as demonstrated by AMB. It clearly indicates that our method does not simply learn to generate high-variance predictions, but instead effectively harnesses diversity to drive performance improvements. + +Fidelity analysis. Next, we analyze the effectiveness of ensemble distribution distillation methods from the perspective of fidelity, which quantifies how well a student model replicates the teacher's predictions. Since the core philosophy of knowledge distillation is to encourage the student to mimic the teacher (Ba and Caruana, 2014; Hinton et al., 2014), measuring the degree to which the student replicates the teacher is essential. While higher fidelity does not always guarantee better generalization—an example being the self-distillation setup of Furlanello et al. (2018), where a student that perfectly matches the teacher cannot surpass it—fidelity analysis remains crucial for understanding the underlying mechanisms, as discussed by Stanton et al. (2021). To quantify teacher-student fidelity, we compute several metrics: disagreement (AGR), total varia + +![](images/3ad614cf129ab38dd5f3fa6e8f67d970032883cfb5a8db107b5f2b71835071eb.jpg) +Figure 3. Fidelity analysis. We compute DGR, TVD, KLD, JSD, and $\mathcal{W}_2$ to assess how closely the distilled model's predictions align with those of the teacher. + +tion distance (TVD), Kullback-Leibler divergence (KLD), Jensen-Shannon divergence (JSD), and Wasserstein-2 distance $(\mathcal{W}_2)$ . Lower values for these metrics indicate that the student's ensemble predictions are more closely aligned with those of the ensemble teacher. For detailed definitions of each metric, we refer readers to Appendix B.3. + +Fig. 3 illustrates the results of our fidelity analysis on the CIFAR-10 test split. For all the metrics we measured, our EDFM achieves higher fidelity compared to the baselines across all setups. Notably, even when comparing distributions (rather than just the mean of ensemble predictions), as seen with $\mathcal{W}_2$ , EDFM demonstrates superior fidelity. It clearly indicates that our approach effectively models the induced distribution over categorical probabilities $q(\pi_x|x)$ and closely approximates the ensemble teacher's predictive distribution $p(y|x)$ in Eq. 4. + +# 5.4. How efficient ensemble distillation methods are? + +To efficiently produce ensemble predictions, Nam et al. (2022) and Penso et al. (2022) use parallelized inference by replicating a single test input to form a mini-batch. However, unless the neural network is extremely small, processing time increases significantly as the batch size grows. On an RTX A6000, a ResNet processes a single input (batch size of 1) in $1.404\mathrm{ms}$ , while batch sizes of [32, 64, 128, 256] take [3.806, 6.993, 13.05, 24.68] ms, exhibiting a near-linear increase in our CIFAR-100 setup. It suggests inherent limits in reducing runtime when batched inference is required for ResNet, as in FED (Penso et al., 2022). + +![](images/4536328b124d00a2fa27d6f8b4df65570fc3351f4042d55a1c8bf709e704e525.jpg) +Figure 4. Runtime analysis on CIFAR-100 setup. Down and left indicate better performance and cost-efficiency, with the lower-left corner being the most desirable. + +In contrast, our method performs single inference for large backbone networks (ResNet) and parallelized inference for smaller student networks (MLP), where the benefits of batch inference are more pronounced. In the same CIFAR-100 setup used for the previous analysis, processing a single input (mini-batch size of 1) with an MLP model takes $0.053\mathrm{ms}$ , while processing batched inputs with mini-batch sizes of [256, 384, 512, 640, 768, 1024] takes [0.101, 0.114, 0.128, 0.149, 0.182, 0.210] ms. Since the processing time remains at a significantly lower cost compared to ResNet, EDFM demonstrates a strong advantage in scaling ensemble predictions through parallelized inference. Building on this advantage, we investigated how the number of ensemble predictions in EDFM can scale within a constrained execution time budget. + +Runtime analysis. Fig. 4 illustrates the evolution of both NLL and execution time as the number of student ensembles increases. While the execution time of MultiSWA ensembles scales proportionally with the number of ensembles, EDFM exhibits only a marginal increase in computational overhead. Although the execution time of FED scales at a slower rate than MultiSWA, it introduces a nonnegligible overhead, and more importantly, its performance merely improves in proportion to the increased execution time. In contrast, with EDFM, the enhancement in ensemble NLL closely mirrors that of the MultiSWA teacher. This not only provides empirical evidence that EDFM effectively captures the diversity inherent in the teacher ensemble distribution, but also underscores its practical utility in enabling efficient fast ensembling. + +# 5.5. Image classification tasks + +We validate our proposed EDFM approach in terms of generalization through image classification experiments on CIFAR datasets. Since ensemble approach not only enhances in-distribution performance but also improves robustness + +Table 2. Evaluation results for image classification tasks. We evaluate ACC, NLL, and ECE to assess how accurate and well-calibrated the predictions are. + +
DatasetMethodACC (↑)NLL (↓)ECE (↓)
C10SWA baseline (w/o distill)0.932±0.0010.289±0.0010.046±0.000
Multi-SWAG teacher0.9460.1670.007
KD (Hinton et al., 2014)0.931±0.0040.229±0.0050.020±0.007
-EnDD (Ryabinin et al., 2021)0.937±0.0010.228±0.0040.023±0.001
DBN (Kim et al., 2024)0.936±0.0010.218±0.0020.028±0.001
-FED (Penso et al., 2022)0.922±0.0090.238±0.0230.009±0.001
EDFM (ours)0.931±0.0000.216±0.0010.009±0.001
C100SWA baseline (w/o distill)0.735±0.0041.369±0.0190.173±0.004
Multi-SWAG teacher0.7770.8350.018
KD (Hinton et al., 2014)0.760±0.0030.965±0.0080.073±0.000
-EnDD (Ryabinin et al., 2021)0.761±0.0031.031±0.0020.084±0.003
DBN (Kim et al., 2024)0.757±0.0011.002±0.0040.098±0.001
-FED (Penso et al., 2022)0.721±0.0221.026±0.0950.028±0.003
EDFM (ours)0.761±0.0010.932±0.0030.056±0.000
+ +Table 3. Robustness to distribution shifts. We evaluate ACC, NLL, and ECE to assess robustness to distribution shifts. + +
DatasetMethodACC (↑)NLL (↓)ECE (↓)
C10.1SWA baseline (w/o distill)0.859±0.0010.631±0.0070.100±0.000
Multi-SWAG teacher0.8750.3860.020
-KD (Hinton et al., 2014)0.859±0.0030.480±0.0270.048±0.025
-EnDD (Ryabinin et al., 2021)0.869±0.0090.482±0.0040.064±0.004
-DBN (Kim et al., 2024)0.865±0.0030.481±0.0080.071±0.002
-FED (Penso et al., 2022)0.839±0.0130.481±0.0470.028±0.008
EDFM (ours)0.858±0.0000.455±0.0000.034±0.002
C10.2SWA baseline (w/o distill)0.802±0.0040.990±0.0040.151±0.005
Multi-SWAG teacher0.8180.6520.066
-KD (Hinton et al., 2014)0.804±0.0010.715±0.0480.093±0.032
-EnDD (Ryabinin et al., 2021)0.815±0.0050.780±0.0110.112±0.004
-DBN (Kim et al., 2024)0.808±0.0010.781±0.0010.118±0.001
-FED (Penso et al., 2022)0.786±0.0130.758±0.0460.076±0.011
EDFM (ours)0.802±0.0040.666±0.0040.076±0.002
STLSWA baseline (w/o distill)0.789±0.0021.005±0.0080.159±0.002
Multi-SWAG teacher0.8070.6150.055
-KD (Hinton et al., 2014)0.788±0.0030.726±0.0600.093±0.036
-EnDD (Ryabinin et al., 2021)0.797±0.0010.770±0.0030.111±0.002
-DBN (Kim et al., 2024)0.794±0.0010.759±0.0010.124±0.001
-FED (Penso et al., 2022)0.777±0.0120.698±0.0400.064±0.010
EDFM (ours)0.787±0.0010.691±0.0060.074±0.006
+ +to distribution shifts and out-of-distribution scenarios by effectively capturing predictive uncertainty (Ovadia et al., 2019), ensemble distribution distillation methods should learn these strengths from the ensemble teacher. To assess this, we evaluate our approach on CIFAR-10/100 test splits, as well as distribution shift datasets (CIFAR-10.1, CIFAR-10.2, and STL) and the out-of-distribution dataset (SVHN). For more details, please refer to Appendix B.1. + +Results. Table 2 shows the evaluation results on CIFAR-10/100 test splits, clearly demonstrating the competitive performance of our proposed EDFM. + +Robustness to Distribution Shifts. Table 3 presents the evaluation results on datasets associated with CIFAR-10. Since these datasets share the same 10-class labeling as CIFAR-10, we evaluate ACC, NLL, and ECE in the same manner as the standard test split. However, a distinguishing feature from the original CIFAR-10 test split is that, + +Table 4. Out-of-distribution detection. We evaluate AUROC, TNR95, and TNR99 to assess out-of-distribution dection. + +
DatasetMethodAUROC (↑)TNR95 (↑)TNR99 (↑)
SVHNSWA baseline (w/o distill)0.893±0.0020.706±0.0190.515±0.063
Multi-SWAG teacher0.9350.7860.679
KD (Hinton et al., 2014)0.912±0.0170.731±0.0600.572±0.043
-EnDD (Ryabinin et al., 2021)0.895±0.0020.668±0.0220.450±0.030
-DBN (Kim et al., 2024)0.907±0.0030.740±0.0110.605±0.009
-FED (Penso et al., 2022)0.932±0.0060.778±0.0190.637±0.052
EDFM (ours)0.934±0.0020.784±0.0050.656±0.035
+ +because these datasets exhibit distribution shifts, predictions must not only be accurate but also well-calibrated. Our EDFM approach clearly not only achieves competitive ACC but also excels in NLL and ECE with wide margins, demonstrating strong robustness to distribution shifts. + +Out-of-distribution detection. Table 4 presents the evaluation results for out-of-distribution detection, assessing the model's ability to distinguish between in-distribution and out-of-distribution inputs using receiver operating characteristic (ROC) metrics: area under the curve (AUROC) and true negative rates at $95\%$ and $99\%$ true positive rate (TNR95 and TNR99). We employ 1,000 in-distribution images from the CIFAR-10 test split and 1,000 out-of-distribution images from the SVHN dataset, ensuring a balanced dataset to maintain the reliability of these metrics. Our EDFM approach outperforms baselines by producing higher entropy predictions for out-of-distribution inputs, reflecting greater uncertainty. + +# 5.6. Commonsense reasoning tasks + +We further validate the scalability of our approach through experiments with large language models. The challenges of large and slow ensemble methods are amplified in modern large-scale models, where the computational burden of performing multiple forward passes through models with billions of parameters becomes particularly significant. In this context, addressing the ensemble distribution distillation problem is highly valuable; it would be more appropriate for the ensemble model to remain in the development phase, serving as a teacher for distillation rather than being directly deployed. Consequently, we assess whether our approach can effectively perform ensemble distribution distillation from a Multi-IVON teacher, which exhibits improved calibration (Shen et al., 2024; Cong et al., 2024). For experimental details on the tasks and training specifics, we refer readers to Appendix B.2. + +Table 5 summarizes evaluation results on commonsense reasoning tasks, including ARC-C, ARC-E, and OBQA. The lower NLL and ECE of the Multi-IVON teacher compared to the IVON baseline, as presented in the first two rows of each group, clearly demonstrate that ensembling with samples from Multi-IVON's posterior distribution im + +Table 5. Evaluation results for commonsense reasoning tasks. We evaluate ACC, NLL, and ECE to assess how accurate and well-calibrated the predictions are. + +
DatasetMethodACC (↑)NLL (↓)ECE (↓)
ARC-CIVON baseline (w/o distill)0.710±0.0111.874±0.1670.246±0.009
Multi-IVON teacher0.6750.8910.091
KD (Hinton et al., 2014)0.662±0.0321.126±0.0800.218±0.015
EDFM (ours)0.715±0.0141.113±0.0360.142±0.011
ARC-EIVON baseline (w/o distill)0.888±0.0060.645±0.0320.094±0.003
Multi-IVON teacher0.8680.3570.026
KD (Hinton et al., 2014)0.850±0.0040.570±0.0190.057±0.002
EDFM (ours)0.892±0.0020.390±0.0020.044±0.006
OBQAIVON baseline (w/o distill)0.809±0.0090.653±0.0110.111±0.007
Multi-IVON teacher0.7940.5140.032
KD (Hinton et al., 2014)0.776±0.0050.720±0.0120.102±0.005
EDFM (ours)0.818±0.0100.537±0.0050.046±0.004
+ +proves calibration (a slight drop in ACC is consistent with Cong et al. (2024), as we do not explicitly sharpen the posterior in our experiments). The results clearly demonstrate that our EDFM improves upon the IVON baseline by effectively distilling the Multi-IVON teacher, producing well-calibrated predictions that significantly outperform the KD baseline and closely match the teacher's calibration quality. It is worth noting that our approach still leverages a lightweight MLP architecture for flow modeling in this large language model experiment; the model consists of three blocks with a hidden dimension of 256, totaling just 1.6 million parameters—significantly smaller than the 6.7 billion parameters of the LLaMA-2 backbone and even more compact than the 4.2 million parameters required for LoRA fine-tuning. Accordingly, our approach achieves well-calibrated predictions comparable to those of the Multi-IVON teacher while incurring virtually no additional cost beyond a single LLaMA-2 forward pass—unlike the teacher, which requires multiple passes. + +# 6. Conclusion + +We present a novel ensemble distribution distillation approach using flow matching, where a lightweight neural network learns the vector field that transforms a single model's prediction into the predictive distribution of the ensemble teacher. Extensive experiments demonstrate that our flow matching approach effectively captures the diversity of the ensemble teacher, unlike prior works that fail to do so, which leads to substantial improvements in both accuracy and uncertainty calibration. It also enables fast, parallelizable inference, significantly reducing inference costs compared to existing distillation methods, and remains scalable even for language tasks involving modern large language models. An intriguing avenue for future research is the development of more advanced flow matching strategies specifically tailored for ensemble distillation. + +# Acknowledgement + +We thank Youngwoo Park for sharing his insights. This work was partly supported by Institute of Information & communications Technology Planning & Evaluation(IITP) grant funded by the Korea government(MSIT) (No.RS-2024-00509279, Global AI Frontier Lab; No.RS-2019-II190075, Artificial Intelligence Graduate School Program(KAIST); No.RS-2022-II220713, Meta-learning Applicable to Real-world Problems; No.RS-2022-II220184, Development and Study of AI Technologies to Inexpensively Conform to Evolving Policy on Ethics). This material is based upon work supported by the Google Cloud Research Credits program with the award GCP19980904 and Cloud TPU's from Google's TPU Research Cloud (TRC). + +# Impact Statement + +This paper focuses on enhancing ensemble distillation frameworks with generative modeling, such as flow matching methods. By improving knowledge distillation through these approaches, our method contributes to making model compression and deployment more efficient, particularly in resource-constrained environments. Although our method is broadly applicable across various downstream tasks, it does not inherently raise ethical concerns or pose direct societal impacts. Nonetheless, as with any advancement in AI model training, the broader implications of increased efficiency and accessibility in real-world applications warrant careful consideration in future discussions. + +# References + +Abe, Taiga et al. (2022). "Deep ensembles work, but are they necessary?" In: Advances in Neural Information Processing Systems 35 (NeurIPS 2022) (cit. on p. 20). +Ba, Jimmy and Rich Caruana (2014). "Do deep nets really need to be deep?" In: Advances in Neural Information Processing Systems 27 (NIPS 2014) (cit. on pp. 1, 3, 7). +Benton, Gregory et al. (2021). "Loss surface simplexes for mode connecting volumes and fast ensembling". In: Proceedings of The 38th International Conference on Machine Learning (ICML 2021) (cit. on p. 3). +Bucilua, Cristian, Rich Caruana, and Alexandru Niculescu-Mizil (2006). "Model compression". In: Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining (cit. on p. 1). +Bulò, Samuel Rota, Lorenzo Porzi, and Peter Kontschieder (2016). "Dropout distillation". In: Proceedings of The 33th International Conference on Machine Learning (ICML 2016) (cit. on p. 3). + +Chen, Tian Qi et al. (2018). "Neural Ordinary Differential Equations". In: Advances in Neural Information Processing Systems 31 (NeurIPS 2018) (cit. on p. 3). +Cheng, Chaoran et al. (2024). "Categorical Flow Matching on Statistical Manifolds". In: Advances in Neural Information Processing Systems 37 (NeurIPS 2024) (cit. on p. 14). +Ciresan, Dan et al. (2012). "Deep neural networks segment neuronal membranes in electron microscopy images". In: Advances in Neural Information Processing Systems 25 (NIPS 2012) (cit. on p. 1). +Clark, Peter et al. (2018). "Think you have solved question answering? try arc, the ai2 reasoning challenge". In: arXiv preprint arXiv:1803.05457 (cit. on p. 19). +Coates, Adam, Andrew Ng, and Honglak Lee (2011). "An analysis of single-layer networks in unsupervised feature learning". In: Proceedings of the fourteenth international conference on artificial intelligence and statistics. JMLR Workshop and Conference Proceedings, pp. 215-223 (cit. on p. 18). +Cong, Bai et al. (2024). "Variational Low-Rank Adaptation Using IVON". In: NeurIPS 2024 Workshop on Fine-Tuning in Modern Machine Learning: Principles and Scalability (cit. on pp. 9, 19). +Cubuk, Ekin Dogus et al. (2020). "RandAugment: Practical Automated Data Augmentation with a Reduced Search Space". In: Advances in Neural Information Processing Systems 33 (NeurIPS 2020) (cit. on p. 5). +Cui, Yufei et al. (2020). "Accelerating Monte Carlo Bayesian prediction via approximating predictive uncertainty over the simplex". In: IEEE transactions on neural networks and learning systems 33.4, pp. 1492-1506 (cit. on pp. 1, 3). +Darlow, Luke N et al. (2018). "Cinic-10 is not imagenet or CIFar-10". In: arXiv preprint arXiv:1810.03505 (cit. on p. 18). +De Silva, Ashwin et al. (2023). "The value of out-of-distribution data". In: Proceedings of The 40th International Conference on Machine Learning (ICML 2023) (cit. on p. 6). +Dietterich, Thomas G (2000). "Ensemble methods in machine learning". In: International workshop on multiple classifier systems. Springer, pp. 1-15 (cit. on p. 6). +Du, Shangchen et al. (2020). "Agree to disagree: Adaptive ensemble knowledge distillation in gradient space". In: + +Advances in Neural Information Processing Systems 33 (NeurIPS 2020) (cit. on p. 3). +Duvenaud, David et al. (2020). "Your classifier is secretly an energy based model and you should treat it like one". In: Proceedings of The 8th International Conference on Learning Representations (ICLR 2020) (cit. on p. 14). +Eijkelboom, Floor et al. (2024). "Variational Flow Matching for Graph Generation". In: Advances in Neural Information Processing Systems 37 (NeurIPS 2024) (cit. on p. 14). +Furlanello, Tommaso et al. (2018). "Born again neural networks". In: Proceedings of The 35th International Conference on Machine Learning (ICML 2018) (cit. on p. 7). +Garipov, Timur et al. (2018). "Loss surfaces, mode connectivity, and fast ensembling of dnns". In: Proceedings of The 6th International Conference on Learning Representations (ICLR 2018) (cit. on p. 3). +Guo, Chuan et al. (2017). "On calibration of modern neural networks". In: Proceedings of The 34th International Conference on Machine Learning (ICML 2017) (cit. on p. 20). +Hansen, Lars Kai and Peter Salamon (1990). "Neural network ensembles". In: IEEE transactions on pattern analysis and machine intelligence 12.10, pp. 993-1001 (cit. on p. 1). +Havasi, Marton et al. (2021). "Training independent subnetworks for robust prediction". In: Proceedings of The 9th International Conference on Learning Representations (ICLR 2021) (cit. on p. 3). +He, Kaiming et al. (2016). "Deep residual learning for image recognition". In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2016) (cit. on p. 4). +Heusel, Martin et al. (2017). "GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium". In: Advances in Neural Information Processing Systems 30 (NIPS 2017) (cit. on p. 21). +Hinton, Geoffrey, Oriol Vinyals, and Jeffrey Dean (2014). "Distilling the Knowledge in a Neural Network". In: Deep Learning and Representation Learning Workshop, NIPS 2014 (cit. on pp. 1, 2, 5, 7-9, 19, 21). +Huang, Gao et al. (2017). "Snapshot Ensembles: Train 1, Get M for Free". In: Proceedings of The 5th International Conference on Learning Representations (ICLR 2017) (cit. on p. 3). + +Huang, Tao et al. (2023). "Knowledge Diffusion for Distillation". In: Advances in Neural Information Processing Systems 36 (NeurIPS 2023) (cit. on p. 3). +Karras, Tero et al. (2022). "Elucidating the Design Space of Diffusion-Based Generative Models". In: Advances in Neural Information Processing Systems 35 (NeurIPS 2022) (cit. on pp. 4, 5, 14-17). +Kearns, Michael (1988). "Thoughts on hypothesis boosting". In: Unpublished manuscript (cit. on p. 1). +Kim, Beomsu et al. (2025). "Simple ReFlow: Improved Techniques for Fast Flow Models". In: Proceedings of The 13th International Conference on Learning Representations (ICLR 2025) (cit. on p. 15). +Kim, Hyunsu, Jongmin Yoon, and Juho Lee (2024). "Fast Ensembling with Diffusion Schrödinger Bridge". In: Proceedings of The 12th International Conference on Learning Representations (ICLR 2024) (cit. on pp. 2, 3, 5, 8, 9, 15, 18, 22). +Korattikara, Anoop et al. (2015). "Bayesian dark knowledge". In: Advances in Neural Information Processing Systems 28 (NIPS 2015) (cit. on p. 3). +Krizhevsky, Alex and Geoffrey Hinton (2009). "Learning multiple layers of features from tiny images". In: Master's thesis, Department of Computer Science, University of Toronto (cit. on p. 18). +Krizhevsky, Alex, Ilya Sutskever, and Geoffrey E Hinton (2012). "Imagenet classification with deep convolutional neural networks". In: Advances in Neural Information Processing Systems 25 (NIPS 2012) (cit. on p. 1). +Krogh, Anders and Jesper Vedelsby (1994). "Neural network ensembles, cross validation, and active learning". In: Advances in Neural Information Processing Systems 7 (NIPS 1994) (cit. on p. 6). +Lakshminarayanan, Balaji, Alexander Pritzel, and Charles Blundell (2017). "Simple and scalable predictive uncertainty estimation using deep ensembles". In: Advances in Neural Information Processing Systems 30 (NIPS 2017) (cit. on p. 7). +Lee, Sangyun, Zinan Lin, and Giulia Fanti (2024). "Improving the Training of Rectified Flows". In: Advances in Neural Information Processing Systems 37 (NeurIPS 2024) (cit. on p. 15). +Lee, Stefan et al. (2015). "Why m heads are better than one: Training a diverse ensemble of deep networks". In: arXiv preprint arXiv:1511.06314 (cit. on p. 3). + +Li, Tianhong et al. (2024). "Autoregressive Image Generation without Vector Quantization". In: Advances in Neural Information Processing Systems 37 (NeurIPS 2024) (cit. on pp. 4, 15). +Lipman, Yaron et al. (2023). "Flow Matching for Generative Modeling". In: Proceedings of The 11th International Conference on Learning Representations (ICLR 2023) (cit. on pp. 2, 3). +Liu, Guan-Horng et al. (2023a). "I2SB: Image-to-Image Schrödinger Bridge". In: Proceedings of The 40th International Conference on Machine Learning (ICML 2023) (cit. on p. 3). +Liu, Xingchao, Chengyue Gong, and Qiang. Liu (2023b). "Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow". In: Proceedings of The 11th International Conference on Learning Representations (ICLR 2023) (cit. on p. 4). +Lu, Shangyun et al. (2020). "Harder or Different? A Closer Look at Distribution Shift in Dataset Reproduction". In: ICML 2020 Workshop on Uncertainty and Robustness in Deep Learning (cit. on p. 18). +Maddox, Wesley J et al. (2019). "A simple baseline for bayesian uncertainty in deep learning". In: Advances in Neural Information Processing Systems 32 (NeurIPS 2019) (cit. on p. 2). +Malinin, Andrey and Mark Gales (2018). "Predictive uncertainty estimation via prior networks". In: Advances in Neural Information Processing Systems 31 (NeurIPS 2018) (cit. on pp. 3, 21). +Malinin, Andrey, Bruno Mlodozeniec, and Mark Gales (2020). "Ensemble Distribution Distillation". In: Proceedings of The 8th International Conference on Learning Representations (ICLR 2020) (cit. on pp. 1, 3, 5, 21). +Mariet, Zelda E et al. (2021). "Distilling ensembles improves uncertainty estimates". In: Third symposium on advances in approximate bayesian inference (cit. on p. 3). +Mihaylov, Todor et al. (2018). "Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering". In: Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing (cit. on p. 19). +Minka, Thomas (2000). Estimating a Dirichlet distribution (cit. on p. 21). + +Nam, Giung et al. (2021). "Diversity matters when learning from ensembles". In: Advances in Neural Information Processing Systems 34 (NeurIPS 2021) (cit. on pp. 2, 3, 5). +Nam, Giung et al. (2022). "Improving Ensemble Distillation With Weight Averaging and Diversifying Perturbation". In: Proceedings of The 39th International Conference on Machine Learning (ICML 2022) (cit. on pp. 3, 5, 7). +Netzer, Yuval et al. (2011). "Reading digits in natural images with unsupervised feature learning". In: NIPS workshop on deep learning and unsupervised feature learning (cit. on p. 18). +Ortega, Luis A, Rafael Cabañas, and Andres Masegosa (2022). "Diversity and generalization in neural network ensembles". In: Proceedings of The 25th International Conference on Artificial Intelligence and Statistics (AISTATS 2022) (cit. on p. 7). +Ovadia, Yaniv et al. (2019). "Can you trust your model's uncertainty? evaluating predictive uncertainty under dataset shift". In: Advances in Neural Information Processing Systems 32 (NeurIPS 2019) (cit. on p. 8). +Pakdaman Naeini, Mahdi, Gregory Cooper, and Milos Hauskrecht (2015). "Obtaining Well Calibrated Probabilities Using Bayesian Binning". In: AAAI Conference on Artificial Intelligence (AAAI) (cit. on p. 20). +Peebles, William and Saining Xie (2023). "Scalable Diffusion Models with Transformers". In: Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) (cit. on p. 4). +Penso, Coby, Idan Achituve, and Ethan Fetaya (2022). "Functional ensemble distillation". In: Advances in Neural Information Processing Systems 34 (NeurIPS 2021) (cit. on pp. 1-3, 5, 7-9, 18, 22). +Recht, Benjamin et al. (2018). "Do cifar-10 classifiers generalize to CIFar-10?" In: arXiv preprint arXiv:1806.00451 (cit. on p. 18). +Ronneberger, Olaf, Philipp Fischer, and Thomas Brox (2015). "U-Net: Convolutional Networks for Biomedical Image Segmentation". In: Medical Image Computing and Computer-Assisted Intervention (MICCAI 2015) (cit. on p. 15). +Ryabinin, Max, Andrey Malinin, and Mark Gales (2021). "Scaling ensemble distribution distillation to many classes with proxy targets". In: Advances in Neural In + +formation Processing Systems 34 (NeurIPS 2021) (cit. on pp. 3, 5, 8, 9, 21, 22). +Salimans, Tim and Jonathan Ho (2022). "Progressive Distillation for Fast Sampling of Diffusion Models". In: Proceedings of The 10th International Conference on Learning Representations (ICLR 2022) (cit. on p. 3). +Shao, Shitong et al. (2024). "Precise Knowledge Transfer via Flow Matching". In: arXiv preprint arXiv:2402.02012 (cit. on p. 3). +Shen, Yuesong et al. (2024). "Variational learning is effective for large deep networks". In: Proceedings of The 12th International Conference on Learning Representations (ICLR 2024) (cit. on pp. 2, 5, 9, 19). +Song, Y. et al. (2023). "Consistency Models". In: Proceedings of The 40th International Conference on Machine Learning (ICML 2023) (cit. on p. 3). +Stanton, Samuel et al. (2021). "Does knowledge distillation really work?" In: Advances in Neural Information Processing Systems 34 (NeurIPS 2021) (cit. on p. 7). +Stark, Hannes et al. (2024). "Dirichlet flow matching with applications to DNA sequence design". In: Proceedings of The 41th International Conference on Machine Learning (ICML 2024) (cit. on p. 14). +Touvron, Hugo et al. (2023). "Llama 2: Open foundation and fine-tuned chat models". In: arXiv preprint arXiv:2307.09288 (cit. on p. 5). +Tran, Linh et al. (2020). "Hydra: Preserving ensemble diversity for model distillation". In: arXiv preprint arXiv:2001.04694 (cit. on p. 3). +Vaswani, Ashish et al. (2017). "Attention is all you need". In: Advances in Neural Information Processing Systems 30 (NIPS 2017) (cit. on p. 15). +Wen, Yeming, Dustin Tran, and Jimmy Ba (2020). "BatchEnsemble: an Alternative Approach to Efficient Ensemble and Lifelong Learning". In: Proceedings of The 8th International Conference on Learning Representations (ICLR 2020) (cit. on p. 3). +Wilson, Andrew Gordon and Pavel Izmailov (2020). "Bayesian deep learning and a probabilistic perspective of generalization". In: Advances in Neural Information Processing Systems 33 (NeurIPS 2020) (cit. on pp. 5, 7). +Wilson, Andrew Gordon et al. (2022). "Evaluating approximate inference in Bayesian deep learning". In: NeurIPS + +2021 Competitions and Demonstrations Track (cit. on p. 5). +Wood, Danny et al. (2023). "A unified theory of diversity in ensemble learning". In: Journal of Machine Learning Research (JMLR) 24.359, pp. 1-49 (cit. on p. 20). +Yao, Xufeng et al. (2024). "Progressively Knowledge Distillation via Re-parameterizing Diffusion Reverse Process". In: AAAI Conference on Artificial Intelligence (AAAI) (cit. on p. 3). +Yin, Tianwei et al. (2024a). "Improved Distribution Matching Distillation for Fast Image Synthesis". In: Advances in Neural Information Processing Systems 37 (NeurIPS 2024) (cit. on p. 3). +Yin, Tianwei et al. (2024b). "One-step Diffusion with Distribution Matching Distillation". In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2024) (cit. on p. 3). +Yun, EungGu et al. (2023). "Traversing between modes in function space for fast ensembling". In: Proceedings of The 40th International Conference on Machine Learning (ICML 2023) (cit. on pp. 3, 5). +Zhang, Hongyi et al. (2018). "mixup: Beyond Empirical Risk Minimization". In: Proceedings of The 6th International Conference on Learning Representations (ICLR 2018) (cit. on p. 5). + +# A. Ablation Study + +# A.1. Flow matching formulation + +Mapping Gaussian noise directly to teacher logits may initially appear overly simplistic, given that logits possess a specific geometric structure. Notably, teacher logits are invariant under scalar shifts, producing identical outputs after the softmax transformation. Flow matching formulations can be adapted to respect this geometry. Alternatively, since logits can be converted into probability vectors via the softmax operation, flow matching could be performed on the probability simplex instead of the logit space. This section explores several such approaches. + +Table 6. Performance of various flow matching formulations on CIFAR-10. + +
SpaceFormulationACC (↑)NLL (↓)ECE (↓)
Probability simplexStatistical flow matching (Cheng et al., 2024)0.9290.2440.019
Flow matching on the probability simplex0.9290.2430.015
Logit spaceFlow matching with ILR0.9310.2180.011
EDM (Karras et al., 2022)0.9310.2240.009
EDFM (Ours)0.9310.2160.009
+ +Flow matching on the probability simplex. Various formulations of flow matching on the probability simplex exist, such as CatFlow (Eijkelboom et al., 2024) and Dirichlet flow matching (Stark et al., 2024). However, most of these methods are inapplicable in our context as they require categorical (discrete) data, whereas we consider a continuous distribution of teacher logits defined either in logit space or equivalently on the probability simplex. Statistical flow matching (Cheng et al., 2024) is the most relevant method here, as it enables mapping from a uniform distribution to an arbitrary distribution defined on the probability simplex. Another straightforward approach is to perform basic flow matching directly on the probability simplex to transform a uniform distribution into the teacher logit distribution. This is feasible because the probability simplex is a Euclidean space where interpolations between points remain within the simplex. + +Despite the theoretical appeal, empirical results shown in Table 6 demonstrate that flow matching on the simplex yields inferior performance. We attribute this to the requirement that the student network match the teacher distribution with high precision on the simplex, whereas in logit space, minor mismatches are attenuated by the subsequent softmax operation. + +Isometric log-ratio (ILR) transform. Given the shortcomings of operating directly on the probability simplex, one may consider improvements in the logit space. Since teacher logits are invariant under scalar shifts (e.g., logits $\{-1.5, -2, 2\}$ are equivalent to $\{-0.5, -1, 3\}$ post-softmax), enforcing exact matching of logits may be overly restrictive. The isometric log-ratio (ILR) transformation from compositional data analysis offers a principled way to address this issue: it maps the $D$ -dimensional probability simplex to a $(D - 1)$ -dimensional Euclidean space. By applying ILR to teacher logits, flow matching can be trained in $\mathbb{R}^{D - 1}$ . Nonetheless, empirical results (Table 6) indicate negligible differences compared to the baseline, likely because the dimensionality reduction by one does not substantially affect the model's expressiveness in relatively high-dimensional settings. + +Diffusion models. Aside from flow matching, diffusion models present an alternative framework to model the teacher logit distribution. Exploring such generative approaches for ensemble distribution distillation constitutes a promising future direction. We implemented the EDM model (Karras et al., 2022) to train the student network and compared it to our EDFM method. On the CIFAR-10 dataset, EDM achieved an NLL of 0.224 using 35 NFEs, whereas EDFM attained a better NLL of 0.216 with only 5 NFEs (Table 6). Notably, EDM's performance deteriorated significantly with 5 NFEs, achieving an NLL of 0.370, underscoring the superior efficiency and effectiveness of EDFM. + +In summary, applying flow matching directly to pre-softmax logits yields superior results compared to modeling on post-softmax categorical probabilities. This improvement may be explained by the distortion introduced by the softmax transformation, which can obscure important scale information intrinsic to the logits. For example, the unnormalized density, given by the log-sum-exp of logits (Duvenaud et al., 2020), may be lost after softmax, thereby negatively impacting ensemble distribution distillation. + +# A.2. Network architecture of student model + +We performed an ablation study to evaluate the impact of network architectures of varying scales on performance. The architectures considered include 1) the denoising MLP (Li et al., 2024) already employed in EDFM, 2) the U-Net (Ronneberger et al., 2015), which is commonly used in flow matching for image synthesis and was also previously adopted in DBN (Kim et al., 2024), and 3) Transformer (Vaswani et al., 2017) models. + +Table 7. Performance and efficiency of EDFM with various network architectures on CIFAR-10. + +
Architecture# of Param.Time (μs)ACC (↑)NLL (↓)ECE (↓)
MLP0.14M390.9290.2290.013
MLP (main text)0.33M680.9310.2160.009
MLP0.70M1320.9300.2180.011
Transformer0.36M2040.9300.2180.011
Transformer1.31M7240.9310.2130.007
U-Net0.44M6530.9290.2220.012
+ +The results, summarized in Table 7, reveal that larger Transformers (with 1.31 million parameters) achieve improvements in NLL and ECE metrics but are not cost-effective, as reflected by the number of parameters and wall-clock time, where the latter denotes the time required to generate 256 ensemble predictions via batched inference. In contrast, the U-Net architecture underperforms relative to both the MLP and Transformer, which is likely attributable to its two-dimensional spatial processing being ill-suited for modeling logits. These findings suggest that the MLP architecture strikes a favorable balance, delivering sufficient accuracy for ensemble distribution distillation while offering a significant latency advantage. + +# A.3. Design choice of EDFM + +In this section, we elaborate on specific design choices of EDFM presented in Algorithms 1 and 2. + +Time distribution $\mathcal{T}$ . We swept over uniform, beta, and exponential distributions to find the most suitable $\mathcal{T}$ , where the probability density functions are given in Table 8. The support of $\mathcal{T}$ is set to $[\epsilon, 1]$ instead of $[0, 1]$ to avoid numerical instability. + +Table 8. PDFs of distributions. + +
DistributionPDF fT(t)
UniformfT(t) = 1
BetafT(t;α,β) = Γ(α + β)/(Γ(α)Γ(β))tα-1(1 - t)β-1
ExponentialfT(t;α) = αt log α/(α1-ε - 1)
+ +The PDF of the exponential distribution is slightly modified from the conventional one to account for the support $[\epsilon, 1]$ and an arbitrary base. The choice of beta and exponential distributions was inspired by the well-known lesson in the field of diffusion models (Karras et al., 2022) that the network should learn more near the data. Specifically, the exponential distribution allocates exponentially more samples as $t$ grows, while the beta distribution achieves a peak somewhere between $t = 0$ and $t = 1$ . We assigned the peak to be near the data by setting $\alpha = 5$ and $\beta = 2$ . For the exponential distribution, we set $\alpha = 3$ . The truncation $\epsilon$ was set to 0.001. + +Experiment results shown in Table 9 indicate that the beta distribution achieved better results in terms of ECE, while performing on par with the exponential distribution on other metrics. This motivates further explorations for even better options, possibly inspired by recent progress in flow matching (Lee et al., 2024; Kim et al., 2025). We leave this as future work. + +Table 9. Ablation study on time distribution. + +
DatasetTime distributionACC (↑)NLL (↓)ECE (↓)
C10Uniform0.9310.2190.011
Beta0.9310.2160.008
Exp. (Ours)0.9310.2160.009
C100Uniform0.7610.9660.066
Beta0.7600.9320.039
Exp. (Ours)0.7610.9320.056
+ +Time-dependent weighting function $\lambda$ . The time-dependent weighting function $\lambda$ was determined according to the preconditioning technique introduced in EDM (Karras et al., 2022). Specifically, in EDM, the authors first let the neural network predict the denoiser $h(\mathbf{x}_t,t)$ , namely $\mathbf{x}$ -prediction, and controlled the scale of the network input, output, and the weighting function of the loss so that the network input and the loss function maintain unit variance, and the variance of the network output is minimized. + +Table 10. Comparing between $\mathbf{x}$ and $\mathbf{v}$ predictions for EDFM. + +
DatasetPrediction typeACC (↑)NLL (↓)ECE (↓)
C10x-pred0.9310.2340.024
v-pred (Ours)0.9310.2160.009
C100x-pred0.7601.0310.090
v-pred (Ours)0.7610.9320.056
+ +However, as shown in Table 10, we found that directly predicting the velocity, namely v-prediction, performs better than x-prediction for EDFM. Thus, although we followed the principles suggested in EDM, our preconditioning slightly deviates from the original. + +For completeness, we present the derivation for our preconditioning. The student network accepts three inputs: perturbed sample $\boldsymbol{z}_t^x$ , time $t$ , and embedding from the teacher network $\operatorname{Emb}(x)$ . Two of these three inputs are rescaled to $c_{\mathrm{in}}(t)\boldsymbol{z}_t^x$ , $c_{\mathrm{time}}(t)$ before being fed into the network. The embedding $\operatorname{Emb}(x)$ is left invariant as it already maintains stable variance, after being processed by the teacher network. + +We set $c_{\mathrm{time}}(t) = \log (1000(1 - t) + \epsilon) / 4$ , where $\epsilon$ is a small number $10^{-12}$ to avoid numerical instability. This was inspired by the original formulation of $\log t / 4$ , and the transformation $t \to 1000(1 - t)$ was introduced to match the scales. + +Then we added a skip connection to the output of the student network $F_{\phi}$ : + +$$ +D _ {\phi} \left(\boldsymbol {z} _ {t} ^ {x}\right) = c _ {\text {s k i p}} (t) \boldsymbol {z} _ {t} ^ {x} + c _ {\text {o u t}} (t) F _ {\phi} \left(c _ {\text {i n}} (t) \boldsymbol {z} _ {t} ^ {x}\right) \tag {14} +$$ + +which is then used to compute the loss function + +$$ +\mathbb {E} _ {t, \boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} \left[ \lambda (t) \| D _ {\phi} \left(z _ {t} ^ {x}\right) - \left(\boldsymbol {z} _ {1} ^ {x} - \boldsymbol {z} _ {0} ^ {x}\right) \| ^ {2} \right]. \tag {15} +$$ + +Rearranging the terms results in + +$$ +\mathbb {E} _ {t, \boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} \left[ \frac {\lambda (t)}{c _ {\text {o u t}} (t) ^ {2}} \| \left(t c _ {\text {s k i p}} (t) - 1\right) \boldsymbol {z} _ {1} ^ {x} + \left((1 - t) c _ {\text {s k i p}} (t) + 1\right) \boldsymbol {z} _ {0} ^ {x} + F _ {\phi} \left(c _ {\text {i n}} (t) \boldsymbol {z} _ {t} ^ {x}\right) \| ^ {2} \right]. \tag {16} +$$ + +We want the network input, and loss function to maintain unit variance across different time $t$ , while the variance of the + +network output is minimized. This means that + +$$ +\operatorname {V a r} _ {\boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} [ c _ {\text {i n}} (t) \boldsymbol {z} _ {t} ^ {x} ] = \operatorname {V a r} _ {\boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} [ c _ {\text {i n}} (t) (t \boldsymbol {z} _ {1} ^ {x} + (1 - t) \boldsymbol {z} _ {0} ^ {x}) ] = 1 \tag {17} +$$ + +$$ +c _ {\mathrm {s k i p}} (t) = \underset {c _ {\mathrm {s k i p}} (t)} {\arg \min } \operatorname {V a r} _ {\boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} [ (t c _ {\mathrm {s k i p}} (t) - 1) \boldsymbol {z} _ {1} ^ {x} + ((1 - t) c _ {\mathrm {s k i p}} (t) + 1) \boldsymbol {z} _ {0} ^ {x} ] \tag {18} +$$ + +$$ +c _ {\text {o u t}} (t) = \operatorname {V a r} _ {\boldsymbol {z} _ {0} ^ {x}, \boldsymbol {z} _ {1} ^ {x}} [ (t c _ {\text {s k i p}} (t) - 1) \boldsymbol {z} _ {1} ^ {x} + ((1 - t) c _ {\text {s k i p}} (t) + 1) \boldsymbol {z} _ {0} ^ {x} ] \tag {19} +$$ + +$$ +\lambda (t) / c _ {\text {o u t}} (t) ^ {2} = 1 \tag {20} +$$ + +Note that as $z_0^x \sim \mathcal{N}(\cdot; 0, \sigma^2 \mathbf{I})$ , $\mathrm{Var}[z_0^x] = \sigma^2$ . Also, we let $\mathrm{Var}[z_1^x] = \sigma_{\mathrm{data}}^2$ . Evaluating for $c_{\mathrm{in}}(t), c_{\mathrm{out}}(t), c_{\mathrm{skip}}(t), \lambda(t)$ under this principle yields + +$$ +c _ {\mathrm {i n}} (t) = \frac {1}{\sqrt {t ^ {2} \sigma_ {\mathrm {d a t a}} ^ {2} + (1 - t) ^ {2} \sigma^ {2}}} \tag {21} +$$ + +$$ +c _ {\text {o u t}} (t) = \frac {\sigma \sigma_ {\text {d a t a}}}{\sqrt {t ^ {2} \sigma_ {\text {d a t a}} ^ {2} + (1 - t) ^ {2} \sigma^ {2}}} \tag {22} +$$ + +$$ +c _ {\mathrm {s k i p}} (t) = \frac {t \sigma_ {\mathrm {d a t a}} ^ {2} - (1 - t) \sigma^ {2}}{t ^ {2} \sigma_ {\mathrm {d a t a}} ^ {2} + (1 - t) ^ {2} \sigma^ {2}} \tag {23} +$$ + +$$ +\lambda (t) = \frac {\sigma^ {2} \sigma_ {\mathrm {d a t a}} ^ {2}}{t ^ {2} \sigma_ {\mathrm {d a t a}} ^ {2} + (1 - t) ^ {2} \sigma^ {2}} \tag {24} +$$ + +ODE solver and sampling step scheduling For ODE solver and sampling step scheduling, we ablated between Euler, Heun solvers (Karras et al., 2022) and uniform, exponential scheduling. For $N$ steps of sampling, the sampling steps are $\{i / N\}_{i = 0}^{N}$ for uniform scheduling and $\{(1 - \alpha^i) / (1 - \alpha^N)\}_{i = 0}^N$ for exponential scheduling. For exponential scheduling, we set $\alpha = 0.7$ for CIFAR-10 and $\alpha = 0.5$ for CIFAR-100. As Fig. 5 indicate, Heun solvers with exponential scheduling achieved the best NLL at 5 sampling steps, which amounts to 7 NFEs for Heun solver. All experiment results presented in the main paper were obtained under this configuration. + +![](images/5a4ca174eb73d7c9aee66437b10e167152df4c9298b155a10d559239a07ecaec.jpg) +Figure 5. Ablation study on ODE solver and sampling step scheduling. + +# B. Experimental details + +# B.1. Image classification tasks + +Datasets. Our experiments on image classification tasks utilize the following datasets: + +- CIFAR-10/100 (Krizhevsky and Hinton, 2009): It consists of 40,960 training images, 9,040 validation images, and 10,000 test images, each with a resolution of $32 \times 32 \times 3$ across 10/100 classes. As there is no officially predefined validation split, we manually partitioned the 50,000 training examples into 40,960 for training and 9,040 for validation. The datasets are publicly available at http://www.cs.toronto.edu/~kriz/cifar.html under unspecified license. +- CINIC-10 (Darlow et al., 2018): It serves as an auxiliary train split consisting of 210,000 images with a resolution of $32 \times 32 \times 3$ . The dataset is publicly available at https://github.com/BayesWatch/cinic-10 under MIT license. The original dataset contains of a total of 270,000 images, from which we dropped 60,000 CIFAR-originated images to avoid dataset leakage in our CIFAR-10/100 experiments. +- CIFAR-10.1 (Recht et al., 2018): It serves as a test split consisting of 2,000 images with a resolution of $32 \times 32 \times 3$ . The dataset is publicly available at https://github.com/modestyachts/CIFAR-10.1 under MIT license. +- CIFAR-10.2 (Lu et al., 2020): It serves as a test split consisting of 2,000 images with a resolution of $32 \times 32 \times 3$ . The dataset is publicly available at https://github.com/modestyyachts/cifar-10.2 under unspecified license. +- STL (Coates et al., 2011): It serves as a test split consisting of 7,200 images with a resolution of $32 \times 32 \times 3$ . The dataset is publicly available at https://cs.stanford.edu/~acoates/stl10/ under unspecified license. The original test split consists of 8,000 images with a resolution of $96 \times 96 \times 3$ , which we resized to $32 \times 32 \times 3$ . We excluded the 'monkey' class, as it is not present in CIFAR, removing 800 images in the process. Furthermore, the 'car' class was mapped to the 'automobile' class to match CIFAR's class definitions. +- SVHN (Netzer et al., 2011): It serves as an out-of-distribution split consisting of 73,257 training and 26,032 test images with colored number digit (0-9) with a resolution of $32 \times 32 \times 3$ The dataset is publicly available at http://ufldl.stanford.edu/housenumbers/ under unspecified license. + +Optimization details. We provide details on the construction of the ensemble teacher and the training procedure for distilled students in the image classification experiments. + +- Multi-SWAG teacher: Multi-SWAG teachers were obtained by adding diagonal covariances to each of 10 different SWA models. Each SWA model was pretrained for 800 epochs, followed by 200 epochs of SWA training with frequency 1. Using SGD optimizer with momentum 0.9, cosine decay schedule was applied for pretraining, in which the learning rate evolves from 0.1 to 0.01 and remains constant of 0.01 whilst SWA training. Batch size is 256. +- KD: KD was trained using SGD optimizer with momentum 0.9, learning rate 0.1 with cosine decay schedule, 1000 epochs, batch size 256. Unlike CIFAR-10, for models trained with CIFAR-100, learning rate was warmed up from 0 to 0.1 for the first 5 steps. Number of teachers to produce the target prediction is 30. +- EnDD: EnDD was trained with almost identical configuration with that of KD, except that the learning rate is decreased to 0.05. +- FED: For FED, we strictly followed the configurations provided in the original paper (Penso et al., 2022), except that we increased the number of epochs from 200 to 250 for coherence with other methods. Training further than 250 epochs showed no improvements in performance. +- DBN: Like FED, we strictly followed the configurations provided in the original paper (Kim et al., 2024), except that we increased the number of epochs from 800 to 1000 for coherence with other methods. +EDFM: We used the denoising MLP architecture with four blocks and a hidden dimension of 256 for CIFAR-10 and 512 for CIFAR-100. The model employs a student network distilled with KD using the MultiSWAG teachers as its backbone and takes its output embedding as input. Evaluation was conducted with seven NFEs, and training was performed using the SGD optimizer with a batch size of 256, momentum of 0.9, weight decay of 5e-04, learning rates of 1e-04 for CIFAR-10 and 3e-04 for CIFAR-100, and a cosine decay learning rate schedule over 1,000 epochs. + +# B.2. Commonsense reasoning tasks + +Datasets. Our experiments on commonsense reasoning tasks build upon the work of Cong et al. (2024). Following their training and evaluation recipes, all datasets are composed exclusively of multiple-choice questions with four options: + +- ARC-Challenge (ARC-C; Clark et al., 2018): It consists of 1,117 questions for training and 295 questions for evaluation, publicly available at https://huggingface.co/datasets/allenai/ai2_arc under CC-BY-SA-4.0 license. +- ARC-Easy (ARC-E; Clark et al., 2018): It consists of 2,241 questions for training and 567 questions for evaluation, publicly available at https://huggingface.co/datasets/allenai/ai2_arc under CC-BY-SA-4.0 license. +- OpenBookQA (OBQA; Mihaylov et al., 2018): It consists of 4,957 questions for training and 500 questions for evaluation, publicly available at https://huggingface.co/datasets/allenai/openbookqa under unspecified license. + +Optimization details. We provide details on the construction of the ensemble teacher and the training procedure for distilled students in the commonsense reasoning experiments. + +- Multi-IVON teacher: We obtained the Multi-IVON teacher using the official codebase from Cong et al. (2024), which is available at https://github.com/team-approx-bayes/ivon-lora under unspecified license. More specifically, it involves performing LoRA fine-tuning on the pretrained LLaMA-2-7B model, which is publicly available at https://huggingface.co/meta-llama/Llama-2-7b under the Meta license1, using the IVON optimizer (Shen et al., 2024). Using their configurations, we trained 10 IVON models with different random seeds and constructed the Multi-IVON teacher, which generates a total of 100 logits by extracting 10 logits from each individual model. +- KD: We fine-tuned the pretrained LLaMA-2-7B weights using the KD objective, as defined in Eq. 37, with the Multi-IVON teacher. After several attempts, we found that effective distillation requires not only applying LoRA to the query and value weights of the attention layers but also training the classification head. As a result, the number of trainable parameters is 4,194,304, which is $0.062\%$ of the total 6,742,609,920 parameters. Moreover, the KD objective alone was insufficient for stable learning in our commonsense reasoning experiments. Therefore, as in Hinton et al. (2014), we combined the KD objective with a cross-entropy loss using ground-truth labels, weighted at 0.5. The fine-tuning was carried out using the Adam optimizer with a batch size of 4, a maximum sequence length of 320, a learning rate of 3e-05, and a linear decay learning rate schedule over 50,000 steps. +- EDFM: For flow modeling, we used the denoising MLP architecture with three blocks and a hidden dimension of 256, totaling 1,639,056 parameters. The model employs one ensemble component of the Multi-IVON teacher as its backbone and takes its output embedding as input. Evaluation was conducted with three NFEs, and training was performed using the SGD optimizer with a batch size of 256, momentum of 0.9, a learning rate of 1e-04, and a cosine decay learning rate schedule over 50,000 steps. + +# B.3. Evaluation metrics + +Classification accuracy (ACC), is a metric used to evaluate the performance of a classification model by computing the proportion of correct predictions. Let $y_{n}$ be the true label, $\pmb{p}_{n}^{(k)}$ the predicted probability for class $k$ for the $n^{\text{th}}$ sample, and $N$ the total number of samples to be evaluated. We then compute ACC as follows, where $[\cdot]$ denotes the Iverson bracket: + +$$ +\mathrm {A C C} = \frac {1}{N} \sum_ {n = 1} ^ {N} \left[ y _ {n} = \underset {k} {\arg \max } \boldsymbol {p} _ {n} ^ {(k)} \right]. \tag {25} +$$ + +Negative log-likelihood (NLL), also known as cross-entropy loss in classification tasks, is another important metric used for both training and evaluating classification models. It measures how well the predicted probability distribution matches the true labels. Let $y_{n}$ be the true label, $\pmb{p}_n^{(k)}$ the predicted probability for class $k$ for the $n^{\text{th}}$ sample, and $N$ the total number of samples to be evaluated. We then compute NLL as follows: + +$$ +\mathrm {N L L} = - \frac {1}{N} \sum_ {n = 1} ^ {N} \log p _ {n} ^ {\left(y _ {n}\right)}. \tag {26} +$$ + +Expected calibration error (ECE; Pakdaman Naeini et al., 2015), is a metric that evaluates how well a predicted probabilities correspond to the true likelihood of correct predictions; a well-calibrated model outputs probabilities that closely align with the observed frequency of correctness. Let $y_{n}$ be the true label, $\pmb{p}_{n}^{(k)}$ the predicted probability for class $k$ for the $n^{\text{th}}$ sample, and $N$ the total number of samples to be evaluated. The samples are partitioned into $B$ bins based on the maximum predicted probability, $\max_k \pmb{p}_n^{(k)}$ , where $\mathcal{B}_b$ and $|\mathcal{B}_b|$ denote the indices and count of samples in the $b^{\text{th}}$ bin, respectively. For $b = 1, \dots, B$ , the observed accuracy $\mathrm{acc}_b$ and the average confidence $\mathrm{conf}_b$ are computed as follows: + +$$ +\operatorname {a c c} _ {b} = \frac {1}{| \mathcal {B} _ {b} |} \sum_ {n \in \mathcal {B} _ {b}} \left[ y _ {n} = \arg \max _ {k} \boldsymbol {p} _ {n} ^ {(k)} \right] \text {a n d} \operatorname {c o n f} _ {b} = \frac {1}{| \mathcal {B} _ {b} |} \sum_ {n \in \mathcal {B} _ {b}} \max _ {k} \boldsymbol {p} _ {n} ^ {(k)}. \tag {27} +$$ + +We then compute ECE as follows: + +$$ +\mathrm {E C E} = \sum_ {b = 1} ^ {B} \frac {\left| \mathcal {B} _ {b} \right|}{N} \cdot \left| \operatorname {a c c} _ {b} - \operatorname {c o n f} _ {b} \right|. \tag {28} +$$ + +Ensemble ambiguity (AMB), is a metric used to measure the diversity of ensemble predictions. Let $y_{n}$ be the true label, $z_{m,n}^{(k)}$ and $p_{m,n}^{(k)}$ the logit and categorical probability for class $k$ predicted by the $m^{\text{th}}$ ensemble member for the $n^{\text{th}}$ sample, $M$ the ensemble size, and $N$ the total number of samples to be evaluated. We then compute AMB as follows: + +$$ +\mathrm {A M B} = \frac {1}{N M} \sum_ {n = 1} ^ {N} \sum_ {m = 1} ^ {M} \sum_ {k = 1} ^ {K} \bar {\boldsymbol {p}} _ {n} ^ {(k)} \log \frac {\bar {\boldsymbol {p}} _ {n} ^ {(k)}}{\boldsymbol {p} _ {m , n} ^ {(k)}}, \tag {29} +$$ + +where $\bar{\pmb{p}}$ denotes a normalized geometric mean of categorical probability here, + +$$ +\bar {\boldsymbol {p}} _ {n} ^ {(k)} = \frac {\bar {\boldsymbol {q}} _ {n} ^ {(k)}}{\sum_ {j = 1} ^ {K} \bar {\boldsymbol {q}} _ {n} ^ {(j)}} \text {w i t h} \bar {\boldsymbol {q}} _ {n} ^ {(k)} = \prod_ {m = 1} ^ {M} \left(\boldsymbol {p} _ {m, n} ^ {(k)}\right) ^ {1 / M}, \text {f o r} k = 1, \dots , K. \tag {30} +$$ + +We also have the following generalized ambiguity decomposition (Wood et al., 2023), which suggests that to minimize ensemble loss, ensemble ambiguity should increase while average loss decreases: + +$$ +\underbrace {- \frac {1}{N} \sum_ {n = 1} ^ {N} \log \operatorname {s o f t m a x} ^ {\left(y _ {n}\right)} \left(\frac {1}{M} \sum_ {m = 1} ^ {M} z _ {m , n}\right)} _ {\text {e n s e m b l e l o s s (E n s L o s s)}} = \underbrace {- \frac {1}{M} \sum_ {m = 1} ^ {M} \frac {1}{N} \sum_ {n = 1} ^ {N} \log \operatorname {s o f t m a x} ^ {\left(y _ {n}\right)} \left(z _ {m , n}\right)} _ {\text {a v e r a g e l o s s (A v g L o s s)}} - \mathrm {A M B}. \tag {31} +$$ + +In Fig. 2, we compute the ambiguity decomposition after applying temperature scaling (Guo et al., 2017), using the optimal temperature obtained by minimizing EnsNLL. This approach offers a more accurate comparison, as EnsNLL uses ensembled logits instead of ensembled probabilities. When a logit shift occurs for each ensemble member, the probability ensemble remains unchanged, while the logit ensemble can vary. + +Ensemble variance (VAR), is another metric used to measure the diversity of ensemble predictions. Let $\pmb{p}_{m,n}^{(k)}$ be the categorical probability for class $k$ predicted by the $m^{\text{th}}$ ensemble member for the $n^{\text{th}}$ sample, $M$ the ensemble size, and $N$ the total number of samples to be evaluated. We then compute VAR as follows: + +$$ +\operatorname {V A R} = \frac {1}{N} \sum_ {n = 1} ^ {N} \sum_ {k = 1} ^ {K} \operatorname {V a r i a n c e} _ {m = 1, \dots , M} \left[ \boldsymbol {p} _ {m, n} ^ {(k)} \right] \tag {32} +$$ + +We also have the following uncertainty decomposition (Abe et al., 2022), which suggests that the variance quantifies the extent to which predictive uncertainty increases after ensembling: + +$$ +\underbrace {\frac {1}{N} \sum_ {n = 1} ^ {N} \left[ 1 - \sum_ {k = 1} ^ {K} \left(\bar {\boldsymbol {p}} _ {n} ^ {(k)}\right) ^ {2} \right]} _ {\text {e n s e m b l e u n c e r t a i t y (E n s U n c)}} = \underbrace {\frac {1}{N M} \sum_ {n = 1} ^ {N} \sum_ {m = 1} ^ {M} \left[ 1 - \sum_ {k = 1} ^ {K} \left(\boldsymbol {p} _ {m , n} ^ {(k)}\right) ^ {2} \right]} _ {\text {a v e r a g e u n c e r t a i t y (A v g U n c)}} + \text {V A R}. \tag {33} +$$ + +Agreement (AGR), is a commonly used metric in classification tasks to measure how often two predictions match each other. Let $\pmb{p}_n^{(k)}$ and $\pmb{q}_n^{(k)}$ be the two categorical probabilities for class $k$ predicted for the $n^{\text{th}}$ sample, and $N$ the total number of samples to be evaluated. We then compute AGR as follows: + +$$ +\operatorname {A G R} = \frac {1}{N} \sum_ {n = 1} ^ {N} \left[ \arg \max _ {k} \boldsymbol {p} _ {n} ^ {(k)} = \arg \max _ {k} \boldsymbol {q} _ {n} ^ {(k)} \right] \tag {34} +$$ + +Total variation distance (TVD), is a metric that measures the difference between two probability distributions. It quantifies the maximum discrepancy in probability mass between them. $\pmb{p}_n^{(k)}$ and $\pmb{q}_n^{(k)}$ be the two categorical probabilities for class $k$ predicted for the $n^{\text{th}}$ sample, and $N$ the total number of samples to be evaluated. We then compute TVD as follows: + +$$ +\mathrm {T V D} = \frac {1}{2 N} \sum_ {n = 1} ^ {N} \sum_ {k = 1} ^ {K} \left| \boldsymbol {p} _ {n} ^ {(k)} - \boldsymbol {q} _ {n} ^ {(k)} \right| \tag {35} +$$ + +Wasserstein-2 distance $(\mathcal{W}_2)$ , measures the distance between two probability distributions by quantifying the optimal cost of transporting one distribution to another. Fréchet Inception Distance (FID) (Heusel et al., 2017), a widely used metric in generative models literature, is also a specific instance of $\mathcal{W}_2$ . Inspired by this, we also evaluated the fidelity of generated logits to teacher logits by measuring Wasserstein-2 distance between the two distributions. Let $P$ and $Q$ be two discrete probability distributions with support $\{x_1,\ldots ,x_n\}$ and $\{y_{1},\dots ,y_{m}\}$ respectively, so that $P = \sum_{i = 1}^{n}p_{i}\delta_{x_{i}}$ and $Q = \sum_{j = 1}^{m}q_{j}\delta_{y_{j}}$ where $p_i$ , $q_{j}$ are probability masses and $\delta_x$ Dirac delta function. We then compute Wasserstein-2 distance between two discrete distributions as: + +$$ +\mathcal {W} _ {2} (P, Q) = \left(\inf _ {\gamma \in \Gamma (P, Q)} \sum_ {i = 1} ^ {n} \sum_ {i = 1} ^ {m} \gamma_ {i, j} \| x _ {i} - y _ {j} \| ^ {2}\right) ^ {\frac {1}{2}} \tag {36} +$$ + +where $\gamma_{i,j}$ is the transport plan meaning how much mass from $p_i$ to $q_j$ , $\Gamma(P, Q)$ is the set of all possible valid transport plans that satisfy the marginal constraint $\sum_{j} \gamma_{i,j} = p_i, \sum_{i} \gamma_{i,j} = q_i$ . Evaluating this involves linear programming, and can efficiently be solved using Hungarian algorithm. Note that $\mathcal{W}_2$ distance differs from TVD, in that it measures the similarity between the whole predictive distributions, where as TVD only compares their means. + +# B.4. Ensemble distillation methods + +Knowledge distillation (KD; Hinton et al., 2014) is considered the simplest method for transferring knowledge from a large and complex teacher model to a smaller student model. The training objective for knowledge distillation is given as follows: + +$$ +\mathcal {L} _ {\mathrm {K D}} (\phi) = \mathcal {H} (\bar {\boldsymbol {p}}, \boldsymbol {q} _ {\phi}) = \frac {1}{M} \sum_ {m = 1} ^ {M} \mathcal {H} (\boldsymbol {p} _ {m}, \boldsymbol {q} _ {\phi}), \tag {37} +$$ + +which simply is the cross-entropy loss widely used in classification tasks. One thing that differs is, that it is typical to soften (or harden) the teacher logits by dividing them with a temperature $T$ , for better performance. + +Ensemble distribution distillation (EnDD; Malinin et al., 2020; Ryabinin et al., 2021) assumes that the categorical predictions from the ensemble teacher follow a Dirichlet distribution. In other words, the induced distribution in Eq. 4 is assumed to be Dirichlet, i.e., $\pmb{p}_1, \dots, \pmb{p}_M \sim q(\pmb{\pi}_x|x) = \mathrm{Dir}(\beta)$ , where the concentration parameter $\beta$ is estimated in closed-form using the approximate maximum likelihood procedure (Minka, 2000): + +$$ +\boldsymbol {\beta} ^ {(k)} \approx \bar {\boldsymbol {p}} ^ {(k)} \cdot \frac {K - 1}{2} \cdot \frac {1}{\sum_ {j = 1} ^ {K} \bar {\boldsymbol {p}} ^ {(j)} \cdot \left(\log \bar {\boldsymbol {p}} ^ {(j)} - \overline {{\log \boldsymbol {p}}} ^ {(j)}\right)} \text {f o r} k = 1, \dots , K, \tag {38} +$$ + +where $\bar{\pmb{p}} = \frac{1}{M}\sum_{m = 1}^{M}\pmb{p}_{m}$ and $\overline{\log\pmb{p}} = \frac{1}{M}\sum_{m = 1}^{M}\log \pmb{p}_{m}$ are computed over $M$ observations $\pmb{p}_1,\dots,\pmb{p}_M$ . Then, a student Dirichlet Prior Network (DPN; Malinin and Gales, 2018), which models $q_{\phi}(\pi_x|x) = \mathrm{Dir}(\alpha_{\phi})$ , can be trained by minimizing the KL divergence between two Dirichlet distributions $\mathrm{Dir}(\beta)$ and $\mathrm{Dir}(\alpha_{\phi})$ . While the seminal work of Malinin et al. (2020) originally minimized the forward KL divergence, $D_{\mathrm{KL}}(\mathrm{Dir}(\beta)\parallel \mathrm{Dir}(\alpha_{\phi}))$ , subsequent research by Ryabinin et al. + +(2021) showed that minimizing the reverse KL divergence, $D_{\mathrm{KL}}(\mathrm{Dir}(\pmb{\alpha}_{\phi}) \parallel \mathrm{Dir}(\beta))$ , improves training stability. They also constrained the concentration parameters to be greater than one by $\hat{\alpha}_{\phi} \gets \alpha_{\phi} + 1$ and $\hat{\beta} \gets \beta + 1$ , to further enhance stability. Accordingly, we adopted the loss function proposed by Ryabinin et al. (2021) to train the EnDD baseline: + +$$ +\mathcal {L} _ {\mathrm {E n D} ^ {2}} (\phi) = \underbrace {\mathbb {E} _ {\boldsymbol {q} \sim \operatorname {D i r} \left(\hat {\alpha} _ {\phi}\right)} \left[ \mathcal {H} \left(\bar {\boldsymbol {p}}, \boldsymbol {q}\right) \right]} _ {\text {r e c o n s t r u c t i o n t e r m}} + \underbrace {\frac {1}{\sum_ {k = 1} ^ {K} \hat {\boldsymbol {\beta}} ^ {(k)}} \cdot D _ {\mathrm {K L}} \left(\operatorname {D i r} \left(\hat {\alpha} _ {\phi}\right) \mid \mid \operatorname {D i r} (\mathbf {1})\right)} _ {\text {p r i o r t e r m}}. \tag {39} +$$ + +During test time, we compute the categorical probabilities as the mean of the student Dirichlet distribution, which is given by $\mathbb{E}_{\boldsymbol{q} \sim \mathrm{Dir}(\hat{\alpha}_{\phi})}\left[\boldsymbol{q}^{(k)}\right] = \hat{\alpha}_{\phi}^{(k)} / \sum_{j=1}^{K} \hat{\alpha}_{\phi}^{(j)}$ for $k = 1, \dots, K$ . Notably, this is equivalent to applying the softmax operation to the DPN output, making the inference procedure identical to standard softmax-based classification neural networks. + +Functional ensemble distillation (FED; Penso et al., 2022) aims to distill the whole distribution of predictions from the ensemble teacher, unlike previous approaches that are capable only of predicting the mean of the teacher predictions. Specifically, it proposed to minimize the maximum mean discrepancy between the predictions produced by the teachers and predictions produced by student. Enabling the student network to be a generative model that approximates the ensemble teacher distribution, FED has advantages over tasks that require covariance between predictions. As EDFM also proposes to distill ensemble teacher distribution via flow matching, FED is the most alike approach to ours among other baselines. + +Diffusion bridge network (DBN; Kim et al., 2024) adopted $\mathrm{I}^2\mathrm{SB}$ , an image reconstruction algorithm based on Diffusion Schrödinger Bridge to map predictions of a single teacher model to the mean of predictions of ensemble teachers. Although DBN proposed a fast ensembling algorithm based on a concurrent generative model, it fundamentally deviates from EDFM in that it does not distill the whole ensemble distribution. \ No newline at end of file diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/images.zip b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..25b33e4c94f176c2133e4afa5c4d658b589cbc06 --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c85e6198dd0892978109ca704b5e9780d9dca061d995722154e61f3422f1da8b +size 869667 diff --git a/ICML/2025/Ensemble Distribution Distillation via Flow Matching/layout.json b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..02aee09628b552e7d9e0cb873ac53dd7b2a0c4c5 --- /dev/null +++ b/ICML/2025/Ensemble Distribution Distillation via Flow Matching/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4546ae91de16da8f7a1fbe6a3a2c1239184b33e11297f259738ac9a202f601f8 +size 852115 diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_content_list.json b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9161bd535df5848578ea1608dcfc49308d1aa39d --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cbe33eff0e18936a379c3ad7ceb08e8afd772e42165fdc816cc86b64b6d939b +size 137864 diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_model.json b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_model.json new file mode 100644 index 0000000000000000000000000000000000000000..52b8d1f9fb8d4c971c4e234eeda8d51238a46229 --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:643923bd704dcf8bd6f5065daa221084a823495f030fc302b7b4e5e76b9bcfb2 +size 161055 diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_origin.pdf b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6383753c9712553824c35cbffe839830aa4e1d36 --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/1efc508b-d446-46bf-b94b-319f221f2659_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:818b7d54d190af8b71bb252a814952024e4c9451910be1944e7481ec460f26be +size 569315 diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/full.md b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8d1a4daab99cb2089b2a81d318b5aa339c2a10b7 --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/full.md @@ -0,0 +1,817 @@ +# Ming Lin1 Lin Chen2 + +# Abstract + +Bloom filters (BF) are space-efficient probabilistic data structures for approximate membership testing. Boosted by the proliferation of machine learning, learned Bloom filters (LBF) were recently proposed by augmenting the canonical BFs with a learned oracle as a pre-filter, the size of which is crucial to the compactness of the overall system. In this paper, inspired by ensemble learning, we depart from the state-of-the-art single-oracle LBF structure by demonstrating that, by leveraging multiple learning oracles of smaller size and carefully optimizing the accompanied backup filters, we can significantly boost the performance of LBF under the same space budget. We then design and optimize ensemble learned Bloom filters for mutually independent and correlated learning oracles respectively. We also empirically demonstrate the performance improvement of our propositions under three practical data analysis tasks. + +# 1. Introduction + +Originally proposed by and named after Bloom in the seminal paper (Bloom, 1970), Bloom filters (BF) are space-efficient data structures for solving the membership lookup problem by compactly recording a given set $\mathcal{I}$ of data items in a bit array and outputting a binary answer when queried. As a structural property, the space compactness of BFs is achieved at the price of limited false positives but no false negative. Due to the neat structure with profound theoretic and practical implications, BFs have received significant research attention, leading to a palette of extensions and variants including Bloomier filters (Chazelle et al., 2004), counting BF (Bonomi et al., 2006), and invertible Bloom + +$^{1}$ School of Computer Science and Engineering, Sun Yat-sen University, Guangzhou, China. $^{2}$ Engineering Research Centre of Applied Technology on Machine Translation and Artificial Intelligence, Macao Polytechnic University, Macao SAR, China. Correspondence to: Lin Chen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +lookup tables (Goodrich & Mitzenmacher, 2011) etc. + +Boosted by the proliferation of machine learning, learned Bloom filters (LBF) were recently proposed (Kraska et al., 2018; Mitzenmacher, 2018), with the design rationale that we can leverage the specific structure exhibited by data items to reduce the space of BFs without sacrificing lookup accuracy. Technically, a pre-filter is constructed by implementing a learning model, termed as the learned oracle or simply oracle for brevity, to filter the queried items. The items with negative responses at the filter are then passed to a backup BF for final check. As the backup filter only needs to deal with filtered items, we can reduce its size and come up with a more compact learning-augmented data structure, even after taking into account the space overhead brought by the oracle. Along this direction, Mitzenmacher (Mitzenmacher, 2018) proposed a sandwich structure to further improve the performance. Under the condition that the score distribution of the oracle is available, several variants attempted to make the best use of the oracle to improve the overall lookup performance: Vaidya et al. (Vaidya et al., 2021) segmented the score space of the oracle into multiple regions by using multiple thresholds, and uses separate backup Bloom filters for each region; Sato et al. (Sato & Matsui, 2023) accelerated the construction while maintaining the same memory efficiency as Vaidya et al. (Vaidya et al., 2021); Dai et al. (Dai & Shrivastava, 2020) attributed different number of hash functions in different regions. + +In virtually all the state-of-the-art LBF design, the oracle has crucial impact on the performance of the system as a whole. A more accurate oracle results in smaller false positive rate (FPR). However, it has been well-demonstrated (Thompson et al., 2021) that the accuracy of learning models exhibit diminishing performance improvement w.r.t. the model size. Therefore, the size of the learning model may become a potential bottleneck of the LBF if the overall space budget is limited. To quantitatively demonstrate this point, we build an LBF for identifying malicious URLs from 200,000 URLs with a backup BF of 500K bits. We tune the size of the oracle to vary the FPR, as illustrated in Figure 1. We can observe that the size of the oracle occupies non-negligible part of the total memory space and that the accuracy improvement of the oracle paces down significantly with the increase of its size. + +The above observation resonates with the technical diffi + +![](images/0f9fc074bdadfc5436b6c95fb83e801e3ab385c631a9e3742176c543928ad4c2.jpg) +Figure 1. FPR of LBFs with an oracle under different sizes and a BF of 500Kbits to detect malicious URLs from 200,000 URLs. + +culty and the cost of building strong learning models in the generic machine learning context. One of the most cost-effective technique to boost the accuracy of learning models is ensemble learning (Polikar, 2012), which consists of strategically orchestrating a set of weak models usually of smaller size to form a much stronger model. Ensemble learning has demonstrated remarkable improvements in a variety of learning tasks (Gomes et al., 2017; Mendes-Moreira et al., 2012; Vanerio & Casas, 2017). + +Inspired by the ensemble-based learning paradigm, we depart from the state-of-the-art single-oracle structure of the LBF design to investigate the following research question. + +Q: How to combine multiple smaller oracles to construct an ensemble learned BF (ELBF) to optimize the overall accuracy under given memory budget? More specifically, given a pool of oracles, which subset of them to choose and how to orchestrate them with backup filters to minimize the overall FPR? + +In this paper, we give affirmative answer the question. We demonstrate that, by leveraging multiple learning oracles of smaller size and carefully optimizing the accompanied backup BFs, we can significantly boost the performance of the LBF under the same space budget. We technically achieve this by proposing a new LBF design termed as ensemble learned BFs (ELBF), as depicted in Figure 2. We formulate the optimal design of ELBF as a combinatorial optimization problem: given a pool of oracles and the total space budget, the problem is to choose a subset of oracles and compute the sizes of the backup BFs so that the overall FPR is minimized. We reveal the structural analogy between our problem to the Knapsack problem and develop a Knapsack-based approximate algorithm achieving proven $(\epsilon, \delta)$ -optimality with tunable parameters $\epsilon$ and $\delta$ trading off complexity against optimality. In the case of oracles are correlated, we propose a generalized design, ELBF++, letting multiple correlated oracles share a common backup filter. We empirically evaluate our approaches against existing + +![](images/26d49c73627129f73845d22fea310fcdf36a74e00ae0d6b8a906f8afec767f48.jpg) +Figure 2. Overview of ELBF. + +works under practical data analysis tasks with real-world datasets. Our experiments demonstrate significant performance improvement of ELBFs against the state-of-the-art LBF and its variants. + +# 2. Technical Preliminaries + +In this section, we give brief introduction on the standard BFs and LBFs, both of which solve the membership lookup problem, i.e., given a set $\mathcal{I}$ , outputting a binary answer whether a data item $e$ belongs to $\mathcal{I}$ . Throughout the paper, we use calligraphic letters (e.g., $\mathcal{X}$ ) to denote sets and boldface letters (e.g., $\mathbf{x}$ ) to denote vectors. Table 1 summarizes major notations. + +# 2.1. Canonical Bloom Filters + +BFs are space-efficient probabilistic data structures representing a set $\mathcal{I}$ . Physically, a BF contains an $m$ -bit array $B$ and a family of $k$ independent hash functions denoted as $\mathcal{H} \triangleq \{h_i\}_{i=1}^k$ , where $h_i(e)$ maps an item to a random bit in $B$ . Each bit of $B$ is initialized to 0. When inserting an item $e$ , we set $B[h_i(e)]$ to 1 for $1 \leq i \leq k$ . To check whether an item $e \in \mathcal{I}$ , we return true if $h_i(e) = 1$ for $1 \leq i \leq k$ , otherwise we return false. + +It is clear from the construction of BFs that they do not produce false negatives. However, due to hash collisions, a BF may wrongly return true for an item $e \notin \mathcal{I}$ , causing a false positive. Let $n$ denote the number of items recorded in $B$ , the probability that a specific bit of $B$ is 0 is given by $(1 - 1/m)^{kn} \approx e^{-kn/m}$ . Thus the probability of a false positive can be computed as $(1 - e^{-kn/m})^k$ . + +Algebraically, the false positive rate is minimized when $k$ equals $\frac{m}{n} \ln 2$ . The minimal value can be computed as $\alpha^{m / n}$ , where $\alpha \approx 0.6185$ (Broder & Mitzenmacher, 2004). + +# 2.2. Learned Bloom Filters + +LBFs exploit a learned model, termed as a learned oracle $O$ , briefly denoted as oracle, to perform pre-filtering. If + +Table 1. Major notations. + +
Section 3: Ensemble Learned Bloom Filters with Independent Oracles
Iitem setnnumber of items in I
Hset of Hash functionsα0.6185
FP,ifalse positive rate of oracle iFN,ifalse negative rate of oracle i
binnumber of bits allocated to backup BF iOset of oracles
n0number of oracles in OLinsize of oracle i in number of bits
Aset of chosen oraclesyibi/ FN,i
L(·)Lagrangian functionλLagrange multiplier
cauxiliary variableF(i)false positive rate of branch i
Tntotal space budget in number of bitsΔdiscretization stepsize of c
θ1,θ2scaling factorsvivalue of object i
wiweight of object iˆvidiscretized value of vi
ˆwidiscretized value of wiˆvsum ofˆvi
Section 4: Ensemble Learned Bloom Filters with Correlated Oracles
P(S)a partition of SΠ(S)set of all possible partitions of S
ggroup of oraclesΓauxiliary learned model
+ +the learned oracle replies positively, the queried item is considered as a member of $\mathcal{I}$ . Otherwise, a backup BF is then used to perform further check as in standard BFs. + +Suppose that the oracle takes $Ln$ bits and the backup BF takes $bn$ bits. Denote $F_{P}$ and $F_{N}$ as the false positive rate and false negative rate of the oracle. The backup BF only needs to hold $F_{N} \cdot n$ keys. Hence, the overall false positive rate for the LBF can be derived as + +$$ +F _ {P} + (1 - F _ {P}) \alpha^ {b / F _ {N}}. \tag {1} +$$ + +(Mitzenmacher, 2018) also shows an estimation on what size the learning model is required for an improvement for performance. Compared with a standard BF of the same total space, whose false positive rate is $\alpha^{b + L}$ , the LBF makes an improvement in the following situations + +$$ +F _ {P} + (1 - F _ {P}) \alpha^ {b / F _ {N}} \leq \alpha^ {b + L}, +$$ + +which translates to the following condition on the size of the learning model: + +$$ +L \leq \log_ {\alpha} \left(F _ {P} + (1 - F _ {P}) \alpha^ {b / F _ {N}}\right) - b. \tag {2} +$$ + +# 3. Ensemble Learned Bloom Filters with Independent Oracles + +This section presents our design of Bloom filters augmented by ensemble learning. Inspired by ensemble learning, our key idea is to orchestrate multiple learning oracles of small size to replace the learning oracle in the LBF to obtain superior overall performance. In what follows, we first present the ELBF design and then its optimization. + +# 3.1. Design + +Our ELBFs mobilize multiple learning oracles. To begin with, we assume the oracles are mutually independent, e.g., by learning mutually independent features. Each oracle is backed up by a backup BF, which stores the false negatives produced by the oracle. When an item $e$ is queried, the ELBF replies positively if all the oracles return positively or the oracles return negatively but their corresponding backup BFs return positively, otherwise it replies negatively. + +It follows straightforwardly from its construction that our ELBFs do not have false negative, which is inline with the standard BFs. We now analyze its false positive rate. Let $F_{P,i}$ and $F_{N,i}$ denote the false positive and false negative rate of oracle $i$ . Suppose $b_i m$ bits are allocated to the backup BF $i$ . It follows that backup BF $i$ needs to hold $F_{N,i} \cdot n$ items, with the corresponding optimal false positive rate $\alpha^{b_i / F_{N,i}}$ . Thus, the false positive rate for the branch $i$ , i.e., the oracle $i$ plus the backup BF $i$ , is $F_{P,i} + (1 - F_{P,i})\alpha^{b_i / F_{N,i}}$ . Therefore, let $\mathcal{O}$ denotes the set of oracles used in the ELBF, which are assumed to be mutually independent. We create a dumb oracle with size 0, $\mathrm{FPR} \rightarrow 0$ and FNR 1, add it into $\mathcal{O}$ to include the degenerated case where adding an oracle will have negative impact on the overall performance. The overall FPR can be computed as follows: + +$$ +\prod_ {i \in \mathcal {O}} \left(F _ {P, i} + \left(1 - F _ {P, i}\right) \alpha^ {b _ {i} / F _ {N, i}}\right). \tag {3} +$$ + +# 3.2. Optimization + +In this subsection, we optimize the design of ELBF by solving the following minimization problem. + +Problem 1. Suppose we dispose a set $\mathcal{O}$ of independent oracles, from which we can choose to build our ELBF. Given a total space budget $T\cdot n$ bits, the optimal design of ELBF + +computes a subset of oracles $\mathcal{A} \subseteq \mathcal{O}$ to choose and the sizes of their backup BFs $\mathbf{b} \triangleq \{b_i\}_{i \in \mathcal{A}}$ so that the overall false positive rate is minimized. The problem is mathematically formalized as follows. + +$$ +\min _ {\mathcal {A} \subseteq \mathcal {O}} \min _ {\mathbf {b}} \prod_ {i \in \mathcal {A}} \left(F _ {P, i} + (1 - F _ {P, i}) \alpha^ {b _ {i} / F _ {N, i}}\right) +$$ + +subject to: $\sum_{i\in \mathcal{A}}(L_i + b_i)\leq T$ (4) + +$$ +b _ {i} \geq 0, \forall i \in \mathcal {A}. +$$ + +Consider the inner minimization problem for a given $\mathcal{A}$ . Denote $y_{i} \triangleq b_{i} / F_{N,i}$ . We can rewrite the inner minimization problem as below. + +$$ +\min _ {\mathbf {b}} \sum_ {i \in \mathcal {A}} \ln \left(F _ {P, i} + (1 - F _ {P, i}) \alpha^ {y _ {i}}\right) +$$ + +subject to $\sum_{i\in \mathcal{A}}(L_i + y_iF_{N,i})\leq T$ (5) + +$$ +y _ {i} \geq 0, \forall i \in \mathcal {A}. +$$ + +Using augmented Lagrangian approach, we write the following Lagrangian function for optimization: + +$$ +\begin{array}{l} \mathcal {L} \left(y _ {1}, y _ {2}, \dots , y _ {n}, \lambda\right) = \sum_ {i \in \mathcal {A}} \ln \left(F _ {P, i} + \left(1 - F _ {P, i}\right) \alpha^ {y _ {i}}\right) \\ - \lambda \left(\sum_ {i \in \mathcal {A}} \left(L _ {i} + y _ {i} F _ {N, i}\right) - T\right), \tag {6} \\ \end{array} +$$ + +where $\lambda \leq 0$ is the Lagrange multiplier. The partial derivatives with respect to $y_{i}$ and $\lambda$ can be derived as below. + +$$ +\left\{ \begin{array}{l} \frac {\partial \mathcal {L}}{\partial y _ {i}} = \frac {\left(1 - F _ {P , i}\right) \alpha^ {y _ {i}} \ln \alpha}{F _ {P , i} + \left(1 - F _ {P , i}\right) \alpha^ {y _ {i}}} - F _ {N, i} \lambda \\ \frac {\partial \mathcal {L}}{\partial \lambda} = T - \sum_ {i \in \mathcal {A}} \left(L _ {i} + y _ {i} F _ {N, i}\right) \end{array} \right. \tag {7} +$$ + +We observe that the partial derivative for $y_{i}$ equals 0 when + +$$ +\frac {\left(1 - F _ {P , i}\right) \alpha^ {y _ {i}}}{\left(F _ {P , i} + \left(1 - F _ {P , i}\right) \alpha^ {y _ {i}}\right) F _ {N , i}} = \frac {\lambda}{\ln \alpha} \triangleq c, \forall i \in \mathcal {A}. \tag {8} +$$ + +In the above equation, we define an auxiliary variable $c$ , which serves as a pivot in our analysis. Armed with $c$ , we can derive the optimal $b_{i}^{*}$ for branch $i$ as follows. + +$$ +b _ {i} ^ {*} = F _ {N, i} \log_ {\alpha} \frac {c F _ {N , i} F _ {P , i}}{(1 - c F _ {N , i}) (1 - F _ {P , i})}, \tag {9} +$$ + +from which we further get the minimal false positive rate for branch $i$ , denoted by $F^{(i)}$ , as + +$$ +F ^ {(i)} = F _ {P, i} + \left(1 - F _ {P, i}\right) \alpha^ {b _ {i} / F _ {N, i}} = \frac {F _ {P , i}}{1 - c F _ {N , i}} \tag {10} +$$ + +Noticing that $b_{i} \geq 0$ and $F^{(i)} \in (0,1]$ , we can bound $c$ by $0 < c \leq \frac{1 - F_{P,i}}{F_{N,i}}$ . + +Armed with the above analysis, we now proceed to consider the outer minimization problem. To this end, we define a set of binary variables $\{x_{i}\}_{i\in \mathcal{O}}$ to indicate whether we choose oracle $i$ . After some straightforward algebraic operations, we rewrite the outer minimization problem as follows. + +$$ +\max _ {\mathbf {x}} \quad \sum_ {i \in \mathcal {O}} x _ {i} \cdot \ln \frac {1 - c F _ {N , i}}{F _ {P , i}} +$$ + +subject to $\sum_{i\in \mathcal{O}}x_i\cdot (L_i + b_i^*)\leq T$ (11) + +$$ +x _ {i} \in \{0, 1 \}, \forall i \in \mathcal {O}. +$$ + +By casting each oracle $i$ to an object with value $\ln \frac{1 - cF_{N,i}}{F_{P,i}}$ and weight $L_{i} + b_{i}^{*}$ , we observe that our problem has elegant analogy to the famous Knapsack problem, which is known to be NP-hard (Garey & Johnson, 1979). It then follows that our problem is also NP-hard. However, being weakly NP-hard, the Knapsack problem with integer weights can be solved by dynamic programming in pseudo-polynomial time. Suppose we can invoke an oracle, termed as KNAPSACK, that solves the canonical Knapsack problem with integer weights and values. We next develop a Knapsack-based algorithm augmented by the scaling technique to find an $(\epsilon, \delta)$ -optimal solution of our problem, as formalized below. The rationale behind is to allow a small quantity of overflow on the space budget to achieve near-optimal FPR. + +Definition 3.1. The configuration of an ELBF is called $(\epsilon, \delta)$ -optimal if its FPR is within $\epsilon$ to the optimal and its space is upper-bounded by $(1 + \delta)T$ . + +# Algorithm 1 ELBF optimization + +Input: oracles set $\mathcal{O}$ , space budget $T$ , scaling factors $\theta_{1}, \theta_{2}$ , stepsize $\Delta$ + +Output: selected oracle set $\mathcal{A}$ , backup BF setting b + +1: Initialization: $\hat{v}^{*}\gets 0,\mathcal{A}^{*}\gets \emptyset ,c\gets 0$ +2: while $0 \leq c \leq \max_{i \in \mathcal{O}} \frac{1 - F_{P,i}}{F_{N,i}}$ do +3: $c \gets c + \Delta$ +4: for each $j\in \mathcal{O}$ do +5: $\hat{v}_j\gets \max \left\{0,\left[\theta_1\cdot \ln \frac{1 - cF_{N,j}}{F_{P,j}}\right]\right\}$ +6: $\hat{w}_j\gets \left\lfloor \theta_2\left(L_j + F_{N,j}\log_\alpha \frac{cF_{N,j}F_{P,j}}{(1 - cF_{N,j})(1 - F_{P,j})}\right)\right\rfloor$ +7: end for +8: $(\hat{v},\mathcal{A})\gets \mathrm{KNAPSACK}(\mathcal{O},\hat{\mathbf{v}},\hat{\mathbf{w}},[\theta_2T])$ +9: if $\hat{v} >\hat{v}^{*}$ then +10: $\hat{v}^{*}\gets \hat{v},\mathcal{A}^{*}\gets \mathcal{A}$ +11: $b_{i}^{*}\gets F_{N,i}\log_{\alpha}\frac{cF_{N,i}F_{P,i}}{(1 - cF_{N,i})(1 - F_{P,i})},\forall i\in \mathcal{A}$ +12: end if +13: end while + +The pseudo-code of our algorithm is given in Algorithm 1. The core part of our algorithm is the while loop, in which we scan $c$ with stepsize $\Delta$ . For each discretized value of $c$ , i.e., $i\Delta$ , we scale the values $v_{j}$ and the weights $w_{j}$ for each oracle $j \in \mathcal{O}$ . We then invoke the Knapsack algorithm by regarding each oracle as an object with the total weight constraint scaled up to $\theta_{2}T$ . Our algorithm returns the optimal Knapsack solution among all discretized $c$ , which is also an $(\epsilon, \delta)$ -optimal ELBF configuration, as presented in Theorem 3.2 and proved in Appendix A. + +Theorem 3.2. Under the condition $\theta_{1} \geq \frac{n_{0}}{\epsilon}$ and $\theta_{2} \geq \frac{n_{0} + 1}{T\delta}$ , Algorithm 1 outputs an $(\epsilon, \delta)$ -optimal ELBF configuration. + +We conclude this section by analyzing the time complexity of our algorithm. The complexity to calculate the values and weights and solve a specific Knapsack problem is $O(n_0 + n_0\lceil \theta_2T\rceil) = O(n_0^2 /\delta)$ . As the above operations are performed for each discretized value of $c$ , the overall time complexity sums up to $O\left(\max_{j\in \mathcal{O}}\frac{n_0^2(1 - F_{P,j})}{F_{N,j}\Delta\delta}\right)$ , i.e., asymptotically $O\big(n_0^2 /(\delta \Delta)\big)$ . + +# 4. Ensemble Learned Bloom Filters with Correlated Oracles + +In the previous section, the assumption of mutually independent oracles was made. Nevertheless, in real-world scenarios, oracles frequently exhibit correlations. In this section, we address this correlated case by devising a generalized version of ELBF called ELBF++. + +The design rationale of $\mathrm{ELBF}++$ lies in allowing multiple correlated oracles to share a common backup filter, as illustrated in Figure 3. This is achieved through carefully selecting a subset of oracles and optimizing the corresponding backup filter parameters. Specifically, $\mathrm{ELBF}++$ operates as follows: Each backup filter stores the false negatives of all the selected oracles connected to it. When an item is queried, $\mathrm{ELBF}++$ returns a positive response if all the selected oracles give positive results or, if some of them return negatively, but their corresponding backup filters return positively. Otherwise, $\mathrm{ELBF}++$ returns a negative response. + +Before delving into the design of ELBF++, we note that ELBF can be regarded as a degenerated version of ELBF++. As proved in Appendix, when oracles are mutually independent, attributing a separate backup filter to each oracle leads to strictly lower FPR than letting multiple oracles sharing a common backup filter, which justifies the ELBF design. However, when oracles are correlated, the situation is more complex such that sharing a common backup filter among correlated oracles helps reduce FPR. + +The central research problem in the design of $\mathrm{ELBF}++$ is to choose the appropriate set of correlated oracles for each backup filter. To formalize the problem, suppose we dispose + +![](images/eec2c6053bcc09c5947922f56e9ead99f644a6c2798dd31a7d73050da481bfb8.jpg) +Figure 3. Overview of ELBF++. + +a set $\mathcal{O}$ of oracles, some of which are correlated. Let $S$ denote a subset of $\mathcal{O}$ and $\mathcal{P}(S)$ denote a partition of $S$ . For each element of $g \in \mathcal{P}(S)$ representing a subset of oracles, we consider them sharing the same backup filter, thereby forming a branch. We define $F_{P,g}$ and $F_{N,g}$ as the FPR and FNR of branch $g$ , respectively. Assuming $b_{g}m$ bits are allocated to the backup filter, the FPR of branch $g$ , denoted by $F^{(g)}$ , is given by + +$$ +F ^ {(g)} = F _ {P, g} + \left(1 - F _ {P, g}\right) \alpha^ {b _ {g} / F _ {N, g}}. \tag {12} +$$ + +For a given partition $\mathcal{P}(\mathcal{S})$ consisting of $m$ branches, we denote $X_{i}(\mathcal{P}(\mathcal{S}),\mathbf{b})$ , concisely denoted by $X_{i}$ when the context is clear, as the event that branch $i$ returns false positively. The overall FPR is then $\operatorname*{Pr}(\bigcap_{i = 1}^{m}X_{i})$ . Define + +$$ +\Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) \triangleq \frac {\operatorname * {P r} \left(\bigcap_ {i = 1} ^ {m} X _ {i}\right)}{\prod_ {i = 1} ^ {m} \operatorname * {P r} (X _ {i})}. +$$ + +We can express $\operatorname*{Pr}\left(\bigcap_{i = 1}^{m}X_{i}\right)$ as + +$$ +\begin{array}{l} \Pr \left(\bigcap_ {i = 1} ^ {m} X _ {i}\right) = \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) \prod_ {i = 1} ^ {m} \Pr (X _ {i}) \\ = \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) \prod_ {g \in \mathcal {P} (\mathcal {S})} \left(F _ {P, g} + \left(1 - F _ {P, g}\right) \alpha^ {b _ {g} / F _ {N, g}}\right). \tag {13} \\ \end{array} +$$ + +We can observe that computing the optimal value of $\operatorname*{Pr}\left(\bigcap_{i = 1}^{m}X_{i}\right)$ requires evaluating $\Gamma (\mathcal{P}(\mathcal{S}),\mathbf{b})$ for each partition $\mathcal{P}(\mathcal{S})$ and each possible size configuration of the backup filters $\mathbf{b}$ , whose complexity is super-exponential. + +To reduce the above complexity, we adopt a learning-based approach. Specifically, we randomly sample a subset of partitions and configurations and then train an auxiliary learned model that, given any partition $\mathcal{P}(\mathcal{S})$ and any size configuration of the backup filters $\mathbf{b}$ , estimates $\operatorname*{Pr}\left(\bigcap_{i=1}^{m} X_i\right)$ . Existing works have demonstrated the feasibility of learning effective models with small sample size (Loo et al., 2019; Lu et al., 2023; Sendera et al., 2021). In our work, we + +leverage the random forest model to learn $\Gamma (\mathcal{P}(\mathcal{S}),\mathbf{b})$ . The details of our training algorithm are given in Appendix C. + +Suppose our random forest model for learning $\Gamma(\mathcal{P}(\mathcal{S}), \mathbf{b})$ takes $Un$ bits. Let $\Pi(\mathcal{S})$ denote the set of all possible partitions of $\mathcal{S}$ . We can formulate the problem of optimal ELBF++ design as follows. + +$$ +\min _ {\mathcal {S} \subseteq \mathcal {O}} \min _ {\mathcal {P} (\mathcal {S}) \in \Pi (\mathcal {S})} \min _ {\mathbf {b}} +$$ + +$$ +\Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) \prod_ {g \in \mathcal {P} (\mathcal {S})} \left(F _ {P, g} + (1 - F _ {P, g}) \alpha^ {b _ {g} / F _ {N, g}}\right) +$$ + +$$ +\text {s u b j e c t} U + \sum_ {g \in \mathcal {P} (\mathcal {S})} \left(L _ {g} + b _ {g}\right) \leq T +$$ + +$$ +b _ {g} \geq 0, \forall g \in \mathcal {P} (\mathcal {S}) \tag {14} +$$ + +Considering the inner minimization problem for a given $\mathcal{P}(\mathcal{S})$ , we can rewrite it as follows: + +$$ +\min _ {\mathbf {b}} \ln \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) + \sum_ {g \in \mathcal {P} (\mathcal {S})} \ln \left(F _ {P, g} + (1 - F _ {P, g}) \alpha^ {b _ {g} / F _ {N, g}}\right) +$$ + +$$ +\begin{array}{l} \text {s . t .}: U + \sum_ {g \in \mathcal {P} (\mathcal {S})} \left(L _ {g} + b _ {g}\right) \leq T \\ b _ {g} \geq 0, \forall g \in \mathcal {P} (\mathcal {S}). \tag {15} \\ \end{array} +$$ + +By introducing a multiplier $\lambda \leq 0$ , we can write the augmented Lagrangian as + +$$ +\begin{array}{l} \mathcal {L} (\mathbf {b}, \lambda) = \ln \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b}) + \sum_ {g \in \mathcal {P} (\mathcal {S})} \ln \left(F _ {P, g} \right. \\ \left. + \left(1 - F _ {P, g}\right) \alpha^ {b _ {g} / F _ {N, g}}\right) - \lambda \left(\sum_ {g \in \mathcal {P} (\mathcal {S})} \left(L _ {g} + b _ {g}\right) - T + U\right). \tag {16} \\ \end{array} +$$ + +Denote $\phi_g \triangleq \partial \ln \Gamma(\mathcal{P}(S), \mathbf{b}) / \partial b_g$ . The partial derivatives of $\mathcal{L}$ w.r.t. $b_g$ and $\lambda$ can be derived as + +$$ +\left\{ \begin{array}{l} \frac {\partial \mathcal {L}}{\partial b _ {g}} = \phi_ {g} + \frac {\left(1 - F _ {P , g}\right) \alpha^ {b _ {g} / F _ {N , g}} \ln \alpha}{F _ {N , g} \left(F _ {P , g} + \left(1 - F _ {P , g}\right) \alpha^ {b _ {g} / F _ {N , g}}\right)} - \lambda \\ \frac {\partial \mathcal {L}}{\partial \lambda} = T - U - \sum_ {g \in \mathcal {P} (\mathcal {S})} \left(L _ {g} + b _ {g}\right) \end{array} \right. \tag {17} +$$ + +By imposing $\partial \mathcal{L} / \partial b_{g} = 0$ , we obtain + +$$ +\begin{array}{l} \frac {\left(1 - F _ {P , g}\right) \alpha^ {b _ {g} / F _ {N , g}}}{F _ {N , i} \left(F _ {P , g} + \left(1 - F _ {P , g}\right) \alpha^ {b _ {g} / F _ {N , g}}\right)} = \frac {\lambda}{\ln \alpha} - \frac {\phi_ {g}}{\ln \alpha} \\ \triangleq c - \Phi_ {g}, \forall g \in \mathcal {P} (\mathcal {S}). \tag {18} \\ \end{array} +$$ + +In the above equation, we define an auxiliary variable $c$ as in the analysis of the previous section, and denote $\Phi_g \triangleq$ + +$\phi_g / \ln \alpha$ . We can derive the optimal $b_{g}^{*}$ as + +$$ +b _ {g} ^ {*} = F _ {N, g} \log_ {\alpha} \frac {(c - \Phi_ {g} ^ {*}) F _ {N , g} F _ {P , g}}{\left(1 - (c - \Phi_ {g} ^ {*}) F _ {N , g}\right) \left(1 - F _ {P , g}\right)}. \tag {19} +$$ + +Here, $b_{g}^{*}$ can be solved iteratively. Specifically, we define an auxiliary variable + +$$ +\begin{array}{l} u _ {g} (t) \triangleq b _ {g} (t) - \\ F _ {N, g} \log_ {\alpha} \frac {\left(c - \Phi_ {g} (t)\right) F _ {N , g} F _ {P , g}}{\left(1 - \left(c - \Phi_ {g} (t)\right) F _ {N , g}\right) \left(1 - F _ {P , g}\right)}, \\ \end{array} +$$ + +where $t$ denotes the corresponding iteration index. We employ the secant method (Barnes, 1965) to update $b_{g}(t)$ as follows: + +$$ +b _ {g} (t + 1) = b _ {g} (t) - \frac {u _ {g} (t)}{u _ {g} (t) - u _ {g} (t - 1)} \left(b _ {g} (t) - b _ {g} (t - 1)\right). +$$ + +Noticing that the derivative of $u_{g}(t)$ is non-zero in the vicinity of $b_{g}^{*}$ , and assuming that $\Gamma(\mathcal{P}(\mathcal{S}), \mathbf{b})$ is continuous and differentiable, we can prove that $b(t)$ converges to $b_{g}^{*}$ , armed with which we can derive the overall FPR, denoted by $F^{(\mathcal{S})}$ as follows: + +$$ +\begin{array}{l} F ^ {(\mathcal {S})} = \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b} ^ {*}) \prod_ {g \in \mathcal {P} (\mathcal {S})} F _ {P} ^ {(g)} \\ = \Gamma (\mathcal {P} (\mathcal {S}), \mathbf {b} ^ {*}) \prod_ {g \in \mathcal {P} (\mathcal {S})} \frac {F _ {P , g}}{1 - \left(c - \Phi_ {g} ^ {*}\right) F _ {N , g}}. \tag {20} \\ \end{array} +$$ + +By searching $c$ in $(0, \min_{g \in \mathcal{P}(\mathcal{S})} (1 - F_{P,g}) / F_{N,g}]$ and finding the minimal corresponding overall FPR, we can solve the inner optimization problem. The detailed pseudo-code is given in Algorithm 3 of Appendix D. + +Next, we turn to solve the outer optimization problem by developing a greedy merging algorithm, described as follows: + +- Initialization. We set $\mathcal{P}$ as an empty set. +- Augmenting $\mathcal{P}$ . We iteratively augment $\mathcal{P}$ using the following three strategies: + +- Creating new branch: We pick an oracle not yet selected and create a new branch. +- Augmenting existing branch: We pick an oracle not yet selected and merge it with one of existing branches in $\mathcal{P}$ . +- Merging two existing branches: We pick two branches in $\mathcal{P}$ and merge them. + +For each of the above augmentation strategy, we invoke our algorithm to solve the inner optimization problem under the augmented partition $\mathcal{P}$ . We stop the augmentation when the overall FPR cannot be further improved. At this point, we output the final partition and the corresponding backup filter size to set the ELBF++ parameters. + +We conclude this section by analyzing the time complexity of the greedy algorithm. Given the error bound $\epsilon_{b}$ on finding $b_{g}^{*}$ , the number of iterations to execute the secant-based update is $O\left(\log_{\xi}\left(\log \left(1 / \epsilon_{b}\right)\right)\right)$ , where $\xi = (1 + \sqrt{5}) / 2$ (Diez, 2003). Hence, for a given $\mathcal{P}$ , the complexity of finding the minimal overall FPR among all discretized values of $c$ is $O\left(\left(\log_{\xi}\left(\log \left(1 / \epsilon_{b}\right)\right)\right) / \Delta\right)$ . Given that the inner optimization procedure is invoked for each augmentation of the partition $\mathcal{P}$ , and considering that the augmentation steps may be executed up to $n_0$ times, the overall time complexity sums up to $O\left(n_0^3\left(\log_{\xi}\left(\log \left(1 / \epsilon_{b}\right)\right)\right) / \Delta\right)$ . + +# 5. Extensions and Variants + +In this section, we discuss several pertinent extensions and variants of our ELBF to demonstrate that our design is sufficiently generic to be applied in a large spectrum of data processing tasks: (1) We formulate and optimize sandwiched ELBF which is incorporated with initial filters prior to oracles; (2) We consider an enhanced scenario where each oracle can be optimized as well; (3) We propose Ensemble Learned Bloomier Filter, which is inspired by Bloomier filters (Chazelle et al., 2004), a variant of BF, to solve key-value lookup. The details is presented in the Appendix. + +# 6. Experiments + +We perform empirical experiments to evaluate the proposed designs. We conduct our experiments on three practical data analysis tasks: (1) virus signature scan, (2) malicious URLs detection, (3) universally unique identifier check. Due to space limit, we present the first task and defer the rest two to Appendix, which demonstrate similar results and thus lead to similar observations and conclusions. We also give a more detailed evaluation of Algorithm 1 under different parameters using synthetic data. A aberration study presented in Appendix compares Algorithm 1 against simpler approaches, highlighting the advantage of our proposition. Our experiments are conducted on a standard off-the-shelf desktop computer with an Intel(R) Core i7-12700F CPU @2.10 GHz and 16 GB RAM. + +# 6.1. Experiment Setting + +BFs are extensively utilized in virus signature scanning task, involving the verification of whether a suspect file's signature exists in the virus signature database when the file is presented. In our experiments, we apply the proposed ELBFs to execute the task of virus signature scan and compare them against the state-of-the-art solutions. + +We use a real-world dataset EMBER (Anderson & Roth, 2018), an open-source collection of 1M sha256 file hashes. There are 400K malicious, 400K benign and 200K unlabeled files, which were scanned by VirusTotal in 2018. We + +ignore the unlabeled files. The 2381 features of the files are included in the dataset, from which we randomly select 238 features. The features are exclusive for mutually independent case and somewhat duplicate for correlated case. Following the literature, we choose the random forest classifier from sklearnn (Pedregosa et al., 2011) as oracles. We construct a pool of oracles with a large oracle and a set of small oracles. The large oracle consists 10 decision trees and at most 20 leaf nodes for each tree; the oracle size is $262\mathrm{Kb}$ . Each small oracle is a single decision tree with at most 20 leaf nodes; the oracle size is $32\mathrm{Kb}$ . We randomly sample $30\%$ data for oracle training. The large oracle learns from all 238 features while each small oracle learns from 23 or 24 features selected randomly. + +# 6.2. Experiment Results + +We compare ELBFs against major state-of-the-art propositions, i.e., the canonical BF (Bloom, 1970), LBF (Kraska et al., 2018), Ada-BF (Dai & Shrivastava, 2020), PLBF (Vaidya et al., 2021) and Fast PLBF++ (Sato & Matsui, 2023). As we have a pool of oracles, we let LBF, Ada-BF, PLBF and Fast PLBF++ operate on the oracle achieving the lowest FPR. To put Ada-BF, PLBF and Fast PLBF++ along the same line of comparison with ELBF, we let Ada-BF, PLBF and Fast PLBF++ operate on two regions representing positive and negative responses from the oracle and optimize the corresponding backup BFs. Ada-BF executes under its hyper-parameter $c = 1 - 3$ with 40 intervals and PLBF and Fast PLBF++ execute under its number of intervals $N = 100$ . ELBF chooses the oracles by running Algorithm 1 under the parameter setting $\Delta = 0.1$ , $\epsilon = 0.01$ , $\delta = 0.01$ . We straightforwardly set theta $\theta_{1} = \lceil \frac{n_{o}}{\epsilon} \rceil$ and $\theta_{2} = \lceil \frac{n_{o} + 1}{T\delta} \rceil$ , which satisfies the condition in Theorem 3.2. ELBF++ operates the greedy merging algorithm under the parameter setting $\Delta = 0.1$ , $\epsilon_{b} = 0.01$ . + +# 6.2.1. MEMORY BUDGET AND FPR + +We first compare the central performance metric, FPR, of the evaluated solutions in Figure 4(a) and Figure 4(c) under different memory budget. We make the following observations from the results. (1) Under stringent memory budget, the canonical BF has much higher FPR compared to its learning-augmented peers. This performance gap shrinks with the increase of the memory budget to the extent that, with abundant memory space, there is no advantage to augment the BF with oracles. This can be explained as follows. The FPR of the canonical BF decreases exponentially in the memory allocated to it. In the LBF, Ada-LBF, PLBF and Fast PLBF++, the FPR depends not only on the size of the backup BF, but also on the FPR of the oracles. When the memory budget is not stringent, the FPR of the oracles dominates the global FPR, leading to the result that the canonical BF outperforms its learning-augmented peers, except our solution ELBFs, + +![](images/e1d933c099064895ec04b600ce7c26df256f6143cb1dc8597ac3f7e8d23e8da5.jpg) +Figure 4. Performance comparison: mutually independent case (left), correlated case (right). + +![](images/202a2c721b1947340bfa6114a5dcfcac2efe8b97e14caec6495d937f5a539c36.jpg) + +![](images/5132049605bf55275c2113d42af3d2cbd639b437c990ee31e202a86d0e2fdac2.jpg) + +![](images/ea01f2534c4d6820a15cc2219d18e74362a5d8d300482ca53934fd89feb4fe0f.jpg) + +![](images/53a68da23e67732f2d7f387d593c54c2d6bb3a7850b2559c410eba9ab5a8c1d5.jpg) +(a) Varying $\Delta$ , $\epsilon = 0.01$ , $\delta = 0.01$ + +![](images/4a68004b0d63748bd5df59543958c8c6a083c85034e130899d4ce1034d604bfa.jpg) +(b) Varying $\epsilon$ , $\Delta = 0.1$ , $\delta = 0.01$ + +![](images/87c82c2aead6541cbd7856a7977a0bb167085a6141097ec35538d80bc3ee9ade.jpg) +(c) Varying $\delta$ , $\Delta = 0.1$ , $\epsilon = 0.01$ +Figure 5. Performance of Algorithm 1 under different parameter settings. + +as integrating multiple different oracles eliminate the diminishing effect of a single oracle and we have included a dumb oracle allowing to cover the case where adding an oracle has negative impact on the final FPR; (2) ELBFs outperform the other solutions for all the memory budget, confirming our finding that orchestrating multiple small oracles instead of relying on a single large oracle holistically can effectively reduce the FPR. The performance gain is more pronounced with large memory budget because this allows more space to optimize the orchestration of different oracles, leading to better performance. (3) The performance of Ada-BF, PLBF, and Fast PLBF++ is unrelated to the correlation of oracles, as they only use a single oracle. ELBF performs better than ELBF++ in their respective situations, as ELBF achieves guaranteed optimality while ELBF++ relies on heuristics. + +# 6.2.2. TIME OVERHEAD + +We then compare the time overhead of different solutions, by time overhead we mean the time to compute the optimal configuration of the entire data structure including the backup filter size, the oracles to use, etc, excluding the times to train models and insert all the items into the BF and backup BFs. In our experiments, we report that the time overhead for BF and LBF is negligible and hence have not included them in the figure. This is because BF does not need to choose any oracle and LBF chooses the best oracle with minimal overall FPR, both with almost no computation overhead. Therefore, we concentrate on the comparison among ELBFs, Ada-BF, PLBF and Fast PLBF++, as depicted in Figure 4(b) and Figure 4(d). We observe that both Ada-BF and PLBF incur significantly higher overhead than + +ELBF, because both of them require multiple-dimensional search for the parameters, outweighing the Knapsack-based search in ELBF. Though Fast PLBF++ diminishes the construction time of PLBF, its time overhead remains higher than that of ELBF. ELBF++ is more time-consuming than ELBF due to the heuristics. + +# 6.2.3. ABLATION STUDY W.R.T. ALGORITHM 1 + +We conclude our experiment analysis by evaluating Algorithm 1 under different parameter settings regarding $c$ , $\epsilon$ and $\delta$ . The results, depicted in Figure 5, lead to the following observations. The FPR increases in $\Delta$ and $\epsilon$ , demonstrating the trade-off between the optimality and complexity of our algorithm. Our experiments indicate that setting $\Delta$ to 0.1 seems sufficient to achieve near-optimal FPR. On the other hand, the FPR decreases in $\delta$ , as larger $\delta$ indicates larger memory budget and hence better performance. The impact of $\delta$ decreases as the memory budget increases, to the extent that, when the memory budget reaches 3000 Kb, $\delta$ has virtually no impact on the FPR. + +# 7. Conclusion + +In this paper, we have presented a new design of LBFs based on ensemble learning, termed as ELBFs. We demonstrate that by orchestrating multiple oracles of smaller size, the ELBFs outperform the existing LBFs. The main technicality to build the optimal ELBFs in our designs is a Knapsack-based algorithm solving a combinatorial optimization problem for mutually independent learning oracles and a greedy approach solving a more complex combinatorial optimiza + +tion problem for correlated learning oracles. The empirical experiments in real-world datasets demonstrate the performance gain of our approaches. + +# Acknowledgements + +This work is supported in part by National Science Foundation of China under Grant 62172455, Pearl River Talent Program under Grant 2019QN01X140, and Guangdong Provincial Key Laboratory of Information Security Technology (No. 2023B1212060026). Part of the work of Lin Chen is done when he was with School of Computer Science and Engineering, Sun Yat-sen University. + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are a number of potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Anderson, H. S. and Roth, P. EMBER: an open dataset for training static PE malware machine learning models. arXiv preprint arXiv:1804.04637, 2018. +Barnes, J. G. P. An algorithm for solving non-linear equations based on the secant method. The Computer Journal, 8(1):66-72, 1965. +Bloom, B. H. Space/time trade-offs in hash coding with allowable errors. Communications of the ACM, 13(7): 422-426, 1970. +Bonomi, F., Mitzenmacher, M., Panigrahy, R., Singh, S., and Varghese, G. An improved construction for counting Bloom filters. In Proc. ESA, pp. 684-695, 2006. +Broder, A. and Mitzenmacher, M. Network applications of bloom filters: A survey. _Internet Mathematics_, 1(4): 485-509, 2004. +Chazelle, B., Kilian, J., Rubinfeld, R., and Tal, A. The bloomier filter: an efficient data structure for static support lookup tables. In Proc. SODA, pp. 30-39, 2004. +Dai, Z. and Shrivastava, A. Adaptive learned Bloom filter (Ada-BF): Efficient utilization of the classifier with application to real-time information filtering on the web. Advances in Neural Information Processing Systems, 33: 11700-11710, 2020. +Diez, P. A note on the convergence of the secant method for simple and multiple roots. Applied mathematics letters, 16(8):1211-1215, 2003. + +Garey, M. R. and Johnson, D. S. Computers and intractability, volume 174. Freeman San Francisco, 1979. +Gomes, H. M., Barddal, J. P., Enembreck, F., and Bifet, A. A survey on ensemble learning for data stream classification. ACM Computing Surveys, 50(2):1-36, 2017. +Goodrich, M. T. and Mitzenmacher, M. Invertible bloom lookup tables. In Proc. Allerton Conference, pp. 792-799, 2011. +Kraska, T., Beutel, A., Chi, E. H., Dean, J., and Polyzotis, N. The case for learned index structures. In Proc. SIGMOD, pp. 489-504, 2018. +Loo, Y., Lim, S. K., Roig, G., and Cheung, N.-M. Few-shot regression via learned basis functions. In Proc. ICLR, 2019. +Lu, J., Gong, P., Ye, J., Zhang, J., and Zhang, C. A survey on machine learning from few samples. Pattern Recognition, 139:109480, 2023. +Mendes-Moreira, J., Soares, C., Jorge, A. M., and Sousa, J. F. D. Ensemble approaches for regression: A survey. ACM Computing Surveys, 45(1):1-40, 2012. +Mitzenmacher, M. A model for learned Bloom filters and optimizing by sandwiching. Advances in Neural Information Processing Systems, 31, 2018. +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. Journal of Machine Learning Research, 12:2825-2830, 2011. +Polikar, R. Ensemble learning. Ensemble machine learning: Methods and applications, pp. 1-34, 2012. +Sato, A. and Matsui, Y. Fast partitioned learned bloom filter. In Proc. NeurIPS, 2023. +Sendera, M., Tabor, J., Nowak, A., Bedychaj, A., Patacchiola, M., Trzcinski, T., Spurek, P., and Zieba, M. Nongaussian gaussian processes for few-shot regression. Advances in Neural Information Processing Systems, 34: 10285-10298, 2021. +Thompson, N. C., Greenewald, K., Lee, K., and Manso, G. F. Deep learning's diminishing returns: The cost of improvement is becoming unsustainable. IEEE Spectrum, 58(10):50-55, 2021. +Vaidya, K., Knorr, E., Mitzenmacher, M., and Kraska, T. Partitioned learned bloom filters. In Proc. ICLR, 2021. +Vanerio, J. and Casas, P. Ensemble-learning approaches for network security and anomaly detection. In Proc. Workshop on Big Data Analytics and Machine Learning for Data Communication Networks, pp. 1-6, 2017. + +# A. Proof of Theorem 3.2 + +Proof. Let $(\mathcal{A}^*, \mathbf{b}^*)$ and $(\mathcal{A}^{OPT}, \mathbf{b}^{\mathrm{OPT}})$ denote the output of Algorithm 1 and the optimal solution of $\mathbf{P_1}$ , respectively. Let $c^*$ and $c^{OPT}$ denote the associated values of $c$ correspondingly. + +We consider the discretized Knapsack formulation of $\mathbf{P}$ denoted by $\hat{\mathbf{P}}$ , in which $\hat{\mathbf{v}}$ and $\hat{\mathbf{w}}$ are computed using scaling factors $\theta_{1}$ and $\theta_{2}$ as shown in Algorithm 1. Recall the scaling of $w_{j}$ , we can check that $(\mathcal{A}^{OPT},\mathbf{b}^{\prime})$ is a feasible solution of $\hat{\mathbf{P}}$ , where $\mathbf{b}^{\prime}$ is as follows + +$$ +\begin{array}{l} b _ {i} ^ {\prime} = F _ {N, i} \log_ {\alpha} \frac {\hat {c} ^ {O P T} F _ {N , i} F _ {P , i}}{(1 - \hat {c} ^ {O P T} F _ {N , i}) (1 - F _ {P , i})} \\ \geq F _ {N, i} \log_ {\alpha} \frac {c ^ {O P T} F _ {N , i} F _ {P , i}}{(1 - c ^ {O P T} F _ {N , i}) (1 - F _ {P , i})}, \\ \end{array} +$$ + +where $\hat{c}^{OPT} = \left\lfloor \frac{c^{OPT}}{\Delta}\right\rfloor \cdot \Delta \leq c^{OPT}$ + +Hence, we have + +$$ +\begin{array}{l} \sum_ {i \in \mathcal {A} ^ {*}} \left[ \theta_ {1} \cdot \ln \frac {1 - c ^ {*} F _ {N , i}}{F _ {P , i}} \right] \geq \sum_ {i \in \mathcal {A} ^ {*}} \left[ \theta_ {1} \cdot \ln \frac {1 - \hat {c} ^ {O P T} F _ {N , i}}{F _ {P , i}} \right] \\ \geq \sum_ {i \in \mathcal {A} ^ {*}} \left[ \theta_ {1} \cdot \ln \frac {1 - c ^ {O P T} F _ {N , i}}{F _ {P , i}} \right]. \\ \end{array} +$$ + +The second inequality follows from $\hat{c}^{OPT} \leq c^{OPT}$ . It then follows that + +$$ +\sum_ {i \in \mathcal {A} ^ {*}} \left(1 + \theta_ {1} \cdot \ln \frac {1 - c ^ {*} F _ {N , i}}{F _ {P , i}}\right) \geq \sum_ {i \in \mathcal {A} ^ {*}} \theta_ {1} \cdot \ln \frac {1 - c ^ {O P T} F _ {N , i}}{F _ {P , i}}. +$$ + +Let $n_0$ denote the number of oracles. We have + +$$ +\sum_ {i \in \mathcal {A} ^ {*}} \ln \frac {1 - c ^ {*} F _ {N , i}}{F _ {P , i}} \geq \sum_ {i \in \mathcal {A} ^ {*}} \ln \frac {1 - c ^ {O P T} F _ {N , i}}{F _ {P , i}} - \frac {n _ {0}}{\theta_ {1}}. +$$ + +Recall that the false positive rates corresponding to $(\mathcal{A}^*,\mathbf{b}^*)$ and $(\mathcal{A}^{OPT},\mathbf{b}^{\mathrm{OPT}})$ are $\prod_{i\in \mathcal{A}^*}\frac{F_{P,i}}{1 - c^*F_{N,i}}$ and $\prod_{i\in \mathcal{A}^*}\frac{F_{P,i}}{1 - c^{OPT}F_{N,i}}$ , respectively. With some straightforward algebraic operations, we can prove that, under the condition $\theta_1\geq n_0 / \epsilon$ , it holds that + +$$ +\prod_ {i \in \mathcal {A} ^ {*}} \frac {F _ {P , i}}{1 - c ^ {*} F _ {N , i}} \leq (1 + \epsilon) \prod_ {i \in \mathcal {A} ^ {*}} \frac {F _ {P , i}}{1 - c ^ {O P T} F _ {N , i}}. +$$ + +We have now proved the false positive rate of the solution output by our algorithm is within $\epsilon$ to the optimal solution. We then prove that the total space of our solution is upper-bounded by $(1 + \delta)T$ . + +It follows from our algorithm that + +$$ +\sum_ {i \in \mathcal {A} ^ {*}} \left\lfloor \theta_ {2} \left(L _ {i} + b _ {i} ^ {*}\right)\right\rfloor \leq \left\lceil \theta_ {2} T \right\rceil . +$$ + +Therefore, we have + +$$ +\sum_ {i \in \mathcal {A} ^ {*}} \theta_ {2} \left(L _ {i} + b _ {i} ^ {*}\right) - n _ {0} \leq \theta_ {2} T + 1. +$$ + +The space overhead of our algorithm can then be bounded as follows. + +$$ +\sum_ {i \in \mathcal {A} ^ {*}} (L _ {i} + b _ {i} ^ {*}) \leq T + \frac {n _ {0} + 1}{\theta_ {2}}. +$$ + +Therefore, if $\theta_{2} \geq \frac{n_{0} + 1}{T\delta}$ , the total space of our solution is upper-bounded by $(1 + \delta)T$ . + +# B. Optimality of ELBF with Non-correlated Oracles + +Theorem B.1. Given any set of independent oracles and any space budget, allocating a separate backup filter for each oracle leads to strictly lower FPR than letting multiple oracles sharing a common backup filter. + +We consider the oracles are divided into a set $\mathcal{G}$ of $n_g \triangleq |\mathcal{G}|$ groups, with the oracles belonging to the same group sharing a single backup filter, i.e., the filter of group $g \in \mathcal{G}$ stores the false negatives of all the oracles in this group. + +We now derive the FPR by first deriving the FPR of each group and then deriving the overall FPR. For each group $g \in \mathcal{G}$ , once at least one of the oracles in the group returns negatively, the backup filter will store the corresponding item. Hence, the FNR of group $g$ oracles as a whole, denoted by $F_N^{(g)}$ , can be computed as + +$$ +F _ {N} ^ {(g)} = 1 - \prod_ {i \in \mathcal {O} _ {g}} \left(1 - F _ {N, i}\right), \tag {21} +$$ + +where $\mathcal{O}_g$ denotes the set of oracles in group $g$ . The number of keys the backup filter of group $g$ needs to hold is $F_N^{(g)}n$ . To derive the FPR for group $g$ , we first give the FPR for the oracles in the group, denoted by $F_P^{(g)}$ as follows. + +$$ +F _ {P} ^ {(g)} = \prod_ {i \in \mathcal {O} _ {g}} F _ {P, i} \tag {22} +$$ + +We then can derive the FPR for the whole branch including the backup filter as + +$$ +F _ {P} ^ {(g)} + (1 - F _ {P} ^ {(g)}) \alpha^ {b ^ {(g)} / F _ {N} ^ {(g)}}. +$$ + +Since the groups are independent to each other, we can conclude the FPR for this group-based design as + +$$ +\prod_ {g \in \mathcal {G}} \left(F _ {P} ^ {(g)} + \left(1 - F _ {P} ^ {(g)}\right) \alpha^ {b ^ {(g)} / F _ {N} ^ {(g)}}\right) \tag {23} +$$ + +We next prove that for any configuration of this group-based design, there always exists a corresponding ELBF configuration achieving lower FPR with the same space budget. + +Suppose we have in total $n$ oracles, with $F_{P,i}$ and $F_{N,i}$ denoting the FPR and the FNR of oracle $i$ and $L_{i}$ denoting its size. The space budget is $T$ . We start from the case $n = 2$ . The FPR of the group containing both oracles can be computed as + +$$ +F _ {\mathcal {G}} = F _ {P, 1} F _ {P, 2} + (1 - F _ {P, 1} F _ {P, 2}) \alpha^ {b / (F _ {N, 1} + F _ {N, 2} - F _ {N, 1} F _ {N, 2})}, +$$ + +where $b \triangleq T - L_1 - L_2$ . The FPR of the corresponding ELBF is $F_1 \cdot F_2$ that given by + +$$ +\Big (F _ {P, 1} + (1 - F _ {P, 1}) \alpha^ {b _ {1} / F _ {N, 1}} \Big) \Big (F _ {P, 2} + (1 - F _ {P, 2}) \alpha^ {b _ {2} / F _ {N, 2}} \Big), +$$ + +where $b_{1} + b_{2} = b$ + +Now, we need to prove $F_{1} \cdot F_{2} < F_{\mathcal{G}}$ . Imposing $\frac{b_1}{F_{N,1}} = \frac{b_2}{F_{N,2}}$ yields $b_{1} = \frac{F_{N,1}b}{F_{N,1} + F_{N,2}}$ , $b_{2} = \frac{F_{N,2}b}{F_{N,1} + F_{N,2}}$ . The inequality can be rewrite as below. + +$$ +\begin{array}{l} \left(F _ {P, 1} + (1 - F _ {P, 1}) \alpha^ {\frac {b}{F _ {N , 1} + F _ {N , 2}}}\right) \cdot \left(F _ {P, 2} + (1 - F _ {P, 2}) \alpha^ {\frac {b}{F _ {N , 1} + F _ {N , 2}}}\right) < F _ {P, 1} F _ {P, 2} + (1 - F _ {P, 1} F _ {P, 2}) \alpha^ {\frac {b}{F _ {N , 1} + F _ {N , 2} - F _ {N , 1} F _ {N , 2}}} \\ \Longleftrightarrow (F _ {P, 1} + F _ {P, 2} - 2 F _ {P, 1} F _ {P, 2}) \alpha^ {\frac {b}{F _ {N , 1} + F _ {N , 2}}} + (1 - F _ {P, 1}) (1 - F _ {P, 2}) \alpha^ {\frac {2 b}{F _ {N , 1} + F _ {N , 2}}} < (1 - F _ {P, 1} F _ {P, 2}) \alpha^ {\frac {b}{F _ {N , 1} + F _ {N , 2} - F _ {N , 1} F _ {N , 2}}} \\ \Longleftrightarrow (F _ {P, 1} + F _ {P, 2} - 2 F _ {P, 1} F _ {P, 2}) \alpha^ {1 - \frac {F _ {N , 1} F _ {N , 2}}{F _ {N , 1} + F _ {N , 2}}} + (1 - F _ {P, 1}) (1 - F _ {P, 2}) \alpha^ {2 (1 - \frac {F _ {N , 1} F _ {N , 2}}{F _ {N , 1} + F _ {N , 2}})} < 1 - F _ {P, 1} F _ {P, 2}. \\ \end{array} +$$ + +Since $1 - \frac{F_{N,1}F_{N,2}}{F_{N,1} + F_{N,2}}\in (0,1)$ , we have $\alpha^{1 - \frac{F_{N,1}F_{N,2}}{F_{N,1} + F_{N,2}}}$ < 1. The LHS of the above inequality is strictly smaller than + +$$ +F _ {P, 1} + F _ {P, 2} - 2 F _ {P, 1} F _ {P, 2} + \left(1 - F _ {P, 1}\right) \left(1 - F _ {P, 2}\right) = 1 - F _ {P, 1} F _ {P, 2}. +$$ + +The inequality is thus proven. We carry on the proof by mathematical induction. + +Suppose $n = k$ , $\exists b_{i}$ , where $\sum_{i=1}^{k} b_{i} = T - \sum_{i=1}^{k} L_{i}$ , s.t. $\prod_{i=1}^{k} F_{i} < F_{\mathcal{G}_{k}}$ . + +For $n = k + 1$ , the false positive rate of group $G_{k + 1}$ is + +$$ +F _ {P, \mathcal {G} _ {k + 1}} = \prod_ {i = 1} ^ {k + 1} F _ {P, i} = \prod_ {i = 1} ^ {k} F _ {P, i} \cdot F _ {P, k + 1} = F _ {P, \mathcal {G} _ {k}} \cdot F _ {P, k + 1} \tag {24} +$$ + +and the false negative rate of that is + +$$ +\begin{array}{l} F _ {N, \mathcal {G} _ {k + 1}} = 1 - \prod_ {i = 1} ^ {k + 1} (1 - F _ {N, i}) \\ = 1 - \left(1 - \left(1 - \prod_ {i = 1} ^ {k} \left(1 - F _ {N, i}\right)\right)\right) \cdot \left(1 - F _ {N, k + 1}\right) \tag {25} \\ = 1 - \left(1 - F _ {N, \mathcal {G} _ {k}}\right) \left(1 - F _ {N, k + 1}\right) \\ = F _ {N, \mathcal {G} _ {k}} + F _ {N, k + 1} - F _ {N, \mathcal {G} _ {k}} F _ {N, k + 1}. \\ \end{array} +$$ + +from which we can write the FPR of groups consisting $k + 1$ oracles as + +$$ +F _ {P, \mathcal {G} _ {k}} F _ {P, k + 1} + (1 - F _ {P, \mathcal {G} _ {k}} F _ {P, k + 1}) \alpha^ {\frac {T}{F _ {N} , \mathcal {G} _ {k} + F _ {N , k + 1} - F _ {N} , \mathcal {G} _ {k} F _ {N , k + 1}}} \tag {26} +$$ + +That is, the ahead $k$ oracles that compose the group can be treated as an alternative oracle. We need to prove there exists an allocation of BFs for multiple oracles which behaves better than the group case. + +Recall $b = T - \sum_{i=1}^{k+1} L_i$ . Imposing $\frac{b_{\mathcal{G}_k}}{F_N, \mathcal{G}_k} = \frac{b_{k+1}}{F_{N,k+1}}$ yields $b_{\mathcal{G}_k} = \frac{F_{N,\mathcal{G}_k} b}{F_{N,\mathcal{G}_k} + F_{N,k+1}}$ , $b_{k+1} = \frac{F_{N,k+1} b}{F_{N,\mathcal{G}_k} + F_{N,k+1}}$ . Taking the assumption for $n = k$ , we know that there exists an allocation for BFs for the ahead $k$ oracles under budget $b_{\mathcal{G}_k}$ satisfies the following inequality. + +$$ +\begin{array}{l} \prod_ {i = 1} ^ {k + 1} F _ {i} = \prod_ {i = 1} ^ {k} F _ {i} \cdot F _ {k + 1} < F _ {\mathcal {G} _ {k}} \cdot F _ {k + 1} \\ = \left(F _ {P, \mathcal {G} _ {k}} + \left(1 - F _ {P, \mathcal {G} _ {k}}\right) \alpha^ {b _ {\mathcal {G} _ {k}} / F _ {N, \mathcal {G} _ {k}}}\right) \cdot \left(F _ {P, k + 1} + \left(1 - F _ {P, k + 1}\right) \alpha^ {b _ {k + 1} / F _ {N, k + 1}}\right) \tag {27} \\ = \left(F _ {P, \mathcal {G} _ {k}} + (1 - F _ {P, \mathcal {G} _ {k}}) \alpha^ {\frac {b}{F _ {N}, \mathcal {G} _ {k} + F _ {N , k + 1}}}\right) \cdot \left(F _ {P, k + 1} + (1 - F _ {P, k + 1}) \alpha^ {\frac {b}{F _ {N}, \mathcal {G} _ {k} + F _ {N , k + 1}}}\right) \\ \end{array} +$$ + +This inequality is smaller than (26) by similar analysis for the case $n = 2$ . Then, we have $F_{\mathcal{G}_k} \cdot F_{k + 1} < F_{\mathcal{G}_{k + 1}}$ , which leads to + +$$ +\prod_ {i = 1} ^ {k + 1} F _ {i} < F _ {\mathcal {G} _ {k + 1}} +$$ + +Thus, given mutually independent oracles, for any configuration of the group-based design, there always exists a corresponding ELBF configuration achieving lower FPR with the same space budget. + +# C. Algorithm 2: Training Auxiliary Learned Model + +# D. Algorithm 3: Inner Optimization of ELBF++ + +# E. Algorithm 4: Greedy Merging Algorithm for Outer Optimization of ELBF++ + +The pseudo-code of our greedy merging algorithm for the outer optimization of $\mathrm{ELBF}++$ is given in Algorithm 4. Our three augmentation strategies correspond to three for loops, respectively. The procedure INNER defined in Algorithm 3 solves the inner optimization problem. For conciseness, an internal procedure UPDATE updates the current optimal configuration. + +Algorithm 2 Training auxiliary learned model +Input: oracles set $\mathcal{O}$ space budget $T$ data scalar $M$ +Output: auxiliary model $\Gamma$ +1: Initialization: $i\gets 1$ +2: while $1\leq i\leq M$ do +3: $j\gets 1$ +4: while $1\leq j\leq n_0$ do +5: $s\gets randomInt(j,n_0)$ +6: Randomly divide $\mathcal{O}$ into a partition $\mathcal{P}(\mathcal{O})$ containing $s$ groups +7: $\mathcal{P}(\mathcal{S})\gets$ Randomly select a subset containing $j$ groups of $\mathcal{P}(\mathcal{O})$ +8: $\mathbf{b}\triangleq (b_1,b_2,\dots ,b_{n_0})\gets \mathbf{0}$ +9: Randomly allocate $T$ to $b_{1},b_{2},\dots ,b_{j}$ +10: $R\gets \frac{\operatorname*{Pr}(X_1,X_2,\cdots,X_j)}{\prod_{i = 1}^j\operatorname*{Pr}(X_i)}$ +11: $\mathbf{x}\gets$ Extract features from $\mathcal{P}(\mathcal{S})$ +12: Add $(\mathbf{(x,b)},R)$ to dataset +13: end while +14: end while +15: $\Gamma \gets$ Train a Random Forest on dataset + +Algorithm 3 Inner Optimization of ELBF++ +1: procedure INNER(oracle partition $\mathcal{P}$ , stepsize $\Delta$ , space budget $T$ , auxiliary model $\Gamma$ , iteration threshold $N$ ) +2: $F_{P}^{(\mathcal{P})}\gets 1,c\gets 0,U\gets$ size of $\Gamma$ +3: while $0\leq c\leq \min_{g\in \mathcal{P}(\mathcal{S})}\frac{1 - F_{P,g}}{F_{N,g}}$ do +4: $c\gets c + \Delta$ +5: for $g\in \mathcal{P}$ do +6: Initialize b randomly +7: Compute $\Phi_g(0),\forall g\in \mathcal{P}$ +8: $t\gets 0$ +9: while convergence not reached and $t < N$ do +10: $u_{g}(t)\leftarrow b_{g}(t) - F_{N,g}\log_{\alpha}\frac{(c - \Phi_{g}(t))F_{N,g}F_{P,g}}{(1 - (c - \Phi_{g}(t))F_{N,g})(1 - F_{P,g})}$ +11: if $t > 0$ then +12: $b_{g}(t + 1)\leftarrow b_{g}(t) - \frac{u_{g}(t)}{u_{g}(t) - u_{g}(t - 1)} (b_{g}(t) - b_{g}(t - 1))$ +13: end if +14: $t\gets t + 1$ +15: end while +16: $b_{g}^{*}\gets b_{g}(t)$ $\Phi_g^*\gets \Phi_g(t)$ +17: end for +18: $F_P^{(\mathcal{P})}\gets \Gamma (\mathcal{P},\mathbf{b}^*)\prod_{g\in \mathcal{P}}\frac{F_{P,g}}{1 - (c - \Phi_g^*)F_{N,g}}$ $w\gets \sum_{g\in \mathcal{P}}b_g^*$ +19: if $F_P^{(\mathcal{P})} < F_P^{(\mathcal{P})*}$ and $w\leq T - U$ then +20: $F_P^{(\mathcal{P})*}\gets F_P^{(\mathcal{P})}$ +21: end if +22: end while +23: return $\mathbf{b}^*,F_P^{(\mathcal{P})*}$ +24: end procedure + +Algorithm 4 Greedy Merging Algorithm for Outer Optimization of ELBF++ +Require: Oracles set $\mathcal{O}$ space budget $T$ stepsize $\Delta$ , iteration threshold $N$ +Ensure: Optimal partition $\mathcal{P}^*$ and corresponding $\mathbf{b}^{*}$ +1: Initialization: $F_{P}^{*}\gets 1,\mathcal{P}\gets \emptyset$ +2: procedure UPDATE $(\mathcal{P}_{\mathrm{new}},\mathbf{b}_{\mathrm{new}}^{*},F_{P,\mathrm{new}}^{*})$ +3: $\mathcal{P}^*\gets \mathcal{P}_{\mathrm{new}}$ +4: $\mathbf{b}^{*}\leftarrow \mathbf{b}_{\mathrm{new}}^{*}$ +5: $F_{P}^{*}\gets F_{P,\mathrm{new}}^{*}$ +6: return True, $\mathcal{P}^*$ , $\mathbf{b}^{*}$ $F_{P}^{*}$ +7: end procedure +8: while True do +9: imp $\leftarrow$ False +10: for each oracle o not in $\mathcal{P}$ do +11: $\mathcal{P}_{\mathrm{new}}\gets \mathcal{P}\cup \{o\}$ +12: $\mathbf{b}_{\mathrm{new}}^{*},F_{P,\mathrm{new}}^{*}\gets \mathrm{INNER}(\mathcal{P}_{\mathrm{new}},\Delta ,T,\Gamma ,N)$ +13: if $F_{P,\mathrm{new}}^{*} < F_{P}^{*}$ then +14: (imp, $\mathcal{P}^*,\mathbf{b}^*,F_P^*)\gets \mathrm{UPDATE}(\mathcal{P}_{\mathrm{new}},\mathbf{b}_{\mathrm{new}}^*,F_{P,\mathrm{new}}^*)$ +15: end if +16: end for +17: for each branch $g\in \mathcal{P}$ do +18: for each oracle o not in $\mathcal{P}$ do +19: $\mathcal{P}_{\mathrm{new}}\gets \mathcal{P}\backslash \{g\} \cup \{g\cup \{o\} \}$ +20: $(\mathbf{b}_{\mathrm{new}}^{*},F_{P,\mathrm{new}}^{*})\gets \mathrm{INNER}(\mathcal{P}_{\mathrm{new}},\Delta ,T,\Gamma ,N)$ +21: if $F_{P,\mathrm{new}}^{*} < F_{P}^{*}$ then +22: (imp, $\mathcal{P}^*,\mathbf{b}^*,F_P^*)\gets \mathrm{UPDATE}(\mathcal{P}_{\mathrm{new}},\mathbf{b}_{\mathrm{new}}^*,F_{P,\mathrm{new}}^*)$ +23: end if +24: end for +25: end for +26: for each pair of branches. $(g_1,g_2)\in \mathcal{P}$ do +27: $\mathcal{P}_{\mathrm{new}}\gets \mathcal{P}\backslash \{g_1,g_2\} \cup \{g_1\cup g_2\}$ +28: $(\mathbf{b}_{\mathrm{new}}^{*},F_{P,\mathrm{new}}^{*})\gets \mathrm{INNER}(\mathcal{P}_{\mathrm{new}},\Delta ,T,\Gamma ,N)$ +29: if $F_{P,\mathrm{new}}^{*} < F_{P}^{*}$ then +30: (imp, $\mathcal{P}^*,\mathbf{b}^*,F_P^*)\gets \mathrm{UPDATE}(\mathcal{P}_{\mathrm{new}},\mathbf{b}_{\mathrm{new}}^*,F_{P,\mathrm{new}}^*)$ +31: end if +32: end for +33: if not imp then +34: Break +35: end if +36: P P +37: end while +38: return $\mathcal{P}^*$ , b*, $F_{P}^{*}$ + +# F. Details of Extensions and Variants + +# F.1. Optimizing Learned Oracles + +Referring to Problem 1, we consider an enhanced scenario where each oracle possesses variable size and performance characteristics. For instance, a decision tree oracle might incorporate additional leaf nodes to reduce its false positives and false negatives, albeit at the expense of increased memory consumption. In this context, the objective is to select an optimal configuration for each oracle such that the resultant ELBF achieves the minimal FPR. + +Assume that each oracle $i \in \mathcal{O}$ has a set $\mathcal{J}_i$ of potential configurations. Each configuration $j \in \mathcal{J}_i$ is associated with specific parameters: $L_{ij}$ denotes the memory size, $F_{P,ij}$ represents the false positive rate, and $F_{N,ij}$ represents the false negative rate of the oracle under configuration $j$ . The challenge is to determine the most appropriate configuration for each oracle to optimize the overall FPR of the ELBF. + +Problem 1 has evolved in complexity, now encompassing the optimization of individual configurations for each oracle $i$ within the chosen subset $\mathcal{A}$ . Reflecting on Algorithm 1, it is capable of addressing this intricate optimization challenge. Given that the values of $F_{P,i}$ and $F_{N,i}$ fluctuate with the configuration $j \in \mathcal{J}_i$ of oracle $i$ , the variables $b_i^*$ in (9) and $F_P^{(i)}$ in (10) are redefined as $b_{ij}^*$ and $F_P^{(ij)}$ , respectively. + +In the context of the Knapsack Problem formulation (11), each oracle's value now ranges over the set $\{\ln \frac{1 - cF_{N,ij}}{F_{P,ij}} | j \in \mathcal{J}_i\}$ and its weight is recalculated over the set $\{L_{ij} + b_{ij}^* | j \in \mathcal{J}_i\}$ . This reformulation suggests that the problem can be cast as a Grouped Knapsack Problem, a derivative of the classic Knapsack Problem, solvable in pseudo-polynomial time via dynamic programming. In this framework, each oracle is no longer a single object but a group of objects, with each object corresponding to a specific configuration. We aim to select at most one object from each group to maximize the value of the objective function. + +Within the for loop of Algorithm 1, we iterate over each configuration $j$ of oracle $i$ , refining the Knapsack oracle to address the Grouped Knapsack Problem and thus arriving at the optimal solution for the optimization problem. The time complexity of the adapted algorithm is asymptotically $O\big(n_0^2 l / (\delta \Delta)\big)$ , where $l$ denotes the number of configurations accessible per oracle. + +# F.2. Sandwiched Ensemble Learned Bloom Filters + +In sandwiched ELBF, we allocate a BF before each oracle to filter data items before injecting them into the oracle. Suppose we allocate $p_i n$ bits for each pre-filter $i$ , whose FPR is then $\alpha^{p_i}$ , we can compute the overall FPR as follows: + +$$ +\prod_ {i \in \mathcal {O}} \alpha^ {p _ {i}} \left(F _ {P, i} + \left(1 - F _ {P, i}\right) \alpha^ {\left(b _ {i} - p _ {i}\right) / F _ {N, i}}\right) \tag {28} +$$ + +Thus, the sandwiched ELBF can be optimized by solving the following minimization problem. + +$$ +\min _ {\mathcal {A} \subseteq \mathcal {O}} \min _ {\mathbf {b}, \mathbf {p}} \prod_ {i \in \mathcal {A}} \alpha^ {p _ {i}} \left(F _ {P, i} + (1 - F _ {P, i}) \alpha^ {(b _ {i} - p _ {i}) / F _ {N, i}}\right) +$$ + +$$ +\text {s u b j e c t} \quad \sum_ {i \in \mathcal {A}} \left(L _ {i} + b _ {i}\right) \leq T \tag {29} +$$ + +$$ +b _ {i} \geq p _ {i} \geq 0, \forall i \in \mathcal {A}. +$$ + +For each branch $i$ , we compute the derivatives with respect to $p_i$ as below: + +$$ +F _ {P, i} \alpha^ {p _ {i}} \ln \alpha - (1 - F _ {P, i}) \left(\frac {1}{F _ {N , i}} - 1\right) \alpha^ {b _ {i} / F _ {N, i}} \alpha^ {\left(1 - \frac {1}{F _ {N , i}}\right) p _ {i}} \ln \alpha . \tag {30} +$$ + +The above derivative equals 0 when + +$$ +p _ {i} = b _ {i} - F _ {N, i} \log_ {\alpha} \frac {F _ {P , i} F _ {N , i}}{\left(1 - F _ {P , i}\right) \left(1 - F _ {N , i}\right)}, \tag {31} +$$ + +where we require $F_{P,i} + F_{N,i} < 1$ to ensure $b_{i} - p_{i} > 0$ so that the backup BF is not empty. + +Thus, the minimum FPR of branch $i$ can be derived as + +$$ +\left(\frac {F _ {P , i}}{1 - F _ {N , i}}\right) ^ {1 - F _ {N, i}} \left(\frac {1 - F _ {P , i}}{F _ {N , i}}\right) ^ {F _ {N, i}} \alpha^ {b _ {i}} \triangleq \Omega_ {i} \cdot \alpha^ {b _ {i}}. \tag {32} +$$ + +Consider the inner minimization problem for a given $\mathcal{A}$ . We can rewrite the inner minimization problem as below: + +$$ +\min _ {\mathbf {b}} \quad \sum_ {i \in \mathcal {A}} \left(\ln \Omega_ {i} + b _ {i} \ln \alpha\right) +$$ + +$$ +\text {s u b j e c t} \quad \sum_ {i \in \mathcal {A}} \left(L _ {i} + b _ {i}\right) \leq T \tag {33} +$$ + +$$ +b _ {i} \geq F _ {N, i} \log_ {\alpha} \frac {F _ {P , i} F _ {N , i}}{(1 - F _ {P , i}) (1 - F _ {N , i})}, \forall i \in \mathcal {A} +$$ + +$$ +F _ {P, i} + F _ {N, i} < 1, \forall i \in \mathcal {A} +$$ + +By following the same analysis as in Section 3, we can rewrite the outer minimization problem as the following Knapsack problem. + +$$ +\max _ {\mathbf {x}} \sum_ {i \in \mathcal {O}} x _ {i} \cdot \left(\ln \frac {1}{\Omega_ {i}} + L _ {i} \ln \alpha\right) - T \ln \alpha +$$ + +$$ +\text {s u b j e c t} \quad \sum_ {i \in \mathcal {O}} x _ {i} \cdot \left(L _ {i} + F _ {N, i} \log_ {\alpha} \frac {F _ {P , i} F _ {N , i}}{\left(1 - F _ {P , i}\right) \left(1 - F _ {N , i}\right)}\right) \leq T \tag {34} +$$ + +$$ +F _ {P, i} + F _ {N, i} < 1, \forall i \in \mathcal {O} +$$ + +$$ +x _ {i} \in \{0, 1 \}, \forall i \in \mathcal {O} +$$ + +The above problem can be solved by adapting Algorithm 1 after removing oracles with $F_{P,i} + F_{N,i} \geq 1$ . + +# F.3. Ensemble Learned Bloomier Filter + +Bloomier filters (Chazelle et al., 2004) are a variant of BF to solve key-value lookup: each item in $S$ has an associated value; given an queried item $e$ , the corresponding Bloomier filter outputs the value associated with $e$ , or $\bot$ if $e \notin S$ . We now extend our ELBF to the ensemble learned Bloomier filters by taking the following steps. First, each oracle is trained by regression to output a value or $\bot$ once queried by an input item. If all the oracles output the same value, this value is the final output. Second, we replace the each backup BF in ELBFs by a Bloomier filter to resolve the case where the oracles output inconsistent values. It suffices to record all the items with inconsistent oracle outputs with the corresponding values in the backup Bloomier filters. In this way, our ELBF design can be extended to support key-value lookup. + +# G. Additional Experiments + +# G.1. Malicious URLs Detection + +The main technical challenge in malicious URLs detection (MUD) is to quickly check whether a URL belongs to those flagged as malicious with limited memory overhead, to which BFs offer an efficient probabilistic solution. + +In our experiments on the MUD task, we downloaded the dataset from Kaggle, including 1,682,213 URLs, $21.5\%$ of which are malicious, others are benign. 56 numerical features are extracted from these URLs, from which we use 26 features such as URL length, URL unique character ratio, path's length and so on. + +In our experiments, we use the same settings for oracles as in the first task of virus signature scan. The size of the large and small oracles are 268Kb and 30-34Kb, respectively. Each small oracles learns from 2 or 3 features. + +The experiment results are shown in Figure 6. As in task 1, armed with mutually independent oracles, our proposition ELBF outperforms the state-of-the-art solutions traced in the experiments in terms of the FPR and time overhead. For the correlated case, our $\mathrm{ELFF}++$ has the lowest FPR with less time overhead than Ada-BF and PLBF. + +![](images/59f7086cba5909cf7c780afb952e8ee73da271dc7b7ec492aa85bb424971e94f.jpg) +Figure 6. Performance comparison: mutually independent case (left), correlated case (right). + +![](images/aa7e0f48432c53bfc4dab534e8d3f13ba4d47e309fe7f9bfc421158daf326303.jpg) + +![](images/c920e4b81d940e4c76a98886d7d1094cb23d609a32e4a83c2080cb54e716daa2.jpg) + +![](images/8a2c501dad98d446fe4cd1a7d3465a7b33f74d62031118b35c49e551306ab6d5.jpg) + +# G.2. Universally Unique Identifier Check + +In the third task of our experiments, we consider a scenario where the features are independent with each other, by generating 100K Universally Unique Identifiers (UUID). A UUID is a 128-bit number used to uniquely identify an entity. UUIDs are widely used in software systems to avoid maintaining a central naming system. BFs can be used to efficiently check the existence of UUIDs, when dealing with a large volume of identifiers and when a small number of false positives is acceptable. + +In our experiments, we build a synthetic dataset with 20 extracted features such as sum of digits, sum of characters, etc., and include the UUIDs whose number and sum of digits are greater than the overall average into the existence. Again, the setting of learning models we use is same as before. The size of the large and small oracles are $267\mathrm{Kb}$ and $34\mathrm{Kb}$ , respectively. Each small oracle learns from 2 features. + +The experiment results are shown in Figure 7. Again, our proposition ELBF outperforms the state-of-the-art solutions traced in the experiments in terms of the FPR and time overhead, while ELBF++ outperforms the others in terms of the FPR with a smaller time overhead than Ada-BF and PLBF. + +![](images/d0939c827342684eb673c2ce9d51b43cf94bfecf4798b7d34b0d0d986726f7dd.jpg) +Figure 7. Performance comparison: mutually independent case (left), correlated case (right). + +![](images/f31f7e480e2d2f7bdd7d36aec26d5b4c24e3d65226355f8efda352d4501a72d1.jpg) + +![](images/30d0b1f7b2cbb27c2997c2c54e317b6b00b6dacbc5b318fe8dd4f7b71e3fe96a.jpg) + +![](images/64e91e70123dc3b1049f46bf088343a42863fda79af6c31b43b98fc58c6d0c93.jpg) + +# G.3. Time Overhead for Different Sizes of Oracles Pool + +We compare the time overhead given a pool of different number of oracles under the space budget of 2000Kb. Again, by time overhead we mean the time to compute the optimal configuration of the entire data structure including the backup filter size, the oracles to use, etc. The experiment results, depicted in Figure 8, show that the time overhead of ELBF is lower than Ada-BF, PLBF and Fast PLBF++ whenever the size of the pool, while that of ELBF++ is lower than Ada-BF and PLBF. We observe that the time overhead of ELBF++ does not increase significantly, as its heuristic search does not traverse all situations practically. + +# G.4. Aberration Study w.r.t. Algorithm 1 + +Given a set of oracles, Algorithm 1 selects the optimal subset. In this subsection, we take a aberration study that compares Algorithm 1 against simpler approaches: (1) RS: random selection, (2) HA: selecting the oracles with the highest accuracy, (3) SM: selecting the oracles with the smallest memory consumption, and (4) HP: selecting the oracles with the highest product of the ratio of accuracy to memory and a factor $\gamma$ . Without loss of generality, we default $\gamma$ to 1. For each + +compared approach, we optimize the size of backup BF which ensures that each approach fully use the memory budget. The experimental results is shown in Table 2, where we can see that our proposed approach yields the minimal FPR under each budget as expected. + +![](images/d845e65f72a7731ca53e0db2f4c15287a9d4427070bbb4dc4ecbb9ff7f925913.jpg) +Figure 8. Time overhead for different sizes of oracles pool. + +Table 2. FPR comparison with simpler approaches. + +
BudgetRSHASMHPAlgorithm 1
1000Kb0.13160.13260.12510.12480.1053
1500Kb0.07060.06260.06570.06550.0596
2000Kb0.06630.03520.03530.03540.0333
2500Kb0.03050.02600.02580.02610.0251
3000Kb0.02020.01810.01820.01790.0173
\ No newline at end of file diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/images.zip b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..70a528af29833a3bd524730c01833561a287c776 --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1116e8a6347227551d9665b14108fa1cffa6c83b9386784da1e829f3d7974f35 +size 851696 diff --git a/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/layout.json b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..40484ab1b659c06e1121a2bfc0c298ac06635857 --- /dev/null +++ b/ICML/2025/Ensemble Learned Bloom Filters_ Two Oracles are Better than One/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8adf7623cc82324350506dc69e5955ff6d9ea29e8631bb73156194122f68e97d +size 915209 diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_content_list.json b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..46600f8c80a8c0be275ef4c2f6737123331f064e --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84a5aa182ee6317008f5ca013cf40bdf58d5f8fe5d13471f7aed16a010ce9b53 +size 216665 diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_model.json b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..930a777cabe5bab76fc3fd0e702a3a1225898ea5 --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1faa6fd83411b59741a0705769f9dfa25c32179509bb7d04a7e4fe3444a3c710 +size 265355 diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_origin.pdf b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7d18758733b18326b99df0d906f9c3af5f65a6d --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/51033803-82f0-4757-90b2-5a411d3b514b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b325c7d009693f087f3228ee4a1b907ce96c6c2bcf85b83e4c2c9ffce378d50f +size 2608074 diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/full.md b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..292c81d42bb22e0237928db6284d2648906c730f --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/full.md @@ -0,0 +1,1286 @@ +# EpiCoder: Encompassing Diversity and Complexity in Code Generation + +Yaoxiang Wang $^{12*}$ Haoling Li $^{3*}$ Xin Zhang $^{4*}$ Jie Wu $^{3\dagger}$ Xiao Liu $^{4}$ Wenxiang Hu $^{4}$ Zhongxin Guo $^{4}$ Yangyu Huang $^{4}$ Ying Xin $^{4}$ Yujiu Yang $^{3}$ Jinsong Su $^{12}$ Qi Chen $^{4}$ Scarlett Li $^{4}$ + +# Abstract + +Existing methods for code generation use code snippets as seed data, restricting the complexity and diversity of the synthesized data. In this paper, we introduce a novel feature tree-based synthesis framework, which revolves around hierarchical code features derived from high-level abstractions of code. The feature tree is constructed from raw data and refined iteratively to increase the quantity and diversity of the extracted features, which captures and recognizes more complex patterns and relationships within the code. By adjusting the depth and breadth of the sampled subtrees, our framework provides precise control over the complexity of the generated code, enabling functionalities that range from function-level operations to multi-file scenarios. We fine-tuned widely-used base models to obtain EpiCoder series, achieving state-of-the-art performance on multiple benchmarks at both the function and file levels. In particular, empirical evidence indicates that our approach shows significant potential in the synthesizing of repository-level code data. Our code and data are publicly available. $^{1}$ + +# 1. Introduction + +Large Language Models (LLMs) (OpenAI, 2023; Zhang et al., 2022) have demonstrated significant potential in the field of code understanding and generation, particularly + +*Equal contribution †This work is done during their internships at Microsoft 1School of Informatics, Xiamen University 2Key Laboratory of Digital Protection and Intelligent Processing of Intangible Cultural Heritage of Fujian and Taiwan (Xiamen University), Ministry of Culture and Tourism, China 3Tsinghua University 4Microsoft. Correspondence to: Xin Zhang , Yujiu Yang , Jinsong Su . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +$^{1}$ https://github.com/microsoft/EpiCoder and https://github.com/DeepLearnXMU/EpiCoder + +![](images/493c51bf51b6c944dd7512a345a6cf95faf237f4272f19e9d5e35d2454ae9c5c.jpg) +Figure 1: Benchmark performance of EpiCoder-Qwen-7B (fine-tuned on Qwen2.5-Coder-7B-Base) and its counterparts. XFileDep is file-level code generation benchmark, all others are function-level. + +through pre-training on large-scale code data (Sun et al., 2024; Zhu et al., 2024). However, the latent code knowledge in these models is often underutilized without fine-tuning on high-quality instruction data. Instruction tuning has emerged as a critical step in unlocking the full capabilities of code LLMs (Wei et al., 2022), enabling a more precise alignment with user intent and improving the usability of the model in real-world scenarios. + +Despite recent advances, most existing methods for synthesizing high-quality instruction data rely on code snippets as seed data (Chaudhary, 2023; Yu et al., 2023b; Wei et al., 2024b; Muennighoff et al., 2023). While code snippets demonstrate specific functionalities, they fail to capture the full range of programming constructs, patterns, and interactions that are common in real-world programming scenarios. + +Additionally, due to the inherent rigidity of code snippets, it is difficult to rearrange or recombine them to generate new and diverse combinations. These limitations restrict the overall complexity and diversity of the synthesized data, highlighting the critical need for more structured representations as seed data to overcome these constraints and address real-world programming challenges. + +Inspired by Abstract Syntax Tree (AST), we propose a feature tree-based code data synthesis framework that revolves around hierarchical code features derived from high-level abstractions such as variable types function structures, and control flow. While AST captures the syntactic structure of code, our approach extends this idea by organizing features into a tree structure that captures the semantic relationships between code elements. + +Specifically, we extract features from the seed data and use hierarchical clustering to generate a tree structure demonstration, starting from a feature set and proceeding bottom-up. This demonstration serves as a guideline for the LLM to directly extract tree structures from raw code data. To ensure comprehensive coverage of real-world scenarios, we enhance the diversity of features by iteratively expanding the tree structure both in breadth and in depth. Compared to methods that evolve based on individual code snippets or single instructions (Luo et al., 2023), our approach is more efficient and achieves broader coverage, as the tree structure provides clear and organized directions for evolution. The resulting feature tree is a large and hierarchical structure, from which we can sample subtrees to generate code data. Our feature tree-based synthesis method offers two advantages: (1) Controllable Complexity: Our framework allows for adjusting the complexity of synthesized data by modifying the depth and breadth of subtrees. This enables the creation of code ranging from simple function-level tasks to comprehensive, multi-file solutions. (2) Targeted Learning: By adjusting the probability of sampling features, we can prioritize specific knowledge areas that are underrepresented, ensuring a more tailored and effective learning process for the LLMs. + +We conduct extensive experiments to validate our feature tree-based code data synthesis framework, training Qwen2.5-Coder-7B-Base and DeepSeek-Coder-6.7B-Base to derive the EpiCoder series model. Our EpiCoder-Qwen7B trained on 380k function-level and 53k file-level data, respectively. Regarding the five function-level code generation benchmarks, it has achieved state-of-the-art (SOTA) performance on average among models of similar scales. Notably, in the completion tasks of BigCodeBench-Hard, it outperforms Qwen2.5-Coder-7B-Instruct by a margin of $7.4\%$ . Furthermore, on file-level benchmark XFileDep, EpiCoder exhibits superior performance, underscoring its capability to address programming problems of varying com + +plexity. Building on these results, our approach further demonstrates strong potential in synthesizing highly complex repository-level data, as illustrated in Figure 5. To assess data complexity, we incorporated definitions from software engineering principles and employed the LLM-as-a-judge methodology. Moreover, we examined the diversity of datasets from a feature-based perspective to underscore the versatility and robustness of our framework. + +Our contributions are summarized as follows: + +- We propose a feature tree-based code synthesis framework that enables controllable synthesis of diverse and complex instruction data, ranging from function-level to file-level tasks. +- We synthesize 433k instruction data and train EpiCoder. Our EpiCoder-Qwen-7B achieves state-of-the-art performance among comparably sized models in multiple function-level and file-level benchmarks, demonstrating its capability to tackle programming problems of varying complexity. +- By conducting further analysis, we showcase the advantages of our data in terms of complexity and diversity, as well as its potential for synthesizing large-scale repositories. + +# 2. Methodology + +In this section, we present our feature tree-based code generation framework, which consists of three key steps: (1) Feature Tree Extraction (Section 2.1), where we construct the tree demonstration and extract feature trees from seed data; (2) Feature Tree Evolution (Section 2.2), where we iteratively expand the feature tree to enhance diversity and coverage; and (3) Feature Tree-Based Code Generation (Section 2.3), where we use the evolved feature tree to generate diverse code instruction data with varying complexity. An overview of the framework is illustrated in Figure 2. + +# 2.1. Feature Tree Extraction + +Inspired by Abstract Syntax Trees (AST), which represent the syntactic relationships in code, we use the LLM to extract a hierarchical representation that organizes key elements of code into a tree structure to capture more fundamental semantic relationships. + +Raw Code Collection To ensure data diversity and comprehensiveness, we obtain seed data from The Stack v2 (Lozhkov et al., 2024), a publicly available large-scale dataset widely used for pre-training code LLMs. Following (Yu et al., 2023b), we apply the KCenterGreedy algorithm (Sener & Savarese, 2018) to select a core set of + +![](images/90e113986451cb3a2f254e18149fa2bb19ec890439054ecef20dcbd83e314b67.jpg) +Figure 2: Overview of our feature tree-based code generation framework, which consists of three steps: (a) Feature Tree Extraction, where we first extract the feature set to construct the tree structure demonstration and then extract the feature trees; (b) Feature Tree Evolution, where the feature tree is iteratively expanded in depth and breadth; and (c) Feature Tree-Based Code Generation, where the evolved feature tree is used to generate diverse code instruction data. A detailed example of feature evolution and code generation is shown in Appendix A. + +diverse samples based on the code embeddings encoded by roberta-large-v1 (Liu et al., 2019). + +Tree Demonstration Construction To extract features from the seed data, we leverage a powerful large language model (LLM), specifically GPT-4o. Since the initial prompt provided to the LLM can significantly impact its response, we therefore propose an iterative method to optimize the demonstration tree structure within the prompt. As shown in Figure 2 (a), the construction of the demonstration consists of the following two steps: + +1. Feature Pre-Extraction: With a draft version of the prompt, the LLM is used to extract an initial set of features from the seed data, producing a collection of feature keywords. +2. Iterative Demonstration Generation: For each step, we take a subset of the feature set and prompt the + +LLM to perform hierarchical clustering, producing a tree structure that represents the relationships among the features. We iteratively refine the tree structure demonstration by adjusting the clustering of features, ensuring a well-organized hierarchical relationship. + +Feature Tree Extraction Using the refined demonstration of the tree structure, the LLM is tasked with extracting a tree-structured feature representation for each code snippet. These individual feature trees are then merged into a comprehensive structure that unifies the extracted features across all code snippets. During this process, we record the frequency of each node to reflect the distribution of features in the seed data. Since the seed data is derived from the pre-training data, this frequency can serve as an approximate measure of the knowledge distribution within the pre-trained model. + +# 2.2. Feature Tree Evolution + +To overcome the limitations in both diversity and quantity of features in the seed data, we expand the feature tree through + +an evolutionary process. Compared to evolving directly from the seed code or instructions, this approach ensures broader feature coverage and improves efficiency by leveraging the tree's structured representation, which provides clear and systematic directions for evolution. As illustrated in Figure 2 (b), at each iteration, a subtree is sampled from the full feature tree. This subtree is then evolved by the LLM along two dimensions, depth and breadth, by adding finer-grained child nodes to existing nodes as well as sibling nodes at the same hierarchical level. These newly evolved subtrees are then merged back into the overall structure, significantly enriching the feature space and facilitating the generation of more diverse and complex code. An example of the evolution of a single subtree is provided in Appendix A.3. + +One key challenge in feature evolution is to estimate the frequency of newly generated features. Unlike the feature extraction stage, where frequencies are calculated directly, the frequency of an evolved feature is estimated as the average frequency of its siblings. This approach reasonably estimates the frequency of new features according to the existing feature distribution, ensuring that evolved features integrate seamlessly into the broader feature tree. + +# 2.3. Feature Tree-Based Code Generation + +Traditional code generation methods that rely solely on code snippets often produce outputs that closely resemble the original seed data, limiting diversity and complexity. We mitigate this issue by generating code based on feature trees and the process is outlined as follows. + +Distribution Reweighting The previously recorded feature frequencies partially reflect the distribution of natural data, helping to simulate real-world scenarios. However, some high-frequency but easy features, such as config and initialize, do not require strong focus during instruction tuning. To address this issue, we adjust the probability distribution of a node's child features: + +$$ +p _ {i} ^ {\prime} = \frac {\exp (\log p _ {i} / t)}{\sum_ {j \in C} \exp (\log p _ {j} / t)} \tag {1} +$$ + +where $p_i$ represents the normalized original frequency of the child feature $i$ and $p_i'$ is the adjusted probability. As detailed in Algorithm 1, the summation applies to all child features $j$ in the set $C$ , which denotes the set of child nodes for the current parent node. A higher temperature value $t$ leads to a smoother distribution, allowing less dominant features a higher probability of being selected. To further enhance the diversity of the generated data, we employed multiple temperature values during the data synthesis process for a wider range of feature distributions. + +Feature Sampling To generate diverse code instruction data, we sample a subtree of candidate features from the + +# Algorithm 1 Feature Sampling for Task Generation + +1: Input: Current root node $R$ , frequency library $F$ , temperature $t$ , sample size $S$ +2: Output: Selected feature set +3: selected_set $\leftarrow \emptyset$ +4: for $s = 1$ to $S$ do +5: $C\gets \mathrm{get\_children}(R)$ +6: if $C = \emptyset$ then +7: break +8: end if +9: $f_{i}\gets F[i]$ for all $i\in C$ +10: $p_i \gets \frac{f_i}{\sum_{j \in C} f_j}$ for all $i \in C$ +11: Compute $p_i'$ using Equation (1) for all $i \in C$ +12: cur_node $\leftarrow$ sample_node $(C, [p_1', p_2', \ldots])$ +13: selected_set.add(cur_node) +14: end for +15: Return selected_set + +feature tree according to the adjusted probability distribution. The sampling process is guided by a predefined shape of the subtree to sample, where we recursively apply Algorithm 1 to get the subtree. The LLM then uses this sampled subtree to generate code instruction data. By adjusting the depth and breadth of the subtree to sample, we can flexibly create tasks with varying complexity, thereby providing a broad spectrum of coding challenges. + +Content Generation Based on the sampled subtree, the LLM proceeds to select a compatible subset and then generate a task and the corresponding code and execution environment. The solution code can range from a single function to a comprehensive multi-file project, depending on the task's complexity. By supporting multi-file solutions, this approach enables the generation of code that reflects a realistic project structure and effectively captures cross-file information for problems requiring interactions across different components. As illustrated in Figure 6 of Appendix A.1, different files implement distinct functionalities and collectively form an integrated system through their interdependencies. + +Iterative Refinement To improve the quality of the generated data, the solution code is accompanied by relevant test files, which are also generated by the LLM. These tests are executed in an isolated environment, allowing us to identify and filter out incorrect solutions. Through an iterative debugging process, information from the execution results is used to guide the LLM to refine the solution, ensuring the correctness of the generated code. + +# 3. Experiment + +In this section, we introduce the details of the synthetic data (3.1) and evaluate the model's performance in code generation at different levels. Specifically, in Section 3.2, we evaluate the model's ability using five function-level code generation benchmarks. In Section 3.3, we employ our meticulously crafted XFileDep benchmark to evaluate the model's file-level code generation capabilities. We demonstrate the potential ability to generate particularly complex code repositories in Section 3.4. + +# 3.1. Implementation Details + +We utilized our pipeline to extract 5k features from the core set of 150k Python language files in The Stack V2. These features were then expanded through evolutionary methods to 140k features. Then we synthesized 380k function-level data samples and 53k file-level data samples based on the features. We choose DeepSeek-Coder-Base-6.7B (Guo et al., 2024) and Qwen2.5-Coder-7B (Hui et al., 2024) as the base LLMs and obtain the EpiCoder-DS-6.7B and EpiCoder-Qwen-7B models after training. To ensure a fair comparison with other baselines, we incorporated the evol-codealpaca $\nu$ 1 $^3$ (applied the same filtering criteria as described in (Yu et al., 2023b)) dataset into the training of only the DeepSeek-Coder-Base-6.7B model. Additionally, for models trained solely on file-level data, we employed additional notation. We evaluated the models on benchmarks corresponding to their respective training levels. + +# 3.2. Function-level Generation + +Many previous code LLMs have exhibited overfitting to specific benchmarks after fine-tuning, which somewhat constrains their ability to generalize to other benchmarks. To prevent this, we employed five benchmarks for evaluation, with HumanEval (Chen et al., 2021), MBPP (Austin et al., 2021), BigCodeBench (Zhuo et al., 2025), EvoEval (Xia et al., 2024) and FullStackBench (Liu et al., 2024), ensuring that they are generally broad, comprehensive, reliable, and decontaminated. For further clarity, all benchmarks are described in detail in Appendix B.1. + +Table 1 and Figure 3 illustrate the performance of our model in these programming tasks at the function level. Except for the results underlined, which are sourced from their respective papers, all other results are obtained from the EvalPlus-Leaderboard $^4$ and BigCodeBench-Leaderboard $^5$ . Among models of the + +![](images/2fc40ac11b25cd1556e98ccae895750d34aa53ca339338ef5c603c2f4c528f85.jpg) +Overall performance of the LLM on FullStackBench (English, Python). +Figure 3: Model performance across domains of Python in the English Subset of FullStackBench. + +same size, EpiCoder-Qwen-7B achieves the state-of-the-art (SOTA) average performance. The evaluation of the EpiCoder series models on these benchmarks highlights their capability to solve challenge and complex programming problems. Moreover, the results also demonstrate that the feature tree-based code generation method can provide high-quality and diverse synthetic data tailored to function-level programming problems. + +# 3.3. File-level Generation + +![](images/a5060f52e5f4381c2bf10ccc1967e8711814a2f221fb86b4bdcd710e61ded481.jpg) +Figure 4: Pass@1 $(\%)$ results of different LLMs on XFileDep computed with greedy decoding. + +XFileDep Benchmark Many existing code benchmarks focus on function-level code generation and lack evaluations of file-level generation capabilities. To address this limitation, we have developed a Cross-File Dependency Benchmark (XFileDep) specifically designed to assess the file-level code generation capabilities of LLMs while considering cross-file dependencies. XFileDep provides a comprehensive framework by treating multiple interdependent code files as context and testing the model's ability to generate missing files. This benchmark not only measures the model's ability to generate isolated files, but also evaluates + +Table 1: Pass@1 (%) results of different LLMs on HumanEval (+), MBPP (+) and BigCodeBench computed with greedy decoding. We conducted the evaluation on the Full and Hard subsets of BigCodeBench (BCB), including the Complete (Comp.) and Instruct (Ins.) tasks. + +
ModelBaseHumanEvalMBPPBCB-FullBCB-HardEvoEvalAverage
BasePlusBasePlusComp.Ins.Comp.Ins.
Closed-source Model
GPT-4-Turbo (April 2024)-90.286.685.773.358.248.235.129.161.463.1
Claude-3.5-Sonnet (June 2024)-87.281.789.474.358.646.833.125.7--
7B+ Scale
Qwen2.5-Coder-32B-Instruct-92.187.290.577.058.049.033.827.767.664.8
OpenCoder-8B-Instruct-81.777.482.071.450.943.218.918.249.254.8
DeepSeek-Coder-33B-instruct-81.175.080.470.151.142.020.917.651.654.4
Codestral-22B-v0.1-79.973.872.561.952.541.824.316.957.253.4
~7B Scale
DSCoder-6.7B-Base-47.639.672.058.741.8-13.5-30.4-
DeepSeekCoder-6.7b-Instruct74.471.374.965.643.835.515.510.141.448.1
Magicoder-S-DS76.871.379.469.047.636.212.813.544.650.1
WaveCoder-Ultra-6.7B75.069.574.963.543.733.916.912.842.048.0
OpenCodeInterpreter-DS-6.7B77.472.076.566.444.637.116.913.544.249.8
EpiCoder-DS-6.7B80.576.881.568.350.637.919.612.850.053.1
Qwen2.5-Coder-7B-Base-61.653.076.962.945.8-16.2-35.6-
Qwen2.5-Coder-7B-Instruct88.484.183.571.748.840.420.320.955.257.0
EpiCoder-Qwen-7B89.082.384.171.451.943.827.722.358.859.0
+ +its proficiency in understanding and managing cross-file dependencies. The detailed process for constructing the benchmark is described in Appendix B.2. + +Evaluation Details The XFFileDep benchmark comprises a total of 466 problems. For all problems, we employed pass@1 as the evaluation metric, as we believe that only code passing all test cases can be considered to be functioning correctly. To ensure stable evaluation, we used docker to standardize the running environment for all problems. During the testing of different models, we consistently applied their default prompts and greedy decoding, with a maximum token length of 8192. All open-source models were accelerated using vLLM (Kwon et al., 2023). Figure 4 shows the results of different LLMs on this benchmark. The experimental results indicate that the EpiCoder, which have been specifically trained on a dataset consisting of over 53k multi-file code samples, significantly outperform the baseline models. This demonstrates the EpiCoder's exceptional capability in generating file-level code while simultaneously considering cross-file dependencies. Furthermore, it validates our approach's advantage in synthesizing multi-file code data of higher complexity. + +# 3.4. Potential Repo-level Generation + +Our approach benefits from a hierarchical structure of the feature tree, enabling the synthesis of instructions and corresponding outputs of varying complexities. We further + +explore its limit by attempting to synthesize much more complex real-world code repository data than the file-level data that contains only several files. Specifically, utilizing a feature tree extracted from the popular open-source GitHub repository LLaMA-Factory $^6$ , we successfully generate a repository mirroring the structure with over 50 files. The example files within this repository demonstrate the feasibility and scalability of our approach, as illustrated in Figure 5. This example highlights the potential of feature-based code generation to produce complex and structured repositories, offering a promising direction for future research in repository-level code synthesis. + +# 4. Further Analysis + +In this section, we first analyze the complexity of the generated code (Section 4.1), and then we evaluate the diversity of the code based on feature analysis (Section 4.2). Additionally, we investigate the scaling effect of code instruction data and assess potential data leakage issues, which are detailed in Appendix C. + +# 4.1. Complexity Evaluation + +We emphasize that our ability to generate more complex code data stems from its hierarchical feature tree structure. By flexibly adjusting the depth and width of the feature tree, + +![](images/290e86f2ae2dde66b52e1234a1e4e433014d1215bc00c0a507ad7c90a23ce7ca.jpg) +Figure 5: An example of our repo-level code generation. The left part shows the original LLaMA-Factory repository structure, the middle part presents the structure of LLMTune, which we generated based on the extracted feature tree, and the right part illustrates an example file from the generated repository. + +![](images/1fca1f3737579b5f359b0a375a236fa2d747cf0fa1c43f61cddc0041d8a6dc2f.jpg) + +![](images/3ab445aaa6de2dd4dc00afebb9ea6ba0b1eed763bb569dd1cb795b6debf241d3.jpg) + +we can dynamically control the complexity of the synthetic data, ensuring adaptability to diverse requirements. Code complexity is evaluated through two approaches: 1) using various software engineering principles; 2) leveraging an external LLM judge to evaluate from multiple perspectives. + +# 4.1.1. USING SOFTWARE ENGINEERING PRINCIPLES + +We first adopt software engineering principles to compare the complexity of our generated code (at both the function and file levels) with existing code datasets. This comparison is based on three well-established software engineering metrics: Halstead Complexity (Halstead, 1977), Strictness Complexity (Ray et al., 2016), and Cyclomatic Complexity (McCabe, 1976). Halstead measures logical complexity via operands and operators, Strictness evaluates execution path strictness, and Cyclomatic quantifies control flow complexity through branching analysis. + +Table 2 compares Halstead complexity, with detailed results in Appendix C.3.1. Our function-level data outperforms the runner-up by 2.55 and 20.99 for unique operators and operands, and by 56.98 and 100.36 for total counts, nearly doubling the baseline. File-level results further amplify this trend, significantly exceeding function-level metrics. + +Similarly, Table 12 in Appendix C.3.1 demonstrates that our dataset exhibits greater strictness and cyclomatic complexity at both the function and file levels. These analyses collectively demonstrate that feature tree-based code synthesis can create code that is both more complex and more sophisticated than existing methods. + +# 4.1.2. EVALUATING CODE COMPLEXITY USING LLMS + +We evaluate complexity using GPT-4o as a judge, comparing to existing codebases across four dimensions: Error Handling, Modularity, Data Structure Complexity, and Third + +Table 2: Comparison of Halstead complexity between ours and existing codebase. UO: Unique Operators, UP: Unique Operands, TO: Total Operators, TP: Total Operands + +
DatasetUOUPTOTP
Code Alpaca4.838.2210.6615.89
CodeFeedBack8.1120.4230.9850.05
Evol CodeAlpaca7.9418.9729.9146.70
OSS Instruct7.4420.9928.0547.55
Ours (func-level)10.6644.3256.98100.36
Ours (file-level)11.6472.87100.24179.98
+ +Table 3: Distribution of unique features across different datasets. + +
DatasetsWorkflowImplementation StyleFunctionalityResource UsageComputation OperationSecurityUser InteractionData Processing
Code Alpaca99463937282882221
CodeFeedback207965351868948143895
Evol CodeAlpaca21631159121783601341401
OSS-Instruct225456693941349192903
Ours (func-level)24226657378191563632533
Ours (file-level)247511812435361038002196
DatasetsFile OperationError HandlingLoggingDependency RelationsAlgorithmData StructuresImplementation LogicAdvanced TechniquesAvg.
Code Alpaca11541432327267102.48
CodeFeedback392291012142710049635.45
Evol CodeAlpaca552121522641413074946.38
OSS-Instruct1022116223815014082265.54
Ours (func-level)20335796305316116401008.53
Ours (file-level)387311218447293140691108.95
+ +Party Dependencies (criteria in Appendix C.3.2). Table 4 summarizes the average scores of 5k samples, consistently showing significant improvements. Our function-level code improves by $32.6\%$ over OSS-Instruct, while file-level performance surpasses it by $52.5\%$ , demonstrating our ability to synthesize more complex code. + +Table 4: Comparison of complexity. EH: Error Handling, MD: Modularity, DP: Dependency, DS: Data Structure. + +
DatasetEHMDDPDSAvg.
Code Alpaca2.042.102.092.382.15
CodeFeedBack2.713.472.233.753.04
Evol CodeAlpaca2.533.322.663.583.02
OSS Instruct2.743.792.783.923.31
Ours (func-level)4.114.713.834.904.39
Ours (file-level)4.235.944.625.415.05
+ +# 4.2. Diversity Evaluation + +To assess the feature diversity, we sample 1k instances from ours, CodeFeedback, and other relevant datasets for comparison. Features are extracted using GPT-4o (with the prompt provided in Appendix C.4.1), and the number of unique features in each dataset is reported. + +Table 3 shows that our dataset surpasses others in feature diversity, achieving an average of 8.53 unique features at the function level and 8.95 at the file level, outperforming the nearest competitor by 2.15 and 2.57, respectively. + +Our function-level data significantly improves in areas like data processing, error handling, dependency relations, and user interaction, all 2-3 times higher than in existing codebases. Additionally, our data also surpasses existing codebases in total feature count, as detailed in Appendix C.4.2. + +# 4.3. Comparison under Comparable Data Size + +To further investigate the impact of data size and data quality on model performance, we conducted two additional experiments comparing EpiCoder with existing baselines under similar data size conditions. + +Comparison with Magicoder and WaveCoder. We sampled 75k function-level data from EpiCoder's full dataset and fine-tuned the DeepSeek-Coder-Base-6.7B model, referred to as EpiCoder-DS-6.7B-Sample75k. We then compared it with Magicoder-DS (75k) and WaveCoder-Ultra-6.7B (130k). As shown in Table 5, despite using the same or fewer data samples, EpiCoder-DS-6.7B-Sample75k achieves higher average performance, demonstrating a $5.4\%$ and $3.0\%$ improvement over Magicoder-DS and WaveCoder-Ultra-6.7B, respectively. + +Comparison with SelfCodeAlign. Following the setting in (Wei et al., 2024a), we fine-tuned CodeQwen-7B using a 74k subset of EpiCoder function-level data, denoted as EpiCoder-CodeQwen-7B-Sample74k. The performance is compared against SelfCodeAlign-CQ-7B (74k) in Table 6. EpiCoder-CodeQwen-7B-Sample74k achieves a $4\%$ higher average score, indicating that the evolutionary data enhancement strategy effectively improves data quality and model generalization. + +# 5. Related Work + +# 5.1. Code LLMs + +Following the success of general LLMs (Brown et al., 2020; Chowdhery et al., 2023), models like CodeX (Chen et al., 2021) have catalyzed a new surge of research in code intelligence (Sun et al., 2024). The applications of code intelligence have gradually encompass broader real-world scenarios (Wang et al., 2023b; Zhu et al., 2024; Shao et al., 2025). Li et al. (2024) explore the use of LLMs for rewriting + +Table 5: Comparison of EpiCoder-DS-6.7B-Sample75k with Magicoder-DS (75k) and WaveCoder-Ultra-6.7B (130k) on function-level benchmarks. All values are Pass@1 (\%). + +
ModelData SizeHumanEvalMBPPBCB-FullBCB-HardEvoEvalAverage
BasePlusBasePlusComp.Ins.Comp.Ins.
Magicoder-DS75k66.560.475.461.946.834.813.511.541.245.8
WaveCoder-Ultra-6.7B130k75.069.574.963.543.733.916.912.843.648.2
EpiCoder-DS-6.7B-75k75k78.073.279.468.848.235.618.412.846.251.2
+ +Table 6: Comparison of EpiCoder-CodeQwen-7B-Sample74k with SelfCodeAlign-CQ-7B (74k) on function-level benchmarks. All values represent Pass@1 (\%). + +
ModelData SizeEvoEvalMBPP+HumanEval+Average
SelfCodeAlign-CQ-7B74k43.665.267.158.6
EpiCoder-CodeQwen-74k74k47.467.273.262.6
+ +code to enhance code search performance, while Koziolek et al. (2024) propose a retrieval-augmented method for controlled code generation. Currently, code LLMs are typically developed through continual pre-training (Roziere et al., 2023) and supervised fine-tuning (Yu et al., 2023b) based on general LLMs. Given that general LLMs have already extensively utilized real-world data during their pre-training phases, the construction of data for post-training stages remains a critical issue that requires urgent attention (Ding et al., 2024). + +# 5.2. Data Synthesis for Code + +Current research indicates that using LLMs to generate synthetic instruction pairs is an effective strategy to address the scarcity of instruction data (Wang et al., 2023a; Yu et al., 2023a). WizardCoder (Luo et al., 2023) employs the EvolInstruct method to synthesize more complex and diverse instructional data. Similarly, Magicoder (Wei et al., 2024b) utilizes code snippets to guide LLMs in generating high-quality programming problems and solutions. WaveCoder (Yu et al., 2023b) proposed a generator-discriminator framework based on LLMs to produce diverse and high-quality instruction data. OpenCodeInterpreter (Zheng et al., 2024) constructs datasets through interactions of users, LLMs, and compilers, aiming to meet specific criteria such as diversity, challenge, and multi-turn dialogue structure. Genetic-Instruct (Majumdar et al., 2024) simulates the evolutionary processes of natural selection and genetic algorithms, employing crossover and mutation operations to generate new instructional samples. SelfCodeAlign (Wei et al., 2024a) extracts code concepts to generate new data. These methods collectively demonstrate the efficacy of leveraging LLMs to synthesize instruction data, significantly enhancing the coding capabilities of language models. + +# 6. Conclusion + +In this work, we introduce a feature tree-based synthesis framework for generating diverse and complex code instruction data. Inspired by Abstract Syntax Trees (AST), our approach constructs hierarchical feature trees to capture semantic relationships within code, enabling scalable synthesis of instruction data with controllable complexity. The experimental results demonstrate that our synthesized data excels in both diversity and complexity, and the trained EpiCoder achieves outstanding performance in tasks of varying complexity, from function-level to file-level benchmarks. Moreover, our approach shows strong potential for scaling to repository-level code synthesis and advancing the usability of code LLMs in complex programming environments. + +# Acknowledgment + +Yaoxiang Wang and Jinsong Su are supported by National Natural Science Foundation of China (No. 62036004 and No. 62276219), Natural Science Foundation of Fujian Province of China (No. 2024J011001), and the Public Technology Service Platform Project of Xiamen (No.3502Z20231043). Haoling Li, Jie Wu and Yujiu Yang are supported by the Shenzhen Science and Technology Program (JCYJ20220818101001004) and the research grant No. CT20240905126002 of the Doubao Large Model Fund. We also thank the reviewers for their insightful comments. + +# Impact Statement + +In this work, we propose a feature tree-based code synthesis framework that enables the generation of diverse and complex code instruction data. Our approach improves the performance of code LLMs across tasks of varying complexity, enhancing their applicability in real-world programming scenarios. This, in turn, has the potential to significantly + +improve the efficiency of professionals working in software development and related fields. + +# References + +Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. +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. +Chaudhary, S. Code alpaca: An instruction-following llama model for code generation. https://github.com/sahil280114/codealpaca, 2023. +Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. +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. +Ding, B., Qin, C., Zhao, R., Luo, T., Li, X., Chen, G., Xia, W., Hu, J., Luu, A. T., and Joty, S. Data augmentation using LLMs: Data perspectives, learning paradigms and challenges. In Findings of the Association for Computational Linguistics: ACL 2024, pp. 1679-1705, August 2024. +Guo, D., Zhu, Q., Yang, D., Xie, Z., Dong, K., Zhang, W., Chen, G., Bi, X., Wu, Y., Li, Y., et al. Deepseek-coder: When the large language model meets programming-the rise of code intelligence. arXiv preprint arXiv:2401.14196, 2024. +Halstead, M. H. Elements of Software Science (Operating and programming systems series). Elsevier Science Inc., USA, 1977. ISBN 0444002057. +Hui, B., Yang, J., Cui, Z., Yang, J., Liu, D., Zhang, L., Liu, T., Zhang, J., Yu, B., Lu, K., et al. Qwen2.5-coder technical report. arXiv preprint arXiv:2409.12186, 2024. +Koziolek, H., Grüner, S., Hark, R., Ashiwal, V., Linsbauer, S., and Eskandani, N. Llm-based and retrieval-augmented control code generation. In Proceedings of the 1st International Workshop on Large Language Models for Code, pp. 22-29, 2024. + +Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., and Stoica, I. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023. +Li, H., Zhou, X., and Shen, Z. Rewriting the code: A simple method for large language model augmented code search. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1371-1389, 2024. +Liu, J., Xia, C. S., Wang, Y., and Zhang, L. Is your code generated by chatGPT really correct? rigorous evaluation of large language models for code generation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. +Liu, S., Zhu, H., Liu, J., Xin, S., Li, A., Long, R., Chen, L., Yang, J., Xia, J., Peng, Z., et al. Fullstack bench: Evaluating llms as full stack coder. arXiv preprint arXiv:2412.00535, 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. +Lozhkov, A., Li, R., Allal, L. B., Cassano, F., Lamy-Poirier, J., Tazi, N., Tang, A., Pykhtar, D., Liu, J., Wei, Y., et al. Starcoder 2 and the stack v2: The next generation. arXiv preprint arXiv:2402.19173, 2024. +Luo, Z., Xu, C., Zhao, P., Sun, Q., Geng, X., Hu, W., Tao, C., Ma, J., Lin, Q., and Jiang, D. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568, 2023. +Majumdar, S., Noroozi, V., Narethiran, S., Ficek, A., Balam, J., and Ginsburg, B. Genetic instruct: Scaling up synthetic generation of coding instructions for large language models. arXiv preprint arXiv:2407.21077, 2024. +McCabe, T. J. A complexity measure. In Proceedings of the 2nd International Conference on Software Engineering, ICSE '76, pp. 407, Washington, DC, USA, 1976. IEEE Computer Society Press. +Muennighoff, N., Liu, Q., Zebaze, A., Zheng, Q., Hui, B., Zhuo, T. Y., Singh, S., Tang, X., Von Werra, L., and Longpre, S. Octopack: Instruction tuning code large language models. In NeurIPS 2023 Workshop on Instruction Tuning and Instruction Following, 2023. +OpenAI. GPT-4 Technical Report. arXiv e-prints, 2023. +Ray, B., Hellendoorn, V., Godhane, S., Tu, Z., Bacchelli, A., and Devanbu, P. On the "naturalness" of buggy code. + +In Proceedings of the 38th International Conference on Software Engineering, ICSE '16, pp. 428-439, New York, NY, USA, 2016. Association for Computing Machinery. ISBN 9781450339001. +Roziere, B., Gehring, J., Gloeckle, F., Sootla, S., Gat, I., Tan, X. E., Adi, Y., Liu, J., Remez, T., Rapin, J., et al. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950, 2023. +Sener, O. and Savarese, S. Active learning for convolutional neural networks: A core-set approach. In International Conference on Learning Representations (ICLR), 2018. +Shao, L., Yan, Y., Poshyvanyk, D., and Su, J. Unigencoder: Merging seq2seq and seq2tree paradigms for unified code generation. arXiv preprint arXiv:2502.12490, 2025. +Sun, Q., Chen, Z., Xu, F., Cheng, K., Ma, C., Yin, Z., Wang, J., Han, C., Zhu, R., Yuan, S., et al. A survey of neural code intelligence: Paradigms, advances and beyond. arXiv preprint arXiv:2403.14734, 2024. +Wang, Y., Kordi, Y., Mishra, S., Liu, A., Smith, N. A., Khashabi, D., and Hajishirzi, H. Self-instruct: Aligning language models with self-generated instructions. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 13484-13508, 2023a. +Wang, Z., He, X., Chen, K., Lin, C., and Su, J. Code-aware cross-program transfer hyperparameter optimization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 10297-10305, 2023b. +Wei, J., Bosma, M., Zhao, V., Guu, K., Yu, A. W., Lester, B., Du, N., Dai, A. M., and Le, Q. V. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2022. +Wei, Y., Cassano, F., Liu, J., Ding, Y., Jain, N., Mueller, Z., de Vries, H., von Werra, L., Guha, A., and Zhang, L. Selfcodealign: Self-alignment for code generation. In Advances in Neural Information Processing Systems, volume 37, pp. 62787-62874. Curran Associates, Inc., 2024a. +Wei, Y., Wang, Z., Liu, J., Ding, Y., and Zhang, L. Magic coder: Empowering code generation with oss-instruct. In *Forty-first International Conference on Machine Learning*, 2024b. +Xia, C. S., Deng, Y., and ZHANG, L. Top leaderboard ranking = top coding proficiency, always? evoeval: Evolving coding benchmarks via LLM. In First Conference on Language Modeling, 2024. + +Yu, L., Jiang, W., Shi, H., Yu, J., Liu, Z., Zhang, Y., Kwok, J. T., Li, Z., Weller, A., and Liu, W. Metamath: Bootstrap your own mathematical questions for large language models. arXiv preprint arXiv:2309.12284, 2023a. +Yu, Z., Zhang, X., Shang, N., Huang, Y., Xu, C., Zhao, Y., Hu, W., and Yin, Q. Wavecoder: Widespread and versatile enhanced instruction tuning with refined data generation. arXiv preprint arXiv:2312.14187, 2023b. +Zhang, S., Roller, S., Goyal, N., and Artetxe. OPT: Open Pre-trained Transformer Language Models. arXiv eprints, 2022. +Zheng, T., Zhang, G., Shen, T., Liu, X., Lin, B. Y., Fu, J., Chen, W., and Yue, X. Opencodeinterpreter: Integrating code generation with execution and refinement. In Findings of the Association for Computational Linguistics: ACL 2024, 2024. +Zhu, Q., Guo, D., Shao, Z., Yang, D., Wang, P., Xu, R., Wu, Y., Li, Y., Gao, H., Ma, S., et al. Deepseek-coderv2: Breaking the barrier of closed-source models in code intelligence. arXiv preprint arXiv:2406.11931, 2024. +Zhuo, T. Y., Chien, V. M., Chim, J., Hu, H., Yu, W., Widyasari, R., Yusuf, I. N. B., Zhan, H., He, J., Paul, I., Brunner, S., GONG, C., Hoang, J., Zebaze, A. R., Hong, X., Li, W.-D., Kaddour, J., Xu, M., Zhang, Z., Yadav, P., Jain, N., Gu, A., Cheng, Z., Liu, J., Liu, Q., Wang, Z., Lo, D., Hui, B., Muennighoff, N., Fried, D., Du, X., de Vries, H., and Werra, L. V. Bigcodebench: Benchmarking code generation with diverse function calls and complex instructions. In The Thirteenth International Conference on Learning Representations, 2025. + +# A. Appendix of Data Synthesis Framework + +In this section, we first present an example of a file-level code synthesized by our framework (Section A.1). Then, we provide detailed implementations for several key components of the framework, including Feature Tree Extraction (Section A.2), Feature Tree Evolution (Section A.3), Task Generation (Section A.4), and Code Generation (Section A.5). + +# A.1. Case of generated File-level Code + +This is an example of the file-level code we generated. + +![](images/8c5e55bc2507b7abf2bae390f35689309930a46de87f01bce7883603eb1da3fa.jpg) +Figure 6: An illustrative example of file-level code generation (including the corresponding test code file). Different files contain distinct functional modules, with complex dependencies existing across multiple files. + +# A.2. Feature Tree Extraction + +Here are our draft prompts for pre-extraction and the refined prompts for feature tree extraction. For brevity, only a portion is shown here. The complete prompts can be found in our released code. + +# Draft Prompts for Pre-extraction + +Extract high-level information from a code snippet using keywords separated by "#". For example: + +1. Function Description: Describe the main functionality of the code. Use keywords such as list sorting ## input parsing ## data storage ## image processing. + +2. Algorithm Details: Describe the specific algorithm used and its characteristics. Use keywords such as dynamic programming, greedy algorithm, divide and conquer backtracking graph traversal. + +3. + +Please use this code as input and extract as much of the specified information as possible based on the content of the code. + +Input: {source_code} + +Output: + +Algorithm 2 Feature Evolution with Frequency Estimation +1: Input: Feature tree $T$ , frequency library $F$ containing the frequency of each node in $T$ , maximum steps $\mathbf{N}$ +2: Output: Updated frequency library $F$ +3: for step = 1 to $\mathbf{N}$ do +4: $t \gets$ sample(T) {Sample a subtree $t$ from $T$ } +5: expanded_t $\leftarrow$ LLM evolves(t) {Evolve $t$ along depth and breadth} +6: for each node $\in$ expanded_t $\backslash t$ do +7: $S \gets$ find_siblings(node, expanded_t) {Find siblings of node in expanded_t} +8: if $S = \emptyset$ then +9: $S \gets$ find_siblings(node, T) {If no siblings in expanded_t, find siblings in $T$ } +10: end if +11: if $S = \emptyset$ then +12: $F(node) \gets 1$ {Still no siblings found} +13: else +14: $F(node) \gets \frac{1}{|S|} \sum_{s \in S} F(s)$ {Update frequency} +15: end if +16: end for +17: end for + +# Part of Refined Prompts for Feature Tree Extraction + +Extract features from the provided code snippets, following the requirements for each category below, formatted in JSON structure. + +Categories to extract: + +1. Programming Language: Note the specific programming language used. Example: ["Python", "Java"]. +2. Workflow: Outline the main steps and operations the code performs. Example: ["data loading", "preprocessing", "model training", "evaluation", "results saving"]. +3. Implementation Style: What programming paradigm the code follows. Example: ["procedural", "object-oriented", "functional"]. +4. Functionality: Explain the function of the code. Example: ["data processing", "user interaction", "system control"]. +5. Resource Usage: Analyze how the code utilizes system resources. Example: ["CPU Cycles", "GPU ComputeOperations", "Network Bandwidth"]. +6. Data Processing: Describe how the data is processed. This category can include the following subcategories: + +- 6.1 Data Preparation: Steps taken to prepare data for further processing. Example: ["validate units", "strip whitespace"]. +- 6.2 Data Retrieval: Methods for obtaining data. Example: ["fetching records", "retrieve top-level items"]. +- 6.3 Data Transformation: Describe data transformation operations. Example: ["convert to numpy array", "jsonschema"]. +- Other relevant subcategories... + +7. Computation Operation: What computation operations are used. This category can include the following subcategories: + +- 7.1 Mathematical Operation: Specify mathematical computations, such as calculations involving statistics or algebra. Example: ["standard deviation calculation", "compute power flow"]. +- 7.2 Algorithmic Operation: Identify algorithm-based operations, such as those in optimization or data sorting. Example: ["simulated annealing", "Best-Fit Decreasing"]. +- Other relevant subcategories... + +8. More content is omitted here: The demonstration tree for extracting additional categories has been truncated for brevity. For the full list of categories and detailed instructions, please refer to our code. + +Input: {source_code} + +Output: + +# A.3. Feature Tree Evolution + +Figure 7 presents an example of the feature evolution. In the experiment, after 9000 steps of evolution, the number of features increased from 5000 to 1,40,000. The estimated frequencies of evolved features are calculated as Algorithm 2. + +![](images/d1cedbffef03e6c3f906f6e6d2bcfb8afa9321de92dcf1aaec7a0c057f5f3b75.jpg) +Figure 7: An example of feature evolution. + +# Prompts for Feature Evolution + +Feature Tree Evolution Task: You are provided with a feature tree represented as a nested JSON structure. Each node in this tree represents a feature or a sub-feature of a software system, with the leaves being the most specific features. Your task is to expand this feature tree both in depth and breadth. + +Depth expansion means adding more specific sub-features to existing leaves. Breadth expansion means adding more sibling features at the current levels. + +Here are some explanations of the features: {explanations} + +The input feature tree will be provided in JSON format, and your output should be a JSON structure that represents the expanded feature tree. + +# Output Format: + +- Expanded Feature Tree: Provide the expanded feature tree as a JSON structure. + +{example} + +# Constraints: + +1. For breadth expansion, add at least 2 new sibling features to each existing node. + +2. For deep expansion, add new sub-features to any leaf node that could have a more fine-grained feature. + +3. Focus on generating new and innovative features that are not present in the provided examples. + +Please follow the above constraints and expand the feature tree accordingly. + +Input: {feature_tree} + +Output: expanded feature tree + +# A.4. Task Generation + +To ensure that the language model (LLM) does not consistently default to familiar or common content, we introduced a strategy to guide the selection of features. From the sampled optional features, certain features are designated as mandatory, and the LLM is directed to incorporate them into the scenario and task. Below is an example of how this approach is applied. + +# Prompts for Task Generation + +You are provided with a set of features/keywords, and a specific programming language. Your task is to use these inputs to conceive a specific real-world application scenario that effectively integrates some of these features. Then, based on the scenario, formulate a task or problem that needs to be addressed with code. + +# Procedures: + +1. Receive Inputs: These can range from technical specifics like data processing to broader concepts like system interaction. +2. Select Features: Choose a combination of features from the provided set that can be realistically integrated into a cohesive scenario. +3. Conceive a Scenario: Think of a practical application where the selected features play a critical role. +4. Formulate a Task Description: Based on the scenario, formulate a task that needs to be addressed with code. The task should have a certain level of difficulty and test the programmer's coding skills through logical reasoning. Specific details, such as numerical values or environmental conditions, should be included to create a well-defined setting for the task, ensuring the programmer doesn't need to guess any missing information. The task description should not include any code or detailed guidance on code implementation. +5. Generate an Instruction: Generate a high-level instruction one or two sentence that describes the overall goal or problem to be solved, without diving into the specific implementation details. + +Enclose the selected features with $\langle f \rangle$ and $\langle /f \rangle$ . Enclose the scenario with $\langle s \rangle$ and $\langle /s \rangle$ . Enclose the task with $\langle t \rangle$ and $\langle /t \rangle$ . Enclose the instruction with $\langle i \rangle$ and $\langle /i \rangle$ . + +# Inputs: + +- Optional Features: {optional_features} +- Mandatory Features: {mandatory_features} + +# Output: + +- Features: your answer +- Scenario: $< \mathrm{s}>$ your answer +- Task Description: your answer +- Instruction: your answer + +# Optional Features: + +```json +{ + "dependency relations": { + "time": { + "time zones handling": [] + }, + "cv2": { + "cvtColor": [] + } + }, + "file operation": { + "read configuration file": [ + "read YAML configuration file", + ] + , + "write data to file": [ + "write to CSV file" + ] + } +} +``` + +```txt +] }, "workflow": { "data augmentation": [ "audio augmentation" ], "validation": [ "check data integrity" ] }, "programming language": "Python" } +``` + +# Mandatory Features: + +```json +["read YAML configuration file"] +``` + +# Selected Features: + +```txt +[read YAML configuration file, write to CSV file, check data integrity"] +``` + +Scenario: A company wants to automate the generation of a daily status report for its distributed servers. The configuration for each server (such as IP address, location, and operational status) is stored in a YAML file. The system needs to read this configuration file, validate the data to ensure there are no missing or malformed entries, and then write the validated data to a CSV file that can be used for further analysis. + +Task: Create a function in Python that reads server configuration data from a YAML file, validates the integrity of the data (checking for missing or malformed entries), and writes the validated data to a CSV file. The YAML file will contain a list of servers with their respective details such as IP address, location, and operational status. The function should ensure that all required fields are present and correctly formatted before writing the data to the CSV file. The CSV file should have columns for each server detail and only include entries that have passed validation. + +Instruction: Develop a Python function that reads, validates, and exports server config data from a YAML to a CSV file. + +# A.5. Code Generation + +To demonstrate the process of generating code based on the previously outlined task, we present the prompts used, the generated code, its test cases, and the debugging process leading to the final implementation. + +# A.5.1. PROMPT FOR CODE GENERATION + +The prompt provided specifies a detailed structure for code generation, including the expected outputs and format. + +# Code Generation Prompt + +Now that you are a code expert, I have provided you with the QUESTION. Complete the problem with awesome code logic and give a richly commented analysis in the code of your answer. Include the necessary packages and test cases. + +# - QUESTION + +{task} + +- Full code implementation with test cases + +Enclose the python code with ```python` and ```` and enclose the file name with `` and ``. For example: + +add.py + +python + +add.py + +Code implementation here + +def add(x, y): + +return x + y + +The test code should be in a single file. + +test.py + +Note that the following code will be executed directly, so only the test cases that can be executed directly need to be retained. You only need to test some simple functions in the code. Tests that depend on external files cannot be executed because these files do not exist. + +``` +``` +python + +from add import add + +def test(): + +assert add(3, 5) == 8 + +assert add(4, 6) == 10 + +test() + +·· + +- File names in order and packages required + +Answer file names and packages in JSON format, wrapped in and tags. For example: + + + +{ + +"file_names": ["add.py", "test.py"], + +"packages": ["package1", "package2"] + +} + + + +# A.5.2. INITIAL CODE IMPLEMENTATION + +server_config.py + +import yaml + +import csv + +import re + +def validate_ip(ip): + +""Validate the IP address format"" + +pattern = re.compile(r"^[?::[0-9][1,3]\.]{3}[0-9][1,3]$") + +return pattern.match(ip) is not None + +def validate(server_data(server): + +""Validate the server data"" + +required_fields = ['ip_address', 'location', 'operational_status'] + +Check for missing fields + +for field in required_fields: + +if field not in server: + +return False + +Validate IP address format + +if not validate_ip(server['ip_address]): + +File 1: server_config.py +```python +return False +# Check operational status (assuming it should be a string, non-empty) +if not isinstance(server['operational_status'], str) or not server['operational_status'].strip(): +return False +return True +def read_and Validate_yaml(yaml_file): + '''Read and validate the YAML file'''' +with open(yaml_file, 'r') as file: + try: + data =yaml.safe_load(file) + if not isinstance(data, list): + raise ValueError("YAML file format is incorrect, expected a list of servers.") + valid_servers = [server for server in data if validate_server_data(server)] + return valid_servers + except YAML_Error as exc: + print(f"Error in YAML file: {exc}") + return [] +except ValueError as ve: + print(f"Validation error: {ve}") + return [] +def export_to_csv(servers, csv_file): + '''Export validated server data to CSV'''' +if not servers: + print("No valid server data to export.") +return +keys = servers[0].keys() +with open(csv_file, 'w', newline='') as file: + writer = csv.DictWriter(file, fieldnames=keys) + writer.writerow() + writer.writerow(servers) +def process_server_config(yaml_file, csv_file): + '''Main function to process server configuration from YAML to CSV'''' +valid_servers = read_and Validate_yaml(yaml_file) +export_to_csv(valid_servers, csv_file) +``` + +```python +# test_server_config.py +import unittest +import os +from server_config import read_and Validate_yaml, export_to_csv, validate_ip +class TestServerConfig(unittest.TestCase): def setUp(self): """Set up the test environment""self.valid_yaml_content $\equiv$ ""-ip_address:192.168.1.1 location:Data Center 1 operational_status: operational -ip_address:10.0.0.2 location:Data Center 2 operational_status: maintenance "" self.invalid_yaml_content $=$ "" -ip_address:192.168.1.999 location:Data Center 1 +``` + +File 2: test_server_config.py +```python +operational_status: operational + - ip_address: 10.0.0.2 + location: Data Center 2 + operational_status: + "" + self.mixed_yaml_content = "" + - ip_address: 192.168.1.1 + location: Data Center 1 + operational_status: operational + - ip_address: 10.0.0.999 + location: Data Center 2 + operational_status: maintenance + "" + with open('valid_servers.yaml', 'w') as file: + file.write(self.valid_yaml_content) + with open('invalid_servers.yaml', 'w') as file: + file.write(self.invalued_yaml_content) + with open('mixed_servers.yaml', 'w') as file: + file.write(self;mixed_yaml_content) + def tearDown(self): + """Clean up after tests" + os.remove('valid_servers.yaml') + os.remove('invalid_servers.yaml') + os.remove('mixed_servers.yaml') + if os.path.exists('output.csv': + os.remove('output.csv') + def test Validate_ip(self): + """Test IP validation function" + self.assertTrue(valid_ip('192.168.1.1')) + self.assertFalse(valid_ip('192.168.1.999')) + self.assertFalse(valid_ip('invalid_ip')) + def test_read_and Validate_yaml(self): + """Test reading and validating YAML data" + valid_servers = read_and Validate_yaml('valid_servers.yaml') + self.assertEqual(len(valid_servers), 2) + invalid_servers = read_and Validate_yaml('invalid_servers.yaml') + self.assertEqual(len(invalid_servers), 0) + mixed_servers = read_and Validate_yaml('mixed_servers.yaml') + self.assertEqual(len(mixed_servers), 1) + def test_export_to_csv(self): + """Test exporting data to CSV" + valid_servers = read_and Validate_yaml('valid_servers.yaml') + export_to_csv(valid_servers, 'output.csv') + with open('output.csv', 'r') as file: + content = file.read() + self assertIn('ip_address,location,operational_status', content) + self assertIn('192.168.1.1',Data Center 1,operational', content) + self assertIn('10.0.0.2',Data Center 2,maintenance', content) + if __name__ == "_main_:unittest.main() +``` + +# A.5.3. DEBUGGING AND OPTIMIZATION + +Initial execution of the tests revealed several issues: + +- The IP validation function incorrectly accepted some invalid IP addresses, such as 192.168.1.999. +- Edge cases in operational status validation were not handled properly. + +Given the error message and the original code, the LLM gives a corrected implementation. + +File 3: corrected server_config.py +```python +#server_config.py +import yam1 +import csv +import re +def validate_ip(ip): ""Validate the IP address format"" pattern $=$ re.compile(r" $\text{?} : [0 - 9]\{1,3\} \backslash .)\{3\} [0 - 9]\{1,3\} \$ " if not pattern.match(ip): return False parts $=$ ip.split('.') for part in parts: if not 0 <= int(part) <= 255: return False return True +#The rest remains unchanged +``` + +# B. Appendix of Evaluation + +In this section, we introduce the function-level code benches and provide results on EvolEval and FullStackBench (section B.1), then detail the construction of XFileDep (section B.2) and provide a case of file-level code generation (section B.3). + +# B.1. Function-level Code Generation Benchmark + +We detail the individual function-level code generation benchmarks in this subsection, as well as more detailed results. + +HumanEval and MBPP HumanEval (Chen et al., 2021) and MBPP (Austin et al., 2021) are popular benchmarks for assessing code generation. Considering the limited test cases in these benchmarks, we followed previous work (Wei et al., 2024b; Zheng et al., 2024) and utilized the EvalPlus (Liu et al., 2023) framework to evaluate model robustness across a broader range of test cases. To ensure fair comparison, we used version 0.2.0 of MBPP+ provided by EvalPlus, which removes some broken tasks $(399\rightarrow 378$ tasks). Table 1 shows the results of different LLMs on these benchmarks. + +**BigCodeBench** BigCodeBench (Zhuo et al., 2025) is a comprehensive benchmark designed to assess a model's ability to handle real-world programming tasks, particularly its effectiveness in utilizing various function calls as tools. Our model's ability to adeptly manage these high-complexity scenarios underscores its suitability for BigCodeBench. + +EvoEval Many benchmarks are prone to data leakage. To mitigate this, we comprehensively evaluate LLM coding capabilities on EvoEval (Xia et al., 2024), constructed by evolving HumanEval to different target domains (Difficult, Creative, Subtle, Combine, and Tool Use). Table 7 shows results of different LLMs. We obtained results from (Xia et al., 2024) and, for models without reported results, conducted tests using their default prompts. + +Table 7: Pass@1 (%) results of different LLMs on EvoEval computed with greedy decoding. + +
ModelDifficultCreativeSubtleCombineTool UseAvg
Closed-source Model
GPT-4-Turbo50.061.082.045.069.061.4
GPT-452.066.076.053.068.063.0
Claude-350.053.081.042.069.059.0
ChatGPT33.042.070.033.064.048.4
Claude-3-haiku40.047.065.017.056.045.0
7B+ Scale
Qwen2.5-Coder-32B-Instruct57.058.090.058.075.067.6
Codestral-22B-v0.152.053.069.041.071.057.2
DeepSeekCoder-33b-Instruct47.047.067.031.066.051.6
WizardCoder-33b-1.148.048.066.020.064.049.2
CodeLlama-70b-Instruct31.041.065.018.065.044.0
OpenCoder-8B-Instruct45.050.073.028.050.049.2
~7B Scale
DeepSeek-Coder-6.7B-base21.024.047.05.055.030.4
DeepSeekCoder-6.7b-Instruct40.037.061.018.051.041.4
Magicoder-S-DS-6.7B40.034.067.021.061.044.6
WaveCoder-Ultra-6.7B38.042.071.024.035.042.0
OpenCodeInterpreter-DS-6.7B43.037.065.025.051.044.2
EpiCoder-DS-6.7B40.045.070.030.065.050.0
Qwen2.5-Coder-7B-Base35.020.055.027.041.035.6
Qwen2.5-Coder-7B-Instruct48.049.077.037.065.055.2
EpiCoder-Qwen-7B53.048.078.047.068.058.8
+ +FullStackBench Most existing code evaluation datasets cover only limited application areas, such as basic programming and data analysis, lacking a comprehensive and rigorous assessment of code LLMs' capabilities across broader and more complex computer science domains. To convincingly demonstrate our model's strong performance across a wide and diverse range of areas, we utilize FullStackBench (Liu et al., 2024). This benchmark encompasses 16 programming languages and various computer science domains, aiming to thoroughly and systematically evaluate the abilities of large models in diverse real-world coding scenarios. Table 8 shows the results of different LLMs on the FullStackBench. + +Table 8: Model performance across domains of Python in the English Subset of FullStackBench. + +
ModelBPAPSEDPMADWMLSCDBMMOSOthersOverall
Close-Sourced API Model
OpenAI o1-preview55.5678.6164.2976.8079.1418.7551.2861.7640.0047.37100.0074.4766.47
OpenAI o1-mini72.2275.6250.0076.0080.5828.7556.4156.6240.0057.89100.0072.3466.23
Claude-35-Sonnet50.0075.6271.4376.0076.2613.7551.2861.7650.0063.16100.0078.7265.52
GPT 4o-080672.2272.1453.5778.4076.9821.2566.6755.1540.0068.42100.0072.3465.05
Doubao-Coder-Preview55.5669.6550.0077.6075.5427.5051.2860.2920.0063.1650.0055.3262.91
DeepSeek-v2.555.5668.1650.0076.0076.2620.0048.7256.6240.0063.1650.0065.9661.85
Qwen-Max50.0070.1539.2977.6072.6613.7556.4157.3530.0047.3750.0063.8360.78
GLM-4-Plus55.5665.6739.2976.8074.8213.7558.9750.0040.0052.63100.0053.1958.77
20B+ Instruction TunedCoder
DeepSeekCoder-v2-Instruct55.5668.6635.7181.6079.1416.2548.7253.6840.0052.6350.0057.4561.26
Qwen2.5-Coder-32B-Instruct50.0070.1550.0077.6066.1917.5061.5443.3830.0047.37100.0061.7058.41
DeepSeekCoder-33B-Instruct50.0059.7021.4371.2048.9218.7548.7240.4430.0042.1150.0044.6849.05
CodeLlama-34B-Instruct5.5622.8914.2940.0017.2716.2515.3818.3830.0026.320.0023.4022.27
13B+ Instruction TunedCoder
Qwen2.5-Coder-14B-Instruct55.5662.6932.1476.0070.5018.7553.8538.9730.0057.89100.0055.3255.57
DeepSeekCoder-v2-Lite-Instruct50.0064.6832.1464.0056.1226.2543.5933.8260.0021.0550.0053.1950.47
StarCoder2-15B-Instruct-v0.161.1144.2832.1463.2036.6931.2553.8528.6860.0036.8450.0053.1943.01
CodeLlama-13B-Instruct11.1122.3925.0024.0020.8630.0020.5113.9740.0010.5350.0023.4021.56
6B+ Instruction TunedCoder
Qwen2.5-Coder-7B-Instruct33.3358.2139.2966.4048.9218.7538.4632.3540.0047.3750.0059.5747.51
Yi-Coder-9B-Chat61.1150.2532.1466.4046.7626.2543.5936.7650.0036.8450.0048.9446.56
DeepSeek-Coder-7B-Instruct-v1.550.0051.7425.0064.8037.4125.0030.7734.5620.0052.6350.0048.9443.60
OpenCoder-8B-Instruct44.4453.7328.5757.6035.9726.2528.2128.680.0047.370.0044.6841.11
DeepSeek-Coder-6.7B-Instruct61.1149.7528.5765.6038.1318.7538.4622.7930.0031.5850.0042.5540.88
CodeQwen1.5-7B-Chat38.8945.7750.0058.4031.6515.0033.3322.7920.0031.580.0042.5537.20
CodeLlama-7B-Instruct27.7823.8825.0028.0020.8623.7510.2611.7650.0010.530.0021.2821.33
EpiCoder-DS-6.7B61.1147.2625.0061.6041.0140.0041.0327.2150.0036.8450.0042.5543.25
EpiCoder-Qwen-7B44.4461.1917.8672.8061.1528.7551.2827.9420.0047.3750.0040.4350.24
+ +# B.2. Cross-File Dependency Benchmark + +The Cross-File Dependency Benchmark (XFileDep) is a specialized benchmark designed to evaluate the performance of code generation models in handling cross-file dependencies. In real-world programming scenarios, there exists a complex web of dependencies between different code files. XFileDep provides a comprehensive framework that tests a model's ability to generate missing files by considering multiple interdependent files as context. This benchmark not only measures the model's capability to generate individual isolated files but also assesses its proficiency in understanding and managing dependencies between files. As illustrated in Figure 8, the constructing the XFileDep consists of following steps. + +Step 1: Data Sample Selection. The construction of the XFileDep starts from carefully data selection. From the initial cross-file dataset of 35,000 data samples constructed using our pipeline of synthetic data based on extracted features, we carefully filtered out cross-file data samples with fewer than 5 interconnected files (excluding any test files), resulting in a refined set of 3,435 high-quality samples. Figure 9 comprehensively displays the distribution of file counts, the average file length for each data sample, and the overall structural characteristics of the dataset. + +Step 2: Dependency File Selection. We utilized Abstract Syntax Trees (AST) to conduct dependency analysis and structural identification of the Python code files. AST allows parsing of the syntactic structure of Python files, enabling extraction of module import dependencies, function definitions, and class definitions. By parsing all code files within the data sample and identifying the collaboration between classes and functions, we documented the details of defined functions and classes along with the information on imported modules. With these capabilities, we were able to traverse the entire data sample, analyze the dependency relationships between files, discern key files, and select a representative candidate file (to serve as the target file for the code generation task) that has a substantial amount of cross-file dependencies. This approach allows us to generate a structured data analysis report. The systematic nature of this analysis allows us to efficiently handle large cross-file data, providing clear dependency graphs and detailed information on code structure. We also filtered out data samples that lacked rich cross-file dependencies, retaining 2,934 samples that met the criteria. + +![](images/0e16c2bc84d5f636e1b2dc661dabda3c818a7ae69e60e78672b16fbc945f0886.jpg) +Figure 8: The Sankey diagram for XFileDep benchmark creation, with numbers indicating the quantity of data samples. + +![](images/b09f4577ed5ee5763c2114ba9fe24cbe7b8f17886f38dbf9ec9f98f12e40a81a.jpg) +Figure 9: the distribution of file quantities and the average file length for each data sample. + +![](images/b6acd61cd23321978eab101841d14e3bfdf31ececea95b0c3d954ead47e05dd6.jpg) + +Step 3: Filtering. We analyzed the runtime environment, required libraries, and external files (such as .npy, .xlsx, .json, .log) for each data sample. Based on this analysis, data samples that could not provide the necessary files or dependencies were filtered out. We also excluded data samples that had long runtimes or required the generation of specific output files, which made obtaining test results difficult. In addition, to increase the overall difficulty of the task and ensure that cross-file code generation operates at an appropriate file-level length, we filtered out candidate files whose length was less than 300 characters. Finally, we obtained a total of 2,231 data samples. + +Step 4: Test Case Augmentation. To enhance the test coverage of the code within each data sample, we utilized GPT-4o to generate additional test cases. This process ensured that the core functional methods were robustly and comprehensively tested. In Table 9, we have compiled the statistical data before and after the augmentation of the test cases. We conducted a + +Table 9: Comparison of Test Functions and Test Cases before and after augmentation for 930 data samples. + +
OriginalAugmented
Test Functions
Total3,8377,933
Average per sample4.138.53
Max in file1223
Test Cases
Total6,01014,305
Average per sample6.4615.38
Max in file2044
+ +runtime check on the data after augmenting the test cases and obtained 611 samples that successfully passed the test cases. The prompt for augmenting the test case with GPT-4o is illustrated below. + +# Prompts for Augmenting Test Cases + +You are an expert in Python programming and test-driven development. I have a repository of Python code with corresponding test files aimed at verifying the correctness of my code. However, I believe the current test cases are insufficient and I need more comprehensive and robust test cases. + +# Requirements: + +- The test cases should be written using a suitable testing framework (e.g., pytest, unittest). +- Maintain consistency with existing test structure and naming conventions. +- Ensure that all new test cases pass before finalizing. + +# Inputs: + +- The file structure (including filenames) and contents of the Python code. {python_code} +- The file structure (including filenames) and contents of the current test files. {test_code} + +# Deliverables: + +- Updated test files with additional test cases. +- Documentation or comments within the test files explaining each new test case. + +# Your output: + +Returns code content only. + +# Prompts for Refining Test Code + +You are an expert in Python programming and test-driven development. I have a repository of Python code with corresponding test files aimed at verifying the correctness of my code. However, there are errors in the current test cases and test code that I would like you to proofread and correct. + +# Requirements: + +- The test cases should be written using a suitable testing framework (e.g., pytest, unittest). +- Maintain consistency with existing test structure and naming conventions. +- Ensure that all new test cases pass before finalizing. + +# Inputs: + +- The file structure (including filenames) and contents of the Python code: {python_code} +- The file structure (including filenames) and contents of the current test files: {test_code} +- Program error messages caused by running the test file: {errormessages} + +# Deliverables: + +- Fully correct test code file. +- Documentation or comments within the test files explaining each new test case. + +# Your output: + +Returns code content only. + +Step 5: Iterative Test Code Refinement. For data samples that fail the test cases, the code content, test cases, and error information are extracted. Based on these detailed input descriptions, we utilize GPT-4o for checking and modification, and subsequently re-run the refined test code for validation. We performed a single iteration of modification on the test code, resulting in 394 successful test cases out of 1620 samples. Finally we have a sample of 1,005 that pass the test cases. The prompt for refining the test code with GPT-4o is shown above. + +Step 6: Unsafe Filtering. To ensure the validity of our test cases, we constructed a unit test environment based on the dependency requirements specified in each Python file. We then executed all test cases and filtered out any samples that failed the tests or presented unsafe operations, such as kill, terminate, rmdir, rmdir, and rm. This approach ensures that our canonical solution is absolutely correct. Finally, we retained 930 samples of cross-file data. +Step 7: Manual Checking and Verification To ensure the quality of the questions in the XFileDep, we manually review and verify each question. The evaluation criteria require that the Python code in the Answer accurately reflect the functionalities described in the question and produce correct outputs that meet the expected requirements. Any questions that do not meet the criteria will be filtered. All manual reviews are conducted by individuals with at least 5 years of Python programming experience and a master's degree or higher. Additionally, these reviewers are currently employed as software engineers or in similar roles at leading internet companies. After manual review and filtering, we obtained 466 questions. +Step 8: Annotation. We selected target files with extensive cross-file dependencies (either frequently invoked by other files or frequently invoking other files). Using GPT-4o, we meticulously annotated all classes and methods in these files with detailed documentation, emphasizing their purpose, functionality, and relationships with other components. The annotation process did not alter the original code in any way, and the successful execution of the annotated files verified the correctness of the ground truth. The full prompt for annotating the target file with GPT-4o is illustrated below. +Step 9: Benchmark Construction. To maintain a high level of difficulty in the benchmark construction, we extracted all code blocks from the functions and classes within the target files, leaving only the import statements, FunctionDef, ClassDef, and the corresponding docstrings. The instruction set provided the names and contents of all other files in the cross-file data sample as context and included the target file's name and skeleton structure for the completion task. + +# Prompts for Annotating Target File + +Your task is to read through the provided Python code and add detailed docstrings that describe the purpose and functionality of each class and function. Your additions should follow the PEP 257 conventions and should not alter the original code in any way. The docstrings should provide enough detail to help other developers understand what each part of the code does and how to use it appropriately. + +```txt +Here is the Python code: +``` +``python +{target_file_code} +``` + +Please add the necessary docstrings without changing the actual code. Ensure that output is enclosed with its corresponding tags: +``` +`` python +[Your code here] +``` + +# B.3. Case of File-Level Code Generation + +This section provides comprehensive details on file-level code generation using a generated case. The directory structure of the example and the detailed contents of each file are as follows: + +```txt +--example_root/ +main.py optimizer.py parser.py scraper.py search.py storage.py +--tests/ test_main.py +``` + +File 4: main.py +```python +# main.py +from scraper import scraper +from parser import Parser +from storage import Storage +from search import Search +from optimizer import Optimizer +def main(): + urls = [ 'https://example.com/products', # Add more URLs as needed ] +# Step 1: Scrape Data +scaper = Scaper(urls) +html_data = scraper+fetch_data() +# Step 2: Parse Data +parser = Parser() +parse_data = parser.parseHTML_data) +# Step 3: Store Data +storage = Storage() +storage.store_data(parsed_data) +# Optional: Save to JSON +storage.save_to_json(parsed_data) +# Step 4: Optimize Code (Example usage) +code = "" +def example_function(): +result = 2 + 2 +return result"""" +optimized_code = Optimizer OPTIMIZE(code) +# Step 5: Search Data +data = storage fetching_data() +keyword = 'example' +search = Search() +results = search.breadth_first_search(data, keyword) +print(f"Search results:{results}") +if __name__ == __main__': main() +``` + +```txt +optimizer.py +``` + +File 5: optimizer.py +```python +import ast +import compileall +class Optimizer: #Example of constant folding optimization @staticmethod def constant_folding(code): tree $=$ ast数据分析optimized_tree $=$ ast.fix MISSING Locations.tree) return compile(optimized_tree, filename $\coloneqq$ "",mode $\coloneqq$ "exec") @staticmethod def optimize_code(code): optimized_code $=$ Optimizerconstant_folding(code) compileall.compile_code(optimized_code) return optimized_code +``` + +File 6: parser.py +```python +# parser.py +from bs4 import BeautifulSoup +class Parser: + @staticmethod + def parseHTML_data): + parsed_data = [] + for html in html_data: + soup = BeautifulSoupHTML, 'html.parser') + products = [] + for product in soup.select(): + name = product.select_one().product-name').text.strip() + price = product.select_one().product-price').text.strip() + description = product.select_one().product-description').text.strip() + products.append({ + 'name': name, + 'price': price, + 'description': description +}) +``` + +File 7: scraper.py +```python +# scraper.py +import requests +from bs4 import BeautifulSoup +class Scaper: + def __init__(self, urls): + self URLs =urls + def fetch_data(self): + html_data = [] + for url in self URLs: + try: + response = requests.get(url) + response.wait_for_status() + html_data.append(response.text) + except requests.RequestException as e: + print(f"Error fetching data from {url}: {e}") +``` + +File 8: search.py +```python +# search.py +from collections import deque +class Search: + @staticmethod + def breadth_first_search(data, keyword): + queue = deque(data) + results = [] + while queue: + item = queue.popleft() + if keyword.lower() in item['name'].lower() or keyword.lower() in item['description'].lower(): + results.append(item) + return results +``` + +File 9: storage.py +```python +# storage.py +import json +importsqlite3 +class Storage: def__init__(self,db_name $\equiv$ 'data.db'): self_CONN $=$ sqlite3.connect(db_name) self.create_table() +def create_table(self): with self_CONN: self_CONN.execute('' CREATE TABLE IF NOT EXISTS products ( id INTEGER PRIMARY KEY, name TEXT, price TEXT, description TEXT )') +def store_data(self,data): with self_CONN: for products in data: for product in products: self_CONN.execute(INSERT INTO products(name,price,description) VALUES:name,:price,:description)'’,product) def fetch_data(self): cursor $=$ self_CONN.cursor() cursor.execute('SELECT name,price,description FROM products') return cursor_fetchall() +def save_to_json(self,data,filename $\equiv$ 'data.json'): with open(filename,'w') as f: json.dump(data,f,indent=4) +``` + +```python +# tests/test_main.py +import unittest +from scraper import Scraper +from parser import Parser +from storage import Storage +from search import Search +from unittestmock import patch +class TestWebScrapingApp(unittest.TestCase): + @patch('requests.get') + def test_scraper(self, mock_get): +``` + +File 10: tests/test_main.py +```python +mock_get.return_value.status_code = 200 +mock_get.return_value.text = "
Test Product$10Test Description
+scaper = Scaper(['https://example.com/products}] +html_data = scraper_fetch_data() +self.assertEqual(len(htm_data), 1) +def test_parser(self): +html_data = ['
Test Product$10Test Description
Similarity99%95%90%85%HumanEval index5474357evol-codealpaca-v1 index8126045682950851167 + +# C.3. Complexity Evaluation + +# C.3.1. DETAILED METRICS FROM THE SOFTWARE ENGINEERING PERSPECTIVE. + +Halstead-derived Principle. We supplement Halstead-derived metrics in Table 11, which are based on unique operators $(n_{1})$ , unique operands $(n_{2})$ , total operators $(N_{1})$ , and total operands $(N_{2})$ . Among these recognized metrics, our data consistently shows significant performance gains compared to the current codebase. For instance, we achieve notable complexity advantages in program volume and program difficulty. The programming effort and estimated programming time further confirm that our data requires more time and effort to achieve. While the increased complexity may suggest a higher potential for bugs, we address this issue by incorporating test cases during the data synthesis. + +Strictness and Cyclomatic Complexity Measures. Table 12 in demonstrates that our dataset exhibits greater strictness and cyclomatic complexity at both the function and file levels. In Table 13, we break down cyclomatic complexity to observe scores for specific operations, such as while, for, and boolean operations. Table 13 shows that our gains in Cyclomatic complexity are mainly due to the higher occurrence of if, for, except, and return statements. This suggests that our program handles more loops and incorporates a broader range of exception handling scenarios. We break down the code strictness complexity scores. Table 14 shows that our data achieves a significantly improvement in Doc Strings, indicating a more + +Table 11: Derived Halstead metrics. These metrics are derived from unique operators $(n_1)$ , unique operands $(n_2)$ , total operators $(N_1)$ , and total operands $(N_2)$ . + +
DatasetProgram Length (N) +N = N1 + N2Vocabulary (n) +n = n1 + n2Volume (V) +V = N × log2(n)Difficulty (D) +D = n1/2 × N2/n2
Code Alpaca26.5513.05108.395.07
Evol CodeAlpaca76.6126.91381.4510.76
CodeFeedback81.0328.54416.7810.49
OSS Instruct75.6128.43381.328.75
Ours (func-level)157.3454.97932.7812.34
Ours (file-level)280.2284.512035.6313.64
DatasetProgramming Effort (E) +E = D × VEstimated Time (T) +T = E/18Predicted Bugs (B) +B = V/3000
Code Alpaca1043.2657.960.03
Evol CodeAlpaca5954.64330.810.09
CodeFeedback6204.38344.690.09
OSS Instruct4528.98251.610.08
Ours (func-level)13396.28744.240.17
Ours (file-level)67851.943769.550.28
+ +Table 12: Comparison of Strictness complexity (left) and Cyclomatic complexity (right). + +
DatasetMeanMedianStd
Code Alpaca0.180.000.52
Evol CodeAlpaca0.820.001.63
CodeFeedBack0.970.002.09
OSS Instruct1.501.002.19
Ours (func-level)4.954.003.77
Ours (file-level)5.414.003.85
+ +
DatasetMeanMedianStd
Code Alpaca2.101.001.66
Evol CodeAlpaca3.763.003.48
CodeFeedback3.963.003.33
OSS Instruct3.453.002.98
Ours (func-level)5.145.003.01
Ours (file-level)14.9314.006.73
+ +Table 13: Comparison of different control flow and logical operation frequencies. + +
Datasetifwhileforandorexceptreturnbreakcontinuebool_op
Code Alpaca0.420.060.430.030.010.010.660.010.000.05
Evol CodeAlpaca1.350.150.680.150.140.121.590.030.020.29
CodeFeedback1.590.140.760.190.140.081.620.050.020.33
OSS Instruct1.380.070.590.160.080.071.580.040.010.24
Ours (func-level)2.290.161.140.160.200.703.060.050.100.35
Ours (file-level)3.600.381.770.250.211.115.240.080.100.45
+ +Table 14: Detailed metrics of code strictness complexity + +
DatasetType HintsParameter ValidationValue VerificationException HandlingAssertionsDoc StringsReturn Value Validation
Code Alpaca0.000.000.040.020.000.060.07
Evol CodeAlpaca0.210.080.140.200.030.010.15
CodeFeedback0.420.090.160.100.010.050.14
OSS Instruct0.940.090.120.100.020.080.15
Ours (func-level)0.940.100.290.810.022.450.34
Ours (file-level)0.430.280.401.760.011.740.80
+ +comprehensive and rigorous consideration to code documentation. Additionally, we demonstrate clear advantages in exception handling, return value validation, and type hints, suggesting that our data is more standardized and stringent. + +These analyses upon Halstead complexity, strictness and cyclomatic complexity, collectively demonstrate that feature tree-based code synthesis can create code that is both more complex and more sophisticated than current synthesis methods. + +# C.3.2. PROMPTS FOR EVALUATING CODE COMPLEXITY USING GPT-40. + +We adopt the LLM-as-a-judge methodology, using GPT-4o to comprehensively evaluate code complexity across four key dimensions: Error Handling, Modularity, Data Structure Complexity, and Third-Party Dependencies. We define four distinct levels of standards for each dimension and strategically leverage GPT-4o to assign a precise score to each sample based on these well-defined criteria. Detailed evaluation criteria, corresponding prompts, and scoring methodology are shown below. + +# Prompts for Grading Data Structure Usage Complexity. + +You are an expert in evaluating complexity levels of data structure implementations for given code. Please provide a single integer score from 2 to 8. + +# Criteria: + +Score 2 for case: Basic data types only; Only use primitive types (int, string, etc.); Simple arrays or lists; No custom data structures. + +Score 4 for case: Basic data structures; Uses built-in collections (sets, maps); Simple combinations of basic structures; Basic object-oriented classes. + +Score 6 for case: Intermediate data structures; Custom data structures for specific needs; Efficient combination of multiple structures; Clear interfaces for data access. + +Score 8 for case: Advanced data structures; Specialized tree/graph structures; Optimized for operation requirements; Well-designed structure relationships + +# Inputs: + +You are judging the following code: + +Begin Code ## + +{code} + +End Code + +# Output Format: + +Please provide your evaluation in the following format: + +Grade: a single integer within 2, 4, 6, and 8 + +# Prompts for Grading Modularity Implementation Complexity. + +You are an expert in evaluating code architecture complexity, with a special focus on modularity implementation patterns. Please provide a single integer score from 2 to 8. + +# Criteria: + +Score 2 for case: + +Code without any modular designs, all logic in a single file with no clear separation. + +Score 4 for case: + +Code with minimal modularization, basic separation of logic but with tight coupling. + +Score 6 for case: + +Code with reasonable modularization and logical separation (e.g., some decoupling and partial adherence to design patterns, but limited scalability or reuse). + +Score 8 for case: + +Code implementation with clear and practical modularization (e.g., modules have distinct responsibilities, dependencies are simple and direct, and logical layers such as database, business logic, and user interface are separated. The design is easy to read, maintain, and extend for most real-world needs). + +# Inputs: + +You are judging the following code: + +Begin Code + +{code} + +End Code + +# Output Format: + +Please provide your evaluation in the following format: + +Grade: a single integer within 2, 4, 6, and 8 + +# Prompts for Grading Third Party Dependency Complexity. + +You are an expert in evaluating third-party dependency complexity of given code. Please evaluate the complexity of third-party library usage and dependencies in the following code and provide a single integer score from 2 to 8. + +# Criteria: + +Score 2 for case: No external library usage, only built-in modules (e.g., os, sys, json). + +Score 4 for case: Uses single third-party library with basic function calls (e.g., pandas, scipy, numpy). + +Score 6 for case: Uses 2-3 third-party libraries. + +Score 8 for case: Uses at least three third-party libraries with some interaction between them. + +# Inputs: + +You are judging the following code: + +Begin Code ## + +{code} + +End Code + +# Output Format: + +Please provide your evaluation in the following format: + +Grade: a single integer within 2, 4, 6, and 8. + +# Prompts for Grading Error Handling Complexity. + +You are an expert in evaluating error handling complexity of given code. Please provide a single integer score from 2 to 8. + +# Criteria: + +Score 2 for case: Complete lack of error handling. + +Score 4 for case: Basic error handling that prevents crashes. + +Score 6 for case: Basic error handling that prevents crashes with informative logging info. + +Score 8 for case: Error handling covers major scenarios. + +# Inputs: + +You are judging the following code: + +Begin Code ## + +{code} + +End Code + +Output Format: Please provide your evaluation in the following format: + +Grade: a single integer within 2, 4, 6, and 8. + +Table 15: Distribution of total features across 1k samples. + +
DatasetsWorkflowImplementation StyleFunctionalityResource UsageComputation OperationSecurityUser InteractionData Processing
Alpaca184292610053245258181331
CodeFeedback3718101812605601432503791354
Evol-Alpaca3550101313055981290603251838
OSS-Instruct310610151192421585492781163
Ours (func-level)40041050167183112132275423436
Ours (file-level)466312442629118377812314073160
DatasetsFile OperationError HandlingLoggingDependency RelationsAlgorithmData StructuresImplementation LogicAdvanced TechniquesAvg.
Alpaca1877116636513091143178.24
CodeFeedback4642113453719162417708114.90
Evol-Alpaca85354158115791661148013515.10
OSS-Instruct23639473799170180414533012.77
Ours (func-level)56788720524994512297186614321.89
Ours (file-level)1453102954840104542565218721227.65
+ +# C.4. Diversity Evaluation + +# C.4.1. PROMPT FOR FEATURE EXTRACTION. + +# Prompts for feature extraction. + +Extract features from the provided code snippets, following the requirements for each category below, formatted in JSON structure. + +Responses in the following categories should be concise and organized in a JSON format surrounded with and . Categories may include nested structures if applicable. Here is an example of the expected format: + + + +"functionality": ["data processing"], + +"computation operation": { "mathematical operation": [ "find common divisor", "base conversion", "prime factorization"], "statistical calculations": [ "maximum"] }, + +"data processing": {"data transformation": ["drop rows"]}, + +"data structures": ["string", "list", "graph", "tree"], + +"implementation logic":["conditional", "loop"] +} < end > + +# Categories to extract: + +1. Programming Language: Note the programming language used. Example: ["Python", "Java"]. +2. Workflow: Outline the main steps and operations the code performs. Example: ["data loading", "preprocessing", "model training", "evaluation", "results saving"]. +3. Implementation Style: What programming paradigm the code follows. Example: ["procedural", "object-oriented", "functional"]. +4. Functionality: Explain the function of the code. Example: ["data processing", "user interaction", "system control"]. + +16. Advanced Techniques: Specify any sophisticated algorithms or methods applied. Example: ["Machine Learning", "Linear Regression", "Optimization Algorithms"]. + +# Requirements: + +1. If the code snippet contains fewer than three lines, only extract the most precise and relevant single feature. +2. For a function, provide no more than five features, prioritizing the most critical and distinctive aspects. +3. Only evaluate the code snippet; disregard any natural language descriptions or comments outside the code context. +4. Try not to let a feature appear in multiple categories at the same time. + +# Inputs: + +{source_code} + +# Output Format: + + + +"workflow": ["your answer"], + +"implementation style": ["your answer"], + +"functionality": ["your answer"], + +"resource usage": ["your answer"], + +"computation operation": ["your answer"], + +"security": ["your answer"], + +"user interaction": ["your answer"], + +"data processing": ["your answer"], + +"file operation": ["your answer"], + +"error handling": ["your answer"], + +"logging": ["your answer"], + +"dependency relations": ["your answer"], + +"algorithm": ["your answer"], + +"data structures": ["your answer"], + +"advanced techniques": ["your answer"], + + + +If the features of a category cannot be directly extracted from the code, please set it to an empty list []. + +# C.4.2. TOTAL FEATURE DIVERSITY COMPARISON. + +We compared the number of features in each category, as shown in Table 15. On average, our function-level data contains 21.89 features per sample, while the file-level data includes 27.65 features per sample. This demonstrates that our dataset not only leads in unique features but also significantly surpasses others in total feature count. \ No newline at end of file diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/images.zip b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..23716372cd8c2bf3148dbfd8f6488694ba1e76bc --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbc8c4c80ed4d9c66c518fcead511cf3e7fac707713b15b5f5a81a1fdc6dff65 +size 1913193 diff --git a/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/layout.json b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5115fd1765284f526c12b4a05ea2336076b25d67 --- /dev/null +++ b/ICML/2025/EpiCoder_ Encompassing Diversity and Complexity in Code Generation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fc7075b9165f19c8257d725bfc1b5f257d2855abb1baabf68df4005648cc4bc +size 1012551 diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_content_list.json b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..657851b0147a4345202cb0dda2df2c9ec2165a23 --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bfc68898144b706195f0ac17fd917c650e6c4b70ff298b2932cbf53a894c590 +size 132898 diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_model.json b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dc154580ba905ef7a08e8682ab3c71607bae8a37 --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f9d3d959dc3268ed6350723570bdedf6739c861ef327bae23f76f8c93eb26a2 +size 162936 diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_origin.pdf b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..27eadeab69bb208dd4291e288ac48f25222ed57a --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/c36d0e63-a9e7-42df-a9a0-456e7612d17b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9cc2e35c63c880bfe95bb8752ac57ebc10f72efddc46ec113989b632afd80b9f +size 3228815 diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/full.md b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f36a2dd74ffb3aedd0a0525808b3374c23d725c5 --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/full.md @@ -0,0 +1,497 @@ +# Epsilon-VAE: Denoising as Visual Decoding + +Long Zhao $^{1}$ Sanghyun Woo $^{1}$ Ziyu Wan $^{12*}$ Yandong Li $^{1}$ Han Zhang $^{1}$ Boqing Gong $^{1}$ Hartwig Adam $^{1}$ Xuhui Jia $^{1}$ Ting Liu $^{1}$ + +# Abstract + +In generative modeling, tokenization simplifies complex data into compact, structured representations, creating a more efficient, learnable space. For high-dimensional visual data, it reduces redundancy and emphasizes key features for high-quality generation. Current visual tokenization methods rely on a traditional autoencoder framework, where the encoder compresses data into latent representations, and the decoder reconstructs the original input. In this work, we offer a new perspective by proposing denoising as decoding, shifting from single-step reconstruction to iterative refinement. Specifically, we replace the decoder with a diffusion process that iteratively refines noise to recover the original image, guided by the latents provided by the encoder. We evaluate our approach by assessing both reconstruction (rFID) and generation quality (FID), comparing it to state-of-the-art autoencoding approaches. By adopting iterative reconstruction through diffusion, our autoencoder, namely $\epsilon$ -VAE, achieves high reconstruction quality, which in turn enhances downstream generation quality by $22\%$ at the same compression rates or provides $2.3\times$ inference speedup through increasing compression rates. We hope this work offers new insights into integrating iterative generation and autoencoding for improved compression and generation. + +# 1. Introduction + +Two dominant paradigms in modern visual generative modeling are autoregression (Radford et al., 2018) and diffusion (Ho et al., 2020). Tokenization is essential for both: discrete tokens allow step-by-step conditional generation in + +*Work done as a student researcher at Google. ${}^{1}$ Google DeepMind ${}^{2}$ City University of Hong Kong. Correspondence to: Long Zhao , Xuhui Jia , Ting Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +autoregressive models, while continuous latents enable efficient learning in the denoising process of diffusion models. In either case, empirical results demonstrate that tokenization enhances generative performance. Here, we focus on continuous tokenization for latent diffusion models, which excel at generating high-dimensional visual data. + +In this paper, we revisit the conventional autoencoding pipeline, which typically consists of an encoder that compresses the input into a latent representation and a decoder that reconstructs the original data in a single step. Instead of a deterministic decoder, we introduce a diffusion process (Ho et al., 2020; Song et al., 2021), where the encoder still compresses the input into a latent representation, but reconstruction is performed iteratively through denoising. This reframing turns the reconstruction phase into a progressive refinement process, where the diffusion model, guided by the latent representation, gradually restores the original data. While previous work (Preechakul et al., 2022) and concurrent work (Birodkar et al., 2024) have explored diffusion mechanisms in autoencoding, none have fully realized a practical diffusion-based autoencoder. By carefully co-designing architecture and objectives, we firstly show that our approach outperforms state-of-the-art autoencoding paradigms in reconstruction fidelity, sampling efficiency, and resolution generalization. + +To effectively implement our approach, several key design factors must be carefully considered. First, the architectural design must ensure that the diffusion decoder is effectively conditioned on the encoder latent representations. Second, the training objectives should leverage synergies with traditional autoencoding losses, such as LPIPS (Zhang et al., 2018) and GAN (Esser et al., 2021). Finally, diffusion-specific design choices play a crucial role, including: (1) model parameterization, which defines the prediction target for the diffusion decoder; (2) noise scheduling, which shapes the optimization trajectory; and (3) the distribution of time steps during training and testing, which balances noise levels for effective learning and generation. Our study systematically examines these components through controlled experiments, demonstrating their impact on achieving a high-performing diffusion-based autoencoder. We show in the experiments that under the standard configuration (Rombach et al., 2022), our method obtains a $40\%$ improvement in + +terms of reconstruction quality, leading to $22\%$ better image generation quality. More notably, we achieve $2.3 \times$ higher inference throughput by increasing compression rates, while keeping competitive generation quality. + +In summary, our contributions are as follows: (1) introducing a novel approach that fully leverages the capabilities of diffusion decoders for more practical diffusion-based autoencoding, achieving strong rFID, high sampling efficiency (within 1 to 3 steps), and robust resolution generalization; (2) presenting key design choices in both architecture and objectives to optimize performance; and (3) conducting extensive controlled experiments that demonstrate our method achieves high-quality reconstruction and generation results, outperforming leading visual auto-encoding paradigms. + +# 2. Background + +We start by briefly reviewing the basic concepts required to understand the proposed method. A more detailed summary of related work is deferred to Appx. B. + +Visual autoencoding. To achieve efficient and scalable high-resolution image synthesis, common generative models, including autoregressive models (Razavi et al., 2019; Esser et al., 2021; Chang et al., 2022) and diffusion models (Rombach et al., 2022), are typically trained in a low-resolution latent space by first downsampling the input image using a tokenizer. The tokenizer is generally implemented as a convolutional autoencoder consisting of an encoder, $\mathcal{E}$ , and a decoder, $\mathcal{G}$ . Specifically, the encoder, $\mathcal{E}$ , compresses an input image $\boldsymbol{x} \in \mathbb{R}^{H \times W \times 3}$ into a set of latent codes (i.e., tokens), $\mathcal{E}(\boldsymbol{x}) = \boldsymbol{z} \in \mathbb{R}^{H / f \times W / f \times n_z}$ , where $f$ is the downsampling factor and $n_z$ is the latent channel dimensions. The decoder, $\mathcal{G}$ , then reconstructs the input from $\boldsymbol{z}$ , such that $\mathcal{G}(\boldsymbol{z}) = \boldsymbol{x}$ . + +Training an autoencoder primarily involves several losses: reconstruction loss $\mathcal{L}_{\mathrm{rec}}$ , perceptual loss (LPIPS) $\mathcal{L}_{\mathrm{LPIPS}}$ , and adversarial loss $\mathcal{L}_{\mathrm{adv}}$ . The reconstruction loss minimizes pixel differences (i.e., typically measured by the $\ell_1$ or $\ell_2$ distance) between $x$ and $\mathcal{G}(z)$ . The LPIPS loss (Zhang et al., 2018) enforces high-level structural similarities between inputs and reconstructions by minimizing differences in their intermediate features extracted from a pre-trained VGG network (Simonyan & Zisserman, 2015). The adversarial loss (Esser et al., 2021) introduces a discriminator, $\mathcal{D}$ , which encourages more photorealistic outputs by distinguishing between real images, $\mathcal{D}(\boldsymbol{x})$ , and reconstructions, $\mathcal{D}(\mathcal{G}(z))$ . The final training objective is a weighted combination of these losses: + +$$ +\mathcal {L} _ {\mathrm {V A E}} = \mathcal {L} _ {\mathrm {r e c}} + \lambda_ {\mathrm {L P I P S}} \cdot \mathcal {L} _ {\mathrm {L P I P S}} + \lambda_ {\mathrm {a d v}} \cdot \mathcal {L} _ {\mathrm {a d v}}, \tag {1} +$$ + +where the $\lambda$ values are weighting coefficients. In this paper, we consider the autoencoder optimized by Eq. 1 as our main + +competing baseline (Esser et al., 2021), as it has become a standard tokenizer training scheme widely adopted in state-of-the-art image and video generative models (Chang et al., 2022; Rombach et al., 2022; Yu et al., 2022; 2023; Kondratyuk et al., 2024; Esser et al., 2024). + +Diffusion. Given a data distribution $p_{\pmb{x}}$ and a noise distribution $p_{\epsilon}$ , a diffusion process progressively corrupts clean data $x_0 \sim p_x$ by adding noise $\epsilon \sim p_{\epsilon}$ and then reverses this corruption to recover the original data (Song & Ermon, 2019; Ho et al., 2020), represented as: + +$$ +\boldsymbol {x} _ {t} = \alpha_ {t} \cdot \boldsymbol {x} _ {0} + \sigma_ {t} \cdot \boldsymbol {\epsilon}, \tag {2} +$$ + +where $t \in [0, T]$ and $\epsilon$ is drawn from a standard Gaussian distribution, $p_{\epsilon} = \mathcal{N}(0, I)$ . The functions $\alpha_{t}$ and $\sigma_{t}$ govern the trajectory between clean data and noise, affecting both training and sampling. The basic parameterization in Ho et al. (2020) defines $\sigma_{t} = \sqrt{1 - \alpha_{t}^{2}}$ with $\alpha_{t} = \left(\prod_{s=0}^{t} (1 - \beta_{s})\right)^{\frac{1}{2}}$ for discrete timesteps. The diffusion coefficients $\beta_{t}$ are linearly interpolated values between $\beta_{0}$ and $\beta_{T-1}$ as $\beta_{t} = \beta_{0} + \frac{t}{T-1} (\beta_{T-1} - \beta_{0})$ , with start and end values are set empirically. + +The forward and reverse diffusion processes are described by the following factorizations: + +$$ +q \left(\boldsymbol {x} _ {\Delta t: \mathrm {T}} \mid \boldsymbol {x} _ {0}\right) = \prod_ {i = 1} ^ {\mathrm {T}} q \left(\boldsymbol {x} _ {i \cdot \Delta t} \mid \boldsymbol {x} _ {(i - 1) \cdot \Delta t}\right) \tag {3} +$$ + +$$ +\text {a n d} p \left(\boldsymbol {x} _ {0: \mathrm {T}}\right) = p \left(\boldsymbol {x} _ {\mathrm {T}}\right) \prod_ {i = 1} ^ {\mathrm {T}} p \left(\boldsymbol {x} _ {(i - 1) \cdot \Delta t} \mid \boldsymbol {x} _ {i \cdot \Delta t}\right), +$$ + +where the forward process $q(\pmb{x}_{\Delta t:\mathrm{T}}|\pmb{x}_0)$ transitions clean data $\pmb{x}_0$ to noise $\pmb{x}_{\mathrm{T}} = \epsilon$ , while the reverse process $p(\pmb{x}_{0:\mathrm{T}})$ recovers clean data from noise. $\Delta t$ denotes the time step interval or step size. + +During training, the model learns the score function $\nabla \log p_t(\pmb{x})\propto -\frac{\epsilon}{\sigma_t}$ , which represents gradient pointing toward the data distribution along the noise-to-data trajectory. In practice, the model $s_{\Theta}(\pmb{x}_t,t)$ is optimized by minimizing the score-matching objective: + +$$ +\mathcal {L} _ {\text {s c o r e}} = \min _ {\Theta} \mathbb {E} _ {t \sim \pi (t), \epsilon \sim \mathcal {N} (0, I)} \left[ w _ {t} \| \sigma_ {t} s _ {\Theta} (\boldsymbol {x} _ {t}, t) + \epsilon \| ^ {2} \right], \tag {4} +$$ + +where $\pi(t)$ defines the time-step sampling distribution and $w_{t}$ is a time-dependent weight. These elements together influence which time steps or noise levels are prioritized during training. Conceptually, the diffusion model learns the tangent of the trajectory at each point along the path. During sampling, it progressively recovers clean data from noise based on its predictions. + +Rectified flow provides a specific parametrization of $\alpha_{t}$ and $\sigma_{t}$ such that the trajectory between data and noise follows a + +"straight" path (Liu et al., 2023; Albergo & Vanden-Eijnden, 2023). This trajectory is represented as: + +$$ +\boldsymbol {x} _ {t} = (1 - t) \cdot \boldsymbol {x} _ {0} + t \cdot \boldsymbol {\epsilon}, \tag {5} +$$ + +where $t \in [0,1]$ . In this formulation, the gradient along the trajectory, $\epsilon - x_0$ , is deterministic, often referred to as the velocity. The model $v_{\Theta}(\boldsymbol{x}_t, t)$ is parameterized to predict velocity by minimizing: + +$$ +\underset {\Theta} {\min } \mathbb {E} _ {t \sim \pi (t), \boldsymbol {\epsilon} \sim \mathcal {N} (0, I)} \left[ \left\| v _ {\Theta} (\boldsymbol {x} _ {t}, t) - (\boldsymbol {\epsilon} - \boldsymbol {x}) \right\| ^ {2} \right]. \tag {6} +$$ + +We note that this objective is equivalent to a score matching form (Eq. 4), with the weight $w_{t} = \left(\frac{1}{1 - t}\right)^{2}$ . This equivalence highlights that alternative model parameterizations reduce to a standard denoising objective, where the primary difference lies in the time-dependent weighting functions and the corresponding optimization trajectory (Kingma & Gao, 2024). + +During sampling, the model follows a simple probability flow ODE: + +$$ +\mathrm {d} \boldsymbol {x} _ {t} = v _ {\Theta} (\boldsymbol {x} _ {t}, t) \cdot \mathrm {d} t. \tag {7} +$$ + +Although a perfect straight path could theoretically be solved in a single step, the independent coupling between data and noise often results in curved trajectories, necessitating multiple steps to generate high-quality samples (Liu et al., 2023; Lee et al., 2024). In practice, we iteratively apply the standard Euler solver (Euler, 1845) to sample data from noise. + +# 3. Method + +We introduce $\epsilon$ -VAE, with an overview provided in Fig. 1. The core idea is to replace single-step, deterministic decoding with an iterative, stochastic denoising process. By reframing autoencoding as a conditional denoising problem, we anticipate two key improvements: (1) more effective generation of latent representations, allowing the downstream latent diffusion model to learn more efficiently, and (2) enhanced decoding quality due to the iterative and stochastic nature of the diffusion process. + +We systematically explore the design space of model architecture, objectives, and diffusion training configurations, including noise and time scheduling. While this work primarily focuses on generating continuous latents for latent diffusion models, the concept of iterative decoding could also be extended to discrete tokens, which we leave for future exploration. + +# 3.1. Modeling + +$\epsilon$ -VAE retains the encoder $\mathcal{E}$ while enhancing the decoder $\mathcal{G}$ by incorporating a diffusion model, transforming the standard decoding process into an iterative denoising task. + +Conditional denoising. Specifically, the input $\boldsymbol{x} \sim p_{\boldsymbol{x}}$ is encoded by the encoder as $z = \mathcal{E}(\boldsymbol{x})$ , and this encoding serves as a condition to guide the subsequent denoising process. This reformulates the reverse process in Eq. 3 into a conditional form (Nichol & Dhariwal, 2021): + +$$ +p \left(\boldsymbol {x} _ {0: \mathrm {T}} | \boldsymbol {z}\right) = p \left(\boldsymbol {x} _ {\mathrm {T}}\right) \prod_ {i = 1} ^ {\mathrm {T}} p \left(\boldsymbol {x} _ {(i - 1) \cdot \Delta t} \mid \boldsymbol {x} _ {i \cdot \Delta t}, \boldsymbol {z}\right), \tag {8} +$$ + +where the denoising process from the noise $x_{\mathrm{T}} = \epsilon$ to the input $x_0 = x$ , is additionally conditioned on $z$ over time. Here, the decoder is no longer deterministic, as the process starts from random noise. For a more detailed discussion on this autoencoding formulation, we refer readers to Appx. A. + +Architecture and conditioning. We adopt the standard U-Net architecture from Dhariwal & Nichol (2021) for our diffusion decoder $\mathcal{G}$ , while also exploring Transformer-based models (Peebles & Xie, 2023). For conditional denoising, we concatenate the conditioning signal with the input channel-wise, following the approach of diffusion-based super-resolution models (Ho et al., 2022; Sahara et al., 2022b). Specifically, low-resolution latents are upsampled using nearest-neighbor interpolation to match the resolution of $x_{t}$ , then concatenated along the channel dimension. In Appx. D, although we experimented with conditioning via AdaGN (Nichol & Dhariwal, 2021), it did not yield significant improvement and introduced additional overhead, so we adopt channel concatenation. + +# 3.2. Objectives + +We adopt the standard autoencoding objective from Eq. 1 to train $\epsilon$ -VAE, with a key modification: replacing the reconstruction loss $\mathcal{L}_{\mathrm{rec}}$ used for the standard decoder with the score-matching loss $\mathcal{L}_{\mathrm{score}}$ for training the diffusion decoder. Additionally, we introduce a strategy to adjust the perceptual $\mathcal{L}_{\mathrm{LPIPS}}$ and adversarial $\mathcal{L}_{\mathrm{adv}}$ losses to better align with the diffusion decoder training. + +Velocity prediction. We adopt the rectified flow parameterization, utilizing a linear optimization trajectory between data and noise, combined with velocity-matching objective (Eq. 6). We inject the encoder output $\mathbf{z}$ into the objective by replacing $v_{\Theta}(\mathbf{x}_t,t)$ with $\mathcal{G}(\mathbf{x}_t,t,\mathbf{z})$ . + +Perceptual matching. The LPIPS loss (Zhang et al., 2018) minimizes the perceptual distance between the reconstructions and real images using pre-trained models, typically VGG network (Esser et al., 2021; Yu et al., 2023; 2022). We apply this feature-matching objective to train $\epsilon$ -VAE. However, unlike traditional autoencoders, $\epsilon$ -VAE predicts velocity instead of directly reconstructing the image during training, making it infeasible to compute the LPIPS loss directly between the prediction and the target image. To address this, we leverage the simple reversing step from + +![](images/3b85f3e570f4a62ae8d75da699d8f71ffa833cbdbf04dcfba6b04d67fa4fbec9.jpg) +Figure 1. An overview of $\epsilon$ -VAE. We frame visual decoding as an iterative denoising problem by replacing the autoencoder decoder with a diffusion model, optimized using a combination of score, perception, and trajectory matching losses. During inference, images are reconstructed (or generated) from encoded (or sampled) latents through an iterative denoising process. The number of sampling steps $N$ can be flexibly adjusted within small NFE regimes (from 1 to 3). We empirically confirm that $\epsilon$ -VAE significantly outperforms the standard VAE schema, even with just a few steps. + +Eq. 6 to estimate $\pmb{x}_0$ from the prediction and $\pmb{x}_t$ as follows: + +$$ +\hat {\boldsymbol {x}} _ {0} ^ {t} = \boldsymbol {x} _ {t} - t \cdot \mathcal {G} (\boldsymbol {x} _ {t}, t, z), \tag {9} +$$ + +where $\hat{\pmb{x}}_0^t$ represents the reconstructed image estimated by the model at time $t$ . We then compute the LPIPS loss between $\hat{\pmb{x}}_0^t$ and the target real image $\pmb{x}$ . + +Denoising trajectory matching. The adversarial loss encourages photorealistic outputs by comparing the reconstructions to real images. We modify this to better align with a diffusion decoder. Specifically, our approach adapts the standard adversarial loss to enforce trajectory consistency rather than solely on realism. In practice, we achieve this by minimizing the following divergence, $\mathcal{D}_{\mathrm{adv}}$ : + +$$ +\underset {\Theta} {\min } \mathbb {E} _ {t \sim p _ {t}} \left[ \mathcal {D} _ {\text {a d v}} \left(q \left(\boldsymbol {x} _ {0} \mid \boldsymbol {x} _ {t}\right) \mid \mid p _ {\Theta} \left(\hat {\boldsymbol {x}} _ {0} ^ {t} \mid \boldsymbol {x} _ {t}\right)\right) \right], \tag {10} +$$ + +where $\mathcal{D}_{\mathrm{adv}}$ is a probability distance metric (Goodfellow et al., 2014; Arjovsky et al., 2017), and we adopt the basic non-saturating GAN (Goodfellow et al., 2014). + +For adversarial training, we design a time-dependent discriminator that takes time as input using AdaGN approach (Dhariwal & Nichol, 2021). To simulate the trajectory, we concatenate $\boldsymbol{x}_0$ and $\boldsymbol{x}_t$ along the channel dimension. The generator parameterized by $\Theta$ , and the discriminator, parameterized by $\Phi$ , are then optimized through a minimax game as: + +$$ +\begin{array}{l} \min _ {\Theta} \max _ {\Phi} \mathcal {L} _ {\mathrm {a d v}} = \mathbb {E} _ {q \left(\boldsymbol {x} _ {0} \mid \boldsymbol {x} _ {t}\right)} \left[ \log \mathcal {D} _ {\Phi} \left(\boldsymbol {x} _ {0}, \boldsymbol {x} _ {t}, t\right) \right] \\ \left. + \mathbb {E} _ {p _ {\Theta} \left(\hat {\boldsymbol {x}} _ {0} ^ {t} \mid \boldsymbol {x} _ {t}\right)} \left[ \log \left(1 - \mathcal {D} _ {\Phi} \left(\hat {\boldsymbol {x}} _ {0} ^ {t}, \boldsymbol {x} _ {t}, t\right)\right) \right], \right. \tag {11} \\ \end{array} +$$ + +where fake trajectories $p_{\Theta}(\hat{\boldsymbol{x}}_0^t | \boldsymbol{x}_t)$ are contrasted with real trajectories $q(\boldsymbol{x}_0 | \boldsymbol{x}_t)$ . To further stabilize training, we apply the $R_1$ gradient penalty to the discriminator parameters (Mescheder et al., 2018). In Appx. D, we explore alternative matching approaches, including the standard adversarial method of comparing individual reconstructions $\hat{\boldsymbol{x}}_0^t$ with real images $\boldsymbol{x}_0$ , matching the trajectory steps $\boldsymbol{x}_t \rightarrow \boldsymbol{x}_{t - \Delta t}$ (Xiao et al., 2022; Wang et al., 2024a), and our start-to-end trajectory matching $\boldsymbol{x}_t \rightarrow \boldsymbol{x}_0$ , with the latter showing the best performance. + +Final training objective combines $\mathcal{L}_{\mathrm{score}}$ , $\mathcal{L}_{\mathrm{LPIPS}}$ , and $\mathcal{L}_{\mathrm{adv}}$ with empirically adjusted weights (see Appx. C.2). + +Note that applying LPIPS and adversarial losses on the estimated one-step sample could lead to potential objective bias. However, we would like to emphasize that $\epsilon$ -VAE differs significantly from traditional diffusion models in that its diffusion decoder is conditioned on encoded latents $z$ . This conditioning provides a strong prior about the input image to reconstruct, resulting in a more accurate estimated one-step sample than in typical diffusion scenarios. Therefore, we believe the potential for objective bias is considerably reduced in $\epsilon$ -VAE. Fine-tuning the diffusion decoder with frozen $z$ like Sargent et al. (2025) could be a promising avenue for further improvement, which we will explore in our future work. + +# 3.3. Noise and time scheduling + +Noise scheduling. In diffusion models, noise scheduling involves progressively adding noise to the data over time + +by defining specific functions for $\alpha_{t}$ and $\sigma_{t}$ in Eq. 2. This process is crucial as it determines the signal-to-noise ratio, $\lambda_{t} = \frac{\alpha_{t}^{2}}{\sigma_{t}^{2}}$ , which directly influences training dynamics. Noise scheduling can also be adjusted by scaling the intermediate states $\pmb{x}_{t}$ with a constant factor $\gamma \in (0,1]$ , which shifts the signal-to-noise ratio downward. This makes training more challenging over time while preserving the shape of the trajectory (Chen, 2023). + +In this work, we define $\alpha_{t}$ and $\sigma_{t}$ according to rectified flow formulation, while also scaling $\pmb{x}_{t}$ by $\gamma$ , with the value chosen empirically. However, when $\gamma \neq 1$ , the variance of $\pmb{x}_{t}$ changes, which can degrade performance (Karras et al., 2022). To address this, we normalize the denoising input $\pmb{x}_{t}$ by its variance after scaling, ensuring it preserves unit variance over time (Chen, 2023). + +Time scheduling. Another important aspect in diffusion models is time scheduling for both training and sampling, controlled by $\pi(t)$ during training and $\Delta t$ during sampling, as outlined in Eq. 3 and Eq. 4. A common choice for $\pi(t)$ is the uniform distribution $\mathcal{U}(0,T)$ , which applies equal weight to each time step during training. Similarly, uniform time steps $\Delta t = \frac{1}{T}$ are typically used for sampling. However, to improve model performance on more challenging time steps and focus on noisy regimes during sampling, the time scheduling strategy should be adjusted accordingly. + +In this work, we sample $t$ from a logit-normal distribution (Atchison & Shen, 1980), which emphasizes intermediate timesteps (Esser et al., 2024). During sampling, we apply a reversed logarithm mapping $\rho_{\log}$ defined as: + +$$ +\rho_ {\log} (t; m, n) = \frac {\log (m) - \log (t \cdot (m - n) + n)}{\log (m) - \log (n)}, \tag {12} +$$ + +where we set $m = 1$ and $n = 100$ , resulting in denser sampling steps early in the inference process. + +# 4. Experiments + +We evaluate the effectiveness of $\epsilon$ -VAE on image reconstruction and generation tasks using the ImageNet (Deng et al., 2009). The VAE formulation by Esser et al. (2021) serves as a strong baseline due to its widespread use in modern image generative models (Rombach et al., 2022; Peebles & Xie, 2023; Esser et al., 2024). We perform controlled experiments to compare reconstruction and generation quality by varying model scale, latent dimension, downsampling rates, and input resolution. + +Model configurations. We use the encoder and discriminator architectures from VQGAN (Esser et al., 2021) and keep consistent across all models. The decoder design follows BigGAN (Brock et al., 2019) for VAE and from ADM (Dhariwal & Nichol, 2021) for $\epsilon$ -VAE. Additionally, we experiment with the DiT architecture (Peebles & Xie, + +2023) for $\epsilon$ -VAE. To evaluate model scaling, we test five decoder variants: base (B), medium (M), large (L), extra-large (XL), and huge (H), by adjusting width and depth accordingly. Further model specifications are provided in Appx. C.1. + +We experiment with the following two encoder configurations. $\epsilon$ -VAE-lite: a light-weight version with 6M parameters, a downsampling rate of 16, and 8 latent channels; $\epsilon$ -VAE-SD: a standard version based on Stable Diffusion with 34M parameters, a downsampling rate of 8, and 4 latent channels. $\epsilon$ -VAE-lite is intentionally designed as a more challenging setup and serves as the primary focus of analysis in the paper. For this configuration, we further explore downsampling rates of 4, 8, and 32, as well as latent dimensions of 4, 16, and 32 channels. Both VAE and $\epsilon$ -VAE are trained to reconstruct $128 \times 128$ images under these controlled conditions. Additionally, we validate our method in the standard setup of $\epsilon$ -VAE-SD, where we compare it against state-of-the-art VAEs. + +Evaluation. We evaluate the autoencoder on both reconstruction and generation quality using Fréchet Inception Distance (FID) (Heusel et al., 2017) as the primary metric, and we also report PSNR and SSIM as secondary metrics. For reconstruction quality (rFID), FID is computed at both training and higher resolutions to assess generalization across resolutions. For generation quality (FID), we generate latents from the trained autoencoders and use them to train the DiT-XL/2 latent generative model (Peebles & Xie, 2023). This latent model remains fixed across all generation experiments, meaning improved autoencoder latents directly enhance generation quality. + +# 4.1. Reconstruction quality + +Decoder architecture. We explore two major architectural designs: the UNet-based architecture from ADM (Dhariwal & Nichol, 2021) and the Transformer-based DiT (Peebles & Xie, 2023). We compare various model sizes-ADM:{B, M, L, XL, H} and DiT:{S, B, L, XL} with patch sizes of $\{4,8\}$ . The results are summarized in Fig. 2 (left). ADM consistently outperforms DiT across the board. While we observe rFID improvements in DiT when increasing the number of tokens by reducing patch size, this comes with significant computational overhead. The overall result aligns with the original design intentions: ADM for pixel-level generation and DiT for latent-level generation. For the following experiments, we use the ADM architecture for our diffusion decoder. + +Compression rate. Compression can be achieved by adjusting either the channel dimensions of the latents or the downsampling factor of the encoder. In Fig. 2 (middle and right), we compare VAE and $\epsilon$ -VAE across these two aspects. The results show that $\epsilon$ -VAE consistently outperforms VAE + +![](images/539d4fe1a47afc714b52dda6e2d3f6f0b1d52428f181021a61dd001fff47c5b5.jpg) +Figure 2. Architecture and compression analysis. The $\epsilon$ -VAE decoder uses either a UNet-based ADM or Transformer-based DiT (left). $\epsilon$ -VAE and VAE are evaluated under different compression rates by varying latent channel dimensions (middle) or encoder downsampling factors (right). We follow the $\epsilon$ -VAE-lite configuration in these experiments. + +![](images/4380af379a1812809d22792d07eb6783e5fea07ff20187d7d1533729fcf85e7c.jpg) + +![](images/f0eadf094e591e475a147558a38e7c39fe6374fbbe1375c2f89d367895108e40.jpg) + +Table 1. ImageNet reconstruction results (rFID) at different resolutions using VAEs trained at ${128} \times {128}$ . † denotes training at ${128} \times {128}$ followed by fine-tuning at a higher resolution. + +
Resolution (ImageNet)128256512\( 256^{\dagger} \)
SD-VAE (Rombach et al., 2022)4.541.210.910.86
LiteVAE (Sadat et al., 2024)4.400.97-0.73
ε-VAE-SD (B)1.940.650.610.52
ε-VAE-SD (M)1.580.550.530.47
ε-VAE-SD (L)1.470.520.410.45
ε-VAE-SD (XL)1.340.490.390.43
ε-VAE-SD (H)1.000.440.350.38
+ +in terms of rFID, particularly as the compression ratio increases. Specifically, as shown on the middle graph, $\epsilon$ -VAE achieves lower rFIDs than VAE across all channel dimensions, with a notable gap at lower dimensions (4 and 8). On the right graph, $\epsilon$ -VAE maintains lower rFIDs than VAE even as the downsampling factor increases, with the gap widening significantly at larger factors (16 and 32). Furthermore, $\epsilon$ -VAE delivers comparable or superior rFIDs even when the compression ratio is doubled, demonstrating its robustness and effectiveness in high-compression scenarios. + +Resolution generalization. A notable feature of conventional autoencoders is their capacity to generalize and reconstruct images at higher resolutions during inference (Rombach et al., 2022). To assess this, we conduct inference on images with resolutions of $256 \times 256$ and $512 \times 512$ , using $\epsilon$ -VAE and VAE models trained at $128 \times 128$ . As shown in Tab. 1, $\epsilon$ -VAE effectively generalizes to higher resolutions, consistently preserving its performance advantage over other VAEs. Furthermore, we find that fine-tuning models at the target (higher) resolution leads to improvement at it, which is consistent with the observation made by Sadat et al. (2024). We hence utilize this multi-stage training strategy in the following experiments when the target resolution is larger than $128 \times 128$ . + +Comparisons to state-of-the-art VAEs. We provide image reconstruction results under the same configuration as VAEs in Stable Diffusion (SD-VAE): an encoder with 34M parameters and a channel dimension of 4 for $256 \times 256$ image reconstruction. We evaluate rFID, PSNR and SSIM on the full validation sets of ImageNet and COCO-2017 (Lin et al., 2014), with the results summarized in Tab. 2. Our finds reveal that $\epsilon$ -VAE outperforms state-of-the-art VAEs when the decoder sizes are comparable, and its performance can be further improved by scaling up the decoder. This demonstrates the strong model scalability of our framework. + +One-step $\epsilon$ -VAE. Note that the denoising process of $\epsilon$ -VAE demonstrates promising results even with a single iteration. To show this, we provide a direct comparison between SD-VAE and our one-step $\epsilon$ -VAE models in Tab. 3. This table presents image reconstruction quality on ImageNet $256 \times 256$ with the $8 \times 8$ downsampling factor. As shown, both $\epsilon$ -VAE (B) and $\epsilon$ -VAE (M) outperform SD-VAE across all metrics. These results confirm the effectiveness and efficiency of our one-step models compared to SD-VAE. Consequently, this allows $\epsilon$ -VAE to be adapted for scenarios with latency-sensitive requirements, e.g., real-time visualization during image generation, by reducing the decoding step to a single pass. + +# 4.2. Class-conditional image generation + +We now evaluate the generative performance of $\epsilon$ -VAE when combined with latent diffusion models (Rombach et al., 2022). We perform standard class-conditional image generation tasks using the DiT-XL/2 model as our latent generative model (Peebles & Xie, 2023). Further details on the training setup are provided in Appx. C.3. Tab. 4 presents the image generation results of $\epsilon$ -VAE and other competing VAEs at resolutions of $256 \times 256$ . The results show that $\epsilon$ -VAE consistently outperforms other VAEs across different downsampling factors. In addition, we emphasize that $\epsilon$ -VAE achieves favorable generation quality while using only $25\%$ of the token length typically required by SD-VAE. + +Table 2. Comparisons with state-of-the-art image autoencoders. All results are computed on $256 \times 256$ ImageNet 50K validation set and COCO-2017 5K validation set. $\epsilon$ -VAE-SD (M) achieves better reconstruction quality while having similar parameters (49M) in the decoder with other VAEs. Further improvements are obtained after we scale up to $\epsilon$ -VAE-SD (H) which has 355M decoder parameters. + +
Downsample factorMethodDiscrete latentLatent dim.rFID↓ImageNet PSNR↑SSIM↑rFID↓COCO PSNR↑SSIM↑
16 × 16VQGAN (Esser et al., 2021)✓2564.9920.000.62912.2919.570.630
MaskGIT (Chang et al., 2022)✓2562.28-----
LlamaGen (Sun et al., 2024)✓82.1920.790.6758.1120.420.678
SD-VAE (Rombach et al., 2022)X42.9320.570.6628.8919.950.670
ε-VAE-SD (M)X41.9121.270.6936.1222.380.718
ε-VAE-SD (H)X41.3522.600.7114.1824.260.830
8 × 8VQGAN (Esser et al., 2021)✓41.1923.380.7625.8923.080.771
ViT-VQGAN (Yu et al., 2022)✓321.28-----
LlamaGen (Sun et al., 2024)✓80.5924.450.8134.1924.200.822
SD-VAE (Rombach et al., 2022)X40.7425.680.8204.4525.410.831
SDXL-VAE (Podell et al., 2024)X40.6826.040.8344.0725.760.845
LiteVAE (Sadat et al., 2024)X40.8726.020.740---
ε-VAE-SD (M)X40.4727.650.8413.9825.880.850
ε-VAE-SD (H)X40.3829.490.8513.6526.010.856
+ +Table 3. Image reconstruction results of one-step $\epsilon$ -VAE and SD-VAE on ImageNet $256 \times 256$ . A downsampling factor of $8 \times 8$ is used for comparison. We include two variants of our model in the results: $\epsilon$ -VAE-SD (B), which has a similar inference speed to SD-VAE, and $\epsilon$ -VAE-SD (M), which matches SD-VAE in the number of parameters. + +
MethodrFID↓PSNR↑SSIM↑
SD-VAE (Rombach et al., 2022)0.7425.680.820
ε-VAE-SD (B)0.5725.910.826
ε-VAE-SD (M)0.5126.450.830
+ +This token length reduction significantly accelerates latent diffusion model generation, leading to $2.3 \times$ higher inference throughput while maintaining competitive generation quality. These results confirm that the performance gains from the reconstruction task successfully transfer to the generation task, further validating the effectiveness of $\epsilon$ -VAE. + +More importantly, $\epsilon$ -VAE-SD achieves around $25\%$ improvement in generation quality over SD-VAE at the $32 \times 32$ downsampling factor, alongside a $3.2 \times$ inference speedup than SD-VAE at the $16 \times 16$ downsampling factor with comparable FID. We observed similar training speedups for latent diffusion models utilizing $\epsilon$ -VAE at this higher downsampling rate. These gains are more pronounced than those observed when increasing the downsampling factor from $8 \times 8$ to $16 \times 16$ . These findings strongly suggest that the benefits of $\epsilon$ -VAE and latent diffusion pipeline could be amplified with higher downsampling factors. + +An additional advantage of scaling the autoencoder over the latent model lies in computational efficiency. Recent trends show latent diffusion models increasingly adopt Transformer architectures (Peebles & Xie, 2023), where + +Table 4. Benchmarking class-conditional image generation on ImageNet $256 \times 256$ . We use the DiT-XL/2 architecture (Esser et al., 2024) for latent diffusion models, and we do not apply classifier-free guidance (Ho & Salimans, 2022). + +
Downsample factorMethodThroughput (image/ks)FID↓
32 × 32SD-VAE (Rombach et al., 2022)399121.31
ε-VAE-SD (M)386515.98
ε-VAE-SD (H)387014.26
16 × 16SD-VAE (Rombach et al., 2022)122014.59
ε-VAE-SD (M)119210.68
ε-VAE-SD (H)11809.72
8 × 8Asym-VAE (Zhu et al., 2023)5022.3×10.85
Omni-VAE (Wang et al., 2024b)48012.25
SD-VAE (Rombach et al., 2022)52211.63
ε-VAE-SD (M)4919.39
ε-VAE-SD (H)4778.85
+ +self-attention scales quadratically with input resolution. In contrast, our convolution-based UNet decoder offers more favorable linear scaling. As models grow, shifting complexity to the autoencoder helps reduce the burden on the latent model, leading to a more efficient overall system. + +# 4.3. Ablation studies + +We conduct a component-wise analysis to validate our key design choices, focusing on three critical aspects: architecture, objectives, and noise & time scheduling. We evaluate the reconstruction quality (rFID) and sampling efficiency (NFE). The results are summarized in Tab. 5. + +Baseline. Our evaluation begins with a baseline model: an autoencoder with a diffusion decoder, trained solely using the score matching objective. This baseline follows the vanilla diffusion setup from Ho et al. (2020), including their + +Table 5. Ablation study on key design choices for the $\epsilon$ -VAE diffusion decoder. A systematic evaluation of the proposed architecture (★), objectives (†), and noise & time scheduling (§). Each row progressively modifies or builds upon the baseline decoder, showing improvements in performance. The results are computed under the $\epsilon$ -VAE-lite configuration. + +
AblationNFE↓rFID↓
Baseline: DDPM-based diffusion decoder1,00028.22
† (a) Diffusion → Rectified flow parameterization10024.11
§ (b) Uniform → Logit-normal time step sampling during training5023.44
* (c) DDPM UNet → ADM UNet5022.04
† (d) Perceptual matching on x̂0t and x01011.76
† (e) Adversarial denoising trajectory matching on (x̂0t, x̂t) and (x0, x̂t)58.24
§ (f) Scale x̂t by γ = 0.657.08
§ (g) Uniform → Reversed logarithm time spacing during inference36.24
+ +![](images/75af22dd8c80db09cb6248aad6e1c03eeb7ac5c2fb9e88af8f33745d4fc27c9e.jpg) +Figure 3. Impact of our major diffusion decoder designs. Improved training objectives, particularly perceptual matching loss and adversarial denoising trajectory matching loss, significantly contribute to better rFID scores and NFE (left). Effective noise scheduling by modulating the scaling factor $\gamma$ further enhances rFID, with an optimum value of 0.6 in our experiments (middle). Lastly, adjusting time step spacing during inference ensures stable sampling in low NFE regimes (right). We report results under the $\epsilon$ -VAE-lite configuration. + +![](images/476f4d99fdae430e1b6537457af4f002a18d4c1077dc4bff1002a8cd9ce99423.jpg) + +![](images/4bcd61af086642ca6cb5ecef18b809e692c529155fab4d02c2ebe3180ad5d413.jpg) + +UNet architecture, parameterization, and training configurations, while extending to a conditional form as described in Eq. 8. Building on this baseline, we progressively introduce updates and evaluate the impact of our proposed method. + +Impact of proposals. In (a), transitioning from standard diffusion to rectified flow (Liu et al., 2023) straightens the optimization path, resulting in significant gains in rFID and NFE. In (b), adopting a logit-normal time step distribution optimizes rectified flow training (Esser et al., 2024), further improving both rFID and NFE. In (c), updates to the UNet architecture (Nichol & Dhariwal, 2021) contribute to enhanced rFID scores. In (d), LPIPS loss is applied to match reconstructions $\hat{\pmb{x}}_0^t$ with real images $\pmb{x}_0$ . In (e), adversarial trajectory matching loss aligns $(\hat{\pmb{x}}_0^t,\pmb{x}_t)$ with $(x_0,x_t)$ , the target transition in rectified flow. Both objectives improve model understanding of the underlying optimization trajectory, significantly enhancing rFID scores and NFE. + +Up to this point, with the full implementation of Eq. 1, we can compare our proposal with the VAE (B) model, which achieves an rFID score of 11.15. Our model, with a score of 8.24, already surpasses this baseline. We further improve performance by optimizing noise and time scheduling within our framework, as described next. + +In (f), scaling $\boldsymbol{x}_t$ reduces the signal-to-noise ratio (Chen, 2023), presenting challenges for more effective learning during training. Fig. 3 (middle) demonstrates that a scaling factor of 0.6 produces the best results. Finally, in (g), reversed logarithmic time step spacing during inference allows for denser evaluations in noisier regions. Fig. 3 (right) demonstrates that this method provides more stable sampling in the lower NFE regime compared to the original uniform spacing. + +In Fig. 3 (right), reconstruction quality degrades when the number of denoising steps exceeds three. To enable large step sizes for the reverse process during inference, we introduce the denoising trajectory matching loss to implicitly model the conditional distribution $p(\pmb{x}_0|\pmb{x}_t)$ , shifting the denoising distributions from traditional Gaussian to non-Gaussian multimodal forms (Xiao et al., 2022). However, the assumptions underlying this approach are most effective when the total number of denoising steps is small. This reveals an optimal range of one to three inference steps. The degradation beyond this range also suggests that uniform step spacing may no longer be ideal. Accordingly, we empirically explored alternative sampling strategies and found that a reversed logarithmic schedule yields improved performance, as shown in the figure. + +![](images/d7195a572ef33ea7a36f2026e42719f9ca7081811628f536ea631fab725afb9b.jpg) +Figure 4. Image reconstruction results under the SD-VAE configuration (Rombach et al., 2022) at the resolution of $512 \times 512$ . We find that $\epsilon$ -VAE produces more accurate visual details than SD-VAE in the highlighted regions with text or human face. Best viewed when zoomed-in and in color. + +# 4.4. Visualization + +In addition to the quantitative results, Fig. 4 shows high-resolution image reconstruction samples produced by SD-VAE (Rombach et al., 2022) and $\epsilon$ -VAE at the resolution of $512 \times 512$ . We observe that reconstructed images generated by $\epsilon$ -VAE demonstrate a better visual quality than ones of SD-VAE. In particular, $\epsilon$ -VAE maintains a good visual quality for small text and human face. We provide more visual comparisons in Appx. E and throughout discussions on the major properties and advantages of $\epsilon$ -VAE compared to traditional VAEs in Appx. A. + +# 5. Conclusion + +We present $\epsilon$ -VAE, an effective visual tokenizer that introduces a diffusion decoder into standard autoencoders, turning single-step decoding into a multi-step probabilistic process. By exploring key design choices in modeling, + +objectives, and diffusion training, we demonstrate significant performance improvements. Our approach outperforms traditional autoencoders in both reconstruction and generation quality, particularly in high-compression scenarios. We hope our concept of iterative generation during decoding inspires further advancements in visual autoencoding. + +# Acknowledgements + +We would like to thank Xingyi Zhou, Weijun Wang, and Caroline Pantofaru for reviewing the paper and providing feedback. We thank Rui Qian, Xuan Yang, and Mingda Zhang for helpful discussion. We also thank the Google Kauldron team for technical assistance. + +# Impact statement + +Our work could lead to improved autoencoding techniques which have the potential to benefit generative modeling + +across various perspectives, including reducing training time and memory requirements, improving visual qualities, etc. Although our work does not uniquely raise any new ethical challenges, visual generative modeling is a field with several ethical concerns worth acknowledging. For example, there are known issues around bias and fairness, either in the representation of generated images (Menon et al., 2020) or the implicit encoding of stereotypes (Steed & Caliskan, 2021), as well as potential risks in privacy. To ensure that the benefits of this technology are harnessed responsibly, we encourage continued open discussions in the community around the development of these new technologies. + +# References + +Albergo, M. S. and Vanden-Eijnden, E. Building normalizing flows with stochastic interpolants. In ICLR, 2023. +Arjovsky, M., Chintala, S., and Bottou, L. Wasserstein generative adversarial networks. In ICML, pp. 214-223, 2017. +Atchison, J. and Shen, S. M. Logistic-normal distributions: Some properties and uses. Biometrika, 67(2):261-272, 1980. +Baldridge, J., Bauer, J., Bhutani, M., Brichtova, N., Bunner, A., Chan, K., Chen, Y., Dieleman, S., Du, Y., Eaton-Rosen, Z., et al. Imagen 3. arXiv preprint arXiv:2408.07009, 2024. +Birodkar, V., Barcik, G., Lyon, J., Ioffe, S., Minnen, D., and Dillon, J. V. Sample what you cant compress. arXiv preprint arXiv:2409.02529, 2024. +Blau, Y. and Michaeli, T. The perception-distortion tradeoff. In CVPR, pp. 6228-6237, 2018. +Blau, Y. and Michaeli, T. Rethinking lossy compression: The rate-distortion-perception tradeoff. In ICML, pp. 675-685, 2019. +Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/jax-ml/jax. +Brock, A., Donahue, J., and Simonyan, K. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019. +Brooks, T., Peebles, B., Holmes, C., DePue, W., Guo, Y., Jing, L., Schnurr, D., Taylor, J., Luhman, T., Luhman, E., Ng, C., Wang, R., and Ramesh, A. Video generation models as world simulators. OpenAI Blog, 2024. URL https://openai.com/sora/. + +Chang, H., Zhang, H., Jiang, L., Liu, C., and Freeman, W. T. MaskGIT: Masked generative image transformer. In CVPR, pp. 11315-11325, 2022. +Chen, J., Cai, H., Chen, J., Xie, E., Yang, S., Tang, H., Li, M., Lu, Y., and Han, S. Deep compression autoencoder for efficient high-resolution diffusion models. arXiv preprint arXiv:2410.10733, 2024. +Chen, M., Radford, A., Child, R., Wu, J., Jun, H., Luan, D., and Sutskever, I. Generative pretraining from pixels. In ICML, pp. 1691-1703, 2020. +Chen, T. On the importance of noise scheduling for diffusion models. arXiv preprint arXiv:2301.10972, 2023. +Chen, T., Li, L., Saxena, S., Hinton, G., and Fleet, D. J. A generalist framework for panoptic segmentation of images and videos. In ICCV, pp. 909-919, 2023. +Chen, Y., Girdhar, R., Wang, X., Rambhatla, S. S., and Misra, I. Diffusion autoencoders are scalable image tokenizers. arXiv preprint arXiv:2501.18593, 2025. +Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. ImageNet: A large-scale hierarchical image database. In CVPR, pp. 248-255, 2009. +Dhariwal, P. and Nichol, A. Diffusion models beat GANs on image synthesis. In NeurIPS, 2021. +Ding, Z., Zhang, M., Wu, J., and Tu, Z. Patched denoising diffusion models for high-resolution image synthesis. In ICLR, 2024. +Esser, P., Rombach, R., and Ommer, B. Taming transformers for high-resolution image synthesis. In CVPR, pp. 12873-12883, 2021. +Esser, P., Kulal, S., Blattmann, A., Entezari, R., Müller, J., Saini, H., Levi, Y., Lorenz, D., Sauer, A., Boesel, F., Podell, D., Dockhorn, T., English, Z., Lacey, K., Goodwin, A., Marek, Y., and Rombach, R. Scaling rectified flow transformers for high-resolution image synthesis. In ICML, 2024. +Euler, L. Institutionum calculi integralis, volume 4. impensis Academiae imperialis scientiarum, 1845. +Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. Generative adversarial nets. In NeurIPS, 2014. +Gupta, A., Yu, L., Sohn, K., Gu, X., Hahn, M., Fei-Fei, L., Essa, I., Jiang, L., and Lezama, J. Photorealistic video generation with diffusion models. arXiv preprint arXiv:2312.06662, 2023. + +Heek, J., Levskaya, A., Oliver, A., Ritter, M., Rondepierre, B., Steiner, A., and van Zee, M. Flax: A neural network library and ecosystem for JAX, 2024. URL http://github.com/google/flax. +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. In NeurIPS, 2017. +Hinton, G. E. and Salakhutdinov, R. R. Reducing the dimensionality of data with neural networks. Science, 313 (5786):504-507, 2006. +Ho, J. and Salimans, T. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. In NeurIPS, 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. +Hoogeboom, E., Agustsson, E., Mentzer, F., Versari, L., Toderici, G., and Theis, L. High-fidelity image compression with score-based generative models. arXiv preprint arXiv:2305.18231, 2023a. +Hoogeboom, E., Heek, J., and Salimans, T. simple diffusion: End-to-end diffusion for high resolution images. In ICML, pp. 13213-13232, 2023b. +Karras, T., Laine, S., and Aila, T. A style-based generator architecture for generative adversarial networks. In CVPR, pp. 4401-4410, 2019. +Karras, T., Aittala, M., Aila, T., and Laine, S. Elucidating the design space of diffusion-based generative models. In NeurIPS, 2022. +Kingma, D. and Gao, R. Understanding diffusion objectives as the elbo with simple data augmentation. In NeurIPS, 2024. +Kingma, D. P. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. In ICLR, 2015. +Kondratyuk, D., Yu, L., Gu, X., Lezama, J., Huang, J., Hornung, R., Adam, H., Akbari, H., Alon, Y., Birodkar, V., et al. VideoPoet: A large language model for zero-shot video generation. In ICML, 2024. +Kynkänniemi, T., Karras, T., Laine, S., Lehtinen, J., and Aila, T. Improved precision and recall metric for assessing generative models. In NeurIPS, 2019. + +Lee, S., Kim, B., and Ye, J. C. Minimizing trajectory curvature of ODE-based generative models. In ICML, pp. 18957-18973, 2023. +Lee, S., Lin, Z., and Fanti, G. Improving the training of rectified flows. arXiv preprint arXiv:2405.20320, 2024. +Li, T., Tian, Y., Li, H., Deng, M., and He, K. Autoregressive image generation without vector quantization. arXiv preprint arXiv:2406.11838, 2024. +Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollar, P., and Zitnick, C. L. Microsoft COCO: Common objects in context. In ECCV, pp. 740-755, 2014. +Liu, X., Gong, C., and Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow. In ICLR, 2023. +Luo, S., Tan, Y., Huang, L., Li, J., and Zhao, H. Latent consistency models: Synthesizing high-resolution images with few-step inference. arXiv preprint arXiv:2310.04378, 2023. +Ma, N., Goldstein, M., Albergo, M. S., Boffi, N. M., Vanden-Eijnden, E., and Xie, S. SiT: Exploring flow and diffusion-based generative models with scalable interpolant transformers. arXiv preprint arXiv:2401.08740, 2024. +Menon, S., Damian, A., Hu, S., Ravi, N., and Rudin, C. PULSE: Self-supervised photo upsampling via latent space exploration of generative models. In CVPR, pp. 2437-2445, 2020. +Mescheder, L., Geiger, A., and Nowozin, S. Which training methods for GANs do actually converge? In ICML, pp. 3481-3490, 2018. +Nguyen, T. H. and Tran, A. SwiftBrush: One-step text-to-image diffusion model with variational score distillation. In CVPR, pp. 7807-7816, 2024. +Nichol, A. Q. and Dhariwal, P. Improved denoising diffusion probabilistic models. In ICML, pp. 8162-8171, 2021. +Peebles, W. and Xie, S. Scalable diffusion models with transformers. In ICCV, pp. 4195-4205, 2023. +Perez, E., Strub, F., De Vries, H., Dumoulin, V., and Courville, A. FiLM: Visual reasoning with a general conditioning layer. In AAAI, 2018. +Pernias, P., Rampas, D., Richter, M. L., Pal, C. J., and Aubreville, M. Würstchen: An efficient architecture for large-scale text-to-image diffusion models. In ICLR, 2024. + +Podell, D., English, Z., Lacey, K., Blattmann, A., Dockhorn, T., Müller, J., Penna, J., and Rombach, R. SDXL: Improving latent diffusion models for high-resolution image synthesis. In *ICLR*, 2024. +Preechakul, K., Chathee, N., Wizadwongsa, S., and Suwajanakorn, S. Diffusion autoencoders: Toward a meaningful and decodable representation. In CVPR, pp. 10619-10629, 2022. +Radford, A., Narasimhan, K., Salimans, T., and Sutskever, I. Improving language understanding by generative pretraining. OpenAI Blog, 2018. +Razavi, A., Van den Oord, A., and Vinyals, O. Generating diverse high-fidelity images with VQ-VAE-2. In NeurIPS, 2019. +Rombach, R., Blattmann, A., Lorenz, D., Esser, P., and Ommer, B. High-resolution image synthesis with latent diffusion models. In CVPR, pp. 10684-10695, 2022. +Sadat, S., Buhmann, J., Bradley, D., Hilliges, O., and Weber, R. M. LiteVAE: Lightweight and efficient variational autoencoders for latent diffusion models. arXiv preprint arXiv:2405.14477, 2024. +Saharia, C., Chan, W., Chang, H., Lee, C., Ho, J., Salimans, T., Fleet, D., and Norouzi, M. Palette: Image-to-image diffusion models. In ACM SIGGRAPH, pp. 1-10, 2022a. +Saharia, C., Ho, J., Chan, W., Salimans, T., Fleet, D. J., and Norouzi, M. Image super-resolution via iterative refinement. IEEE TPAMI, 45(4):4713-4726, 2022b. +Salimans, T., Goodfellow, I., Zaremba, W., Cheung, V., Radford, A., and Chen, X. Improved techniques for training GANs. In NeurIPS, 2016. +Sargent, K., Hsu, K., Johnson, J., Fei-Fei, L., and Wu, J. Flow to the mode: Mode-seeking diffusion autoencoders for state-of-the-art image tokenization. arXiv preprint arXiv:2503.11056, 2025. +Sauer, A., Lorenz, D., Blattmann, A., and Rombach, R. Adversarial diffusion distillation. In ECCV, pp. 87-103, 2024. +Shannon, C. E. et al. Coding theorems for a discrete source with a fidelity criterion. IRE Nat. Conv. Rec, 4(142-163): 1, 1959. +Shi, J., Wu, C., Liang, J., Liu, X., and Duan, N. DiVAE: Photorealistic images synthesis with denoising diffusion decoder. arXiv preprint arXiv:2206.00386, 2022. +Simonyan, K. and Zisserman, A. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. + +Song, Y. and Ermon, S. Generative modeling by estimating gradients of the data distribution. In NeurIPS, 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 ICLR, 2021. +Steed, R. and Caliskan, A. Image representations learned with unsupervised pre-training contain human-like biases. In ACM conference on fairness, accountability, and transparency, pp. 701-713, 2021. +Sun, P., Jiang, Y., Chen, S., Zhang, S., Peng, B., Luo, P., and Yuan, Z. Autoregressive model beats diffusion: Llama for scalable image generation. arXiv preprint arXiv:2406.06525, 2024. +Van den Oord, A., Kalchbrenner, N., Espeholt, L., Vinyals, O., Graves, A., et al. Conditional image generation with pixelCNN decoders. In NeurIPS, 2016. +Van Den Oord, A., Vinyals, O., et al. Neural discrete representation learning. In NeurIPS, 2017. +Wang, F.-Y., Huang, Z., Bergman, A. W., Shen, D., Gao, P., Lingelbach, M., Sun, K., Bian, W., Song, G., Liu, Y., et al. Phased consistency model. arXiv preprint arXiv:2405.18407, 2024a. +Wang, J., Jiang, Y., Yuan, Z., Peng, B., Wu, Z., and Jiang, Y.-G. OmniTokenizer: A joint image-video tokenizer for visual generation. arXiv preprint arXiv:2406.09399, 2024b. +Wang, Z., Jiang, Y., Zheng, H., Wang, P., He, P., Wang, Z. A., Chen, W., and Zhou, M. Patch diffusion: Faster and more data-efficient training of diffusion models. In NeurIPS, 2024c. +Wu, Y. and He, K. Group normalization. In ECCV, pp. 3-19, 2018. +Xiao, Z., Kreis, K., and Vahdat, A. Tackling the generative learning trilemma with denoising diffusion GANs. In ICLR, 2022. +Yang, R. and Mandt, S. Lossy image compression with conditional diffusion models. In NeurIPS, 2024. +Yu, J., Li, X., Koh, J. Y., Zhang, H., Pang, R., Qin, J., Ku, A., Xu, Y., Baldridge, J., and Wu, Y. Vector-quantized image modeling with improved VQGAN. In ICLR, 2022. +Yu, L., Cheng, Y., Sohn, K., Lezama, J., Zhang, H., Chang, H., Hauptmann, A. G., Yang, M.-H., Hao, Y., Essa, I., et al. MAGVIT: Masked generative video transformer. In CVPR, pp. 10459-10469, 2023. + +Yu, L., Lezama, J., Gundavarapu, N. B., Versari, L., Sohn, K., Minnen, D., Cheng, Y., Gupta, A., Gu, X., Hauptmann, A. G., et al. Language model beats diffusion-tokenizer is key to visual generation. In ICLR, 2024a. +Yu, Q., Weber, M., Deng, X., Shen, X., Cremers, D., and Chen, L.-C. An image is worth 32 tokens for reconstruction and generation. arXiv preprint arXiv:2406.07550, 2024b. +Zhang, R., Isola, P., Efros, A. A., Shechtman, E., and Wang, O. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, pp. 586-595, 2018. +Zhao, Y., Xiong, Y., and Krahenbuhl, P. Image and video tokenization with binary spherical quantization. arXiv preprint arXiv:2406.07548, 2024. +Zhu, Z., Feng, X., Chen, D., Bao, J., Wang, L., Chen, Y., Yuan, L., and Hua, G. Designing a better asymmetric VQGAN for StableDiffusion. arXiv preprint arXiv:2306.04632, 2023. + +# A. Discussion + +Distribution-aware compression. Traditional image compression methods optimize the rate-distortion trade-off (Shannon et al., 1959), prioritizing compactness over input fidelity. Building on this, we also aim to capture the broader input distribution during compression, generating compact representations suitable for latent generative models. This approach introduces an additional dimension to the trade-off, perception or distribution fidelity (Blau & Michaeli, 2018), which aligns more closely with the rate-distortion-perception framework (Blau & Michaeli, 2019). + +Iterative and stochastic decoding. A key question within the rate-distortion-perception trade-off is whether the iterative, stochastic nature of diffusion decoding offers advantages over traditional single-step, deterministic methods (Kingma, 2013). The strengths of diffusion (Ho et al., 2020) lie in its iterative process, which progressively refines the latent space for more accurate reconstructions, while stochasticity allows for capturing complex variations within the distribution. Although iterative methods may appear less efficient, our formulation is optimized to achieve optimal results in just three steps and also supports single-step decoding, ensuring decoding efficiency remains practical (see Fig. 3 (left)). While stochasticity might suggest the risk of "hallucination" in reconstructions, the outputs remain faithful to the underlying distribution by design, producing perceptually plausible results. This advantage is particularly evident under extreme compression scenarios (see Fig. 5), with the degree of stochasticity adapting based on compression levels (see Fig. 6). + +Multi-step vs. single-step decoding. While replacing single-step decoding with an iterative process may seem counter-intuitive due to increased computational cost, the diffusion-based decoder addresses this concern in three key ways. First, it offers scalable inference, where even a single-step variant already outperforms a plain VAE decoder, and additional steps further enhance quality (see Tab. 3). Second, it provides controllable trade-offs between computation and visual fidelity, allowing the number of steps to be adjusted at inference time based on application needs. Third, as shown in Tab. 4, it enables training under higher compression ratios, which helps offset the added cost of iterative decoding by reducing the size of latent representations. + +Scalability. As discussed in Sec. 4.1, our diffusion-based decoding method maintains the resolution generalizability typically found in standard autoencoders. This feature is highly practical: the autoencoder is trained on lower-resolution images, while the subsequent latent generative model is trained on latents derived from higher-resolution inputs. However, we acknowledge that memory overhead and throughput become concerns with our UNet-based diffusion decoder, especially for high-resolution inputs. This + +challenge becomes more pronounced as models, datasets, or resolutions scale up. A promising future direction is patch-based diffusion (Ding et al., 2024; Wang et al., 2024c), which partitions the input into smaller, independently processed patches. This approach has the potential to reduce memory usage and enable faster parallel decoding. + +# B. Related work + +Image tokenization. Image tokenization is crucial for effective generative modeling, transforming images into compact, structured representations. A common approach employs an autoencoder framework (Hinton & Salakhutdinov, 2006), where the encoder compresses images into low-dimensional latent representations, and the decoder reconstructs the original input. These latent representations can be either discrete commonly used in autoregressive models (Van den Oord et al., 2016; Van Den Oord et al., 2017; Chen et al., 2020; Chang et al., 2022; Yu et al., 2023; Kondratyuk et al., 2024), or continuous, as found in diffusion models (Ho et al., 2020; Dhariwal & Nichol, 2021; Rombach et al., 2022; Peebles & Xie, 2023; Gupta et al., 2023; Brooks et al., 2024). The foundational form of visual autoencoding today originates from Van Den Oord et al. (2017). While advancements have been made in modeling (Yu et al., 2022; 2024b; Chen et al., 2024), objectives (Zhang et al., 2018; Karras et al., 2019; Esser et al., 2021), and quantization methods (Yu et al., 2024a; Zhao et al., 2024), the core encoding-and-decoding scheme remains largely the same. + +In this work, we propose a new perspective by replacing the traditional decoder with a diffusion process. Specifically, our new formulation retains the encoder but introduces a conditional diffusion decoder. Within this framework, we systematically study various design choices, resulting in a significantly enhanced autoencoding setup. + +Additionally, we refer to the recent work MAR (Li et al., 2024), which leverages diffusion to model per-token distribution in autoregressive frameworks. In contrast, our approach models the overall input distribution in autoencoders using diffusion. This difference leads to distinct applications of diffusion during generation. For instance, MAR generates samples autoregressively, decoding each token iteratively using diffusion, token by token. In our method, we first sample all tokens from the downstream generative model and then decode them iteratively using diffusion as a whole. + +Image compression. Our work shares similarities with recent image compression approaches that leverage diffusion models. For example, Hoogeboom et al. (2023a); Birodkar et al. (2024) use diffusion to refine autoencoder residuals, enhancing high-frequency details. Yang & Mandt (2024) employs a diffusion decoder conditioned on quantized dis + +![](images/e93ec7b4a582529f9507305e3b0a3df38c2b582993e3da74d8440d19a752c698.jpg) +Figure 5. Reconstruction results with varying downsampling ratios. $\epsilon$ -VAE maintains both high fidelity and perceptual quality, even under extreme downsampling conditions, whereas VAE fails to preserve semantic integrity. Best viewed when zoomed-in and in color. + +crete codes and omits the GAN loss. However, these methods primarily focus on the traditional rate-distortion tradeoff, balancing rate (compactness) and distortion (input fidelity) (Shannon et al., 1959), with the goal of storing and transmitting data efficiently without significant loss of information. + +In this work, we emphasize perception (distribution fidelity) alongside the rate-distortion tradeoff, ensuring that reconstructions more closely align with the overall data distribution (Heusel et al., 2017; Zhang et al., 2018; Blau & Michaeli, 2019), thereby enhancing the decoded results from the sampled latents of downstream generative models. We achieve this by directly integrating the diffusion process into the decoder, unlike Hoogeboom et al. (2023a); Birodkar et al. (2024). Moreover, unlike Yang & Mandt (2024), we do not impose strict rate-distortion regularization in the latent space and allow the GAN loss to synergize with our approach. + +Diffusion decoder. Several studies (Preechakul et al., 2022; Shi et al., 2022; Pernias et al., 2024; Nguyen & Tran, 2024; Sauer et al., 2024; Luo et al., 2023) have explored diffusion decoders conditioned on compressed latents of the input, which are relevant to our work. We outline the key differences between these works and $\epsilon$ -VAE: First, prior works have not fully leveraged the synergy between diffusion decoders and standard VAE training objectives. In this work, we enhance state-of-the-art VAE objectives by replacing the reconstruction loss with a score matching loss and adapting LPIPS and GAN losses to ensure compatibility with diffusion decoders. These changes yield significant improvements in autoencoding performance, as evidenced by lower rFID scores and faster inference. Second, we are the first to investigate various parameterizations (e.g., epsilon and velocity) and demonstrate that modern velocity parameterization, coupled with optimized train and test-time + +![](images/274712db66414d1ffb24f500257fb0c3ad976ccdfbb5f69de20f253e09abee13.jpg) +Figure 6. $\epsilon$ -VAE reconstruction results with varying random seeds and downsampling ratios. At lower compression levels, the reconstruction behaves more deterministically, whereas higher compression introduces stochasticity, enabling more flexible reconstruction of plausible inputs. Best viewed when zoomed-in and in color. + +noise scheduling, provides substantial benefits. These enhancements improve both reconstruction performance and sampling efficiency. Third, previous diffusion-based decoders (Preechakul et al., 2022; Shi et al., 2022; Pernias et al., 2024), which often rely on ad-hoc techniques like distillation or consistency regularization to speed up inference (Nguyen & Tran, 2024; Sauer et al., 2024; Luo et al., 2023), our approach achieves fast decoding (1 to 3 steps) without such techniques. This is made possible by integrating our proposed objectives and parameterizations. Last but not least, $\epsilon$ -VAE exhibits strong resolution generalization capabilities, a key property of standard VAEs. In contrast, models like DiffusionAE (Preechakul et al., 2022) and DiVAE (Shi et al., 2022) either lack this ability or are inherently limited. For example, DiVAE's bottleneck add/concat design restricts its capacity to generalize across resolutions. + +SWYCC (Birodkar et al., 2024) also explores joint learning of continuous encoders and decoders using a diffusion model. However, SWYCC differs fundamentally from our approach: it replaces the GAN loss with a diffusion-based loss, while we focus on identifying optimal synergies between traditional autoencoding losses (including GAN loss) and diffusion-based decoding. Our goal is to identify an optimal strategy for combining these elements, rather than simply substituting one for another. + +Another closely related work, DiTo (Chen et al., 2025), also + +presents a diffusion-based tokenizer which learns compact visual representations for image generation. Its main insight is that a single diffusion learning objective is capable of training scalable image tokenizers. More than that, our method demonstrates that traditional autoencoding losses such as LPIPS and GAN losses are complimentary to the diffusion target, leading to better reconstruction quality. This design substantially differ our work from DiTo. + +While following a different motivation, Lee et al. (2023) essentially also proposes a VAE with a denoising decoder but uses the encoding as the "initial noise" instead of as conditioning for a standard diffusion model starting from a standard Gaussian distribution. This idea could be potentially used for speeding up the proposed approach, which we will explore in the future. + +Image generation. Recent advances in image generation span a wide range of approaches, including VAEs (Kingma, 2013), GANs (Goodfellow et al., 2014), autoregressive models (Chen et al., 2020) and diffusion models (Song et al., 2021; Ho et al., 2020). Among these, diffusion models have emerged as the leading approach for generating high-dimensional data such as images (Saharia et al., 2022a; Baldridge et al., 2024; Esser et al., 2024) and videos (Brooks et al., 2024; Gupta et al., 2023), where the gradual refinement of global structure is crucial. The current focus in diffusion-based generative models lies in advancing archi + +Table 6. Hyper-parameters for decoder variants. + +
ModelChannel dim.Depth multipliers# of blocks
Base (B)64{1, 1, 2, 2, 4}2
Medium (M)96{1, 1, 2, 2, 4}2
Large (L)128{1, 1, 2, 2, 4}2
Extra-large (XL)128{1, 1, 2, 2, 4}4
Huge (H)256{1, 1, 2, 2, 4}2
+ +tectures (Rombach et al., 2022; Peebles & Xie, 2023; Hoogeboom et al., 2023b), parameterizations (Karras et al., 2022; Kingma & Gao, 2024; Ma et al., 2024; Esser et al., 2024), or better training dynamics (Nichol & Dhariwal, 2021; Chen, 2023; Chen et al., 2023). However, tokenization, an essential component in modern diffusion models, often receives less attention. + +In this work, we focus on providing compact continuous latents without applying quantization during autoencoder training (Rombach et al., 2022), as they have been shown to be effective in state-of-the-art latent diffusion models (Rombach et al., 2022; Sahara et al., 2022a; Peebles & Xie, 2023; Esser et al., 2024; Baldridge et al., 2024). We compare our autoencoding performance against the baseline approach (Esser et al., 2021) using the DiT framework (Peebles & Xie, 2023) as the downstream generative model. + +# C. Experiment setups + +In this section, we provide additional details on our experiment configurations for reproducibility. + +# C.1. Model specifications + +Tab. 6 summarizes the primary architecture details for each decoder variant. The channel dimension is the number of channels of the first U-Net layer, while the depth multipliers are the multipliers for subsequent resolutions. The number of residual blocks denotes the number of residual stacks contained in each resolution. + +# C.2. Implementation details + +During the training of discriminators, Esser et al. (2021) introduced an adaptive weighting strategy for $\lambda_{\mathrm{adv}}$ . However, we notice that this adaptive weighting does not introduce any benefit which is consistent with the observation made by Sadat et al. (2024). Thus, we set $\lambda_{\mathrm{adv}} = 0.5$ in the experiments for more stable model training across different configurations. + +The autoencoder loss follows Eq. 1, with weights set to $\lambda_{\mathrm{LPIPS}} = 0.5$ and $\lambda_{\mathrm{adv}} = 0.5$ . We use the Adam optimizer (Kingma & Ba, 2015) with $\beta_{1} = 0$ and $\beta_{2} = 0.999$ , applying a linear learning rate warmup over the first 5,000 + +Table 7. Image reconstruction results on ImageNet ${128} \times {128}$ . + +
ConfigurationNFE↓rFID↓
Baseline (c) in Tab. 5:
Inject conditioning by channel-wise concatenation5022.04
Inject conditioning by AdaGN5022.01
Baseline (e) in Tab. 5:
Matching the distribution of x̂0t and x0-N/A
Matching the trajectory of xt → x058.24
Matching the trajectory of xt → xt-Δt510.53
+ +steps, followed by a constant rate of 0.0001 for a total of one million steps. The batch size is 256, with data augmentations including random cropping and horizontal flipping. An exponential moving average of model weights is maintained with a decay rate of 0.999. All models are implemented in JAX/Flax (Bradbury et al., 2018; Heek et al., 2024) and trained on TPU-v5lite pods. + +# C.3. Latent diffusion models + +We follow the setting in Peebles & Xie (2023) to train the latent diffusion models for unconditional image generation on the ImageNet dataset. The DiT-XL/2 architecture is used for all experiments. The diffusion hyperparameters from ADM (Dhariwal & Nichol, 2021) are kept. To be specific, we use a $t_{\mathrm{max}} = 1000$ linear variance schedule ranging from 0.0001 to 0.02, and results are generated using 250 DDPM sampling steps. For simplicity and training stability, we remove the variational lower bound loss term during training, which leads to a slight drop in generation qualities. + +All models are trained with Adam (Kingma & Ba, 2015) with no weight decay. We use a constant learning rate of 0.0001 and a batch size of 256. Horizontal flipping and random cropping are used for data augmentation. We maintain an exponential moving average of DiT weights over training with a decay of 0.9999. We use identical training hyperparameters across all experiments and train models for one million steps in total. No classifier-free guidance (Ho & Salimans, 2022) is employed in all the experiments. Inference throughputs are computed on a Tesla H100 GPU. + +# D. Additional experimental results + +We note that all experiments conducted in this section are under the $\epsilon$ -VAE-lite configuration. + +Conditioning. In addition to injecting conditioning via channel-wise concatenation, we explore providing conditioning to the diffusion model by adaptive group normalization (AdaGN) (Nichol & Dhariwal, 2021; Dhariwal & Nichol, 2021). To achieve this, we resize the conditioning (i.e., encoded latents) via bilinear sampling to the desired + +Table 8. Model scaling and resolution generalization analysis. Five model variants are trained and evaluated. $\Delta_{\mathrm{rFID}}$ represents the absolute differences (or relative ratio) in rFID between the corresponding model size variants of VAE and $\epsilon$ -VAE. $\dagger$ denotes resolution generalization experiments. To fairly evaluate the impact of $\epsilon$ -VAE under controlled model parameters, we highlight three groups of model variants with comparable parameters, using different colors. + +
ModelG params (M)ImageNet 128 × 128ImageNet 256 × 256†ImageNet 512 × 512†
rFID↓ΔrFIDrFID↓ΔrFIDrFID↓ΔrFID
VAE (B)10.1411.15-5.74-3.69-
VAE (M)22.799.26-4.63-2.69-
VAE (L)40.488.49-4.78-2.78-
VAE (XL)65.277.58-4.42-2.41-
VAE (H)161.817.12-4.29-2.37-
ε-VAE (B)20.636.244.91 (44.0%)3.901.84 (32.0%)2.061.63 (44.2%)
ε-VAE (M)49.335.423.84 (41.5%)2.791.84 (39.7%)2.020.67 (24.9%)
ε-VAE (L)88.984.713.78 (44.5%)2.602.03 (43.8%)1.920.86 (30.9%)
ε-VAE (XL)140.634.183.40 (44.9%)2.382.04 (46.2%)1.820.59 (24.5%)
ε-VAE (H)355.624.043.08 (43.3%)2.311.98 (46.2%)1.780.59 (24.9%)
+ +Table 9. Unconditional image generation quality. The DiT-XL/2 is trained on latents provided by the trained autoencoders, VAE and $\epsilon$ -VAE, with varying model sizes using ImageNet. We evaluate the generation quality at resolutions of $128 \times 128$ and $256 \times 256$ using four standard metrics. Additionally, we report rFID to determine if the improvement trend observed in reconstruction task extends to the generation task. We highlight three groups of model variants with comparable parameters. + +
ModelImageNet 128 × 128ImageNet 256 × 256
rFID↓FID↓IS↑Prec.↑Rec.↑rFID↓FID↓IS↑Prec.↑Rec.↑
VAE (B)11.1536.817.90.480.535.7446.623.40.450.56
VAE (M)9.2634.618.20.490.554.6344.723.80.470.58
VAE (L)8.4933.918.40.500.564.7844.324.70.470.59
VAE (XL)7.5831.719.30.510.574.4243.124.90.470.59
VAE (H)7.1230.919.80.520.574.2941.625.90.480.59
ε-VAE (B)6.2429.520.70.530.593.9039.525.20.460.61
ε-VAE (M)5.4227.621.20.550.592.7935.426.20.510.62
ε-VAE (L)4.7127.322.10.550.592.6034.826.50.510.63
ε-VAE (XL)4.1825.322.70.550.592.3834.027.40.530.63
ε-VAE (H)4.0424.923.00.560.602.3133.227.50.540.64
+ +resolution of each stage in the U-Net model, and incorporates it into each residual block after a group normalization operation (Wu & He, 2018). This is similar to adaptive instance norm (Karras et al., 2019) and FiLM (Perez et al., 2018). We report the results in Tab. 7 (top), where we find that channel-wise concatenation and AdaGN obtain similar reconstruction quality in terms of rFID. Because of the additional computational cost required by AdaGN, we thus apply channel-wise concatenation in our model by default. + +Trajectory matching. The proposed denoising trajectory matching objective matches the start-to-end trajectory $\boldsymbol{x}_t \rightarrow \boldsymbol{x}_0$ by default. One alternative choice is to directly matching the distribution of $\hat{\boldsymbol{x}}_0^t$ and $\boldsymbol{x}_0$ without coupling on $\boldsymbol{x}_t$ . However, we find this formulation leads to unstable training and could not produce reasonable results. Here, we present the results when matching the trajectory of $\boldsymbol{x}_t \rightarrow \boldsymbol{x}_{t - \Delta t}$ , which is commonly used in previous work (Xiao et al., 2022; Wang et al., 2024a). Specifically, for each timestep $t$ during training, we randomly sample a + +step $\Delta t$ from $(0,t)$ . Then, we construct the real trajectory by computing $x_{t - \Delta t}$ via Eq. 5 and concatenating it with $x_{t}$ , while the fake trajectory is obtained in a similar way but using Eq. 9 instead. Tab. 7 (bottom) shows the comparison. We observe that matching trajectory $x_{t} \rightarrow x_{0}$ yields better performance than matching trajectory $x_{t} \rightarrow x_{t - \Delta t}$ , confirming the effectiveness of the proposed objective which is designed for the rectified flow formulation. + +Comparisons with plain diffusion ADM. Under the same training setup of Tab. 5, we directly trained a plain diffusion model (ADM) for comparison, which resulted in rFID score of 38.26. Its conditional form is already provided as a baseline in Tab. 5, achieving 28.22. This demonstrates that our conditional form $p(\pmb{x}_{t-1}|\pmb{x}_t, \pmb{z})$ offers a better approximation of the true posterior $q(\pmb{x}_{t-1}|\pmb{x}_t, \pmb{x}_0)$ compared to the standard form $p(\pmb{x}_{t-1}|\pmb{x}_t)$ . By further combining LPIPS and GAN loss, we achieve rFID of 8.24, outperforming its VAE counterpart, which achieves 11.15. With better training configurations, our final rFID improves to 6.24. This pro + +![](images/e0220b23113dd2fa1c0752414e214d1cc5c0f48ba8d6390ac2f48ecd958a937f.jpg) +Figure 7. Image reconstruction results under the SD-VAE configuration (Rombach et al., 2022) at the resolution of $256 \times 256$ . $\epsilon$ -VAE produces significantly better visual details than SD-VAE when reconstructing local regions with complex textures or structures, such as human faces and small texts. Best viewed when zoomed-in and in color. + +Table 10. Benchmarking class-conditional image generation on ImageNet $256 \times 256$ . We use the DiT-XL/2 architecture (Esser et al., 2024) for latent diffusion models and apply classifier-free guidance (Ho & Salimans, 2022). + +
Downsample factorMethodFID↓
8 × 8SD-VAE (Rombach et al., 2022)3.51
ε-VAE-SD (M)2.83
ε-VAE-SD (H)2.69
+ +gression, from plain diffusion ADM to $\epsilon$ -VAE, underscores the significance of our proposals and their impact. + +Model scaling. We investigate the impact of model scaling by comparing VAE and $\epsilon$ -VAE across five model variants, all trained and evaluated at a resolution of $128 \times 128$ , as summarized in Tab. 8. The results demonstrate that $\epsilon$ -VAE consistently achieves significantly better rFID scores than VAE, with an average relative improvement of over $40\%$ , and even the smallest $\epsilon$ -VAE model outperforms VAE at largest scale. While the U-Net-based decoder of $\epsilon$ -VAE has about twice as many parameters as standard decoder of VAE, grouping models by similar sizes, highlighted in different colors, shows that performance gains are not simply due to increased model parameters. + +Tab. 9 presents the unconditional image generation results of VAE and $\epsilon$ -VAE at resolutions of $128 \times 128$ and $256 \times 256$ . In addition to FID, we report Inception Score (IS) (Salimans et al., 2016) and Precision/Recall (Kynkänniemi et al., 2019) as secondary metrics. The results show that $\epsilon$ -VAE consistently outperforms VAE across all model scales. Notably, $\epsilon$ -VAE (B) surpasses VAE (H), consistent with our earlier findings in Sec. 4.1. These results further demonstrate the effectiveness of $\epsilon$ -VAE from the generation perspective. + +Results with classifier-free guidance. We provide additional results with classifier-free guidance (Ho & Salimans, 2022) under the $8 \times 8$ downsample factor in Tab. 10. We find that $\epsilon$ -VAE (M) performs relatively $20\%$ better than SD-VAE and further improvements are obtained after we scale up our model to $\epsilon$ -VAE (H). These results are consistent with the results without classifier-free guidance in Tab. 4, confirming the effectiveness of our model. + +# E. Additional visual results + +We provide additional visual comparisons between $\epsilon$ -VAE and SD-VAE at the resolution of $256 \times 256$ (Fig. 7). Our observations indicate that $\epsilon$ -VAE delivers significantly better visual quality than SD-VAE, particularly when reconstructing local regions with complex textures or structures, such as human faces and small text. \ No newline at end of file diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/images.zip b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f47caf6cfe9093daeb8a31ca5f93a5acf7841023 --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0de1e1a8821c1eef8e59c6dda0f16d4ff151f38b0bc9bcd7b02ba5c1ba316bd +size 2027550 diff --git a/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/layout.json b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ab1b3e8b11b707a131a4f56a932f61a5219f563a --- /dev/null +++ b/ICML/2025/Epsilon-VAE_ Denoising as Visual Decoding/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dacdcd22165c839f540ff10b9a45a4b57171ea899b4582b225be86b73444674 +size 745918 diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_content_list.json b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..19459a6a8c5e0c702744d4a89866855a3a86ddd2 --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:42d7352737f830e8cf3340defeed86410d579d3760d6ea47df0a6e4127d1799e +size 105670 diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_model.json b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..582fa4668f6af6845e48b63f0e9b5a1075f90d2e --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb7e4fd2f5a7f1e123707808a5d2b1366f69bc3747bc40fe6e16461db83251ff +size 127390 diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_origin.pdf b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..38ab360932af3ae937d72723f06746b5369ceaaf --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/3d5bc415-8bfb-4f04-9519-208214a51fbb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ac9c57de341f2484efdf7213c9afcc2ea9605c6bf831338ee8cf8001966071d +size 744511 diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/full.md b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7ebd5b5a5180113dea81c2a875d1cedd9f2ae148 --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/full.md @@ -0,0 +1,533 @@ +# EquivaMap: Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations + +Haotian Zhai1 Connor Lawless2 Ellen Vitercik2 Liu Leqi1 + +# Abstract + +A fundamental problem in combinatorial optimization is identifying equivalent formulations. Despite the growing need for automated equivalence checks—driven, for example, by optimization copilots, which generate problem formulations from natural language descriptions—current approaches rely on simple heuristics that fail to reliably check formulation equivalence. Inspired by Karp reductions, in this work we introduce Quasi-Karp equivalence, a formal criterion for determining when two optimization formulations are equivalent based on the existence of a mapping between their decision variables. We propose EquivaMap, a framework that leverages large language models to automatically discover such mappings for scalable, reliable equivalence checking, with a verification stage that ensures mapped solutions preserve feasibility and optimality without additional solver calls. To evaluate our approach, we construct EquivaFormulation, the first open-source dataset of equivalent optimization formulations, generated by applying transformations such as adding slack variables or valid inequalities to existing formulations. Empirically, EquivaMap significantly outperforms existing methods, achieving substantial improvements in correctly identifying formulation equivalence. $^{1}$ + +# 1. Introduction + +Combinatorial optimization lies at the heart of many of today's most pressing challenges in operations research, + +1The University of Texas at Austin, TX, USA 2Stanford University, CA, USA. Correspondence to: Haotian Zhai . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +The code and datasets are available at https://github.com/HumanLab/EquivaMap and https://huggingface.co/datasets/humanlab/EquivaFormulation. + +theoretical computer science, and machine learning. Its applications range from classic problems such as shortest path (Korte & Vygen, 2012) and maximum flow (Schrijver, 1983) to modern challenges in neural architecture search (Elsken et al., 2019) and hyperparameter optimization (Khadka et al., 2024). + +A fundamental problem in combinatorial optimization is identifying equivalent formulations. Historically, establishing equivalence has played a pivotal role in unifying problem-solving techniques and advancing theoretical characterizations of a problem's computational complexity. In theoretical computer science, equivalence between problems underpins the concept of NP-completeness (Cook, 1971; Karp, 1972), which unifies many seemingly distinct problems—such as SAT, Vertex Cover, and Subset Sum—into the same equivalence class. This unification enables researchers to prioritize the development of algorithms for canonical problems while ensuring their applicability across equivalent problems. Similarly, in applied fields such as network design (Kan, 1978) and semiconductor scheduling (Fang et al., 2023), recognizing equivalence between optimization problems has historically facilitated the transfer of algorithms, reducing duplication of effort. + +The advent of large language models (LLMs) has exposed a new frontier in combinatorial optimization, introducing opportunities to automate problem formulation, while also presenting new challenges—chief among them, the need for reliable equivalence checking. Recent research has focused on developing optimization copilots, systems that automate the translation of natural language descriptions into formal optimization formulations, particularly for mixed-integer linear programming (MILP) problems (Ramamonjison et al., 2023; Xiao et al., 2023; AhmadiTeshnizi et al., 2024; Astorga et al., 2024). These advancements hold significant potential for democratizing access to optimization techniques, broadening the reach of powerful tools for better decision-making (Wasserkrug et al., 2024). However, the widespread adoption of optimization copilots hinges on reliable evaluation mechanisms capable of verifying whether the generated formulations are equivalent to their ground-truth counterparts. Moreover, automatic formulation equivalence checking is critical to improving optimization copilots by serving + +as an intermediate step, facilitating more efficient formulation search and refinement (Astorga et al., 2024). + +Despite the importance of equivalence checking in combinatorial optimization, existing automatic approaches rely heavily on heuristics (e.g., comparing optimal objective values) and lack a precise, universally accepted definition of what constitutes formulation equivalence. Formal methods such as Karp reductions (Karp, 1972) offer valuable theoretical insights into problem equivalence but were not designed for modern automated settings, often requiring considerable human time and expertise to construct. + +Towards precise and reliable equivalence checking, we propose a formal definition of formulation equivalence—Quasi-Karp Equivalence—grounded in the principles of Karp reductions. Quasi-Karp Equivalence determines whether two formulations are equivalent by checking for the existence of a mapping between their decision variables. We propose EquivaMap, an approach that automates equivalence checking by using LLMs to identify mappings between formulations, followed by a lightweight verification step to ensure these mappings preserve optimality and feasibility without additional MILP solver calls. Grounded in a precise definition of formulation equivalence, EquivaMap allows for automatic equivalence verification for optimization formulations. + +Our contributions can be summarized as follows: + +- We identify pitfalls of existing equivalence checking methods (Section 3.1). +- We propose Quasi-Karp equivalence as a formalism for defining when two optimization formulations are equivalent through the existence of a mapping between their decision variables (Section 3.2) and present EquivaMap, a scalable method that uses LLMs to discover candidate mappings, paired with a separate verification step to ensure correctness (Section 3.3). +- To evaluate the performance of equivalence-checking methods, we introduce, to the best of our knowledge, the first dataset—EquivaFormulation—that documents both equivalent formulations and the transformation between them (Section 4.1). Empirically, we show that EquivaMap outperforms existing methods across various equivalent transformations (Section 4.2). + +# 2. Background and Related Work + +Our work connects important lines of research on combinatorial optimization (especially MILPs), LLMs for MILP modeling, and automatic equivalence-checking methods for optimization formulations. + +# 2.1. Combinatorial Optimization and MILPs + +Combinatorial optimization (CO) broadly deals with finding an optimal object from a finite (or countably infinite) set of feasible candidates. Such problems arise in diverse fields, including operations research, computer science, and engineering, where discrete variables model decisions in practical scenarios such as routing, scheduling, or allocation of limited resources (Papadimitriou & Steiglitz, 1998). + +A foundational tool for combinatorial optimization is mixed-integer linear programming (MILP), formulated as: + +$$ +\min _ {x \in \mathbb {R} ^ {p} \times \mathbb {Z} ^ {n - p}} c ^ {\top} x \tag {1} +$$ + +subject to $Ax\circ b,\quad \ell \leq x\leq u,$ + +where $x$ is the vector of decision variables, $c$ is the cost vector, $A$ is the constraint coefficient matrix, and $b$ is the vector of constraint bounds. The notation $Ax \circ b$ represents a system of linear constraints, where $\circ$ denotes relational operators from the set $\{\leq, \geq, =\}$ . The variables $x$ are partitioned into $p$ continuous variables and $n - p$ integer variables. Let $x^{*}$ denote an optimal solution to (1), and let $z^{*} = c^{\top}x^{*}$ be the corresponding optimal objective value. If all decision variables are continuous ( $p = n$ ), the problem is a linear program (LP). MILPs capture many prominent combinatorial problems such as the traveling salesman problem (TSP) (Cook et al., 2011), knapsack problem (Pisinger & Toth, 1998), and network design problems (Kan, 1978). + +Many fundamental CO problems—including TSP and Knapsack—are known to be NP-hard. A key contribution to the theory of NP-completeness was provided by Karp (1972), who demonstrated that a number of widely studied problems are mutually reducible in polynomial time (often referred to as "Karp reductions"). These reductions establish deep structural connections among CO problems, showing that if a polynomial-time algorithm exists for one, it can be systematically adapted to solve many others. + +# 2.2. Language Models for MILP Modeling + +The use of language models for MILP modeling has sparked considerable interest in the AI-for-OR community. The NL4Opt competition (Ramamonjison et al., 2023) focused on using natural language processing (NLP) methods to formulate optimization problems based on their text descriptions. More recently, with the advent of LLMs, a number of LLM-based optimization copilots aim to automate MILP modeling (Mostajabdaveh et al., 2024; Ahmed & Choudhury, 2024; Li et al., 2023b; Yu & Liu, 2024; Huang et al., 2024a; Kadioglu et al., 2024; Yang et al., 2024). Both the Chain-of-Experts (Xiao et al., 2023) and OptiMUS (AhmadTeshnizi et al., 2024) frameworks designed LLM-based multi-agent systems to automate the modeling of complex optimization problems by leveraging the reasoning capabilities of the modeler. + +ties of the LLMs. Tang et al. (2024) further demonstrated the potential of LLMs by fine-tuning open-source models with synthetic data tailored for modeling optimization problems, achieving significant performance improvements over baseline methods. Building on these capabilities, LLM-powered chatbots have been used to allow users to interact with optimization models in a number of contexts including supply chain management (Li et al., 2023a), meeting scheduling (Lawless et al., 2024b), debugging infeasible models (Chen et al., 2023), and improving solver configurations (Lawless et al., 2024a). These advancements highlight why LLMs are particularly suitable for MILP modeling: their ability to process and generate structured information from natural language aligns well with the requirements of optimization problem formulation. The rapid development of optimization copilots underscores the need for reliable, scalable evaluation techniques. + +# 2.3. Existing Automatic Equivalence Checking Methods + +The central task of evaluating optimization copilots is automatically checking whether the generated formulation is equivalent to a ground-truth correct one. The earliest method used in the NL4OPT benchmark (Ramamonjison et al., 2023) for evaluating formulation equivalence is canonical accuracy, which looks at direct equivalence between declarations (e.g., objective, constraints) between a reference correct formulation and a generated formulation. This method is sensitive to permutations of the order of the declarations in a formulation and fails when multiple valid formulations exist for the same problem. The method used in benchmarks such as NLP4LP (AhmadiTeshnizi et al., 2024), MAMO (Huang et al., 2024b), and IndustryOR (Tang et al., 2024) is execution accuracy, which evaluates whether two MILP formulations are equivalent by solving them (using a MILP solver such as Gurobi) and checking if they have the same optimal objective value. Execution accuracy is sensitive to variable re-scaling, which can create inconsistencies even when the formulations are functionally equivalent. To address these issues, recent approaches utilize Graph Edit Distance (Xing et al., 2024) and a modified Weisfeiler-Lehman (WL) test (Wang et al., 2024) to measure structural similarity between the generated and reference formulations. These methods offer insights into equivalence beyond the optimal objective value but have limitations. They are particularly sensitive to structural modifications, such as adding cutting planes, which keep the formulation equivalent but change its structural information. Beyond these methods, Steever et al. (2022) proposed an image-based approach to detect structural similarity among large-scale MILPs. + +# 3. Methodology + +This section introduces Quasi-Karp Equivalence and EquivaMap, our method for leveraging LLMs to automati + +cally check such equivalence. In the general setup, we have two formulations $\alpha$ and $\alpha'$ corresponding to the same (feasible) optimization problem $\mathcal{P}$ , with optimal objective values $z^*$ and $z'^*$ respectively. For example, Figure 1 presents two formulations $\alpha$ and $\alpha'$ of an optimization problem $\mathcal{P}$ — the stable set problem. Our method aims to evaluate the equivalence of $\alpha$ and $\alpha'$ for a given instantiation of the problem. In Figure 1, an instantiation of $\mathcal{P}$ would be defined by a specific input graph. + +# 3.1. Pitfalls of Existing Equivalence Checking Methods + +We discuss existing methods for evaluating formulation equivalence, including canonical accuracy, execution accuracy, and the WL-test, and exhibit settings where these methods fail. + +Canonical accuracy is based on matching declarations between predicted and reference programs, where a declaration represents either an optimization objective or a constraint (Ramamonjison et al., 2023). + +Definition 3.1 (Canonical Accuracy). Given a reference declaration $d$ (objective or constraint) and a generated declaration $\hat{d}$ , they are said to be matched if $d = \widehat{d}$ . Let $\mathcal{D}$ and $\widehat{\mathcal{D}}$ denote the sets of reference and generated declarations, respectively. A False Positive (FP) is a generated declaration $\hat{d}$ that is unmatched, while a False Negative (FN) is a reference declaration $d$ that is unmatched. The canonical accuracy is defined as: + +$$ +1 - \frac {\operatorname* {m i n} (| \mathrm {F P} | + | \mathrm {F N} | , | \mathcal {D} |)}{| \mathcal {D} |} +$$ + +where any score under $100\%$ indicates that the formulations are not equivalent. + +Canonical accuracy imposes a strong assumption that generated MILPs must adhere to the same variable order as the ground-truth MILP. As illustrated in Figure 1, if the constraints in $\alpha$ are permuted differently from those in $\alpha'$ , they are erroneously treated as nonequivalent, despite being functionally identical. More broadly, canonical accuracy fails in cases where the two formulations differ based on variable or constraint permutations. + +Execution accuracy captures whether two optimization problems have the same optimal objective value (AhmadTeshnizi et al., 2024). + +Definition 3.2 (Execution Accuracy). $\alpha$ and $\alpha'$ are considered equivalent if $z^{*} = z'^{*}$ . + +Execution accuracy has a clear limitation: it is not robust to rescaling, a common transformation in MILPs that may simply reflect a change in units. For example, in Figure 1, the objective function in $\alpha'$ is rescaled, which would lead execution accuracy to incorrectly classify $\alpha$ and $\alpha'$ as nonequivalent. + +Example: Given a graph $G = (V, E)$ , where $V$ represents the set of vertices and $E$ represents the set of edges, find the largest stable set, where a stable set is a subset $S \subseteq V$ such that no two vertices in $S$ are adjacent (i.e., there is no edge $(u, v) \in E$ with $u, v \in S$ ). + +![](images/75c705b47f16089e37f2590511eb545f1b37c1d864566a032efbcd12521adc76.jpg) +Figure 1: A classic stable set problem, where the two formulations correspond to the same problem description. Formulation $\alpha$ uses the standard formulation, while formulation $\alpha'$ rescales the objective function and adds cutting planes based on cliques (where $\mathcal{K}$ denotes the set of cliques in $G$ ). LLMs are used to find the mapping function $f$ that maps the variables of $\alpha'$ into the variable space of $\alpha$ . An example mapping would be the identity function $f(y_{i}) = y_{i}$ . + +Previous studies have shown that MILPs can be represented as bipartite graphs (Chen et al., 2023a;b; Khalil et al., 2017; Gasse et al., 2019), providing a foundation for defining equivalence using graph-isomorphism based approaches such as the WL-test. To construct this bipartite graph, a node is added for each variable and each constraint of the graph. An edge connects a variable node to a constraint node if that variable has a non-zero coefficient in the corresponding constraint. The nodes and edges are endowed with various real-valued attributes describing the MILP (for example, a variable node's attributes will include its coefficient in the objective function). The WL-test tests whether two graphs are isomorphic. + +Definition 3.3 (WL-test (Douglas, 2011)). Let $G = (V,E)$ and $H = (V',E')$ be two graphs. The Weisfeiler-Lehman test is an iterative label refinement procedure used to determine whether $G$ and $H$ are distinguishable. Initially, each vertex $v \in V$ is assigned a label $\ell_0(v)$ . At each iteration $t$ , the label of each vertex $v$ is updated as follows: + +$$ +\ell_ {t + 1} (v) = \operatorname {h a s h} \left(\ell_ {t} (v), \left\{\ell_ {t} (u) \mid u \in \mathcal {N} (v) \right\}\right) +$$ + +where $\mathcal{N}(v)$ denotes the set of neighbors of $v$ , and the function $\mathrm{hash}(\cdot)$ provides a unique encoding neighboring nodes' labels. The process continues iteratively until convergence. To compare graphs, the WL-test computes the multisets of final labels for $G$ and $H$ . If these multisets differ at any iteration, the graphs are determined to be non-isomorphic, which indicates that they are not equivalent. + +Modifications of the WL-test were proposed by Wang et al. (2024) to evaluate formulation equivalence. Xing et al. + +(2024) also introduced a related method based on graph-edit distance, which is a softer version of the WL-test. Since graph-based methods evaluate equivalence after transforming formulations $\alpha$ and $\alpha'$ into bipartite graphs, they will treat the two formulations as non-equivalent if structural modifications change the number of variables or constraints. Such modifications are extremely common (and desired) in MILPs, as techniques like adding cutting planes, reformulating constraints, or introducing auxiliary variables are frequently used to improve solver efficiency and tighten linear relaxations. For example, the second formulation in Figure 1 includes clique cutting planes: + +$$ +\sum_ {i \in k} y _ {i} \leq 1 \quad \forall k \in \mathcal {K} +$$ + +for cliques $k \in \mathcal{K}$ in the graph. These cutting planes are well-known to strengthen the linear relaxation of the stable set MILP formulation (Conforti et al., 2014). + +# 3.2. MILP Equivalence Based on Karp Reduction + +Towards a more formal notion of MILP formulation equivalence, we introduce a new definition inspired by a classical tool from complexity theory called a Karp Reduction: + +Definition 3.4 (Karp Reduction). Two decision problems $\mathcal{P}, \mathcal{Q}$ are said to be equivalent if there exists a function $f$ that maps arbitrary instances of $\mathcal{P}$ to $\mathcal{Q}$ such that: + +- If $p$ is a yes-instance of $\mathcal{P}$ , then $f(p)$ is a yes-instance of $\mathcal{Q}$ , +- If $p$ is a no-instance of $\mathcal{P}$ , then $f(p)$ is a no-instance of $\mathcal{Q}$ , and + +- $f$ can be computed in polynomial time. + +A Karp reduction can be used to show that two decision problems are equivalent (i.e., a solution to one can be used to find a solution to the other). These reductions hold for arbitrary instances of the two decision problems, but we leverage a similar approach to establish the equivalence between two specific formulations of an MILP problem instance. Consider two optimization problem formulations $\alpha$ , $\alpha'$ that correspond to the same optimization problem $\mathcal{P}$ . Our goal is to formally check that an optimal solution to one formulation can be used to generate an optimal solution to the other formulation for a specific instantiation of the problem. Unlike traditional Karp reductions, which define mappings for arbitrary instances, we focus on instance-specific mappings. Moreover, our approach maps between solutions of the optimization problem rather than the instance itself. + +We also relax the condition that a no-instance (which corresponds to an infeasible or suboptimal solution) under one formulation needs to be mapped to a no-instance of the other. This distinction is important in settings where a MILP formulation may exclude some, but not all, optimal solutions to improve efficiency. For example, adding symmetry-breaking constraints to an optimization model is a common modeling practice that removes functionally equivalent solutions. With these distinctions in mind, we formalize a new notion of equivalence for MILP formulations which we call Quasi-Karp Equivalence: + +Definition 3.5 (Quasi-Karp Equivalence). Suppose $\alpha$ and $\alpha'$ are two optimization problems over $\mathbb{R}^d$ and $\mathbb{R}^{d'}$ , respectively. We say $\alpha'$ is Quasi-Karp equivalent to $\alpha$ if there exists an algorithm $\mathcal{A}(\alpha, \alpha')$ that produces a mapping $f: \mathbb{R}^{d'} \to \mathbb{R}^d$ such that: + +- If $x^{*}$ is an optimal solution to $\alpha'$ , then $f(x^{*})$ is an optimal solution to $\alpha$ , +- $f$ can be computed in polynomial time, and +- $\mathcal{A}(\alpha, \alpha')$ runs in polynomial time for all $\alpha, \alpha'$ . + +Note that the definition of Quasi-Karp equivalence is directional, meaning that $\alpha'$ being Quasi-Karp equivalent to $\alpha$ does not necessarily imply that $\alpha$ is Quasi-Karp equivalent to $\alpha'$ . Also note there is a distinction between the second and third point in definition 3.5: it is possible for $\mathcal{A}$ to run in polynomial time (e.g., a program implementing $f$ ), but for $f$ itself to require super-polynomial time to evaluate. For example, $\mathcal{A}$ could construct a branch-and-bound solver as $f$ -in which case $\mathcal{A}$ runs in polynomial time, but $f$ may not. + +In Figure 1, an example of one such mapping $f$ would be $x_{i} = y_{i}, \forall i \in \mathcal{V}$ , which is a linear function. Intuitively, the notion of Quasi-Karp Equivalence is meaningful only when the optimization problem is NP-hard and both optimization formulations admit feasible solutions with finite + +# Algorithm 1 EquivaMap + +1: Input: Two optimization formulations $\alpha, \alpha'$ with objective $\min c^{\top}x$ , $\min c'^{\top}x'$ respectively. A solver $S$ that finds an optimal solution $x^{*}$ for $\alpha$ and $x'^{*}$ for $\alpha'$ . +2: Output: A Boolean value indicating whether $\alpha$ and $\alpha^{\prime}$ are Quasi-Karp equivalent. +3: # {Call an LLM with instance-dependent prompt to find a mapping} +4: $f\gets \mathcal{A}(\alpha ,\alpha^{\prime})$ +5: # {Obtain an optimal solution of $\alpha^{\prime}$ using solver $S$ } +6: $x^{\prime *}\gets S(\alpha^{\prime})$ +7: # {Map the solution $x^{r*}$ to a candidate solution in $\alpha$ } +8: $\hat{x} \gets f(x'')$ +9: # {Check if $\hat{x}$ is optimal and feasible for $\alpha$ } +10: if $c^\top \hat{x} = c^\top x^*$ and $\hat{x}$ feasible for $\alpha$ then +11: return True +12: else +13: return False +14: end if + +optimal values. If both formulations are infeasible, then neither has a valid solution, making any comparison between them trivial and uninformative. Declaring two infeasible problems equivalent does not provide any insight into their structural or computational properties. Likewise, if one formulation is infeasible while the other is feasible, then no valid mapping $f$ can transform an optimal solution of one into the other. Finally, if a formulation is unbounded, then it lacks a finite optimal solution, so no single "optimal" point can be mapped from one formulation to another. Thus, we use Quasi-Karp Equivalence to check equivalence between feasible, bounded formulations. + +# 3.3. EquivaMap: LLM-Based Mapping Discovery with Lightweight Verification + +To determine the mapping between $\alpha$ and $\alpha'$ , we propose EquivaMap, a framework that leverages LLMs as the map-finding algorithm $\mathcal{A}$ from Definition 3.5. Specifically, given two formulations $\alpha$ and $\alpha'$ corresponding to a given instance of the problem $\mathcal{P}$ , the algorithm $\mathcal{A}$ returns a mapping function $f$ that aligns their solutions: $f = \mathcal{A}(\alpha, \alpha')$ . + +In EquivaMap (Algorithm 1), we first use the LLM $\mathcal{A}$ to find the mapping $f$ for the pair of formulations $(\alpha, \alpha')$ using an instance-specific prompt (Appendix A). Using a solver $S$ , we compute an optimal solution $x'^*$ to $\alpha'$ . With $f$ , we obtain a candidate solution $\hat{x} = f(x^*)$ for $\alpha$ . We verify whether $\hat{x}$ is an optimal solution of $\alpha$ by substituting $\hat{x}$ into $\alpha$ and verifying that $\hat{x}$ is feasible and optimal (i.e., $\bar{c}^\top \hat{x} = c^\top x^*$ ). + +A key component of EquivaMap is the instance-specific prompt, which guides the LLM in finding the mapping function $f$ . The prompt includes a structured description of + +![](images/65da46aaa134c74a127cc0065601bd45a9619342783cd6a7a350dce913cbed7f.jpg) +Figure 2: Workflow of EquivaMap. The method evaluates equivalence between two formulations $(\alpha$ and $\alpha^{\prime}$ ) of the same optimization problem instance $\mathcal{P}$ . An LLM generates a mapping function $(f)$ to map between the variable spaces of $\alpha$ and $\alpha^{\prime}$ . The mappings are applied to transform the optimal solution of $\alpha^{\prime}$ into a candidate solution in $\alpha$ . A verifier assesses whether the candidate solution is feasible and optimal for $\alpha$ . If the verification succeeds, $\alpha$ and $\alpha^{\prime}$ are deemed equivalent; otherwise, they are classified as not equivalent. + +each variable in the formulation $(\alpha)$ , including its textual description, the constraints in which it appears, and whether it appears in the objective function. Note that if a variable is defined over a set (e.g., $x_{i} \forall i \in \mathcal{V}$ in Figure 1), the definition of the variable is only included once in the prompt. This allows the prompt to scale with the number of sets of variables, which can be far less than the number of individual variables for large-scale problems (see Appendix C for an example). We provide an analogous description of the formulation $(\alpha')$ . The prompt then instructs the LLM to generate a linear mapping for each variable in $\alpha$ , expressed as a list of coefficients and corresponding variable names in $\alpha'$ . For more details, we defer to Appendix A. + +Below we illustrate this procedure using the example in Figure 1. Suppose the optimal solution of $\alpha^{\prime}$ is $y_{i}^{*}$ for all $i\in \mathcal{V}$ . Applying the identity mapping function $f$ , we compute $\hat{x}_i = f(y_i^*) = y_i^*$ for all $i\in \mathcal{V}$ . We confirm $\hat{x}$ is feasible, and substitute $\hat{x}_i$ into the objective function + +$$ +\sum_ {i \in \mathcal {V}} x _ {i}, +$$ + +to verify whether + +$$ +\sum_ {i \in \mathcal {V}} \hat {x} _ {i} = \sum_ {i \in \mathcal {V}} x _ {i} ^ {*}. +$$ + +Note that the mapping $f$ discovered by EquivaMap is not instance-specific but operates at the formulation level. We feed the LLM symbolic formulations where parameters and sets, such as the graph $G = (V, E)$ , remain abstract instead of being replaced by real values. The LLM then infers a symbolic mapping between the two formulations that is applicable across all instances. A more explicit prompt example can be found in Appendix B. However, the verification step (L9-14) in our algorithm is instance-specific: we instantiate the symbolic formulation with concrete parameter values and sets and verify that the mapped solution + +is valid. Thus, while the mapping is over formulations, the verification check is over instances. + +Comparing EquivaMap to Definition 3.5 of Quasi-Karp Equivalence, we note that, under the reasonable assumption that the LLM's inference time is polynomial in the length of its input prompt, EquivaMap runs in polynomial time. Moreover, by restricting the mapping function $f$ to be linear, we ensure that it can be computed in polynomial time. + +Stochasticity in LLMs and Aggregation. Since LLMs have stochastic outputs, we run Algorithm 1 $K$ times and then aggregate the outputs by declaring $(\alpha, \alpha')$ equivalent if at least one of the $K$ attempts produces a valid mapping. + +# 4. Experiments + +We conduct a comprehensive evaluation of EquivaMap by introducing EquivaFormulation — to the best of our knowledge, the first dataset that contains equivalent formulations of MILP instances. Moreover, the dataset includes details about the transformations used to create these equivalent formulations (Section 4.1). + +Next, we evaluate EquivaMap on this dataset and compare its performance against established baselines including canonical accuracy, execution accuracy, and the WL-test (Section 4.2). + +# 4.1. EquivaFormulation: a dataset of equivalent MILP formulations + +We construct EquivaFormulation based on the NLP4LP dataset (AhmadiTeshnizi et al., 2024). NLP4LP comprises a diverse set of optimization problems with distinct problem sizes, objective functions, and constraints. Each instance in NLP4LP is composed of three components: (1) A description file with a high-level description of the problem in natural language. (2) An information file which con + +Table 1: Overview of the equivalent and nonequivalent transformations between formulations considered in EquivaFormulation. Transformation Name describes the type of transformation; How It Is Transformed explains the modification applied to the problem; Example (Before/After) provides a short snippet demonstrating the difference; Equivalent? indicates whether the transformation preserves the original problem's optimal solutions; and Size shows the number of affected instances, reported as the count of LP and MILP problems. + +
Transformation NameHow It Is TransformedExample (Before/After)Equivalent?Size
Substitute Objective FunctionsReplace objective function min cT x with an auxiliary variable z, adding new constraint z = cT xBefore: min cT x After: min z, s.t. z = cT xYes92LP + 140MILP
Add Slack VariablesTransform constraint g(x) ≤ b into g(x) + s = b, s ≥ 0Before: x + 2y ≤ 5 After: x + 2y + s = 5, s ≥ 0Yes59LP + 134MILP
Replace by Base-10 RepresentationExpress an integer variable N in its decimal expansionBefore: x ≤ 10^6 After: x = ∑i=0^6 di · 10^i, 0 ≤ di ≤ 9, di ∈ ZYes44LP + 123MILP
Add Valid InequalitiesInclude cutting planes or valid linear combinations that do not exclude any integer feasible solutionBefore: {x + 2y ≤ 3, x ≤ 1.5} After: {x + 2y ≤ 3, x ≤ 1.5, 2x + 2y ≤ 4.5}Yes92LP + 142MILP
RescalingChange units/scales for variables or objectives (e.g., hours to minutes)Before: x (hours) After: 60x' (minutes)Yes60LP + 133MILP
Replace by Linear CombinationsDecompose a variable x into x = x+ - x- with x+, x- ≥ 0Before: x After: x+ - x-Yes77LP + 115MILP
Random OrderSubstitute the original instance with a completely unrelated, randomly chosen instanceBefore: min z, s.t. z = cT x After: max y, s.t. y = 3No87LP + 142MILP
Loose ConstraintsDelete certain constraints that are tight at the optimum, altering the feasible setBefore: x + 2y ≤ 3 (binding) After: remove x + 2y ≤ 3No53LP + 120MILP
FeasibilityTurn both the original and a randomly chosen instance into feasibility problems (replace objectives with 0)Before: min 0, s.t. z = cT x After: max 0, s.t. y = 3No87LP + 142MILP
+ +tains the corresponding mathematical formulation of the optimization instance, written in LaTeX. (3) A file that contains the GurobiPy code corresponding to the mathematical formulation. + +As discussed in Section 3.2, we carefully select optimization problems in the NLP4LP dataset by removing the infeasible and unbounded instances. In EquivaFormulation, we introduce seven (Quasi-Karp) equivalent transformations and three non-equivalent transformations to transform the formulations in NLP4LP to corresponding (Quasi-Karp) equivalent and nonequivalent counterparts, respectively (Table 1). Our proposed equivalent transformations capture widely used and important modeling techniques in MILPs. Standard practices such as substituting the objective function, adding slack variables, and decomposing variables into positive and negative components help simplify constraints and enforce non-negativity. Additionally, robustness to rescaling is crucial, as quantities can be represented in different units (e.g., $1\mathrm{kg}$ rather than $1000g$ ). Similarly, certain structural transformations — such as adding valid inequalities, reformulating constraints, or introducing auxil + +ary variables — are commonly employed to enhance solver efficiency and tighten relaxations while preserving the formulation's optimal solution. Finally, we incorporate nonequivalent transformations to evaluate the susceptibility of equivalence-checking methods to false positives. These selected transformations in EquivaMap are designed to test the robustness of different equivalence-checking methods in handling diverse MILP formulations. + +Since the selected transformations in EquivaFormulation are deterministic, to prevent the mapping finder or other equivalence-matching methods from exploiting shortcuts—such as mapping decision variables based on their order (e.g., if variable names are assigned alphabetically)—we apply several transformations to the formulation before processing. Specifically, we randomly permute the order of problem parameters, decision variables, and constraints in the information file. Additionally, we assign distinct names to all decision variables and use GPT-4o to generate varied natural language descriptions for them. These transformations are implemented to reduce the similarity between formulation $\alpha$ and $\alpha'$ , ensuring that LLMs cannot exploit + +Table 2: Accuracy of equivalence-checking methods on formulations obtained from equivalent and non-equivalent transformations. + +
Canonical Acc.Execution Acc.WL-testnaive-LLMEquivaMap
Equivalent Transformations
Worst Case0%0%0%3.3%100%
Substitute Objective Functions0%100%0%91.2%100%
Add Slack Variables0%100%0%36.1%100%
Replace by Base-10 Representation0%100%0%53.1%100%
Add Valid Inequalities0%100%0%3.3%100%
Rescaling0%0%0%69.9%100%
Replace by Linear Combinations0%100%0%24.4%100%
Non-Equivalent Transformations
Worst Case100%0%100%93.6%100%
Random Order100%100%100%98.7%100%
Loose Constraints100%100%100%93.6%100%
Feasibility100%0%100%100%100%
+ +recognizable transformation patterns to deduce the mapping directly. + +# 4.2. Performance + +We use GPT-4 (Achiam et al., 2023) as the mapping finder in EquivaMap, and evaluate our method against existing baselines, plus a naive LLM baseline (naive-LLM). The naive-LLM baseline uses a prompt that includes two formulations $\alpha$ and $\alpha'$ and directly checks if they are equivalent. The prompt can be found in Appendix A. We set $K = 3$ , and report the accuracy as the percentage of paired formulations $\alpha$ and $\alpha'$ that are correctly identified as equivalent or nonequivalent, and summarize the results in Table 2. + +The results demonstrate that our method consistently outperforms all baseline approaches, achieving perfect or near-perfect accuracy in almost every scenario. Notably, EquivaMap performs perfectly even in cases where all baseline approaches completely fail. + +For the equivalent transformations (Table 3), our method performs exceptionally well under challenging transformations, such as Add Valid Inequalities, Rescaling, and Replace by Linear Combinations. Execution accuracy and the WL-test fail universally in these settings, achieving $0\%$ accuracy across all variations. In contrast, EquivaMap achieves $100\%$ accuracy. These transformations are critical test cases because they highlight the fundamental weaknesses of existing approaches: they struggle with capturing key modeling techniques such as cutting planes and variable rescaling. For example, execution accuracy fails at Rescaling, since a naive solver run does not recognize scaled problem instances as equivalent, while WL-test fails at Add Valid Inequalities or Replace by Linear Combinations since these transformations break isomorphisms in the graph representation. Our method reliably handles them, achieving near-perfect + +accuracy. + +The results for non-equivalent variations further highlight the reliability of our method. For the Feasibility transformation, execution accuracy fails with $0\%$ accuracy, yet our method achieves perfect accuracy for all instances. Under other non-equivalent settings, our method also works well, achieving $100\%$ accuracy. + +We additionally perform a runtime analysis comparing EquivaMap with baseline methods such as Execution Accuracy and the WL-test. The results, which show that EquivaMap operates within seconds, are presented in Appendix D. + +Key observations. EquivaMap outperforms all existing equivalence-checking methods, including the naive-LLM baseline. This highlights the necessity of our algorithm — without the explicit map finding and optimality verification steps, naively using LLMs with strong reasoning capabilities will not ensure reliability in checking formulation equivalence. Moreover, these results demonstrate that our method is reliable across diverse transformations. It consistently outperforms all baselines, especially in scenarios where execution accuracy and other methods fail. + +# 5. Discussion + +How can we define the equivalence of two formulations of the same optimization problem instance? In this paper, we address this conceptual gap by proposing Quasi-Karp equivalence and a framework, EquivaMap, to systematically check such equivalence. Through extensive experiments on MILP problems, we demonstrate that EquivaMap outperforms existing approaches by large. Additionally, by introducing the first well-documented pool of equivalent + +optimization formulations, encompassing diverse transformations such as the addition of cutting planes, we provide a valuable dataset for advancing research in this domain. + +Beyond examining whether two formulations represent the same problem instance, a promising direction for future research is to leverage EquivaMap to check equivalences across diverse optimization problems, such as the equivalence between max-flow and min-cut problems. It is also worth noting that our current work focuses on relatively straightforward transformations, thereby omitting more intricate reformulations such as those emerging from decomposition algorithms. As more complex optimization copilots are developed, we may need equivalence-checking tools that can tackle these more complex transformations. + +# Impact Statement + +Our framework for checking the formulation equivalence of combinatorial optimization problems offers the potential to streamline the development and deployment of optimization models across diverse fields, including operations research, logistics, and engineering. By systematically identifying equivalences among different formulations, our approach can reduce redundant effort, promote reproducibility, and accelerate innovation. In particular, the ability to recognize and compare formulations at a finer granularity could serve as a critical building block for "optimization copilots" that assist researchers and practitioners in designing, debugging, and refining complex models. At the same time, these advantages come with important considerations. When computational tools can automatically detect formulation similarities, there is a possibility of overlooking nuanced domain-specific constraints or ethical requirements if they are not explicitly accounted for. Over-reliance on such tools could inadvertently propagate modeling oversights or marginalize expert judgment. Furthermore, democratizing advanced optimization capabilities may amplify existing disparities if access to these methods remains unevenly distributed. + +# 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. +AhmadiTecnizi, A., Gao, W., and Udell, M. Optimus: Scalable optimization modeling with (mi) lp solvers and large language models. In *Forty-first International Conference on Machine Learning*, 2024. +Ahmed, T. and Choudhury, S. Lm4opt: Unveiling the potential of large language models in formulating mathematical + +optimization problems. INFOR: Information Systems and Operational Research, 62(4):559-572, 2024. +Astorga, N., Liu, T., Xiao, Y., and van der Schaar, M. Autoformulation of mathematical optimization models using llms. arXiv preprint arXiv:2411.01679, 2024. +Chen, H., Constante-Flores, G. E., and Li, C. Diagnosing infeasible optimization problems using large language models. arXiv preprint arXiv:2308.12923, 2023. +Chen, Z., Liu, J., Wang, X., and Yin, W. On representing linear programs by graph neural networks. In The Eleventh International Conference on Learning Representations, 2023a. +Chen, Z., Liu, J., Wang, X., and Yin, W. On representing mixed-integer linear programs by graph neural networks. In The Eleventh International Conference on Learning Representations, 2023b. +Conforti, M., Cornuejols, G., and Zambelli, G. Integer programming. Springer, 2014. +Cook, S. A. The complexity of theorem-proving procedures. In Proceedings of the third annual ACM symposium on Theory of computing, pp. 151-158, 1971. +Cook, W. J., Applegate, D. L., Bixby, R. E., and Chvatal, V. The traveling salesman problem: a computational study. Princeton university press, 2011. +Douglas, B. L. The weisfeiler-lehman method and graph isomorphism testing. arXiv preprint arXiv:1101.5211, 2011. +Elsken, T., Metzen, J. H., and Hutter, F. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1-21, 2019. +Fang, J., Cheang, B., and Lim, A. Problems and solution methods of machine scheduling in semiconductor manufacturing operations: A survey. *Sustainability*, 15(17): 13012, 2023. +Gasse, M., Chételat, D., Ferroni, N., Charlin, L., and Lodi, A. Exact combinatorial optimization with graph convolutional neural networks. Advances in neural information processing systems, 32, 2019. +Huang, S., Yang, K., Qi, S., and Wang, R. When large language model meets optimization. arXiv preprint arXiv:2405.10098, 2024a. +Huang, X., Shen, Q., Hu, Y., Gao, A., and Wang, B. Mamo: a mathematical modeling benchmark with solvers. arXiv preprint arXiv:2405.13144, 2024b. + +Kadioglu, S., Pravin Dakle, P., Uppuluri, K., Politi, R., Raghavan, P., Rallabandi, S., and Srinivasamurthy, R. Ner4opt: named entity recognition for optimization modelling from natural language. Constraints, 29(3):261-299, 2024. +Kan, A. R. The complexity of the network design problem. Networks, 8(4):279-285, 1978. +Karp, R. M. Reducibility among combinatorial problems. In Complexity of Computer Computations, pp. 85-103. Plenum Press, 1972. +Khadka, K., Chandrasekaran, J., Lei, Y., Kacker, R. N., and Kuhn, D. R. A combinatorial approach to hyperparameter optimization. In Proceedings of the IEEE/ACM 3rd International Conference on AI Engineering-Software Engineering for AI, pp. 140-149, 2024. +Khalil, E., Dai, H., Zhang, Y., Dilkina, B., and Song, L. Learning combinatorial optimization algorithms over graphs. Advances in neural information processing systems, 30, 2017. +Korte, B. and Vygen, J. Shortest paths. Combinatorial Optimization: Theory and Algorithms, pp. 157-171, 2012. +Lawless, C., Li, Y., Wikum, A., Udell, M., and Vitercik, E. Llms for cold-start cutting plane separator configuration. arXiv preprint arXiv:2412.12038, 2024a. +Lawless, C., Schoeffer, J., Le, L., Rowan, K., Sen, S., St. Hill, C., Suh, J., and Sarrafzadeh, B. "i want it that way": Enabling interactive decision support using large language models and constraint programming. ACM Transactions on Interactive Intelligent Systems, 14(3): 1-33, 2024b. +Li, B., Mellou, K., Zhang, B., Pathuri, J., and Menache, I. Large language models for supply chain optimization. arXiv preprint arXiv:2307.03875, 2023a. +Li, Q., Zhang, L., and Mak-Hau, V. Synthesizing mixed-integer linear programming models from natural language descriptions. arXiv preprint arXiv:2311.15271, 2023b. +Mostajabdaveh, M., Yu, T. T., Ramamonjison, R., Carenini, G., Zhou, Z., and Zhang, Y. Optimization modeling and verification from problem specifications using a multi-agent multi-stage llm framework. INFOR: Information Systems and Operational Research, 62(4):599-617, 2024. +Papadimitriou, C. H. and Steiglitz, K. Combinatorial optimization: algorithms and complexity. Courier Corporation, 1998. +Pisinger, D. and Toth, P. Knapsack problems. Springer, 1998. + +Ramamonjison, R., Yu, T., Li, R., Li, H., Carenini, G., Ghaddar, B., He, S., Mostajabdaveh, M., Banitalebi-Dehkordi, A., Zhou, Z., et al. Nl4opt competition: Formulating optimization problems based on their natural language descriptions. In NeurIPS 2022 Competition Track, pp. 189–203. PMLR, 2023. +Schrijver, A. Min-Max Results in Combinatorial Optimization, pp. 439-500. Springer Berlin Heidelberg, Berlin, Heidelberg, 1983. +Steever, Z., Murray, C., Yuan, J., Karwan, M., and Lübbecke, M. An image-based approach to detecting structural similarity among mixed integer programs. INFORMS Journal on Computing, 34(4):1849-1870, 2022. +Tang, Z., Huang, C., Zheng, X., Hu, S., Wang, Z., Ge, D., and Wang, B. Orlm: Training large language models for optimization modeling. arXiv preprint arXiv:2405.17743, 2024. +Wang, Z., Zhu, Z., Han, Y., Lin, Y., Lin, Z., Sun, R., and Ding, T. Optibench: Benchmarking large language models in optimization modeling with equivalence-detection evaluation. 2024. +Wasserkrug, S., Boussioux, L., Hertog, D. d., Mirzazadeh, F., Birbil, I., Kurtz, J., and Maragno, D. From large language models and optimization to decision optimization copilot: A research manifesto. arXiv preprint arXiv:2402.16269, 2024. +Xiao, Z., Zhang, D., Wu, Y., Xu, L., Wang, Y. J., Han, X., Fu, X., Zhong, T., Zeng, J., Song, M., et al. Chain-of-experts: When llms meet complex operations research problems. In The Twelfth International Conference on Learning Representations, 2023. +Xing, L., Wang, X., Feng, Y., Fan, Z., Xiong, J., Guo, Z., Fu, X., Ramamonjison, R., Mostajabdaveh, M., Han, X., et al. Towards human-aligned evaluation for linear programming word problems. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pp. 16550-16556, 2024. +Yang, Z., Wang, Y., Huang, Y., Guo, Z., Shi, W., Han, X., Feng, L., Song, L., Liang, X., and Tang, J. Optibench meets resocratic: Measure and improve llms for optimization modeling. arXiv preprint arXiv:2407.09887, 2024. +Yu, H. and Liu, J. Deep insights into automated optimization with large language models and evolutionary algorithms. arXiv preprint arXiv:2410.20848, 2024. + +# A. Additional Experimental Details and Results + +In this section, we segment our main results by problem class (i.e., LP vs. MILP), and equivalence (i.e., equivalent vs. nonequivalent). We also include the fraction of each instance solved correctly for each problem type. Our results are consistent across both LP and MILP instances, highlighting that EquivaMap outperforms all baseline methods in all settings. + +Table 3: Accuracy of equivalence-checking methods on formulations obtained from equivalent transformations. Rows are partitioned by whether the problems are linear programming problems (LP) or mixed-integer linear programming problems (MILP). Numbers in parentheses correspond to the raw fraction of instances solved correctly. + +
TransformationCanonical Acc.Execution Acc.WL-testnaive-LLMEquivaMap
LP
Substitute Objective Functions0%(0/92)100%(92/92)0%(0/92)94.6%(87/92)100%(92/92)
Add Slack Variables0%(0/59)100%(59/59)0%(0/59)49.1%(29/59)100%(59/59)
Replace by Base-10 Representation0%(0/44)100%(44/44)0%(0/44)50%(22/44)100%(44/44)
Add Valid Inequalities0%(0/92)100%(92/92)0%(0/92)6.5%(6/92)100%(92/92)
Rescaling0%(0/60)0%(0/60)0%(0/60)76.7%(46/60)100%(60/60)
Replace by Linear Combinations0%(0/77)100%(77/77)0%(0/77)13.0%(10/77)100%(77/77)
MILP
Substitute Objective Functions0%(0/140)100%(140/140)0%(0/140)87.9%(123/140)100%(140/140)
Add Slack Variables0%(0/134)100%(134/134)0%(0/134)23.1%(31/134)100%(134/134)
Replace by Base-10 Representation0%(0/123)100%(123/123)0%(0/123)56.1%(69/123)100%(123/123)
Add Valid Inequalities0%(0/142)100%(142/142)0%(0/142)0%(0/142)100%(142/142)
Rescaling0%(0/133)0%(0/133)0%(0/133)63.2%(84/133)100%(133/133)
Replace by Linear Combinations0%(0/115)100%(115/115)0%(0/115)35.7%(41/115)100%(115/115)
+ +Table 4: Accuracy of equivalence-checking methods on formulations obtained from nonequivalent transformations. Rows are partitioned by whether the problems are linear programming problems (LP) or mixed-integer linear programming problems (MILP). Numbers in parentheses correspond to the raw fraction of instances solved correctly. + +
TransformationCanonical Acc.Execution Acc.WL-testnaive-LLMEquivaMap
LP
Random Order100%(87/87)100%(87/87)100%(87/87)98.9%(86/87)100%(87/87)
Loose Constraints100%(53/53)100%(53/53)100%(53/53)88.7%(47/53)100%(53/53)
Feasibility100%(87/87)0%(0/87)100%(87/87)100%(87/87)100%(87/87)
MILP
Random Order100%(142/142)100%(142/142)100%(142/142)98.6%(140/142)100%(142/142)
Loose Constraints100%(120/120)100%(120/120)100%(120/120)96.7%(116/120)100%(120/120)
Feasibility100%(142/142)0%(0/142)100%(142/142)100%(142/142)100%(142/142)
+ +# B. Prompts + +# B.1. naive-LLM Prompt + +# Listing 1: naive-LLM Prompt + +```txt +You are given two optimization problem formulations (both declared as MIP). Decide if they are equivalent formulations. +First problem formulation (Problem A): { "parametrized_description": "A laundromat can buy two types of washing machines, a toploading model and a front-loading model. The top-loading model can wash WashRateTopLoading items per day while the front-loading model can wash WashRateFrontLoading items per day. The top-loading model consumes EnergyConsumptionTopLoading kWh per day while the front-loading model consumes +``` + +```csv +"EnergyConsumptionFrontLoading kWh per day. The laundromat must be able to wash at least MinItemsPerDay items per day and has available MaxEnergyPerDay kWh per day. Since the top-loading machines are harder to use, at most MaxFractionTopLoading of the machines can be top-loading. Further, at least MinNumFrontLoading machines should be front-loading. How many of each machine should the laundromat buy to minimize the total number of washing machines?", +"keywords": [ +"N.A." +], +"parameters": { +"WashRateTopLoading": { "description": "Number of items washed per day by a top-loading machine", shape": [] } , +"WashRateFrontLoading": { "description": "Number of items washed per day by a front-loading machine", shape": [] } , +"EnergyConsumptionTopLoading": { "description": "Energy consumed per day by a top-loading machine (kWh)", shape": [] } , +"EnergyConsumptionFrontLoading": { "description": "Energy consumed per day by a front-loading machine (kWh)", shape": [] } , +"MinItemsPerDay": { "description": "Minimum number of items to wash per day", shape": [] } , +"MaxEnergyPerDay": { "description": "Maximum available energy per day (kWh)", shape": [] } , +"MaxFractionTopLoading": { "description": "Maximum fraction of machines that can be top-loading", shape": [] } , +"MinNumFrontLoading": { "description": "Minimum number of front-loading machines", shape": [] } +}, +"variables": { +"NumTopLoading": { "description": "The number of top-loading machines", type": "continuous", shape": [] } , +"NumFrontLoading": { "description": "The number of front-loading machines", type": "continuous", shape": [] } +}, +"constraints": [ +{ "description": "A top-loading machine washes WashRateTopLoading items per day and a front-loading machine washes WashRateFrontLoading items per day. The total number of items washed per day must be at least MinItemsPerDay.", formulation: "WashRateTopLoading \cdot NumTopLoading + WashRateFrontLoading \cdot NumFrontLoading \ geq MinItemsPerDay", code": { "gurobipy": "model.addConstr(WashRateTopLoading * NumTopLoading + WashRateFrontLoading * NumFrontLoading >= MinItemsPerDay)" +``` + +```txt +} +1 +{ "description": "A top-loading machine consumes EnergyConsumptionTopLoading kWh per day and a front-loading machine consumes EnergyConsumptionFrontLoading kWh per day. The total energy consumption per day cannot exceed MaxEnergyPerDay kWh.", "formulation": "NumTopLoading \times times EnergyConsumptionTopLoading + NumFrontLoading \\times Times EnergyConsumptionFrontLoading \\\leq\) MaxEnergyPerDay", "code": { "gurobipy": "model.addConstr(EnergyConsumptionTopLoading \* NumTopLoading + EnergyConsumptionFrontLoading \* NumFrontLoading <= MaxEnergyPerDay)" } +1 +{ "description": "At most MaxFractionTopLoading fraction of the total machines can be top-loading.", "formulation": "NumTopLoading \\\leq\) MaxFractionTopLoading \\\times\) times (NumTopLoading + NumFrontLoading)", "code": { "gurobipy": "model.addConstr(NumTopLoading <= MaxFractionTopLoading \* ( NumTopLoading + NumFrontLoading))" } +1 +{ "description": "At least MinNumFrontLoading machines must be front-loading.", "formulation": "NumFrontLoading \\\geq\) MinNumFrontLoading", "code": { "gurobipy": "model.addConstr(NumFrontLoading >= MinNumFrontLoading)" } +1 +], +"objective": { "description": "Minimize the total number of washing machines purchased.", "formulation": "Min \\\ NumTopLoading + NumFrontLoading", "code": { "gurobipy": "model.setObjective(NumTopLoading + NumFrontLoading, GRB.MINIMIZE)" } +} +} +Second problem formulation (Problem B): +{ "parametrized_description": "A laundromat can buy two types of washing machines, a top- loading model and a front-loading model. The top-loading model can wash V items per day while the front-loading model can wash T items per day. The top-loading model consumes F kWh per day while the front-loading model consumes A kWh per day. The laundromat must be able to wash at least J items per day and has available R kWh per day. Since the top-loading machines are harder to use, at most S of the machines can be top-loading. Further, at least W machines should be front-loading. How many of each machine should the laundromat buy to minimize the total number of washing machines?", "keywords": [ N.A." ] , +"parameters": { "W": { "description": "The smallest quantity of front-loading machines.", shape": [] } , "A": { "description": "Daily electricity usage of a front-loading washer (kWh)", shape": [] } , "R": { +``` + +```txt +"description": "The highest amount of energy that can be obtained in a single day (kWh).", +"shape": [] +}, +"S": { +"description": "The highest percentage of machines that can have a top-loading feature." +"shape": [] +}, +"F": { +"description": "Daily energy usage of a top-loading washing machine in kilowatt-hours", +"shape": [] +}, +"J": { +"description": "The smallest quantity of items that need to be cleaned on a daily basis", +"shape": [] +}, +"V": { +"description": "Quantity of objects cleaned daily using a top-loading washer", +"shape": [] +}, +"T": { +"description": "The quantity of objects cleaned daily with a front-loading washing machine." +"shape": [] +} +}, +"variables": { +"a": { +"description": "The quantity of top-loading appliances", +"type": "continuous", + shape": [] +}, +"g": { +"description": "The quantity of front-loading machines", +type": "continuous", + shape": [] +} +}, +"constraints": [ +{ +"description": "A top-loading washer cleans V items daily, while a front-loading washer cleans T items daily. The combined total of items cleaned each day should not fall below J., +"formulation": "J \leq V \cdot a + T \ \cdot g", +code": { +"gurobipy": "model.addConstr(V * a + T * g >= J)" +} +} +], +"objective": { +"description": "Reduce the overall quantity of washing machines bought." +"formulation": "Min \ g + a", +code": { +"gurobipy": "model.setObjective(a + g, GRB.MINIMIZE)"} +} +``` + +```txt +Based on the data, please respond with exactly one of the following: - "Equivalent" if these two are the same formulation. Be rigorous in your reasoning. - "Not Equivalent" if they are different. When you are not sure, say "Not Equivalent". +``` + +Briefly explain the reasoning in 1-2 sentences, then end with the word "Equivalent" or "Not Equivalent" on its own line. + +# B.1.1. EquivaMap PROMPT + +Listing 2: EquivaMap Prompt +```txt +You are an AI language model assisting in mapping variables between two optimization problems by analyzing their roles in constraints and the objective function. +**Variable from Problem 1:** +- **Name:** OdorRemovingChemicalUnits +- **Description:** The number of units of odor-removing chemical used per house +- **Constraints involving OdorRemovingChemicalUnits:** +- Description: The total number of chemical units used per house cannot exceed MaxTotalUnits. Formulation: CleansingChemicalUnits + OdorRemovingChemicalUnits \leq MaxTotalUnits +- Description: The number of cleansing chemical units used cannot exceed MaxCleansingToOdorRatio times the number of odor-removing chemical units used. Formulation: CleansingChemicalUnits \leq MaxCleansingToOdorRatio \cdot OdorRemovingChemicalUnits +- **In Objective Function:** Yes +**Variables from Problem 2:** +- **Name:** v_0 +**Description:** Digit 0 of the The quantity of cleaning solution units utilized per household +**Constraints involving v_0:** +- Description: The quantity of cleansing chemical units applied must not surpass H times the quantity of odor-removing chemical units used. Formulation: H \cdot (f_0*10^0 + f_1*10^1) \geq geq (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The cumulative quantity of chemical components utilized for each residence must not surpass T. Formulation: T \geq geq (f_0*10^0 + f_1*10^1) + (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The company is required to utilize a minimum of G units of the cleaning solution per household. Formulation: G \leq g (v_0*10^0 + v_1*10^1 + v_2*10^2) +**In Objective Function:** Yes +- **Name:** v_1 +**Description:** Digit 1 of the The quantity of cleaning solution units utilized per household +**Constraints involving v_1:** +- Description: The quantity of cleansing chemical units applied must not surpass H times the quantity of odor-removing chemical units used. Formulation: H \cdot (f_0*10^0 + f_1*10^1) \geq geq (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The cumulative quantity of chemical components utilized for Each residence must not surpass T. Formulation: T \geq geq (f_0*10^0 + f_1*10^1) + (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The company is required to utilize a minimum of G units of the cleaning solution per household. Formulation: G \leq g (v_0*1O^0 + v_1*1O^1 + v_2*1O^2) +**In Objective Function:** Yes +- **Name:** v_2 +**Description:** Digit 2 of the The quantity of cleaning solution units utilized per household +**Constraints involving v_2:** +- Description: The quantity of cleansing chemical units applied must not surpass H times the quantity of odor-removing chemical units used. Formulation: H \cdot (f_0*10^0 + f_1*10^1) \geq geq (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The cumulative quantity of chemical components utilized forEach residence must not surpass T. Formulation: T \geq geq (f_0*1O^0 + f_1*1O^1) + (v_0*1O^0 + v_1*1O^1 + v_2*1O^2) +``` + +```yaml +Description: The company is required to utilize a minimum of G units of the cleaning solution per household. Formulation: G \leq (v_0*10^0 + v_1*10^1 + v_2*10^2) +**In Objective Function:** Yes +- **Name:** f_0 +**Description:** Digit 0 of the The quantity of odor-neutralizing chemical applied in each household +**Constraints involving f_0:** +- Description: The quantity of cleansing chemical units applied must not surpass H times the quantity of odor-removing chemical units used. Formulation: H \cdot (f_0*10^0 + f_1*10^1) \geq (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The cumulative quantity of chemical components utilized for each residence must not surpass T. Formulation: T \geq (f_0*10^0 + f_1*10^1) + (v_0*10^0 + v_1*10^1 + v_2*10^2) +**In Objective Function:** Yes +- **Name:** f_1 +**Description:** Digit 1 of the The quantity of odor-neutralizing chemical applied in each household +**Constraints involving f_1:** +- Description: The quantity of cleansing chemical units applied must not surpass H times the quantity of odor-removing chemical units used. Formulation: H \cdot (f_0*10^0 + f_1*10^1) \geq (v_0*10^0 + v_1*10^1 + v_2*10^2) +- Description: The cumulative quantity of chemical components utilized for each residence should not surpass T. Formulation: T \geq (f_0*10^0 + f_1*10^1) + (v_0*10^0 + v_1*10^1 + v_2*10^2) +**In Objective Function:** Yes +Based on the above information, find the best mapping from variables in Problem 2 for the variable 'OdorRemovingChemicalUnits' from Problem 1. The mapping can be a linear combination of variables from Problem 2, possibly with constant multipliers. Your goal is to express 'OdorRemovingChemicalUnits' in terms of variables from Problem 2, as accurately as possible, based on their roles in the constraints and objective functions. +**Important Instructions:** +- **Provide only the mapping for 'OdorRemovingChemicalUnits' as a JSON object.** +- **Do not include any additional text, explanations, or formatting.** +- **The JSON object must follow this exact structure:** +{ "OdorRemovingChemicalUnits": [ { "constant": constant_value_1, "variable": "variable_name_1" }, { "constant": constant_value_2, "variable": "variable_name_2" }, ... } +} +- **If there is only one term in the mapping, the list should contain a single object.** +- **Use numerical values for constants (decimals), and enclose variable names in double quotes ("").** +**Examples:** +1. If the best mapping is '0.1*a', your response should be: +``` + +```json +{ +"OdorRemovingChemicalUnits": [ + "constant": 0.1, + "variable": "a" +} +} +2. If the best mapping is '0.1*a + 0.01*b', your response should be: +{ +"OdorRemovingChemicalUnits": [ + "constant": 0.1, + "variable": "a" +], + "constant": 0.01, + "variable": "b" +] +} +3. If the best mapping is a single variable 'a' with a coefficient of 1, your response should be: +{ +"OdorRemovingChemicalUnits": [ + "constant": 1, + "variable": "a" +] +} +4. If there is no direct mapping, your response should be: +{ +"OdorRemovingChemicalUnits": [ + "constant": "none", + "variable": "none" +] +} +``` + +# C. Maximum Independent Set example + +![](images/3b6a575d9d31311db6107e5479bc5a5dc204bba9d4283f0c37a9bb33e07ceeb4.jpg) +Figure 3: Comparison between set-based and individual-variable representations in JSON input formatting. EquivaMap operates on sets of variables, allowing the metadata and constraints to be described concisely (left) instead of expanding each variable individually, resulting in longer and more redundant prompts (right). + +Consider the maximum independent set example in Figure 3. EquivaMap takes in set-based representations of input formulations (left). When the prompt iterates between variables of formulations $\alpha$ and $\alpha'$ , it processes the entire 'Node' set as input, rather than individual variables like Node 1, Node 2, etc. If variables in formulation $alpha'$ are labeled as Node', the mapping discovered by the LLM will be $Node[i] = Node'[i], \forall i$ , instead of separate mappings for each indexed variable. This distinction is crucial for scalability, as it means our prompt size remains constant regardless of the number of nodes in the graph. + +# D. Runtime Analysis + +To evaluate the computational overhead of EquivaMap and the baseline methods, we measured the average runtime across all instances in our dataset. The breakdown of time spent on different components is presented in Table 5. + +Table 5: Mean (± std. dev.) runtime (seconds) per instance for different components of EquivaMap and baselines. Runtime is averaged across all instances in the EquivaFormulation dataset. + +
MethodSolving TimeLLM Call TimeWL-Test TimeTotal
Execution Accuracy0.12 ± 0.02--0.12 ± 0.02
WL-Test--0.38 ± 0.070.38 ± 0.07
EquivaMap0.12 ± 0.0211.88 ± 4.48-12.00 ± 4.50
+ +While EquivaMap exhibits a higher total runtime compared to the baselines, this cost should be considered in light of its significantly improved accuracy and its ability to identify complex mappings that other methods miss (as shown in Section 4.2). The LLM interaction, though currently the bottleneck, enables a level of symbolic reasoning and mapping discovery previously unattainable. It is also worth noting that this runtime is for a single equivalence check. In practice, formulation equivalence checking is often an offline analysis task where a higher runtime can be tolerated in exchange for reliable results. Furthermore, the LLM call time can potentially be reduced with more optimized prompting strategies, the use of smaller fine-tuned models, or by leveraging future advancements in LLM efficiency. Additionally, as discussed in Section 3.3, EquivaMap's prompt length scales with the number of sets of variables rather than individual variables, which helps manage the LLM interaction cost for larger, structured problems. \ No newline at end of file diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/images.zip b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bb09f358ef4abd8f0400d99defc8d005a5d13190 --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69abaef8e12f3418fc97af403736b56ea55b2f887bc63649e1e303ad171912b6 +size 558788 diff --git a/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/layout.json b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bd8eed36e8e29b1c420d069b0d9932d8e8894fe9 --- /dev/null +++ b/ICML/2025/EquivaMap_ Leveraging LLMs for Automatic Equivalence Checking of Optimization Formulations/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c32eac570fd7b6ead9b3c034d638e1c2ca68544246c483b3db0b61a4094a5bf0 +size 567408 diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_content_list.json b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0631818618a8738b1373ec12a7ecb9dc04e779b3 --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bad96681b148d63ade8fd694b67d77c4f98c4a8fa0a2593d15e403e0a21cd414 +size 112665 diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_model.json b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..017bb664a015092222cde776fbef1c466895b13c --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:580e73fd287d5b08bf72e94e26f0cde4c527b5520cb894608720d863d118ef94 +size 137576 diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_origin.pdf b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1ef5441b2007bb20da784e3bfe03af697f2c00b7 --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/a67cb270-4111-4b89-b5c9-230bc63ac0bd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:affc3a337fae31d625dd349a7f101380e7ed9ebf5e4905f8a2a12bcf1b6c4803 +size 898204 diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/full.md b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..baa2c3d8aca125d47f33e765551c9cd703dfb898 --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/full.md @@ -0,0 +1,428 @@ +# Equivalence is All: A Unified View for Self-supervised Graph Learning + +Yejiang Wang $^{12}$ Yuhai Zhao $^{12}$ Zhengkui Wang $^{3}$ Ling Li $^{4}$ Jiapu Wang $^{5}$ Fangting Li $^{12}$ Miaomiao Huang $^{12}$ Shirui Pan $^{6}$ Xingwei Wang $^{1}$ + +# Abstract + +Node equivalence is common in graphs, such as computing networks, encompassing automorphic equivalence (preserving adjacency under node permutations) and attribute equivalence (nodes with identical attributes). Despite their importance for learning node representations, these equivalences are largely ignored by existing graph models. To bridge this gap, we propose a GrAph self-supervised Learning framework with Equivalence (GALE) and analyze its connections to existing techniques. Specifically, we: 1) unify automorphic and attribute equivalence into a single equivalence class; 2) enforce the equivalence principle to make representations within the same class more similar while separating those across classes; 3) introduce approximate equivalence classes with linear time complexity to address the NP-hardness of exact automorphism detection and handle node-feature variation; 4) analyze existing graph encoders, noting limitations in message passing neural networks and graph transformers regarding equivalence constraints; 5) show that graph contrastive learning are a degenerate form of equivalence constraint; and 6) demonstrate that GALE achieves superior performance over baselines. + +# 1. Introduction + +Node equivalence (Lorrain & White, 1971; Bafai, 1977) is common in real-world graphs such as computing networks, where resources form nodes, and their dependencies form + +$^{1}$ School of Computer Science and Engineering, Northeastern University, China $^{2}$ Key Laboratory of Intelligent Computing in Medical Image of Ministry of Education, Northeastern University, China $^{3}$ InfoComm Technology Cluster, Singapore Institute of Technology, SIT X NVIDIA AI Centre, Singapore $^{4}$ Shanxi University, China $^{5}$ Hefei University of Technology, China $^{6}$ Griffith University, Australia. Correspondence to: Yuhai Zhao . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/ded2378861e8f0dcf47874ee966094b85b712bccc8c831e6ca434089fdfcae55.jpg) +Figure 1. An example of automorphic equivalence. Hollow double arrows indicate node permutations in graph $\mathcal{G}$ , shown in cycle notation (e.g., $(1,2,3)$ means $2\rightarrow 1$ , $3\rightarrow 2$ , $1\rightarrow 3$ ). + +edges. In terms of graph structure, automorphic equivalence represents a strict form of equivalence: there exists a global permutation that maps nodes within the same equivalence class to each other (Cameron & Mary, 2004). As shown in Figure 1, we perform permutations on the nodes of the original graph $\mathcal{G}$ . Here, $\mathcal{G}_{(i,j,\dots,k)}$ represents a permuted graph under the cycle notation of permutation. For instance, $\mathcal{G}_{(1,2,3)}$ means nodes 1, 2, and 3 are cyclically permuted (node 2 is mapped to node 1, node 3 to node 2, and node 1 to node 3). We can observe that $\mathcal{G} = \mathcal{G}_{(6,7)} = \mathcal{G}_{(1,2,3)}$ , indicating that these nodes are structurally equivalent with respect to the graph topology. In contrast, nodes 4 and 5 are not equivalent, as swapping them would not preserve their adjacency relations. + +Automorphic equivalence (AE) is a fundamental concept in various scientific domains such as chemistry and network analysis (Faulon, 1998; Friedkin & Johnsen, 1997). For instance, AE is a key indicator of similarity in social status and behavior in social networks (Everett, 1985). Furthermore, for graphs with node attributes, another type of equivalence can be defined based on attribute similarity. Specifically, a new equivalence class can be constructed by measuring the distance between attribute vectors: nodes with a close distance are grouped into the same equivalence class. + +Naturally, we would expect graph representation models to preserve and reflect these node equivalences in their encoded node representations. However, we find that few studies ex + +plicity, particularly in the widely studied paradigm of self-supervised graph learning, such as graph contrastive learning (Thakoor et al., 2022; Liu et al., 2024a; Wan et al., 2024). This method typically augments the original graph (e.g., by randomly removing edges) to generate two contrasting views. Contrastive constraints are then applied to encourage the representations of the same node (positive views) in both augmented graphs to be as similar as possible, while ensuring that representations of different nodes (negative views) become dissimilar. However, this paradigm overlooks the equivalence relations in terms of graph structure and node attributes. Existing methods focus solely on aligning the representations of the same node across augmented views, pushing apart those of different nodes, while often neglecting the fact that nodes similar to a given node are not limited to that node alone. Consequently, certain similarities between different nodes are frequently ignored. + +To address these issues, we propose a novel equivalence-based self-supervised graph representation learning framework (GALE) grounded in the equivalence principle: node representations within the same equivalence class should be more similar, while those in different equivalence classes should be as dissimilar as possible. Specifically, 1) we define two equivalence relations—automorphic equivalence based on graph structure and attribute equivalence based on node attributes—and combine them into a unified equivalence class; 2) Then we enforce the equivalence principle, ensuring the node representations within the same equivalence class are similar, while those in different classes are dissimilar; 3) We introduce approximate equivalence classes with linear time complexity to address the NP-hard nature of exact automorphism detection and handle practical challenges such as attribute noise or slight variations that still indicate similarity, which make strict equivalence impractical in real-world graphs; 4) We note that message passing neural networks (MPNNs) make equivalent nodes similar but risk over-similarity for non-equivalent nodes, while most position encoding methods in graph transformers fail to incorporate the automorphic equivalence constraint; 5) From the equivalence perspective, we show that the current graph contrastive learning paradigm is a degenerate form of equivalence constraint, where each equivalence class is limited to a single node; 6) We demonstrate that GALE surpasses SOTA algorithms through experiments on benchmark datasets. + +# 2. Related Work + +Equivalence in Graphs. The concept of node equivalence traces its roots to structural sociology and algebraic graph theory (Wasserman & Faust, 1994). In social network analysis, Lorrain and White's structural equivalence (Lorrain & White, 1971; Fortunato, 2010) formalized the idea that + +nodes sharing identical connectivity patterns occupy equivalent roles, forming the basis for role discovery in networks. However, its strict definition limits its applicability in complex networks. A broader concept of equivalence, automorphic equivalence (AE) (Lauri & Scapellato, 2016), emerged from graph automorphism theory, where two nodes are equivalent if there exists a permutation of the graph's vertices such that adjacency relations are preserved (Bafai, 1977). AE has proven fundamental across scientific domains, e.g., in social networks, AE identifies individuals with identical social statuses or influence patterns (Everett, 1985; Friedkin & Johnsen, 1997). In chemistry, symmetric atoms in molecules (e.g., carbon atoms in benzene rings) are automorphically equivalent, explaining their identical chemical properties (Faulon, 1998). + +Self-supervised Graph Learning. Graph learning has attracted significant attention in recent years (Koh et al., 2024; Wang et al., 2024a;b; Liu et al., 2024b; Wang et al., 2024c). Graph self-supervised learning has emerged as a dominant paradigm for learning representations from unlabeled graph data (Wang et al., 2023; Zhao et al., 2025). Early approaches focused on preserving structural proximities through matrix factorization (Belkin & Niyogi, 2001), random walk objectives (Grover & Leskovec, 2016), or deep autoencoders (Cao et al., 2016). The recent surge in graph contrastive learning (GCL) methods (Cai et al., 2023; Li et al., 2022; Thakoor et al., 2022) has centered around maximizing agreement between positive views of the same node while repelling negative samples. Contrastive loss encourages similar representations for the same node across augmented views, while separating different nodes. However, it treats each node as only equivalent to itself, overlooking structural or attribute-based equivalence. + +# 3. Background + +Notations. Let $G = (V, E)$ be a graph with $n$ nodes and $m$ edges, where $V$ denotes the set of nodes and $E$ represents the set of edges. If node attributes are available, we denote the node feature matrix as $\mathbf{X} \in \mathbb{R}^{n \times d}$ , where $d$ represents the dimension of the node attributes. + +Problem Formulation. In this work, we focus on learning the representation $\mathbf{z}_v \in \mathbb{R}^q$ for each node $v$ in an unsupervised manner, where $q$ denotes the output dimension. + +Equivalence Relation and Equivalence Class. Let $S$ be a non-empty set (in this paper, the set of interest is the node set $V$ ), and let $R$ be a relation on $S$ . We say that $R$ is an equivalence relation on $S$ if and only if $R$ satisfies the following properties: 1) Reflexivity: Every element is related to itself under $R$ (i.e., $x \simeq_R x$ for all $x \in S$ ). 2) Symmetry: If $x \in S$ is related to $y \in S$ under $R$ , then $y$ is related to $x$ under $R$ (i.e., $x \simeq_R y \Rightarrow y \simeq_R x$ ). 3) + +![](images/fb31c923fc281ac9aa3ae48736b170da504322c88157d242885871137e8a88e0.jpg) +Figure 2. Overview of GALE, combining an encoder and equivalence constraints from structural and attribute-based partitions. The constraints regularize the encoder's node representations. + +Transitivity: If $x \in S$ is related to $y \in S$ and $y$ is related to $z \in S$ under $R$ , then $x$ is related to $z$ under $R$ (i.e., $x \simeq_R y \wedge y \simeq_R z \Rightarrow x \simeq_R z$ ). For example, the identity relation $(=)$ on a set $S$ is an equivalence relation. For each $x \in S$ , the equivalence class of $x$ determined by $R$ , denoted as $[x]$ , is defined as $[x] = \{y \in S : x \simeq_R y\}$ . + +Partition and Induced Partition. Let $\mathcal{P}$ be a family of subsets of $S$ . We say that $\mathcal{P}$ is a partition of $S$ if and only if the following conditions are satisfied: 1) If $X \in \mathcal{P}$ , then $X \neq \emptyset$ (i.e., no subset in the partition is empty); 2) If $X \in \mathcal{P}$ and $Y \in \mathcal{P}$ , then either $X = Y$ or $X \cap Y = \emptyset$ (i.e., subsets in the partition are pairwise disjoint); 3) $\bigcup_{X \in \mathcal{P}} X = S$ (i.e., the union of all subsets in the partition covers the entire set $S$ ). It can be proven that the equivalence classes determined by any equivalence relation on a set form a partition of that set. This partition is referred to as the induced partition from the equivalence relation. + +Automorphism and Orbit. A permutation $\pi$ on a set $V$ rearranges its elements as $V_{\pi} = \{v_{\pi}\}$ . We use cycle notation to represent permutations. All permutations of $V$ form a symmetric group $S_{n}$ . A graph automorphism of a graph $G$ is a permutation $\pi \in S_{n}$ that preserves the edge relations of $G$ , i.e., $E = E_{\pi} \triangleq \{(u_{\pi}, v_{\pi}) \mid (u, v) \in E\}$ . Every graph has a trivial automorphism, the so-called identity automorphism, which maps each vertex to itself. The set of all automorphisms of a graph forms a group, called the automorphism group of the graph, denoted as $\operatorname{Aut}(G)$ . The elements (permutations) in the automorphism group of a graph define an equivalence relation on the node set $V$ : + +$$ +u \simeq_ {a u t o} v \iff \exists \pi \in \operatorname {A u t} (G), u _ {\pi} = v \tag {1} +$$ + +This equivalence relation, also known as a symmetry relation, partitions the node set $V$ into non-overlapping equivalence classes called orbits. + +# 4. Learning with Equivalence Classes + +In this Section, we introduce a novel equivalence-based self-supervised graph learning framework (GALE), as shown in Figure 2. GALE consists of a dual-branch structure. One + +branch involves a graph encoder, which encodes the graph to obtain node representations; we use a graph neural network (GNN) for this purpose. The other branch focuses on inducing equivalence-class partitions of the node set. Based on the equivalence principle—nodes within the same equivalence class are considered similar, while nodes in different classes are considered dissimilar—we impose regularization constraints on the node representations and optimize the encoder with an equivalence loss. In our work, we construct two types of equivalence-class partitions: 1) Group I: Calculated based on the graph's adjacency information, capturing the graph's structural automorphism. 2) Group II: Calculated based on the attribute information of nodes, capturing feature equality. We fuse these partitions into a unified node constraint network, ensuring the learned representations capture both structural and attribute-based equivalences. + +# 4.1. Automorphic Equivalence from Structure + +A graph typically encompasses two components: the relationships between nodes (edges) and the properties associated with each node. We establish equivalence relations and their corresponding partitions on both of these aspects. First, we focus on adjacency. As discussed earlier, automorphic equivalence represents a strict node equivalence relation based on the graph's structure. Indeed, real-world graph data often exhibits a substantial number of nodes with automorphic equivalence. + +To verify this, we present statistics on the proportion of nodes/graphs with automorphic equivalence in 3 benchmark network datasets (Kipf & Welling, 2017) and 3 graph datasets (Morris et al., 2020). For network data (single graph), we calculate the ratio of nodes in non-singleton orbits (the number of nodes is greater than one) to the total number of nodes. For graph datasets (multiple graphs), we compute the ratio of graphs with non-trivial automorphisms. The results, shown in Table 1, demonstrate that a significant proportion of nodes/graphs exhibit non-trivial automorphic equivalence, highlighting its prevalence in real-world datasets. + +Table 1. Proportions of automorphically equivalent nodes (left three) and graphs (right four) in network and graph-level datasets. + +
DataCoraCiteSeerPubMedMUTAGDDIMDB-BCOLLAB
Ratio18.4%46.2%45.7%100%96.3%100%99.9%
+ +To compute the exact automorphisms of a graph, we adopt classical algorithms such as bliss or nauty (Juntila & Kaski, 2011; McKay & Piperno, 2014). For example, bliss is an efficient method for computing the automorphism group of real-world graphs by leveraging symmetry-breaking and backtracking search. Once the automorphism orbits are obtained, we construct the automorphic equivalence partition $\mathcal{P}_{\mathrm{auto}} = \{C_i\}$ , where $C_i$ represents an orbit. + +# 4.2. Attribute Equivalence from Nodes + +To construct a partition of the graph based on node attributes, we define an equivalence relation among nodes such that nodes with identical attributes are grouped into the same equivalence class: + +$$ +u \simeq_ {a t t r} v \Longleftrightarrow \mathbf {x} _ {u} = \mathbf {x} _ {v}, \quad \forall u, v \in V \tag {2} +$$ + +which ensures that the partition reflects the inherent equation of nodes in terms of their attributes. This equivalence relation induces a partition $\mathcal{P}_{attr} = \{D_i\}$ , where each subset $D_{i} \subseteq V$ contains all nodes with the same attribute values. + +# 4.3. Fusion of Equivalences + +With the two partitions established, we aim to create a refined node partition by fusion. Generally, both the structural role and the attributes of a node are equally important for its characterization. For example, consider a citation network (where nodes represent papers and edges represent citations): two papers might be cited by similar papers (graph structure), yet their topics (attributes) could be different. Therefore, we seek a refined partition that preserves the equivalence relationships from both perspectives. To accomplish this, we construct the fused partition by intersecting the structure-based and attribute-based partition: + +$$ +\mathcal {P} _ {\text {f u s e}} = \left\{C _ {i} \cap D _ {j} \mid C _ {i} \in \mathcal {P} _ {\text {a u t o}}, D _ {j} \in \mathcal {P} _ {\text {a t t r}}, C _ {i} \cap D _ {j} \neq \emptyset \right\} \tag {3} +$$ + +It inherits characteristics from both partitions, ensuring consistency with both graph structure and node attributes. Each fused equivalence class $F = C_{i} \cap D_{j}$ contains nodes that are equivalent under both graph automorphisms and node attribute equivalence. The resulting partition satisfies: 1) $\bigcup_{F \in \mathcal{P}_{\mathrm{fuse}}} F = V$ ; 2) $F_{k} \cap F_{l} = \emptyset$ for $k \neq l$ . We now prove that the relation $\simeq_{\mathrm{fuse}}$ , which induces the fused partition $\mathcal{P}_{\mathrm{fusion}}$ , satisfies the properties of an equivalence relation. + +Theorem 4.1. The fusion relation defined as $u \simeq_{\text{fuse}} v$ is an equivalence relation. + +Proof. To show that $\simeq_{\mathrm{fuse}}$ is an equivalence relation, we verify the three properties: 1) Reflexivity: For any node $u \in V$ , we have $u \simeq_{\mathrm{auto}} u$ (since automorphic equivalence is reflexive) and $u \simeq_{\mathrm{attr}} u$ (since attribute equivalence is reflexive). Therefore, $u \simeq_{\mathrm{fuse}} u$ , satisfying reflexivity. 2) Symmetry: If $u \simeq_{\mathrm{fuse}} v$ , then $u \simeq_{\mathrm{auto}} v$ and $u \simeq_{\mathrm{attr}} v$ . By the symmetry of $\simeq_{\mathrm{auto}}$ and $\simeq_{\mathrm{attr}}$ , we have $v \simeq_{\mathrm{auto}} u$ and $v \simeq_{\mathrm{attr}} u$ , proving symmetry. 3) Transitivity: If $u \simeq_{\mathrm{fuse}} v$ and $v \simeq_{\mathrm{fuse}} w$ , then $u \simeq_{\mathrm{auto}} v$ , $v \simeq_{\mathrm{auto}} w$ , and $u \simeq_{\mathrm{attr}} v$ , $v \simeq_{\mathrm{attr}} w$ . By the transitivity of $\simeq_{\mathrm{auto}}$ and $\simeq_{\mathrm{attr}}$ , we have $u \simeq_{\mathrm{auto}} w$ and $u \simeq_{\mathrm{attr}} w$ . Hence, transitivity is established. + +# 4.4. Equivalence Loss + +To encourage nodes within the same fused equivalence class to have similar representations and nodes from different + +equivalence classes to have dissimilar representations, we define a loss function based on the similarity between node embeddings. + +Intra-class Loss. Let $\mathcal{P}_{\mathrm{fuse}} = \{F_i\}$ represent the fused equivalence partition, and let $\mathbf{z}_u$ denote the embedding of node $u$ . The intra-class loss is defined to encourage the embeddings of nodes within the same equivalence class $F_i$ to be similar: + +$$ +\mathcal {L} _ {\text {i n t r a}} = \sum_ {i} \sum_ {u, v \in F _ {i}} - \mathcal {D} \left(\mathbf {z} _ {u}, \mathbf {z} _ {v}\right) \tag {4} +$$ + +where $\mathcal{D}:\mathbb{R}^q\times \mathbb{R}^q\to \mathbb{R}$ is a discriminator that maps two views to an agreement score. In this work, we use the standard inner product $\mathcal{D}(\mathbf{z}_i,\mathbf{z}_j) = \mathbf{z}_i^T\mathbf{z}_j$ + +Inter-class Loss. The inter-class loss is designed to ensure that embeddings of nodes from different equivalence classes are dissimilar. For nodes $s \in F_i$ and $t \in F_j$ with $i \neq j$ , we penalize high similarity between their embeddings. The inter-class loss is defined as: + +$$ +\mathcal {L} _ {\text {i n t e r}} = \sum_ {i \neq j} \sum_ {s \in F _ {i}, t \in F _ {j}} \mathcal {D} \left(\mathbf {z} _ {s}, \mathbf {z} _ {t}\right) \tag {5} +$$ + +Finally, the equivalence loss is defined as: + +$$ +\mathcal {L} _ {\text {e q u i v}} = \mathcal {L} _ {\text {i n t r a}} + \mathcal {L} _ {\text {i n t e r}} \tag {6} +$$ + +# 5. Approximate Equivalence Classes + +In real-world graphs, strict equivalence relationships, such as automorphic or exact attribute-based equivalence, are often impractical due to the computational cost of determining exact automorphisms and the rarity of complete attribute equality caused by noise or data variations. To overcome the challenges, we introduce approximate equivalence classes, which relax the strict requirements of exact equivalence. + +# 5.1. Approximate Automorphic Equivalence + +Determining the exact automorphism group of a graph is computationally intractable, as it is the NP-hard problem. To overcome this, we propose an efficient approximation using PageRank vectors, which leverage their inherent relationship to approximate automorphic equivalence effectively. + +The PageRank algorithm (Langville & Meyer, 2004) assigns a score to each node in a graph, measuring its relative importance based on the graph structure. Let $\mathbf{P} \in \mathbb{R}^{n \times n}$ denote the Markov transition matrix of the graph, where $P_{ij} = 1 / \deg(i)$ if $(i,j) \in E$ , and $P_{ij} = 0$ otherwise, with $\deg(i)$ representing the degree of node $i$ . The PageRank vector $\mathbf{r} \in \mathbb{R}^n$ is the stationary distribution of a random walk with teleportation, based on the transition probabilities $\mathbf{P}$ , computed as: + +$$ +\mathbf {r} = \alpha \mathbf {P} ^ {\top} \mathbf {r} + (1 - \alpha) \mathbf {v} \tag {7} +$$ + +where $\alpha \in (0,1)$ is the teleportation probability, $\mathbf{v} \in \mathbb{R}^n$ is a personalization vector (typically uniform). The PageRank vector assigns a score $r_i$ to each node $i \in V$ , reflecting its importance based on local connectivity and global graph structure. The following lemma establishes the relationship between automorphisms and PageRank. + +Lemma 5.1 (Ghorbani et al. (2021)). If two vertices $u, v \in V$ are automorphically equivalent in $G$ , then $u$ and $v$ have the same PageRank score: + +$$ +u \simeq_ {\text {a u t o}} v \Longrightarrow r _ {u} = r _ {v} \tag {8} +$$ + +We leverage this property to approximate automorphic equivalence by grouping nodes with similar PageRank scores. While nodes with equal PageRank scores are not necessarily automorphically equivalent, they often exhibit structural similarity in terms of their importance within the graph, providing an efficient approximation. To verify this, we conduct experiments on 8 benchmark datasets: Cora, Cite-seer, Pubmed (Kipf & Welling, 2017), Wiki-CS, AmazonComputers, Amazon-Photo, Coauthor-CS, and CoauthorPhysics (Shchur et al., 2018). Empirical results show the alignment between the true and approximate equivalence partitions, measured by the Variation of Information (Meilä, 2007) (with values closer to 0 indicating better alignment and 0 indicating perfect alignment). The detailed results are presented in Table 2, where we find that for all the data, the approximate partitions closely match the true ones, validating the effectiveness of our approximation. Here, we use $\alpha = 0.85$ ; for an analysis of different parameter settings, please refer to the Appendix. + +Table 2. Variation of Information (VI) for alignment between equivalences $\simeq_{\mathrm{auto}}$ and $\simeq_{\mathrm{PR}}$ on eight benchmark data. Lower VI values (0 indicating perfect alignment) are shaded in darker green. + +
DataCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCo-CSCo-Phy.
VI(↓)0.0210.04700.0010.0030.00400.001
+ +Computing PageRank has a time complexity of $\mathcal{O}(m)$ for graphs, where $m$ denotes the number of edges, which is significantly more efficient than exact automorphism computation (Kondaveeti et al., 2024). + +# 5.2. Approximate Attribute Equivalence + +In real-world networks, nodes often exhibit attributes that are not perfectly identical but are instead only slightly different. Strictly enforcing exact equality of node attributes when defining equivalence classes can lead to overly fragmented partitions, as even minor differences in attributes result in nodes being classified into different equivalence classes. To address this issue, we propose relaxing the equivalence constraint by using a similarity threshold based on the Euclidean distance between node attribute vectors. This allows + +nodes with sufficiently similar attributes to be grouped into the same equivalence class. For nodes $u, v \in V$ , we define the approximate attribute equivalence relation $\simeq_{\mathrm{attr}}^{\epsilon}$ as: + +$$ +u \simeq_ {\mathrm {a t t r}} ^ {\epsilon} v \Longleftrightarrow \| \mathbf {x} _ {u} - \mathbf {x} _ {v} \| _ {2} \leq \epsilon \tag {9} +$$ + +where $\epsilon \geq 0$ is a small positive threshold that controls the degree of similarity required for nodes to be considered equivalent. The relaxed partition allows nodes with similar attributes (within the threshold $\epsilon$ ) to be grouped together, even if their attributes are not exactly identical. Clearly, when $\epsilon = 0$ , it reduces to strict equivalence. When $\epsilon > 0$ , it is not a strict equivalence, though the resulting node sets may be called similarity groups. + +# 5.3. Complexity Analysis + +The time complexity of the GALE involves four components: 1) Automorphic equivalence can be approximated using PageRank, which runs in $\mathcal{O}(m)$ ; 2) Attribute-based equivalence requires grouping nodes by attributes, with a complexity of $\mathcal{O}(n^2)$ ; 3) Fusion of equivalences involves intersecting equivalence classes, scaling as $\mathcal{O}(n)$ in practice due to the typically small number and size of partitions. 4) Equivalence loss computation with a worst-case complexity of $\mathcal{O}(n^2)$ . Overall, the dominant term is $\mathcal{O}(n^2 + m)$ . + +# 6. Equivalence and Graph Encoders + +In this section, we discuss how mainstream graph encoders, message passing neural networks (MPNNs) and graph transformers, interact with the concept of equivalence. + +# 6.1. MPNNs and Automorphic Equivalence + +MPNNs (Wu et al., 2020) and their variants, such as Graph Convolutional Networks (GCNs), rely on the principle of neighborhood aggregation to learn node representations. The neighborhood aggregation mechanism of MPNNs inherently aligns with the goal of making automorphically equivalent nodes have similar representations. For example, consider two automorphically equivalent nodes $u$ and $v$ and their adjacency structures are identical. During the message-passing process, $u$ and $v$ will aggregate similar information from their neighbors. This property ensures that MPNNs can naturally preserve the similarity of node representations within the same equivalence class. + +However, MPNNs cannot guarantee that dissimilarity between different equivalence classes remains valid. As the number of layers increases, the representations of all nodes in the graph tend to converge, leading to the over-smoothing problem. This phenomenon reduces the discriminative power of the learned node embeddings. Common oversmoothing mitigations, like residual connections or dynamic neighborhoods, typically overlook node equivalence. + +To address this, explicit constraints based on equivalence classes can be incorporated into MPNN models. These constraints enforce inter-class dissimilarity while preserving intra-class similarity, helping to alleviate the over-smoothing problem. To demonstrate this, Figure 3 shows the classification results of GCN and GALE with increasing depth on the Cora and CiteSeer dataset. GCN's performance declines sharply with more layers, but GALE with equivalence constraints significantly mitigates the over-smoothing issue. + +![](images/c29ca3b7e382675d2e1e4bb8b7eb9a86dfe1d95867be5f711458e84e32c3c814.jpg) +(a) Cora + +![](images/8574b52fee2610232f6f52d594235cdc2582a14125b5bba3f4f7156716411941.jpg) +(b) Citeseer +Figure 3. Accuracy of GCN and GALE with increasing depth. + +# 6.2. Graph Transformers and Equivalence + +Graph transformers (Min et al., 2022) take a fundamentally different approach to learning node representations compared to MPNNs. Instead of relying on neighborhood aggregation based on adjacency structure, graph transformers use node positional embeddings to inject structural information and infer relationships between nodes through their positions and attributes. The node representations are then updated using a fully-connected self-attention mechanism. + +While graph transformers can capture global relationships, they do not inherently ensure that automorphically equivalent nodes are represented similarly. The effectiveness of capturing automorphic equivalence depends on the quality of the positional embeddings, which may not always align with the graph's symmetries. Moreover, the global nature of the attention mechanism, which lacks local constraints, means that nodes within the same equivalence class might not remain sufficiently similar, and there's no inherent mechanism to ensure dissimilarity between nodes in different equivalence classes. As a result, while graph transformers excel at encoding global structures, they may struggle to consistently respect automorphic equivalence without additional constraints or interventions. + +Positional Encoding and AE. Therefore, node positional embeddings, which are solely based on the graph's structure, are essential for reflecting the equivalence relationships within that structure. To evaluate whether common positional encoding (PE) methods align with automorphic equivalence, we propose a validation procedure that compares the ground truth automorphic equivalence with those derived from positional embeddings, using a distance threshold $\epsilon_{\mathrm{pe}} = 10^{-4}$ to construct equivalence classes. Specifically, + +we conduct experiments on 8 benchmark graph datasets using 5 PE methods: Laplace positional encoding (LapPE) (Kreuzer et al., 2021), Random walk positional encoding (RWSE) (Dwivedi et al., 2022), SignNet (Lim et al., 2023), ElstaticSE, and HKdiagSE (Rampasek et al., 2022). We compute the Variation of Information (VI) (Meilä, 2007), and the results are shown in Table 3. Our findings indicate that most existing PE methods do not truly adhere to automorphic equivalence, and in some cases, deviate significantly. This may be because these methods focus primarily on ensuring that neighboring nodes are assigned similar positions (locally), while neglecting the global equivalences within the graph. + +Table 3. Variation of Information between automorphic and positional encoding-based equivalence (lower is better, 0 is perfect). + +
MethodsCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCo-CSCo-Phy
LapPE7.3096.2010.0639.1019.3688.8080.1471.804
RWSE0.0730.3450.1380.2380.1580.0500.0350.023
SignNet7.5476.9660.6694.8795.0684.5080.9630.932
HKdiagSE0.0070.0370.0023.4463.5902.0250.0481.308
ElstaticSE0.3451.5330.0960.7640.4830.1820.004-
+ +# 7. Equivalence in Graph Contrastive + +In this section, we analyze how equivalence classes play a role in graph contrastive learning (GCL). + +# 7.1. Analysis of Graph Contrastive Learning + +GCL starts by creating two views of the original graph $G_{1}$ through small perturbations, such as edge deletion, resulting in an augmented graph $G_{2}$ . These two views, $G_{1}$ and $G_{2}$ , are assumed to have minimal differences and preserve label invariance. For each node $i$ , the goal of the contrastive loss is to make the node's representations across the two views $\mathbf{z}_{i}^{1}$ (from $G_{1}$ ) and $\mathbf{z}_{i}^{2}$ (from $G_{2}$ ) more similar (positive pairs), while ensuring that the representations of different nodes $\mathbf{z}_{j}^{1}$ (from $G_{1}$ , $j \neq i$ ) and $\mathbf{z}_{i}^{2}$ (from $G_{2}$ ) are as dissimilar as possible (negative pairs). The contrastive loss can be formulated as follows: + +$$ +\mathcal {L} _ {\text {c o n}} = - \frac {1}{n} \sum_ {i = 1} ^ {n} \log \frac {\exp \left(\sin \left(\mathbf {z} _ {i} ^ {1} , \mathbf {z} _ {i} ^ {2}\right) / \tau\right)}{\sum_ {j = 1} ^ {n} \exp \left(\sin \left(\mathbf {z} _ {i} ^ {1} , \mathbf {z} _ {j} ^ {2}\right) / \tau\right)} \tag {10} +$$ + +where $\mathrm{sim}(\cdot ,\cdot)$ is a similarity function, $\tau$ is a temperature. + +From the perspective of equivalence classes, current GCL methods implicitly assume a trivial equivalence class structure, where each node is treated as its own equivalence class. Specifically, the contrastive loss enforces that each node's representation remains consistent across views (within the same trivial equivalence class) while being distinct from the representations of all other nodes (across different classes). + +Clearly, the assumption of trivial equivalence classes limits the ability of GCL to capture richer graph structures. Treat- + +ing each node as a separate equivalence class ignores similarities between nodes, such as automorphic equivalence or attribute-based similarity. + +# 7.2. Role of Augmentation and Contrastive + +GCL primarily relies on two mechanisms: graph augmentation and a contrastive loss that implicitly enforces equivalence class constraints. To disentangle their respective contributions, we conduct ablation studies on the loss in Eq. (10) using five benchmark datasets (Kipf & Welling, 2017). In the first ablation (w/o aug), we remove graph augmentations and perform contrastive learning on two identical views of the graph (i.e., $G_{1} = G_{2}$ ), using a single shared encoder (instead of two). This design isolates the effect of augmentation by ensuring there is no variation in the contrastive loss other than the inherent randomness in training. In the second ablation (w/o Pos), we modify the contrastive loss by removing positive pairs—i.e., the term encouraging the similarity of $\mathbf{z}_i^1$ and $\mathbf{z}_i^2$ —and retain only the negative sample term. This effectively disrupts the equivalence class constraint, as nodes are no longer required to maintain consistent representations across views. Table 4 presents the corresponding results. + +Table 4. Node classification accuracy (%) without augmentation. + +
DatasetCoraCiteSeerPubMedAmz-Comp.Coa-CS.
Aug+Pos83.26 ± 0.5673.20 ± 0.3781.33 ± 0.5888.85 ± 0.3092.71 ± 0.33
w/o Aug82.12 ± 0.6072.79 ± 0.2180.86 ± 0.7288.42 ± 0.4492.22 ± 0.29
w/o Pos76.10 ± 0.3964.47 ± 0.4880.37 ± 0.5186.27 ± 0.2189.38 ± 0.36
+ +The results in the table show that removing graph augmentations has minor impact on performance, indicating that augmentations are not the primary driver of GCL's effectiveness. In contrast, removing positive pairs significantly reduces performance across most data, highlighting the importance of equivalence constraints in the contrastive loss. + +# 8. Comparison with the SOTA Methods + +# 8.1. Experimental Setup + +Datasets. We evaluate the proposed model on both node classification and graph classification tasks. For node classification, we use 8 benchmark datasets: Cora, Cite-seer, Pubmed (Kipf & Welling, 2017), Wiki-CS, AmazonComputers, Amazon-Photo, Coauthor-CS, and CoauthorPhysics (Shchur et al., 2018). For graph classification, we evaluate on 8 datasets from the TUDataset benchmark (Morris et al., 2020), including NCI1, PROTEINS, DD, MUTAG, COLLAB, RDT-B, RDT-M5K, and IMDB-B. + +Baselines. We compare our method against a wide range of baseline methods across both node-level and graph-level tasks. For graph-level task: 1) two supervised learn + +ing methods, including GCN (Kipf & Welling, 2017) and GIN (Xu et al., 2018); 2) four kernel-based methods, including SP (Borgwardt & Kriegel, 2005), GK (Shervashidze et al., 2009), WL (Shervashidze et al., 2011), DGK (Yanardag & Vishwanathan, 2015); 3) three unsupervised methods, including NODE2VEC (Grover & Leskovec, 2016), SUB2VEC (Adhikari et al., 2018), GRAPH2VEC (Narayanan et al., 2017); 4) five self-supervised graph contrastive learning, including INFOGRAPH (Sun et al., 2020), GRAPHCL (You et al., 2020), AD-GCL (Suresh et al., 2021), JOAOv2 (You et al., 2021), RGCL (Li et al., 2022), SIMGRACE (Xia et al., 2022), SEGA (Wu et al., 2023), and AUTOGCL (Yin et al., 2022); For node-level tasks: 1) Supervised learning methods, including MLP and GCN (Kipf & Welling, 2017); 2) Graph embedding methods, including DEEPWALK (Perozzi et al., 2014) and NODE2VEC (Grover & Leskovec, 2016); 3) Graph contrastive learning methods, including VGAE (Kipf & Welling, 2016), DGI (Velickovic et al., 2019), GMI (Peng et al., 2020), MVGRL (Hassani & Khasahmadi, 2020), GRACE (Zhu et al., 2020), GCA (Zhu et al., 2021), BGRL (Thakoor et al., 2022), CCA-SSG (Zhang et al., 2021) and SUGRL(Mo et al., 2022). + +Protocol. We follow the standard evaluation protocol of previous state-of-the-art self-supervised learning methods. For node classification, we report the mean accuracy on the test set after 50 runs of training. Pretrained node embeddings are used to train a linear neural network for classification. The dataset is split into $10\% / 10\% / 80\%$ for training, validation, and testing, respectively. For graph classification, we evaluate the learned graph representations using a linear SVM classifier. We report the mean 10-fold cross-validation accuracy across 5 runs. For each training fold, the linear SVM is tuned using cross-validation, and the best mean accuracy is reported. The dataset is split into $80\% / 10\% / 10\%$ for training, validation, and testing, respectively. + +Implementation Details. We implement both GALE and its variant GALE-APR using PyTorch Geometric. The key difference is that GALE uses Nauty (McKay & Piperno, 2014) for exact automorphisms, while GALE-APR employs PageRank equivalence with $\alpha = 0.85$ . For node attributes, both rely on $\simeq_{\mathrm{attr}}^{\epsilon}$ with $\epsilon \in \{0,10^{-7},\dots ,10^{-1}\}$ . We adopt the Adam optimizer, tuning learning rates $\{0.0001,0.001,0.01\}$ , batch sizes $\{16,64,128,256,512\}$ . As iterations increase, Intra-class loss (4) dominates, causing the total loss (6) to become imbalanced and too small. We can add Softplus after the discriminator to mitigate this. + +# 8.2. Results and Analysis + +Performance on Graph-level Tasks. We evaluate whether GALE and its variant GALE-APR can outperform state-of-the-art methods on multiple graph-level benchmarks. Table 5 summarizes the results for both supervised and unsupervised baselines. Overall, GALE achieves top-tier perfor + +Table 5. Supervised and unsupervised classification accuracy (%) on TU datasets. The highest unsupervised performance is shaded in green, and the second-highest performance is shaded in light green. $-$ means that the results are unavailable. + +
ModelNCI1PROTEINSDDMUTAGCOLLABRDT-BRDT-M5KIMDB-B
GCN80.20 ± 0.1474.92 ± 0.3376.24 ± 0.1485.63 ± 0.2479.01 ± 0.1850.00 ± 0.1020.00 ± 0.1070.45 ± 0.37
GIN82.75 ± 0.1976.28 ± 0.2878.91 ± 0.1389.47 ± 0.1680.23 ± 0.1992.44 ± 0.2556.50 ± 0.2473.70 ± 0.60
SP73.53 ± 0.1675.07 ± 0.54>1d85.25 ± 0.24-64.13 ± 0.0439.64 ± 0.0255.62 ± 0.02
GK66.06 ± 0.1271.67 ± 0.5578.53 ± 0.0381.71 ± 0.2171.81 ± 0.3177.32 ± 0.0241.06 ± 0.0865.93 ± 0.10
WL80.01 ± 0.5072.92 ± 0.5679.78 ± 0.3680.76 ± 0.3069.30 ± 0.4268.82 ± 0.4146.06 ± 0.2172.30 ± 0.44
DGK79.98 ± 0.3673.21 ± 0.6174.79 ± 0.3287.51 ± 0.6564.43 ± 0.4878.35 ± 0.4341.49 ± 0.3267.09 ± 0.37
NODE2VEC54.93 ± 0.1657.58 ± 0.36-72.62 ± 1.0256.12 ± 0.02--50.25 ± 0.09
SUB2VEC52.82 ± 0.1553.06 ± 0.5654.33 ± 0.2461.17 ± 1.5955.26 ± 0.1571.48 ± 0.4236.68 ± 0.4255.34 ± 0.15
GRAPH2VEC73.21 ± 0.1873.33 ± 0.2179.32 ± 0.2983.28 ± 0.9371.10 ± 0.5475.78 ± 0.9646.86 ± 0.2671.16 ± 0.05
INFOGRAPH76.33 ± 0.7974.27 ± 0.4373.02 ± 1.3188.65 ± 1.0970.41 ± 0.3483.06 ± 0.8253.45 ± 1.1072.97 ± 0.49
GRAPHCL77.54 ± 0.3474.41 ± 0.3578.49 ± 0.3686.62 ± 1.2371.28 ± 1.1689.50 ± 0.7355.85 ± 0.3371.29 ± 0.38
AD-GCL74.15 ± 0.6273.33 ± 0.3675.74 ± 0.6888.70 ± 1.6672.01 ± 0.5390.04 ± 0.7654.55 ± 0.4070.35 ± 0.59
JOAOV278.36 ± 0.2174.02 ± 0.5377.36 ± 0.2987.23 ± 1.1269.05 ± 0.2286.36 ± 0.3055.77 ± 0.2370.12 ± 0.25
RGCL78.14 ± 0.8975.11 ± 0.5878.77 ± 0.5287.62 ± 1.1670.85 ± 0.6390.27 ± 0.5456.39 ± 0.3771.67 ± 0.76
SIMGRACE79.06 ± 0.1575.26 ± 0.2477.13 ± 0.8889.23 ± 1.2571.26 ± 0.5189.41 ± 0.3355.91 ± 0.2371.22 ± 0.30
SEGA79.15 ± 0.5276.00 ± 0.6878.81 ± 0.3390.23 ± 0.8974.10 ± 0.6290.12 ± 0.4656.08 ± 0.4073.60 ± 0.33
AUTOGCL78.39 ± 0.5869.80 ± 0.3875.76 ± 0.9385.22 ± 1.4371.40 ± 0.2686.56 ± 1.3155.68 ± 0.2372.26 ± 0.34
GALE80.04 ± 0.4381.15 ± 0.3180.63 ± 0.7891.12 ± 0.9375.95 ± 0.2190.10 ± 0.4956.56 ± 0.4077.66 ± 0.11
GALE-APR79.07 ± 0.3081.11 ± 0.5580.04 ± 0.4890.52 ± 1.2075.11 ± 0.2990.03 ± 0.7855.89 ± 0.2976.78 ± 0.27
+ +Table 6. Mean node classification accuracy for supervised and unsupervised models. The highest unsupervised performance is shaded in green, and the second-highest performance is shaded in light green. OOM indicates Out-Of-Memory on a 24GB GPU. + +
ModelCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCoauthor-CSCoauthor-Phy.
MLP47.92 ± 0.4149.31 ± 0.2669.14 ± 0.3471.98 ± 0.4273.81 ± 0.2178.53 ± 0.3290.37 ± 0.1993.58 ± 0.41
GCN81.54 ± 0.6870.73 ± 0.6579.16 ± 0.2593.02 ± 0.1186.51 ± 0.5492.42 ± 0.2293.03 ± 0.3195.65 ± 0.16
DEEPWALK70.72 ± 0.6351.39 ± 0.4173.27 ± 0.8674.42 ± 0.1385.68 ± 0.0789.40 ± 0.1184.61 ± 0.2291.77 ± 0.15
NODE2VEC71.08 ± 0.9147.34 ± 0.8466.23 ± 0.9571.76 ± 0.1484.41 ± 0.1489.68 ± 0.1985.16 ± 0.0491.23 ± 0.07
VGAE77.27 ± 0.8667.46 ± 0.2076.02 ± 0.5275.55 ± 0.2286.40 ± 0.3092.13 ± 0.1292.10 ± 0.3194.43 ± 0.20
DGI82.24 ± 0.6371.82 ± 0.6176.80 ± 0.3075.42 ± 0.1784.05 ± 0.4291.62 ± 0.3792.14 ± 0.5594.54 ± 0.52
GMI82.40 ± 0.5771.74 ± 0.1279.28 ± 0.9474.79 ± 0.1682.24 ± 0.3990.81 ± 0.15OOMOOM
MVGRL83.37 ± 0.6573.29 ± 0.3680.33 ± 0.6177.55 ± 0.0687.45 ± 0.1791.77 ± 0.2192.24 ± 0.3195.30 ± 0.13
GRACE81.88 ± 0.8471.13 ± 0.4280.88 ± 0.1379.37 ± 0.2486.48 ± 0.2492.20 ± 0.1692.90 ± 0.2795.25 ± 0.26
GCA82.41 ± 0.5571.56 ± 0.1980.73 ± 0.2378.26 ± 0.3987.92 ± 0.3392.35 ± 0.5392.65 ± 0.3295.52 ± 0.21
BGRL81.86 ± 0.3272.10 ± 0.3180.65 ± 0.4279.28 ± 0.4589.21 ± 0.4792.28 ± 0.4492.73 ± 0.4195.31 ± 0.26
SUGRL83.29 ± 0.3873.11 ± 0.2281.96 ± 0.4978.88 ± 0.3588.98 ± 0.2092.87 ± 0.1992.84 ± 0.2494.80 ± 0.24
CCA-SSG84.17 ± 0.4473.27 ± 0.3081.91 ± 0.4177.67 ± 0.2988.88 ± 0.2293.14 ± 0.4393.23 ± 0.1695.29 ± 0.11
GALE85.36 ± 0.1574.58 ± 0.1885.06 ± 0.2782.15 ± 0.2290.60 ± 0.1994.51 ± 0.3493.46 ± 0.2895.91 ± 0.38
GALE-APR85.14 ± 0.2675.35 ± 0.1084.57 ± 0.1182.07 ± 0.3690.27 ± 0.2094.38 ± 0.4693.45 ± 0.3295.86 ± 0.23
+ +mance: for instance, on PROTEINS it outperforms the best self-supervised baseline SEGA by $5.15\%$ , and on IMDB-B it surpasses GIN by $3.96\%$ . Meanwhile, GALE-APR exhibits a similar pattern, slightly underperforming GALE on a few datasets but still outperforming most baselines. In summary, both GALE and GALE-APR demonstrate superior performance across a wide range of graph-level tasks. + +Performance under Node-level. Table 6 summarizes our results on eight node-level benchmarks, showing that both GALE and GALE-APR not only outperform the strongest unsupervised models but also exceed the supervised baseline GCN across most datasets. For instance, on PubMed, GALE achieves $85.06\%$ , surpassing the best unsupervised method SUGRL by over $3.1\%$ and supervised method GCN by $5.9\%$ . Meanwhile, GALE-APR stays highly competitive, for example on Coauthor-CS it closely matching GALE, thus confirming the effectiveness of our approach. + +# 9. Conclusion + +This paper proposes a unified self-supervised graph representation framework, GALE, which integrates structural automorphism and attribute equivalence to construct joint equivalence classes. Such combined equivalences are frequently encountered in real-world scenarios, including computing networks. To address computational bottlenecks and noise interference, we design an efficient approximation strategy with linear complexity. GALE preserves the similarity of equivalent nodes while enforcing separation between representations of non-equivalent nodes. Analysis reveals the inherent limitations of mainstream graph models, including over-smoothing in MPNNs, failure to respect automorphism constraints in Transformer positional encodings, and the degeneration of graph contrastive learning into single-node equivalence. Experimental results demonstrate the superiority of GALE. + +# Acknowledgments and Disclosure of Funding + +This project was in part supported by the following projects: the National Natural Science Foundation of China (No.62432003, No.92267206). + +# Impact Statement + +This paper aims to advance Graph Learning, with potential societal impacts that don't require specific highlighting here. + +# References + +Adhikari, B., Zhang, Y., Ramakrishnan, N., and Prakash, B. A. Sub2vec: Feature learning for subgraphs. In Pacific-Asia Conference on KDDM, pp. 170–182. Springer, 2018. +Bafai, L. Isomorphism problem for a class of point-symmetric structures. Acta Mathematica Hungarica, 29 (3-4):329-336, 1977. +Belkin, M. and Niyogi, P. Laplacian eigenmaps and spectral techniques for embedding and clustering. Advances in Neural Information Processing Systems, 14, 2001. +Borgwardt, K. M. and Kriegel, H.-P. Shortest-path kernels on graphs. In International Conference on Data Mining, pp. 8 pp.-. IEEE, 2005. +Cai, X., Huang, C., Xia, L., and Ren, X. LightGCL: Simple yet effective graph contrastive learning for recommendation. In International Conference on Learning Representations, 2023. +Cameron, P. J. and Mary, Q. Automorphisms of graphs. Topics in algebraic graph theory, 102:137-155, 2004. +Cao, S., Lu, W., and Xu, Q. Deep neural networks for learning graph representations. In Proceedings of the AAAI Conference on Artificial Intelligence, number 1, 2016. +Dwivedi, V. P., Luu, A. T., Laurent, T., Bengio, Y., and Bresson, X. Graph neural networks with learnable structural and positional representations. In International Conference on Learning Representations, 2022. +Everett, M. G. Role similarity and complexity in social networks. Social Networks, 7(4):353-359, 1985. +Faulon, J.-L. Isomorphism, automorphism partitioning, and canonical labeling can be solved in polynomial-time for molecular graphs. Journal of Chemical Information and Computer Sciences, 38(3):432-444, 1998. +Fortunato, S. Community detection in graphs. Physics reports, 486(3-5):75-174, 2010. + +Friedkin, N. E. and Johnsen, E. C. Social positions in influence networks. Social networks, 19(3):209-222, 1997. +Ghorbani, M., Dehmer, M., Lotfi, A., Amraei, N., Mowshowitz, A., and Emmert-Streib, F. On the relationship between pagerank and automorphisms of a graph. Information Sciences, 579:401-417, 2021. +Grover, A. and Leskovec, J. Node2vec: Scalable feature learning for networks. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 855-864, 2016. +Hassani, K. and Khasahmadi, A. H. Contrastive multi-view representation learning on graphs. In Proceedings of the International Conference on Machine Learning, pp. 4116-4126. PMLR, 2020. +Juntila, T. and Kaski, P. Conflict propagation and component recursion for canonical labeling. In Theory and Practice of Algorithms in (Computer) Systems, volume 6595, pp. 151-162. Springer, 2011. +Kipf, T. and Welling, M. Variational graph auto-encoders. Bayesian Deep Learning, NIPS 2016 Workshop, 2016. +Kipf, T. N. and Welling, M. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. +Koh, H. Y., Nguyen, A. T., Pan, S., May, L. T., and Webb, G. I. Physicochemical graph neural network for learning protein-ligand interaction fingerprints from sequence data. Nature Machine Intelligence, 6(6):673-687, 2024. +Kondaveeti, D., Inampudi, R. K., and Kurkute, M. V. Time complexity analysis of graph algorithms in big data: Evaluating the performance of pagerank and shortest path algorithms for large-scale networks. Journal of Science and Technology, 5(4):159-204, Aug. 2024. +Kondor, R. and Trivedi, S. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In Proceedings of the International Conference on Machine Learning, pp. 2747-2755. PMLR, 2018. +Kreuzer, D., Beaini, D., Hamilton, W., Létourneau, V., and Tossou, P. Rethinking graph transformers with spectral attention. Advances in Neural Information Processing Systems, 34:21618-21629, 2021. +Langville, A. N. and Meyer, C. D. Deeper inside pagerank. _Internet Mathematics_, 1(3):335-380, 2004. +Lauri, J. and Scapellato, R. Topics in graph automorphisms and reconstruction, volume 432. Cambridge University Press, 2016. + +Li, S., Wang, X., Zhang, A., Wu, Y., He, X., and Chua, T.-S. Let invariant rationale discovery inspire graph contrastive learning. In Proceedings of the International Conference on Machine Learning, pp. 13052-13065, 2022. +Lim, D., Robinson, J. D., Zhao, L., Smidt, T., Sra, S., Maron, H., and Jegelka, S. Sign and basis invariant networks for spectral graph representation learning. In International Conference on Learning Representations, 2023. +Liu, J., Tang, H., and Liu, Y. Perfect alignment may be poisonous to graph contrastive learning. In Proceedings of the International Conference on Machine Learning, 2024a. +Liu, Y., Li, S., Zheng, Y., Chen, Q., Zhang, C., and Pan, S. Arc: A generalist graph anomaly detector with in-context learning. In Globerson, A., Mackey, L., Belgrave, D., Fan, A., Paquet, U., Tomczak, J., and Zhang, C. (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 50772-50804, 2024b. +Lorrain, F. and White, H. C. Structural equivalence of individuals in social networks. The Journal of mathematical sociology, 1(1):49-80, 1971. +McKay, B. D. and Piperno, A. Practical graph isomorphism, ii. Journal of Symbolic Computation, 60:94-112, 2014. +Meilá, M. Comparing clusterings—an information based distance. J. Multivar. Anal., 98(5):873-895, 2007. +Min, E., Chen, R., Bian, Y., Xu, T., Zhao, K., Huang, W., Zhao, P., Huang, J., Ananiadou, S., and Rong, Y. Transformer for graphs: An overview from architecture perspective. arXiv preprint arXiv:2202.08455, 2022. +Mo, Y., Peng, L., Xu, J., Shi, X., and Zhu, X. Simple unsupervised graph representation learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 7797-7805, 2022. +Morris, C., Kriege, N. M., Bause, F., Kersting, K., Mutzel, P., and Neumann, M. Tudataset: A collection of benchmark datasets for learning with graphs. In ICML 2020 Workshop on Graph Representation Learning and Beyond, 2020. +Narayanan, A., Chandramohan, M., Venkatesan, R., Chen, L., Liu, Y., and Jaiswal, S. Graph2vec: Learning distributed representations of graphs. arXiv:1707.05005, 2017. +Pearce-Crump, E. and Knottenbelt, W. J. Graph automorphism group equivariant neural networks. In Proceedings of the International Conference on Machine Learning. JMLR.org, 2024. + +Peng, Z., Huang, W., Luo, M., Zheng, Q., Rong, Y., Xu, T., and Huang, J. Graph representation learning via graphical mutual information maximization. In The Web Conference, pp. 259-270, 2020. +Perozzi, B., Al-Rfou, R., and Skiena, S. Deepwalk: Online learning of social representations. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 701-710, 2014. +Rampášek, L., Galkin, M., Dwivedi, V. P., Luu, A. T., Wolf, G., and Beaini, D. Recipe for a general, powerful, scalable graph transformer. In Advances in Neural Information Processing Systems, 2022. +Rand, W. M. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical association, 66(336):846-850, 1971. +Shchur, O., Mumme, M., Bojchevski, A., and Gunnemann, S. Pitfalls of graph neural network evaluation. Relational Representation Learning Workshop, NeurIPS, 2018. +Shervashidze, N., Vishwanathan, S., Petri, T., Mehlhorn, K., and Borgwardt, K. Efficient graphlet kernels for large graph comparison. In Artificial Intelligence and Statistics, pp. 488-495. PMLR, 2009. +Shervashidze, N., Schweitzer, P., Van Leeuwen, E. J., Mehlhorn, K., and Borgwardt, K. M. Weisfeiler-lehman graph kernels. Journal of Machine Learning Research, 12(9), 2011. +Sun, F.-Y., Hoffman, J., Verma, V., and Tang, J. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In International Conference on Learning Representations, 2020. +Suresh, S., Li, P., Hao, C., and Neville, J. Adversarial graph augmentation to improve graph contrastive learning. Advances in Neural Information Processing Systems, 34: 15920-15933, 2021. +Thakoor, S., Tallec, C., Azar, M. G., Azabou, M., Dyer, E. L., Munos, R., Velicković, P., and Valko, M. Large-scale representation learning on graphs via bootstrapping. In International Conference on Learning Representations, 2022. +Thiede, E., Zhou, W., and Kondor, R. Autobahn: Automorphism-based graph neural nets. Advances in Neural Information Processing Systems, 34:29922-29934, 2021. +Velickovic, P., Fedus, W., Hamilton, W. L., Liò, P., Bengio, Y., and Hjelm, R. D. Deep graph infomax. In International Conference on Learning Representations, 2019. + +Wan, G., Tian, Y., Huang, W., Chawla, N. V., and Ye, M. S3GCL: Spectral, swift, spatial graph contrastive learning. In Proceedings of the International Conference on Machine Learning, 2024. +Wang, J., Cui, Z., Wang, B., Pan, S., Gao, J., Yin, B., and Gao, W. Ime: Integrating multi-curvature shared and specific embedding for temporal knowledge graph completion. In Proceedings of the ACM Web Conference 2024, pp. 1954-1962, 2024a. +Wang, J., Kai, S., Luo, L., Wei, W., Hu, Y., Liew, A. W.-C., Pan, S., and Yin, B. Large language models-guided dynamic adaptation for temporal knowledge graph reasoning. Advances in Neural Information Processing Systems, 37:8384-8410, 2024b. +Wang, J., Wang, B., Gao, J., Pan, S., Liu, T., Yin, B., and Gao, W. Made: Multicurvature adaptive embedding for temporal knowledge graph completion. IEEE Transactions on Cybernetics, 2024c. +Wang, Y., Zhao, Y., Wang, D. Z., and Li, L. Galopa: Graph transport learning with optimal plan alignment. In Oh, A., Naumann, T., Globerson, A., Saenko, K., Hardt, M., and Levine, S. (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 9117-9130, 2023. +Wasserman, S. and Faust, K. Social network analysis: Methods and applications. 1994. +Wu, J., Chen, X., Shi, B., Li, S., and Xu, K. SEGA: Structural entropy guided anchor view for graph contrastive learning. In Proceedings of the International Conference on Machine Learning, volume 202, pp. 37293-37312, 2023. +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. +Xia, J., Wu, L., Chen, J., Hu, B., and Li, S. Z. Simgrace: A simple framework for graph contrastive learning without data augmentation. In Proceedings of the ACM Web Conference 2022, pp. 1070-1079, 2022. +Xu, F., Yao, Q., Hui, P., and Li, Y. Automorphic equivalence-aware graph neural network. Advances in Neural Information Processing Systems, 34:15138-15150, 2021. +Xu, K., Hu, W., Leskovec, J., and Jegelka, S. How powerful are graph neural networks? In International Conference on Learning Representations, 2018. +Yanardag, P. and Vishwanathan, S. Deep graph kernels. In Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 1365-1374, 2015. + +Yin, Y., Wang, Q., Huang, S., Xiong, H., and Zhang, X. Autogcl: Automated graph contrastive learning via learnable view generators. In Proceedings of the AAAI Conference on Artificial Intelligence, pp. 8892-8900, 2022. +You, Y., Chen, T., Sui, Y., Chen, T., Wang, Z., and Shen, Y. Graph contrastive learning with augmentations. Advances in Neural Information Processing Systems, 33: 5812-5823, 2020. +You, Y., Chen, T., Shen, Y., and Wang, Z. Graph contrastive learning automated. In Proceedings of the International Conference on Machine Learning, pp. 12121-12132, 2021. +Zhang, H., Wu, Q., Yan, J., Wipf, D., and Yu, P. S. From canonical correlation analysis to self-supervised graph neural networks. Advances in Neural Information Processing Systems, 34:76-89, 2021. +Zhao, Y., Wang, Y., Wang, Z., Shan, W., Huang, M., and Wang, X. Graph contrastive learning with progressive augmentations. In Proceedings of ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 2079-2088, 2025. +Zhu, Y., Xu, Y., Yu, F., Liu, Q., Wu, S., and Wang, L. Deep graph contrastive representation learning. arXiv:2006.04131, 2020. +Zhu, Y., Xu, Y., Yu, F., Liu, Q., Wu, S., and Wang, L. Graph contrastive learning with adaptive augmentation. In The Web Conference, pp. 2069-2080, 2021. + +# A. Impact of $\alpha$ on PageRank Equivalence + +To analyze the impact of different $\alpha$ values in PageRank on the resulting equivalence classes, we conduct experiments on four benchmark datasets: Cora, Citeseer, Amz-Photo, and Coauthor-CS. The $\alpha$ values range from 0.1 to 0.9 with an increment of 0.1, and for each dataset, we compute the Variation of Information (VI) (Meilä, 2007) between equivalence partitions obtained under different $\alpha$ settings. This results in $9 \times 9$ heatmaps for each data, which are visualized in Figure 4. + +Our findings reveal that the differences between equivalence classes under varying $\alpha$ values are minimal across all datasets. For instance, in the Cora dataset, the VI values are consistently in the range of 0.001, indicating negligible variation. Similarly, in the Photo dataset, we observe 33 perfect matches (VI = 0) across different parameter pairs, further demonstrating the robustness of PageRank equivalence classes to changes in $\alpha$ . + +These results suggest that the choice of $\alpha$ has little effect on the overall structure of the equivalence classes derived from PageRank scores. This stability highlights the reliability of using PageRank for approximating equivalence relations in graphs, regardless of the specific damping factor chosen. + +![](images/373cf6200ee31a10c2ad49ac86e82010a7d1e270dd8a6ccd1e807ebb4b8dec22.jpg) +(a) Cora + +![](images/758870e08aa0b3384aac707dc4b1e89e5d192ead8864c0816a742889c9eef6ed.jpg) +(b)CiteSeer +Figure 4. Heatmaps showing the Variation of Information (VI) values between PageRank equivalence classes obtained under different $\alpha$ values, for four datasets. Lighter colors indicate lower VI values, signifying greater similarity between equivalence partitions. + +![](images/29668b8162d6d4df8a69c57496c72c1aa134f574eb31d16650738a6515e5902b.jpg) +(c) Amz-Photo + +![](images/3af15ee5dbf63ccc5116edfb9733d8bc01340b046db78ad3a6d302650d7dc054.jpg) +(d) Coauthor-CS + +# B. Related Work[Extended] + +Equivalence in Graphs Neural Networks. There have been recent advancements in incorporating automorphic equivalence (AE) (Kondor & Trivedi, 2018) into graph neural networks (GNNs). GRAPE (Xu et al., 2021) introduces ego-centered automorphic equivalence to differentiate nodes within localized neighborhoods using subgraph template, while Autobahn (Thiede et al., 2021) performs local equivariant convolutions over subgraph automorphism groups, improving adaptability for tasks like molecular property prediction. Pearce-Crump & Knottenbelt (2024) primarily focuses on the theoretical analysis and generalization of neural network design by characterizing learnable, linear, Aut(G)-equivariant neural layers, leveraging bilabelled graphs to compute representations. In contrast, our work introduces a self-supervised learning framework that not only considers structural equivalence but also incorporates node attribute information, enabling the joint learning of structural roles and attribute semantics to offer a comprehensive perspective. + +# C. Ablation Study + +# C.1. Contribution of Automorphic and Feature Equivalence + +To evaluate the importance of incorporating both automorphic and node attributes equivalence in our framework, we conduct ablation experiments on eight benchmark datasets: Cora, Citeseer, Pubmed, Wikics, Computers, Photo, CS, and Physics. We compare the performance of the full model (origin) with two variants: 1) w/o auto: This variant removes automorphic equivalence information, relying solely on node attributes for equivalence class partitioning. 2) w/o feat: This variant removes node attribute equivalence, relying only on automorphic equivalence for equivalence class partitioning. + +The results, summarized in Table 7, show that excluding either automorphic or node attributes equivalence leads to performance degradation across all datasets. The experimental results reveal the following key observations. 1) Effect of removing automorphic equivalence (w/o auto): When automorphic equivalence is excluded, the performance consistently declines across all datasets. This is because solely relying on node attributes ignores the structural information that helps + +distinguish nodes with similar attributes but different structural roles in the graph. For example, in a social network, two users may both have similar attributes, such as age, profession, or location, but one might be a central influencer (hub node) while the other is a peripheral user with few connections. Ignoring automorphic equivalence would fail to capture the distinct structural importance of these users. 2) Effect of removing feature equivalence(w/o feat): Excluding attributes equivalence also leads to a performance drop, sometimes more significant than w/o auto, particularly in datasets like Citeseer. Without feature equivalence, nodes with very different characteristics may be grouped together solely based on automorphic equivalence, reducing the model's discriminative power. For instance, in a social network, nodes with high structural similarity (e.g., both being part of tightly connected communities) but vastly different attributes (e.g., different professions) could be inappropriately treated as equivalent. + +These findings underscore the importance of integrating both automorphic equivalence and node attribute information. The combination of structural and attribute-based perspectives ensures a more comprehensive representation of node equivalence, effectively capturing both the roles and features of nodes in the graph. + +Table 7. Ablation study results on 8 datasets. origin represents the full model, while w/o auto and w/o feat represent the ablated models. + +
MethodsCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCo-CSCo-Phy
origin85.36 ± 0.1574.58 ± 0.1885.06 ± 0.2782.15 ± 0.2290.60 ± 0.1994.51 ± 0.3493.46 ± 0.2895.91 ± 0.38
w/o auto82.25 ± 0.0972.44 ± 0.1283.63 ± 0.3081.03 ± 0.3488.30 ± 0.2893.07 ± 0.3692.37 ± 0.4194.46 ± 0.13
w/o feat80.42 ± 0.2464.72 ± 0.3083.22 ± 0.2180.87 ± 0.2788.84 ± 0.1694.50 ± 0.2991.98 ± 0.1793.19 ± 0.44
+ +# C.2. Evaluation of Equivalence Fusion Operator + +This section presents an ablation study to empirically evaluate and justify our choice of using the intersection operator for fusing node equivalences in our proposed model (referred to as origin). An alternative fusion strategy, based on the union operator, was implemented and compared. The primary goal is to assess how these different fusion methods impact overall model performance, particularly in capturing meaningful node similarities derived from diverse equivalence criteria (e.g., those based on automorphic properties and node attributes). + +Table 8 summarizes the performance results on the eight benchmark datasets when employing either the intersection-based (origin) or union-based (union) fusion approach. The experimental results presented in Table 8 demonstrate that the proposed model, which employs intersection fusion, consistently outperforms the union fusion approach. This is largely because emphasizing one equivalence type (either automorphic equivalence or node attributes) by using the union tends to neglect the contributions from the other. In contrast, the intersection method ensures that both types of equivalences jointly contribute, leading to a more robust and comprehensive representation of node similarity. These findings justify our choice of the intersection method for fusing equivalences. + +Table 8. Ablation study results comparing intersection (origin model) and union (union model) for fusing equivalences on 8 datasets. + +
MethodsCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCo-CSCo-Phy
origin85.36 ± 0.1574.58 ± 0.1885.06 ± 0.2782.15 ± 0.2290.60 ± 0.1994.51 ± 0.3493.46 ± 0.2895.91 ± 0.38
union77.21 ± 0.2264.37 ± 0.1283.22 ± 0.1980.96 ± 0.3487.86 ± 0.2593.59 ± 0.2891.55 ± 0.1594.93 ± 0.36
+ +# D. Rand Index Results + +In the main body of the paper, we evaluated the alignment between true automorphic equivalence classes $(\simeq_{\mathrm{auto}})$ and our PageRank-based approximation $(\simeq_{\mathrm{PR}})$ using the Variation of Information (VI) metric (detailed in Table 2). To provide a more comprehensive validation of this alignment, in this section we presents supplementary results using the Rand Index (RI) (Rand, 1971). The RI is another widely recognized metric for comparing the similarity between two data partitions. + +The Rand Index assesses agreement by considering all possible pairs of elements and checking if each pair is consistently placed (i.e., either together in both partitions or separated in both partitions). It produces a score ranging from 0 to 1, where 1 signifies perfect agreement between the two partitions, and values closer to 1 indicate a high degree of similarity. Table 9 reports the RI scores for the alignment between $\simeq_{\mathrm{auto}}$ and $\simeq_{\mathrm{PR}}$ across the same eight benchmark datasets analysed in the main text. The consistently high RI values, approaching 1 for nearly all datasets, strongly corroborate the findings obtained with the VI metric. + +Table 9. Rand Index (RI) for alignment between equivalences $\simeq_{\text{auto}}$ and $\simeq_{\text{PR}}$ on eight benchmark datasets (higher is better, 1 is perfect). + +
DataCoraCiteSeerPubMedWikiCSAmz-Comp.Amz-PhotoCo-CSCo-Phy
RI (↑)0.999480.996870.999990.999990.999990.999980.999990.99999
+ +# E. Sensitivity Analysis of PageRank Teleportation + +To evaluate the impact of hyperparameter choices on model performance, we conducted a sensitivity analysis on the Cora dataset with respect to the PageRank teleportation parameter $(\alpha)$ . The parameter $\alpha$ was varied from 0.1 to 0.9, and the corresponding model performance is reported in Table 10. + +Table 10. Sensitivity analysis of the PageRank teleportation parameter $\left( \alpha \right)$ on the Cora dataset. + +
Dataset0.10.20.30.40.50.60.70.80.9
Cora85.33 ± 0.1985.35 ± 0.1585.27 ± 0.2085.38 ± 0.1285.23 ± 0.1985.36 ± 0.1785.30 ± 0.0985.35 ± 0.1585.29 ± 0.24
+ +As shown in Table 10, the model's accuracy remains stable across a wide range of $\alpha$ values, indicating that the performance is not sensitive to the choice of this hyperparameter. + +# F. Limitation and Futrue Work + +While our core contribution focuses on static homogeneous graphs, we acknowledge two related limitations. First, GALE currently assumes a static graph setting, meaning that for dynamic graphs with evolving structures or features, the equivalence classes may change over time, necessitating incremental updates to partitions—a challenge common to equivalence-based methods. Second, our present work targets homogeneous graphs; extending our equivalence definitions to heterogeneous graphs (e.g., those with multi-typed nodes/edges) would require additional design considerations, such as type-specific automorphism constraints. We consider these aspects as important directions for our future work. \ No newline at end of file diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/images.zip b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f6851b474a4a6173ab048c664349b16b0cfea414 --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:574f3b98a29ee4662161b7a9f8e01e881ff0e9917cb8c758894daac5ba97de14 +size 706445 diff --git a/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/layout.json b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5d9ff3d6a5eb35efc713990e8dbd09204acadeb4 --- /dev/null +++ b/ICML/2025/Equivalence is All_ A Unified View for Self-supervised Graph Learning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26cbff7db54102a1088cadf48170bca4a46025b2299d01c8bb99f90613f657e8 +size 613410 diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_content_list.json b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..782fea091772a89c993d02ed3cd9e6252d40fba4 --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ea777c91b333a5f412ce937f39250656d8a188bc075ae09e4b9848d53d04b3e +size 270857 diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_model.json b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5a264d0b473f1f0b55c541c4e4053c7ece99c4fc --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35369ad6623c0925295d6201beeda03d47f5b7d822724630df6769a27cff14e8 +size 311591 diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_origin.pdf b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..cb2757753e4b28bed770f6638d88a84b2db1ab15 --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/acadbf5e-f206-4914-90d1-d988be102afa_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b7acded02e5551629dcbe433909362034b0256d6f57c41bda7ae1ccc3eeb22e +size 890418 diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/full.md b/ICML/2025/Equivariant Neural Tangent Kernels/full.md new file mode 100644 index 0000000000000000000000000000000000000000..40e7196fa9254c0159470aa106d5ffcee4b68264 --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/full.md @@ -0,0 +1,1412 @@ +# Equivariant Neural Tangent Kernels + +Philipp Misof1 Pan Kessel2 Jan E. Gerken1 + +# Abstract + +Little is known about the training dynamics of equivariant neural networks, in particular how it compares to data augmented training of their non-equivariant counterparts. Recently, neural tangent kernels (NTKs) have emerged as a powerful tool to analytically study the training dynamics of wide neural networks. In this work, we take an important step towards a theoretical understanding of training dynamics of equivariant models by deriving neural tangent kernels for a broad class of equivariant architectures based on group convolutions. As a demonstration of the capabilities of our framework, we show an interesting relationship between data augmentation and group convolutional networks. Specifically, we prove that they share the same expected prediction over initializations at all training times and even off the data manifold. In this sense, they have the same training dynamics. We demonstrate in numerical experiments that this still holds approximately for finite-width ensembles. By implementing equivariant NTKs for roto-translations in the plane $(G = C_{n} \ltimes \mathbb{R}^{2})$ and 3d rotations $(G = \mathrm{SO}(3))$ , we show that equivariant NTKs outperform their non-equivariant counterparts as kernel predictors for histological image classification and quantum mechanical property prediction. + +# 1. Introduction + +Equivariant neural networks (Weiler et al., 2023; Gerken et al., 2023) are widely used in many applications of great practical importance, for example in medical image analysis in two and three dimensions (Bekkers et al., 2018; Winkels & Cohen, 2019; Müller et al., 2021; Pang et al., 2023) and in quantum chemistry (Duval et al., 2023; Batzner et al., 2022; + +$^{1}$ Department of Mathematical Sciences, Chalmers University of Technology and the University of Gothenburg, SE-412 96 Gothenburg, Sweden $^{2}$ Prescient Design, Genentech Roche, Basel, Switzerland. Correspondence to: Jan Gerken . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Schütt et al., 2021; Unke et al., 2021). Other application areas include particle physics (Bogatskiy et al., 2020), cosmology (Perraudin et al., 2019) and even fairness in large language models (Basu et al., 2023). + +Recently, there has been a number of works which avoid equivariant architectures but rely on data augmentation to approximately learn equivariance, most notably AlphaFold3 (Abramson et al., 2024). This has the potential advantage that non-equivariant architectures may offer better training dynamics, for example favorable scaling capabilities. There has been a vigorous debate on this subject with some empirical works claiming superiority of equivariant architectures (Gerken et al., 2022; Brehmer et al., 2024) while others suggest the opposite (Wang et al., 2024; Abramson et al., 2024). One challenging aspect to conclusively settle the matter is that there is no good theoretical understanding of how the equivariant and the purely augmentation-based training dynamics compare. + +Motivated by this observation, this paper derives equivariant neural tangent kernel (NTK) theory (Jacot et al., 2018) for group convolutional architectures. The NTK provides a powerful tool to analytically study the training dynamics of neural networks in the large width limit by analyzing the behavior of the kernel, in particular its trace, eigenvalues and other properties (Geiger et al., 2020; Mok et al., 2022; Engel et al., 2024; Tsai et al., 2023). A particularly important feature of the NTK is the fact that in the infinite width limit, it becomes constant throughout training (Jacot et al., 2018). Furthermore, at infinite width, the NTK can be computed by layer-wise recursion relations. These simplifications allow for complete analytic control over the training dynamics. In particular, the network output of an arbitrary input and at an arbitrary point in training time converges to a Gaussian process over initializations whose mean- and covariance functions can be computed analytically. This result has led to a number of theoretical and practical insights (Geiger et al., 2020; Jacot et al., 2020; Yang & Hu, 2021; Yang et al., 2021; Franceschi et al., 2022; Day et al., 2023) into the initialization and training of neural networks. + +We derive recursive relations which determine the NTK of an equivariant neural networks for the first time. In particular, we study the NTK of group convolutional layers (Cohen & Welling, 2016). These layers are in some sense universal. + +Specifically, they have the unique property that they arise from imposing an equivariance constraint on dense fully-connected layers and are therefore the most general linear, equivariant transformations (Kondor & Trivedi, 2018) and have been used in a wide array of applications (Chidester et al., 2019; Celledoni et al., 2021; Moyer et al., 2021). + +These NTK recursion allows us to clarify the relation between the training dynamics of pure data augmentation and equivariant architectures in the large width limit. Specifically, non-equivariant architectures trained with full data augmentation converge to certain group convolutional architectures in the infinite width limit. This result holds for any input, in particular off-manifold, and at any training time. Thus, at least in the infinite width limit and in expectation over initializations, the training dynamics of data augmentation is identical to the one of certain group convolutional architectures. + +NTKs have also been shown to be interesting kernel functions in their own right. Since they are induced by neural network architectures, they allow to transfer the intuition gained in the extensive literature on the design of neural networks to kernel machines and have shown to outperform more traditional kernel functions (Arora et al., 2019; Li et al., 2019; Lee et al., 2020). In our experiments, we show that group equivariant kernels outperform their non-equivariant counterparts for both regression and classification as well as for discrete roto-translations and continuous rotations. In summary, our main contributions are + +- We derive layer-wise recursive relations for the neural tangent kernel and neural network Gaussian process kernel of group convolutional layers, the corresponding lifting layers, point-wise nonlinearities and group-pooling layers. +- We specialize our general results to the case of roto-translations in the plane as well as the three-dimensional rotation group SO(3). We derive and implement the kernel relations for these cases, allowing for efficient computations. The code is provided publicly at https://github.com/PhilippMisofCH/equivariant-ntk. +- We prove that in the infinite width limit, a standard convolutional or fully connected network trained with full data augmentation yields the same expected network function as a corresponding group convolutional network trained without data augmentation. This result holds for all training times as well as off manifold. We show empirically that this holds approximately at finite width. +- We verify experimentally that the NTKs of finite-width equivariant networks converge to our equivariant NTKs + +as width grows to infinity. Furthermore, we demonstrate the superior performance of equivariant NTKs over other kernels for medical image classification and quantum mechanical property prediction. + +# 2. Related Work + +Neural Tangent Kernel. Gaussian processes can be viewed as Bayesian neural networks as first pointed out by (Neal, 1996) and this relation extends to deep neural networks as shown in (Lee et al., 2018). Neural tangent kernels allow description of training dynamics, see the seminal reference (Jacot et al., 2018) and (Golikov et al., 2022) for an accessible review. In (Lee et al., 2019), NTK theory was used to show that wide neural networks trained with gradient descent become Gaussian processes and generalized in a more rigorous and systematic manner by (Yang, 2020). NTKs can be used to derive parametrizations that allow scaling networks to large width (Yang & Hu, 2021). They can also be used to theoretically analyze GANs (Franceschi et al., 2022), PINNs (Wang et al., 2022b), backdoor attacks (Hayase & Oh, 2023), pruning (Yang & Wang, 2023) and spectral learning biases (Bordelon et al., 2020; Canatar et al., 2021). Recently, corrections to infinite width limit have been studied by (Huang & Yau, 2020; Yaida, 2020; Halverson et al., 2021; Erbin et al., 2022) using techniques inspired by perturbative quantum field theory. The NTK kernel for convolutional architectures was derived in (Arora et al., 2019). Our results can be thought as a generalization thereof to general group convolutions. + +Equivariant Neural Networks. Equivariance has been an important theme of deep learning research over the last years, see (Gerken et al., 2023) for an accessible review. Equivariant deep learning is part of the larger area of geometric deep learning (Bronstein et al., 2017), in which more general geometric properties of the different parts of the learning problem (e.g. the data (Dombrowski et al., 2024), model (Weiler et al., 2023) and optimization procedure (Amari, 1998)) are studied. Herein, we focus on group convolutional layers (Cohen & Welling, 2016) which are the unique linear equivariant layers. A comprehensive summary is given in (Cohen, 2021). These architectures have found wide-spread application in computer vision (Chidester et al., 2019; Celledoni et al., 2021; Moyer et al., 2021), medical applications (Bekkers et al., 2018; Chidester et al., 2019; Pang et al., 2023) as well as natural science use cases (Nicoli et al., 2020; Liao & Smidt, 2023; Bekkers et al., 2024). + +Learned vs. Manifest Equivariance. While equivariance can be enforced on the training data via data augmentation, the imposed symmetry does in general not extend to out-of-distribution data (Moskalev et al., 2023). This is in accordance with the tighter upper bound on the generaliza + +tion error of equivariant networks compared to purely data-augmented ones that was found in (Wang et al., 2022a). By analyzing the spectrum of the NTK in a toy problem, (Perin & Deny, 2024) found that non-equivariant neural networks are unable to generalize symmetries learned in one class via data augmentation to another, only partially augmented class. They further show how the qualitatively different NTK spectrum of a CNN improves generalization for the task under consideration. In (Gerken & Kessel, 2024), the effect of data augmentation on infinitely wide neural network ensembles was studied. The authors found that the resulting Gaussian process is equivariant at all training times and even off the data manifold. In contrast, our results do not require data augmentation but derive an NTK for manifestly equivariant group convolution layers. This allows us to find a connection between the ensemble means of data-augmented and equivariant networks, which complements the previously mentioned results focusing on individual networks. + +# 3. Background + +This section gives a brief overview of NTK theory (for an optional broader introduction, see Appendix A) as well as of equivariant neural networks with a particular emphasis on group convolutional neural networks (GCNNs). + +Neural Tangent Kernels. The NTK can be computed by layer-wise recursive relations (Jacot et al., 2018) starting from the definition + +$$ +\Theta^ {(\ell)} \left(x, x ^ {\prime}\right) = \mathbb {E} \left[ \sum_ {\ell^ {\prime} = 1} ^ {\ell} \frac {\partial \mathcal {N} ^ {(\ell)} (x)}{\partial \theta^ {(\ell^ {\prime})}} \left(\frac {\partial \mathcal {N} ^ {(\ell)} \left(x ^ {\prime}\right)}{\partial \theta^ {(\ell^ {\prime})}}\right) ^ {\top} \right] \tag {1} +$$ + +of the layer- $\ell$ NTK. The NTK of the full network is given by $\Theta(x, x') = \Theta^{(L)}(x, x')$ for a network depth $L$ . Here, $\theta^{(\ell)}$ are the parameters of the layer $\ell$ and we adopt the convention that expectation values are over the initialization distribution unless otherwise stated. In the limit of infinitely wide hidden layers, not only do analytic expressions exist for (1), but $\Theta^{(\ell)}(x, x')$ also stays constant during training. Hence it is often referred to as the frozen NTK (Geiger et al., 2020). As customary in the NTK literature, we treat activations and preactivations as distinct layers and refer to $\mathcal{N}^{(\ell)}$ as the layer- $\ell$ features with $\mathcal{N}(x) = \mathcal{N}^{(L)}(x)$ . This allows us to treat linear- and nonlinear layers on an equal footing. Since (1) is proportional to the unit matrix, we can treat it as a scalar. + +We can find a recursion relation between $\Theta^{(\ell +1)}$ and $\Theta^{(\ell)}$ by separating the $\ell^{\prime} = \ell +1$ contribution from the sum and computing the $\ell^{\prime}\leq \ell$ contributions in terms of derivatives + +through the layer $\ell + 1$ using the chain rule, + +$$ +\begin{array}{l} \Theta^ {(\ell + 1)} (x, x ^ {\prime}) = \mathbb {E} \left[ \frac {\partial \mathcal {N} ^ {(\ell + 1)} (x)}{\partial \theta^ {(\ell + 1)}} \left(\frac {\partial \mathcal {N} ^ {(\ell + 1)} \left(x ^ {\prime}\right)}{\partial \theta^ {(\ell + 1)}}\right) ^ {\top} \right] \\ + \mathbb {E} \left[ \frac {\partial \mathcal {N} ^ {(\ell + 1)} (x)}{\partial \mathcal {N} ^ {(\ell)} (x)} \underbrace {\left(\sum_ {\ell^ {\prime} = 1} ^ {\ell} \frac {\partial \mathcal {N} ^ {(\ell)} (x)}{\partial \theta^ {(\ell^ {\prime})}} \left(\frac {\partial \mathcal {N} ^ {(\ell)} (x ^ {\prime})}{\partial \theta^ {(\ell^ {\prime})}}\right) ^ {\top}\right)} _ {\Theta^ {(\ell)} (x, x ^ {\prime})} \right. \\ \left. \times \left(\frac {\partial \mathcal {N} ^ {(\ell + 1)} (x)}{\partial \mathcal {N} ^ {(\ell)} (x)}\right) ^ {\top} \right]. \tag {2} \\ \end{array} +$$ + +Note that according to the NTK's definition (1), it holds that $\Theta^{(0)} = 0$ . The recursions (2) have been computed explicitly for a number of layers, e.g. fully connected (Jacot et al., 2018), nonlinear (Jacot et al., 2018), convolution (Arora et al., 2019), and graph convolution (Du et al., 2019). An efficient implementation for many layers is available in the Jax-based Python package neural-tangents (Novak et al., 2020). + +For evaluating the expectation values in (2), it is convenient to introduce the neural network Gaussian process (NNGP) kernel + +$$ +K ^ {(\ell)} \left(x, x ^ {\prime}\right) = \mathbb {E} \left[ \mathcal {N} ^ {(\ell)} (x) \left(\mathcal {N} ^ {(\ell)} \left(x ^ {\prime}\right)\right) ^ {\top} \right], \tag {3} +$$ + +whose name originates in the fact that at initialization, the neural network converges in the infinite width limit to a zero-mean Gaussian process with covariance function $K^{(L)}(x,x^{\prime})$ (Neal, 1996; Lee et al., 2018). In the infinite width limit, $K$ is proportional to the unit matrix, so we will treat it as a scalar as well. The NNGP can also be computed recursively layer-by-layer. For the $\ell = 0$ , the NNGP is the covariance matrix of the input features $K^{(0)}(x,x^{\prime}) = x x^{\prime}^{\top}$ . + +Using the definition (3) of the NNGP, we can determine the structure of the NTK recursive relations from (2). For linear layers, the first expectation value will evaluate to the NNGP, while the second expectation value will be proportional to the unit matrix due to the initialization with independent normally distributed parameters. For nonlinear layers, the first expectation value vanishes and the second expectation values will depend on the derivative of the nonlinearity. + +Group Convolutions. Group convolutions (Cohen & Welling, 2016) act on feature maps $f: G \to \mathbb{R}^{n_{\mathrm{in}}}$ where $n_{\mathrm{in}}$ denotes the number of input features to the network. In the example of image inputs, this feature map would be $f: \mathbb{Z}^2 \to \mathbb{R}^3$ where $\mathbb{Z}^2$ is the pixel grid, $\mathbb{R}^3$ is the space of RGB colors, and the feature map $f$ is supported on $[0, h] \times [0, w]$ for imagesize $h \times w$ . Let $L^2(X, Y)$ denote the set of square integrable functions from $X$ to $Y$ . The $\ell$ -th neural network layer $\mathcal{N}^{(\ell)}: L^2(G, \mathbb{R}^{n_{\mathrm{in}}}) \to L^2(G, \mathbb{R}^{n_\ell})$ + +maps an input feature map $f: G \to \mathbb{R}^{n_{\mathrm{in}}}$ to an output feature map $\mathcal{N}^{(\ell)}(f): G \to \mathbb{R}^{n_{\ell}}$ . A particular instance of such a layer is the group convolution layer which in NTK representation is given by + +$$ +\left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g) = \frac {1}{\sqrt {n _ {\ell} \left| S _ {\kappa} \right|}} \int_ {G} \mathrm {d} h \kappa \left(g ^ {- 1} h\right) \left[ \mathcal {N} ^ {(\ell)} (f) \right] (h), \tag {4} +$$ + +with filter $\kappa : G \to \mathbb{R}^{n_{\ell}, n_{\ell + 1}}$ with support $S_{\kappa} \subset G$ . Here, we integrate over the group with respect to the Haar measure. For finite groups, the integral becomes a sum over group elements. Due to the invariance of the Haar measure, the layers (4) are equivariant with respect to the regular representation + +$$ +\left(\rho_ {\mathrm {r e g}} (g) f\right) (h) = f \left(g ^ {- 1} h\right) \quad g, h \in G. \tag {5} +$$ + +Since the input features typically have domain $X \subseteq \mathbb{R}^{n_{\mathrm{in}}}$ which is not the symmetry group $G$ , the first layer of a group convolutional neural network (GCNN) is a lifting layer which maps a feature map with domain $X$ equivariantly into a feature map with domain $G$ (Cohen & Welling, 2016) + +$$ +[ \mathcal {N} ^ {(1)} (f) ] (g) = \frac {1}{\sqrt {n _ {\mathrm {i n}} \left| S _ {\kappa} \right|}} \int_ {X} \mathrm {d} x \kappa (\rho (g ^ {- 1}) x) f (x), \tag {6} +$$ + +where $\rho$ is a representation of $G$ on $X$ . We assume here and in the following that $X$ is a homogeneous space of $G$ , i.e. that any two elements of $X$ are connected by a group transformation. + +As is common for other network types as well, the nonlinearities in group convolutional networks are applied component-wise across the different group elements, + +$$ +\left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g) = \sigma \left(\left[ \mathcal {N} ^ {(\ell)} (f) \right] (g)\right) \tag {7} +$$ + +for nonlinearity $\sigma$ . Due to this component-wise structure, the layers (7) are equivariant with respect to the regular representation (5) as well. + +By combining lifting- and group-convolution layers with nonlinearities, one can construct expressive architectures which are equivariant with respect to the regular representation, i.e. which satisfy + +$$ +\mathcal {N} \left(\rho_ {\text {r e g}} (g) f\right) = \tilde {\rho} _ {\text {r e g}} (g) \mathcal {N} (f), \quad g \in G. \tag {8} +$$ + +Many practical applications necessitate an invariant network + +$$ +\mathcal {N} \left(\rho_ {\text {r e g}} (g) f\right) = \mathcal {N} (f), \quad g \in G. \tag {9} +$$ + +Such a transformation property can be achieved by appending a group pooling layer to a GCNN, + +$$ +\mathcal {N} ^ {(\ell + 1)} (f) = \frac {1}{\operatorname {v o l} (G)} \int_ {G} \mathrm {d} g [ \mathcal {N} ^ {(\ell)} (f) ] (g). \tag {10} +$$ + +Using these layers, a wide variety of equivariant- and invariant networks with respect to a general symmetry group $G$ can be easily constructed. + +# 4. Equivariant Neural Tangent Kernels + +This section presents our recursive relations for the NTK and the NNGP for group convolutional layers. These recursions allow for efficient calculation of these kernels for arbitrary group convolutional architectures and thus provide the necessary tools to analytically study their training dynamics in the large width limit. Specifically, we derive recursion relations for group convolutions (4), lifting layers (6) and group pooling layers (10) by evaluating the derivatives and expectation values in (2). + +# 4.1. Equivariant NTK for Group Convolutions + +Since the domain of the feature maps in GCNNs is the symmetry group $G$ , the layer- $\ell$ NNGP and NTK kernels do not only depend on the input feature maps $f$ and $f'$ but also on the group elements $g, g'$ at which the feature maps are evaluated, i.e., + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) = \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g) \left(\left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] (g ^ {\prime})\right) ^ {\top} \right], +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) = \mathbb {E} \left[ \sum_ {\ell^ {\prime} = 1} ^ {\ell} \frac {\partial [ \mathcal {N} ^ {(\ell)} (f) ] (g)}{\partial \theta^ {(\ell^ {\prime})}} \left(\frac {\partial [ \mathcal {N} ^ {(\ell)} (f ^ {\prime}) ] (g ^ {\prime})}{\partial \theta^ {(\ell^ {\prime})}}\right) ^ {\top} \right]. +$$ + +For these kernels, we derive the following recursion relation: + +Theorem 4.1 (Kernel recursions for group convolutional layers). The layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (4) are given by + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} \right|} \int_ {S _ {\kappa}} \mathrm {d} h K _ {g h, g ^ {\prime} h} ^ {(\ell)} \left(f, f ^ {\prime}\right) \tag {11} +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) + \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} h \Theta_ {g h, g ^ {\prime} h} ^ {(\ell)} (f, f ^ {\prime}). \tag {12} +$$ + +Proof. See Appendix B. + +Given $G$ -invariant filter supports $S_{K}$ , these recursive definitions imply an invariance of the kernels in their group-indices under right-multiplication by the same group element $h \in G$ , + +$$ +K _ {g h, g ^ {\prime} h} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \tag {13} +$$ + +$$ +\Theta_ {g h, g ^ {\prime} h} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right). \tag {14} +$$ + +While the kernels of feature maps on the group carry $g, g'$ -indices, the kernels of the input features carry $x, x'$ -indices, + +$$ +K _ {x, x ^ {\prime}} ^ {(0)} \left(f, f ^ {\prime}\right) = f (x) f ^ {\prime} \left(x ^ {\prime}\right), \quad \Theta_ {x, x ^ {\prime}} ^ {(0)} \left(f, f ^ {\prime}\right) = 0. \tag {15} +$$ + +Using this, we also derive the following recursion relations: + +Theorem 4.2 (Kernel recursions for the lifting layer). The layer-wise recursive relations for the NNGP and NTK of the lifting layer (6) are given by1 + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} x K _ {\rho (g) x, \rho \left(g ^ {\prime}\right) x} ^ {(\ell)} (f, f ^ {\prime}), \tag {16} +$$ + +$$ +\begin{array}{l} \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} x \Theta_ {\rho (g) x, \rho (g ^ {\prime}) x} ^ {(\ell)} (f, f ^ {\prime}) \\ + K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right), \tag {17} \\ \end{array} +$$ + +where the regular representation $\rho_{\mathrm{reg}}$ is defined in (5). + +Proof. See Appendix B. + +The group pooling layer (10) maps feature maps on $G$ onto channel-vectors. Therefore, the kernels lose their $g,g^{\prime}$ indices in this layer, as is reflected in the following result: + +Theorem 4.3 (Kernel recursions for group pooling layer). The layer-wise recursive relations for the NNGP and NTK of the group pooling layer (10) are given by + +$$ +K ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} K _ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \tag {18} +$$ + +$$ +\Theta^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \Theta_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}). \tag {19} +$$ + +Proof. See Appendix B. + +The final layer necessary to compute kernels of GCNNs are the nonlinearities (7). Since these act pointwise on the feature maps, the recursive relations are the same as those for nonlinearities in MLPs (Jacot et al., 2018): + +Corollary 4.4 (Kernel recursions for nonlinearities). The layer-wise recursive relations for the NNGP and NTK of the nonlinear layer (7) are given by + +$$ +\Lambda_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) = \left( \begin{array}{c c} K _ {g, g} ^ {(\ell)} (f, f) & K _ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \\ K _ {g ^ {\prime}, g} ^ {(\ell)} (f ^ {\prime}, f) & K _ {g ^ {\prime}, g ^ {\prime}} ^ {(\ell)} \left(f ^ {\prime}, f ^ {\prime}\right) \end{array} \right) \tag {20} +$$ + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \mathbb {E} _ {(u, v) \sim \mathcal {N} (0, \Lambda_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}))} [ \sigma (u) \sigma (v) ] \tag {21} +$$ + +$$ +\dot {K} _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} _ {(u, v) \sim \mathcal {N} \left(0, \Lambda_ {g, g ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right)\right)} \left[ \sigma^ {\prime} (u) \sigma^ {\prime} (v) \right] (2 2) +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \dot {K} _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) \Theta_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}). \tag {23} +$$ + +Using these results, the NTK and NNGP can be straightforwardly computed for any GCNN architecture. In particular, consider the transformation of the kernels under transformations of the inputs, i.e. consider $K(\rho_{\mathrm{reg}}(h)f,\rho_{\mathrm{reg}}(h')f')$ and $\Theta (\rho_{\mathrm{reg}}(h)f,\rho_{\mathrm{reg}}(h')f')$ . From the recursion relations + +for the lifting layer in Theorem 4.2, we have the transformation property + +$$ +K _ {g, g ^ {\prime}} ^ {(1)} \left(\rho_ {\text {r e g}} (h) f, \rho_ {\text {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = K _ {h ^ {- 1} g, h ^ {\prime} - 1 g ^ {\prime}} ^ {(1)} \left(f, f ^ {\prime}\right) \tag {24} +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(1)} \left(\rho_ {\text {r e g}} (h) f, \rho_ {\text {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = \Theta_ {h ^ {- 1} g, h ^ {\prime - 1} g ^ {\prime}} ^ {(1)} \left(f, f ^ {\prime}\right). \tag {25} +$$ + +This left-multiplication is preserved by the recursions of both the group convolutions in Theorem 4.1 and the nonlinearities in Corollary 4.4. Therefore, before any pooling layer, we have + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell)} \left(\rho_ {\operatorname {r e g}} (h) f, \rho_ {\operatorname {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = K _ {h ^ {- 1} g, h ^ {\prime} - 1 g ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \tag {26} +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(\ell)} \left(\rho_ {\text {r e g}} (h) f, \rho_ {\text {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = \Theta_ {h ^ {- 1} g, h ^ {\prime - 1} g ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right), \tag {27} +$$ + +reflecting the equivariance of the network. The recursions of the group-pooling layer in Theorem 4.3 average over the group and the kernels become invariant after the group pooling layer + +$$ +K ^ {(\ell)} \left(\rho_ {\text {r e g}} (h) f, \rho_ {\text {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = K ^ {(\ell)} \left(f, f ^ {\prime}\right) \tag {28} +$$ + +$$ +\Theta^ {(\ell)} \left(\rho_ {\mathrm {r e g}} (h) f, \rho_ {\mathrm {r e g}} \left(h ^ {\prime}\right) f ^ {\prime}\right) = \Theta^ {(\ell)} \left(f, f ^ {\prime}\right), \tag {29} +$$ + +as expected from an invariant network. Note that these transformation properties of the kernels are independent for both arguments. + +# 4.2. Roto-Translations in the Plane + +The kernel recursions provided in the previous section are valid for general symmetry groups $G$ . In this section, we will specialize these expressions to the case of rototranslations in the plane with rotations by $(360/n)^{\circ}$ . In this case, $G = C_{n} \ltimes \mathbb{R}^{2}$ where $G$ is the semidirect product of the cyclic group $C_{n}$ and the translation group in two dimensions $\mathbb{R}^{2}$ . It was shown that adding this rotational symmetry to conventional CNNs boosts performance considerably for important applications such as medical image analysis (Chidester et al., 2019; Bekkers et al., 2018; Pang et al., 2023). Due to the semidirect product nature of the symmetry group, the group convolutional layers can be written as a stack of $n$ conventional convolutions which are summed over the rotation group. Details and explicit expressions for the lifting-, group convolutional- and group pooling layers in this case can be found in Appendix C.1. + +The kernel recursion of ordinary CNN-layers can be written in terms of the operator (Xiao et al., 2018) + +$$ +\left[ \mathcal {A} _ {S _ {\kappa}} (K) \right] \left(t, t ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} \right|} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} K \left(t + \tilde {t}, t ^ {\prime} + \tilde {t}\right), \tag {30} +$$ + +for which efficient implementations in terms of convolutions are available in (Novak et al., 2020). In Appendix C.2, we present explicit expressions for the NNGP and NTK recursions of roto-translation equivariant convolutions in + +terms of $\mathcal{A}$ , retaining the efficiency of the non-rotation-equivariant kernel computations. We provide implementations of these recursions for $n = 4$ as new layers based on the neural-tangents package. + +# 4.3. Rotations in 3d + +Spherical signals subject to rotations in 3d are a further important use case with numerous applications in quantum chemistry (Duval et al., 2023), weather prediction (Bonev et al., 2023) and 3d shape recognition (Fuchs et al., 2020). The group convolutions for the corresponding symmetry group $\mathrm{SO}(3)$ can be computed efficiently in the Fourier domain, in terms of coefficients in a steerable basis of spherical harmonics $Y_{m}^{l}$ or Wigner matrices $\mathcal{D}_{mn}^{l}$ , respectively (Cohen et al., 2018; Cohen & Welling, 2017). Due to the continuous nature of the $\mathrm{SO}(3)$ group, comprehensive data augmentation is not feasible, thus making group convolutional networks the natural choice to incorporate such symmetries. In Appendix D.1, we provide a summary of the necessary Fourier space relations for $\mathrm{SO}(3)$ -equivariant networks. + +The kernel forward equations (11), (12) simplify to purely algebraic equations in terms of Fourier coefficients + +$$ +\begin{array}{l} \left[ \widehat {K ^ {(\ell)} (f , f ^ {\prime})} \right] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \\ \int \mathrm {d} R \int \mathrm {d} R ^ {\prime} K _ {R, R ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \mathcal {D} _ {m n} ^ {l} (R) \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} \left(R ^ {\prime}\right), \tag {31} \\ \end{array} +$$ + +and analogously for the NTK. Note that the kernels have two group indices, thus necessitating a double Fourier transform. Detailed relations for lifting-, group convolutional- and group pooling layer in the Fourier space are provided in Appendix D.2. Again, these layers are implemented in the neural-tangents package and the necessary generalized FFTs are provided by the JAX-based packages 2fft (Price & McEwen, 2024). + +# 5. Data Augmentation Versus Group Convolutions at Infinite Width + +The recursive relations presented in the previous sections give analytical access to the training dynamics of equivariant neural networks. In particular, they allow for a more in-depth theoretical understanding of the similarities and differences of data augmentation and manifest equivariance than previously possible. + +It is known that ensembles of independently initialized neural networks trained with data augmentation yield equivariant mean predictions (Gerken & Kessel, 2024; Nordenfors & Flinth, 2024). It is however unclear how these equivariant functions relate to trained manifestly equivariant networks. Using the recursive relations from Section 4.1, it is possible to show that non-equivariant networks trained with data aug- + +mentation in fact converge to group convolutional networks in the ensemble mean. + +# 5.1. Data Augmentation at Infinite Width + +In the infinite width limit, the training dynamics under gradient descent can be solved exactly (Jacot et al., 2018). This enables us to explicitly study data augmentation, showing that data augmentation and kernel averaging yield the same mean predictions, as detailed in the following + +Theorem 5.1. Let $\mu_t^{\mathrm{aug}}$ and $\mu_t$ be the mean predictions after $t$ training steps of infinite ensembles of two neural network architectures $\mathcal{N}^{\mathrm{aug}}$ and $\mathcal{N}$ . Let $\mathcal{N}^{\mathrm{aug}}$ be trained on the fully $G$ -augmented training data of $\mathcal{N}$ and assume that the NTKs of the two architectures are related by + +$$ +\Theta (f, f ^ {\prime}) = \frac {1}{| G |} \sum_ {g \in G} \Theta^ {\mathrm {a u g}} (f, \rho_ {\mathrm {r e g}} (g) f ^ {\prime}). \tag {32} +$$ + +Then, $\mu_t^{\mathrm{aug}}$ and $\mu_t$ converge in the infinite width limit to the same function for all $t$ for quadratic losses, up to quadratic corrections in the learning rate. + +Proof. See Appendix E. + +The proof of Theorem 5.1 proceeds inductively over training steps. At initialization, both mean functions are identically zero (Neal, 1996; Lee et al., 2018). The updates for the two networks can be written in terms of the NTK and shown to agree by splitting the sum over augmented training data into a sum over samples and a sum over $G$ and using the assumption (32). + +In fact, the same argument can be used to show that the individual networks $\mathcal{N}^{\mathrm{aug}}$ and $\mathcal{N}$ (as opposed to their ensemble averages) agree if their empirical NTKs satisfy (32) as long as the networks are identical for all inputs and equivariant at initialization. This would for instance be the case if $\mathcal{N}(x) = \mathcal{N}^{\mathrm{aug}}(x) = 0$ for all $x$ at initialization. + +# 5.2. Kernel Averaging Yields GCNN-Kernels + +Theorem 5.1 shows equivalence of augmented and non-augmented networks if the NTKs of both architectures are related by group-averaging. Consider the case of training an MLP on augmented data. Then, (32) prompts us to consider the group-average of its NTK to find the architecture which results in the same mean predictions if trained without data augmentation. By iterating the recursive kernel-relations found in the previous section, one can in fact show that this architecture is a GCNN, as detailed in the following + +Theorem 5.2. Let $\mathcal{N}^{\mathrm{FC}}$ be an MLP acting on feature maps with output in $\mathbb{R}$ and architecture + +$$ +\mathcal {N} ^ {\mathrm {F C}} = \mathrm {F C} ^ {(L)} \circ \sigma \circ \dots \circ \mathrm {F C} ^ {(3)} \circ \sigma \circ \mathrm {F C} ^ {(1)}, \tag {33} +$$ + +where $FC$ denotes a dense MLP layer and $\sigma$ a point-wise nonlinearity. Let $\mathcal{N}^{\mathrm{GC}}$ be a $G$ -invariant GCNN with architecture + +$$ +\begin{array}{l} \mathcal {N} ^ {\mathrm {G C}} = \operatorname {G P o o l} \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {L}\right) \circ \sigma \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {L - 2}\right) \circ \sigma \dots \\ \dots \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {3}\right) \circ \sigma \circ \operatorname {L i f t i n g} \left(S _ {\kappa} ^ {1}\right), \tag {34} \\ \end{array} +$$ + +where $S_{\kappa}^{\ell}$ are the supports of the convolutional filters with $S_{\kappa}^{1} = X$ , the domain of the input feature maps, and the other $S_{\kappa}^{\ell}$ are invariant under $G$ . Then, the $G$ -averages of the kernels of the MLP are given by the kernels of the GCNN, + +$$ +K ^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (G)} \int \mathrm {d} g K ^ {\mathrm {F C}} (f, \rho_ {\mathrm {r e g}} (g) f ^ {\prime}) \tag {35} +$$ + +$$ +\Theta^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (G)} \int \mathrm {d} g \Theta^ {\mathrm {F C}} (f, \rho_ {\text {r e g}} (g) f ^ {\prime}). \tag {36} +$$ + +Proof. See Appendix E. + +Together with Theorem 5.1, this theorem shows that by augmenting an arbitrary deep MLP at infinite width, one obtains a specific equivariant architecture, namely a GCNN with the same depth $L$ and an additional group-pooling layer. This result singles out group convolutional layers among other equivariant layers and mirrors the fact that group convolutions are the unique linear equivariant layers under the regular representation. Note that according to Theorem 5.1 the equivalence between augmented and equivariant networks holds throughout training and even out of distribution. + +# 5.3. Augmenting a CNN + +Consider a generalization of the roto-translation symmetry discussed in Section 4.2, namely a general semidirect product group, $G = K \ltimes N$ with $N$ a normal subgroup of $G$ . For $N$ a translation group, this covers cases such as CNNs in two and three dimensions with additional rotation or reflection symmetry (Cesa et al., 2022). + +The semidirect product structure of $G$ allows a splitting of the full equivariance, namely training a $K \times N$ -invariant GCNN is equivalent to training an $N$ -invariant GCNN on $K$ -augmented data. In order to see this, we show the corresponding kernel averages for Theorem 5.1 to hold: + +Theorem 5.3. Let $\mathcal{N}^{K \ltimes N}$ be the $K \ltimes N$ -invariant GCNN with architecture (34) and $K$ -invariant filter supports $S_{\kappa}^{\ell}$ which for the GConv-layers decompose as $S_{\kappa}^{\ell} = K_{\kappa}^{\ell} \times N_{\kappa}^{\ell}$ , $K_{\kappa}^{\ell} \subseteq K$ , $N_{\kappa}^{\ell} \subseteq N$ . Let $\mathcal{N}^N$ be the $N$ -invariant GCNN with architecture (34) and filter supports $N_{\kappa}^L, \ldots, N_{\kappa}^3$ and $S_{\kappa}^1$ . Then, the NNGPs and NTKs of these networks are + +related by + +$$ +K ^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k K ^ {N} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right) \tag {37} +$$ + +$$ +\Theta^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k \Theta^ {N} (f, \rho_ {\text {r e g}} (k) f ^ {\prime}). \tag {38} +$$ + +Proof. See Appendix E. + +Remark 5.4. For $K = C_n$ and $N = \mathbb{R}^2$ , i.e. rototranslations in the plane, $\mathcal{N}^N$ becomes an ordinary CNN and $\mathcal{N}^{K \ltimes N}$ is of the form discussed in Section 4.2. According to Theorem 5.3, the kernels of the rotation-equivariant network are then given by averaging the kernels of the CNN, + +$$ +K ^ {C _ {n} \times \mathbb {R} ^ {2}} (f, f ^ {\prime}) = \frac {1}{n} \sum_ {r \in C _ {n}} K ^ {\mathrm {C N N}} (f, \rho_ {\mathrm {r e g}} (r) f ^ {\prime}) \tag {39} +$$ + +$$ +\Theta^ {C _ {n} \ltimes \mathbb {R} ^ {2}} (f, f ^ {\prime}) = \frac {1}{n} \sum_ {r \in C _ {n}} \Theta^ {\mathrm {C N N}} (f, \rho_ {\mathrm {r e g}} (r) f ^ {\prime}) \tag {40} +$$ + +if the spatial filter shapes agree for both networks and are rotation-invariant. + +Taken together with Theorem 5.1, this shows that training an $N$ -invariant GCNN on $K$ -augmented data results in a $K \ltimes N$ -invariant GCNN. For the special case of $N$ a translation group and $K$ a rotation group, this means that training a CNN on rotation-augmented data is equivalent to training a roto-translation equivariant GCNN on unaugmented data. In Section 6, we will show that this still holds approximately for finite-width networks and ensembles. + +# 5.4. Distribution of Ensemble Members + +Consider training two ensembles of networks with (a) data augmentation on a non-equivariant architecture and (b) no data augmentation on an equivariant architecture. Then, the distributions of the individual networks in these ensembles do not agree since most of the augmented networks will not be equivariant. However, our results show that the ensemble mean of (a) converges to the ensemble mean of (b) with a specific GCNN architecture. This establishes a highly non-trivial relation between data augmentation and GCNNs. + +# 6. Experiments + +In the following, we validate the theoretical results of the preceding sections experimentally for various datasets (Cifar10, QM9, MNIST, and histological data), tasks (regression and classification), and groups (SO(3) and $C_4 \ltimes \mathbb{R}^2$ ). + +Kernel Convergence for $C_4 \times \mathbb{R}^2$ . Figure 1 confirms that the Monte-Carlo estimate of the NTK converges to our analytical expression as the width increases. Our MC estimates are obtained by replacing the expectation values in (1) + +![](images/544398f3bbf902180f248b2fd68c1466a775da97fdd1870ad26200d56a425c1a.jpg) +Figure 1. Convergence of the Monte-Carlo estimates of the NTK to their infinite-width limits for $G = C_4 \ltimes \mathbb{R}^2$ . Plotted is the relative error averaged over the components of a $3 \times 3$ Gram matrix for networks with a ReLU or an error function nonlinearity. Bands show ± one standard deviation of the estimator. + +![](images/dc93ed41d3eeda1435cdd80f5a80f393f33e5cb1a315ab7be6ea57ad678760e8.jpg) +Figure 2. NTK for image classification. Test accuracy of the arising NTK kernel methods in the infinite width and infinite training time limit for different training set sizes. The results for both a conventional CNN and a $C_4 \times \mathbb{R}^2$ -invariant GCNN are shown. + +by the sample mean of 1000 initializations of the network. We considered GCNNs with one lifting- and four group-convolution layers interspersed with ReLU nonlinearities, followed by a group-pooling layer. The convergence of the NNGP is shown in a similar plot in Appendix F.1. + +Medical Image Classification with $C_4 \ltimes \mathbb{R}^2$ . We show that rotation-equivariant NTK-predictors outperform nonequivariant NTK-predictors on a dataset of histological images (Kather et al., 2018) containing nine distinct classes of tissues. Specifically, we compare a CNN architecture with the corresponding rotation-invariant GCNN architecture, in which we replace each of the five convolutional layers with a group-convolutional- or lifting layer, respectively and used a group-pooling layer instead of a SumPool layer. Figure 2 shows the improved scaling behavior of the equivariant kernel with training set size upon using the infinite-time + +![](images/cb49d67ace93c4690cac0c308d1f7a9616d4f931cf180a654007feb18806d9d7.jpg) +Figure 3. NTK for molecular energy prediction. Molecular energy MAEs of the NTK kernel methods in the infinite width and training time limit for different training set sizes. The results are for both a conventional MLP and a SO(3)-invariant GCNN. + +solution of the NTK-dynamics under MSE loss, + +$$ +\mu (x) = \Theta (x, \mathcal {X}) \Theta (\mathcal {X}, \mathcal {X}) ^ {- 1} \mathcal {Y}, \tag {41} +$$ + +where $\mathcal{X}$ represents the training images, scaled down to $32\times 32$ pixels, $\mathcal{V}$ are the training labels, given by $e_c - \frac{1}{9} 1$ for class $c$ , and $\Theta (\mathcal{X},\mathcal{X})$ is the Gram matrix of the NTK. We refer to Appendix F.2 for more details. + +Molecular Energy Regression with SO(3). We benchmark the NTK-predictor resulting from an SO(3)-invariant network on the QM9 dataset (Ramakrishnan et al., 2014) by predicting molecular energies $U_{0}$ from atom configurations utilizing (41). Comparing this to the corresponding MLP kernel, we observe a considerable performance boost for the invariant kernel over a range of training set sizes, as shown in Figure 3. For preprocessing, we construct spherical signals from the atom configurations as described in (Esteves et al., 2023). For each atom $i$ of the at most 29 atoms, the environment is represented by pairwise Gaussian smearing over atoms with the same atomic number $z$ + +$$ +f _ {i, z, p} (x) = \sum_ {j: z _ {j} = z} \frac {z _ {i} z}{\| r _ {i j} \| ^ {p}} e ^ {- \frac {1}{\beta} \left(\frac {r _ {i j}}{\| r _ {i j} \|} \cdot x - 1\right) ^ {2}}. \tag {42} +$$ + +Choosing $p \in \{2, 6\}$ and considering all of QM9's five atom types leads to 29 spherical per-atom signals with $5 \times 2$ channels each. Each of those per-atom signals are then either processed by a two layer SO(3)-equivariant network with group pooling on top or by a two-layer MLP. The per-atom outputs are eventually summed and fed into a final fully-connected layer similarly as in (Cohen et al., 2018). The input signals are constructed at a resolution of $12 \times 11$ on the sphere, corresponding to a bandlimit of $L = 6$ , which are then downsampled to a bandlimit $L = 3$ for the group layer. We provide further details in Appendix F.3. + +![](images/cd615bc0e3b943718b98138a6986cfbf6b61d07a9ed8411b46556cf3d9a9f4da.jpg) +Figure 4. Convergence of finite-width ensembles trained with data augmentation to ensembles of GCNNs on MNIST. $L^2$ -distance between the logits of the equivariant- and non-equivariant ensemble trained with data augmentation for different ensemble sizes on out of distribution data. For larger ensembles, the distance decreases. + +Data Augmentation Versus Group Convolutions at Finite Width. In Section 5, we proved that networks trained with data augmentation converge in expectation to group convolutional networks at infinite width. We also verify empirically that the mean predictions agree progressively with increasing ensembles size at finite width, supporting approximate validity away from the theoretical limit. To this end, we train ensembles of CNNs and GCNNs with symmetry group $C_4 \ltimes \mathbb{R}^2$ as discussed in Remark 5.4 on CIFAR10 and MNIST using the MSE-loss against smoothed one-hot labels as for the medical images above. For implementing the GCNNs, we used the escnn-package (Weiler & Cesa, 2019). As shown in Figure 4 for MNIST, the outputs of both ensembles converge to the same vector for large ensemble sizes throughout training and even out of distribution. For further details on the model architectures, out of distribution data, as well as results on CIFAR10 and histological images, see Appendix F.4. + +# 7. Conclusion + +This paper provides recursive relations for the NNGP and NTK for group convolutional neural networks allowing us to theoretically establish an interesting equivalence between equivariance-based to data-augmentation-based training dynamics. We also show that equivariant kernels outperform their non-equivariant counterparts as kernel machines. + +A careful comparison of equivariant GCNNs and equivariant data augmentation, beyond the invariant case analyzed in Section 5, would be an interesting subject for further research. In particular, Theorem 5.1 can be straightforwardly extended to the equivariant case, as demonstrated in Appendix E. However, Theorems 5.2 and 5.3 rely on the group + +pooling layer and are thus specialized to invariant GCNNs. An equivariant extension would require new layers beyond those presented here since in the infinite-width limit, the NTK of an MLP becomes proportional to the unit matrix in the output channels, trivializing the feature map. + +# Acknowledgments + +J.G. and P.M. want to thank Max Guillen for inspiring discussions and collaborations on related projects. The work of J.G. and P.M. is supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation. The computations were enabled by resources provided by the National Academic Infrastructure for Supercomputing in Sweden (NAISS) and the Swedish National Infrastructure for Computing (SNIC) at C3SE partially funded by the Swedish Research Council through grant agreements 2022-06725 and 2018-05973. + +# 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 + +Abramson, J., Adler, J., Dunger, J., Evans, R., Green, T., Pritzel, A., Ronneberger, O., Willmore, L., Ballard, A. J., Bambrick, J., et al. Accurate structure prediction of biomolecular interactions with alphafold 3. Nature, pp. 1-3, 2024. +Amari, S.-i. Natural Gradient Works Efficiently in Learning. Neural Computation, 10(2):251-276, February 1998. ISSN 0899-7667. doi: 10.1162/089976698300017746. +Arora, S., Du, S. S., Hu, W., Li, Z., Salakhutdinov, R. R., and Wang, R. On Exact Computation with an Infinitely Wide Neural Net. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/dbc4d84bfcfe2284ba11beffb853a8c4-Paper.pdf. +Basu, S., Sattigeri, P., Ramamurthy, K. N., Chenthamarakshan, V., Varshney, K. R., Varshney, L. R., and Das, P. Equi-Tuning: Group Equivariant Fine-Tuning of Pretrained Models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 6788-6796, June 2023. doi: 10.1609/aaai.v37i6.25832. URL + +https://ojs.aaai.org/index.php/AAAI/article/view/25832. +Batzner, S., Musaelian, A., Sun, L., Geiger, M., Mailoa, J. P., Kornbluth, M., Molinari, N., Smidt, T. E., and Kozinsky, B. E(3)-Equivariant Graph Neural Networks for Data-Efficient and Accurate Interatomic Potentials. Nature Communications, 13(1):2453, May 2022. ISSN 2041-1723. doi: 10.1038/s41467-022-29939-5. URL https://doi.org/10.1038/s41467-022-29939-5. +Bekkers, E. J., Lafarge, M. W., Veta, M., Eppenhof, K. A. J., Pluim, J. P. W., and Duits, R. Roto-Translation Covariant Convolutional Networks for Medical Image Analysis. In Medical Image Computing and Computer Assisted Intervention - MICCAI 2018, Lecture Notes in Computer Science, pp. 440-448, Cham, 2018. Springer International Publishing. ISBN 978-3-030-00928-1. doi: 10.1007/978-3-030-00928-1_50. +Bekkers, E. J., Vadgama, S. P., Hesselink, R., van der Linden, P. A., and Romero, D. W. Fast, expressive se(n) equivariant networks through weight-sharing in position-orientation space. In International Conference on Learning Representations, ICLR, 2024. URL https://openreview.net/forum?id=dPHbUqGbr. +Bogatskiy, A., Anderson, B., Offermann, J., Roussi, M., Miller, D., and Kondor, R. Lorentz group equivariant neural network for particle physics. In Proceedings of the 37th International Conference on Machine Learning, volume 119, pp. 992-1002. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/bogatskiy20a.html. +Bonev, B., Kurth, T., Hundt, C., Pathak, J., Baust, M., Kashinath, K., and Anandkumar, A. Spherical Fourier neural operators: Learning stable dynamics on the sphere. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 2806-2823. PMLR, 23-29 Jul 2023. URL https://proceedings.mlr.pr ess/v202/bonev23a.html. +Bordelon, B., Canatar, A., and Pehlevan, C. Spectrum dependent learning curves in kernel regression and wide neural networks. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 1024-1034. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/bordelon20a.html. +Brehmer, J., Behrends, S., de Haan, P., and Cohen, T. Does equivariance matter at scale? arXiv, October 2024. ISSN 2331-8422. URL https://arxiv.org/abs/24.10.23179. + +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, July 2017. ISSN 1558-0792. doi: 10.1109/MSP.2017.2693418. +Canatar, A., Bordelon, B., and Pehlevan, C. Spectral bias and task-model alignment explain generalization in kernel regression and infinitely wide neural networks. Nature Communications, 12(1), May 2021. ISSN 2041-1723. doi: 10.1038/s41467-021-23103-1. URL http://dx.doi.org/10.1038/s41467-021-23103-1. +Celledoni, E., Ehrhardt, M. J., Etmann, C., Owren, B., Schonlieb, C.-B., and Sherry, F. Equivariant neural networks for inverse problems. Inverse Problems, 37(8): 085006, jul 2021. doi: 10.1088/1361-6420/ac104f. URL https://dx.doi.org/10.1088/1361-6420/ac104f. +Cesa, G., Lang, L., and Weiler, M. A Program to Build E(N)-Equivariant Steerable CNNs. In International Conference on Learning Representations, ICLR, 2022. URL https://openreview.net/forum?id=WE4qe9xlnQw. +Chidester, B., Ton, T.-V., Tran, M.-T., Ma, J., and Do, M. N. Enhanced Rotation-Equivariant U-Net for Nuclear Segmentation. In 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pp. 1097-1104, June 2019. doi: 10.1109/CVPRW.2019.00143. +Cohen, T. Equivariant Convolutional Networks. PhD thesis, University of Amsterdam, 2021. +Cohen, T. and Welling, M. Group Equivariant Convolutional Networks. In Proceedings of The 33rd International Conference on Machine Learning, volume 48 of Proceedings of Machine Learning Research, pp. 2990-2999, New York, New York, USA, 20-22 Jun 2016. PMLR. URL https://proceedings.mlr.press/v48/cohenc16.html. +Cohen, T. S. and Welling, M. Steerable CNNs. In International Conference on Learning Representations, ICLR, 2017. URL https://openreview.net/forum?id=rJQKYt511. +Cohen, T. S., Geiger, M., Kohler, J., and Welling, M. Spherical CNNs. In International Conference on Learning Representations, ICLR, 2018. URL https://openreview.net/forum?id=Hkbd5xZRb. +Day, H., Kahn, Y., and Roberts, D. A. Feature Learning and Generalization in Deep Networks with Orthogonal Weights. arXiv, October 2023. ISSN 2331-8422. URL https://arxiv.org/abs/2310.07765. + +Dombrowski, A.-K., Gerken, J. E., Müller, K.-R., and Kessel, P. Diffeomorphic Counterfactuals With Generative Models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(5):3257-3274, May 2024. ISSN 1939-3539. doi: 10.1109/TPAMI.2023.3339980. +Driscoll, J. and Healy, D. Computing fourier transforms and convolutions on the 2-sphere. Advances in Applied Mathematics, 15(2):202-250, 1994. ISSN 0196-8858. doi: https://doi.org/10.1006/aama.1994.1008. URL https://www.sciencedirect.com/science/article/pii/S0196885884710086. +Du, S. S., Hou, K., Salakhutdinov, R. R., Poczos, B., Wang, R., and Xu, K. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/663fd3c5144fd10bd5ca6611a9a5b92d-Paper.pdf. +Duval, A., Mathis, S. V., Joshi, C. K., Schmidt, V., Miret, S., Malliaros, F. D., Cohen, T., Lio, P., Bengio, Y., and Bronstein, M. A Hitchhiker's Guide to Geometric GNNs for 3D Atomic Systems. arXiv, December 2023. ISSN 2331-8422. URL https://arxiv.org/abs/23.12.07511. +Engel, A., Wang, Z., Frank, N., Dumitriu, I., Choudhury, S., Sarwate, A. D., and Chiang, T. Faithful and Efficient Explanations for Neural Networks via Neural Tangent Kernel Surrogate Models. In International Conference on Learning Representations, ICLR, 2024. URL https://openreview.net/forum?id=yKksu38BpM. +Erbin, H., Lahoche, V., and Samary, D. O. Nonperturbative renormalization for the neural network-QFT correspondence. Machine Learning: Science and Technology, 3(1):015027, March 2022. ISSN 2632-2153. doi: 10.1088/2632-2153/ac4f69. +Esteves, C., Slotine, J.-J., and Makadia, A. Scaling spherical CNNs. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 9396-9411. PMLR, 23-29 Jul 2023. URL https://proceedings.mlrpress/v202/esteves23a.html. +Franceschi, J.-Y., Bezenac, E. D., Ayed, I., Chen, M., Lamprier, S., and Gallinari, P. A Neural Tangent Kernel Perspective of GANs. In Proceedings of the 39th International Conference on Machine Learning, volume 162, pp. 6660-6704. PMLR, 17-23 Jul 2022. URL https://proceedings.mlr.press/v162/franceschi22a.html. + +Fuchs, F., Worrall, D., Fischer, V., and Welling, M. Se(3)-transformers: 3d roto-translation equivariant attention networks. In Advances in Neural Information Processing Systems, volume 33, pp. 1970-1981. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/15231a7ce4ba789d13b722cc5c955834-Paper.pdf. +Geiger, M., Spigler, S., Jacot, A., and Wyart, M. Disentangling feature and lazy training in deep neural networks. Journal of Statistical Mechanics: Theory and Experiment, 2020(11):113301, November 2020. ISSN 1742-5468. doi: 10.1088/1742-5468/abc4de. +Gerken, J. E. and Kessel, P. Emergent Equivariance in Deep Ensembles. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pp. 15438-15465. PMLR, 21-27 Jul 2024. URL https://proceedings.mlr.press/v235/gerken24a.html. +Gerken, J. E., Carlsson, O., Linander, H., Ohlsson, F., Petersson, C., and Persson, D. Equivariance versus Augmentation for Spherical Images. In Proceedings of the 39th International Conference on Machine Learning, volume 162, pp. 7404-7421. PMLR, 17-23 Jul 2022. URL https://proceedings.mlr.press/v162/gerken22a.html. +Gerken, J. E., Aronsson, J., Carlsson, O., Linander, H., Ohlsson, F., Petersson, C., and Persson, D. Geometric deep learning and equivariant neural networks. Artificial Intelligence Review, June 2023. ISSN 1573-7462. doi: 10.1007/s10462-023-10502-7. +Golikov, E., Pokonechnyy, E., and Korviakov, V. Neural Tangent Kernel: A Survey. arXiv, August 2022. ISSN 2331-8422. URL https://arxiv.org/abs/2208.13614. +Halverson, J., Maiti, A., and Stoner, K. Neural Networks and Quantum Field Theory. Machine Learning: Science and Technology, 2(3):035002, September 2021. ISSN 2632-2153. doi: 10.1088/2632-2153/abeca3. +Hayase, J. and Oh, S. Few-shot Backdoor Attacks via Neural Tangent Kernels. In International Conference on Learning Representations, ICLR, 2023. URL https://openreview.net/forum?id=a701GJ-rwy. +Huang, J. and Yau, H.-T. Dynamics of Deep Neural Networks and Neural Tangent Hierarchy. In Proceedings of the 37th International Conference on Machine Learning, volume 119, pp. 4542-4551. PMLR, 13-18 Jul 2020. URL https://proceedings.mlr.press/v119/huang201.html. + +Jacot, A., Gabriel, F., and Hongler, C. Neural Tangent Kernel: Convergence and Generalization in Neural Networks. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018. URL https://proceedings.neurips.cc/paper_files/paper/2018/file/5a4be1fa34e62 bb8a6ec6b91d2462f5a-Paper.pdf. +Jacot, A., Gabriel, F., Ged, F., and Hongler, C. Order and Chaos: NTK views on DNN Normalization, Checkerboard and Boundary Artifacts. arXiv, June 2020. ISSN 2331-8422. URL https://arxiv.org/abs/1907.05715. +Kather, J. N., Halama, N., and Marx, A. 100,000 histological images of human colorectal cancer and healthy tissue. Zenodo, April 2018. URL https://doi.org/10.5281/zenodo.1214456. +Kondor, R. and Trivedi, S. On the Generalization of Equivalence and Convolution in Neural Networks to the Action of Compact Groups. In Proceedings of the 35th International Conference on Machine Learning, volume 80, pp. 2747-2755. PMLR, 10-15 Jul 2018. URL https://proceedings.mlr.press/v80/ko-ndor18a.html. +Lee, J., Bahri, Y., Novak, R., Schoenholz, S. S., Pennington, J., and Sohl-Dickstein, J. Deep Neural Networks as Gaussian Processes. In International Conference on Learning Representations, ICLR, 2018. URL https://openreview.net/forum?id=B1EA-M-0Z. +Lee, J., Xiao, L., Schoenholz, S., Bahri, Y., Novak, R., Sohl-Dickstein, J., and Pennington, J. Wide Neural Networks of Any Depth Evolve as Linear Models Under Gradient Descent. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/0d1a9651497a38d8b1c3871c84528bd4-Paper.pdf. +Lee, J., Schoenholz, S., Pennington, J., Adlam, B., Xiao, L., Novak, R., and Sohl-Dickstein, J. Finite versus infinite neural networks: An empirical study. In Advances in Neural Information Processing Systems, volume 33, pp. 15156-15172. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/file/ad086f59924ffffe0773f8d0ca22ea712-Paper.pdf. +Li, Z., Wang, R., Yu, D., Du, S. S., Hu, W., Salakhutdinov, R., and Arora, S. Enhanced Convolutional Neural Tangent Kernels. arXiv, November 2019. ISSN 2331-8422. URL https://arxiv.org/abs/1911.00809. + +Liao, Y. and Smidt, T. E. Equiformer: Equivariant Graph Attention Transformer for 3D Atomistic Graphs. In International Conference on Learning Representations, ICLR, 2023. URL https://openreview.net/forum?id=KwmPfARgOTD. +Mok, J., Na, B., Kim, J.-H., Han, D., and Yoon, S. Demystifying the Neural Tangent Kernel from a Practical Perspective: Can it be trusted for Neural Architecture Search without training? In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 11851-11860, June 2022. doi: 10.1109/CVPR52688.2022.01156. +Moskalev, A., Sepliarskaia, A., Bekkers, E. J., and Smeulders, A. W. On genuine invariance learning without weight-tying. In Proceedings of 2nd Annual Workshop on Topology, Algebra, and Geometry in Machine Learning (TAG-ML), volume 221 of Proceedings of Machine Learning Research, pp. 218-227. PMLR, 28 Jul 2023. URL https://proceedings.mlr.press/v221/moskalev23a.html. +Moyer, D., Abaci Turk, E., Grant, P. E., Wells, W. M., and Golland, P. Equivariant Filters for Efficient Tracking in 3D Imaging. In Medical Image Computing and Computer Assisted Intervention - MICCAI 2021, pp. 193-202, Cham, 2021. Springer International Publishing. ISBN 978-3-030-87202-1. doi: 10.1007/978-3-030-87202-1_1 9. +Müller, P., Golkov, V., Tomassini, V., and Cremers, D. Rotation-Equivariant Deep Learning for Diffusion MRI. arXiv, February 2021. ISSN 2331-8422. URL https://arxiv.org/abs/2102.06942. +Neal, R. M. Bayesian Learning for Neural Networks. Springer Science & Business Media, 1996. ISBN 978-1-4612-0745-0. +Nicoli, K. A., Nakajima, S., Strodthoff, N., Samek, W., Müller, K.-R., and Kessel, P. Asymptotically unbiased estimation of physical observables with neural samplers. Physical Review E, 101(2):023304, 2020. +Nordenfors, O. and Flinth, A. Ensembles provably learn equivariance through data augmentation. arXiv, October 2024. ISSN 2331-8422. URL https://arxiv.org/abs/2410.01452. +Novak, R., Xiao, L., Hron, J., Lee, J., Alemi, A. A., Sohl-Dickstein, J., and Schoenholz, S. S. Neural Tangents: Fast and Easy Infinite Neural Networks in Python. In International Conference on Learning Representations, ICLR, 2020. URL https://openreview.net/forum?id=Sk1D9yrFPS. + +Pang, S., Du, A., Orgun, M. A., Wang, Y., Sheng, Q. Z., Wang, S., Huang, X., and Yu, Z. Beyond CNNs: Exploiting Further Inherent Symmetries in Medical Image Segmentation. IEEE Transactions on Cybernetics, 53 (11):6776-6787, November 2023. ISSN 2168-2275. doi: 10.1109/TCYB.2022.3195447. +Perin, A. and Deny, S. On the ability of deep networks to learn symmetries from data: A neural kernel theory. arXiv, December 2024. ISSN 2331-8422. URL https://arxiv.org/abs/2412.11521. +Perraudin, N., Defferrard, M., Kacprzak, T., and Sgier, R. DeepSphere: Efficient spherical Convolutional Neural Network with HEALPix sampling for cosmological applications. *Astronomy and Computing*, 27:130–146, April 2019. ISSN 2213-1337. doi: 10.1016/j.ascom.2019.03.004. +Price, M. A. and McEwen, J. D. Differentiable and accelerated spherical harmonic and wigner transforms. Journal of Computational Physics, 510:113109, 2024. doi: 10.1016/j.jcp.2024.113109. +Ramakrishnan, R., Dral, P. O., Rupp, M., and von Lilienfeld, O. A. Quantum chemistry structures and properties of 134 kilo molecules. *Scientific Data*, 1, 2014. +Schütt, K., Unke, O., and Gastegger, M. Equivariant Message Passing for the Prediction of Tensorial Properties and Molecular Spectra. In Proceedings of the 38th International Conference on Machine Learning, volume 139, pp. 9377-9388. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/s.chutt21a.html. +Tsai, C.-P., Yeh, C.-K., and Ravikumar, P. Sample Based Explanations via Generalized Representatives. In Advances in Neural Information Processing Systems, volume 36, pp. 23485-23498. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/49cf35ff2298c10452db99d08036805b-Paper-Conference.pdf. +Unke, O., Bogojeski, M., Gastegger, M., Geiger, M., Smidt, T., and Müller, K.-R. SE(3)-equivariant prediction of molecular wavefunctions and electronic densities. In Advances in Neural Information Processing Systems, volume 34, pp. 14434-14447. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/78f1893678afbeaa90b1fa01b9cfb860-Paper.pdf. +Wang, R., Walters, R., and Yu, R. Data augmentation vs. equivariant networks: A theory of generalization on dynamics forecasting. arXiv, June 2022a. ISSN 2331-8422. URL https://arxiv.org/abs/2206.09450. + +Wang, S., Yu, X., and Perdikaris, P. When and why PINNs fail to train: A neural tangent kernel perspective. Journal of Computational Physics, 449:110768, January 2022b. ISSN 0021-9991. doi: 10.1016/j.jcp.2021.110768. +Wang, Y., Elhag, A. A., Jaitly, N., Susskind, J. M., and Bautista, M. Å. Swallowing the Bitter Pill: Simplified Scalable Conformer Generation. In Proceedings of the 41st International Conference on Machine Learning, volume 235, pp. 50400-50418. PMLR, 21-27 Jul 2024. URL https://proceedings.mlr.press/v235/wang24q.html. +Weiler, M. and Cesa, G. General $E(2)$ -Equivariant Steerable CNNs. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/45d6637b718d0f24a237069fe41b0db4-Paper.pdf. +Weiler, M., Hamprecht, F. A., and Storath, M. Learning Steerable Filters for Rotation Equivariant CNNs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 849-858, 2018. +Weiler, M., Forre, P., Verlinde, E., and Welling, M. Equivariant and Coordinate Independent Convolutional Networks. 2023. URL https://maurice-weiler.gitlab.io/cnn_book/EquivariantAndCoordinateIndependentCNNs.pdf. +Winkels, M. and Cohen, T. S. Pulmonary nodule detection in CT scans with equivariant CNNs. Medical Image Analysis, 55:15-26, July 2019. ISSN 1361-8415. doi: 10.1016/j.media.2019.03.010. +Xiao, L., Bahri, Y., Sohl-Dickstein, J., Schoenholz, S., and Pennington, J. Dynamical Isometry and a Mean Field Theory of CNNs: How to Train 10,000-Layer Vanilla Convolutional Neural Networks. In Proceedings of the 35th International Conference on Machine Learning, volume 80, pp. 5393-5402. PMLR, 10-15 Jul 2018. URL https://proceedings.mlr.press/v80/xia018a.html. +Yaida, S. Non-Gaussian processes and neural networks at finite widths. In Proceedings of The First Mathematical and Scientific Machine Learning Conference, volume 107, pp. 165-192. PMLR, 20-24 Jul 2020. URL https://proceedings.mlr.press/v107/yaida20a.html. +Yang, G. Scaling Limits of Wide Neural Networks with Weight Sharing: Gaussian Process Behavior, Gradient Independence, and Neural Tangent Kernel Derivation. arXiv, April 2020. ISSN 2331-8422. URL https://arxiv.org/abs/1902.04760. + +Yang, G. and Hu, E. J. Tensor programs IV: Feature learning in infinite-width neural networks. In Proceedings of the 38th International Conference on Machine Learning, volume 139, pp. 11727-11737. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/yang21c.html. +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. In Advances in Neural Information Processing Systems, volume 34, pp. 17084-17097. Curran Associates, Inc., 2021. +Yang, H. and Wang, Z. On the Neural Tangent Kernel Analysis of Randomly Pruned Neural Networks. In Proceedings of The 26th International Conference on Artificial Intelligence and Statistics, pp. 1513-1553. PMLR, April 2023. + +# A. Basics of Neural Tangent Kernel Theory + +A neural network $\mathcal{N}:\mathbb{R}^{n_{\mathrm{in}}}\to \mathbb{R}^{n_{\mathrm{out}}}$ which is trained using continuous gradient descent + +$$ +\frac {\mathrm {d} \theta}{\mathrm {d} t} = - \eta \frac {\partial \mathcal {L}}{\partial \theta} \tag {43} +$$ + +on a loss function $\mathcal{L}$ with learning rate $\eta$ evolves according to + +$$ +\frac {\mathrm {d} \mathcal {N} (x)}{\mathrm {d} t} = - \eta \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta_ {t} \left(x, x _ {i}\right) \frac {\partial \mathcal {L}}{\partial \mathcal {N} \left(x _ {i}\right)}, \tag {44} +$$ + +where the sum runs over the training samples $x_{i}$ and $\Theta_t \in \mathbb{R}^{n_{\mathrm{out}} \times n_{\mathrm{out}}}$ is the NTK + +$$ +\Theta_ {t} \left(x, x ^ {\prime}\right) = \frac {\partial \mathcal {N} (x)}{\partial \theta} \left(\frac {\partial \mathcal {N} \left(x ^ {\prime}\right)}{\partial \theta}\right) ^ {\top}. \tag {45} +$$ + +For finite-width networks, $\Theta_t$ depends on the initialization and the training time and is referred to as the empirical NTK. At infinite width, $\Theta_t$ becomes independent of the initialization (it still depends on the initialization distribution) since it approaches its expectation value over initializations + +$$ +\Theta \left(x, x ^ {\prime}\right) = \mathbb {E} _ {\theta \sim p _ {\text {i n i t}}} \left[ \frac {\partial \mathcal {N} (x)}{\partial \theta} \left(\frac {\partial \mathcal {N} \left(x ^ {\prime}\right)}{\partial \theta}\right) ^ {\top} \right]. \tag {46} +$$ + +It furthermore becomes constant throughout training and proportional to the unit matrix (Jacot et al., 2018) in the NTK parametrization. For this reason, we drop the $t$ -subscript on this frozen NTK and treat it as a scalar. In the following, we will always mean (46) when we refer to the NTK unless otherwise stated. The NTK parametrization of a linear layer has an additional $1 / \sqrt{n_{\mathrm{fan in}}}$ prefactor and uses independent standard Gaussians as initialization distributions. Hence, an MLP layer is given by + +$$ +\mathcal {N} ^ {(\ell)} (x) = \sigma \left(\mathcal {N} ^ {(\ell - 1)} (x)\right) = \sigma \left(\frac {1}{\sqrt {n _ {\text {f a n i n}}}} W \mathcal {N} ^ {(\ell - 2)} (x) + b\right), \tag {47} +$$ + +with nonlinearity $\sigma$ , weights $W$ and bias $b$ . + +# B. Proofs: Kernel Recursions for GCNN-Layers + +In this section, we provide proofs for the theorems given in Section 4.1 in the main text. + +Theorem 4.1 (Kernel recursions for group convolutional layers). The layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (4) are given by + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} h K _ {g h, g ^ {\prime} h} ^ {(\ell)} (f, f ^ {\prime}) \tag {11} +$$ + +$$ +\Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) + \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} h \Theta_ {g h, g ^ {\prime} h} ^ {(\ell)} (f, f ^ {\prime}). \tag {12} +$$ + +Proof. We first compute the NNGP recursion relation. For group-convolution layers, the definition (3) of the NNGP reads + +$$ +\begin{array}{l} K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g) \left[ \mathcal {N} ^ {(\ell + 1)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime}\right) \right] (48) \\ = \frac {1}{S _ {\kappa}} \int_ {G} \mathrm {d} h \mathrm {d} h ^ {\prime} \mathbb {E} \left[ \kappa^ {(\ell + 1)} (g ^ {- 1} h) \kappa^ {(\ell + 1)} (g ^ {\prime - 1} h ^ {\prime}) \right] \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (h) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] (h ^ {\prime}) \right], (49) \\ \end{array} +$$ + +where we have again dropped the $1 / \sqrt{n_{\ell}}$ -prefactors and channel dependencies since these converge to the expectation value in the infinite width limit. Next, we shift the integration variables by $g$ and $g^{\prime}$ which leaves the Haar measure invariant by its definition + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{S _ {\kappa}} \int_ {G} \mathrm {d} h \mathrm {d} h ^ {\prime} \mathbb {E} \left[ \kappa^ {(\ell + 1)} (h) \kappa^ {(\ell + 1)} \left(h ^ {\prime}\right) \right] \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g h) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime} h ^ {\prime}\right) \right]. \tag {50} +$$ + +Since the kernel components are sampled independently from standard Gaussians at initialization, we only obtain a contribution to the integral when $h = h'$ and $\kappa^{(\ell + 1)}$ has support at this point, i.e. + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} h \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g h) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime} h\right) \right]. \tag {51} +$$ + +Comparing to (3) shows that the right-hand side is just the NNGP $K^{(\ell)}(f, f')$ of the previous layer evaluated at group indices $gh$ and $g'h$ . This proves the NNGP recursion relation stated in the theorem. + +For the NTK recursion relation, we start by specializing the general expression (2) to group-convolution layers and adapting it to the functional framework used for feature maps + +$$ +\begin{array}{l} \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) \\ = \int_ {S _ {\kappa}} \mathrm {d} h \mathbb {E} \left[ \frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \kappa^ {(\ell + 1)} (h)} \frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime}\right)}{\delta \kappa^ {(\ell + 1)} (h)} \right] \\ + \int_ {G} \mathrm {d} \tilde {g} \mathrm {d} \tilde {g} ^ {\prime} \mathbb {E} \left[ \frac {\delta [ \mathcal {N} ^ {(\ell + 1)} (f) ] (g)}{\delta [ \mathcal {N} ^ {(\ell)} (f) ] (\tilde {g})} \underbrace {\left(\sum_ {\ell^ {\prime} = 1} ^ {\ell} \int_ {S _ {\kappa}} \mathrm {d} \tilde {h} \frac {\delta [ \mathcal {N} ^ {(\ell)} (f) ] (\tilde {g})}{\delta \kappa^ {(\ell^ {\prime})} (\tilde {h})} \frac {\delta \mathcal {N} ^ {(\ell)} (\tilde {g} ^ {\prime})}{\delta \kappa^ {(\ell^ {\prime})} (\tilde {h})}\right)} _ {\Theta_ {\tilde {g}, \tilde {g} ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime})} \frac {\delta [ \mathcal {N} ^ {(\ell + 1)} (f ^ {\prime}) ] (g ^ {\prime})}{\delta [ \mathcal {N} ^ {(\ell)} (f ^ {\prime}) ] (\tilde {g} ^ {\prime})} \right] \tag {52} \\ \end{array} +$$ + +According to the layer definition (4), the derivatives evaluate to + +$$ +\frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \kappa^ {(\ell + 1)} (h)} = \frac {1}{\sqrt {n _ {\ell} S _ {\kappa}}} \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g h) \tag {53} +$$ + +$$ +\frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\tilde {g})} = \frac {1}{\sqrt {n _ {\ell} S _ {\kappa}}} \kappa^ {(\ell + 1)} \left(g ^ {- 1} \tilde {g}\right). \tag {54} +$$ + +Therefore, (52) becomes + +$$ +\begin{array}{l} \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} h \mathbb {E} \left[ [ \mathcal {N} ^ {(\ell)} (f) ] (g h) [ \mathcal {N} ^ {(\ell)} (f ^ {\prime}) ] (g ^ {\prime} h) \right] \\ + \frac {1}{S _ {\kappa}} \int_ {G} \mathrm {d} \tilde {g} \mathrm {d} \tilde {g} ^ {\prime} \Theta_ {\tilde {g}, \tilde {g} ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \mathbb {E} \left[ \kappa^ {(\ell + 1)} \left(g ^ {- 1} \tilde {g}\right) \kappa^ {(\ell + 1)} \left(g ^ {\prime - 1} \tilde {g} ^ {\prime}\right) \right] (55) \\ = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) + \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} h \Theta_ {g h, g ^ {\prime} h} ^ {(\ell)} \left(f, f ^ {\prime}\right), (56) \\ \end{array} +$$ + +where we have dropped the channel-prefactors as usual. The last line is just the NTK recursion to be proven. + +Theorem 4.2 (Kernel recursions for the lifting layer). The layer-wise recursive relations for the NNGP and NTK of the lifting layer (6) are given by2 + +$$ +K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} x K _ {\rho (g) x, \rho \left(g ^ {\prime}\right) x} ^ {(\ell)} (f, f ^ {\prime}), \tag {16} +$$ + +$$ +\begin{array}{l} \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} x \Theta_ {\rho (g) x, \rho (g ^ {\prime}) x} ^ {(\ell)} (f, f ^ {\prime}) \\ + K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right), \tag {17} \\ \end{array} +$$ + +where the regular representation $\rho_{\mathrm{reg}}$ is defined in (5). + +Proof. The NNGP of the lifting layer (6) is given by + +$$ +\begin{array}{l} K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g) \left[ \mathcal {N} ^ {(\ell + 1)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime}\right) \right] (57) \\ = \frac {1}{S _ {\kappa}} \int_ {X} \mathrm {d} x \mathrm {d} x ^ {\prime} \mathbb {E} \left[ \kappa \left(\rho \left(g ^ {- 1}\right) x\right) \kappa \left(\rho \left(g ^ {\prime - 1}\right) x ^ {\prime}\right) \right] \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (x) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] \left(x ^ {\prime}\right) \right] (58) \\ = \frac {1}{S _ {\kappa}} \int_ {X} \mathrm {d} x \mathrm {d} x ^ {\prime} \mathbb {E} [ \kappa (x) \kappa \left(x ^ {\prime}\right) ] \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\rho (g) x) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] (\rho \left(g ^ {\prime}\right) x ^ {\prime}) \right] (59) \\ = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} x \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\rho (g) x) \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] (\rho \left(g ^ {\prime}\right) x) \right] (60) \\ = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} x K _ {\rho (g) x, \rho \left(g ^ {\prime}\right) x} ^ {(\ell)} \left(f, f ^ {\prime}\right), (61) \\ \end{array} +$$ + +where we have moved the regular representation through $\mathcal{N}^{(\ell)}$ onto $f$ by using equivariance. This proves the NNGP recursion-relation. + +According to (2), the NTK recursion evaluates to + +$$ +\begin{array}{l} \Theta_ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \int_ {S _ {\kappa}} \mathrm {d} x \mathbb {E} \left[ \frac {\delta [ \mathcal {N} ^ {(\ell + 1)} (f) ] (g)}{\delta \kappa^ {(\ell + 1)} (x)} \frac {\delta [ \mathcal {N} ^ {(\ell + 1)} (f ^ {\prime}) ] (g ^ {\prime})}{\delta \kappa^ {(\ell + 1)} (x)} \right] \\ + \int_ {X} \mathrm {d} \tilde {x} \mathrm {d} \tilde {x} ^ {\prime} \mathbb {E} \left[ \frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\tilde {x})} \Theta_ {\tilde {x}, \tilde {x} ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} \left(f ^ {\prime}\right) \right] \left(g ^ {\prime}\right)}{\delta \left[ \mathcal {N} ^ {(\ell)} \left(f ^ {\prime}\right) \right] (\tilde {x} ^ {\prime})} \right]. \tag {62} \\ \end{array} +$$ + +The derivatives in this expression are given by + +$$ +\frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \kappa^ {(\ell + 1)} (x)} = \frac {1}{\sqrt {n _ {\ell} S _ {\kappa}}} \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\rho (g) x) \tag {63} +$$ + +$$ +\frac {\delta \left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] (g)}{\delta \left[ \mathcal {N} ^ {(\ell)} (f) \right] (\tilde {x})} = \frac {1}{\sqrt {n _ {\ell} S _ {\kappa}}} \kappa^ {(\ell + 1)} \left(\rho \left(g ^ {- 1}\right) \tilde {x}\right). \tag {64} +$$ + +Plugging this back into (62) yields the desired NTK recursion relation, + +$$ +\begin{array}{l} \Theta_ {\tilde {x}, \tilde {x} ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} x \mathbb {E} \left[ [ \mathcal {N} ^ {(\ell)} (f) ] (\rho (g) x) [ \mathcal {N} ^ {(\ell)} (f ^ {\prime}) ] (\rho (g ^ {\prime}) x) \right] \\ + \frac {1}{S _ {\kappa}} \int_ {X} \mathrm {d} \tilde {x} \mathrm {d} \tilde {x} ^ {\prime} \Theta_ {\bar {x}, \bar {x} ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \mathbb {E} \left[ \kappa^ {(\ell + 1)} (\rho (g ^ {- 1}) \tilde {x}) \kappa^ {(\ell + 1)} (\rho (g ^ {\prime - 1}) \tilde {x} ^ {\prime}) \right] (65) \\ = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) + \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} x \Theta_ {\rho (g) x, \rho \left(g ^ {\prime}\right) x ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right). (66) \\ \end{array} +$$ + +Theorem 4.3 (Kernel recursions for group pooling layer). The layer-wise recursive relations for the NNGP and NTK of the group pooling layer (10) are given by + +$$ +K ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} K _ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \tag {18} +$$ + +$$ +\Theta^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \Theta_ {g, g ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right). \tag {19} +$$ + +Proof. Since we integrate over the entire domain of the input feature maps $\mathcal{N}^{(\ell)}(f):G\to \mathbb{R}^{n_{\ell}}$ in the pooling layer (10), are the output features $\mathcal{N}^{(\ell)}(f)\in \mathbb{R}^{n_{\ell +1}}$ a channel-vector. Therefore, the NNGP of the group pooling layer is given by + +$$ +\begin{array}{l} K ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} \left[ \mathcal {N} ^ {(\ell + 1)} (f) \mathcal {N} ^ {(\ell + 1)} \left(f ^ {\prime}\right) \right] (67) \\ = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \mathbb {E} \left[ \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g) \left[ \mathcal {N} ^ {(\ell)} (f) \right] (g ^ {\prime}) \right] (68) \\ = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} K _ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}). (69) \\ \end{array} +$$ + +The NTK recursion (2) is in this case + +$$ +\begin{array}{l} \Theta^ {(\ell + 1)} (f, f ^ {\prime}) = \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \mathbb {E} \left[ \frac {\delta \mathcal {N} ^ {(\ell + 1)} (f)}{\delta [ \mathcal {N} ^ {(\ell)} (f) ] (g)} \Theta_ {g, g ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \frac {\delta \mathcal {N} ^ {(\ell + 1)} (f ^ {\prime})}{\delta [ \mathcal {N} ^ {(\ell)} (f ^ {\prime}) ] (g ^ {\prime})} \right] (70) \\ = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \Theta_ {g, g ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right), (71) \\ \end{array} +$$ + +which is the NTK-relation to be shown. + +![](images/deb0a6e79c4273150e26df798a797172ae60e70202a941f9ca78b26618012b9d.jpg) + +# C. Equivariant Kernels for Roto-Translations in the Plane + +In this appendix, we provide explicit expressions for the kernel recursions of lifting-, group convolutional- and group pooling layers for the special case of roto-translations in the plane, i.e. for the symmetry group $G = C_n \ltimes \mathbb{R}^2$ . In this case, the general expressions in Theorems 4.1, 4.2 and 4.3 simplify and can be written in terms of the $\mathcal{A}$ operator (30) which can be computed efficiently in terms of ordinary 2d convolutions. However, before discussing the kernel recursions, we will first establish a simplifying notation for the GCNN layer-definitions. + +# C.1. GCNNs for $G = C_{n} \ltimes \mathbb{R}^{2}$ + +Due to the semidirect-product structure of $G$ , any element $g \in G$ can be written uniquely as a product of a translation and a rotation, $g = tr$ with $t \in \mathbb{R}^2$ and $r \in C_n^3$ . We can therefore write a feature map $\mathcal{N}^{(\ell)}$ on $G$ as a stack of $n$ feature maps on $\mathbb{R}^2$ , + +$$ +\mathcal {N} ^ {(\ell)} (g = t r) = \mathcal {N} _ {r} ^ {(\ell)} (t). \tag {72} +$$ + +Using this representation, the lifting- and group convolutional layers can be written in terms of ordinary two-dimensional convolutions as (Cohen & Welling, 2016) + +$$ +\left[ \mathcal {N} ^ {(1)} (f) \right] _ {r} (t) = \frac {1}{\sqrt {n _ {\mathrm {i n}} \left| S _ {\kappa} \right|}} \int_ {\mathbb {R} ^ {2}} \mathrm {d} x \kappa \left(\rho \left(r ^ {- 1}\right) (x - t)\right) f (x) \tag {73} +$$ + +$$ +\left[ \mathcal {N} ^ {(\ell + 1)} (f) \right] _ {r} (t) = \frac {1}{\sqrt {n _ {\ell} | S _ {\kappa} |}} \sum_ {r ^ {\prime} \in C _ {n}} \int_ {\mathbb {R} ^ {2}} d t ^ {\prime} \kappa_ {r ^ {- 1} r ^ {\prime}} \left(\rho \left(r ^ {- 1}\right) \left(t ^ {\prime} - t\right)\right) \left[ \mathcal {N} ^ {(\ell)} (f) \right] _ {r ^ {\prime}} \left(t ^ {\prime}\right), \quad \ell \geq 1, \tag {74} +$$ + +where $\rho$ is the fundamental representation of $\mathrm{SO}(2)$ on $\mathbb{R}^2$ , given by two-dimensional rotation matrices. + +Finally, for invariant problems like classification, the group pooling layer (10) is central to making the network invariant. For $C_n \times \mathbb{R}^2$ , it is given by + +$$ +[ \mathcal {N} ^ {(\ell + 1)} (f) ] = \frac {1}{\sqrt {n \left| \operatorname {s u p p} (\mathcal {N} ^ {(\ell)} (f)) \right|}} \sum_ {r \in C _ {n}} \int \mathrm {d} x [ \mathcal {N} ^ {(\ell)} (f) ] _ {r} (x). \tag {75} +$$ + +# C.2. Kernel recursions for $G = C_{n} \ltimes \mathbb{R}^{2}$ + +In analogy to the notation introduced in the previous section for feature maps, we write for the NNGP and NTK on $C_n \ltimes \mathbb{R}^2$ + +$$ +K _ {g = t r, g ^ {\prime} = t ^ {\prime} r ^ {\prime}} (f, f ^ {\prime}) = \left[ K _ {r r} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right), \quad \Theta_ {g = t r, g ^ {\prime} = t ^ {\prime} r ^ {\prime}} \left(f, f ^ {\prime}\right) = \left[ \Theta_ {r r ^ {\prime}} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) \tag {76} +$$ + +to emphasize the dependency on the two translations $t, t' \in \mathbb{R}^2$ . Furthermore, we repeat here the definition of the operator (30) for convenience + +$$ +\left[ \mathcal {A} _ {S _ {\kappa}} (K) \right] \left(t, t ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} \right|} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} K \left(t + \tilde {t}, t ^ {\prime} + \tilde {t}\right), \tag {77} +$$ + +Given these definitions, the recursive relations from Theorem 4.1 for group convolutions can be computed efficiently using the following + +Lemma C.1 (Kernel recursions of group convolutional layers for roto-translations). In the case $G = C_n \ltimes \mathbb{R}^2$ , the layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (74) are given by + +$$ +[ K _ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) ] \left(t, t ^ {\prime}\right) = \sum_ {\tilde {r} \in C _ {n}} \left[ \mathcal {A} _ {\rho (r) S _ {\kappa}} \left(\tilde {K} _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right)\right) \right] \left(t, \rho \left(r r ^ {\prime - 1}\right) t ^ {\prime}\right) \tag {78} +$$ + +$$ +[ \Theta_ {r r ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) ] (t, t ^ {\prime}) = [ K _ {r r ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) ] (t, t ^ {\prime}) + \sum_ {\tilde {r} \in C _ {n}} [ \mathcal {A} _ {\rho (r) S _ {\kappa}} (\tilde {\Theta} _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} (f, f ^ {\prime})) ] (t, \rho (r r ^ {\prime - 1}) t ^ {\prime}), \tag {79} +$$ + +where + +$$ +\left[ \tilde {K} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \left[ K _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, \rho \left(r ^ {\prime} r ^ {- 1}\right) t ^ {\prime}\right) \tag {80} +$$ + +$$ +\tilde {\Theta} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) = \left[ \Theta_ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, \rho \left(r ^ {\prime} r ^ {- 1}\right) t ^ {\prime}\right). \tag {81} +$$ + +Proof. In order to compute the NNGP recursion relation in the notation (76), we first need to compute the unique decomposition of a general group multiplication $gh$ , $g, h \in G$ into a rotation and a translation. This is possible since $G$ is a semidirect product group. Starting from $g = t_{g}r_{g}$ and $h = t_{h}r_{h}$ with $t_{g}, t_{h} \in \mathbb{R}^{2}$ and $r_{g}, r_{h} \in C_{n}$ , we have + +$$ +g h = t _ {g} r _ {g} t _ {h} r _ {h} = t _ {g} r _ {g} t _ {h} r _ {g} ^ {- 1} r _ {g} r _ {h}. \tag {82} +$$ + +Since $\mathbb{R}^2$ is a normal subgroup of $G$ (a further property implied by the semidirect product), $r_g t_h r_g^{-1} \in \mathbb{R}^2$ . Therefore, + +$$ +t _ {g h} = t _ {g} r _ {g} t _ {h} r _ {g} ^ {- 1} \in \mathbb {R} ^ {2} \quad \text {a n d} \quad r _ {g h} = r _ {g} r _ {h} \in C _ {n}. \tag {83} +$$ + +Since the action of $t_{gh}$ on a vector $x\in \mathbb{R}^2$ is given by + +$$ +\rho \left(t _ {g h}\right) x = x + \rho \left(r _ {g} ^ {- 1}\right) t _ {h} + t _ {g}, \tag {84} +$$ + +we obtain for the NNGP recursion from Theorem 4.1, + +$$ +[ K _ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) ] \left(t, t ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} \right|} \sum_ {\tilde {r} \in C _ {4}} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} \left[ K _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(\rho \left(r ^ {- 1}\right) \tilde {t} + t, \rho \left(r ^ {\prime - 1}\right) \tilde {t} + t ^ {\prime}\right). \tag {85} +$$ + +This we will now write in terms of the $\mathcal{A}$ -operator (77). However, since the $\mathcal{A}$ -operator shifts both slots of the argument kernel by $y$ , whereas the first argument in (85) is shifted by $\rho(r^{-1})\tilde{t}$ , while the second argument is shifted by $\rho(r'^{-1})\tilde{t}$ , we cannot write (85) directly in terms of $\mathcal{A}(K)$ , but need to compute $\mathcal{A}$ at a transformed argument instead and then transform back. To this end, first consider + +$$ +\begin{array}{l} [ \mathcal {A} _ {S _ {\kappa}} (\tilde {K} _ {r r ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime})) ] (t, t ^ {\prime}) = \frac {1}{| S _ {\kappa} |} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} [ \tilde {K} _ {r r ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) ] (t + \tilde {t}, t ^ {\prime} + \tilde {t}) (86) \\ = \frac {1}{\left| S _ {\kappa} \right|} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} \left[ K _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t + \tilde {t}, \rho \left(r ^ {\prime} r ^ {- 1}\right) \left(t ^ {\prime} + \tilde {t}\right)\right). (87) \\ \end{array} +$$ + +Therefore, we obtain for the RHS of the NNGP recursion + +$$ +\begin{array}{l} \sum_ {\tilde {r} \in C _ {n}} \left[ \mathcal {A} _ {\rho (r) S _ {\kappa}} \left(\tilde {K} _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right)\right) \right] \left(t, \rho \left(r r ^ {\prime - 1}\right) t ^ {\prime}\right) \\ = \frac {1}{\left| S _ {\kappa} \right|} \sum_ {\tilde {r} \in C _ {n}} \int_ {\rho (r) S _ {\kappa}} \mathrm {d} \tilde {t} \left[ K _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t + \tilde {t}, \rho \left(r ^ {\prime} r ^ {- 1}\right) \left(\rho \left(r r ^ {\prime - 1}\right) t ^ {\prime} + \tilde {t}\right)\right) (88) \\ = \frac {1}{\left| S _ {\kappa} \right|} \sum_ {\tilde {r} \in C _ {n}} \int_ {\rho (r) S _ {\kappa}} \mathrm {d} \tilde {t} \left[ K _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t + \tilde {t}, t ^ {\prime} + \rho \left(r ^ {\prime} r ^ {- 1}\right) \tilde {t}\right) (89) \\ = \frac {1}{\left| S _ {\kappa} \right|} \sum_ {\tilde {r} \in C _ {n}} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} \left[ K _ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t + \rho (r) \tilde {t}, t ^ {\prime} + \rho \left(r ^ {\prime}\right) \tilde {t}\right) (90) \\ \end{array} +$$ + +The last line is just (85), proving the NNGP recursion relation. + +For the NTK, we start from the NTK-recursion in Theorem 4.1. The structure of the integral appearing in that recursion is the same as the one of the integral in the NNGP recursion. Therefore, the NTK recursion is given by + +$$ +\begin{array}{l} [ \Theta_ {r r ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) ] (t, t ^ {\prime}) = [ K _ {r r ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) ] (t, t ^ {\prime}) \\ + \frac {1}{S _ {\kappa}} \sum_ {\tilde {r} \in C _ {4}} \int_ {S _ {\kappa}} \mathrm {d} \tilde {t} \left[ \Theta_ {r \tilde {r}, r ^ {\prime} \tilde {r}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(\rho \left(r ^ {- 1}\right) \tilde {t} + t, \rho \left(r ^ {\prime - 1}\right) \tilde {t} + t ^ {\prime}\right). \tag {91} \\ \end{array} +$$ + +The integral can be written in terms of the $\mathcal{A}$ -operator following the same steps as for the NNGP above. + +Therefore, by first computing the kernels $\tilde{K}^{(\ell)}$ and $\tilde{\Theta}^{(\ell)}$ and then applying the $\mathcal{A}$ -operator, it is possible to efficiently compute the kernel- recursions in this case. Similarly, the recursive kernel-relations for the lifting layer can also be written efficiently in terms of the $\mathcal{A}$ -operator, as detailed in + +Lemma C.2 (Kernel recursions of lifting layers for roto-translations). The layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (73) are given by + +$$ +\left[ K _ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \left[ \mathcal {A} _ {\rho (r) S _ {\kappa}} \left(\tilde {K} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right)\right) \right] \left(t, \rho \left(r r ^ {\prime - 1}\right) t ^ {\prime}\right) \tag {92} +$$ + +$$ +\left[ \Theta_ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \left[ K _ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) + \left[ \mathcal {A} _ {\rho (r) S _ {\kappa}} \left(\tilde {\Theta} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right)\right) \right] \left(t, \rho \left(r r ^ {\prime - 1}\right) t ^ {\prime}\right), \tag {93} +$$ + +where + +$$ +\left[ \tilde {K} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \left[ K ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, \rho \left(r ^ {\prime} r ^ {- 1}\right) t ^ {\prime}\right) \tag {94} +$$ + +$$ +\left[ \tilde {\Theta} _ {r r ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \left[ \Theta^ {(\ell)} \left(f, f ^ {\prime}\right) \right] \left(t, \rho \left(r ^ {\prime} r ^ {- 1}\right) t ^ {\prime}\right). \tag {95} +$$ + +Proof. According to Theorem 4.2, the NNGP recursion is given by + +$$ +\left[ K _ {r r ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \right] \left(t, t ^ {\prime}\right) = \frac {1}{S _ {\kappa}} \int_ {S _ {\kappa}} \mathrm {d} x K ^ {(\ell)} \left(\rho (r) x + t, \rho \left(r ^ {\prime}\right) x + t ^ {\prime}\right). \tag {96} +$$ + +Comparing this expression to (85) shows that the sum over $\tilde{r}$ as well as the $r, r'$ -indices on $K^{(\ell)}$ are absent in (96) but otherwise the two expressions agree. Therefore, we can use the same argument as above to rewrite (96) in terms of the $\mathcal{A}$ -operator and only need to drop the $r, r'$ -indices in the definition of $\tilde{K}^{(\ell)}$ as well as pick the $\tilde{r} = e$ contribution in the sum. Similarly, we can show the NTK recursion relation starting from the NTK-recursion in Theorem 4.2. + +Finally, in the group pooling layer, the kernels are trivialized over their $r$ - and $t$ -indices, resulting in a kernel without spatial indices: + +Lemma C.3 (Kernel recursions of group pooling layers for roto-translations). The layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (75) are given by + +$$ +K ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{n \left| \operatorname {s u p p} \left(\mathcal {N} ^ {(\ell)} (f)\right) \right|} \sum_ {r, r ^ {\prime} \in C _ {n}} \int \mathrm {d} t \mathrm {d} t ^ {\prime} \left[ K _ {r r ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \right] (t, t ^ {\prime}) \tag {97} +$$ + +$$ +\Theta^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{n \left| \operatorname {s u p p} \left(\mathcal {N} ^ {(\ell)} (f)\right) \right|} \sum_ {r, r ^ {\prime} \in C _ {n}} \int \mathrm {d} t \mathrm {d} t ^ {\prime} \left[ \Theta_ {r r ^ {\prime}} ^ {(\ell)} (f, f ^ {\prime}) \right] (t, t ^ {\prime}). \tag {98} +$$ + +Proof. The integral over two copies of the group in Theorem 4.3 factorize for $G = C_n \ltimes \mathbb{R}^2$ into integrals over the translations in $\mathbb{R}^2$ and sums over the discrete rotations in $C_n$ . This immediately implies the recursions in the statement of the lemma. + +The expressions given in the lemmata in this section can be straightforwardly implemented and therefore allow for explicit calculations of the NTK and NNGP of realistically-sized GCNNs. + +# D. Equivariant NTK in the Fourier Domain for 3d Rotations + +# D.1. Group Convolutions in the Fourier Domain for $G = \mathrm{SO}(3)$ + +For compact groups, it is possible to define a Fourier transformation. The group convolution (4) then becomes a point-wise product in the Fourier domain. For the case of $G = \mathrm{SO}(3)$ , the Fourier transformation is given in terms of Wigner matrices $\mathcal{D}_{mn}^{l}$ , + +$$ +f (R) = \sum_ {l = 0} ^ {\infty} \frac {2 l + 1}{8 \pi^ {2}} \sum_ {m, n = - l} ^ {l} \hat {f} _ {m n} ^ {l} \overline {{\mathcal {D} _ {m n} ^ {l} (R)}} \tag {99} +$$ + +$$ +\hat {f} _ {m n} ^ {l} = \int_ {\mathrm {S O} (3)} \mathrm {d} R f (R) \mathcal {D} _ {m n} ^ {l} (R), \tag {100} +$$ + +where $R \in \mathrm{SO}(3)$ is a rotation matrix. Note that the presented convention corresponds to the one in the s2fft package (Price & McEwen, 2024). + +The rotations act naturally on the sphere $S^2$ on which the Fourier transform is given in terms of spherical harmonics $Y_{m}^{l}$ , + +$$ +f (x) = \sum_ {l = 0} ^ {\infty} \sum_ {m = - l} ^ {l} \hat {f} _ {m} ^ {l} Y _ {m} ^ {l} (x) \tag {101} +$$ + +$$ +\hat {f} _ {m} ^ {l} = \int_ {S ^ {2}} \mathrm {d} x f (x) \overline {{Y _ {m} ^ {l} (x)}}. \tag {102} +$$ + +These Fourier transformations are e.g. used in spherical CNNs (Cohen et al., 2018) and steerable convolutional networks (Weiler et al., 2018), which define equivariant group convolution layers with respect to $\mathrm{SO}(3)$ and act on input features defined on the sphere $S^2$ . The change to the Fourier space is motivated by the fact that group convolutions reduce to simple multiplications of the corresponding Fourier components. For $\mathrm{SO}(3)$ , the group convolutions (4) for filter support $S_{\kappa} \subseteq \mathrm{SO}(3)$ are defined as + +$$ +[ \mathcal {N} ^ {(\ell + 1)} (f) ] (R) = \frac {1}{\sqrt {n _ {\ell} | S _ {\kappa} |}} \int_ {S _ {\kappa}} \mathrm {d} S \kappa \left(R ^ {- 1} S\right) [ \mathcal {N} ^ {(\ell)} (f) ] (S). \tag {103} +$$ + +Using + +$$ +\mathcal {D} _ {m n} ^ {l} \left(R ^ {- 1}\right) = \overline {{\mathcal {D} _ {n m} ^ {l} (R)}}, \tag {104} +$$ + +$$ +\overline {{\mathcal {D} _ {m n} ^ {l} (R)}} = (- 1) ^ {m - n} \mathcal {D} _ {- m, - n} ^ {l} (R), \tag {105} +$$ + +$$ +\int_ {\mathrm {S O} (3)} \mathrm {d} R \overline {{\mathcal {D} _ {m n} ^ {l} (R)}} \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} (R) = \frac {8 \pi^ {2}}{2 l + 1} \delta_ {l l ^ {\prime}} \delta_ {n n ^ {\prime}} \delta_ {m m ^ {\prime}}, \tag {106} +$$ + +the Fourier components (100) of the layer in (103) can be written compactly as + +$$ +[ \widehat {\mathcal {N} ^ {(\ell + 1)} (f)} ] _ {m n} ^ {l} = \frac {1}{\sqrt {n _ {\ell} | S _ {\kappa} |}} \sum_ {p = - l} ^ {l} [ \widehat {\mathcal {N} ^ {(\ell)} (f)} ] _ {m p} ^ {l} \overline {{\hat {\kappa} _ {n p} ^ {l}}}. \tag {107} +$$ + +Note that we have assumed a real-valued kernel $\kappa$ . + +Similarly, the lifting layer (6) for features on $S^2$ is + +$$ +\left[ \mathcal {N} ^ {(1)} (f) \right] (R) = \frac {1}{\sqrt {n _ {\mathrm {i n}} \left| S _ {\kappa} \right|}} \int_ {S ^ {2}} \mathrm {d} x \kappa \left(R ^ {- 1} x\right) f (x), \tag {108} +$$ + +which, in terms of the Fourier coefficients (102) becomes + +$$ +\left[ \widehat {\mathcal {N} ^ {(1)} (f)} \right] _ {m n} ^ {l} = \frac {1}{\sqrt {n _ {\mathrm {i n}} \left| S _ {\kappa} \right|}} \frac {8 \pi^ {2}}{2 l + 1} \hat {f} _ {m} ^ {l} \overline {{\hat {\kappa} _ {n} ^ {l}}}. \tag {109} +$$ + +Again, we have assumed a real-valued kernel $\kappa$ and used the relations + +$$ +Y _ {m} ^ {l} (R x) = \sum_ {n = - l} ^ {l} \overline {{\mathcal {D} _ {m n} ^ {l} (R)}} Y _ {n} ^ {l} (x), \tag {110} +$$ + +$$ +\overline {{Y _ {m} ^ {l} (x)}} = (- 1) ^ {m} Y _ {- m} ^ {l} (x), \tag {111} +$$ + +$$ +\int_ {S ^ {2}} \mathrm {d} x \overline {{Y _ {m} ^ {l} (x)}} Y _ {m ^ {\prime}} ^ {l ^ {\prime}} (x) = \delta_ {l l ^ {\prime}} \delta_ {m m ^ {\prime}}. \tag {112} +$$ + +# D.2. Kernel Recursions for $G = \mathrm{SO}(3)$ + +As we have seen in Section D.1 SO(3) group convolutions are frequently computed in the Fourier domain. In this section, we show how also the kernel recursions from Theorems 4.1 and 4.2 for group-convolution layers and lifting layers can be computed in the Fourier domain corresponding to the spherical convolutions presented in Section D.1. In the following we will assume filters $\kappa$ with global support $S_{\kappa} = \mathrm{SO}(3)$ or $S_{\kappa} = S^{2}$ , respectively. The reason is that equations (106) and (112) otherwise have to be replaced by expressions including the Wigner's $3j$ symbols. Due to the current lack of an efficient JAX-based implementation providing their computation, we decided to restrict ourselves to the more efficient case of global filters. + +In terms of the Fourier coefficients defined in (31), the recursive Kernel-relations for the spherical convolution layer (103) are specified in the following + +Lemma D.1 (Kernel recursions of SO(3) group-convolutions in the Fourier domain). The layer-wise recursive relations for the NNGP and NTK of the group convolutional layer (107) for $G = \mathrm{SO}(3)$ and global filters are given by + +$$ +\left[ K ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) \right] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{2 l + 1} \delta_ {l l ^ {\prime}} \delta_ {n, - n ^ {\prime}} \sum_ {p = - l} ^ {l} (- 1) ^ {n - p} \left[ K ^ {\ell} \left(f, f ^ {\prime}\right) \right] _ {m p, m ^ {\prime} (- p)} ^ {l, l ^ {\prime}} \tag {113} +$$ + +$$ +[ \Theta^ {(\ell + 1)} (f, f ^ {\prime}) ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = [ K ^ {(\ell + 1)} (f, f ^ {\prime}) ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} + \frac {1}{2 l + 1} \delta_ {l l ^ {\prime}} \delta_ {n, - n ^ {\prime}} \sum_ {p = - l} ^ {l} (- 1) ^ {n - p} [ \widehat {\Theta^ {\ell} (f , f ^ {\prime})} ] _ {m p, m ^ {\prime} (- p)} ^ {l, l ^ {\prime}}. \tag {114} +$$ + +Proof. We identify elements of $\mathrm{SO}(3)$ with $3 \times 3$ rotation matrices $R, S, \ldots$ . Then, the recursive relations for the group convolution layer from Theorem 4.1 are + +$$ +K _ {R, R ^ {\prime}} ^ {(\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{8 \pi^ {2}} \int_ {\mathrm {S O} (3)} \mathrm {d} S K _ {R S, R ^ {\prime} S} ^ {(\ell)} \left(f, f ^ {\prime}\right) \tag {115} +$$ + +$$ +\Theta_ {R, R ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = K _ {R, R ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) + \frac {1}{8 \pi^ {2}} \int_ {\mathrm {S O} (3)} \mathrm {d} S \Theta_ {R S, R ^ {\prime} S} ^ {(\ell)} (f, f ^ {\prime}). \tag {116} +$$ + +The Fourier coefficients of the NNGP are given by a double Fourier integral of the form (31), so the recursion (115) becomes + +$$ +[ \widehat {K ^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{8 \pi^ {2}} \iiint_ {[ \mathrm {S O} (3) ] ^ {3}} \mathrm {d} S \mathrm {d} R \mathrm {d} R ^ {\prime} K _ {R S, R ^ {\prime} S} ^ {(\ell)} (f, f ^ {\prime}) \mathcal {D} _ {m n} ^ {l} (R) \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} (R ^ {\prime}). \tag {117} +$$ + +Plugging in the Fourier expansion of the kernel $K_{RS,R'S}^{(\ell)}(f,f')$ yields + +$$ +\begin{array}{l} [ \widehat {K ^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{8 \pi^ {2}} \iiint_ {[ \mathrm {S O} (3) ] ^ {3}} \mathrm {d} S \mathrm {d} R \mathrm {d} R ^ {\prime} \left(\sum_ {p, p ^ {\prime} = 0} ^ {\infty} \frac {2 p + 1}{8 \pi^ {2}} \frac {2 p ^ {\prime} + 1}{8 \pi^ {2}}\right). \\ \times \sum_ {q, r = - p} ^ {p} \sum_ {q ^ {\prime}, r ^ {\prime} = - p ^ {\prime}} ^ {p ^ {\prime}} \left[ K ^ {(\ell)} (f, f ^ {\prime}) ] _ {q r, q ^ {\prime} r ^ {\prime}} ^ {p, p ^ {\prime}} \overline {{\mathcal {D} _ {q r} ^ {p} (R S) \mathcal {D} _ {q ^ {\prime} r ^ {\prime}} ^ {p ^ {\prime}} \left(R ^ {\prime} S\right)}}\right) \mathcal {D} _ {m n} ^ {l} (R) \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} \left(R ^ {\prime}\right). \tag {118} \\ \end{array} +$$ + +Using (106), (105) and + +$$ +\mathcal {D} _ {m n} ^ {l} (R S) = \sum_ {p = - l} ^ {l} D _ {m p} ^ {l} (R) \mathcal {D} _ {p n} ^ {l} (S), \tag {119} +$$ + +we can simplify the expression to + +$$ +\begin{array}{l} [ \widehat {K ^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{8 \pi^ {2}} \sum_ {p, p ^ {\prime} = 0} ^ {\infty} \sum_ {q, r = - p} ^ {p} \sum_ {q ^ {\prime}, r ^ {\prime} = - p ^ {\prime}} ^ {p ^ {\prime}} (- 1) ^ {r - u} \frac {8 \pi^ {2}}{2 l + 1} \delta_ {p l} \delta_ {m q} \delta_ {n u} \delta_ {l ^ {\prime} p ^ {\prime}} \delta_ {m ^ {\prime} q ^ {\prime}} \delta_ {n ^ {\prime} u ^ {\prime}} \delta_ {p p ^ {\prime}} \delta_ {u, - u ^ {\prime}} \delta_ {r, - r ^ {\prime}} \\ \times \left[ K ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] _ {q r, q ^ {\prime} r ^ {\prime}} ^ {p, p ^ {\prime}} (120) \\ = \frac {1}{2 l + 1} \delta_ {l l ^ {\prime}} \delta_ {n, - n ^ {\prime}} \sum_ {r = - l} ^ {l} (- 1) ^ {r - n} \left[ K ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] _ {m r, m ^ {\prime} (- r)} ^ {l, l ^ {\prime}}. (121) \\ \end{array} +$$ + +Renaming the summation index $r \to p$ yields the desired result. The computation for the NTK is analogous. + +Similarly, for the lifting layer (108) for features on the sphere, the kernel recursions can be expressed in terms of the Fourier coefficients (102) according to the following + +Lemma D.2 (Kernel recursions of spherical lifting layer in the Fourier domain). The layer-wise recursive relations for the NNGP and NTK of the lifting layer (109) for features on $S^2$ to features on SO(3) with global filters are given by + +$$ +[ K ^ {(\ell + 1)} (f, f ^ {\prime}) ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{4 \pi} \left(\frac {8 \pi^ {2}}{2 l + 1}\right) ^ {2} (- 1) ^ {n} \delta_ {l l ^ {\prime}} \delta_ {n, - n ^ {\prime}} [ K ^ {(\ell)} (f, f ^ {\prime}) ] _ {m, m ^ {\prime}} ^ {l, l} \tag {122} +$$ + +$$ +[ \widehat {\Theta^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = [ K ^ {(\ell + 1)} (f, f ^ {\prime}) ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} + \frac {1}{4 \pi} \left(\frac {8 \pi^ {2}}{2 l + 1}\right) ^ {2} (- 1) ^ {n} \delta_ {l l ^ {\prime}} \delta_ {n, - n ^ {\prime}} [ \widehat {\Theta^ {(\ell)} (f , f ^ {\prime})} ] _ {m, m ^ {\prime}} ^ {l, l}. \tag {123} +$$ + +Proof. Starting from the recursive relations for the lifting layer in Theorem 4.2, the recursions in real space for $G = \mathrm{SO}(3)$ are + +$$ +K _ {R, R ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = \frac {1}{4 \pi} \int_ {S ^ {2}} \mathrm {d} x K _ {R x, R ^ {\prime} x} ^ {(\ell)} (f, f ^ {\prime}) \tag {124} +$$ + +$$ +\Theta_ {R, R ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) = K _ {g, g ^ {\prime}} ^ {(\ell + 1)} (f, f ^ {\prime}) + \frac {1}{4 \pi} \int_ {S ^ {2}} \mathrm {d} x \Theta_ {R x, R ^ {\prime} x} ^ {(\ell)} (f, f ^ {\prime}). \tag {125} +$$ + +Expressing the Fourier coefficients of the NNGP according to (31) gives + +$$ +[ K ^ {(\ell + 1)} (f, f ^ {\prime}) ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{4 \pi} \iint_ {S ^ {2}} d x \iint_ {[ \mathrm {S O} (3) ] ^ {2}} d R d R ^ {\prime} K _ {R x, R ^ {\prime} x} ^ {(\ell)} (f, f ^ {\prime}) \mathcal {D} _ {m n} ^ {l} (R) \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} (R ^ {\prime}). \tag {126} +$$ + +We can now plug in the Fourier expansion of the kernel on $S^2$ + +$$ +K _ {x, x ^ {\prime}} ^ {(\ell)} \left(f, f ^ {\prime}\right) = \sum_ {l, l ^ {\prime} = 0} ^ {\infty} \sum_ {m = - l} ^ {l} \sum_ {m ^ {\prime} = - l ^ {\prime}} ^ {l ^ {\prime}} \left[ \widehat {K ^ {(\ell)} \left(f , f ^ {\prime}\right)} \right] _ {m, m ^ {\prime}} ^ {l, l ^ {\prime}} Y _ {m} ^ {l} (x) Y _ {m ^ {\prime}} ^ {l ^ {\prime}} \left(x ^ {\prime}\right), \tag {127} +$$ + +to obtain + +$$ +\begin{array}{l} [ \widehat {K ^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{4 \pi} \int_ {S ^ {2}} \mathrm {d} x \iint_ {[ \mathrm {S O} (3) ] ^ {2}} \mathrm {d} R \mathrm {d} R ^ {\prime} \left(\sum_ {p, p ^ {\prime} = 0} ^ {\infty} \sum_ {q = - p} ^ {p} \sum_ {q ^ {\prime} = - p ^ {\prime}} ^ {p ^ {\prime}} [ \widehat {K ^ {(\ell)} (f , f ^ {\prime})} ] _ {q, q ^ {\prime}} ^ {p, p ^ {\prime}} Y _ {q} ^ {p} (R x) Y _ {q ^ {\prime}} ^ {p ^ {\prime}} (R ^ {\prime} x ^ {\prime})\right) \\ \times \mathcal {D} _ {m n} ^ {l} (R) \mathcal {D} _ {m ^ {\prime} n ^ {\prime}} ^ {l ^ {\prime}} \left(R ^ {\prime}\right). \tag {128} \\ \end{array} +$$ + +Using (106), (112), (110) and (111) one can rewrite and simplify the expression as + +$$ +\begin{array}{l} [ \widehat {K ^ {(\ell + 1)} (f , f ^ {\prime})} ] _ {m n, m ^ {\prime} n ^ {\prime}} ^ {l, l ^ {\prime}} = \frac {1}{4 \pi} \sum_ {p, p ^ {\prime} = 0} ^ {\infty} \sum_ {q, r = - p} ^ {p} \sum_ {q ^ {\prime}, r ^ {\prime} = - p ^ {\prime}} ^ {p ^ {\prime}} \frac {8 \pi^ {2}}{2 l + 1} \frac {8 \pi^ {2}}{2 l ^ {\prime} + 1} (- 1) ^ {r ^ {\prime}} \delta_ {l p} \delta_ {m q} \delta_ {n r} \delta_ {l ^ {\prime} p ^ {\prime}} \delta_ {m ^ {\prime} q ^ {\prime}} \delta_ {n ^ {\prime} r ^ {\prime}} \delta_ {p p ^ {\prime}} \delta_ {r, - r ^ {\prime}} \\ \times \left[ K ^ {(\ell)} \left(f, f ^ {\prime}\right) \right] _ {q, q ^ {\prime}} ^ {p, p ^ {\prime}} (129) \\ = \frac {1}{4 \pi} \left(\frac {8 \pi^ {2}}{2 l + 1}\right) ^ {2} (- 1) ^ {n} \delta_ {l, l ^ {\prime}} \delta_ {n, - n ^ {\prime}} [ K ^ {(\ell)} (f, f ^ {\prime}) ] _ {m, m ^ {\prime}} ^ {l, l}, (130) \\ \end{array} +$$ + +which is the claimed result. + +# E. Proofs: Data Augmentation Versus Group Convolutions at Infinite Width + +In this section, we provide proofs for the theorems given in Section 5 in the main text. + +Theorem 5.1. Let $\mu_t^{\mathrm{aug}}$ and $\mu_t$ be the mean predictions after $t$ training steps of infinite ensembles of two neural network architectures $\mathcal{N}^{\mathrm{aug}}$ and $\mathcal{N}$ . Let $\mathcal{N}^{\mathrm{aug}}$ be trained on the fully $G$ -augmented training data of $\mathcal{N}$ and assume that the NTKs of the two architectures are related by + +$$ +\Theta (f, f ^ {\prime}) = \frac {1}{| G |} \sum_ {g \in G} \Theta^ {\mathrm {a u g}} (f, \rho_ {\mathrm {r e g}} (g) f ^ {\prime}). \tag {32} +$$ + +Then, $\mu_t^{\mathrm{aug}}$ and $\mu_t$ converge in the infinite width limit to the same function for all $t$ for quadratic losses, up to quadratic corrections in the learning rate. + +Proof. For a neural network $\mathcal{N}$ , we can expand the change $\Delta \mathcal{N}$ in output due to one training step of gradient descent in the learning rate $\eta$ + +$$ +\begin{array}{l} \Delta \mathcal {N} _ {t + 1} (f) = \mathcal {N} _ {t + 1} (f) - \mathcal {N} _ {t} (f) = \left(\theta_ {t + 1} - \theta_ {t}\right) ^ {\top} \frac {\partial \mathcal {N} _ {t} (f)}{\partial \theta} + \mathcal {O} (\eta^ {2}) (131) \\ = - \frac {\eta}{n _ {\text {t r a i n}}} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \underbrace {\left(\frac {\partial \mathcal {N} _ {t} (f)}{\partial \theta}\right) ^ {\top} \frac {\partial \mathcal {N} _ {t} (f _ {i})}{\partial \theta}} _ {\Theta_ {t} (f, f _ {i})} \mathcal {L} ^ {\prime} \left(\mathcal {N} _ {t} (f _ {i}), y _ {i}\right) + \mathcal {O} \left(\eta^ {2}\right), (132) \\ \end{array} +$$ + +where $\Theta_{t}$ is the empirical NTK at training step $t$ , $y_{i}$ are the training labels and $\mathcal{L}'$ is the derivative of the per-sample loss with respect to the output of the network. Taking the mean and the infinite width limit yields + +$$ +\Delta \mu_ {t + 1} (f) = - \frac {\eta}{n _ {\text {t r a i n}}} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta \left(f, f _ {i}\right) \mathcal {L} ^ {\prime} \left(\mu_ {t} \left(f _ {i}\right), y _ {i}\right), \tag {133} +$$ + +since we have assumed that $\mathcal{L}'$ is linear in its first argument. + +The network $\mathcal{N}^{\mathrm{aug}}$ on the other hand is trained using full data augmentation over $G$ , so we can decompose the sum over training samples into a sum over the training samples in (133) and a sum over $G$ . Note that since we assume full data augmentation and a finite training set, we restrict to $G$ being finite in this section. We obtain + +$$ +\Delta \mu_ {t + 1} ^ {\mathrm {a u g}} (f) = - \frac {\eta}{n _ {\mathrm {t r a i n}} | G |} \sum_ {g \in G} \sum_ {i = 1} ^ {n _ {\mathrm {t r a i n}}} \Theta^ {\mathrm {a u g}} \left(f, \rho_ {\mathrm {r e g}} (g) f _ {i}\right) \mathcal {L} ^ {\prime} \left(\mu_ {t} ^ {\mathrm {a u g}} \left(\rho_ {\mathrm {r e g}} (g) f _ {i}\right), y _ {i}\right). \tag {134} +$$ + +As mentioned in the main text, we will prove the statement inductively over training steps $t$ . At $t = 0$ , the mean output of all neural networks is zero in the infinite width limit (Neal, 1996; Lee et al., 2018). For the induction step, assume that $\mu_t^{\mathrm{aug}} = \mu_t$ . Then, $\mu_{t+1}^{\mathrm{aug}} = \mu_{t+1}$ if $\Delta \mu_{t+1}^{\mathrm{aug}} = \Delta \mu_{t+1}$ . Since the ensemble mean of networks trained with data augmentation is exactly equivariant (Gerken & Kessel, 2024; Nordenfors & Flinth, 2024), we have $\mu_t^{\mathrm{aug}}(\rho_{\mathrm{reg}}(g)f_i) = \mu_t^{\mathrm{aug}}(f_i) = \mu_t(f_i)$ by the induction assumption. Therefore, + +$$ +\Delta \mu_ {t + 1} ^ {\mathrm {a u g}} (f) = - \frac {\eta}{n _ {\text {t r a i n}} | G |} \sum_ {g \in G} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta^ {\mathrm {a u g}} \left(f, \rho_ {\text {r e g}} (g) f _ {i}\right) \mathcal {L} ^ {\prime} \left(\mu_ {t} \left(f _ {i}\right), y _ {i}\right). \tag {135} +$$ + +Using assumption (32) concludes the proof, + +$$ +\Delta \mu_ {t + 1} ^ {\mathrm {a u g}} (f) = - \eta \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta (f, f _ {i}) \mathcal {L} ^ {\prime} \left(\mu_ {t} \left(f _ {i}\right), y _ {i}\right) = \Delta \mu_ {t + 1} (f). \tag {136} +$$ + +As mentioned in Section 7, Theorem 5.1 can be generalized to equivariantly data-augmented networks trained on + +$$ +\bigcup_ {i = 1} ^ {n _ {\text {t r a i n}}} \bigcup_ {g \in G} \left\{\left(\rho_ {\text {r e g}} (g) f _ {i}, \tilde {\rho} _ {\text {r e g}} (g) y _ {i}\right) \right\}, \tag {137} +$$ + +where the targets $y_{i}:G\to \mathbb{R}^{n_{\mathrm{out}}}$ are signals on the group. + +Theorem E.1. Let $\mu_t^{\mathrm{aug}}$ and $\mu_t$ be the mean predictions after $t$ training steps of infinite ensembles of two neural network architectures $\mathcal{N}^{\mathrm{aug}}$ and $\mathcal{N}$ . Let $\mathcal{N}^{\mathrm{aug}}$ be trained on the fully equivariantly $G$ -augmented training data of $\mathcal{N}$ and assume that the NTKs of the two architectures are related by + +$$ +\Theta_ {g, g ^ {\prime}} \left(f, f ^ {\prime}\right) = \frac {1}{| G |} \sum_ {h \in g} \Theta_ {g, h g ^ {\prime}} ^ {\mathrm {a u g}} \left(f, \rho_ {\mathrm {r e g}} (h) f ^ {\prime}\right). \tag {138} +$$ + +Then, $\mu_t^{\mathrm{aug}}$ and $\mu_t$ converge in the infinite width limit to the same function for all $t$ for quadratic losses, up to quadratic corrections in the learning rate. + +Proof. This theorem is a straightforward extension of Theorem 5.1, which is why we only highlight the differences. Similarly to (132), the change in the output after one training step on unaugmented data is given by + +$$ +[ \Delta \mathcal {N} _ {t + 1} (f) ] (g) = - \frac {\eta}{n _ {\text {t r a i n}}} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \sum_ {g ^ {\prime} \in G} \Theta_ {t; g, g ^ {\prime}} (f, f _ {i}) \mathcal {L} ^ {\prime} ([ \mathcal {N} _ {t} (f _ {i}) ] (g ^ {\prime}), y _ {i} (g ^ {\prime})) + \mathcal {O} (\eta^ {2}), \tag {139} +$$ + +where $\mathcal{L}$ is the pointwise per-sample loss. Again, $\mathcal{L}'$ is the derivative with respect to the output of the network at a given point. As before, we assume that $\mathcal{L}'$ is linear in its first argument, allowing us to simplify the expectation of the infinite-width version of (139) to + +$$ +[ \Delta \mu_ {t + 1} (f) ] (g) = - \frac {\eta}{n _ {\text {t r a i n}}} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \sum_ {g ^ {\prime} \in G} \Theta_ {g, g ^ {\prime}} (f, f _ {i}) \mathcal {L} ^ {\prime} ([ \mu_ {t} (f _ {i}) ] (g ^ {\prime}), y _ {i} (g ^ {\prime})). \tag {140} +$$ + +In a similar fashion, we derive the update of a network trained on fully equivariantly augmented data and obtain + +$$ +[ \Delta \mu_ {t + 1} ^ {\mathrm {a u g}} (f) ] (g) = - \frac {\eta}{n _ {\text {t r a i n}} | G |} \sum_ {g ^ {\prime}, h \in G} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta_ {g, g ^ {\prime}} ^ {\mathrm {a u g}} \left(f, \rho_ {\text {r e g}} (h) f _ {i}\right) \mathcal {L} ^ {\prime} \left(\left[ \mu_ {t} ^ {\mathrm {a u g}} \left(\rho_ {\text {r e g}} (h) f _ {i}\right) \right] \left(g ^ {\prime}\right), \left[ \tilde {\rho} _ {\text {r e g}} (h) y _ {i} \right] \left(g ^ {\prime}\right)\right). \tag {141} +$$ + +Using the equivariance property of the ensemble mean again (Gerken & Kessel, 2024), i.e. $\mu_t^{\mathrm{aug}}(\rho_{\mathrm{reg}}(h)f_i) = \tilde{\rho}_{\mathrm{reg}}(h)\mu_t^{\mathrm{aug}}(f_i)$ , and shifting the summation as $g' \to hg'$ , we obtain + +$$ +\begin{array}{l} [ \Delta \mu_ {t + 1} ^ {\mathrm {a u g}} (f) ] (g) = - \frac {\eta}{n _ {\text {t r a i n}} | G |} \sum_ {g ^ {\prime}, h \in G} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \Theta_ {g, h g ^ {\prime}} ^ {\mathrm {a u g}} (f, \rho_ {\text {r e g}} (h) f _ {i}) \mathcal {L} ^ {\prime} ([ \mu_ {t} ^ {\mathrm {a u g}} (f _ {i}) ] (g ^ {\prime}), y _ {i} (g ^ {\prime})) (142) \\ = - \frac {\eta}{n _ {\text {t r a i n}}} \sum_ {g ^ {\prime} \in G} \sum_ {i = 1} ^ {n _ {\text {t r a i n}}} \left(\frac {1}{| G |} \sum_ {h \in G} \Theta_ {g, h g ^ {\prime}} ^ {\mathrm {a u g}} (f, \rho_ {\mathrm {r e g}} (h) f _ {i})\right) \mathcal {L} ^ {\prime} \left(\left[ \mu_ {t} ^ {\mathrm {a u g}} (f _ {i}) \right] \left(g ^ {\prime}\right), y _ {i} \left(g ^ {\prime}\right)\right), (143) \\ \end{array} +$$ + +where we have used that $[\mu_t^{\mathrm{aug}}(\rho_{\mathrm{reg}}(h)f_i)](hg') = [\mu_t^{\mathrm{aug}}(f_i)](g')$ and analogously for $y_{i}$ + +Using (138) and following the same inductive argument as in the proof of Theorem 5.1 concludes this proof. + +Theorem 5.2. Let $\mathcal{N}^{\mathrm{FC}}$ be an MLP acting on feature maps with output in $\mathbb{R}$ and architecture + +$$ +\mathcal {N} ^ {\mathrm {F C}} = \mathrm {F C} ^ {(L)} \circ \sigma \circ \dots \circ \mathrm {F C} ^ {(3)} \circ \sigma \circ \mathrm {F C} ^ {(1)}, \tag {33} +$$ + +where $FC$ denotes a dense MLP layer and $\sigma$ a point-wise nonlinearity. Let $\mathcal{N}^{\mathrm{GC}}$ be a $G$ -invariant GCNN with architecture + +$$ +\begin{array}{l} \mathcal {N} ^ {\mathrm {G C}} = \operatorname {G P o o l} \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {L}\right) \circ \sigma \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {L - 2}\right) \circ \sigma \dots \\ \dots \circ \operatorname {G C o n v} \left(S _ {\kappa} ^ {3}\right) \circ \sigma \circ \operatorname {L i f t i n g} \left(S _ {\kappa} ^ {1}\right), \tag {34} \\ \end{array} +$$ + +where $S_{\kappa}^{\ell}$ are the supports of the convolutional filters with $S_{\kappa}^{1} = X$ , the domain of the input feature maps, and the other $S_{\kappa}^{\ell}$ are invariant under $G$ . Then, the $G$ -averages of the kernels of the MLP are given by the kernels of the GCNN, + +$$ +K ^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (G)} \int \mathrm {d} g K ^ {\mathrm {F C}} \left(f, \rho_ {\text {r e g}} (g) f ^ {\prime}\right) \tag {35} +$$ + +$$ +\Theta^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (G)} \int \mathrm {d} g \Theta^ {\mathrm {F C}} (f, \rho_ {\text {r e g}} (g) f ^ {\prime}). \tag {36} +$$ + +Proof. In order to proof the kernel equalities, we will construct the kernels for the fully connected architecture (33) and the group convolutional architecture (34) by explicitly iterating the recursion relations. + +The iteration starts with the input kernels which for the fully-connected network are + +$$ +K ^ {\mathrm {F C} (0)} \left(f, f ^ {\prime}\right) = \frac {1}{\operatorname {v o l} (X)} \int \mathrm {d} x f (x) f ^ {\prime} (x), \quad \Theta^ {\mathrm {F C} (0)} \left(f, f ^ {\prime}\right) = 0, \tag {144} +$$ + +since the different points in the domain $X$ of the input function take the role of different channels when the image tensor is flattened. The first layer of the FC-network is a fully-connected layer. These update the kernels according to (Jacot et al., 2018) + +$$ +K ^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) = K ^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right) \tag {145} +$$ + +$$ +\Theta^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) = K ^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) + \Theta^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right). \tag {146} +$$ + +In order to write kernel transformation like this more compactly, we will collect all relevant kernels at layer $\ell$ into an $\mathbb{R}^4$ vector $\Xi^{\mathrm{FC}(\ell)}(f,f')$ according to + +$$ +\Xi^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right) = \left( \begin{array}{l} K ^ {\mathrm {F C} (\ell)} (f, f) \\ K ^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right) \\ K ^ {\mathrm {F C} (\ell)} \left(f ^ {\prime}, f ^ {\prime}\right) \\ \Theta^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right) \end{array} \right), \tag {147} +$$ + +where the components $K^{\mathrm{FC}(\ell)}(f,f)$ and $K^{\mathrm{FC}(\ell)}(f',f')$ are needed for the nonlinear layers below. In the $\Xi^{\mathrm{FC}}$ -notation, (145), (146) can be summarized by a function $\mathcal{G}:\mathbb{R}^4\to \mathbb{R}^4$ mapping $\Xi^{\mathrm{FC}(\ell)}(f,f')\mapsto \Xi^{\mathrm{FC}(\ell +1)}(f,f')$ , defined by + +$$ +\mathcal {G} \left( \begin{array}{l} k _ {1} \\ k _ {2} \\ k _ {3} \\ \Theta \end{array} \right) = \left( \begin{array}{c} k _ {1} \\ k _ {2} \\ k _ {3} \\ k _ {2} + \Theta \end{array} \right). \tag {148} +$$ + +Therefore, the kernels of the first fully-connected layer take the form + +$$ +\Xi^ {\mathrm {F C} (1)} \left(f, f ^ {\prime}\right) = \mathcal {G} \left(\Xi^ {\mathrm {F C} (0)} \left(f, f ^ {\prime}\right)\right) = \frac {1}{\operatorname {v o l} (X)} \int \mathrm {d} x \left( \begin{array}{l} f (x) f (x) \\ f (x) f ^ {\prime} (x) \\ f ^ {\prime} (x) f ^ {\prime} (x) \\ f (x) f ^ {\prime} (x) \end{array} \right). \tag {149} +$$ + +In the architecture (33), fully connected layers are alternated with nonlinearities, which act according to (Jacot et al., 2018) + +$$ +\Lambda^ {\mathrm {F C} (\ell)} (f, f ^ {\prime}) = \left( \begin{array}{l l} K ^ {\mathrm {F C} (\ell)} (f, f) & K ^ {\mathrm {F C} (\ell)} (f, f ^ {\prime}) \\ K ^ {\mathrm {F C} (\ell)} \left(f ^ {\prime}, f\right) & K ^ {\mathrm {F C} (\ell)} \left(f ^ {\prime}, f ^ {\prime}\right) \end{array} \right) \tag {150} +$$ + +$$ +K ^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} _ {(u, v) \sim \mathcal {N} \left(0, \Lambda^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right)\right)} [ \sigma (u) \sigma (v) ] \tag {151} +$$ + +$$ +\dot {K} ^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) = \mathbb {E} _ {(u, v) \sim \mathcal {N} \left(0, \Lambda^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right)\right)} \left[ \sigma^ {\prime} (u) \sigma^ {\prime} (v) \right] \tag {152} +$$ + +$$ +\Theta^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) = \dot {K} ^ {\mathrm {F C} (\ell + 1)} \left(f, f ^ {\prime}\right) \Theta^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right). \tag {153} +$$ + +on the kernels. We will denote the corresponding action on the $\Xi^{\mathrm{FC}}$ -vectors by a function $\mathcal{F}_{\sigma}:\mathbb{R}^{4}\to \mathbb{R}^{4}$ . Therefore, a fully-connected layer followed by a nonlinearity can be written as + +$$ +\Xi^ {\mathrm {F C} (\ell + 2)} \left(f, f ^ {\prime}\right) = \mathcal {F} _ {\sigma} \left(\mathcal {G} \left(\Xi^ {\mathrm {F C} (\ell)} \left(f, f ^ {\prime}\right)\right)\right). \tag {154} +$$ + +Hence, in this notation, the kernels of the entire FC network are given by + +$$ +\Xi^ {\mathrm {F C}} (f, f ^ {\prime}) = \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\dots \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\mathcal {G} \left(\Xi^ {\mathrm {F C} (0)} (f, f ^ {\prime})\right)\right)\right) \dots\right)\right). \tag {155} +$$ + +Next, we compute the kernels of the GCNN. The input kernels in this case are + +$$ +K _ {x, x ^ {\prime}} ^ {\mathrm {G C} (0)} \left(f, f ^ {\prime}\right) = f (x) f ^ {\prime} (x), \quad \Theta_ {x, x ^ {\prime}} ^ {\mathrm {G C} (0)} \left(f, f ^ {\prime}\right) = 0. \tag {156} +$$ + +According to (34), the first layer of the network is a lifting layer whose recursion relation was given in Theorem 4.2. Again, we define an $\mathbb{R}^4$ -vector to collect all kernel components necessary for computing the kernels of the network, + +$$ +\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} \left(f, f ^ {\prime}\right) = \left( \begin{array}{l} K _ {g, g} ^ {\mathrm {G C} (\ell)} \left(f, f\right) \\ K _ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} \left(f, f ^ {\prime}\right) \\ K _ {g ^ {\prime}, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} \left(f ^ {\prime}, f ^ {\prime}\right) \\ \Theta_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} \left(f, f ^ {\prime}\right) \end{array} \right). \tag {157} +$$ + +In terms of $\Xi^{\mathrm{GC}}$ the kernels of the lifting layer are given by (note that the filter of the lifting layer has global support by assumption) + +$$ +\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (1)} \left(f, f ^ {\prime}\right) = \mathcal {G} \left(\frac {1}{\operatorname {v o l} (X)} \int_ {X} \mathrm {d} x \left( \begin{array}{l} K _ {\rho (g) x, \rho (g) x} ^ {\mathrm {G C} (0)} (f, f) \\ K _ {\rho (g) x, \rho (g ^ {\prime}) x} ^ {\mathrm {G C} (0)} (f, f ^ {\prime}) \\ K _ {\rho (g ^ {\prime}) x, \rho (g ^ {\prime}) x} ^ {\mathrm {G C} (0)} \left(f ^ {\prime}, f ^ {\prime}\right) \\ \Theta_ {\rho (g) x, \rho (g ^ {\prime}) x} ^ {\mathrm {G C} (0)} (f, f ^ {\prime}) \end{array} \right)\right) = \frac {1}{\operatorname {v o l} (X)} \int_ {X} \mathrm {d} x \left( \begin{array}{l} f (\rho (g) x) f (\rho (g) x) \\ f (\rho (g) x) f ^ {\prime} (\rho (g ^ {\prime}) x) \\ f ^ {\prime} (\rho (g ^ {\prime}) x) f ^ {\prime} (\rho (g ^ {\prime}) x) \\ f (\rho (g) x) f ^ {\prime} (\rho (g ^ {\prime}) x) \end{array} \right). \tag {158} +$$ + +For later convenience, we note here that + +$$ +\begin{array}{l} \Xi_ {h, g ^ {- 1} h} ^ {\mathrm {G C} (1)} \left(f, f ^ {\prime}\right) = \frac {1}{\operatorname {v o l} (X)} \int_ {X} \mathrm {d} x \left( \begin{array}{c} f (\rho (h) x) f (\rho (h) x) \\ f (\rho (h) x) f ^ {\prime} (\rho (g ^ {- 1} h) x) \\ f ^ {\prime} (\rho (g ^ {- 1} h) x) f ^ {\prime} (\rho (g ^ {- 1} h) x) \\ f (\rho (h) x) f ^ {\prime} (\rho (g ^ {- 1} h) x) \end{array} \right) (159) \\ = \frac {1}{\operatorname {v o l} (X)} \int_ {X} \mathrm {d} x \left( \begin{array}{c} f (x) f (x) \\ f (x) f ^ {\prime} (\rho (g ^ {- 1}) x) \\ f ^ {\prime} (\rho (g ^ {- 1}) x) f ^ {\prime} (\rho (g ^ {- 1}) x) \\ f (x) f ^ {\prime} (\rho (g ^ {- 1}) x) \end{array} \right) (160) \\ = \Xi^ {\mathrm {F C} (1)} \left(f, \rho_ {\text {r e g}} (g) f ^ {\prime}\right), (161) \\ \end{array} +$$ + +where we shifted the integration variable in the second step and used (149). + +After the lifting layer, we act with a point-wise nonlinearity whose recursion relations are given in Corollary 4.4. Since this transformation is independent for the different $g,g^{\prime}$ -components, we can write it using the same function $\mathcal{F}_{\sigma}$ introduced above as + +$$ +\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell + 1)} \left(f, f ^ {\prime}\right) = \mathcal {F} _ {\sigma} \left(\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} \left(f, f ^ {\prime}\right)\right). \tag {162} +$$ + +A GCNN layer transforms the NNGP and NTK according to Theorem 4.1. We can write this in terms of $\Xi_{g,g'}^{\mathrm{GC}(\ell)}$ as + +$$ +\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell + 1)} \left(f, f ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} ^ {\ell} \right|} \int_ {S _ {\kappa}} \mathrm {d} h _ {\ell} \mathcal {G} \left(\Xi_ {g h _ {\ell}, g ^ {\prime} h _ {\ell}} ^ {\mathrm {G C} (\ell)} \left(f, f ^ {\prime}\right)\right), \tag {163} +$$ + +with $\mathcal{G}$ as introduced in (148). The final pooling layer acts according to Theorem 4.3, which we can write as + +$$ +\Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \Xi_ {g, g ^ {\prime}} ^ {\mathrm {G C} (\ell)} (f, f ^ {\prime}). \tag {164} +$$ + +With the expressions (162), (163) and (164), we can write the kernels of the entire network as + +$$ +\begin{array}{l} \Xi^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \frac {1}{| S _ {\kappa} ^ {L} |} \int_ {S _ {\kappa} ^ {L}} \mathrm {d} h _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\frac {1}{| S _ {\kappa} ^ {L - 2} |} \right. \int_ {S _ {\kappa} ^ {L - 2}} \mathrm {d} h _ {L - 2} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\dots \right. \right. \right. \\ \left. \dots \frac {1}{\left| S _ {\kappa} ^ {3} \right|} \int_ {S _ {\kappa} ^ {3}} \mathrm {d} h _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {g h _ {L} h _ {L - 2} \dots h _ {5} h _ {3}, g ^ {\prime} h _ {L} h _ {L - 2} \dots h _ {5} h _ {3}} \left(f, f ^ {\prime}\right)\right) \dots\right)\right)\left. \right). \tag {165} \\ \end{array} +$$ + +In order to simplify this expression, we shift $h_3$ and absorb $gh_Lh_{L-2}\cdots h_5$ into it. This will not change the integration domain of $h_3$ since $S_\kappa^3$ is by assumption invariant under $G$ . Then, the integrals over $h_L, h_{L-2},\ldots,h_5$ become trivial and cancel against their $1/|S_\kappa^\ell|$ -prefactors. We are left with + +$$ +\Xi^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (G)) ^ {2}} \int_ {G} \mathrm {d} g \int_ {G} \mathrm {d} g ^ {\prime} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\dots \frac {1}{| S _ {\kappa} ^ {3} |} \int_ {S _ {\kappa} ^ {3}} \mathrm {d} h _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {h _ {3}, g ^ {\prime} g ^ {- 1} h _ {3}} ^ {\mathrm {G C} (1)} (f, f ^ {\prime})\right)\right) \dots\right)\right)\right)\right). \tag {166} +$$ + +Finally, we trivialize the $g'$ -integral by shifting $g^{-1}$ to absorb $g'$ . Thus, we obtain + +$$ +\begin{array}{l} \Xi^ {\mathrm {G C}} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (G)} \int_ {G} \mathrm {d} g \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\dots \frac {1}{| S _ {\kappa} ^ {3} |} \int_ {S _ {\kappa} ^ {3}} \mathrm {d} h _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {h _ {3}, g ^ {- 1} h _ {3}} ^ {\mathrm {G C} (1)} (f, f ^ {\prime})\right)\right) \dots\right)\right)\right)\right) (167) \\ = \frac {1}{\operatorname {v o l} (G)} \int_ {G} \mathrm {d} g \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\dots \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi^ {\mathrm {F C} (1)} \left(f, \rho_ {\mathrm {r e g}} (g) f ^ {\prime}\right)\right)\right) \dots\right)\right)\right)\right) (168) \\ = \frac {1}{\operatorname {v o l} (G)} \int_ {G} \mathrm {d} g \Xi^ {\mathrm {F C}} \left(f, \rho_ {\text {r e g}} (g) f ^ {\prime}\right), (169) \\ \end{array} +$$ + +where we used (161), trivializing the integral over $h_3$ , and then identified $\Xi^{\mathrm{FC}}$ from (155). The statement follows by taking the second and fourth components of (169). + +Theorem 5.3. Let $\mathcal{N}^{K \ltimes N}$ be the $K \ltimes N$ -invariant GCNN with architecture (34) and $K$ -invariant filter supports $S_{\kappa}^{\ell}$ which for the GConv-layers decompose as $S_{\kappa}^{\ell} = K_{\kappa}^{\ell} \times N_{\kappa}^{\ell}$ , $K_{\kappa}^{\ell} \subseteq K$ , $N_{\kappa}^{\ell} \subseteq N$ . Let $\mathcal{N}^N$ be the $N$ -invariant GCNN with architecture (34) and filter supports $N_{\kappa}^L, \ldots, N_{\kappa}^3$ and $S_{\kappa}^1$ . Then, the NNGPs and NTKs of these networks are related by + +$$ +K ^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k K ^ {N} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right) \tag {37} +$$ + +$$ +\Theta^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k \Theta^ {N} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right). \tag {38} +$$ + +Proof. In this proof, we will use the same notation as in the proof for Theorem 5.2 above and use results from there as well. We start by considering the kernels $\Xi^{K\times N}$ of $\mathcal{N}^{K\times N}$ by specializing (165) to the case $G = K\times N$ . Due to the semidirect product structure of $G$ , there is a unique decomposition $g = kn$ for each $g\in G$ into $k\in K$ and $n\in N$ . Since by assumption the filter supports $S_{\kappa}^{\ell}$ on $G$ also factorize over $K$ and $N$ , we can split all $G$ -integrations in (165) over $N$ and $K$ and obtain + +$$ +\begin{array}{l} \Xi^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (K)) ^ {2}} \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {K} \mathrm {d} k \int_ {N} \mathrm {d} n \int_ {K} \mathrm {d} k ^ {\prime} \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| K _ {\kappa} ^ {L} | | N _ {\kappa} ^ {L} |} \int_ {K _ {\kappa} ^ {L}} \mathrm {d} j _ {L} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{\left| K _ {\kappa} ^ {3} \right| \left| N _ {\kappa} ^ {3} \right|} \int_ {K _ {\kappa} ^ {3}} \mathrm {d} j _ {3} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {k n j _ {L} m _ {L} \dots j _ {3} m _ {3}, k ^ {\prime} n ^ {\prime} j _ {L} m _ {L} \dots j _ {3} m _ {3}} ^ {K \ltimes N (1)} (f, f ^ {\prime})\right)\right) \dots\right). \tag {170} \\ \end{array} +$$ + +In order to trivialize the integrals over $K$ , as was done with the integrals over $G$ in (166), we need to rewrite the first group + +index of $\Xi^{K \ltimes N(1)}$ such that all $j_{\ell}$ appear next to each other. To this end, we introduce several unit elements + +$$ +\begin{array}{l} k n j _ {L} m _ {L} \dots j _ {7} m _ {7} j _ {5} m _ {5} j _ {3} m _ {3} = k n j _ {L} m _ {L} \dots j _ {7} m _ {7} j _ {5} j _ {3} \underbrace {j _ {3} ^ {- 1} m _ {5} j _ {3}} _ {\in N} m _ {3} (171) \\ = k n j _ {L} m _ {L} \dots j _ {7} j _ {5} j _ {3} \underbrace {\left(j _ {5} j _ {3}\right) ^ {- 1} m _ {7} j _ {5} j _ {3}} _ {\in N} \underbrace {j _ {3} ^ {- 1} m _ {5} j _ {3}} _ {\in N} m _ {3} (172) \\ = k j _ {L} \dots j _ {3} \underbrace {\left(j _ {L} \cdots j _ {3}\right) ^ {- 1} n j _ {L} \cdots j _ {3}} _ {\in N} \underbrace {\left(j _ {L - 2} \cdots j _ {3}\right) ^ {- 1} m _ {L}} _ {\in N} \dots \underbrace {j _ {3} ^ {- 1} m _ {5} j _ {3}} _ {\in N} m _ {3}. (173) \\ \end{array} +$$ + +We perform the same rewriting also on the second group index of $\Xi^{K \ltimes N(1)}$ . Since $N$ is a normal subgroup of $G$ , $knk^{-1} \in N$ for all $k \in K$ , $n \in N$ and the Haar measure on $N$ is invariant under shifts of the form $n \to knk^{-1}$ . Furthermore, the integration domains $N_{\kappa}^{\ell}$ are by assumption invariant under this transformation. Hence, we shift $n$ , $n'$ and the $m_{\ell}$ by + +$$ +n \rightarrow j _ {L} \dots j _ {3} n \left(j _ {L} \dots j _ {3}\right) ^ {- 1} \tag {174} +$$ + +$$ +n ^ {\prime} \rightarrow j _ {L} \dots j _ {3} n ^ {\prime} \left(j _ {L} \dots j _ {3}\right) ^ {- 1} \tag {175} +$$ + +$$ +m _ {\ell} \rightarrow j _ {\ell - 2} \dots j _ {3} m _ {\ell} \left(j _ {\ell - 2} \dots j _ {3}\right) ^ {- 1} \quad \ell > 3. \tag {176} +$$ + +With this (170) becomes + +$$ +\begin{array}{l} \Xi^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{(\operatorname {v o l} (K)) ^ {2}} \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {K} \mathrm {d} k \int_ {N} \mathrm {d} n \int_ {K} \mathrm {d} k ^ {\prime} \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| K _ {\kappa} ^ {L} | | N _ {\kappa} ^ {L} |} \int_ {K _ {\kappa} ^ {L}} \mathrm {d} j _ {L} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{\left| K _ {\kappa} ^ {3} \right| \left| N _ {\kappa} ^ {3} \right|} \int_ {K _ {\kappa} ^ {3}} \mathrm {d} j _ {3} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {k j _ {L} \dots j _ {3} n m _ {L} \dots m _ {3}, k ^ {\prime} j _ {L} \dots j _ {3} n ^ {\prime} m _ {L} \dots m _ {3}} ^ {K \ltimes N (1)} (f, f ^ {\prime})\right)\right) \dots\right) (177) \\ = \frac {1}{(\operatorname {v o l} (K)) ^ {2}} \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {K} \mathrm {d} k \int_ {N} \mathrm {d} n \int_ {K} \mathrm {d} k ^ {\prime} \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| N _ {\kappa} ^ {L} |} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{\left| K _ {\kappa} ^ {3} \right| \left| N _ {\kappa} ^ {3} \right|} \int_ {K _ {\kappa} ^ {3}} \mathrm {d} j _ {3} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {j _ {3} n m _ {L} \dots m _ {3}, k ^ {\prime} k ^ {- 1} j _ {3} n ^ {\prime} m _ {L} \dots m _ {3}} ^ {K \ltimes N (1)} (f, f ^ {\prime})\right)\right) \dots\right) (178) \\ = \frac {1}{\operatorname {v o l} (K)} \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {K} \mathrm {d} k \int_ {N} \mathrm {d} n \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| N _ {\kappa} ^ {L} |} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{\left| K _ {\kappa} ^ {3} \right| \left| N _ {\kappa} ^ {3} \right|} \int_ {K _ {\kappa} ^ {3}} \mathrm {d} j _ {3} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {j _ {3} n m _ {L} \dots m _ {3}, k ^ {- 1} j _ {3} n ^ {\prime} m _ {L} \dots m _ {3}} ^ {K \ltimes N (1)} \left(f, f ^ {\prime}\right)\right)\right) \dots\right). (179) \\ \end{array} +$$ + +Here, we shifted $j_{3} \to (kj_{L} \cdots j_{5})$ in the first step, trivializing the integrals over $j_{L}, \ldots, j_{5}$ which then cancel against their $1 / |K_{\kappa}^{\ell}|$ -prefactors. In the second step, we first trivialized the integral over $k'$ by shifting $k' \to k'k$ and then canceled it against its $1 / \operatorname{vol}(K)$ -prefactor. + +Next, we perform another manipulation on the group indices of $\Xi^{K \ltimes N(1)}$ by first inserting suitable unit elements, + +$$ +j _ {3} n m _ {L} \dots m _ {3} = \underbrace {j _ {3} n j _ {3} ^ {- 1}} _ {\in N} \underbrace {j _ {3} m _ {L} j _ {3} ^ {- 1}} _ {\in N} \underbrace {j _ {3} m _ {L - 2} j _ {3} ^ {- 1}} _ {\in N} \dots \underbrace {j _ {3} m _ {3} j _ {3} ^ {- 1}} _ {\in N} j _ {3}, \tag {180} +$$ + +and similarly for the second group index of $\Xi^{K\ltimes N(1)}$ . After shifting + +$$ +n \rightarrow j _ {3} ^ {- 1} n j _ {3}, \quad n ^ {\prime} \rightarrow j _ {3} ^ {- 1} n ^ {\prime} j _ {3}, \quad m _ {\ell} \rightarrow j _ {3} ^ {- 1} m _ {\ell} j _ {3} \quad \ell \geq 3, \tag {181} +$$ + +in (179), we obtain + +$$ +\begin{array}{l} \Xi^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {K} \mathrm {d} k \int_ {N} \mathrm {d} n \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| N _ {\kappa} ^ {L} |} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{| K _ {\kappa} ^ {3} | | N _ {\kappa} ^ {3} |} \int_ {K _ {\kappa} ^ {3}} \mathrm {d} j _ {3} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {n m _ {L} \dots m _ {3} j _ {3}, k ^ {- 1} n ^ {\prime} m _ {L} \dots m _ {3} j _ {3}} ^ {K \ltimes N (1)} \left(f, f ^ {\prime}\right)\right)\right) \dots\right). \tag {182} \\ \end{array} +$$ + +![](images/84ff16bcf94f05cf573cc97943972c8d14ea70773db80f82fa438763192f8ff6.jpg) +Figure 5. Convergence of the Monte-Carlo estimates of the NNGP to their infinite-width limits for $G = C_4 \ltimes \mathbb{R}^2$ . Plotted is the relative error averaged over the components of a $3 \times 3$ Gram matrix for networks with a ReLU or an error function nonlinearity. The bands correspond to $\pm$ one standard deviation of the estimator. + +As in the proof for Theorem 5.2, we will now write $\Xi^{K \ltimes N(1)}$ in terms of $\Xi^{N(1)}$ . Using the shorthand $\tilde{m} = m_{L} \cdots m_{3}$ and the analogous steps to (161), we find + +$$ +\begin{array}{l} \Xi_ {n \tilde {m} j _ {3}, k ^ {- 1} n ^ {\prime} \tilde {m} j _ {3}} ^ {K \ltimes N (1)} \left(f, f ^ {\prime}\right) = \frac {1}{\left| S _ {\kappa} ^ {1} \right|} \int_ {S _ {\kappa} ^ {1}} \mathrm {d} x \left( \begin{array}{c} f (\rho (n \tilde {m} j _ {3}) x) f (\rho (n \tilde {m} j _ {3}) x) \\ f (\rho (n \tilde {m} j _ {3}) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m} j _ {3}\right) x) \\ f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m} j _ {3}\right) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m} j _ {3}\right) x) \\ f (\rho (n \tilde {m} j _ {3}) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m} j _ {3}\right) x) \end{array} \right) (183) \\ = \frac {1}{\left| S _ {\kappa} ^ {1} \right|} \int_ {S _ {\kappa} ^ {1}} \mathrm {d} x \left( \begin{array}{c} f (\rho (n \tilde {m}) x) f (\rho (n \tilde {m}) x) \\ f (\rho (n \tilde {m}) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m}\right) x) \\ f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m}\right) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m}\right) x) \\ f (\rho (n \tilde {m}) x) f ^ {\prime} (\rho \left(k ^ {- 1} n ^ {\prime} \tilde {m}\right) x) \end{array} \right) (184) \\ = \Xi_ {n \tilde {m}, n ^ {\prime} \tilde {m}} ^ {N (1)} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right), (185) \\ \end{array} +$$ + +where for the second equality, we have shifted $x \to \rho(j_3^{-1})x$ , which leaves $S_{\kappa}^{1}$ invariant by assumption. Plugging (185) into (182) trivializes the $j_3$ -integral which cancels against its $1/|K_{\kappa}^{3}|$ -prefactor, yielding + +$$ +\begin{array}{l} \Xi^ {K \ltimes N} (f, f ^ {\prime}) = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k \frac {1}{(\operatorname {v o l} (N)) ^ {2}} \int_ {N} \mathrm {d} n \int_ {N} \mathrm {d} n ^ {\prime} \frac {1}{| N _ {\kappa} ^ {L} |} \int_ {N _ {\kappa} ^ {L}} \mathrm {d} m _ {L} \mathcal {G} \left(\mathcal {F} _ {\sigma} \dots \right. \\ \left. \dots \frac {1}{| N _ {\kappa} ^ {3} |} \int_ {N _ {\kappa} ^ {3}} \mathrm {d} m _ {3} \mathcal {G} \left(\mathcal {F} _ {\sigma} \left(\Xi_ {n m _ {L} \dots m _ {3}, n ^ {\prime} m _ {L} \dots m _ {3}} ^ {N (1)} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right)\right)\right) \dots\right) (186) \\ = \frac {1}{\operatorname {v o l} (K)} \int_ {K} \mathrm {d} k \Xi^ {N} \left(f, \rho_ {\text {r e g}} (k) f ^ {\prime}\right), (187) \\ \end{array} +$$ + +where we have identified $\Xi^N$ by comparing to (165). The statement of the theorem follows by considering the second and fourth components of (187). + +# F. Further Experimental Results + +In this appendix, we provide further details and results of the numerical experiments presented in Section 6. + +# F.1. Kernel Convergence + +Figure 5 shows the convergence of Monte-Carlo estimates of the NNGP to the analytical infinite-width expression derived using the theorems in Section 4.1. + +Table 1. Architectures used for the medical image classification described in Section 6. For convolutional, group-convolutional and lifting layers, the argument is the kernel size (all kernels are squared). Both pooling layers are global. The number of output neurons is finite and has to correspond to the 9 classes. + +
CNNGCNN
Conv(3)Lifting(3)
ReLUReLU
Conv(3)GConv(3)
ReLUReLU
Conv(3)GConv(3)
ReLUReLU
Conv(3)GConv(3)
ReLUReLU
SumPoolGPool
DenseDense
ReLUReLU
Dense(9)Dense(9)
+ +# F.2. Medical Image Experiments + +In the infinite-width limit, the NTK becomes deterministic and time-independent under the gradient flow dynamics. In the case of MSE loss, the differential equation describing the mean output of a network at time $t$ becomes a linear ODE, thus allowing for an analytic expression at arbitrary time. In the limit of infinite training time, the mean is given by (41) (Jacot et al., 2018). This relation is effectively a kernel method that can be used to generate prediction of the infinitely wide network. + +The task consists of classifying histological images (Kather et al., 2018) containing nine classes of tissues, two of which are cancerous. The original images have a resolution of $224 \times 224$ pixels each and have been down-scaled to a resolution of $32 \times 32$ pixels to reduce the kernel evaluation time. Note that the size of the final kernel matrix, that needs to be inverted, is independent of the resolution because we use a group pooling or SumPool layer, respectively. Since the analytic solution in (41) only applies for MSE loss, we constructed target vectors $\mathcal{Y} = \{y_0, \dots, y_N\}$ from classes $c$ according to $e_c - \frac{1}{9} \mathbf{1}$ as is standard in the NTK literature (Lee et al., 2020). + +The CNN and GCNN architectures that were used are shown in Table 1. Note that the infinite-width limit refers to the number of channels, which is why we only need to specify the kernel sizes. The same training and test data was used for both models with a test data size of 1000 images. Both architectures have been implemented in the neural-tangents package (Novak et al., 2020). + +# F.3. Molecular Energy Regression + +We used the same kernel method resulting from the infinite-width and infinite-time limit as explained in Section F.2. Both the grid on $S^2$ as well as on SO(3) are equiangular Driscoll & Healy grids (Driscoll & Healy, 1994) with resolution $2L \times (2L - 1)^4$ on $S^2$ and $(2L - 1) \times 2L \times (2L - 1)$ on SO(3) (parametrized in Euler angles). $L$ is the corresponding bandlimit defining the cutoff in the Fourier domain, i.e. only Fourier coefficients $l < L$ are considered. The input signals are sampled for $L = 6$ . + +As the labels we have used the internal energies $U_{0}$ of the molecules at $0\mathrm{K}$ after subtracting the atomic reference energies. The hyperparameter $\beta$ in (42) was chosen as described in (Esteves et al., 2023) according to + +$$ +\beta = \frac {\cos (\pi / 4)) - 1) ^ {2}}{\log (0 . 0 5)} \tag {188} +$$ + +Table 2. Architectures used for the molecular energy regression described in Section 6. 29 identical networks (encaptured by curly braces) process the inputs associated to each atom. Their outputs are then summed together. For group-convolutional and lifting layers, the output bandlimit $L$ is stated. The pooling layer is global and the single output neuron represents the predicted energy of the network. + +
MLPGCNN
29 per-atom networks +{ Dense +ReLU +Dense +combined to molecule network29 per-atom networks +{ Lifting(3) +Erf +GConv(3)Lifting(3) +Erf +GConv(3)
FanInSumFanInSum
Dense (1)Dense (1)
+ +![](images/e2084564083e19f00364a0e6fb2283d12baeaf23b9f0ce7ef0cf38b03166fa26.jpg) +Figure 6. Convergence of finite-width ensembles trained with data augmentation to ensembles of GCNNs on CIFAR10. Shown is the $L^2$ -distance between the logits of the equivariant ensemble and the non-equivariant ensemble trained with data augmentation for different ensemble sizes on out of distribution data. For larger ensembles, the distance decreases. + +The precise architectures of the MLP based network and the SO(3)-invariant network are listed in Table 2. The MAE loss was evaluated on a test set of 100 molecules. + +# F.4. Data Augmentation Versus Group Convolutions at Finite Width + +Figure 6 shows that large ensembles trained with data augmentation on CIFAR10 converge to GCNNs even out of distribution. Similarly, Figure 7 shows the same behavior on the NCT-CRC-HE-100K data set of histological images (Kather et al., 2018), downscaled to $32 \times 32$ pixels. Samples of the out of distribution data, whose mean and variance were normalized to 0 and 1, respectively, are provided in Figure 8. The architectures used for the ensemble members are detailed in Table 3. + +![](images/24af50a89435ef2fb5ec48db6e93ff52641e3faa4b7a75276681613a0d33f14c.jpg) +Figure 7. Convergence of finite-width ensembles trained with data augmentation to ensembles of GCNNs on histological images from the NCT-CRC-HE-100K data set. Shown is the $L^2$ -distance between the logits of the equivariant ensemble and the non-equivariant ensemble trained with data augmentation for different ensemble sizes on out of distribution data. For larger ensembles, the distance decreases. The standard deviation is estimated from 20 independent runs for each curve. + +![](images/93cbcb7f8c1c54299d5550590093832a0d39e60928f987497b287a70c86b0a56.jpg) +Figure 8. Examples for out of distribution data for MNIST (left) and CIFAR10 (middle) and NCT-CRC-HE-100K (right). + +![](images/243d2c5e2b4cd783c0ea82217448c1849e49be9d431220de06c70ca2924d3f32.jpg) + +![](images/618cac677126798923ae765009144364a2b4b520a1f186ed23292af4d773e13d.jpg) + +Table 3. Architectures used for the ensemble members in the experiments described in Section 6. For convolutional, group-convolutional and lifting layers, the arguments are input channels, output channels and kernel size (all kernels are squared). For max-pooling layers, the arguments are kernel size and stride. For the GCNNs, the max pooling is done only over spatial dimensions, not group dimensions. The kernel sizes were selected such that the GCNNs are exactly equivariant for the respective input sizes of $28 \times 28$ and $32 \times 32$ . + +
MNISTCIFAR10
CNNGCNNCNNGCNN
Conv(1, 4, 3)Lifting(1, 4, 3)Conv(3, 4, 3)Lifting(3, 4, 3)
ReLUReLUReLUReLU
MaxPool(2, 2)SpatialMaxPool(2, 2)MaxPool(2, 2)SpatialMaxPool(2, 2)
Conv(4, 16, 4)GConv(4, 16, 4)Conv(4, 16, 4)GConv(4, 16, 4)
ReLUReLUReLUReLU
MaxPool(2, 2)SpatialMaxPool(2, 2)MaxPool(2, 2)SpatialMaxPool(2, 2)
Conv(16, 32, 3)GConv(16, 32, 3)Conv(16, 32, 3)GConv(16, 32, 3)
ReLUReLUReLUReLU
Conv(32, 64, 3)GConv(32, 64, 3)Conv(32, 64, 4)GConv(32, 64, 4)
ReLUReLUReLUReLU
Conv(64, 128, 1)GConv(64, 128, 1)Conv(64, 128, 1)GConv(64, 128, 1)
ReLUReLUReLUReLU
Conv(128, 32, 1)GConv(128, 32, 1)Conv(128, 32, 1)GConv(128, 32, 1)
ReLUReLUReLUReLU
Conv(32, 10, 1)GConv(32, 10, 1)Conv(32, 10, 1)GConv(32, 10, 1)
GPoolGPool
+ +Table 4. Architectures used for the ensemble members in the experiments described in Section F.4. For convolutional, group-convolutional and lifting layers, the arguments are input channels, output channels and kernel size (all kernels are squared). For max-pooling layers, the arguments are kernel size and stride. For the GCNNs, the max pooling is done only over spatial dimensions, not group dimensions. The kernel sizes were selected such that the GCNNs are exactly equivariant for the input size of $32 \times 32$ . + +
NCT-CRC-HE-100K
CNNGCNN
Conv(3, 4, 3)Lifting(3, 4, 3)
ReLUReLU
MaxPool(2, 2)SpatialMaxPool(2, 2)
Conv(4, 16, 4)GConv(4, 16, 4)
ReLUReLU
MaxPool(2, 2)SpatialMaxPool(2, 2)
Conv(16, 32, 3)GConv(16, 32, 3)
ReLUReLU
Conv(32, 64, 4)GConv(32, 64, 4)
ReLUReLU
Conv(64, 128, 1)GConv(64, 128, 1)
ReLUReLU
Conv(128, 32, 1)GConv(128, 32, 1)
ReLUReLU
Conv(32, 9, 1)GConv(32, 9, 1)
GPool
\ No newline at end of file diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/images.zip b/ICML/2025/Equivariant Neural Tangent Kernels/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c4b754311bee470e9def52b8de935684532cf1d5 --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f7751ad8f1ea5c5c45a2ae863f917a750d6b0b97237e3b165dadc2498ab5009 +size 2389563 diff --git a/ICML/2025/Equivariant Neural Tangent Kernels/layout.json b/ICML/2025/Equivariant Neural Tangent Kernels/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8ef7686436cd66992473330525953d288e92068f --- /dev/null +++ b/ICML/2025/Equivariant Neural Tangent Kernels/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de46d9cf2a07f9549736e68db626fefadad661e941b80473ae70f80f2b999152 +size 1339194 diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_content_list.json b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..602844227aa818ec8879a21bf37087adaf88e34b --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9499eedaa8a41e3c0cebad5d8bf69b08d3dd5d92cefa7dc4849c829869899ac3 +size 404695 diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_model.json b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a5d892100b7adba8382cb79e46839f102e84210f --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e8e2b5a9580468701061871b722eab1f11595d3241a57293f72c49b2d6d3069 +size 466529 diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_origin.pdf b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..da6fb6c9eef04fbdd02a796b9333c1c10deadd31 --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/94917c03-de36-45d6-ae99-4d8a4572c5fc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5312dc947259ae384838e95a25e083dd5784eae3784702bcab9b7b90099b1ab6 +size 579179 diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/full.md b/ICML/2025/Equivariant Polynomial Functional Networks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..7d6d8e14262c6e1dd6d3ff11937aa136d4f547b1 --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/full.md @@ -0,0 +1,2534 @@ +# Equivariant Polynomial Functional Networks + +Thieu N. Vo $^{*1}$ Viet-Hoang Tran $^{*1}$ Tho Tran Huu $^{*1}$ An Nguyen The $^{2}$ Thanh Tran $^{3}$ Minh-Khoi Nguyen-Nhat $^{2}$ Duy-Tung Pham $^{2}$ Tan M. Nguyen $^{1}$ + +# Abstract + +A neural functional network (NFN) is a specialized type of neural network designed to process and learn from entire neural networks as input data. Recent NFNs have been proposed with permutation and scaling equivariance based on either graph-based message-passing mechanisms or parameter-sharing mechanisms. However, the challenge of designing a permutation and scaling equivariant NFN that maintains low memory consumption and running time while preserving expressivity remains unresolved. In this paper, we propose a novel solution with the development of MAGEP-NFN (Monomial mAtrix Group Equivariant Polynomial NFN). Our approach follows the parameter-sharing mechanism but differs from previous works by constructing a nonlinear equivariant layer represented as a polynomial in the input weights. This polynomial formulation enables us to incorporate additional relationships between weights from different input hidden layers, enhancing the model's expressivity while keeping memory consumption and running time low, thereby addressing the aforementioned challenge. We provide empirical evidence demonstrating that MAGEP-NFN achieves competitive performance and efficiency compared to existing baselines. + +# 1. Introduction + +Neural functional networks (NFNs) serve as specialized architectures that operate on fundamental components of deep neural networks, including weights, gradients, and sparsity masks, by treating them as input data (Zhou et al., 2024b). These networks have been utilized across various domains of machine learning, contributing to applications + +*Equal contribution $^{1}$ National University of Singapore $^{2}$ FPT Software AI Center, Vietnam $^{3}$ VinUniversity, Vietnam. Correspondence to: Viet-Hoang Tran . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +such as enhancing training efficiency through learnable optimizers (Bengio et al., 2013; Runarsson & Jonsson, 2000; Andrychowicz et al., 2016; Metz et al., 2022), capturing features from implicit data representations (Stanley, 2007; Mildenhall et al., 2021; Runarsson & Jonsson, 2000), modifying network parameters for targeted adjustments (Sinitsin et al., 2020; Cao et al., 2021; Mitchell et al., 2022), assessing policies in reinforcement learning (Harb et al., 2020), and facilitating Bayesian inference by interpreting neural networks as sources of evidence (Sokota et al., 2021). + +A fundamental aspect of NFNs is their ability to respect the inherent symmetries present in the weight space of the input neural networks. In the case of a multilayer perceptron (MLP), the weight space exhibits two primary forms of symmetry: permutation symmetry and scaling symmetry. Permutation symmetries arise from the structure of the network itself, since neurons within a hidden layer have no intrinsic ordering. On the other hand, scaling symmetries are induced by the activation functions. For networks with the ReLU activation function, multiplying a neuron's bias and all its incoming weights by the same positive scalar scales its output proportionally, leading to a scaling-type symmetry (Bui Thi Mai & Lampert, 2020; Neyshabur et al., 2015; Badrinarayanan et al., 2015). Similarly, for sine and tanh activations, flipping the sign of both the bias and all incoming weights of a neuron inverts the sign of its output, introducing an alternative form of scaling symmetry (Chen et al., 1993; Fefferman & Markel, 1993; Kurkova & Kainen, 1994). These structural symmetries define equivalence classes in the weight space, and incorporating them into the design of NFNs ensures that learned representations remain consistent and invariant to these transformations. + +Recent methods have focused on creating permutation equivariant NFNs, such as (Navon et al., 2023; Zhou et al., 2024b; Kofinas et al., 2024; Zhou et al., 2024c). These methods leverage permutation equivariance to respect symmetries arising from neuron reordering within hidden layers. NFNs that are equivariant to both permutations and scaling or signflipping have been introduced in (Kalogeropoulos et al., 2024) using a graph-based message-passing mechanism and in (Tran et al., 2024a) with a parameter sharing mechanism. However, similar to other graph-based neural functional networks, treating the entire input neural network as a graph + +and utilizing graph neural networks causes the graph-based equivariant NFNs in (Kalogeropoulos et al., 2024) to have very high memory consumption and running time. In contrast, the NFNs built upon equivariant linear layers using the parameter sharing mechanism in (Tran et al., 2024a) exhibit much lower memory consumption and running time. Nevertheless, the equivariant linear layers introduced in (Tran et al., 2024a) possess weak expressive properties, as the weights of the input hidden layers are updated solely by the corresponding weights of the same input hidden layers. The challenge of designing an equivariant layer based on the parameter-sharing mechanism that maintains both lower memory consumption and running time while preserving expressivity remains unresolved. + +# 1.1. Contribution + +This paper aims to develop a novel NFN that is equivariant to both permutations and scaling/sign-flipping symmetries, called MAGEP-NFN (Monomial mAtrix Group Equivariant Polynomial NFN). We follow the parameter-sharing mechanism as described in (Tran et al., 2024a); however, unlike (Tran et al., 2024a), we construct a nonlinear equivariant layer, which is represented as a polynomial in the input weights. This polynomial formulation enables us to incorporate additional relationships between weights from different input hidden layers, thereby addressing the challenges posed in (Tran et al., 2024a) and enhancing the expressivity of MAGEP-NFN. + +However, determining equivariant and invariant layers among generic polynomials in the input weights is challenging due to two main factors: the difficulty in identifying polynomial orbits under group actions and the high computational cost of working with generic polynomials. To overcome these issues, we introduce a specialized class of polynomials that remain "stable" under permutations and scaling. Restricting equivariant and invariant layers to linear combinations of these terms ensures computational efficiency and reduced memory consumption. + +In particular, our contribution is as follows: + +1. We introduce a class of polynomials in the input weights, referred to as stable polynomial terms, which remain stable under the group action of the weight space. In addition, we conduct a comprehensive study of the linear independence of stable polynomial terms. +2. We characterize all equivariant and invariant layers among the linear combination of the stable polynomial terms. These layers are polynomials of degree at most $L + 1$ where $L$ is the number of layers of the input neural networks. +3. Build on top of the equivariant and invariant poly + +nomial layers, we design MAGEP-NFN, a family of monomial matrix equivariant NFNs based on the parameter-sharing mechanism that maintains both lower memory consumption and running time while preserving expressivity. + +We evaluate MAGEP-NFNs on three tasks: predicting CNN generalization from weights using Small CNN Zoo (Unterthiner et al., 2020), weight space style editing, and classifying INRs using INRs data (Zhou et al., 2024b). Experimental results show that our model achieves competitive performance and efficiency compared to existing baselines. + +# 1.2. Notations + +Let $n$ be a positive integer. We denote $\mathcal{P}_n$ as the set of all permutation matrices, and $\mathcal{D}_n$ as the set of diagonal matrices in $\mathrm{GL}_n(\mathbb{R})$ . We also denote $\mathcal{M}_n$ as the set of monomial matrices in $\mathrm{GL}_n(\mathbb{R})$ , where a monomial matrix is a product of a diagonal matrix and a permutation matrix. These sets are subgroups of $\mathrm{GL}_n(\mathbb{R})$ . In addition, we use $\mathcal{M}_n^{>0}$ and $\mathcal{M}_n^{\pm}$ to denote the set of monomial matrices whose nonzero entries are positive numbers and $\pm 1$ , respectively. + +For any permutation matrix $P \in \mathcal{P}_n$ , there exists a unique permutation $\pi \in S_n$ such that $P$ is obtained by permuting the columns of the identity matrix $I_n$ according to $\pi$ . We denote this as $P := P_{\pi}$ and refer to it as the permutation matrix associated with $\pi$ , where $S_n$ is the symmetric group of all permutations on $\{1, 2, \ldots, n\}$ . + +Organization. We reformulate the definitions of weight spaces for MLPs and CNNs, as well as the action of monomial matrix groups on these weight spaces. In Section 3, we construct polynomial equivariant and invariant layers, which serve as the main building blocks for our MAGEP-NFNs. Several experiments are conducted in Section 4 to verify the applicability and efficiency of our models in comparison with previous ones in the literature. Some related works will be recalled in Section 5. The paper concludes with a summary in Section 6. + +# 2. Background: Weight Spaces and Their Symmetries + +Let $\mathcal{U},\mathcal{V}$ be two sets and assume that a group $G$ acts on them. A function $f\colon \mathcal{U}\to \mathcal{V}$ is called $G$ -equivariant if $f(g\cdot x) = g\cdot f(x)$ for all $x\in \mathcal{U}$ and $g\in G$ . In case $G$ acts trivially on $\mathcal{V}$ , the function $f$ is called $G$ -invariant. In the context of this paper, $\mathcal{U}$ and $\mathcal{V}$ are weight spaces of a fixed neural network architecture, while $\mathcal{G}$ is a direct product of the groups of monomial matrices. + +From now on, we will fix the activation $\sigma$ to be the rectified linear unit $\sigma = \mathrm{ReLU}$ . The case when $\sigma$ is another typical + +activation, such as semilinear (e.g., LeakyReLU) or odd (e.g., sin, tanh), can be derived similarly. + +Following (Tran et al., 2024a), we write the weight space of an MLP or CNN with $L$ layers and $n_i$ channels at $i$ -th layer in the general form $\mathcal{U} = \mathcal{W}\times \mathcal{B}$ , where: + +$$ +\mathcal {W} = \mathbb {R} ^ {w _ {L} \times n _ {L} \times n _ {L - 1}} \times \dots \times \mathbb {R} ^ {w _ {2} \times n _ {2} \times n _ {1}} \times \mathbb {R} ^ {w _ {1} \times n _ {1} \times n _ {0}}, +$$ + +$$ +\mathcal {B} = \mathbb {R} ^ {b _ {L} \times n _ {L} \times 1} \quad \times \dots \times \mathbb {R} ^ {b _ {2} \times n _ {2} \times 1} \quad \times \mathbb {R} ^ {b _ {1} \times n _ {1} \times 1}. \tag {1} +$$ + +Here, $n_i$ is the number of channels at the $i$ -th layer, in particular, $n_0$ and $n_L$ are the number of channels of input and output; $w_i$ is the dimension of weights and $b_i$ is the dimension of the biases in each channel at the $i$ -th layer. + +Each element $U$ of $\mathcal{U}$ is written as $U = ([W],[b])$ , with the weights + +$$ +[ W ] = \left([ W ] ^ {(L)}, \dots , [ W ] ^ {(1)}\right) \in \mathcal {W}, \tag {2} +$$ + +and biases + +$$ +[ b ] = \left([ b ] ^ {(L)}, \dots , [ b ] ^ {(1)}\right) \in \mathcal {B}. \tag {3} +$$ + +The square brackets will be convenient in the next section when we determine polynomials in the entries of $U$ . + +The weight space $\mathcal{U}$ exhibits two primary forms of symmetry: permutation symmetry and scaling symmetry. Permutation symmetries arise from the structure of the network itself, since neurons within a hidden layer have no intrinsic ordering. On the other hand, for networks with the ReLU activation function, multiplying a neuron's bias and all its incoming weights by the same positive scalar scales its output proportionally, leading to a scaling-type symmetry. Based on the above observation, we define the group $G$ of the form + +$$ +G := \left\{I _ {n _ {L}} \right\} \times \mathcal {M} _ {n _ {L - 1}} ^ {> 0} \times \dots \times \mathcal {M} _ {n _ {1}} ^ {> 0} \times \left\{I _ {n _ {0}} \right\}, \tag {4} +$$ + +where $I_{n}$ is the identity matrix of size $n \times n$ , and $\mathcal{M}_n^{>0}$ is the set of monomial matrices whose nonzero entries are positive numbers. + +Each element $g\in G$ has the form + +$$ +g = \left(g ^ {(L)}, \dots , g ^ {(0)}\right), +$$ + +where $g^{(i)} = D^{(i)} \cdot P_{\pi_i}$ for some diagonal matrix $D^{(i)} = \mathrm{diag}(d_1^{(i)}, \ldots, d_{n_i}^{(i)})$ in $\mathcal{D}_{n_i}$ and permutation $\pi_i \in S_{n_i}$ . The action of $G$ on $\mathcal{U}$ is defined formally as + +$$ +(g, U) \mapsto g U = ([ g W ], [ g b ]), +$$ + +where: + +$$ +[ g W ] ^ {(i)} := \left(g ^ {(i)}\right) \cdot [ W ] ^ {(i)} \cdot \left(g ^ {(i - 1)}\right) ^ {- 1} +$$ + +$$ +\left[ g b \right] ^ {(i)} := \left(g ^ {(i)}\right) \cdot [ b ] ^ {(i)}, \tag {5} +$$ + +or equivalently, + +$$ +[ g W ] _ {j k} ^ {(i)} := \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot [ W ] _ {\pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} ^ {(i)} +$$ + +$$ +\left[ g b \right] _ {j} ^ {(i)} := d _ {j} ^ {(i)} \cdot \left[ b \right] _ {\pi_ {i} ^ {- 1} (j)}. \tag {6} +$$ + +With notation as above, it is well-known that the function $f = f(\cdot ;U,\sigma)$ be an MLP or CNN given in Equation (1) with the weight space $U\in \mathcal{U}$ and an activation $\sigma = \mathrm{ReLU}$ will be $G$ -invariant under the action of $G$ , i.e. + +$$ +f (\mathbf {x}; U, \sigma) = f (\mathbf {x}; g U, \sigma) \tag {7} +$$ + +for all $g\in G$ $U\in \mathcal{U}$ and $\mathbf{x}\in \mathbb{R}^{n_0}$ + +# 3. Equivariant and Invariant Polynomial Functional Networks + +In this section, we construct our MAGEP-NFNs, a new class of NFNs that exhibit equivariance to the group $G$ of monomial matrices with positive nonzero entries, as described in the previous section. The core components of MAGEP-NFNs are invariant and equivariant polynomial layers, which will be detailed in Subsection 3.2. At the heart of these layers are the stable polynomial terms, which play a crucial role in ensuring low memory consumption and computational efficiency of MAGEP-NFNs. These terms will be formally introduced in Subsection 3.1. + +# 3.1. Stable polynomial terms + +We follow the parameter-sharing mechanism used in (Tran et al., 2024a) for constructing equivariant and invariant layers from $\mathcal{U}$ to ensure low memory consumption and computational efficiency in our model. Unlike the linear layers utilized in (Tran et al., 2024a), we employ polynomial layers. This choice allows us to capture additional relationships between weights from different hidden layers of the input network, thereby enhancing the expressivity of our model. + +However, determining equivariant and invariant layers among generic polynomials in the input weights presents a significant challenge for two key reasons. First, identifying the orbits of a generic polynomial under the group action is difficult, as such polynomials lack an inherent structured compatibility with the symmetry group of the weight space. Second, computations involving equivariant and invariant layers constructed from generic polynomials are highly inefficient in both memory usage and computational cost. To address these challenges, we introduce a specialized class of polynomials, referred to as stable polynomial terms. Intuitively, a stable polynomial term is a polynomial in the + +entries of $U \in \mathcal{U}$ that remains "stable" under the action of $G$ (see Definition 3.1). By restricting equivariant and invariant polynomial layers to linear combinations of these stable polynomial terms, we ensure both computational efficiency and reduced memory consumption. + +Consider the case where the weight spaces have the same number of dimensions across all channels, which means $w_{i} = b_{i} = d$ for all $i$ . + +Definition 3.1 (Stable polynomial terms). Assume that $U = ([W],[b])$ is an element of the weight space $\mathcal{U}$ with weights $[W] = ([W]^{(L)},\dots,[W]^{(1)})$ and biases $[b] = ([b]^{(L)},\dots,[b]^{(1)})$ . For each $L \geqslant s > t \geqslant 0$ , we define the following matrices: + +$$ +\begin{array}{l} [ W ] ^ {(s, t)} := [ W ] ^ {(s)} \cdot [ W ] ^ {(s - 1)} \cdot \dots \cdot [ W ] ^ {(t + 1)}, \tag {8} \\ [ W b ] ^ {(s, t) (t)} := [ W ] ^ {(s, t)} \cdot [ b ] ^ {(t)}. \\ \end{array} +$$ + +In addition, for each indices $s$ and $t$ with $L\geqslant s,t\geqslant 0$ ,and matrices $\Psi^{(s)(L,t)}\in \mathbb{R}^{1\times n_L}$ and $\Psi^{(s,0)(L,t)}\in \mathbb{R}^{n_0\times n_L}$ , we also define the following matrices: + +$$ +\begin{array}{l} \left[ b W \right] ^ {(s) (L, t)} := \left[ b \right] ^ {(s)} \cdot \Psi^ {(s) (L, t)} \cdot \left[ W \right] ^ {(L, t)}, \tag {9} \\ [ W W ] ^ {(s, 0) (L, t)} := [ W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ W ] ^ {(L, t)}. \\ \end{array} +$$ + +The entries of the matrices $[W]^{(s,t)}$ , $[Wb]^{(s,t)(t)}$ , $[bW]^{(s)(L,t)}$ and $[WW]^{(s,0)(L,t)}$ defined above are called stable polynomial terms of $U$ under the action of $G$ . Note that we omit the $\Psi^{(-)}$ 's in $[bW]$ , $[WW]$ for simplicity, they are parameters, and are different for each $s, t$ . The denotations are straightforward and reasonable. + +In the above definition, we use the notation $[W]$ and $[WW]$ to denote products of the weight matrices $[W]^{(i)}$ with the appropriate index $i$ . The notation $[Wb]$ indicates that this is a product of several weight matrices $[W]^{(i)}$ and a bias vector $[b]^{(j)}$ , with appropriate indices $i$ and $j$ . For the indices, we use the notation $(s,t)$ to signify that the considered product contains weight matrices with indices ranging from $s$ down to $t + 1$ . When the index has two components, for example $[Wb]^{(s,t)(t)}$ , the first component $(s,t)$ specifies the range of indices for $[W]$ , while the second component $(t)$ indicates the index of the bias vector $[b]$ . Specifically, the last two terms $[bW]^{(s)(L,t)}$ and $[WW]^{(s,0)(L,t)}$ contain the matrices $\Psi^{-}$ to multiply two matrices of different sizes from the left and the right. + +Proposition 3.2 (Stable polynomial terms as generalization of weights and biases). With notation as above, then for all $L \geqslant s > t > r \geqslant 0$ , we have + +$$ +\begin{array}{l} [ W ] ^ {(s, s - 1)} \quad = [ W ] ^ {(s)} \quad \in \mathbb {R} ^ {d \times n _ {s} \times n _ {s - 1}}, \\ [ W ] ^ {(s, t)} \cdot [ W ] ^ {(t, r)} \quad = [ W ] ^ {(s, r)} \quad \in \mathbb {R} ^ {d \times n _ {s} \times n _ {r}}. \\ \left[ b W \right] ^ {(s) (s, t)} \cdot \left[ W \right] ^ {(t, r)} = \left[ b W \right] ^ {(s, r)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {r}}, \\ [ W ] ^ {(s, t)} \cdot [ W b ] ^ {(t, r)} = [ W b ] ^ {(s, r)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {r}}. \\ \end{array} +$$ + +The above proposition shows that the stable polynomial terms can be viewed as a generalization of the entries of the weight matrices $[W]^{(i)}$ and bias vectors $[b]^{(i)}$ . The stable polynomial terms defined above are actually "stable" under the action of $G$ in the sense presented in the following theorem. + +Theorem 3.3 (Stable polynomial terms are "stable"). With notation as above, let $gU = ([gW],[gb])$ be the element of $\mathcal{U}$ obtained by acting $g = (g^{(L)},\dots ,g^{(0)})\in G$ on the element $U = ([W],[b])$ . Then we have + +$$ +\begin{array}{l} [ g W ] ^ {(s, t)} \quad = (g ^ {(s)}) \cdot [ W ] ^ {(s, t)} \cdot (g ^ {(t)}) ^ {- 1}, \\ [ g b ] ^ {(s)} = \left(g ^ {(s)}\right) \cdot [ b ] ^ {(s)}, \\ [ g W g b ] ^ {(s, t) (t)} \quad = \left(g ^ {(s)}\right) \cdot [ W b ] ^ {(s, t) (t)}, \\ [ g b g W ] ^ {(s) (L, t)} \qquad = \left(g ^ {(s)}\right) \cdot [ b W ] ^ {(s) (L, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1}, \\ \left[ g W g W \right] ^ {(s, 0) (L, t)} = \left(\stackrel {\rightharpoonup} {g} ^ {(s)}\right) \cdot \left[ W W \right] ^ {(s, 0) (L, t)} \cdot \left(\stackrel {\rightharpoonup} {g} ^ {(t)}\right) ^ {- 1}. \\ \end{array} +$$ + +Intuitively, the theorem above asserts that stable polynomials exhibit compatibility with the action of the group $G$ . In particular, it provides explicit formulas for efficiently determining the transformation of stable polynomials under group actions. This property plays a crucial role in enabling the efficient computation of equivariant and invariant layers, especially when utilizing the weight-sharing mechanism. + +Inherited from Proposition 3.2 and Theorem 3.3, we define the polynomial map $I\colon \mathcal{U}\to \mathbb{R}^{d^{\prime}}$ with maps each element $U\in \mathcal{U}$ to the vector $I(U)\in \mathbb{R}^{d^{\prime}}$ of the following form: + +$$ +\begin{array}{l} I (U) := \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1}. \tag {10} \\ \end{array} +$$ + +Intuitively speaking, $I(U)$ is a linear combination of the entries from the input weights $[W]^{(s)}$ (from the first sum) and biases $[b]^{(s)}$ (the second sum), as well as all entries from the stable polynomial terms $[W]^{(s,t)}$ (the first sum), $[Wb]^{(s,t)(t)}$ (the third sum), $[bW]^{(s)(s,t)}$ (the fourth sum), and $[WW]^{(s,L)(0,t)}$ (the last fifth sum) for all appropriate indices $s$ and $t$ , with a bias. Here, the coefficients + +$\Phi_{-}$ and the connection matrix $\Psi^{-}$ (inside $[bW]^{(s)(s,t)}$ and $[WW]^{(s,L)(0,t)})$ are learnable parameters. + +It is important to note that $I(U)$ is a polynomial of degree at most $L + 1$ in the input weights, encompassing all linear layers as special cases. + +To identify invariant layers among polynomials of the form given in $I$ , an important step is to determine all relations between elements $U, U' \in \mathcal{U}$ such that $I(U) = I(U')$ . When the parameters $\Psi^{-}$ are fixed, $I$ becomes a linear function in the parameters $\Phi_{-}$ , and the difference satisfies $I(U) - I(U') = I(U - U')$ . Thus, the problem of identifying invariant layers within polynomials of the form $I$ reduces to determining the linear dependencies among stable polynomials. The following theorem characterizes these dependencies in $I(U)$ , with a formal statement provided in Theorem B.6 in the appendix. + +Theorem 3.4 (Linear dependence of stable polynomials). For a given pair of coefficients matrix $\Phi_{-}$ and $\Psi^{-}$ , if $I(U)$ given in Equation (10) is equal to zero for all input weights $U\in \mathcal{U}$ , then we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} = 0, \tag {11} \\ \end{array} +$$ + +and + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} = 0, \quad L > t > 0, \tag {12} \\ \end{array} +$$ + +and all entries of $\Phi_{-}$ and $\Psi^{-}$ , except those appear in the above two equations, are equal to zero. + +Intuitively speaking, almost stable polynomial terms are linearly independent over the reals $\mathbb{R}$ , except those in Equations (11) and (12). This linear dependence property of the stable polynomials is essential in the computation of equivariant and invariant polynomial layers using weight-sharing mechanism. The proofs of Proposition 3.2, Theorem 3.3, and Theorem 3.4 can be found in Appendix B. + +# 3.2. Polynomial Invariant and Equivariant Layers + +We now proceed to construct $G$ -invariant polynomial layers. The construction of $G$ -equivariant polynomial layers is similar and will be derived in detail in Appendix C. These + +polynomial layers serve as the fundamental building blocks for our MAGEP-NFNs. + +We define a polynomial map $I \colon \mathcal{U} \to \mathbb{R}^{d'}$ with maps each element $U \in \mathcal{U}$ to the vector $I(U) \in \mathbb{R}^{d'}$ of the form given in Equation (10). To make $I$ to be $G$ -invariant, the learnable parameters $\Phi_{-}$ and $\Psi^{-}$ must satisfy a system of constraints (usually called parameter sharing), which are induced from the condition $I(gU) = I(U)$ for all $g \in G$ and $U \in \mathcal{U}$ . We show in details what are these constraints and how to derive the concrete formula of $I$ in Appendix C. The formula of $I$ is then determined by + +$$ +\begin{array}{l} I (U) = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} \\ + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \bullet \bullet} \cdot [ W W ] _ {p p} ^ {(s, 0) (L, s)} \\ + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \bullet \bullet} \cdot [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1}. \tag {13} \\ \end{array} +$$ + +In the above formula, the bullet symbol $\bullet$ denotes that the corresponding coefficient is independent of the index at that position. The summation terms involving expressions of the form $[W]$ (respectively, $[b], [Wb], [bW], [WW])$ correspond to those present in the summation in Equation (10). The omitted terms are those eliminated during solving the parameter-sharing process to ensure that the resulting formula becomes invariant. + +To conclude, we obtain the following: + +Theorem 3.5. With the notation given above, the polynomial map $I \colon \mathcal{U} \to \mathbb{R}^{d'}$ defined by Equation (13) is $G$ -invariant. Moreover, if a map takes the form of Equation (10) and is $G$ -invariant, then it has the form given in Equation (13). + +Remark (Comparison to the invariant/equivariant linear layers in (Tran et al., 2024a)). Equation (13) describes the invariant polynomial layer derived from the parameter-sharing mechanism of our MAGEP-NFNs. In contrast, the invariant equivariant layer proposed in (Tran et al., 2024a) is an ad hoc + +Table 1: Classification train and test accuracies (%) for implicit neural representations of MNIST, FashionMNIST, and CIFAR-10. Uncertainties indicate standard error over 5 runs, baseline results are from (Tran et al., 2024a). + +
MNISTCIFAR-10FashionMNIST
MLP10.62 ± 0.5410.48 ± 0.749.95 ± 0.36
NP (Zhou et al., 2024b)69.82 ± 0.4233.74 ± 0.2658.21 ± 0.31
HNP (Zhou et al., 2024b)66.02 ± 0.5131.61 ± 0.2257.43 ± 0.46
Monomial-NFN (Tran et al., 2024a)68.43 ± 0.5134.23 ± 0.3361.15 ± 0.55
MAGEP-NFNs (ours)77.55 ± 0.6837.18 ± 0.3062.83 ± 0.57
+ +formulation and does not result from a parameter-sharing mechanism. Consequently, there is no direct relationship between our invariant layer and the invariant layer in (Tran et al., 2024a). + +However, the equivariant polynomial layer in our MAGEP-NFNs and the equivariant linear layer from (Tran et al., 2024a) are related. Specifically, the equivariant layer in (Tran et al., 2024a) is exactly the linear component of our equivariant polynomial layer. Due to the lengthy formulation and construction process, we have provided the details of the derived equivariant polynomial layers in Appendix D.4. + +# 4. Experimental Results + +In this session, we assess the performance of our Monomial Matrix Group Polynomial Equivariant Neural Functionals (MAGEP-NFNs) across a variety of equivariant and invariant tasks. For invariant tasks, we implement our model for classifying Implicit Neural Representations of images and predicting CNN generalization based on weights. The equivariant task focuses on weight space style editing. Our experiments are designed to illustrate that MAGEP-NFNs either outperform or match the performance of other baseline models with a similar number of parameters. We perform five independent runs for each experiment and report the average results. Detailed information on hyperparameter settings, training protocols, memory and runtime analysis can be found in Appendix E. Additionally, we present a supplementary experiment comparing our approach with a GNN-based functional network, which is included in Appendix F. + +# 4.1. Classifying Implicit Neural Representations of images + +Experiment setup. In this experiment, we aim to determine which class each pretrained Implicit Neural Representation (INR) weight was trained on. Following (Tran et al., 2024a), we employ three distinct INR weight datasets (Zhou et al., 2024b), each was trained on a different image dataset: CIFAR-10 (Krizhevsky & Hinton, 2009), Fashion + +MNIST (Xiao et al., 2017), and MNIST (LeCun & Cortes, 2005). Each INR weight is trained to encode a single image from its respective class, capturing the image structure by mapping pixel coordinates $(x,y)$ to the corresponding pixel color values—represented as 3-channel RGB values for CIFAR-10 and 1-channel grayscale values for MNIST and FashionMNIST. The varying complexity and diversity of the datasets provide a robust test for evaluating MAGEP-NFN's performance, demonstrating its effectiveness and benchmarking it against existing models. + +Results. We present the performance of our model alongside several baseline models, including MLP, NP (Zhou et al., 2024b), HNP (Zhou et al., 2024b), and Monomial-NFN (Tran et al., 2024a). As shown in Table 1, our model achieves the highest test accuracies across all INR datasets. Notably, it outperforms the second-best model on the MNIST dataset, by a significant margin of $7.73\%$ . For the CIFAR-10 and FashionMNIST datasets, our model also demonstrates substantial improvements, with accuracy gains of $2.95\%$ and $1.68\%$ , respectively, over the existing baselines. These results indicate that our model leverages the embedded information from the pretrained INRs more effectively than any of the compared baselines. This consistent superior performance across various INR datasets highlights the effectiveness of MAGEP-NFN. It also suggests that our model generalizes well to INR weights embedded with different image structures and complexities. + +# 4.2. Predicting CNN generalization from weights + +Experiment setup. For this experiment, we focus on predicting the generalization performance of pretrained CNNs based solely on their weights, without evaluating them on test data. We utilize the Small CNN Zoo dataset (Unterthiner et al., 2020), which contains various pretrained CNN models trained with different combinations of hyperparameters and activation functions. For our study, we split the Small CNN Zoo into two subsets: one comprising networks using ReLU activations and the other using Tanh activations. These two types of CNNs follow different group actions: $\mathcal{M}_n^{>0}$ for Relu networks (see Equation (4)) and $\mathcal{M}_{n_i}^{\pm 1}$ for Tanh networks. + +Table 2: Performance prediction of CNNs on the ReLU subset of Small CNN Zoo with varying scale augmentations. We use Kendall's $\tau$ as the evaluation metric. The uncertainty bars indicate the standard deviation across 5 runs. + +
Augment settings
No augmentU[1, 101]U[1, 102]U[1, 103]U[1, 104]
STATNet (Unterthiner et al., 2020)0.915 ± 0.0020.894 ± 0.00010.853 ± 0.0070.523 ± 0.020.516 ± 0.001
NP (Zhou et al., 2024b)0.920 ± 0.0030.900 ± 0.0020.898 ± 0.0030.884 ± 0.0020.884 ± 0.002
HNP (Zhou et al., 2024b)0.926 ± 0.0030.913 ± 0.0010.903 ± 0.0030.891 ± 0.0030.601 ± 0.02
Monomial-NFN (Tran et al., 2024a)0.922 ± 0.0010.920 ± 0.0010.919 ± 0.0010.920 ± 0.0020.920 ± 0.001
MAGEP-NFNs (ours)0.933 ± 0.0010.933 ± 0.0010.933 ± 0.0010.932 ± 0.0010.932 ± 0.001
+ +Table 3: Performance prediction of CNNs on the Tanh subset of Small CNN Zoo. We use Kendall's $\tau$ as the evaluation metric. The uncertainty bars indicate the standard deviation across 5 runs. + +
ModelKendall's τ
STATNet (Unterthiner et al., 2020)0.913 ± 0.0012
NP (Zhou et al., 2024b)0.925 ± 0.0013
HNP (Zhou et al., 2024b)0.933 ± 0.0019
Monomial-NFN (Tran et al., 2024a)0.939 ± 0.0004
MAGEP-NFNs (ours)0.940 ± 0.001
+ +To evaluate the robustness of our model to input transformations under group actions, we augment the ReLU dataset by applying randomly sampled group actions $\mathcal{M}_n^{>0}$ . Specifically, we randomly sampling the diagonal elements $\mathcal{D}_{n,ii}^{>0}$ of the matrix $\mathcal{D}_n^{>0}$ , with each element drawn from uniform distributions over different ranges, defined as $\mathcal{U}[1,10^i]$ for $i = 1,2,3,4$ . To further diversify the transformations, we also randomly sample the permutation matrix $\mathcal{P}_n$ . + +Results. Table 2 illustrates the performance of all models trained on the ReLU subset, where our MAGEP-NFNs model clearly outperforms all other baselines. Notably, it demonstrates robustness to scale and permutation symmetry, similar to Monomial-NFN, while consistently surpassing its performance across both the original and all augmented dataset settings. This suggests that incorporating polynomial layers allows our model to capture more information from the weights across different hidden layers, compared to Monomial-NFN, thereby enhancing expressivity. On the original dataset, our model achieves a Kendall's $\tau$ performance gap of 0.007 over other baselines, and maintaining at least a 0.012 advantage in all other augmented settings. Similarly, Table 3 reveals that MAGEP-NFNs achieves the highest Kendall's $\tau$ with Tanh activation, further reinforcing its superior accuracy across different network configurations. + +# 4.3. Weight space style editing + +Experiment setup. In this experiment, we focus on modifying the weights of SIREN (Sitzmann et al., 2020) to modify the image encoded within each model. We utilize the pretrained models from paper (Zhou et al., 2024b), which encode images from the CIFAR-10 and MNIST datasets. Specifically, we address two tasks aimed at modifying the embedded information: enhancing the contrast of CIFAR-10 images and dilating MNIST images encoded in the SIREN models. We report the MSE loss between the images encoded in the modified SIREN network and the ground truth contrast-enhanced CIFAR-10 images or dilated MNIST images. + +Results. Table 4 demonstrates that our model achieves performance comparable to other baselines. Specifically, MAGEP-NFNs matches the performance of NP and Monomial-NFN in the contrast-enhancing task on the CIFAR-10 dataset. Additionally, our model outperforms Monomial-NFN in the dilation task on the MNIST dataset, while achieving similar results to NP. Interestingly, NP remains a strong candidate in the weight editing tasks, and our model consistently performs on par with NP across both experiments. + +# 4.4. Ablation study on the role of higher-order terms + +To evaluate the impact of the newly introduced Inter-Layer terms ([W], [WW], [bW], [Wb]), we conduct an ablation study focusing on the invariant task of predicting CNN generalization for the ReLU subset, following the same setting outlined in Subsection 4.2. The results presented in Table 5 clearly show that the inclusion of Inter-Layer terms enhances the network's performance. Notably, the performance improves from a Kendall's $\tau$ of 0.929 with only Non Inter-Layer terms to 0.933 when both terms are combined, highlighting a significant boost in overall performance attributed to the incorporation of Inter-Layer terms. + +Table 4: Test mean squared error (lower is better) between weight-space editing methods and ground-truth image-space transformations. Uncertainties indicate standard error over 5 runs + +
Contrast (CIFAR-10)Dilate (MNIST)
MLP0.031 ± 0.0010.306 ± 0.001
NP (Zhou et al., 2024b)0.020 ± 0.0020.068 ± 0.002
HNP (Zhou et al., 2024b)0.021 ± 0.0020.071 ± 0.001
Monomial-NFN (Tran et al., 2024a)0.020 ± 0.0010.069 ± 0.002
MAGEP-NFNs (ours)0.020 ± 0.0010.068 ± 0.002
+ +Table 5: Ablation study assessing the importance of higher-order terms on the task of predicting CNN generalization on the ReLU subset. + +
ComponentsKendall's τ
Only Non Inter-Layer terms0.929
Only Inter-Layer terms0.932
Non Inter-Layer terms + [W]0.930
Non Inter-Layer terms + [WW]0.930
Non Inter-Layer terms + [Wb]0.931
Non Inter-Layer terms + [bW]0.931
Non Inter-Layer terms + Inter-Layer terms0.933
+ +# 5. Related Work + +Functional Equivalence of Neural Networks. Hecht-Nielsen was provided a foundational perspective on the relationship between weight symmetries and network functionality in (Hecht-Nielsen, 1990). This work has been extended to different network architectures, such as ReLU networks (Bui Thi Mai & Lampert, 2020; Neyshabur et al., 2015; Badrinarayanan et al., 2015; Albertini & Sontag, 1993), and sin or tanh networks (Chen et al., 1993; Fefferman & Markel, 1993; Kurkova & Kainen, 1994). These studies build on earlier insights into convergence, gradient dynamics, and structural properties of neural networks, as explored in (Allen-Zhu et al., 2019; Du et al., 2019; Frankle & Carbin, 2019; Belkin et al., 2019; Novak et al., 2018). + +Neural Functional Networks. Early NFNs have been proposed to evaluate their generalization capabilities and uncover insights into neural network dynamics (Baker et al., 2018; Eilertsen et al., 2020; Unterthiner et al., 2020; Schürholt et al., 2021; 2022a,b). These approaches typically involve either flattening the network parameters or deriving parameter statistics for further processing using standard multi-layer perceptrons (MLPs) (Unterthiner et al., 2020; Dupont et al., 2022; Luigi et al., 2023). To involve the symmetric structure of the input neural networks, Schürholt et al. (2021) introduced neuron permutation augmentations to better align model representations with their functional equivalence. Other studies have expanded on these ideas by focusing on encoding and decoding neural network parameters, primarily for reconstruction and generative modeling + +(Peebles et al., 2022; Ashkenazi et al., 2023; Knyazev et al., 2021; Erkoç et al., 2023). + +Equivariant Neural Functional Networks. To achieve NFNs that are equivariant with respect to permutation symmetries of neural networks weight space, several approaches have been used, such as: weight-sharing mechanisms (Navon et al., 2023; Zhou et al., 2024b; Kofinas et al., 2024; Zhou et al., 2024c), set-based (Andreis et al., 2023) or graph-based structures (Lim et al., 2024; Kofinas et al., 2024; Zhou et al., 2024a). + +Despite these developments, current approaches often overlook additional symmetries present in neural networks, for instance, weight scaling symmetries in ReLU networks and weight sign-flipping symmetries in sin and tanh networks. Recently, NFNs that are equivariant to both permutations and scaling have been introduced in (Kalogeropoulos et al., 2024; Tran et al., 2024a). These networks leverage advanced techniques such as graph-based message-passing mechanisms (Kalogeropoulos et al., 2024) and parameter-sharing frameworks (Tran et al., 2024a) to extend the scope of equivariant modeling and enhance the expressivity of NFNs. However, the graph-based equivariant NFNs proposed in (Kalogeropoulos et al., 2024) suffer from high memory consumption and significant runtime overhead. While, the Monomial-NFNs constructed using equivariant linear layers and a parameter-sharing mechanism in (Tran et al., 2024a) exhibit limited expressive power. + +In contrast, our MAGEP-NFNs are built upon equivariant polynomial layers, leveraging a parameter-sharing mechanism that achieves both lower memory consumption and reduced runtime while preserving strong expressivity. + +# 6. Conclusion + +We have developed MAGEP-NFN, a novel NFN that is equivariant to both permutations and scaling symmetries. Our approach follows a parameter-sharing mechanism; however, unlike previous works, we construct an equivariant polynomial layer that incorporates stable polynomial terms. This polynomial formulation enables us to capture relationships between weights from different input hidden layers, thereby enhancing the expressivity of MAGEP-NFN while maintaining low memory consumption and efficient running time. Experimental results demonstrate that our model achieves competitive performance and efficiency compared to existing baselines. + +One limitation of the equivariant polynomial layers proposed in this paper is that they are applied to a specific architecture. However, since our method is based on a parametersharing mechanism, it is applicable to other architectures with additional operators (such as layer normalization, softmax, pooling) and other activation functions, provided that the symmetric group of the weight network is known. + +# 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 + +Albertini, F. and Sontag, E. D. Identifiability of discrete-time neural networks. In Proc. European Control Conference, pp. 460-465. Springer Berlin, 1993. +Allen-Zhu, Z., Li, Y., and Song, Z. A convergence theory for deep learning via over-parameterization. In International conference on machine learning, pp. 242-252. PMLR, 2019. +Andreis, B., Bedionita, S., and Hwang, S. J. Set-based neural network encoding. arXiv preprint arXiv:2305.16625, 2023. +Andrychowicz, M., Denil, M., Gomez, S., Hoffman, M. W., Pfau, D., Schaul, T., Shillingford, B., and De Freitas, N. Learning to learn by gradient descent by gradient descent. Advances in neural information processing systems, 29, 2016. +Ashkenazi, M., Rimon, Z., Vainshtein, R., Levi, S., Richardson, E., Mintz, P., and Treister, E. Nern: Learning neural representations for neural networks. In The Eleventh International Conference on Learning Representations, ICLR 2023, Kigali, Rwanda, May 1-5, 2023. OpenReview.net, 2023. +Badrinarayanan, V., Mishra, B., and Cipolla, R. Understanding symmetries in deep networks. arXiv preprint arXiv:1511.01029, 2015. +Baker, B., Gupta, O., Raskar, R., and Naik, N. Accelerating neural architecture search using performance prediction. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Workshop Track Proceedings. OpenReview.net, 2018. URL https://openreview.net/forum?id=HJqk3N1vG. +Belkin, M., Hsu, D., Ma, S., and Mandal, S. Reconciling modern machine-learning practice and the classical bias-variance trade-off. Proceedings of the National Academy of Sciences, 116(32):15849-15854, 2019. +Bengio, S., Bengio, Y., Cloutier, J., and Gecsei, J. On the optimization of a synaptic learning rule. In *Optimality in Biological and Artificial Networks*, pp. 265-287. Routledge, 2013. + +Bui Thi Mai, P. and Lampert, C. Functional vs. parametric equivalence of relu networks. In 8th International Conference on Learning Representations, 2020. +Cao, N. D., Aziz, W., and Titov, I. Editing factual knowledge in language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, EMNLP 2021, pp. 6491-6506. Association for Computational Linguistics, 2021. +Chen, A. M., Lu, H.-m., and Hecht-Nielsen, R. On the geometry of feedforward neural network error surfaces. Neural computation, 5(6):910-927, 1993. +Du, S., Lee, J., Li, H., Wang, L., and Zhai, X. Gradient descent finds global minima of deep neural networks. In International conference on machine learning, pp. 1675-1685. PMLR, 2019. +Dupont, E., Kim, H., Eslami, S. M. A., Rezende, D. J., and Rosenbaum, D. From data to functa: Your data point is a function and you can treat it like one. In International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pp. 5694-5725. PMLR, 2022. URL https://proceedings.mlr.press/v162/dupont22a.html. +Eilertsen, G., Jonsson, D., Ropinski, T., Unger, J., and Ynnerman, A. Classifying the classifier: Dissecting the weight space of neural networks. In ECAI 2020 - 24th European Conference on Artificial Intelligence, volume 325 of Frontiers in Artificial Intelligence and Applications, pp. 1119-1126. IOS Press, 2020. URL https://doi.org/10.3233/FAIA200209. +Erkoc, Z., Ma, F., Shan, Q., Nießner, M., and Dai, A. Hyperdiffusion: Generating implicit neural fields with weight-space diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14300-14310, 2023. +Fefferman, C. and Markel, S. Recovering a feed-forward net from its output. In Advances in Neural Information Processing Systems 6, [7th NIPS Conference, Denver, Colorado, USA, 1993], pp. 335-342. Morgan Kaufmann, 1993. +Frankle, J. and Carbin, M. The lottery ticket hypothesis: Finding sparse, trainable neural networks. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019, 2019. URL https://openreview.net/forum?id=rJl-b3RcF7. +Harb, J., Schaul, T., Precup, D., and Bacon, P.-L. Policy evaluation networks. arXiv preprint arXiv:2002.11833, 2020. + +Hecht-Nielsen, R. On the algebraic structure of feedforward network weight spaces. In Advanced Neural Computers, pp. 129-135. Elsevier, 1990. +Kalogeropoulos, I., Bouritsas, G., and Panagakis, Y. Scale equivariant graph metanetworks. In Advances in Neural Information Processing Systems 38, 2024. +Knyazev, B., Drozdzal, M., Taylor, G. W., and Romero Soriano, A. Parameter prediction for unseen deep architectures. Advances in Neural Information Processing Systems, 34:29433-29448, 2021. +Kofinas, M., Knyazev, B., Zhang, Y., Chen, Y., Burghouts, G. J., Gavves, E., Snoek, C. G. M., and Zhang, D. W. Graph neural networks for learning equivariant representations of neural networks. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=oO6FsMyDBt. +Krizhevsky, A. and Hinton, G. Learning multiple layers of features from tiny images. Technical Report 0, University of Toronto, Toronto, Ontario, 2009. URL https://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf. +Kurkova, V. and Kainen, P. C. Functionally equivalent feedforward neural networks. Neural Computation, 6(3): 543-558, 1994. +LeCun, Y. and Cortes, C. The mnist database of handwritten digits. 2005. URL https://apisemantic scholar.org/CorpusID:60282629. +Lim, D., Maron, H., Law, M. T., Lorraine, J., and Lucas, J. Graph metanetworks for processing diverse neural architectures. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=ijk5hyxs0n. +Luigi, L. D., Cardace, A., Spezialietti, R., Ramirez, P. Z., Salti, S., and Stefano, L. D. Deep learning on implicit neural representations of shapes. In The Eleventh International Conference on Learning Representations, ICLR 2023, 2023. URL https://openreview.net/forum?id=OooIW-3uadi. +Metz, L., Harrison, J., Freeman, C. D., Merchant, A., Beyer, L., Bradbury, J., Agrawal, N., Poole, B., Mordatch, I., Roberts, A., et al. Velo: Training versatile learned optimizers by scaling up. arXiv preprint arXiv:2211.09760, 2022. +Mildenhall, B., Srinivasan, P. P., Tancik, M., Barron, J. T., Ramamoorthi, R., and Ng, R. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM, 65(1):99-106, 2021. + +Mitchell, E., Lin, C., Bosselut, A., Finn, C., and Manning, C. D. Fast model editing at scale. In The Tenth International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=0DcZxeWfOPT. +Navon, A., Shamsian, A., Achituve, I., Fetaya, E., Chechik, G., and Maron, H. Equivariant architectures for learning in deep weight spaces. In International Conference on Machine Learning, pp. 25790-25816. PMLR, 2023. +Neyshabur, B., Salakhutdinov, R. R., and Srebro, N. Pathsgd: Path-normalized optimization in deep neural networks. Advances in neural information processing systems, 28, 2015. +Novak, R., Bahri, Y., Abolafia, D. A., Pennington, J., and Sohl-Dickstein, J. Sensitivity and generalization in neural networks: an empirical study. arXiv preprint arXiv:1802.08760, 2018. +Peebles, W., Radosavovic, I., Brooks, T., Efros, A. A., and Malik, J. Learning to learn with generative models of neural network checkpoints. arXiv preprint arXiv:2209.12892, 2022. +Ruhe, D., Brandstetter, J., and Forre, P. Clifford group equivariant neural networks. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=n84bzMrGUD. +Runarsson, T. P. and Jonsson, M. T. Evolution and design of distributed learning rules. In 2000 IEEE Symposium on Combinations of Evolutionary Computation and Neural Networks. Proceedings of the First IEEE Symposium on Combinations of Evolutionary Computation and Neural Networks (Cat. No. 00, pp. 59-63. IEEE, 2000. +Schürholt, K., Kostadinov, D., and Borth, D. Self-supervised representation learning on neural network weights for model characteristic prediction. Advances in Neural Information Processing Systems, 34:16481-16493, 2021. +Schürholt, K., Knyazev, B., Giró-i Nieto, X., and Borth, D. Hyper-representations as generative models: Sampling unseen neural network weights. Advances in Neural Information Processing Systems, 35:27906-27920, 2022a. +Schürholt, K., Taskiran, D., Knyazev, B., Giro-i Nieto, X., and Borth, D. Model zoos: A dataset of diverse populations of neural network models. Advances in Neural Information Processing Systems, 35:38134-38148, 2022b. +Sinitsin, A., Plokhotnyuk, V., Pyrkin, D. V., Popov, S., and Babenko, A. Editable neural networks. In 8th International Conference on Learning Representations, + +2020. URL https://openreview.net/forum? id=HJedXaEtvS. +Sitzmann, V., Martel, J. N. P., Bergman, A. W., Lindell, D. B., and Wetzstein, G. Implicit neural representations with periodic activation functions. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. +Sokota, S., Hu, H., Wu, D. J., Kolter, J. Z., Foerster, J. N., and Brown, N. A fine-tuning approach to belief state modeling. In International Conference on Learning Representations, 2021. +Stanley, K. O. Compositional pattern producing networks: A novel abstraction of development. Genetic programming and evolvable machines, 8:131-162, 2007. +Tran, H., Vo, T., Huu, T., Nguyen The, A., and Nguyen, T. Monomial matrix group equivariant neural functional networks. In Advances in Neural Information Processing Systems, volume 37, pp. 48628-48665. Curran Associates, Inc., 2024a. +Tran, H. V., Nguyen, K. N., Pham, T., Chu, T. T., Le, T., and Nguyen, T. M. Distance-based tree-sliced wasserstein distance. The Thirteenth International Conference on Learning Representations, 2025a. +Tran, T., Tran, V.-H., Chu, T., Pham, T., Ghaoui, L. E., Le, T., and Nguyen, T. M. Tree-sliced wasserstein distance with nonlinear projection. arXiv preprint arXiv:2505.00968, 2025b. +Tran, V.-H., Pham, T., Tran, T., Le, T., and Nguyen, T. M. Tree-sliced Wasserstein distance on a system of lines. arXiv preprint arXiv:2406.13725, 2024b. +Tran, V.-H., Vo, T. N., Huu, T. T., and Nguyen, T. M. A clifford algebraic approach to e (n)-equivariant high-order graph neural networks. arXiv preprint arXiv:2410.04692, 2024c. +Tran, V.-H., Vo, T. N., The, A. N., Huu, T. T., Nguyen-Nhat, M.-K., Tran, T., Pham, D.-T., and Nguyen, T. M. Equivariant neural functional networks for transformers. arXiv preprint arXiv:2410.04209, 2024d. +Tran, V.-H., Chu, T. T., Nguyen, K. N., Pham, T., Le, T., and Nguyen, T. M. Spherical tree-sliced wasserstein distance. arXiv preprint arXiv:2503.11249, 2025c. +Unterthiner, T., Keysers, D., Gelly, S., Bousquet, O., and Tolstikhin, I. Predicting neural network accuracy from weights. arXiv preprint arXiv:2002.11448, 2020. + +Xiao, H., Rasul, K., and Vollgraf, R. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017. URL http://arxiv.org/abs/1708.07747. +Zhou, A., Finn, C., and Harrison, J. Universal neural functionals. Advances in neural information processing systems, 2024a. +Zhou, A., Yang, K., Burns, K., Cardace, A., Jiang, Y., Sokota, S., Kolter, J. Z., and Finn, C. Permutation equivariant neural functionals. Advances in Neural Information Processing Systems, 36, 2024b. +Zhou, A., Yang, K., Jiang, Y., Burns, K., Xu, W., Sokota, S., Kolter, J. Z., and Finn, C. Neural functional transformers. Advances in Neural Information Processing Systems, 36, 2024c. + +# Supplement to "Equivariant Polynomial Functional Networks" + +# A. Preliminaries + +This section contains notations and basic results on matrices and polynomials that will be used throughout the paper. We will mainly focus on matrices with real entries (real matrices) and polynomials with real coefficients (real polynomials). We will omit almost all of the proofs in this section as they are well-known. These results will be used in proofs in the rest of the paper. + +# A.1. Entries of matrices + +A real matrix $A$ with $m$ rows and $n$ columns is an element of $\mathbb{R}^{m \times n}$ : + +$$ +A = (a _ {i j}) _ {1 \leqslant i \leqslant m, 1 \leqslant j \leqslant n} = \left( \begin{array}{c c c c} a _ {1 1} & a _ {1 2} & \ldots & a _ {1 n} \\ a _ {2 1} & a _ {2 2} & \ldots & a _ {2 n} \\ \vdots & \vdots & \ddots & \vdots \\ a _ {m 1} & a _ {m 2} & \ldots & a _ {m n} \end{array} \right) \in \mathbb {R} ^ {m \times n}. +$$ + +The entry in the $i^{\mathrm{th}}$ -row and the $j^{\mathrm{th}}$ -column of $A$ , or the $(i,j)$ entry of $A$ , is denoted by $A_{ij} = a_{ij}$ . The $i^{\mathrm{th}}$ -row of $A$ and $j^{\mathrm{th}}$ -column of $A$ are, respectively, denoted by: + +$$ +A _ {i *} = \left(a _ {i 1}, a _ {i 2}, \dots , a _ {i n}\right) \in \mathbb {R} ^ {1 \times n}, +$$ + +$$ +{A _ {* j}} {= (a _ {1 j}, a _ {2 j}, \ldots , a _ {m j}) ^ {\top}} {\in \mathbb {R} ^ {m \times 1}.} +$$ + +Remark. Sometimes, a comma is added between two subscript indices to make sure there will be no confusion, i.e. $A_{i,j}, a_{i,j}, A_{i,*}, A_{*,j}$ . + +Let $A^{(L)},\ldots ,A^{(2)},A^{(1)}$ be $L$ matrices such that the matrix product: + +$$ +A ^ {(L)} \cdot \dots \cdot A ^ {(2)} \cdot A ^ {(1)}, +$$ + +is well-defined. + +Proposition A.1. The $(i,j)$ entry of $A^{(L)}\cdot \ldots \cdot A^{(2)}\cdot A^{(1)}$ is equal to: + +$$ +\begin{array}{l} \left(A ^ {(L)} \cdot \ldots \cdot A ^ {(2)} \cdot A ^ {(1)}\right) _ {i j} = A _ {i, *} ^ {(L)} \cdot A ^ {(L - 1)} \cdot \ldots \cdot A ^ {(2)} \cdot A _ {* , j} ^ {(1)} \\ = \sum_ {k _ {L - 1}, \dots , k _ {2}, k _ {1}} a _ {i, k _ {L - 1}} ^ {(L)} \cdot a _ {k _ {L - 1}, k _ {L - 2}} ^ {(L)} \cdot \dots \cdot a _ {k _ {2}, k _ {1}} ^ {(2)} \cdot a _ {k _ {1}, j} ^ {(1)}. \\ \end{array} +$$ + +In the case where $L = 1$ , the above equation is simply $A_{ij}^{(1)} = a_{ij}^{(1)}$ . + +We set a denotation for matrices that have only one nonzero entry with value 1. The matrix with the 1 in the $i^{\mathrm{th}}$ -row and the $j^{\mathrm{th}}$ -column, and the rest are 0, is denoted by $E_{ij}$ . Matrix $E_{ij}$ can have any shape, but its shape are usually defined by context, and will be omitted without confusion. The product of matrices of this type is presented as below. + +Proposition A.2. Let $E_{i_1,j_1}, E_{i_2,j_2}, \ldots, E_{i_L,j_L}$ be $L$ matrix units such that the product: + +$$ +E _ {i _ {1}, j _ {1}} \cdot E _ {i _ {2}, j _ {2}} \cdot \dots \cdot E _ {i _ {L}, j _ {L}}, +$$ + +is well-defined. Then: + +$$ +E _ {i _ {1}, j _ {1}} \cdot E _ {i _ {2}, j _ {2}} \cdot \ldots \cdot E _ {i _ {L}, j _ {L}} = \left(\delta_ {j _ {1}, i _ {2}} \cdot \delta_ {j _ {2}, i _ {3}} \cdot \ldots \cdot \delta_ {j _ {L - 1}, i _ {L}}\right) \cdot E _ {i _ {1}, j _ {L}}, +$$ + +where $\delta_{ij}$ is the Kronecker delta: + +$$ +\delta_ {i j} = \left\{ \begin{array}{l l} 0 & i f i \neq j, \\ 1 & i f i = j. \end{array} \right. +$$ + +We have a direct corollary for $E_{1,1}$ 's. + +Corollary A.3. We have: + +$$ +E _ {1, 1} \cdot E _ {1, 1} \cdot \dots \cdot E _ {1, 1} = E _ {1, 1}. +$$ + +# A.2. Evaluation of polynomials + +Denote $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ be the ring of all polynomials with real coefficients in $n$ indeterminates $\mathbf{x}_1,\ldots ,\mathbf{x}_n$ + +Definition A.4. A monomial of $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ is a polynomial of $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ that has one term. + +Remark. In some contexts, a monomial is defined as a polynomial that has one term with coefficient 1. We will use both of these definitions simultaneously. + +Proposition A.5. $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ is naturally a vector space over $\mathbb{R}$ . It is an infinite-dimensional vector space; moreover, the set of all monomials with coefficient 1 in $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ is a basis for the vector space. + +Remark. For $f \in \mathbb{R}[\mathbf{x}_1, \ldots, \mathbf{x}_n]$ , by saying monomials in $f$ , we refer to all monomials that appeared in the expression of $f$ . + +Polynomial evaluation is computing of the value of a polynomial when the indeterminates are substituted for some values. We have the well-known result. + +Proposition A.6. Let $f, g$ be two polynomials of $\mathbb{R}[\mathbf{x}_1, \ldots, \mathbf{x}_n]$ . If $f, g$ are equal at every evaluations, i.e. + +$$ +f \left(x _ {1}, \dots , x _ {n}\right) = g \left(x _ {1}, \dots , x _ {n}\right), \forall \left(x _ {1}, \dots , x _ {n}\right) \in \mathbb {R} ^ {n}, \tag {14} +$$ + +then $f = g$ . In other words, the only polynomial of $\mathbb{R}[\mathbf{x}_1,\dots ,\mathbf{x}_n]$ , that has $\mathbb{R}^n$ as its zero set, is the polynomial $0\in \mathbb{R}[\mathbf{x}_1,\ldots ,\mathbf{x}_n]$ . + +Remark. The result still holds if $\mathbb{R}$ is replaced by an arbitrary infinite field, but does not hold if $\mathbb{R}$ is replaced by a finite field. + +We have a direct corollary. + +Corollary A.7. Let $f$ be a nonzero polynomial of $\mathbb{R}[\mathbf{x}_1, \ldots, \mathbf{x}_n]$ . Then there exists $(x_1, \ldots, x_n) \in \mathbb{R}^n$ such that $f(x_1, \ldots, x_n) \neq 0$ . + +# A.3. Entries of tensors + +Proposition A.8. Let $a = (a_{i})_{1\leqslant i\leqslant n}$ and $b = (b_{i})_{1\leqslant i\leqslant n}$ be two vectors in $\mathbb{R}^n$ . If: + +$$ +a _ {i} \cdot b _ {j} + a _ {j} \cdot b _ {i} = 0, \tag {15} +$$ + +for all $1 \leqslant i, j \leqslant n$ , then $a = 0$ or $b = 0$ . + +Proof. Assume that both of $a$ and $b$ are not equal to 0, then there exists $i,j$ such that $a_{i}$ and $b_{j}$ are non-zero. From Equation (15), we have: + +$$ +a _ {i} \cdot b _ {i} + a _ {i} \cdot b _ {i} = 0, \tag {16} +$$ + +so $a_{i} \cdot b_{i} = 0$ . Since $a_{i}$ is non-zero, then $b_{i} = 0$ . It implies that: + +$$ +a _ {i} \cdot b _ {j} + a _ {j} \cdot b _ {i} = a _ {i} \cdot b _ {j} + 0 = a _ {i} \cdot b _ {j} \neq 0, \tag {17} +$$ + +which contradicts to Equation (15). So at least one of $a$ and $b$ is equal to 0. + +Proposition A.9. Let $A = (a_{ij})_{1\leqslant i\leqslant m,1\leqslant j\leqslant n}$ and $B = (b_{ij})_{1\leqslant i\leqslant m,1\leqslant j\leqslant n}$ be two matrices in $\mathbb{R}^{m\times n}$ . If: + +$$ +a _ {i j} \cdot b _ {k l} + a _ {k j} \cdot b _ {i l} + a _ {i l} \cdot b _ {k j} + a _ {k l} \cdot b _ {i j} = 0, \tag {18} +$$ + +for all $1 \leqslant i, k \leqslant m$ and $1 \leqslant j, l \leqslant n$ , then $A = 0$ or $B = 0$ . + +Proof. Consider Equation (18) when $1 \leqslant j = l \leqslant n$ , we have: + +$$ +\begin{array}{l} 0 = a _ {i j} \cdot b _ {k j} + a _ {k j} \cdot b _ {i j} + a _ {i j} \cdot b _ {k j} + a _ {k j} \cdot b _ {i j} (19) \\ = 2 \cdot \left(a _ {i j} \cdot b _ {k j} + a _ {k j} \cdot b _ {i j}\right), (20) \\ \end{array} +$$ + +which means: + +$$ +a _ {i j} \cdot b _ {k j} + a _ {k j} \cdot b _ {i j} = 0. \tag {21} +$$ + +This holds for all $1 \leqslant i, k \leqslant m$ . Apply Proposition A.8, we have $a_{ij} = 0$ for all $1 \leqslant i \leqslant m$ , or $b_{ij} = 0$ for all $1 \leqslant i \leqslant m$ , which means $A_{*,j} = 0$ or $B_{*,j} = 0$ . This holds for all $1 \leqslant j \leqslant n$ . Similarly, we have $A_{i,*} = 0$ or $B_{i,*} = 0$ for $1 \leqslant i \leqslant m$ . Now, assume that, both of $A$ and $B$ are not equal to 0, then there exists $i, j$ and $k, l$ such that $a_{ij}$ and $b_{kl}$ are non-zero. By previous observation, we have $B_{i,*} = B_{*,j} = A_{k,*} = A_{*,l} = 0$ . It implies that: + +$$ +a _ {i j} \cdot b _ {k l} + a _ {k j} \cdot b _ {i l} + a _ {i l} \cdot b _ {k j} + a _ {k l} \cdot b _ {i j} = a _ {i j} \cdot b _ {k l} + 0 + 0 + 0 = a _ {i j} \cdot b _ {k l} \neq 0, \tag {22} +$$ + +which contradicts to Equation (18). So at least one of $A$ and $B$ is equal to 0. + +Proposition A.8 and Proposition A.9 are, respectively, one-dimensional and two-dimensional cases. By using the same arguments, we will obtain the $d$ -dimensional version belows. + +Proposition A.10. Let $d$ be a positive integer and $n_1, n_2, \ldots, n_d$ be $d$ positive integers. Let: + +$$ +A = \left(A _ {i _ {1}, i _ {2}, \dots , i _ {d}}\right) _ {1 \leqslant i _ {1} \leqslant n _ {1}, 1 \leqslant i _ {2} \leqslant n _ {2}, \dots , 1 \leqslant i _ {d} \leqslant n _ {d}} \in \mathbb {R} ^ {n _ {1} \times n _ {2} \times \dots \times n _ {d}}, +$$ + +$$ +B = \left(B _ {i _ {1}, i _ {2}, \dots , i _ {d}}\right) _ {1 \leqslant i _ {1} \leqslant n _ {1}, 1 \leqslant i _ {2} \leqslant n _ {2}, \dots , 1 \leqslant i _ {d} \leqslant n _ {d}} \in \mathbb {R} ^ {n _ {1} \times n _ {2} \times \dots \times n _ {d}}. +$$ + +If for all $1 \leqslant i_1^0, i_1^1 \leqslant n_1, 1 \leqslant i_2^0, i_2^1 \leqslant n_2, \ldots, 1 \leqslant i_d^0, i_d^1 \leqslant n_d$ , we have: + +$$ +\sum_ {(\alpha_ {1}, \dots , \alpha_ {d}) \in \{0, 1 \} ^ {d}} \left(A _ {i _ {1} ^ {\alpha_ {1}}, i _ {2} ^ {\alpha_ {2}}, \dots , i _ {d} ^ {\alpha_ {d}}}\right) \cdot \left(B _ {i _ {1} ^ {1 - \alpha_ {1}}, i _ {2} ^ {1 - \alpha_ {2}}, \dots , i _ {d} ^ {1 - \alpha_ {d}}}\right) = 0, \tag {23} +$$ + +then $A = 0$ or $B = 0$ . + +# B. Stable Polynomial Terms + +Intuitively, a stable polynomial term is a polynomial in the entries of $U \in \mathcal{U}$ that is "stable" under the action of $G$ (see Definition B.1 below). The equivariant polynomial layers we aim to construct are linear combinations of these stable polynomial terms. In Subsection B.1, we provide a formal definition for stable polynomial terms as well as their properties. We will study the linear dependence of stable polynomial terms in the language of polynomial rings with real coefficients in Subsections B.2 and B.3. These properties play a central role in determining the parameter-sharing computation of equivariant polynomial layers in the next section. + +# B.1. Definitions and basic properties + +Recall the weight space $\mathcal{U}$ given by: + +$$ +\mathcal {U} = \mathcal {W} \times \mathcal {B}, \quad \text {w h e r e :} +$$ + +$$ +\mathcal {W} = \mathbb {R} ^ {w _ {L} \times n _ {L} \times n _ {L - 1}} \times \dots \times \mathbb {R} ^ {w _ {2} \times n _ {2} \times n _ {1}} \times \mathbb {R} ^ {w _ {1} \times n _ {1} \times n _ {0}}, +$$ + +$$ +\mathcal {B} = \mathbb {R} ^ {b _ {L} \times n _ {L} \times 1} \quad \times \dots \times \mathbb {R} ^ {b _ {2} \times n _ {2} \times 1} \quad \times \mathbb {R} ^ {b _ {1} \times n _ {1} \times 1}. +$$ + +Let us consider the case where the weight spaces have the same number of dimensions across all channels, which means $w_{i} = b_{i} = d$ for all $i$ . + +Definition B.1 (Stable polynomial terms). Let $U = ([W], [b])$ be an element of $\mathcal{U}$ with weights $[W] = ([W]^{(L)}, \ldots, [W]^{(1)})$ and biases $[b] = ([b]^{(L)}, \ldots, [b]^{(1)})$ . For each $L \geqslant s > t \geqslant 0$ , we define: + +$$ +\left[ W \right] ^ {(s, t)} := \left[ W \right] ^ {(s)} \cdot \left[ W \right] ^ {(s - 1)} \cdot \dots \cdot \left[ W \right] ^ {(t + 1)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}, \tag {24} +$$ + +$$ +[ W b ] ^ {(s, t) (t)} := [ W ] ^ {(s, t)} \cdot [ b ] ^ {(t)} \in \mathbb {R} ^ {d \times n _ {s} \times 1}. +$$ + +In addition, for each $L\geqslant s,t\geqslant 0$ , and matrices $\Psi^{(s)(L,t)}\in \mathbb{R}^{1\times n_L}$ and $\Psi^{(s,0)(L,t)}\in \mathbb{R}^{n_0\times n_L}$ , we also define + +$$ +\left[ b W \right] ^ {(s) (L, t)} := [ b ] ^ {(s)} \cdot \Psi^ {(s) (L, t)} \cdot [ W ] ^ {(L, t)} \quad \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}, \tag {25} +$$ + +$$ +[ W W ] ^ {(s, 0) (L, t)} := [ W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ W ] ^ {(L, t)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}. +$$ + +The entries of the matrices $[W]^{(s,t)}$ , $[Wb]^{(s,t)(t)}$ , $[bW]^{(s)(L,t)}$ and $[WW]^{(s,0)(L,t)}$ defined above are called stable polynomial terms of $U$ under the action of $G$ . + +The following observations are direct implications from the definition. + +- For all $L \geqslant s > t > r \geqslant 0$ : + +$$ +[ W ] ^ {(s, s - 1)} = [ W ] ^ {(s)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {s - 1}}, \tag {26} +$$ + +and + +$$ +[ W ] ^ {(s, t)} \cdot [ W ] ^ {(t, r)} = [ W ] ^ {(s, r)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {r}}, \tag {27} +$$ + +by definition. For $g = \left(g^{(L)},\ldots ,g^{(0)}\right)\in \mathcal{G}_{\mathcal{U}}$ + +$$ +[ g W ] ^ {(s, t)} = \left(g ^ {(s)}\right) \cdot [ W ] ^ {(s, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}. \tag {28} +$$ + +- If $g \in G$ , then: + +$$ +[ g W ] ^ {(L, t)} = [ W ] ^ {(L, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1} \in \mathbb {R} ^ {d \times n _ {L} \times n _ {t}} \tag {29} +$$ + +$$ +[ g W ] ^ {(s, 0)} = \left(g ^ {(s)}\right) \cdot [ W ] ^ {(s, 0)} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {0}}. \tag {30} +$$ + +- For all $L \geqslant s > t > 0$ , we have + +$$ +[ g W ] ^ {(s, t)} \cdot [ g b ] ^ {(t)} = \left(g ^ {(s)}\right) \cdot [ W ] ^ {(s, t)} \cdot [ b ] ^ {(t)} \in \mathbb {R} ^ {d \times n _ {s} \times 1} \tag {31} +$$ + +- For all $L \geqslant s > 0$ , $L > t \geqslant 0$ and $\Psi^{(s,0)(L,t)} \in \mathbb{R}^{d \times n_0 \times n_L}$ , we have: + +$$ +\begin{array}{l} [ g W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ g W ] ^ {(L, t)} \\ = \left(g ^ {(s)}\right) \cdot [ W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ W ] ^ {(L, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}. \tag {32} \\ \end{array} +$$ + +In particular, if $t = s - 1$ , we have: + +$$ +\begin{array}{l} [ g W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, s - 1)} \cdot [ g W ] ^ {(L, s - 1)} \\ = \left(g ^ {(s)}\right) \cdot [ W ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, s - 1)} \cdot [ W ] ^ {(L, s - 1)} \cdot \left(g ^ {(s - 1)}\right) ^ {- 1} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {s - 1}}. \tag {33} \\ \end{array} +$$ + +- For all $L \geqslant s > 0$ and $\Psi^{(s)(L,t)} \in \mathbb{R}^{d \times 1 \times n_L}$ , we have: + +$$ +\begin{array}{l} [ g b ] ^ {(s)} \cdot \Psi^ {(s) (L, t)} \cdot [ g W ] ^ {(L, t)} \\ = \left(g ^ {(s)}\right) \cdot [ b ] ^ {(s)} \cdot \Psi^ {(s) (L, t)} \cdot [ W ] ^ {(L, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1} \in \mathbb {R} ^ {d \times n _ {s} \times n _ {t}}. \tag {34} \\ \end{array} +$$ + +Based on the above observations, we can determine the image of the stable polynomial terms under the action of an element $g \in \mathcal{G}_{\mathcal{U}}$ as follows: + +$$ +\begin{array}{l} [ g W ] ^ {(s, t)} \qquad \qquad = (g ^ {(s)}) \cdot [ W ] ^ {(s, t)} \cdot (g ^ {(t)}) ^ {- 1}, \\ [ g b ] ^ {(s)} \qquad \qquad = (g ^ {(s)}) \cdot [ b ] ^ {(s)}, \\ \left[ g W g b \right] ^ {(s, t) (t)} = \left(g ^ {(s)}\right) \cdot \left[ W b \right] ^ {(s, t) (t)}, \\ \left[ g b g W \right] ^ {(s) (L, t)} \quad = \left(g ^ {(s)}\right) \cdot \left[ b W \right] ^ {(s) (L, t)} \cdot \left(g ^ {(t)}\right) ^ {- 1}, \\ {[ g W g W ] ^ {(s, 0) (L, t)}} {= \Big (g ^ {(s)} \Big) \cdot [ W W ] ^ {(s, 0) (L, t)} \cdot \Big (g ^ {(t)} \Big) ^ {- 1}.} \\ \end{array} +$$ + +In concrete, we have: + +$$ +\begin{array}{l} [ g W ] _ {p q} ^ {(s, t)} \qquad \qquad = \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, t)}, \\ [ g b ] _ {p} ^ {(s)} \quad = d _ {p} ^ {(s)} \cdot [ b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s)}, \\ [ g W g b ] _ {p} ^ {(s, t) (t)} \quad = d _ {p} ^ {(s)} \cdot [ W b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s, t) (t)}, \\ [ g b g W ] _ {p q} ^ {(s) (L, t)} \quad = \frac {d _ {p} ^ {(s)}}{d ^ {(t)}} \cdot [ b W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s) (L, t)}, \\ \begin{array}{l l} [ g W g W ] ^ {(s, 0) (L, t)} & = \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, 0) (L, t)}, \end{array} \\ \end{array} +$$ + +# B.2. Input weights as indeterminates + +To simplify the technical difficulties, we consider the weight space $\mathcal{U}$ in the case where $d = 1$ , i.e., + +$$ +\mathcal {U} \quad = \quad \mathcal {W} \times \mathcal {B}, \quad \text {w h e r e :} +$$ + +$$ +\mathcal {W} = \mathbb {R} ^ {n _ {L} \times n _ {L - 1}} \times \dots \times \mathbb {R} ^ {n _ {2} \times n _ {1}} \times \mathbb {R} ^ {n _ {1} \times n _ {0}}, +$$ + +$$ +\mathcal {B} = \mathbb {R} ^ {n _ {L} \times 1} \quad \times \dots \times \mathbb {R} ^ {n _ {2} \times 1} \quad \times \mathbb {R} ^ {n _ {1} \times 1}. +$$ + +We introduce the set $I$ consists of indeterminates defined by: + +$$ +I := \left\{\mathbf {x} _ {j k} ^ {(i)}: 1 \leqslant i \leqslant L, 1 \leqslant j \leqslant n _ {i}, 1 \leqslant k \leqslant n _ {i - 1} \right\} \cup \left\{\mathbf {y} _ {j} ^ {(i)}: 1 \leqslant i \leqslant L, 1 \leqslant j \leqslant n _ {i} \right\}. +$$ + +We have $|I| = \dim \mathcal{U}$ . Denote $R = \mathbb{R}[I]$ , which is the ring of all polynomials with indeterminates are all elements of $I$ . For $1 \leqslant i \leqslant L$ , we define: + +$$ +[ \mathbf {W} ] ^ {(i)} := \left(\mathbf {x} _ {j k} ^ {(i)}\right) _ {1 \leqslant j \leqslant n _ {i}, 1 \leqslant k \leqslant n _ {i - 1}} \in R ^ {n _ {i} \times n _ {i - 1}}, +$$ + +$$ +[ \mathbf {b} ] ^ {(i)} := \left(\mathbf {y} _ {j} ^ {(i)}\right) _ {1 \leqslant j \leqslant n _ {i}} \qquad \qquad \in R ^ {n _ {i} \times 1}, +$$ + +and + +$$ +[ \mathbf {W} ] ^ {(s, t)} := [ \mathbf {W} ] ^ {(s)} \cdot [ \mathbf {W} ] ^ {(s - 1)} \dots [ \mathbf {W} ] ^ {(t + 1)} \in R ^ {n _ {s} \times n _ {t}}, +$$ + +$$ +[ \mathbf {W} \mathbf {b} ] ^ {(s, t) (t)} := [ \mathbf {W} ] ^ {(s, t)} \cdot [ \mathbf {b} ] ^ {(t)} \quad \in R ^ {n _ {s} \times 1}, +$$ + +$$ +[ \mathbf {b W} ] ^ {(s) (L, t)} := [ \mathbf {b} ] ^ {(s)} \cdot \Psi^ {(s) (L, t)} \cdot [ \mathbf {W} ] ^ {(L, t)} \quad \in R ^ {n _ {s} \times n _ {t}}, +$$ + +$$ +[ \mathbf {W} \mathbf {W} ] ^ {(s, 0) (L, t)} := [ \mathbf {W} ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L, t)} \quad \in R ^ {n _ {s} \times n _ {t}}. +$$ + +with feasible indices $(s,t)$ . The coefficients $\Psi^{(-)}$ ’s are fixed real matrices and they are omitted from the notations. + +Note that the entries of these matrices are stable polynomial terms in which the entries of $U$ are now viewed as indeterminates of the polynomial ring $R$ . + +# B.3. Linear dependence of stable polynomial terms + +In this subsection, we derive a necessary condition for the coefficients $\Phi_{-}$ and $\Psi^{-}$ such that the following linear combination of stable polynomial terms are identically zero: + +$$ +\begin{array}{l} \alpha (\Phi , \Psi) := \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(s, t)} + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot [ \mathbf {b} ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(s, t) (t)} \\ \end{array} +$$ + +$$ +\begin{array}{l} + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ \mathbf {W W} ] _ {p q} ^ {(s, 0) (L, t)} + \Phi_ {1} \cdot 1. \tag {35} \\ \end{array} +$$ + +Here, $\alpha$ is parameterized by $\Phi$ and $\Psi$ , where $\Phi$ is a collection of real scalars $\Phi_{-}$ 's appeared in the linear combination and $\Psi$ is a collection of real matrices $\Psi^{-}$ 's that be used to define $[\mathbf{bW}]^{(-)}$ 's and $[\mathbf{WW}]^{(-)}$ 's. The index of each scalar $\Phi_{-}$ naturally presents its corresponding polynomial in $\alpha(\Phi, \Psi)$ . This necessary and sufficient condition enables us to determine the equivariant polynomial map via parameter sharing later. + +We first take a look at entries of $[\mathbf{W}]^{(-)}$ 's, $[\mathbf{b}]^{(-)}$ 's, $[\mathbf{W}\mathbf{b}]^{(-)}$ 's, $[\mathbf{b}\mathbf{W}]^{(-)}$ 's, $[\mathbf{W}\mathbf{W}]^{(-)}$ 's. It is clear that for one of these matrices, its entries are homogeneous polynomials with the same degree. For example: + +- $[\mathbf{W}]^{(-)}$ : The polynomial $[\mathbf{W}]_{pq}^{(s,t)}$ has degree $s - t$ . All of its monomial terms consist of one $\mathbf{x}_{-}^{(i)}$ for each $s \geqslant i > t$ . +- $[\mathbf{b}]^{(-)}$ : The polynomial $[\mathbf{b}]_p^{(s)}$ has degree 1. All of its monomial terms consist of one $\mathbf{y}_{-}^{s}$ . +- $[\mathbf{Wb}]^{(-)}$ : The polynomial $[\mathbf{Wb}]_P^{(s,t)(t)}$ has degree $s - t + 1$ . All of its monomial terms consist of one $\mathbf{x}_{-}^{(i)}$ for each $s \geqslant i > t$ and one $\mathbf{y}_{-}^{(t)}$ . +- $[\mathbf{bW}]^{(-)}$ : The polynomial $[\mathbf{bW}]_p^{(s)(L,t)}$ has degree $L - t + 1$ . All of its monomial terms consist of one $\mathbf{y}_{-}^{(s)}$ and one $\mathbf{x}_{-}^{(i)}$ for each $L \geqslant i > t$ . +- $\left[\mathbf{WW}\right]^{(-)}$ : The polynomial $\left[\mathbf{WW}\right]_{pq}^{(s,0)(L,t)}$ has degree $L + s - t$ . All of its monomial terms consist of one $\mathbf{x}_{-}^{(i)}$ for each $s \geqslant i > 0$ and one $\mathbf{x}_{-}^{(i)}$ for each $L \geqslant i > t$ . +- 1: The polynomial $1 \in R$ . + +By these above observations, we have: + +- $[\mathbf{W}]^{(-)}, [\mathbf{WW}]^{(-)}$ : Each of the polynomials $[\mathbf{W}]_{-}^{(-),}$ s and $[\mathbf{WW}]_{-}^{(-),}$ s is 0 or a non-constant element in $R$ , and it is a real polynomial of at least one indeterminate from $\mathbf{x}_{-}^{(-),}$ s. +- $[\mathbf{b}]^{(-)}$ : Each of the polynomials $[\mathbf{b}]_{-}^{(-)'}$ s is a non-constant element in $R$ , and it is a real polynomial of one indeterminate from $\mathbf{y}_{-}^{(-)'}$ . +- $\left[\mathbf{W}\mathbf{b}\right]^{(-)}$ , $\left[\mathbf{b}\mathbf{W}\right]^{(-)}$ : Each of the polynomials $\left[\mathbf{W}\mathbf{b}\right]_{-}^{(-)}$ 's and $\left[\mathbf{b}\mathbf{W}\right]_{-}^{(-)}$ 's is 0 or a non-constant element in $R$ , and it is a real polynomial of at least one indeterminate from $\mathbf{x}_{-}^{(-)}$ 's and one indeterminate from $\mathbf{y}_{-}^{(-)}$ 's. + +Therefore, if $\alpha (\Phi ,\Psi) = 0$ we must have + +$$ +0 = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(s, t)} + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ \mathbf {W W} ] _ {p q} ^ {(s, 0) (L, t)}, \tag {36} +$$ + +$$ +0 = \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot [ \mathbf {b} ] _ {p} ^ {(s)}, \tag {37} +$$ + +$$ +0 = \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(s, t) (t)} + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(s) (L, t)}, \tag {38} +$$ + +$$ +0 = \Phi_ {1} \cdot 1. \tag {39} +$$ + +We induce the constraints on $\Phi$ and $\Psi$ in these above equations by using the fact that a set of distinct monomials of $R$ is a linear independent set (see Proposition A.5). + +- Equation (36): Observe that + +- If $L \geqslant s > t \geqslant 0$ and $(s, t) \neq (L, 0)$ , then the monomials $\mathbf{x}_{-}^{(s)} \cdots \mathbf{x}_{-}^{(t+1)}$ 's only appear in the polynomials $[\mathbf{W}]_{-}^{(s, t)}$ 's. They do not appear in the polynomials $[\mathbf{W}]_{-}^{(s', t')}$ 's for all pairs $(s', t') \neq (s, t)$ , and do not appear in the polynomials $[\mathbf{W}\mathbf{W}]_{-}^{(s', 0)(L, t')}$ 's for all pairs $(s', t')$ . +- If $L \geqslant s > 0$ , $L > t \geqslant 0$ , and $s \neq t$ , then the monomials $\left(\mathbf{x}_{-}^{(s)} \cdot \ldots \cdot \mathbf{x}_{-}^{(1)}\right) \cdot \left(\mathbf{x}_{-}^{(L)} \cdot \ldots \cdot \mathbf{x}_{-}^{(t + 1)}\right)'s$ only appear in the polynomials $[\mathbf{W}\mathbf{W}]_{-}^{(s,0)(L,t)'}s$ . They do not appear in the polynomials $[\mathbf{W}]_{-}^{(s',t')}'s$ for all pairs $(s',t')$ , and do not appear in the polynomials $[\mathbf{W}\mathbf{W}]_{-}^{(s',0)(L,t')'}s$ for all pairs $(s',t') \neq (s,t)$ . + +So from Equation (36), it implies that + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(s, t)}, \tag {40} +$$ + +for all $(s,t)\neq (L,0)$ , and + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, t)}, \tag {41} +$$ + +for all $(s,t)$ that $s\neq t$ . The rest of the terms in Equation (36) is + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(L, 0)} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, s)}. \tag {42} +$$ + +- Equation (37): Since the set of all $\left[\mathbf{b}\right]_{-}^{(-),\mathrm{s}}$ , which is the set of all monomials $\mathbf{y}_{-}^{(-),\mathrm{s}}$ , is a linear independent set in $R$ , it implies that + +$$ +0 = \Phi_ {(s): p}, \tag {43} +$$ + +for all $L\geqslant s > 0$ and $1\leqslant p\leqslant n_{s}$ + +- Equation (38): Observe that + +- If $L > s > t > 0$ , then the monomials $\left(\mathbf{x}_{-}^{(s)} \cdot \ldots \cdot \mathbf{x}_{-}^{(t + 1)}\right) \cdot \mathbf{y}_{-}^{(t)}$ 's only appear in the polynomials $[\mathbf{Wb}]_{-}^{(s,t)(t)}$ 's. They do not appear in the polynomials $[\mathbf{Wb}]_{-}^{(s',t')(t')}$ 's for all $L \geqslant s' > t' > 0$ that $(s',t') \neq (s,t)$ , and do not appear in polynomials $[\mathbf{bW}]_{-}^{(s')(L,t')}$ 's for all $L \geqslant s' > 0$ and $L > t' \geqslant 0$ . +- If $L \geqslant s > 0$ , $L > t \geqslant 0$ , and $s \neq t$ , then the monomials $\mathbf{y}_{-}^{(s)} \cdot \left(\mathbf{x}_{-}^{(L)} \cdot \ldots \cdot \mathbf{x}_{-}^{(t + 1)}\right)'s$ only appear in the polynomials $[\mathbf{bW}]_{-}^{(s)(L,t)},$ s. They do not appear in the polynomials $[\mathbf{Wb}]_{-}^{(L,t')}(t')'$ s for all $L > t' > 0$ , and do not appear in the polynomials $[\mathbf{bW}]_{-}^{(s')(L,t')}$ s for all pairs $(s', t') \neq (s, t)$ . +- If $L > t > 0$ , then the monomials $\mathbf{y}_{-}^{(t)} \cdot \left(\mathbf{x}_{-}^{(L)} \cdot \ldots \cdot \mathbf{x}_{-}^{(t + 1)}\right)'s$ only appear in the polynomials $[\mathbf{Wb}]_{-}^{(L,t)(t)'}s$ and appear in the polynomials $[\mathbf{bW}]_{-}^{(t)(L,t)'}s$ . They do not appear in the polynomials $[\mathbf{Wb}]_{-}^{(L,t')}(t')'s$ for all $L > t' > 0$ that $t' \neq t$ , and do not appear in polynomials $[\mathbf{bW}]_{-}^{(s')}(L,t')'s$ for all pair $(s',t')$ that $t' \neq t$ . + +So from Equation (38), it implies that + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(s, t) (t)}, \tag {44} +$$ + +for all $L > s > t > 0$ , and + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(s) (L, t)} \tag {45} +$$ + +for all $(s,t)$ that $s\neq t$ , and + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(t) (L, t)} \tag {46} +$$ + +for all $L > t > 0$ + +- Equation (39): Clearly, it implies that + +$$ +0 = \Phi_ {1}. \tag {47} +$$ + +There are 8 equations, Equations (40)-(47), that are derived. In Equations (43) and (47), the corresponding $\Phi_{-}$ 's are directly characterized, and in Equations (40), (41), (42), (44), (45), (46), the corresponding $\Phi_{-}$ 's are not. We will characterize the $\Phi_{-}$ 's and $\Psi_{-}$ 's in Equations (40), (41), (44) and (45) below by Lemma B.2, Lemma B.3 and Lemma B.5, respectively. These lemma are stated as below (their proofs will be postponed to Section B.4). + +Lemma B.2. For a pair $(s,t)$ such that $L\geqslant s > t\geqslant 0$ and $(s,t)\neq (L,0)$ , if + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(s, t)}, \tag {48} +$$ + +then $\Phi_{(s,t):pq} = 0$ for all $p, q$ . + +Lemma B.3. For a pair $(s,t)$ such that $L\geqslant s > 0$ $L > t\geqslant 0$ , if + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ \mathbf {W W} ] _ {p q} ^ {(s, 0) (L, t)}, \tag {49} +$$ + +then $\Phi_{(s,0)(L,t):pq} = 0$ for all $p,q$ or $\Psi^{(s,0)(L,t)} = 0$ . + +Lemma B.4. For a pair $(s,t)$ such that $L\geqslant s > t > 0$ , if + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(s, t) (t)}, \tag {50} +$$ + +then $\Phi_{(s,t)(t):p} = 0$ for all $p$ . + +Lemma B.5. For a pair $(s,t)$ such that $L\geqslant s > 0$ $L > t\geqslant 0$ , if + +$$ +0 = \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(s) (L, t)}, \tag {51} +$$ + +then $\Phi_{(s)(L,t):pq} = 0$ for all $p, q$ or $\Psi^{(s)(L,t)} = 0$ . + +Remark. The reason that we skip the characterizations of $\Phi_{-}$ 's and $\Psi_{-}$ 's in Equations (42) and (46) is they can be concretely characterized. For instance, consider the case when $n_{L} = \ldots = n_{2} = n_{1} = n_{0} = 1$ . From Equation (42), we have + +$$ +\begin{array}{l} 0 = \sum_ {p = 1} ^ {1} \sum_ {q = 1} ^ {1} \Phi_ {(L, 0): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(L, 0)} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {1} \sum_ {q = 1} ^ {1} \Phi_ {(s, 0) (L, s): p q} \cdot [ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, s)} \\ = \Phi_ {(L, 0): 1, 1} \cdot [ \mathbf {W} ] _ {1, 1} ^ {(L, 0)} + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot [ \mathbf {W W} ] _ {1, 1} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +$$ +\begin{array}{l} = \Phi_ {(L, 0): 1, 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \\ + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(s)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \cdot \Psi^ {(s, 0) (L, s)} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(s + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(s + 1)}\right) \\ = \Phi_ {(L, 0): 1, 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \\ + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot \Psi^ {(s, 0) (L, s)} \cdot \left(\mathbf {x} _ {1, 1} ^ {(s)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(s + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(s + 1)}\right) \\ = \Phi_ {(L, 0): 1, 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \\ + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot \Psi^ {(s, 0) (L, s)} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right) \\ = \left(\Phi_ {(L, 0): 1, 1} + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot \Psi^ {(s, 0) (L, s)}\right) \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(2)} \cdot \mathbf {x} _ {1, 1} ^ {(1)}\right). \\ \end{array} +$$ + +It implies that + +$$ +0 = \Phi_ {(L, 0): 1, 1} + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): 1, 1} \cdot \Psi^ {(s, 0) (L, s)}. \tag {52} +$$ + +From Equation (52), we can not derive a more concrete relation on the $\Phi_{-}$ 's and $\Psi_{-}$ 's. Similarly, from Equation (46), we have + +$$ +\begin{array}{l} 0 = \sum_ {p = 1} ^ {1} \Phi_ {(L, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {1} \sum_ {q = 1} ^ {1} \Phi_ {(t) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(t) (L, t)} \\ = \Phi_ {(L, t) (t): 1} \cdot [ \mathbf {W b} ] _ {1} ^ {(L, t) (t)} + \Phi_ {(t) (L, t): 1, 1} \cdot [ \mathbf {b W} ] _ {1, 1} ^ {(t) (L, t)} \\ = \Phi_ {(L, t) (t): 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \\ + \Phi_ {(t) (L, t): 1, 1} \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \cdot \Psi^ {(t) (L, t)} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \\ = \Phi_ {(L, t) (t): 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \\ + \Phi_ {(t) (L, t): 1, 1} \cdot \Psi^ {(t) (L, t)} \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \\ = \Phi_ {(L, t) (t): 1} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \\ + \Phi_ {(t) (L, t): 1, 1} \cdot \Psi^ {(t) (L, t)} \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \\ = \left(\Phi_ {(L, t) (t): 1} + \Phi_ {(t) (L, t): 1, 1} \cdot \Psi^ {(t) (L, t)}\right) \cdot \left(\mathbf {x} _ {1, 1} ^ {(L)} \cdot \dots \cdot \mathbf {x} _ {1, 1} ^ {(t + 2)} \cdot \mathbf {x} _ {1, 1} ^ {(t + 1)}\right) \cdot \left(\mathbf {y} _ {1, 1} ^ {(t + 1)}\right) \\ \end{array} +$$ + +It implies that + +$$ +0 = \Phi_ {(L, t) (t): 1} + \Phi_ {(t) (L, t): 1, 1} \cdot \Psi^ {(t) (L, t)}. \tag {53} +$$ + +From Equation (53), we can not derive a more concrete relation on the $\Phi_{-}$ 's and $\Psi_{-}$ 's. + +Combining the discussions above, we obtain the following necessary for the coefficients $\Phi$ and $\Psi$ such that $\alpha (\Phi ,\Psi) = 0$ + +Theorem B.6. Let $\alpha(\Phi, \Psi)$ be a polynomial given in equation 35. If $\alpha(\Phi, \Psi) = 0$ , then the following condition holds: + +1. For all $L \geqslant s > t \geqslant 0$ with $(s, t) \neq (L, 0)$ , and for all $p, q$ , we have + +$$ +\Phi_ {(s, t): p q} = 0. \tag {54} +$$ + +2. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): p q} = 0, \tag {55} +$$ + +for all $p, q$ , or + +$$ +\Psi^ {(s, 0) (L, t)} = 0. \tag {56} +$$ + +3. We have + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(L, 0)} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, s)}. \tag {57} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): p} = 0. \tag {58} +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): p q} = 0, \tag {59} +$$ + +for all $p, q$ , or + +$$ +\Psi^ {(s) (L, t)} = 0. \tag {60} +$$ + +6. For all $L > t > 0$ , we have + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(t) (L, t)}. \tag {61} +$$ + +7. For all $L \geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): p} = 0. \tag {62} +$$ + +8. We have + +$$ +\Phi_ {1} = 0. \tag {63} +$$ + +Proof. By the previous observations, $\alpha (\Phi ,\Psi) = 0$ implies four Equations (36)-(39). These equations imply Equations (40)-(47). The proof of all parts in Theorem B.6 are as follows. + +1. It comes from Equation (40) and Lemma B.2. +2. It comes from Equation (41) and Lemma B.3. +3. It comes from Equation (42). +4. It comes from Equation (44) and Lemma B.4 +5. It comes from Equation (45) and Lemma B.5. +6. It comes from Equation (46). +7. It comes from Equation (43). +8. It comes from Equation (47). + +The proof is finisbed. + +![](images/387fe41af74aea6bc379085c1fda18708a68f402f999544d74a3603ac071927a.jpg) + +The following corollary is a direct consequence of Theorem B.6. + +Corollary B.7. If for some $\Phi, \Phi'$ , and $\Psi$ , we have $\alpha(\Phi, \Psi) = \alpha(\Phi', \Psi)$ , then: + +1. For all $L \geqslant s > t \geqslant 0$ with $(s, t) \neq (L, 0)$ , and for all $p, q$ , we have + +$$ +\Phi_ {(s, t): p q} = \Phi_ {(s, t): p q} ^ {\prime}. \tag {64} +$$ + +2. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): p q} = \Phi_ {(s, 0) (L, t): p q} ^ {\prime}, \tag {65} +$$ + +for all $p,q$ or + +$$ +\Psi^ {(s, 0) (L, t)} = 0. \tag {66} +$$ + +3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ \mathbf {W} ] _ {p q} ^ {(L, 0)} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, s)} (67) \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {\prime} \cdot [ \mathbf {W} ] _ {p q} ^ {(L, 0)} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} ^ {\prime} \cdot [ \mathbf {W W} ] _ {p q} ^ {(s, 0) (L, s)}. (68) \\ \end{array} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): p} = \Phi_ {(s, t) (t): p} ^ {\prime}. \tag {69} +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): p q} = \Phi_ {(s) (L, t): p q} ^ {\prime}, \tag {70} +$$ + +for all $p, q$ , or + +$$ +\Psi^ {(s) (L, t)} = 0. \tag {71} +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ \mathbf {W b} ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ \mathbf {b W} ] _ {p q} ^ {(t) (L, t)} (72) \\ = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {\prime} \cdot [ \mathbf {W b} ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} ^ {\prime} \cdot [ \mathbf {b W} ] _ {p q} ^ {(t) (L, t)}. (73) \\ \end{array} +$$ + +7. For all $L \geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): p} = \Phi_ {(s): p} ^ {\prime}. \tag {74} +$$ + +8. We have + +$$ +\Phi_ {1} = \Phi_ {1} ^ {\prime}. \tag {75} +$$ + +Proof. Since + +$$ +0 = \alpha (\Phi , \Psi) - \alpha (\Phi^ {\prime}, \Psi) = \alpha (\Phi - \Phi^ {\prime}, \Psi), +$$ + +so the results come directly from Theorem B.6. + +![](images/586bb588a1c976c2b08576f6cbc819409bdc5ad025a7ebbd1a92097b5f61eb7f.jpg) + +# B.4. Proofs of Lemmas B.2-B.5 + +The proofs of Lemmas B.2 through B.5 are directly from the coefficient comparison of two equal polynomials and the following lemma. We omit the proofs of Lemmas B.2 through B.5 and show only the proof for Lemma B.8. + +Lemma B.8. For a feasible tuple $(s,t,p,q)$ , if + +$$ +[ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, t)} = \left([ \mathbf {W} ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L, t)}\right) _ {p q} = 0 \in R. \tag {76} +$$ + +Then $\Psi^{(s,0)(L,t)} = 0\in \mathbb{R}^{n_0\times n_L}$ + +Proof. We first consider the case where $s = L$ and $t = 0$ , then the case $s \leqslant t$ , and finally the case $s > t$ . Note that, the proof for the last case will be by combining the arguments of the first two cases. + +Case $s = L$ and $t = 0$ . From Equation (76), we have + +$$ +[ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(L, 0) (L, 0)} = \left([ \mathbf {W} ] ^ {(L, 0)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot [ \mathbf {W} ] ^ {(L, 0)}\right) _ {p q} = 0, \tag {77} +$$ + +which means + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) _ {p q} = 0. \tag {78} +$$ + +Here, we consider three cases, where $L = 1$ , $L = 2$ and $L \geqslant 3$ . + +Case $L = 1$ Equation (78) becomes + +$$ +\left. \left(\left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(1, 0) (1, 0)} \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) _ {p q} = 0. \right. \tag {79} +$$ + +By Proposition A.1, this is equivalent to + +$$ +[ \mathbf {W} ] _ {p, *} ^ {(1)} \cdot \Psi^ {(1, 0) (1, 0)} \cdot [ \mathbf {W} ] _ {*}, q ^ {(1)} = 0, \tag {80} +$$ + +which is: + +$$ +\sum_ {i = 1} ^ {n _ {0}} \sum_ {j = 0} ^ {n _ {1}} \Psi_ {i j} ^ {(1, 0) (1, 0)} \cdot \mathbf {x} _ {p, i} ^ {(1)} \cdot \mathbf {x} _ {j, q} ^ {(1)} = 0. \tag {81} +$$ + +Since the LHS of Equation (81) is a linear combination between distinct monomials + +$$ +\mathbf {x} _ {p, i} ^ {(1)} \cdot \mathbf {x} _ {j, q} ^ {(1)}, \tag {82} +$$ + +for $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_1$ , so it implies that + +$$ +\Psi_ {i j} ^ {(1, 0) (1, 0)} = 0, \tag {83} +$$ + +for all $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_1$ , which means + +$$ +\Psi^ {(1, 0) (1, 0)} = 0. \tag {84} +$$ + +- Case $L = 2$ . Equation (78) becomes + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] ^ {(2)} \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(2, 0) (2, 0)} \cdot \left[ \mathbf {W} \right] ^ {(2)} \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) _ {p q} = 0. \tag {85} +$$ + +By Proposition A.1, this is equivalent to + +$$ +[ \mathbf {W} ] _ {p, *} ^ {(2)} \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(2, 0) (2, 0)} \cdot [ \mathbf {W} ] ^ {(2)} \cdot [ \mathbf {W} ] _ {*}, q ^ {(1)} = 0, \tag {86} +$$ + +which is + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] _ {p, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* 1} ^ {(1)}, \left[ \mathbf {W} \right] _ {p, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* 2} ^ {(1)}, \dots , \left[ \mathbf {W} \right] _ {p, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* n _ {0}} ^ {(1)}\right) \cdot \Psi^ {(2, 0) (2, 0)} \tag {87} +$$ + +$$ +\cdot \left(\left[ \mathbf {W} \right] _ {1, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* , q} ^ {(1)}, \left[ \mathbf {W} \right] _ {2, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* , q} ^ {(1)}, \dots , \left[ \mathbf {W} \right] _ {n _ {2}, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* , q} ^ {(1)}\right) ^ {\top} = 0, \tag {88} +$$ + +which is + +$$ +\sum_ {i = 1} ^ {n _ {0}} \sum_ {j = 0} ^ {n _ {2}} \Psi_ {i j} ^ {(2, 0) (2, 0)} \cdot \left(\left[ \mathbf {W} \right] _ {p, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* , i} ^ {(1)}\right) \cdot \left(\left[ \mathbf {W} \right] _ {j, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {* , q} ^ {(1)}\right) = 0. \tag {89} +$$ + +Since the LHS of Equation (89) is a linear combination between elements of a linear independent collection of $R$ , which are: + +$$ +\left(\left[ \mathbf {W} \right] _ {p, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {*, i} ^ {(1)}\right) \cdot \left(\left[ \mathbf {W} \right] _ {j, *} ^ {(2)} \cdot \left[ \mathbf {W} \right] _ {*, q} ^ {(1)}\right), \tag {90} +$$ + +for $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_2$ , so it implies that + +$$ +\Psi_ {i j} ^ {(2, 0) (2, 0)} = 0, \tag {91} +$$ + +for all $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_2$ , which means + +$$ +\Psi^ {(2, 0) (2, 0)} = 0. \tag {92} +$$ + +- Case $L \geqslant 3$ . Equation (78) becomes + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) _ {p q} = 0. \tag {93} +$$ + +It is noted that the matrices $[\mathbf{W}]^{(L - 1)},\ldots ,[\mathbf{W}]^{(2)}$ can be substituted for some matrix units at $1^{\mathrm{st}}$ -row and $1^{\mathrm{st}}$ -column such that the product + +$$ +[ \mathbf {W} ] ^ {(L - 1)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(2)} \tag {94} +$$ + +becomes a matrix unit at $1^{\mathrm{st}}$ -row and $1^{\mathrm{st}}$ -column. Substitute this in Equation (93), we have + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] ^ {(L)} \cdot E _ {1 1} \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot E _ {1 1} \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) _ {p q} = 0. \tag {95} +$$ + +By Proposition A.1, this is equivalent to + +$$ +[ \mathbf {W} ] _ {p, *} ^ {(L)} \cdot E _ {1 1} \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot E _ {1 1} \cdot [ \mathbf {W} ] _ {* , q} ^ {(1)} = 0. \tag {96} +$$ + +which can be rewritten as + +$$ +[ \mathbf {W} ] _ {p, 1} ^ {(L)} \cdot [ \mathbf {W} ] _ {1, *} ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot [ \mathbf {W} ] _ {* 1} ^ {(L)} \cdot [ \mathbf {W} ] _ {1, q} ^ {(1)} = 0, \tag {97} +$$ + +or + +$$ +\mathbf {x} _ {p, 1} ^ {(L)} \cdot [ \mathbf {W} ] _ {1, *} ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot [ \mathbf {W} ] _ {* 1} ^ {(L)} \cdot \mathbf {x} _ {1, q} ^ {(1)} = 0. \tag {98} +$$ + +Since the LHS of Equation (98) is a polynomial in $R$ , we have + +$$ +[ \mathbf {W} ] _ {1, *} ^ {(1)} \cdot \Psi^ {(L, 0) (L, 0)} \cdot [ \mathbf {W} ] _ {*, 1} ^ {(L)} = 0, \tag {99} +$$ + +which is + +$$ +\sum_ {i = 1} ^ {n _ {0}} \sum_ {j = 0} ^ {n _ {L}} \Psi_ {i j} ^ {(L, 0) (L, 0)} \cdot \mathbf {x} _ {1, i} ^ {(1)} \cdot \mathbf {x} _ {j, 1} ^ {(L)} = 0. \tag {100} +$$ + +Since the LHS of Equation (100) is a linear combination between distinct monomials + +$$ +\mathbf {x} _ {1, i} ^ {(1)} \cdot \mathbf {x} _ {j, 1} ^ {(L)}, \tag {101} +$$ + +for $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_L$ , so it implies that + +$$ +\Psi_ {i j} ^ {(L, 0) (L, 0)} = 0, \tag {102} +$$ + +for all $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_L$ , which means + +$$ +\Psi^ {(L, 0) (L, 0)} = 0. \tag {103} +$$ + +In conclusion, for all cases of $L$ , we have + +$$ +\Psi^ {(L, 0) (L, 0)} = 0. \tag {104} +$$ + +We finish the proof of the case where $s = L$ and $t = 0$ . + +Case $s \leqslant t$ . From Equation (76), we have + +$$ +[ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, t)} = \left([ \mathbf {W} ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L, t)}\right) _ {p q} = 0, \tag {105} +$$ + +which means + +$$ +\left. \left([ \mathbf {W} ] ^ {(s)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(t + 1)}\right) _ {p q} = 0. \right. \tag {106} +$$ + +Since $s \leqslant t$ , the $[\mathbf{W}]^{-}$ 's that are in the product $[\mathbf{W}]^{(s)} \cdot \ldots \cdot [\mathbf{W}]^{(1)}$ , and the $[\mathbf{W}]^{-}$ 's that are in the product $[\mathbf{W}]^{(L)} \cdot \ldots \cdot [\mathbf{W}]^{(t+1)}$ , are distinct. By directly multiplying $[\mathbf{W}]^{(s)} \cdot \ldots \cdot [\mathbf{W}]^{(1)}$ and $[\mathbf{W}]^{(L)} \cdot \ldots \cdot [\mathbf{W}]^{(t+1)}$ , we can write these two products in the forms + +$$ +[ \mathbf {W} ] ^ {(s)} \cdot \ldots \cdot [ \mathbf {W} ] ^ {(1)} = \left(\mathbf {f} _ {i j} ^ {(s)}\right) _ {1 \leqslant i \leqslant n _ {s}, 1 \leqslant j \leqslant n _ {0}} \in R ^ {n _ {s} \times n _ {0}}, +$$ + +$$ +[ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(t + 1)} = \left(\mathbf {g} _ {i j} ^ {(t)}\right) _ {1 \leqslant i \leqslant n _ {L}, 1 \leqslant j \leqslant n _ {t}} \in R ^ {n _ {L} \times n _ {t}}, \tag {107} +$$ + +where all $\mathbf{f}_{-}^{(s)}$ 's are nonzero and all $\mathbf{g}_{-}^{(t)}$ 's are nonzero. Moreover, $\mathbf{f}_{-}^{(s)}$ ’s are real polynomials of indeterminates $\mathbf{x}_{-}^{(1)}$ , $\mathbf{x}_{-}^{(2)}$ , $\mathbf{s}$ , $\ldots$ , $\mathbf{x}_{-}^{(s)}$ , $\mathbf{s}$ . Similarly, $\mathbf{g}_{-}^{(t)}$ ’s are real polynomials of indeterminates $\mathbf{x}_{-}^{(L)}$ , $\mathbf{x}_{-}^{(L-1)}$ , $\mathbf{s}$ , $\ldots$ , $\mathbf{x}_{-}^{(t+1)}$ , $\mathbf{s}$ . Now, Equation (106) is equal to + +$$ +\left(\left(\mathbf {f} _ {i j} ^ {(s)}\right) _ {1 \leqslant i \leqslant n _ {s}, 1 \leqslant j \leqslant n _ {0}} \cdot \Psi^ {(s, 0) (L, t)} \cdot \left(\mathbf {g} _ {i j} ^ {(t)}\right) _ {1 \leqslant i \leqslant n _ {L}, 1 \leqslant j \leqslant n _ {t}}\right) _ {p q} = 0. \tag {108} +$$ + +By Proposition A.1, this is equivalent to + +$$ +\left(\mathbf {f} _ {p, 1} ^ {(s)}, \mathbf {f} _ {p, 2} ^ {(s)}, \dots , \mathbf {f} _ {p, n _ {0}} ^ {(s)}\right) \cdot \Psi^ {(s, 0) (L, t)} \cdot \left(\mathbf {g} _ {1, q} ^ {(t)}, \mathbf {g} _ {2, q} ^ {(t)}, \dots , \mathbf {f} _ {n _ {L}, q} ^ {(t)}\right) ^ {\top} = 0, \tag {109} +$$ + +which is + +$$ +\sum_ {i = 1} ^ {n _ {0}} \sum_ {j = 0} ^ {n _ {L}} \Psi_ {i j} ^ {(s, 0) (L, t)} \cdot \mathbf {f} _ {p, i} ^ {(s)} \cdot \mathbf {g} _ {j, q} ^ {(t)} = 0. \tag {110} +$$ + +Since the LHS of Equation (110) is a linear combination between elements of a linear independent collection of $R$ , which are + +$$ +\mathbf {f} _ {p, i} ^ {(s)} \cdot \mathbf {g} _ {j, q} ^ {(t)}, \tag {111} +$$ + +for $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_L$ . The linear dependency comes from the distinction between indeterminates of $\mathbf{f}_{-}^{(-)}$ and $\mathbf{g}_{-}^{(-)}$ . It implies that + +$$ +\Psi_ {i j} ^ {(s, 0) (L, t)} = 0, \tag {112} +$$ + +for all $1 \leqslant i \leqslant n_0$ and $1 \leqslant j \leqslant n_L$ , which means + +$$ +\Psi^ {(s, 0) (L, t)} = 0. \tag {113} +$$ + +We finish the proof of the case where $s \leqslant t$ . + +Case $s > t$ . From Equation (76), we have: + +$$ +[ \mathbf {W} \mathbf {W} ] _ {p q} ^ {(s, 0) (L, t)} = \left([ \mathbf {W} ] ^ {(s, 0)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L, t)}\right) _ {p q} = 0, \tag {114} +$$ + +which means + +$$ +\left. \right.\left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right) _ {p q} = 0. \tag {115} +$$ + +Assume that $\Psi^{(s,0)(L,t)}\neq 0\in \mathbb{R}^{n_0\times n_L}$ . Observe that + +$$ +\begin{array}{l} [ \mathbf {W} ] ^ {(s)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(t + 1)} (116) \\ = \left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)} \cdot \left[ \mathbf {W} \right] ^ {(t)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)}\right) (117) \\ \end{array} +$$ + +$$ +\begin{array}{l} \begin{array}{c} \Psi^ {(s, 0) (L, t)}. \end{array} \\ \left(\left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(s + 1)} \cdot \left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right) \\ = \left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right) \tag {118} \\ \cdot \left(\left[ \mathbf {W} \right] ^ {(t)} \cdot \ldots \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot \ldots \cdot \left[ \mathbf {W} \right] ^ {(s + 1)}\right). \\ \left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right). \\ \end{array} +$$ + +In the second term of Equation (118), + +$$ +[ \mathbf {W} ] ^ {(t)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(s + 1)}. \tag {119} +$$ + +Since $s > t$ , all $[\mathbf{W}]^{(-),\mathrm{s}}$ in Equation (119) are distinct. And since $\Psi^{(s,0)(L,t)} \neq 0 \in \mathbb{R}^{n_0 \times n_L}$ , with the same argument as in Case $s \leqslant t$ , we have + +$$ +[ \mathbf {W} ] ^ {(t)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(s + 1)} \neq 0 \in R ^ {n _ {t} \times n _ {s}}. \tag {120} +$$ + +Moreover, it can be written in the form + +$$ +\begin{array}{l} [ \mathbf {W} ] ^ {(t)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(s + 1)} (121) \\ = \left(\mathbf {c} _ {i j} ^ {(s t)}\right) _ {1 \leqslant i \leqslant n _ {t}, 1 \leqslant j \leqslant n _ {s}} \in R ^ {n _ {t} \times n _ {s}}, (122) \\ \end{array} +$$ + +where all $\mathbf{c}_{-}^{(st)}$ 's are real polynomials of indeterminates $\mathbf{x}_{-}^{(1)}$ 's, $\mathbf{x}_{-}^{(2)}$ 's, ..., $\mathbf{x}_{-}^{(t)}$ 's and $\mathbf{x}_{-}^{(L)}$ 's, $\mathbf{x}_{-}^{(L - 1)}$ 's, ..., $\mathbf{x}_{-}^{(s + 1)}$ 's, and at least one of them is a nonzero element in $R$ . By Corollary A.7, indeterminates $\mathbf{x}_{-}^{(1)}$ 's, $\mathbf{x}_{-}^{(2)}$ 's, ..., $\mathbf{x}_{-}^{(t)}$ 's and $\mathbf{x}_{-}^{(L)}$ 's, $\mathbf{x}_{-}^{(L - 1)}$ 's, ..., $\mathbf{x}_{-}^{(s+1)}$ 's can be substituted for some real values to make + +$$ +[ \mathbf {W} ] ^ {(t)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(s + 1)}, \tag {123} +$$ + +become a nonzero matrix of $\mathbb{R}^{n_t\times n_s}$ . We denote this nonzero matrix by $\overline{\Psi}^{(s,0)(L,t)}\in \mathbb{R}^{n_t\times n_s}$ . Note that, since $s > t$ , the substitution only applies for indeterminates in $[\mathbf{W}]^{(1)},[\mathbf{W}]^{(2)},\ldots ,[\mathbf{W}]^{(t)}$ and $[\mathbf{W}]^{(L)},[\mathbf{W}]^{(L - 1)},\ldots ,[\mathbf{W}]^{(s + 1)}$ . In other words, it does not apply for $[\mathbf{W}]^{(s)},\ldots ,[\mathbf{W}]^{(t + 1)}$ . So, with the above substitution, Equation (116) becomes + +$$ +\begin{array}{l} [ \mathbf {W} ] ^ {(s)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot [ \mathbf {W} ] ^ {(L)} \cdot \dots \cdot [ \mathbf {W} ] ^ {(t + 1)} \\ = \left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)} \cdot \overline {{\Psi}} ^ {(s, 0) (L, t)} \cdot \left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}. \tag {124} \\ \end{array} +$$ + +Note that, since $s > t$ , there is at least one $[\mathbf{W}]^{(-)}$ in the product $[\mathbf{W}]^{(s)} \cdots [\mathbf{W}]^{(t+1)}$ . Combine with $\overline{\Psi}^{(s,0)(L,t)} \neq 0$ , by applying the argument of Case $s = L$ and $t = 0$ , we have + +$$ +\begin{array}{l} \left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(1)} \cdot \Psi^ {(s, 0) (L, t)} \cdot \left[ \mathbf {W} \right] ^ {(L)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right) _ {p q} \\ = \left(\left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)} \cdot \overline {{\Psi}} ^ {(s, 0) (L, t)} \cdot \left[ \mathbf {W} \right] ^ {(s)} \cdot \dots \cdot \left[ \mathbf {W} \right] ^ {(t + 1)}\right) _ {p q} \neq 0, \tag {125} \\ \end{array} +$$ + +which contradicts to Equation (115). In conclusion + +$$ +\Psi^ {(s, 0) (L, t)} = 0. \tag {126} +$$ + +We finish the proof of the case where $s > t$ . + +In summary, we did consider all possible cases. The proof is finished. + +# C. Equivariant Polynomial Layers + +We now proceed to construct a $G$ -equivariant polynomial layer, denoted as $E$ . These layers serve as the fundamental building blocks for our MAGEP-NFNs. Our strategy is as follows: we first express $E$ as a polynomial layer that is a linear combination of stable polynomial terms (Subsection C.1). We then find the equivariant maps among these polynomial layers using the parameter sharing mechanism. Equivalence in Machine Learning is used in various contexts, such as Euclidean equivariance (Tran et al., 2024c; Ruhe et al., 2023), equivariant metanetwork (Tran et al., 2024d; Zhou et al., 2024c;b), Optimal Transport (Tran et al., 2024b; 2025a;c;b), etc. + +# C.1. Equivariant layer as a linear combination of stable polynomial terms + +For two weight spaces $\mathcal{U}$ and $\mathcal{U}'$ with the same number of layers $L$ as well as the same number of channels at $i^{\mathrm{th}}$ layer $n_i$ , + +$$ +\mathcal {U} = \mathcal {W} \times \mathcal {B}, \quad \text {w h e r e :} +$$ + +$$ +\mathcal {W} = \mathbb {R} ^ {w _ {L} \times n _ {L} \times n _ {L - 1}} \times \dots \times \mathbb {R} ^ {w _ {2} \times n _ {2} \times n _ {1}} \times \mathbb {R} ^ {w _ {1} \times n _ {1} \times n _ {0}}, +$$ + +$$ +\mathcal {B} = \mathbb {R} ^ {b _ {L} \times n _ {L} \times 1} \quad \times \dots \times \mathbb {R} ^ {b _ {2} \times n _ {2} \times 1} \quad \times \mathbb {R} ^ {b _ {1} \times n _ {1} \times 1}, +$$ + +and + +$$ +\mathcal {U} ^ {\prime} = \mathcal {W} ^ {\prime} \times \mathcal {B} ^ {\prime}, \quad \text {w h e r e :} +$$ + +$$ +\mathcal {W} ^ {\prime} = \mathbb {R} ^ {w _ {L} ^ {\prime} \times n _ {L} \times n _ {L - 1}} \times \dots \times \mathbb {R} ^ {w _ {2} ^ {\prime} \times n _ {2} \times n _ {1}} \times \mathbb {R} ^ {w _ {1} ^ {\prime} \times n _ {1} \times n _ {0}}, +$$ + +$$ +\mathcal {B} ^ {\prime} = \mathbb {R} ^ {b _ {L} ^ {\prime} \times n _ {L} \times 1} \quad \times \dots \times \mathbb {R} ^ {b _ {2} ^ {\prime} \times n _ {2} \times 1} \quad \times \mathbb {R} ^ {b _ {1} ^ {\prime} \times n _ {1} \times 1}. +$$ + +We want to build a map $E\colon \mathcal{U}\to \mathcal{U}^{\prime}$ such that $E$ is $G$ -equivariant, where: + +$$ +G = \left\{\operatorname {i d} _ {\mathcal {G} _ {n _ {L}}} \right\} \times \mathcal {G} _ {n _ {L - 1}} ^ {> 0} \times \dots \times \mathcal {G} _ {n _ {1}} ^ {> 0} \times \left\{\operatorname {i d} _ {\mathcal {G} _ {n _ {0}}} \right\}. \tag {127} +$$ + +Let us consider a polynomial map $E \colon \mathcal{U} \to \mathcal{U}'$ such that, for input $U = ([W],[b])$ , each entry of the output $E(U) = ([E(W)],[E(b)])$ is a linear combination of stable polynomial terms, i.e. the entries of $[W]^{(s,t)},[b]^{(s)},[Wb]^{(s,t)(t)}$ , $[bW]^{(s)(L,t)},[WW]^{(s,0)(L,t)}$ , together with a bias. In concrete: + +$$ +[ E (W) ] _ {j k} ^ {(i)} := \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j k} \cdot [ W ] _ {p q} ^ {(s, t)} + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j k} \cdot [ b ] _ {p} ^ {(s)} +$$ + +$$ +\begin{array}{l} + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j k} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j k} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j k} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} + \Phi_ {1} ^ {(i): j k}, \\ \end{array} +$$ + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(i)} := \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j} \cdot [ W ] _ {p q} ^ {(s, t)} + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} + \Phi_ {1} ^ {(i): j}. \\ \end{array} +$$ + +All $\Phi$ 's are in $\mathbb{R}^{d' \times d}$ , except the biases $\Phi_1^-$ 's are in $\mathbb{R}^{d' \times 1}$ . In summary, $E$ is parameterized by $\Phi_{-}$ 's and $\Psi_{-}$ 's. + +In order to be $G$ -equivariant, the polynomial map $E$ must satisfy the condition $E(gU) = gE(U)$ for all $g \in \mathcal{G}_{\mathcal{U}}$ and $U \in \mathcal{U}$ . In the following subsections, we derive the computations of $E(gU)$ and $gE(U)$ , and compare them in order to obtain all possible $G$ -equivariant polynomial maps among those considered. + +# C.2. Compute $E(gU)$ + +We have + +$$ +\begin{array}{l} [ E (g W) ] _ {j k} ^ {(i)} = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j k} \cdot [ g W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j k} \cdot [ g b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j k} \cdot [ g W g b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j k} \cdot [ g b g W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j k} \cdot [ g W g W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j k} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j k} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j k} \cdot d _ {p} ^ {(s)} \cdot [ b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s)} \\ \end{array} +$$ + +$$ +\begin{array}{l} + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j k} \cdot d _ {p} ^ {(s)} \cdot [ W b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j k} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ b W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j k} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j k} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): \pi_ {s} (p)} ^ {(i): j k} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): j k} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j k} \\ \end{array} +$$ + +$$ +\begin{array}{l} [ E (g b) ] _ {j} ^ {(i)} = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j} \cdot [ g W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j} \cdot [ g b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j} \cdot [ g W g b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j} \cdot [ g b g W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j} \cdot [ g W g W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} ^ {(i): j} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} ^ {(i): j} \cdot d _ {p} ^ {(s)} \cdot [ b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} ^ {(i): j} \cdot d _ {p} ^ {(s)} \cdot [ W b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s, t) (t)} \\ \end{array} +$$ + +$$ +\begin{array}{l} + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} ^ {(i): j} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ b W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} ^ {(i): j} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): \pi_ {s} (p)} ^ {(i): j} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): j} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} ^ {(i): j}. \\ \end{array} +$$ + +Note that, we can move around the $\pi$ 's in above equations since the group $G$ satisfies that: $G \cap \mathcal{P}_i$ is trivial (for $i = 0$ or $i = L$ ) or the whole $\mathcal{P}_i$ (for $0 < i < L$ ). + +# C.3. Compute $gE(U)$ + +We have: + +$$ +\begin{array}{l} [ g (E (W)) ] _ {j k} ^ {(i)} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot [ W ^ {\prime} ] _ {\pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} ^ {(i)} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s): p} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {1} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \\ \end{array} +$$ + +$$ +\begin{array}{l} \left[ g (E (b)) \right] _ {j} ^ {(i)} = d _ {j} ^ {(i)} \cdot \left[ b ^ {\prime} \right] _ {\pi_ {i} ^ {- 1} (j)} ^ {(i)} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} d _ {j} ^ {(i)} \cdot \Phi_ {(s, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} d _ {j} ^ {(i)} \cdot \Phi_ {(s): p} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} d _ {j} ^ {(i)} \cdot \Phi_ {(s, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} d _ {j} ^ {(i)} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} d _ {j} ^ {(i)} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + d _ {j} ^ {(i)} \cdot \Phi_ {1} ^ {(i): \pi_ {i} ^ {- 1} (j)} \\ \end{array} +$$ + +# C.4. Compare $E(gU)$ and $gE(U)$ + +Since $E(gU) = gE(U)$ , from Corollary B.7, the parameters $\Phi_{-}^{-}$ 's have to satisfy these following conditions: + +1. For all $L\geqslant s > t\geqslant 0$ with $(s,t)\neq (L,0)$ , and for all $p,q$ , we have + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {j} ^ {(i)} \cdot \Phi_ {(s, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} +$$ + +2. For all $L\geqslant s > 0,L > t\geqslant 0$ with $s\neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {j} ^ {(i)} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} +$$ + +3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): \pi_ {L} (p) \pi_ {0} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {L} (p)} ^ {(L)}}{d _ {\pi_ {0} (q)} ^ {(0)}} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): \pi_ {L} (p) \pi_ {0} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {L} (p)} ^ {(L)}}{d _ {\pi_ {0} (q)} ^ {(0)}} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} d _ {j} ^ {(i)} \cdot \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} d _ {j} ^ {(i)} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): j k} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): j} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {j} ^ {(i)} \cdot \Phi_ {(s, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j)}. +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {j} ^ {(i)} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} ^ {(i): j k} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): j k} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(L, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} ^ {(i): j} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): j} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} d _ {j} ^ {(i)} \cdot \Phi_ {(L, t) (t): p} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} d _ {j} ^ {(i)} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): \pi_ {i} ^ {- 1} (j)} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +7. For all $L\geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): \pi_ {s} (p)} ^ {(i): j k} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {(s): p} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {(s): \pi_ {s} (p)} ^ {(i): j} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {j} ^ {(i)} \cdot \Phi_ {(s): p} ^ {(i): \pi_ {i} ^ {- 1} (j)}. +$$ + +8. We have + +$$ +\Phi_ {1} ^ {(i): j k} = \frac {d _ {j} ^ {(i)}}{d _ {k} ^ {(i - 1)}} \cdot \Phi_ {1} ^ {(i): \pi_ {i} ^ {- 1} (j) \pi_ {i - 1} ^ {- 1} (k)} +$$ + +$$ +\Phi_ {1} ^ {(i): j} = d _ {j} ^ {(i)} \cdot \Phi_ {1} ^ {(i): \pi_ {i} ^ {- 1} (j)} +$$ + +Also, since the group $G$ satisfy that: $G \cap \mathcal{P}_i$ is trivial (for $i = 0$ or $i = L$ ) or the whole $\mathcal{P}_i$ (for $0 < i < L$ ), so we can simplify the above conditions by moving some of the permutation $\pi$ 's to the left hand sides. We have + +1. For all $L\geqslant s > t\geqslant 0$ with $(s,t)\neq (L,0)$ , and for all $p,q$ , we have + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, t): p q} ^ {(i): j k} +$$ + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, t): p q} ^ {(i): j} +$$ + +2. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): j k} +$$ + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): j} +$$ + +3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): \pi_ {L} (p) \pi_ {0} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {L} (p)} ^ {(L)}}{d _ {\pi_ {0} (q)} ^ {(0)}} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(L, 0): p q} ^ {(i): j k} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): j k} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): \pi_ {L} (p) \pi_ {0} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {L} (p)} ^ {(L)}}{d _ {\pi_ {0} (q)} ^ {(0)}} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +$$ +\begin{array}{l} = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, 0): p q} ^ {(i): j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, t) (t): p} ^ {(i): j k} +$$ + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, t) (t): p} ^ {(i): j}. +$$ + +5. For all $L\geqslant s > 0,L > t\geqslant 0$ with $s\neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): j k} +$$ + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): j} +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j k} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j k} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +7. For all $L\geqslant s > 0$ and for all $p$ , we have + +$$ +\begin{array}{l} \Phi_ {(s): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s): p} ^ {(i): j k} \\ \Phi_ {(s): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s): p} ^ {(i): j}. \\ \end{array} +$$ + +# 8. We have + +$$ +\Phi_ {1} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {1} ^ {(i): j k} +$$ + +$$ +\Phi_ {1} ^ {(i): \pi_ {i} (j)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {1} ^ {(i): j} +$$ + +From the above equalities, we can determine all constraints for the coefficients according to the entries of $[E(W)]$ as follows: + +1. If $(s,t) = (i,i - 1)\notin \{(L,L - 1),(1,0)\}$ , $p = j,q = k$ + +$$ +\Phi_ {(i, i - 1): \pi (j) \pi^ {\prime} (k)} ^ {(i): \pi (j) \pi^ {\prime} (k)} = \Phi_ {(i, i - 1): j k} ^ {(i): j k} +$$ + +- If $(s,t) = (i,i - 1) = (L,L - 1), q = k,$ + +$$ +\Phi_ {(L, L - 1): p \pi_ {L - 1} (k)} ^ {(L): j \pi_ {L - 1} (k)} = \Phi_ {(L, L - 1): p k} ^ {(L): j k} +$$ + +- If $(s,t) = (i,i - 1) = (1,0), p = j$ , + +$$ +\Phi_ {(1, 0): \pi_ {1} (j) q} ^ {(1): \pi_ {1} (j) k} = \Phi_ {(1, 0): j q} ^ {(1): j k} +$$ + +2. If $(s,t) = (i,i - 1)\notin \{(L,L - 1),(1,0)\}$ $p = j,q = k$ + +$$ +\Phi_ {(i, 0) (L, i - 1): \pi (j) \pi^ {\prime} (k)} ^ {(i): \pi (j) \pi^ {\prime} (k)} = \Phi_ {(i, 0) (L, i - 1): j k} ^ {(i): j k} +$$ + +- If $(s,t) = (i,i - 1) = (L,L - 1),q = k,$ + +$$ +\Phi_ {(L, 0) (L, L - 1): p \pi_ {L - 1} (k)} ^ {(L): j \pi_ {L - 1} (k)} = \Phi_ {(L, 0) (L, L - 1): p k} ^ {(L): j k} +$$ + +- If $(s,t) = (i,i - 1) = (1,0), p = j$ , + +$$ +\Phi_ {(1, 0) (L, 0): \pi_ {1} (j) q} ^ {(1): \pi_ {1} (j) k} = \Phi_ {(1, 0) (L, 0): j q} ^ {(1): j k} +$$ + +3. + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(L, 0): p q} ^ {(i): j k} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): j k} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +For each $L > l > 0$ , by scaling all the $d_{-}^{(l)}$ 's by the same scalar, we have + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot [ W ] _ {p q} ^ {(L, 0)} +$$ + +$$ +\begin{array}{l} + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(i): j k} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} ^ {(i): j k} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s, t) (t): p} ^ {(i): j k}. +$$ + +We have + +$$ +\Phi_ {(s, t) (t): p} ^ {(i): j k} = 0. +$$ + +5. For all $L\geqslant s > 0,L > t\geqslant 0$ with $s\neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): j k}. +$$ + +- If $(s,t) = (i,i - 1)\notin \{(L,L - 1),(1,0)\}$ , $p = j,q = k$ + +$$ +\Phi_ {(i) (L, i - 1): \pi (j) \pi^ {\prime} (k)} ^ {(i): \pi (j) \pi^ {\prime} (k)} = \Phi_ {(i) (L, i - 1): j k} ^ {(i): j k}. +$$ + +- If $i = L$ , $(s, t) = (L, L - 1)$ , $q = k$ , + +$$ +\Phi_ {(L) (L, L - 1): p \pi (k)} ^ {(L): j \pi (k)} = \Phi_ {(L) (L, L - 1): p k} ^ {(L): j k} +$$ + +- If $i = 1, (s,t) = (1,0), p = j$ , + +$$ +\Phi_ {(1) (L, 0): \pi (j) q} ^ {(1): \pi (j) k} = \Phi_ {(1) (L, 0): j q} ^ {(1): j k}. +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j k} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j k} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +For each $L > l > 0$ , by scaling all the $d_{-}^{(l)}$ 's by the same scalar, we have + +$$ +0 = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} +$$ + +$$ +\begin{array}{l} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j) \pi_ {i - 1} (k)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j k} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \frac {d _ {\pi_ {i} (j)} ^ {(i)}}{d _ {\pi_ {i - 1} (k)} ^ {(i - 1)}} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j k} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +7. If $i = s = 1$ , $p = j$ + +$$ +\Phi_ {(1): \pi (j)} ^ {(1): \pi (j) k} = \Phi_ {(1): j} ^ {(1): j k}. +$$ + +8. We have + +$$ +\Phi_ {1} ^ {(i): j k} = 0. +$$ + +Similarly, we can also determine all constraints for the coefficients according to the entries of $[E(b)]$ as follows: + +1. For all $L\geqslant s > t\geqslant 0$ with $(s,t)\neq (L,0)$ , and for all $p,q$ , we have + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, t): p q} ^ {(i): j} +$$ + +$$ +(s, t) = (i, 0), p = j, +$$ + +$$ +\Phi_ {(i, 0): \pi (j) q} ^ {(i): \pi (j)} = \Phi_ {(i, 0): j q} ^ {(i): j} +$$ + +2. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, 0) (L, t): p q} ^ {(i): j} +$$ + +- $t = 0, s = i < L, p = j$ , + +$$ +\Phi_ {(i, 0) (L, 0): \pi (j) q} ^ {(i): \pi (j)} \cdot = \Phi_ {(i, 0) (L, 0): j q} ^ {(i): j} +$$ + +$t = 0,s = i = L,$ + +$$ +\Phi_ {(L, 0) (L, 0): p q} ^ {(L): j} = \Phi_ {(L, 0) (L, 0): p q} ^ {(L): j} +$$ + +3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} (j)} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, 0): p q} ^ {(i): j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +- If $L > i > 0$ . For each $L > l > 0$ , by scaling all the $d_{-}^{(l)}$ 's by the same scalar, we have + +$$ +\begin{array}{l} 0 = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(i): \pi_ {i} (j)} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, 0): p q} ^ {(i): j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, 0) (L, s): p q} ^ {(i): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +- If $i = L$ . We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(L): j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(L): j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} ^ {(L): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +which means $\Phi_{(L,0):pq}^{(L):j}$ can be arbitrary. The rest is + +$$ +\begin{array}{l} \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} ^ {(L): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +For an $L > r > 0$ , by letting $\pi_r$ be the identity, and $d_p^{(r)}$ be 1 for all $p$ , we have + +$$ +\begin{array}{l} \sum_ {L > s > 0, s \neq r} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {L > s > 0, s \neq r} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} ^ {(L): j} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)}, \\ \end{array} +$$ + +so + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {r}} \sum_ {q = 1} ^ {n _ {r}} \Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {r} (p)} ^ {(r)}}{d _ {\pi_ {r} (q)} ^ {(r)}} \cdot [ W W ] _ {p q} ^ {(r, 0) (L, r)} \\ = \sum_ {p = 1} ^ {n _ {r}} \sum_ {q = 1} ^ {n _ {r}} \Phi_ {(r, 0) (L, r): p q} ^ {(L): j} \cdot [ W W ] _ {p q} ^ {(r, 0) (L, r)} \\ \end{array} +$$ + +By Lemma B.3 and Corollary A.7, we have + +$$ +\Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {r} (p)} ^ {(r)}}{d _ {\pi_ {r} (q)} ^ {(r)}} = \Phi_ {(r, 0) (L, r): p q} ^ {(L): j}. +$$ + +So + +$$ +\Phi_ {(r, 0) (L, r): p q} ^ {(L): j} = 0 +$$ + +for $p\neq q$ , and + +$$ +\Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (p)} ^ {(L): j} = \Phi_ {(r, 0) (L, r): p p} ^ {(L): j}. +$$ + +In conclusion, we have $\Phi_{(L,0):pq}^{(L):j}$ is arbitrary, and for $L > s > 0$ + +$$ +\Phi_ {(s, 0) (L, s): \pi (p) \pi (p)} ^ {(L): j} = \Phi_ {(s, 0) (L, s): p p} ^ {(L): j}. +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s, t) (t): p} ^ {(i): j}. +$$ + +If $i = s, p = j$ + +$$ +\Phi_ {(i, t) (t): \pi (j)} ^ {(i): \pi (j)} = \Phi_ {(i, t) (t): j} ^ {(i): j}. +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s) (L, t): p q} ^ {(i): j} +$$ + +$s = i < L,t = 0,p = j,$ + +$$ +\Phi_ {(i) (L, 0): \pi (j) q} ^ {(i): \pi (j)} = \Phi_ {(i) (L, 0): j q} ^ {(i): j} +$$ + +$s = i = L,t = 0$ + +$$ +\Phi_ {(L) (L, 0): p q} ^ {(L): j} = \Phi_ {(L) (L, 0): p q} ^ {(L): j} +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(i): \pi_ {i} (j)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +- If $L > i > 0$ . For each $L > l > 0$ , by scaling all the $d_{-}^{(l)}$ 's by the same scalar, we have + +$$ +\begin{array}{l} 0 = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(i): \pi_ {i} (j)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(L, t) (t): p} ^ {(i): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(t) (L, t): p q} ^ {(i): j} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +- If $i = L$ . We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(L): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(L): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \cdot \Phi_ {(t) (L, t): p q} ^ {(L): j} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +which means $\Phi_{(L,t)(t):p)}^{(L):j}$ can be arbitrary. The rest is + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} ^ {(L): j} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +By Lemma B.5 and Corollary A.7, we have + +$$ +\Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} ^ {(L): j} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(t) (L, t): p q} ^ {(L): j} +$$ + +So + +$$ +\Phi_ {(t) (L, t): p q} ^ {(L): j} = 0 +$$ + +for $p\neq q$ , and + +$$ +\Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (p)} ^ {(L): j} = \Phi_ {(t) (L, t): p p} ^ {(L): j} +$$ + +In conclusion, for all $L > t > 0$ , we have $\Phi_{(L,t)(t):p)}^{(L):j}$ is arbitrary, and + +$$ +\Phi_ {(t) (L, t): \pi (p) \pi (p)} ^ {(L): j} = \Phi_ {(t) (L, t): p p} ^ {(L): j}. +$$ + +7. For all $L\geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): \pi_ {s} (p)} ^ {(i): \pi_ {i} (j)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {(s): p} ^ {(i): j}. +$$ + +- If $i = s < L, p = j$ , + +$$ +\Phi_ {(i): \pi (j)} ^ {(i): \pi (j)} = \Phi_ {(i): j} ^ {(i): j}. +$$ + +If $i = s = L$ + +$$ +\Phi_ {(L): p} ^ {(L): j} = \Phi_ {(L): p} ^ {(L): j}. +$$ + +8. We have + +$$ +\Phi_ {1} ^ {(i): \pi_ {i} (j)} = d _ {\pi_ {i} (j)} ^ {(i)} \cdot \Phi_ {1} ^ {(i): j} +$$ + +- If $i = L$ , we have + +$$ +\Phi_ {1} ^ {(L): j} = \Phi_ {1} ^ {(L): j}. +$$ + +# C.5. $G$ -Equivariant polynomial layers + +Based on the above discussions, we conclude that every $G$ -equivariant polynomial layer, which is defined as a linear combination of stable polynomial terms, is given as $E(U) = ([E(W)], [E(b)])$ , where the entries of $[E(W)]$ and $[E(b)]$ are given case by case as follows: + +- For $i = L$ , we have + +$$ +\begin{array}{l} [ E (W) ] _ {j k} ^ {(L)} = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, L - 1): p \bullet} ^ {(L): j \bullet} \cdot [ W ] _ {p k} ^ {(L, L - 1)} + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, 0) (L, L - 1): p \bullet} ^ {(L): j \bullet} \cdot [ W W ] _ {p k} ^ {(L, 0) (L, L - 1)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L) (L, L - 1): p \bullet} ^ {(L): j \bullet} \cdot [ b W ] _ {p k} ^ {(L) (L, L - 1)} \\ [ E (b) ] _ {j} ^ {(L)} = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} ^ {(L); j} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(L); j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \bullet \bullet} ^ {(L): j} \cdot [ W W ] _ {p p} ^ {(s, 0) (L, s)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} ^ {(L): j} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(L): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \bullet \bullet} ^ {(L): j} \cdot [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} ^ {(L): j} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1} ^ {(L): j} \\ \end{array} +$$ + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(L)} = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} ^ {(L); j} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(L); j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \Phi_ {(s, 0) (L, s): \bullet \bullet} ^ {(L): j} \cdot \sum_ {p = 1} ^ {n _ {s}} [ W W ] _ {p p} ^ {(s, 0) (L, s)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} ^ {(L): j} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(L): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {L > t > 0} \Phi_ {(t) (L, t): \bullet \bullet} ^ {(L): j} \cdot \sum_ {p = 1} ^ {n _ {t}} [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} ^ {(L): j} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1} ^ {(L): j} \\ \end{array} +$$ + +- For $i = 1$ , we have + +$$ +[ E (W) ] _ {j k} ^ {(1)} = \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0): \bullet q} ^ {(1): \bullet k} \cdot [ W ] _ {j q} ^ {(1, 0)} + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0) (L, 0): \bullet q} ^ {(1): \bullet k} \cdot [ W W ] _ {j q} ^ {(1, 0) (L, 0)} +$$ + +$$ ++ \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1) (L, 0): \bullet q} ^ {(1): \bullet k} \cdot [ b W ] _ {j q} ^ {(1) (L, 0)} + \Phi_ {(1): \bullet} ^ {(1): \bullet k} \cdot [ b ] _ {j} ^ {(1)} +$$ + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(1)} = \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0): \bullet q} ^ {(1): \bullet} \cdot [ W ] _ {j q} ^ {(1, 0)} + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0) (L, 0): \bullet q} ^ {(1): \bullet} \cdot [ W W ] _ {j q} ^ {(1, 0) (L, 0)} \\ + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1) (L, 0): \bullet q} ^ {(1): \bullet} \cdot [ b W ] _ {j q} ^ {(1) (L, 0)} + \Phi_ {(1): \bullet} ^ {(1): \bullet} \cdot [ b ] _ {j} ^ {(1)} \\ \end{array} +$$ + +- For $L > i > 1$ , we have + +$$ +\begin{array}{l} \left[ E (W) \right] _ {j k} ^ {(i)} = \Phi_ {(i, i - 1): \bullet \bullet} ^ {(i): \bullet \bullet} \cdot \left[ W \right] _ {j k} ^ {(i, i - 1)} + \Phi_ {(i, 0) (L, i - 1): \bullet \bullet} ^ {(i): \bullet \bullet} \cdot \left[ W W \right] _ {j k} ^ {(i, 0) (L, i - 1)} \\ + \Phi_ {(i) (L, i - 1): \bullet \bullet} ^ {(i): \bullet \bullet} \cdot [ b W ] _ {j k} ^ {(i) (L, i - 1)} \\ \end{array} +$$ + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(i)} = \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(i, 0): \bullet q} ^ {(i): \bullet} \cdot [ W ] _ {j q} ^ {(i, 0)} + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(i, 0) (L, 0): \bullet q} ^ {(i): \bullet} \cdot [ W W ] _ {j q} ^ {(t, 0) (L, 0)} \\ + \sum_ {i > t > 0} \sum_ {p = 1} ^ {n _ {i}} \Phi_ {(i, t) (t): \bullet} ^ {(i): \bullet} \cdot [ W b ] _ {j} ^ {(i, t) (t)} + \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(i) (L, 0): \bullet q} ^ {(i): \bullet} \cdot [ b W ] _ {j q} ^ {(i) (L, 0)} \\ + \Phi_ {(i) \bullet} ^ {(i): \bullet} \cdot [ b ] _ {j} ^ {(i)} \\ \end{array} +$$ + +In the above formulas, the bullet $\bullet$ indicates that the corresponding coefficient is independent of the indices at the bullet. + +# D. Invariant Polynomial Layers + +In this section, we construct a polynomial map $I \colon \mathcal{U} \to \mathbb{R}^{d'}$ that is $G$ -invariant, i.e., $I(gU) = I(U)$ for all $g \in \mathcal{G}_{\mathcal{U}}$ and $U \in \mathcal{U}$ . + +# D.1. Invariant layer as a linear combination of stable polynomial terms + +Similar to the equivariant maps, we seek the invariant map among polynomial maps that is a linear combination of stable polynomial terms, specifically the entries of $[W]^{(s,t)}$ , $[b]^{(s)}$ , $[Wb]^{(s,t)(t)}$ , $[bW]^{(s)(L,t)}$ , and $[WW]^{(s,0)(L,t)}$ , along with a bias. In concrete: + +$$ +\begin{array}{l} I (U) := \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ W ] _ {p q} ^ {(s, t)} + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} + \Phi_ {1}. \\ \end{array} +$$ + +All $\Phi_{-}$ 's are in $\mathbb{R}^{d' \times d}$ , except the bias $\Phi_{1}$ is in $\mathbb{R}^{d' \times 1}$ . In summary, $I$ is parameterized by $\Phi_{-}$ 's and $\Psi_{-}$ 's. We need $I$ to be $G$ -invariant, which means $I(gU) = I(U)$ . + +# D.2. Compute $I(gU)$ + +From the definition of $I(U)$ , we have: + +$$ +\begin{array}{l} I (g U) = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot [ g W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot [ g b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot [ g W g b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot [ g b g W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot [ g W g W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): p q} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): p} \cdot d _ {p} ^ {(s)} \cdot [ b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): p} \cdot d _ {p} ^ {(s)} \cdot [ W b ] _ {\pi_ {s} ^ {- 1} (p)} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): p q} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ b W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): p q} \cdot \frac {d _ {p} ^ {(s)}}{d _ {q} ^ {(t)}} \cdot [ W W ] _ {\pi_ {s} ^ {- 1} (p), \pi_ {t} ^ {- 1} (q)} ^ {(s, 0) (L, t)} \\ + \Phi_ {1} \\ = \sum_ {L \geqslant s > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W ] _ {p q} ^ {(s, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s): \pi_ {s} (p)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ b ] _ {p} ^ {(s)} \\ + \sum_ {L \geqslant s > t > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, t) (t): \pi_ {s} (p)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} \cdot [ W b ] _ {p} ^ {(s, t) (t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(s) (L, t)} \\ + \sum_ {L \geqslant s > 0} \sum_ {L > t \geqslant 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, t)} \\ + \Phi_ {1}. \\ \end{array} +$$ + +# D.3. Compare $I(gU)$ and $I(U)$ + +Since $I(gU) = I(U)$ , from Corollary B.7, the parameters $\Phi_{-}^{-}$ 's have to satisfy these following conditions: + +1. For all $L\geqslant s > t\geqslant 0$ with $(s,t)\neq (L,0)$ , and for all $p,q$ , we have + +$$ +\Phi_ {(s, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(s, t): p q} +$$ + +2. For all $L\geqslant s > 0,L > t\geqslant 0$ with $s\neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(s, 0) (L, t): p q} +$$ + +3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): \pi_ {L} (p) \pi_ {0} (q)} \cdot \frac {d _ {\pi_ {L} (p)} ^ {(L)}}{d _ {\pi_ {0} (q)} ^ {(0)}} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): \pi_ {s} (p)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \Phi_ {(s, t) (t): p}. +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(s) (L, t): p q} +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): \pi_ {L} (p)} \cdot d _ {\pi_ {L} (p)} ^ {(L)} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} \\ + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +7. For all $L\geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): \pi_ {s} (p)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \Phi_ {(s): p}. +$$ + +# 8. We have + +$$ +\Phi_ {1} = \Phi_ {1}. +$$ + +Solve these equations, we have + +1. For all $L\geqslant s > t\geqslant 0$ with $(s,t)\neq (L,0)$ , and for all $p,q$ , we have + +$$ +\Phi_ {(s, t): p q} = 0 +$$ + +2. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s, 0) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(s, 0) (L, t): p q} +$$ + +If $(s,t) = (L,0,\mathrm{we have}$ + +$$ +\Phi_ {(L, 0) (L, 0): p q} = \Phi_ {(L, 0) (L, 0): p q}. +$$ + +# 3. We have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +which means $\Phi_{(L,0):pq}$ can be arbitrary. The rest is + +$$ +\begin{array}{l} \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ \end{array} +$$ + +For an $L > r > 0$ , by letting $\pi_r$ be the identity, and $d_p^{(r)}$ be 1 for all $p$ , we have + +$$ +\begin{array}{l} \sum_ {L > s > 0, s \neq r} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \pi_ {s} (p) \pi_ {s} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {s} (q)} ^ {(s)}} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)} \\ = \sum_ {L > s > 0, s \neq r} \sum_ {p = 1} ^ {n _ {s}} \sum_ {q = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): p q} \cdot [ W W ] _ {p q} ^ {(s, 0) (L, s)}, \\ \end{array} +$$ + +so + +$$ +\sum_ {p = 1} ^ {n _ {r}} \sum_ {q = 1} ^ {n _ {r}} \Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (q)} \cdot \frac {d _ {\pi_ {r} (p)} ^ {(r)}}{d _ {\pi_ {r} (q)} ^ {(r)}} \cdot [ W W ] _ {p q} ^ {(r, 0) (L, r)} +$$ + +$$ += \sum_ {p = 1} ^ {n _ {r}} \sum_ {q = 1} ^ {n _ {r}} \Phi_ {(r, 0) (L, r): p q} \cdot [ W W ] _ {p q} ^ {(r, 0) (L, r)} +$$ + +By Lemma B.3 and Corollary A.7, we have + +$$ +\Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (q)} \cdot \frac {d _ {\pi_ {r} (p)} ^ {(r)}}{d _ {\pi_ {r} (q)} ^ {(r)}} = \Phi_ {(r, 0) (L, r): p q}. +$$ + +So + +$$ +\Phi_ {(r, 0) (L, r): p q} = 0, +$$ + +for $p\neq q$ , and + +$$ +\Phi_ {(r, 0) (L, r): \pi_ {r} (p) \pi_ {r} (p)} = \Phi_ {(r, 0) (L, r): p p}. +$$ + +In conclusion, we have $\Phi_{(L,0):pq}$ is arbitrary, and for $L > s > 0$ + +$$ +\Phi_ {(s, 0) (L, s): \pi (p) \pi (p)} = \Phi_ {(s, 0) (L, s): p p}. +$$ + +4. For all $L > s > t > 0$ , and for all $p$ , we have + +$$ +\Phi_ {(s, t) (t): p} = 0. +$$ + +5. For all $L \geqslant s > 0$ , $L > t \geqslant 0$ with $s \neq t$ , we have + +$$ +\Phi_ {(s) (L, t): \pi_ {s} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {s} (p)} ^ {(s)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(s) (L, t): p q} +$$ + +If $(s,t) = (L,0)$ , we have + +$$ +\Phi_ {(L) (L, 0): p q} = \Phi_ {(L) (L, 0): p q}. +$$ + +6. For all $L > t > 0$ , we have + +$$ +\begin{array}{l} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} \\ \end{array} +$$ + +which means $\Phi_{(L,t)(t):p}$ can be arbitrary. The rest is + +$$ +\sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} = \sum_ {p = 1} ^ {n _ {t}} \sum_ {q = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): p q} \cdot [ b W ] _ {p q} ^ {(t) (L, t)} +$$ + +By Lemma B.5 and Lemma A.7, we have + +$$ +\Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (q)} \cdot \frac {d _ {\pi_ {t} (p)} ^ {(t)}}{d _ {\pi_ {t} (q)} ^ {(t)}} = \Phi_ {(t) (L, t): p q}. +$$ + +So + +$$ +\Phi_ {(t) (L, t): p q} = 0 +$$ + +for $p\neq q$ , and + +$$ +\Phi_ {(t) (L, t): \pi_ {t} (p) \pi_ {t} (p)} = \Phi_ {(t) (L, t): p p}. +$$ + +In conclusion, for all $L > t > 0$ , we have $\Phi_{(L,t)(t):p}$ is arbitrary, and + +$$ +\Phi_ {(t) (L, t): \pi (p) \pi (p)} = \Phi_ {(t) (L, t): p p} +$$ + +7. For all $L\geqslant s > 0$ and for all $p$ , we have + +$$ +\Phi_ {(s): \pi_ {s} (p)} \cdot d _ {\pi_ {s} (p)} ^ {(s)} = \Phi_ {(s): p}. +$$ + +If $s = L$ , we have + +$$ +\Phi_ {(L): p} = \Phi_ {(L): p}. +$$ + +8. We have + +$$ +\Phi_ {1} = \Phi_ {1}. +$$ + +# D.4. $G$ -Invariant polynomial layers + +Based on the above discussions, we conclude that every $G$ -invariant polynomial layer, which is defined as a linear combination of stable polynomial terms, is given as: + +$$ +\begin{array}{l} I (U) = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \bullet \bullet} \cdot [ W W ] _ {p p} ^ {(s, 0) (L, s)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \bullet \bullet} \cdot [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1} \\ \end{array} +$$ + +In the above formula, the bullet $\bullet$ indicates that the corresponding coefficient is independent of the index at the bullet. + +# E. Additional Experimental Details + +# E.1. Predicting generalization from weights + +Dataset. The Tanh subset from the CNN Zoo dataset has 5,949 training instances and 1,488 testing instances, while the original ReLU subset consists of 6,050 training instances and 1,513 testing instances. We do the augmentation for ReLU subset, with an augmentation factor of 2, effectively doubling the size of the dataset by adding one augmented version of each original instance. The overall dataset sizes, including both the original and augmented data, are summarized in Table 6. + +Baselines In this experiment, we compare our model with five other baselines: + +- STATNN (Unterthiner et al., 2020): utilizes statistical features of the weights and biases +- Graph-NN (Kofinas et al., 2024): represents input network parameters as graphs and processes using Graph Neural Networks. +- NP and HNP (Zhou et al., 2024b): incorporates the permutation symmetries of neurons into neural functional networks. +- Monomial-NFN (Tran et al., 2024a): extends the group action on weights from group of permutation matrices to the group of monomial matrices by incorporates scaling/sign-flipping symmetries. + +Table 6: Datasets information for predicting generalization task. + +
DatasetTrain sizeVal size
Original ReLU60501513
Augment ReLU121003026
Tanh59491488
+ +Table 7: Number of parameters of all models for predicting generalization task. + +
ModelReLU datasetTanh dataset
STATNN1.06M1.06M
NP2.03M2.03M
HNP2.81M2.81M
Monomial-NFN0.25M1.41M
MAGEP-NFN (ours)0.99M0.99M
+ +Table 8: Hyperparameters for MAGEP-NFN on prediciting generalization task. + +
MLP hiddenLossOptimizerLearning rateBatch sizeEpoch
500Binary cross-entropyAdam0.001850
+ +Table 9: Dataset size for Classifying INRs task. + +
TrainValidationTest
CIFAR-1045000500010000
MNIST size45000500010000
Fashion-MNIST45000500020000
+ +Implementation Details. Our architecture begins with a Monomial-NFN layer featuring 20 channels, aligning the dimensions of the weights and biases. This is followed by two equivariant MAGEP-NFN layers, each with 20 channels, using either a ReLU activation for the ReLU dataset or a Tanh activation for the Tanh dataset. Next, the output is processed by a MAGEP-NFN Invariant layer. The final output from this layer is flattened and mapped to $\mathbb{R}^{500}$ . This vector is further processed by a fully connected MLP with two hidden layers, both activated by ReLU. The final output undergoes a linear projection to a scalar, followed by a sigmoid function. The model is trained using Binary Cross Entropy (BCE) loss over 50 epochs, with early stopping determined by a threshold $\tau$ on the validation set. The entire training process on an A100 GPU takes 30 minutes. A summary of hyperparameters can be found in Table 8. + +For the baseline models, we adhere to the original implementations as outlined in (Zhou et al., 2024b), utilizing the official code (available at: https://github.com/AllanYangZhou/nfn), and (Tran et al., 2024a). In the HNP, NP, and Monomial-NFN models, we employ three equivariant layers with channel configurations of 16, 16, and 5, respectively. The extracted features are then passed through an average pooling layer, followed by three MLP layers with hidden dimensions of 200 (Monomial-NFN ReLU case) and 1000 neurons (Monomial-NFN Tanh case and other models). The hyperparameters for our model, along with the parameter counts for all models involved in this task, are detailed in Table 7. + +# E.2. Classifying implicit neural representations of images + +Dataset. We use the original INRs dataset, which contained three datasets: CIFAR-10, MNIST and Fashion-MNIST, obtained by applying a single SIREN model to every image. The detailed information about dataset is described in (Zhou et al., 2024b). We use the dataset without any data augmentation as in the settings of (Tran et al., 2024a). The breakdown of training, validation, and test sample sizes for each dataset is detailed in Table 9. + +Table 10: Hyperparameters of MAGEP-NFN for each dataset in Classify INRs task. + +
MNISTFashion-MNISTCIFAR-10
MAGEP-NFN hidden dimension128x36464 x 3
Base modelMAGEP-InvNPMAGEP-Inv
Base model hidden dimension128128x364
MLP hidden neurons10005001000
Dropout0.10.10.1
Learning rate0.00010.00010.0001
Batch size323232
Step200000200000200000
LossBinary cross-entropyBinary cross-entropyBinary cross-entropy
+ +Table 11: Number of parameters of all models for classifying INRs task. + +
CIFAR-10MNISTFashion-MNIST
MLP2M2M2M
NP16M15M15M
HNP42M22M22M
Monomial-NFN16M22M20M
MAGEP-NFN (ours)3.4M4.1M4.9M
+ +Table 12: Number of parameters of all models for Weight space style editing task. + +
ModelNumber of parameters
MLP4.5M
NP4.1M
HNP12.8M
Monomial-NFN4.1M
MAGEP-NFN (ours)4.1M
+ +Table 13: Hyperparameters for MAGEP-NFN on weight space style editing task. + +
NameValue
MAGEP-NFN hidden dimension16
NP dimension128
OptimizerAdam
Learning rate0.001
Batch size32
Steps50000
+ +Implementation Details. In these experiments, we use two different architectures. For both the MNIST and CIFAR datasets, the architecture begins with a Monomial-NFN layer to adjust the weight dimensions, followed by three MAGEP-NFN layers, each utilizing sine activation. The resulting weight features are then passed through a MAGEP Invariant layer. Finally, the output is flattened and processed by an MLP with two hidden layers, each containing 1,000 units and using ReLU activations. + +For the Fashion-MNIST dataset, we begin with a Monomial-NFN layer with sine activation, followed by a MAGEP-NFN + +layer also utilizing sine activation, and then a Monomial-NFN layer with absolute activation. The architecture then aligns with the design of the NP model from (Zhou et al., 2024b). Specifically, a Gaussian Fourier Transformation is applied to encode the input into sine and cosine components, mapping from 1 dimension to 256 dimensions. The encoded features are processed through IOSinusoidalEncoding, a positional encoding tailored for the NP layer, which uses a maximum frequency of 10 and 6 frequency bands. Following this, the features pass through three NP layers with ReLU activations. An average pooling is applied, after which the output is flattened, and the resulting vector is processed by an MLP with two hidden layers, each containing 1,000 units and using ReLU activations. Finally, the output is linearly projected to a scalar. We employ the Binary Cross Entropy (BCE) loss function and train the model for 200,000 steps, taking approximately 2 hours on an A100 GPU. The parameter counts for all models are presented in Table 11 + +# E.3. Weight space style editing + +Dataset. We utilize the same INRs dataset as employed in the classification task, with the sizes of the training, validation, and test sets provided in Table 9. + +Implementation Details. In these experiments, our architecture begins with two MAGEP-NFN layers, each with 16 hidden dimensions. The rest of the design follows the NP model outlined in (Zhou et al., 2024b). Specifically, we apply a Gaussian Fourier Transformation with a mapping size of 256, followed by IOSinusoidalEncoding. The features are then processed through three NP layers, each with 128 hidden dimensions and ReLU activation. The final output is passed through an NP layer for scalar projection and a LearnedScale layer as described in the Appendix of (Zhou et al., 2024b). We use the Binary Cross Entropy (BCE) loss function and train the model for 50,000 steps, which takes approximately 35 minutes on an A100 GPU. + +For the baseline models, we maintain the same settings as the official implementation. Specifically, the HNP or NP model consists of three layers, each with 128 hidden dimensions, followed by ReLU activations. An NFN of the same type is applied to map the output to one dimension, after which it is processed by a LearnedScale layer. The number of parameters for all models is detailed in Table 12, and the hyperparameters for our model are presented in Table 13. + +# F. Performance comparison with graph-based NFNs + +Experiment Setup: Following the same experiment setup in Appendix E.1, we compare the predictive performance of our model and two graph-based baselines: GNN (Kofinas et al., 2024) and ScaleGMN (Kalogeropoulos et al., 2024), using HNP (Zhou et al., 2024b) as a reference. + +Results: The results are presented in Table 14. The GNN model exhibits a noticeable performance decline when tested on separate activation subsets. Although ScaleGMN significantly improves performance on the Tanh subset, its enhancements on the ReLU subset are comparatively modest. In contrast, our model demonstrates substantial overall improvements across both datasets, highlighting its effectiveness. + +Table 14: Performance comparison with Graph-based NFNs on Small CNN Zoo task. + +
ReLU subsetTanh subset
HNP (Zhou et al., 2024b)0.8970.934
GNN (Kofinas et al., 2024)0.8970.893
ScaleGMN (Kalogeropoulos et al., 2024)0.9280.942
MAGEP-NFNs (ours)0.9330.940
+ +# G. Memory and Runtime. + +Table 15 and 16 provide runtime and memory consumption data for our model and other baselines in predicting CNN generalization task. For graph-based architectures, we compare with two recent works: GNN (Kofinas et al., 2024) and ScaleGMN (Kalogeropoulos et al., 2024). Our model runs significantly faster and uses much less memory than these graph-based networks and NP/HNP (Zhou et al., 2024b). Introducing additional polynomial terms slightly increases our model's runtime and memory usage compared to Monomial-NFN (Tran et al., 2024a). However, this trade-off results in considerably enhanced expressivity, which is evident across many tasks like Predict CNN Generalization or INRs + +Table 15: Runtime of models on Small CNN Zoo task. + +
ReLU subsetTanh subset
NP (Zhou et al., 2024b)36m40s35m34s
HNP (Zhou et al., 2024b)30m06s29m37s
GNN (Kofinas et al., 2024)4h27m29s4h25m17s
ScaledGMN (Kalogeropoulos et al., 2024)1h20m1h20m
Monomial-NFN (Tran et al., 2024a)23m47s18m23s
MAGEP-NFNs (ours)28m43s28m12s
+ +Table 16: Memory consumption of models on Small CNN Zoo task. + +
ReLU subsetTanh subset
NP (Zhou et al., 2024b)838MB838MB
HNP (Zhou et al., 2024b)856MB856MB
GNN (Kofinas et al., 2024)6390MB6390MB
ScaledGMN (Kalogeropoulos et al., 2024)2918MB2918MB
Monomial-NFN (Tran et al., 2024a)560MB582MB
MAGEP-NFNs (ours)584MB584MB
+ +Classification. + +# H. Implementation of Equivariant and Invariant Layers + +We provide the multi-channel implementations of the $\mathcal{G}_{\mathcal{U}}$ -equivariant map $E\colon \mathcal{U}^d\to \mathcal{U}^e$ and the $\mathcal{G}_{\mathcal{U}}$ -invariant map $I\colon \mathcal{U}^d\to \mathbb{R}^{e\times d'}$ . For uniformity in implementing Equivariant and Invariant layers from Appendix C.5 and Appendix D.4, we employ einops-style pseudocode as a consistent framework. + +We summarize the key dimensions in Table 17 and outline the shapes of the input terms in Table 18. + +# H.1. Equivariant Layers Pseudocode + +# H.1.1. PSEUDOCODE FOR CASE $i = L$ + +From the formula for $[E(W)]_{jk}^{(L)}$ : + +$$ +[ E (W) ] _ {j k} ^ {(L)} = \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, L - 1): p} ^ {(L): j} \cdot [ W ] _ {p k} ^ {(L, L - 1)} + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, 0) (L, L - 1): p} ^ {(L): j} \cdot [ W W ] _ {p k} ^ {(L, 0) (L, L - 1)} +$$ + +Table 17: Summary of key dimensions involved in the implementation + +
SymbolDescription
dNumber of input channels for the equivariant and invariant layer
eNumber of output channels for the equivariant and invariant layer
bBatch size
niNumber of channels at theith layer
d'Embedding dimension of the invariant layer's output
+ +Table 18: Shapes of input terms used in the implementation + +
TermShape
[W] (s,t)[b,d,n_s,n_t]
[Wb] (s,t)(t)[b,d,n_s]
[bW] (s)(L,t)[b,d,n_s,n_t]
[WW] (s,0)(L,t)[b,d,n_s,n_t]
+ +$$ ++ \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L) (L, L - 1): p} ^ {(L): j} \cdot [ b W ] _ {p k} ^ {(L) (L, L - 1)} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(L,L - 1):p}^{(L):j}\cdot [W]_{pk}^{(L,L - 1)}$ + +with $[W]_{pk}^{(L,L - 1)}$ of shape $[b,d,n_L,n_{L - 1}]$ and $\Phi_{(L,L - 1):p}^{(L):j}$ of shape $[e,d,n_L,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpj,bdpk\to bejk)$ + +For $\Phi_{(L,0)(L,L - 1):p}^{(L):j}\cdot [WW]_{pk}^{(L,0)(L,L - 1)}$ + +with $[WW]_{pk}^{(L,0)(L,L-1)}$ of shape $[b,d,n_L,n_{L-1}]$ and $\Phi_{(L,0)(L,L-1):p}^{(L):j}$ of shape $[e,d,n_L,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpj,bdpk\to bejk)$ + +For $\Phi_{(L)(L,L - 1):p}^{(L):j}\cdot [bW]_{pk}^{(L)(L,L - 1)}$ + +with $[bW]_{pk}^{(L)(L,L-1)}$ of shape $[b,d,n_L,n_{L-1}]$ and $\Phi_{(L)(L,L-1):p}^{(L):j}$ of shape $[e,d,n_L,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpj,bdpk\to bejk)$ + +From the formula for $[E(b)]_j^{(L)}$ : + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(L)} = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} ^ {(L); j} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} ^ {(L); j} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s):} ^ {(L): j} \cdot [ W W ] _ {p p} ^ {(s, 0) (L, s)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} ^ {(L): j} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} ^ {(L): j} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {t}} \Phi_ {(L) (L, t):} ^ {(L): j} \cdot [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} ^ {(L): j} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1} ^ {(L): j} \\ \end{array} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(L,0)(L,0):pq}^{(L):j}\cdot [WW]_{pq}^{(L,0)(L,0)}$ , + +with $[WW]_{pq}^{(L,0)(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L,0)(L,0):pq}^{(L):j}$ of shape $[e,d,n_L,n_0,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpqj,bdpq\to bej)$ + +For $\Phi_{(L,0):pq}^{(L):j}\cdot [W]_{pq}^{(L,0)}$ , with $[W]_{pq}^{(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L,0):pq}^{(L):j}$ of shape $[e,d,n_L,n_0,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpqj,bdpq\to bej)$ + +For $\Phi_{(s,0)(L,s)}^{(L):j} \cdot [WW]_{pp}^{(s,0)(L,s)}$ , + +with $[WW]_{pp}^{(s,0)(L,s)}$ of shape $[b,d,n_s,n_s]$ and $\Phi_{(s,0)(L,s)}^{(L):j}$ of shape $[e,d,n_s,n_s,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edppj, bdpp \to bej)$ + +For $\Phi_{(L)(L,0):pq}^{(L):j}\cdot [bW]_{pq}^{(L)(L,0)}$ + +with $[bW]_{pq}^{(L)(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L)(L,0):pq}^{(L):j}$ of shape $[e,d,n_L,n_0,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpqj,bdpq\to bej)$ + +For $\Phi_{(L,t)(t):p}^{(L):j}\cdot [Wb]_p^{(L,t)(t)}$ , with $[Wb]_p^{(L,t)(t)}$ of shape $[b,d,n_L]$ and $\Phi_{(L,t)(t):p}^{(L):j}$ of shape $[e,d,n_L,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpj,bdp\to bej)$ + +For $\Phi_{(t)(L,t)}^{(L):j} \cdot [bW]_{pp}^{(t)(L,t)}$ , with $[bW]_{pp}^{(t)(L,t)}$ of shape $[b,d,n_t,n_t]$ and $\Phi_{(t)(L,t)}^{(L):j}$ of shape $[e,d,n_t,n_t,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edppj, bdpp \to bej)$ + +For $\Phi_{(L):p}^{(L):j}\cdot [b]_p^{(L)}$ , with $[b]_p^{(L)}$ of shape $[b,d,n_L]$ and $\Phi_{(L):p}^{(L):j}$ of shape $[e,d,n_L,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(edpj,bdp\to bej)$ + +For $\Phi_1^{(L):j}$ of shape $[e,n_L]$ , + +Corresponding pseudocode: $\mathrm{einsum}(ej,\rightarrow ej)$ .unsqueeze(0) + +# H.1.2. PSEUDOCODE FOR CASE $i = 1$ + +From the formula for $[E(W)]_{jk}^{(1)}$ : + +$$ +\begin{array}{l} [ E (W) ] _ {j k} ^ {(1)} = \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0): \bullet q} ^ {(1): \bullet k} \cdot [ W ] _ {j q} ^ {(1, 0)} + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0) (L, 0): \bullet q} ^ {(1): \bullet k} \cdot [ W W ] _ {j q} ^ {(1, 0) (L, 0)} \\ + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1) (L, 0): \bullet q} ^ {(1): \bullet k} \cdot [ b W ] _ {j q} ^ {(1) (L, 0)} + \Phi_ {(1): \bullet} ^ {(1): \bullet k} \cdot [ b ] _ {j} ^ {(1)} \\ \end{array} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(1,0):\bullet q}^{(1):\bullet k}\cdot [W]_{jq}^{(1,0)}$ , with $[W]_{jq}^{(1,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1,0):\bullet q}^{(1):\bullet k}$ of shape $[d,e,n_0,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deqk \to bejk)$ + +For $\Phi_{(1,0)(L,0):\bullet q}^{(1):k}\cdot [WW]_{jq}^{(1,0)(L,0)}$ , + +with $[WW]_{jq}^{(1,0)(L,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1,0)(L,0):\bullet q}^{(1):\bullet k}$ of shape $[d,e,n_0,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deqk \to bejk)$ + +For $\Phi_{(1)(L,0):\bullet q}^{(1):\bullet k}\cdot [bW]_{jq}^{(1)(L,0)}$ + +with $[bW]_{jq}^{(1)(L,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1)(L,0):\bullet q}^{(1):\bullet k}$ of shape $[d,e,n_0,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deqk \to bejk)$ + +For $\Phi_{(1):\bullet}^{(1):\bullet k}\cdot [b]_j^{(1)}$ , with $[b]_j^{(1)}$ of shape $[b,d,n_1]$ and $\Phi_{(1):\bullet}^{(1):\bullet k}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdj,dek\to bejk)$ + +From the formula for $[E(b)]_j^{(1)}$ : + +$$ +[ E (b) ] _ {j} ^ {(1)} = \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0): \bullet q} ^ {(1): \bullet} \cdot [ W ] _ {j q} ^ {(1, 0)} + \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1, 0) (L, 0): \bullet q} ^ {(1): \bullet} \cdot [ W W ] _ {j q} ^ {(1, 0) (L, 0)} +$$ + +$$ ++ \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(1) (L, 0): \bullet q} ^ {(1): \bullet} \cdot [ b W ] _ {j q} ^ {(1) (L, 0)} + \Phi_ {(1): \bullet} ^ {(1): \bullet} \cdot [ b ] _ {j} ^ {(1)} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(1,0):\bullet q}^{(1):\bullet}\cdot [W]_{jq}^{(1,0)}$ , with $[W]_{jq}^{(1,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1,0):\bullet q}^{(1):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(1,0)(L,0):\bullet q}^{(1):\bullet}\cdot [WW]_{jq}^{(1,0)(L,0)}$ , + +with $[WW]_{jq}^{(1,0)(L,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1,0)(L,0):\bullet q}^{(1):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(1)(L,0):\bullet q}^{(1):\bullet}\cdot [bW]_{jq}^{(1)(L,0)}$ , with $[bW]_{jq}^{(1)(L,0)}$ of shape $[b,d,n_1,n_0]$ and $\Phi_{(1)(L,0):\bullet q}^{(1):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(1):\bullet}^{(1):\bullet}\cdot [b]_j^{(1)}$ , with $[b]_j^{(1)}$ of shape $[b,d,n_1]$ and $\Phi_{(1):\bullet}^{(1):\bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdj,de\to bej)$ + +# H.1.3. PSEUDOCODE FOR CASE $1 < i < L$ + +From the formula for $[E(W)]_{jk}^{(i)}$ : + +$$ +\begin{array}{l} [ E (W) ] _ {j k} ^ {(i)} = \left(\Phi_ {(i, i - 1): \bullet \bullet} ^ {(i); \bullet \bullet}\right) \cdot [ W ] _ {j k} ^ {(i, i - 1)} + \left(\Phi_ {(i, 0) (L, i - 1): \bullet \bullet} ^ {(i); \bullet \bullet}\right) \cdot [ W W ] _ {j k} ^ {(i, 0) (L, i - 1)} \\ + \left(\Phi_ {(i) (L, i - 1): \bullet \bullet} ^ {(i): \bullet \bullet}\right) \cdot [ b W ] _ {j k} ^ {(i) (L, i - 1)} \\ \end{array} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(i,i-1):\bullet\bullet}^{(i):\bullet\bullet} \cdot [W]_{jk}^{(i,i-1)}$ , with $[W]_{jk}^{(i,i-1)}$ of shape $[b,d,n_i,n_{i-1}]$ and $\Phi_{(i,i-1):\bullet\bullet}^{(i):\bullet\bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjk,de\to bejk)$ + +For $\Phi_{(i,0)(L,i - 1):\bullet \bullet}^{(i):\bullet \bullet}\cdot [WW]_{jk}^{(i,0)(L,i - 1)}$ , + +with $[WW]_{jk}^{(i,0)(L,i-1)}$ of shape $[b,d,n_i,n_{i-1}]$ and $\Phi_{(i,0)(L,i-1):\bullet\bullet}^{(i):\bullet\bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjk,de\to bejk)$ + +For $\Phi_{(i)(L,i - 1):\bullet \bullet}^{(i):\bullet \bullet}\cdot [bW]_{jk}^{(i)(L,i - 1)}$ , + +with $[bW]_{jk}^{(i)(L,i - 1)}$ of shape $[b,d,n_i,n_{i - 1}]$ and $\Phi_{(i)(L,i - 1):\bullet \bullet}^{(i):\bullet \bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjk,de\to bejk)$ + +From the formula for $[E(b)]_j^{(i)}$ : + +$$ +\begin{array}{l} [ E (b) ] _ {j} ^ {(i)} = \sum_ {q = 1} ^ {n _ {0}} \left(\Phi_ {(i, 0); \bullet q} ^ {(i): \bullet}\right) \cdot [ W ] _ {j q} ^ {(i, 0)} + \sum_ {q = 1} ^ {n _ {0}} \left(\Phi_ {(i, 0) (L, 0); \bullet q} ^ {(i): \bullet}\right) \cdot [ W W ] _ {j q} ^ {(i, 0) (L, 0)} \\ + \sum_ {i > t > 0} \left(\Phi_ {(i, t) (t): \bullet} ^ {(i): \bullet}\right) \cdot [ W b ] _ {j} ^ {(i, t) (t)} + \sum_ {q = 1} ^ {n _ {t}} \left(\Phi_ {(i) (L, 0): \bullet q} ^ {(i): \bullet}\right) \cdot [ b W ] _ {j q} ^ {(i) (L, 0)} \\ + \left(\Phi_ {(i): \bullet} ^ {(i): \bullet}\right) \cdot [ b ] _ {j} ^ {(i)} \\ \end{array} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(i,0):\bullet q}^{(i):\bullet}\cdot [W]_{jq}^{(i,0)}$ , with $[W]_{jq}^{(i,0)}$ of shape $[b,d,n_i,n_0]$ and $\Phi_{(i,0):\bullet q}^{(i):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(i,0)(L,0):\bullet q}^{(i):\bullet}\cdot [WW]_{jq}^{(i,0)(L,0)}$ , + +with $[WW]_{jq}^{(i,0)(L,0)}$ of shape $[b,d,n_i,n_0]$ and $\Phi_{(i,0)(L,0):\bullet q}^{(i):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(i,t)(t):\bullet}^{(i):\bullet}\cdot [Wb]_j^{(i,t)(t)}$ , with $[Wb]_j^{(i,t)(t)}$ of shape $[b,d,n_i]$ and $\Phi_{(i,t)(t):\bullet}^{(i):\bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdj,de\to bej)$ + +For $\Phi_{(i)(L,0):\bullet q}^{(i):\bullet}\cdot [bW]_{jq}^{(i)(L,0)}$ , with $[bW]_{jq}^{(i)(L,0)}$ of shape $[b,d,n_i,n_0]$ and $\Phi_{(i)(L,0):\bullet q}^{(i):\bullet}$ of shape $[d,e,n_0]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdjq, deq \to bej)$ + +For $\Phi_{(i):\bullet}^{(i):\bullet}\cdot [b]_j^{(i)}$ , with $[b]_j^{(i)}$ of shape $[b,d,n_i]$ and $\Phi_{(i):\bullet}^{(i):\bullet}$ of shape $[d,e]$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdj,de\to bej)$ + +# H.2. Invariant Layers Pseudocode + +From the formula for the Invariant layer $I(U)$ : + +$$ +\begin{array}{l} I (U) = \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0) (L, 0): p q} \cdot [ W W ] _ {p q} ^ {(L, 0) (L, 0)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L, 0): p q} \cdot [ W ] _ {p q} ^ {(L, 0)} \\ + \sum_ {L > s > 0} \sum_ {p = 1} ^ {n _ {s}} \Phi_ {(s, 0) (L, s): \bullet \bullet} \cdot [ W W ] _ {p p} ^ {(s, 0) (L, s)} + \sum_ {p = 1} ^ {n _ {L}} \sum_ {q = 1} ^ {n _ {0}} \Phi_ {(L) (L, 0): p q} \cdot [ b W ] _ {p q} ^ {(L) (L, 0)} \\ + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L, t) (t): p} \cdot [ W b ] _ {p} ^ {(L, t) (t)} + \sum_ {L > t > 0} \sum_ {p = 1} ^ {n _ {t}} \Phi_ {(t) (L, t): \bullet \bullet} \cdot [ b W ] _ {p p} ^ {(t) (L, t)} \\ + \sum_ {p = 1} ^ {n _ {L}} \Phi_ {(L): p} \cdot [ b ] _ {p} ^ {(L)} + \Phi_ {1} \\ \end{array} +$$ + +We define the pseudocode for each term: + +For $\Phi_{(L,0)(L,0):pq} \cdot [WW]_{pq}^{(L,0)(L,0)}$ , + +with $[WW]_{pq}^{(L,0)(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L,0)(L,0):pq}$ of shape $[d,e,n_L,n_0,d']$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdpq, depqk \to bek)$ + +For $\Phi_{(L,0):pq} \cdot [W]_{pq}^{(L,0)}$ , with $[W]_{pq}^{(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L,0):pq}$ of shape $[d,e,n_L,n_0,d']$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdpqk, depqk \to bek)$ + +For $\Phi_{(s,0)(L,s):\bullet \bullet}\cdot [WW]_{pp}^{(s,0)(L,s)}$ + +with $[WW]_{pp}^{(s,0)(L,s)}$ of shape $[b,d,n_s]$ and $\Phi_{(s,0)(L,s):\bullet \bullet}$ of shape $[d,e,d']$ , + +Corresponding pseudocode: $\mathsf{einsum}(bdpk,dek\to bek)$ + +For $\Phi_{(L)(L,0):pq} \cdot [bW]_{pq}^{(L)(L,0)}$ , + +with $[bW]_{pq}^{(L)(L,0)}$ of shape $[b,d,n_L,n_0]$ and $\Phi_{(L)(L,0):pq}$ of shape $[d,e,n_L,n_0,d']$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdpqk, depqk \to bek)$ + +For $\Phi_{(L,t)(t):p}\cdot [Wb]_p^{(L,t)(t)}$ , with $[Wb]_p^{(L,t)(t)}$ of shape $[b,d,n_L]$ and $\Phi_{(L,t)(t):p}$ of shape $[d,e,n_L,d']$ , + +Corresponding pseudocode: einsum(bdpk, deijk $\rightarrow$ bek) + +For $\Phi_{(t)(L,t):\bullet \bullet}\cdot [bW]_{pp}^{(t)(L,t)}$ , with $[bW]_{pp}^{(t)(L,t)}$ of shape $[b,d,n_t]$ and $\Phi_{(t)(L,t):\bullet \bullet}$ of shape $[d,e,d']$ , + +Corresponding pseudocode: $\mathsf{einsum}(bdpk,dek\to bek)$ + +For $\Phi_{(L):p} \cdot [b]_p^{(L)}$ , with $[b]_p^{(L)}$ of shape $[b, d, n_L]$ and $\Phi_{(L):p}$ of shape $[d, e, n_L, d']$ , + +Corresponding pseudocode: $\mathrm{einsum}(bdpk, depk \to bek)$ + +For $\Phi_1$ of shape $[e,d']$ , + +Corresponding pseudocode: $\mathrm{einsum}(ek\to ek)$ .unsqueeze(0) \ No newline at end of file diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/images.zip b/ICML/2025/Equivariant Polynomial Functional Networks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..48a54c6f0cbef4abbe725bfc912f8503949e8f4d --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5718bb757d8e7e36ead9a71fa4a3619adcf59d41afafbb15e485454c3b2a895e +size 4046117 diff --git a/ICML/2025/Equivariant Polynomial Functional Networks/layout.json b/ICML/2025/Equivariant Polynomial Functional Networks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..deaf73c571501fa43bbda11692745aecd9362afd --- /dev/null +++ b/ICML/2025/Equivariant Polynomial Functional Networks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f8c381a107dca48d953f06a1f364d70e6fd78cc34bbfe42019e0ffb1db2fafb +size 2497420 diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_content_list.json b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5328a28c994fca4fd5b0337d39e7aaa564a7b4e9 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fec99e2039eca89cfe90f91835b4d79bee1d9d3e0813dbdba7005ce1969f326 +size 153007 diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_model.json b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_model.json new file mode 100644 index 0000000000000000000000000000000000000000..5c243d80a2bcd2a69322eaaacddbc77351a68f25 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cb1e1e517e08ba272dda9edf76bd2c02d8a572c7401628b7a4083e83004d32f +size 184320 diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_origin.pdf b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9a67d511765fafa95272f4a6b616cf13dff2d500 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/3a5b178d-99b1-4751-9bd4-41d2de66a385_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0de3169d4eb2501b5b0ffd6065a0303773545c9a61a68a5e825393c569f74e0d +size 10862895 diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/full.md b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6b3fe731d7b5ca8a518581c6e1b4177e72193358 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/full.md @@ -0,0 +1,661 @@ +Daiheng Gao1 Shilin Lu2 Wenbo Zhou1 Jiaming Chu3 Jie Zhang4 Mengxi Jia5 Bang Zhang6 Zhaoxin Fan7 Weiming Zhang1 + +# Abstract + +Removing unwanted concepts from large-scale text-to-image (T2I) diffusion models while maintaining their overall generative quality remains an open challenge. This difficulty is especially pronounced in emerging paradigms, such as Stable Diffusion (SD) v3 and Flux, which incorporate flow matching and transformer-based architectures. These advancements limit the transferability of existing concept-erasure techniques that were originally designed for the previous T2I paradigm (e.g., SD v1.4). In this work, we introduce EraseAnything, the first method specifically developed to address concept erasure within the latest flow-based T2I framework. We formulate concept erasure as a bi-level optimization problem, employing LoRA-based parameter tuning and an attention map regularizer to selectively suppress undesirable activations. Furthermore, we propose a self-contrastive learning strategy to ensure that removing unwanted concepts does not inadvertently harm performance on unrelated ones. Experimental results demonstrate that EraseAnything successfully fills the research gap left by earlier methods in this new T2I paradigm, achieving SOTA performance across a wide range of concept erasure tasks. + +# 1. Introduction + +From the advent of DALL-E 2 (Ramesh et al., 2022) and Stable Diffusion (SD) (Rombach et al., 2022) to the beefed-up Flux, Recraft and Photon, diffusion models (DMs) have consistently showcased their mastery in the domain of text-to-image (T2I). Over the past few years, T2I has seen a + +$^{1}$ USTC $^{2}$ NTU $^{3}$ BUPT $^{4}$ IHPC and CFAR, A*STAR $^{5}$ TeleAI $^{6}$ Tongyi Lab, Alibaba $^{7}$ Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing, Beihang University. Correspondence to: Zhaoxin Fan & Weiming Zhang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/442985c08ed717a167cc7aa0e0b2d456a37ad16e0e1c3b20a4e0dc994db5fe37.jpg) +Figure 1. Top: Comparison between our proposed EraseAnything and classical concept-erasing methods, such as ESD (Gandikota et al., 2023), UCE (Gandikota et al., 2024), and EAP (Bui et al., 2024). Taking 'nudity erasure' on Flux models as an example. Bottom: Examples of differen concept erasure via EraseAnything. (blue bars indicate author-added sensory harmony, while yellow bbox showcases the corresponding original output.) + +major facelift, with leaps in prompt following, image quality, and output diversity. However, as these models are trained on increasingly large and diverse datasets sourced from online content, they also face growing safety risks. One major concern is their potential to generate NSFW (Not Suitable For Work) material when provided with inappropriate prompts. This issue has been widely reported in the media and falls under the broader challenge of concept erasing (CE), which involves preventing models from generating harmful or undesirable content. + +While CE has been extensively studied in the context of Stable Diffusion (SD), which relies on a DDPM/DDIM (Ho et al., 2020; Song et al., 2020) + U-Net (Ronneberger et al., 2015) framework, the Flux series introduces a new set of challenges due to its modern architecture. Flux incorporates advanced techniques such as flow matching (Lipman et al., 2022; Liu et al., 2022) and transformer-based components (Vaswani, 2017), which differ significantly from SD's design. As discussed in Sec. 3, these architectural differences, such as the use of the T5 Encoder (Raffel et al., 2020) and rotary positional encoding (RoPE) (Su et al., 2024), + +have led to inconsistencies between SD and Flux. These discrepancies have, in turn, created a range of new problems that need to be addressed. + +We demonstrate that existing concept erasing methods struggle to perform effectively within the Flux framework. The first row of Fig. 1 showcases the generation capabilities of the Flux [dev] model after attempting to erase (unlearn) the 'nudity' concept. We evaluate several well-established CE methods, including the pioneering work in concept erasing, ESD (Gandikota et al., 2023), the closed-form solution UCE (Gandikota et al., 2024), and the adversarial-training-based approach EAP (Bui et al., 2024). These methods, while diverse and widely recognized in the field, exhibit limited generalizability when applied to Flux, highlighting a significant gap in transferring CE techniques from SD to Flux. This raises a critical research question that our paper seeks to address: + +# Q: Can we propose a robust concept erasing method suitable for Flux? + +From a macro perspective, $\mathbb{Q}$ can be framed as a Bi-level Optimization (BO) problem. Let us define a dataset of concepts to be unlearned, $D_{un} \in \{\mathrm{nudity}, \ldots\}$ and a dataset of irrelevant concepts, $D_{ir} \in \{\mathrm{beautiful}, \mathrm{smart}, \mathrm{charming}, \ldots\}$ . Here, irrelevant concepts encompass a broad spectrum of ideas, ranging from abstract descriptors like {qualified, organized, industrious, ...} to physical descriptors such as beautiful or ugly. During sampling, concepts from both categories are treated equally to ensure a balanced representation. The core objective is to learn adapter weights (e.g., LoRA (Hu et al., 2021) or PEFT (Mangrulkar et al., 2022)) that achieve two goals: 1) Reduce activations associated with prompts from $D_{un}$ (the unlearning concepts). 2) Preserve image generation quality for prompts from $D_{ir}$ (the irrelevant concepts). This formulation ensures that the model effectively erases undesirable concepts while maintaining its ability to generate high-quality images for other, unrelated prompts. + +From a microscopic perspective, our approach begins by reducing the activations associated with $D_{un}$ through fine-tuning a LoRA module. This is achieved using the ESD objective function combined with an index-related attention maps regularizer. The regularizer is a critical insight derived from our careful analysis of the Flux model's internal mechanisms, which we elaborate on in Sec. 3. Next, we fine-tune the same LoRA in the reverse direction. Inspired by (Oord et al., 2018; He et al., 2020), we construct a novel self-contrastive loss. This involves selecting 1 synonym word (as a negative sample) for the key concept in $D_{un}$ and $\mathbf{K}(\mathbf{K} \geq 3)$ words from $D_{ir}$ . The self-contrastive loss penalizes the model when the attention maps of the unlearned concept exhibit semantic features that are closer to those of the irrelevant concepts. This ensures that the model not only + +suppresses the undesired concept but also maintains a clear distinction between the unlearned concept and unrelated ones. This two-step process forms the core of our robust concept erasing method for Flux. + +To the best of our knowledge, we are the first to study concept erasing in Flux systematically and propose an effective method, termed EraseAnything, which balances the model's ability to delete the target concept while retaining its original capabilities. To achieve this, we have developed a comprehensive approach involving several key steps: + +- Attention Localization: Through an in-depth analysis of Flux, we discovered that its attention maps allow for precise identification of specific content using token indices. This capability enables the selective erasure of localized content. +- **Reverse Self-Contrastive Loss:** Leveraging off-the-shelf LLMs (Achiam et al., 2023), we dynamically generate $D_{ir}$ (irrelevant concepts) based on the given unlearned prompt. This allows us to construct a self-contrastive loss that optimizes the model to ensure the generation quality and effectiveness of concepts not targeted for unlearning remain unaffected. +- Bi-Level Optimization: Recognizing the interdependence between concept erasing $(D_{un})$ and irrelevant concept preservation $(D_{ir})$ , we employ bi-level optimization to achieve stable convergence. The lower level focuses on erasing the target concepts in $D_{un}$ while the upper level ensures the preservation of $D_{ir}$ . + +# 2. Related Work + +# 2.1. T2I Diffusion Models + +Recent advancements in text-to-image diffusion models have been remarkable, with notable contributions from GLIDE (Nichol et al., 2021), DALL-E series (Ramesh et al., 2021; 2022) Imagen (Saharia et al., 2022) and SD series (Rombach et al., 2022; Podell et al., 2023; Lu et al., 2023; 2024b), which stands out due to its fully open-sourced model and weights. SD 3 (Esser et al., 2024), the latest installment, introduces a paradigm shift with the simplified sampling method (where the forward noising process is meticulously crafted as a rectified flow (Liu et al., 2022), establishing a direct connection between data and noise distributions) and its trio of text encoders (Radford et al., 2021; Raffel et al., 2020)—CLIPL/14, OpenCLIPbigG/14, T5 XXL—and the innovative Multimodal Diffusion Transformer (MMDiT) architecture with over 2B parameters. SD 3 processes texts and pixels as a sequence of embeddings. Positional encodings are added to $2 \times 2$ patches of the latents which are then flattened into a patch encoding sequence. This sequence, in + +conjunction with the text encoding sequence, is input into the MMDiT blocks. Here, they are unified to a common dimensionality, merged, and subjected to a series of modulated attention mechanisms and multilayer perceptrons. + +Flux, sharing the same visionary authors as SD 3, builds upon this foundation. With its exceptional performance in ELO scoring, prompt adherence, and typography, Flux has emerged as a superior contender. Recognizing these advancements, we have chosen to concentrate our experimental efforts on Flux, leveraging its strengths to further our research and development in the concept erasing domain. + +# 2.2. Concept Erasing + +Gigantic yet unfiltered dataset LAION - 5B (Schuhmann et al., 2022) that used to train T2I models, poses the risk of T2I models learning and generating inappropriate content that infringes upon copyright and privacy. To alleviate this concern, numerous studies explore and devising solutions, including training datasets filtering (Rombach et al., 2022), post-generation content filtering (Rando et al., 2022), and fine-tuning pretrained models: ANT (Li et al., 2025), MACE (Lu et al., 2024a), SPM (Lyu et al., 2024), advUnlearn (Zhang et al., 2024b), Receler (Huang et al., 2023) and classical methods (Kumari et al., 2023; Gandikota et al., 2023; Bui et al., 2024; Gandikota et al., 2024). SD 2 uses an NSFW detector to filter out inappropriate content from its training data, which leads to significant training expenses and a difficult balance to strike between maintaining data purity and achieving optimal model performance. Diffusers (von Platen et al., 2022), as a dominant open source library for DMs, adopts a post-hoc safety checker to filter out NSFW content, yet this feature can be easily circumvented by users. + +Today, the field has evolved from basic concept erasure (CE) to a more nuanced focus on preserving irrelevant concepts. EAP (Bui et al., 2024), for instance, selectively identifies and retains adversarial concepts to purge undesirable content from diffusion models with minimal side effects on irrelevant concepts. Real-Era (Liu et al., 2024) tackles "concept residue" by excavating associated concepts and applying beyond-concept regularization, thereby boosting erasure effectiveness and specificity without sacrificing the generation of irrelevant concepts. + +In our work, we prioritize the preservation of irrelevant concepts. Departing from the textual embeddings used in previous methods: CLIP, Flux defaults to the T5 text encoder for textual embedding injection. Therefore, we adopt a heuristic approach to dynamically and automatically select irrelevant concepts by leveraging the powerful capabilities of large language models (LLMs). For a more comprehensive understanding of T5 and the rationale behind our heuristic method, we elaborate on this on the Section 3. + +# 2.3. Bi-level optimization (BO) + +Bi-level optimization (BO), a mathematical framework with a deep-rooted research legacy (Colson et al., 2007; Sinha et al., 2017), is characterized by its ability to handle complex optimization problems where a secondary optimization task (the lower level) is intricately nested within a primary optimization task (the upper level). + +The advent of deep learning has sparked a renewed interest in BO, recognizing it as a versatile and essential tool for tackling a broad spectrum of machine learning challenges: e.g. hyperparameter optimization (Lorraine et al., 2020; Shen et al., 2024), meta learning (Franceschi et al., 2018), and physics-based machine learning (Hao et al., 2022). + +A related example of BO is BLO-SAM (Zhang et al., 2024a), a cutting-edge approach that integrates BO into supervised training for semantic segmentation. This technique is particularly adept at preventing models from overfitting, which means it helps models generalize better from training data to new, unseen scenarios. + +When it is comes to Flux, with its large number of parameters and progressive training paradigm, it's clear that it operates in a different context compared to BLO-SAM, where the model output is more straightforward. To make BO adaptive for DMs, we need to tailor the approach to accommodate its unique characteristics and ensure we can fully utilize its potential. This involves enhancing Flux's capability to eradicate specific target concepts while simultaneously preserving its efficiency in generating other concepts, ensuring senseless compromise in overall performance. + +# 3. Obstacles in migrating concept erasure methods to Flux + +In this section, we explore the reasons why classical erasure methods from Stable Diffusion (SD) fail when applied to Flux. Specifically, we discuss the limitations posed by T5's sentence-level embeddings, the absence of explicit cross-attention, and the complexities involved in handling keyword obfuscation. Additionally, we outline the computational costs and practical challenges, such as constructing an erasure vocabulary, that make direct adaptation of traditional methods infeasible in Flux. + +Erasing method evaluation: When adapting classical erasure methods to Flux, a significant challenge arises: explicit cross-attention layers, which are central to methods like ESD (Gandikota et al., 2023), UCE (Gandikota et al., 2024), and MACE (Lu et al., 2024a), do not exist in Flux's architecture. Unlike SD, which relies on U-Net with cross-attention mechanisms, Flux employs dual-stream and single-stream blocks that lack such explicit layers (see Appendix A for Flux's detailed structure). This architectural difference ne + +Table 1. Find the closest synonyms of nude. + +
METHODTOP-3 CLOSEST SYNONYMS
CLAUDE 3.5“NAKED”, “UNDRESSED”, “UNCLOTHED”
GPT-40“BARE”, “NAKED”, “UNCLOTHED”,
KIMI“NAKED”, “UNCLOTHED”, “BARE”
T5 FEATURE“LEAN”, “DEER”, “GIRL”
+ +cessitates a fundamental redesign of erasure methods to suit Flux's transformer-based framework. + +Moreover, directly transplanting methods from SD's U-Net to Flux's transformer architecture leads to a phenomenon we term concept residue, where target concepts are incompletely removed. This limitation underscores the need for a novel approach to achieve thorough concept erasure in Flux. + +Irrelevant prompt preservation: Techniques, such as EAP (Bui et al., 2024) and Real-Era (Liu et al., 2024), have gained popularity for their ability to maintain model performance on non-targeted concepts. However, adapting these methods to Flux presents a unique challenge. While SD uses CLIP as its text encoder, which excels at word-level embeddings and similarity measurements, Flux relies on T5. T5 is designed for sentence-level embeddings and struggles to capture word-level similarities effectively. This mismatch makes T5 less suitable for implementing irrelevant prompt preservation in Flux, as it cannot reliably distinguish between semantically similar words or concepts. + +As shown in Table 1, we extracted the T5 feature embeddings for the word nude nude and compared them with the entire vocabulary (over 30,000 words) from the T5 default tokenizer. Using cosine similarity, we identified the top 3 closest synonyms based on semantic embeddings. However, the results were far from rational, indicating that T5's word-level embeddings are unreliable for this task and cannot effectively evaluate semantic similarity. + +Another critical issue stems from the size of T5 embeddings. With a shape of max_sequence_length(256) × 4096, T5 embeddings are approximately 18 times larger than CLIP embeddings, which have a shape of $77 \times 768$ . This substantial size difference makes the adaptive selection of adversarial prompts from the vocabulary computationally intensive and time-consuming for each iteration. Noted that the goal of selecting adversarial prompts is to optimize the model, ensuring it robustly erases the target concept. + +As a result, implementing semantic feature-based adversarial prompt selection in Flux incurs exceptionally high computational costs, posing a significant practical challenge for real-world applications. + +Cross attention exploration: Inspired by (Hertz et al., 2022; Xie et al., 2023), we formulated a hypothesis: Does + +![](images/c27a61e6a98ffca06732debff6a3f5086ec86883b6ac155031c1e3724e1b81b8.jpg) +a kid is kicking soccer + +![](images/70bfed33e87c85334ea1fd1910785ec0c1288315b79328fe87d0e80d14dd334b.jpg) +Timestep=1 + +![](images/3ef0a27c25556b4075478ef104b29bfc7a80522997ae78052b085d4348a9c2b8.jpg) +Timestep=8 +Figure 2. Correlations between text and attention maps. + +![](images/4f9f0233801e6377a1a98a1efc9e87bcc279b7a37d04573aead1b3d96b0878c1.jpg) +Timestep=20 + +Flux exhibit a similar pattern where explicit cross-attentions exist between the given text prompt and intermediate attention maps within the network? As detailed in Appendix A, Flux lacks explicit cross-attention layers. Initially, this presented some challenges. However, through an in-depth examination of the neurons and features within Flux, we ultimately demonstrated (as shown in Fig. 2) that a linear relationship between text embeddings and attention maps also exists in Flux. + +Specifically, as shown in Eq. (1), the feature correlation $\mathbf{Q},\mathbf{K}$ is established by concatenating the textual and pixel embeddings along the last dimension: + +$$ +\mathbf {Q} = \operatorname {c o n c a t} \left(\mathbf {Q} _ {\text {t e x t}}, \mathbf {Q} _ {\text {p i x e l}}, \dim = - 1\right), +$$ + +$$ +\mathbf {K} = \operatorname {c o n c a t} \left(\mathbf {K} _ {\text {t e x t}}, \mathbf {K} _ {\text {p i x e l}}, \dim = - 1\right), \tag {1} +$$ + +$$ +\mathbf {W} _ {\text {a t t n}} = \operatorname {S o f t m a x} (\mathbf {Q} \times \mathbf {K}). +$$ + +According to our experiments, we find that the relationship between text and image is inherently forged within the confines of $\mathbf{W}_{\mathrm{attn}}$ . By pinpointing the token index of the target word (want to erase) nestled within the prompt, we are capable of delineating prompt-specific characteristics. This is achieved by nullifying the pertinent column of $\mathbf{W}_{\mathrm{attn}}$ , thereby elucidating the underlying features with precision. + +So far, Not so good: As shown in Fig. 3, removing a target concept seems straightforward at first: by locating the token index of the keyword in the prompt, we can delete the corresponding index column in $\mathbf{W}_{\mathrm{attn}} \in [24,1280,1280]$ , where $1280 = \max\text{sequence\_length} + \text{head\_dim}$ and $24 = \text{attn\_heads}$ (generating image resolution of $512 \times 512$ ). However, our experiments reveal that this technique is ineffective against one of the rudimentary prompt attack strategies: obfuscating keywords—either by altering the input prompt with nonsensical prefixes or suffixes ( $soccer \rightarrow$ soccerrs) or by introducing misspellings ( $\mathbf{Nike} \rightarrow \mathbf{Nikke}$ ). In such cases, the erasure of the attention map proves futile, making it easy to circumvent this method and still successfully generate the target concept. (For more details, please refer to Appendix B.) + +![](images/d70decafaf4a22ab2713e3a35d9d7bab260c85818411405b22b81116fd70a664.jpg) +Figure 3. Attention map erasure can be achieved by setting $\mathbf{W}_{\mathbf{attn}}[:, :, idx_i] = 0, \forall i = (start, ..., end)$ , where start, end can be automatically localized given keyword e.g. "soccer" from input prompt "A child is kicking soccer". But this method is not generalizable when prompt is slightly modified. + +![](images/077b7706e4f7c142a6234da024af25539f97077b81f3f21f4a377aa74fe6fdfe.jpg) + +# 4. Method + +# 4.1. Overview + +Building on our earlier analysis, we identified a critical limitation: deterministic attention map erasure is susceptible to conventional black-box attacks, making it unsuitable for our requirements. To address this issue, we shifted our focus to a learning-based approach. This method is designed to minimize the impact on the generation quality of irrelevant concepts while effectively erasing the target concept, ensuring a more robust and reliable solution. + +We address this delicate balance between removal and preservation through a bi-level optimization strategy: the lower level is designed to enhance robust concept erasure, while the upper level ensures the maintenance of irrelevant concepts. This dual-objective methodology lies at the heart of our EraseAnything. + +# 4.2. Bi-Level Finetuning Framework + +# LOWER-LEVEL: Concept Erasure + +In the lower-level optimization phase, we refine the finetunable parameters of Flux through LoRA on the unlearned dataset $D_{un}$ , which is comprised of concepts that we want to make Flux erased or unlearned. + +ESD emerges as the relatively superior performer with higher negative guidance (Gandikota et al., 2023). The first sub-loss function employed in the lower-level optimization henceforth is formulated as Eq. (2): + +$$ +\begin{array}{l} \mathcal {L} _ {e s d} = \mathbb {E} \left[ v _ {\theta_ {o} + \Delta \theta} \left(x _ {t}, c _ {u n}, t\right) \right. \tag {2} \\ \left. - \eta \left\| v _ {\theta_ {o}} (x _ {t}, c _ {u n}, t) - v _ {\theta_ {o}} (x _ {t}, \emptyset , t) \right\| _ {2} ^ {2} \right], \\ \end{array} +$$ + +where $\eta$ represents the negative guidance factor, which significantly influences the degree of concept erasure. $\theta_{o}$ denote the parameters of the original Flux model and $\Delta \theta$ is the learnable LoRA weights for concept erasure. $x_{t}$ is the denoised latent code at timestep $t$ started with random noise at $x_{T}$ ( $T$ is the total timesteps in the denoising process), $v(x_{t},\emptyset ,t)$ is the unconditional generation initiated with empty input prompt (a.k.a $\emptyset = \mathrm{null}$ text), while $c_{un} \in D_{un}$ identifies the specific concept intended for erasure, for instance, nudity. Additionally, the term $v$ is represent the velocity of the Flow matching process, which is the core part of Flux's scheduling mechanism and thus conceptually equivalent with the $v - prediction$ (Salimans & Ho, 2022) in DMs. + +Furthermore, building on the insights gleaned from the cross-attention explored in Sec. 3, we strive to diminish the model's activations of the erased (unlearned) concepts by attenuating the attention weight allocated to keywords within the entire input prompt: $F_{idx}^{un} = \mathbf{W}_{\mathbf{attn}}[:, :, idx]$ . + +$$ +\mathcal {L} _ {\text {a t t n}} = \sum_ {i d x = s t a r t} ^ {e n d} F _ {i d x} ^ {u n}. \tag {3} +$$ + +Initially, we encountered suboptimal results because the fixed index positions of sensitive words, which we aimed to eliminate, could lead to overfitting. To counteract this, we scrambled the order of the sentences, thereby making the index positions dynamic. This method is reasonable because Flux can produce the similar content with a sentence that has been randomly shuffled. For more details, please refer to Appendix B. + +# UPPER-LEVEL: Irrelevant Concept Preservation + +In the upper level, it serves for preserving concepts, which is fairly easy to understand: given the prompt $c$ 'a nude girl...', our objective is to eliminate the word $c_{un}$ 'nude' inside of prompt while ensuring the model can still generate an image of a unrelated concept $c_{ir}$ normally, e.g. girl. To achieve this, we generate 6-10 images $I_{f}$ from a fixed $c$ and random seed (starting point of trajectory, same as DMs) that includes the concept to be removed (nude) and irrelevant concepts (girl), then train a LoRA (Low-Rank Adaptation) to induce shifts in the image generation process. + +$$ +\mathcal {L} _ {l o r a} = \mathbb {E} \left[ \| v - v _ {\theta + \Delta \theta} (u _ {t}, c, t) \| _ {2} ^ {2} \right], \tag {4} +$$ + +where $v = x_{T} - u_{pix}$ , where $x_{T} \sim \mathcal{N}(0, I)$ and $u_{pix}$ is the VAE (Kingma, 2013) encoded latent code of image sampled from $I_{f}$ and $u_{t} = (1 - t)u_{pix} + tx_{T}$ is the noised $u_{pix}$ at timestep $t$ . + +Apparently, for a broader range of irrelevant concepts, such as the abstract artistic styles and relationships mentioned earlier, this simple training recipe is insufficient to persevere the broader range of concepts that are not involved in the sentence. Considering the analysis in Sec. 3, explicitly incorporating a collection of images and corresponding prompt lists for irrelevant concepts is cumbersome, and T5 feature is not precise enough to measure word-level similarity. + +To address this, we propose a contrastive learning approach based on the attention map of keywords. This method does not require providing a set of images corresponding to irrelevant concepts. Instead, it leverages the powerful comprehension abilities of LLMs, to heuristically generate $D_{ir}$ that are irrelevant to the targeted concept for erasure. + +First, we construct a simple AI Agent that build upon on GPT-4o to sample $c_{ir} \in D_{ir}$ . For efficiency reason, we then use NLTK generating the synonym of the concept that aimed to be erased, i.e. the synonym of "nude" could be "nake". Specifically, we choose K (default is 3) irrelevant concepts. Moving forward, we fix the sampling starting latent, i.e., $x_{T}$ as a constant value, and then substitute "nude" with "nake", $c_{ir}^{i}, i = \{1,2,3\}$ into $c$ , proceeding with the denoising process independently (For more details about the $c_{ir}$ sampling, please refer to the Appendix C). + +As shown in Fig. 2, we choose the attention map at higher timesteps for accurate concept-related activations. Here we get the central concept's attention feature $F^{un}$ alongside with synonym feature $F^{syn}$ and irrelevant concept set $F^{ir} = \{F^{k_1},\dots,F^{k_K}\}$ . + +Drawing inspiration from the works in (Oord et al., 2018; He et al., 2020; Huang et al., 2024), we have tailored the contrastive loss to function in the opposite direction, a.k.a: Reverse Self Contrastive loss (RSC): our training goal is to align the central feature $F^{un}$ with the dynamically shifting $F^{ir}$ , while simultaneously pushing them apart from the synonym feature $F^{syn}$ . The strategy here is to deviate from the conventional self-contrastive learning approach, which would typically aim to make $F^{un}$ more akin to $F^{syn}$ , thereby enhancing the model's sensitivity to the term slated for removal. By inverting this approach, we aim to steer the network towards gradually discarding the concept of "nude" during learning, effectively obfuscating it within an array of irrelevant concepts. + +$$ +\mathcal {L} _ {r s c} = \log \left(\frac {\sum_ {i = 0} ^ {K} \exp \left(\frac {F ^ {u n} \cdot F ^ {k _ {i}}}{\tau}\right)}{\exp \left(\frac {F ^ {u n} \cdot F ^ {s y n}}{\tau}\right)}\right). \tag {5} +$$ + +# Algorithm 1 BO formulation in EraseAnything + +Input: unlearned concept dataset and irrelevant dataset $D_{un}$ and $D_{ir}$ , learning rates $\alpha_{low},\alpha_{up}$ , total iteration steps $M$ + +for iteration $= 1$ to $M$ do + +for $c_{un}$ sampled from $D_{un}$ do + +PREPARATION + +Construct a meaningful sentence $c$ involve $c_{un}$ +$\bullet$ Shuffle $c$ to avoid overfitting. +$\bullet$ Find tokenized index $idx_{start} : idx_{end}$ of $c_{un}$ from $c$ . + +LOWER LEVEL: $c_{un}$ ERASURE + +$\bullet$ Update LoRA $\Delta \theta$ with Eq. (2) $^+$ Eq.3 under $\alpha_{low}$ + +UPPER LEVEL: $c_{ir}$ PRESERVING + +⑤ Retrieve $c_{ir}$ , $c_{syn}$ w.r.t to $c_{un}$ and replace them into $c$ separately to have $F^{ir,syn}$ . +$\Theta$ Update LoRA $\Delta \theta$ with Eq. (4) + Eq. (5) under $\alpha_{up}$ . and for + +# end for + +As depicted in Eq. (5) (detailed derivations are provided in Appendix D), $\tau$ is the temperature hyperparameter that governs the model's capacity to differentiate between irrelevant concepts. A high $\tau$ causes the contrastive loss to treat all irrelevant concepts with equal importance, potentially resulting in a lack of focus in the model's learning process. Conversely, a low $\tau$ may cause the model to concentrate excessively on especially challenging irrelevant concepts, which could be mistaken for potential synonym sample. Based on empirical testing, we have determined that setting $\tau = 0.07$ is optimal for our model's performance. + +Bi-Level Optimization: As shown in Eq. (5), the last loss term defined in our method is finalized. Integrating the aforementioned two optimization problems, we have a bi-level optimization illustrated in Eq. (6). (please check Alg. 1 for more details.) + +$$ +\begin{array}{l} \min \mathcal {L} _ {l o r a + r s c} (\Delta^ {*} \theta ; D _ {i r}) \\ s. t. \quad \Delta^ {*} \theta = \min \mathcal {L} _ {e s d + a t t n} (\Delta \theta ; D _ {u n}) \tag {6} \\ \end{array} +$$ + +# 5. Experiments + +Here, we conduct a comprehensive evaluation of Erase Anything, benchmarking it on various tasks, ranging from concrete to abstract: e.g., soccer, architecture, car to artistic style, relationships and etc. + +# 5.1. Implementation Details + +We have opted for the Flux.1 [dev] model with publicly accessible network architecture and model weights, a distilled version of Flux.1 [pro] that retains high quality and + +Table 2. Assessment of Nudity Removal: (Left) Quantity of explicit content detected using the NudeNet detector on the I2P benchmark. (Right) Comparison of FID and CLIP on MS-COCO. The performance of the original Flux [dev] is presented for reference. + +
METHODDETECTED NUDITY (QUANTITY)MS-COCO 10K
COMMONFEMALEMALETOTAL↓FID↓CLIP↑
CA (MODEL-BASED) (KUMARI ET AL., 2023)253652634422.6629.05
CA (NOISE-BASED) (KUMARI ET AL., 2023)290722839023.0728.73
ESD (GANDIKOTA ET AL., 2023)3291453250623.0828.44
UCE (GANDIKOTA ET AL., 2024)122391217330.7124.56
MACE (LU ET AL., 2024A)173552825624.1529.52
EAP (BUI ET AL., 2024)287861338622.3029.86
META-UNLEARNING (GAO ET AL., 2024)3551402652122.6929.91
OURS129482219921.7530.24
FLUX.1 [DEV]4061613860521.3230.87
+ +![](images/6b9b82d34233944d44a04d8c80c97e2ecc2048018e9025fb79fa4be7fc5ed775.jpg) +Figure 4. User Study. We have created an interface (see Appendix E for details) that shows the users with AIGC contents under various methods that transplanted to Flux. With a scoring system where 1 (worst) and 5 (best). + +strong prompt adherence. Our codebase utilizes widely adopted diffusers (von Platen et al., 2022), a popular choice among developers and researchers for DMs. Unless otherwise specified, our experiments employ the flow-matching Euler sampler with 28 steps and AdamW (Loshchilov et al., 2017) optimizer for 1,000 steps, with a learning rate $\alpha_{low} = 0.001$ , $\alpha_{up} = 0.0005$ and an erasing guidance factor $\eta = 1$ under all conditions. + +In terms of concept construction, we harness the power of NLTK (Bird et al., 2009) to generate synonym concepts, and GPT-4o in the extraction of irrelevant concepts. Our fine-tuning process focuses on the text-related parameters add_qProj and add_kProj (subsets of $\mathbf{Q}$ and $\mathbf{K}$ ) within the dual stream blocks. + +# 5.2. Results + +Nudity Erasure. To assess the effectiveness and versatility of our approach, we begin by applying it to the classical task of nudity erasure. Specifically, we used our concept- erased model to generate images from a comprehensive set of 4,703 prompts extracted from the Inappropriate Im + +age Prompt (I2P) dataset (Schramowski et al., 2023). For the identification of explicit content within these images, we deploy NudeNet (Bedapudi, 2019), using a detection threshold of 0.6. Furthermore, to evaluate the specificity of our method in regular content, we randomly select 10,000 captions from the MS-COCO captioning dataset (validation) (Lin et al., 2014). Finally, we generate images from these captions and assess the results using both the Fréchet Inception Distance (FID) and CLIP scores. + +Table 2 presents our results in comparison with the current state-of-the-art algorithms. It is evident that our method generates the second-lowest amount of explicit content when conditioned on 4,703 prompts, only outperformed by the UCE. Yet, it stands out with remarkable FID and CLIP scores, suggesting that our approach exerts a minimal negative influence on the original model's ability to generate regular content. In contrast, the UCE, while leading in explicit content reduction, shows a sharp decline in efficacy according to these metrics. + +Miscellaneousness Erasure. In this section, we evaluate our method on 3 conceptual categories: Entity, Abstraction, and Relationship. Here, we choose 10 concept for each category (Please check Appendix C for the full list of concepts) and adopt the measuring metrics described in Table 3. As shown in Fig. 5 and Fig. 7, our method can effectively remove a variety of concepts (including multiple-concepts!) while maintaining minor disturbance compared to CA, which substantiates the claim: EraseAnything is truly an "Erase Anything" solution. + +Table 3 reveals that our method outperforms the traditional CA in terms of erasure efficacy, the retention of unrelated concepts, and the robustness against synonym substitution. This underscores the ability of our method to not only grasp the targeted concepts for erasure but also to discern those that are semantically adjacent, all while exerting an imperceptible negative influence on the model's intrinsic capabilities. For a comprehensive evaluation of our model's robustness, kindly refer to Appendix B. + +![](images/b95c4f6cda27afb2dbdccfb7fbe8ed8b5329a28a9c6735dd7891d05a7a7ab1d0.jpg) +Figure 5. Single-concept erasure. We test our model across three levels of granularity—Entity, Abstraction, and Relationship—to assess its effectiveness. Furthermore, we have incorporated the versatile CA (Kumari et al., 2023) [model] to enhance the visual contrast for a clearer comparison. + +Erasing "Anything". To further demonstrate "erase anything" solution requires additional supporting evidence. As shown in Fig. 6, we show the effectiveness through diverse and challenging cases, such as erasing color (i.e., red rose, green bag) or object count (i.e., five pencils, three cats). + +Adversarial Attacks. Following the AdvUnlearn (Zhang et al., 2024b), we used NudeNet (Bedapudi, 2019) with a detection threshold of 0.6 to test the Attack Success Rate (ASR) on the Ring-A-Bell-Nudity dataset1 (comprising 285 Ring-A-Bell revised prompts focused on nudity). Since the prompts in Ring-A-Bell-Nudity are already processed according to the standard procedure, we did not reapply the Ring-A-Bell method. + +Table 4 shows the results of our tests on ESD, CA, and our proposed method using this dataset (all on Flux [dev]). We also included the attack results from MU-Attack (Zhang et al., 2024c). Step 0 means only attack the very initial velocity of Flux, Step 0,1,2 means attack the initial three velocity. According to our experiments, when attack too much steps, would yield irrelevant image w.r.t to the prompt. + +User Study. To gauge the human perception of the effectiveness of our method, we conducted a user study with five dimensions, where each focusing on a different aspect of erased model. For the first two trials: Erasing Cleanliness (prompt with $c_{un}$ and generated images do not contain + +Table 3. Evaluation of Erasing the specific category: Entity (e.g. soccer), Abstraction (e.g. artistic style) and Relationship (e.g. kiss) are presented. CLIP classification accuracies are reported for each erased category in three sets: the erased category itself $(\mathrm{Acc}_e)$ , efficacy, the remaining unaffected categories $(\mathrm{Acc}_{ir}$ , specificity) and synonyms of the erased class $(\mathrm{Acc}_g,$ generality). All presented values are denoted in percentage (\%). + +
METHODACCe↓ACCir↑ACCg↓
CA (ENTITY)14.889.227.3
CA (ABSTRACTION)25.288.329.6
CA (RELATIONSHIP)22.788.623.1
OURS (ENTITY)12.591.718.6
OURS (ABSTRACTION)21.190.524.7
OURS (RELATIONSHIP)18.490.219.3
+ +concept around $c_{un}$ and Irrelevant Preservation (prompt with $c_{ir}$ can be normally generated), we utilized the same concepts categorized under Entity, Abstraction, and Relationship. For each concept, images were generated using the same random seed across all methods. + +Our study involved 20 non-artist participants, each providing an average of 200 responses. Fig. 4 shows that our method exhibited a comprehensive performance, achieving outstanding results across all 5 aspects, thus making Erase Anything a good all-round player in concept erasure. + +# 5.3. Ablation study + +To assess our loss design, we conducted an ablation study on the task of celebrity image erasure. We chose a subset from the CelebA (Liu et al., 2018), omitting those that Flux [dev] couldn't accurately reconstruct. This resulted in a dataset of 100 celebrities, split into two groups: 50 for erasure and 50 for retention. Unlike MACE's massive concept erasure, EraseAnything is trained on individual celebrities. + +Different variations and their results (evaluated by averaging metrics) are presented in Table 5. $\mathcal{L}_{esd}$ itself fall short of the complete erasure of target concept, resulting in a not so low $\mathrm{ACC}_e$ . With the addition of $\mathcal{L}_{attn}$ , $\mathrm{ACC}_e$ has fallen dramatically but the retention of irrelevant concepts was fail w.r.t $\mathrm{ACC}_{ir}$ . Incorporating the loss term $\mathcal{L}_{rsc}$ , we introduce a approach that may lead to achieving high $\mathrm{ACC}_{ir}$ values. By organically combining all these loss terms, we achieve a comprehensive model that consistently demonstrates the lowest $\mathrm{ACC}_e$ and the highest $\mathrm{ACC}_{ir}$ compared to previous configurations. + +Others. Due to the page limits, we put remaining experimental details and results in Appendix F. This includes the visualizations under different config and objects and more. + +Table 4. Performance Metrics of Nudity Detection Methods. + +
ConceptMethodsFlux[dev]ESDCAEraseAnything
NudityOriginal (Org)59.65%7.36%3.16%2.46%
MU-Attack (step 0)64.56%11.57%15.44%8.77%
MU-Attack (steps 0,1,2)65.96%14.74%16.49%11.93%
+ +Table 5. Ablation Study on Erasing Celebrities, we ablate four loss terms used in our experiments. + +
CONFIGACCe↓ACCir↑
Lesd + Lattn15.382.1
Lesd + Llora20.577.9
Lesd + Lrsc16.185.6
Lattn + Lrsc18.681.7
Lattn + Llora + Lrsc15.880.2
FULL14.988.5
+ +![](images/0021c3f8be8bdc2e3f4170b99f9b1f6b9d571a912299e54a6dc993b5be0fe20f.jpg) +Figure 6. Erase complex concepts. + +# 6. Conclusion + +In this paper, we propose EraseAnything, a Flux-based concept erasing method. Leveraging a bi-level optimization strategy, we strike a balance between erasing the target concept that bound to be removed while preserving the irrelevant concepts unaffected, mitigating long-lasting notorious risk of overfitting and catastrophic forgetting. Experiments across diverse tasks strongly demonstrate the effectiveness and versatility of our method. + +# Impact Statement + +# Ethical Aspects + +Potential Risks of Content Generation: The method proposed in this paper enables the removal of unwanted concepts from large-scale text-to-image (T2I) diffusion models, such as inappropriate content. This helps to reduce the risk of generating content that violates copyright, privacy, or is otherwise unsuitable, thereby mitigating potential ethical controversies associated with the use of such models. Specifically, it addresses concerns regarding the generation of NSFW (Not Suitable For Work) material, which has been + +![](images/d7fd92592bb6e122cd5ee5e83f270ca2450fef0c775c7a862e932298e63363c9.jpg) +Figure 7. Multi-concept erasure. + +a significant issue highlighted in various reports. + +Fairness and Bias of Models: By precisely erasing specific concepts, the model's output can be more finely controlled, avoiding the generation of unfair or biased content that may arise due to biases in the training data. This ensures that the model serves different users and application scenarios in a more equitable and neutral manner. + +# Societal Consequences + +Content Creation and Moderation: With the increasing application of T2I models in content creation, the method presented in this paper provides content creators and moderators with an effective tool to control the subject matter and style of generated content more accurately. This improves the quality and safety of content creation and also alleviates the workload of content moderation, contributing to a healthier and more positive online content ecosystem. + +Model Interpretability and Trust: Through the research and implementation of concept erasure techniques, a better understanding and interpretation of the working principles of T2I models can be achieved. This understanding of how models learn and generate specific content enhances users' trust in the models, facilitating their wider adoption and application in various fields such as education, healthcare, and artistic creation, thereby bringing more innovation and value to society. + +# Acknowledgment + +This work was supported in part by the Natural Science Foundation of China under Grant 62121002, U2336206, 62372423, 62441617 and 62102386. It was also supported by the Beijing Natural Science Foundation under Grant No. 4254100, the Fundamental Research Funds for the Central Universities under Grant No. KG16336301, the China Postdoctoral Science Foundation under Grant No. 2024M764093, and by Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing. + +This research is supported by the National Research Foundation, Singapore and Infocomm Media Development Authority under its Trust Tech Funding Initiative, the National Research Foundation, Singapore under its National Large Language Models Funding Initiative (AISG Award No: AISGNMLP-2024-004). Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of National Research Foundation, Singapore and Infocomm Media Development Authority. + +First author and his PHD advisors are with School of Cyber Science and Technology, University of Science and Technology of China and Anhui Province Key Laboratory of Digital Security, Hefei 230026, China. + +# 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. +Bedapudi, P. Nudenet: Neural nets for nudity classification, detection and selective censoring, 2019. +Bird, S., Klein, E., and Loper, E. Natural language processing with Python: analyzing text with the natural language toolkit." O'Reilly Media, Inc.", 2009. +Bui, A., Vuong, L., Doan, K., Le, T., Montague, P., Abraham, T., and Phung, D. Erasing undesirable concepts in diffusion models with adversarial preservation. arXiv preprint arXiv:2410.15618, 2024. +Colson, B., Marcotte, P., and Savard, G. An overview of bilevel optimization. Annals of operations research, 153: 235-256, 2007. +Esser, P., Kulal, S., Blattmann, A., Entezari, R., Müller, J., Saini, H., Levi, Y., Lorenz, D., Sauer, A., Boesel, F., et al. Scaling rectified flow transformers for high-resolution image synthesis. In *Forty-first International Conference on Machine Learning*, 2024. + +Franceschi, L., Frasconi, P., Salzo, S., Grazzi, R., and Pontil, M. Bilevel programming for hyperparameter optimization and meta-learning. In International conference on machine learning, pp. 1568-1577. PMLR, 2018. +Gandikota, R., Materzynska, J., Fiotto-Kaufman, J., and Bau, D. Erasing concepts from diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2426-2436, 2023. +Gandikota, R., Orgad, H., Belinkov, Y., Materzyńska, J., and Bau, D. Unified concept editing in diffusion models. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 5111-5120, 2024. +Gao, H., Pang, T., Du, C., Hu, T., Deng, Z., and Lin, M. Meta-unlearning on diffusion models: Preventing relearning unlearned concepts. arXiv preprint arXiv:2410.12777, 2024. +Hao, Z., Ying, C., Su, H., Zhu, J., Song, J., and Cheng, Z. Bi-level physics-informed neural networks for pde constrained optimization using broyden's hypergradients. arXiv preprint arXiv:2209.07075, 2022. +He, K., Fan, H., Wu, Y., Xie, S., and Girshick, R. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9729-9738, 2020. +Hertz, A., Mokady, R., Tenenbaum, J., Aberman, K., Pritch, Y., and Cohen-Or, D. Prompt-to-prompt image editing with cross attention control. arXiv preprint arXiv:2208.01626, 2022. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020. +Hu, E. J., Shen, Y., Wallis, P., Allen-Zhu, Z., Li, Y., Wang, S., Wang, L., and Chen, W. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021. +Huang, C.-P., Chang, K.-P., Tsai, C.-T., Lai, Y.-H., and Wang, Y.-C. F. Receler: Reliable concept erasing of text-to-image diffusion models via lightweight erasers. arXiv preprint arXiv:2311.17717, 2023. +Huang, Z., Wu, T., Jiang, Y., Chan, K. C., and Liu, Z. Re-Version: Diffusion-based relation inversion from images. In SIGGRAPH Asia 2024 Conference Papers, 2024. +Kingma, D. P. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. + +Kumari, N., Zhang, B., Wang, S.-Y., Shechtman, E., Zhang, R., and Zhu, J.-Y. Ablating concepts in text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 22691-22702, 2023. +Li, L., Lu, S., Ren, Y., and Kong, A. W.-K. Set you straight: Auto-steering denoising trajectories to sidestep unwanted concepts. arXiv preprint arXiv:2504.12782, 2025. +Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollar, P., and Zitnick, C. L. Microsoft coco: Common objects in context. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pp. 740-755. Springer, 2014. +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, X., Gong, C., and Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow. arXiv preprint arXiv:2209.03003, 2022. +Liu, Y., An, J., Zhang, W., Li, M., Wu, D., Gu, J., Lin, Z., and Wang, W. Realera: Semantic-level concept erasure via neighbor-concept mining. arXiv preprint arXiv:2410.09140, 2024. +Liu, Z., Luo, P., Wang, X., and Tang, X. Large-scale celebfaces attributes (celeba) dataset. Retrieved August, 15 (2018):11, 2018. +Lorraine, J., Vicol, P., and Duvenaud, D. Optimizing millions of hyperparameters by implicit differentiation. In International conference on artificial intelligence and statistics, pp. 1540-1552. PMLR, 2020. +Loshchilov, I., Hutter, F., et al. Fixing weight decay regularization in adam. arXiv preprint arXiv:1711.05101, 5, 2017. +Lu, S., Liu, Y., and Kong, A. W.-K. Tf-Icon: Diffusion-based training-free cross-domain image composition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2294-2305, 2023. +Lu, S., Wang, Z., Li, L., Liu, Y., and Kong, A. W.-K. Mace: Mass concept erasure in diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6430-6440, 2024a. +Lu, S., Zhou, Z., Lu, J., Zhu, Y., and Kong, A. W.-K. Robust watermarking using generative priors against image editing: From benchmarking to advances. arXiv preprint arXiv:2410.18775, 2024b. + +Lyu, M., Yang, Y., Hong, H., Chen, H., Jin, X., He, Y., Xue, H., Han, J., and Ding, G. One-dimensional adapter to rule them all: Concepts diffusion models and erasing applications. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7559-7568, 2024. +Mangrulkar, S., Gugger, S., Debut, L., Belkada, Y., Paul, S., and Bossan, B. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/huggingface/peft, 2022. +Nichol, A., Dhariwal, P., Ramesh, A., Shyam, P., Mishkin, P., McGrew, B., Sutskever, I., and Chen, M. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021. +Oord, A. v. d., Li, Y., and Vinyals, O. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. +Podell, D., English, Z., Lacey, K., Blattmann, A., Dockhorn, T., Müller, J., Penna, J., and Rombach, R. Sdx1: Improving latent diffusion models for high-resolution image synthesis. arXiv preprint arXiv:2307.01952, 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 International conference on machine learning, pp. 8748-8763. PMLR, 2021. +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., Pavlov, M., Goh, G., Gray, S., Voss, C., Radford, A., Chen, M., and Sutskever, I. Zero-shot text-to-image generation. In International conference on machine learning, pp. 8821-8831. Pmlr, 2021. +Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen, M. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022. +Rando, J., Paleka, D., Lindner, D., Heim, L., and Tramère, F. Red-teaming the stable diffusion safety filter. arXiv preprint arXiv:2210.04610, 2022. +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. + +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. Springer, 2015. +Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton, E. L., Ghasemipour, K., Gontijo Lopes, R., Karagol Ayan, B., Salimans, T., et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in neural information processing systems, 35: 36479-36494, 2022. +Salimans, T. and Ho, J. Progressive distillation for fast sampling of diffusion models. arXiv preprint arXiv:2202.00512, 2022. +Schramowski, P., Brack, M., Deiseroth, B., and Kersting, K. Safe latent diffusion: Mitigating inappropriate degeneration in diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22522-22531, 2023. +Schuhmann, C., Beaumont, R., Vencu, R., Gordon, C., Wightman, R., Cherti, M., Coombes, T., Katta, A., Mullis, C., Wortman, M., et al. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35: 25278-25294, 2022. +Shen, Q., Wang, Y., Yang, Z., Li, X., Wang, H., Zhang, Y., Scarlett, J., Zhu, Z., and Kawaguchi, K. Memory-efficient gradient unrolling for large-scale bi-level optimization. arXiv preprint arXiv:2406.14095, 2024. +Sinha, A., Malo, P., and Deb, K. A review on bilevel optimization: From classical to evolutionary approaches and applications. IEEE transactions on evolutionary computation, 22(2):276-295, 2017. +Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020. +Su, J., Ahmed, M., Lu, Y., Pan, S., Bo, W., and Liu, Y. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 568:127063, 2024. +Vaswani, A. Attention is all you need. Advances in Neural Information Processing Systems, 2017. +von Platen, P., Patil, S., Lozhkov, A., Cuenca, P., Lambert, N., Rasul, K., Davaadorj, M., Nair, D., Paul, S., Berman, W., Xu, Y., Liu, S., and Wolf, T. Diffusers: State-of-the-art diffusion models. https://github.com/huggingface/diffusers, 2022. + +Xie, J., Li, Y., Huang, Y., Liu, H., Zhang, W., Zheng, Y., and Shou, M. Z. Boxdiff: Text-to-image synthesis with training-free box-constrained diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7452-7461, 2023. +Zhang, L., Liang, Y., and Xie, P. Blo-sam: Bi-level optimization based overfitting-preventing finetuning of sam. arXiv preprint arXiv:2402.16338, 2024a. +Zhang, Y., Chen, X., Jia, J., Zhang, Y., Fan, C., Liu, J., Hong, M., Ding, K., and Liu, S. Defensive unlearning with adversarial training for robust concept erasure in diffusion models. arXiv preprint arXiv:2405.15234, 2024b. +Zhang, Y., Jia, J., Chen, X., Chen, A., Zhang, Y., Liu, J., Ding, K., and Liu, S. To generate or not? safety-driven unlearned diffusion models are still easy to generate unsafe images... for now. In European Conference on Computer Vision, pp. 385-403. Springer, 2024c. + +# A. Flux Architecture + +In our research, we have chosen Flux [dev] as our baseline model due to its reputation as the most performant within the open-source Flux series. As highlighted in Section 3, Flux's architecture significantly diverges from that of SD v1.5, which has been the predominant baseline for contemporary concept erasure techniques. + +As shown in Figure 8 and Figure 9, we have dissected the architecture of Flux ([schnell] and [dev] shared the same architecture). We discovered that, unlike in SD, Flux does not incorporate an explicit cross-attention module. Nonetheless, we have observed that the dual stream block's approach to concatenating text and image features can emulate the cross-attention effects of SD. Specifically, this mechanism enables the identification of a word's heatmap within the attention map based on the token's position in the text, which can be seen in Figure 10. Furthermore, we have found that by pruning this heatmap, we can effectively inhibit the generation of specific content, a finding that serves as a pivotal foundation in our paper. + +![](images/26f0c679655ef50a66be72cb2455811455cdeef635c96877dad9fcc844de6479.jpg) +Figure 8. Model architecture of Flux [dev]. Flux [dev] use frozen CLIP-L 14 and T5-XXL as text encoders for conditioned caption feature extraction. The coarsed CLIP embedding concatenated with timestep embedding $y$ are used to modulation mechanism. The fine-grained T5 $c$ concatenated with image latents $x$ are input to a stacked of double stream blocks and single stream blocks to predict output in the VAE encoded latent space. Concatenation is indicated by $\odot$ . + +Building upon this finding, our optimization efforts are now focused on the dual stream block, as illustrated in Figure 9). Our experimental results indicate that the parameters $\text{add\_v\_proj}$ and $\text{to\_v}$ are highly numerically sensitive, rendering them less than ideal for optimization purposes. Consequently, we have shifted our focus to optimizing $\text{add\_q(k)}$ -proj and $\text{to\_q(k)}$ instead. This strategic adjustment is expected to yield more robust and stable improvements in the model's performance. + +For a fair comparison, we have adapted traditional methods such as ESD, UCE, and MACE, which typically optimize the Q, V, to instead optimize the Q, K inside of Dual Transformer Block. This modification ensures that our comparative analysis is conducted under a consistent and relevant framework. + +![](images/af13a40fcda193af66e89287bfe31d7e02a47fcc7964695acf32304998131578.jpg) +Figure 9. Dual stream block. In Flux, the semantic correlation is established in the dual stream block, which established an implicit relationship between text and image. Noteworthy thing is that the explicit cross attention module that prevails among SD v1.5 is not existed in Flux. + +![](images/129191919af83be6d5d4b9943bba46074a561a9687ea080179e97ab65a3032e2.jpg) +Figure 10. Attention map extraction. The correlation between specific words and their corresponding heatmaps can be discerned within the matrix $\mathbf{W}_{\mathrm{attn}}$ , particularly within the columns (white bar adorned with a blue dotted line) associated with text. + +![](images/1a4baae4ccaf6cd19f05fb98897159363a1f57d2309a9f3f301891d43d23ccaf.jpg) +(a) Randomly Shuffled Prompt + +![](images/9bbf98814121f10b37aaa102bd13424fc3531ab8a88a283ca7aa0bb959060725.jpg) +(b) Attack success rate(ASR) +Figure 11. Order Insensitive & Black box attack. (a) The sequence of the prompt has minimal impact on the synthesized image. (b) Our learning-based method can maintain robustness against conventional black box attacks, whereas attention map erasure is ineffective. + +# B. Pattern of prompt & Black box attack + +To address the issue of overfitting, we aim to make the token index dynamic. Initially, we must validate a hypothesis: "Randomly shuffling the prompt should not impact the generation results of Flux". + +The basic prompt in our case is: "a nude girl with beautiful hair and big breast". To demonstrate Flux's generalizability, we randomly shuffled this prompt at the word level: e.g. "girl with beautiful and big nude a hair breast". To ensure fairness, we fed these randomly shuffled prompts into a popular online service, Fal.ai $^{3}$ . Fal.ai is known for providing off-the-shelf Text2Image APIs in an easily accessible manner, making it popular among users who wish to quickly test their ideas and create prototypes. We chose Fal.ai due to its swift image generation capabilities and the tamper-proof nature of its model weights. + +As depicted in Figure 11 (a), despite the alteration of word order within the prompt, the central attributes of the prompt remained robust: "beautiful; girl; nude; hair; breast" (even though the generated results oscillated between sensitive and regular content). Therefore, this experiment sufficiently demonstrated a key characteristic of Flux [dev]: Flux [dev] is not sensitive to the word order in the input prompt. + +This serves as a compelling demonstration that we can effectively employ data augmentation by utilizing this property. It justifies the practice of shuffling the prompt at each iteration during training, enhancing the robustness of our model. + +Furthermore, we have curated a set of 100 prompts that include recognizable objects or styles, spanning from soccer, celebrities, to cartoons and art. Our goal here is to verify that the simple attention map erasure technique, as discussed in the context of cross-attention in Section 3), can be easily circumvented through rudimentary black-box prompt attacks. + +As illustrated in Figure 11 (b), the attention map erasure technique struggles to effectively handle misspellings and synonyms, as the token index for the target concept word differs from those of its misspellings and synonyms. Regarding the scenario where the target concept word is repeated (i.e., it appears at least twice in the prompt), we have observed that the complete deletion of attention maps associated with the corresponding indices does not prevent the re-generation of the target concepts. As shown in Figure 12, the attempted deletion of "New Balance" and "Dr.Martens" does not yield the expected outcome. + +This finding underscores the complexity of the task and suggests that a more sophisticated approach is needed to ensure that the target concepts are not regenerated in the output, regardless of their frequency in the input prompt. The current method of attention map erasure does not suffice, and thus, there is a clear need for a more nuanced learning-based erasure technique that can distinguish and eliminate the influence of repeated target concepts effectively. As demonstrated in Figure 11 (b), our method can effectively counter these black-box attack methods and significantly lower the attack success rate + +Figure 12. Repeated (target concept occurs more than twice in the input prompt). It is apparent that the direct attention map erasure proves ineffective in addressing the re-generation problem of the target concept within the prompts. As illustrated in the figure, the first token index is denoted by purple, and the second token index is denoted by gold. We discovered that even after zeroing out all concept-related token indices in the attention map, the resulting image still includes the concept that was intended to be erased. +![](images/97e500f70aebdd9ab5adb697ec507c417e395cc5aaffd488acce735bfc808fd8.jpg) +New Balance 990v5 premium running shoe featuring a grey mesh and suede upper, prominent New Balance 'N' logo on the side, cushioned midsole, and supportive rubber outsole. + +![](images/00dceb4bfc76ff06e2c1c245456acf2c88fa17f9a6c90a7efad24e1a55f561d7.jpg) +Dr. Martens 1460 sturdy eight-eyelet lace-up boot made of smooth black leather, yellow stitching around the edges, air-cushioned sole, and Dr. Martens logo embossed on the side. + +Table 6. AI Agent template in generating ${c}_{ir}\left( {{c}_{un} = {}^{\prime \prime }\text{nude}}\right)$ . + +
RoleContent
System‘You are a helpful assistant and a well-established language expert’
UserHello, please return K (K=3) English words that you think with Human intuition are no Relation/far/mid in the semantic space from the English word: cun, and only reply the result with JSON format is as follows: {”no Relation”: [(word1, similarity_score1), ...], “far”: [(word1, similarity_score1), ...], “mid”: [(word1, similarity_score1), ...}]
Response{”no Relation”: [”,cloud”, 0.1), (“tree”, 0.2), (“carpet”, 0.1)], “far”: [”,hot”, 0.3), (“color”, 0.4), (“wet”, 0.3)], “mid”: [”,image”, 0.5), (“figure”, 0.6), (“portrait”, 0.5)]}
+ +(ASR) below the acceptable level. + +# C. Prompt-related supplementary material + +# C.1. A heuristic $c_{ir}$ sampling method + +Identifying the concept $c_{ir}$ that is unrelated to the target concept in the semantic feature space is not as straightforward as it may seem. General text feature encoders like T5 are typically trained on large-scale corpus data. The repeated occurrence of two seemingly unrelated concepts in the same training corpus might lead to a certain degree of correlation in the semantic feature dimension, causing the mapping position relationship of different text tokens in their semantic space to deviate from human perception of text words. Therefore, the similarity between text embeddings cannot be directly used as a measure to represent the correlation between two concepts. + +To address this issue, we have devised a heuristic $c_{ir}$ sampling method. By leveraging the cognitive ability of LLM regarding human text concepts and through heuristic prompt design, we make them return concepts that are unrelated to the word $c_{un}$ to be erased and also require the similarity between $c_{un}$ and $c_{ir}$ . Since the interaction with the LLMs occurs at the natural language level, the returned similarity is only a relative reference value, but it suffices to meet our requirements for sampling $c_{ir}$ . + +As shown in Table 6, the process of $c_{ir}$ is first through building an AI Agent with unique role and regulated output format. We initiate the process by requiring GPT-4o to return $c_{ir}$ that they deem to be unrelated to the target concept. After got the set of candidate values. Next, we classify and rank these concepts into three distinct categories: "no Relation", signifying concepts that have minimal or no semantic connection; "far", representing those with a relatively loose semantic association; "mid", indicating a moderate level of relatedness. + +After obtaining the initial response in Table 6, we randomly select each word from the three categories, which is in accordance with $\mathrm{K} = 3$ by default as illustrated in the main paper. + +Table 7. Complete list of conceptions of Entity, Abstraction, Relationship + +
Category# NumberPrompt templateConceptions
Entity10‘A photo of [Entity]’‘Fruit’, ‘Ball’, ‘Car’, ‘Airplane’, ‘Tower’, ‘Building’, ‘Celebrity’, ‘Shoes’, ‘Cat’, ‘Dog’
Abstraction10‘An Art in the style of [Abstraction]’‘Pablo Picasso’, ‘Salvador Dali’, ‘Claude Monet’, ‘Vincent Van Gogh’, ‘Rembrandt van Rijn’, ‘Frida Kahlo’, ‘Edvard Munch’, ‘Leonardo da Vinci’, ‘Explosions’, ‘Environmental Simulation’
Relationship10‘A [Relationship] B’‘Shake Hand’, ‘Kiss’, ‘Hug’, ‘In’, ‘On’, ‘Back to Back’, ‘Jump’, ‘Bur-row’, ‘Hold’, ‘Amidst’
+ +# C.2. Complete list of Entity, Abstraction, Relationship + +For assessing the generalization of EraseAnything, we establish a conception list at three levels: from the concrete objects to the abstract artistic style and relationship, the full list used in our experiments is presented in Table 7. + +# D. Derivative of Reverse Self-Contrastive Loss + +As one of the proven method, InfoNCE loss is widely used in self-contrastive learning to learn model parameters by contrasting the similarity between positive and negative samples: + +$$ +\mathcal {L} _ {\text {I n f o N C E}} = - \log \left(\frac {\exp \left(\operatorname {s i m} \left(q , k ^ {+}\right)\right)}{\sum_ {i = 0} ^ {N} \exp \left(\operatorname {s i m} \left(q , k _ {i}\right)\right)}\right) \tag {7} +$$ + +where $\mathrm{sim}(q,k)$ denotes the similarity between the query vector $q$ and the key vector $k$ , $k^{+}$ is the key vector of the positive sample, $k_{i}$ represents the key vectors of negative samples, and $K$ is the number of negative samples. + +In conventional self-contrastive learning, we aim to make $F^{un}$ more similar to $F^{syn}$ to enhance the model's sensitivity to the term targeted for removal. + +$$ +\mathcal {L} _ {s c} = - \log \left(\frac {\exp \left(\sin \left(F ^ {u n} \cdot F ^ {s y n}\right)\right)}{\sum_ {i = 0} ^ {K} \exp \left(\sin \left(F ^ {u n} \cdot F ^ {k _ {i}}\right)\right)}\right) \tag {8} +$$ + +However, in our case, we desire the model to be less sensitive to the term "nude" and its synonyms. Thus, we introduce the Reverse Self-Contrastive Loss through swapping the numerator and the denominator: + +$$ +\mathcal {L} _ {r s c} = \log \left(\frac {\sum_ {i = 0} ^ {K} \exp \left(\sin \left(F ^ {u n} , F ^ {k _ {i}}\right)\right)}{\exp \left(\sin \left(F ^ {u n} , F ^ {s y n}\right)\right)}\right) \tag {9} +$$ + +Here, $F^{un}$ is the central feature, $F^{syn}$ is the synonym feature, and $F^{k_i}$ are the features of other irrelevant concepts. + +To refine the model further, we consider introducing a temperature parameter $\tau$ to adjust the distribution of similarity scores: + +$$ +\operatorname {s i m} \left(F ^ {u n}, F ^ {s y n}\right) = \frac {F ^ {u n} \cdot F ^ {s y n}}{\tau} \tag {10} +$$ + +Incorporating the temperature parameter into the loss function, we obtain: + +$$ +\mathcal {L} _ {r s c} = \log \left(\frac {\sum_ {i = 0} ^ {K} \exp \left(\frac {F ^ {u n} . F ^ {k _ {i}}}{\tau}\right)}{\exp \left(\frac {F ^ {u n} . F ^ {s y n}}{\tau}\right)}\right) \tag {11} +$$ + +This derivation integrates the fundamental concepts of the InfoNCE loss function and tailors them to our specific case. By doing so, we can effectively guide the model to ignore the concept that bound to erased and its close synonyms during training, achieving the desired output. + +# E. User Study + +Adhering to Flux's comprehensive evaluative criteria for Text-to-Image (T2I) models, we have integrated three key metrics into our user study: Imaging Quality, Prompt Adherence, Output Diversity. These metrics serve as the cornerstone for assessing the performance of our model. In our specific context, which focuses on the erasure of concepts to minimize their interference with the synthesis of images featuring unrelated concepts, we have introduced two additional metrics to refine our assessment framework: Erasing Cleanliness and Irrelevant Preservation. + +Erasing Cleanliness evaluates the effectiveness of the concept erasure process, ensuring that the targeted concepts are thoroughly removed without leaving any residual influence on the synthesized image. Irrelevant Preservation, on the other hand, measures the model's ability to maintain the integrity and relevance of concepts that are not the focus of the erasure process, ensuring that the overall composition and context of the image are preserved within the model. + +Figure 13 and Figure 14 provide a visual representation of the user study interface, which was meticulously designed to facilitate a smooth and engaging participant experience. During the study, participants were presented with a series of image sets, each containing 6 and 3 results generated by various anonymous methods. They were then prompted to score each method based on its performance across the aforementioned metrics. The collected data was subsequently compiled and visualized in a pentagonal chart, as depicted in Figure 4 of the main paper, offering a comprehensive overview of the methods' performance and highlighting the strengths and areas for improvement of each approach. This visual summary serves as a valuable tool for both researchers and practitioners, enabling a more nuanced understanding of the model's capabilities and guiding future developments in the field of image synthesis. + +# F. Others + +Important Declaration: Owing to the rigid 10MB file size limit of ICML 2025, authors have had to compress the images to a level that significantly reduces their quality in the appendices. + +# F.1. Celebrity + +The names of celebrities used in our ablation study are illustrated in Table 8. The noteworthy thing here is that not arbitrary celebrities can be faithfully synthesised by Flux [dev], after manually comparing the synthesized famous people with its prompt and add some comic characters, we keep 50 for each group. + +Specification: We train the celebrity recognition network on top of MobileNetV2 that pretrained on ImageNet, then add a GlobalAveragePooling2D and Softmax(Dense) at the end of the original output (out_relu) of MobileNetV2. The learning rate is a fixed 1e-4 with Adam optimizer and loss function is categorical cross-entropy. + +As for dataset, we gather the data with an average of 50 pictures per celebrity, with the gross number of 5,000. Then we randomly re-sampled the dataset and divided into training set (80%) and test set (20%). The statistics are reported upon the test set (1,000), reserves one decimal fraction. + +# F.2. More Experimental Results + +Ablation Study on Diverse Loss Configurations. As demonstrated in Figure 19, we conducted a thorough comparison of outcomes utilizing various combinations of loss functions to our methodology. It is evident that the strategic integration of $\mathcal{L}_{lora}$ significantly bolsters the visual consistency with the original character's appearance. Meanwhile, $\mathcal{L}_{rsc}$ adeptly obscures the targeted concept, directing it towards transformation into a myriad of incongruous notions. In contrast, $\mathcal{L}_{esd}$ exemplifies the quintessential concept erasure strategy. + +# User Study + +This is a test for evaluating the generated images from unordered concept erasure AI model, each time we show user 6 results under the same prompt, guidance scale and seed. Users are needed to judge the result with two metrics: Erasing Cleanliness and Irrelevant Preservation. + +Please rate the images on a scale from 1 to 5, where 1 indicates the lowest quality and 5 represents the highest quality. The column in RED is designated for evaluating the 'Erasing Cleanliness' of the images, which refers to the effectiveness of the concept erasure method. Adjacent to it, you will find the 'Irrelevant Preservation' column (GREEN), which measures how well the images retain elements that were not targeted for erasure. + +![](images/ef89ea5822ebde161dd5305d1bda0d9d9e84e7c8a25cd0f1a3ca588326afa14b.jpg) +Figure 13. User Study on Erasing Cleanliness and Irrelevant Preservation (Screenshot). + +# User Study + +This is a test for evaluating the generated images from unordered concept erasure AI model, each time we show user 3 results under the same prompt, guidance scale but varied seed. Users are needed to judge the result with three metrics: Imaging Quality, Prompt Adherence and Output Diversity. + +Please rate the images on a scale from 1 to 5, where 1 indicates the lowest quality and 5 represents the highest quality. Prompts are all sampled from PromptHero. + +# Prompt + +the painting shows four aliens sitting on a sofa, in the style of trompe-Toell illusionistic detail, presentation of human form, dark crimson and light blue, american prints 1880-1950 + +![](images/d133048cd467e3227b11177d1e92f52540f6a7ebdc2c0f696236043aa60c6f4a.jpg) +Method A + +![](images/0bacb4ecb70f57ce46a24e57e65910ea572a06b32f4e67650aaf4f9440ea7d89.jpg) +Method B + +![](images/de7453bdb2b1ef9c2e45a5f5a14ebb10dab2799bc70a3afb507556fa3ac37b09.jpg) +Method C + +Imaging Quality + +![](images/86461a8fd6694c4f631b7346396f27031c1d7c11a466490cc1034ab7b35be55f.jpg) +Figure 14. User Study on Imaging Quality, Prompt Adherence and Output Diversity (Screenshot). + +![](images/2cf6eb023bfc141977003fc98809729b9179df6cd86f7ed74c3a63e105ca7ac3.jpg) + +![](images/a304e5e4dbe542119a4102e89674959731a17207e6201051e5446711f4fb404f.jpg) + +Prompt Adherence + +![](images/bec3602a037133dd0d3abf59a9e9d4807dc9e29da637352624d3410987137300.jpg) + +![](images/681cda56a5607e1d3738ada5b8cf86b98fdf104dfd49a119e18f8297bd37cd13.jpg) + +![](images/a153370c6d7fbc04da0dfeb8b6a2e5a93c938402957314a9278ae5b0456db5b8.jpg) + +Output Diversity + +![](images/3cd4b55cc4201ed9485cc0302a5b1901bac20d2b6647076abfdbdaa065530524.jpg) + +![](images/2eacf3773a84b5817a1890f34f58cc863175bc71ce17d2e615fa420031e7c1fc.jpg) + +![](images/8dba871909688d0c02ebd22f830fed7b922072f5d6e39d0fa979c9fa1f3e0dcc.jpg) + +Table 8. Complete list of celebrities used in ablation study. + +
Category# NumberCelebrity
Erasure Group50‘Adele’, ‘Albert Camus’, ‘Angelina Jolie’, ‘Arnold Schwarzenegger’, ‘Audrey Hepburn’, ‘Barack Obama’, ‘Beyoncé’, ‘Brad Pitt’, ‘Bruce Lee’, ‘Chris Evans’, ‘Christiano Ronaldo’, ‘David Beckham’, ‘Dr Dre’, ‘Drake’, ‘Elizabeth Taylor’, ‘Eminem’, ‘Elon Musk’, ‘Emma Watson’, ‘Frida Kahlo’, ‘Hugh Jackman’, ‘Hillary Clinton’, ‘Isaac Newton’, ‘Jay-Z’, ‘Justin Bieber’, ‘John Lennon’, ‘Keanu Reeves’, ‘Leonardo Dicaprio’, ‘Mariah Carey’, ‘Madonna’, ‘Marlon Brando’, ‘Mahatma Gandhi’, ‘Mark Zuckerberg’, ‘Michael Jordan’, ‘Muhammad Ali’, ‘Nancy Pelosi’, ‘Neil Armstrong’, ‘Nelson Mandela’, ‘Oprah Winfrey’, ‘Rianna’, ‘Roger Fed- erer’, ‘Robert De Niro’, ‘Ryan Gosling’, ‘Scarlett Johansson’, ‘Stan Lee’, ‘Tiger Woods’, ‘Timothee Chalamet’, ‘Taylor Swift’, ‘Tom Hardy’, ‘William Shakespeare’, ‘Zac Efron’
Retention Group50‘Angela Merkel’, ‘Albert Einstein’, ‘Al Pacino’, ‘Batman’, ‘Babe Ruth Jr’, ‘Ben Affleck’, ‘Bette Midler’, ‘Benedict Cumberbatch’, ‘Bruce Willis’, ‘Bruno Mars’, ‘Donald Trump’, ‘Doraemon’, ‘Denzel Washington’, ‘Ed Sheeran’, ‘Emmanuel Macron’, ‘Elvis Presley’, ‘Gal Gadot’, ‘George Clooney’, ‘Goku’, ‘Jake Gyllenhaal’, ‘Johnny Depp’, ‘Karl Marx’, ‘Kanye West’, ‘Kim Jong Un’, ‘Kim Kardashian’, ‘Kung Fu Panda’, ‘Lionel Messi’, ‘Lady Gaga’, ‘Martin Luther King Jr’, ‘Matthew McConaughey’, ‘Morgan Freeman’, ‘Monkey D. Luffy’, ‘Michael Jackson’, ‘Michael Fassbender’, ‘Marilyn Monroe’, ‘Naruto Uzumaki’, ‘Nicolas Cage’, ‘Nikola Tesla’, ‘Op- timus Prime’, ‘Robert Downey Jr’, ‘Saitama’, ‘Serena Williams’, ‘Snow White’, ‘Superman’, ‘The Hulk’, ‘Tom Cruise’, ‘Vladimir Putin’, ‘Warren Buffett’, ‘Will Smith’, ‘Wonderwoman’
+ +Benchmarking Against State-of-the-Art (SOTA). As depicted in Figure 15, we compare EraseAnything with state-of-the-art (SOTA) methods on various concepts. It can be easily observed that Attention Map is sufficient to remove target concept. However, as previously analyzed in Appendix B, such methodologies are susceptible to rudimentary black-box attacks, rendering them impractical for real-world applications. + +LoRA Disentanglement Analysis. To assess the potential influence of integrating fine-tuned LoRAs into the original Flux [dev], as depicted in Figure 16, it can be observed that incorporating fine-tuned LoRAs for diverse concepts, i.e. Celebrity: Batman, Christiano Ronaldo, Hulk, Lebron James, Wonderwoman. Object: Alaskan Malamute, Statue of Liberty, Basketball, Skyscraper, Cat and Art: Van Gogh, Edvard Munch, Rembrandt van Rijn, Claude Monet, Salvador Dali, does not adversely affect the original image synthesis capabilities. All above-mentioned concepts are depicted sequentially from left to right. + +Exploring the Synergy of Combined Concept-Erased LoRAs. In our quest to unravel the potential of integrating concept-erased LoRAs, we delve into the intricacies of merging these elements into a cohesive single entity, denoted as $\Delta \theta_{\mathrm{mul}}$ . This experiment is meticulously designed to assess the capabilities of image synthesis when multiple LoRAs are unified. Specifically, we randomly sample LoRAs from Table 7 and combine them using Equation (12). + +As depicted in Figure 17, the upper side of the blue dashed line represents $\sum_{i=0}^{N} W_i = 1$ , $W_i = \frac{1}{N}$ , indicating a linear normalized weight blending strategy. Conversely, the lower side of the line reveals the implications of a non-normalized sum, where $\sum_{i=0}^{N} W_i = N$ , $W_i = 1$ . Here, $N$ represents the total number of LoRAs being combined, e.g. 3, 5, 10. + +$$ +\Delta \theta_ {\mathbf {m u l}} = \sum_ {i = 0} ^ {N} W _ {i} \Delta \theta_ {i} \tag {12} +$$ + +The process of image synthesis is significantly impacted when the cumulative weight of the combined LoRAs, denoted by $\sum_{i=0}^{N} W_i$ , exceeds the normalized threshold of 1. This surpassing signals a critical juncture in the image synthesis process, potentially resulting in an overemphasis on certain concepts while inadvertently neglecting others. Such a shift could introduce a bias towards recognized concepts, possibly at the expense of exploring new or unrelated themes. + +Conversely, when the aggregate weight remains within the confines of 1, the model's prowess in generating a diverse array of unrelated concepts remains largely indistinguishable from the original Flux[dev] model, underscoring the model's robustness. + +Multiple Concept Erasure. Leveraging the insights gleaned from aforementioned findings, we venture to explore the hypothesis of concept erasure with greater depth: + +# Q: Can EraseAnything is capable of erasing multiple concepts in the meantime? + +Resoundingly, the answer is affirmative. As depicted in Figure 18, through the linear interweaving of LoRAs representing distinct concepts under a normalized weight sum, we achieve the coveted outcome of concept erasure that harmoniously integrates with the backdrop of the environment. This capability positions EraseAnything as an exemplary contender for advanced concept erasure endeavors. + +# F.3. Limitations + +Although "EraseAnything" has demonstrated its formidable ability to erase concepts across various domains, we have identified challenges it faces in certain situations: + +Extensive Concept Erasure: When tasked with erasing multiple concepts simultaneously, such as 10 or more concepts (LoRAs), the Normalized Sum strategy, as depicted in Equation (12), results in a proportional decrease in the impact of each concept's erasure. Consequently, a significant and important avenue for research in this field is to explore efficient methods for combining a large number of LoRAs (more than 100) effectively. + +Fine-grained Control: Another issue pertains to the inability to guarantee the strength of the erasure during fine-tuning. This is an uncharted yet intriguing area in the realm of concept erasure, which could provide us with a deeper understanding of the concept formulation. It would also enable more precise control over the erasure process, e.g. a slider could be provided to control the intensity during interactive concept erasure. + +![](images/1088c0ca4624afb618d90f5d2540fcaca3046a1891ee725ea9abd14a43839a6d.jpg) +Figure 15. Comparison with mainstream concept erasing methods. We compared Erase Anything to other concept erasers on Flux [dev] across categories like Art Style, Celebrity, Plant & Animal, Relationship, Car & Architecture. The Attention Map (3rd column from the right) shows the simple token localization method from Section 3 that erases target concept effectively, yet its vulnerable to the minor change of tokens—misspellings, prefixes & suffixes and repeated words—make it difficult to widely adopt in practical applications. + +![](images/7075a5a26d1c02f8995c9f1ce921b456c0d28f1a258e46c2bff6ec3c263edfe3.jpg) +Figure 16. Visualization on LoRA Disentanglement. The left side of the blue dashed line delineates the erasure-concept-generated images (yellow box) and the original image (green box at the lower left). The right side illustrates the result on unrelated concepts upon incorporating the LoRA associated with the erased concept. Top rows: Celebrity; Mid rows: Object; Last rows: Art. + +![](images/47edc29512d8aee37e2005b0505841ddcce78dc9d02663c0268e70b4aa095666.jpg) +Multi-LoRAs +Superman is riding a horse +Winter Landscape, Palace-level design, white blue orange +A cloaked astronaut stands in the gloom holding an orb glowing pink + +![](images/0aa4f6c3f18aed861bd5ae7ce319fc8532145a650fd199f2e42445c6946fbdf3.jpg) +Figure 17. Compositional LoRAs for irrelevant concepts. We randomly sampled irrelevant concept-erased LoRAs and blending them in two ways: Normalized Sum (above the blue dotted line) and Un-Normalized Sum (below the blue dotted line). + +![](images/370dc0edae1b24984d93aabfd496909ad0ebdc46d8614b549124fa0e10e050b4.jpg) +bodyguard + +![](images/cd6e754fe8fe5ff8b3a96989d055264384c1c486fe6389d4df1408b3f6a44662.jpg) +Johnny Depp + +![](images/6b19d5d1a6f17b7729f580b6f843315f49f9e23763752023c2585d613a06f190.jpg) +bodyguard Johnny Depp + +![](images/500357af6ae6fc8c5abd624cb8f2e79501cb650e31b326240eae2a2c1031aeaf.jpg) +Johnny Depp is riding a bicycle, with his bodyguard behind + +![](images/a6d222b0e107f2483b04b8c6c56287beb49a716e4e0f9a9323000dca65e46764.jpg) + +![](images/78d2db86e5bfcd5f0c323ba1453b7c0b42e3db027af68432a696a05ee4867167.jpg) + +![](images/71f26608b05fbd70e44ef03149c4e94cb2e1500109c85522ea1c0b48142a2928.jpg) + +![](images/1713dc521fc9f4538ad0308ca04f00a7e321f1985855ac8d2284b2e69e292aca.jpg) +Two girl hug +each other, in +the style of +Frida Kahlo + +![](images/5c2ac44e239afeeb81b13781d74583261fb786d43e256d38d373ba1f687a883f.jpg) + +![](images/0e1dfe9812de4288df84106058443c330b6681035b5b6a0311b5f1094b508ddb.jpg) + +![](images/330765e6ed6c30f1f8a27fb2ac7b78eb17474c1d296d38a01bf956a433f549f3.jpg) + +![](images/ee36c56029e88415fdba65a9e565d9f837c389fc726b6f24f3357eaa998441f7.jpg) +Hug +Figure 18. Compositional LoRAs for related concepts. We find that through Normalized Sum, we can effectively erase multiple concepts at the same time. + +![](images/5e7ce9ca2440aa39f9e86592747c13f539890d2c5d3c3554e4b5f541a489eeea.jpg) +Frida Kahlo + +![](images/e9a4c06a6501af766aa7ea38db1fbf14ec3657f8cdd8912df92ffff8141f9a72.jpg) +Two Hug + +![](images/a8662d43abbffc907a9bcf69f3b5ebcff46f21a34f52f27bc96645780e1fcbe1.jpg) +Figure 19. Ablation Study on different loss config. \ No newline at end of file diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/images.zip b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..446e04388dae644b8ecb8bb1e24211d70cf0f9f0 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:326d0786da633e71e0f82168bfd237a55cc74ecca1d2ae57ccb9f76ce12bffc2 +size 2368142 diff --git a/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/layout.json b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4a010f513396164b1229ea6a1d524e73fa93cac9 --- /dev/null +++ b/ICML/2025/EraseAnything_ Enabling Concept Erasure in Rectified Flow Transformers/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75558e81ba28316760a9b58a3be3b6eb56151d58367d92db8165d8b8f00f5f33 +size 790217 diff --git a/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_content_list.json b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7f3a1f3ccb7ae4905898c458428bcddbe4a1c297 --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3eceb9bf51ca03030a1e66bee723725097bdc1e4c1e0d047017ab7f600d8f10d +size 154359 diff --git a/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_model.json b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..75bbb32fbbcbac0cf0e39826e3515e440b32eb94 --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ed2a91a7d35c77bbcf6dd92da6471c43e6b0978b69c4d0cf917ee2709ab0d15 +size 180092 diff --git a/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_origin.pdf b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..14b4e304a57eedbbab30bdc443ed29437da4e047 --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/e5ae2a43-e58a-473f-aa02-94fc27582fc1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af8670e9a180316fc3553577fb847be2e0329928c9b7a1a05472ff72d8fec382 +size 4633386 diff --git a/ICML/2025/Ergodic Generative Flows/full.md b/ICML/2025/Ergodic Generative Flows/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6142239eedd8c542b5f22a98289cb01c2794129e --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/full.md @@ -0,0 +1,761 @@ +Leo Maxime Brunswic* 1 Mateo Clemente* 1 Rui Heng Yang 1 Adam Sigal 1 Amir Rasouli 1 Yinchuan Li 2 + +# Abstract + +Generative Flow Networks (GFNs) were initially introduced on directed acyclic graphs to sample from an unnormalized distribution density. Recent works have extended the theoretical framework for generative methods allowing more flexibility and enhancing application range. However, many challenges remain in training GFNs in continuous settings and for imitation learning (IL), including intractability of flow-matching loss, limited tests of non-acyclic training, and the need for a separate reward model in imitation learning. The present work proposes a family of generative flows called Ergodic Generative Flows (EGFs) which are used to address the aforementioned issues. First, we leverage ergodicity to build simple generative flows with finitely many globally defined transformations (diffeomorphisms) with universality guarantees and tractable flow-matching loss (FM loss). Second, we introduce a new loss involving cross-entropy coupled to weak flow-matching control, coined KL-weakFM loss. It is designed for IL training without a separate reward model. We evaluate IL-EGFs on toy 2D tasks and real-world datasets from NASA on the sphere, using the KL-weakFM loss. Additionally, we conduct toy 2D reinforcement learning experiments with a target reward using the FM loss. + +# 1. Introduction + +Generative models aim to sample from a target distribution $\kappa$ on a space $S$ , possibly conditioned on additional context or variables. The target distribution $\kappa$ is either specified by an unnormalized density with respect to a background measure $\lambda$ , as in reinforcement learning (RL), or defined by a dataset of samples $\mathcal{D}$ as in imitation learning (IL). While RL (Brooks et al., 2011; Sutton, 2018; Haarnoja + +*Equal contribution ${}^{1}$ Huawei Technologies Canada,Noah’s Ark Laboratories ${}^{2}$ Huawei. Correspondence to: Leo Maxime Brunswic . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +et al., 2018; Bengio et al., 2023) and IL (Goodfellow et al., 2020; Ho et al., 2020; Song et al., 2020b; Rozen et al., 2021; Papamakarios et al., 2021) methods are often considered to be separate approaches, it is a common practice to first train a reward model from a dataset and then use RL techniques to solve an IL task (Chung et al., 2024; Zhang et al., 2022b;a; Sendera et al., 2024). + +Among IL methods, normalizing flows (NFs), although capable of leveraging advanced neural ODEs (Chen et al., 2018; Grathwohl et al., 2018), have not achieved state-of-the-art performance due to architectural constraints (i.e. the requirement of sequentially combined parameterized diffeomorphisms) and numerical instabilities (Caterini et al., 2021; Verine et al., 2023). + +While NFs are deterministic models, stochasticity has proven to be a crucial component of IL generative models, such as diffusion models as its simplest embodiment (Ho et al., 2020; Song et al., 2020b). However, diffusion models face a challenging trade-off between loss function tractability and the time-consuming denoising process for generation. This trade-off drives continued efforts to accelerate the diffusion inference process (Lu et al., 2022; Tang et al., 2025; Chen et al., 2024). Such issues are particularly important when the computational and time budgets of generation are highly constrained, which is typical on real-time tasks or mobile devices. The present work leverages the flexibility of Generative Flow Networks (GFNs) (Bengio et al., 2021; 2023) to address these issues by building simple yet highly expressive models with short sampling trajectories. + +Generative Flow Networks (GFNs), originally formulated for RL tasks, are a family of generative methods designed to sample proportionally based on a reward function $r = \varphi_{\kappa}$ , which represents the density of a target distribution $\kappa$ . They were initially restricted to directed acyclic graphs, but have since been extended to other settings. Subsequent work has extended GFNs to generalize to continuous state spaces (Li et al., 2023; Lahlou et al., 2023) and non-acyclic structures (Brunswic et al., 2024). + +Despite these advancements, GFNs still face four key challenges that hinder their application in RL and IL settings. First, although it has been suggested that GFNs themselves could be used as a reward model in the IL setting (see Bengio et al. (2023) p37), previous works (Zhang et al., 2022b; + +Lahlou et al., 2023) train a separate reward model on samples from $\kappa$ , effectively reducing the problem to an RL task. The need to train an additional reward model, which results in additional training and computation costs, stems from a lack of control of the so-called flow-matching (FM) property of the flow. Indeed, the FM-loss is zero by construction of the GFN self-defined reward model. + +Second, the FM training loss presents significant challenges in continuous settings, as its evaluation is intractable in naive implementations (Li et al., 2023), necessitating the training of an imperfect estimator when directly enforcing the FM constraint. Addressing this issue requires either handcrafting or training an additional backward policy $\pi_{\leftarrow}^{*}$ or resorting to higher-variance loss functions, such as the Detailed Balance (DB) (Bengio et al., 2021) and Trajectory Balance (TB) (Malkin et al., 2022) losses. + +Third, the acyclicity requirements (Lahlou et al., 2023) mean that additional structures must be manually crafted. Cycles appear naturally in naive implementations and RL environments. Brunswic et al. (2024) offers a theory for non-acyclic flows and stable FM losses, but these have yet to be tested in strongly non-acyclic settings. + +Lastly, Li et al. (2023) argues that exact cycles are negligible in the continuous setting due to their zero probability, whereas Brunswic et al. (2024) argues that 0-flows, ergodic measures $\xi$ for $\pi_{\rightarrow}^{*}$ , need to be addressed. Otherwise, the divergence-based losses used by Bengio et al. (2023) may become unstable in the presence of $\xi$ — a prediction that remains untested. + +We present Ergodic Generative Flows (EGFs), which addresses the aforementioned key limitations. EGFs are built using a policy choosing at a given state from finitely many globally defined transformations, i.e. diffeomorphisms of the state space. This allows for tractable inverse flow policy, hence tractable FM-loss. Since we favor finitely many simple transformations, the universality of EGFs is non trivial. We provide provable guarantee with an ergodicity (Walters, 2000; Kifer, 2012) assumption of the group generated by the EGFs transformations. + +# Main contributions: + +1. We extend the theoretical framework of generative flows, in particular providing quantitative versions of the sampling theorem for non-acylic generative flows. +2. We develop a theory of EGFs, presenting a universality criterion and demonstrating that, in any dimension on tori and spheres, this criterion can be fulfilled with four simple transformations. +3. We propose a coupled KL-weakFM loss to train EGFs directly for IL. This allows to train EGFs for IL without a separate reward model. + +# 2. Preliminaries: GFN for RL and IL + +In this work, we focus on generative flows in the continuous setting, encompassing scenarios where the state space $S$ is either a vector space, $S = \mathbb{R}^d$ , or potentially a Riemannian manifold (Lee, 2018; Gemici et al., 2016). Both are instances of Polish1 spaces that admit a natural finite background measure $\lambda$ (usually the Lebesgue, Haar (Halmos, 2013) or Riemannian volume measures). + +A measure $\mu$ is dominated by $\nu$ , denoted $\mu \ll \nu$ if $\nu(A) = 0 \Rightarrow \mu(A) = 0$ for any measurable $A \subset S$ ; then, the Radon-Nikodym derivative of $\mu$ with respect to $\nu$ , denoted $\frac{d\mu}{d\nu} \in L^{1}(\nu)$ , is the unique $\nu$ -integrable function $\varphi$ such that $\varphi \nu = \mu$ . A Markov kernel $\pi: \mathcal{X} \to \mathcal{Y}$ is a stochastic map denoted $\pi(x)$ . The image measure of $\mu$ by $\pi$ denoted $\mu \pi$ is defined by $\mu \pi(A) = \int_{x \in \mathcal{X}} \mathbb{P}(\pi(x) \in A) d\mu(x)$ for any measurable $A \subset \mathcal{Y}$ . Their tensor product is the kernel $\mu \otimes \pi(A \to B) := \int_{x \in A} \mathbb{P}(\pi(x) \in B) d\mu(x)$ . Even when $\mu$ is an unnormalized distribution, we write $x \sim \mu$ for "the law of $x$ is $\frac{1}{\mu(S)}\mu$ ". + +We adopt a formulation of generative flows that differs from Lahlou et al. (2023) and Brunswic et al. (2024), providing the necessary flexibility for the subsequent sections. Let $(S, \lambda)$ be a Polish space with a finite background measure. A generative flow on $S$ is the data of a star forward policy, i.e., a Markov kernel $\pi_{\rightarrow}^{*}: S \rightarrow S$ , and a star outflow, i.e., a finite non-negative measure $F_{\rightarrow}^{*}$ on $S$ . + +With unnormalized initial and terminal distributions $F_{\mathrm{init}}$ and $F_{\mathrm{term}}$ , it induces a Markov chain $(\underline{s}_t)_{g\geq 1}$ defined by $\underline{s}_1\sim F_{\mathrm{init}}$ and $\underline{s}_{t + 1} = \pi_{\rightarrow}^{*}(\underline{s}_t)$ . Define the sampling time $\tau \in \mathbb{N}_{\geq 1}$ as the random variable given by $\mathbb{P}(\tau \geq 1) = 1$ and $\mathbb{P}(\tau = t|\tau \geq t) = \frac{dF_{\mathrm{term}}}{d(F_{\mathrm{term}} + F_{\rightarrow}^{*})} (\underline{s}_t)$ . The sampler associated with a generative flow is obtained by emulating the Markov chain $(\underline{s}_t)_{t\geq 1}$ and sampling $\underline{s}_{\tau}$ . By extending the sampling Markov chain with a source $s_0$ and sink $s_f$ state, we can summarize the flow as follows: + +$$ +\begin{array}{c}F _ {\rightarrow} ^ {*} \otimes \pi_ {\rightarrow} ^ {*}\\s _ {0} \xrightarrow {F _ {\text {i n i t}}} \mathcal {S} \xrightarrow {F _ {\text {t e r m}}} s _ {f}.\end{array}\tag {1} +$$ + +The following theorem provides theoretical guarantees on the sampler associated with a generative flow. + +Theorem 2.1 ((Bengio et al., 2021; Brunswic et al., 2024)). Let $F_{\mathrm{init}}$ , and $F_{\mathrm{term}}$ be unnormalized distributions with $F_{\mathrm{term}} \neq 0$ and let $(\pi_{\rightarrow}^{*}, F_{\rightarrow}^{*})$ be a generative flow. If the flow-matching constraint + +$$ +F _ {\text {i n i t}} + F _ {\rightarrow} ^ {*} \pi_ {\rightarrow} ^ {*} = F _ {\text {t e r m}} + F _ {\rightarrow} ^ {*} \tag {2} +$$ + +is satisfied then $F_{\mathrm{init}}(\mathcal{S}) = F_{\mathrm{term}}(\mathcal{S})$ and: + +$$ +\mathbb {E} (\tau) \leq \frac {F _ {\rightarrow} ^ {*} (\mathcal {S})}{F _ {\mathrm {i n i t}} (\mathcal {S})} + 1, \quad \underline {{s}} _ {\tau} \sim F _ {\mathrm {t e r m}}. +$$ + +The pair $(F_{\rightarrow}^{*},\pi_{\rightarrow}^{*})$ is trained using gradient descent to minimize a loss function that enforces the flow-matching constraint in equation (2). Once convergence is achieved, the generative flow sampler yields samples of the random variable $s_\tau$ . Hence, by Theorem 2.1, the generative flow sampler samples from $F_{\mathrm{term}}$ . For example, we can use the most straightforward stable FM-loss: + +$$ +\mathcal {L} _ {\mathrm {F M}, q} ^ {\text {s t a b l e}} = \mathbb {E} _ {s \sim \nu_ {\text {t r a i n}}} \left[\left(f _ {\text {i n i t}} + f _ {\leftarrow} ^ {*} - f _ {\text {t e r m}} - f _ {\rightarrow} ^ {*}\right) ^ {q} (s) \right] \tag {3} +$$ + +where $f_{\mathrm{init}} = \frac{dF_{\mathrm{init}}}{d\lambda}$ , $f_{\mathrm{term}} = \frac{dF_{\mathrm{term}}}{d\lambda}$ and $f_{\leftarrow}^{*} = \frac{dF_{\leftarrow}^{*}}{d\lambda} = \frac{dF_{\rightarrow}^{*}}{d\lambda}$ . + +In general, both $f_{\mathrm{init}}$ and $f_{\rightarrow}^{*}$ are determined by the chosen parametrization, with $f_{\rightarrow}^{*}$ being problem-dependent, while $f_{\leftarrow}^{*}$ requires the computation of an image measure density. However, the previously mentioned methods outlined above face several limitations: + +Limitation ①: The first limitation arises in IL. $f_{\mathrm{term}}$ is unknown so one has to build a density model for $F_{\mathrm{term}}$ . Disregarding solutions based on separate energy models, we can attempt to set $F_{\mathrm{term}} = F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*}$ , assuming $F_{\leftarrow}^{*}$ is tractable. We then use a cross-entropy loss to train $F_{\mathrm{term}}$ to approximate $\kappa$ . Despite the FM loss formally and trivially becoming 0, $F_{\mathrm{term}}$ may not be positive. Therefore, the existing theoretical framework fails and so does the sampling. At this stage, we move beyond the existing theoretical framework. + +Limitation ②: The second limitation arises in RL. At the inference time, the reward may be unknown, either because of its costly nature or because it is simply inaccessible. A straightforward solution consists of using $F_{\mathrm{term}} = \kappa$ during training and $F_{\mathrm{term}} = F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*}$ during inference. However, this reward-less sampling is ill-controlled because $F_{\mathrm{term}}$ may not be positive. + +Limitation ③: Both training and inference are based on the tractability of $f_{\leftarrow}^{*}$ . For instance, naive forward policies, such as those used in diffusion models add noise in $\mathbb{R}^d$ . These policies are typically defined as $\pi_{\rightarrow}^{*}(x) = m(x) + \epsilon$ , where $m$ is a deterministic model and $\epsilon \sim \mathcal{N}(0,\eta)$ represents Gaussian noise. This leads to an intractable star inflow as the integral in equation (4) becomes computationally intensive. + +$$ +f _ {\leftarrow} ^ {*} (y) \propto \int_ {x \in \mathbb {R} ^ {d}} f _ {\rightarrow} ^ {*} (x) \exp \left(- \frac {(m (x) - y) ^ {2}}{2 \eta^ {2}}\right) d \lambda (x). \tag {4} +$$ + +Limitation ④: Although Li et al. (2023) argues that exact cycles are negligible in the continuous setting due to their + +zero probability, Brunswic et al. (2024) disputes that their generalization called 0-flows must still be addressed. 0- flows are measures $\xi$ for which $\pi_{\rightarrow}^{*}$ is ergodic (Walters, 2000). Brunswic et al. (2024) predicts that divergence-based losses used by Bengio et al. (2023) are unstable if such a $\xi$ exists. This has yet to be tested. + +# 3. Ergodic Generative Flows for RL and IL + +To address the four issues outlined above, we propose Ergodic Generative Flows (EGFs). + +Definition 3.1 (Ergodic Generative Flows). Let $S$ be Riemannian manifold endowed with its volume measure $\lambda$ and let $(\Phi_i)_{i=1}^p$ be a family of diffeomorphisms $S \to S$ . An EGF is a generative flow, where + +$$ +\pi_ {\rightarrow} ^ {*} (s) = \sum_ {i = 1} ^ {p} \alpha_ {\rightarrow} ^ {i} (s) \delta_ {\Phi_ {i} (s)} \tag {5} +$$ + +for some policy $\alpha \rightarrow : S \rightarrow [0,1]^p$ , and such that the group of diffeomorphisms generated by the $\Phi_i$ is topologically ergodic. That is for all $x, y \in S$ and any neighborhood $\mathcal{U}$ of $y$ , there exists a sequence $i_1, \dots, i_t$ such that $x \Phi_{i_1} \Phi_{i_2} \dots \Phi_{i_t} \in \mathcal{U}$ . + +There are two key ideas that motivate this definition: + +Tractability of star inflow $f_{\leftarrow}^{*}$ is achieved by only using finitely many diffeomorphisms. Let say that $S = \mathbb{R}^d$ endowed with Lebesgue measure $\lambda$ and that each move $\Phi_i$ is a parametrizable diffeomorphism. Then, a closed form formula for the backward policy may be deduced from a detailed balance argument, see appendix A for details: + +$$ +\pi_ {\leftarrow} ^ {*} (s) = \sum_ {i = 1} ^ {p} \alpha_ {\leftarrow} ^ {i} (s) \delta_ {\Phi_ {i} ^ {- 1} (s)} \tag {6} +$$ + +$$ +\alpha_ {\leftarrow} ^ {i} (s) = \frac {\left(\alpha_ {\rightarrow} ^ {i} f _ {\rightarrow} ^ {*}\right) \circ \Phi_ {i} ^ {- 1} (s) \left| J _ {s} \Phi_ {i} ^ {- 1} \right|}{\sum_ {j} \left(\alpha_ {\rightarrow} ^ {j} f _ {\rightarrow} ^ {*}\right) \circ \Phi_ {j} ^ {- 1} (s) \left| J _ {s} \Phi_ {j} ^ {- 1} \right|} \tag {7} +$$ + +where $J_{s}$ denotes the Jacobian matrix at $s$ . Therefore, we have a closed-form formula for the density of the star inflow, + +$$ +f _ {\leftarrow} ^ {*} (s) = \sum_ {i = 1} ^ {p} \left(\alpha_ {\rightarrow} ^ {i} f _ {\rightarrow} ^ {*}\right) \circ \Phi_ {i} ^ {- 1} (s) | \det J _ {s} \Phi_ {i} ^ {- 1} |. \tag {8} +$$ + +All terms in equation (8) are tractable, so $f_{\leftarrow}^{*}$ is tractable as long as the number of diffeomorphisms $p$ is small. As a consequence, the flow-matching loss given in Equation (3) is tractable for $p$ small enough. + +Expressivity can potentially be an issue if the number of diffeomorphisms is small and each move is too simple (Rezende et al., 2020). Ergodicity guarantees that the parameterized family of EGFs is able to be flow-matching for + +any non-zero $F_{\mathrm{init}} \ll \lambda$ and $F_{\mathrm{term}} \ll \lambda$ even with simple transformations, such as affine maps on tori and rotations on spheres. + +The following sub-sections are organized as follow: Section 3.1 establishes the universality of EGFs. In Section 3.2, we present theoretical advancements for general generative flows, which forms the basis for the design of the KL-weakFM loss used IL training, described in Section 3.3. + +# 3.1. Universality From Ergodicity + +We begin with a formalization of universality in conjunction with the master universality Theorem. + +Definition 3.2. On a state space $(S, \lambda)$ , a family of generative flow family is universal if for any two distributions $\mu, \nu \ll \lambda$ with bounded density there is a flow $(f_{\rightarrow}^{*}, \pi_{\rightarrow}^{*})$ in the family that is flow matching for $F_{\mathrm{init}} = \nu$ and $F_{\mathrm{term}} = \mu$ . + +We begin with the presentation of our master universality theorem in section 3.1.1. This theorem is then applied to tori and spheres, providing simple examples of universal families, as detailed in sections 3.1.2 and 3.1.3. + +# 3.1.1. MASTER UNIVERSALITY THEOREM + +The next theorem states that if the family contains a sufficiently strong ergodic policy $\pi_{\rightarrow}^{*}$ , then the family is universal. More precisely, + +Definition 3.3. A Markov kernel $\pi$ on $(S, \lambda)$ is summably $L^2$ -mixing if $\pi$ admits an invariant measure $\widehat{\lambda}$ equivalent to $\lambda$ and such that the $L^2$ -mixing coefficients given by, + +$$ +\gamma_ {n} := \sup _ {\varphi \in H} \int_ {s \in \mathcal {S}} \left(\varphi \pi^ {n} (s)\right) ^ {2} d \widehat {\lambda} (s), \tag {9} +$$ + +with $H = \{\varphi \in L^2 (\lambda)\mid \| \varphi \| _2 = 1$ and $\begin{array}{r}\int_{s\in S}\varphi (s) = 0\} \end{array}$ are summable: $\sum_{n\geq 0}\gamma_n < + \infty$ + +The technical summably $L^2$ -mixing property informally means that iterating the Markov kernel $\pi$ is averaging out functions fast enough to ensure that the sum of errors is finite. In contrast, ergodicity alone ensures the convergence of $\varphi \pi^n$ in the much weaker Cesaro sense. + +This property is in particular satisfied if the policy $\pi$ induces a Koopman operator $\phi \mapsto \frac{d(\phi\lambda)\pi}{d\lambda}$ on $L^2 (\mathcal{S})$ , which has a so-called spectral gap (Conze & Guivarc'H, 2013). Informally the spectrum of the Koopman operator is bounded away from 1 on the subspace $\{\phi \mid \int \phi d\lambda = 0\}$ . In this case, the convergence of iterates by $\pi$ is exponential. + +Theorem 3.4. A parameterized family of $EGF$ is universal provided that it contains some summably $L^2$ -mixing $\pi_{\rightarrow}^{*}$ and that the set of $f_{\rightarrow}^{*}$ is dense in $L^2(S, \lambda)$ . + +# 3.1.2. ERGODICITY ON TORI + +For the sake of simplicity, let $\mathbb{T}^d$ be a flat torus of side 1 endowed with Lebesgue measure $\lambda$ and let $P: \mathbb{R}^d \to \mathbb{T}^d$ be the natural universal covering projection. The simplest family of transformations is the group of affine transformations, + +$$ +\operatorname {A f f} \left(\mathbb {T} ^ {d}\right) := \{x \mapsto A x + b \mid b \in \mathbb {R} ^ {d} \text {a n d} A \in \mathrm {S L} _ {d} (\mathbb {Z}) \}, \tag {10} +$$ + +with $\mathrm{SL}_d(\mathbb{Z})$ denoting the set of square matrices of order $d$ with integral coefficients and determinant 1. + +Given that $(\Phi_i)_{i=1}^p$ are all in $\mathrm{Aff}(\mathbb{R}^d)$ , we can build a continuous family of generative flows using equation (5), which is then parameterized by the translation part of each $\Phi_i$ together with a model having a softmax head $\alpha \to$ and a scalar head $f \to$ . We call such a family an affine toroidal family. + +Theorem 3.5. Any affine toroidal family is a universal EGF family provided mild technical assumptions on the $(\Phi_i)_i = 1$ + +The "technical assumptions" above is in particular satisfied if the group generated by the linear part of the $\Phi_i$ is the whole group $\mathrm{SL}_d(\mathbb{Z})$ . It is shown in Conder et al. (2025) that $\mathrm{SL}_d(\mathbb{Z})$ has a presentation with two generators. Therefore, in any dimension, EGF are universal with $p = 4$ and well-chosen $(\Phi_i)_{i=1}^4$ : the two generators and their inverse. + +# 3.1.3. ERGODICITY ON SPHERES + +Consider the round sphere $\mathbb{S}^d = \{x\in \mathbb{R}^{d + 1}\mid \| x\| = 1\}$ endowed with its natural Riemannian volume measure $\lambda$ Again a simple family of diffeomorphisms is provided by the so-called projective transformations, + +$$ +\operatorname {P G L} _ {d + 1} (\mathbb {R}) := \{x \mapsto A x / \| A x \| \mid A \in \operatorname {G L} _ {d + 1} (\mathbb {R}) \}, \tag {11} +$$ + +where $\mathrm{GL}_{d + 1}(\mathbb{R})$ is the group of invertible matrices of order $d + 1$ . Similar to tori, we build a continuous family of EGFs using equation (5) by parametrizing $(\Phi_i)_i = 1$ in $\mathrm{PGL}_{d + 1}(\mathbb{R})$ which is a Lie group, and choose a tractable model that have a softmax head $\alpha \rightarrow$ and a scalar head $f_{\rightarrow}^{*}$ . Such a family is called a projective spherical family. We focus on the subfamily of isometry spherical family composed of rotations $\Phi_i \in \mathrm{SO}_{d + 1}(\mathbb{R})$ for which we have theoretical guarantees. + +Theorem 3.6. An isometry spherical family is a universal EGF family, provided technical assumptions on the $(\Phi_i)_i = 1$ + +The technical assumption is satisfied if the $\Phi_{i}$ have algebraic coefficients and are frozen: this is a consequence of the main theorem of Bourgain & Gamburd (2012) (see also Benoist & de Saxcé (2016)) that guarantees a spectral gap under this assumption. Furthermore, the main Theorem of Breuillard & Gelander (2003) allows to build a dense subgroup of $\mathrm{SO}_d(\mathbb{R})$ with two generators and algebraic coefficients. Therefore, EGF are universal on spheres with + +$p = 4$ and well-chosen $(\Phi_i)_{i=1}^4$ : the two generators and their inverse. + +# 3.2. Quantitative Sampling Theorem + +We present a quantitative sampling theorem for generative flows. The key idea of the proof is that any generative flow matches the flow up to a transformation of the initial and terminal distributions. + +Definition 3.7 (Virtual initial and terminal flow). Let $(\pi_{\rightarrow}^{*},f_{\rightarrow}^{*})$ be a generative flow and let $F_{\mathrm{init}},F_{\mathrm{term}}$ be initial and terminal distributions. Define the initial and terminal errors as $\delta F_{\mathrm{init}}\coloneqq (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\mathrm{term}} - F_{\rightarrow}^{*})^{-}$ and $\delta F_{\mathrm{term}}\coloneqq (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\mathrm{term}} - F_{\rightarrow}^{*})^{+}$ respectively. Define the positive and negative parts of a measure $\mu$ as $\mu^{\pm}$ . The virtual initial and terminal distributions are $\widehat{F}_{\mathrm{init}}\coloneqq F_{\mathrm{init}} + \delta F_{\mathrm{init}}$ and $\widehat{F}_{\mathrm{term}}\coloneqq F_{\mathrm{term}} + \delta F_{\mathrm{term}}$ . + +We note that once the initial and terminal distributions $F_{\mathrm{init}}, F_{\mathrm{term}}$ are specified, then any generative flow $(\pi_{\rightarrow}^{*}, f_{\rightarrow}^{*})$ is a FM with respect to the virtual initial and terminal distributions, $\widehat{F}_{\mathrm{init}}$ and $\widehat{F}_{\mathrm{term}}$ . This enables the presentation of a quantitative formulation of the sampling theorem for generative flows. + +Theorem 3.8 (Quantitative Sampling of Generative Flows). Let $(\pi_{\rightarrow}^{*},f_{\rightarrow}^{*})$ be a generative flow and let $F_{\mathrm{init}}$ and $F_{\mathrm{term}}$ initial and terminal distributions. Assume that $F_{\mathrm{init}}\neq 0$ and consider the sample $s_\tau$ of the generative flow Markov chain from $F_{\mathrm{init}}$ to $\widehat{F}_{\mathrm{term}}$ then: + +$$ +\operatorname {T V} \left(s _ {\tau} \left\| \frac {1}{\widehat {F} _ {\text {t e r m}} (\mathcal {S})} \widehat {F} _ {\text {t e r m}}\right) \leq \frac {\delta F _ {\text {i n i t}} (\mathcal {S})}{\widehat {F} _ {\text {t e r m}} (\mathcal {S})}, \right. \tag {12} +$$ + +with TV the total variation. + +Corollary 3.9. For a generative flow trained on the target $\kappa$ with $F_{\mathrm{init}}(S) = 1$ and using $F_{\mathrm{term}} = \hat{\kappa} := (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*})^{+}$ during inference, the sampling error is controlled by: + +$$ +\operatorname {T V} \left(s _ {\tau} \left\| \frac {\kappa}{\kappa (\mathcal {S})}\right) \leq \frac {\delta}{1 + \delta} + \operatorname {T V} \left(\frac {\widehat {\kappa}}{\widehat {\kappa} (\mathcal {S})} \left\| \frac {\kappa}{\kappa (\mathcal {S})}\right), \right. \right. \tag {13} +$$ + +with $\delta \coloneqq (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*})^{-}(\mathcal{S})$ + +Commonly the training loss is designed to control the total variation term in the upper bound. However, a secondary regularization term controlling $\delta = \delta F_{\mathrm{init}}$ may be added to enhance reward-less sampling. + +To substantiate this quantitative bound, let's consider the RL case with a reward $r$ defined on a finite DAG $(\mathcal{V},\mathcal{E})$ with $\mathcal{V} = \mathcal{S}\cup \{s_0,s_f\}$ , trained using a flow-matching loss, say $\mathcal{L}_{\mathrm{FM},q}^{\mathrm{stable}}$ . Let's take $\nu_{\mathrm{train}}$ the uniform distribution on the vertices and $q = 1$ , then $\mathcal{L}_{\mathrm{FM},q}^{\mathrm{stable}} = \frac{1}{|\mathcal{V}|}\left(\delta +\sum_{s\in \mathcal{S}}|\widehat{r} (s) - r(s)|\right)$ with $\widehat{r} (s)$ the density of $\widehat{\kappa}$ + +with respect to the counting measure. We may also rewrite $\mathrm{TV}\left(\frac{\widehat{\kappa}}{\widehat{\kappa}(\mathcal{S})}\Big\| \frac{\kappa}{\kappa(\mathcal{S})}\right) = \frac{1}{2}\sum_{s\in \mathcal{S}}|\frac{\widehat{r}(s)}{\sum_{s'\in\mathcal{S}}\widehat{r}(s')} -\frac{r(s)}{\sum_{s'\in\mathcal{S}}r(s')}|$ so that if $Z = \sum_{s\in \mathcal{S}}r(s)$ then + +$$ +\operatorname {T V} \left(s _ {\tau} \left\| \frac {\kappa}{\kappa (\mathcal {S})}\right) \leq \left(1 + \frac {1}{Z}\right) | \mathcal {V} | \mathcal {L} _ {\mathrm {F M}, q} ^ {\text {s t a b l e}}. \right. \tag {14} +$$ + +# 3.3. KL-WeakFM loss and IL algorithm + +Henceforth, we assume that $S$ is a Polish space equipped with a background measure $\lambda$ and $\kappa$ is a target probability distribution. + +Leveraging Theorem 3.8, we design the KL-weakFM loss, $\mathcal{L}_{KL - wFM}$ , which enables IL training of a generative flow without requiring a separate reward model. Let $\delta f_{\mathrm{init}} = \min (0,f_{\mathrm{init}} + f_{\leftarrow}^{*} - f_{\rightarrow}^{*})$ and $\widehat{f}_{\mathrm{term}} = \max (0,f_{\mathrm{init}} + f_{\leftarrow}^{*} - f_{\rightarrow}^{*})$ . The KL-weakFM loss can then be defined as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {K L - w F M} (\theta) := \\ b \mathbb {E} _ {s \sim \nu_ {\mathrm {t r a i n}}} \delta f _ {\mathrm {i n i t}} (s) - \mathbb {E} _ {s \sim \kappa} \log \widehat {f} _ {\mathrm {t e r m}} (s), \quad (1 5) \\ \end{array} +$$ + +for some training distribution of paths $\nu_{\mathrm{train}}$ and $b > 0$ . + +The name of the loss is derived from two components: on the one hand, the cross-entropy term, which controls the Kullback-Leibler divergence between $\widehat{F}_{\mathrm{term}}$ and $\kappa$ ; on the other hand, the term $\mathbb{E}_{s\sim \nu_{\mathrm{train}}}\delta f_{\mathrm{init}}(s)$ , which resembles the FM-loss but controls only the negative part of the FM defect. We now provide a detailed description and motivation for $\mathcal{L}_{KL - wFM}$ . The discussion begins with a corollary of Theorem 3.8, based on Pinsker's inequality: + +Corollary 3.10. Let $(\pi_{\rightarrow}^{*},f_{\rightarrow}^{*})$ be a generative flow. We train the generative flow on target probability distribution $\kappa$ with $F_{\mathrm{init}}(S) = 1$ . By using $F_{\mathrm{term}} = \widehat{\kappa} := (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*})^{+}$ during inference, the sampling error is bounded as follow: + +$$ +\operatorname {T V} \left(s _ {\tau} \| \kappa\right) \leq \frac {\delta}{1 + \delta} + \sqrt {\frac {1}{2} \mathrm {K L} \left(\frac {\widehat {\kappa}}{\widehat {\kappa} (\mathcal {S})} \| \kappa\right)}, \tag {16} +$$ + +with $\delta \coloneqq \int_{s\in S}\delta f_{\mathrm{init}}(s)d\lambda (s)$ + +First, the weak-FM term $\mathbb{E}_{\underline{s}}\sum_{t = 1}^{\tau}\left(\delta f_{\mathrm{init}}\left(\underline{s}_t\right)\right)^2$ in equation (15) controls the term $\frac{\delta}{1 + \delta}$ in equation (16). + +Second, since the target $\kappa$ has unknown density, we employ reward-less inference, using $F_{\mathrm{term}} = (F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*})^{+}$ . It is therefore natural to directly train the density of $(F_{\mathrm{init}} + F_{\leftarrow}^{*} - F_{\rightarrow}^{*})^{+}$ to match $\kappa$ using cross-entropy, leading to the second term on the right-hand side of Equation (15). Corollary 3.10 demonstrates that controlling the Kullback-Leibler divergence through cross-entropy also controls the total variation sampling error. + +# Algorithm 1 Ergodic flow: IL training + +Input: A list of trainable bi-Lipschitz maps $\Phi_1, \dots, \Phi_p$ + +Input: A softmax model $\alpha : S \to \mathcal{P}(\{1, \dots, p\})$ + +Input: A trainable star outflow model $f_{\rightarrow}^{*}: S \to \mathbb{R}_{+}$ + +Input: A target samplable distribution $\kappa$ + +Input: A source $F_{\mathrm{init}}$ sampleable and of density $f_{\mathrm{init}}$ repeat + +Fill replay buffer $\mathcal{B} = \mathcal{B}_{\rightarrow}\cup \mathcal{B}_{\leftarrow}$ with $B$ trajectories $(\underline{s}_t)^{t_{\mathrm{max}}}$ using $(F_{\mathrm{init}},\pi_{\rightarrow}^{*})$ for $\mathcal{B}_{\rightarrow}$ and $(\kappa ,\pi_{\leftarrow}^{*})$ for $\mathcal{B}_{\leftarrow}$ with $t\in \{1,\dots ,\tau \}$ + +Minimization step of + +$$ +\mathcal {L} = \frac {1}{2 B} \sum_ {t = 1} ^ {\tau} \delta f _ {\mathrm {i n i t}} (\underline {{s}} _ {t}) p _ {t} (\underline {{s}}) - b \mathbb {E} _ {s \sim \kappa} \log \widehat {f} _ {\mathrm {t e r m}} (s), +$$ + +with + +$$ +\begin{array}{l} p _ {t} (\underline {{s}}) = \prod_ {t ^ {\prime} < t} \left(1 + \left(\widehat {f} _ {\text {t e r m}} / f _ {\rightarrow} ^ {*}\right) (\underline {{s}} _ {t ^ {\prime}})\right) ^ {- 1} \quad \text {i f} \underline {{s}} \in \mathcal {B} _ {\rightarrow} \\ = \prod_ {t ^ {\prime} < t} \left(1 + \left(\delta f _ {\text {i n i t}} / f _ {\leftarrow} ^ {*}\right) \left(\underline {{s}} _ {t ^ {\prime}}\right)\right) ^ {- 1} \quad \text {i f} \underline {{s}} \in \mathcal {B} _ {\leftarrow} \\ \end{array} +$$ + +until converged + +Third, more precisely, the KL term may be decomposed into + +$$ +\begin{array}{l} \operatorname {K L} \left(\frac {\widehat {\kappa}}{\widehat {\kappa} (\mathcal {S})} \| \kappa\right) = \\ \underbrace {- \mathbb {E} _ {s \sim \kappa} \log \widehat {f} _ {\text {t e r m}} (s)} _ {\text {c r o s s - e n t r o p y}} + \underbrace {\log \int_ {s \in \mathcal {S}} \widehat {f} _ {\text {t e r m}} (s) d \lambda (s)} _ {\text {n o r m a l i z a t i o n}} - \mathcal {H} (\kappa), \tag {17} \\ \end{array} +$$ + +where $\mathcal{H}(\kappa) = -\mathbb{E}_{s\sim \kappa}\log \frac{d\kappa}{d\lambda}(s)$ is the entropy of $\kappa$ . Since the normalization constant is unknown a priori, the cross-entropy is insufficient to fully control the KL divergence. However, + +$$ +\int_ {s \in \mathcal {S}} \widehat {f} _ {\text {t e r m}} (s) d \lambda (s) = 1 + \int_ {s \in \mathcal {S}} \delta f _ {\text {i n i t}} (s) d \lambda (s). \tag {18} +$$ + +Therefore, the weak-FM term in equation (15) also controls the normalization factor of $\widehat{f}_{\mathrm{term}}$ . + +# 4. Experiments + +We proceed with experiments wherein the state space $S$ is either a flat torus $\mathbb{T}^2$ , or sphere $\mathbb{S}^2$ . An EGF family is built by randomly choosing diffeomorphisms from affine toroidal families on $\mathbb{T}^2$ and from isometry spherical families on $\mathbb{S}^2$ , together with two multi-layer perceptron (MLP) models: one for $f_{\rightarrow}^{*}$ and one for $\alpha_{\rightarrow}$ . The MLPs are tanh hyperbolic activated and initialized using orthogonal initialization + +(Saxe et al., 2013; Hu et al., 2020). We use the AdamW optimizer (Kingma & Ba, 2015; Loshchilov & Hutter, 2019) for training. + +The KL-WeakFM loss tends to favor $\widehat{F}_{\mathrm{term}}$ positive on the whole $S$ , therefore, even with highly localized target distributions, the EGF reward model tends to have a small background inducing unwanted outliers. We filter it out by replacing $\widehat{f}_{\mathrm{term}}$ with $\mathbf{1}_{\widehat{f}_{\mathrm{term}} > \eta} \widehat{f}_{\mathrm{term}}$ during inference, where $\eta$ is chosen to minimize negative likelihood on a validation dataset. See Appendix D.1 for details. + +# 4.1. RL Experiments + +Two dimensional distributions are tested in RL settings, which allow us to conduct sanity-check on the tractability of the EGF, its stability and expressivity. An EGF on $S = \mathbb{T}^2$ is built with 16 transformations (8 translations and 2 elements of $\mathrm{SL}_d(\mathbb{Z})$ together with their inverse). Their MLPs have 5 hidden layers of width 32 to parameterize $f_{\rightarrow}^{*}$ and $\pi_{\rightarrow}^{*}$ . This EGF is trained either with stable $\mathcal{L}_{\mathrm{FM}}^{\mathrm{stable}}$ or unstable $\mathcal{L}_{\mathrm{FM}}^{\mathrm{div}}$ FM-losses, with or without regularization $\mathcal{R}$ (see equations (3),(19) and (20)). + +$$ +\mathcal {L} _ {\mathrm {F M}} ^ {\mathrm {d i v}} = \mathbb {E} _ {\underline {{s}}} \sum_ {t = 1} ^ {\tau} \log \left(\frac {f _ {\leftarrow} ^ {*} + f _ {\text {i n i t}}}{f _ {\rightarrow} ^ {*} + f _ {\text {t e r m}}}\right) ^ {2} (\underline {{s}} _ {t}) \tag {19} +$$ + +$$ +\mathcal {R} = \mathbb {E} _ {\underline {{s}}} \sum_ {t = 1} ^ {\tau} \left(f _ {\rightarrow} ^ {*}\right) ^ {2} \left(\underline {{s}} _ {t}\right). \tag {20} +$$ + +The regularization $\mathcal{R}$ is motivated by the stability Theory of Brunswic et al. (2024): as long as the directional derivative of $\mathcal{R}$ is positive on 0-flows directions, such a regularization helps reducing the unstability of a loss. See also Morozov et al. (2025) for a study of the impact of such regularizations for detailed balance losses on graphs. + +A stability comparison to divergence-based FM loss (see figure 1) shows the expressivity of very small EGF as well as the unstability $\mathcal{L}_{\mathrm{FM}}^{\mathrm{div}}$ as predicted by Brunswic et al. (2024)(refer to limitation 4 in section 2). + +# 4.2. IL Experiments + +We proceed with imitation learning experiments on tori $\mathbb{T}^2$ and spheres $\mathbb{S}^2$ . + +On $\mathbb{T}^2$ , we compare small Moser Flows, DDPM and EGFs, demonstrating that EGFs can generate well-behaved distributions even when Moser Flows break down. An EGF is built with the minimal four affine transformations described in section 3.1.2, implemented as MLPs with 3 hidden layers of width 32. These transformations parameterize $f_{\rightarrow}^{*}$ and $\pi_{\rightarrow}^{*}$ . The Moser Flow is trained using the implementation provided in the authors' GitHub repository (Rozen, 2022) with the only modification being the model size set to $32\times 3$ . Our EGF is trained using the KL-weakFM loss together with + +![](images/260ad1170633a4a71cd267cb97c34de1cde591018384377ead408135b7524345.jpg) + +![](images/43d4a97d1a27488a86070587a58a1174acb2758aabe08cb9230ee6c430143825.jpg) + +![](images/13d5098f31e8ed236d6e4d305980d3c5c9d9b18adf0a0015d4eb6b7f3a9e97bd.jpg) +a EGF $32 \times 5$ , density (left) and samples (right). +b EGF 32x5, stability comparison between FM losses. Unregularized unstable loss (blue) flow size (dashed lines) and sampling time $\tau$ (solid lines) blow up while stable loss (red) converges. Regularization helps stabilization for both losses. +Figure 1. Checkerboard RL task. + +Table 1. Negative log-likelihood scores of the volcano dataset. + +
VolcanoEarthquakeFlood
Mixture vMF-0.310.591.09
Stereographic-0.640.430.99
Riemannian-0.970.190.90
Moser Flow-2.02-0.090.62
EGFN-2.31-0.120.56
+ +a regularization $\mathcal{R}$ as in the RL setting. Figure 10 shows how Moser Flow fails to train with such a small model while minimal EGF reproduces the target distribution with high fidelity. + +On $\mathbb{S}^2$ , we benchmark EGFs on the earth science volcano dataset (NGDC/WDS, 2025). A sample distribution is given for the dataset in Figure 3 and negative log-likelihoods are given in Table 1. We only use six rotations: a rotation of angle $\pi /4$ around each of the three axes plus their respective inverse. The two core MLPs of EGF are of size $256\times 5$ , compared to the $512\times 6$ used by Rozen et al. (2021). The learning rate is 1e-3 with an exponential decay to 1e-5 at 3000 epochs of 25 steps. We outperform Moser Flow and all related baselines. Notably, the EGF achieved its reported performance with a training time 10 times shorter. + +![](images/305adc336d77d27dbe45f1c15b3042f333139e389a7e27e8ae4f641705947dcb.jpg) +a Moser Flow + +![](images/5d7426b686fcaf8c876de76ed3242cfc813fdd4182402c398949b421e6c75bf6.jpg) + +![](images/3be5948ed140a7f37e1a8b2f32d926860465bd5885b0a97e4711d8cfa0c49075.jpg) + +![](images/aa6f6a3cabfe6064f977cd6f0e156c981f574bb06b96c1f5de116c75c0357835.jpg) + +![](images/55709c53be4d09d24941e053bd92f8fa7a4580ba5109dacbe01153c26208d0db.jpg) +b DDPM +c EGF +Figure 2. Comparison of imitation learning on standard toy distributions using tiny $32 \times 3$ MLP models. Background filter is applied to EGF, a similar filter on Moser flow would yield worse results. Without a filter, EGF samples have outliers similar to DDPM. Since DDPM does not give access to density, only samples are provided. For fairness, DDPM is sampled using 100 denoising steps. + +![](images/a447ebe58247eb33c9b9267b7471c5ab162df485392116abfcb3d8e0104be6e2.jpg) + +![](images/b77bb4b547636f890317cc39f93f5c35634ddc7468f140c2324b0df34be4fceb.jpg) +Figure 3. EGF generated points with reward field $\widehat{f}_{\mathrm{term}}$ (left) and whole dataset point with KDE field (right) for the volcano task. + +![](images/e4fe3d9ed524c168aab87cc8b1228485bfc39c2f35d367dc330241c2cc750b5c.jpg) + +# 5. Related Work + +EGFs draw inspiration from NFs for their transformation blocks, as well as from denoising diffusion models (DDMs) (Ho et al., 2020) for incorporating stochasticity. While similar approaches have been explored in previous works (Wu et al., 2020; Zhang & Chen, 2021), our method stands out by leveraging general generative flows theory to construct a more efficient framework. Compared to previous works, EGFs are more compact and demonstrate faster convergence as illustrated in our experiments. Furthermore, DDMs and their variants (Song et al., 2020a) rely on a fixed discretization of inference denoising trajectories, whereas EGFs enable trainable sampling times, offering greater flexibility and adaptability. + +A particularly notable comparison arises when examining the relationship between our EGFs and NFs introduced in Rezende et al. (2020), as both utilize affine toroidal families and projective spherical families. However, while our EGF framework provides universality guarantees, the NF setting lacks such guarantees as it solely relies on affine and projective transforms. Indeed, both projective and affine transformations form groups (compositions of affine transforms are affine), thus limiting the expressivity. This distinction highlights a fundamental advantage of EGFs, further reinforcing their theoretical robustness and practical effectiveness. + +Broadly speaking, previous methods, such as Riemannian Continuous Normalizing Flows (Mathieu & Nickel, 2020) and Flow Matching on Manifolds (Chen & Lipman, 2024) rely on either handcrafted non-linear transformations or sophisticated NeuralODEs (Chen et al., 2018). Our EGF does not incorporate NeuralODEs, as we do not face expressivity limitations that justify their usage. However, these techniques remain fully compatible with EGFs and could be integrated into future extensions of our framework to further enhance its flexibility and adaptability if needed. + +Since EGFs' elementary transformation are derived from the transformation blocks of NFs, EGFs can be viewed as a stochastic sampler for NF architectures. In particular, any EGFs sampled trajectory can be defined as $(s_t)_{t=1}^{\tau}$ , where the trajectory $(s_t)_{t=1}^{\tau}$ is obtained by composing NF transformations as follows: $s_1 \sim \mathcal{F}_{\mathrm{init}}$ , $s_2 = \Phi_{k_1}(s_1)$ , ..., $s_\tau = \Phi_{k_{\tau-1}} \circ \dots \circ \Phi_{k_1}(s_1)$ , with the transition probability $\mathbb{P}(k_{t+1} \mid k_t) = \alpha_i^i(s_t)$ . Each composition $\Phi_{k_{\tau-1}} \circ \dots \circ \Phi_{k_1}$ is a diffeomorphism, and the terminal distribution is given by $F_{\mathrm{term}} = \mathbb{E}_K(F_{\mathrm{init}}K)$ , where $K = \Phi_{k_{\tau-1}} \circ \dots \circ \Phi_{k_1}$ represents a random NF. In other words, an EGF with $p$ diffeomorphisms can be represented as a pair $(\iota, \pi)$ , where $\iota : \mathcal{T}_p \to \operatorname{Diffeo}(\mathcal{S})$ is a trainable embedding of the $p$ -ary tree into the space of diffeomorphisms on the state space, and $\pi$ is a random walk policy on $\mathcal{T}_p$ with a random stopping time. However, the policy $\pi$ is intractable as it is defined by + +$$ +\begin{array}{l}\pi (\Phi_ {k} | \Phi_ {k _ {t}} \circ \dots \Phi_ {k _ {1}}) = \frac {1}{F _ {\rightarrow} (\mathcal {S})} \int_ {s \in \mathcal {S}} \alpha_ {\rightarrow} ^ {k} (s) d F _ {\rightarrow} (s), \text {w h e r e}\\F _ {\rightarrow} := F _ {\rightarrow} ^ {*} + F _ {\text {t e r m}}.\end{array} +$$ + +Building on this formulation, we can draw comparisons between EGFs and three related research directions: Continuously Indexed Normalizing Flows (CINF) (Caterini et al., 2021), Neural Architecture Search (NAS) (Elsken et al., 2019), and Wasserstein Gradient Descent (WGD) (Chizat & Bach, 2018). First, CINFs attempt to overcome the limitations of NFs by using a fixed architecture, with conditioning sampled from a latent distribution. This approach generates the target distribution as an expectation, $F_{\mathrm{term}} = \mathbb{E}_K(F_{\mathrm{init}}K)$ , where the random NF $K$ is drawn from a continuous distribution of NFs. In contrast, our method samples $K$ from a tree structure. Second, NAS aims to find the optimal neural network architecture for a given task. In comparison, our EGF constructs a distribution of suitable NFs, where the sampling time can be interpreted as a learned depth of the resulting architecture. Third, by training over a distribution of architectures and considering the expectation of the output (with $F_{\mathrm{init}}$ as the input and $F_{\mathrm{term}}$ as the output), our approach parallels the setup of Wasserstein Gradient Descent (WGD). Extending the theorems of Chizat & Bach (2018) to EGFs would be a valuable addition to our theoretical framework. + +Lastly, from the proof of the universality Theorem 3.4, we observe that $f_{\rightarrow}^{*}$ can be obtained as a fixed point of a flow operator dependent on $\pi_{\rightarrow}^{*}$ , $F_{\mathrm{init}}$ , and $F_{\mathrm{term}}$ . This operator is a contraction for the affine toroidal family. Although we train $f_{\rightarrow}^{*}$ via gradient descent, this approach bears similarities to Deep Equilibrium Models (DEQ) (Bai et al., 2019; 2020), where the fixed point is computed by a contraction neural network. The key difference is that we explicitly approximate the fixed point with a neural network, while DEQ models use a black-box solver and the implicit function theorem for gradients. Future work could develop a DEQ-EGF, where $f_{\rightarrow}^{*}$ is implicitly obtained as a fixed point instead of via a feedforward network. + +# 6. Limitations and Future Work + +First and foremost, our experiments are limited to low dimensions. Although ergodicity is easily achievable with a number of generators independent from the dimension (for instance on tori, one randomly initialized non-trainable translation is sufficient to ensure ergodicity), the technical assumption of $L^2$ -mixing summability needed for universality is more subtle. EGFs suffer from limited proven applicability, further theory is needed to easily enforce $L^2$ -mixing summability in higher dimension together with related experiments. More precisely, a theoretical bound on the minimal number of transformations necessary to achieve universality would be useful for hyperparameter tuning. We give such a bound only for affine toroidal and isometry + +spherical families where two transformations are sufficient to achieve universality. + +Second, the $L^2$ -mixing summability property is essential to ensure universality. It is likely that training would be improved if some control over this property was to be achieved, say by adding a regularization. There is extensive mathematical literature on the so-called spectral gap (Kontoyiannis & Meyn, 2012; Guivarc'h & Le Page, 2016; Marrakchi, 2018; Bekka & Francini, 2020), which is a sufficient condition for $L^2$ -mixing summability, and absolutely continuous invariant measures (Góra & Boyarsky, 2003; Bahsoun, 2004; Galatolo, 2015) including stability results (Froyland et al., 2014). A systematic review of this literature would certainly yield such regularization. + +Lastly, our focus was on the theoretical advancements of generative flow theory through EGF. As a result, we did not exploit EGF's high modularity, which enables sophisticated transformations, replay buffers, or neural architectures. Additionally, hyperparameter tuning was minimal, leaving room for future work to perform a systematic analysis. + +# 7. Conclusion + +We propose a new family of generative flows that leverage ergodicity to provide universality guarantees while utilizing simple diffeomorphisms and neural networks. Our results demonstrate that EGFs maintain their expressivity even at parameter counts where Moser Flow (Rozen et al., 2021) fails. This simplicity enables us to outperform our baselines on the NASA volcano dataset with a model 30 times smaller. + +# 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 + +Bahsoun, W. Absolutely continuous invariant measures for random maps. PhD thesis, Concordia University, 2004. +Bai, S., Kolter, J. Z., and Koltun, V. Deep equilibrium models. In NeurIPS, 2019. +Bai, S., Koltun, V., and Kolter, J. Z. Multiscale deep equilibrium models. In NeurIPS, 2020. +Bekka, B. and Francini, C. Spectral gap property and strong ergodicity for groups of affine transformations of solenoids. *Ergodic Theory and Dynamical Systems*, 40 (5):1180-1193, 2020. +Bekka, B. and Guivarc'h, Y. On the spectral theory of + +groups of affine transformations of compact nilmanifolds. Annales Scientifiques de l'École Normale Supérieure, 48 (3):607-645, 2015. +Bengio, E., Jain, M., Korablyov, M., Precup, D., and Bengio, Y. Flow network based generative models for non-iterative diverse candidate generation. In NeurIPS, 2021. +Bengio, Y., Lahlou, S., Deleu, T., Hu, E. J., Tiwari, M., and Bengio, E. Gfrownet foundations. The Journal of Machine Learning Research, 24(1):10006-10060, 2023. +Benoist, Y. and de Saxcé, N. A spectral gap theorem in simple lie groups. Inventiones Mathematicae, 205(2): 337-361, 2016. +Bourgain, J. and Gamburd, A. A spectral gap theorem in su.(d). Journal of the European Mathematical Society (EMS Publishing), 14(5), 2012. +Breuillard, E. and Gelander, T. On dense free subgroups of lie groups. Journal of Algebra, 261(2):448-467, 2003. +Brooks, S., Gelman, A., Jones, G., and Meng, X.-L. Handbook of markov chain monte carlo. CRC press, 2011. +Brunswic, L., Li, Y., Xu, Y., Feng, Y., Jui, S., and Ma, L. A theory of non-acyclic generative flow networks. In AAAI, 2024. +Caterini, A., Cornish, R., Sejdinovic, D., and Doucet, A. Variational inference with continuously-indexed normalizing flows. In Uncertainty in Artificial Intelligence, 2021. +Chen, H., Ren, Y., Ying, L., and Rotskoff, G. M. Accelerating diffusion models with parallel sampling: Inference at sub-linear time complexity. arXiv preprint arXiv:2405.15986, 2024. +Chen, R. T. and Lipman, Y. Flow matching on general geometries. In ICLR, 2024. +Chen, R. T., Rubanova, Y., Bettencourt, J., and Duvenaud, D. K. Neural ordinary differential equations. In NeurIPS, 2018. +Chizat, L. and Bach, F. On the global convergence of gradient descent for over-parameterized models using optimal transport. In NeurIPS, 2018. +Chung, H. W., Hou, L., Longpre, S., Zoph, B., Tay, Y., Fedus, W., Li, Y., Wang, X., Dehghani, M., Brahma, S., et al. Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70):1-53, 2024. +Conder, M., Liversidge, G., and Vsemirnov, M. Generating pairs for sl (n, z). Journal of Algebra, 662:123-137, 2025. + +Conze, J.-P. and Guivarc'H, Y. Ergodicity of group actions and spectral gap, applications to random walks and markov shifts. Discrete and Continuous Dynamical Systems-Series A, 33(9):4239-4269, 2013. +Elsken, T., Metzen, J. H., and Hutter, F. Neural architecture search: A survey. Journal of Machine Learning Research, 20(55):1-21, 2019. +Froyland, G., González-Tokman, C., and Quas, A. Stability and approximation of random invariant densities for lasota-yorke map cocycles. Nonlinearity, 27(4):647, 2014. +Galatolo, S. Statistical properties of dynamics. introduction to the functional analytic approach. arXiv preprint arXiv:1510.02615, 2015. +Gemici, M. C., Rezende, D., and Mohamed, S. Normalizing flows on riemannian manifolds. arXiv preprint arXiv:1611.02304, 2016. +Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. Generative adversarial networks. Communications of the ACM, 63(11):139-144, 2020. +Góra, P. and Boyarsky, A. Absolutely continuous invariant measures for random maps with position dependent probabilities. Journal of Mathematical Analysis and Applications, 278(1):225-242, 2003. +Grathwohl, W., Chen, R. T., Bettencourt, J., Sutskever, I., and Duvenaud, D. Ffjord: Free-form continuous dynamics for scalable reversible generative models. arXiv preprint arXiv:1810.01367, 2018. +Guivarc'h, Y. and Le Page, E. Spectral gap properties for linear random walks and pareto's asymptotics for affine stochastic recursions. Annales de l'Institut Henri Poincaré - Probabilités et Statistiques, 52(2):503-574, 2016. +Haarnoja, T., Zhou, A., Hartikainen, K., Tucker, G., Ha, S., Tan, J., Kumar, V., Zhu, H., Gupta, A., Abbeel, P., et al. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018. +Halmos, P. R. Measure theory, volume 18, chapter XII. Springer, 2013. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. In NeurIPS, 2020. +Hu, W., Xiao, L., and Pennington, J. Provable benefit of orthogonal initialization in optimizing deep linear networks. arXiv preprint arXiv:2001.05992, 2020. + +Kifer, Y. *Ergodic theory of random transformations*, volume 10. Springer Science & Business Media, 2012. +Kingma, D. P. and Ba, J. L. Adam: A method for stochastic gradient descent. In ICLR, 2015. +Kontoyiannis, I. and Meyn, S. P. Geometric ergodicity and the spectral gap of non-reversible markov chains. Probability Theory and Related Fields, 154(1):327-339, 2012. +Lahlou, S., Deleu, T., Lemos, P., Zhang, D., Volokhova, A., Hernández-García, A., Ezzine, L. N., Bengio, Y., and Malkin, N. A theory of continuous generative flow networks. arXiv preprint arXiv:2301.12594, 2023. +Lee, J. M. Introduction to Riemannian manifolds, volume 2. Springer, 2018. +Li, Y., Luo, S., Wang, H., and Hao, J. Cflownets: Continuous control with generative flow networks. arXiv preprint arXiv:2303.02430, 2023. +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In ICLR, 2019. +Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J. Dpm-solver: A fast ode solver for diffusion probabilistic model sampling in around 10 steps. In NeurIPS, 2022. +Malkin, N., Jain, M., Bengio, E., Sun, C., and Bengio, Y. Trajectory balance: Improved credit assignment in gflownets. arXiv preprint arXiv:2201.13259, 2022. +Marrakchi, A. Strongly ergodic actions have local spectral gap. Proceedings of the American Mathematical Society, 146(9):3887-3893, 2018. +Mathieu, E. and Nickel, M. Riemannian continuous normalizing flows. In NeurIPS, 2020. +Morozov, N., Maksimov, I., Tiapkin, D., and Samsonov, S. Revisiting non-acyclic gflows in discrete environments. arXiv preprint arXiv:2502.07735, 2025. +NGDC/WDS. Global significant volcanic eruptions database. https://www.ncei.noaa.gov/access/metadata/landing-page/bin/iso? id $\equiv$ gov.noaa.ngdc.mgg.hazards:G10147, 2025. +Papamakarios, G., Nalisnick, E., Rezende, D. J., Mohamed, S., and Lakshminarayanan, B. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57):1-64, 2021. +Rezende, D. J., Papamakarios, G., Racaniere, S., Albergo, M., Kanwar, G., Shanahan, P., and Cranmer, K. Normalizing flows on tori and spheres. In ICML, 2020. + +Rozen, N. Moser flow. https://github.com/noamroze/moserflow, 2022. +Rozen, N., Grover, A., Nickel, M., and Lipman, Y. Moser flow: Divergence-based generative modeling on manifolds. In NeurIPS, 2021. +Saxe, A. M., McClelland, J. L., and Ganguli, S. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013. +Sendera, M., Kim, M., Mittal, S., Lemos, P., Scimeca, L., Rector-Brooks, J., Adam, A., Bengio, Y., and Malkin, N. Improved off-policy training of diffusion samplers. In NeurIPS, 2024. +Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a. +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, 2020b. +Sutton, R. S. Reinforcement learning: An introduction. A Bradford Book, 2018. +Tang, S., Wang, Y., Ding, C., Liang, Y., Li, Y., and Xu, D. Adadiff: Accelerating diffusion models through step-wise adaptive computation. In ECCV, 2025. +Verine, A., Negrevergne, B., Chevaleyre, Y., and Rossi, F. On the expressivity of bi-lipschitz normalizing flows. In Asian Conference on Machine Learning, 2023. +Walters, P. An introduction to ergodic theory, volume 79. Springer Science & Business Media, 2000. +Wu, H., Kohler, J., and Noé, F. Stochastic normalizing flows. In NeurIPS, 2020. +Zhang, D., Chen, R. T., Malkin, N., and Bengio, Y. Unifying generative models with gflows. arXiv preprint arXiv:2209.02606, 2022a. +Zhang, D., Malkin, N., Liu, Z., Volokhova, A., Courville, A., and Bengio, Y. Generative flow networks for discrete probabilistic modeling. In ICML, 2022b. +Zhang, Q. and Chen, Y. Diffusion normalizing flow. In NeurIPS, 2021. + +# A. Fundamentals of EGFs + +As stated in section 3, on a Differential manifold $S$ endowed with a background measure $\lambda$ absolutely continuous with respect to Lebesgue measure, we define an EGF as a Generative Flow $(\pi_{\rightarrow}^{*},F_{\rightarrow}^{*})$ with $F_{\rightarrow}^{*} = f_{\rightarrow}^{*}\lambda$ and $\pi_{\rightarrow}^{*}(s\to \cdot) = \sum_{i = 1}^{p}\alpha_{\rightarrow}^{i}(s)\delta_{\Phi_{i}(s)}$ where $\Phi_{i}$ are diffeomorphisms of $S$ . With these definitions, the backward policy automatically has a closed form formula. + +Theorem A.1. Let $(\pi_{\rightarrow}^{*},F_{\rightarrow}^{*})$ as above, the induced Generative Flow on $S$ has a backward star policy given by + +$$ +\pi_ {\leftarrow} ^ {*} (s) = \sum_ {i = 1} ^ {p} \alpha_ {\leftarrow} ^ {i} (s) \delta_ {\Phi_ {i} ^ {- 1} (s)} \tag {21} +$$ + +$$ +\alpha_ {\leftarrow} ^ {i} (s) = \frac {\left(\alpha_ {\rightarrow} ^ {i} f _ {\rightarrow} ^ {*}\right) \circ \Phi_ {i} ^ {- 1} (s) \mid J _ {s} \Phi_ {i} ^ {- 1} |}{f _ {\leftarrow} ^ {*} (s)} \tag {22} +$$ + +$$ +f _ {\leftarrow} ^ {*} = \sum_ {j} \left(\alpha_ {\rightarrow} ^ {j} f _ {\rightarrow} ^ {*}\right) \circ \Phi_ {j} ^ {- 1} (s) \left| J _ {s} \Phi_ {j} ^ {- 1} \right|. \tag {23} +$$ + +Proof. From (Brunswic et al., 2024) section 3.2 and Proposition 1 in their appendix, we have for any measurable $X \subset S$ : + +$$ +F _ {\leftarrow} ^ {*} (Y) = F _ {\rightarrow} ^ {*} \otimes \pi_ {\rightarrow} ^ {*} (\mathcal {S} \rightarrow Y) \tag {24} +$$ + +$$ +\pi_ {\leftarrow} ^ {*} (s \rightarrow X) = \frac {d F _ {\leftarrow} ^ {*} \otimes \pi_ {\leftarrow} ^ {*} (\cdot \rightarrow X)}{d F _ {\leftarrow} ^ {*}} (s) \tag {25} +$$ + +$$ +F _ {\leftarrow} ^ {*} \otimes \pi_ {\leftarrow} ^ {*} (Y \rightarrow X) = F _ {\rightarrow} ^ {*} \otimes \pi_ {\rightarrow} ^ {*} (X \rightarrow Y). \tag {26} +$$ + +Therefore, for all measurable $X,Y\subset S$ + +$$ +\begin{array}{l} F _ {\leftarrow} ^ {*} \otimes \pi_ {\leftarrow} ^ {*} (Y \rightarrow X) = F _ {\rightarrow} ^ {*} \otimes \pi_ {\rightarrow} ^ {*} (X \rightarrow Y) (27) \\ = \int_ {s \in \mathcal {S}} \mathbf {1} _ {X} (s) \pi_ {\rightarrow} ^ {*} (s \rightarrow Y) d F _ {\rightarrow} ^ {*} (s) (28) \\ = \int_ {s \in \mathcal {S}} \mathbf {1} _ {X} (s) \pi_ {\rightarrow} ^ {*} (s \rightarrow Y) f _ {\rightarrow} ^ {*} (s) d \lambda (s) (29) \\ = \int_ {s \in S} \sum_ {i = 1} ^ {p} \mathbf {1} _ {X} (s) \alpha_ {\rightarrow} ^ {i} (s) \delta_ {\Phi_ {i} (s)} (Y) f _ {\rightarrow} ^ {*} (s) d \lambda (s) (30) \\ = \sum_ {i = 1} ^ {p} \int_ {s \in S} \mathbf {1} _ {X} (s) \alpha_ {\rightarrow} ^ {i} (s) \mathbf {1} _ {Y} \left(\Phi_ {i} (s)\right) f _ {\rightarrow} ^ {*} (s) d \lambda (s) (31) \\ = \sum_ {i = 1} ^ {p} \int_ {u \in \mathcal {S}} \mathbf {1} _ {X} \left(\Phi_ {i} ^ {- 1} (u)\right) \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (u)\right) \mathbf {1} _ {Y} (u) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (u)\right) | J _ {u} \Phi_ {i} ^ {- 1} | d \lambda (u) (32) \\ = \sum_ {i = 1} ^ {p} \int_ {u \in Y} \mathbf {1} _ {X} \left(\Phi_ {i} ^ {- 1} (u)\right) \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (u)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (u)\right) | J _ {u} \Phi_ {i} ^ {- 1} | d \lambda (u) (33) \\ = \int_ {u \in Y} \sum_ {i = 1} ^ {p} \delta_ {\Phi_ {i} ^ {- 1} (u)}) (X) \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (u)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (u)\right) | J _ {u} \Phi_ {i} ^ {- 1} | d \lambda (u). (34) \\ \end{array} +$$ + +![](images/6382c8a8e42fb21970ca1e83489478366edd83098911b59fd5029bf6c48e1cfd.jpg) + +Since this formula is true for any $Y \subset S$ , we deduce that $F_{\leftarrow}^{*} \otimes \pi_{\leftarrow}^{*}(\cdot \to X) \ll \lambda$ and that + +$$ +\begin{array}{l} \frac {d F _ {\leftarrow} ^ {*} \otimes \pi_ {\leftarrow} ^ {*} (\cdot \rightarrow X)}{d \lambda} (x) = \sum_ {i = 1} ^ {p} \delta_ {\Phi_ {i} ^ {- 1} (x)} (X) \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (x)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (x)\right) | J _ {x} \Phi_ {i} ^ {- 1} | (35) \\ = \left(\sum_ {i = 1} ^ {p} \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (x)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (x)\right) \mid J _ {x} \Phi_ {i} ^ {- 1} \mid \delta_ {\Phi_ {i} ^ {- 1} (x)}\right) (X) (36) \\ f _ {\leftarrow} ^ {*} (x) = \frac {d F _ {\leftarrow} ^ {*} \otimes \pi_ {\leftarrow} ^ {*} (\cdot \rightarrow \mathcal {S})}{d \lambda} (x) (37) \\ = \sum_ {i = 1} ^ {p} \delta_ {\Phi_ {i} ^ {- 1} (x)} (\mathcal {S}) \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (x)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (x)\right) | J _ {x} \Phi_ {i} ^ {- 1} | (38) \\ = \sum_ {i = 1} ^ {p} \alpha_ {\rightarrow} ^ {i} \left(\Phi_ {i} ^ {- 1} (x)\right) f _ {\rightarrow} ^ {*} \left(\Phi_ {i} ^ {- 1} (x)\right) | J _ {x} \Phi_ {i} ^ {- 1} | (39) \\ \end{array} +$$ + +The result follows. + +# B. Universality Theorems + +# B.1. General Universality Theorem + +We shall both write the theorems in a more formal way and provide rigorous proof of each statements. + +The following theorem implies Theorem 3.4. + +Theorem B.1. Let $(S, \lambda)$ be a measured Polish space and let $\pi_{\rightarrow}^{*}$ be a Markov kernel acting on $S$ . Assume that $\pi_{\rightarrow}^{*}$ is ergodic on $(S, \lambda)$ with summable $L^2$ -mixing coefficients, then for any probability distributions $F_{\mathrm{init}}$ , $F_{\mathrm{term}} \ll \lambda$ with density in $L^2(\lambda)$ and any $\varepsilon > 0$ , there exists $f_{\rightarrow}^{*} \in L^2(\lambda)$ such that the generative flow $(\pi_{\rightarrow}^{*}, f_{\rightarrow}^{*})$ from $F_{\mathrm{init}}$ to $F_{\mathrm{term}}$ is such that $\delta F_{\mathrm{init}}(S) + \delta F_{\mathrm{term}}(S) < \varepsilon$ . + +Proof. Let $H: \nu \mapsto \nu \pi^{*} + F_{\mathrm{init}} - F_{\mathrm{term}}$ , let $\nu_0 = F_{\mathrm{init}} - F_{\mathrm{term}}$ and let $\nu_{t+1} = H(\nu_t)$ . By assumption, $\nu_0$ density is in $L^2(\lambda)$ , then the density of $\nu_t$ with respect to $\lambda$ is $L^2$ for all $t \in \mathbb{N}$ . + +We have + +$$ +\begin{array}{l} \nu_ {T} = H ^ {T} (\nu) (40) \\ = \sum_ {t = 0} ^ {T} \left(F _ {\text {i n i t}} - F _ {\text {t e r m}}\right)\left(\pi_ {\rightarrow} ^ {*}\right) ^ {t} (41) \\ = \sum_ {t = 0} ^ {T} \epsilon_ {t} (42) \\ \end{array} +$$ + +with $\epsilon_{t} = (F_{\mathrm{init}} - F_{\mathrm{term}})(\pi_{\rightarrow}^{*})^{t}$ . For all $t \in \mathbb{N}$ , $\epsilon_{t}(\mathcal{S}) = 0$ , hence by assumption $\sum_{t \geq 0} \int_{s \in \mathcal{S}} \left( \frac{d\epsilon_{t}}{d\lambda}(s) \right)^{2} d\lambda(s) < +\infty$ . Therefore, $\nu_{T}$ converges as $T \to +\infty$ to some $\nu_{\infty}$ and $|\nu_{\infty}|_{2} \leq \sum_{t \geq 0} \int_{s \in \mathcal{S}} \left( \frac{d\epsilon_{t}}{d\lambda}(s) \right)^{2} d\lambda(s) < +\infty$ , hence $\nu_{\infty} \ll \lambda$ and $\frac{d\nu_{\infty}}{d\lambda} \in L^{2}(\lambda)$ . Furthermore, $\nu_{\infty}$ is a fix point of $H$ so $\nu_{\infty} = \nu_{\infty}\pi^{*} - R + F_{\mathrm{init}}$ . + +Now, $\nu_{\infty}$ does not necessarily provide a suitable $f_{\rightarrow}^{*}$ because it may happen that the negative part $\nu_{\infty}^{-} \neq 0$ . Since for any $\eta > 0$ we have $H(\nu_{\infty} + \eta \lambda) = H(\nu_{\infty}) + \eta \lambda \pi_{\rightarrow}^{*} = \nu_{\infty} + \eta \lambda$ , we may add $\eta \lambda$ to $\nu_{\infty}$ to get another fix point $\nu_{\infty}^{\eta} := \nu_{\infty} + \eta \lambda$ of $H$ . Define $f_{\rightarrow}^{*} = \frac{d(\nu_{\infty}^{\eta})^{+}}{d\lambda}$ , so that: + +$$ +\begin{array}{l} F _ {\text {i n i t}} + \left(f _ {\rightarrow} ^ {*} \lambda\right) \pi_ {\rightarrow} ^ {*} - F _ {\text {t e r m}} - f _ {\rightarrow} ^ {*} \lambda = F _ {\text {i n i t}} + \left(f _ {\rightarrow} ^ {*} \lambda - \nu_ {\infty} ^ {\eta} + \nu_ {\infty} ^ {\eta}\right) \pi_ {\rightarrow} ^ {*} - F _ {\text {t e r m}} - \left(f _ {\rightarrow} ^ {*} \lambda - \nu_ {\infty} ^ {\eta} + \nu_ {\infty} ^ {\eta}\right) (43) \\ = \left(f _ {\rightarrow} ^ {*} \lambda - \nu_ {\infty} ^ {\eta}\right) \pi_ {\rightarrow} ^ {*} - \left(f _ {\rightarrow} ^ {*} \lambda - \nu_ {\infty} ^ {\eta}\right) (44) \\ \end{array} +$$ + +Therefore, $\delta F_{\mathrm{init}} := [(f_{\rightarrow}^{*}\lambda - \nu_{\infty}^{\eta})\pi_{\rightarrow}^{*} - (f_{\rightarrow}^{*}\lambda - \nu_{\infty}^{\eta})]^{-}$ and $\delta F_{\mathrm{term}} := [(f_{\rightarrow}^{*}\lambda - \nu_{\infty}^{\eta})\pi_{\rightarrow}^{*} - (f_{\rightarrow}^{*}\lambda - \nu_{\infty}^{\eta})]^{+}$ . So that + +$$ +\delta F _ {\text {i n i t}} (\mathcal {S}) + \delta F _ {\text {t e r m}} (\mathcal {S}) = \left|\left(\nu_ {\infty} ^ {\eta}\right) ^ {-} \left(\pi_ {\rightarrow} ^ {*} - 1\right)\right| (\mathcal {S}) \leq 2 \left(\nu_ {\infty} ^ {\eta}\right) ^ {-} (\mathcal {S}). \tag {45} +$$ + +Since $\nu_{\infty} \ll \lambda$ in particular $\lim_{\eta \to +\infty} (\nu_{\infty}^{\eta})^{-}(\mathcal{S}) = 0$ , the result follows by choosing $\eta$ big enough. + +# B.2. Universality on Tori + +The universality Theorem on tori is obtained as a consequence of the spectral gap for Affine Toroidal families. We use the following result. + +Theorem B.2 (Theorem 5 of (Bekka & Guivarc'h, 2015)). Let $H$ be a countable subgroup of $\operatorname{Aff}(\mathbb{T}^d)$ . The following properties are equivalent: + +(i) The action of $H$ on $\mathbb{T}$ does not have a spectral gap. +(ii) There exists a non-trivial $H$ -invariant factor torus $\overline{\mathbb{T}}$ such that the projection of $H$ on $\operatorname{Aut}(\overline{\mathbb{T}})$ is amenable. + +If condition (ii) of Theorem B.2 is false for the group generated by the transformations $(\Phi_i)_i = 1$ , the we deduce any $\pi_{\rightarrow}^{*}$ induced by equation (5) has spectral gap if $\forall i,\alpha_{\rightarrow}^{i} = \frac{1}{p}$ . Since each $\Phi_{i}$ keep the Lebesgue measure $\lambda$ invariant, by universality master Theorem B.1, the family is universal. Our technical condition of Theorem 3.5 is then "The set of transforms $(\Phi_i)_i = 1$ is stable by inverse and the group generated by $(\Phi_i)_i = 1$ violates condition $(ii)$ ." In particular, if the linear part of $H$ is the whole $\mathrm{SL}(d,\mathbb{Z})$ , projections such as the one in condition $(ii)$ are never amenable since $\operatorname {SL}(d,\mathbb{Z})$ contains a free group with two generators. + +# B.3. Universality on Spheres + +The universality Theorem on spheres is obtained as a consequence of the spectral gap for isometry spherical families. Before stating the technical mathematical result we use, we recall that a real number $x \in \mathbb{R}$ is algebraic if there exists a non-zero polynomial $P \in \mathbb{Z}[X]$ with integral coefficients such that $P(x) = 0$ . The set of algebraic real numbers is denoted $\overline{\mathbb{Q}}$ . We use the following result. + +Theorem B.3 (Reformulation of Theorem 1 of (Bourgain & Gamburd, 2012)). Assume that $(\Phi_1,\dots ,\Phi_p)\in$ $\mathrm{SO}(d)\cap \mathrm{Mat}_{d\times d}(\overline{\mathbb{Q}})$ , that the group generated by $\Phi_1,\dots ,\Phi_p$ is dense in $\mathrm{SO}(d,\mathbb{R})$ and that $\forall i\in \{1,\dots ,p\}$ $\exists j\in$ $\{1,\dots ,p\} ,\Phi_i^{-1} = \Phi_j$ . Assume that, $\forall i,\alpha_{\rightarrow}^{i} = \frac{1}{p}$ then the associated Markov kernel $\pi_{\rightarrow}^{*}$ given by equation (5) has a spectral gap. + +With the technical condition "The set of transforms $(\Phi_i)_i = 1$ is stable by inverse, the group generated by $(\Phi_i)_i = 1$ is dense in $\mathrm{SO}(d,\mathbb{R})$ and each of the $\Phi_{i}$ has algebraic coefficients", Theorem 3.6 then follows from master Theorem B.1. + +# C. Quantitative Sampling Theorem + +Theorem C.1. Let $(\pi_{\rightarrow}^{*},f_{\rightarrow}^{*})$ be a generative flow and let $F_{\mathrm{init}}$ and $F_{\mathrm{term}}$ initial and terminal distributions. Assume that $F_{\mathrm{init}}\neq 0$ , and consider the sample $s_\tau$ of the generative flow Markov chain from $F_{\mathrm{init}}$ to $\widehat{F}_{\mathrm{term}}$ then: + +$$ +\operatorname {T V} \left(s _ {\tau} \left\| \frac {1}{\widehat {F} _ {\text {t e r m}} (\mathcal {S})} \widehat {F} _ {\text {t e r m}}\right) \leq \frac {\delta F _ {\text {i n i t}} (\mathcal {S})}{\widehat {F} _ {\text {t e r m}} (\mathcal {S})} \right. \tag {46} +$$ + +with TV the total variation. + +Proof. For any generative flow $\mathbb{F} := (\pi_{\rightarrow}^{*}, F_{\rightarrow}^{*})$ , define $\pi_{\rightarrow}^{\tau, \mathbb{F}}$ the kernel $x \mapsto (s_{\tau}|s_1 = x)$ for the stopping condition $\widehat{F}_{\mathrm{term}}$ . The sampling distribution $s_{\tau}$ of $\mathbb{F}$ is then $\frac{1}{F_{\mathrm{init}}(\mathcal{S})} F_{\mathrm{init}}\pi_{\rightarrow}^{\tau, \mathbb{F}}$ . Furthermore, we have $\delta F_{\mathrm{term}}(\mathcal{S}) - \delta F_{\mathrm{init}}(\mathcal{S}) = F_{\mathrm{init}}(\mathcal{S}) + F_{\rightarrow}^{*}\pi^{*}(\mathcal{S}) - F_{\rightarrow}^{*}(\mathcal{S}) - F_{\mathrm{term}}(\mathcal{S}) = F_{\mathrm{init}}(\mathcal{S}) - F_{\mathrm{term}}(\mathcal{S})$ . In particular, $\widehat{F}_{\mathrm{term}}(\mathcal{S}) \geq F_{\mathrm{init}}(\mathcal{S}) > 0$ so $\widehat{F}_{\mathrm{term}} \neq 0$ . + +We notice that the generative flow $\mathbb{F}' := (\pi_{\rightarrow}^{*}, F_{\rightarrow}^{*})$ satisfies the flow-matching constraint from $\widehat{F}_{\mathrm{init}}$ to $\widehat{F}_{\mathrm{term}}$ and that $\pi^{\tau, \mathbb{F}'} = \pi^{\tau, \mathbb{F}}$ . Applying the sampling Theorem to $\mathbb{F}'$ , we obtain + +$$ +\widehat {F} _ {\text {i n i t}} \pi_ {\rightarrow} ^ {\tau , \mathbb {F} ^ {\prime}} = \widehat {F} _ {\text {t e r m}} \tag {47} +$$ + +$$ +\left(F _ {\text {i n i t}} + \delta F _ {\text {i n i t}}\right) \pi_ {\rightarrow} ^ {\tau , \mathbb {F} ^ {\prime}} = \widehat {F} _ {\text {t e r m}} \tag {48} +$$ + +$$ +F _ {\text {i n i t}} \pi_ {\rightarrow} ^ {\tau_ {1} \mathbb {F} ^ {\prime}} + \delta F _ {\text {i n i t}} \pi_ {\rightarrow} ^ {\tau_ {1} \mathbb {F} ^ {\prime}} = \widehat {F} _ {\text {t e r m}} \tag {49} +$$ + +$$ +\alpha \times \underbrace {\left(\frac {1}{F _ {\mathrm {i n i t}} (\mathcal {S})} F _ {\mathrm {i n i t}} \pi_ {\rightarrow} ^ {\tau , \mathbb {F}}\right)} _ {s _ {\tau}} + (1 - \alpha) \times \frac {1}{\delta F _ {\mathrm {i n i t}} (\mathcal {S})} \delta F _ {\mathrm {i n i t}} \pi_ {\rightarrow} ^ {\tau , \mathbb {F} ^ {\prime}} = \frac {1}{\widehat {F} _ {\text {t e r m}} (\mathcal {S})} \widehat {F} _ {\text {t e r m}} \tag {50} +$$ + +with $\alpha = \frac{F_{\mathrm{init}}(\mathcal{S})}{\widehat{F}_{\mathrm{term}}(\mathcal{S})} = \frac{\widehat{F}_{\mathrm{term}}(\mathcal{S}) - \delta F_{\mathrm{init}}(\mathcal{S})}{\widehat{F}_{\mathrm{term}}(\mathcal{S})} = 1 - \frac{\delta F_{\mathrm{init}}(\mathcal{S})}{\widehat{F}_{\mathrm{term}}(\mathcal{S})}$ . The result follows. + +# D. Implementation considerations + +# D.1. Density filtering + +Since EGFs give us access to a tractable density $\widehat{f}_{\mathrm{term}}$ , we can estimate its mean $m$ and standard deviation $\sigma$ on the state space to filter out any unwanted outliers when sampling. By choosing a lower bound saturation value $\widehat{f}_{\mathrm{sat}} = m - k\sigma$ where $k$ defines how strong the filter should be, we can then define a stricter sampling density $\tilde{f}_{\mathrm{term}}$ as: + +$$ +\tilde {f} _ {\text {t e r m}} = \left\{ \begin{array}{l l} \widehat {f} _ {\text {t e r m}} & \text {i f} \widehat {f} _ {\text {t e r m}} \geq \widehat {f} _ {\text {t e r m}} \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {51} +$$ + +Since the new sampling density $\tilde{f}_{\mathrm{term}} = 0$ for all points of low true density, the next state of the Markov Chain is guaranteed not be the sink state. This ensures the EGF only generates samples associated with high density. The factor $k$ can be chosen manually to obtain a more strict or lenient filter, or it can be automatically optimized by recalculating the negative log-likelihood on the training dataset to systematically evaluate all $k$ values. + +![](images/e6f7da0e68a9280cbf08e1854b33d1207eca4a92c086c7ae3367d5e9f299b195.jpg) +Figure 4. NLL estimation for a range of values of $k$ for a given model on the volcano dataset. + +Note that this filtering is applied on the density rather than on the samples, meaning that no samples are filtered out. Therefore, this simply has the effect of preventing the trajectories from stopping at low density points. Figure 5 demonstrates that using the optimal filter value concentrates the samples in the zones of high true density, bypassing the uniform background noise that would otherwise be found prior to filtering. + +![](images/9b26745afec315221a5f8b190dacbbb9c2a51e1fed47e7519017440e628ff06e.jpg) + +![](images/5d025adebf19a8bd62e29e6347911ac7a07b6dd55903671721f2b61967a2bf23.jpg) + +![](images/f210938ada7faf90dab6efd4121fde7fd3bfdb66e53b231194af880e8dd8fb36.jpg) + +![](images/338bd97a3406c3a7100085c2aff1d075c10d4baeb48f914a5227c254fd670e2b.jpg) + +![](images/9c7780fb776b81988433bfc0a157aa2047a59711d4c9adf549eb0cb2171de5bc.jpg) + +![](images/4381c735752ebd37df6c92769dec044a3e81e89bd5d1984dcfdca9774b60231d.jpg) + +![](images/fd891545912e161402fd115b1f145d286882798deea5bb131b4958723546a723.jpg) +a From left to right, the depth of $f_{\rightarrow}^{*}$ is kept constant while $\alpha \rightarrow$ depth increases. + +![](images/8acfdacb1fd2683525a1075a74c2b3bdb3abca95b581e98722a7e0c3609ace9f.jpg) +b From left to right, the depth of $\alpha \rightarrow$ is kept constant while $f_{\rightarrow}^{*}$ depth increases. + +![](images/42c8826c37125241a97137ee421544ad57eed6848e352f62275741e16c64e187.jpg) + +![](images/2572985ba5d27809cd959a2359a475fa74a0dd2628441b6616904925d81499fd.jpg) + +![](images/56b5b9cacb0c4613c13537c33a91991c96a2e9b9f315689f97cb10c67aae36e8.jpg) +Figure 6. Variation of $f_{\rightarrow}^{*}$ and $\alpha_{\rightarrow}$ depths from 2x32 to 6x32. The theoretical prediction is that $\alpha_{\rightarrow}$ may be kept constant while $f_{\rightarrow}^{*}$ is trained. Keeping $\alpha_{\rightarrow}$ constant indeed yields improvements, however the improvement obtained by increasing the depth of $\alpha_{\rightarrow}$ instead of $f_{\rightarrow}^{*}$ is comparatively better. +a Target distribution +Figure 5. Comparison of the EGF's samples using the same model with and without a density filter. + +![](images/e52a537ed2c614ec007ca91007ef7429dd99ac13c5b75a147a36cac5dde1ba84.jpg) +b Unfiltered samples + +![](images/1e571351567a1e9daf14d1076afa529b6b694d404cf9019e122f70784c397469.jpg) +c Samples with optimal filter + +# E. Ablation study on the size of EGF + +![](images/c8e5299dd9e05f5a1543a9a1221005789f4d16a298c651d1d2cde7e8b7589ee0.jpg) +Figure 7. Theoretically minimal EGF with four affine moves on the torus $\mathbb{T}^2$ is two generators of $\mathrm{SL}(2,\mathbb{Z})$ together with their inverse. The MLPs parameterizing $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ have size 4x128. We see that the generated checkerboard has high quality, sharp boundaries but some under densities + +![](images/54b79b7513fe895d428875a6a90fecd9afa0865564b447314300ee448aecbef7.jpg) + +![](images/e3b964cc5661870f05276ce84a7d1a8f05115b4742f13edb1315ac28251032c3.jpg) + +![](images/37595f50b73760584d6465c0de7dc63c3e199991d76326fee9475ae0bb34ba5f.jpg) + +![](images/d3b6cd8f90f94a6b13d36357718ae0a667974bf66fa94349991c53c01fbbf0f5.jpg) + +![](images/e4d04e94b1d0281cf16b1f8c7319c43512c8f47da400dfcc4cf2085b4c96ebb3.jpg) + +![](images/c44de610b9b68a2c90db9908bb71a75d17b7e68ff70c5a1502a885e32fdb9c7a.jpg) + +![](images/3005d131c69d9616df2016cfc421f1452416af9c1d1687f2ea25a6835b8ed0b2.jpg) + +![](images/f6c88c18817b560e9a57b79e2eb26be09809c025468afad1c10cb203dfbbc486.jpg) + +![](images/376e471f22e176803582a5d23665405f72459610b981fbacecfca79cf780b56a.jpg) + +a Generation of spin wheel with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ from 2x32 to 5x32 (TOP) and 6x32 to 9x32 (BOT). + +![](images/fbf418c582e34dcd344fb1ea0c28af32fe39c8e40cc3a383a27a44f59c440b4d.jpg) + +![](images/49d1dc047ab95fe6de6dde871b216999b039feb44c4d75c152a190856532f776.jpg) +Figure 8. Variation of $f_{\rightarrow}^{*}$ and $\alpha_{\rightarrow}$ depths and width from 2x32 to 9x64. Increasing depth and width increases quality until depth 4 then the training seemingly becomes lest stable as shown by the 9x64 experiment. Since we keep the learning rate constant at 1e-3, it is likely that the MLPs training becomes unstable. The state space is $S = \mathbb{R}^2$ , to ensure $F_{\rightarrow}(S) < +\infty$ , we constrain $f_{\rightarrow}^{*}$ to be zero outside $[-4,4]^2$ . The EGF has 8 transformations which are translations, while the MLPs for $\alpha_{\rightarrow}$ and $f_{\rightarrow}^{*}$ vary from 2x32 (2 hidden layer of width 32) to 9x64. Learning rate is kept at 0.001. + +![](images/c6c0ae71b33e08eb7619990e2c868ce7564917d1a7ed212089832abebb41682e.jpg) + +![](images/c83542f82bb589c655ed022459ded09d449778f2c99e7fb79ca02d9cd93210f2.jpg) + +![](images/393fb4fab0584a07f61b7da7cbd4ded6d5168273195d5041d44d8bac0708a9a4.jpg) + +![](images/e94cb94f343d83a91afc8a1762189b6c6d7565b0040d4bcc39170b8039076661.jpg) + +![](images/6dd04a5c4654ab9575fbb21d23471c18d2c2283c0a63a2d874dfe2bdb90cd0a0.jpg) + +![](images/2875382c0fe69305e3c09b7d162ce2b03e9f83588712bff5220a791992d38d7d.jpg) + +b Generation of spin wheel with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha_{\rightarrow}$ from 2x64 to 5x64 (TOP) and 6x64 to 9x64 (BOT). + +![](images/0e1a99bd0d80cf40df71c01c24582a3735d37d66de24b0680a44d0aaaf6fcd85.jpg) + +![](images/e600959a7fd93c30de7f620ce4e2855cc965cf5bc6ba10c09724220673416439.jpg) + +![](images/d411d8d451e930ee3aa27067a5633a6568113a523ca08a25dfffa064ae21ac5a.jpg) + +![](images/7c8fa0d90532b1eafa39a586b84708eb23916f027f2499b50c4b560eca27e72e.jpg) + +![](images/f34cde45ac19baa0e188be6a983c41554f2d669a22972bb0a4acec04a970ae96.jpg) + +![](images/e53d28ac8c49cd3d1987abca6d458e3dd1cbccf3618e235cf0efa74aa47ce883.jpg) + +![](images/cd9b267b90d4e20dbcae092739b35fa5da8a50d7fadbcefba12ea7b35a3a874e.jpg) + +![](images/1a21d416c803ddd8c0332fc8bdf8958d325d8269909ffe0f9ec40016ca28cfac.jpg) + +![](images/f392fe55cc153b875b3523157be84ad892a61f57964227d50a505764b2bc0669.jpg) +a Generation of 4 circles with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ from 2x32 to 5x32 (TOP) and 6x32 to 9x32 (BOT). + +![](images/d707f73ef510aebc2eac437dca3f02661ea67bd2b45d3955aa061b4e00dce10e.jpg) +b Generation of 4 circles with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha_{\rightarrow}$ from 2x64 to 5x64 (TOP) and 6x64 to 9x64 (BOT). + +![](images/22d5d2cd3f5ee44092712a4ad4fa83aef20a9214268b3fe6f519db8f435872eb.jpg) + +![](images/1e688a5e0011c27555828b3f5b6d07f6bd2ca2f1743ef56863fdd5ca62ad8968.jpg) +Figure 9. Variation of $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ depths and width from 2x32 to 9x64. Increasing depth and width increases quality until depth 4 then the training seemingly becomes lest stable as shown by the 9x64 experiment. Since we keep the learning rate constant at 1e-3, it is likely that the MLPs training becomes unstable. The state space is $S = \mathbb{R}^2$ , to ensure $F_{\rightarrow}(S) < +\infty$ , we constrain $f_{\rightarrow}^{*}$ to be zero outside $[-4, 4]^2$ . The EGF has 8 transformations which are translations, while the MLPs for $\alpha \rightarrow$ and $f_{\rightarrow}^{*}$ vary from 2x32 (2 hidden layer of width 32) to 9x64. Learning rate is kept at 0.001. + +![](images/948fffc2923e282b57e37aec48395955521ad3c029a2a41b56410f6dfcabeb39.jpg) + +![](images/bce2dc6d2115aae7fc78d8b21bdc42424f24b94b366ab4e0d6281d8edb621ad5.jpg) + +![](images/c90724224c9b47b46ac5024d1fb8e9c6a6cdb07ff2f05535619d1e3332e59a17.jpg) + +![](images/ac5ae3e2324b956380289fcd96d4f19b5289e8aeea77a7078d9705fba7dbcfa1.jpg) + +![](images/8634ecadd2a90fd4096ac41ec8632e1dba1e05f9094f58d1daed0b9625653314.jpg) + +![](images/3142178abba3ef5cd62ea0f28c529815848289ace910a6680d072a5b863e8810.jpg) + +![](images/056df9353152ca1969e2e4519eb94e38a93dea5aca9473a7053ad4f2abe5a731.jpg) + +![](images/bbcbd23959e3367c5216a772a0c9099438b34b7ecb6f6ba5d17e3cc1fe5155e8.jpg) + +![](images/61828619383ed3882a5dd737b722426b7f2c3ec5c9db74d295057db4f4ec0c34.jpg) + +![](images/e01544875f93906f6307c5a06e345795bf06d5f0578a7c20b4d33c44f069a649.jpg) + +![](images/bb4afea127d4baf7cdb138e0fe61383b6c2c4564e8c203b8aa80b9c8f4e8de1f.jpg) + +![](images/ce0678e3b04512e2772e4434c1a5ed42413a2cee52182f130b3a3c0fc35c756c.jpg) + +a Generation of 2spirals with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ from 2x32 to 5x32 (TOP) and 6x32 to 9x32 (BOT). + +![](images/2da76cb350e47a56b60aface27052b4b3feea5202147f4823ae08a32032c02ef.jpg) + +![](images/befd99720089534870ec3799e733db97343d8c5f754970813a0ab825caa48e01.jpg) +Figure 10. Variation of $f_{\rightarrow}^{*}$ and $\alpha \rightarrow$ depths and width from 2x32 to 9x64. Increasing depth and width increases quality until depth 4 then the training seemingly becomes lest stable as shown by the 9x64 experiment. Since we keep the learning rate constant at 1e-3, it is likely that the MLPs training becomes unstable. The state space is $S = \mathbb{R}^2$ , to ensure $F_{\rightarrow}(S) < +\infty$ , we constrain $f_{\rightarrow}^{*}$ to be zero outside $[-4,4]^2$ . The EGF has 8 transformations which are translations, while the MLPs for $\alpha \rightarrow$ and $f_{\rightarrow}^{*}$ vary from 2x32 (2 hidden layer of width 32) to 9x64. Learning rate is kept at 0.001. + +![](images/cd3f3a1fb9f6a5530f090d102d68ac66560eef6877affd6b93fd4f6c752c5abf.jpg) + +![](images/1c0e5caf2d6937a77379ca5de43016366011edd53a6a3658f344bc3db4fb8e12.jpg) + +![](images/22e0d1f96fc1b9cc4f36df18d02456c6350125139b5889a970917600419ca049.jpg) + +![](images/978a55b1aef728a252deb77929a9e1c7b0aa017d37161d59568c89f5f9a06734.jpg) + +![](images/ca0333c8bd1b8be3478301282a0ec93342465bc7e442963a3dd948502040f26d.jpg) + +![](images/b81c01923999f16eaaa330a607340d256ef48ea59a3aae46cbcdd2c9defb385a.jpg) + +b Generation of 2 spirals with variations of MLPs for both $f_{\rightarrow}^{*}$ and $\alpha_{\rightarrow}$ from 2x64 to 5x64 (TOP) and 6x64 to 9x64 (BOT). \ No newline at end of file diff --git a/ICML/2025/Ergodic Generative Flows/images.zip b/ICML/2025/Ergodic Generative Flows/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..acb4ca9ad5419c9425f930724ea3e3249084e887 --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5aa27bd2f4384b62e9b5086230c97902d06e54d73dce45601cd5f68a6a39187 +size 1586856 diff --git a/ICML/2025/Ergodic Generative Flows/layout.json b/ICML/2025/Ergodic Generative Flows/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..09305ccecdc1dc83b9cc955097a4f10ea2d4a796 --- /dev/null +++ b/ICML/2025/Ergodic Generative Flows/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a2c5bd9aad16d24f8a07e084a3182373e943e0601c56c1f6a4afbdf66bbe15c5 +size 1089388 diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_content_list.json b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cd3433ed53fca7acf91c30dd9e8083893bff1f48 --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa30cc6b686da6506ecfa7e0541323189c79fbf5eadba1a7847b3acda8b12d14 +size 131407 diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_model.json b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_model.json new file mode 100644 index 0000000000000000000000000000000000000000..897d4ae45bd8b8ca1841cd94ea44430a2112e94d --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82244375814f1b81982dec9fefec68ee03b5b5de8d12904b8ec29b1dc6a25788 +size 161480 diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_origin.pdf b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6b2f624892d85a09bf59f90c1f31dfff96e5fb06 --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/818e7081-7bf1-4d92-849c-bc57942a5467_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca49ee1fc47fe0f9fc00e20e7e7712d5134536a85444557d931ee395bbd37c91 +size 10273442 diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/full.md b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a383f779d951e8f62e15a4f2b65bb8d806643001 --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/full.md @@ -0,0 +1,625 @@ +# Erwin: A Tree-based Hierarchical Transformer for Large-scale Physical Systems + +Maksim Zhdanov1 Max Welling1,2 Jan-Willem van de Meent1 + +# Abstract + +Large-scale physical systems defined on irregular grids pose significant scalability challenges for deep learning methods, especially in the presence of long-range interactions and multi-scale coupling. Traditional approaches that compute all pairwise interactions, such as attention, become computationally prohibitive as they scale quadratically with the number of nodes. We present Erwin, a hierarchical transformer inspired by methods from computational many-body physics, which combines the efficiency of tree-based algorithms with the expressivity of attention mechanisms. Erwin employs ball tree partitioning to organize computation, which enables linear-time attention by processing nodes in parallel within local neighborhoods of fixed size. Through progressive coarsening and refinement of the ball tree structure, complemented by a novel cross-ball interaction mechanism, it captures both fine-grained local details and global features. We demonstrate Erwin's effectiveness across multiple domains, including cosmology, molecular dynamics, PDE solving, and particle fluid dynamics, where it consistently outperforms baseline methods both in accuracy and computational efficiency. + +# 1. Introduction + +Scientific deep learning is tackling increasingly computationally intensive tasks, following the trajectory of computer vision and natural language processing. Applications range from molecular dynamics (MD) (Arts et al., 2023) and computational particle mechanics (Alkin et al., 2024b) to weather forecasting (Bodnar et al., 2024), where simulations often involve data defined on irregular grids with thousands to millions of nodes, depending on the required resolution and complexity of the system. + +$^{1}$ AMLab, University of Amsterdam $^{2}$ CuspAI. Correspondence to: Maksim Zhdanov . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/864534fafa46b45fc0b14f4c30b84bbe05a6ebe13d6a3d53a14156e39a4490d2.jpg) + +![](images/f5b83c4a6be27c0f80e8de2266776b085430513d98a455dda0aab4e84c5d7814.jpg) + +![](images/352b88053a82d7b670b42797693f23853cc443e93d0a591745702a162587df86.jpg) +Figure 1. Top: Ball tree attention over a molecular graph. Multihed self-attention (MHSA) is computed in parallel at fixed hierarchy levels (bold circles). In the following layers, the tree is progressively coarsened to learn global features, while the partition size is fixed. Bottom: Computational advantages of our model. + +![](images/5304601528089e0b23112ef3517fc37312d845f1c72240cf4c8265da98d1f8ea.jpg) + +![](images/fdd9b6d14b8fbee31a62ffb99769da483d0fccbf7189154038fd5e02cb4dba69.jpg) + +Such large-scale systems pose a significant challenge to existing methods that were developed and validated at smaller scales. For example, in computational chemistry, models are typically trained on molecules with tens of atoms (Kovács et al., 2023), while molecular dynamics simulations often exceed thousands of atoms. This scale disparity might result in prohibitive runtimes that render models inapplicable in high-throughput scenarios such as protein design (Watson et al., 2023) or screening (Fu et al., 2022). + +A key challenge in scaling to larger system sizes is that computational methods that work well at small scales break down at larger scales. For small systems, all pairwise interactions can be computed explicitly, allowing deep learning models to focus on properties like equivariance (Cohen & Welling, 2016). However, this brute-force approach becomes intractable as the system size grows. At larger scales, approximations are required to efficiently capture both long-range effects from slowly decaying potentials and multiscale coupling (Majumdar et al., 2020). As a result, models validated only on small systems often lack the architectural components necessary for efficient scaling. + +This problem has been extensively studied in computational many-body physics (Hockney & Eastwood, 2021), where the need for evaluating long-range potentials for large-scale particle systems led to the development of sub-quadratic tree-based algorithms (Barnes & Hut, 1986; Carrier et al., 1988). These methods are based on the intuition that distant particles can be approximated through their mean-field effect rather than individual interactions (Pfalzner & Gibbon, 1996). The computation is then structured using hierarchical trees to efficiently organize operations at multiple scales. While highly popular for numerical simulations, these tree-based methods have seen limited adoption in deep learning due to poor synergy with GPU architectures. + +Transformers (Vaswani et al., 2017), on the other hand, employ the highly optimized attention mechanism, which comes with the quadratic cost of computing all-to-all interactions. In this work, we combine the efficiency of hierarchical tree methods with the expressivity of attention to create a scalable architecture for processing large-scale particle systems. Our approach leverages ball trees to organize computation at multiple scales, enabling both local accuracy and global feature capture while maintaining linear complexity in the number of nodes. + +The main contributions of the work are the following: + +- We introduce ball tree partitioning for efficient point cloud processing, enabling linear-time self-attention through localized computation within balls at different hierarchical levels. +- We present Erwin, a hierarchical transformer that processes data through progressive coarsening and refinement of ball tree structures, effectively capturing both fine-grained local interactions and global features while maintaining computational efficiency. +- We validate Erwin's performance across multiple large-scale physical domains: +- Capturing long-range interactions (cosmology) +- Computational efficiency (molecular dynamics) +- Expressivity on large-scale phenomena (PDE benchmarks, turbulent fluid dynamics) + +achieving state-of-the-art performance in both computational efficiency and prediction accuracy. + +# 2. Related Works: sub-quadratic attention + +One way to avoid the quadratic cost of self-attention is to linearize attention by performing it on non-overlapping patches. For data on regular grids, like images, the Swin Transformer (Liu et al., 2021) achieves this by limiting attention to local windows with cross-window connections enabled by shifting the windows. However, for irregular data such as point clouds or non-uniform meshes, one first needs to induce a structure that will allow for patching. Sev + +eral approaches (Liu et al., 2023; Sun et al., 2022) transform point clouds into sequences, most notably PointTransformer v3 (PTv3) (Wu et al., 2024b), which projects points into voxels and orders them using space-filling curves (e.g., Hilbert curve). While scalable, these curves introduce artificial discontinuities that can break local spatial relationships. + +Particularly relevant to our work are hierarchical attention methods. In the context of 1D sequences, approaches like the H-transformer (Zhu & Soricut, 2021) and Fast Multipole Attention (Kang et al., 2023) approximate self-attention through multi-level decomposition: tokens interact at full resolution locally while distant interactions are computed using learned or fixed groupings at progressively coarser scales. For point clouds, OctFormer (Wang, 2023) converts spatial data into a sequence by traversing an octree, ensuring spatially adjacent points are consecutive in memory. While conceptually similar to our approach, OctFormer relies on computationally expensive octree convolutions, whereas our utilization of ball trees leads to significant efficiency gains. + +Rather than using a hierarchical decomposition, another line of work proposes cluster attention (Janny et al., 2023; Alkin et al., 2024a; Wu et al., 2024a). These methods first group points into clusters and aggregate their features at the cluster centroids through message passing or cross-attention. After computing attention between the centroids, the updated features are then distributed back to the original points. While these approaches yield the quadratic cost only in the number of clusters, they introduce an information bottleneck at the clustering step that may sacrifice fine-grained details and fail to capture features at multiple scales - a limitation our hierarchical approach aims to overcome. + +Beyond attention, several alternatives have been developed for processing large-scale systems with irregular geometries. Message-passing neural networks (Gilmer et al., 2017) typically address scalability through multi-level graph representations (Lam et al., 2023; Cao et al., 2023; Valencia et al., 2025). Additionally, recent works have explored sub-quadratic convolution-based architectures like Hyena (Moskalev et al., 2025) and state-space models (Zhang et al., 2025), which offer promising alternatives for efficient processing of geometric data without the computational overhead of attention mechanisms. + +# 3. Background + +Our work revolves around attention, which we aim to linearize by imposing structure onto point clouds using ball trees. We formally introduce both concepts in this section. + +# 3.1. Attention + +The standard self-attention mechanism is based on the scaled dot-product attention (Vaswani et al., 2017). Given a set $X$ + +of $N$ input feature vectors of dimension $C$ , self-attention is computed as + +$$ +\mathbf {Q}, \mathbf {K}, \mathbf {V} = \mathbf {X} \mathbf {W} _ {q}, \mathbf {X} \mathbf {W} _ {k}, \mathbf {X} \mathbf {W} _ {v} +$$ + +$$ +\operatorname {A t t} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \operatorname {s o f t m a x} \left(\frac {\mathbf {Q} \mathbf {K} ^ {T}}{\sqrt {C ^ {\prime}}} + \mathcal {B}\right) \mathbf {V} \tag {1} +$$ + +where $\mathbf{W}_q, \mathbf{W}_k, \mathbf{W}_v \in \mathbb{R}^{C \times C'}$ are learnable weights and $\mathcal{B} \in \mathbb{R}^{N \times N}$ is the bias term. + +Multi-head self-attention (MHSA) improves expressivity by computing attention $H$ times with different weights and concatenating the output before the final projection: + +$$ +\operatorname {M H S A} (\mathbf {X}) = \left[ \begin{array}{l l l} \mathbf {Y} _ {1}, \dots , \mathbf {Y} _ {H} \end{array} \right] \mathbf {W} ^ {O} \tag {2} +$$ + +$$ +\mathbf {Y} _ {i} = \mathrm {A t t} (\mathbf {X W} _ {q} ^ {i}, \mathbf {X W} _ {k} ^ {i}, \mathbf {X W} _ {v} ^ {i}) +$$ + +where $[\cdot, \cdot, \cdot, \cdot]$ denotes concatenation along the feature dimension, and $\mathbf{W}_q^i, \mathbf{W}_k^i, \mathbf{W}_v^i \in \mathbb{R}^{C \times (C' / H)}$ and $\mathbf{W}^O \in \mathbb{R}^{C \times C'}$ are learnable weights. + +The operator explicitly computes interactions between all elements in the input set without any locality constraints. This yields the quadratic computational cost w.r.t. the input set size $\mathcal{O}(N^2)$ . Despite being heavily optimized (Dao, 2024), this remains a bottleneck for large-scale applications. + +# 3.2. Ball tree + +A ball tree is a hierarchical data structure that recursively partitions points into nested sets of equal size, where each set is represented by a ball that covers all the points in the set. Assume we operate on the $d$ -dim. Euclidean space $\left(\mathbb{R}^d,||\cdot ||_2\right)$ where we have a point cloud (set) $P = \{\mathbf{p}_1,\dots,\mathbf{p}_n\} \subset \mathbb{R}^d$ + +Definition 3.1 (Ball). A ball is a region bounded by a hypersphere in $\mathbb{R}^d$ . Each ball is represented by the coordinates of its center $\mathbf{c} \in \mathbb{R}^d$ and radius $r \in \mathbb{R}_+$ : + +$$ +B = B (\mathbf {c}, r) = \left\{\mathbf {z} \in \mathbb {R} ^ {d} \mid | | \mathbf {z} - \mathbf {c} | | _ {2} \leq r \right\}. \tag {3} +$$ + +We will omit the parameters $(\mathbf{c}, r)$ for brevity from now on. + +Definition 3.2 (Ball Tree). A ball tree $T$ on point set $P$ is a hierarchical sequence of partitions $\{L_0, L_1, \dots, L_m\}$ , where each level $L_i$ consists of disjoint balls that cover $P$ . At the leaf level $i = 0$ , the nodes are the original points: + +$$ +L _ {0} = \left\{\left\{\mathbf {p} _ {j} \right\} \mid \mathbf {p} _ {j} \in P \right\} +$$ + +For each subsequent level $i > 0$ , each ball $B \in L_{i}$ is formed by merging two balls at the previous level $B_{1}, B_{2} \in L_{i-1}$ : + +$$ +L _ {i} = \left\{\left\{B _ {1} \cup B _ {2} \right\} \mid B _ {1}, B _ {2} \in L _ {i - 1} \right\} \tag {4} +$$ + +such that its center is computed as the center of mass: + +$$ +\mathbf {c} _ {B} = \frac {| B _ {1} | \mathbf {c} _ {1} + | B _ {2} | \mathbf {c} _ {2}}{| B _ {1} | + | B _ {2} |} +$$ + +and its radius is determined by the furthest point it contains: + +$$ +r _ {B} = \max \left\{\left| \left| \mathbf {p} - \mathbf {c} _ {B} \right| \right| _ {2} \mid \mathbf {p} \in B _ {1} \cup B _ {2} \right\} +$$ + +where $|B|$ denotes the number of points contained in $B$ . + +To construct the ball tree, we recursively split the data points into two sets starting from $P$ . In each recursive step, we find the dimension of the largest spread (i.e., the max - min value) and split at its median (Pedregosa et al., 2012), constructing covering balls per Def.3.2. For details, see Appendix Alg.1 $^{1}$ . + +Tree Completion To enable efficient implementation, we want to work with perfect binary trees, i.e., trees where all internal nodes have exactly two children and all leaf nodes appear at the same depth. To achieve this, we pad the leaf level of a ball tree with virtual nodes, yielding the total number of nodes $2^m$ , where $m = \operatorname{ceil}(\log_2(n))$ . + +# 3.2.1.BALL TREE PROPERTIES + +In the context of our method, there are several properties of ball trees that enable efficient hierarchical partitioning: + +Proposition 3.3 (Ball Tree Properties). The ball tree $T$ constructed as described satisfies the following properties: + +1. The tree is a perfect binary tree. +2. At each level $i$ , each ball contains exactly $2^i$ leaf nodes. +3. Balls at each level cover the point set + +$$ +\bigcup_ {B \in L _ {i}} B = P \quad \forall i \in \{0, \dots , m \}. +$$ + +Proposition 3.4 (Contiguous Storage). For a ball tree $T = \{L_0, L_1, \dots, L_m\}$ on point cloud $P = \{\mathbf{p}_1, \dots, \mathbf{p}_n\}$ , there exists a bijective mapping $\pi : \{1, \dots, n\} \to \{1, \dots, n\}$ such that points belonging to the same ball $B \in L_i$ have contiguous indices under $\pi$ . + +As a corollary, the hierarchical structure at each level can be represented by nested intervals of contiguous indices: + +Example. Let $P = \{\mathbf{p}_1, \dots, \mathbf{p}_8\}$ , then a ball tree $T = \{L_0, L_1, L_2, L_3\}$ is stored after the permutation $\pi$ as + +![](images/79de4abb10edee18df9f8e9baec9f7f5e00744564f5d77f88c56f6a55557b96a.jpg) + +$$ +L _ {0} = \pi (P) \quad \mathbf {p} _ {a} \mathbf {p} _ {b} \mathbf {p} _ {c} \mathbf {p} _ {d} \mathbf {p} _ {e} \mathbf {p} _ {f} \mathbf {p} _ {g} \mathbf {p} _ {h} +$$ + +The contiguous storage property, combined with the fixed size of balls at each level, enables efficient implementation through tensor operations. Specifically, accessing any ball $B \in L_{i}$ simply requires selecting a contiguous sequence of $2^{i}$ indices. For instance, in the example above, for $i = 2$ , we select a:d and e:h to access the balls. Since the balls are equal in size, we can simply reshape $L_{0}$ to access any level. This representation makes it particularly efficient to implement our framework's core operations - ball attention and coarsening/refinement - which we will introduce next. + +Another important property of ball trees is that while they cover the whole point set, they are not required to partition the entire space. Coupled with completeness, it means that at each tree level, the nodes are essentially associated with the same scale. This contrasts with other structures such as octrees that cover the entire space and whose nodes at the same level can be associated with regions of different sizes: + +![](images/2d47957d675e8222bac3da06568c11296d8921c06906fdd606bfb5bcc45bc644.jpg) +Figure 2. Ball tree vs. octree construction. Colors highlight the difference in scales for nodes including the same number of points. + +![](images/24a21bef695dfd2c163834aa02b74d2c6c2ed0d7ae24a58e24530153f037eb67.jpg) + +# 4. Erwin Transformer + +Following the notation from the Background Section 3.2, we consider a point cloud $P = \{\mathbf{p}_1,\dots ,\mathbf{p}_n\} \subset \mathbb{R}^d$ . Additionally, each point is now endowed with a feature vector yielding a feature set $X = \{\mathbf{x}_1,\dots ,\mathbf{x}_n\} \subset \mathbb{R}^C$ . + +On top of the point cloud, we build a ball tree $T = \{L_0, \dots, L_m\}$ . We initialize $L_{\mathrm{leaf}} := L_0$ to denote the current finest level of the tree. As each leaf node contains a single point, it inherits its feature vector: + +$$ +X _ {\text {l e a f}} = \left\{\mathbf {x} _ {B} = \mathbf {x} _ {i} \mid B = \left\{\mathbf {p} _ {i} \right\} \in L _ {\text {l e a f}} \right\} \tag {5} +$$ + +# 4.1. Ball tree attention + +Ball attention For each ball attention operator, we specify a level $k$ of the ball tree where each ball $B \in L_k$ contains $2^k$ leaf nodes. The choice of $k$ presents a trade-off: larger balls capture longer-range dependencies, while smaller balls are more resource-efficient. For each ball $B \in L_k$ , we collect the leaf nodes within B: + +$$ +\operatorname {l e a v e s} _ {B} = \left\{B ^ {\prime} \in L _ {\text {l e a f}} \mid B ^ {\prime} \subset B \right\} \tag {6} +$$ + +along with their features from $X_{\mathrm{leaf}}$ + +$$ +X _ {B} = \left\{\mathbf {x} _ {B ^ {\prime}} \in X _ {\text {l e a f}} \mid B ^ {\prime} \in \text {l e a v e s} _ {B} \right\} \tag {7} +$$ + +We then compute self-attention independently on each ball2: + +$$ +X _ {B} ^ {\prime} = \operatorname {B A t t} \left(X _ {B}\right) := \operatorname {A t t} \left(X _ {B} \mathbf {W} _ {q}, X _ {B} \mathbf {W} _ {k}, X _ {B} \mathbf {W} _ {v}\right) \tag {8} +$$ + +where weights are shared between balls and the output $X_B'$ maintains row correspondence with $X_B$ . + +Computational cost As attention is computed independently for each ball $B \in L_k$ , the computational cost is reduced from quadratic to linear. Precisely, for ball attention, the complexity is $\mathcal{O}(|B|^2 \cdot \frac{n}{|B|})$ , i.e., quadratic in the ball size and linear in the number of balls: + +![](images/e40256f485c795114db677ec0ca0c2fec3e3700f071927a0a5ce61a992904b19.jpg) +Figure 4. For highlighted points, standard attention computes interactions with all other points in the point cloud, while ball attention only considers points within their balls. + +Positional encoding We introduce positional information to the attention layer in two ways. First, we augment the features of leaf nodes with their relative positions with respect to the ball's center of mass (relative position embedding): + +$$ +R P E: \quad X _ {B} = X _ {B} + \left(P _ {B} - \mathbf {c} _ {B}\right) \mathbf {W} _ {\text {p o s}} \tag {9} +$$ + +where $P_B$ contains positions of leaf nodes, $\mathbf{c}_B$ is the center of mass, and $\mathbf{W}_{\mathrm{pos}}$ is a learnable projection. This allows the layer to incorporate geometric structure within each ball. + +Second, we introduce a distance-based attention bias: + +$$ +\mathcal {B} _ {B} = - \sigma^ {2} \| \mathbf {c} _ {B ^ {\prime}} - \mathbf {c} _ {B ^ {\prime \prime}} \| _ {2}, \quad B ^ {\prime}, B ^ {\prime \prime} \in \text {l e a v e s} _ {B} \tag {10} +$$ + +with a learnable parameter $\sigma \in \mathbb{R}$ (Wessels et al., 2024). The term decays rapidly as the distance between two nodes increases, which enforces locality and helps to mitigate potential artifacts from the tree building, particularly in cases where distant points are grouped together. + +Cross-ball connection To increase the receptive field of our attention operator, we implement cross-ball connections inspired by the shifted window approach in Swin Transformer (Liu et al., 2021). There, patches are displaced diagonally by half their size to obtain two different image partitioning configurations. This operation can be equivalently interpreted as keeping the patches fixed while sliding the image itself. + +![](images/b9db3339caf28d7ff3e9aafdfcaf90e086d433c7fcbe28ca7cbe21be9800251f.jpg) + +![](images/43f8c32a7f240de39d8806d64ea8a31b783dacb33d958833db66a176e5c3f8a8.jpg) + +![](images/655a0b8009250a1d84bb2e24253a678b1ec546dc701b16b51d13b745b96bbe99.jpg) +refinement + +![](images/7469ea5c49d61b021fed6b8eb0b859798a8bb33801cecc126932853b70187fc4.jpg) +Figure 3. Overview of Erwin. Left: A sequence of two ball attention layers with intermediate tree coarsening. In every layer, attention is computed on partitions of size 16, which correspond to progressively higher levels of hierarchy. Center (top): Coarsening and refinement of a ball tree. Center (bottom): Building a tree on top of a rotated configuration for cross-ball interaction. Right: Architecture of Erwin. + +![](images/ce3e6c7a829a9cb4141793608ca090137d4e53eab30a857db3afa98c12715842.jpg) + +![](images/fa8d36926d3e61c8925d8a8545125d33a6c15e7032fed5aa86409168e717f4bc.jpg) +original balls + +![](images/15484016df337cecbc379903f7373aebb963b7a02f2fd82cf09224a4e8a04047.jpg) + +![](images/272df5087fe987988036d6511d6af6bb845a03b37c806452b11d56db2996f798.jpg) + +Following this interpretation, we rotate the point cloud and construct the second ball tree $T_{\mathrm{rot}} = \{L_0^{\mathrm{rot}}, \dots, L_m^{\mathrm{rot}}\}$ , which induces a permutation $\pi^{\mathrm{rot}}$ of leaf nodes (see Fig. 3, center). We can then compute ball attention on the rotated configuration by first permuting the features according to $\pi^{\mathrm{rot}}$ , applying attention, and then permuting back: + +$$ +X _ {B} ^ {\prime} = \pi_ {\mathrm {r o t}} ^ {- 1} \left(\operatorname {B A t t} \left(\pi_ {\mathrm {r o t}} \left(X _ {B}\right)\right)\right) \tag {11} +$$ + +By alternating between the original and rotated configurations in consecutive layers, we ensure the interaction between leaf nodes in otherwise separated balls. + +Tree coarsening/refinement For larger systems, we are interested in coarser representations to capture features at larger scales. The coarsening operation allows us to hierarchically aggregate information by pooling leaf nodes to the centers of containing balls at $l$ levels higher (see Fig. 3, top, $l = 1$ ). Suppose the leaf level is $k$ . For every ball $B \in L_{k + l}$ , we concatenate features of all interior leaf nodes along with their relative positions with respect to $\mathbf{c}_B$ and project them to a higher-dimensional representation: + +$$ +\mathbf {x} _ {B} = \left(\bigoplus_ {B ^ {\prime} \in \text {l e a v e s} _ {B}} \left[ \mathbf {x} _ {B ^ {\prime}}, \mathbf {c} _ {B ^ {\prime}} - \mathbf {c} _ {B} \right]\right) \mathbf {W} _ {c} \tag {12} +$$ + +where $\bigoplus$ denotes leaf-wise concatenation, and $\mathbf{W}_c\in$ $\mathbb{R}^{C^{\prime}\times 2^{l}(C + d)}$ is a learnable projection that increases the feature dimension to maintain expressivity. After coarsening, balls at level $k + l$ become the new leaf nodes, $L_{\mathrm{leaf}}\coloneqq L_{k + l}$ with features $X_{\mathrm{leaf}}\coloneqq \{\mathbf{x}_B\mid B\in L_{k + l}\}$ . To highlight the simplicity of our method, we provide the pseudocode: + +$$ +\begin{array}{l} \# \text {c o a r s e n i n g b a l l t r e e} \\ \mathbf {x} = \text {r e a r r a n g e} ([ \mathbf {x}, \text {r e l . p o s} ], \text {" (n 2 ^ {l}) d \to n (2 ^ {l} d)"}) @ W _ {c} \\ \text {p o s} = \text {r e d u c e} (\text {p o s}, \text {" (n 2 ^ {l}) d \to n d "}, \text {" m e a n "}) \end{array} +$$ + +The inverse operation, refinement, allocates information from a coarse representation back to finer scales. More precisely, for a ball $B \in L_{k}$ , its features are distributed back to the nodes at level $L_{k - l}$ contained within $B$ as: + +$$ +\left\{\mathbf {x} _ {B ^ {\prime}} \mid B ^ {\prime} \in L _ {k - l} \right\} = \left[ \mathbf {x} _ {B}, P _ {B} - \mathbf {c} _ {B} \right] \mathbf {W} _ {r} \tag {13} +$$ + +where $P_B$ contains positions of all nodes at level $k - l$ within ball $B$ with center of mass $\mathbf{c}_B$ , and $\mathbf{W}_r \in \mathbb{R}^{2^l C \times (C' + d)}$ is a learnable projection. After refinement, $L_{\mathrm{leaf}}$ and $X_{\mathrm{leaf}}$ are updated accordingly. In pseudocode: + +$$ +\begin{array}{l}\# \text {r e f i n i n g b a l l t r e e}\\\mathbf {x} = [ \text {r e a r r a n g e} (\mathbf {x}, \text {" n} (2 ^ {l} d) \rightarrow (n 2 ^ {l}) d") , \text {r e l . p o s} ] @ W _ {r}\end{array} +$$ + +# 4.2. Model architecture + +We are now ready to describe the details of the main model to which we refer as $Erwin^4$ (see Fig. 3) - a hierarchical transformer operating on ball trees. + +**Embedding** At the embedding phase, we first construct a ball tree on top of the input point cloud and pad the leaf layer to complete the tree, as described in Section 3.2. To capture local geometric features, we employ a small-scale MPNN, which is conceptually similar to PointTransformer's embedding module using sparse convolution. When input connectivity is not provided (e.g., mesh), we utilize the ball tree structure for a fast nearest neighbor search. + +![](images/fead934b15b5523d9ebb8dc63e84a62fe4144f596859cb731bea9c70f4abda60.jpg) +Figure 5. Left: Computational cost of Erwin. We split the total runtime into building a ball tree and running a model. The input is a batch of 16 point clouds, each of size $n$ . We fit a power law which indicates close to linear scaling. Right: Receptive field of MPNN vs Erwin, $n = 800$ . A node is in the receptive field if changing its features affects the target node's output. MPNN consists of 6 layers, each node connected to 16 nearest neighbours. + +ErwinBlock The core building block of Erwin follows a standard pre-norm transformer structure: LayerNorm followed by ball attention with a residual connection, and a SwiGLU feed-forward network (Shazeer, 2020). For the ball attention, the size $2^{k}$ of partitions is a hyperparameter. To ensure cross-ball interaction, we alternate between the original and rotated ball tree configurations, using an even number of blocks per ErwinLayer in our experiments. + +Overall architecture Following a UNet structure (Ronneberger et al., 2015; Wu et al., 2024b), Erwin processes features at multiple scales through encoder and decoder paths (Fig. 3, right). The encoder progressively coarsens the ball tree while increasing feature dimensionality to maintain expressivity. The coarsening factor is a hyperparameter that takes values that are powers of 2. At the decoder stage, the representation is refined back to the original resolution, with skip connections from corresponding encoder levels enabling multi-scale feature integration. + +# 5. Experiments + +The code is available at https://github.com/maxxxzdn/erwin. We summarize datasets in Table 1 and provide implementation details in Appendix B. + +Table 1. Summary of benchmark datasets. $\dagger$ indicates varying size, for which we report the average number of nodes. + +
GEOMETRYBENCHMARKS#DIM#NODES
POINT CLOUDELASTICITY2D972
COSMOLOGY3D5,000
MD†3D+TIME890
STRUCTUREDPLASTICITY2D+TIME3,131
AIRFOIL2D11,271
PIPE2D16,641
UNSTRUCTUREDSHAPE-NET CAR3D32,186
EAGLE†2D+TIME3,388
+ +![](images/9c3c9d8f7540bcd26d51df66ae5f9b361e10a0fb6cac6d69ef311f21a3b330a7.jpg) +Figure 6. Test mean-squared error (MSE) on the predicted velocities as a function of training set size for the cosmology task, 5 runs per point. Point transformers indicate favourable scaling surpassing graph-based models with sufficiently many training samples. + +Computational cost To experimentally evaluate Erwin's scaling, we learn the power-law $^5$ form Runtime $= C \cdot n^{\beta}$ by first applying the logarithm transform to both sides and then using the least squares method to evaluate $\beta$ . The result is an approximately linear scaling with $\beta = 1.054$ with $R^2 = 0.999$ , see Fig. 5. Ball tree construction accounts for $< 5\%$ of the overall time (see Tables 7,8), proving the efficiency of our method for linearizing attention for point clouds. + +Receptive field One of the theoretical properties of our model is that with sufficiently many layers, its receptive field is global. To verify this claim experimentally, for an arbitrary target node, we run the forward pass of Erwin and MPNN and compute gradients of the node output with respect to all input nodes' features. If the gradient is nonzero, the node is considered to be in the receptive field of the target node. The visualization is provided in Fig. 5, right, where we compare the receptive field of our model with that of MPNN. As expected, the MPNN has a limited receptive field, as it cannot exceed $N$ hops, where $N$ is the number of message-passing layers. Conversely, Erwin implicitly computes all-to-all interactions, enabling it to capture long-range interactions in the data. + +# 5.1. Cosmological simulations + +To demonstrate our model's ability to capture long-range interactions, we use the cosmology benchmark (Balla et al., 2024), which consists of large-scale point clouds representing potential galaxy distributions. + +Dataset The dataset is derived from N-body simulations that evolve dark matter particles from the early universe to the present time. After the simulation, gravitationally bound structures (halos) are identified, from which the 5,000 heaviest ones are selected as potential galaxy locations. The halos form local clusters through gravity while maintaining + +![](images/4b07a82b64b16869713aa24dd7411ef09fb5aa01bf072df633a0f788cf302c42.jpg) +Figure 7. Test negative log-likelihood (NLL) of the predicted acceleration distribution for the molecular dynamics task (averaged over 3 runs). The baseline MPNN is taken from (Fu et al., 2022). The size of the markers reflects the number of parameters. + +long-range correlations that originated from interactions in the early universe, reflecting the initial conditions. + +Task The input is a point cloud $\mathbf{X} \in \mathbb{R}^{5000 \times 3}$ , where each row corresponds to a galaxy and each column to $x, y, z$ coordinate respectively. The task is a regression problem to predict the velocity of every galaxy $\mathbf{Y} \in \mathbb{R}^{5000 \times 3}$ . We vary the size of the training dataset from 64 to 8,192, while the validation and test datasets have a fixed size of 512. The models are trained using the mean squared error between predicted and ground truth velocities. + +Results The results are shown in Fig. 6. We compare against multiple equivariant (NequIP (Batzner et al., 2021), SEGNN (Brandstetter et al., 2022)) and non-equivariant (MPNN (Gilmer et al., 2017), PTv3 (Wu et al., 2024b)) baselines. In the small data regime, graph-based equivariant models are preferable. However, as the training set size increases, their performance plateaus. We note that this is also the case for non-equivariant MPNNs, suggesting the issue might arise from failing to capture medium to large-scale interactions, where increased local expressivity has minimal impact. Conversely, transformer-based models scale favorably with training set size and eventually surpass graph-based models, highlighting their ability to capture both small and large-scale interactions. Our model demonstrates particularly strong performance and significantly outperforms other baselines for larger training sets. + +# 5.2. Molecular dynamics + +Molecular dynamics (MD) is essential for understanding physical and biological systems at the atomic level but remains computationally expensive even with neural network potentials due to all-atom force calculations and femtosecond timesteps required to maintain stability and accuracy. Fu et al. (2022) suggested accelerating MD simulation through coarse-grained dynamics with an MPNN. In this experiment, we take a different approach and instead oper + +Table 2. Ablation on the cosmology task. Increasing window size improves performance at the cost of slower runtime (Erwin-S). + +
BALL SIZE2561286432
TEST LOSS0.5950.6030.6120.620
RUNTIME, MS229.6165.2135.3126.0
+ +Table 3. Ablation study on architectural choices: using MPNN in embedding, RPE, and cross-ball connection via rotating trees. + +
MODELTEST LOSS
MDSHAPENET-CAR
W/O0.73830.39
+ MPNN0.72030.49
+ RPE0.71530.02
+ ROTATING TREE0.71215.85
+ +ate on the original representation but improve the runtime by employing our hardware-efficient model. Therefore, the question we ask is how much we can accelerate a simulation w.r.t. an MPNN without compromising the performance. + +Dataset The dataset consists of single-chain coarse-grained polymers (Webb et al., 2020; Fu et al., 2022) simulated using MD. Each system includes 4 types of coarse-grained beads interacting through bond, angle, dihedral, and non-bonded potentials. The training set consists of polymers with repeated bead patterns while the test set polymers are constructed by randomly sampling bead sequences, thus introducing a challenging distribution shift. The training set contains 100 short trajectories $(50\mathrm{k}\tau)$ , while the test set contains 40 trajectories that are 100 times longer. + +Task We follow the experimental setup from Fu et al. (2022). The model takes as input a polymer chain of $N$ coarse-grained beads. Each bead has a specific weight and is associated with the history $\{\dot{\mathbf{x}}_{t - 16\Delta t},\dots,\dot{\mathbf{x}}_{t - \Delta t}\}$ of (normalized) velocities from 16 previous timesteps at intervals of $\Delta t = 5\tau$ . The model predicts the mean $\mu_t\in \mathbb{R}^{N\times 3}$ and variance $\sigma_t^2\in \mathbb{R}_+^{N\times 3}$ of (normalized) acceleration for each bead, assuming a normal distribution. We train using the negative log-likelihood loss between predicted and ground truth accelerations computed from the ground truth trajectories. + +Results The results are given in Fig. 7. As baselines, we use MPNN (Gilmer et al., 2017) as well as two hardware-efficient architectures: PointNet++ (Qi et al., 2017) and PTv3 (Wu et al., 2024b). Notably, model choice has minimal impact on performance, potentially due to the absence of long-range interactions as the CG beads do not carry any charge. Furthermore, it is sufficient to only learn local bonded interactions. There is, however, a considerable improvement in runtime for Erwin (1.7-2.5 times depending on the size), which is only matched by a smaller MPNN or PointNet++, both having significantly higher test loss. + +Table 4. RMSE on PDE benchmarks from Li et al. (2023b). Transformer-based models are taken as baselines from Luo et al. (2025). + +
MODELRMSE
ELASTICITYPLASTICITYAIRFOILPIPE
LNO (2024)0.690.290.530.31
GALERKIN (2021)2.401.201.180.98
HT-NET (2022)/3.330.650.59
OFORMER (2023C)1.830.171.831.68
GNOT (2023)0.863.360.760.47
FACTFORMER (2023D)/3.120.710.60
ONO (2024)1.180.480.610.52
TRANSOLVER++ (2025)0.520.110.480.27
ERWIN (OURS)0.340.102.570.61
+ +Table 5. Test MSE for ShapeNet-Car pressure prediction. Baseline results are taken from Bleeker et al. (2025). + +
MODELMSE
POINTNET (2017)43.36
GINO (2023B)35.24
UPT (2024A)31.66
TRANSOLVER (2024A)19.88
GP-UPT (2025)17.02
PTv3-S (2024B)19.09 ± 0.67
PTv3-M (2024B)17.42 ± 0.38
ERWIN-S (OURS)15.85 ± 0.19
ERWIN-M (OURS)15.43 ± 0.45
+ +# 5.3. PDE benchmarks and airflow pressure + +Deep learning models have emerged as surrogate solvers of partial differential equations (PDEs), learning to approximate solutions from data (Li et al., 2021; Wu et al., 2024a). While their advantages over traditional numerical methods remain unclear (McGreivy & Hakim, 2024), the task itself serves as a surrogate for large-scale applications like weather forecasting (Price et al., 2025) and fluid dynamics (Bleeker et al., 2025), where conventional solvers become computationally prohibitive. Furthermore, in this task, we are interested in the model's ability to scale to large domains while capturing complex patterns in underlying physics. + +Dataset We benchmark on multiple datasets taken from Li et al. (2023a). Each dataset is defined either on point cloud (Elasticity) or structured mesh (Plasticity, Airfoil, Pipe). Additionally, we evaluate our model on airflow pressure modeling (Umetani & Bickel, 2018; Alkin et al., 2024a). It consists of 889 car models, each car represented by 3,586 surface points in 3D space. Airflow was simulated around each car for 10s ( $Re = 5 \times 10^6$ ) and averaged over the last 4 s to obtain pressure values at each point. + +Task For the PDE benchmarks, we follow the pipeline from Wu et al. (2024a) and minimize the relative L2 error; see Appendix B for details. For ShapeNet-Car, the task is to estimate the surface pressure $\mathbf{Y} \in \mathbb{R}^{3388 \times 1}$ given surface points $\mathbf{X} \in \mathbb{R}^{3388 \times 3}$ . We train by optimizing the mean squared error between predicted and ground truth pressure. + +PDE benchmarks The results are given in Table 4, where we compare against other transformer-based methods. Erwin achieves state-of-the-art performance on 2 out of 4 tasks. Interestingly, it dramatically underperforms on the Airfoil task, which indicates a failure mode. We speculate that this is related to a specific structure of the data - the density of the mesh decreases dramatically moving away from the center of mass. This means that points across different balls have considerably varying density, which poses a challenge. + +ShapeNet-Car See Table 5 for results. Both Erwin and PTv3 achieve significantly lower test MSE compared to other models6. We note that the best performing configuration of Erwin and PTv3 did not include any coarsening, thus operating directly on the original point cloud. This indicates that the task favors the ability of a model to capture fine geometric details. In comparison, other approaches introduce information loss through compression - UPT (Alkin et al., 2024a) and Transolver (Wu et al., 2024a) involve pooling to the latent space, while GINO (Li et al., 2023b) interpolates the geometry onto regular grids and back. + +# 5.4. Turbulent fluid dynamics + +In the last experiment, we demonstrate the expressivity of our model by simulating turbulent fluid dynamics. The problem is notoriously challenging due to multiple factors: the inherently nonlinear behavior of fluids, the multiscale and chaotic nature of turbulence, and the presence of long-range dependencies. Moreover, the geometry of the simulation domain and the presence of objects introduce complex boundary conditions, thus adding another layer of complexity. + +Dataset We use EAGLE (Janny et al., 2023), a large-scale benchmark of unsteady fluid dynamics. Each simulation includes a flow source (drone) that moves in 2D environments with different boundary geometries, producing airflow. The time evolution of velocity and pressure fields is recorded along with dynamically adapting meshes. The dataset contains 600 different geometries of 3 types, with approximately 1.1 million 2D meshes averaging 3,388 nodes each. The total dataset includes 1,184 simulations with 990 time steps per simulation. The dataset is split with $80\%$ for training and $10\%$ each for validation and testing. + +Task We follow the original experimental setup of the benchmark. The input is the velocity $V \in \mathbb{R}^{N \times 2}$ and pres + +![](images/284a354cdba71a0ec9496179466e46230882f92976f4a4ea14765c1cad1be985.jpg) +Figure 8. The norm of the velocity field at different steps of the rollout trajectories. + +sure $P \in \mathbb{R}^{N \times 2}$ fields evaluated at every node of the mesh at time step $t$ , along with the type of the node. The task is to predict the state of the system at the next time step $t + 1$ . The training is done by predicting a trajectory of states of length 5 and optimizing the loss + +$$ +\mathcal {L} = \sum_ {i = 1} ^ {5} \left(\mathrm {M S E} \left(V _ {t + i}, \hat {V} _ {t + i}\right) + \alpha \mathrm {M S E} \left(P _ {t + i}, \hat {P} _ {t + i}\right)\right), +$$ + +where $\alpha = 0.1$ is the parameter that balances the importance of the pressure field over the velocity field. + +Results For comparison, we include the baselines from the original benchmark: MeshGraphNet (MGN; Pfaff et al., 2021), GAT (Velickovic et al., 2018), DilResNet (DRN; Stachenfeld et al., 2021) and EAGLE (Janny et al., 2023). The first two baselines are based on message-passing, while DilResNet operates on regular grids, hence employing interpolation for non-uniform meshes. EAGLE uses message-passing to pool the mesh to a coarser representation with a fixed number of clusters, on which attention is then computed. The quantitative results are given in Table 6 and unrolling trajectories are shown in Fig. 8, 9. Erwin demonstrates strong results on the benchmark and outperforms every baseline, performing especially well at predicting pressure. In terms of inference time and memory consumption, Erwin achieves substantial gains over EAGLE, being 3 times faster and using 8 times less memory. + +# 5.5. Ablation study + +We also conducted an ablation study to examine the effect of increasing ball sizes on the model's performance in the cosmology experiment; see Table 2. Given the presence of long-range interactions in the data, larger window sizes (and thus receptive fields) improve model performance, albeit at the cost of increased computational runtime. Our architectural ablation study on the MD task (Table 3) reveals that using an MPNN at the embedding step produces substantial + +Table 6. RMSE on velocity V and pressure P fields across different prediction horizons (mean ± std over 5 runs). Inference runtime and memory use are computed for a batch of 8, avg. 3,500 nodes. + +
HORIZON +1+50TIME (MS)MEM. (GB)
FIELD / UNITVPVP
MGN0.0810.430.5922.25400.7
GAT0.17064.60.855163440.5
DRN0.2511.450.5372.46420.2
EAGLE0.0530.460.3491.44301.5
ERWIN0.0440.310.2811.15110.2
(Ours)±0.001±0.01±0.001±0.06
+ +improvements, likely due to its effectiveness in learning local interactions. At the same time, that did not generalize to ShapeNet-Car, where the most decisive factor was including cross-ball interactions, highlighting the importance of capturing fine-grained details in this task. + +# 6. Conclusion + +We present Erwin, a hierarchical transformer that uses ball tree partitioning to process large-scale physical systems with linear complexity. Erwin achieves state-of-the-art performance in cosmology, turbulent fluid dynamics, and, partially, on standard PDE benchmarks, demonstrating its effectiveness across diverse physical domains. The efficiency of Erwin makes it a suitable candidate for tasks that require modeling large particle systems, such as computational chemistry (Fu et al., 2024) or diffusion-based molecular dynamics (Jing et al., 2024). + +Limitations and Future Work Because Erwin relies on perfect binary trees, we need to pad the input set with virtual nodes, which induces computational overhead for ball attention computed over non-coarsened trees (first ErwinBlock). This issue can be circumvented by employing learnable pooling to the next level of the ball tree, which is always full, ensuring the remaining tree is perfect. Whether we can perform such pooling without sacrificing expressivity is a question that we leave to future research. + +Erwin relies on cross-ball interaction and coarsening to capture long-range interactions. Both mechanisms have inherent limitations: the former requires multiple steps for signals to propagate between balls, while the latter sacrifices fine-grained detail. A promising approach to address these issues is adapting sparse attention methods such as Native Sparse Attention (Yuan et al., 2025). This framework aligns naturally with Erwin's ball tree structure and would enable learning distant interactions while preserving full resolution. Finally, Erwin is neither permutation nor rotation equivariant, although rotation equivariance can be incorporated without compromising scalability, such as via Geometric Algebra Transformers (Brehmer et al., 2023) or Fast Euclidean Attention (Frank et al., 2024). + +# Acknowledgements + +We are grateful to Evgenii Egorov and Ana Lučić for their feedback and inspiration. MZ acknowledges support from Microsoft Research AI4Science. JWvdM acknowledges support from the European Union Horizon Framework Programme (Grant agreement ID: 101120237). + +# Impact statement + +The broader implications of our work are primarily in moderate- to large-scale scientific applications, such as molecular dynamics or computational fluid dynamics. We believe that efficient and expressive architectures like Erwin could become a foundation for resource-intensive deep learning frameworks and therefore help in better understanding the physical systems governing our world. + +# References + +Alkin, B., Fürst, A., Schmid, S., Gruber, L., Holzleitner, M., and Brandstetter, J. Universal physics transformers: A framework for efficiently scaling neural operators. In Conference on Neural Information Processing Systems (NeurIPS), 2024a. +Alkin, B., Kronlachner, T., Papa, S., Pirker, S., Lichtenegger, T., and Brandstetter, J. Neuraldem - real-time simulation of industrial particulate flows. arXiv preprint arXiv:2411.09678, 2024b. +Arts, M., Satorras, V., Huang, C.-W., Zuegner, D., Federici, M., Clementi, C., Noé, F., Pinsler, R., and Berg, R. Two for one: Diffusion models and force fields for coarse-grained molecular dynamics. Journal of chemical theory and computation, 19, 09 2023. doi: 10.1021/acs.jctc.3c00702. +Ball, J., Mishra-Sharma, S., Cuesta-Lázaro, C., Jaakkola, T. S., and Smidt, T. E. A cosmic-scale benchmark for symmetry-preserving data processing. arXiv preprint arXiv:2410.20516, 2024. +Barnes, J. and Hut, P. A hierarchical O(N log N) force-calculation algorithm. Nature, 324(6096):446-449, 1986. doi: 10.1038/324446a0. +Batzner, S. L., Musaelian, A., Sun, L., Geiger, M., Mailoa, J. P., Kornbluth, M., Molinari, N., Smidt, T. E., and Kozinsky, B. E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nature Communications, 13, 2021. +Bleeker, M., Dorfer, M., Kronlachner, T., Sonnleitner, R., Alkin, B., and Brandstetter, J. Neuralcdf: Deep learning on high-fidelity automotive aerodynamics simulations. CoRR, abs/2502.09692, 2025. + +Bodnar, C., Bruinsma, W. P., Lucic, A., Stanley, M., Brandstetter, J., Garvan, P., Riechert, M., Weyn, J., Dong, H., Vaughan, A., Gupta, J. K., Tambiratnam, K., Archibald, A., Heider, E., Welling, M., Turner, R. E., and Perdikaris, P. Aurora: A foundation model of the atmosphere. arXiv preprint arXiv:2405.13063, 2024. +Brandstetter, J., Hesselink, R., van der Pol, E., Bekkers, E. J., and Welling, M. Geometric and physical quantities improve E(3) equivariant message passing. In International Conference on Learning Representations (ICLR), 2022. +Brehmer, J., de Haan, P., Behrends, S., and Cohen, T. S. Geometric algebra transformer. In Conference on Neural Information Processing Systems (NeurIPS), 2023. +Cao, S. Choose a transformer: Fourier or galerkin. In Conference on Neural Information Processing Systems (NeurIPS), 2021. +Cao, Y., Chai, M., Li, M., and Jiang, C. Efficient learning of mesh-based physical simulation with bi-stride multi-scale graph neural network. In International Conference on Machine Learning (ICML), 2023. +Carrier, J., Greengard, L., and Rokhlin, V. A fast adaptive multipole algorithm for particle simulations. SIAM Journal on Scientific and Statistical Computing, 9(4):669-686, 1988. doi: 10.1137/0909044. +Cohen, T. and Welling, M. Group equivariant convolutional networks. In International Conference on Machine Learning (ICML), 2016. +Dao, T. Flashattention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations (ICLR), 2024. +Frank, J. T., Chmiela, S., Müller, K., and Unke, O. T. Euclidean fast attention: Machine learning global atomic representations at linear cost. CoRR, abs/2412.08541, 2024. +Fu, X., Xie, T., Rebello, N. J., Olsen, B. D., and Jaakkola, T. Simulate time-integrated coarse-grained molecular dynamics with multi-scale graph networks. Trans. Mach. Learn. Res., 2023, 2022. +Fu, X., Xie, T., Rosen, A. S., Jaakkola, T. S., and Smith, J. Mofdiff: Coarse-grained diffusion for metal-organic framework design. In International Conference on Learning Representations (ICLR), 2024. +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 (ICML), 2017. + +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 International Conference on Machine Learning (ICML), 2023. +Hockney, R. and Eastwood, J. Computer Simulation Using Particles. CRC Press, 2021. ISBN 9781439822050. URL https://books.google.nl/books?id=nTOFkmnCQuIC. +Janny, S., Béneteau, A., Nadri, M., Digne, J., Thome, N., and Wolf, C. EAGLE: large-scale learning of turbulent fluid dynamics with mesh transformers. In International Conference on Learning Representations (ICLR), 2023. +Jing, B., Stärk, H., Jaakkola, T. S., and Berger, B. Generative modeling of molecular dynamics trajectories. arXiv preprint arXiv:2409.17808, 2024. +Kang, Y., Tran, G., and Sterck, H. D. Fast multipole attention: A divide-and-conquer attention mechanism for long sequences. arXiv preprint arXiv:2310.11960, 2023. +Kovács, D. P., Moore, J. H., Browning, N. J., Batatia, I., Horton, J. T., Kapil, V., Witt, W. C., Magdau, I.-B., Cole, D. J., and Csányi, G. Mace-off23: Transferable machine learning force fields for organic molecules, 2023. +Lam, R., Sanchez-Gonzalez, A., Willson, M., Wirnsberger, P., Fortunato, M., Alet, F., Ravuri, S., Ewalds, T., Eaton-Rosen, Z., Hu, W., Merose, A., Hoyer, S., Holland, G., Vinyals, O., Stott, J., Pritzel, A., Mohamed, S., and Battaglia, P. Learning skillful medium-range global weather forecasting. Science, 382(6677):1416-1421, 2023. +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 International Conference on Learning Representations (ICLR), 2021. +Li, Z., Huang, D. Z., Liu, B., and Anandkumar, A. Fourier neural operator with learned deformations for pdes on general geometries. JMLR, 24:388:1-388:26, 2023a. +Li, Z., Kovachki, N. B., Choy, C. B., Li, B., Kossaifi, J., Otta, S. P., Nabian, M. A., Stadler, M., Hundt, C., Azizzadenesheli, K., and Anandkumar, A. Geometry-informed neural operator for large-scale 3d pdes. In Conference on Neural Information Processing Systems (NeurIPS), 2023b. +Li, Z., Meidani, K., and Farimani, A. B. Transformer for partial differential equations' operator learning. Trans. Mach. Learn. Res., 2023c. + +Li, Z., Shu, D., and Farimani, A. B. Scalable transformer for PDE surrogate modeling. In Conference on Neural Information Processing Systems (NeurIPS), 2023d. +Liu, X., Xu, B., and Zhang, L. Ht-net: Hierarchical transformer based operator learning model for multiscale pdes. CoRR, abs/2210.10890, 2022. +Liu, Z., Lin, Y., Cao, Y., Hu, H., Wei, Y., Zhang, Z., Lin, S., and Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In International Conference on Computer Vision (ICCV), 2021. +Liu, Z., Yang, X., Tang, H., Yang, S., and Han, S. Flatformer: Flattened window attention for efficient point cloud transformer. In Conference on Computer Vision and Pattern Recognition (CVPR), 2023. +Loshchilov, I. and Hutter, F. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR), 2019. +Luo, H., Wu, H., Zhou, H., Xing, L., Di, Y., Wang, J., and Long, M. Transolver++: An accurate neural solver for pdes on million-scale geometries. CoRR, abs/2502.02414, 2025. +Majumdar, S., Sun, J., Golding, B., Joe, P., Dudhia, J., Caumont, O., Gouda, K. C., Steinle, P., Vincendon, B., Wang, J., and Yussouf, N. Multiscale forecasting of high-impact weather: Current status and future challenges. Bulletin of the American Meteorological Society, 102: 1-65, 10 2020. doi: 10.1175/BAMS-D-20-0111.1. +McGreavy, N. and Hakim, A. Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations. Nature Machine Intelligence, 6(10), 2024. +Moskalev, A., Prakash, M., Xu, J., Cui, T., Liao, R., and Mansi, T. Geometric hyena networks for large-scale equivariant learning. In International Conference on Machine Learning (ICML), 2025. +Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., VanderPlas, J., Passos, A., Cournaepau, D., Brucher, M., Perrot, M., and Duchesnay, E. Scikit-learn: Machine learning in python. arXiv preprint arXiv:1201.0490, 2012. +Pfaff, T., Fortunato, M., Sanchez-Gonzalez, A., and Battaglia, P. W. Learning mesh-based simulation with graph networks. In International Conference on Learning Representations (ICLR), 2021. +Pfalzner, S. and Gibbon, P. Many-Body Tree Methods in Physics. Cambridge University Press, 1996. + +Price, I., Sanchez-Gonzalez, A., Alet, F., Andersson, T. R., El-Kadi, A., Masters, D., Ewalds, T., Stott, J., Mohamed, S., Battaglia, P. W., Lam, R. R., and Willson, M. Probabilistic weather forecasting with machine learning. Nature, 637(8044):84-90, 2025. +Qi, C. R., Yi, L., Su, H., and Guibas, L. J. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Conference on Neural Information Processing Systems (NeurIPS), 2017. +Rogozhnikov, A. Einops: Clear and reliable tensor manipulations with einstein-like notation. In International Conference on Learning Representations (ICLR), 2022. +Ronneberger, O., Fischer, P., and Brox, T. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI), 2015. +Shazeer, N. GLU variants improve transformer. arXiv preprint arXiv:2002.05202, 2020. +Stachenfeld, K. L., Fielding, D. B., Kochkov, D., Cranmer, M. D., Pfaff, T., Godwin, J., Cui, C., Ho, S., Battaglia, P. W., and Sanchez-Gonzalez, A. Learned coarse models for efficient turbulence simulation. arXiv preprint arXiv:2112.15275, 2021. +Sun, P., Tan, M., Wang, W., Liu, C., Xia, F., Leng, Z., and Anguelov, D. Swformer: Sparse window transformer for 3d object detection in point clouds. In European Conference on Computer Vision (ECCV), 2022. +Umetani, N. and Bickel, B. Learning three-dimensional flow for interactive aerodynamic design. ACM Trans. Graph., 37(4):89, 2018. URL https://doi.org/10.1145/3197517.3201325. +Valencia, M. L., Pfaff, T., and Thuerey, N. Learning distributions of complex fluid simulations with diffusion graph networks. In International Conference on Learning Representations (ICLR), 2025. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In Conference on Neural Information Processing Systems (NeurIPS), pp. 5998-6008, 2017. +Velickovic, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., and Bengio, Y. Graph attention networks. In International Conference on Learning Representations (ICLR), 2018. +Wang, P.-S. Octformer: Octree-based transformers for 3D point clouds. ACM Transactions on Graphics (SIGGRAPH), 42(4), 2023. + +Wang, T. and Wang, C. Latent neural operator for solving forward and inverse PDE problems. In Conference on Neural Information Processing Systems (NeurIPS), 2024. +Watson, J. L., Juergens, D., Bennett, N. R., Trippe, B. L., Yim, J., Eisenach, H. E., Ahern, W., Borst, A. J., Ragotte, R. J., Milles, L. F., Wicky, B. I. M., Hanikel, N., Pellock, S. J., Courbet, A., Sheffler, W., Wang, J., Venkatesh, P., Sappington, I., Torres, S. V., Lauko, A., Bortoli, V. D., Mathieu, E., Ovchinnikov, S., Barzilay, R., Jaakkola, T., DiMaio, F., Baek, M., and Baker, D. De novo design of protein structure and function with rfdiffusion. Nature, 620:1089 - 1100, 2023. +Webb, M., Jackson, N., Gil, P., and de Pablo, J. Targeted sequence design within the coarse-grained polymer genome. Science Advances, 6:eabc6216, 10 2020. doi: 10.1126/sciadv.abc6216. +Wessels, D. R., Knigge, D. M., Papa, S., Valperga, R., Vadgama, S. P., Gavves, E., and Bekkers, E. J. Grounding continuous representations in geometry: Equivariant neural fields. arXiv preprint arXiv:2406.05753, 2024. +Wu, H., Luo, H., Wang, H., Wang, J., and Long, M. Transolver: A fast transformer solver for pdes on general geometries. In International Conference on Machine Learning (ICML), 2024a. +Wu, X., Jiang, L., Wang, P., Liu, Z., Liu, X., Qiao, Y., Ouyang, W., He, T., and Zhao, H. Point transformer V3: simpler, faster, stronger. In Conference on Computer Vision and Pattern Recognition(CVPR), 2024b. +Xiao, Z., Hao, Z., Lin, B., Deng, Z., and Su, H. Improved operator learning by orthogonal attention. In International Conference on Machine Learning (ICML), 2024. +Yuan, J., Gao, H., Dai, D., Luo, J., Zhao, L., Zhang, Z., Xie, Z., Wei, Y. X., Wang, L., Xiao, Z., Wang, Y., Ruan, C., Zhang, M., Liang, W., and Zeng, W. Native sparse attention: Hardware-aligned and natively trainable sparse attention, 2025. +Zhang, T., Yuan, H., Qi, L., Zhang, J., Zhou, Q., Ji, S., Yan, S., and Li, X. Point cloud mamba: Point cloud learning via state space model. In Association for the Advancement of Artificial Intelligence, AAAI, 2025. +Zhu, Z. and Soricut, R. H-transformer-1d: Fast one-dimensional hierarchical attention for sequences. In Conference on Neural Information Processing Systems (NeurIPS), pp. 3801-3815. Association for Computational Linguistics, 2021. + +Algorithm 1 BUILDBALLTREE +return $B$ +input Array of data points $D$ in $\mathbb{R}^d$ +output Ball tree node $B$ +if $|D| = 1$ then Create leaf node $B$ containing single point in $D$ return $B$ +end if +# Find dimension of greatest spread $\delta \gets \mathrm{argmax}_{i\in 1,\dots,d}(\max_{x\in D}x_i - \min_{x\in D}x_i)$ +# Find the median point along $\delta$ $p\gets$ median $\{x_{\delta}\mid x\in D\}$ +# Points left of median along $\delta$ $L\gets \{x\in D\mid x_{\delta}\leq p_{\delta}\}$ +# Points right of median along $\delta$ $R\gets \{x\in D\mid x_{\delta} > p_{\delta}\}$ +# Recursively construct children + $B.\mathrm{child}_1\gets \mathrm{BUILDBALLTREE}(L)$ $B.\mathrm{child}_2\gets \mathrm{BUILDBALLTREE}(R)$ + +# A. Implementation details + +Ball tree construction The algorithm used for constructing ball trees (Pedregosa et al., 2012) can be found in Alg. 1. Note that this implementation is not rotationally equivariant as it relies on choosing the dimension of the greatest spread, which in turn depends on the original orientation. Examples of ball trees built in our experiments are shown in Fig. 9. + +MPNN in the embedding Erwin employs a small-scale MPNN in the embedding. More precisely, given a graph $G = (V,E)$ with nodes $v_{i} \in V$ and edges $e_{ij} \in E$ , we compute multiple layers of message-passing as proposed in (Gilmer et al., 2017): + +$$ +\mathbf {m} _ {i j} = \mathrm {M L P} _ {e} (\mathbf {h} _ {i}, \mathbf {h} _ {j}, \mathbf {p} _ {i} - \mathbf {p} _ {j}), \qquad \mathrm {m e s s a g e} +$$ + +$$ +\mathbf {m} _ {i} = \sum_ {j \in \mathcal {N} (i)} \mathbf {m} _ {i j}, \quad \text {a g g r e g a t e} \tag {14} +$$ + +$$ +\mathbf {h} _ {i} = \operatorname {M L P} _ {h} \left(\mathbf {h} _ {i}, \mathbf {m} _ {i}\right), \quad \text {u p d a t e} +$$ + +where $\mathbf{h}_i\in \mathbb{R}^H$ is a feature vector of $v_{i}$ , and $\mathcal{N}(i)$ denotes the neighborhood of $v_{i}$ . The motivation for using an MPNN is to incorporate local neighborhood information into the model. Theoretically, attention should be able to capture this information as well; however, this might require substantially increasing the feature dimension and the number of attention heads, which would be prohibitively expensive for a large number of nodes in the original level of a + +ball tree. In our experiments, we consistently maintain the size of $\mathrm{MLP}_e$ and $\mathrm{MLP}_h$ to be small ( $H \leq 32$ ) such that embedding accounts for less than $5\%$ of total runtime. + +# B. Experimental details + +In this section, we provide comprehensive experimental details regarding hardware specifications, hyperparameter choices, and optimization procedures. + +# B.1. Hardware and Software + +All experiments were conducted on a single NVIDIA RTX A6000 GPU with 48GB memory and 16 AMD EPYCTM 7543 CPUs. Erwin and all baselines except those for cosmology were implemented in PyTorch 2.6. For the cosmology benchmark, SEGNN, NequIP, and MPNN baselines were implemented in JAX as provided by the original benchmark repository. Training times for Erwin varied by task: cosmology (5-10 minutes depending on training set size), molecular dynamics (2-4 hours depending on model size), PDE benchmarks (8 hours for Elasticity, 48 hours for others), ShapeNet-Car (2 hours), and EAGLE (48 hours). + +# B.2. Training Details + +All models were trained using the AdamW optimizer (Loshchilov & Hutter, 2019) with weight decay $10^{-5}$ . The learning rate was tuned in the range $10^{-4}$ to $10^{-3}$ to minimize loss on the respective validation sets with cosine decay to $10^{-7}$ . Gradient clipping by norm with value 1.0 was applied across all experiments. Early stopping was used only for ShapeNet-Car and molecular dynamics tasks, while all other models were trained until convergence. In every experiment, we normalize inputs to the model. Hyperparameter optimization was performed using grid search with single trials. + +# B.3. Dataset Splits and Evaluation + +Dataset splits followed the original benchmarks: + +- Cosmology: Training set varied from 64 to 8192 examples, with validation and test sets of 512 examples each +- Molecular Dynamics: 100 short trajectories for training, 40 long trajectories for testing +- PDE Benchmarks: 1000 training / 200 test examples (except Plasticity: 900/80) +- ShapeNet-Car: 700 training / 189 test examples +EAGLE: 1184 trajectories with $80\% / 10\% / 10\%$ split + +For statistical significance, we ran each experiment 5 times and report mean and standard deviation for cosmology, molecular dynamics, ShapeNet-Car, and EAGLE. PDE experiments were run once due to computational constraints. + +![](images/20536105a6b853f8a0704a425e338cdf276608ea05a5c786f958c05a00df8f49.jpg) +ball size 512 + +![](images/03387689da8655823379e07328b5446191c49036ef854fa2e90c64615b097761.jpg) +ball size 256 + +![](images/cfc8dd046a797b3f0948ff7ddd9d00f105b7e0ecef7c9cf83e1861d9e32b2417.jpg) +ball size 128 + +![](images/fef12247da37105e83f34918a31207f2f56d9418bf58deef3a1cc319bf2f57ae.jpg) + +![](images/4e57c91b2fdd2121a79b00acaa95da4198b7ebdd0b4ee01bf6ac8ae5270add0a.jpg) + +![](images/0888196ba22a0774df545a818fde5555e09155e99a79d07226165dcc25f754c0.jpg) + +![](images/f9e9b98276123720cc3fc3719aed0ecbdae3594cc7983c88e20e0014d8b4158b.jpg) +Figure 9. Examples of ball trees built on top of data. Partitions at different levels of ball trees are shown. Top: A polypeptide from the molecular dynamics task. Center: A domain from the EAGLE dataset. Bottom: A car surface from the ShapeNet-Car dataset. + +![](images/13628103ad025bf781c53324e53cdf531b3e016c90892c2dc79de22546ff2bd2.jpg) + +![](images/df16ed40f23a3651c3c3a43faad40eb24e6a0ab24ad4c3da8a26043ce28f7144.jpg) + +# B.4. Evaluation Metrics + +For RMSE computation, we use the relative L2 error: $\mathrm{RMSE} := \| f(x) - y\| / \| y\|$ . For molecular dynamics, we randomly sample 16 history points from each trajectory and predict one future point. Acceleration is predicted by the neural network based on history and compared against ground truth computed using forward differences. Model performance is evaluated using negative log-likelihood loss between predicted and ground truth accelerations. + +# B.5. Baseline Implementations + +All baseline results were taken from official implementations or reported values: + +- Cosmology: Official JAX implementation (Ball et al., 2024), code from https://github.com/smsharma/eqnn-jax +- ShapeNet-Car: Results from Bleeker et al. (2025), code from https://github.com/ml-jku/UPT +- PDE Benchmarks: Results from Luo et al. (2025), https://github.com/thuml/Transolver +- EAGLE: Original implementation (Janny et al., 2023), https://github.com/eagle-dataset/EagleMeshTransformer +- Molecular Dynamics: MPNN and PointNet++ implemented by us, other models taken from official codebases. +- PTv3: https://github.com/Pointcept/PointTransformerV3 + +# B.6. Computational Efficiency + +Table 7 shows the inference time breakdown for Erwin on NVIDIA RTX A6000 with batch size 16. Ball tree construction (Table 8) consistently accounts for less than $5\%$ of total runtime, demonstrating the efficiency of our optimized implementation compared to standard libraries. + +Table 7. Erwin runtime with torch.compile + +
NODES PER BATCHRUNTIME (MS)
16 ×20484096819216384
FWD17.331.679.7189
FWD + BWD26.445.4114232
+ +Table 8. Ball tree construction on 16 AMD EPYCTM 7543 CPUs. + +
NODES PER BATCH, +16 ×RUNTIME (MS)
20484096819216384
SKLEARN + JOBLIB16.321.224.144.0
Ours0.731.543.266.98
SPEED-UP22.3×13.8×7.4×6.3×
+ +# B.7. Further details per experiment + +Cosmological simulations We follow the experimental setup of the benchmark. The training was done for 5,000 epochs with batch size 16 for point transformers and batch size 8 for message-passing-based models. The implementation of SEGNN, NequIP, and MPNN was done in JAX and + +taken from the original benchmark repository (Balla et al., 2024). We maintained the hyperparameters of the baselines used in the benchmark. For Erwin and PTv3, the hyperparameters are provided in Table 9. In Erwin's embedding, we conditioned messages on Bessel basis functions rather than the relative position, which significantly improved overall performance. + +Molecular dynamics All models were trained with batch size 32 for 50,000 training iterations with an initial learning rate of $5 \cdot 10^{-4}$ . We fine-tuned the hyperparameters of every model on the validation dataset (reported in Table 11). + +PDE benchmarks The baseline results and experimental setups are taken from Luo et al. (2025). We adjusted batch size, ball size, and the number of attention heads per block for the best performance. The hidden dimensionality of Erwin was adjusted such that the overall number of parameters is around $10^{6}$ , which is comparable with other baselines. Constrained by the parameter size, the same configuration worked the best; see Table 12 for details. + +Airflow pressure modeling We take the results of baseline models from Bleeker et al. (2025). Both Erwin and PTv3 were trained with batch size 32 for 1,000 epochs, and their hyperparameters are given in Table 10. We tuned the number of blocks, the number of message-passing steps, hidden dimensionality, and ball size per block for the best performance. When experimenting with pooling, we found that not involving any coarsening significantly improves model performance; hence, we used stride 1 in each block. + +Turbulent fluid dynamics Baseline results are taken from (Janny et al., 2023), except for runtime and peak memory usage, which we measured ourselves. Erwin was trained with batch size 12 for 4,000 epochs. We tuned hidden dimensionality and ball size per block for the lowest validation loss. + +Table 9. Model architectures for the cosmological simulations task. For varying sizes of Erwin, the values are given as (S/M). + +
ModelParameterValue
PTv3Grid size0.01
Enc. depths(2, 2, 6, 2)
Enc. channels(32, 64, 128, 256)
Enc. heads(2, 4, 8, 16)
Enc. patch size64
Dec. depths(2, 2, 2)
Dec. channels(64, 64, 128)
Dec. heads(2, 4, 8)
Dec. patch size64
Pooling(2, 2, 2)
ErwinMPNN dim.32
Channels32-512/64-1024
Window size64
Enc. heads(2, 4, 8, 16)
Enc. depths(2, 2, 6, 2)
Dec. heads(2, 4, 8)
Dec. depths(2, 2, 2)
Pooling(2, 2, 2, 1)
+ +Table 11. Model architectures for the molecular dynamics task. For models of varying sizes, the values are given as (S/M/L). + +
ModelParameterValue
MPNNHidden dim.48/64/128
MP steps6
MLP layers2
Message agg-nmean
PointNet++Hidden dim.64/128/196
MLP layers2
PTv3Grid size0.025
Enc. depths(2, 2, 2, 6, 2)
Enc. channels16-192/24-384/64-1024
Enc. heads(2, 4, 8, 16, 32)
Enc. patch size128
Dec. depths(2, 2, 2, 2)
Dec. channels16-96/48-192/64-512
Dec. heads(4, 4, 8, 16)
Dec. patch size128
ErwinMPNN dim.16/16/32
Channels(16-256/32-512/64-1024)
Window size128
Enc. heads(2, 4, 8, 16, 32)
Enc. depths(2, 2, 2, 6, 2)
Dec. heads(4, 4, 8, 16)
Dec. depths(2, 2, 2, 2)
Pooling(2, 2, 2, 2, 1)
+ +Table 10. Model architectures for the airflow pressure task. + +
ModelParameterValue
PTv3Grid size0.01
Enc. depths(2, 2, 2, 2, 2)
Enc. channels24-384
Enc. heads(2, 4, 8, 16, 32)
Enc. patch size256
Dec. depths(2, 2, 2, 2)
Dec. channels48-192
Dec. heads(4, 4, 8, 16)
Dec. patch size256
ErwinMPNN dim.8
Channels96
Window size256
Enc. heads(8, 16)
Enc. depths(6, 2)
Dec. heads(8,)
Dec. depths(2,)
Pooling(2, 1)
MP steps1
+ +Table 12. Model architectures for the PDE benchmarks. + +
ModelParameterValue
ErwinMPNN dim.64
Channels64
Window size256
Enc. heads(8, 8)
Enc. depths(6, 6)
Dec. heads(8, 8)
Dec. depths(6)
Pooling(1, 1)
+ +![](images/afb3fc4374c7ce18f6040b638e68cb4005b697039e31314de6cd271c1bdeece5.jpg) +Figure 10. The norm of the velocity field at different steps of the rollout trajectories, predicted by Erwin. + +![](images/756fc6fd57b4c8a5fca8a98b83b73880b3a10e02fae321fd2cb85ac6c95d612a.jpg) + +![](images/5df4042fa2dc1c28d809f702dbd090b69551ba6179222c1633ac6e570c94ea72.jpg) +Figure 11. The norm of the pressure field at different steps of the rollout trajectories, predicted by Erwin. + +![](images/cf580860c8869a8f83f9ea1a04c6b9ea43c0d0138e4be5653cfa81b394fe13cf.jpg) \ No newline at end of file diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/images.zip b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec5f1cd40c4e697f43735063d2bbeeb0302d9344 --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67ee3a5883755d938f110a46c42bab67d7ea5b3405b19f0b80a88f783320765d +size 1367539 diff --git a/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/layout.json b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a00f30734941b6729e4e70ce5bc50ff24174877c --- /dev/null +++ b/ICML/2025/Erwin_ A Tree-based Hierarchical Transformer for Large-scale Physical Systems/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9df78b3c87621e33ee1a4195b25610d25ff67e57770413cf4e6f963ebf917899 +size 709468 diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_content_list.json b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..cf942b1cb5fba201f75c120bc845c36961eb4b6e --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecf487573fbe47cb1dc9840e92de44ebe90e1a99c6441436782d0ff9f420ab9a +size 191918 diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_model.json b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8f8417dbb23c51ceffec146c29d21352ba8b084e --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d274dacbe610cdd33ba7df5e739e9b0a1bc1d24e5e38835ec2511d4c21c76da +size 210405 diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_origin.pdf b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a98ffe11f183104521c6ab025a6bd3dcec8d7e43 --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/b2f877d3-7ab7-43f9-814d-26984805fa4e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c582b94c76dd4c23e80f4a5956b7149735f9cc27349810d12d8ba6e0560f8ed6 +size 5185974 diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/full.md b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/full.md new file mode 100644 index 0000000000000000000000000000000000000000..08be75ed2028895647d52b691544f503d3f6cb1a --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/full.md @@ -0,0 +1,1017 @@ +# EvFocus: Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams + +Lin Zhu $^{1}$ Xiantao Ma $^{1}$ Xiao Wang $^{2}$ Lizhi Wang $^{3}$ Hua Huang $^{3}$ + +# Abstract + +Event cameras are innovative sensors that capture brightness changes as asynchronous events rather than traditional intensity frames. These cameras offer substantial advantages over conventional cameras, including high temporal resolution, high dynamic range, and the elimination of motion blur. However, defocus blur, a common image quality degradation resulting from out-of-focus lenses, complicates the challenge of event-based imaging. Due to the unique imaging mechanism of event cameras, existing focusing algorithms struggle to operate efficiently on sparse event data. In this work, we propose EvFocus, a novel architecture designed to reconstruct sharp images from defocus event streams for the first time. Our work includes the development of an event-based out-of-focus camera model and a simulator to generate realistic defocus event streams for robust training and testing. EvFocus integrates a temporal information encoder, a blur-aware two-branch decoder, and a reconstruction and re-defocus module to effectively learn and correct defocus blur. Extensive experiments on both simulated and real-world datasets demonstrate that EvFocus outperforms existing methods across varying lighting conditions and blur sizes, proving its robustness and practical applicability in event-based defocus imaging. + +# 1. Introduction + +Event cameras are innovative sensors that capture brightness changes in the form of asynchronous events rather than traditional intensity frames. These cameras offer significant + +$^{1}$ School of Computer Science& Technology, Beijing Institute of Technology, Beijing, China $^{2}$ School of Computer Science, Anhui University, Hefei, China $^{3}$ School of Artificial Intelligence, Beijing Normal University, Beijing, China. Correspondence to: Hua Huang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/23c306460d6e1c8e20d7dec0ffbf8cc297eaf45022714d06d56ada4401a4253b.jpg) +Figure 1. Reconstructing sharp images from defocus event streams. Our model reconstructs sharp images that closely approximate the in-focus results from defocus event streams, effectively mitigating the impact of defocus blur in event-based imaging. + +advantages, such as high temporal resolution, high dynamic range, and immunity to motion blur, making them particularly useful in scenarios where conventional cameras struggle (Gallego et al., 2020b). The ability to capture precise and rapid changes in brightness opens new possibilities for image reconstruction applications, particularly in challenging conditions like low light and high-speed motion (Delbruck & Lichtsteiner, 2007), where traditional cameras often fail to deliver clear images. + +Recent research increasingly leverages event data to enhance image and video deblurring, capitalizing on the rich edge information provided by event streams. Methods like (Jiang et al., 2020), (Lin et al., 2020), and (Wang et al., 2020) have successfully integrated event data with RGB image and video deblurring, leading to notable improvements in performance. For instance, (Sun et al., 2022) employs a multi-head attention mechanism to combine event and image data, while (Kim et al., 2022) introduces an exposure time-based event selection (ETES) module to handle images with unknown exposure times. Additionally, (Lin et al., 2022) proposes an autofocus strategy utilizing event streams, though it struggles with fixed focus scenarios. Meanwhile, (Teng et al., 2024) develops a method using event accumulation during continuous focus scanning to aid RGB cameras in predicting sharp, focused images. + +However, a major limitation of existing methods is their inability to effectively address defocus blur, which is a common and critical issue in many real-world scenarios (see Fig. 1). Unlike traditional cameras, which benefit from mature autofocus technology, event cameras lack such mecha + +nisms and often rely on manual focusing, making defocus a frequent occurrence in event data. While motion blur is naturally mitigated by the asynchronous nature of event cameras, defocus blur fundamentally reduces spatial intensity gradients, resulting in a significant decrease in the number and quality of generated events. This makes defocus blur particularly challenging to handle within existing event-based frameworks, as the temporal dynamics of event streams are directly affected by the loss of gradient information. Unlike traditional deblurring techniques for RGB images, where spatial restoration dominates, the sparsity and continuous nature of event streams necessitate a temporal-domain approach to effectively handle defocus blur. + +In this paper, we present EvFocus, a novel framework specifically designed to reconstruct sharp images from defocus event streams. To support this, we first develop a theoretical model of defocus blur in event cameras and a simulator capable of generating large-scale, realistic defocus event datasets. These datasets include event streams, blurred images, sharp images, and optical flow, covering a wide range of defocus conditions. Unlike traditional defocus blur datasets, which primarily focus on spatial restoration, our dataset and approach emphasize the temporal characteristics of defocus event streams, bridging the gap between theoretical exploration and practical application. Our framework includes a temporal information encoder with ConvLSTM layers to capture and preserve temporal dependencies, and a blur-aware two-branch decoder that separates blur-specific and alignment features to ensure precise reconstruction. Additionally, we design a reconstruction and re-defocus module, where the aligned feature passes through a Re-defocus module and a Reconstruction module. The Re-defocus Image generated from this process undergoes self-supervised learning with the blur feature, allowing the model to further learn defocus blur distribution. Experimental results demonstrate that our architecture effectively eliminates defocus blur across different conditions. In summary, the contributions of this work are: + +1) We propose EvFocus, the first network designed to effectively reconstruct sharp images from defocus event streams, featuring a temporal information encoder, a blur-aware two-branch decoder, and a reconstruction and re-defocus module to ensure precise image reconstruction. +2) We explore and model defocus events in event cameras and develop a simulator to generate realistic defocus event streams for robust training and evaluation. Additionally, we introduce a defocus feature learning mechanism that enhances the model's ability to learn defocus blur distribution through the blur-aware two-branch decoder. +3) Extensive experiments on both simulated and real-world defocus event data demonstrate the superior performance of EvFocus, outperforming existing methods across various + +![](images/a92b2abc2340406fd91f1270a1e1264ac1c818787c0c9e4636d63b372985edb7.jpg) +(b) Defocus Images and Events +Figure 2. The sampling mechanism of defocus events. When the lens is out-of-focus, light is focused outside the sensor through the thin lens model and forms a CoC on the sensor. When the light change at a single pixel on the sensor reaches the threshold, the defocus event is generated. + +lighting conditions and blur sizes, proving its robustness. + +# 2. Related Work + +Traditional Image-based Defocus Deblurring. Defocus deblurring in RGB images follows two main approaches: defocus map estimation with deconvolution and deep learning-based methods. Early works (Yi & Eramian, 2016; D'Andrés et al., 2016) estimate defocus maps before applying deconvolution, while (Xin et al., 2021) introduces an unsupervised approach with calibrated blur kernels. Deep learning has significantly improved defocus deblurring, with methods like (Abuolaim & Brown, 2020; Lee et al., 2021; Son et al., 2021; Cho et al., 2021a; Ruan et al., 2022) enhancing accuracy and efficiency. + +For video deblurring, integrating temporal information helps recover sharp details from multiple frames (Chen et al., 2018; Pan et al., 2023; Zhu et al., 2022a). However, these methods rely on intensity-based images and do not address event-based defocus blur. Unlike existing defocus blur datasets focused on spatial restoration, we explore the temporal characteristics of defocus-induced event streams, shifting the focus from frame-based deblurring to event-based reconstruction. + +Event-based Reconstruction. Neuromorphic cameras offer low latency and energy efficiency (Delbruck & Lichtsteiner, 2007; Zhu et al., 2019; 2020). Event-based reconstruction, which recovers intensity images or video from asynchronous events, is a core yet challenging application. Event-based reconstruction has evolved from early physics-driven methods to deep learning. Classical approaches (Cook et al., 2011; Kim et al., 2008; Bardow et al., 2016) rely on optimization + +![](images/3546ad5fe6fd0c7f603621fce8661e616e2542e1f8da718d414b5fd0ab69fe3b.jpg) +Figure 3. Event distribution of real-world (Left) and simulated (Right) data with different degrees of blur. We present the visual effects of RGB images under different degrees of blur as well as the corresponding events and event distribution statistics. + +and filtering to estimate intensity images, while (Munda et al., 2018; Barua et al., 2016) shows motion-independent reconstruction feasibility. Deep learning further improves event-based reconstruction. E2VID (Rebecq et al., 2019) introduces a recurrent network using voxel grids, while FireNet (Scheerlinck et al., 2020) achieves faster inference but struggles with high-speed motion. Improvements like E2VID+ and FireNet+(Stoffregen et al., 2020) align synthetic and real data, and SPADE-based(Cadena et al., 2021) and transformer-based (Weng et al., 2021) architectures refine quality. Recent advances, including SNN-based (Zhu et al., 2022b) and dynamic event reconstruction models (Ercan et al., 2024), enhance efficiency and adaptability. + +Event-based Deblurring. Events have been leveraged to enhance deblurring by preserving high-temporal-resolution edges (Jiang et al., 2020; Lin et al., 2020; Wang et al., 2020). Methods like (Sun et al., 2022) use multi-head attention to fuse event and image features, while (Kim et al., 2022) proposes an exposure time-based selection module. Autofocus strategies (Lin et al., 2022) remain limited to fixed-focus cases, and (Teng et al., 2024) introduces event accumulation for continuous focus scanning. (Lou et al., 2023) employ the event focal stack method to assist RGB image refocusing; however, this approach imposes stringent constraints on data acquisition. + +Despite progress, event-based defocus deblurring remains challenging. Unlike motion blur, which events naturally mitigate, defocus blur weakens spatial gradients, reducing event generation and complicating sharp image reconstruction. Factors like blur kernel size, event firing threshold, and refractory period further hinder effective modeling. Addressing this requires a temporal-domain approach to capture defocus event dynamics, moving beyond conventional spatial deblurring techniques. + +# 3. Background and Motivation + +Event Sampling Mechanism. The sensor of the event camera operates independently at each pixel to detect changes in light intensity. An event is generated when the light intensity at pixel changes by more than a certain threshold from the time the last event is recorded (Gallego et al., 2020a). This can be expressed as: + +$$ +\Delta L = \log I (t) - \log I (t - \Delta t), \tag {1} +$$ + +where an event is generated if $|\Delta L| > C$ , $C$ denotes the threshold. An event is defined by a quadruplet which contains the event's timestamp $t$ , the pixel coordinates $(x, y)$ , and the event polarity $p$ . + +Event-based Out-of-Focus Camera Model. Suppose that the $k$ -th event in an event stream is expressed as + +$$ +E _ {k} = \left(x _ {k}, y _ {k}, t _ {k}, p _ {k}\right). \tag {2} +$$ + +At $t_k$ , changes in light intensity at the pixel reaches the threshold $C$ , Eq. 1 can be rewritten as + +$$ +\Delta L \left(x _ {k}, y _ {k}, t _ {k}\right) = L \left(x _ {k}, y _ {k}, t _ {k}\right) - L \left(x _ {k}, y _ {k}, t _ {k} - \Delta t _ {k}\right), \tag {3} +$$ + +where $|\Delta L(x_k, y_k, t_k)| \geq C$ . Conventional images typically employ the thin lens model to model defocus blur (Mannan & Langer, 2016). This model presumes that the thickness of the lens can be ignored, which is beneficial for simplifying optical ray tracing computations. Through this model, we can approximate the circle of confusion (CoC) of the PSF of a given point (Levin et al., 2007) based on the distance of the point from the lens and the camera parameters (i.e., focal length, aperture size, and distance). The model is shown in Fig. 2, where $f$ is the focal length, $s$ is the object distance, and $F$ is the aperture value. The + +distance between the lens and the sensor $s'$ and the aperture diameter $q$ are defined as: $s' = \frac{fs}{s - f}$ , $q = \frac{f}{F}$ . + +The CoC radius $r$ of the scene point $P_{1}$ at distance $d$ from the camera is given by: + +$$ +r = \frac {q}{2} \times \frac {s ^ {\prime}}{s} \times \frac {d - s}{d}. \tag {4} +$$ + +Thus, defocused RGB imaging can be modeled as: + +$$ +I _ {\mathrm {b l u r}} (x, y) = \left(I * h\right) _ {(x, y)}, +$$ + +Here, $I * h$ represents the convolution operation, where $I$ is the input image and $h$ is the convolution kernel. + +Considering the diffraction of light within the CoC of defocus blur, the light intensity can be approximated as a Gaussian distribution (Gokstorp, 1994; Elder & Zucker, 1998). This results in blurred edges and degraded image quality in RGB camera captures. To model event-based defocus blur, we approximate it using Gaussian blur. The defocused temporal light intensity difference $\Delta L^{\prime}$ is defined as: + +$$ +\Delta L ^ {\prime} \left(x _ {k}, y _ {k}, t _ {k}\right) = L ^ {\prime} \left(x _ {k}, y _ {k}, t _ {k}\right) - L ^ {\prime} \left(x _ {k}, y _ {k}, t _ {k} - \Delta t _ {k}\right), \tag {5} +$$ + +where $L^{\prime}(x_k,y_k,t_k)$ and $L^{\prime}(x_{k},y_{k},t_{k} - \Delta t)$ represents $\left(L*\right.$ $G_{t_k})_{(x_k,y_k,t_k)}$ and $\left(L*G_{t_k - \Delta t}\right)_{(x_k,y_k,t_k - \Delta t)}$ , respectively. Here, $G_{t_k}$ represents the Gaussian kernel at time $t_k$ , which approximates the size of the CoC. The blur kernel at $(x_{k},y_{k})$ and timestamp $t_k$ can be modeled by a Gaussian distribution and is expressed as $G(x,y) = \frac{1}{2\pi\sigma^2}\exp \left(-\frac{x^2 + y^2}{2\sigma^2}\right)$ . + +Distribution of Out-of-Focus Event Streams. As the object distance and focal length are continuous variables, and the time resolution of the event camera is extremely high, we can assume that $G$ remains unchanged at this moment, i.e., $G_{t_k}(u,v) = G_{t_k - \Delta t}(u,v)$ . Therefore, + +$$ +\Delta L ^ {\prime} \left(x _ {k}, y _ {k}, t _ {k}\right) = \sum_ {u = - s} ^ {s} \sum_ {v = - s} ^ {s} \Delta L (u, v) \cdot G (u, v), \tag {6} +$$ + +where $\Delta L(u,v) = L(x + u,y + v,t_k) - L(x + u,y + v,t_k - \Delta t)$ and $s$ represents the size of the CoC at point $(x_{k},y_{k})$ . When a pixel lies at a local strong edge or experiences a significant local brightness change, events are typically triggered. However, the defocus PSF causes the brightness peaks to shrink and the valleys to rise, resulting in local smoothing (defocus averaging). Due to the presence of this blurring phenomenon, strong brightness changes degrade into weaker brightness changes, which statistically manifests as a reduction in event triggering and a degradation of the event distribution into a blurred distribution. + +For instance, consider a $3 \times 3$ CoC where only the central pixel experiences a brightness change that exceeds the event threshold, while all other pixels do not trigger events. In + +this case, under normal focus, the brightness change at the central pixel $(x_{k},y_{k})$ satisfies $\Delta L(x_k,y_k,t_k) > C$ . + +After defocus, the brightness change is averaged across the CoC, as described in Eq. 6. Since only the central pixel contributes a significant brightness change, the defocus effect reduces the overall brightness change at $(x_{k},y_{k})$ , and we have $\Delta L^{\prime}(x_k,y_k,t_k) < C$ . As a result, no events are triggered due to the "Defocus Averaging", even though the original brightness change exceeded the threshold. Thus, we get $\Delta L^{\prime}(x_k,y_k,t_k)\leq \Delta L(x_k,y_k,t_k)$ . + +Equality is achieved when all pixels within the blur kernel exhibit brightness changes with the same polarity, resulting in no cancellation effects. More generally, when pixels within the blur kernel exhibit brightness changes of mixed polarities, the contributions of positive and negative changes are weighted by the blur kernel $G$ . For instance, if $x_{k}$ emits a positive event and another point $x_{r}$ within the kernel emits a negative event with $|\Delta L_{x_r}| < |\Delta L_{x_k}|$ , then $\Delta L_{x_r} < 0$ and the weighted contribution $\Delta L_{x_r}' > 0$ remains within the overall summation. + +From the above, we know that defocus blur causes events to become sparse (Fig. 3). The smaller the area of the object generating events, the more significant the effect of defocus blur on event generation. When events with both positive and negative polarities are generated within the blur kernel area, the polarity with smaller brightness changes is more affected by defocus blur, resulting in either no event being generated or an event generated with the opposite polarity. For further analysis, please refer to the supplementary material. + +Out-of-Focus Event Stream Simulation. We develop a simulator to generate realistic defocus event streams for robust training and evaluation. In supplementary material, Alg. 1 presents the simulation of our out-of-focus event stream. We apply Gaussian blur to the simulated event data using the Multi-Objects-2D renderer option of ESIM (Rebecq et al., 2018) where multiple moving objects are captured with a camera restricted to 2D motion. To simulate varying levels of defocus in real-world scenarios, we employ different PSF configurations for each scene. Experimental results demonstrate that the model trained on synthetic data achieves effective reconstruction for various defocus levels observed in real-world scenarios. We use the configuration of (Stoffregen et al., 2020) to ensure that our data has a similar distribution as real-world data. We approximate defocus blur with multi-levels gaussian filter which is applied when high temporal resolution frames are rendered. + +# 4. The Proposed Model + +Based on previous analysis, unlike traditional image defocus, event defocus also alters the number of events, mak + +![](images/e0941a26834a6917c3d8e69ce674e7b0ae7a66f4ae8618a84eb8ed88df5c35fd.jpg) +Figure 4. The architecture of EvFocus, includes a Temporal Information Encoder, a Blur-aware Two-branch Decoder for separating blur and alignment features, and a Reconstruction and Re-Defocus Module that refines defocus blur correction through self-supervised learning, resulting in precise image reconstruction from defocus event streams. + +ing event defocus deblurring and reconstruction a highly ill-posed problem. In this section, we propose EvFocus, specifically designed to address the unique challenges posed by event cameras for deblurring and reconstructing defocus event streams (see Fig. 4). The model first extracts the temporal feature from the defocus event stream, then introduces a two-branch decoder and reconstruction and re-defocus module, enabling robust defocus blur correction and image reconstruction. The model is structured as follows: + +Temporal Information Encoder. The event camera's asynchronous nature produces sparse event streams rather than conventional frame-based sequences, making it difficult to extract meaningful temporal information. Our temporal information encoder is motivated by the need to capture and retain temporal dependencies in defocus event streams without losing critical temporal resolution. Similar to E2VID (Rebecq et al., 2019), we utilize ConvLSTM units to effectively preserve temporal information over time by maintaining hidden states. + +1) Event Representation. Events are typically processed and converted into alternative representations to fit the network. In our model, we utilize voxel grid (Zihao Zhu et al., 2018) as the spatio-temporal representation of event stream. +2) Feature Extraction. To stabilize the feature extraction process in an asynchronous event data context, we incorporate ConvLSTM layers. These layers are chosen because + +they can selectively forget irrelevant features and remember important temporal information over multiple time steps, enhancing the network's ability to learn and extract useful spatio-temporal features from the sparse event data. + +Each encoder layer consists of a 2D down-sampling convolution and a ConvLSTM (Shi et al., 2015). The 2D down-sampling convolution has a kernel size of 5 and a stride of 2. The ConvLSTM has a kernel size of 3, and the number of input and hidden layers is the same as the down-sampling convolution. Each encoder maintains a state $s_i^k$ that is updated at each iteration to memorize temporal information. ConvLSTM can enhance the stability of features by remembering and forgetting previous states. Three consecutive ConvLSTM blocks can be represented by the equation : + +$$ +\mathbf {f} _ {i} ^ {C L}, \mathbf {s} _ {i} ^ {t} = f _ {l} ^ {\text {r e c}} \left(\mathbf {f} _ {i - 1} ^ {C L}, \mathbf {s} _ {i} ^ {t - 1}\right), \tag {7} +$$ + +where $\mathbf{f}_i^{CL}$ denote the feature of ConvLSTM, $i\in \{1,2,3\}$ denotes the current $i$ -th ConvLSTM block, and $\mathbf{s}_i^t$ denotes the state of the $i$ -th ConvLSTM block at time $t$ + +Blur-aware Two-branch Decoder. The blur-aware two-branch decoder addresses the challenge of separating blur-specific features from the alignment features necessary for accurate image reconstruction. The need for two parallel decoding branches arises from the observation that blur and alignment features often interfere with each other during reconstruction. By processing them separately, we can ensure + +![](images/63e1ec4cac2b173e36ea5add8f6431429bc433e37639ebfde2583bda7e4557ef.jpg) +Figure 5. Qualitative comparison with baseline methods on out-of-focus simulated data. Our reconstruction result has the best quality, is closest to the sharp ground truth, and restores more details. + +that the blur decoder focuses solely on understanding and correcting defocus blur, while the alignment decoder works on aligning features correctly for the final sharp image reconstruction. The spatio-temporally encoded features are processed in parallel through two decoders, namely the blur feature decoder $D_{\mathrm{blur}}$ and the aligned feature decoder $D_{\mathrm{align}}$ , generating the blur feature $F_{\mathrm{blur}}$ and the aligned feature $F_{\mathrm{align}}$ . Each decoder consists of three decoder blocks, where each decoder block is composed of bilinear upsampling and a convolutional block with a kernel size of 5, followed by ReLU and BN. + +The features generated by the blur feature decoder $D_{\mathrm{blur}}$ undergo a prediction layer and are then used to learn blur reconstruction with the blur ground truth (blur gt), which subsequently supervises the redegradation process. The aligned feature decoder $D_{\mathrm{align}}$ performs preliminary alignment, followed by deblur reconstruction and the redegradation process. After each decoder block, the Cross-Modal Fusion (CF) applies ReLU activation to the two features to assist in extracting alignment features, and then concatenates them along the channel dimension. Through the CF module, information from both parts is combined, enhancing the features of the alignment decoder module, thus better focusing on extracting alignment information. + +Reconstruction and Re-defocus Module. We design a self-supervised loss mechanism where the aligned feature $F_{\mathrm{align}}$ first passes through a Re-defocus module and a Reconstruction module. The Re-defocus module generates a Re-defocus Image, which is used in self-supervised learning with the blur feature $F_{\mathrm{blur}}$ , allowing the model to better learn defocus blur distribution in the Blur-aware Two-branch Decoder. The aligned feature $F_{\mathrm{align}}$ is then processed by the Reconstruction module to produce the final clear image reconstruction under temporal consistency supervision. + +Our Reconstruction and Re-defocus Module utilizes Transformer-based Multi-Head Channel Attention (MHCA)s (Vaswani, 2017; Zhang et al., 2024). to enhance defocus blur handling. Transformers are selected for their + +ability to focus on critical features over long distances, addressing the quadratic growth issue of key-query interactions by applying self-attention across channels and computing cross-channel covariance for generating the attention map. Given queries (Q), keys (K), and values (V), we reshape Q and K such that their dot product generates a transposed attention map $\mathbf{A} \in \mathbb{R}^{C \times C}$ instead of the traditional $\mathbb{R}^{HW \times HW}$ . Overall, MHCA can be summarized as: + +$$ +\mathbf {X} ^ {\prime} = \mathbf {W} _ {\mathbf {p}} \operatorname {A t t e n t i o n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) + \mathbf {X}, \tag {8} +$$ + +$$ +\operatorname {A t t e n t i o n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \mathbf {V} \cdot \operatorname {s o f t m a x} \left(\frac {\mathbf {K} \cdot \mathbf {Q}}{\alpha}\right), \tag {9} +$$ + +where $\mathbf{X}'$ and $\mathbf{X}$ are input and output feature maps, $\mathbf{W}_{\mathbf{p}}$ is the $1\times 1$ point-wise convolution, and $\alpha$ is a learnable scaling parameter to control the magnitude of $(\mathbf{K}\cdot \mathbf{Q})$ before applying softmax. + +Self-supervised Mechanism We design a self-supervised loss mechanism. First, the aligned feature $F_{\mathrm{align}}$ passes through a Re-defocus module and a Reconstruction module. The Re-defocus module outputs a Re-defocus Image, which undergoes self-supervised learning with the blur feature $F_{\mathrm{blur}}$ , allowing the model to further learn the distribution of defocus blur in the Blur-aware Two-branch Decoder. Finally, the aligned feature $F_{\mathrm{align}}$ passes through the Reconstruction module, and under temporal consistency supervision, the model produces the final clear image reconstruction. + +Loss Function. As shown in Fig. 4, we use perceptual loss (Zhang et al., 2018) and temporal consistency loss (Lai et al., 2018; Rebecq et al., 2019) to ensure the quality of reconstruction, and we learn the deblurring process through $L_{1}$ loss. The final loss is the sum of the losses: + +$$ +L _ {K} = \lambda_ {1} L R _ {k} ^ {1} + \lambda_ {2} L R _ {k} ^ {2} + \lambda_ {3} L _ {k} ^ {T C P} + \lambda_ {4} L _ {1}, \tag {10} +$$ + +where $L_{K}^{TCP}$ represents the Temporal Consistency loss, and $LR_{k}^{1}$ and $LR_{k}^{2}$ respectively represent the perceptual loss of the align feature $F_{a}$ align after prediction supervised by the sharp ground truth (sharp gt) and the blur feature $F_{b}$ blur after prediction supervised by the defocus ground truth (blur gt). $\lambda_{1,2,3,4}$ is separately set to 4, 1, 7, 1, respectively. + +![](images/aba752802d969092a5811ddd4a2f8aa928a21712e7a39c106f31505433149e6f.jpg) +Figure 6. Qualitative comparison on out-of-focus real-world data. Our proposed model achieves better reconstruction results with the clear edge restored. + +Table 1. Quantitative comparison on simulated event data with different defocus degrees. + +
Metricsharpk=3, σ=1.0k=5, σ=1.5k=7, σ=2.0k=9, σ=2.5k=11, σ=3.0Mean
MSE ↓E2VID0.0840.0650.0650.0710.0800.0850.075
E2VID+0.0410.0440.0540.0610.0650.0650.055
E2VID+*0.0540.0470.0470.0470.0500.0520.050
ET-Net0.0370.0370.0420.0440.0470.0480.043
ET-Net*0.0320.0290.0270.0270.0270.0280.028
Ours0.0300.0280.0270.0260.0270.0280.027
SSIM ↑E2VID0.2560.2340.2160.2020.1900.1840.214
E2VID+0.3420.3090.2820.2650.2480.2370.281
E2VID+*0.4970.4860.4500.4170.3850.3600.433
ET-Net0.3520.3310.3050.2830.2610.2470.297
ET-Net*0.4250.4280.4130.3920.3670.3490.396
Ours0.5500.5250.4860.4490.4130.3850.468
LPIPS ↓E2VID0.3440.3610.3790.3940.4060.4220.384
E2VID+0.2340.2580.2790.2950.3090.3160.282
E2VID+*0.1730.1730.1880.2000.2130.2260.196
ET-Net0.2130.2340.2540.2730.2890.3030.261
ET-Net*0.1510.1550.1680.1800.1920.2040.175
Ours0.1440.1460.1610.1690.1820.1950.166
+ +# 5. Experiment + +Experimental Setup. In this section, we compare our method with mainstream reconstruction techniques both qualitatively and quantitatively using simulated and real data. We test our model on simulated data with varying blur levels to demonstrate its adaptability to different degrees of defocus blur, and on real data with varying motion speeds and different focal planes to show its effectiveness in handling motion blur and robustness across varying depth levels. And we visualize the feature in our model to demonstrate the effectiveness of the model architecture. Additionally, we perform ablation studies to evaluate the contribution of each module in our proposed method. 1) Dataset. As stated in Sec. 2, we generate sequences of defocus events, sharp images, and optical flows, in which 41 sequences are used in the training set and 6 sequences in the test set. To verify the effectiveness of our model on real data, we use the DAVIS 346 cameras to capture 7 real-world + +scenes. 2) Implement Details. Our model is implemented using the PyTorch framework. We adopt a constant strategy of learning rate during training, which is set at 1e-4. Our model is trained for 300 epochs with batch size of 1 on 3 NVIDIA GeForce RTX 3090 GPUs. 3) Evaluation metrics. For quantitative evaluation on synthetic data, we consider three widely-used evaluation metrics: (i) structure similarity (SSIM) (Wang et al., 2004), (ii) mean squared error (MSE), and (iii) perceptual similarity (LPIPS) (Zhang et al., 2018). For quantitative evaluation on real data, we use two No-Reference Image Quality Assessment metrics: Brisque (Mittal et al., 2012a) and Niqe (Mittal et al., 2012b). BRISQUE (Blind/Referencceless Image Spatial Quality Evaluator) evaluates natural scene statistics in the spatial domain without requiring a reference image, while NIQE (Natural Image Quality Evaluator) computes quality based on deviations from learned statistical regularities of natural images. + +Evaluation on Simulated Event Data. 1) Qualitative Re + +![](images/598c621813eb65d502e62a440c49843aa070f31192c8c5b6c57f8e187239e848.jpg) +Figure 7. Qualitative comparison with baseline methods on real data with different speeds. Our proposed model has better results with sharp details and fewer artifacts. + +Table 2. Quantitative comparisons on the real-world data. + +
ModelBrisque↓Nique↓
Ours27.1366.345
E2VID30.97712.505
E2VID+38.9577.986
E2VID+*34.3996.877
ET-Net31.9947.771
ET-Net*31.8556.868
+ +sults. Fig. 5 presents the quantitative results obtained by evaluating our method and current mainstream methods on the simulated data sequence generated by us. E2VID+* and ET-Net* denote the models are fine-tuned on our dataset. Among them, the first column represents the reconstruction results of clear events and sharp ground truth. The other columns represent different degrees of blur. The larger the kernel size and the larger the $\sigma$ , the bigger the blur. Each row shows the reconstruction result of each method for different blurred events. The last row gives the ground truth as a reference. As shown in Fig. 6, E2VID (Rebecq et al., 2019) and E2VID followed by MIMO-UNet or MIMO-Unet+ (Cho et al., 2021b) have the lowest quality and the most prominent artifacts and blurs, and are basically unrecognizable. SPADE-E2VID (Cadena et al., 2021) has relatively fewer artifacts, but the degree of blur is still quite large. E2VID+ (Stoffregen et al., 2020) and ET-Net (Weng et al., 2021) have relatively less blur than the former. E2VID+ and ET-Net retrained on the defocus synthetic data further reduce blur and distortion. However, the contrast of E2VID+ and the retrained E2VID+ still has serious distortion. And our results are also better than all the above results and are the closest to the image quality of the sharp ground truth. 2) Quantitative Results. We calculate the average value of each metric on all frames in different blur degree groups as in Table 1. The EvFocus method achieves state-of-the-art performance in all metrics. These results validate the effectiveness of the proposed EvFocus method, and the reconstructed images generated by this method are more perceptually satisfactory and high-fidelity. + +Evaluation on Real-world Event Data. 1) Qualitative Results. We present the qualitative results in Fig. 6, in which each row represents the reconstruction result of the data captured in one scene. The first and second columns respec + +Table 3. Ablation study. + +
ModelSSIM↑MSE↓LPIPS↓
All Modules0.6040.0210.139
w/o CF0.6030.0210.141
w/o sharp supervision (Faligned)0.5770.0240.141
w/o L1 re-defocus supervision0.4030.0210.140
w/o Reconstruction Module0.6010.0220.139
+ +tively represent the Events view and the original APS frame captured by the camera. Each of the remaining columns represents the reconstruction result of one method. Fig. 6 shows SPADE-E2VID has the worst effect and the greatest degree of blur. E2VID can reconstruct basic objects, but the degree of blur is still quite large. E2VID+ and ET-Net have better reconstruction, but still remain a lot of artifacts and blurs. The retrained E2VID+ can eliminate blur to a certain extent, but high-frequency information such as edges still cannot be presented well. The retrained ET-Net can reconstruct high-frequency information to a certain extent. Compared with the above results, our method has the best reconstruction quality, and the restoration of details such as edges is the closest to ground truth. 2) Quantitative Results. Since the visual results of SPADE-E2VID are poor, and the image deblurring of MIMO-UNet or MIMO-UNet+ connected after E2VID does not improve the quality of the reconstructed image, we only conduct quantitative comparisons of the remaining methods. Among them, our method achieves the best performance. We present quantitative results on real data in Table 2. We omit SPADE-E2VID and E2VID followed by MIMO-UNet or MIMO-UNet+ due to poor quantitative scores. Our method achieves the best results on both Brisque and Niqe metrics. + +Ablation Study. To highlight the effectiveness of each module in our model, we conduct ablation experiments as shown in Table 3. As illustrated in the table: + +1) Effect of sharp supervision to $\mathbf{F}_{\mathrm{align}}$ . Removing the perceptual loss supervised by the sharp ground truth results in the worst performance in MSE and LPIPS. This demonstrates that the align decoder plays a crucial role in the reconstruction and re-degradation process by providing prior knowledge to align $\mathbf{F}_{\mathrm{align}}$ with the followed reconstruction. 2) Effect of Reconstruction Module. The model without the reconstruction module also shows worse performance, indicating that the reconstruction module, as the last module before producing the clear predicted image, improves the quality of the reconstruction results. 3) Effect of CF. Removing the CF structure leads to a decline in the model's performance, proving the effectiveness of our strategy to enhance aligned features through Cross-Modal Fusion. 4) Effect of $L_{1}$ re-defocus supervision. The model without the $L_{1}$ loss also shows a noticeable decrease, further validating the importance of our re-degradation module. + +Feature Visualization. We visualize the intermediate fea + +![](images/85fc48efa1494ef1da27a1ef54dcd6517121022772b341dfaddd47d27f017a8e.jpg) + +![](images/7707f348c81e34168a13834ac12deeabf4ee2fd6d6a82e57b45f2b487bff068a.jpg) + +![](images/a5068c7c6b5a1e266ce2a346b6f2b9d86cfdc2a02a538f85587a92b615161774.jpg) + +![](images/d89ac3afef8b8e6e5764e749c3238ea5818ab4f9cc4da6f6d49d873719ed07bb.jpg) + +![](images/c37f518c50506a32bb39033d54388ed7228e8c538e7048cbffe10095115f7cc3.jpg) + +![](images/3dc18e56b113d331f511d763c289c4dbde45559e34a8c760612560b46d5ef46e.jpg) + +![](images/48823716bbaca75ae0021f4120ba07a317cbfaa168412fd647dc422dc3cd9ed6.jpg) + +![](images/3cd9a1e3e755832f3cb17b28261af7e3f27ef4587336e0903faef242c465a1f0.jpg) +(b) + +![](images/f803c8af3b2e2fcacf5d043c0ebb62f8fcf8af3691104fe924c594f0a09e4c08.jpg) +Figure 9. Qualitative experiment on different depth levels. We capture three scenes with distinct depth variations for evaluation. Our method demonstrates effective deblurring performance across different depth levels. + +![](images/995a7dfa7506ea58e3514f70872328385e5f235d5b0c9294d255aa910e7528a6.jpg) +Scene +Figure 8. Feature visualization. We visualize the features input to the decoder. Taking (a) as an example, the red box indicates a region with slight defocus, while the blue box shows a region with severe defocus. Despite similar event densities caused by motion, the feature map reveals stronger responses in the heavily blurred area. This demonstrates that our network exhibits varying feature intensities for blur at different depths, validating the model's physical consistency. + +![](images/019f753eb5a1915f499a84309d438f53634b4dfc2b3f5fc6f934d8b4b7be6ce9.jpg) +Events + +![](images/138c68eaf57cd7fe1423d5a6636641edcd5b746a267bf6f18bd9f2d688b780b3.jpg) +RGB + +![](images/8886221c521fa9ba09c1598960804ac29afcf6bdf42e33e9977030626a14c954.jpg) +Feature +visualization + +tures of our model using real-world data containing scenes with objects at varying degrees of defocus in Fig. 8. The results demonstrate that our model can effectively perceive features across different defocus levels, validating the effectiveness of the model design. + +Evaluation on Different Out-of-focus Blur Size. In Fig. 5, we conduct experiments on the degree of blur that our model can handle. Through experiments, our model can perform relatively complete and clear reconstructions for blurred events with kernel size less than or equal to 7. For blurred events with kernel size greater than 7, the reconstruction quality of our model can also be the best. + +Evaluation on Different Depth Level. We conduct experiments on scenes with varying depths to validate our model's ability to recover texture information at different focal lengths within the same scene as in Fig. 9. The experimental results demonstrate that our model achieves effective defocus recovery across different focal settings. + +Evaluation on Different Motion Speed. To test the processing effect of our model on different blurs, we collect real event data at different moving speeds for experiments + +![](images/25ae0a1a9775800d3d00a1452dc7d74cef064a8a418df006e5ff699cc13c1f7f.jpg) + +![](images/25020dcff0c55530fc957ea81d9e51643c0dcb4b14a33719ef2028921a598e5d.jpg) + +![](images/9653dc90ec83b93629f2a8d16debca32c6b68acd80292be57eec2c2911fcf5b1.jpg) + +![](images/ddaab58f33fca1077d2e0823d7e80b1dd5bb9e9dc85ef9d6af0d7f5a9e1bf5bc.jpg) + +![](images/43a6f0403f60f899c2a5ba62ee50e19ffa26ae3f2ca72623de12581081ed4f01.jpg) + +![](images/8cc0348991161a75e0f03c5da075fcb5a28df562af122f12f9399b1cc10d0e20.jpg) + +![](images/bd4bf0f9d670ff96c03bbd724dbf435353833fe773565dc49b7fe042b5611482.jpg) + +![](images/0e2c8a334552075c50490c6aea340a28d33fa1a7e1334a5f196803b481e56404.jpg) + +![](images/602c7d9aa2d1310e4ea31694af03a4ddb883ea0f7423cb23726ba61b2916056b.jpg) + +![](images/9fb79f7ec1320b14350fc7023e3b1fd2786d9d53fbfac2430935ca808abe8602.jpg) + +![](images/15ca14225ae38b6a908361d99ae6b7b1af51aaf57b03b513ee30ef16ce4050ce.jpg) +Scene +Events + +![](images/661753bdf2fa2542f06a580d5b1f63811bd5e8858bd439d951b1987802a7c8a2.jpg) +RGB +Ours + +![](images/41518b66fd49f98a15c4049658ca3eb621077c8302e38b62181f0182cce95447.jpg) + +E2VID+ + +![](images/ce08dcc291b5dcf993792c6b12c15409ae475bd89d5c896a3bd844fa088d37ec.jpg) +F2 ++ + +![](images/03621a8f0cb6eda386af84af3f1c377c46f93c51f7413d57c5be5bd4dfaf62e2.jpg) +Net +ETNet* + +(Fig. 7). E2VID has only slight motion blur at low speed, but does not effectively remove the motion blur at high speed. The reconstruction result is generally blurry. E2VID+ and the retrained E2VID+ have better reconstruction quality at low speed, but cannot effectively remove high-speed motion blur. ET-Net and the retrained ET-Net have better detail recovery at low speed. The retrained ET-Net has less motion blur at high speeds than ET-Net but still cannot be removed well. In contrast, our model shows better reconstruction quality at both high and low speed, and retains the best details, proving that our method is also superior to the above methods for the reconstruction of different event densities. + +Parameters. We present the parameter size of each model and inference speed in Table 4. Our model is in the same order of magnitude as mainstream models such as E2VID and is lower than ETNet. + +Table 4. Comparison on Parameters and Runtime. + +
MethodsParams(M)Inference Time(ms)
E2VID10.714.41
ETNet22.1825.71
SPADE11.4612.66
EvFocus (ours)12.1124.09
+ +# 6. Conclusion + +We propose EvFocus, a novel framework for reconstructing sharp images from defocus event streams. It incorporates a temporal encoder and a blur-aware decoder to effectively correct defocus blur. Additionally, we develop a defocus event simulator to generate realistic training data, enabling robust model performance. Unlike traditional methods focused on spatial restoration, EvFocus leverages the temporal characteristics of event streams for improved defocus handling. Experiments on simulated and real-world datasets show that EvFocus outperforms existing methods, demonstrating its effectiveness in event-based defocus imaging. + +# 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. + +# Acknowledgments + +This work is partially supported by National Natural Science Foundation of China under Grant No.62302041 and China National Postdoctoral Program under contract No.BX20230469. + +# References + +Abuolaim, A. and Brown, M. S. Defocus deblurring using dual-pixel data. In Vedaldi, A., Bischof, H., Brox, T., and Frahm, J.-M. (eds.), Computer Vision - ECCV 2020, pp. 111-126, Cham, 2020. Springer International Publishing. ISBN 978-3-030-58607-2. +Bardow, P., Davison, A. J., and Leutenegger, S. Simultaneous optical flow and intensity estimation from an event camera. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. +Barua, S., Miyatani, Y., and Veeraraghavan, A. Direct face detection and video reconstruction from event cameras. In 2016 IEEE winter conference on applications of computer vision (WACV), pp. 1-9. IEEE, 2016. +Cadena, P. R. G., Qian, Y., Wang, C., and Yang, M. Spadee2vid: Spatially-adaptive denormalization for event-based video reconstruction. IEEE Transactions on Image Processing, 30:2488-2500, 2021. doi: 10.1109/TIP.2021.3052070. +Chen, H., Gu, J., Gallo, O., Liu, M.-Y., Veeraraghavan, A., and Kautz, J. Reblur2deblur: Deblurring videos via self-supervised learning. In 2018 IEEE International Conference on Computational Photography (ICCP), pp. 1-9. IEEE, 2018. +Cho, S.-J., Ji, S.-W., Hong, J.-P., Jung, S.-W., and Ko, S.-J. Rethinking coarse-to-fine approach in single image deblurring. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 4641-4650, October 2021a. +Cho, S.-J., Ji, S.-W., Hong, J.-P., Jung, S.-W., and Ko, S.-J. Rethinking coarse-to-fine approach in single image deblurring. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 4641-4650, 2021b. + +Cook, M., Gugelmann, L., Jug, F., Krautz, C., and Steger, A. Interacting maps for fast visual interpretation. In The 2011 International Joint Conference on Neural Networks, pp. 770-776, 2011. doi: 10.1109/IJCNN.2011.6033299. +Delbruck, T. and Lichtsteiner, P. Fast sensory motor control based on event-based hybrid neuromorphic-procedural system. In 2007 IEEE international symposium on circuits and systems, pp. 845-848. IEEE, 2007. +D'Andrés, L., Salvador, J., Kochale, A., and Susstrunk, S. Non-parametric blur map regression for depth of field extension. IEEE Transactions on Image Processing, 25 (4):1660-1673, 2016. doi: 10.1109/TIP.2016.2526907. +Elder, J. H. and Zucker, S. W. Local scale control for edge detection and blur estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, (7):699-716, 1998. +Ercan, B., Eker, O., Saglam, C., Erdem, A., and Erdem, E. Hypere2vid: Improving event-based video reconstruction via hypernetworks. IEEE Transactions on Image Processing, 2024. +Gallego, G., Delbruck, T., Orchard, G., Bartolozzi, C., Taba, B., Censi, A., Leutenegger, S., Davison, A., Conradt, J., Daniilidis, K., and Scaramuzza, D. Event-based vision: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 1-1, 2020a. doi: 10.1109/TPAMI.2020.3008413. +Gallego, G., Delbrück, T., Orchard, G., Bartolozzi, C., Taba, B., Censi, A., Leutenegger, S., Davison, A. J., Conradt, J., Daniilidis, K., et al. Event-based vision: A survey. IEEE transactions on pattern analysis and machine intelligence, 44(1):154-180, 2020b. +Gokstorp, M. Computing depth from out-of-focus blur using a local frequency representation. In Proceedings of 12th International Conference on Pattern Recognition, 1994. +Jiang, Z., Zhang, Y., Zou, D., Ren, J., Lv, J., and Liu, Y. Learning event-based motion deblurring. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3320-3329, 2020. +Kim, H., Handa, A., Benosman, R., Ieng, S. H., and Davison, A. J. Simultaneous mosaicing and tracking with an event camera. J. Solid State Circ, 43:566-576, 2008. +Kim, T., Lee, J., Wang, L., and Yoon, K.-J. Event-guided deblurring of unknown exposure time videos. In European Conference on Computer Vision, pp. 519-538. Springer, 2022. + +Lai, W.-S., Huang, J.-B., Wang, O., Shechtman, E., Yumer, E., and Yang, M.-H. Learning blind video temporal consistency. In Proceedings of the European conference on computer vision (ECCV), pp. 170-185, 2018. +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., Son, H., Rim, J., Cho, S., and Lee, S. Iterative filter adaptive network for single image defocus deblurring. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2034-2042, 2021. +Levin, A., Fergus, R., Durand, F., and Freeman, W. T. Image and depth from a conventional camera with a coded aperture. ACM transactions on graphics (TOG), 26(3): 70-es, 2007. +Lin, S., Zhang, J., Pan, J., Jiang, Z., Zou, D., Wang, Y., Chen, J., and Ren, J. Learning event-driven video deblurring and interpolation. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part VIII 16, pp. 695-710. Springer, 2020. +Lin, S., Zhang, Y., Yu, L., Zhou, B., Luo, X., and Pan, J. Autofocus for event cameras. In 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022. +Lou, H., Teng, M., Yang, Y., and Shi, B. All-in-focus imaging from event focal stack. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17366-17375, 2023. +Mannan, F. and Langer, M. S. Blur calibration for depth from defocus. In 2016 13th Conference on Computer and Robot Vision (CRV), pp. 281-288, 2016. doi: 10.1109/ CRV.2016.62. +Mittal, A., Moorthy, A. K., and Bovik, A. C. No-reference image quality assessment in the spatial domain. IEEE Transactions on image processing, 21(12):4695-4708, 2012a. +Mittal, A., Soundararajan, R., and Bovik, A. C. Making a "completely blind" image quality analyzer. IEEE Signal processing letters, 20(3):209-212, 2012b. +Munda, G., Reinbacher, C., and Pock, T. Real-time intensity-image reconstruction for event cameras using manifold regularisation. International Journal of Computer Vision, 126(12):1381-1393, 2018. +Pan, J., Xu, B., Dong, J., Ge, J., and Tang, J. Deep discriminative spatial and temporal network for efficient video deblurring. In Proceedings of the IEEE/CVF Conference + +on Computer Vision and Pattern Recognition (CVPR), pp. 22191-22200, June 2023. +Rebecq, H., Gehrig, D., and Scaramuzza, D. Esim: an open event camera simulator. In Conference on robot learning, pp. 969-982. PMLR, 2018. +Rebecq, H., Ranftl, R., Koltun, V., and Scaramuzzi, D. High speed and high dynamic range video with an event camera. IEEE transactions on pattern analysis and machine intelligence, 43(6):1964-1980, 2019. +Ruan, L., Chen, B., Li, J., and Lam, M. Learning to deblur using light field generated and real defocus images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 16304-16313, June 2022. +Scheerlinck, C., Rebecq, H., Gehrig, D., Barnes, N., Mahony, R., and Scaramuzza, D. Fast image reconstruction with an event camera. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), March 2020. +Shi, X., Chen, Z., Wang, H., Yeung, D.-Y., Wong, W.-K., and Woo, W.-c. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. Advances in neural information processing systems, 28, 2015. +Son, H., Lee, J., Cho, S., and Lee, S. Single image defocus deblurring using kernel-sharing parallel atrous convolutions. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 2642-2650, October 2021. +Stoffregen, T., Scheerlinck, C., Scaramuzza, D., Drummond, T., Barnes, N., Kleeman, L., and Mahony, R. Reducing the sim-to-real gap for event cameras. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXVII 16, pp. 534-549. Springer, 2020. +Sun, L., Sakaridis, C., Liang, J., Jiang, Q., Yang, K., Sun, P., Ye, Y., Wang, K., and Gool, L. V. Event-based fusion for motion deblurring with cross-modal attention. In European conference on computer vision, pp. 412-428. Springer, 2022. +Teng, M., Lou, H., Yang, Y., Huang, T., and Shi, B. Hybrid all-in-focus imaging from neuromorphic focal stack. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. +Vaswani, A. Attention is all you need. arXiv preprint arXiv:1706.03762, 2017. + +Wang, B., He, J., Yu, L., Xia, G.-S., and Yang, W. Event enhanced high-quality image recovery. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIII 16, pp. 155-171. Springer, 2020. +Wang, Z., Bovik, A. C., Sheikh, H. R., and Simoncelli, E. P. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600-612, 2004. +Weng, W., Zhang, Y., and Xiong, Z. Event-based video reconstruction using transformer. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 2563-2572, October 2021. +Xin, S., Wadhwa, N., Xue, T., Barron, J. T., Srinivasan, P. P., Chen, J., Gkioulekas, I., and Garg, R. Defocus map estimation and deblurring from a single dual-pixel image. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 2228-2238, October 2021. +Yi, X. and Eramian, M. Lbp-based segmentation of defocus blur. IEEE Transactions on Image Processing, 25(4): 1626-1638, 2016. doi: 10.1109/TIP.2016.2528042. +Yuhui Quan, Z. W. and Ji, H. Neumann network with recursive kernels for single image defocus deblurring. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5754-5763, 2023. +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. +Zhang, X., Mao, Z., Chimitt, N., and Chan, S. H. Imaging through the atmosphere using turbulence mitigation transformer. IEEE Transactions on Computational Imaging, 2024. +Zhu, C., Dong, H., Pan, J., Liang, B., Huang, Y., Fu, L., and Wang, F. Deep recurrent neural network with multi-scale bi-directional propagation for video deblurring. In Proceedings of the AAAI conference on artificial intelligence, volume 36, pp. 3598-3607, 2022a. +Zhu, L., Dong, S., Huang, T., and Tian, Y. A retina-inspired sampling method for visual texture reconstruction. In 2019 IEEE International Conference on Multimedia and Expo (ICME), pp. 1432-1437. IEEE, 2019. +Zhu, L., Dong, S., Li, J., Huang, T., and Tian, Y. Retinal-like visual image reconstruction via spiking neural model. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1438-1446, 2020. + +Zhu, L., Wang, X., Chang, Y., Li, J., Huang, T., and Tian, Y. Event-based video reconstruction via potential-assisted spiking neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3594-3604, 2022b. +Zihao Zhu, A., Yuan, L., Chaney, K., and Daniilidis, K. Unsupervised event-based optical flow using motion compensation. In Proceedings of the European Conference on Computer Vision (ECCV) Workshops, pp. 0-0, 2018. + +# A. Appendix: Theoretical Framework for Simulation + +Our motivation is to explore the temporal characteristics of defocus-induced event streams, which are crucial for understanding the dynamic interactions between motion, scene structure, and defocus effects. Unlike traditional defocus blur datasets, which primarily focus on the spatial restoration of sharp images from blurred ones, our work emphasizes the generation and analysis of event streams in the temporal domain. This shift in focus allows us to model and study how defocus blur impacts the asynchronous nature of event data, capturing fine-grained temporal dynamics that are often overlooked in conventional datasets. By incorporating motion dynamics and adopting multiple strategies, we aim to simulate real-world scenarios with greater fidelity and provide new insights into event-based vision under defocus conditions. + +# A.1. Event Triggering Model and Intensity Dynamics + +Event cameras capture temporal intensity changes at a high temporal resolution, generating asynchronous events based on logarithmic intensity differences. The triggering condition for an event at pixel $(x,y)$ and time $t$ can be formalized as: + +$$ +E (x, y, t) = \left\{ \begin{array}{l l} 1, & \text {i f} \frac {\Delta L (x , y , t)}{L (x , y , t)} \geq C _ {+}, \\ - 1, & \text {i f} \frac {\Delta L (x , y , t)}{L (x , y , t)} \leq C _ {-}, \\ 0, & \text {o t h e r w i s e}, \end{array} \right. \tag {11} +$$ + +where: + +- $L(x,y,t)$ denotes the light intensity at pixel $(x,y)$ at time $t$ , +- $\Delta L(x,y,t) = L(x,y,t) - L(x,y,t - \Delta t)$ represents the temporal change in intensity over a time interval $\Delta t$ , +- $C_+$ and $C_-$ are predefined positive and negative contrast thresholds, respectively. + +The magnitude of $\Delta L(x,y,t)$ denotes temporal intensity gradient, which is influenced by two critical factors: + +1. The relative motion between the camera and the observed scene, which induces pixel-level intensity shifts in the image plane. +2. The spatial intensity gradient, $\nabla L(x,y)$ , representing local intensity variations. + +These factors collectively determine the event triggering behavior and the density of the resulting event stream. + +# A.2. Impact of Blur on Intensity Gradients + +Optical blur, such as defocus, attenuates spatial intensity variations by smoothing local intensity gradients, effectively reducing $\nabla L(x,y)$ . This smoothing effect can be mathematically represented using a Gaussian blur kernel $G_{\sigma}$ , defined as: + +$$ +L _ {\text {b l u r}} (x, y, t) = G _ {\sigma} * L (x, y, t), \tag {12} +$$ + +where $G_{\sigma}$ is a Gaussian kernel with standard deviation $\sigma$ that determines the blur magnitude. Consequently, the blurred spatial intensity gradient is expressed as: + +$$ +\nabla L _ {\text {b l u r}} (x, y, t) = G _ {\sigma} * \nabla L (x, y, t). \tag {13} +$$ + +As the blur strength $(\sigma)$ increases: + +1. The spatial intensity gradient $\nabla L_{\mathrm{blur}}(x,y,t)$ diminishes, leading to a reduced magnitude of temporal intensity changes, $\Delta L(x,y,t)$ . + +2. The reduction in intensity changes results in fewer events being generated, producing a sparser event stream. + +Thus, the relationship between blur and event sparsity forms a fundamental aspect of modeling the effect of optical defocus on event generation. + +# A.3. Motion-Induced Intensity Changes + +Relative motion between the camera and the scene is another primary source of temporal intensity variation. Let the motion-induced speed in the image plane be $V_{p}$ . The temporal change in intensity due to motion can be approximated as: + +$$ +\Delta L (x, y, t) \propto V _ {p} \cdot \nabla L _ {\text {b l u r}} (x, y, t), \tag {14} +$$ + +where: + +- $V_{p}$ is the motion velocity projected onto the image plane, +- $\nabla L_{\mathrm{blur}}(x,y,t)$ is the blurred spatial gradient at pixel $(x,y)$ . + +From this expression, it is evident that: + +- High motion velocity ( $V_{p}$ large) amplifies temporal intensity changes, thereby mitigating the smoothing effects of blur. +- Low motion velocity ( $V_{p}$ small) reduces intensity changes, making the impact of blur more pronounced. + +This interaction highlights the interplay between motion dynamics and optical blur in determining event density and spatial distribution. + +# A.4. Interdependence of Motion Speed and Blur Strength + +If an object moves with velocity $V_{p}$ , we can simulate the object's movement by applying geometric transformations $T(t)$ (such as translation, rotation, or scaling): + +$$ +L _ {\text {t r a n s f o r m e d}} (x, y, t) = T (t) L (x, y, 0). \tag {15} +$$ + +Event triggering depends on the change in light intensity, so: + +$$ +\Delta L (x, y, t) = L _ {\text {t r a n s f o r m e d}} (x, y, t) - L _ {\text {t r a n s f o r m e d}} (x, y, t - \Delta t). \tag {16} +$$ + +If we choose an appropriate motion velocity $V_{p}$ , the intensity change rate generated by the geometric transformation matches that produced by different depth-related defocus blur, as shown by: + +$$ +\frac {\Delta L (x , y , t)}{L (x , y , t)} \approx \frac {\Delta L _ {\mathrm {b l u r}} (x , y , t , d)}{L _ {\mathrm {b l u r}} (x , y , t , d)}. \tag {17} +$$ + +Thus, for a given motion speed $V_{p}$ , the events triggered by motion can be equivalent to those triggered by depth-related defocus blur. + +Theorem 1 (Equivalence Theorem): There exists a mapping between the blur level $\sigma(d)$ and the motion speed $V_{p}$ such that for each depth $d$ , the event density generated by motion at a specific velocity are equivalent to those generated by defocus blur at that depth: + +$$ +\sigma (d) \propto \frac {1}{V _ {p}}. \tag {18} +$$ + +The preceding analysis suggests an inverse relationship between motion speed $(V_{p})$ and defocus blur strength $(\sigma)$ in their influence on temporal intensity changes and event generation: + +$$ +\Delta L (x, y, t) \propto V _ {p} \cdot \nabla L _ {\text {b l u r}} (x, y, t). \tag {19} +$$ + +This relationship implies that: + +1. High-speed motion ( $V_{p}$ large) can counteract the effect of a small blur kernel ( $\sigma$ small). +2. Low-speed motion ( $V_{p}$ small) amplifies the impact of a large blur kernel ( $\sigma$ large). + +This equivalence facilitates the simulation of varying levels of blur by appropriately adjusting the motion speed. + +# A.5. Simulation Pipeline + +The analysis demonstrates that the generation of defocus-induced event streams is influenced by motion speed, scene intensity, and the degree of defocus. Unlike traditional defocus-related work that focuses on image restoration in the spatial domain, our research primarily investigates the temporal characteristics of defocus event streams. To model this, we adopt different backgrounds and foregrounds, complex motion trajectories and motion parameters, and multiple Gaussian blur kernels with varying standard deviations $\sigma$ , the simulation process is structured as follows: + +Algorithm 1 Synthetic Data Generation Pipeline +Require: A set of background images $\{\mathcal{B}_i\}$ A set of foreground images $\{\mathcal{F}_{i,j}\}$ for each background $i$ Motion parameters (e.g. translation, rotation) for background & foreground Number of time steps $T$ +Ensure: Synthetic dataset containing rendered scenes with events & optical flow 1: for each scene i do 2: Select one background image $\mathcal{B}_i$ 3: Select $M$ foreground images $\{\mathcal{F}_{i,j}\}_{j = 1}^{M}$ 4: Generate motion trajectories for background and each foreground: $\begin{array}{rl} & {\mathrm{traj}_B\leftarrow \mathrm{GenerateTrajectory}(\mathrm{motion~parameters})}\\ & {\mathrm{traj}_{\mathcal{F}_{i,j}}\leftarrow \mathrm{GenerateTrajectory}(\mathrm{motion~parameters})} \end{array}$ 5: for $t = 1,\ldots ,T$ do 6: Sample camera pose $\mathbf{p}_t\gets$ SamplePose() 7: Sample camera distortion $\mathbf{d}_t\gets$ SampleDistortion() 8: Render defocus brightness image: $I_{t}\gets \mathrm{Render}(\mathcal{B}_{i},\{\mathcal{F}_{i,j}\} ,\mathrm{traj}_{B}[t],\{\mathrm{traj}_{\mathcal{F}_{i,j}}[t]\} ,\mathbf{p}_{t},\mathbf{d}_{t})$ 9: Compute brightness change $\Delta I_t = I_t - I_{t - 1}$ (if $t > 1$ 10: Generate events $\mathcal{E}_t\gets$ EventGeneration $(\Delta I_{t})$ 11: Compute optical flow $\mathbf{u}_t\gets$ OpticalFlow $(I_{t})$ 12: end for 13: Store $\{I_t\}_{t = 1}^T,\{\mathcal{E}_t\}_{t = 1}^T,\{\mathbf{u}_t\}_{t = 1}^T$ as the dataset for scene i 14: end for + +# B. Appendix: Network Architecture Details + +Fig. 4 provides an overview of the EvFocus network, as detailed in Section 3. In this Section, we will explain other details of the model. + +# B.1. Temporal Information Encoder. + +Our temporal information encoder module consists of a head layer and three encoder modules. The head layer outputs a number of channels $N_{b} = 32$ , and the number of channels is doubled after each encoder layer. The inputs to our temporal information encoding module are 5-channel voxel-grids, and the outputs are feature maps with $N_{b} \times 2^{3}$ channels. + +# B.2. Self-supervised Mechanism + +We design a self-supervised loss mechanism. First, the aligned feature $F_{\mathrm{align}}$ passes through a Re-defocus module and a Reconstruction module. The Re-defocus module outputs a Re-defocus Image, which undergoes self-supervised learning with the blur feature $F_{\mathrm{blur}}$ , allowing the model to further learn the distribution of defocus blur in the Blur-aware Two-branch Decoder. Finally, the aligned feature $F_{\mathrm{align}}$ passes through the Reconstruction module, and under temporal consistency supervision, the model produces the final clear image reconstruction. + +# B.3. Reconstruction and Re-defocus Module + +The Reconstruction and Re-defocus Module is designed to refine the network's ability to handle defocus blur. By utilizing Transformer-based Multi-Head Channel Attention (MHCA), we aim to improve the network's focus on the most relevant features for blur correction. Transformers are chosen because they offer the flexibility to attend to important features over long distances in the feature space, which is essential for effectively capturing the intricate patterns of defocus blur. + +Our Reconstruction and Re-defocus Module consists of sequentially cascaded Transformer-based Multi-Head Channel Attention (MHCA) modules (Vaswani, 2017; Zhang et al., 2024). Transformers have demonstrated unique advantages in image restoration tasks due to their flexible and adaptive kernels. To address the quadratic growth problem of key-query dot product interactions, we adopt the idea of applying self-attention across channels rather than spatial dimensions and compute the cross-channel covariance to generate the attention map. + +# B.4. Loss Fuction + +Perceptual loss We use the calibrated perceptual loss LPIPS (Zhang et al., 2018) to supervise the reconstruction image $\hat{I}$ with sharp ground truth and two decoder outputs $I_{1}$ and $I_{2}$ after processing the prediction with out-of-focus and focused ground truth. The LPIPS loss can evaluate the perceptual similarity of frame quality in a more realistic manner. The perceptual reconstruction loss is specifically calculated as + +$$ +L R _ {k} = d \left(\hat {I} _ {k}, I _ {k}\right), \tag {20} +$$ + +where $d$ represents the LPIPS distance. + +Temporal Consistency and Perceptual Joint Loss To supervise the final reconstructed image, we use a joint loss of temporal consistency loss and perceptual loss. The perceptual loss between the predicted image and the sharp ground truth is used to ensure reconstruction quality. At the same time, due to the presence of temporal artifacts, we use a temporal consistency loss to correct the warping error between the reconstructed consecutive frames through the optical flow map (Lai et al., 2018). This is specifically expressed as: + +$$ +L _ {k} ^ {T C} = M _ {k - 1} ^ {k} \left\| \hat {I} _ {k} - W _ {k - 1} ^ {k} \left(\hat {I} _ {k - 1}\right) \right\| _ {1}, \tag {21} +$$ + +where $d$ represents the LPIPS distance (Zhang et al., 2018), $W_{k - 1}^{k}(\hat{I}_{k - 1})$ is the result of warping the reconstruction $\hat{I}_{k - 1}$ to $\hat{I}_k$ using the optical flow $F_{k - 1}^k$ , and $M_{k - 1}^{k} = \exp (-\alpha \left\| I_{k} - M_{k - 1}^{k}(I_{k - 1})\right\|_{2}^{2})$ is a weighting term that helps mitigate the effects of occlusion. + +Therefore, the Temporal Consistency and Perceptual joint Loss can be formulated as: + +$$ +L _ {K} ^ {T C P} = \lambda L R _ {k} + L _ {k} ^ {T C}, \tag {22} +$$ + +where $L_{K}^{TCP}$ represents the Temporal Consistency loss, $LR_{k}$ represents the perceptual loss, and $\lambda$ is set to 0.75. + +L1 Loss To ensure that the re-defocus module can learn defocus blur, we use the $L_{1}$ loss to supervise the output of the re-defocus module with the output of the blur decoder through the prediction layer, which can be described as: + +$L_{1} = \|\hat{I}_{1k} - \hat{I}_{k}\|_{1}$ where $\hat{I}_{1k}$ represents the predicted output of the blur decoder $D_{\mathrm{blur}}$ , and $\hat{I}_{k}$ represents the output of the re-defocus module. + +Total Loss The final loss is the sum of the losses mentioned above: + +$$ +L _ {K} = \lambda_ {1} L R _ {k} ^ {1} + \lambda_ {2} L R _ {k} ^ {2} + \lambda_ {3} L _ {k} ^ {T C P} + \lambda_ {4} L _ {1}, \tag {23} +$$ + +where $LR_k^1$ and $LR_k^2$ respectively represent the perceptual loss of the align feature $F_{a}$ align after prediction supervised by the sharp ground truth (sharp gt) and the blur feature $F_{b}$ blur after prediction supervised by the defocus ground truth (blur gt). $\lambda_{1,2,3,4}$ is separately set to 4, 1, 7, 1, respectively. + +# B.5. Dataset Details + +To evaluate the applicability of our method, we conduct tests using seven real-world scenes as in Fig. 10. These scenes are captured by DVS 346, where events and frames are $346 \times 260$ resolution. The "Pic" test assesses the reconstruction performance for defocus events with similar focal lengths, while the "motionspeed1" and "motionspeed2" tests evaluate the model's suitability for handling motion blur. The "desk" "board" "library" and "toy" tests examine the reconstruction performance for defocus events in scenes with different blur kernels and significantly different focal lengths. + +Table 5. Statistics for Test Scenes + +
SceneNumber of FramesNumber of Events
pic1357912802
motionspeed116923476852
motionspeed24111426136
desk28914980786
board20436806803
library22310912574
toy3776575390
+ +# C. Appendix: More Experimental Results + +In this section, we primarily present the qualitative comparison of our model with several mainstream models across all real-world scenes and the parameter size for each model. + +# C.1. Qualitative Comparison + +In Fig. 11 and Fig. 12, we compare the reconstruction results of our model with E2VID, E2VID+, ETNET and SPADE E2VID. From these experimental results, it can be observed that the reconstruction result of our model is the most effective in terms of blur removal. It is capable of clearly reconstructing edge details even when there is a large variance in focal length distribution. Additionally, the motion blur removal effect under varying motion speeds is superior to that of other methods. + +In Fig. 13 and Fig. 14, we further evaluate the performance of other mainstream reconstruction methods by using their results as input to a deblurring model, NRKNet (Yuhui Quan & Ji, 2023), and then compare the output with our model's results. The experimental results demonstrate that the reconstructed frames followed by the additional defocus deblurring network, still fail to effectively remove the blur. In contrast, our model achieves high reconstruction quality. + +![](images/8d3a14a74cd7887e09a3fe79ec8777c5ebc214fd20d51c27fe152deb16cfb4e4.jpg) +Figure 10. Examples of our real-world dataset. + +![](images/06ea3a5cbc63cc4a5b2cd625529bf1144a5689f78c9f4b59f8b5be5813d5e43a.jpg) +Figure 11. Visual comparison results in the Desk, Board, and Pic scenes. We compared our model with E2VID, E2VID+, ETNET and SPADE E2VID. + +![](images/c3ddac38d503872eec59de645926af171ae414bcdbcfa899299c2b5d25fea12a.jpg) + +![](images/2bdc812cf58ca2462ee3c6d2691276ace638080170e1740099461e135713b1c2.jpg) + +![](images/bac933306ec30a9236104ca92e95b71cd9afa30cb43d222d4c1ccbb749893b88.jpg) + +![](images/c13803eee9b9ecc47c35216f83b8af19067dec43901a3bdc5190558c9eaf7192.jpg) + +![](images/177d95ddb35107a0667186060f82ee2e1b013451d2cf5acaddb5f33993f90e53.jpg) + +![](images/6850538dd92aa1762d91de4e620d6f806f0e7cc9876232faffe77958896df525.jpg) + +![](images/144815b41790774aa666788a6772eb9dec4a2b7d0981441afbb97e4e02cd342f.jpg) +# + +![](images/ca4fe229a4a361702d9115421f73242efe3a977d485e936182e35ccad1e68af1.jpg) + +![](images/3b942332e53411b7cbc3098390fbe22a2ea9116c300f90ec43237e9f8dc35498.jpg) + +![](images/a0830ac9501575d2018fd3c5ffea3d855c3ce5b8380b371649e79f0bfef004d2.jpg) + +![](images/22dd546bd18cc2da4d6915214590583fa4623b38c47cbf1d668c243a3ef5f10b.jpg) + +![](images/01fe46cce78696af6537c9285961b6e2b8423389fd6694b1e2b5a98fcb1a47f3.jpg) + +![](images/788855a05620e29aab87d8460e8a5058f435bef480e39795ae57a374e86da54d.jpg) + +![](images/a64e3a41bfbf8a61931d1e293458964766e0bdf5823d3e1061cffa9550530780.jpg) + +![](images/bdea4ae27f6521f9b02e6f8d9a46026d3aadc1200baf69d30b429c4cbe687775.jpg) + +![](images/1dc77a2584745170a0d895be95b7a41fbef465ff08ba4b4513ee16deb10d8f00.jpg) + +![](images/25dfbd87e871fa2448364b5609608049a56d54fdab8c72521de0f2e0a7820a55.jpg) + +![](images/cb8cd6a1577e7c1e9e4ae6aac706f5814b3c224d9aa02831dcc1bd41800b8cf0.jpg) + +![](images/cfb253277a32ccb2051a38d1bd6484707f5dc73c5a25274ae9595516f800b90c.jpg) + +![](images/4e96138ae8b7ecb62cd1d7a449850ecfe72fca76c17aadaf3ef43193fd4c6ed0.jpg) + +![](images/a9ed56e45efd8c7f949e0a51280f249d9a1a8484a55b985ba1a1abaa3f50607a.jpg) + +![](images/07dab2112ff144165cfc6db44121c852be6b53bb5be940239344c771b2e62f74.jpg) + +![](images/29fbc74b3504b32b94f8e77bbeb263a3ed62cda023b9a674f4e19447a9d00437.jpg) + +![](images/6ee1787425e844a2f1f88d3641cc66bed0a8c7ca3b739caa4c45ad794a3d45a9.jpg) + +![](images/69cc3a0a6a601abcd88dfb32e3503fda8e35d7b8a8d39729263a7ea3013d1ffb.jpg) +s1 + +![](images/eee6d2b52a90dc8ed6d96506589881efc73e87ae2c42bee1404243c38fa31226.jpg) + +![](images/e3dbc7a9c47a110631f321091c638f76f18ad4f0e75f567fb835e74ce97a32f2.jpg) + +![](images/4d1e16ec332042ca9bdf494179a4d046d07f785c8d32c82a28502b3778b0a325.jpg) + +![](images/2bbcbd4593e8db3f4be10589552b2181086df92b2ccfc3c29dd66a3238e8bd3f.jpg) + +![](images/c34a4a876dbc966c6993acce00657a4f3ce521edbe2c8131a42d12742caf5c87.jpg) + +N + +![](images/ba6a8841b9627de13a22ae1ab74ae75c118abee07d1ec2a028e136dc9086a4a7.jpg) + +![](images/c46770db8fcd7e5e0a962456d10d63e45369789b7cd6af96349a44d7b3ab5416.jpg) + +![](images/f3b1798912ef72a1f143ab52312d722584a1c216446b1a8ee6abf8983c4d9e54.jpg) + +![](images/4742b903da7a7667f26169ae32343115037840607bd0fc18592949e8a6f983a2.jpg) + +![](images/6b32bcf0a1920f37c1f5e54e83c1e43123241f21fcc82075d0f5ef936960b612.jpg) + +![](images/968f1c93d90401e7b8cfa852953e432a3cf21ad833ee66600fac09ebd6dee57d.jpg) + +N + +![](images/b9f750f976360d82fbe15fa1e9d0b5721c93a4715e5af2134fdca74c84ebef52.jpg) + +![](images/f6cd041906dddf12b47664d937e917b6156acbc44f3491c2192e3d43ee89e843.jpg) + +![](images/8fd8985df90d1bc071759536adf1976b58831703e75fa173d0ce9fe32081ffaa.jpg) + +![](images/f42a073f9be59841bbbf9e5fa5889e433bfe9177b9730baf8a41ecf433b190c1.jpg) + +![](images/254f4f9699c790224a2c5a671acf590c7f8eb4f139d35ba10d778bdcc4dac83f.jpg) + +![](images/370d18926bf57113290bc4d29e4e4ee936fff2341bb4e93204e3a8246ab6e78e.jpg) + +![](images/bd5f8f5efb1ca52709d609656d19cef6659b325bb2166557ddc816a5eca3237a.jpg) + +![](images/e2bc332f5cfe74d6879045113533777e9a5bbd3cea6cc35d774c1a3de27cad1a.jpg) + +![](images/88993a817da1b42ed04c922009475e266196002dc06d11e0e0150fd03045a61b.jpg) + +![](images/d5864f7ce1884f363e50e8c2a12ab8931cd84a148983216e0ed19231f099c4e9.jpg) + +![](images/ed7320bf59a8ad18643e879755f323d4cc4850d9ee25b3a4703b7e4ae7f09b8f.jpg) + +![](images/c15dd4f798c480d3e9c91cbc1ce2ce9a84bdae7ce7926f39dcbdf7773c057f1d.jpg) + +![](images/d1d0f4e8a84d9def1e0022b4af9e7cf0dd3f214d38b9317d7aa928b1a71aba57.jpg) +# + +![](images/d2f19ed39015c50aec582a4488883fb77764b661b2a74f5b63e8d7aec263e8e9.jpg) +Events +Figure 12. Visual comparison results in the Lib, Ms1, Ms2 and Toy scenes. We compared our model with E2VID, E2VID+, ETNET and SPADE E2VID. + +![](images/ec3e9a96b30fd88b4fec96c1ef2f5e3399232b0f7881f76da70bfc5fdf404d65.jpg) +Ours + +![](images/677d9643af63e0c25ac6eab4cc7536ebcf4760fba6997866560aedce20876968.jpg) +ETNet + +![](images/237bee4ba26b1431da638e0da86c88f46f5091b84380427fd236612de0a45761.jpg) +E2VID+ + +![](images/0c45db04b12caac62b0d5dd7b244137b205f1e298a771f48ea4206feb7afc5d1.jpg) +E2VID + +![](images/8a1ae163474485c51643f3eca215eda391976b1d0cc515b6f8c86fcc7072a7e3.jpg) +SPADE E2VID + +![](images/706cd227ffbfd478adc287c00b9764a48a631556b02f91a11862d3c630686efa.jpg) + +![](images/00b710e4e34d24260690c39d37135187fe09892e37aa10e82badc2f1d08f7bf1.jpg) + +![](images/d83e9f4f26dd6d32fc701bf3522ad6288cb2397d03a23f82dc2e0099ab375b9a.jpg) + +![](images/f799da84b34776bef22c04d2decf3d018ca54934b944e7d97aecca44bfe09f71.jpg) + +![](images/a9e2648676b045a8199d0433b181699d0c82508af7b217bc5c1ed55b482e7e2a.jpg) + +![](images/3ae4e979e9e5c21ccd5dc1edeb9dddae7fc86a13403c75f542382e081dcc5cff.jpg) + +![](images/301f1e762194c82e298b3d5a65439763f2bfb36dfc3d37889d40d7e1713b3a81.jpg) +# + +![](images/86775c1d4af9d2a24975bb5ce3233ae1b015a631d46f490fd4c3629fdff36045.jpg) + +![](images/eddf60354efb7992d625366fa50b585bcd2cd60922ca1038e177b7b23c623b15.jpg) + +![](images/3d15eaf74dd5e57e6f96482033ab8e132594d164944c84152eab20fd0ae70c8e.jpg) + +![](images/24cd3b37079638b8788c87b8fbf78564f59749d6d1c77d398fa511c7d49e3715.jpg) + +![](images/3b1ddc8dbbc27aecc875984754ec85498279074b714fcf42349e9145965cf2c1.jpg) + +![](images/06e88f843f62780c7de534aa498fa899507849cf8a00f4658673fcdcf35255f3.jpg) + +![](images/a1ade451795bda71a53f56f179a6affd958832b8097bb1b2aa425ae17c082226.jpg) + +![](images/519ef6077a48b116a567dbd5d5a9af49afc982651a6ecdfae28be87e6e601286.jpg) + +![](images/a17930e8ab9ff40e23d4d2072178acbcfa0e6df9a75e8f07bbf948ee7793a687.jpg) + +![](images/2d96ac76fdc0839b7225d4900b29a9d409d02525970f8c371b0ddd150901f088.jpg) + +![](images/eb10f38b419d9d6e08dff6bfbbb42fa6136cb430f4a5a00422bae704e84f5959.jpg) + +![](images/7728f04782c04080bcf9016374df14497f4824ca1fdf5fd1ce7a96648fe510a3.jpg) + +![](images/01cc227d25bdd7635ed1b4c77a3216f948fbd1a175ed4f82726370de2b36a13b.jpg) + +![](images/8c6d876a43fe62a5faba0f60cd6c72dc2a50f3d6e850e65db9306b6e654bc76b.jpg) + +![](images/a732a5bbba561a64841d685dd37a261b0c6e8dad2c397f1245f09d2b1f71490b.jpg) + +![](images/0fd994a67c833af80f182b11add3165f5f668cd0c4d9d12d5ee703481724d05e.jpg) + +![](images/7dd1a44181b7bdd9d8f9251639a666dda68ad459664c560ae2384001fc5fd516.jpg) + +![](images/e1c7b3ea977028347cb3e67c068145c3460c8572f4ffe114f115dd6fa335bb44.jpg) + +![](images/950cde44a4314220893f81d8c855454fe8669fcb3b202f55646ad12d051955f9.jpg) + +![](images/c6ca371ff7b107d6df721dc101091f9c8297f41e620aef0c1e9b41f0b1ae71a4.jpg) + +![](images/22d5feb0143558e82df997edf963dd36b4b19c2ab9c4e8fa1f8bb3d29661112d.jpg) + +![](images/54f962f9ed6d64f4508ba6a3ff864698eb2d6cdffde3159f25584efe426c3da0.jpg) + +![](images/ea822f700f792017e72dc0a34b3937fbdd058401ce30e9cff939d79efcbd26cc.jpg) + +![](images/a6d0f2be37a68d9ed9d5ffa27d4afb67edfdd8451a4dd0aa03cd2575bb6abac1.jpg) +Board + +![](images/7210edacc5651c7af7ffcffe6593889a42db3f703c7a421ff812b58d5cef830c.jpg) + +![](images/159bb3950af0e19fc27b05cc6c491bf0435a08ad78eb8c7f3a8886bbb207344f.jpg) + +![](images/7fdfd09c37c429ed8c61d35da0a21065ee04a212e1787287ae996db706be2fc8.jpg) + +![](images/4c7d36ab1fa94c6033368452f43180f577339cc1da97c42980861f9f92486a0c.jpg) + +![](images/b9ebff93a94a896abf9c89a9029a3cfe5513d0630da193d551e8670713e634a0.jpg) + +B + +![](images/6185d01779d120e87c42c5f6305ad144db6c031cfcd0b70eacffa16102dc9444.jpg) + +![](images/91bf61ce79ff0a07324a8634c80f9eb058f8f6b574d6f488c0389c0285bc9581.jpg) + +![](images/42e920ceff46b3b87ef95525312f287ef78d5c681367939dc46340521eed33fc.jpg) + +![](images/effb806297fc33432f35ebf7383d122709b84085b45daf9b65169e1678430641.jpg) + +![](images/9727e8217e597502d036ae63c94e0904d236fdf26897125d027640b94fff2079.jpg) + +![](images/d9c3cdcc37fb47ad22c0b8e313f44fc041dad97deea1e119af707b40603e7bff.jpg) + +![](images/13fc97cebd2743066d5c2682d9c6f02b95be058ab984e5126bee386e8feb0738.jpg) + +![](images/74c3c2580504b4a3487e84e252f399c3d48c1d5130c1a05aa371211c3a71da5a.jpg) + +![](images/bdd637a3cdd4147de75305486069fb3758b4844e24b42d61a7b0e0b12786a6d5.jpg) + +![](images/23a93797ac2a1f8034688e68de796f402ecedb8b9fb872e5d4f5b0d82c34f3ed.jpg) + +![](images/1601116f4948af0a8d6020b00bfd7795c3885fbc9ddc7ad9219bd54c875ccec2.jpg) + +![](images/3f4014ff338e2bad9d6dff66f4642987059ccb529cf270597624349258059787.jpg) + +![](images/fd218b639f7acb404bee9664b3e6b795de33d6ffcdfee811a8f0ba5ad2b423ce.jpg) + +![](images/85484e1d290d9236ed0861aedb1e4233724ebb0343663297542b04046e224990.jpg) + +![](images/c0c147f902d1104191427c450daf716ae3c3e2984d16718b79a011211a1f3494.jpg) + +![](images/3182f6e3f45355ac1c0264e0420cfeea009ec57db237d33a4c3aa19b434ec63f.jpg) + +![](images/8600de61f97110e0f86c5cb888a6c1ce8423d24dae810d7129704fdbbe6321b3.jpg) + +![](images/62818a496f78d3036e6a7f856edef132bf461dfa4d718da67aea643e8c5e6ead.jpg) + +![](images/4fe61a329c3757959f2c21b511030233722ec2378993234a781d668cd62db7e3.jpg) +Dess + +![](images/464742e9868c62e08b9933263936892ef22a95bc5affe9d72c5252a28dc3b9fb.jpg) + +![](images/3fee061cccc5d84b9b5d8f90573f17632c7523eb1c2b1c015e64ae25a67e2deb.jpg) + +![](images/ba8c087b465efeae72898deb2809a703a7f6756272a7417191e247ceaa43fc58.jpg) + +![](images/79b4db83c5410cb18ac73a67df2b75b48e5a951ed43e637041e9f9bc5d423356.jpg) + +![](images/6408bdad5e85abeb1e8095f1d0389ea628e73ab6f2ab26348344cde1c5a58cbb.jpg) + +D + +![](images/68f59817dc76892b859c6d6fbbcab820621070d1e86ce802a50e7245c96f368a.jpg) + +![](images/45ffc45aa006f1cc548323d8e60962e28d2a8b7d89e20fb4de8650bf5833822a.jpg) + +![](images/92847e8b38fc04870ab56f96f822caefb6970509b02f45e679d512bed81c9816.jpg) + +![](images/7b4186960c90567e4dd9e224c9a74f52ab48cf65d1b19085d65866fe27971a9d.jpg) + +![](images/1168e8d359db5f2e381932f7641fcca901e0d852e45a19f7618e24b124ed4e50.jpg) + +![](images/22cff49ea074ee500a4697489402575aad63e515c8c1e567e6d9271c3e767bd3.jpg) + +![](images/b7060e0f2be5c93c144ab57a2877bbfc3df2129087e113734a5737fe157531fd.jpg) +Events + +![](images/662b856e30f54c4800294e13132309004fa2e28d8997e155cdaae75bc33083fd.jpg) +Ours + +![](images/8ac5f3c5e24059ba3a6f01da28a8c31138862bf8e7458999905fadfd3c2d6d98.jpg) +ETNet-NRKNet + +![](images/a2ca48f34329239b65bcd918679a7ee330e031a06f64ddf2f2ac337e3fc44e2e.jpg) +E2VID+-NRKNet +Figure 13. Visual comparison of E2VID, E2VID+, ETNET, SPADE E2VID followed by NRKNet and our method in the Pic, Board and Desk scenes. For a better comparison of defocus deblurring, we utilize the reconstruction frames from E2VID, E2VID+, ETNET, and SPADE E2VID as input to NRKNet (Yuhui Quan & Ji, 2023), and compare the results with our method. + +![](images/3ad548d819a769ba45230cd97327bec64a998cbc804b49754653bf26e1cc5ef4.jpg) +E2VID-NRKNet + +![](images/d5522142f1585cf57d747117fb48f3bf3d82c19f3d1dce3b4515c5d8386a8229.jpg) +SPADE E2VIDNRKNet + +![](images/b1c276aa181bb9a5aa8d547e97b836f470a4313ade3b3270dec0685c96bec92e.jpg) + +![](images/b166438d5e753575079699562e514a6f7b3ebff0ca8c81570765de70fa6caa8a.jpg) +# + +![](images/499303a21982890bb80e7f4f1db2deff313651691b9f3929d66b3bf0114249e9.jpg) + +![](images/1f4f1a716d85a872dcc715d29f903e4410ceeaffee9e371fa50763464b53a4e4.jpg) + +![](images/c338c13f3f84c0abbcdfe682e5912059a67ced12b1ec17a3563479c80ae87b34.jpg) + +![](images/335178ff457903095f0e09179c0d1af10eb7d2e46e033a6be09f0668498d08c0.jpg) + +![](images/e4124591a5313647538e78f513b2d2bfc11b90cd48e7f1c8fc2c8998cb4f0640.jpg) + +![](images/598d77de4f1cc89ed1ef5d5a925fa39ffeafc8c7eac94448856bbe36b18c1c51.jpg) + +![](images/256834324ece7a2cb35697f7e2703e7ba7e179ae26b68031e398539779d86543.jpg) + +![](images/3dc13b623c04cbbcdf4d1d75b9fee866834d130b8528fa8a2e342b92cb5314d1.jpg) + +![](images/5c272550b871490b1b3b94249429e66913fee9cccd6ea16fef5b16bf932e825c.jpg) + +![](images/e4ab3d6a34abc22cac13305b8654179052009f10c88f8b76dd398adc8c357a8b.jpg) + +![](images/0fdb9134fa9a133f35a83b74437f34b7ac5240d2c86bb8324d8e436d850b6b0a.jpg) + +![](images/33ce668ab2bddb6a704908730923a0f5af796c9cfa83193c90845a8fec420b6a.jpg) + +![](images/a1550e712f5710aba0475be5171578fceb6558da4dd71e6af2c005d5441bb3f3.jpg) + +![](images/629c8b982be176ffe377c3ea00710b1833bafe8d67cd8542f5f07da0f91a2967.jpg) + +![](images/3100f6cc39935229b81dac68b74bffcdfb23b9c48d36c109e8bd960bad3f98b5.jpg) + +![](images/33d199c736e0e463abb00bd5cb16d277d71fa55f3b1086e8ebf3cf328953581d.jpg) + +![](images/ef3d56b9c6bf0460946b4ee8873cfb30c2baf9fda72f564eef23dd4a44e8014c.jpg) + +![](images/5b77458742f7dc2e93994102d4159deb57b56b3b6dac8fad127fb9528421a8d8.jpg) + +![](images/8313da68cc3e4d9d7c913f93e6081d7d45bb3329ec62175a8e5dbdc3ad7d5a61.jpg) + +![](images/5fdee92657bd5b7ce11b74a00c532c5fae4031a976fda220628e7660379c9e81.jpg) + +![](images/d169a8fd5e363b7a5166d2ed421e6714bd74072d08d73cdafb7207d94fb464e6.jpg) + +![](images/0c094f4d0679679dfd2fad9bd403257926ef0330708a2e0bee9c88f14f6e3cd1.jpg) + +![](images/8619ae505dd6cbf0aa4f64bf1054c9f3ef374cd01de6143be55150a28796c5fd.jpg) +s1 + +![](images/45065c650ff3e4997d2138c63efb46a9c4798d55616e16c2649416f6117b84f0.jpg) + +![](images/8d072367b45dc7ba2bed05c7a0feef3124674914dea42579fda4b6ae5db9f2e2.jpg) + +![](images/2ba0ec51bfa3594971e725f10d8901274b01df44ee5140736631dff1afb1231b.jpg) + +![](images/beef49a730b4b3b7d07ec529ff9abdc8d13713c9435d26fd9409b9ce9c6edf0d.jpg) + +![](images/69acec6c900dce65c3ffd1b2b95b323629c2c84d19452ff9b57cf9d1b51e6fec.jpg) + +![](images/95cf00bdf8b1242b177cdaf865382ed5634a76a865bf8763ada51845551b0e16.jpg) + +![](images/ce673c9fbfbb914f7b4ef15737ae60c793d311b6fd4cb02d148593cca9020c24.jpg) + +![](images/c3ba1f159861d56960c4c80c8eeb764efb36dc2b4b6ebcf9d846b3e75b125bd7.jpg) + +![](images/55e35faac574032892de81d06181b1ec9bd96f40d2438945d27269d153981b08.jpg) + +![](images/c89cfb64b923b847eb8936103fd390c9b9ef19c537e888f82748681f71999485.jpg) + +![](images/207d1f345584036436ba385cff5fc9239b709d11dbb1c35839bfc8d148625657.jpg) + +![](images/9e7b167c69328615014e707fe8e176b5503f2b7d9efdba9a3a43055db7e4a9c1.jpg) +N + +![](images/2520e448f8d5bd9845ac227b2f09801f05aa745ad94ee358073f3d43d924133b.jpg) + +![](images/ea71706ffff19e8a31900ad6f9f02286cfe4288684087d3486e64ffec7ff17af.jpg) + +![](images/64b2280302c5c1ed4133b06e2c458480ce6848380002f1012e4caa8a71c3e0de.jpg) + +![](images/2a9a323858214edcffa30a3ac3d2f858e3e17184255197b11abea89ed50ff3b2.jpg) + +![](images/32793db43fd973eb83cef5a6b899c83efc4eed860755b1db402143486781f997.jpg) + +![](images/3ce96c4e853158591ceb784b37317928d74ad8136d20426df24eb25c69796abf.jpg) + +![](images/682bb3dd46782228ac815a53b264faeef1f7fa50240046cab417ccf604d15644.jpg) + +![](images/9531576c68215ba13e26d96c7dadf073ecb816cbfc79d5a181cf1c97d7971a9a.jpg) + +![](images/eb50155c34818a5bfc21271fd1ae523269dfa07614255c5aa1ec39061d09d251.jpg) + +![](images/db54a6bf25a5cd6928ff842777e2df843c409c64999827262fbf7c9a708dd471.jpg) + +![](images/0c84cbf5b7e7f430db8024024dbbbcf26b67591ae4a3dec6bc36cb4a0f602369.jpg) + +![](images/152e03c92c2278fee97d545b9b9c98cd4ae36595ec3182e7558ded6b93acc1e6.jpg) + +![](images/0bfb8d4eaea0ad5f4dd492ca1fedb372594f6bcb4f6e963fafff60ada872de56.jpg) +T + +![](images/7bf7e9f8659f7d75bfffae64193a57aff3f43bed77e532a60534e3959abccda6.jpg) + +![](images/4446cee4bc122dd043ed8b6910b3e219984799da38dbdd7df9683cba37f56582.jpg) + +![](images/ae05e9733f75b3984a12bb73576b2df603e378d47b279a62efac952c80742fc4.jpg) + +![](images/f6fe9101cb23b4b9763aefb541b1b4786c9722dd65587f26d961cd8323ea0e17.jpg) + +![](images/b8cb3e5ec8cbe38726f57a478e379b8ac4b765774bda93e35d7ba1b8a2134c67.jpg) + +![](images/b5277eb95c4745ac0cf3eda052fa0d2c22b99c94707bfad87a25c1dfbb0c41aa.jpg) + +![](images/ab1b6316d162447a4eac7c07a1a7ae8550aadb78e16b4c279de90998c08263a0.jpg) + +![](images/84893ec83f6940e7a500e5a079db02826dc926751b974ca5ba0502801bb5462b.jpg) + +![](images/f21868964f9c57ee8d5ef9df70bc29972102371d00775f85fca07993f88c5e1e.jpg) + +![](images/684b3070434dbe4921c43fe099dd5c6f18c38efa4e4f19974b37faade1a0a59a.jpg) + +![](images/c410aadb920c35eabcfb7b4f3058df488bea75f61e4b07759d82aadb17e00dee.jpg) + +![](images/b226a45906b1481add6ea7affa306c3e300140757636d1f4de5e395cf6535859.jpg) +Events + +![](images/926d6ccb0a9cc6784a719c3452b61a6e99da484ed95b583233ea4350a62a6008.jpg) + +![](images/b2f7bc9dd1ca269f4c19c5a2926d5eb727067dd42ae86fef9dd5b512deaa4a90.jpg) +Ours + +![](images/21319766a5e23eb0dc162fbd81c7971cfac5352fcf3097fbca357de1238b9fe8.jpg) + +![](images/53e4aa0e7920c62c60f6390dacfaa5a3244bf8e421ecde15eacf4a021363977f.jpg) +ETNet-NRKNet + +![](images/eb430c65dce6159ff8585549e2dce0ee845a0f0241423222b46cdaa476434c10.jpg) + +![](images/1f3e851800520b668c8ed5ecc052f15bb78d39c3ed3f2aeda9486e432b08eb7b.jpg) +E2VID+-NRKNet +Figure 14. Visual comparison of E2VID, E2VID+, ETNET, SPADE E2VID followed by NRKNet and our method in the Lib, Ms1, Ms2 and Toy scenes. + +![](images/d13ab8cc0b34ec67d29acfc57b51343e9c409b46acb6edecd5eb551c69b278bc.jpg) + +![](images/aa419b5c0ab4e181b5938018b7e0cb4389b86fed1675a66a951624194d4b7aff.jpg) +E2VID-NRKNet + +![](images/1a3e9685f62a4a50dc2a84a53ee5e19ddd184384f8a330923fa034b4e20bf3ed.jpg) + +![](images/5b2220adda6888159991c82145a1009c57dc2c2d9ba94beeac2af4454f9e8bdb.jpg) +SPADE E2VIDNRKNet \ No newline at end of file diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/images.zip b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f70542c13d52dc62db502e0335dc61eb4573098f --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49140e9d236ef01a6706f437076a23945256c533ca140a211d6658d60068c640 +size 2424294 diff --git a/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/layout.json b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..558faddbb1359b739f22907b05a6852bde6fc9f5 --- /dev/null +++ b/ICML/2025/EvFocus_ Learning to Reconstruct Sharp Images from Out-of-Focus Event Streams/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c6a936d86162fa50cbf40bb755afa4fdf5d828589cadecf7ffd7c0654adb20c +size 1110041 diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_content_list.json b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..819d5b6eac03068c242f0e9ecb1661d662a8e823 --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddafeb6a78aec86aadadc8b9ff49d4c51cbbe654a42af692131c79bf150ff3b3 +size 299458 diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_model.json b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e385c0ed143b76d4842146c031af126e89fac850 --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8e31a5fce70cf7bcf5cd7f84d8b50b65ff0ad6a746f1b03c9825ad5ef21bd18 +size 342369 diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_origin.pdf b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7b16036261cd2a27d1a5aa2327f7b7e9e7955e88 --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/2d902487-60b1-4184-b7af-65bbbf51aa57_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af95fcc9032dab6dc4e2f875c969dc9e64332e296047118caeca9dc39d4ebccf +size 1362827 diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/full.md b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/full.md new file mode 100644 index 0000000000000000000000000000000000000000..73ba0e67c05abb9a5d2667fc33bd332de7c050fc --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/full.md @@ -0,0 +1,732 @@ +# Evaluating Judges as Evaluators: The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators + +Yilun Zhou $^{*1}$ Austin Xu $^{*1}$ Peifeng Wang $^{1}$ Caiming Xiong $^{1}$ Shafiq Joty $^{1}$ + +https://github.com/SalesforceAIResearch/jetts-benchmark + +# Abstract + +Scaling test-time computation, or affording a generator large language model (LLM) extra compute during inference, typically employs the help of external non-generative evaluators (i.e., reward models). Concurrently, LLM-judges, models trained to generate evaluations and critiques (explanations) in natural language, are becoming increasingly popular in automatic evaluation. Despite judge empirical successes, their effectiveness as evaluators in test-time scaling settings is largely unknown. In this paper, we introduce the Judge Evaluation for Test-Time Scaling (JETTS) benchmark, which evaluates judge performance in three domains (math reasoning, code generation, and instruction following) under three task settings: response reranking, step-level beam search, and critique-based response refinement. We evaluate 10 different judge models (7B-70B parameters) for 8 different base generator models (6.7B-72B parameters). Our benchmark shows that while judges are competitive with outcome reward models in reranking, they are consistently worse than process reward models in beam search procedures. Furthermore, though unique to LLM-judges, their natural language critiques are currently ineffective in guiding the generator towards better responses. + +# 1 Introduction + +For the last several years, the rapid increase in various capabilities of large language models (LLMs) is mostly attributed to scaling – the corresponding increase in model and training data sizes (Kaplan et al., 2020; Hoffmann et al., 2022). Nonetheless, this effort has gradually saturated due to lack + +*Equal contribution ¹Salesforce AI Research. Correspondence to: Yilun Zhou , Austin Xu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/cd7af8c9e850cc9d772909eff601731d5aa0ace86e152e31f8995cced8cbd9a6.jpg) + +![](images/4fb050a295229b30dc5ca20db9b039921e66780b9da61772c19b662ba31e099c.jpg) +# +top-K selection + +![](images/f9df78186830f0221951446bbfa0ac4acfca58424535c708caf0d5dced20ac0b.jpg) +LLM-judge + +![](images/6dbf4c4722c384f15150c72ef50485cc2ac1836807a369c325e8c80069212121.jpg) +put query + +![](images/2e48fffd6142cee13d4cd2375e5689ee10e112f16f8b62c261608b690c297ab0.jpg) +Partial response + +![](images/ba334a0e100ddae63df6b848d37398e11fd34c72d2025b88ed960ffec2468ec9.jpg) +Fullresponse + +![](images/43bbed717fa66b3d0ab8ba1687364d9e04af7cad61115f35863013662c75d2da.jpg) +Model generation + +![](images/9d4a0e557225260335fa77410e3e28444e4ce3b3280081bfba60795bea90efea.jpg) +Refinement generation + +
JudgeReranking ↑Beam Search ↑Refinement ↑
Prometheus-2 7B-0.107-0.1000.976
SFR-Judge 8B0.0350.0010.941
Skywork-Critic 8B0.0390.046-
OffsetBias 8B-0.0200.015-
Themis 8B-0.149-0.0210.996
SFR-Judge 12B0.0130.0470.943
Prometheus-2 8x7B-0.079-0.0830.966
SFR-Judge 70B0.1710.1380.951
Skywork-Critic 70B0.1770.132-
Self-Taught Eval. 70B0.0950.072-
Best RM0.113--
Best PRM-0.195-
Random-0.193-0.139-
Baseline Value0.0000.0001.000
+ +Figure 1: Top: a graphical description of the three test-time compute tasks in JETTS used to evaluate LLM-judges. Bottom: the leaderboard of judges on the three benchmark tasks, along with outcome/process reward models and random choice. “-” means that the model cannot be used for the task. Achieving a value less than the baseline (grayed out) means that the judge is worse than some less compute-intensive approach (e.g., greedy decoding, see Sec. 3.5 for details). + +of additional data and prohibitive cost of model training and serving. Recently, test-time scaling is being considered as an alternative solution, in which more compute is dedicated at the test time in the hope that better model responses are generated (Snell et al., 2024; Jaech et al., 2024). + +A common component in test-time compute is the evaluator model, which gives a quality signal to various generated responses. Scalar reward models (RMs) are predominantly used to rerank either complete responses in best-of-N selection or partial responses in step-wise generation (e.g., beam search). By contrast, generative LLM judges are often favored in model evaluation, e.g., AlpacaEval (Dubois et al., + +2024b) and MT-Bench (Zheng et al., 2023), since they can adapt to custom evaluation criteria and can (often) produce natural language critiques (or explanations) of the response. + +Despite LLM-judges achieving competitive performance on reward model benchmarks (e.g., RewardBench (Lambert et al., 2024)) and PPE (Frick et al., 2024)), they are less commonly used in test-time scaling scenarios compared to scalar RMs (Ji et al., 2025; Ke et al., 2025). This gap is perhaps surprising given the potential benefits of LLM-judges. Namely, judge models are often trained to engage in chain-of-thought reasoning before giving a judgment, which could not only benefit for reasoning-intensive domains such as math and code, but also serve as effective critiques for the model to refine its generation, such as in Reflexion (Shinn et al., 2024) or SCORE (Zhang et al., 2024b). Furthermore, LLM-judges could seamlessly integrate tool use. Last, LLM-judges are inherently "instructable", capable of giving different types of judgment like binary yes/no answers, numerical scores, fine-grained feedback, etc., simply with different prompts. + +In this paper, we propose the first systematic benchmark of LLM-judges for model's test-time scaling. This benchmark consists of three tasks (Fig. 1): (1) response reranking, where the judge picks the best response out of several ones, (2) step-level beam search, where the judge guides the model to generate the response step-by-step, and (3) critique-based refinement, where the judge offers natural language critique to the response for the model to refine. We evaluate 10 different judge models, ranging in size from 7B to 70B parameters on these three test-time scaling tasks. We cover 3 different domains (math reasoning, code generation, and instruction following) and generate responses from up to 8 unique LLMs, ranging in size from 6.7B to 72B parameters. + +The JETTS setup enables us to analyze the effects of judge-guided test-time scaling: Can a "weak" (e.g., 8B) judge actually help a "strong" (e.g., 72B) generator? How beneficial are strong judges to weak generators? In what domains are the current crop of judge models best suited for test-time scaling? How useful are judge critiques in practice? We find that weak judges can help strong generators in easier tasks, such as instruction following, but not in reasoning-intensive tasks like coding or math. Larger judges bring the most benefit for math and instruction following tasks, but no evaluated judges are able to reliably improve generator performance for coding. Lastly, while natural language critiques are touted as a defining advantage of judges over RMs, we find that such critiques have significant room for improvement in terms of utility. We present these results with many additional analyses in Sec. 4. + +Comparison with RewardBench. In Fig. 2, we present a preview of our results by comparing performance on JETTS Best-of-N Reranking and Beam Search tasks against RewardBench (Lambert et al., 2024), a popular RM and judge + +![](images/763213ed73fd3485557ec0c58f4e8405a73fd3d09155ca67647d965cc5fbc9df.jpg) +Figure 2: Judge performance on RewardBench vs. JETTS, where marker size signifies judge model size (7B-70B). Small judges perform comparably to large judges on RewardBench, but lag large judges on JETTS, which simulates test-time scaling settings. + +model benchmark. While judge performance between the two benchmarks is generally correlated, JETTS reveals a difference in the "fundamental judging ability" between judges of different scales. For example, if deciding between Skywork-Critic-8B and 70B, the practical choice based on RewardBench is to use the 8B model, trading off $4\%$ in accuracy for an order of magnitude fewer parameters. JETTS, which simulates test-time scaling scenarios, reveals that this choice is suboptimal for reranking: The 8B judge yields substantively lower improvements over the greedy response than the 70B judge. The benchmark construction approach likely contributes to the difficulty gap: RewardBench forms pairs of responses from different generators, meaning judges can arrive at the right outcome via stylistic factors, like formatting (Tan et al., 2024). JETTS, however, requires judges to compare responses sampled from the same generator, limiting stylistic factors that lead to correct outcomes. + +# 2 Background and Related Work + +The concept of using more computation at test time to increase model performance is not new. Chain-of-thought (CoT) reasoning (Nye et al., 2021; Kojima et al., 2022; Wei et al., 2022) can be considered as one of the earliest such techniques, where the model is encouraged to generate a reasoning chain before producing the final response. When the query asks for a "single-target" response (e.g., number, True/False, or name), self-consistency (Wang et al., 2022) samples multiple CoT chains and returns the majority vote answer. Orthogonally, tree-of-thoughts (Yao et al., 2024) and graph-of-thoughts (Besta et al., 2024) break down the chain into individual steps to search over. + +While some studies (Madaan et al., 2024; Saunders et al., 2022) find that a model could improve or correct its own response, others highlight various issues and limitations in these approaches based on the fundamental paradox that if a model knows where it gets wrong, why it does not simply output the correct response in the beginning (Huang et al., 2023; Stechly et al., 2023; Valmeekam et al., 2023; Shridhar et al., 2024). Thus, a new trend in test-time compute is the + +use of an evaluator to help with model response, commonly known as the reward model (RM) (Liu et al., 2025; Cobbe et al., 2021; Ouyang et al., 2022). Beyond RMs that operate on complete responses, known as outcome RMs (ORMs), for reasoning tasks it is also possible to train process RMs (PRMs) to provide step-level rewards (Wang et al., 2023a; Lightman et al., 2023; Zhang et al., 2025b; Luo et al., 2024; Dai et al., 2024). + +Mostly parallel to this effort is the development of LLM-as-judges (Zheng et al., 2023), i.e., specializing LLMs into judges of model responses. While vanilla models are originally used (e.g., GPT-4 in AlpacaEval (Dubois et al., 2024b)), finetuned models are often found to deliver superior performance and be less susceptible to bias (Park et al., 2024). To further leverage the reasoning abilities of LLMs and improve explainability, recent judges are finetuned to generate reasoning or critiques for the response, often before the final judgment. Since then, a long line of work has been proposed in developing specialized LLM-judge models, focusing both on data curation (Wang et al., 2024b; Kim et al., 2023; 2024; Wang et al., 2023b; Li et al., 2023; Vu et al., 2024) and training methodologies (Wang et al., 2024a; Hu et al., 2024; Ye et al., 2024; Saad-Falcon et al., 2024; Deshpande et al., 2024; Wang et al., 2024b). + +As RMs and LLM-judges are both evaluators in nature, they can often be directly compared, most notably on the Reward-Bench leaderboard (Lambert et al., 2024), showing close performance among the best RMs and LLM-judges. Due to saturating performance on RewardBench, with top models achieving over $95\%$ accuracy, new benchmarks have been proposed to evaluate the efficacy of evaluators (Feuer et al., 2024; Liu et al., 2024b). Notably, ProcessBench (Zheng et al., 2024) was proposed to evaluate how process reward models (PRMs) perform in identifying step-level mistakes in math reasoning. PPE (Frick et al., 2024) and RMB (Zhou et al., 2024) both evaluate RM and LLM-judge efficacy in pairwise preference and Best-of-N settings for alignment, focusing on chat quality and safety. JudgeBench (Tan et al., 2024) identifies shortcomings with RewardBench's reasoning samples, and proposes a more difficult pairwise evaluation set for reasoning tasks. Complementing outcome-based judge benchmarks, Lan et al. (2024); Lin et al. (2024) evaluate the quality of critiques for single-round refinement. + +JETTS, unlike recent judge benchmarks, does not assess judges using fixed pairwise test sets. Instead, it simulates three distinct test-time scaling scenarios (reranking, beam search, and multi-round refinement) and evaluates the quality of LLM judges by measuring the improvement they bring to the generator model. Snell et al. (2024) orthogonally investigate the efficacy of different test-time-compute scaling approaches (Best-of-N reranking and step-by-step beam search) with a fixed RM. Similarly, Zhang et al. (2024a) in + +
TaskDatasetSizeEvaluation metric
Math ReasoningGSM8k1319Accuracy via Math-Verify
MATH (Lv1 5)1324Accuracy via Math-Verify
CHAMP270Accuracy via GPT-4o grading
Code GenerationHumanEval+164Pass @ 1
MBPP+378Pass @ 1
BigIntCodeBench1140Pass @ 1
Instruction FollowingAlpacaEval805Win rate vs. GPT-4 Turbo, with GPT-4 Turbo as judge
IFEval541Prompt-level strict accuracy
+ +Table 1: List of datasets and associated metrics in JETTS. + +vestigates different types of verifiers for best-of-N reranking, considering only one evaluation protocol (binary correctness) for one prompted LLM-judge baseline per domain. + +# 3 The JETTS Benchmark + +In this section, we present our proposed benchmark: Judge Evaluation for Test-Time Scaling (JETTS). As previewed in Sec. 1, JETTS consists of three tasks: response reranking, step-level beam search, and critique-based refinement. + +# 3.1 Task and Dataset Selection + +Judge evaluation has typically focused on judging instruction following as a proxy for chat quality (Zeng et al., 2023). However, most recent efforts in test-time scaling have focused on math and code (e.g., Snell et al. (2024); Brown et al. (2024)). To cover both typical judge and test-time scaling domains, we consider three types of tasks: math reasoning, code generation and instruction following; we list the datasets in Tab. 1. In order to minimize the effect of randomness, we pre-compute the model responses and release them as part of the benchmark wherever possible. + +For math, we use GSM8k (Cobbe et al., 2021), MATH (Hendrycks et al., 2021) and CHAMP (Mao et al., 2024). For code, we use HumanEval+ (Liu et al., 2023a), MBPP+ (Liu et al., 2023a) and BigCodeBench (Zhuo et al., 2024). HumanEval+ and MBPP+ are further refined versions of HumanEval (Chen et al., 2021) and MBPP (Austin et al., 2021), respectively. For instruction following, we use AlpacaEval (Dubois et al., 2024b) and IFEval (Zhou et al., 2023), with the former being LLM-evaluated and latter being algorithmically evaluated. App. A contains additional details about evaluation protocols. + +# 3.2 Task 1: Response Reranking + +The most straightforward and used inference-time compute technique is response reranking, where the generator model samples multiple responses with stochastic decoding and the judge reranks them to select the best one. In our benchmark, recognizing that the greedy decoding often produces higher quality responses, for each input query, we generate the greedy response and 9 sampled responses with a temperature of 1.0 and top- $p$ with $p = 0.95$ , for a total of 10 responses. + +We ask LLM-judge to rerank and select the top response for evaluation. Since no current judge supports one-shot direct reranking of multiple responses, we consider two protocols: pairwise round-robin and single-instance rating. In the former, for the $N$ responses, we construct the $N(N - 1) / 2$ response pairs, query the judge on each pair, assign the winner a score of 1 and the loser a score of 0, and select the response with the highest score (random tie-breaking if necessary)1. In the latter, we ask the judge to generate a score (an integer between 1 and 5), and the select the response with the highest score. Since ties are much more common in the single-instance rating setting, we keep all tied responses and report min, average and max performance; e.g., if for a test sample, a judge rates 3 of 10 responses as the highest score, and those 3 responses have accuracy labels $(1,0,1)$ , then we use accuracy values $(0,2/3,1)$ for this sample when aggregating (min, average, max) performance. + +Since the base performance is very different across datasets and generators, we define and report the normalized helpfulness for the judge as + +$$ +h = \frac {p _ {\text {j u d g e}} - p _ {\text {g r e e d y}}}{p _ {\text {o r a c l e}} - p _ {\text {g r e e d y}}}, \tag {1} +$$ + +where $p_{\mathrm{greedy}}$ is the average performance of the greedily decoded responses across the dataset, $p_{\mathrm{oracle}}$ is the oracle judge performance over all response selections (e.g., selecting the correct response for a math problem whenever there is one), and $p_{\mathrm{judge}}$ is the average performance of top responses reranked by the judge. A negative value indicates strict harm as $h = 0$ can be trivially achieved by selecting the greedy response. We also include random baseline (i.e., the expected helpfulness of a judge that randomly reranks the responses) to compare each judge against an "average" reranker. For GSM8k and MATH, we also compute the performance of the majority-vote answer for each problem2. + +# 3.3 Task 2: Step-Level Beam Search + +Using an evaluator to control the flow of generation is increasingly popular. For example, when generating the response line-by-line to a coding problem, an evaluator could decide that newly generated line is bad and hence asks the generator to resample a new line. In this task, we generalize this procedure to beam search. Since this procedure requires the notion of steps in a response, we consider only math and code tasks, and define each step as a line of response from our observation that the generated math solutions often put each step on its own line and the fact that each line of code naturally represents a programmatic operation. + +In a $(N, M)$ -beam search with beam width of $M$ , the generator samples $N$ first steps, which are reranked by the judge to keep the top- $N / M$ . Then, for each chosen step, the generator samples $M$ next steps, for a total of $N$ responses to rerank again. When a generation ends (due to the EOS token or length limit), its current step is not expanded, resulting in less than $N$ responses. This process repeats until all selected steps are finished, at which time a final reranking selects the top response. Similar to before, in each sampling, one response is greedily decoded and the rest are sampled with temperature of 1.0 and top- $p$ of 0.95. We use (10, 2)-beam search in the benchmark and limit the tree depth to 10. + +Notably, the beam search requires LLM-judges to reason about partial responses, a use case not specifically designed for any of the current judge models. Nonetheless, since they are often trained with flexible judging criteria, we append the following to the existing ones in this task: + +Important note: the model response is generated with streaming, meaning that it may not be finished yet but we still want to get a sense of the partial progress so far. If this is the case, you should provide judgment and feedback on the currently generated part, focusing on its correctness and promise of leading to a correct final solution. + +Finally, we consider a lookahead variant of beam search similar to Snell et al. (2024), where instead of sending partial responses to the judge, we complete them with greedy decoding to finish and send these "lookahead" versions (without adding the instruction above). To contextualize judge performances, we again compute the greedy, random and oracle performance and derive normalized helpfulness. + +# 3.4 Task 3: Critique-Based Refinement + +A unique feature of LLM-judges is their ability to generate natural language critiques, or explanations, for their judgments. The critique-based refinement task evaluates whether these critiques are helpful for the model to improve their response. Specifically, we define a $(N,M)$ -refinement as the setup where we start with $N$ seed responses, and each response is iteratively refined $M$ times, for a total of $N(M + 1)$ responses, which is reranked at the end to selected the top response. Compared to reranking and beam search, in which the judge reweighs the output distribution, in refinement the judge directly modifies it with its critique. + +Since most judges are finetuned on fixed judging templates, they may not be able to directly revise responses. We instead provide the generator model the judge rating and critique, and ask it to revise its response using the feedback with the prompt shown in Fig. 18 of App. A.3. In our benchmark, we consider (1, 9)-refinement, which yields 10 responses in total to make it directly comparable to the reranking task. + +While reranking and beam search have oracle performance as a natural upper-bound to define normalized helpfulness, + +refinement has no such oracle. Therefore, we use improvement ratio over reranking and greedy responses as measure of judge efficacy, defined as + +$$ +\delta^ {(\mathrm {R R})} = p _ {\text {j u d g e}} ^ {(\text {R e f})} / p _ {\text {j u d g e}} ^ {(\text {R R})}, \quad \delta^ {(\mathrm {G})} = p _ {\text {j u d g e}} ^ {(\text {R e f})} / p _ {\text {g r e e d y}}, \tag {2} +$$ + +where, for $(N,M)$ -refinement, $p_{\mathrm{judge}}^{\mathrm{(Ref)}}$ is the average performance of the refined-and-eranked response across the dataset, and $p_{\mathrm{judge}}^{\mathrm{(RR)}}$ is that of the reranked response among $N(M + 1)$ sampled ones (including one greedy) and $p_{\mathrm{greedy}}$ is that of the greedy response. In our $(1,9)$ -refinement setup, the latter two quantities are directly taken from the results in Task 1 of reranking on 10 responses. + +In order for refinement to be a meaningful test-time scaling procedure, we need it to outperform both reranking and greedy. So we define the effective improvement ratio as + +$$ +\delta^ {(\mathrm {E f f})} = \min \left(\delta^ {(\mathrm {R R})}, \delta^ {(\mathrm {G})}\right). \tag {3} +$$ + +# 3.5 The JETTS Leaderboard + +Finally, we compute a leaderboard (Fig. 1) for three tasks. We use normalized helpfulness $h$ (Eq. 1) to measure judge performance on reranking and refinement, and effective improvement ratio $\delta^{(\mathrm{Eff})}$ (Eq. 3) on refinement. Each judge's score is computed by averaging the task-specific metric over all datasets and generators. If a judge supports multiple protocols (e.g., both single rating and pairwise comparisons in reranking), we report the maximum aggregate performance among all protocols. For convenience, we include per-dataset and per-generator metrics for each of the three tasks for all evaluated judges in App. C. + +Practitioner note. Beam search evaluation requires significantly more compute than reranking evaluation. While Task 3 reveals interesting findings, e.g., judges generalize to some degree to assessing partial responses, we find reranking and beam search performance to be correlated; see Fig. 2 and analysis in Sec. 4.3. Our recommendation for practitioners is to use reranking performance as a proxy for beam search performance when evaluating future judge models, unless working specifically on process-based judging. + +# 4 Experimental Results + +# 4.1 Experiment Setup + +As introduced in Sec. 3.1, JETTS consists of eight datasets from three task categories: math reasoning, code generation and instruction following. Models listed in Tab. 2 (top) generate the responses. We use Llama 3.1 (Dubey et al., 2024) and Qwen 2.5 (Yang et al., 2024) models in all tasks. For math and code tasks, we also consider four domain-specific models and intentionally choose newer models, + +
Generator Model# ParamsGenerator Model#Params
Llama-3.1-Instruct8, 70BQwen-2.5-Instruct32, 72B
Deepseek-Math-Instruct7BQwen-2.5-Math7B
Deepseek-Coder-Instruct6.7BQwen-2.5Coder7B
Judge ModelAbbr.# ParamsSupported Capability
PairwiseSingle Critique
SFR-Judge(Wang et al., 2024a)SFR8, 12, 70B✓✓
Skywork-Critic(Shiwen et al., 2024)SC8, 70B✓✗
OffsetBias(Park et al., 2024)OB8B✓✗
Prometheus(Kim et al., 2024)Prom7, 8x7B✓✓
Self-Taught-Eval.(Wang et al., 2024b)STE70B✓✗
Themis(Hu et al., 2024)Thm8B✗✓
+ +Table 2: Top: the generator models to produce the model responses. The models on the first row are used in all tasks, and those on the second and third rows are used only in math and code tasks respectively. Bottom: The judge models used in our experiments. + +Qwen math (Yang et al., 2024) and coder (Yang et al., 2024), and older models, DeepSeek math (Shao et al., 2024) and coder (Guo et al., 2024), to analyze how judge-based test time scaling improves models of different strengths. + +Tab. 2 (bottom) lists the LLM-judge models that we benchmark. We additionally include several baseline models: + +- the vanilla Llama-3.1-8B-Instruct model with SFR-Judge prompts for response reranking; + +- three ORMs for response reranking: Llama-3-OffsetBias-RM-8B $(\mathrm{OB}_{\mathrm{RM}})$ , Skywork-Reward-Llama-3.1-8B-v0.2 and Skywork-Reward-Gemma-2-27B-v0.2 $(\mathrm{S}_{\mathrm{RM}})$ ; and + +- PRM Qwen2.5-Math-PRM-7B (QPRM) for beam search. + +App. A.2 includes more details on judges and RMs. + +For all results presented below, unless otherwise noted, we perform statistical analyses of reported quantity differing from the baseline value (0 for reranking and beam-search, and 1 for refinement) using a two-sided one-sample $t$ -test and indicate the significance as “*” for $p \leq 0.05$ , “**” for $p \leq 0.01$ , “***” for $p \leq 0.001$ , and “n.s.” or no marker for not significant ( $p > 0.05$ ). + +# 4.2 Response Reranking + +As discussed in Sec. 3.2, since no judge supports direct reranking of $N$ responses, we use either pairwise round-robin comparison or single-instance rating and evaluate each judge on the protocol(s) it supports. Furthermore, we experiment with to judging prompts for single rating: Likert scale, where judges are not given fine-grained criteria and simply asked to rate on a 1-5 scale, and additive criteria (Yuan et al., 2024), which instructs the model incrementally increase score based based on given criteria, with a maximum score of 5. The full results are presented in Tab. 3-5 in App. B.1. Below, we highlight notable findings. + +Reranking helpfulness varies across protocols and datasets. Fig. 3 plots normalized helpfulness per dataset averaged across judges and generators, along with the respective random performance. There are two notable trends. + +![](images/e0c69f565dda9c5d4b5a8183fcc72751aad3000f6d2fc7cb8a262d63871fae43.jpg) + +![](images/75b6eddfbb1846b2d7825f09db6e234153e5c66bfdd2976c518413e575cf2711.jpg) +Figure 3: Normalized helpfulness of judge reranking per dataset. Asterisks on the bars denote statistical significance described at the end of Sec. 4.1. +Figure 4: Normalized helpfulness of the pairwise protocol across task categories of each judge, compared to Llama-3.1 8B with judge prompt, best reward model and random reranking, averaged across generator models and datasets. A violin plot depicting finer-grained distributions is in Fig. 21 of App. B.1. + +First, the pairwise protocol typically performs better than the single-rating protocol with either Likert or additive rubric, with the only exception of MBPP+, with all protocols worse than the greedy baseline. This is consistent with past findings, where both humans (Shah et al., 2016) and LLM-judges (Liu et al., 2023b) are better at providing pairwise comparison responses than single-rating responses. Given this finding, for the next two benchmarking tasks, step-level beam search and critique-based refinement, we use the pairwise protocol in reranking whenever possible. However, this comes at a significant inference cost, as the judge inference for pairwise reranking takes $O(N^2)$ time for $N$ responses to rerank, compared to $O(N)$ for single-instance rating. + +Second, there are also significant variations across datasets, even within the same task category: pairwise protocols help on GSM8k and MATH but not CHAMP, and all protocols help on AlpacaEval (for both win rate and length-controlled win, as we show in App. B.1) but none on IFEval. Overall, judge helpfulness highly depends on the dataset, and further fine-grained analyses to understand the strengths and weaknesses of judgment would be valuable3. + +# Inter-task helpfulness variation is consistent across dif + +![](images/8f689f7299a24f2382694af7e1f534d870288ea41dc76017d16c5aa4a576743d.jpg) +Figure 5: Normalized helpfulness under the pairwise protocol for different judge-to-generator size ratios, along with the best-fit lines for each task in log scale. + +ferent judges. Fig. 4 plots the normalized helpfulness of each judge on each task category for the pairwise protocol, aggregating over respective datasets and all generator models. With few exceptions, all judges, including the vanilla Llama-3.1-8B Instruct with judge prompt and the reward models, demonstrate highest helpfulness for instruction following, less but mostly positive helpfulness for math reasoning, and mostly negative helpfulness for code generation. For single-rating protocols, consistent with Fig. 3, the helpfulness is much lower, but the relative ranking is still generally the same, as shown in Fig. 22 of App. B.1. + +The consistency of inter-task helpfulness among judges coincides with the instruction-following training (and prompting) emphasis of current LLM-judges (Park et al., 2024; Tan et al., 2024). Despite training data including both math and code samples (e.g., Vu et al. (2024); Shiwen et al. (2024)), judge-specific finetuning seems to primarily boost instruction-following evaluation abilities, sometimes at the cost of other capabilities. This effect is shown in Fig. 4, where the vanilla Llama 3.1 8B model, prompted as a judge, exhibits a baseline level of competency as a judge, performing roughly at the greedy response level. Comparably sized 7B/8B judge models outperform it significantly on instruction-following and moderately on math, but performance degrades, sometimes significantly, on coding. Moreover, task-specific judge prompting does not appear to mitigate this task gap, as we show in Fig. 23 in App. B.1. + +Larger judge-to-generator size ratio under the pairwise protocol increases helpfulness for math and instruction following, but not code. For each pair of judge and generator, Fig. 5 plots the ratio of the number of parameters in the judge to that in the generator (on log-scale) vs. the helpfulness achieved by the judge, color-coded by task category. A linear regression is plotted for each task on the log-scale size ratio. For math reasoning, a larger size ratio statistically significantly increases helpfulness, indicating the promise of larger judges for small generators, (which, nonetheless, may not be practical). At the lower end of + +size ratio around 0.1 (e.g., 8B judge for 70B generator), normalized helpfulness is negative on average, indicating the absence of "weak-to-strong" guidance ability for LLM-judges. For instruction following, all size ratios achieve positive helpfulness but the effect of ratio increase is less notable. For code generation, the size ratio does not have an effect on the helpfulness, which is negative at all size ratios. For single-ratings protocol with Likert and additive rubrics (Fig. 24 of App. B.1), the effect of the size ratio is mildly positive only on math datasets, at 0.07 and 0.03 respectively, and negative on both of the other two tasks. + +No judge can reliably outperform majority-vote on math datasets. The output format specification of GSM8k and MATH allows us to easily extract the final answer from the generated response, and compute the majority-vote (i.e., self-consistency (Wang et al., 2022)) performance. In Fig. 6, we plot the difference in the normalized helpfulness between each judge and this heuristic and mark all positive cells with purple stars. On GSM8k, only SFR 70B and SC 70B offer substantive improvement over majority-vote, but only for relatively weak generator models. For MATH, only SFR 70B is able to meaningfully beat majority-vote on small-to-medium generators only. Thus, in theory, an LLM that simply extracts the majority-vote answer could serve as a very strong reranker for these datasets. + +Judges are over- lenient under the single rating protocol, resulting in a large number of top-ranked responses. Despite more time-efficient, single-rating evaluation protocol performance results in evaluation that is too lenient. Judges often rate a significant fraction of the $N$ responses a top score (i.e., a 4 or 5), with the most lenient models consistently rating all 10 responses equally high (Fig. 25 of App. B.1). Multiple responses tied as the "best" response leads to large ranges of possible reranking performance. Fig. 7 shows the average performance, as well as the mini + +![](images/47dea7d384b872d866c7dc3c8986eab02af86cc8aacb98bcc31d435344e65674.jpg) +Figure 6: Normalized helpfulness difference between each judge and majority-vote for each generator on GSM8k and MATH. Positive value cells are marked with purple stars. + +![](images/3e3a16440d64b77cef06133af6e6725c691c22064859fafc99d17f4b9d0ef47e.jpg) +Figure 7: Normalized helpfulness ranges for single-rating protocols, showing minimum and maximum performance achievable from tied top-rated responses, along with average performance. + +mum and maximum achievable performances from the tied responses. If one were to employ random tie-breaking, performance can swing from extremely poor to near oracle. + +# 4.3 Step-Level Beam Search + +As mentioned in Sec. 3.3, we focus on math and code tasks since their solutions can naturally be decomposed down into steps. We consider the (10, 2)-beam search, where the judge needs to rerank 10 candidates at each step and select the top-5, which get expanded to 10 next-step candidates. We use the pairwise protocol for the all rerankings, except for Themis 8B, a single instance rating judge, where we use the additive prompt. The full results are presented in Tab. 9 of App. B.2, and we highlight notable findings below. + +The effects of judge-to-generator size ratio are similar to that of reranking. Fig. 8 shows the judge helpfulness vs. the ratio of the number of parameters in the judge to that in the generator (on log-scale), along with a linear regression for each task. The effects of judge-to-generator are remarkably similar to that in reranking: for math reasoning, a larger size ratio results in statistically significant helpfulness gains, with generally negative helpfulness for smaller size ratios. Like reranking, small judges are unable to provide "weak-to-strong" improvements for large generators, revealing the need for large judges for beam search. This requirement may be impractical due to the significant computational overhead required to judge outputs at each "step". For code, scaling judge size relative to the generator produces no statistically significant gains: for all size ratios, the helpfulness is negative. + +LLM-judges lag significantly behind the small $Q_{\mathrm{PRM}}$ . Fig. 9 compares the normalized helpfulness of non-lookahead vs. lookahead beam search for different judges, along with reranking, random and $Q_{\mathrm{PRM}}$ performance. For math reasoning, while some judges can achieve positive helpfulness, they struggle to outperform reranking even with much more judge inference. More notably, by far the best result is achieved by the 7B parameter $Q_{\mathrm{PRM}}$ . For code generation, only large judges achieve positive helpfulness, with only SC 70B providing statistically significant improvement. $Q_{\mathrm{PRM}}$ , although finetuned on math data, still achieves decent helpfulness at much smaller scale. These results suggest that even though some judges are finetuned + +![](images/ccc21f0bf81bba08c86ab74a38338beec5b72fbb412a2855f605d00045e4296f.jpg) +Figure 8: Normalized helpfulness of beam search under different judge-to-generator size ratios, along with the best-fit lines for each task in log scale. + +to work with flexible rubrics, process judgment is likely too out-of-distribution for small judges to be effective. + +The benefit of lookahead is inconclusive. In the lookahead mode, rather than incomplete responses, judges evaluate full, rolled out responses, more aligned with judge training distributions. However, somewhat surprisingly, lookahead is not universally beneficial. For math reasoning, Fig. 9 shows that it benefits seven judges and $Q_{\mathrm{PRM}}$ , sometimes by two to three times, while slightly hurting the other three judges. For code generation, lookahead benefits five judges while hurting the other five and $Q_{\mathrm{PRM}}$ , with much milder effects. Overall, judges that perform well on reranking full responses tend to benefit from lookahead, whereas weaker ones tend to benefit from non-lookahead. This suggests that splitting full responses into shorter chunks makes evaluation easier for them, despite the out-of-distribution nature of step-level evaluation. + +There is a high correlation among non-lookahead, lookahead and reranking performance. Fig. 10 plots the correlation between each judge's reranking performance and beam search performance (left), and the correlation between its lookahead and non-lookahead performance (right), with each scatter point representing a pair of dataset and generator. We observe high correlation among the three quantities, suggesting that they are all likely to be tied under the same underlying "fundamental judging capability" of the judge. + +![](images/5c86065970224d73800ab5df32e1c843bede365b696a4b9635e1aaef4e2ee863.jpg) +Figure 9: Normalized helpfulness of beam search by each judge and Qwen-2.5-Math-PRM 7B. The judge's reranking performance on the task category is plotted for comparison, as well as the random beam search baseline. + +![](images/2c483e4576c9fd7c6a6bd87af86b22a33f64c0348c0b110fcefdabcb4eab6c58.jpg) +Figure 10: Relationship of judge's reranking vs. beam search performance, and non-lookahead vs. lookahead performance. + +![](images/bcd136e325916451eff78b7785368b512f1ca0b93de0abcdd8e128a4f347f2ac.jpg) + +# 4.4 Critique-Based Refinement + +Since this setup requires the judge to generate a critique on its judgment of an individual sample, we only evaluate judges with both single-instance rating and critique-generation capabilities in Tab. 2: SFR-Judge, Prometheus and Themis. In addition, when reranking the final candidate responses, as the reranking performance is much better with pairwise round-robin than single-instance rating (Sec. 4.2), we use the former whenever the judge supports it (i.e., for SFR-Judge and Prometheus) and fall back to the latter otherwise (i.e., for Themis). The full results are presented in Tab. 10 of App. B.3, with notable findings discussed below. + +No judge yields a beneficial performance on refinement across task category. For individual judges, Fig. 11 plots the average effective improvement ratio $\delta^{(\mathrm{Eff})}$ for each judge, with no judge achieving a ratio better than 1.0. Instruction following experiences the largest loss, with up to $10\%$ performance degradation. Thus, we conclude that all are incapable at this task. + +We now focus our analysis on (1) quantifying the utility of refinement relative to greedy decoding and reranking and (2) precisely quantifying the behavior of the refine-then-rerank process. To do so, we define the following metrics. Towards the quantifying refinement utility, denote $p_{\mathrm{rand}}^{(\mathrm{Ref})}$ and $p_{\mathrm{orac.}}^{(\mathrm{Ref})}$ to be the performance of a randomly selected response and the best performing response from all responses produced in the refinement process across the dataset, and analogously $p_{\mathrm{rand}}^{(\mathrm{RR})}$ and $p_{\mathrm{orac.}}^{(\mathrm{RR})}$ on responses in reranking. We define $\delta_{\mathrm{rand.}}^{(\mathrm{RR})} = p_{\mathrm{rand.}}^{(\mathrm{Ref})} / p_{\mathrm{rand.}}^{(\mathrm{RR})}$ , $\delta_{\mathrm{orac.}}^{(\mathrm{RR})} = p_{\mathrm{orac.}}^{(\mathrm{Ref})} / p_{\mathrm{orac.}}^{(\mathrm{RR})}$ , $\delta_{\mathrm{rand.}}^{(\mathrm{G})} = p_{\mathrm{rand.}}^{(\mathrm{Ref})} / p_{\mathrm{greedy}}$ , $\delta_{\mathrm{orac.}}^{(\mathrm{G})} = p_{\mathrm{orac.}}^{(\mathrm{Ref})} / p_{\mathrm{greedy}}$ . To gain deeper insights into the refinement process, we examine the performance using the last refined response without rerank + +![](images/b44a8a32a7bd4a1e02a77e5987f1a52f0efb84e4ea90f413d0b9c1c58c64203e.jpg) +Figure 11: Effective improvement ratio $\delta^{(\mathrm{Eff})}$ for each judge and task category. + +![](images/54d1ed26b31675593c6d1b147601455006e8925f1def0d307c62c38c52eb3868.jpg) +Figure 12: Various diagnostic metrics in refinement. + +ing. We denote $p_{\mathrm{last}}^{(\mathrm{Ref})}$ to be the performance of the last response from the refinement process across the dataset and define $\delta_{\mathrm{last}}^{(\mathrm{RR})} = p_{\mathrm{last}}^{(\mathrm{Ref})} / p_{\mathrm{judge}}^{(\mathrm{RR})}$ and $\delta_{\mathrm{last}}^{(\mathrm{G})} = p_{\mathrm{last}}^{(\mathrm{Ref})} / p_{\mathrm{greedy}}$ to be analogous to $\delta^{(\mathrm{RR})}$ and $\delta^{(\mathrm{G})}$ defined in Eq. 2. Fig. 26 in App. B.3 illustrates these newly defined $p$ metrics. + +The refinement process improves upon either reranking or greedy decoding, but never both. In Fig. 12 (top), we see that $\delta^{(\mathrm{RR})}$ and $\delta^{(\mathrm{G})}$ are never meaningfully greater than 1.0 simultaneously on any dataset across all judges. As such, refinement is typically a sub-optimal choice of test-time scaling method, with greedy decoding or reranking leading to better performance. + +The benefit of final reranking is small. While Fig. 12 (top) shows that $\delta$ is consistently better than $\delta_{\mathrm{last}}$ , the difference is small. Given the $O(N^2)$ complexity of pairwise reranking, just using the last refinement may be practically favorable. + +Generators and judges rarely engage in extensive refinement processes. A notable trend from Fig. 12 (bottom) is $\delta_{\mathrm{rand.}}^{\mathrm{(G)}} \approx 1$ and $\delta_{\mathrm{orac.}} < 1$ for all datasets, suggesting that the refined responses are very similar to the original greedy seed and fail to discover much better solutions. It turns out, in fact, that the refinement process is rarely extensive. In Fig. 13, we plot the total number of generated refinements (excluding the original greedy response) across the three task categories. Among the four generator models, Llama 8B revised for significantly more rounds than other generators. This may suggest an intrinsic pliability to taking feedback, and/or result from its initial greedy response being much worse. Among judges, Prometheus 7B is much better + +![](images/94c5201fa2b7e8b22210d806b4ebb72e9950b9b2bf8ad47ff527ff509dabfae8.jpg) +Figure 13: The average number of refinement rounds carried out by each (judge, generator) pair. + +![](images/4cf5a755b47568b3a4e2d4b6a1721be3a0b8cd0f93529dc62f0dad44793d2f9e.jpg) +Figure 14: The distribution of number of refinement rounds conducted by the Llama 3.1 8B generator, and the index of the chosen response by the final reranking. + +at giving actionable advice to encourage refinement behavior, which unfortunately does not translate to meaningful benefits in the final result (Fig. 11). + +The final selected response is often generated early on. For Llama 8B, Fig. 14 plots the distribution of number of refinements (excluding the greedy seed response) and distribution of the chosen response index (0 for greedy). Llama 8B tends to either refine very minimally or use all nine rounds. However, the response actually chosen by the final reranking tends to be generated much earlier in the process, with the seed response (index 0) still most likely to be chosen, revealing limited utility of the critiques. + +Critiques tend to over-focus on stylistic features than response quality. We conduct a qualitative study on the critiques in App. B.3. We inspect over 100 refinements and find two major issues. First, the judge gives high scores to responses with actual mistakes for stylistic reasons such as it being easy to follow (Fig. 27), thus failing to lead the generator to correct the error. Second, the judge is overly critical about minor stylistic issues on fully correct responses (Fig. 28) so that the generator engages in meaningless refinements that may even flip correct answers. + +# 5 Conclusion and Future Work + +In this paper, we seek to understand the feasibility of using LLM-judges in place of typically used RMs in test-time compute procedures. To this end, we propose JETTS, the first such systematic benchmark with three tasks: response reranking, step-level beam search and critique-based refinement. Our benchmarking results reveal several limitations and corresponding future research directions for LLM-judges. First, the reranking task faces a performance-efficiency dilemma: the pairwise protocol shows promise in certain domains but runs in $O(N^2)$ , while the $O(N)$ single-instance protocol performs much worse. Improving single-rating ability of judges is essential for compute-efficient test-time scaling. Further, current chain-of-thought reasoning generated by the judges is insufficient, both for themselves to arrive at better judgments, especially in math and code domains, and for generators as critiques to refine responses. As such, a key next-step for judge development is to produce better and more useful reasoning. + +# 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 + +Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. +Besta, M., Blach, N., Kubicek, A., Gerstenberger, R., Podstawski, M., Gianinazzi, L., Gajda, J., Lehmann, T., Niewiadomski, H., Nyczyk, P., et al. Graph of thoughts: Solving elaborate problems with large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, 2024. +Brown, B., Juravsky, J., Ehrlich, R., Clark, R., Le, Q. V., Ré, C., and Mirhoseini, A. Large language monkeys: Scaling inference compute with repeated sampling. arXiv preprint arXiv:2407.21787, 2024. +Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. +Cobbe, K., Kosaraju, V., Bavarian, M., Chen, M., Jun, H., Kaiser, L., Plappert, M., Tworek, J., Hilton, J., Nakano, R., et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021. +Dai, N., Wu, Z., Zheng, R., Wei, Z., Shi, W., Jin, X., Liu, G., Dun, C., Huang, L., and Yan, L. Process supervision-guided policy optimization for code generation. arXiv preprint arXiv:2410.17621, 2024. +Deshpande, D., Ravi, S. S., CH-Wang, S., Mielczarek, B., Kannappan, A., and Qian, R. Glider: Grading llm interactions and decisions using explainable ranking. arXiv preprint arXiv:2412.14140, 2024. +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. +Dubois, Y., Galambosi, B., Liang, P., and Hashimoto, T. B. Length-controlled alpacaeval: A simple way to debias automatic evaluators. arXiv preprint arXiv:2404.04475, 2024a. + +Dubois, Y., Li, C. X., Taori, R., Zhang, T., Gulrajani, I., Ba, J., Guestrin, C., Liang, P. S., and Hashimoto, T. B. Alpacafarm: A simulation framework for methods that learn from human feedback. Advances in Neural Information Processing Systems, 36, 2024b. +Feuer, B., Goldblum, M., Datta, T., Nambiar, S., Besaleli, R., Dooley, S., Cembalest, M., and Dickerson, J. P. Style outweighs substance: Failure modes of llm judges in alignment benchmarking. arXiv preprint arXiv:2409.15268, 2024. +Frick, E., Li, T., Chen, C., Chiang, W.-L., Angelopoulos, A. N., Jiao, J., Zhu, B., Gonzalez, J. E., and Stoica, I. How to evaluate reward models for rlhf. arXiv preprint arXiv:2410.14872, 2024. +Guo, D., Zhu, Q., Yang, D., Xie, Z., Dong, K., Zhang, W., Chen, G., Bi, X., Wu, Y., Li, Y., et al. Deepseek-coder: When the large language model meets programming-the rise of code intelligence. arXiv preprint arXiv:2401.14196, 2024. +Hendrycks, D., Burns, C., Kadavath, S., Arora, A., Basart, S., Tang, E., Song, D., and Steinhardt, J. Measuring mathematical problem solving with the math dataset. arXiv preprint arXiv:2103.03874, 2021. +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, X., Lin, L., Gao, M., Yin, X., and Wan, X. Themis: A reference-free nlg evaluation language model with flexibility and interpretability. arXiv preprint arXiv:2406.18365, 2024. +Huang, J., Chen, X., Mishra, S., Zheng, H. S., Yu, A. W., Song, X., and Zhou, D. Large language models cannot self-correct reasoning yet. arXiv preprint arXiv:2310.01798, 2023. +Jaech, A., Kalai, A., Lerer, A., Richardson, A., El-Kishky, A., Low, A., Helyar, A., Madry, A., Beutel, A., Carney, A., et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024. +Ji, Y., Li, J., Ye, H., Wu, K., Xu, J., Mo, L., and Zhang, M. Test-time computing: from system-1 thinking to system-2 thinking. arXiv preprint arXiv:2501.02497, 2025. +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. + +Ke, Z., Jiao, F., Ming, Y., Nguyen, X.-P., Xu, A., Long, D. X., Li, M., Qin, C., Wang, P., Savarese, S., et al. A survey of frontiers in lIm reasoning: Inference scaling, learning to reason, and agentic systems. arXiv preprint arXiv:2504.09037, 2025. +Kim, S., Shin, J., Cho, Y., Jang, J., Longpre, S., Lee, H., Yun, S., Shin, S., Kim, S., Thorne, J., et al. Prometheus: Inducing fine-grained evaluation capability in language models. In The Twelfth International Conference on Learning Representations, 2023. +Kim, S., Suk, J., Longpre, S., Lin, B. Y., Shin, J., Welleck, S., Neubig, G., Lee, M., Lee, K., and Seo, M. Prometheus 2: An open source language model specialized in evaluating other language models. arXiv preprint arXiv:2405.01535, 2024. +Kojima, T., Gu, S. S., Reid, M., Matsuo, Y., and Iwasawa, Y. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35: 22199-22213, 2022. +Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., and Stoica, I. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023. +Kydlicek, H. Math-Verify: Math Verification Library, 2025. URL https://github.com/huggingface/math-verify. +Lambert, N., Pyatkin, V., Morrison, J., Miranda, L., Lin, B. Y., Chandu, K., Dziri, N., Kumar, S., Zick, T., Choi, Y., et al. Rewardbench: Evaluating reward models for language modeling. arXiv preprint arXiv:2403.13787, 2024. +Lan, T., Zhang, W., Xu, C., Huang, H., Lin, D., Chen, K., and Mao, X.-l. Criticeval: Evaluating large language model as critic. arXiv preprint arXiv:2402.13764, 2024. +Li, J., Sun, S., Yuan, W., Fan, R.-Z., Zhao, H., and Liu, P. +Generative judge for evaluating alignment. arXiv preprint arXiv:2310.05470, 2023. +Lightman, H., Kosaraju, V., Burda, Y., Edwards, H., Baker, B., Lee, T., Leike, J., Schulman, J., Sutskever, I., and Cobbe, K. Let's verify step by step. arXiv preprint arXiv:2305.20050, 2023. +Lin, Z., Gou, Z., Liang, T., Luo, R., Liu, H., and Yang, Y. Criticbench: Benchmarking llms for critique-correct reasoning. arXiv preprint arXiv:2402.14809, 2024. +Liu, C. Y., Zeng, L., Liu, J., Yan, R., He, J., Wang, C., Yan, S., Liu, Y., and Zhou, Y. Skywork-reward: Bag + +of tricks for reward modeling in llms. arXiv preprint arXiv:2410.18451, 2024a. +Liu, J., Xia, C. S., Wang, Y., and Zhang, L. Is your code generated by chatGPT really correct? rigorous evaluation of large language models for code generation. In Thirty-seventh Conference on Neural Information Processing Systems, 2023a. URL https://openreview.net/forum?id=1qvx610Cu7. +Liu, Y., Fabbri, A. R., Chen, J., Zhao, Y., Han, S., Joty, S., Liu, P., Radev, D., Wu, C.-S., and Cohen, A. Benchmarking generation and evaluation capabilities of large language models for instruction controllable summarization. arXiv preprint arXiv:2311.09184, 2023b. +Liu, Y., Yao, Z., Min, R., Cao, Y., Hou, L., and Li, J. Rmbench: Benchmarking reward models of language models with subtlety and style. arXiv preprint arXiv:2410.16184, 2024b. +Liu, Y., Yao, Z., Min, R., Cao, Y., Hou, L., and Li, J. Pairwise rm: Perform best-of-n sampling with knockout tournament. arXiv preprint arXiv:2501.13007, 2025. +Luo, L., Liu, Y., Liu, R., Phatale, S., Lara, H., Li, Y., Shu, L., Zhu, Y., Meng, L., Sun, J., et al. Improve mathematical reasoning in language models by automated process supervision. arXiv preprint arXiv:2406.06592, 2024. +Madaan, A., Tandon, N., Gupta, P., Hallinan, S., Gao, L., Wegreffe, S., Alon, U., Dziri, N., Prabhumoye, S., Yang, Y., et al. Self-refine: Iterative refinement with self-feedback. Advances in Neural Information Processing Systems, 36, 2024. +Mao, Y., Kim, Y., and Zhou, Y. Champ: A competition-level dataset for fine-grained analyses of llms' mathematical reasoning capabilities. arXiv preprint arXiv:2401.06961, 2024. +Nye, M., Andreassen, A. J., Gur-Ari, G., Michalewski, H., Austin, J., Bieber, D., Dohan, D., Lewkowycz, A., Bosma, M., Luan, D., et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 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. +Park, J., Jwa, S., Ren, M., Kim, D., and Choi, S. Offsetbias: Leveraging debiased data for tuning evaluators. arXiv preprint arXiv:2407.06551, 2024. + +Saad-Falcon, J., Vivek, R., Berrios, W., Naik, N. S., Franklin, M., Vidgen, B., Singh, A., Kiela, D., and Mehri, S. Lmunit: Fine-grained evaluation with natural language unit tests. arXiv preprint arXiv:2412.13091, 2024. +Saunders, W., Yeh, C., Wu, J., Bills, S., Ouyang, L., Ward, J., and Leike, J. Self-critiquing models for assisting human evaluators. arXiv preprint arXiv:2206.05802, 2022. +Shah, N. B., Balakrishnan, S., Bradley, J., Parekh, A., Ramch, K., Wainwright, M. J., et al. Estimation from pairwise comparisons: Sharp minimax bounds with topology dependence. Journal of Machine Learning Research, 17(58):1-47, 2016. +Shao, Z., Wang, P., Zhu, Q., Xu, R., Song, J., Bi, X., Zhang, H., Zhang, M., Li, Y., Wu, Y., et al. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024. +Shinn, N., Cassano, F., Gopinath, A., Narasimhan, K., and Yao, S. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024. +Shiwen, T., Liang, Z., Liu, C. Y., Zeng, L., and Liu, Y. Skywork critic model series. https://huggingface.co/Skywork, September 2024. URL https://huggingface.co/Skywork. +Shridhar, K., Sinha, K., Cohen, A., Wang, T., Yu, P., Pasunuru, R., Sachan, M., Weston, J., and Celikyilmaz, A. The art of llm refinement: Ask, refine, and trust. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers), pp. 5872-5883, 2024. +Snell, C., Lee, J., Xu, K., and Kumar, A. Scaling llm test-time compute optimally can be more effective than scaling model parameters. arXiv preprint arXiv:2408.03314, 2024. +Stechly, K., Marquez, M., and Kambhampati, S. Gpt-4 doesn't know it's wrong: An analysis of iterative prompting for reasoning problems. arXiv preprint arXiv:2310.12397, 2023. +Tan, S., Zhuang, S., Montgomery, K., Tang, W. Y., Cuadron, A., Wang, C., Popa, R. A., and Stoica, I. Judgebench: A benchmark for evaluating llm-based judges. arXiv preprint arXiv:2410.12784, 2024. +Valmeekam, K., Marquez, M., and Kambhampati, S. Can large language models really improve by self-critiquing their own plans? arXiv preprint arXiv:2310.08118, 2023. + +Vu, T., Krishna, K., Alzubi, S., Tar, C., Faruqui, M., and Sung, Y.-H. Foundational automators: Taming large language models for better automatic evaluation. arXiv preprint arXiv:2407.10817, 2024. +Wang, P., Li, L., Shao, Z., Xu, R., Dai, D., Li, Y., Chen, D., Wu, Y., and Sui, Z. Math-shepherd: A label-free step-by-step verifier for llms in mathematical reasoning. arXiv preprint arXiv:2312.08935, 2023a. +Wang, P., Xu, A., Zhou, Y., Xiong, C., and Joty, S. Direct judgement preference optimization. arXiv preprint arXiv:2409.14664, 2024a. +Wang, T., Kulikov, I., Golovneva, O., Yu, P., Yuan, W., Dwivedi-Yu, J., Pang, R. Y., Fazel-Zarandi, M., Weston, J., and Li, X. Self-taught evaluators. arXiv preprint arXiv:2408.02666, 2024b. +Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022. +Wang, Y., Yu, Z., Yao, W., Zeng, Z., Yang, L., Wang, C., Chen, H., Jiang, C., Xie, R., Wang, J., et al. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. In The Twelfth International Conference on Learning Representations, 2023b. +Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022. +Yang, A., Yang, B., Zhang, B., Hui, B., Zheng, B., Yu, B., Li, C., Liu, D., Huang, F., Wei, H., et al. Qwen2.5 technical report. arXiv preprint arXiv:2412.15115, 2024. +Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T., Cao, Y., and Narasimhan, K. Tree of thoughts: Deliberate problem solving with large language models. Advances in Neural Information Processing Systems, 36, 2024. +Ye, Z., Li, X., Li, Q., Ai, Q., Zhou, Y., Shen, W., Yan, D., and Liu, Y. Beyond scalar reward model: Learning generative judge from preference data. arXiv preprint arXiv:2410.03742, 2024. +Yuan, W., Pang, R. Y., Cho, K., Li, X., Sukhbaatar, S., Xu, J., and Weston, J. E. Self-rewarding language models. In *Forty-first International Conference on Machine Learning*, 2024. +Zeng, Z., Yu, J., Gao, T., Meng, Y., Goyal, T., and Chen, D. Evaluating large language models at evaluating instruction following. arXiv preprint arXiv:2310.07641, 2023. + +Zhang, L., Hosseini, A., Bansal, H., Kazemi, M., Kumar, A., and Agarwal, R. Generative verifiers: Reward modeling as next-token prediction. arXiv preprint arXiv:2408.15240, 2024a. +Zhang, Y., Khalifa, M., Logeswaran, L., Kim, J., Lee, M., Lee, H., and Wang, L. Small language models need strong verifiers to self-correct reasoning. arXiv preprint arXiv:2404.17140, 2024b. +Zhang, Z., Zheng, C., Wu, Y., Zhang, B., Lin, R., Yu, B., Liu, D., Zhou, J., and Lin, J. The lessons of developing process reward models in mathematical reasoning. arXiv preprint arXiv:2501.07301, 2025a. +Zhang, Z., Zheng, C., Wu, Y., Zhang, B., Lin, R., Yu, B., Liu, D., Zhou, J., and Lin, J. The lessons of developing process reward models in mathematical reasoning. arXiv preprint arXiv:2501.07301, 2025b. +Zheng, C., Zhang, Z., Zhang, B., Lin, R., Lu, K., Yu, B., Liu, D., Zhou, J., and Lin, J. Processbench: Identifying process errors in mathematical reasoning. arXiv preprint arXiv:2412.06559, 2024. +Zheng, L., Chiang, W.-L., Sheng, Y., Zhuang, S., Wu, Z., Zhuang, Y., Lin, Z., Li, Z., Li, D., Xing, E., et al. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36: 46595-46623, 2023. +Zhou, E., Zheng, G., Wang, B., Xi, Z., Dou, S., Bao, R., Shen, W., Xiong, L., Fan, J., Mou, Y., et al. Rmb: Comprehensively benchmarking reward models in llm alignment. arXiv preprint arXiv:2410.09893, 2024. +Zhou, J., Lu, T., Mishra, S., Brahma, S., Basu, S., Luan, Y., Zhou, D., and Hou, L. Instruction-following evaluation for large language models. arXiv preprint arXiv:2311.07911, 2023. +Zhuo, T. Y., Vu, M. C., Chim, J., Hu, H., Yu, W., Widyasari, R., Yusuf, I. N. B., Zhan, H., He, J., Paul, I., et al. Big-codebench: Benchmarking code generation with diverse function calls and complex instructions. arXiv preprint arXiv:2406.15877, 2024. + +# A Additional benchmark details: Evaluation procedures, judge models, and prompts + +In this section, we provide additional details about benchmark evaluation procedures and the judge models evaluated. + +# A.1 Benchmark evaluation procedures. + +Math reasoning. For GSM8K, we prompt generator models with a 0-shot version of the CoT prompt used by Llama-3.1 evaluations4. To parse and grade results, we use Math-Verify (Kydlíček, 2025), comparing the model responses against the list of accepted responses provided by Llama-3.1 evaluations. + +For MATH, we prompt the generator with 0-shot CoT prompt used in Shepherd-Math (Wang et al., 2023a). To parse and grade results, we again use Math-Verify, comparing model responses against the original solution in MATH. + +For CHAMP, we utilize the default 0-shot prompt released by CHAMP and their suggested evaluation pipeline: The generator produces a response and is then asked to summarize its response into a final answer. A frontier LLM is then prompted to evaluate the final answer and the ground-truth. We utilize GPT-4o for this evaluation. We evaluate all responses generated across all tasks, regardless of if they are chosen or not, and store the results to be re-used for different judges. This ensures that judge evaluation is not influenced by potentially stochastic GPT-4o inference. + +Code generation. We utilize the code generation and evaluation scripts provided by BigCodeBench (Zhuo et al., 2024) and EvalPlus (Liu et al., 2023a), with minor modifications to accommodate grading arbitrary subsets of the full evaluation set. For fast evaluation, similar to CHAMP evaluation, we evaluate all responses once and store the results. + +Instruction following. We directly prompt the generator model with the prompts provided by both AlpacaEval (Liu et al., 2023a) and IFEval (Zhou et al., 2023) and utilize the evaluation scripts. We again making minimal changes to accommodate grading arbitrary subsets of the full evaluation set. For AlpacaEval, we follow the same procedure as CHAMP and evaluate all responses, storing results to be re-used for different judges. This again eliminates judge-by-judge stochasticity in GPT-4 evaluations. + +# A.2 Additional details about evaluated judge baselines. + +As noted in Tab. 2, we benchmark 10 judges of varying capabilities. Here, we provide a more comprehensive overview of each judge evaluated. We run inference with vLLM (Kwon et al., 2023), with 1 A100 40GB GPU for judges with sizes 12B and smaller, and 8xA100 40GB GPUs for judges with sizes 8x7B and larger. + +- SFR-Judge (Wang et al., 2024a): SFR-Judge is a family of three judge models trained from Llama-3.1-8B-and 70B-instruct and Mistral-NeMo-12B-Instruct using direct preference optimization (DPO). These judges are trained with data samples from a diverse array of source datasets to provide natural language critiques and perform three evaluation tasks: Pairwise comparisons, single-rating evaluation, and binary yes/no classification. Notably, SFR-Judge training data preserves original human evaluation instructions, meaning the models are amenable to flexible prompting. +- Skywork-Critic (Shiwen et al., 2024): Skywork-Critic is a family of two judge models trained from Llama-3.1-8B-and 70B-instruct using supervised finetuning (SFT). These judges are trained on a smaller, curated preference dataset to perform pairwise comparison evaluation, without providing natural language critiques. Skywork-Critic models are trained with a fixed prompt template. +- OffsetBias (Park et al., 2024): OffsetBias is a pairwise comparison (without natural language critiques) model trained from Llama-3-8B-Instruct using SFT. It is trained with data specifically aimed at mitigating common LLM-as-judge biases, such as length bias. OffsetBias is trained with a fixed prompt template. +- Prometheus-v2.0 (Kim et al., 2024): Prometheus-v2.0 is a family of two judge models trained from Mistral-7B and 8x7B-instruct. These judges are trained on purely synthetic data synthesized from GPT-4 to perform pairwise comparisons and single-rating evaluation, and to provide natural language feedback. Notably, Prometheus specifically generates per-instance fine-grained evaluation criteria, making it amenable to flexible prompting. + +- Self-taught-evaluator (Wang et al., 2024b): Self-taught-evaluator is a model trained from Llama-3.1-70B-Instruct to perform pairwise comparison evaluation and to provide natural language critiques. It is trained using iterative DPO self-teaching, where adversarially generated samples from the model are produced at each training round, classified into correct or incorrect judgments, and used to update the model with DPO. Self-taught-evaluator is trained with a fixed prompt template. +- Themis (Hu et al., 2024): Themis is a single-rating specific model (with natural language critiques) trained from Llama-3-8B-Instruct using a single-rating margin-based version of DPO. It is trained from a large mixture of preference data from a diverse array of sources. Notably, original instructions given to human annotators is preserved in Themis training data, making it amenable to flexible prompting. + +For each judge, we adhere to prompt templates and judgment parsing code provided by authors, minimally updating the evaluation criteria if necessary. We provide examples of prompts in the next section. We additionally evaluate four reward model baselines: three ORMs for reranking and one PRM for beam search. + +- Skywork-Reward-v0.2 (Liu et al., 2024a): A family of sequence classifier outcome reward models trained from Llama-3.1-8B and Gemma-2-27B using the same dataset as the Skywork-Critic series. +- OffsetBias-RM (Park et al., 2024): A sequence classifier outcome reward model trained from Llama-3-8B using the same dataset as the OffsetBias generative judge. +- Qwen2.5-Math-PRM (Zhang et al., 2025a): A process reward model specific for math domain trained from Qwen2.5. + +# A.3 Prompts used in JETTS. + +Judge prompts. Here, we provide an example of the pairwise (Fig. 15), Likert (Fig. 16), and additive rating (Fig. 17) prompts used for evaluation. We show the prompts used for SFR-Judge, with other prompts differing only in the template (e.g., the expected format of outputs, whether or not to elicit CoT, order of input elements, etc). In all of the prompts, as mentioned in Sec. 3.3, the message indicating a partial solution is inserted in the {partial_response-note} portion of the prompt, or is left empty (with surrounding newlines removed) for non-beam-search tasks. + +Generator refinement prompt. We provide the prompt given to the generator for critique-based refinement in Fig. 18. As mentioned in Sec. 3.4, the generator is allowed to interpret the judge feedback and decide that no further refinement is necessary. + +```txt +You are a helpful assistant in evaluating the quality of the responses for a given instruction. Your goal is to select the best response for the given instruction.. +Select Response A or Response B, that is better for the given instruction. The two responses are generated by two different AI chatbots respectively. Do NOT say both / neither are good. +Here are some rules of the evaluation: (1) You should prioritize evaluating whether the output honestly/precisely/closely executes the instruction, then consider its helpfulness, accuracy, level of detail, harmlessness, etc. (2) Responses should NOT contain more/less than what the instruction asks for, as such responses do NOT precisely execute the instruction. (3) You should avoid any potential bias and your judgment should be as objective as possible. Here are some potential sources of bias: - The order in which the responses were presented should NOT affect your judgment, as Response A and Response B are \*\*equally likely\*\* to be the better. - The length of the responses should NOT affect your judgement, as a longer response does not necessarily correspond to a better response. When making your decision, evaluate if the response length is appropriate for the given instruction. {partial_response-note} +Your reply should strictly follow this format: \*\*Reasoning:\*\* +\*\*Result:\*\* +Here is the data. +Instruction: $\text{串}$ {query_text} \*\* +Response A: $\text{串}$ {response_A} \*\* +Response B: $\text{串}$ {response_B} +``` + +Figure 15: The pairwise evaluation prompt given to SFR-Judge models. Blue text are changed to the corresponding actual value when rendering the template. Everything else is presented literally. The partial response note slot holds the beam search judging note of Sec. 3.3 is only used in the non-lookahead mode of beam search. The partial response note slot holds the beam search judging note of Sec. 3.3 is only used in the non-lookahead mode of beam search. + +```txt +You are tasked with evaluating a response based on a given instruction (which may contain an Input). Provide a comprehensive feedback on the response quality based on the rules for evaluation. Follow this with a score between 1 and 5. Avoid generating any additional opening, closing, or explanations. +Here are some rules of the evaluation: +(1) You should prioritize evaluating whether the output honestly/precisely/closely executes the instruction, then consider its helpfulness, accuracy, level of detail, harmlessness, etc. +(2) Responses should NOT contain more/less than what the instruction asks for, as such responses do NOT precisely execute the instruction.. +(3) You should avoid any potential bias and your judgment should be as objective as possible. Here is a potential source of bias: +- The length of the response should NOT affect your judgement, as a longer response does not necessarily correspond to a better response. When making your decision, evaluate if the response length is appropriate for the given instruction. +{partial_response-note} +Your reply should strictly follow this format: +\*\*Reasoning:\*\* +\*\*Result:\*\* +Here is the data: +Instruction: +{query_text} +Response: +{response} +``` + +Figure 16: The Likert single-rating evaluation prompt given to SFR-Judge models. Blue text are changed to the corresponding actual value when rendering the template. Everything else is presented literally. + +You are tasked with evaluating a response based on a given instruction (which may contain an Input). Provide a comprehensive feedback on the response quality based on the rules for evaluation. Follow this with a score between 1 and 5. Avoid generating any additional opening, closing, or explanations. + +Here are some rules of the evaluation: + +(1) You should prioritize evaluating whether the response satisfies the provided rubric. The basis of your score should depend exactly on the rubric. +(2) You should avoid any potential bias and your judgment should be as objective as possible. Here is a potential source of bias: + +- The length of the response should NOT affect your judgement, as a longer response does not necessarily correspond to a better response. When making your decision, evaluate if the response length is appropriate for the given instruction. + +{partial_response-note} + +Your reply should strictly follow this format: + +**Reasoning:** + +**Result:** $\leq$ an integer between 1 and 5> + +Here is the data: + +Instruction: + +“ + +{query_text} + +66 + +Response: + +6 + +{response.note} + +6 + +Score rubrics: + +- Add one point if the response is relevant and provides some information related to the user's inquiry, even if it is incomplete or contains some irrelevant content. +- Add a second point if the response addresses a substantial portion of the user's question, but does not completely resolve the query or provide a direct answer. +- Add a third point if the response answers the basic elements of the user's question in a useful way, regardless of whether it seems to have been written by an AI Assistant or if it has elements typically found in blogs or search results. +- Add a fourth point if the response is clearly written from an AI Assistant's perspective, addressing the user's question directly and comprehensively, and is well-organized and helpful, even if there is slight room for improvement in clarity, conciseness or focus. +- Add a fifth point for a response that is impeccably tailored to the user's question by an AI Assistant, without extraneous information, reflecting expert knowledge, and demonstrating a high-quality, engaging, and insightful answer. + +Figure 17: The additive single-rating evaluation prompt given to SFR-Judge models, adapted from Yuan et al. (2024). Blue text are changed to the corresponding actual value when rendering the template. Everything else is presented literally. The partial response note slot holds the beam search judging note of Sec. 3.3 is only used in the non-lookahead mode of beam search. + +You help revise a machine-generated response to a user query. Below, you will be provided with the user query and the machine-generated response. You will also be provided with the output of an evaluator model, which gives a score (max being {max_score}) and an explanation for the score. + +You should revise and improve the current response, following the evaluator's recommendation. If the evaluator does not identify any area of improvement, you should output "No revision needed." Otherwise, you should output the revised response surrounded by the and tags. You do not need to output anything else. + +```txt + {query} + {response} + {score} out of {max_score}. + + {explanation} + +Your revision (or "No revision needed.") +``` + +Figure 18: The refinement prompt given to the generator. Blue text are changed to the corresponding actual value when rendering the template. Everything else is presented literally. + +You are a helpful assistant in evaluating the quality of the responses for a given instruction, which is a math problem. Your goal is to select the best response for the given instruction. Select Response A or Response B, that is better for the given math problem. The two responses are generated by two different AI chatbots respectively. Do NOT say both / neither are good. + +Here are some rules of the evaluation: + +(1) You should prioritize evaluating if the output arrives at the correct solution for the given math problem and if the logical reasoning to derive the solution is sound. +(2) If both responses arrive at the correct solution, choose the response that contains the better logical reasoning. For reasoning, prioritize correctness, then completeness and conciseness. +(3) Responses should NOT contain more/less than what the question asks for, as such responses do NOT precisely solve the problem. +(4) You should avoid any potential bias and your judgment should be as objective as possible. Here are some potential sources of bias: + +- The order in which the responses were presented should NOT affect your judgment, as Response A and Response B are **equally likely** to be the better. +- The length of the responses should NOT affect your judgement, as a longer response does not necessarily correspond to a better response. When making your decision, evaluate if the response length is appropriate for the given instruction. + +You are a helpful assistant in evaluating the quality of the responses for a given instruction, which is a coding problem. Your goal is to select the best response for the given instruction. Select Response A or Response B, that is better for the given coding problem. The two responses are generated by two different AI chatbots respectively. Do NOT say both / neither are good. + +Here are some rules of the evaluation: + +(1) You should prioritize evaluating if the output response code correctly implements the desired functionality in the instruction. +(2) If both responses correctly implement the desired functionality, choose the response that contains the better written code. Prioritize conciseness and readability. +(3) Responses should NOT contain more/less than what the question asks for, as such responses do NOT precisely solve the problem. +(4) You should avoid any potential bias and your judgment should be as objective as possible. Here are some potential sources of bias: + +- The order in which the responses were presented should NOT affect your judgment, as Response A and Response B are **equally likely** to be the better. +- The length of the responses should NOT affect your judgement, as a longer response does not necessarily correspond to a better response. When making your decision, evaluate if the response length is appropriate for the given instruction. + +Figure 19: Domain-specific evaluation criteria given to SFR-Judge-8B for math reasoning (top) and code generation (bottom) evaluation. + +# B Complete benchmark results and additional experiments + +In this section, we present the raw benchmark performance as well as additional visualizations for all judges and reward model baselines across the three tasks. + +# B.1 Response reranking + +Pairwise round-robin reranking details. Because judge models are prone to positional biases (Li et al., 2023), we employ a consistency-based pairwise evaluation setup. We form all $N(N - 1) / 2$ pairs of responses. Then, we run each pairwise comparison twice, swapping the order of responses in the second run. If the same response is chosen for both runs, then we assign the selected response 1 "point" and the rejected response 0 "points". If the judge is inconsistent, i.e., selects different a different response when the order changes, we consider this a tie and assign both response 0.5 "points". The round-robin tournament winner is selected based on the response that has the most points after all $N(N - 1) / 2$ comparisons are completed. + +Full experimental results. We present the full raw benchmark performance for all judges, generators, and dataset combinations for the pairwise comparison protocol in Tab. 3, Likert rating protocol in Tab. 4, and additive rating protocol in Tab. 5. We also report the performance of Llama-3.1-8B-Instruct prompted with SFR-Judge prompts and three reward models to contextualize judge performance. + +
Prom 7BSFR 8BSC 8BOB 8BSFR 12BProm 8x7BSFR 70BSC 70BSTE 70BLlama 8BBest RMGreedyRandomOracleMaj
GSM8kLlama 8B85.2289.0888.8685.8289.3185.2293.7191.3690.0787.1190.3785.6782.0896.4490.83
Llama 70B95.8395.9195.9895.2295.6894.6996.2996.5994.9295.5396.5195.5395.1198.4896.82
Qwen 32B95.0096.2195.5395.6895.6094.8495.9195.7595.2295.1596.0695.2295.2298.5696.06
Qwen 72B95.0795.5395.6095.7595.2295.3095.6896.2195.7595.2296.2995.6895.5297.8896.29
Qwen-M 7B94.6995.4595.5394.6995.6094.4795.6895.6895.0794.7795.6895.1591.6597.8895.83
Dpsk-M 7B80.4486.7387.4982.4186.6681.0591.7490.2287.1184.1587.8380.9779.7595.5387.49
MATHLlama 8B23.1929.9825.7624.8529.9825.1536.7129.8329.9829.1529.8324.7021.9853.4733.08
Llama 70B43.3548.1147.2142.9847.2845.7751.8148.4149.5547.8150.0443.8142.0768.3552.49
Qwen 32B54.7659.0657.9353.5560.0555.0664.0559.8259.5958.0159.3457.1052.2478.1762.61
Qwen 72B62.3165.8664.2061.2565.0362.3168.2066.8467.3765.3366.0162.9961.3782.7869.26
Qwen-M 7B66.7770.0967.7565.4869.7167.0771.6869.7968.9669.7168.5866.3955.2880.1470.24
Dpsk-M 7B16.0123.5621.4521.0721.5319.9429.6824.8526.2822.1324.5818.6617.0447.2125.68
CHAMPLlama 8B30.7430.3730.7431.1134.0731.1134.0732.9633.3330.3731.8529.2627.3060.00-
Llama 70B45.9351.4850.7448.5248.8945.5648.1552.2247.7848.5252.2247.4146.0771.48-
Qwen 32B70.0071.1167.4172.9668.5268.8970.3768.8970.3767.7871.3075.1970.6785.56-
Qwen 72B65.9366.3070.0066.6768.5268.1567.4170.3767.7868.5268.7071.4867.1185.56-
Qwen-M 7B65.1970.3768.1567.0467.7867.4172.5970.0070.3766.6770.0062.9646.2681.85-
Dpsk-M 7B27.0442.5938.5234.4439.2625.5642.9640.0039.6330.7441.4826.3028.7872.22-
HumanEval+Llama 8B53.6658.5464.0261.5960.9855.4967.6866.4664.0261.5967.0763.3556.7079.88-
Llama 70B67.0771.3478.0575.6177.4370.7375.6179.2777.4475.6178.6675.6173.2390.85-
Qwen 32B79.8882.3281.1084.1582.3279.8881.1083.5481.1081.1085.3781.1082.5693.29-
Qwen 72B82.9384.7685.9885.9882.9381.7186.5987.8082.9382.3287.8082.3282.1393.90-
Qwen-C 7B75.0082.3281.1079.8882.3278.0584.1583.5482.9382.3282.3286.5981.5293.90-
Dpsk-C 6.7B66.4669.5175.0067.6867.6866.4677.4376.8374.3969.5177.4471.9567.6286.59-
MBPP+Llama 8B47.6254.2357.4158.9952.3849.2156.8862.7062.1756.6160.8554.5055.2176.46-
Llama 70B55.2958.7364.2965.3456.0856.0860.3269.3166.1465.3468.3965.0863.6883.07-
Qwen 32B73.8175.9375.9376.4674.8773.8175.6678.0475.4075.1376.0675.4075.4584.13-
Qwen 72B74.6076.7276.4676.1975.1375.4077.2576.9876.4678.0476.7276.1975.7184.66-
Qwen-C 7B66.4069.0570.1170.1166.9366.9372.4975.1373.2871.4372.2271.6966.5185.45-
Dpsk-C 6.7B53.4458.7361.1161.3857.6757.4160.5864.0261.9065.8765.8766.1462.1279.37-
BigCodeBenchLlama 8B26.2332.4633.2532.7231.2328.3336.0537.1936.2330.3535.0931.6728.0356.84-
Llama 70B40.4442.1942.8942.2841.6740.0042.6343.5143.6043.3343.9045.4441.9262.63-
Qwen 32B43.5146.2345.2644.9145.7943.8647.7246.8446.6745.1846.2345.5344.6665.18-
Qwen 72B45.7946.8447.4647.8947.6345.7047.5447.2847.6345.7948.6046.6746.3060.18-
Qwen-C 7B36.3240.2639.7441.2339.9138.3343.3343.8642.6340.1842.3742.3737.8961.58-
Dpsk-C 6.7B32.2836.1438.4237.5437.1933.6040.1840.0939.3036.8438.9934.9132.4958.95-
AlphaEvalLlama 8B34.9437.1536.9834.2339.9337.3140.5437.8637.6332.0038.9827.2626.8055.07-
Llama 70B46.0244.8842.8840.9945.9245.2046.8743.9045.6940.1745.0835.4834.2761.90-
Qwen 32B44.1843.8242.7041.3647.7844.5945.9743.6646.7041.8445.1742.9235.8061.69-
Qwen 72B58.9462.2255.9858.3564.1660.5163.6961.4363.0358.7362.5652.0156.7676.52-
IFEvalLlama 8B67.2870.2470.0671.9071.9068.9574.6871.3472.0969.8773.0172.8367.7987.80-
Llama 70B82.0781.7080.7880.0481.7080.0482.9982.2682.9980.2282.6284.2981.2192.42-
Qwen 32B80.6081.7080.4179.4880.0480.2282.6282.6282.2679.8582.3880.2279.4490.02-
Qwen 72B82.8184.6684.4783.7384.8483.5585.0385.4083.9285.2186.0483.5583.4292.05-
+ +Table 3: Performance of the top response after LLM-judge pairwise comparison-based reranking, in the context of the vanilla Llama 3.1 8B model using the SFR-Judge pairwise comparison prompt, the best reward model (using single-instance score to rerank), and various baselines. “-M” and “-C” suffixes represent the math and code domain-specific models. + +
Prom 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM8BSRM8BSRM27BGreedyRandomOracleMaj
GSM8kLlama 8B84.3286.8681.9286.1683.9588.3384.7090.0388.7890.3785.6782.0896.4490.83
Llama 70B95.8095.7795.3895.6095.4295.4795.5995.8796.0696.5195.5395.1198.4896.82
Qwen 32B95.4595.6595.0795.3495.3095.4795.3596.0695.9195.7995.2295.2298.5696.06
Qwen 72B95.8595.5595.4195.5895.5695.6295.7095.8396.2996.1395.6895.5297.8896.29
Qwen-M 7B93.7295.3691.8695.3594.1995.5794.7495.4595.5395.6895.1591.6597.8895.83
Dpsk-M 7B80.8982.7479.6082.7780.8687.1381.2685.9087.7287.8380.9779.7595.5387.49
MATHLlama 8B24.3326.6921.3026.3524.6529.4224.3429.2528.4429.8324.7021.9853.4733.08
Llama 70B45.0545.6741.5946.2344.7146.1545.1446.9847.7350.0443.8142.0768.3552.49
Qwen 32B54.7954.5352.1155.8453.9754.9955.0555.9759.3457.7857.1052.2478.1762.61
Qwen 72B62.7363.6161.6063.1662.0663.7862.8464.0966.0165.9462.9961.3782.7869.26
Qwen-M 7B55.8167.3556.2667.3361.7167.7864.1467.8667.7168.5866.3955.2880.1470.24
Dpsk-M 7B17.2221.7616.3319.8318.1124.8720.3023.7924.5824.4318.6617.0447.2125.68
CHAMPLlama 8B27.1324.9228.4130.2229.7431.5730.9431.8530.0030.7429.2627.3060.00-
Llama 70B47.0250.3046.9950.9047.9548.9447.6752.2250.7450.5647.4146.0771.48-
Qwen 32B70.1769.6870.8171.0670.3070.8169.3669.6368.7071.3075.1970.6785.56-
Qwen 72B64.9568.0967.4267.4066.4366.9968.5068.1568.7067.4171.4867.1185.56-
Qwen-M 7B64.4765.8866.4167.2664.2068.4466.0867.7870.0068.1562.9646.2681.85-
Dpsk-M 7B26.7031.8329.1533.0230.5239.1131.9639.4441.4834.8126.3028.7872.22-
Humanéval+Llama 8B58.6161.5457.0361.4757.4964.8757.5560.3764.3367.0763.3556.7079.88-
Llama 70B74.7672.8873.6373.1773.3774.1173.8477.4478.6677.4475.6173.2390.85-
Qwen 32B82.9081.3082.2982.5382.5084.8581.8084.7681.7185.3781.1082.5693.29-
Qwen 72B82.0185.5182.1784.5182.1084.6181.8784.1584.7687.8082.3282.1393.90-
Qwen-C 7B81.8181.9581.7781.8281.9184.5981.8081.7179.2782.3286.5981.5293.90-
Dpsk-C 6.7B67.9569.9768.4271.0968.0073.1669.6672.5673.7877.4471.9567.6286.59-
MBPP+Llama 8B56.7554.2055.9457.1756.4260.7256.8560.3260.8556.8854.5055.2176.46-
Llama 70B64.9260.3363.8461.8164.2665.0164.7464.5568.3963.2365.0863.6883.07-
Qwen 32B74.9475.4275.7775.4075.4175.5975.8475.1376.0675.4075.4075.4584.13-
Qwen 72B76.3176.9576.0776.5576.1176.0176.6876.7275.2676.4676.1975.7184.66-
Qwen-C 7B67.9467.7367.1769.2867.7470.9569.3371.4372.2271.5671.6966.5185.45-
Dpsk-C 6.7B62.2662.7362.6462.1262.4861.9063.5463.6265.8758.2066.1462.1279.37-
BigCodeBenchLlama 8B29.6930.6528.9532.0029.8534.2030.4332.6334.9635.0931.6728.0356.84-
Llama 70B42.3742.7542.5542.8842.7343.3142.7443.6343.9043.8645.4441.9262.63-
Qwen 32B45.0145.6144.7045.4444.9345.8045.6546.0546.0746.2345.5344.6665.18-
Qwen 72B46.7646.9346.3347.2746.3747.4546.6346.8948.6048.3346.6746.3060.18-
Qwen-C 7B38.6039.9538.1140.3638.5442.5339.4941.0542.3742.0642.3737.8961.58-
Dpsk-C 6.7B34.2234.8033.0735.6633.9738.6535.3136.8438.9938.8634.9132.4958.95-
AlpacaEvalLlama 8B28.4229.9527.8029.5027.6429.4327.3633.6236.0538.9827.2626.8055.07-
Llama 70B36.1336.8635.0136.5535.5035.6033.9939.1042.0545.0835.4834.2761.90-
Qwen 32B37.0837.0836.4037.2136.1736.5435.9836.0939.2242.4245.1732.9235.8061.69-
Qwen 72B54.4054.7553.8054.9954.0554.5454.0855.9560.3462.5652.0156.7676.52-
IFEvalLlama 8B67.8570.3469.1370.6369.1571.8070.4172.4671.0773.0172.8366.4387.80-
Llama 70B82.2682.2782.2682.2981.9982.7281.4581.1582.6281.8984.2979.9492.42-
Qwen 32B80.4080.1980.3079.7179.8982.6480.9582.3880.4181.4280.2277.3890.02-
Qwen 72B83.2583.7283.2984.2983.6384.8783.9184.5786.0483.4683.5581.4492.24-
+ +Table 4: Judge reranking performance under the Likert scale single-instance rating protocol. + +
Prom 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM8BSRM8BSRM27BGreedyRandomOracleMaj
GSM8kLlama 8B83.2885.4582.1085.3285.6986.5184.9990.0388.7890.3785.6782.0896.4490.83
Llama 70B95.6395.7895.5395.7195.8895.3595.6895.8796.0696.5195.5395.1198.4896.82
Qwen 32B95.2695.4794.9795.3295.3995.2795.4996.0695.9195.7995.2295.2298.5696.06
Qwen 72B95.5795.5595.1595.5395.6795.5095.1395.8396.2996.1395.6895.5297.8896.29
Qwen-M 7B91.6195.2591.8595.1493.7895.3495.0595.4595.5395.6895.1591.6597.8895.83
Dpsk-M 7B79.9483.4279.9781.2182.4185.3281.3585.9087.7287.8380.9779.7595.5387.49
MATHLlama 8B22.7925.1621.1925.9623.9726.9624.5929.2528.4429.8324.7021.9853.4733.08
Llama 70B43.3545.7142.5446.2644.2644.9846.0246.9847.7350.0443.8142.0768.3552.49
Qwen 32B54.1154.4951.8155.1655.0953.5554.4955.9759.3457.7857.1052.2478.1762.61
Qwen 72B61.7162.9761.8562.8463.0862.4662.4964.0966.0165.9462.9961.3782.7869.26
Qwen-M 7B50.0967.0754.6867.4261.0167.4163.8367.8667.7168.5866.3955.2880.1470.24
Dpsk-M 7B18.3520.0516.4618.4518.7622.4518.6423.7924.5824.4318.6617.0447.2125.68
CHAMPLlama 8B29.7727.7828.7432.0531.6131.1830.7031.8530.0030.7429.2627.3060.00-
Llama 70B47.9649.8547.1949.4049.4447.4146.3752.2250.7450.5647.4146.0771.48-
Qwen 32B69.6470.6270.8570.5170.4770.6271.3569.6368.7071.3075.1970.6785.56-
Qwen 72B67.3267.7966.5867.1467.7467.9866.3968.1568.7067.4171.4867.1185.56-
Qwen-M 7B61.9868.1067.1566.8967.1967.4364.6867.7870.0068.1562.9646.2681.85-
Dpsk-M 7B27.5534.0229.3631.8429.6137.1428.8439.4441.4834.8126.3028.7872.22-
Humanéval+Llama 8B57.3358.5356.9660.5057.7861.7459.5960.3764.3367.0763.3556.7079.88-
Llama 70B73.7273.4773.3972.8573.3473.9472.4377.4478.6677.4475.6173.2390.85-
Qwen 32B83.0579.0182.5382.5882.6082.5181.0084.7681.7185.3781.1082.5693.29-
Qwen 72B82.2984.0282.1684.5982.0783.6083.5884.1584.7687.8082.3282.1393.90-
Qwen-C 7B81.9682.2081.9381.9882.2982.3980.3781.7179.2782.3286.5981.5293.90-
Dpsk-C 6.7B66.3468.8367.9569.6367.9571.5665.7172.5673.7877.4471.9567.6286.59-
MBPP+Llama 8B58.0955.7055.8256.7656.5660.3356.8060.3260.8556.8854.5055.2176.46-
Llama 70B64.8562.6463.9062.1064.1364.2262.4064.5568.3963.2365.0863.6883.07-
Qwen 32B75.1675.3875.6674.7475.5175.3975.6775.1376.0675.4075.4075.4584.13-
Qwen 72B76.4676.3275.9375.9376.4876.8577.3376.7275.2676.4676.1975.7184.66-
Qwen-C 7B68.8967.7766.8570.1567.9671.8366.7971.4372.2271.5671.6966.5185.45-
Dpsk-C 6.7B64.0860.5062.6761.1562.5063.0762.4963.6265.8758.2066.1462.1279.37-
BigCodeBenchLlama 8B29.4830.4028.8831.2029.9032.2729.7832.6334.9635.0931.6728.0356.84-
Llama 70B42.6642.2742.5541.9442.6642.8842.7243.6343.9043.8645.4441.9262.63-
Qwen 32B44.7745.6344.7745.8345.5345.3145.5846.0546.0746.2345.5344.6665.18-
Qwen 72B46.2547.0446.3247.2046.9546.9946.7946.8948.6048.3346.6746.3060.18-
Qwen-C 7B37.9739.9838.0739.6139.0941.0739.3641.0542.3742.0642.3737.8961.58-
Dpsk-C 6.7B33.6133.8332.9035.2034.6637.6433.6336.8438.9938.8634.9132.4958.95-
AlpacaEvalLlama 8B29.0230.7827.8630.1628.7929.3229.0833.6236.0538.9827.2626.8055.07-
Llama 70B36.0538.1935.6436.6036.4836.1736.3239.1042.0545.0835.4834.2761.90-
Qwen 32B37.0638.0636.3437.6237.7736.8437.0839.2942.4245.1732.9235.8061.69-
Qwen 72B55.1755.8553.9155.0455.1654.9655.0355.9560.3462.5652.0156.7676.52-
IFEvalLlama 8B67.9969.3769.1169.4969.7570.4869.3272.4671.0773.0172.8366.4387.80-
Llama 70B81.5080.9481.9682.2080.8482.3580.8481.1582.6281.8984.2979.9492.42-
Qwen 32B79.3479.9779.9479.4680.1780.2179.4282.3880.4181.4280.2277.3890.02-
Qwen 72B84.1283.5583.1983.9082.3984.1483.0184.5786.0483.4683.5581.4492.24-
+ +Table 5: Judge reranking performance under the additive scale single-instance rating protocol. + +Additional visualizations for pairwise protocols. In Fig. 20, we visualize the performance of judges capable of both single-rating evaluation and pairwise evaluation to present a wholistic picture of reranking performance under different protocols. For the majority of benchmark and judge combinations, pairwise reranking tends to perform the best, with additive and Likert single-rating protocols performing roughly equally. + +![](images/989765e85efc48b8943de70719d2ff8033d46113235e98364d5040f3664b0368.jpg) +Figure 20: The reranking performance for different datasets, for each judge that supports both pairwise and single-rating protocols. In Fig. 21, we present an expanded version of Fig. 4 by plotting the minimum, maximum, mean, and distribution of normalized helpfulness for all pairwise judges. A similar set of plots is shown in Fig. 22 for single-rating protocols. Judges tend to reach higher maximum performance under pairwise prompts, while the minimum possible performance is relatively stable between the protocols. + +![](images/aa7eba0aa1bc6de83b0917b40d36db2e4018247757c1fc3f93ac8d5efbcbd785.jpg) +Figure 21: The violin plot showing the full distributions of judges' pairwise reranking performance. An equivalent bar chart containing only the mean is presented in Fig. 4. + +Judges are able to improve AlpacaEval length-controlled win-rates as well. It is well established that LLM-judges are susceptible to length bias (Zeng et al., 2023; Park et al., 2024), with judges preferring longer responses, even if they do not follow user instructions. As a result, AlpacaEval designed a length-controlled win rate (Dubois et al., 2024a), which fits a generalized linear model in an attempt to normalize response preferences based on length of responses. As we show in Tab. 6, pairwise reranking can lead to large gains in length-controlled win rate as well, highlighting that the responses judges + +![](images/1a7d9e00b7a3e57633bd605076e9fbe10cca11f392dfa5acda6103d49b0066a0.jpg) +Figure 22: Normalized helpfulness of the single-rating protocol (with both the Likert and additive prompt) across task categories of each judge, compared to Llama-3.1 8B with judge prompt, best reward model and random reranking, averaged across generator models and datasets. The top panel shows the full distribution while the bottom panel only shows the mean. + +select are high quality, regardless of length. In these settings, the Skywork-Critic models excel. Single-rating protocols also result in performance gains over greedy responses, but like the standard win rate setting, the gains are far less pronounced. Full results for Likert single-rating are shown in Tab. 7 and additive single-rating are shown in Tab. 8. + +
LCProm 7BSFR 8BSC 8BOB 8BSFR 12BProm 8x7BSFR 70BSC 70BSTE 70BLlama 8BBest RMGreedyRandomOracle
Llama 8B✘34.9437.1536.9834.2339.9337.3140.5437.8637.6332.0037.8627.2626.8055.07
✓31.6532.8336.3331.8135.9432.9437.2037.0933.2329.5337.0925.3325.0552.59
Llama 70B✘46.0244.8842.8840.9945.9245.2046.8743.9045.6940.1745.6935.4834.2761.90
✓46.1243.6746.1443.1145.2444.0946.8847.3841.0841.3847.3836.8536.5763.19
Qwen 32B✘44.1843.8242.7041.3647.7844.5945.9743.6646.7041.8446.7032.9235.8061.69
✓46.9447.1747.3845.4150.0746.2148.6149.1347.4845.2149.1338.4040.5264.75
Qwen 72B✘58.9462.2255.9858.3564.1660.5163.6961.4363.0358.7363.0352.0156.7676.52
✓52.2752.4155.4852.3555.0951.5656.0757.4254.2452.1357.4247.1848.5670.85
+ +Table 6: Judge reranking performance under the pairwise protocol on AlpacaEval, showing both non-length-controlled (LC) win rate and length-controlled win rate. The non-LC values are the same as those in Tab. 3. + +
LCProm 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM 8BSRM 8BSRM 27BGreedyRandomOracle
Llama 8BX28.4229.9527.8029.5027.6429.4327.3633.6236.0538.9827.2626.8055.07
✓26.6227.7925.8427.2925.9527.5726.2532.8734.7835.5825.3325.0552.59
Llama 70BX36.1336.8635.0136.5535.5035.6033.9939.1042.0545.0835.4834.2761.90
✓38.7038.7537.4338.6038.0137.9537.8442.4144.9046.1836.8536.5763.19
Qwen 32BX37.0837.0836.4037.2136.1736.5435.9839.2942.4245.1732.9235.8061.69
✓42.0541.5741.2942.0041.1141.4041.2145.1446.3646.3738.4040.5264.75
Qwen 72BX54.4054.7553.8054.9954.0554.5454.0855.9560.3462.5652.0156.7676.52
✓49.2649.4048.5749.8048.9049.5449.5053.4954.9954.4447.1848.5670.85
+ +Table 7: Judge reranking performance under the Likert scale single-instance rating protocol on AlpacaEval, showing both non-length-controlled (LC) win rate and length-controlled win rate. The non-LC values are the same as those in Tab. 4. + +
LCProm 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM 8BSRM 8BSRM 27BGreedyRandomOracle
Llama 8BX29.0230.7827.8630.1628.7929.3229.0833.6236.0538.9827.2626.8055.07
✓27.1528.5425.9427.9726.5827.1326.8432.8734.7835.5825.3325.0552.59
Llama 70BX36.0538.1935.6436.6036.4836.1736.3239.1042.0545.0835.4834.2761.90
✓38.5139.8838.0038.5138.3238.1537.9242.4144.9046.1836.8536.5763.19
Qwen 32BX37.0638.0636.3437.6237.7736.8437.0839.2942.4245.1732.9235.8061.69
✓41.6842.1441.2942.2242.0741.1941.4645.1446.3646.3738.4040.5264.75
Qwen 72BX55.1755.8553.9155.0455.1654.9655.0355.9560.3462.5652.0156.7676.52
✓49.5650.3748.7249.7849.7449.7649.3153.4954.9954.4447.1848.5670.85
+ +Table 8: Judge reranking performance under the additive scale single-instance rating protocol on AlpacaEval, showing both non-length-controlled (LC) win rate and length-controlled win rate. The non-LC values are the same as those in Tab. 5. + +Domain-specific prompts do not lead to judge improvements. Because the SFR-Judge family is trained to have flexible evaluation criteria, we experiment with prompting SFR-Judge-8B with domain-specific prompts for math reasoning and code generation benchmarks. We craft these prompts with an emphasis on correctness of output and validity of intermediate reasoning steps. The evaluation criteria for both prompts is shown in Fig. 19, with output format kept the same from the original prompt in Fig. 15. We show the impacts of this domain-specific prompting in Fig. 23. Namely, performance drops on all benchmarks, though no difference is statistically significant at $\alpha = 0.05$ . This demonstrates that the instruction following to reasoning domain gap discussed in Sec. 4.2 cannot be bridged with specialized prompting, which is more likely to be detrimental instead. + +![](images/b3185ee27a9730d234bbe5dc8dd5b6dc8eba15989862aaec84d4f4dc44fb8c9f.jpg) +Figure 23: Normalized helpfulness of SFR-Judge-8B across all benchmarks, averaged across all applicable models. Domain-specific evaluation prompting performs worse in all cases. + +Additional visualizations for single-rating protocols. The performance of judges based on judge-to-generator ratio for single rating protocols is presented in Fig. 24. The positive effect for math is still present, but notably diminished compared to that of the pairwise protocol (Fig. 5), whereas the sizable instruction following advantage found in the pairwise case is eliminated. + +Figure 24: The effect of judge-to-generator size ratio on the normalized helpfulness for under single-rating reranking protocols. +![](images/21dbc511e31b1ea3cfa834d5bf36dad141bfb576ee94ed96349aa8f872722a5e.jpg) +GSM8k MATH CHAMP HumanEval+ MBPP+ BigCodeBench AlpacaEval IFEval + +![](images/0c4d7b654874577f2d215a510a5f0fcbc1e53237f5979ecc3009939a6e142ac1.jpg) + +Finally, we plot the distribution of the fraction of tied, top-rated responses for single-rating protocols in Fig. 25. Notably, under the additive rating protocol, the Prometheus models are consistently able to reduce the number of top-rated responses compared to other models. Interestingly, this reduction in top-rated responses does not translate to improved average performance relative to other models, as shown in Fig. 7, which may suggest that the judge is assessing based on surface-level factors. Other judges, for the most part, struggle even with finer-grained additive evaluation criteria, tending to assert a large fraction of responses as top-quality, regardless of domain. + +![](images/487dbc5543689d53ab2915941b07f065dfad406432e955d9754432aafc3df891.jpg) +Figure 25: The distribution of fraction of total responses tied as top-rated under single-rating reranking protocols. + +# B.2 Step-Level Beam Search + +We present full results for our beam search experiments in Tab. 9. As Mao et al. (2024) found out for the CHAMP dataset, models' full solution accuracy is often much lower than their final answer accuracy. Furthermore, even state-of-the-art LLMs such as GPT-4 and 4 Turbo struggle to identify mistakes in intermediate steps. Thus, the oracle accuracy for math datasets, defined based on final answer accuracy, is likely to be a (severe) over-estimate of the true value. Such issues may also be present for code datasets, when a solution contains bugs not identified by the test cases, though the issue may be less extensive as we empirically find the trees to contain fewer leaf nodes (945 for math vs. 192 for code) and recent efforts in code evaluation have emphasized testing rigor (Liu et al., 2023a; Zhuo et al., 2024). + +We additionally report the performance of the Qwen2.5-Math-PRM, a 7B PRM specialized for the math domain. Despite its specialization to math, it also offers competitive performance in coding domain tasks, largely outperforming comparably sized LLM-judge models in beam search. + +
LookaheadProm 7BSFR 8BSC 8BOB 8BThm 8BSFR 12BProm 8x7BSFR 70BSC 70BSTE 70BQPRM 7BGreedyRandomOracle
GSM8kLlama 8BX85.6788.8688.7087.1985.7589.3185.4492.1291.9689.2393.7887.1182.3499.47
✓83.6289.8490.9087.3486.0589.6183.7094.0992.1290.8394.47
Llama 70BX94.6995.0795.9195.1595.6095.4594.1695.4596.5195.1596.9795.3894.2599.32
✓94.4795.8396.0695.6095.1595.9194.4795.9196.5195.0796.89
Qwen 32BX94.9295.7595.5395.7595.0795.2295.0795.0795.6094.8497.1295.1595.0399.01
✓95.0795.6895.0795.9194.8496.2194.5496.3696.2195.3896.97
Qwen 72BX95.4595.3895.6095.9896.0695.3095.1595.9195.9195.6096.5995.9195.6698.56
✓95.3894.9296.2995.9195.6895.6095.2296.2196.2995.7597.35
Qwen-M 7BX93.5694.6995.0094.6295.0095.1593.8695.0795.1594.8495.7594.2490.9699.17
✓92.9594.3994.6994.5494.8495.0793.6395.5395.1594.92
Dpsk-M 7BX79.4583.5583.8581.3580.2983.6281.2789.1688.0286.1392.3481.6579.9599.09
✓80.6787.9587.0484.3180.8287.6483.7091.9690.3088.70
MATHLlama 8BX22.0528.3224.7723.1922.9626.5124.5534.1429.3827.7942.6023.8721.4793.28
✓24.0929.9127.3425.7624.7029.4625.6840.4832.6328.4048.56
Llama 70BX43.0544.1845.0944.3443.6646.3744.1147.9644.3444.8655.3643.2041.7594.71
✓43.0549.4046.7545.6942.5248.2644.4153.1048.1945.7760.50
Qwen 32BX54.0056.8754.6154.3152.1956.5753.4759.1457.5554.4666.0157.1053.5493.50
✓52.7258.4660.2755.8253.4759.9754.9164.6561.7158.9968.81
Qwen 72BX62.2464.9564.6563.6762.0165.1864.2066.0965.6363.2270.9262.9961.3593.88
✓61.7865.2665.6361.3362.6165.4862.3968.2066.9266.0172.89
Qwen-M 7BX65.1867.3768.1366.3965.8668.5866.7764.9568.9667.6072.2865.7957.3293.81
✓63.9068.7368.5866.0167.2270.0266.5474.0970.6970.6976.21
Dpsk-M 7BX16.2419.4919.4119.7917.4519.2617.5225.7624.6220.9234.2919.0317.0885.20
✓16.5422.9624.6222.8118.9624.7021.3032.9328.8526.0639.88
CHAMPLlama 8BX30.3735.9330.3734.0728.5235.9328.8933.8638.5233.7039.6328.5228.9798.52
✓27.7837.4136.3034.8128.1536.6731.1143.3338.8935.1944.81
Llama 70BX43.3352.5951.4854.0752.5948.5245.1954.8152.9650.7458.1552.9646.76100.0
✓46.6754.8153.7058.5250.3751.1147.0454.8155.9352.9662.59
Qwen 32BX69.6370.7471.8574.0772.5969.6370.7474.4475.5671.1174.4472.9672.1697.04
✓68.8972.2272.2274.0773.3373.3370.0078.1574.0772.2278.52
Qwen 72BX73.7069.2671.8570.7472.5969.6374.8175.9373.3372.9677.0472.9671.7697.78
✓69.2670.3771.1172.9670.7469.2670.3774.8172.9674.4475.56
Qwen-M 7BX65.1967.0466.6766.3070.7466.6767.0467.7867.4165.5670.3764.4449.1096.67
✓56.6765.5664.4464.4463.7064.0762.9673.7069.6368.5275.93
Dpsk-M 7BX24.0732.9628.5231.4829.2628.1527.4141.1135.9336.6744.4427.4128.0895.93
✓22.9635.9331.1137.4133.3336.3028.1544.0738.8937.7850.37
HumanEval+Llama 8BX57.9365.2459.7663.4157.3262.8060.3765.8561.5965.2460.3759.1557.5589.02
✓58.5462.2060.3762.2059.1565.8559.1565.8565.8565.2467.07
Llama 70BX68.2973.1776.8370.1271.9571.3469.5174.3973.7873.1777.4474.3971.8792.68
✓70.1273.7875.0073.1773.1773.7871.9570.7377.4476.8376.83
Qwen 32BX82.3282.3284.7681.7183.5485.9881.7185.3785.9885.3783.5482.3281.9495.12
✓81.7179.2782.9381.1084.1584.7679.8884.7687.2084.7681.71
Qwen 72BX81.1081.7180.4981.1081.7182.3280.4982.3282.3282.3281.7180.4980.3892.07
✓79.8879.2781.1081.1081.7182.9381.1082.3282.9382.9382.93
Qwen-C 7BX78.6678.6681.7181.7183.5481.1078.6681.7182.9382.3285.9884.1580.1295.12
✓78.0579.8881.1081.7178.6684.1581.1079.8882.3279.2782.32
Dpsk-C 6.7BX62.8066.4664.6364.6364.0265.8563.4167.6867.8366.4670.7369.5164.9490.85
✓63.4169.5171.9569.5168.9070.7364.6376.8371.9573.17
MBPP+Llama 8BX58.9959.5260.5861.1160.0558.2056.0859.7964.8162.1761.1159.5257.1284.13
✓55.8255.2960.3262.9658.7357.1453.4461.3864.8162.70
Llama 70BX62.7062.4366.4064.8164.0265.0860.0564.5564.5567.9965.8768.2566.1488.62
✓60.3262.7066.4066.1461.3864.5561.3860.8564.8166.40
Qwen 32BX75.6677.2574.6076.7276.4675.9376.7278.0477.7876.7276.1975.6674.5188.62
✓74.3477.5174.3475.4075.1375.1374.6077.5176.4676.72
Qwen 72BX75.9376.1976.7276.4677.2577.2575.9377.7876.9877.2577.2576.4675.6886.24
✓76.7276.9876.4675.6676.1976.9876.4677.5175.9376.98
Qwen-C 7BX70.1172.7574.0771.9670.3771.4371.6973.8174.8773.0274.0771.6964.7090.21
✓68.5271.1771.9668.7869.8469.5869.3173.5474.6071.43
Dpsk-C 6.7BX61.9064.8161.1161.6460.3264.8163.7667.7264.5567.7265.6166.4061.3384.66
✓60.5862.1764.8163.7663.7662.9661.1163.7666.9364.55
BigCodeBenchLlama 8BX29.0430.4431.3231.6729.5630.7928.5133.8634.1233.5132.8133.3328.8866.58
✓26.4033.5133.5131.9330.0032.3728.6836.0534.0435.09
Llama 70BX40.0040.9641.5842.7243.7742.3740.4442.2843.6842.9842.3743.0741.9867.11
✓39.5641.7544.4742.8943.1641.4041.0542.4644.8243.42
Qwen 32BX43.3343.6845.0945.7945.3545.1844.8245.7046.4945.7945.1844.4744.2669.47
✓42.8144.9145.6145.9644.5643.9543.7745.5345.6145.96
Qwen 72BX45.3545.3546.7546.5846.4046.2345.7046.3246.8445.7946.1445.9646.0363.86
✓45.6146.2346.8447.2846.1446.1145.8846.3246.7546.32
Qwen-C 7BX37.1140.1840.7941.1438.0739.3038.0740.7941.9340.4442.3741.1438.2970.09
✓35.9640.4441.8441.1440.3540.7938.1642.4643.0741.58
Dpsk-C 6.7BX30.6135.1835.0035.1833.1634.3032.1136.7536.2336.4935.4435.0031.4265.09
+ +Table 9: Performance of the final selected node via the judge-guided beam search procedure. + +# B.3 Critique-Based Refinement + +We present full results for our critique-based refinement experiments in Tab. 10. Here, we report the judge selected response after reranking all generated responses, as well as the performance after just taking the last generated response. + +
Prom 7BSFR 8BThm 8BSFR 12BProm8x7BSFR 70BGreedyRand.-RROrac.-RR
Perf.LastRand.Orac.Perf.LastRand.Orac.Perf.LastRand.Orac.Perf.LastRand.Orac.Perf.LastRand.Orac.Perf.LastRand.Orac.GreedyRand.-RROrac.-RR
GSMR8Llama 8B85.0684.4684.6987.7985.5085.1485.4686.5085.6784.4684.8387.7985.9085.8285.3088.3284.7684.5384.8386.5890.1489.6988.4690.9885.6782.0896.44
Llama 70B95.0794.7795.0595.6095.4595.4595.4995.5395.0795.0794.9496.1395.0094.7795.2395.9195.2295.2295.3995.5395.6095.4595.4595.9195.5395.1198.48
Qwen 32B95.0795.1595.0195.5395.2295.2295.2295.2295.3895.3895.1695.4594.8495.0095.0095.3895.1595.0795.1095.2295.2295.3095.2795.4595.2295.2298.56
Qwen 72B95.7595.6895.6595.8395.6895.6895.6895.6895.5395.5395.5895.6895.5395.5395.6395.7595.6895.6895.6895.6895.7595.7595.7095.8395.6895.5297.88
MATHLlama 8B25.3024.9225.0227.6425.1325.0025.0825.6826.3626.5925.8528.9325.6825.9125.5828.7825.4525.3825.3427.4229.8328.4727.7432.1824.7021.9853.47
Llama 70B43.9644.1844.0245.1744.0044.1844.0144.4143.5843.5043.8846.6844.1843.9643.7346.3044.1143.8843.8344.7144.9444.6444.2845.3943.8142.0768.35
Qwen 32B57.0257.2557.0858.3157.1057.1057.1057.1057.5557.7057.2658.5356.5056.6556.7958.7656.8756.7256.8857.7858.0858.0157.2759.1457.1052.2478.17
Qwen 72B62.9262.7662.8063.2263.2663.2963.1463.2963.1463.0763.1063.8262.5462.6162.7063.9062.9262.9962.9163.2963.2963.0763.0463.9762.9961.3782.78
CHAMPLlama 8B29.6330.0030.4536.3027.7827.4128.8038.8927.3927.4127.9431.1129.2628.8929.4139.2626.6726.6727.3932.2236.3035.9332.8641.8529.2627.3060.00
Llama 70B48.1547.7847.5253.6049.2648.5248.7557.7847.4147.4147.4148.8947.7846.6746.8255.5648.1547.7847.6951.1148.5248.5248.3352.2247.4146.0771.48
Qwen 32B73.3373.3374.0476.3074.8174.0774.5875.5675.3375.1975.2575.5675.1974.8174.4975.9374.4474.8174.8375.1974.8175.1975.1275.5675.1970.6785.56
Qwen 72B71.8571.4871.5371.8570.7471.4871.2472.2271.1171.1171.2371.4871.8571.8571.7472.2271.1171.1171.2271.4871.4871.4871.5471.8571.4867.1185.56
HumanEval+Llama 8B59.7658.5460.3863.4164.6364.0264.2767.0763.4163.4163.4163.4159.1558.5459.8665.2462.8062.2062.8063.4165.8565.8564.4767.6863.3556.7079.88
Llama 70B71.3471.3473.0875.6171.3471.9573.5876.2275.0075.0075.4175.6174.3973.7874.1179.2775.6175.0075.3075.6175.6175.6175.0077.4475.6173.23
Qwen 32B81.1082.3281.5982.3281.1079.2780.0081.7180.2879.2780.1581.1079.2780.4980.6083.5479.8879.8880.4981.1081.1081.1081.1081.4482.9381.1082.56
Qwen 72B82.9383.2382.4783.5483.5483.5482.9784.7681.7181.7182.0182.3281.7181.7181.9784.7682.3282.3282.3282.3282.9383.5482.1383.5482.3281.13
MBPP+Llama 8B51.3251.0652.5756.3546.3044.9747.3659.2654.6254.7654.5555.2949.2144.9746.4661.1154.2353.9754.2555.2956.8856.0854.9759.5254.5055.2176.46
Llama 70B64.5564.8164.7866.9358.2057.4159.5269.0565.4865.3465.3465.6158.7360.0560.4969.3164.0264.0264.5165.3464.8165.8764.8467.6865.0863.68
Qwen 32B74.3474.0774.3175.9368.5269.0570.5878.8475.7575.6675.6975.9370.6370.9070.8778.3173.5473.8174.6076.1974.3475.4074.5577.2575.4075.45
Qwen 72B75.6675.4075.8477.2570.3769.5871.1278.5776.4676.4676.3276.4670.6370.6372.1778.5775.1375.1375.7576.7273.8174.0774.4578.0476.1975.7184.66
BioCovEval+Llama 8B31.6731.0531.3232.8130.2629.3029.6935.3531.6231.5831.6132.8132.6332.1931.9237.5430.0930.1830.6234.3934.8234.6533.4137.9831.6728.0356.84
Llama 70B45.1845.1845.4146.2343.0743.0743.8547.1945.7545.7045.5745.8843.0742.7243.2748.0743.7743.4844.5447.0245.0945.3545.1646.4045.4441.9262.63
Qwen 32B45.0945.1845.2746.1445.0944.9145.0647.6345.5345.5345.5345.5344.2144.2144.6746.9344.5644.3944.9145.7945.7045.9645.7047.4947.1345.64
Qwen 72B46.5846.6746.6347.1944.9144.9145.7046.6347.4646.7446.7546.7446.1446.0646.2647.6345.7045.6146.1047.1147.2847.1146.9348.1646.6746.30
BioCovEval-Llama 8B30.2027.9428.1239.0130.7830.3828.5638.2428.6829.1828.3234.0733.2830.3429.3539.1130.0429.3329.2636.8330.2228.6028.0236.3527.2626.8055.07
Llama 70B37.0036.1536.2141.4936.1935.2335.8539.5235.0435.1835.8036.6435.6035.2635.7637.6535.4335.4835.9236.9735.3734.7935.5235.6935.4834.27
Qwen 32B37.1437.0135.2539.6732.2632.2632.9232.9232.1432.1332.7833.5633.2733.4433.3334.6832.5832.7933.2033.8632.7332.5732.9434.3132.9235.80
Qwen 72B56.2155.8353.8256.9752.4651.0051.2253.8452.4652.3151.8552.5852.5752.4751.8352.8853.1453.1952.3052.8652.9751.6851.7853.4852.0156.76
IFEvalLlama 8B67.6568.3969.4577.4574.8673.3873.0579.8571.9373.2072.1676.5274.4975.0573.0680.7870.6170.9871.2775.7976.5276.5274.7279.4872.8366.43
Llama 70B83.3682.4483.5087.2584.1083.3683.5887.9984.5384.4784.3985.0385.4084.2984.5286.6983.9284.2984.1385.0385.5885.2184.8085.7784.2979.94
Qwen 32B79.6779.8579.9582.6282.2682.2682.8080.3580.8080.5781.7081.5281.5381.8083.9279.6779.8580.0881.1582.4482.6281.6281.3882.1880.2277.38
Qwen 72B82.9982.6283.3285.5885.2184.4784.8186.5482.8682.8183.1383.9284.4784.1083.8685.5884.1084.6684.1984.6684.2984.4784.0185.4083.5581.44
+ +Table 10: Critique-based refinement result for the (1, 9)-refinement setup. Random and Oracle for each judge are computed from the greedy seed response and nine responses generated during refinement. Random-RR and Oracle-RR are computed from the greedy seed response and nine sampled ones used in the reranking experiments. + +Graphical illustration. Fig. 26 graphically depicts the refinement process, compared to the reranking process, and illustrates the definition of various metrics used in Sec. 4.4. + +![](images/e962aa5a8cacb34a5807e3f31ba03bbbf45ed21bb349c554703547d29bfdeff7.jpg) +Figure 26: Illustration various metrics, all aggregated over the dataset. $p_{\text{greedy}}$ is calculated on the greedy response (seed in refinement and first in reranking), and $p_{\text{last}}^{\text{(Ref)}}$ on the last refined response. The judge, a random selector and an oracle selects respective responses from each refinement and reranking process and compute their metrics. + +Qualitative case study. Here, we provide examples of ineffective judge model critiques. We analyzed over 100 critique-response pairs and found two primary failure modes that point to lack of judge actionability: (1) False positives due to judges focusing on surface-level details rather than catching critical errors or (2) False negatives due to judges over scrutinizing stylistic errors over substance. Examples of false positive and false negative failure modes are presented in Fig. 27 and Fig. 28, respectively. In both cases, judges fail to assess based on validity and correctness of the response, offering feedback that does not appropriately progress or stop the refinement cycle. + +# Dataset: MATH + +Generator: Qwen2.5-72B-Instruct + +Judge: SFR-Judge-70B + +Refinement Round: 1 + +Type of Error: False positive. Generator produces the wrong output, but the judge does not catch the mistake. + +# Question: + +The $5 \times 5$ grid shown contains a collection of squares with sizes from $1 \times 1$ to $5 \times 5$ . How many of these squares contain the black center square? + +# Generator Output: + +Step 1: Identify the sizes of squares that can contain the black center square + +The black center square is located at the center of the $5 \times 5$ grid. We need to count the number of squares of different sizes that can contain this center square. + +Step 2: Count the number of squares of each size that contain the center square + +- $**1 \times 1$ squares**: Only the center square itself contains the black center square. There is 1 such square. +- $**2 \times 2$ squares**: The center square can be part of 4 different $2 \times 2$ squares (one for each possible position of the top-left corner of the $2 \times 2$ square that includes the center). +- $**3 \times 3$ squares**: The center square can be part of 4 different $3 \times 3$ squares (one for each possible position of the top-left corner of the $3 \times 3$ square that includes the center). +- $**4 \times 4$ squares**: The center square can be part of 4 different $4 \times 4$ squares (one for each possible position of the top-left corner of the $4 \times 4$ square that includes the center). +- $**5 \times 5$ squares**: The entire $5 \times 5$ grid is the only $5 \times 5$ square, and it contains the center square. There is 1 such square. + +## Step 3: Sum the number of squares of each size + +$$ +1 + 4 + 4 + 4 + 1 = 1 4 +$$ + +Therefore, the final answer is: 14. I hope it is correct. + +# Judge Critique: + +The response precisely executes the instruction by following the required format for complex problems and providing a clear step-by-step solution. The explanation and calculations are concise and easy to follow. The response also accurately counts the number of squares of each size that contain the center square and correctly sums them up to obtain the final answer. The conclusion is also in line with the instruction. + +# Ground-Truth Solution: + +All of the squares of size $5 \times 5$ , $4 \times 4$ , and $3 \times 3$ contain the black square and there are + +$$ +1 ^ {2} + 2 ^ {2} + 3 ^ {2} = 1 4 +$$ + +of these. In addition, 4 of the $2 \times 2$ squares and 1 of the $1 \times 1$ squares contain the black square, for a total of $14 + 4 + 1 = \boxed{19}$ . + +Figure 27: Example of a false positive judge critique. The judge focuses on surface-level details, such as ease of reading, rather than verifying the logical errors in the model response. As a result, the refinement process stops without correcting the mistake. + +# Dataset: MATH + +Generator: Llama-3.1-8B-Instruct + +Judge: SFR-Judge-70B + +Refinement Round: 1-6; 1 shown + +Type of Error: False negative. Generator produces the correct output, but the judge overemphasizes details irrelevant to response correctness. + +# Question: + +In the diagram below, we have $\sin \angle RPQ = \frac{7}{25}$ . What is $\cos \angle RPS$ ? [Tikz omitted] + +# Generator Output: + +Step 1: We are given that $\sin \angle R P Q = \frac{7}{25}$ and we need to find $\cos \angle R P S$ . +Step 2: To approach this problem, we can use the relationship between sine and cosine functions in a right-angled triangle. +Step 3: Since $\sin \angle RPQ = \frac{7}{25}$ , we can use the Pythagorean identity to find $\cos \angle RPQ$ . +Step 4: The Pythagorean identity states that $\sin^2\theta +\cos^2\theta = 1$ for any angle $\theta$ +Step 5: Therefore, we can find $\cos \angle RPQ$ by rearranging the Pythagorean identity: $\cos^2\angle RPQ = 1 - \sin^2\angle RPQ$ . +Step 6: Substituting the given value of $\sin \angle RPQ = \frac{7}{25}$ , we get $\cos^2\angle RPQ = 1 - \left(\frac{7}{25}\right)^2 = 1 - \frac{49}{625} = \frac{576}{625}$ . +Step 7: Taking the square root of both sides, we find $\cos \angle RPQ = \sqrt{\frac{576}{625}} = \frac{24}{25}$ . +Step 8: Now, we need to find $\cos \angle RPS$ . Since $\angle RPS$ is the supplement of $\angle RPQ$ , we can use the relationship $\cos (\theta +180^{\circ}) = -\cos \theta$ . +Step 9: Therefore, $\cos \angle RPS = -\cos \angle RPQ = -\frac{24}{25}$ . + +Therefore, the final answer is: $\boxed{-\frac{24}{25}}$ + +# Judge Critique: + +The response precisely executes the instruction by providing a step-by-step solution to the problem. It clearly explains each step and uses the required format. The response is also accurate, as it correctly applies the Pythagorean identity and the relationship between sine and cosine functions in a right-angled triangle. Additionally, the response is harmless and does not contain any unnecessary information. However, the response contains more steps than necessary, as the problem can be solved in fewer steps. + +# Ground-Truth Solution: + +For any angle $x$ , we have $\cos (180^{\circ} - x) = -\cos x$ , so $\cos \angle RPS = \cos (180^{\circ} - \angle RPQ) = -\cos \angle RPQ$ . Since $\sin^2 \angle RPQ + \cos^2 \angle RPQ = 1$ , we have $\cos^2 \angle RPQ = 1 - \left(\frac{7}{25}\right)^2 = \frac{576}{625}$ . Since $\angle RPQ$ is acute, we have $\cos \angle RPQ = \frac{24}{25}$ , which gives us $\cos \angle RPS = -\cos \angle RPQ = \boxed{-\frac{24}{25}}$ . + +Figure 28: Example of a false negative judge critique. The judge focuses on surface-level details, such as response length, ignoring the fact that the outcome is correct. + +# C Tables of Normalized Results + +Table 11-15 presents the normalized helpfulness and refinement ratio statistics for reranking, beam search and refinement. + +
Prom 7BSFR 8BSC 8BOB 8BSFR 12BProm 8x7BSFR 70BSC 70BSTE 70BLlama 8BBest RMGreedyRandomOracleMaj
GSM8kLlama 8B-0.0420.3170.2960.0140.338-0.0420.7470.5280.4090.1340.4360.000-0.3331.0000.479
Llama 70B0.1020.1290.153-0.1050.051-0.2850.2580.359-0.2070.0000.3320.000-0.1421.0000.437
Qwen 32B-0.0660.2960.0930.1380.114-0.1140.2070.1590.000-0.0210.2510.0000.0001.0000.251
Qwen 72B-0.277-0.068-0.0360.032-0.209-0.1730.0000.2410.032-0.2090.2770.000-0.0731.0000.277
Qwen-M 7B-0.1680.1100.139-0.1680.165-0.2490.1940.194-0.029-0.1390.1940.000-1.2821.0000.249
Dpsk-M 7B-0.0360.3960.4480.0990.3910.0050.7400.6350.4220.2180.4710.000-0.0841.0000.448
MATHLlama 8B-0.0520.1840.0370.0050.1840.0160.4170.1780.1840.1550.1780.000-0.0951.0000.291
Llama 70B-0.0190.1750.139-0.0340.1410.0800.3260.1870.2340.1630.2540.000-0.0711.0000.354
Qwen 32B-0.1110.0930.039-0.1680.140-0.0970.3300.1290.1180.0430.1060.000-0.2311.0000.262
Qwen 72B-0.0340.1450.061-0.0880.103-0.0340.2630.1950.2210.1180.1530.000-0.0821.0000.317
Qwen-M 7B0.0280.2690.099-0.0660.2410.0490.3850.2470.1870.2410.1590.000-0.8081.0000.280
Dpsk-M 7B-0.0930.1720.0980.0840.1010.0450.3860.2170.2670.1220.2070.000-0.0571.0000.246
CHAMPLlama 8B0.0480.0360.0480.0600.1560.0600.1560.1200.1320.0360.0840.000-0.0641.000-
Llama 70B-0.0610.1690.1380.0460.061-0.0770.0310.2000.0150.0460.2000.000-0.0561.000-
Qwen 32B-0.500-0.393-0.750-0.215-0.643-0.608-0.465-0.608-0.465-0.715-0.3750.000-0.4361.000-
Qwen 72B-0.394-0.368-0.105-0.342-0.210-0.237-0.289-0.079-0.263-0.210-0.1970.000-0.3101.000-
Qwen-M 7B0.1180.3920.2750.2160.2550.2360.5100.3730.3920.1960.3730.000-0.8841.000-
Dpsk-M 7B0.0160.3550.2660.1770.282-0.0160.3630.2980.2900.0970.3310.0000.0541.000-
HumanEval+Llama 8B-0.586-0.2910.041-0.106-0.143-0.4750.2620.1880.041-0.1060.2250.000-0.4021.000-
Llama 70B-0.560-0.2800.1600.0000.119-0.3200.0000.2400.1200.0000.2000.000-0.1561.000-
Qwen 32B-0.1000.1000.0000.2500.100-0.1000.0000.2000.0000.0000.3500.0000.1201.000-
Qwen 72B0.0530.2110.3160.3160.053-0.0530.3690.4730.0530.0000.4730.000-0.0161.000-
Qwen-C 7B-1.585-0.584-0.751-0.918-0.584-1.168-0.334-0.417-0.501-0.584-0.5840.000-0.6941.000-
Dpsk-C 6.7B-0.375-0.1670.208-0.292-0.292-0.3750.3740.3330.167-0.1670.3750.000-0.2961.000-
MBPP+Llama 8B-0.313-0.0120.1330.204-0.097-0.2410.1080.3730.3490.0960.2890.0000.0321.000-
Llama 70B-0.544-0.353-0.0440.014-0.500-0.500-0.2650.2350.0590.0140.1840.000-0.0781.000-
Qwen 32B-0.1820.0610.0610.121-0.061-0.1820.0300.3020.000-0.0310.0760.0000.0061.000-
Qwen 72B-0.1880.0630.0320.000-0.125-0.0930.1250.0930.0320.2180.0630.000-0.0571.000-
Qwen-C 7B-0.384-0.192-0.115-0.115-0.346-0.3460.0580.2500.116-0.0190.0390.000-0.3761.000-
Dpsk-C 6.7B-0.960-0.560-0.380-0.360-0.640-0.660-0.420-0.160-0.320-0.020-0.0200.000-0.3041.000-
BigCodeBenchLlama 8B-0.2160.0310.0630.042-0.017-0.1330.1740.2190.181-0.0520.1360.000-0.1451.000-
Llama 70B-0.291-0.189-0.148-0.184-0.219-0.316-0.163-0.112-0.107-0.123-0.0900.000-0.2051.000-
Qwen 32B-0.1030.036-0.014-0.0320.013-0.0850.1110.0670.058-0.0180.0360.000-0.0441.000-
Qwen 72B-0.0650.0130.0580.0900.071-0.0720.0640.0450.071-0.0650.1430.000-0.0271.000-
Qwen-C 7B-0.315-0.110-0.137-0.059-0.128-0.2100.0500.0780.014-0.1140.0000.000-0.2331.000-
Dpsk-C 6.7B-0.1090.0510.1460.1090.095-0.0540.2190.2150.1830.0800.1700.000-0.1011.000-
AlpacaEvalLlama 8B0.2760.3560.3500.2510.4560.3610.4780.3810.3730.1700.4210.000-0.0171.000-
Llama 70B0.3990.3560.2800.2090.3950.3680.4310.3190.3860.1780.3630.000-0.0461.000-
Qwen 32B0.3910.3790.3400.2930.5170.4060.4540.3730.4790.3100.4260.0000.1001.000-
Qwen 72B0.2830.4170.1620.2590.4960.3470.4770.3840.4500.2740.4300.000-0.1941.000-
IFEvalLlama 8B-0.371-0.173-0.185-0.062-0.062-0.259-0.124-0.100-0.049-0.1980.0120.000-0.3371.000-
Llama 70B-0.273-0.319-0.432-0.523-0.319-0.523-0.160-0.250-0.160-0.501-0.2050.000-0.3791.000-
Qwen 32B0.0390.1510.019-0.076-0.0180.0000.2450.2450.208-0.0380.2200.000-0.0801.000-
Qwen 72B-0.0870.1310.1080.0210.1520.0000.1740.2180.044-0.1950.2930.000-0.0151.000-
+ +Table 11: Normalized helpfulness of judge reranking (pairwise protocol), computed from raw data presented in Tab. 3. + +
Prom 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM8BSRM8BSRM27BGreedyRandomOracleMaj
GSM8kLlama 8B-0.1250.110-0.3480.045-0.1600.247-0.0900.4050.2890.4360.000-0.3331.0000.479
Llama 70B0.0920.081-0.0510.024-0.037-0.0200.0200.1150.1800.3320.000-0.1421.0000.437
Qwen 32B0.0690.129-0.0450.0360.0240.0750.0390.2510.2070.1710.0000.0001.0000.251
Qwen 72B0.077-0.059-0.123-0.045-0.055-0.0270.0090.0680.2770.2050.000-0.0731.0000.277
Qwen-M 7B-0.5240.077-1.2050.073-0.3520.154-0.1500.1100.1390.1940.000-1.2821.0000.249
Dpsk-M 7B-0.0050.122-0.0940.124-0.0080.4230.0200.3390.4640.4710.000-0.0841.0000.448
MATHLlama 8B-0.0130.069-0.1180.057-0.0020.164-0.0130.1580.1300.1780.000-0.0951.0000.291
Llama 70B0.0510.076-0.0900.0990.0370.0950.0540.1290.1600.2540.000-0.0711.0000.354
Qwen 32B-0.110-0.122-0.237-0.060-0.149-0.100-0.097-0.0540.1060.0320.000-0.2311.0000.262
Qwen 72B-0.0130.031-0.0700.009-0.0470.040-0.0080.0560.1530.1490.000-0.0821.0000.317
Qwen-M 7B-0.7690.070-0.7370.068-0.3400.101-0.1640.1070.0960.1590.000-0.8081.0000.280
Dpsk-M 7B-0.0500.109-0.0820.041-0.0190.2180.0570.1800.2070.2020.000-0.0571.0000.246
CHAMPLlama 8B-0.069-0.141-0.0280.0310.0160.0750.0550.0840.0240.0480.000-0.0641.000-
Llama 70B-0.0160.120-0.0170.1450.0220.0640.0110.2000.1380.1310.000-0.0561.000-
Qwen 32B-0.484-0.531-0.422-0.398-0.472-0.422-0.562-0.536-0.626-0.3750.000-0.4361.000-
Qwen 72B-0.464-0.241-0.288-0.290-0.359-0.319-0.212-0.237-0.197-0.2890.000-0.3101.000-
Qwen-M 7B0.0800.1550.1830.2280.0660.2900.1650.2550.3730.2750.000-0.8841.000-
Dpsk-M 7B0.0090.1200.0620.1460.0920.2790.1230.2860.3310.1850.0000.0541.000-
Humaneval+Llama 8B-0.287-0.109-0.382-0.114-0.3550.092-0.351-0.1800.0590.2250.000-0.4021.000-
Llama 70B-0.056-0.179-0.130-0.160-0.147-0.098-0.1160.1200.2000.1200.000-0.1561.000-
Qwen 32B0.1480.0160.0980.1170.1150.3080.0570.3000.0500.3500.0000.1201.000-
Qwen 72B-0.0270.275-0.0130.189-0.0190.198-0.0390.1580.2110.4730.000-0.0161.000-
Qwen-C 7B-0.654-0.635-0.659-0.653-0.640-0.274-0.655-0.668-1.001-0.5840.000-0.6941.000-
Dpsk-C 6.7B-0.273-0.135-0.241-0.059-0.2700.083-0.1560.0420.1250.3750.000-0.2961.000-
MBPP+Llama 8B0.102-0.0140.0660.1220.0870.2830.1070.2650.2890.1080.0000.0321.000-
Llama 70B-0.009-0.264-0.069-0.182-0.046-0.004-0.019-0.0290.184-0.1030.000-0.0781.000-
Qwen 32B-0.0530.0020.0420.0000.0010.0220.050-0.0310.0760.0000.0000.0061.000-
Qwen 72B0.0140.090-0.0140.043-0.009-0.0210.0580.063-0.1100.0320.000-0.0571.000-
Qwen-C 7B-0.273-0.288-0.328-0.175-0.287-0.054-0.172-0.0190.039-0.0090.000-0.3761.000-
Dpsk-C 6.7B-0.293-0.258-0.265-0.304-0.277-0.320-0.197-0.190-0.020-0.6000.000-0.3041.000-
BigCodeBenchLlama 8B-0.079-0.041-0.1080.013-0.0720.101-0.0490.0380.1310.1360.000-0.1451.000-
Llama 70B-0.179-0.156-0.168-0.149-0.158-0.124-0.157-0.105-0.090-0.0920.000-0.2051.000-
Qwen 32B-0.0260.004-0.042-0.005-0.0310.0140.0060.0260.0270.0360.000-0.0441.000-
Qwen 72B0.0070.019-0.0250.044-0.0220.058-0.0030.0160.1430.1230.000-0.0271.000-
Qwen-C 7B-0.196-0.126-0.222-0.105-0.1990.008-0.150-0.0690.000-0.0160.000-0.2331.000-
Dpsk-C 6.7B-0.029-0.005-0.0770.031-0.0390.1560.0170.0800.1700.1640.000-0.1011.000-
AlphaEvalLlama 8B0.0420.0970.0190.0810.0140.0780.0040.2290.3160.4210.000-0.0171.000-
Llama 70B0.0250.052-0.0180.0400.0010.005-0.0560.1370.2490.3630.000-0.0461.000-
Qwen 32B0.1450.1450.1210.1490.1130.1260.1060.2210.3300.4260.0000.1001.000-
Qwen 72B0.0980.1120.0730.1220.0830.1030.0840.1610.3400.4300.0000.1941.000-
IFEvalLlama 8B-0.333-0.166-0.247-0.147-0.246-0.069-0.162-0.025-0.1180.0120.000-0.4281.000-
Llama 70B-0.250-0.248-0.250-0.246-0.283-0.193-0.349-0.386-0.205-0.2950.000-0.5351.000-
Qwen 32B0.018-0.0030.008-0.052-0.0340.2470.0740.2200.0190.1220.000-0.2901.000-
Qwen 72B-0.0350.020-0.0300.0850.0090.1520.0410.1170.287-0.0100.000-0.2431.000-
+ +Table 12: Normalized helpfulness of judge reranking (single-rating protocol with Likert scale prompt), computed from raw data presented in Tab. 4. + +
Prom 7BSFR 8BThm 8BSFR 12BProm 8x7BSFR 70BLlama 8BOBRM8BSRM8BSRM27BGreedyRandomOracleMaj
GSM8kLlama 8B-0.222-0.020-0.331-0.0320.0020.078-0.0630.4050.2890.4360.000-0.3331.0000.479
Llama 70B0.0340.0850.0000.0610.119-0.0610.0510.1150.1800.3320.000-0.1421.0000.437
Qwen 32B0.0120.075-0.0750.0300.0510.0150.0810.2510.2070.1710.0000.0001.0000.251
Qwen 72B-0.050-0.059-0.241-0.068-0.005-0.082-0.2500.0680.2770.2050.000-0.0731.0000.277
Qwen-M 7B-1.2970.037-1.209-0.004-0.5020.070-0.0370.1100.1390.1940.000-1.2821.0000.249
Dpsk-M 7B-0.0710.168-0.0690.0160.0990.2990.0260.3390.4640.4710.000-0.0841.0000.448
MATHLlama 8B-0.0660.016-0.1220.044-0.0250.079-0.0040.1580.1300.1780.000-0.0951.0000.291
Llama 70B-0.0190.077-0.0520.1000.0180.0480.0900.1290.1600.2540.000-0.0711.0000.354
Qwen 32B-0.142-0.124-0.251-0.092-0.095-0.168-0.124-0.0540.1060.0320.000-0.2311.0000.262
Qwen 72B-0.065-0.001-0.058-0.0080.005-0.027-0.0250.0560.1530.1490.000-0.0821.0000.317
Qwen-M 7B-1.1850.049-0.8520.075-0.3910.074-0.1860.1070.0960.1590.000-0.8081.0000.280
Dpsk-M 7B-0.0110.049-0.077-0.0070.0040.133-0.0010.1800.2070.2020.000-0.0571.0000.246
CHAMPLlama 8B0.017-0.048-0.0170.0910.0760.0620.0470.0840.0240.0480.000-0.0641.000-
Llama 70B0.0230.101-0.0090.0830.0840.000-0.0430.2000.1380.1310.000-0.0561.000-
Qwen 32B-0.535-0.441-0.419-0.451-0.455-0.441-0.370-0.536-0.626-0.3750.000-0.4361.000-
Qwen 72B-0.295-0.262-0.348-0.308-0.266-0.249-0.362-0.237-0.197-0.2890.000-0.3101.000-
Qwen-M 7B-0.0520.2720.2220.2080.2240.2370.0910.2550.3730.2750.000-0.8841.000-
Dpsk-M 7B0.0270.1680.0670.1210.0720.2360.0550.2860.3310.1850.0000.0541.000-
Humaneval+Llama 8B-0.364-0.292-0.387-0.172-0.337-0.097-0.227-0.1800.0590.2250.000-0.4021.000-
Llama 70B-0.124-0.140-0.146-0.181-0.149-0.110-0.2090.1200.2000.1200.000-0.1561.000-
Qwen 32B0.160-0.1710.1170.1210.1230.116-0.0080.3000.0500.3500.0000.1201.000-
Qwen 72B-0.0030.147-0.0140.196-0.0220.1110.1090.1580.2110.4730.000-0.0161.000-
Qwen-C 7B-0.633-0.601-0.637-0.631-0.588-0.575-0.851-0.668-1.001-0.5840.000-0.6941.000-
Dpsk-C 6.7B-0.383-0.213-0.273-0.158-0.273-0.027-0.4260.0420.1250.3750.000-0.2961.000-
MBPP+Llama 8B0.1630.0550.0600.1030.0940.2650.1050.2650.2890.1080.0000.0321.000-
Llama 70B-0.013-0.136-0.066-0.166-0.053-0.048-0.149-0.0290.184-0.1030.000-0.0781.000-
Qwen 32B-0.027-0.0020.030-0.0760.013-0.0010.031-0.0310.0760.0000.0000.0061.000-
Qwen 72B0.0320.015-0.031-0.0310.0340.0780.1350.063-0.1100.0320.000-0.0571.000-
Qwen-C 7B-0.203-0.285-0.352-0.112-0.2710.010-0.356-0.0190.039-0.0090.000-0.3761.000-
Dpsk-C 6.7B-0.156-0.426-0.262-0.377-0.275-0.232-0.276-0.190-0.020-0.6000.000-0.3041.000-
BigCodeBenchLlama 8B-0.087-0.050-0.111-0.019-0.0700.024-0.0750.0380.1310.1360.000-0.1451.000-
Llama 70B-0.162-0.184-0.168-0.204-0.162-0.149-0.158-0.105-0.090-0.0920.000-0.2051.000-
Qwen 32B-0.0390.005-0.0390.0150.000-0.0110.0030.0260.0270.0360.000-0.0441.000-
Qwen 72B-0.0310.027-0.0260.0390.0210.0240.0090.0160.1430.1230.000-0.0271.000-
Qwen-C 7B-0.229-0.124-0.224-0.144-0.171-0.068-0.157-0.0690.000-0.0160.000-0.2331.000-
Dpsk-C 6.7B-0.054-0.045-0.0840.012-0.0100.114-0.0530.0800.1700.1640.000-0.1011.000-
AlpacaEvalLlama 8B0.0630.1270.0220.1040.0550.0740.0650.2290.3160.4210.000-0.0171.000-
Llama 70B0.0220.1030.0060.0420.0380.0260.0320.1370.2490.3630.000-0.0461.000-
Qwen 32B0.1440.1790.1190.1630.1690.1360.1450.2210.3300.4260.0000.1001.000-
Qwen 72B0.1290.1570.0780.1240.1290.1200.1230.1610.3400.4300.0000.1941.000-
IFEvalLlama 8B-0.323-0.231-0.248-0.223-0.206-0.157-0.234-0.025-0.1180.0120.000-0.4281.000-
Llama 70B-0.343-0.412-0.287-0.257-0.424-0.239-0.424-0.386-0.205-0.2950.000-0.5351.000-
Qwen 32B-0.090-0.026-0.029-0.078-0.005-0.001-0.0820.2200.0190.1220.000-0.2901.000-
Qwen 72B0.0660.000-0.0410.040-0.1330.068-0.0620.1170.287-0.0100.000-0.2431.000-
+ +Table 13: Normalized helpfulness of judge reranking (single-rating protocol with additive prompt), computed from raw data presented in Tab. 5. + +
LookaheadProm 7BSFR 8BSC 8BOB 8BThm 8BSFR 12BProm 8x7BSFR 70BSC 70BSTE 70BQPRM 7BGreedyRandomOracle
GSM8kLlama 8B✘-0.1170.1420.1290.006-0.1100.178-0.1350.4050.3920.1720.5400.000-0.3861.000
✓-0.2820.2210.3070.019-0.0860.202-0.2760.5650.4050.3010.595
Llama 70B✘-0.175-0.0790.135-0.0580.0560.018-0.3100.0180.287-0.0580.4040.000-0.2871.000
✓-0.2310.1140.1730.056-0.0580.135-0.2310.1350.287-0.0790.3830.000-0.0311.000
Qwen 32B✘-0.0600.1550.0980.155-0.0210.018-0.021-0.0210.117-0.0800.5100.000-0.0311.000
✓-0.0210.137-0.0210.197-0.0800.275-0.1580.3130.2750.0600.472
Qwen 72B✘-0.174-0.200-0.1170.0260.057-0.230-0.2870.0000.000-0.1170.2570.000-0.0941.000
✓-0.200-0.3740.1430.000-0.087-0.117-0.2600.1130.143-0.0600.543
Qwen-M 7B✘-0.1380.0910.1540.0770.1540.185-0.0770.1680.1850.1220.3060.000-0.6651.000
✓-0.2620.0300.0910.0610.1220.168-0.1240.2620.1850.1380.306
Dpsk-M 7B✘-0.1260.1090.126-0.017-0.0780.113-0.0220.4310.3650.2570.6130.000-0.0971.000
✓-0.0560.3610.3090.153-0.0480.3430.1180.5910.4960.4040.600
MATHLlama 8B✘-0.0260.0640.013-0.010-0.0130.0380.0100.1480.0790.0560.2700.000-0.0351.000
✓0.0030.0870.0500.0270.0120.0810.0260.2390.1260.0650.356
Llama 70B✘-0.0030.0190.0370.0220.0090.0620.0180.0920.0220.0320.2360.000-0.0281.000
✓-0.0030.1200.0690.048-0.0130.0980.0230.1920.0970.0500.336
Qwen 32B✘-0.085-0.006-0.068-0.077-0.135-0.015-0.1000.0560.012-0.0730.2450.000-0.0981.000
✓-0.1200.0370.087-0.035-0.1000.079-0.0600.2070.1270.0520.322
Qwen 72B✘-0.0240.0630.0540.022-0.0320.0710.0390.1000.0850.0070.2570.000-0.0531.000
✓-0.0390.0730.085-0.054-0.0120.081-0.0190.1690.1270.0980.320
Qwen-M 7B✘-0.0220.0560.0840.0210.0020.1000.035-0.0300.1130.0650.2320.000-0.3021.000
✓-0.0670.1050.1000.0080.0510.1510.0270.2960.1750.1750.372
Dpsk-M 7B✘-0.0420.0070.0060.011-0.0240.003-0.0230.1020.0840.0290.2310.000-0.0291.000
✓-0.0380.0590.0840.057-0.0010.0860.0340.2100.1480.1060.315
CHAMPLlama 8B✘0.0260.1060.0260.0790.0000.1060.0050.0760.1430.0740.1590.0000.0061.000
✓-0.0110.1270.1110.090-0.0050.1160.0370.2120.1480.0950.233
Llama 70B✘-0.205-0.008-0.0310.024-0.008-0.094-0.1650.0390.000-0.0470.1100.000-0.132100.0
✓-0.1340.0390.0160.118-0.055-0.039-0.1260.0390.0630.0000.205
Qwen 32B✘-0.138-0.092-0.0460.046-0.015-0.138-0.0920.0610.108-0.0770.0610.000-0.0331.000
✓-0.169-0.031-0.0310.0460.0150.015-0.1230.2160.046-0.0310.231
Qwen 72B✘0.030-0.149-0.045-0.089-0.015-0.1340.0750.1200.0150.0000.1640.000-0.0481.000
✓-0.149-0.104-0.0750.000-0.089-0.149-0.1040.0750.0000.0600.105
Qwen-M 7B✘0.0230.0810.0690.0580.1950.0690.0810.1040.0920.0350.184
✓-0.2410.0350.0000.000-0.023-0.011-0.0460.2870.1610.1270.357
Dpsk-M 7B✘-0.0490.0810.0160.0590.0270.0110.0000.2000.1240.1350.249
✓-0.0650.1240.0540.1460.0860.1300.0110.2430.1680.1510.335
HumanEval+Llama 8B✘-0.0410.2040.0200.143-0.0610.1220.0410.2240.0820.2040.041
✓-0.0200.1220.1110.090-0.024-0.224-0.224-0.224-0.224-0.224
Llama 70B✘-0.334-0.0670.133-0.233-0.133-0.167-0.2670.000-0.033-0.0670.167
✓-0.233-0.033-0.033-0.167-0.133-0.126-0.200-0.167-0.133
Qwen 32B✘0.0000.0000.191-0.0480.095-0.286-0.048-0.238-0.286-0.238-0.095
✓-0.048-0.238-0.048-0.095-0.143-0.191-0.191-0.191-0.381-0.191
Qwen 72B✘-0.053-0.105-0.053-0.053-0.105-0.158-0.000-0.158-0.158-0.158-0.105
✓-0.053-0.185-0.222-0.222-0.278-0.500-0.222-0.222-0.111-0.167-0.167
Qwen-C 7B✘-0.500-0.500-0.222-0.222-0.566-0.278-0.500-0.222-0.111-0.167-0.167
✓-0.556-0.389-0.278-0.222-0.500-0.278-0.389-0.167-0.167-0.445
Dpsk-C 6.7B✘-0.314-0.143-0.229-0.229-0.257-0.172-0.286-0.086-0.057-0.143-0.057
✓-0.286-0.000-0.114-0.000-0.029-0.134-0.229-0.229-0.229
MBPP+Llama 8B✘-0.022-0.008-0.043-0.065-0.022-0.144-0.145-0.111-0.215-0.108-0.065
✓-0.153-0.172-0.033-0.140-0.032-0.147-0.247-0.172-0.229
Llama 70B✘-0.153-0.165-0.012-0.059-0.094-0.147-0.271-0.171-0.071-0.082-0.125
✓-0.259-0.153-0.012-0.009-0.212-0.071-0.212-0.235-0.059-0.12
Qwen 32B✘-0.000-0.123-0.082-0.082-0.062-0.212-0.182-0.184-0.164-0.082
✓-0.102-0.143-0.102-0.020-0.041-0.041-0.182-0.143-0.062-0.082
Qwen 72B✘-0.054-0.028-0.272-0.188-0.129-0.149-0.157-0.149-0.157-0.149
✓-0.127-0.171-0.128-0.157-0.114-0.129-0.149-0.157-0.147
Qwen-C 7B✘-0.185-0.157-0.129-0.157-0.114-0.129-0.149-0.157-0.147
✓-0.171-0.128-0.145-0.145-0.188-0.290-0.145-0.299-0.149
Dpsk-C 6.7B✘-0.246-0.087-0.290-0.261-0.333-0.187-0.145-0.172-0.147
✓-0.319-0.232-0.187-0.145-0.145-0.188-0.290-0.145-0.299
BigCodeBench✘-0.129-0.187-0.167-0.113-0.173-0.146-0.145-0.144-0.144
✓-0.208-0.179-0.153-0.142-0.119-0.149-0.145-0.144-0.144
Llama 70B✘-0.128-0.188-0.162-0.153-0.149-0.149-0.149-0.149-0.149
✓-0.146-0.155-0.158-0.147-0.147-0.149-0.149-0.149-0.149
Qwen 32B✘-0.146-0.146-0.146-0.146-0.147-0.149-0.149-0.149-0.149
✓-0.166-0.188-0.166-0.147-0.147-0.149-0.149-0.149-0.149
Qwen 72B✘-0.129-0.179-0.166-0.147-0.147-0.149-0.149-0.149-0.149
✓-0.166-0.188-0.166-0.147-0.149-0.149-0.149-0.149-0.149
Qwen-C 7B✘-0.139-0.133-0.129-0.144-0.146-0.149-0.149-0.149-0.149
✓-0.179-0.144-0.144-0.144-0.147-0.149-0.149-0.149-0.149
Dpsk-C 6.7B✘-0.146-0.166-0.144-0.144-0.147-0.149-0.149-0.149-0.149
+ +Table 14: Normalized helpfulness of judge beam search, computed from raw data presented in Tab. 9. + +
Prom 7BSFR 8BThm 8BSFR 12BProm8x7BSFR 70B
δ(RR)δ(G)δ(Eff)δ(RR)δ(G)δ(Eff)δ(RR)δ(G)δ(Eff)δ(RR)δ(G)δ(Eff)δ(RR)δ(G)δ(Eff)δ(RR)δ(G)δ(Eff)
GSM8kLlama 8B0.9980.9930.9930.9600.9980.9601.0431.0001.0000.9621.0030.9620.9950.9890.9890.9621.0520.962
Llama 70B0.9920.9950.9920.9950.9990.9950.9950.9950.9950.9930.9940.9931.0060.9970.9970.9931.0010.993
Qwen 32B1.0010.9980.9980.9901.0000.9901.0041.0021.0020.9920.9960.9921.0030.9990.9990.9931.0000.993
Qwen 72B1.0071.0011.0011.0021.0001.0001.0040.9980.9981.0030.9980.9981.0041.0001.0001.0011.0011.001
MATHLlama 8B1.0911.0241.0240.8381.0170.8381.2441.0671.0670.8571.0400.8571.0121.0301.0120.8131.2080.813
Llama 70B1.0141.0031.0030.9151.0040.9151.0240.9950.9950.9341.0080.9340.9641.0070.9640.8671.0260.867
Qwen 32B1.0410.9990.9990.9671.0000.9671.1111.0081.0080.9410.9890.9411.0330.9960.9960.9071.0170.907
Qwen 72B1.0100.9990.9990.9611.0040.9611.0211.0021.0020.9620.9930.9621.0100.9990.9990.9281.0050.928
CHAMPLlama 8B0.9641.0130.9640.9150.9490.9150.9530.9360.9360.8591.0000.8590.8570.9110.8571.0651.2411.065
Llama 70B1.0481.0161.0160.9571.0390.9571.0051.0001.0000.9771.0080.9771.0571.0161.0161.0081.0231.008
Qwen 32B1.0480.9750.9751.0520.9950.9951.0631.0021.0021.0971.0001.0001.0810.9900.9901.0630.9950.995
Qwen 72B1.0901.0051.0051.0670.9900.9901.0680.9950.9951.0491.0051.0051.0430.9950.9951.0601.0001.000
HumanEval+Llama 8B1.1140.9430.9431.1041.0201.0201.1131.0011.0010.9700.9340.9341.1320.9910.9910.9731.0390.973
Llama 70B1.0640.9440.9441.0000.9440.9441.0220.9920.9920.9610.9840.9611.0691.0001.0001.0001.0001.000
Qwen 32B1.0151.0001.0000.9851.0000.9850.9730.9900.9730.9630.9770.9631.0000.9850.9851.0001.0001.000
Qwen 72B1.0001.0071.0000.9861.0150.9860.9950.9930.9930.9850.9930.9851.0071.0001.0000.9581.0070.958
MBPP+Llama 8B1.0780.9420.9420.8540.8500.8500.9791.0020.9790.9390.9030.9031.1020.9950.9951.0001.0441.000
Llama 70B1.1670.9920.9920.9910.8940.8941.0251.0061.0061.0470.9020.9021.1420.9840.9841.0740.9960.996
Qwen 32B1.0070.9860.9860.9020.9090.9021.0011.0051.0010.9430.9370.9370.9960.9750.9750.9830.9860.983
Qwen 72B1.0140.9930.9930.9170.9240.9171.0071.0041.0040.9400.9270.9270.9960.9860.9860.9550.9690.955
BigCodeBenchLlama 8B1.2071.0001.0000.9320.9550.9321.0950.9980.9981.0451.0301.0301.0620.9500.9500.9661.0990.966
Llama 70B1.1170.9940.9941.0210.9480.9481.0751.0071.0071.0340.9480.9481.0940.9630.9631.0580.9920.992
Qwen 32B1.0360.9900.9900.9750.9900.9751.0171.0001.0000.9650.9710.9651.0160.9790.9790.9581.0040.958
Qwen 72B1.0170.9980.9980.9590.9620.9591.0091.0011.0010.9690.9890.9691.0000.9790.9790.9951.0130.995
AlpacaEvalLlama 8B0.8641.1080.8640.8291.1290.8291.0291.0521.0290.8331.2210.8330.8051.1020.8050.7451.1090.745
Llama 70B0.8041.0430.8040.8061.0200.8060.9830.9880.9830.7751.0030.7750.7840.9990.7840.7550.9970.755
Qwen 32B0.8411.1280.8410.7360.9800.7360.8840.9760.8840.6961.0110.6960.7310.9900.7310.7120.9940.712
Qwen 72B0.9541.0810.9540.8431.0090.8430.9731.0090.9730.8191.0110.8190.8781.0220.8780.8321.0180.832
IFEvalLlama 8B1.0050.9290.9291.0661.0281.0281.0410.9880.9881.0361.0231.0231.0240.9700.9701.0251.0511.025
Llama 70B1.0160.9890.9891.0290.9980.9981.0311.0031.0031.0451.0131.0131.0480.9960.9961.0311.0151.015
Qwen 32B0.9880.9930.9881.0071.0251.0071.0051.0021.0021.0181.0161.0160.9930.9930.9930.9981.0280.998
Qwen 72B1.0020.9930.9931.0061.0201.0060.9960.9920.9920.9961.0110.9961.0071.0071.0070.9911.0090.991
+ +Table 15: The three improvement ratios for the (1, 9)-critique-based refinement setup, computed from raw data presented in Tab. 10. \ No newline at end of file diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/images.zip b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..20ad0c329a9dc75a8ca99dc67fe92ae6227a029f --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fc4a12dd3ced7ce5b0f64cf6bcd53ac9e0bd210df76f91dfdceac5cc7ae66f7 +size 4266213 diff --git a/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/layout.json b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4e95c74ba420fc1be4f2dddd39509da0ee4ec6bb --- /dev/null +++ b/ICML/2025/Evaluating Judges as Evaluators_ The JETTS Benchmark of LLM-as-Judges as Test-Time Scaling Evaluators/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab99ac480cf8cc722315a89382a2deb5061438550771b70fc1ba998331d4b209 +size 989210 diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_content_list.json b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..09c845f3391fce9405b01164df07ef3ce072d33b --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61bf1612529847e29c8a7ef873f79e369e9033f19c8a577130bdfb8f3e8371c8 +size 145860 diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_model.json b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4a8caf080a6358ed4ef256cc596e7437e1bf1b29 --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e1bfda7cebdb7c713eee6ce12fc0e8191f07f3bded7ce23f1a14541604f8507 +size 178499 diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_origin.pdf b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8bfe260072d6d6c1e8ee0c7d4005eca2f8baa728 --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/03ff31bc-ac20-4cd7-be77-3c44250f8ccb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d900017f817fd1389a39c8759f18dd913bd1cf6171b8ea3363785c38c29bd495 +size 1918634 diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/full.md b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bde92a6f9ac517f3b0c4b0b33956c697511b88cc --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/full.md @@ -0,0 +1,586 @@ +# Evaluating LLMs Across Multi-Cognitive Levels: From Medical Knowledge Mastery to Scenario-Based Problem Solving + +Yuxuan Zhou1 Xien Liu1 Chenwei Yan2 Chen Ning1 Xiao Zhang1 Boxun Li3 Xiangling Fu2 Shijin Wang4 Guoping Hu4 Yu Wang1 Ji Wu15,6 + +# Abstract + +Large language models (LLMs) have demonstrated remarkable performance on various medical benchmarks, but their capabilities across different cognitive levels remain underexplored. Inspired by Bloom's Taxonomy, we propose a multi-cognitive-level evaluation framework for assessing LLMs in the medical domain in this study. The framework integrates existing medical datasets and introduces tasks targeting three cognitive levels: preliminary knowledge grasp, comprehensive knowledge application, and scenario-based problem solving. Using this framework, we systematically evaluate state-of-the-art general and medical LLMs from six prominent families: Llama, Qwen, Gemma, Phi, GPT, and DeepSeek. Our findings reveal a significant performance decline as cognitive complexity increases across evaluated models, with model size playing a more critical role in performance at higher cognitive levels. Our study highlights the need to enhance LLMs' medical capabilities at higher cognitive levels and provides insights for developing LLMs suited to real-world medical applications. + +# 1. Introduction + +Large language model (LLM) technology has witnessed rapid advancement (Ouyang et al., 2022; Achiam et al., 2023; Anil et al., 2023; Touvron et al., 2023a) and shown potential in various fields, including medicine. Recently, start-of-the-art LLMs (e.g., GPT-4) have achieved expert-level performance across medical benchmarks (Singhal et al., + +$^{1}$ Department of Electronic Engineering, Tsinghua University, Beijing, China $^{2}$ School of Computer Science, Beijing University of Posts and Telecommunications, Beijing, China $^{3}$ Infinigence-AI, Beijing, China $^{4}$ iFLYTEK Research, Hefei, China $^{5}$ College of AI, Tsinghua University, Beijing, China $^{6}$ BNRist, Beijing, China. Correspondence to: Xien Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +2023a;b; Nori et al., 2023a; Qiu et al., 2024), demonstrating their promise in real-world medical applications. However, studies (Hager et al., 2024; Yan et al., 2025) demonstrate that these models still face challenges in handling tasks that more closely resemble real-world medical scenarios, such as clinical diagnosis and treatment. This disparity raises a critical question: how far are current LLMs from being truly applicable in real-world medical scenarios? + +Instead of directly answering this question, let's first consider a related question: what steps are required for a medical student to become a qualified physician? To become a qualified physician, a medical student typically undergoes a series of training stages, as shown in Figure 1 (a). First, the student acquires basic medical knowledge (e.g., anatomy, physiology, and pathology) through textbooks and lectures during the study in medical school. Then, the student learns to apply this knowledge in analyzing clinical cases during their clinical internship. Finally, the student practices diagnosing and treating patients under the guidance of experienced physicians during their residency. Such a training process is designed to align with the human cognitive process, as outlined in Bloom's Taxonomy (Anderson & Krathwohl, 2001): first memorizing and understanding knowledge, then applying it comprehensively, and finally using it to plan and solve problems in real-world scenarios. + +Similar to the training process, the evaluation process in the human education system also follows the human cognitive nature. For example, a typical exam sheet includes a variety of question types (e.g., multiple-choice, short-answer, and long-response questions) that are intentionally designed to assess students' abilities across different cognitive levels. In contrast, though existing medical benchmarks provide valuable insights into LLMs' medical capabilities, they primarily evaluate LLMs' capabilities at specific cognitive levels: most medical benchmarks (Jin et al., 2021; Pal et al., 2022; Wang et al., 2024; Cai et al., 2024; Qiu et al., 2024) evaluate LLMs' capabilities through question-answering (QA) tasks, which mainly focus on assessing LLMs' preliminary knowledge grasp; some other benchmarks (Hager et al., 2024; Ouyang et al., 2024) adopt tasks such as clinical diagnosis and treatment to evaluate LLMs' capabilities of + +![](images/97e92223012a4c2d1466b0311679a3608715a218991e000d530fa86b7422718e.jpg) +Figure 1. (a): The cognitive development process of human doctors; (b): Comparison of the existing evaluations and our proposed multi-cognitive-level evaluation framework (inspired by Bloom's Taxonomy) regarding cognitive levels. + +scenario-based problem solving. + +In this paper, we argue that the evaluation of LLMs should also follow the cognitive development process, i.e., evaluating LLMs' medical capabilities across multiple cognitive levels. To this end, we propose a multi-cognitive-level evaluation framework (MultiCogEval) to provide a comprehensive evaluation of LLMs' medical capabilities from a cognitive perspective. The schema of this framework is depicted in Figure 1 (b). Specifically, we consider three cognitive levels corresponding to the training process of human clinicians: preliminary knowledge grasp, comprehensive knowledge application, and scenario-based problem solving. Built on that, we design tasks that target each cognitive level and integrate three existing medical datasets to generate test samples for each task. To make the performance of LLMs comparable across different cognitive levels, we align the medical knowledge coverage across tasks at different levels as much as possible and normalize the performance metrics for each task. + +Using this framework, we systematically evaluate existing general and medical LLMs across 2B - 70B parameters from six prominent families: Llama, Qwen, Gemma, Phi, GPT, and DeepSeek. Our findings reveal that while current SOTA LLMs generally perform well on the preliminary knowledge grasp level, their performance declines significantly as the cognitive level increases. Moreover, we find that model size plays a more crucial role in performance at higher cognitive levels. Our study provides a clear landscape of LLMs' medical capabilities across different cognitive levels and highlights the need to enhance LLMs' medical capabilities at higher cognitive levels. The codes and datasets are available at https://github.com/THUMLP/MultiCogEval. Our contributions are: + +- We propose a novel evaluation framework for assessing LLMs' medical capabilities across multiple cognitive levels inspired by the human cognitive process. + +- Based on the proposed framework, we systematically evaluate state-of-the-art general and medical LLMs across six prominent families. +- We reveal a significant performance decline as cognitive complexity increases across evaluated models, offering insights for developing LLMs suited to real-world medical applications. + +# 2. Related Work + +# 2.1. LLM Medical Evaluation Benchmarks + +Recently, several medical evaluation benchmarks have been proposed to assess LLMs' medical capabilities. Most of existing medical benchmarks typically utilize the Question-answering (QA) form, where the questions are sourced from medical exams (Jin et al., 2021; Pal et al., 2022; Cai et al., 2024; Qiu et al., 2024), medical literature (Jin et al., 2019), and consumer health questions (Ben Abacha et al., 2017; Singhal et al., 2023a). Recent studies (Nori et al., 2023a;b; Singhal et al., 2023a) indicate that several LLMs perform notably on these benchmarks. For example, GPT-4 achieves an accuracy of 90.2 (with complex chain-of-thoughts prompting strategy) on the medical exam benchmark MedQA, approaching expert-level performance. Other benchmarks, such as MIMIC-IV-Ext (Hager et al., 2024) and CLIMED-Bench (Ouyang et al., 2024), adopt scenario-based tasks such as clinical diagnosis to evaluate LLMs' capabilities in solving medical problems in real-world scenarios. However, these benchmarks primarily focus on evaluating LLMs at specific cognitive levels and lack a holistic view of LLMs' medical capabilities across multiple cognitive levels. + +# 2.2. Bloom's Taxonomy + +Bloom's Taxonomy (Bloom et al., 1956) is a widely used framework for categorizing learning objectives. For learning objectives in the cognitive domain, Bloom's Taxonomy + +initially proposed six levels: Knowledge, Comprehension, Application, Analysis, Synthesis, and Evaluation. In 2001, a revision of Bloom's Taxonomy (Anderson & Krathwohl, 2001) was proposed, where the six levels were renamed and reordered as follows: Remembering, Understanding, Applying, Analyzing, Evaluating, and Creating. Inspired by the Revised Bloom's Taxonomy and the training process of human clinicians, this paper introduces a multi-cognitive-level evaluation framework to assess whether LLMs have achieved the learning objectives in the medical domain across varying cognitive levels. + +# 3. Methodology + +# 3.1. Multi-Cognitive-Level Evaluation Principles + +We first illustrate the idea of the proposed multi-cognitive-level evaluation. Given a large language model $\mathcal{M}$ and a series of cognitive levels $L_{1}, L_{2}, \ldots, L_{n}$ , the goal of the multi-cognitive-level evaluation is to assess the capabilities of $\mathcal{M}$ at each cognitive level: + +$$ +\mathbf {f} (\mathcal {M}) = \left[ f _ {1} (\mathcal {M}), f _ {2} (\mathcal {M}), \dots , f _ {n} (\mathcal {M}) \right] \tag {1} +$$ + +where $\mathbf{f}$ refers to the whole multi-cognitive-level evaluation process, $f_{i}$ represents the evaluation process at the $i$ -th cognitive level, and $f_{i}(\mathcal{M})$ denotes the corresponding evaluation results. + +A qualified multi-cognitive-level evaluation should also adhere to the following principles: + +- Task Relevance: The evaluation tasks should target different cognitive levels, aligning with the knowledge-learning process. +- Knowledge Consistency: In order to isolate the effects of cognitive levels, it is important to ensure that the evaluation tasks have consistent knowledge coverage across different cognitive levels, minimizing the influence of knowledge coverage on the evaluation results. +- Metric Alignment: The performance metrics should be aligned (normalized) across different cognitive levels to ensure the comparability of the evaluation results. + +In our study, we adopt these principles to develop a multi-cognitive-level evaluation framework for assessing LLMs' medical capabilities. Though we primarily focus on the medical domain, the proposed multi-cognitive-level evaluation principles can also be generalized to other domains. + +# 3.2. Cognitive Levels in Medical Domain + +Following the multi-cognitive-level evaluation principles, we first define three cognitive levels for assessing LLMs' + +medical capabilities by aligning with the training process of human clinicians and referring to Bloom's Taxonomy. The three cognitive levels are as follows1: + +- Preliminary Knowledge Grasp $(L_{1})$ : The first level corresponds to the education of medical students in medical school, where they learn and grasp basic medical knowledge through textbooks and lectures. At this level, we focus on evaluating LLMs' capabilities in memorizing and initially understanding medical knowledge that is essential for medical practice. +- Comprehensive Knowledge Application $(L_{2})$ : The second level relates to the clinical internship stage, where students learn to apply basic medical knowledge to handle simple clinical cases. This level aims to evaluate LLMs' capabilities in applying medical knowledge to analyze and solve complex medical problems. +- Scenario-based Problem Solving $(L_{3})$ : This level corresponds to the residency training stage, where students practice advanced clinical skills (e.g., diagnosis, treatment) under the guidance of experienced physicians. At this level, we aim to evaluate LLMs' capabilities in planning and solving problems in real-world medical scenarios using medical knowledge. + +# 3.3. Multi-Cognitive-Level Evaluation Framework + +Based on the defined cognitive levels, we develop a multi-cognitive-level evaluation framework that integrates existing medical datasets and designs tasks tailored to each cognitive level. The overview of the proposed framework is illustrated in Figure 2. In the following sections, we will introduce the detailed design of the evaluation tasks, dataset construction, and performance metrics that follow the multi-cognitive-level evaluation principles proposed in Section 3.1. + +Task Design For Low-Level tasks $(f_{1})$ , we adopt multiple-choice questions (MCQs) as simple knowledge recalling tasks for Low-Level, where the model is required to recognize the correct answer from multiple candidate options (see the left part of Figure 2). Such task format is commonly used in existing medical benchmarks and human examinations to evaluate students' basic knowledge understanding. + +For Mid-Level tasks $(f_{2})$ , given that existing medical benchmarks fail to adequately address this cognitive level—either being too simplistic, as in QA-based benchmarks, or overly complex, as in scenario-based benchmarks—we reformulate the original MCQs into a set of "Complex Knowledge Application" tasks for this level. These tasks are designed to assess the cognitive skills required for real-world medical + +![](images/57ee6f771cd448726252aaf1d7a9ccee7bb6cb864f38104e5434a6035d3c58c9.jpg) +Figure 2. An overview of the proposed multi-cognitive-level medical evaluation framework. + +tasks from different perspectives without relying on specific scenarios, thereby effectively evaluating the model's ability in the Mid-Level. Specifically, we consider the following task types (see the middle part of Figure 2): + +- Statement Validation Questions: We transform the question and one of the candidate options from the original MCQs into a statement, requiring the model to determine whether the statement is true or false. While this task may intuitively seem simpler than MCQs, the answer choices in MCQs can provide additional clues, allowing the model to choose the most plausible answer without fully understanding why it is correct. In contrast, statement validation emphasizes the model's ability to precisely discriminate knowledge, closely mirroring real-world clinical scenarios where options are typically not provided. Furthermore, given that some MCQ distractors significantly increase task difficulty, we construct two statements per MCQ: one reflecting the correct answer and the other derived from a distractor, maintaining their difficulty. +- Multi-Step Rectification Questions: Handling QA tasks typically requires a single decision-making step, whereas problem-solving in real-world scenarios often involves multiple steps. For instance, when managing a patient's care, a doctor first establishes a diagnosis and then prescribes treatment based on the diagnosis made in the previous step. Inspired by this, we reformulate the original MCQ into a two-step task: we first ask the model to verify whether a provided option is the correct answer of the MCQ, and then, if the answer is incorrect, we ask the model to give the correct answer from the rest of options. We generate two questions for each MCQ: one provides the correct answer, while the other provides a randomly sampled wrong option. +- Answer Existence Judgment Questions: QA tasks typically operate within a constrained decision space + +![](images/3f9bfe370c101a84a1989b0ccfd0d7fb9a352cf2936f859f75861d509b8ae8e3.jpg) +Figure 3. An overview of the full-path clinical diagnosis task applied in the proposed evaluation framework. + +(e.g., predefined answer choices), whereas real-world tasks involve significantly broader decision spaces. For instance, there may be hundreds of potential candidate diseases in clinical diagnosis, requiring more complex decision-making to reach the correct diagnosis. To simulate this, we design a task where the model is asked to determine whether the correct answer exists in a set of candidate options. For each original MCQ, we generate a pair of questions with opposite labels to eliminate the influence of random guessing: one question retains the original options, while the correct option in the other question is replaced with a distractor. + +For High-Level tasks $(f_{3})$ , we follow Hager et al. (2024) and assess LLMs' capabilities of solving scenario-based problems using a full-path clinical diagnosis task, as illustrated in Figure 3. Compared to the tasks in the Low-Level and Mid-Level, this task simulates a real-world diagnostic process by requiring the model to sequentially order examinations and integrate information from the obtained examination results to arrive at a final diagnosis. Solving this task requires models to perform multi-step decision-making within a larger decision space, mirroring the complexity of + +![](images/22a7368f52af334d5adc0b795984275049aefd3371a06d22e65f6a8e19303916.jpg) +Recognize & Retrieve Procedure for High-level Dataset Construction +Figure 4. The recognize-and-retrieve procedure for constructing the High-Level dataset, ensuring alignment with previous levels in terms of knowledge coverage. + +real-world medical scenarios. + +Dataset Construction For Low-Level tasks, we directly use the questions from the MedQA (Jin et al., 2021) and MedMCQA (Pal et al., 2022) datasets, which cover a wide range of medical knowledge and are widely used to evaluate LLMs' medical capabilities. For Mid-Level tasks, as introduced above, we reformulate each original MCQ into two statement validation questions, two multi-step rectification questions, and two answer existence judgment questions. We apply the advanced GPT-4o to assist in data generation. Specifically, GPT-4o is employed to (1) generate statements based on the questions and the provided options for the statement validation tasks and (2) generate the distractors for the answer existence judgment tasks based on the original question and the correct answer. We arrange for three doctors with over three years of experience to verify the statements and distractors generated by GPT-4o and find that the error rate of GPT-4o is less than $5\%$ . + +For High-Level tasks, we leverage the MIMIC-IV dataset (Johnson et al., 2023), which contains detailed electronic health records (EHRs) of patients, including the history of present illness, physical examination, laboratory tests, microbiology tests, and imaging tests. We employ a recognize-and-retrieve procedure to construct the dataset, ensuring its knowledge coverage remains consistent with previous levels (see Figure 4). Specifically, we first use the medical NER tool MedCAT (Kraljevic et al., 2021) to identify diseases in previous-level tasks and construct a disease pool. We then filter the admission records associated with these diseases using ICD-10-CM codes, which are widely employed for disease classification. To ensure alignment between primary diagnoses and the disease pool, we extract admission records where the primary discharge diagnosis matches a disease in the pool. Records with more than two diseases in the discharge diagnosis are excluded to maintain a one-to-one mapping between records and diseases. After processing, 2,176 admission records remain, covering 42 diseases across eight human body systems. Finally, we convert these records into test samples for the full-path clinical + +Table 1. The basic statistics of the constructed multi-cognitive-level medical evaluation benchmark. + +
LevelsTasksSources# Samples
LowMCQsMedQA795
MedMCQA2,816
MiddleReformulated TasksMedQA4,770
MedMCQA16,896
HighScenario-based DiagnosisMIMIC-IV2,176
+ +diagnosis task. Table 1 summarizes the key statistics of the constructed multi-cognitive-level evaluation benchmark, while additional details, including task examples, prompts, and answer parsing, are provided in Appendix A. + +Performance Metrics We adopt the accuracy for the Low-Level and Mid-Level tasks. For the High-Level task, we propose full-path diagnosis accuracy, a new metric that assesses LLMs' diagnostic performance by considering both procedural correctness and outcome accuracy: + +$$ +\text {A c c u r a c y} _ {\text {p r o c}} = \frac {1}{N} \sum_ {i = 1} ^ {N} \mathbb {I} \left(\operatorname {D i a g} _ {\text {p r e d}} ^ {(i)} = \operatorname {D i a g} _ {\mathrm {g t}} ^ {(i)}\right) \times \operatorname {R e c a l l} _ {\text {e x a m}} ^ {(i)} \tag {2} +$$ + +where $\mathrm{Diag}_{\mathrm{pred}}^{(i)}$ and $\mathrm{Diag}_{\mathrm{gt}}^{(i)}$ denote the predicted and ground-truth diagnoses of the $i$ -th admission record, respectively. $\mathbb{I}(\cdot)$ is the indicator function, and $N$ is the number of admission records. $\mathrm{Recall}_{\mathrm{exam}}^{(i)}$ is the examination recall of the $i$ -th admission record, which is calculated as: + +$$ +\operatorname {R e c a l l} _ {\text {e x a m}} ^ {(i)} = \frac {\# \text {C o r r e c t O r d e r e d E x a m I t e m s}}{\# \text {T o t a l E x a m I t e m s i n t h e R e c o r d}} \tag {3} +$$ + +In this study, we prioritize examination recall, as missing critical examination information can have far more severe consequences than ordering non-essential tests during diagnosis. To ensure fairness, we compute the macro-average of both examination recall (across examination types) and diagnosis accuracy (across diseases), assuming equal importance for each examination type and disease in this task. + +Considering that the random guessing performance may vary across different tasks, we also calculate normalized accuracy of each task by reducing the effect of random guessing to ensure the comparability of the evaluation results across different cognitive levels: + +$$ +\text {A c c u r a c y} _ {\text {n o r m}} = \frac {\text {A c c u r a c y} _ {\text {m o d e l}} - \text {A c c u r a c y} _ {\text {r a n d}}}{1 - \text {A c c u r a c y} _ {\text {r a n d}}} \tag {4} +$$ + +More details about the metrics and normalization process are provided in Appendix B. + +Table 2. Performance (mean and standard error of the normalized accuracy $(\%)$ ) of LLMs across different cognitive levels evaluated on the proposed benchmark. Llama1's performance on the High-Level task is unavailable due to the absence of instruction-tuned versions. Asterisks: due to the high cost of GPT-4o and DeepSeek-V3 API, we evaluated it on $\sim 10\%$ of the original dataset. + +
ModelLow-LevelMid-LevelHigh-Level
MedQAMedMCQAMedQAMedMCQAMIMIC-IV
Llama-7B3.36 ± 0.8210.40 ± 0.242.47 ± 0.764.38 ± 0.62-
Llama-13B13.18 ± 0.5718.98 ± 0.222.62 ± 0.653.15 ± 0.71-
Llama-33B24.09 ± 0.2626.88 ± 0.3412.85 ± 0.6210.44 ± 0.19-
Llama-65B26.64 ± 0.4929.59 ± 0.2916.82 ± 0.7313.48 ± 0.44-
Llama2-7B15.88 ± 0.2818.32 ± 0.224.21 ± 1.015.40 ± 0.552.65 ± 0.20
Llama2-13B21.10 ± 0.3020.94 ± 0.336.18 ± 1.257.44 ± 0.294.92 ± 0.15
Llama2-70B37.99 ± 0.3435.60 ± 0.2620.92 ± 0.8016.12 ± 0.535.16 ± 0.18
Llama3-8B37.30 ± 0.5339.11 ± 0.2911.47 ± 0.4311.40 ± 0.2810.50 ± 0.16
Llama3-70B63.68 ± 0.3460.82 ± 0.2841.79 ± 0.8536.25 ± 0.4617.81 ± 0.41
Qwen-7B19.40 ± 0.3124.85 ± 0.217.34 ± 0.397.08 ± 0.322.51 ± 0.31
Qwen-14B38.05 ± 0.3839.25 ± 0.1317.98 ± 0.6315.98 ± 0.324.14 ± 0.29
Qwen-72B50.60 ± 0.3950.95 ± 0.1828.39 ± 0.7026.28 ± 0.315.89 ± 0.35
Qwen2-7B36.73 ± 0.4439.85 ± 0.1521.22 ± 0.5120.93 ± 0.186.99 ± 0.25
Qwen2-72B65.91 ± 0.2460.41 ± 0.1947.32 ± 0.4337.19 ± 0.1815.10 ± 0.09
Qwen2.5-7B42.86 ± 0.4945.39 ± 0.1727.01 ± 0.2124.75 ± 0.179.50 ± 0.04
Qwen2.5-14B52.23 ± 0.3051.74 ± 0.2435.62 ± 0.3730.73 ± 0.3112.07 ± 0.21
Qwen2.5-32B59.21 ± 0.2157.17 ± 0.0938.45 ± 0.5633.43 ± 0.2411.87 ± 0.22
Qwen2.5-72B67.83 ± 0.2061.82 ± 0.1249.47 ± 0.6940.57 ± 0.3916.05 ± 0.24
Gemma-2B6.16 ± 0.6315.04 ± 0.240.52 ± 0.312.82 ± 0.310.59 ± 0.09
Gemma-7B30.35 ± 0.4227.41 ± 0.3815.09 ± 0.4813.64 ± 0.370.33 ± 0.09
Gemma2-2B14.87 ± 0.3424.18 ± 0.311.78 ± 0.713.85 ± 0.555.02 ± 0.33
Gemma2-9B44.21 ± 0.1846.20 ± 0.2024.52 ± 0.2823.05 ± 0.249.04 ± 0.28
Gemma2-27B53.65 ± 0.3150.45 ± 0.1833.40 ± 0.8830.33 ± 0.2611.19 ± 0.64
Phi3-3.8B37.52 ± 0.2840.96 ± 0.2023.10 ± 1.1522.53 ± 0.372.21 ± 0.28
Phi3-7B49.25 ± 0.3046.95 ± 0.3028.87 ± 0.3121.75 ± 0.287.74 ± 0.16
Phi3-14B54.06 ± 0.4949.70 ± 0.2731.67 ± 0.5528.46 ± 0.243.89 ± 0.01
Phi4-14B56.19 ± 0.4052.62 ± 0.3039.30 ± 0.4233.46 ± 0.2312.18 ± 0.37
GPT-4o-mini62.67 ± 0.2055.33 ± 0.0642.98 ± 0.5932.28 ± 0.6613.81 ± 0.84
GPT-4o*78.33 ± 0.7564.00 ± 1.0256.96 ± 1.8441.65 ± 1.5919.33 ± 0.30
DeepSeek-V3*78.33 ± 0.7565.78 ± 0.2244.79 ± 0.3040.07 ± 1.4919.42 ± 0.17
+ +# 4. Experiments + +# 4.1. Experimental Setup + +Evaluated Models To conduct a systematic evaluation on current LLMs, we select a total of 32 general LLMs across six LLM families, including Llama (Touvron et al., 2023a; b; Dubey et al., 2024), Qwen (Bai et al., 2023; Yang et al., 2024; Hui et al., 2024), Gemma (Mesnard et al., 2024; Team et al., 2024), Phi (Abdin et al., 2024b; a), GPT-4o (OpenAI, 2024), and DeepSeek (Liu et al., 2024). We also evaluate 8 medical LLMs from 4 series: ClinicalCamel (Toma et al., 2023), Med42 (v1, v2) (Christophe et al., 2024a; b), Meditron (Chen et al., 2023), and MMed-Llama (Qiu et al., 2024). The detailed statistics are provided in Appendix C. + +Evaluation Setting For tasks in the Low-Level and Mid-Level, we leverage the five-shot in-context learning (Brown et al., 2020) for evaluation, where five input-output pairs are sampled as the demonstrative examples to guide the model to generate the correct answer for the test sample (see Figure 9 in Appendix A). For the High-Level task (full-path + +diagnosis), as it involves multi-turn interaction, we evaluate the instruction fine-tuned versions of the corresponding models and leverage the zero-shot learning setting to evaluate the models' performance. Specifically, for each test sample, we provide the model with the instructions for the task and ask it to order the specific exam items sequentially and make the final diagnosis. We utilize the UMLS Metathesaurus (Bodenreider, 2004) along with a handcrafted synonym set to identify the model's predictions for ordered exam items and the final diagnosis (the detection rate across all categories reached $\sim 95\%$ ). We conduct repeated evaluations 3-5 times and report the average performance and standard error. More details about the evaluation setting (e.g., hyperparameters) are provided in Appendix D. + +# 4.2. Cognitive-Level Analysis + +Higher the Cognitive Level, Worse the Model Performance We first compare the performance of LLMs across different cognitive levels on the proposed benchmark and present the results in Table 2. For the Mid-Level, we use the + +![](images/47e2bacf963329ae00dd98cf677e70e4cd69ae22bb3c0e8d6a8ba83bed6ea3f5.jpg) +Figure 5. Performance of LLMs across different parameters sizes on the proposed benchmark. The performance of Low and Mid-Level tasks is the macro average across MedQA and MedMCQA. + +average performance of the three task types to compare with the other two levels (Detailed performance is provided in Table 8 of Appendix E). We observe that several state-of-the-art LLMs, such as GPT-4o, DeepSeek-V3, and Llama3-70B, achieve remarkable performance ( $>60\%$ ) on the Low-Level (preliminary knowledge grasp) tasks. However, all of these models experience a significant performance drop ( $\sim20\%$ ) when evaluated on the Mid-Level tasks (comprehensive knowledge application). Moreover, on High-Level tasks (scenario-based problem solving), the performance of all models further declines, with the best-performing model, DeepSeek-V3, achieving only 19.4 full-path diagnosis accuracy. This indicates that while current LLMs grasp basic medical knowledge well, they still face significant challenges at higher cognitive levels, particularly when solving complex problems in real-world medical scenarios. + +Parameter Sizes Matter, Especially at Higher Cognitive Levels We further investigate the impact of model parameter sizes across different cognitive levels. Specifically, we examine 7B and 70B models from the Llama and Qwen families, along with GPT-4o and GPT-4o-mini². As shown in Figure 5, larger models consistently outperform their smaller counterparts within the same model series. Additionally, the performance gap between model sizes increases significantly from the Low-Level to the Mid-Level on a logarithmic scale, suggesting that model size plays a more critical role in enabling LLMs to tackle complex problem-solving tasks. However, this gap narrows slightly at the High-Level, implying that even the 70B-level models struggle to effectively solve scenario-based problems. + +![](images/fef6ca752d4cfec11e0885c297358595ce1b0fe1fd204a1f0121cc500a60a99c.jpg) +Figure 6. Performance gains of medical LLMs over their backbone models across different cognitive levels. + +Table 3. Performance (\%) of LLMs fine-tuned with/without inference-time scaling. The performance of Low and Mid-Level tasks is the macro average across MedQA and MedMCQA. + +
ModelLow-LevelMid-LevelHigh-Level
DeepSeek-V372.142.419.4
DeepSeek-R181.965.526.5
GPT-4o-mini59.037.713.8
o3-mini81.364.515.1
+ +Medical-Domain Finetuning Primarily Benefits Low- and Mid-Level Tasks To investigate the impact of medical-domain finetuning on LLMs across different cognitive levels, we compare the performance of medical LLMs with their backbone models. As shown in Figure 6, these specialized models generally outperform their backbone counterparts on Low- and Mid-Level tasks, with performance gains reaching up to $15\%$ . However, they fail to achieve significant improvements on High-Level tasks and even underperform their backbone models. This phenomenon indicates that while medical-domain finetuning strengthens LLMs' grasp of basic medical knowledge and its comprehensive application, it remains less effective in addressing complex real-world medical scenarios. + +Inference-time Scaling Works Well, Especially for Higher Levels We further investigate the effectiveness of inference-time scaling on LLMs' medical capabilities across different cognitive levels. We select two representative models with varied parameter scales (DeepSeek-V3 and GPT-4o-mini) and their corresponding inference-time scaling versions (DeepSeek-R1 and o3-mini) for study. As presented in Table 3, the inference-time scaling models consistently outperform their backbone models across all cog + +![](images/efdf4caf68163493832781cb40b221dbd73d5593b4aed5b96bf59facab4dae78.jpg) +Figure 7. Average diagnosis accuracy of LLMs (Llama2 and 3, Qwen1, 2, and 2.5) across diseases in the full-path clinical diagnosis task. + +Table 4. Detailed performance (%) of LLMs on tasks in the Mid-Level. StmtVal: Statement Validation; AnsExist: Answer Existence Judgment; MultiRect: Multi-Step Rectification. + +
ModelLowMid-Level
StmtValAnsExistMultiRect
Llama3-70B62.347.29.960.0
Qwen2.5-72B64.850.223.861.0
Gemma2-27B52.138.510.446.7
Phi4-14B54.440.117.551.6
GPT-4o71.258.822.466.3
DeepSeek-V372.153.76.367.4
+ +nitive levels, while they achieve more significant improvement on Mid-Level tasks compared to Low-Level tasks (e.g., +23.1 vs. +9.8 for DeepSeek-R1). Note that the performance gap narrows on high-level tasks due to their significantly increased difficulty. This suggests that inference-time scaling is a promising approach to enhance LLMs' medical capabilities, particularly for complex problem-solving tasks. + +# 4.3. Fine-Grained Analysis + +LLMs Perform Constantly Worse Across Tasks in the Mid-Level We further provide a fine-grained analysis of LLMs' performance across tasks within the Mid-Level and compare it with the Low-Level tasks. We illustrate results of the best-performed model from each LLM family in Table 4, with the full results presented in Table 8. We observe that LLMs consistently perform worse on all Mid-Level tasks compared to Low-Level tasks. Specifically, the performance drop on the answer existence judgment tasks is more significant, where almost all models experience a performance decrease of over $40\%$ . This suggests that current LLMs struggle with medical problems involving significantly larger decision spaces, which is a key requirement in + +Table 5. Detailed performance (\%) of LLMs on the full-path clinical diagnosis task. Exam Recall: the macro average of examination recall across examination types. End-point: the accuracy of the final diagnosis without considering the examination recall. + +
ModelExam RecallDiagnosis Accuracy
End-pointFull-path
Llama3-70B38.838.118.1
Qwen2.5-72B34.439.615.8
Gemma2-27B27.533.410.6
Phi4-14B27.139.212.2
GPT-4o31.849.219.3
DeepSeek-V330.053.619.4
+ +real-world medical scenarios. + +Low Procedural Correctness Causes Bad Performance in Scenario-based Tasks We further analyze the performance of large language models (LLMs) on the full-path clinical diagnosis task. As shown in Table 5, LLMs exhibit moderate performance in terms of end-point accuracy (i.e., diagnosis accuracy without considering examination recall), with DeepSeek-V3 achieving the highest accuracy at $53.6\%$ . However, when taking examination recall into consideration (full-path performance), the accuracy of all models declines significantly, with the best-performing model, DeepSeek-V3, achieving only $19.4\%$ diagnosis accuracy. This decline can primarily be attributed to low examination recall (less than $40\%$ ) across all models, suggesting that while current LLMs can occasionally reach the correct diagnosis, they fail to fully consider all relevant possibilities and request the necessary information throughout the diagnostic process. + +LLM Performance Across Diseases Presents Long-Tail Distribution Finally, we analyze the diagnosis performance of LLMs across diseases in the full-path clinical + +Table 6. Clinician validation results on the proposed benchmark Clinician Acc.: the percentage of correct answers provided by the clinicians. Clinician Subj. Diff.: the subjective difficulty by clinicians on a scale of 1-10 (1: very easy, 10: very difficult). + +
LevelClinician Acc. (%)Clinician Subj. Diff.
MeanMedian
Low68.85.05.5
Mid54.26.05.8
High23.57.57.5
+ +diagnosis task and present the results in Figure 7. We observe that the performance of LLMs varies significantly across different diseases, forming a long-tail distribution, while 70B models generally perform better than 7B models across all diseases. This suggests that current LLMs may struggle with diagnosing rare or complex diseases, which are critical in real-world medical scenarios. + +# 4.4. Clinician Validation + +Finally, to ensure that the tasks at different levels of the proposed benchmark genuinely correspond to distinct levels of cognitive difficulty, we further conduct a small-scale clinician validation study. Specifically, we randomly select 100 samples from the constructed benchmark and recruit four licensed clinicians with 3 to 8 years of experience to assess the benchmark's difficulty from two perspectives: (1) their accuracy in answering the questions and (2) their subjective difficulty ratings to the questions on a scale from 1 (Easy) to 10 (Hard). The evaluation results are provided in Table 6. We found that clinicians' accuracy also decreases as the cognitive level increases across three levels, indicating that tasks at higher levels are indeed more challenging. Moreover, their subjective difficulty ratings align with this trend, further demonstrating the validity of the proposed benchmark. More details about the clinician validation study, including the data selection and evaluation process, are provided in Appendix F. + +# 5. Conclusion + +In this work, we propose a multi-cognitive-level evaluation framework that assesses LLMs' medical capabilities at three cognitive levels. Using the proposed framework, we construct a new medical benchmark and systematically evaluate existing LLMs on the benchmark. Our study leads to the following key findings: (1) While the performance of smaller LLMs ( $\sim 10\mathrm{B}$ ) gradually approaches that of larger LLMs ( $>70\mathrm{B}$ ) on Low-Level tasks, the performance gap remains significant on Mid-Level and High-Level tasks, indicating that model size plays a crucial role in enabling LLMs to tackle complex medical problems; (2) Medical-domain finetuning significantly improves performance on + +Low- and Mid-Level tasks but has limited impact on High-Level tasks. This suggests that current medical-specific finetuning strategies are insufficient for enhancing LLMs' reasoning abilities in complex real-world medical scenarios; (3) Inference-time scaling shows promise in boosting LLMs' medical capabilities, especially in tasks requiring complex knowledge application. However, further research is required to enhance LLMs' High-Level capabilities, such as planning, requesting key information, and reasoning based on the acquired information. + +Based on these findings, we offer the following insights for applying and developing large language models to address real-world clinical challenges: (1) Model Selection: For low-level medical tasks such as knowledge-based question answering, LLMs with around 10B parameters are generally sufficient. However, for more complex clinical tasks—such as diagnosis and treatment recommendation—larger LLMs are necessary; (2) Medical LLM Development: Future medical-domain finetuning efforts should focus more on enhancing LLMs' High-Level cognitive abilities, including clinical planning, proactively acquiring key diagnostic and treatment information, and conducting multi-step reasoning Inference-time scaling emerges as a promising direction to support these high-level capabilities. + +To the best of our knowledge, this work is the first to evaluate LLMs' medical capabilities across multiple cognitive levels. While promising, the evaluation may be constrained by the scope of medical knowledge coverage and task diversity. Future research could further explore these areas, expanding the range of medical domains and tasks to offer a more holistic view of LLMs' medical abilities. + +# Acknowledgements + +This work was supported by the Noncommunicable Chronic Diseases-National Science and Technology Major Project (Grant No. 2023ZD0506501) and Beijing Natural Science Foundation (NO. 4252046). We would like to thank the clinicians who participated in the validation and the anonymous reviewers for their valuable feedback. + +# Impact Statement + +This work mainly explores a multi-cognitive-level evaluation framework for assessing LLMs' medical capabilities. The results indicate that current LLMs generally perform well on the preliminary knowledge grasp but face challenges at higher cognitive levels, providing insights for developing LLMs suited to real-world medical applications. The datasets and codes used in this study are built based on public medical datasets and are publicly available to facilitate further research. We have not identified any potential negative ethical consequences requiring further consideration. + +# References + +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, abs/2412.08905, 2024a. URL https://arxiv.org/abs/2412.08905. +Abdin, M., Jacobs, S. A., Awan, A. A., Aneja, J., Awadallah, A., Awadalla, H., Bach, N., Bahree, A., Bakhtiari, A., Behl, H., et al. Phi-3 technical report: A highly capable language model locally on your phone. ArXiv preprint, abs/2404.14219, 2024b. URL https://arxiv.org/abs/2404.14219. +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, abs/2303.08774, 2023. URL https://arxiv.org/abs/2303.08774. +Anderson, L. W. and Krathwohl, D. R. A taxonomy for learning, teaching, and assessing: A revision of Bloom's taxonomy of educational objectives: complete edition. Addison Wesley Longman, Inc., 2001. +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, abs/2312.11805, 2023. URL https://arxiv.org/abs/2312.11805. +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, abs/2309.16609, 2023. URL https://arxiv.org/abs/2309.16609. +Ben Abacha, A., Agichtein, E., Pinter, Y., and Demner-Fushman, D. Overview of the medical question answering task at trec 2017 liveqa. In TREC 2017, 2017. +Bloom, B. S., Englehart, M. D., Furst, E. J., Hill, W. H., Krathwohl, D. R., et al. Taxonomy of educational objectives, handbook i: the cognitive domain. new york: David mckay co, 1956. +Bodenreider, O. The unified medical language system (umls): integrating biomedical terminology. *Nucleic acids research*, 32(suppl_1):D267–D270, 2004. +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. 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, 2020. +Cai, Y., Wang, L., Wang, Y., de Melo, G., Zhang, Y., Wang, Y., and He, L. Medbench: A large-scale chinese benchmark for evaluating medical large language models. In Wooldridge, M. J., Dy, J. G., and Natarajan, S. (eds.), Thirty-Eighth AAAI Conference on Artificial Intelligence, AAAI 2024, Thirty-Sixth Conference on Innovative Applications of Artificial Intelligence, IAAI 2024, Fourteenth Symposium on Educational Advances in Artificial Intelligence, EAAI 2014, February 20-27, 2024, Vancouver, Canada, pp. 17709-17717. AAAI Press, 2024. doi: 10.1609/AAAI.V38I16.29723. URL https://doi.org/10.1609/aaai.v38i16.29723. +Chen, Z., Cano, A. H., Romanou, A., Bonnet, A., Matoba, K., Salvi, F., Pagliardini, M., Fan, S., Kopf, A., Mohtashami, A., et al. Meditron-70b: Scaling medical pretraining for large language models. ArXiv preprint, abs/2311.16079, 2023. URL https://arxiv.org/abs/2311.16079. +Christophe, C., Kanithi, P., Munjal, P., Raha, T., Hayat, N., Rajan, R., Al Mahrooqi, A., Gupta, A., Salman, M. U., Pimentel, M. A., et al. Med42-evaluating fine-tuning strategies for medical llms: Full-parameter vs. parameter-efficient approaches. In AAAI 2024 Spring Symposium on Clinical Foundation Models, 2024a. +Christophe, C., Kanithi, P. K., Raha, T., Khan, S., and Pimentel, M. A. Med42-v2: A suite of clinical llms, 2024b. URL https://arxiv.org/abs/2408.06142. +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, abs/2407.21783, 2024. URL https://arxiv.org/abs/2407.21783. +Hager, P., Jungmann, F., Holland, R., Bhagat, K., Hubrecht, I., Knauer, M., Vielhauer, J., Makowski, M., Braren, R., Kaissis, G., et al. Evaluation and mitigation of the limitations of large language models in clinical decision-making. Nature medicine, 30(9):2613-2622, 2024. +Hui, B., Yang, J., Cui, Z., Yang, J., Liu, D., Zhang, L., Liu, T., Zhang, J., Yu, B., Dang, K., et al. Qwen2.5-coder technical report. ArXiv preprint, abs/2409.12186, 2024. URL https://arxiv.org/abs/2409.12186. +Jin, D., Pan, E., Oufattole, N., Weng, W.-H., Fang, H., and Szolovits, P. What disease does this patient have? a large-scale open domain question answering dataset from medical exams. Applied Sciences, 11(14):6421, 2021. + +Jin, Q., Dhingra, B., Liu, Z., Cohen, W., and Lu, X. PubMedQA: A dataset for biomedical research question answering. In Inui, K., Jiang, J., Ng, V., and Wan, X. (eds.), Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 2567-2577, Hong Kong, China, 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1259. URL https://aclanthology.org/D19-1259. +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. +Kraljevic, Z., Searle, T., Shek, A., Roguski, L., Noor, K., Bean, D., Mascio, A., Zhu, L., Folarin, A. A., Roberts, A., et al. Multi-domain clinical natural language processing with medcat: the medical concept annotation toolkit. Artificial intelligence in medicine, 117:102083, 2021. +Liu, A., Feng, B., Xue, B., Wang, B., Wu, B., Lu, C., Zhao, C., Deng, C., Zhang, C., Ruan, C., et al. Deepseek-v3 technical report. arXiv preprint arXiv:2412.19437, 2024. +Mesnard, T., Hardin, C., Dadashi, R., Bhupatiraju, S., Pathak, S., Sifre, L., Riviere, M., Kale, M. S., Love, J., et al. Gemma: Open models based on gemini research and technology. ArXiv preprint, abs/2403.08295, 2024. URL https://arxiv.org/abs/2403.08295. +Nori, H., King, N., McKinney, S. M., Carignan, D., and Horvitz, E. Capabilities of gpt-4 on medical challenge problems. ArXiv preprint, abs/2303.13375, 2023a. URL https://arxiv.org/abs/2303.13375. +Nori, H., Lee, Y. T., Zhang, S., Carignan, D., Edgar, R., Fusi, N., King, N., Larson, J., Li, Y., Liu, W., et al. Can generalist foundation models outcompete special-purpose tuning? case study in medicine. ArXiv preprint, abs/2311.16452, 2023b. URL https://arxiv.org/abs/2311.16452. +OpenAI. Gpt-4o mini: advancing cost-efficient intelligence, 2024. URL https://openai.com/index/hello-gpt-4o. +Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C. L., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P. F., Leike, J., and Lowe, R. Training language models to follow instructions with human feedback. In Koyejo, S., Mohamed, S., Agarwal, A., Belgrave, D., Cho, K., and Oh, A. (eds.), 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. +Ouyang, Z., Qiu, Y., Wang, L., De Melo, G., Zhang, Y., Wang, Y., and He, L. Climedbench: A large-scale chinese benchmark for evaluating medical large language models in clinical scenarios. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 8428-8438, 2024. +Pal, A., Umapathi, L. K., and Sankarasubbu, M. Medmcqa: A large-scale multi-subject multi-choice dataset for medical domain question answering. In Flores, G., Chen, G. H., Pollard, T., Ho, J. C., and Naumann, T. (eds.), Proceedings of the Conference on Health, Inference, and Learning, volume 174 of Proceedings of Machine Learning Research, pp. 248-260. PMLR, 2022. URL https://proceedings.mlr.press/v174/pal22a.html. +Qiu, P., Wu, C., Zhang, X., Lin, W., Wang, H., Zhang, Y., Wang, Y., and Xie, W. Towards building multilingual language model for medicine. Nature Communications, 15(1):8384, 2024. +Singhal, K., Azizi, S., Tu, T., Mahdavi, S. S., Wei, J., Chung, H. W., Scales, N., Tanwani, A., Cole-Lewis, H., Pfohl, S., et al. Large language models encode clinical knowledge. Nature, 620(7972):172-180, 2023a. +Singhal, K., Tu, T., Gottweis, J., Sayres, R., Wulczyn, E., Hou, L., Clark, K., Pfohl, S., Cole-Lewis, H., Neal, D., et al. Towards expert-level medical question answering with large language models. ArXiv preprint, abs/2305.09617, 2023b. URL https://arxiv.org/abs/2305.09617. +Team, G., Riviere, M., Pathak, S., Sessa, P. G., Hardin, C., Bhupatiraju, S., Hussenot, L., Mesnard, T., Shahriari, B., Ramé, A., et al. Gemma 2: Improving open language models at a practical size. ArXiv preprint, abs/2408.00118, 2024. URL https://arxiv.org/abs/2408.00118. +Toma, A., Lawler, P. R., Ba, J., Krishnan, R. G., Rubin, B. B., and Wang, B. Clinical camel: An open expert-level medical language model with dialogue-based knowledge encoding. *ArXiv* preprint, abs/2305.12031, 2023. URL https://arxiv.org/abs/2305.12031. +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, abs/2302.13971, 2023a. URL https://arxiv.org/abs/2302.13971. + +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 fine-tuned chat models. ArXiv preprint, abs/2307.09288, 2023b. URL https://arxiv.org/abs/2307.09288. +Wang, X., Chen, G., Dingjie, S., Zhiyi, Z., Chen, Z., Xiao, Q., Chen, J., Jiang, F., Li, J., Wan, X., Wang, B., and Li, H. CMB: A comprehensive medical benchmark in Chinese. 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. 6184-6205, Mexico City, Mexico, 2024. Association for Computational Linguistics. URL https://aclanthology.org/2024.naac1-long.343. +Yan, C., Fu, X., Xiong, Y., Wang, T., Hui, S. C., Wu, J., and Liu, X. Lm sensitivity evaluation framework for clinical diagnosis. In Proceedings of the 31st International Conference on Computational Linguistics, pp. 3083-3094, 2025. +Yang, A., Yang, B., Hui, B., Zheng, B., Yu, B., Zhou, C., Li, C., Li, C., Liu, D., Huang, F., et al. Qwen2 technical report. ArXiv preprint, abs/2407.10671, 2024. URL https://arxiv.org/abs/2407.10671. + +# A. Details of Datasets + +Question: A 25-year-old man comes to the office because of pain in his left shoulder. He says that this pain started 3 years ago ... Which of the following enzymes is most likely deficient in this patient? + +# Options: + +A: Branched-chain alpha-ketoacid dehydrogenase +B: Cystathionine synthase deficiency +C: Homogentisic acid oxidase +D:Phenylalanine hydroxylase +E: Propionyl-CoA carboxylase + +Answer: C + +Question: Antimalarial drug used for causal prophylaxis act at which stage of developmental cycle? + +# Options: + +A: Gametogony +B: Erythrocytic schizogony +C: Pre-erythrocytic schizogony +D: Exo-erythrocytic schizogony + +Answer: C + +Figure 8. Examples of Low-Level tasks. Left: a MedQA question. Right: a MedMCQA question. + +# A.1. Low-Level Tasks + +As introduced in Section 3.3, we adopt the original multiple-choice questions in the MedQA and MedMCQA datasets for Low-Level tasks. MedQA is a large-scale medical exam dataset, containing medical exam questions sourced from three different regions. In this study, we use the questions in the US subset, which contains five-option multiple-choice questions collected from the United States Medical Licensing Examination (USMLE). MedMCQA is another large-scale medical exam dataset that contains multiple-choice questions sourced from All India Institute of Medical Sciences Entrance Examination (AIIMS) and National Eligibility cum Entrance Test for Postgraduate (NEET-PG) in India. The questions in MedMCQA are four-option MCQs. The language used in both datasets is English. For MedQA, we use the test set for evaluation; for MedMCQA, we use the dev set, because the ground truth of MedMCQA's test set is not available to the public. We filtered out the MedMCQA questions that are marked as multiple correct answers. As a result, we have 800 questions from MedQA and 2,816 questions from MedMCQA for Low-Level tasks. Examples of Low-Level tasks are shown in Figure 8. + +# (Example 1) + +Question: Antimalarial drug used for causal prophylaxis act at which stage of developmental cycle? + +# Options: + +A: Gametogony B: Erythrocytic schizogony C: Pre-erythrocytic schizogony D: Exo-erythrocytic schizogony + +Answer: C + +# (Example 2) + +Question: Which of the following is not a vitamin K dependent procoagulant? + +# Options: + +A: Factor II B: Factor VII C: Factor IX D: Factor XI + +Answer: D + +# (The other three examples) + +Question: The anteroposterior curve is + +# Options: + +A: Curve of Spee B: Curve of Wilson C: Curve of Monson D: Bonwill's curve + +Answer: + +Figure 9. Input prompt format of the five-shot in-context learning setting. + +We use five-shot in-context learning to evaluate the performance of LLMs on Low-Level tasks. Figure 9 shows the input prompt format of the five-shot in-context learning setting. The input prompt consists of five examples, each of which is a question-answer pair. After the five examples, we append the test sample, which is a question without the correct answer. The model is required to predict the correct answer for the test sample. For answer parsing, we find that current LLMs + +always follow the correct format in the five-shot in-context learning setting. Therefore, we directly compare the generated answer with the ground truth answer. + +# A.2. Mid-Level Tasks + +Question: A 25-year-old man comes to the office because of pain in his left shoulder. Because of pain in his left shoulder. He says that this pain started 3 years ago and has progressively worsened. He denies joint trauma, fever, dysuria, or morning stiffness.... Statement: "Homogentisic acid oxidase is most likely deficient in this patient", is the statement above correct or incorrect? + +Answer: correct + +Question: A 25-year-old man comes to the office because of ... Which of the following enzymes is most likely deficient in this patient? + +# Options: + +A: Branched-chain alpha-ketoacid dehydrogenase +B: Cystathionine synthase deficiency +C: Homogentisic acid oxidase +D: Phenylalanine hydroxylase +E: Propionyl-CoA carboxylase +Alice chose answer D. Please verify if this is correct, and if not, provide the correct answer. +Answer: incorrect, answer C is the correct answer. + +Question: A 25-year-old man ... There is a $50\%$ chance that the correct answer is not included in the options. Please determine if the correct answer is among the given options and respond with yes or no. + +# Options: + +A: Branched-chain alpha-ketoacid dehydrogenase +B: Cystathionine synthase +C: Tyrosine aminotransferase (distractor) +D: Phenylalanine hydroxylase +E: Propionyl-CoA carboxylase + +Answer: no + +Figure 10. Examples of Mid-Level tasks. Left: Statement Validation tasks; Middle: Multi-step Rectification tasks; Right: Answer Existence Judgment tasks. + +We construct Mid-Level tasks by reformulating the original MCQs in MedQA and MedMCQA into statement verification tasks, multi-step rectification tasks, and answer existence judgment tasks. For the Statement Validation task, we prompt GPT-4o to generate a statement based on the question and a given option, using the following prompt format: + +You are a medical expert and you are given a multiple choice question. Please change the question into a statement verification based on a given option. + +Example 1: + +**Input** + +Original Question: Gene for Dentin mineralization + +Options: A: MAP1B B: PHEX C: DEND: PHIX + +Answer: B + +Given Option: A + +**Output** + +Statement: MAP1B is the gene for Dentin mineralization. + +Label: False + +Example 2: + +**Input** + +Original Question: Child of Vasanthi was weaned from breast milk on the 5th day and was given sugarcane juice the child developed hypoglycemia and hepatomegaly biochemical examination showed hypophosphatemia and enzyme deficienciesreducing substances in urine. The child is probably suffering from which of the following enzyme deficiencies - + +Options: A: Fructokinase B: Aldolase B C: Glucose 6 Phosphatase D: Beta galactosidase + +Answer: B + +Given Option: $B$ + +**Output** + +Statement: Child of Vasanthi was weaned from breast milk on the 5th day and was given sugarcane juice the child developed hypoglycemia and hepatomegaly biochemical examination showed hypophosphatemia and enzyme deficiencies-reducing substances in urine. The child is probably suffering from the deficiency of enzyme Aldolase B. + +Label: True + +Test: + +**Input** + +Original Question: [Original MCQ Question] + +Options: [Options] + +Answer: [Correct Answer] + +Given Option: [Give Option] + +**Output** + +We found that providing both the correct answer and the given option in the prompt can help the model generate more accurate statements. We also provide two examples of the generation process in the prompt to help the model understand the task. For the Answer Existence Judgment task, we prompt GPT-4o to generate a distractor based on the question and the correct answer: + +The following is a medical question along with its correct option. To increase the difficulty of the question, please generate a misleading distractor based on the correct option. This distractor should be an incorrect answer to the question. Directly generate the distractor without extra content. + +Question: [Original MCQ Question] + +Options: [Options] + +Correct Option: [Correct Answer] + +Distractor: + +To ensure that GPT-4o can correctly generate the desire statements and distractors, we have three experienced medical experts manually verify a batch of 100 generated statements and distractors. We found that GPT-4o can generate correct statements and distractors with an accuracy of around $95\%$ . + +For generating questions of Mid-Level, we leverage question templates illustrated in Figure 10 to generate corresponding questions, using options and correct answers from the original MCQs, the generated statements, and the generated distractors. For evaluation, we use the same five-shot in-context learning setting as in Low-Level tasks. + +# A.3. High-Level Tasks + +For the High-Level task, following Hager et al. (2024), we construct a full-path clinical-diagnosis evaluation dataset based on the MIMIC-IV dataset. MIMIC-IV is a large-scale, de-identified, and publicly available dataset that contains electronic health records (EHRs) of patients admitted in Beth Israel Deaconess Medical Center in Boston, MA. To make the generated dataset align with tasks in the previous levels, we first identify and extract diseases involved in the MedQA and MedMCQA datasets to form a disease pool, and then retrieve the corresponding admission records from the MIMIC-IV dataset. Specifically, we first use the ICD-10-CM codes to filter the relevant admission records for each disease, and extract the discharge diagnosis section of these admission records. To ensure that the admission records are highly relevant to the diseases, we only keep the records that the corresponding disease is in the first place of the discharge diagnosis. We further exclude the records that the discharge diagnosis contains multiple diseases in the disease pool. To ensure the statistic significance of the evaluation and balance across selected diseases, we only keep the diseases that have more than 10 admission records, and randomly sample 100 admission records for disease that have more than 100 records. As a result, we obtain 2,176 admission records for 42 diseases. The distribution of the number of admission records for each disease and their affected human body systems are shown in Figure 11. + +![](images/b75c3d25b4a2937f5f426c0f3720c914f15b90598ef344823018658cdb69da48.jpg) +Figure 11. Number of admission records for each disease in the constructed full-path clinical-diagnosis evaluation dataset. + +We then construct the full-path clinical-diagnosis evaluation dataset by extracting the history of present illness, physical examination sections from the clinical notes of the admission records, and the corresponding laboratory tests, microbiology + +tests, and imaging tests from the clinical data tables. Then, we construct an agent-based evaluation setting, where the model is required to make decisions (e.g., request specific tests, make the final diagnosis) based on the information it obtain through the interaction process. Specifically, for each admission record, we first provide the history of present illness to the model, using the following prompt format: + +You are an experienced medical AI assistant. Your ultimate goal is to help the doctor diagnose the patient's condition. You will be provided with the patient's history and the results of any tests that the doctor has already performed. You can also order additional tests for more information, including physical examinations, laboratory tests, microbiology tests, and imaging. + +The action you can choose are: + +1. PE: Perform physical examination of patient and receive the observations. +2. LAB: Run laboratory tests and receive their values. You will get all the lab tests results at once. +3. MICRO: Run microbiology tests and receive their values. You will get all the microbiology tests results at once. +4. IMAGE: Do specific imaging scans and receive the radiologist report. You will get all the imaging results at once. +5. OUTPUT: Output the final diagnosis. + +Note: To improve diagnostic efficiency, please perform physical examinations (PE), laboratory tests (LAB), microbiological tests (MICRO), and imaging scans (IMAGE) only when necessary for diagnosis. When you are confident, choose the “OUTPUT” action and you will be asked to output the corresponding diagnosis. + +Your output format should be: + +Rationale: (your reasoning process for choosing the next action) + +Action: (one of the actions in [PE, LAB, IMAGE, MICRO, OUTPUT]) + +Now a patient comes to see the doctor. + +Patient History: [History of Present Illness]. + +Please choose your next action from [PE, LAB, IMAGE, MICRO, OUTPUT]. + +If the model chooses the "PE" action, we provide the physical examination section of the clinical notes to the model using the following prompt format: + +Physical Examination of this patient: [Physical Examination]. + +Please choose your next action from [Lefted Actions]. + +Otherwise, if the model chooses one of the "LAB", "MICRO", or "IMAGE" actions, we will further ask the model to provide the detailed list of examination items of the corresponding test type: + +You choose [Model's Action] as the next action. Please provide the specific list of [Model's Action] you want to run: + +please output your choice in the following format: + +Rationale: (your reasoning process for choosing the next action) + +Lab Tests: (the specific laboratory tests you want to run, separated by commas) + +To parse the model's requested examination items, we leverage the name of examination items appeared in MIMIC-IV to form an examination pool. Then, we use UMLS to map the examination items in the pool to the corresponding CUIs, and retrieve the corresponding synonyms of the CUIs. Finally, we extract and match the synonyms of the CUIs with the model's requested examination items using fuzzy matching. If the similarity between the synonyms and the model's requested examination items is above a certain threshold (0.9), we consider the examination items are correctly parsed. We further conduct manual verification over the examination items that are not identified by the fuzzy matching, and construct a mapping table between the missing examination items and their standard names in MIMIC-IV. Finally, we verify the recall of the examination items parsing process by randomly sampled 100 recognition results randomly sampled from the evaluated models' outputs, and have three experienced doctors manually verify the results. We calculate the recall of the examination items parsing process by comparing the manual verification results with the recognition results of the evaluated models. We find that the recall is around $95\%$ across all three types of tests. + +After the parsing process, we provide the model with the results of the requested tests, and ask the model to choose the next action: + +Here are the [Model's Action] results of this patient: + +[Results of the requested tests] + +Please choose your next action from [Lefted Actions]. + +If the model fails to output the valid action, we will warn the model and ask the model to choose the next action again: + +You have chosen an action that is not available or used the wrong format. + +Your output format should be: + +Rationale: (your reasoning process for choosing the next action) + +Action: (one of the actions in [Lefted Actions]) + +Please choose your next action from [Lefted Actions]. + +Once the model chooses the "OUTPUT" action, we will further ask the model to output the final diagnosis: + +You choose "OUTPUT" as the next action. Please output the final diagnosis for this patient. + +Your output format should be: + +Diagnosis: (the final diagnosis, specific disease name) + +We use the zero-shot learning setting to evaluate the performance of LLMs on this full-path clinical-diagnosis task. When the chat history length exceeds the maximum token length of the model, we ask the model to summarize the chat history and provide the summary to the model as the input prompt: + +Summarize our chat history, condense the content as much as possible while preserving all essential information related to the diagnosis. Eliminate redundant or irrelevant information, and ensure the summary maintains coherence and clarity. + +Your output format should be: + +Summary: (your summary of the dialogue) + +For answer parsing, we construct a disease synonyms mapping based the UMLS matching and manual verification process, and use the mapping to match the model's output with the ground truth. We also record models' requested examination items to calculate the full-path clinical-diagnosis accuracy. + +# B. Details of Evaluation Metrics + +As introduced in Section 3.3, we use accuracy as the evaluation metric for Low-Level and Mid-Level tasks. For High-Level tasks, we use the full-path clinical-diagnosis accuracy as the evaluation metric. To make the evaluation metrics across different levels comparable, we normalize the accuracy of Low-Level and Mid-Level tasks using Equation (4). Specifically, for the Low-Level tasks (MCQs), we set the random accuracy as $\frac{1}{N_c}$ , where $N_{c}$ is the number of options in the MCQs. For the Statement Validation tasks and Answer Existence Judgment tasks, we set the random accuracy as 0.5, as there are only two possible labels. For the Multi-step Rectification tasks, we find that the random accuracy of questions with the correct answer provided is much higher than that of questions with the wrong answer provided, because for the latter case, the model need to further choose the correct answer from the rest of $N_{c} - 1$ options. Therefore, we consider weight the accuracy of the questions with the correct answer provided by $\alpha$ and the accuracy of the questions with the wrong answer provided by $1 - \alpha$ to make the random accuracy independent of the random strategy. Considering a random strategy that deciding the given option is correct with a probability of $p$ , the random accuracy of the Multi-step Rectification tasks is calculated as: + +$$ +\mathrm {A c c u r a c y} _ {\text {r a n d}} = \alpha \times p + (1 - \alpha) \times (1 - p) \times \frac {1}{N _ {c} - 1} +$$ + +Since we want the random accuracy be invariant to the random strategy, the derivative of the random accuracy with respect to $p$ should be zero, which leads to $\alpha = \frac{1}{N_c}$ . Therefore, we set $\alpha = \frac{1}{N_c}$ for the Multi-step Rectification tasks, and the random accuracy is $\frac{1}{N_c}$ as well. + +For the full-path clinical-diagnosis accuracy, since the task format is open-ended, we set the random accuracy as zero and directly report the accuracy of the evaluated models. + +# C. Details of Evaluated Models + +We list the basic information of LLMs evaluated in our study in Table 7. The models are divided into general and medical-domain specific models. We denote Phi3-mini-Instruct-128k, Phi3-small-Instruct-128k, Phi3-medium-Instruct-128k, and Phi4 as Phi3-3.8B, Phi3-7B, Phi3-14B, and Phi4-14B, for simplicity. + +Table 7. The basic information of large language models evaluated in our study, including the model type, family, backbone model, parameter size, and training data size. + +
Model TypeFamilyModelBackbone ModelParameter Size (B)Training Data Size (T)
General DomainLlamaLlama-7B-71.4
Llama-13B-131.4
Llama-33B-331.4
Llama-65B-651.4
Llama2-7B-72
Llama2-13B-132
Llama2-70B-702
Llama3-8B-815
Llama3-70B-7015
QwenQwen-7B-73
Qwen-14B-143
Qwen-72B-723
Qwen2-7B-77
Qwen2-72B-727
Qwen2.5-7B-718
Qwen2.5-14B-1418
Qwen2.5-32B-3218
Qwen2.5-72B-7218
GemmaGemma-2B-23
Gemma-7B-76
Gemma2-2B-22
Gemma2-9B-98
Gemma2-27B-2713
PhiPhi3-3.8B-3.83.3
Phi3-7B-74.8
Phi3-14B-143.8
Phi4-14B-149.8
GPTGPT-4o-mini-Not AvailableNot Available
GPT-4o-Not AvailableNot Available
o3-mini-Not AvailableNot Available
DeepSeekDeepSeek-V3-671 (37 activated)14.8
DeepSeek-R1-671 (37 activated)14.8
Medical DomainOthersClinicalCamel-70BLlama2-70B702
Med42-70BLlama2-70B702
Meditron-70BLlama2-70B702
Med42-v2-8BLlama3-8B815
Med42-v2-70BLlama3-70B7015
Meditron3-8BLlama3-8B815
Meditron3-70BLlama3-70B7015
MMed-Llama3-8BLlama3-8B815
+ +# D. Details of Evaluation Settings + +For the Low-Level and Mid-Level tasks, we set the model temperature as 0 to ensure the model outputs the most confident answer. We conduct five repeated experiments by randomly selecting five demonstrative samples from the rest of dataset. We then calculate the average accuracy of the five experiments, and report the mean and standard error of the accuracy across all test samples. For the High-Level tasks, considering that low temperature may lead to the model being too conservative, we set the model temperature as 0.8 to encourage the model to explore more possibilities. We also verified through preliminary experiments that LLMs produce stable outputs with this parameter setting. We conduct repeated experiments three times and report the mean and standard error of the accuracy. + +# E. Details of Evaluation Results + +We list in Table 8 the detailed results of the evaluated LLMs on tasks across all cognitive levels. The results are reported in the format of mean and standard error of the accuracy. We notice that some medical models (Meditron-70B, MMed-Llama3-8B) achieve a near-to-zero performance on the High-Level tasks. After carefully checking the outputs of these models, we find that these models fail to follow the instruction and tend to repeat the given instruction or output irrelevant information. + +Table 8. Full performance (mean and standard error of normalized performance $(\%)$ ) of Large Language Models on tasks across different cognitive levels. Considering the high cost of GPT-4o, o3-mini, DeepSeek-V3, and DeepSeek-R1, we only evaluate these models with three repeated experiments. + +
ModelLow-LevelMid-LevelHigh-Level
StmtValAnsExistMultiRect
MedQAMedMCQAMedQAMedMCQAMedQAMedMCQAMedQAMedMCQAMIMIC-IV
Llama-7B3.36 ± 0.8210.40 ± 0.244.88 ± 0.844.52 ± 0.450.86 ± 0.700.55 ± 0.431.60 ± 0.638.06 ± 0.26-
Llama-13B13.18 ± 0.5718.98 ± 0.226.47 ± 0.746.80 ± 0.57-0.05 ± 0.630.49 ± 0.541.45 ± 0.262.17 ± 0.16-
Llama-33B24.09 ± 0.2626.88 ± 0.3416.70 ± 0.2412.29 ± 0.481.86 ± 0.261.03 ± 0.2719.91 ± 0.8417.99 ± 0.34-
Llama-65B26.64 ± 0.4929.59 ± 0.2922.26 ± 0.6517.03 ± 0.515.53 ± 1.012.59 ± 0.2022.60 ± 0.3120.83 ± 0.18-
Llama2-7B15.88 ± 0.2818.32 ± 0.228.55 ± 0.707.15 ± 0.590.25 ± 1.290.47 ± 0.223.88 ± 0.438.58 ± 0.312.65 ± 0.20
Llama2-13B21.10 ± 0.3020.94 ± 0.339.58 ± 1.7712.44 ± 0.321.08 ± 0.921.25 ± 0.357.84 ± 0.328.65 ± 0.224.92 ± 0.15
Llama2-70B37.99 ± 0.3435.60 ± 0.2623.77 ± 0.4317.14 ± 0.175.51 ± 0.762.58 ± 0.6833.47 ± 0.5228.65 ± 0.265.16 ± 0.18
Llama3-8B37.30 ± 0.5339.11 ± 0.2922.77 ± 0.5622.10 ± 0.314.83 ± 0.823.81 ± 0.256.80 ± 0.198.29 ± 0.1510.50 ± 0.16
Llama3-70B63.68 ± 0.3460.82 ± 0.2853.16 ± 0.4641.29 ± 0.349.36 ± 1.0110.37 ± 0.6462.87 ± 0.2957.07 ± 0.1617.81 ± 0.41
Qwen-7B19.40 ± 0.3124.85 ± 0.2114.19 ± 0.4913.00 ± 0.692.74 ± 0.931.00 ± 0.255.09 ± 0.437.24 ± 0.212.51 ± 0.31
Qwen-14B38.05 ± 0.3839.25 ± 0.1321.13 ± 0.3018.56 ± 0.224.93 ± 1.213.06 ± 0.2727.89 ± 0.0926.31 ± 0.224.14 ± 0.29
Qwen-72B50.60 ± 0.3950.95 ± 0.1836.43 ± 0.6630.99 ± 0.3610.42 ± 0.557.09 ± 0.1838.26 ± 0.4140.74 ± 0.495.89 ± 0.35
Qwen-2-7B36.73 ± 0.4439.85 ± 0.1528.08 ± 0.2024.66 ± 0.304.00 ± 0.764.68 ± 0.2531.60 ± 0.4333.46 ± 0.246.99 ± 0.25
Qwen-2-72B65.91 ± 0.2460.41 ± 0.1955.09 ± 0.2342.23 ± 0.2324.00 ± 0.5811.67 ± 0.1462.86 ± 0.2757.68 ± 0.2615.10 ± 0.09
Qwen-2.5-7B42.86 ± 0.4945.39 ± 0.1730.29 ± 0.3426.43 ± 0.3813.66 ± 0.237.49 ± 0.3237.08 ± 0.2240.34 ± 0.199.50 ± 0.04
Qwen-2.5-14B52.23 ± 0.3051.74 ± 0.2440.86 ± 0.4933.98 ± 0.2917.36 ± 0.5611.82 ± 0.5048.67 ± 0.3446.40 ± 0.1512.07 ± 0.21
Qwen-2.5-32B59.21 ± 0.2157.17 ± 0.0948.05 ± 0.4337.92 ± 0.0614.31 ± 0.6011.36 ± 0.3653.01 ± 0.3351.04 ± 0.1111.87 ± 0.22
Qwen-2.5-72B67.83 ± 0.2061.82 ± 0.1255.70 ± 0.4244.79 ± 0.5328.98 ± 0.6518.54 ± 0.3963.70 ± 0.3658.39 ± 0.1316.05 ± 0.24
Gemma-2B6.16 ± 0.6315.04 ± 0.241.21 ± 0.414.12 ± 0.28-1.28 ± 1.01-0.34 ± 0.411.67 ± 0.494.72 ± 0.320.59 ± 0.09
Gemma-7B30.35 ± 0.4227.41 ± 0.3817.03 ± 0.4918.90 ± 0.105.16 ± 0.342.89 ± 0.3123.05 ± 0.3219.14 ± 0.430.33 ± 0.09
Gemma-2B14.87 ± 0.3424.18 ± 0.314.96 ± 0.6210.23 ± 0.45-0.48 ± 0.580.68 ± 0.690.86 ± 0.300.63 ± 0.055.02 ± 0.33
Gemma2-9B44.21 ± 0.1846.20 ± 0.2032.86 ± 0.5727.27 ± 0.316.97 ± 0.746.76 ± 0.4033.78 ± 0.3235.11 ± 0.329.04 ± 0.28
Gemma2-27B53.65 ± 0.3150.45 ± 0.1841.36 ± 0.6835.66 ± 0.2210.59 ± 1.1710.14 ± 0.3348.23 ± 0.1645.18 ± 0.2511.19 ± 0.64
Phi3-3.8B37.52 ± 0.2840.96 ± 0.2029.01 ± 0.7224.40 ± 0.0410.01 ± 1.197.50 ± 0.2930.31 ± 0.5435.70 ± 0.402.21 ± 0.28
Phi3-7B49.25 ± 0.3046.95 ± 0.3038.92 ± 0.2927.63 ± 0.254.83 ± 0.452.13 ± 0.2342.61 ± 0.2435.58 ± 0.307.74 ± 0.16
Phi3-14B54.06 ± 0.4949.70 ± 0.2740.45 ± 0.5931.92 ± 0.265.79 ± 0.528.24 ± 0.4848.75 ± 0.4645.21 ± 0.203.89 ± 0.01
Phi4-14B56.19 ± 0.4052.62 ± 0.3044.88 ± 0.5535.28 ± 0.2519.92 ± 1.0415.13 ± 0.2353.16 ± 0.2649.98 ± 0.1512.18 ± 0.37
GPT-4o-mini62.70 ± 0.1755.40 ± 0.1047.97 ± 0.4436.46 ± 0.5924.98 ± 0.7412.32 ± 0.5756.11 ± 0.5148.12 ± 0.1913.81 ± 0.84
GPT-4o78.33 ± 0.7564.00 ± 1.0267.83 ± 0.6049.67 ± 0.3333.33 ± 2.2011.83 ± 2.9170.92 ± 1.2363.39 ± 0.3919.33 ± 0.30
o3-mini87.71 ± 0.5574.44 ± 0.8076.67 ± 0.1757.50 ± 0.7662.83 ± 0.9330.50 ± 1.8986.17 ± 0.9173.56 ± 1.1215.05 ± 0.45
DeepSeek-V378.33 ± 0.7565.78 ± 0.2256.50 ± 0.6350.83 ± 1.175.17 ± 0.177.33 ± 1.6972.71 ± 0.4062.06 ± 0.1119.42 ± 0.17
DeepSeek-R189.79 ± 0.7574.44 ± 0.8077.33 ± 1.3362.00 ± 0.2954.17 ± 1.3336.33 ± 1.0987.67 ± 0.6575.44 ± 0.1126.54 ± 0.31
ClinicalCamel-70B42.20 ± 0.5237.14 ± 0.3429.48 ± 0.3221.68 ± 0.227.09 ± 1.024.82 ± 0.3236.82 ± 0.6332.80 ± 0.172.19 ± 0.08
Med42-70B49.18 ± 0.2848.11 ± 0.2133.41 ± 0.7221.74 ± 0.4812.65 ± 0.547.37 ± 0.5640.01 ± 0.7836.77 ± 0.244.25 ± 0.28
Meditron-70B42.52 ± 0.5936.18 ± 0.3128.15 ± 0.6520.89 ± 0.478.18 ± 1.054.23 ± 0.3237.64 ± 0.3329.80 ± 0.360.32 ± 0.01
Llama3-Med42-8B46.42 ± 0.6447.13 ± 0.1832.10 ± 0.6526.31 ± 0.129.31 ± 0.607.08 ± 0.3540.47 ± 0.2941.81 ± 0.2511.22 ± 0.21
Llama3-Med42-70B65.88 ± 0.1262.74 ± 0.1956.23 ± 0.2944.08 ± 0.2420.86 ± 1.1315.39 ± 0.2162.68 ± 0.2858.83 ± 0.1712.37 ± 0.18
Meditron3-8B40.60 ± 0.2645.37 ± 0.2024.10 ± 0.2323.13 ± 0.364.48 ± 0.715.71 ± 0.3425.28 ± 0.3727.45 ± 0.277.61 ± 0.49
Meditron3-70B68.96 ± 0.2762.27 ± 0.1754.82 ± 0.2941.17 ± 0.296.52 ± 1.229.57 ± 0.5561.70 ± 0.5254.76 ± 0.1810.36 ± 0.10
MMed-Llama3-8B37.96 ± 0.4339.20 ± 0.2110.34 ± 0.3921.78 ± 0.555.31 ± 0.275.82 ± 0.3324.64 ± 0.2424.60 ± 0.160.32 ± 0.01
+ +# F. Details of Clinician Validation + +To validate that the cognitive difficulties of tasks in our benchmark are consistent with the cognitive levels defined in Section 3.2, we conducted a clinician validation. Specifically, we first randomly sampled 20 questions from each task to form a subset of 100 questions. For Low-Level and Mid-Level tasks, we sample questions from the MedQA benchmark. Then, we recruited four licensed clinicians with 3 to 8 years of experience to evaluate this subset from two perspectives: (1) their accuracy in answering the questions and (2) their subjective difficulty ratings to the questions (1=Easy, 10=Hard). The detailed labeling instructions are as follows: + +Please answer the following questions based on your medical knowledge. For each question, please provide your answer and rate the difficulty of the question on a scale from 1 to 10, where 1 means "very easy" and 10 means "very hard". + +- Low-Level Tasks: These tasks require basic medical knowledge and understanding of medical concepts. Please choose the most appropriate answer from the given options. +- Mid-Level Tasks: These tasks require a more complex application of medical knowledge. For statement validation tasks, please determine whether the statement is true or false. For answer existence judgment tasks, please determine whether the answer exists in the given options. For multi-step rectification tasks, please first determine whether the provided answer is correct, and if not, provide the correct answer. +- High-Level Tasks: Given the history of present illness section from an inpatient admission note, the task is to provide the patient's primary diagnosis. + +At each step, the following operation types are allowed: + +(1) Physical Examination: Request a physical examination for the patient; +(2) Laboratory Tests: Request laboratory tests for the patient; +(3) Microbiological Culture: Request microbiological cultures (e.g., blood, urine); +(4) Imaging: Request imaging tests (e.g., CT, X-ray, ultrasound); +(5) Diagnosis: A diagnosis should be provided when (a) the test results are sufficient to support a diagnosis, or (b) all possible tests have been completed. Output the patient's primary diagnosis (can include multiple diagnoses), including any conditions already mentioned in the HPI. + +Note: Please record the sequence in which the test types were requested for diagnosis. \ No newline at end of file diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/images.zip b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b563df8498e5a2f639ed562c42ef542032fbd6f6 --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c9e7997cce8d441605cb666ed01be0a205258ffd68a52fbd09bffb5ce7691c4 +size 1301741 diff --git a/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/layout.json b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..082084c011438e3f79a5200c005765065531e456 --- /dev/null +++ b/ICML/2025/Evaluating LLMs Across Multi-Cognitive Levels_ From Medical Knowledge Mastery to Scenario-Based Problem Solving/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f2e78d124105789135c56d1aa98e2fa9ce50bdb7227428f167037ffcdebe0c8 +size 605280 diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_content_list.json b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4acf41a974742c14ffa755d684e198928071d9c9 --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:663fe81f4bbaa46a795ca11fe84c96c95eaecf5c875d6fd6daa94cc44715fa90 +size 274567 diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_model.json b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_model.json new file mode 100644 index 0000000000000000000000000000000000000000..35352c2367b122218a45a32d71ebda6ddc63a4fa --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1eb9a167f90f4effeab2b503812c01193ec5c0ed54b84a72cee200136d126304 +size 320411 diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_origin.pdf b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..83bdda4915323ac2c0754a8b7cb6c3e8709b8f2e --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/7d0db687-a966-4892-97f4-4197427b5a92_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b97c958f4af96543aee00b5be6f036d461b8f8fe83a6c6fe4dc518bfb5e4cd26 +size 1977202 diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/full.md b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9a011416878e2604e4665494ff650b3ca8306230 --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/full.md @@ -0,0 +1,1101 @@ +# Evaluating Neuron Explanations: A Unified Framework with Sanity Checks + +Tuomas Oikarinen1 Ge Yan1 Tsui-Wei Weng2 + +# Abstract + +Understanding the function of individual units in a neural network is an important building block for mechanistic interpretability. This is often done by generating a simple text explanation of the behavior of individual neurons or units. For these explanations to be useful, we must understand how reliable and truthful they are. In this work we unify many existing evaluation evaluation methods under one mathematical framework. This allows us to compare existing evaluation metrics, understand the evaluation pipeline with increased clarity and apply existing statistical methods on the evaluation. In addition, we propose two simple sanity checks on the evaluation metrics and show that many commonly used metrics fail these tests and do not change their score after massive changes to the concept labels. Based on our experimental and theoretical results, we propose guidelines that future evaluations should follow and identify a set of reliable evaluation metrics. + +# 1. Introduction + +Deep neural networks (DNNs) have achieved great success on a wide range of tasks, but they are very difficult to understand and often perceived as black-boxes (Rudin et al., 2022). To address this challenge, the field of mechanistic interpretability has recently emerged, aiming to provide a clearer understanding of the internal mechanisms of DNNs. + +Providing natural language explanations for small components of a neural network is an important part of mechanistic interpretability. Classic work in this area includes Network Dissection (Bau et al., 2017) and other works explaining individual neurons in deep vision models (Mu & Andreas, 2020; Hernandez et al., 2022; Oikarinen & Weng, 2023; Bai et al., 2025). Other examples include automated neuron + +$^{1}$ CSE, UC San Diego, CA, USA $^{2}$ HDSI, UC San Diego, CA, USA. Correspondence to: Tuomas Oikarinen , Tsui-Wei Weng . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +explanations (Bills et al., 2023; Lee et al., 2023) for large language models, as well as explaining features of sparse autoencoders (Bricken et al., 2023; Templeton et al., 2024). + +Despite the introduction of various approaches for generating neuron explanations, existing papers often use very different metrics to evaluate how good their descriptions are, and it is not clear how they compare to each other. In addition, many evaluation metrics have problems, as shown by (Huang et al., 2023). To ensure that unit explanations are reliable and trustworthy, it is crucial to establish a standardized framework for evaluation. + +Motivated by the need for a standardized approach, in this work we unify many existing evaluation methods under a single mathematical framework: NeuronEval, which provides much needed conceptual clarity to the topic of explanation evaluation. This framework allows us to clearly compare and contrast current evaluation techniques and provides a more transparent understanding of the evaluation pipeline. Inspired by this, we introduce two sanity tests to validate the metrics, revealing that most commonly used evaluation metrics fail at least one of these basic tests and should not be relied on alone. In summary, in this paper we: + +- Formalize the task of evaluating individual unit explanations and unify 20 existing methods under the NeuronEval framework, which lets us apply standard statistical methods to evaluating neuron explanations. +- Propose two sanity checks for evaluation metrics: Missing Labels Test and Extra Labels Test. We then test different metrics both theoretically and empirically across hidden layer and final layer neurons, as well as on linear probes on both vision and language models. +- Out of the 18 metrics tested only the following pass the tests: Correlation(Pearson), Cosine Similarity, AUPRC, IoU and F1-score. In contrast, many commonly used evaluations fail these sanity tests, such as: using biased top-and-random sampling, only evaluating on highly activating inputs(Recall), measuring AUC or mean activation difference MAD, and cannot be relied on by themselves. + +Our code and results are publicly available at https://github.com/Trustworthy-ML-Lab/Neuron_Eval. + +![](images/cc9d26545baeae58ae64057c357cab0301dc9967b555ab9046168086f424fd57.jpg) +Figure 1. An overview of contributions. We first unify many existing explanation evaluation methods into a single mathematical framework NeuronEval containing 18 different metrics $s_M$ . Next, we perform meta-evaluation via NeuronEval to answer the question: which evaluation metrics reliably measure how good an explanation is? + +# 2. Definitions + +# 2.1. What is an individual unit in a neural network? + +In this paper we are focused on individual unit explanations. By a unit, we mean a smaller part of a neural network that can have an independent meaning. The simplest form of such units is a single neuron, or a single channel of a Convolutional Neural Network (CNN), but a unit can be any scalar function of network inputs. Other interesting units that fit in our framework are linear combinations of neurons (i.e. directions in activation space), which are considered to correspond to a specific interpretable concept. These are used in studies such as TCAV (Kim et al., 2018), Concept Bottleneck Models (Koh et al., 2020; Yuksekgonul et al., 2023; Oikarinen et al., 2023; Srivastava et al., 2024), Linear Probing (Gurnee et al., 2023) or steering vectors (Subramani et al., 2022). Finally, a unit could be a feature of a Sparse Autoencoder (Cunningham et al., 2023; Bricken et al., 2023) trained to disentangle a layer's activations into interpretable individual components. In this paper, we focus on units with scalar activations, excluding larger components e.g. attention heads. + +# 2.2. Problem Description + +Our focus in this paper is explanation1 evaluation. In evaluation, a text explanation $t$ for a neuron $k$ is given, and our goal is to evaluate how faithfully this explanation describes the neuron. Below we define evaluation as a function $\mathcal{E}$ : + +$$ +\text {E v a l u a t i o n (o f E x p l a n a t i o n} t): \mathcal {E} \left(f _ {k} ^ {0: l}, \mathcal {D}, t\right)\rightarrow \mathbb {R} +$$ + +Here $\mathcal{E}$ is a function that takes a probing dataset $\mathcal{D}$ , a + +neural network $^2$ $f$ and a text description $t$ , and returns a scalar score, where a higher score indicates the description is better i.e. more reliable/faithful. See Figure 1 for an illustration of the evaluation process. + +For explanations to be reliable, evaluating explanations is very important, but the community has not reached an agreement on which $\mathcal{E}$ to use. Currently different papers often use different $\mathcal{E}$ without theoretical justifications. Thus, one focus of our paper is to perform meta-evaluation and rigorously investigate different evaluation metrics $\mathcal{E}$ . + +# 2.3. What are the goals of an explanation? + +Neuron explanations are typically generated to improve our understanding of the model, which can then help improve, for example, safety and reliability of the models. However, this goal is vague and hard to measure generally. We believe a more precise definition of the goals of an explanation is essential for thinking clearly about how to evaluate them. + +In this paper, we focus on Input-based neuron explanations, which make up the majority of existing explanations. We argue that the goal of an explanation is to provide a human-interpretable approximation of the following function: + +$$ +\text {I n p u t} \rightarrow \text {U n i t A c t i v a t i o n :} x \rightarrow f _ {k} ^ {0: l} (x). +$$ + +A good explanation should be able to describe which inputs cause a high unit activation, and which do not. Note that there are other type of explanations being proposed (e.g. output-based, see App. B.2 for discussion.), which is not the focus of this work. + +# 3. A Unified Evaluation Framework + +We start by studying some popular neuron explanation evaluations in Sec. 3.1 and showing they can be formalized under the same notation. We then take a further step in Sec 3.2 to show that almost all existing work can be unified under this evaluation framework, which we call NeuronEval. + +# 3.1. Formalizing Example Evaluations + +Example 1: Crowdsourced Highly Activating Inputs Evaluation. Currently, perhaps the most common way to evaluate neuron explanations is to show (crowdsourced) human raters examples of highly activating inputs, and ask the raters whether these inputs can be described by the explanation (also known as 'concept') (Zhou et al., 2015; Bau et al., 2017; Oikarinen & Weng, 2023). + +To analyze this approach more rigorously, we describe it through the following mathematical formulation: Given a set of probing data $\mathcal{D} = \{x_i\}$ , we first define the neuron activation vector $a_{k}$ for neuron $k$ as: + +$$ +a _ {k} \in \mathbb {R} ^ {| \mathcal {D} |}, [ a _ {k} ] _ {i} = f _ {k} ^ {0: l} (x _ {i}) \forall i \in [ 1, | \mathcal {D} | ]. \tag {1} +$$ + +Here, the $i$ -th entry of $a_{k}$ denotes the neuron activation on $i$ -th input $x_{i}$ . To represent highly activating inputs, we define a binarization function $B:\mathbb{R}^n\to \{0,1\} ^n$ , that takes a real vector and turns its element into 1 if it is a "high" activation and 0 otherwise. In particular, we use the top $\alpha$ binarization function for neuron activations, where the activations in top $\alpha$ percentile return 1, and the rest return 0 as this is how highly activating inputs are typically selected. See Appendix A.1 for more detailed description. + +Next, we describe the human ratings for a presence of text concept $t$ in the inputs by defining the concept activation vector $c_t$ : + +$$ +c _ {t} \in \mathbb {R} ^ {| \mathcal {D} |}, [ c _ {t} ] _ {i} = \mathbb {P} (t | x _ {i}) \forall i \in [ 1, | \mathcal {D} | ] \tag {2} +$$ + +Here each element of $c_{t}$ , i.e. $[c_{t}]_{i}$ , represents the fraction of raters that agreed on concept $t$ being present on that input $x_{i}$ . Finally, given $a_{k}$ and $c_{t}$ , we denote $s$ as an explanation score to quantify whether neuron $k$ is well explained by the concept $t$ . In this evaluation, the fraction of highly activating inputs that have concept $t$ present is used to represent the quality of explanations. To formalize this we can define $s$ in terms of $a_{k}$ and $c_{t}$ as follows: + +$$ +s := \mathbb {P} (\text {c o n c e p t} | \text {n e u r o n i s a c t i v e}) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(a _ {k}\right) \right| \right| _ {1}} \tag {3} +$$ + +since the number of highly activated inputs can be computed as $||B(a_k)||_1$ and the number of highly activated inputs that have concept $t$ present is $B(a_k) \cdot B(c_t)$ . Note the value of $c_t$ on not highly activating inputs doesn't affect the score so we + +don't need to evaluate it on all inputs. Here we also binarize the concept vector $c_t$ by rounding to 1 for elements $\geq 0.5$ (indicating concept probability $\geq 0.5$ ) and to 0 otherwise. + +If we consider the goal of an explanation to be predicting neuron activations given whether the concept is present, i.e. simulation, then we can formulate the neuron explanation as a binary classification problem. Specifically, as we show in Appendix A.2 that Equation (3) is actually equivalent to measuring "Recall": + +$$ +s _ {\text {R e c a l l}} = \frac {T P}{T P + F N} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(a _ {k}\right) \right| \right| _ {1}} \tag {4} +$$ + +So crowdsourced evaluation of highly activating inputs is equivalent to only measuring "Recall", i.e. we have $s = s_{M}$ with metric $M = \mathrm{Recall}$ . + +Example 2: IoU with Labeled Data. In addition to crowdsourcing, other types of evaluations have been used for validating neuron explanations. For example, (Bau et al., 2017) collected a curated labeled dataset to evaluate neuron explanations by measuring the Intersection over Union (IoU, also known as Jaccard index) between neuron activations and concept labels on the annotated dataset. This measures $\mathbb{P}$ (concept AND neuron is active) / $\mathbb{P}$ (concept OR neuron is active). + +We can also describe this evaluation with the same formalism as in Example 1, but with two main changes. First, we use a different concept source, where the elements of $c_t$ come from the labeled data instead of crowdsourced ratings. Second, we set the metric $M$ as IoU, giving us the following evaluation score: + +$$ +s _ {\mathrm {I o U}} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(a _ {k}\right) \right| \right| _ {1} + \left| \left| B \left(c _ {t}\right) \right| \right| _ {1} - B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)} \tag {5} +$$ + +Example 3: Automated Simulation Evaluation with Language Models. More recently, (Bills et al., 2023) evaluate neuron explanations of large language models by measuring the correlation between actual neuron activations and activations predicted by a language model given the explanation. + +While in different domains (Examples 1 and 2 are from vision models), this evaluation can also be formalized in the same manner as Example 1 and 2. First, the concept source for $c_{t}$ is now model predicted neuron activations scaled 0-1, as these are essentially pseudo-labels for the presence of the concept in the given input. Second, for the metric $M$ , we now set it to be the Pearson's Correlation coefficient and obtain the evaluation score $s_{\text{Correlation}}$ as: + +$$ +s _ {\text {C o r r e l a t i o n}} = \frac {1}{| \mathcal {D} |} \frac {\sum_ {i} ([ a _ {k} ] _ {i} - \mu (a _ {k})) \cdot ([ c _ {t} ] _ {i} - \mu (c _ {t}))}{\sigma (a _ {k}) \sigma (c _ {t})} \tag {6} +$$ + +where $\mu (z)$ and $\sigma (z)$ is the mean and standard deviation of the vector $z$ + +
NeuronEval: A General Framework to Evaluate Neuron Explanations
Metric MStudyConcept Source ctGranularityDomain
Recall(Zhou et al., 2015)CrowdsourcedWhole InputVision
~Recall(Bau et al., 2017; Oikarinen & Weng, 2023)CrowdsourcedWhole InputVision
(Oikarinen et al., 2023; Bai et al., 2025)
Precision(Srinivas et al., 2025)GenerativeWhole InputVision
F1-score(Huang et al., 2023)Generative + ModelWhole InputLanguage
(Gurnee et al., 2023)Labeled dataPer-tokenLanguage
IoU(Bau et al., 2017; Mu & Andreas, 2020)Labeled dataPer-pixelVision
(La Rosa et al., 2024)
Accuracy(Koh et al., 2020)Labeled dataWhole InputVision
~AUC(Zimmermann et al., 2023)CrowdsourcedWhole InputVision
Inverse AUC(Bykov et al., 2023)Labeled dataWhole InputVision
(Kopf et al., 2024)GenerativeWhole InputVision
Correlation(T&R)(Bills et al., 2023)ModelPer-tokenLanguage
Correlation(Oikarinen & Weng, 2024)ModelWhole InputVision
Spearman +Correlation(T&R)(Bricken et al., 2023; Templeton et al., 2024)ModelPer-tokenLanguage
~WPMI(Oikarinen & Weng, 2023)ModelWhole InputVision
MAD(Kopf et al., 2024)GenerativeWhole InputVision
~MAD(Shaham et al., 2024)GenerativeWhole InputVision
(Singh et al., 2023)GenerativeWhole InputLanguage
+ +Table 1. Summary of evaluations used in existing work. $\sim$ indicates using a metric with small differences from our definition, while T&R indicates use of biased top-and-random sampling to evaluate the metric with fewer samples. See Table B.1 for an extended versione. + +# 3.2. Unifying Neuron Explanation Evaluation: NeuronEval + +As we have shown in the previous three examples (Eq (4), (5) and (6)), evaluations that look extremely different on the surface, can actually be written as simple functions of the neuron activation vector $a_{k}$ and concept activation vector $c_{t}$ . This means the explanation score $s_{M}$ can be written as a function $s_{M}(a_{k},c_{t})$ of $a_{k}$ and $c_{t}$ , that is, $\mathcal{E}(\mathcal{D},f_k^{0;l},t) = s_M(a_k,c_t)$ , where $M$ is the name of the specific metric chosen. For convenience, we call this the NeuronEval Framework, showcased in Figure 1. Going further, we find that, as we show in Table 1, almost all existing methods in the literature for evaluation $\mathcal{E}$ can be formalized under this framework. + +Notably, NeuronEval is a general framework – as shown in Table 1, it includes not only the standard statistical metrics (e.g. Recall, F1-score, Correlation), but also other metrics such as Mean Activation Difference (MAD), which compares the average neuron activation on inputs where the concept is present vs those where concept is missing: + +$$ +s _ {M A D} = \frac {B \left(c _ {t}\right) \cdot a _ {k}}{\left\| B \left(c _ {t}\right) \right\| _ {1}} - \frac {\left(\mathbf {1} - B \left(c _ {t}\right)\right) \cdot a _ {k}}{\left\| \mathbf {1} - B \left(c _ {t}\right) \right\| _ {1}}. \tag {7} +$$ + +Other standard metrics include Precision (Srinivas et al., 2025), which can be intuitively understood as measuring + +$\mathbb{P}$ (neuron is active|concept), defined as: + +$$ +s _ {\text {P r e c i s i o n}} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(c _ {t}\right) \right| \right| _ {1}} \tag {8} +$$ + +Formalizing metrics under the same framework also highlights gaps in existing work, leading us to test standard statistical metrics that were not explored by previous work, such as AUPRC (defined in Appendix A.3). + +Overall we have aimed to include all evaluation metrics used by previous works, as well as standard statistical metrics not previously explored, for a total of 18 different metrics and evaluations from 19 studies within the NeuronEval framework, which we compare in our experiments (Section 4 and 5), and the framework can easily include more in the future. In Appendix A.3 we define all the other metrics evaluated, such as F1-score, Cosine similarity, AUC and AUPRC, as well additional details on these metrics. + +Existing Work as Special cases of NeuronEval. We summarize how most existing evaluations fit into our NeuronEval framework in Table 1 (see Appendix B.2 for discussion on few exceptions). This includes not only evaluations of individual neuron explanations, but also explanations of SAE features (Bricken et al., 2023), CBM neurons (Koh et al., 2020), or linear probes (Gurnee et al., 2023). Writing + +diverse evaluations as special cases of the same framework allows us to more clearly think about each component of an evaluation in isolation, and can help develop more effective evaluations by combining the best parts of previous studies. We classify differences in existing evaluations into four main components: + +(i) Evaluation metric $M$ : This is the main focus of our paper, to analyze which evaluation metrics are good choices. +(ii) Source of Concept Vector $c_t$ : There are many choices for the concept vector $c_t$ . These include, but are not limited to: labels from a labeled dataset, using a model to create pseudo-labels, using a human evaluator, or generating new inputs and using the prompts as labels. +(iii) Granularity of activation vectors: The simplest case is full input level activations, i.e. $|\mathcal{D}| = |a_k| = |c_t| = n$ . These can also be more specific, for example pixel-level activations as is the case in Network Dissection (Bau et al., 2020), or token level as is often the case for language model explanations. +(iv) Probing dataset $\mathcal{D}$ : Which inputs are used for the evaluation. Typical choices include the training/validation data of the model, a special labeled dataset designed for probing, or different datasets for different concepts. Importantly, the dataset used for evaluation should be disjoint from the dataset used for explanation generation to avoid overfitting. + +Importantly, regardless of the answer to these questions, or the application domain (e.g. vision or language), each evaluation fits under the same mathematical formalism of NeuronEval. + +# 4. Meta-Evaluation #1: Sanity Checks for Evaluation Metrics + +Now that we have organized previous evaluations under the NeuronEval framework, we can isolate and perform meta-evaluation on one particular component of the evaluation: the choice of metric $M$ . As seen in Table 1, existing work uses a wide variety of metrics, often without justification. In order to understand which evaluation metrics are reliable, we propose two sanity checks: Missing Labels Test and Extra Labels Test which we describe in detail in this section. These tests are inspired by (Adebayo et al., 2018), and passing them is intended to be a necessary (not sufficient) condition for a reliable evaluation metric. + +# 4.1. A Motivating Example + +We start by analyzing a simple failure case of the precision and recall metrics. Let the probing dataset contain 6 im + +ages of animals $x_{i}$ ordered as $\{\mathrm{dog},\mathrm{cat},\mathrm{dog},\mathrm{bear},\mathrm{monkey},$ flamingo}. Suppose we have a "pets" neuron that only activates on pets (i.e. dogs or cats), then we can compute the neuron activation vector $a_{k}$ as $B(a_{k}) = [1,1,1,0,0,0]^{\top}$ . We can also compute the concept activation vector $c_{t}$ for different concepts $t$ based on whether the input image $x_{i}$ contain the concepts, giving us: $c_{\mathrm{dog}} = [1,0,1,0,0,0]^{\top}$ $c_{\mathrm{cat}} = [0,1,0,0,0,0]^{\top}$ $c_{\mathrm{pet}} = [1,1,1,0,0,0]^{\top}$ $c_{\mathrm{animal}} = \left[1,1,1,1,1,1\right]^{\top}$ . We can then calculate the neuron explanation score $s_{M}$ of this "pets" neuron with different metrics $M$ in the following table: + +
Explanation tsRecallsPrecisionsIoU
dog0.6710.67
cat0.3310.33
pet (ground truth)111
animal10.50.5
+ +Table 2. A "pet" neuron: different metrics $M$ gives different evaluation scores ${s}_{M}$ on explanations $t$ . For the metrics $M = \{$ Recall, Precision, IoU $\} ,1$ is the perfect score,and 0 is the worst score. + +When comparing different evaluation metrics, we can see that Recall cannot distinguish between the correct concept (pet) and a concept that is too generic (animal), as $s_{\mathrm{recall}}$ gives perfect score for both explanations. On the other hand, Precision favors concepts that are too specific (dog, cat), as $s_{\mathrm{precision}} = 1$ for 'dog', 'cat' and 'pet'. In contrast, IoU can unambiguously determine the correct concept 'pet', as $s_{\mathrm{IoU}} = 1$ only for 'pet'. See Figure B.1 for illustration. + +# 4.2. Sanity Test Definitions + +Inspired by this example, we propose two general tests to measure whether a certain metric is too biased towards specific or generic concepts. These tests are motivated by the following idea: For a reliable metric, a correct description for a neuron should get the highest score, while its subset (too specific) or superset (too general) should score lower. + +# (I): Missing Labels Test + +The missing labels test is a generalized test to measure whether a metric can differentiate between the correct concept $c_{t}$ and a concept $c_{t}^{-}$ that is too specific (a random subset of the correct concept). In particular we generate $c_{t}^{-}$ by randomly replacing half of the elements of $c_{t}$ with 0. That is we remove half of the concept labels for concept $t$ . $\mathbb{E}[||c_t^- ||_1] = ||c_t||_1 / 2$ : + +$$ +\left[ c _ {t} ^ {-} \right] _ {i} = \left\{ \begin{array}{l l} \left[ c _ {t} \right] _ {i} & \text {w i t h p r o b a b i l i t y 0 . 5} \\ 0 & \text {w i t h p r o b a b i l i t y 0 . 5} \end{array} \right. \tag {9} +$$ + +We then measure the score difference $\Delta s$ , i.e. how much does the evaluation score change when replacing the original concept vector $c_{t_k}$ with a concept that is too specific, $c_t^-$ : + +$$ +\Delta s (k) = \mathbb {E} _ {c _ {t _ {k}} ^ {\pm}} \left[ s _ {\mathrm {M}} \left(a _ {k}, c _ {t _ {k}} ^ {\pm}\right) - s _ {\mathrm {M}} \left(a _ {k}, c _ {t _ {k}}\right) \right] \tag {10} +$$ + +![](images/9efa3755981cbebd4634ec97743a93a1f940e6e44f6892ca14f9fb675db6ab9d.jpg) +Figure 2. Overview of our theoretical Missing and Extra Labels Tests. We can see the Recall metric fails the extra labels test as it cannot differentiate between the perfect explanation and an explanation with extra labels. On the other hand Recall clearly passes the missing labels test as $-0.5 \ll -\epsilon = -0.001$ + +For the sanity test, it is not important how much the modified labels decrease the score. We simply want it to decrease score by a non-zero amount on all neurons, which leads us to define our main metric: Decrease Acc. + +$$ +\text {D e c r e a s e} \mathrm {A c c} = \frac {1}{| K |} \sum_ {k \in K} \mathbb {1} [ \Delta s (k) < - \epsilon ] \tag {11} +$$ + +Here $K$ is the set of neurons looked at and $t_k$ is the best/correct concept for neuron $k$ . Note that we normalized the scores such that maximum of $M$ is 1 and minimum value is 0 to allow for equal comparison between metrics. We set $\epsilon = 0.001$ in our experiments to require a small but noticeable change in scores. We study the sensitivity of these tests to the choice of $\epsilon$ further in Appendix E.4. The assumption behind this test is that if concept $t_k$ is a good description for neuron $k$ , a random subset of it should be a worse description. + +# (II):Extra Labels Test + +The extra labels test is essentially the opposite of missing labels test, where we test whether a metric can differentiate between a correct concept and a concept that is too generic i.e. a random superset of the concept. In particular, we create $c_t^+$ by randomly doubling the size of $c_t$ , i.e. $\mathbb{E}[(|c_t^+||_1)] = 2||c_t||_1$ . That is: + +$$ +\left[ c _ {t} ^ {+} \right] _ {i} = \left\{ \begin{array}{l l} 1 & \text {i f} \left[ c _ {t} \right] _ {i} = 1, \text {e l s e w i t h p r o b a b i l i t y} \frac {\left| \left| c _ {t} \right| \right| _ {1}}{n - \left| \left| c _ {t} \right| \right| _ {1}} \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {12} +$$ + +where $n$ is the length of vector $c_{t}$ . Similar to the Missing labels test, to pass the Extra Labels test, a metric should have a high Decrease Acc as defined in Eq. (11). If concept $t$ is a good description for neuron $k$ , giving additional positive concept labels to random inputs should decrease its similarity score. For simplicity, we only apply these tests with ground truth labels as concept source where $c_{t}$ is binary. + +# 4.3. Test Setup + +We perform two versions of these tests, Experimental on real neurons across diverse settings, and Theoretical on ideal neurons described below. + +Experimental: We experimentally evaluated these metrics on neurons from 8 different settings across vision and language models, covering final layer neurons, hidden layer neurons, CBM neurons and linear probe outputs. We evaluated vision models across 3 datasets: Imagenet, Places365 and CUB200, while language models were evaluated on a subset of OpenText(Gokaslan et al., 2019). See Appendix F for detailed description of the evaluation setting and results on individual datasets. We report the Averaged results in Table 3. + +Theoretical: In addition, we perform theoretical analysis on the Missing/Extra labels test for hypothetical neurons whose activations perfectly match a concept, which we discuss in detail in Appendix C. See Figure 2 for an overview. In this setting, the missing labels test measures whether a metric can differentiate a concept that perfectly matches neuron + +
Meta-Evaluation #1(I) Missing Labels Test(II) Extra Labels TestPass
ExperimentalTheoreticalExperimentalTheoretical
Recall98.66%100.00%0.00%0.00%×
Precision45.73%0.00%99.81%100.00%×
F1-score93.68%100.00%99.82%100.00%✓
IoU93.62%100.00%99.81%100.00%✓
Accuracy23.79%60.00%70.37%69.68%×
Balanced Accuracy98.65%100.00%53.67%60.00%×
Inverse Balanced Accuracy64.18%60.00%99.50%100.00%×
AUC94.96%100.00%59.18%60.00%×
Inverse AUC52.81%60.00%99.99%100.00%×
Correlation99.41%100.00%99.92%100.00%✓
Correlation (T&R)87.83%100.00%60.26%43.64%×
Spearman Correlation64.05%67.20%49.21%44.08%×
Spearman Correlation (T&R)80.04%100.00%59.81%19.68%×
Cosine99.45%100.00%99.26%100.00%✓
WPMI95.89%100.00%58.84%100.00%×
MAD59.81%60.00%99.34%100.00%×
AUPRC95.61%100.00%99.46%100.00%✓
Inverse AUPRC99.15 %100.00%95.58%89.54%×
+ +Table 3. Averaged experimental and theoretical results of our missing labels and extra labels test. Experimental results are averaged across settings like vision and language domain, while theoretical results are averaged over different neuron activation frequencies. (T&R) indicates the use of top-and-random sampling. We can see most evaluation metrics fail at least one of the tests. + +activations $c_t$ (Recall=1, Precision=1) from a concept $c_t^-$ (with Recall=0.5 and Precision=1). Similarly, the Extra Labels test measures differentiation between the perfect concept and $c_t^+$ (with Recall=1 and Precision=0.5). We simulate neurons with many different activation frequencies, and averaged results are reported in Table 3. + +Finally, we analytically studied the expected change in scores for different binary metrics under Missing and Extra labels test in Appendix D. Our analytical results are consistent with the empirical findings in Table 3 and Fig. 3. + +# 4.4. Results and Discussion + +Results: In Table 3 we report the averaged results of this test across these two sets of neurons for all different evaluation metrics. For simplicity, we say a metric passes if its Decrease Acc > 90% for all tests. Failing methods are marked in red color. Overall, our theoretical results closely match our empirical observations. Based on test results, we can group the metrics as follows: + +- Fail Both: Accuracy and Spearman Correlation perform poorly in both tests as their score is largely determined by the majority of inputs that neither activate the neuron nor have the concept. +- Fail Missing Labels Test: Precision, Inverse Balanced Accuracy, Inverse AUC and MAD are biased towards too specific concepts. +- Fail Extra Labels Test: Recall, Balanced Accuracy, + +AUC and Correlation(T&R) are biased towards concepts that are too generic. + +- **Borderline:** Our results are inconclusive for the following two metrics: WPMI which passes the tests on certain hyperparameter choices but not on others, and Inverse AUPRC fails the theoretical test only on perfectly balanced data but passes the empirical tests. +- Passing: F1-score, IoU, Correlation, Cosine similarity and AUPRC perform well and pass the tests. + +Importantly, we think any metric failing these tests should not be relied on by itself, and encourage the use of passing metrics. We also perform an Ablation in Appendix E.1 showing that our findings are not sensitive to specific parameter choices of the test. + +Concept Imbalance Explains Test Failures: In our theoretical experiments, we discover that the main reason for a metric failing one of these tests is poor handling of concept imbalance. Figure 3 shows an example of this phenomenon. On balanced neurons/concepts that activate on more than $10\%$ of the inputs, all metrics except for Recall pass the Extra Labels Test (large $|\Delta s|$ ). However, on neurons that activate less frequently, the failing metrics such as Accuracy and AUC can no longer distinguish between the perfect concept and an overly generic concept, and the score difference approaches 0. Therefore, failing the Missing/Extra Labels test can in most cases be attributed to the metrics being unable to handle imbalanced data. In this light, our + +![](images/8210130620bd0e0fc23681eb06c091d5d116e2428aa7ecca4544aaaeeec3269e.jpg) +Figure 3. The effect of Concept/Neuron Activation frequency on the score difference in Theoretical Extra Labels test. We can see that all the metrics that fail the Extra Labels test approach 0 score difference on neurons/concepts that rarely activate, i.e. where the concept labels are imbalanced. The passing metrics maintain a non-zero score difference regardless of how rare the concept is. + +results align with previous statistical knowledge, and metrics such as Accuracy and AUC which are not great for imbalanced datasets fail the tests, while metrics designed for imbalanced data such as F1-score and AUPRC pass the tests. Since real units in neural network often activate on a wide range of frequencies, and are sometimes encouraged to activate very rarely (i.e. Sparse Autoencoders), it is essential to use evaluation metrics that can handle imbalanced data. + +Top-and-random sampling: Following (Bills et al., 2023; Bricken et al., 2023), we also tested a version of Correlation and Spearman Correlation that uses top-and-random sampling (T&R), where $50\%$ of the evaluated samples are highly activating inputs only and the remaining $50\%$ sampled uniformly at random. For our T&R experiments we sampled 25 inputs from the top $0.2\%$ highest activating inputs and 25 random inputs. While Correlation passes both tests with uniform sampling, top-and-random sampling makes it fail the extra labels test. This is not surprising, as greatly oversampling highly activating inputs makes the metric more similar to Recall that only evaluates on highly activating inputs. This also explains why (Huang et al., 2023) found explanations from (Bills et al., 2023) with very high Correlation(T&R) scores to have relatively low F1-scores. + +$c_{t}$ from Generative models: We discover that evaluations based on generating new inputs with generative models are limited to running evaluations that fail the missing labels test and are biased towards more specific concepts. This is because $c_{t}$ based on generative model prompts is inherently incomplete or missing labels, and as such should not be solely relied on. See Appendix B.1 for further discussion on this situation and potential remedies. + +# 5. Meta Evaluation #2: Performance on Neurons with Known Concepts + +In this section we perform an additional comparison between evaluation metrics by empirically comparing how well they perform on neurons where we know their ground truth function, such as neurons in final (classification) layer of a model. + +# 5.1. Method: AUPRC between scores of correct and incorrect explanations + +The idea of this test is to directly measure how good specific evaluation metrics are. To do this, we have a concept set $C$ that includes the correct explanation for each neuron $k \in K$ , as well as some incorrect explanations. $K$ is the set of neurons evaluated such as all neurons in a layer. We then score all $|K||C|$ (neuron, explanation) pairs and measure whether the metric consistently assigns higher scores to pairs with correct explanations over incorrect ones. + +In particular, we measure the AUPRC (area under precision-recall curve) since this is a very imbalanced task with most (neuron, explanation) pairs being incorrect. Mathematically, we can write the predictions $\hat{Y}_M$ as: $\hat{Y}_M = \{s_M(a_k, c_t) \forall k \in K, t \in C\}$ , while the labels $Y$ are $Y = \{\mathbb{1}[t = t_k^*]$ $\forall k \in K, t \in C\}$ , where $t_k^*$ is the correct explanation for that neuron. Our meta-AUPRC evaluation can then be defined as: + +$$ +\operatorname {m e t a - A U P R C} (\mathbf {M}) = \operatorname {A U P R C} \left(\hat {Y} _ {M}, Y\right) \tag {13} +$$ + +A metric reaches perfect meta-AUPRC of 1 if all correct (neuron, explanation) pairs get a higher score than all incorrect pairs, while random guess performance is $\sim 0$ . + +Experimental Setup. Similar to section 4, we ran these test on 10 different setups, consisting of 5 separate models, 4 datasets, vision and language domains and both ground truth labels and pseudo-labels as concept source for $c_t$ . See Appendix F for detailed description of experimental setup and details on individual models. + +For all experiments we split a random $5\%$ of the neurons into validation set. For metrics that require hyperparameters such as $\alpha$ , we use the hyperparameters that performed the best in terms of Meta-AUPRC on the validation split for each setting. We then report performance on the remaining $95\%$ of neurons. In Table 4, we report the average scores and average ranks (i.e. the best metric for each setup gets 1, the worst gets 17) of the metrics across the four setups for both tasks. See Appendix F for detailed breakdown of results. + +We can see that in general the metrics that passed our tests in Section 4 perform better than those that didn't, with the top performance going to Correlation, followed by Cosine simi + +
MethodAvg. AUPRCAvg. Rank
Recall0.672211.30
Precision0.80397.90
F1-score/IoU0.81406.70
Accuracy0.721510.80
Balanced Accuracy0.79797.30
Inverse Balanced Acc.0.80877.10
AUC0.765211.00
Inverse AUC0.756910.90
Correlation0.87651.60
Correlation(T&R)0.660610.70
Spearman Correlation0.085316.20
Spearman Correlation(T&R)0.341815.40
Cosine0.86662.30
WPMI0.79997.30
MAD0.69528.80
AUPRC0.84063.90
Inverse AUPRC0.69049.30
+ +Table 4. Comparison of different evaluation metrics on neurons with known concepts, averaged across 8 settings. Lower rank means better performance. Best performing metric in bold, and second best underlined. + +larity then AUPRC and F1-score/IoU. ${}^{3}$ Overall we notice continuous metrics perform somewhat better than binary ones. This is likely because binarizing neuron activations loses valuable information, and it is hard to find one binarization threshold $\alpha$ that works well for all neurons. Despite good performance here, the Cosine metric is very sensitive to the average activation of a neuron as we show in E.2, which raises some concerns regarding relying on it. + +# 6. Discussion + +# 6.1. Relevance of our tests to Realistic Failure modes + +While our sanity test definition in Section 4 is relatively abstract, we think that most real world explanation failures are closely connected to one of two failure modes, and that these failure modes are directly captured by our tests: + +- FM-A) Explanation too generic: This means the explanation concept is a superset of the "true" neuron concept, e.g. describing a neuron as "animals" when it only activates on dogs. Our Extra Labels Test captures whether a metric can detect this failure mode. +- FM-B) Explanation too specific: Explanation concept is a subset of real neuron activations, i.e. describing a neuron as "black cat" when it activates on all cats. Our Missing Labels Test captures whether a metric can detect this failure mode. + +Since our idea of a "concept" is very general, it can include any text-based description. This means a single concept could be highly specific (e.g. "flying bird"), or a composition of simpler concepts (e.g. "water OR river"). Below we show how common explanation failures relate to our tests. + +- **Polysemanticity:** A popular model of polysemanticity is to model neuron activations as an OR of different concepts. If the explanation only captures one of these concepts, this means the explanation is too specific (FM-B). +- Context specific activations: A context specific neuron activation such as flying bird means the neuron's "true" concept is a subset of the non-context specific concept i.e. bird. If the explanation is not context-specific, the explanation is too generic (FM-A). +- Non activating inputs still contain the concept: This is a common explanation failure case also known as spurious correlations, where all the highly activating inputs share a concept, but not all inputs with this concept make the neuron activate. This means that the explanation concept is too generic i.e. a superset of the "true" concept (FM-A). + +Finally, in Appendix E.3 we conducted a test using real semantic superclasses of the concept as $c^+$ instead of our random superset, and found that the results are essentially identical, highlighting the relevance of our tests to real world settings. + +# 6.2. Conclusions + +In this paper, we have created the NeuronEval framework for unifying different evaluations under the same mathematical formalism, clarifying the definitions of around evaluating unit explanations. We have also proposed new sanity tests which lead to our main finding: Neuron Explanation Evaluations should use metrics that pass the Missing and Extra Labels Tests – We identified Correlation, Cosine, AUPRC, F1-score and IoU as solid passing metrics in our study of 18 different metrics. Popular evaluation metrics used in the literature such as Recall and AUC as well as using top-and-random sampling do not pass these tests, and should not be relied on by themselves. With evaluation on neurons with ground truth explanation available (e.g. final layer neuron), we identified that the top-performing metrics overall are Correlation, Cosine and AUPRC. The final choice of metric may be further affected by considerations such as labeling cost discussed in B.2 or other failure modes such as Cosine's sensitivity to average activation showcased in E.2. + +# Impact Statement + +Our paper is focused on rigorous evaluation of neural network interpretability results, and as such we believe it will have a largely positive societal impact. Being able to understand/see inside models is likely to be very useful in deploying models in a reliable and safe manner. In addition, rigorously evaluating their interpretations is very important so we can avoid relying on unfaithful explanations or interpretability illusions and can place appropriate trust in these models. + +# Acknowledgements + +The authors are partially supported by National Science Foundation under Grant No. 2107189, 2313105, 2430539, Hellman Fellowship, Intel Rising Star Faculty Award, Nvidia Academic Grant Program as well as the U.S. National Science Foundation Institute for Learning-enabled Optimization at Scale (TILOS; NSF CCF-2112665). The authors would like to thank anonymous reviewers for valuable feedback to improve the manuscript. + +# References + +Adebayo, J., Gilmer, J., Muelly, M., Goodfellow, I., Hardt, M., and Kim, B. Sanity checks for saliency maps. Advances in neural information processing systems, 31, 2018. +Bai, N., Iyer, R. A., Oikarinen, T., Kulkarni, A., and Weng, T.-W. Interpreting neurons in deep vision networks with language models. TMLR, 2025. +Bau, D., Zhou, B., Khosla, A., Oliva, A., and Torralba, A. Network dissection: Quantifying interpretability of deep visual representations. In CVPR, 2017. +Bau, D., Zhu, J.-Y., Strobelt, H., Lapedriza, A., Zhou, B., and Torralba, A. Understanding the role of individual units in a deep neural network. PNAS, 2020. +Bhatt, U., Weller, A., and Moura, J. M. F. Evaluating and aggregating feature-based model explanations. In Bessiere, C. (ed.), Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pp. 3016-3022. International Joint Conferences on Artificial Intelligence Organization, 7 2020. doi: 10.24963/ijcai.2020/417. URL https://doi.org/10.24963/ijcai.2020/417. Main track. +Bills, S., Cammarata, N., Mossing, D., Tillman, H., Gao, L., Goh, G., Sutskever, I., Leike, J., Wu, J., and Saunders, W. Language models can explain neurons in language models. https://openaipublic.blob.core.windows.net/ + +neuron-explainer/paper/index.html, 2023. +Bolukbasi, T., Pearce, A., Yuan, A., Coenen, A., Reif, E., Viégas, F., and Wattenberg, M. An interpretability illusion for bert. arXiv preprint arXiv:2104.07143, 2021. +Boyd-Graber, J., Carton, S., Feng, S., Liao, Q. V., Lombrozo, T., Smith-Renner, A., and Tan, C. Human-centered evaluation of explanations. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Tutorial Abstracts, pp. 26-32, 2022. +Bricken, T., Templeton, A., Batson, J., Chen, B., Jermyn, A., Conerly, T., Turner, N., Anil, C., Denison, C., Askell, A., Lasenby, R., Wu, Y., Kravec, S., Schiefer, N., Maxwell, T., Joseph, N., Hatfield-Dodds, Z., Tamkin, A., Nguyen, K., McLean, B., Burke, J. E., Hume, T., Carter, S., Henighan, T., and Olah, C. Towards monoseismicity: Decomposing language models with dictionary learning. Transformer Circuits Thread, 2023. https://transformercircuits.pub/2023/monoseismic-features/index.html. +Bykov, K., Kopf, L., Nakajima, S., Kloft, M., and Hohne, M. M. Labeling neural representations with inverse recognition. In NeurIPS, 2023. +Cunningham, H., Ewart, A., Riggs, L., Huben, R., and Sharkey, L. Sparse autoencoders find highly interpretable features in language models, 2023. +Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pp. 248-255, 2009. doi: 10.1109/CVPR.2009.5206848. +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. In International Conference on Learning Representations, 2021. +Fel, T., Cadène, R., Chalvidal, M., Cord, M., Vigouroux, D., and Serre, T. Look at the variance! efficient blackbox explanations with sobol-based sensitivity analysis. Advances in neural information processing systems, 34: 26005-26014, 2021. +Fel, T., Picard, A., Bethune, L., Boissin, T., Vigouroux, D., Colin, J., Cadène, R., and Serre, T. Craft: Concept recursive activation factorization for explainability. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2711-2721, 2023. + +Fel, T., Boutin, V., Béthune, L., Cadène, R., Moayeri, M., Andéol, L., Chalvidal, M., and Serre, T. A holistic approach to unifying automatic concept extraction and concept importance estimation. Advances in Neural Information Processing Systems, 36, 2024. +Gandelsman, Y., Efros, A. A., and Steinhardt, J. Interpreting the second-order effects of neurons in clip. arXiv preprint arXiv:2406.04341, 2024. +Ghorbani, A., Wexler, J., Zou, J. Y., and Kim, B. Towards automatic concept-based explanations. Advances in neural information processing systems, 32, 2019. +Gokaslan, A., Cohen, V., Pavlick, E., and Tellex, S. Openwebtext corpus. http://Skylion007.github.io/OpenWebTextCorpus, 2019. +Gur-Arieh, Y., Mayan, R., Agassy, C., Geiger, A., and Geva, M. Enhancing automated interpretability with output-centric feature descriptions. arXiv preprint arXiv:2501.08319, 2025. +Gurnee, W., Nanda, N., Pauly, M., Harvey, K., Troitskii, D., and Bertsimas, D. Finding neurons in a haystack: Case studies with sparse probing. Transactions on Machine Learning Research, 2023. +Hernandez, E., Schwettmann, S., Bau, D., Bagashvili, T., Torralba, A., and Andreas, J. Natural language descriptions of deep visual features. In ICLR, 2022. +Hooker, S., Erhan, D., Kindermans, P.-J., and Kim, B. A benchmark for interpretability methods in 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/fe4b8556000d0f0cae99daa5c5c5a410-Paper.pdf. +Huang, J., Geiger, A., D'Oosterlinck, K., Wu, Z., and Potts, C. Rigorously assessing natural language explanations of neurons. In Proceedings of the 6th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP, pp. 317-331, 2023. +Kazmierczak, R., Azzolin, S., Berthier, E., Hedström, A., Delhomme, P., Bousquet, N., Frehse, G., Mancini, M., Caramiaux, B., Passerini, A., et al. Benchmarking xai explanations with human-aligned evaluations. arXiv preprint arXiv:2411.02470, 2024. +Kim, B., Wattenberg, M., Gilmer, J., Cai, C., Wexler, J., Viegas, F., et al. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors + +(tcav). In International conference on machine learning, pp. 2668-2677. PMLR, 2018. +Kim, J., Maathuis, H., and Sent, D. Human-centered evaluation of explainable ai applications: a systematic review. Frontiers in Artificial Intelligence, 7:1456486, 2024. +Koh, P. W., Nguyen, T., Tang, Y. S., Mussmann, S., Pierson, E., Kim, B., and Liang, P. Concept bottleneck models. In International conference on machine learning, pp. 5338-5348. PMLR, 2020. +Kopf, L., Bommer, P. L., Hedström, A., Lapuschkin, S., Höhne, M., and Bykov, K. Cosy: Evaluating textual explanations of neurons. Advances in Neural Information Processing Systems, 37:34656-34685, 2024. +La Rosa, B., Gilpin, L., and Capobianco, R. Towards a fuller understanding of neurons with clustered compositional explanations. Advances in Neural Information Processing Systems, 36, 2024. +Lee, J., Oikarinen, T., Chatha, A., Chang, K.-C., Chen, Y., and Weng, T.-W. The importance of prompt tuning for automated neuron explanations. In NeurIPS ATTRIB Workshop, 2023. +Moakhar, A. S., Iofinova, E., Frantar, E., and Alistarh, D. Spade: Sparsity-guided debugging for deep neural networks. In *Forty-first International Conference on Machine Learning*, 2024. +Mu, J. and Andreas, J. Compositional explanations of neurons. In NeurIPS, 2020. +Oikarinen, T. and Weng, T.-W. Clip-dissect: Automatic description of neuron representations in deep vision networks. In ICLR, 2023. +Oikarinen, T. and Weng, T.-W. Linear explanations for individual neurons. In International Conference on Machine Learning, 2024. +Oikarinen, T., Das, S., Nguyen, L. M., and Weng, T.-W. Label-free concept bottleneck models. In International Conference on Learning Representations, 2023. +Petsiuk, V., Das, A., and Saenko, K. Rise: Randomized input sampling for explanation of black-box models. In BMVC, pp. 151. BMVA Press, 2018. URL http://bmvc2018.org/content/papers/1064.pdf. +Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., and Sutskever, I. Language models are unsupervised multitask learners. 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, 2021. + +Rudin, C., Chen, C., Chen, Z., Huang, H., Semenova, L., and Zhong, C. Interpretable machine learning: Fundamental principles and 10 grand challenges. Statistic Surveys, 16, 2022. +Schwettmann, S., Shaham, T., Materzynska, J., Chowdhury, N., Li, S., Andreas, J., Bau, D., and Torralba, A. Find: A function description benchmark for evaluating interpretability methods. Advances in Neural Information Processing Systems, 36:75688-75715, 2023. +Shaham, T. R., Schwettmann, S., Wang, F., Rajaram, A., Hernandez, E., Andreas, J., and Torralba, A. A multimodal automated interpretability agent. In *Forty-first International Conference on Machine Learning*, 2024. +Singh, C., Hsu, A. R., Antonello, R., Jain, S., Huth, A. G., Yu, B., and Gao, J. Explaining black box text modules in natural language with language models, 2023. +Srinivas, A. A., Oikarinen, T., Srivastava, D., Weng, W.-H., and Weng, T.-W. Sand: Enhancing open-set neuron descriptions through spatial awareness. In 2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), pp. 2993-3002. IEEE, 2025. +Srivastava, D., Yan, G., and Weng, T.-W. Vlg-cbm: Training concept bottleneck models with vision-language guidance. NeurIPS, 2024. +Subramani, N., Suresh, N., and Peters, M. E. Extracting latent steering vectors from pretrained language models. In Findings of the Association for Computational Linguistics: ACL 2022, pp. 566-581, 2022. +Templeton, A., Conerly, T., Marcus, J., Lindsey, J., Bricken, T., Chen, B., Pearce, A., Citro, C., Ameisen, E., Jones, A., Cunningham, H., Turner, N. L., McDougall, C., MacDiarmid, M., Freeman, C. D., Sumers, T. R., Rees, E., Batson, J., Jermyn, A., Carter, S., Olah, C., and Henighan, T. Scaling monoseismicity: Extracting interpretable features from claude 3 sonnet. Transformer Circuits Thread, 2024. URL https://transformer-circuits.pub/2024/scaling-monoseismicity/index.html. +Wah, C., Branson, S., Welinder, P., Perona, P., and Belongie, S. The caltech-ucsd birds-200-2011 dataset. Technical Report CNS-TR-2011-001, California Institute of Technology, 2011. +Yuksekgonul, M., Wang, M., and Zou, J. Post-hoc concept bottleneck models. International Conference on Learning Representations, 2023. +Zhai, X., Mustafa, B., Kolesnikov, A., and Beyer, L. Sigmoid loss for language image pre-training. In ICCV, 2023. + +Zhang, R., Madumal, P., Miller, T., Ehinger, K. A., and Rubinstein, B. I. Invertible concept-based explanations for cnn models with non-negative concept activation vectors. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 11682-11690, 2021. +Zhou, B., Khosla, A., Lapedriza, A., Oliva, A., and Torralba, A. Object detectors emerge in deep scene cnns. In ICLR, 2015. +Zhou, B., Lapedriza, A., Khosla, A., Oliva, A., and Torralba, A. Places: A 10 million image database for scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. +Zimmermann, R. S., Klein, T., and Brendel, W. Scale alone does not improve mechanistic interpretability in vision models. In NeurIPS, 2023. + +# Appendix + +# A Metric Definition & Details 14 + +A.1Binarization 14 +A.2 Simulation vs Classification Framing 14 +A.3 Additional Metric Definitions 15 +A.4 Equivalences 16 + +# B Discussion 18 + +B.1 Generative Model based Evaluation and missing labels test 18 +B.2 Limitations 18 +B.3 Motivating Example for Sanity Checks 20 +B.4 Additional Related Works 21 + +# C Theoretical Missing/Extra Labels Test and Concept Imbalance 23 + +C.1 Results 23 + +# D Analytical solution for Missing/Extra Labels Test 27 + +D.1 Special case - Theoretical Test 29 + +# E Ablations and Extra checks 30 + +E.1 Increase/decrease Fraction in Missing/Extra labels test 30 +E.2 Failure case of cosine: Adding a constant activation 31 +E.3 Random vs Semantic subsets 32 +E.4 Epsilon ablation 33 +E.5 Number of samples for $c_t^{\pm}$ 34 +E.6 Combination Metrics 35 + +# F Detailed results 37 + +F.1 Missing and Extra Labels Test: 37 +F.2 Meta-AUPRC evaluation: 40 + +# A. Metric Definition & Details + +# A.1. Binarization + +Many popular metrics in the literature require inputs to be binary such as (Bau et al., 2017; Huang et al., 2023). Since neuron activations and concept activations from some sources are continuous, we need to binarize these vectors. We denote this with the binarization function $B: \mathbb{R}^n \to \{0,1\}^n$ . + +Typically for neuron activation $a_{k}$ , following previous work we use $B = \mathrm{top}_{\alpha}$ , where we take top $\alpha$ fraction of activations to be 1, and others to be 0. We formalize this as $\mathrm{top}_{\alpha}(z)$ : + +$$ +\left[ \operatorname {t o p} _ {\alpha} (z) \right] _ {i} = \left\{ \begin{array}{l l} 1 & \text {i f} z _ {i} \geq b _ {\alpha}; \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {A.1} +$$ + +where $b_{\alpha}$ satisfies $\sum_{i=1}^{n} \frac{\mathbb{1}[z_i \geq b_{\alpha}]}{n} = \alpha$ , and $z \in \mathbb{R}^n$ . For example, if $\alpha = 0.05$ , then $\mathrm{top}_{\alpha}$ has 1's for inputs with activations in top-5%, and 0 for others. Note $\alpha$ is a hyperparameter needed for all binary similarity functions. We typically select $\alpha$ independently for each metric by finding the value that performs the best on a small validation split of neurons. For concept vectors $c_t$ , we usually binarize simply by rounding, denoted as $B = r$ , where: + +$$ +\left[ r (z) \right] _ {i} = \left\{ \begin{array}{l l} 1 & \text {i f} z _ {i} \geq 0. 5 \\ 0 & \text {i f} z _ {i} < 0. 5 \end{array} \right. \tag {A.2} +$$ + +# A.2. Simulation vs Classification Framing + +Simulation: In our definitions in section 3 we use the neuron activation $a_{k}$ as the ground truth, and concept presence $c_{t}$ as our prediction. This corresponds to framing the evaluation as simulation, i.e. trying to predict neuron activation based on concept value. Given this, we can express the Binary Classification Confusion Matrix elements (True Positive (TP), False Positive (FP), False Negative (FN) and True Negative (TN)) in terms of the vectors $a_{k}$ and $c_{t}$ as: + +$$ +\mathrm {T P} = B \left(a _ {k}\right) \cdot B \left(c _ {t}\right), \mathrm {F P} = \overline {{B \left(a _ {k}\right)}} \cdot B \left(c _ {t}\right), +$$ + +$$ +\mathrm {F N} = B \left(a _ {k}\right) \cdot \overline {{B \left(c _ {t}\right)}}, \mathrm {T N} = \overline {{B \left(a _ {k}\right)}} \cdot \overline {{B \left(c _ {t}\right)}}, +$$ + +where $\overline{B(\cdot)}$ represents element-wise NOT operation on the binary vector (equivalent to $\mathbf{1} - B(\cdot)$ where $\mathbf{1}$ is a vector of all 1's.) + +This corresponds to seeing the explanation from a simulation point of view, i.e. our goal is to predict how the neuron activates, based on the neuron's explanation and current inputs. This gives us binary classification metric definitions that are aligned with those of (Huang et al., 2023). + +Classification: However this is an arbitrary choice, and we could just as well define $c_{t}$ as the ground truth and $a_{k}$ as the prediction. This corresponds to a classification view, where our goal is to use neuron $k$ as a classifier for concept $t$ . In terms of metrics, this doesn't change the definitions for True Positive (TP) or True Negative (TN), but it switches the places of False Positive and False Negative, i.e. + +$$ +\mathrm {T P} _ {c l s} = B (a _ {k}) \cdot B (c _ {t}) = \mathrm {T P} _ {s i m} +$$ + +$$ +\mathrm {F P} _ {c l s} = B \left(a _ {k}\right) \cdot \overline {{B \left(c _ {t}\right)}} = \mathrm {F N} _ {s i m} +$$ + +$$ +\mathrm {F N} _ {c l s} = \overline {{B (a _ {k})}} \cdot B (c _ {t}) = \mathrm {F P} _ {s i m} +$$ + +$$ +\mathrm {T N} _ {c l s} = \overline {{B (a _ {k})}} \cdot \overline {{B (c _ {t})}} = \mathrm {T N} _ {s i m} +$$ + +This change in framing also affects for metrics which are not symmetric in terms of False Positives and False Negatives. For example, Recall(simulation) = Precision(classification), and Precision(simulation) = Recall(classification). + +$$ +\text {R e c a l l} (\text {s i m u l a t i o n}) = \frac {\mathrm {T P} _ {s i m}}{\mathrm {T P} _ {s i m} + \mathrm {F N} _ {s i m}} = \frac {\mathrm {T P} _ {c l s}}{\mathrm {T P} _ {c l s} + \mathrm {F P} _ {c l s}} = \text {P r e c i s i o n (c l a s s i f i c a t i o n)} +$$ + +The other binary metric that is sensitive to this framing is balanced accuracy. The metric we call Balanced Accuracy in Appendix A.3 corresponds to the simulation version of Balanced Accuracy, so for completeness sake we also include Inverse Balanced Accuracy (Appendix A.3), which is the classification version. + +Of the non-binary metrics, AUC and AUPRC are sensitive to this framing, and the standard versions AUC and AUPRC we define in Appendix A.3 are AUC(simulation) and AUPRC(simulation), while we also include classification versions of these metrics labeled as Inverse AUC/AUPRC. + +We note that some related works use the simulation framing, while others such as (Zhou et al., 2015) use the classification framing, which leads to conflicting definitions of Precision and other metrics. + +# A.3. Additional Metric Definitions + +1. Accuracy: Standard binary accuracy. Percentage of time the neuron activation matches concept activation. + +$$ +s _ {\mathrm {A c c}} = \frac {T P + T N}{T P + F P + F N + T N} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right) + \left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{n} \tag {A.3} +$$ + +2. F1-score: F1-score is the harmonic mean of precision and recall, and can be expressed as: + +$$ +s _ {F 1} = \frac {2 \cdot B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(a _ {k}\right) \right| \right| _ {1} + \left| \left| B \left(c _ {t}\right) \right| \right| _ {1}} \tag {A.4} +$$ + +3. Balanced Accuracy: A version of accuracy designed for imbalanced datasets that averages the accuracy on positive and negative inputs. + +$$ +s _ {B A} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{2 \left\| B \left(a _ {k}\right) \right\| _ {1}} + \frac {\left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{2 \left\| \left(\mathbf {1} - B \left(a _ {k}\right)\right) \right\| _ {1}} \tag {A.5} +$$ + +4. Inverse Balanced Accuracy: Balanced accuracy but we consider $a_{k}$ to be the prediction and $c_{t}$ to be the ground truth. + +$$ +s _ {I B A} = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{2 \left\| B \left(c _ {t}\right) \right\| _ {1}} + \frac {\left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{2 \left\| \left(\mathbf {1} - B \left(c _ {t}\right)\right) \right\| _ {1}} \tag {A.6} +$$ + +5. AUC: Area under ROC curve also known as AUROC, can be efficiently calculated as: + +$$ +s _ {\mathrm {A U C}} = \frac {\sum_ {i \mid B \left(a _ {k}\right) _ {i} = 0} \sum_ {j \mid B \left(a _ {k}\right) _ {j} = 1} \mathbb {1} \left[ c _ {t i} < c _ {t j} \right] + 0 . 5 \cdot \mathbb {1} \left[ c _ {t i} = c _ {t j} \right]}{| | B (a _ {k}) | | _ {1} | | 1 - B (a _ {k}) | | _ {1}} \tag {A.7} +$$ + +6. Inverse AUC: Area under receiving-operating-characteristics(AUROC) curve, where we consider $a_{k}$ to be the prediction and $c_{t}$ to be the ground truth(classification framing). + +$$ +s _ {I A U C} = \frac {\sum_ {i \mid B \left(c _ {t}\right) _ {i} = 0} \sum_ {j \mid B \left(c _ {t}\right) _ {j} = 1} \mathbb {1} \left[ a _ {k i} < a _ {k j} \right] + 0 . 5 \cdot \mathbb {1} \left[ a _ {k i} = a _ {k j} \right]}{| | B \left(c _ {t}\right) | | _ {1} | | 1 - B \left(c _ {t}\right) | | _ {1}} \tag {A.8} +$$ + +7. Spearman Correlation: The Spearman correlation is equivalent to the Pearson Correlation between the ranks of elements. + +$$ +s _ {S p e a r} = \frac {1}{n} \frac {\left(R \left(a _ {k}\right) - \mu \left(R \left(a _ {k}\right)\right)\right) \cdot \left(R \left(c _ {t}\right) - \mu \left(R \left(c _ {t}\right)\right)\right)}{\sigma \left(R \left(a _ {k}\right)\right) \sigma \left(R \left(c _ {t}\right)\right)} \tag {A.9} +$$ + +Here $R$ is a function that elementwise returns the ranks of each element. + +8. Cosine similarity: The standard cosine similarity between two vectors. + +$$ +s _ {c o s} = \frac {a _ {k} \cdot c _ {t}}{\left| \left| a _ {k} \right| \right| _ {2} \left| \left| c _ {t} \right| \right| _ {2}} \tag {A.10} +$$ + +9. WPMI: Weighted pointwise-mutual information. A version of this objective is used by (Hernandez et al., 2022) and (Oikarinen & Weng, 2023) to generate explanations, and by (Oikarinen & Weng, 2023) to evaluate said explanations. + +$$ +s _ {W P M I} = \sum_ {i \mid B \left(a _ {k}\right) _ {i} = 1} \left[ \log \left(c _ {t i}\right) - \lambda \log \left(\mu \left(c _ {t}\right)\right) \right] \tag {A.11} +$$ + +In the above equations $n$ is the length of $a_{k}$ and $c_{t}$ , $\mu$ calculates the mean of the vector and $\sigma$ its standard deviation. $\lambda$ is a hyperparameter and $R$ is the rank operator, which transforms each element to its rank, with smallest element becoming 1 and largest $n$ . + +10. AUPRC: Area Under Precision-Recall Curve(AUPRC) is a popular metric for measuring classification performance, in particular for imbalanced data. While we are not aware of a closed form solution, it can be calculated as: + +(a) Calculate precision and recall at each threshold $\tau_{i}$ , where threshold contains distinct values of $c_{t}$ . Recall $R_{i} = \frac{B(a_{k})\mathbf{1}(c_{t}\geq\tau_{i})}{\|B(a_{k})\|_{1}}$ , precision $P_{i} = \frac{B(a_{k})\mathbf{1}(c_{t}\geq\tau_{i})}{\|\mathbf{1}(c_{t}\geq\tau_{i})\|_{1}}$ . +(b) Calculate area under precision-recall curve using numerical integral: + +$$ +s _ {A U P R C} = \sum_ {n} (R _ {i} - R _ {i - 1}) P _ {i} +$$ + +AUPRC outputs values in [0, 1] range. + +11. Inverse AUPRC: Same as AUPRC, but with a different framing so we flip $c_t$ and $a_k$ in the calculations. + +See Tables A.1 and A.2 for additional details on our metrics. + +# A.4. Equivalences + +During our analysis we also notice that certain separate metrics are equivalent or very similar to each other. + +Correlation and Cosine similarity: Calculating correlation between two vectors is equal to normalizing each vector to have mean 0 and then taking their cosine similarity, as shown below: + +Let $\hat{x} = x - \mu (x)$ for any vector $x$ . Then + +$$ +\operatorname {C o s i n e} \left(\hat {a} _ {k}, \hat {c} _ {t}\right) = \frac {\hat {a} _ {k} \cdot \hat {c} _ {t}}{\| \hat {a} _ {k} \| _ {2} \| \hat {c} _ {t} \| _ {2}} = \frac {\left(a _ {k} - \mu \left(a _ {k}\right)\right) \cdot \left(c _ {t} - \mu \left(c _ {t}\right)\right)}{\sqrt {n} \sigma \left(a _ {k}\right) \sqrt {n} \sigma \left(c _ {t}\right)} = +$$ + +$$ +\frac {1}{n} \frac {\left(a _ {k} - \mu \left(a _ {k}\right)\right) \cdot \left(c _ {t} - \mu \left(c _ {t}\right)\right)}{\sigma \left(a _ {k}\right) \sigma \left(c _ {t}\right)} = \text {C o r r e l a t i o n} \left(a _ {k}, c _ {t}\right) \tag {A.12} +$$ + +This explains why the two perform very similarly in our evaluations. + +IoU and F1-score: Below we show that IoU and F1-score are very closely related. In fact, F1-score can be written as a monotonously increasing function of IoU. This means that for any vectors $x_{1}, y_{1}, x_{2}, y_{2}$ , $\mathrm{IoU}(x_{1},y_{1}) < \mathrm{IoU}(x_{2},y_{2}) \rightarrow \mathrm{F1}(x_{1},y_{1}) < \mathrm{F1}(x_{2},y_{2})$ , so for the purposes of comparing similarities they behave identically, and the choice of which one to use doesn't matter. As their performance was exactly the same in all tasks, we report them in the same row in Table 4. + +Intersection over Union (IoU) also known as Jaccard index is defined as + +$$ +\mathrm {I o U} = \frac {T P}{T P + F P + F N} \tag {A.13} +$$ + +while F1-score also known as Dice-score is defined as: + +$$ +\mathrm {F} 1 = \frac {2 T P}{2 T P + F P + F N} \tag {A.14} +$$ + +Now + +$$ +\begin{array}{l} F 1 = \frac {2 T P}{2 T P + F P + F N} = \frac {2 T P}{T P + F P + F N} \cdot \frac {T P + F P + F N}{2 T P + F P + F N} (A.15) \\ = 2 \mathrm {I o U} \cdot \left(\frac {2 T P + F P + F N}{T P + F P + F N}\right) ^ {- 1} = \frac {2 \cdot \mathrm {I o U}}{\mathrm {I o U} + 1} (A.16) \\ \end{array} +$$ + +Which is monotonously increasing for $0 \leq \mathrm{IoU} \leq 1$ . So using either metric gives the same comparative results. + +
MetricDefinitionRange
RecallTP / (TP + FN)[0, 1]
PrecisionTP / (TP + FP)[0, 1]
F1-score2TP / (2TP + FP + FN)[0, 1]
IoUTP / (TP + FP + FN)[0, 1]
Accuracy(TP + TN) / (TP + FP + TN + FN)[0, 1]
Balanced accuracy[TP / (TP + FN) + TN / (TN + FP)] / 2[0, 1]
Inverse balanced accuracy (classification version of balanced accuracy (see App. A.2))[TP / (TP + FP) + TN / (TN + FN)][0, 1]
+ +Table A.1. Definition of commonly-used binary classification metrics. Here, TP, FP, TN, FN refer to true positive, false positive, true negative and false negative, respectively. + +
MetricDefinitionRange
AUC (swap x and y to get inverse AUC)∑yi=1∑yj=0[1{xi>xj}+0.5*1{xi=xj}] |y=1||y=0|[0,1]
Correlation∑(xi-x)(yi-y)/√∑(xi-x)^2∑(yi-yy)^2[-1,1]
Spearman correlationReplace x,y to corresponding rank R(x),R(y) in correlation[-1,1]
Cosine∑xiyi/||x||2||y||2[-1,1]
WPMIlog p(x|y)-λ log(p(x))(−∞,∞)
MAD∑yi=1xi/|yi=1| - ∑yi=0xi/|yi=0|(−∞,∞)
+ +Table A.2. Definition of other commonly-used metrics. Here, $x,y\in \mathbb{R}^N$ are two real vectors, $\bar{x},\bar{y}$ refer to the mean of $x,y$ . + +# B. Discussion + +# B.1. Generative Model based Evaluation and missing labels test + +$c_{t}$ from Generative Models: Evaluation methods that use generative models to generate new data (Kopf et al., 2024; Shaham et al., 2024; Singh et al., 2023) effectively define the concept vector $[c_{t}]_{i} = 1$ if $x_{i}$ was generated with prompt $t$ , and 0 otherwise. However, this concept vector is incomplete, as some of "negative" examples that were not generated with that prompt may still contain the concept. In effect, the concept vector $c_{t}$ is actually naturally missing labels similar to $c_{t}^{-}$ from our missing labels test. This is because the generated inputs serve as positive labels for $c_{t}$ , but the negative inputs are often taken to just be all inputs from a dataset, even though some of actually do have the concept $t$ . So the $c_{t}$ we get from generative models is actually randomly missing a potentially large portion of the labels. Because of this, most evaluation methods using generative $c_{t}$ in Table 1 use methods that fail the missing labels test such as Inverse AUC and MAD. In fact, this is desirable with this concept source, as the missing labels in $c_{t}$ do not affect the explanation score with these metrics. However, these metrics alone should not be relied for evaluation. + +Potential Solutions and Future Directions: The best way to use generative models in evaluation might be to combine them with another evaluation that doesn't fail the missing labels test, as is done by (Huang et al., 2023) who measure Precision using generated data, and measure Recall on existing data with model based pseudo-labels and combine these results into F1-score. A useful evaluation in this vein could also be using a crowdsourced evaluation to measure Recall, and combining that with generative model based evaluation of Precision. Another option would be to not use the $c_t$ derived from prompt directly, but instead use another model to estimate $c_t$ on all inputs, not just generated ones which would avoid the missing labels problem. Finally an interesting direction would be to look into combinations of other metrics, for example could AUC and Inverse AUC be combined similarly to how Recall and Precision combine into F1-score. We explore these combination metrics further in Appendix E.6. + +# B.2. Limitations + +# Framework Limitations: + +Not every evaluation of neuron descriptions can fit into our framework. Below we split these into few separate cases and discuss whether each case represents a limitation of the framework or not: + +- Evaluating Multiple Inputs at once: Our evaluation framework assumes that the presence of a concept is estimated separately for each input. Many human study based evaluations (e.g. (Bau et al., 2017), (Oikarinen & Weng, 2023)) instead evaluate a group of inputs at once, asking questions like "How well does concept match this group of images?" However we believe this is simply a less precise/less objective way of asking whether the concept matches each input separately and does not in general represent a significant limitation for the framework. +- Comparing similarity to "correct" explanation: Another approach to evaluate neuron descriptions is to compare how close they are to a "correct" description, typically in a text-embedding space. For example, this is the main evaluation used by MILAN (Hernandez et al., 2022), where they generate "correct" explanation by asking Mechanical Turk workers to describe neurons based on their most highly activating inputs. We do not think this a very reliable way to evaluate explanations, because it relies on the assumption that there exists a single "correct" text-based explanation for each neuron (and that we have some way of finding it), and we do not think this is the case for many real neurons because of issues like polysemanticity and non-verbal concepts like specific graphical patterns. For these hard-to-interpret neurons it is better to just measure how well our explanation matches the neuron like the metrics in our framework do +- Non-text based explanations: While we focus on text based concepts $t$ in our paper, the framework works on non-textual concepts just as well, as long as we have some way of generating a concept vector $c_{t}$ for that concept. For example, the evaluation of (Zimmermann et al., 2023) uses a group of highly activating inputs as the concept, and then asks workers whether a new input is similar to those inputs or not. Despite this difference, it can be described neatly within our framework. +- Output Based Neuron Explanations: + +For clarity, it is useful to divide the neural network $f(x)$ into two parts, $f^{0:l}$ and $f^{l+1:L}$ , where 0 corresponds to the input layer, $f^{i:j}$ represents the $i$ through $j$ 'th layers of the neural network $f(x)$ , $l$ is the layer of the neuron we are interested in and $L$ is the total number of layers in the network. Then: + +$$ +f (x) = f ^ {l + 1: L} \left(f _ {k} ^ {0: l} (x), f _ {- k} ^ {0: l} (x)\right), \tag {B.1} +$$ + +where $f_{k}^{0:l}(x)$ is the activation of neuron of interest $k$ in layer $l$ , while $f_{\neg k}^{0:l}(x)$ is the activations of all the other neurons in layer $l$ . + +Alternatively to Input-based neuron explanations we define in section 2.3, a neuron explanation could instead be Output-based, that is an interpretable approximation of the following function: + +- Unit Activation $\rightarrow$ Output: $z\to f^{l + 1:L}(z,f_{-k}^{0;l}(x))$ + +Where $z$ is a real number (e.g. intervened value). This function describes how changes in the unit activation change the final network output, as has been the focus of a few recent papers on neuron explanations (Gandelsman et al., 2024; Gur-Arieh et al., 2025). + +As we can see from the above notations, output and input-based explanations are different problems, and may require different methods to solve and evaluate. In our paper, we focus on evaluating explanations of Input-based, i.e. the function $x \to f_k^{0:l}(x)$ , as this is more common in existing evaluations and can be applied more generally, for example to explain linear combinations of neurons that don't have a direct effect on the output such as TCAV (Kim et al., 2018) vectors. While evaluating Output-based explanations is also important, this may require different methods and is outside the scope of our current work. + +This may be the most significant limitations of our framework, as we believe measuring Output based explanations is equally important, and an ideal neuron explanation should describe both functions (potentially with different explanations). However, improving the evaluation of Input-based explanations is already a significant contribution towards better evaluation practices. In addition, while currently our framework is meant for Input based evaluation only, we believe many of the ideas and metrics we discussed could be useful in evaluating output based explanations. For example, in a generative models we could use the same metrics to measure similarity between unit activation and the presence of a specific concept in the output. However in output-based evaluations there are additional considerations such as measuring difference in outputs when changing the unit activation that may be more important. We believe extending this framework or creating a similar one for output-based evaluations is an important direction for future work. + +# Experimental Result Limitations: + +Overall we are quite confident in the generality of our results on the missing/extra labels test (Table 3) as they are consistent across final/hidden layer neurons and different datasets, and we showed theoretically that they are caused by poor metric performance on imbalanced data. Importantly, this theoretical result is independent of the data domain, type of concepts or the type of unit in question. + +However, it is good to note that passing these sanity checks does not guarantee that the metric is a good metric, but failing them does indicate a metric should not be relied on. This is similar to sanity checks proposed by (Adebayo et al., 2018), which have been quite influential in the field of saliency maps/Input importance estimation. + +On the other hand, our comparison results in Table 4 are mostly focused on final layer neurons or other units where we have ground truth available such a concept neurons inside a CBM. While they consistently prefer certain metrics, it is possible that these final layer neurons are systematically different from other units we are interested in such as hidden layer neurons, and these results should not be relied on too strongly. + +# Labeling Cost: + +One of the main reasons existing crowd-sourced evaluations only measure Recall is it's lower evaluation cost, as we only need to only evaluate $c_t$ on highly activating inputs, i.e. where $B(a_k) = 1$ , because the values of $c_t$ on other inputs do not affect the score. In contrast, evaluating most other metrics requires knowledge of the full $c_t$ . Similar cost issues are also faced when using an expensive LLM based simulation pipeline to predict $c_t$ as done by (Bills et al., 2023), causing evaluation metrics to often be evaluated on a small subset instead. + +Crowd-sourced evaluation of the entire $c_t$ will likely give noisy results as most inputs do not contain the concept. To avoid this, another approach is to oversample highly activating inputs similarly to Top-and-random sampling, though more effective sampling strategies likely exist. This can be done without failing the extra labels test if the proper sampling correction is applied to correct for the bias introduced by the non-uniform sampling. As our paper is focused on the correctness of + +different metrics, not the ease of measuring them, and the effective sampling/user study design for non-recall metrics is a rather large and complex topic that does not fit within the scope of the current paper, but it is a promising direction for future work. + +An alternative way to reduce labeling costs is to use a combination of metrics, for example evaluating F1-score by combining a crowd-sourced evaluation of Recall with a generative model based evaluation of Precision. + +# B.3. Motivating Example for Sanity Checks + +Here, we illustrate the motivating example discussed in Section 4.1 in the following Figure. Figure B.1 displays an example neuron that only activates on images containing pets to highlight how similarity scores are calculated. We can see that only measuring Recall gives a perfect score to explanations that are too generic (animal), while only measuring precision favors explanations that are too specific (dog, cat). + +# Example neuron activating on pets only + +Probing data $D_{\mathrm{test}}$ + +![](images/dc594c926abf2f14d017a1405c9a776a3ca953b974b1881ed87b8556dad36c2b.jpg) +Figure B.1. A hypothetical neuron that only activates on pets (dogs or cats). When comparing different evaluation metrics, we can see recall cannot distinguish between the correct concept (Pet) and a concept that is too generic (Animal), while precision favors concepts that are too specific (Dog, Cat). IoU can unambiguously determine the correct concept. + +![](images/258d6556d9333c3c52249c43a272ef11590eafa041a91cc45bb847efc641e2fb.jpg) + +![](images/89c5d2d5ba42e177eb74e1ab94b87118ea63a11059d5121ebaa3377dd869ee75.jpg) + +![](images/fc16e9502adce0f96148893208f51829c57b0791f3c1311c3172621694d30b56.jpg) + +![](images/63c029f44a7bd45f37616effbf99de1eecb97cf323a4190d05099daf63b4d4fc.jpg) + +![](images/b1e9780ebccba9de5675a2cfc5dc093c0a89b4927b91858fde4e641cb43abf80.jpg) + +
B(ak)111000
cdog101000
ccat010000
cpet111000
canimal111111
+ +Results of different evaluation metrics: + +
Concept tsRecallsPrecisionS IoU
Dog2/3 = 0.672/2 = 12/3 = 0.67
Cat1/3 = 0.331/1 = 11/3 = 0.33
Pet3/3 = 13/3 = 13/3 = 1
Animal3/3 = 13/6 = 0.53/6 = 0.5
+ +- Correct concept Pet gets perfect score with all metrics +- Recall incorrectly gives perfect score to superclass Animal +- Precision incorrectly gives perfect score to subclasses Dog and Cat + +# B.4. Additional Related Works + +Evaluation of individual neuron explanations. Table B.1 shows an expanded version of our comparison table (Table 1 in the main text section 4) of existing evaluation methods. It can be seen in Table B.1 that prior work (Bau et al., 2017; Oikarinen & Weng, 2023; Oikarinen et al., 2023; Bai et al., 2025; Huang et al., 2023; Gurnee et al., 2023; Mu & Andreas, 2020; La Rosa et al., 2024; Koh et al., 2020; Zimmermann et al., 2023; Bykov et al., 2023; Kopf et al., 2024; Bills et al., 2023; Oikarinen & Weng, 2024; Bricken et al., 2023; Templeton et al., 2024; Oikarinen et al., 2023; Oikarinen & Weng, 2023; Shaham et al., 2024; Singh et al., 2023) only use 1-2 metrics for evaluation and typically did not discuss or justify why the metric should be used. Among all the prior work in Table B.1, we believe that the most similar work to ours is (Huang et al., 2023), which has focused on evaluating individual neuron explanations in language models. In particular, they discover a discrepancy between the evaluation metrics, i.e. neurons with very high Correlation(top-and-random) score can still have relatively low F1-scores. However, different from our work their scope is much more specific and they do not provide analysis comparing different evaluation metrics or justification on why they use F1-score specifically. Their findings are in line with ours, as we found that Correlation(top-and-random) fails the extra labels test, while F1-score passes our sanity checks. + +Overall we find many evaluations in previous works to be lacking, either due to using poor metrics that fail our sanity checks, or using very small sample sizes. In addition, some popular methods like TCAV (Kim et al., 2018) completely lack evaluation of whether the concept directions they learn are good. To our best knowledge, no human-study has been conducted using metrics that pass our sanity checks, instead most existing human-studies only measure Recall or a similar metric, and running such a study would be valuable for better understanding of unit interpretability and/or explanation methods. + +Known Concept Evaluation: Similar to our experiments in Section 5, many previous works such as (Oikarinen & Weng, 2023; Schwettmann et al., 2023; Moakhar et al., 2024; Shaham et al., 2024) have utilized neurons or units with known concepts to evaluate explanation quality. However, these papers typically focus on evaluating explanation methods or individual explanations, while our focus is on meta-evaluation to understand which metrics are best to use for evaluation, meaning our methods and motivations for the evaluation are noticeably different from these previous works. + +Interpretability Illusions: (Bolukbasi et al., 2021) discovered an interpretability illusion for BERT-models, which shows that neurons that look interpretable when only looking at their most highly activating inputs on one probing dataset $\mathcal{D}$ , seem to be doing something completely different when analyzed on another dataset. This highlights the importance of good choice of probing dataset, or confirming explanations on multiple datasets. However, we believe there is another reason for these illusions, namely that the authors only look at highly activating inputs (equivalent to Recall in our framework), which is not a reliable metric. Overall, our goal is to reduce such interpretability illusions, i.e. the appearance of interpretability when something is really not interpretable, by encouraging more rigorous evaluation. + +Sanity Checks. The sanity checks proposed in this paper (Missing and Extra Labels test) are inspired by the sanity checks (Adebayo et al., 2018) proposed for saliency maps, which has had a large impact in guiding that field towards more faithful explanations. However the topic is very different, since (Adebayo et al., 2018) focus on local input-importance instead of global neuron explanations in our paper. Similarly, the specific tests proposed by (Adebayo et al., 2018) are also very different from ours. + +Concept extraction. Extracting interpretable concepts from a learned representation is a common challenge and relevant for finding individual units to evaluate in our framework. This can either be supervised as proposed by (Kim et al., 2018) where the concepts are specified by human and labels are provided. This approach is also used by linear probing based work such as (Gurnee et al., 2023). Later, a series of works(Ghorbani et al., 2019; Zhang et al., 2021; Fel et al., 2023) was proposed to automatically extract concepts from model activations, without human supervision, i.e. unsupervised. (Fel et al., 2024) claimed that concept extraction could be regarded as a dictionary learning problem. Recently Sparse Autoencoders (Cunningham et al., 2023; Templeton et al., 2024) have also gained popularity as an unsupervised concept extraction method. Note that most unsupervised concept extraction methods are discovering "units" defined in our work that are not directly understandable to humans, and require an explanation method to provide human-understandable explanations. Our work focuses on the evaluation of the explanations of those concepts. + +Evaluating Neuron Explanations: A Unified Framework with Sanity Checks + +
Metric MStudyConcept Source ctGranularityProbing Dataset DDomainTarget
RecallHuman Eval (Zhou et al., 2015)Crowdsourced~ Whole InputSpecific eval datasetVisionNeurons
~RecallHuman Eval (Bau et al., 2017)Crowdsourced~Whole InputSpecific eval datasetVisionNeurons
~RecallHuman Eval (Oikarinen & Weng, 2023)CrowdsourcedWhole InputValidation dataVisionNeurons
~RecallHuman Eval (Oikarinen et al., 2023)CrowdsourcedWhole InputValidation DataVisionCBM neurons
PrecisionAutomated Eval (Srinivas et al., 2025)GenerativeWhole InputGenerated+ Validation dataVisionNeurons
F1-scoreObservation based (Huang et al., 2023)Generative + modelWhole InputGenerated + Training dataLanguageNeurons
F1-scoreSparse probes (Gurnee et al., 2023)Labeled dataPer-tokenSpecific eval datasetLanguageLinear comb. of neurons
F1-scoreCBM - Concept Error (Fig. 2) (Koh et al., 2020)Labeled dataWhole InputValidation DataVisionCBM neurons
IoUBroden IoU (Bau et al., 2017) (Mu & Andreas, 2020; La Rosa et al., 2024)Labeled dataPer-pixelSpecific eval datasetVisionNeurons
AccuracyCBM - Concept Error (Koh et al., 2020)Labeled dataWhole InputValidation DataVisionCBM neurons
~AUCComparative Human Study (Zimmermann et al., 2023)CrowdsourcedWhole InputTraining dataVisionNeurons
Inverse AUCINVERT (Bykov et al., 2023)Labeled dataWhole InputValidation dataVisionNeurons
Inverse AUCCoSy AUC (Kopf et al., 2024)GenerativeWhole InputGenerated+ Validation dataVisionNeurons
Correlation(T&R)Simulation - Correlation Score (Bills et al., 2023)ModelPer-tokenTraining dataLanguageNeurons
CorrelationSimulation - Correlation Score (Oikarinen & Weng, 2024)ModelWhole InputValidation dataVisionNeurons
CorrelationCBM - Concept Error (Fig. 2) (Koh et al., 2020)Labeled dataWhole InputValidation DataVisionCBM neurons
Spearman Correlation(T&R)SAE Auto Interp (Bricken et al., 2023; Templeton et al., 2024)ModelPer-tokenTraining dataLanguageSAE features
~WPMICLIP-Dissect - Similarity (Oikarinen & Weng, 2023)ModelWhole InputValidation dataVisionNeurons
MADCoSy MAD (Kopf et al., 2024)GenerativeWhole InputGenerated+ Validation dataVisionNeurons
~MADMAIA (Shaham et al., 2024)GenerativeWhole InputGeneratedVisionNeurons
~MADExplanation Score (Singh et al., 2023)GenerativeWhole InputGeneratedLanguageTransformer factors
+ +Table B.1. Extended Table (of Table 1 in the main text section 4) comparing related work. Note (Zhou et al., 2015) call their evaluation Precision, as they use the classification framing. This is equivalent to Recall in our framing as shown in Section A.2. + +Human-centered evaluation on concept-based models. Human-centered evaluation of model explanation(Kim et al., 2024; Boyd-Graber et al., 2022) has drawn attention from the XAI community. Recently, (Kazmierczak et al., 2024) collected human evaluation of XAI explanations as a benchmark for explanation methods. These works provide important techniques and inspiration for evaluating explainability, but almost all existing work is focused on local feature importance explanations, which is very different from our work on global neuron-level explanations. + +Evaluation Metrics for Input-Improtance Explanations The field of input-importance explanations has seen an evolution in the evaluation metrics used, with initial focus on finding the features that humans think are important. Later metrics such as deletion and insertion proposed by (Petsiuk et al., 2018) allow for more principled evaluation of the explanation fidelity, i.e. whether it actually matches what the model in vision models, and (Fel et al., 2021) extends the deletion metric to natural language settings. (Hooker et al., 2019) proposes the Remove And Retrain (ROAR) framework as an alternative method for evaluating the quality of input-importance explanations by evaluating whether a model retrained on data without the most important pixels can still solve the task. (Bhatt et al., 2020) propose additional checks, such as measuring whether an explanation method has high sensitivity, with the intuition that similar inputs should have similar explanations. While this line of work focuses on a different topic (local input importance explanations) instead of global neuron-level explanations, and mostly proposes new metrics without significant meta-evaluation, it highlights the importance of good evaluation mmetrics in explainable AI. + +# C. Theoretical Missing/Extra Labels Test and Concept Imbalance + +In this section we analyze the effects of missing/extra labels test on a simpler toy setting, where neuron $k$ 's activations $a_{k}$ perfectly match the concept labels of concept $t_k$ , i.e. $a_{k} = c_{t_{k}}$ . In this setting, we assume binary neuron and concept activations, i.e. the neuron's activation is 1 if concept is present on the input, and 0 if its not. Consequently, we do not need to perform additional binarization of concept activations with top $\alpha$ like we did in previous sections. + +In this simplified setting, our missing and extra labels tests correspond to being able to differentiate between three concepts as defined in section 4: + +1. $c_{t_k}$ : The perfect predictor for neuron $a_k$ , with precision=1 and recall=1. +2. $c_{t_k}^-$ : (Missing labels) This concept has Precision=1 since whenever a concept is present, the neuron is also active, and Recall of 0.5 since only half to inputs where the neuron activate now have the concept. +3. $c_{t_k}^+$ : (Extra labels) Inverse from above, this concept has Precision=0.5 and Recall=1. + +We then measure the average score difference $\Delta s$ across neurons: + +- Missing labels test: $\Delta s(k) = \mathbb{E}_{c_{t_k}^-}[s_M(a_k, c_{t_k}^-) - s_M(a_k, c_{t_k})]$ +- Extra labels test: $\Delta s(k) = \mathbb{E}_{c_{t_k}^+}[s_M(a_k, c_{t_k}^+) - s_M(a_k, c_{t_k})]$ + +A good metric should be able to reliably differentiate between these concepts. Interestingly we find that the ability of most metrics to differentiate greatly depends on whether the data is balanced or not. + +Since the neuron activations perfectly align with concept $t$ and are binary, the only parameter that can effect the results of our missing and extra labels test is the activation frequency of concept $t$ , i.e. what fraction of inputs $x \in \mathcal{D}$ contain concept $t$ . Following the notation in section D, we denote this fraction as $\gamma$ . Note technically it should be $\gamma + \eta$ , but $\eta = 0$ in this case with perfect match between concept and neuron. We then test whether a metric passes the test on different values of $\gamma$ , using simulated data on tables C.3 and C.4. Each number is the average result from 1000 evaluations with 500,000 datapoints each. In addition, in Section D, we derived a closed form solution to the binary metrics under missing or extra labels as a function of $\gamma$ and other parameters. This simplifies nicely when we consider an ideal neuron with $a_{k} = c_{t}$ , and we can derive the expected result of missing/extra labels test as a simple function of $\gamma$ alone in Table D.2. These theoretical results perfectly agree with our simulated results. + +# C.1. Results + +In Tables C.1 and C.2 we report the Decrease Acc defined in Equation 11 on different activation frequencies $\gamma$ in our simulated neuron. We say a metric as passing the Theoretical test if it has Decrease Acc $>90\%$ on every frequency. In tables C.3 and C.4 (visualized in Fig. 3) we report the average $\Delta s$ on the same set of different activation sparsities. We have highlighted metrics with $\Delta s > -0.01$ in red to highlight metrics approaching 0 difference. + +We can see most metrics (except from recall and precision) perform well on balanced data ( $\gamma = 0.499$ and $\gamma = 0.1$ ). However, their performance often starts to drop with score difference $\Delta s$ approaching 0 as the data becomes more and more unbalanced. We can see that practically all the metrics that failed our experimental missing/extra labels tests cannot differentiate between perfect and modified concept specifically on imbalanced data, highlighting that likely the root cause of the failure on these test is that the metrics performs poorly on imbalanced data. This is also aligned with conventional knowledge that metrics such as accuracy and AUC are a poor choice to rely on when your data is heavily imbalanced. On the other hand, metrics that passed the tests are insensitive to activation frequency $\gamma$ and converge to a nonzero constant as $\gamma$ decreases. + +The results in terms of passing are almost identical to our experimental results in section 4. The only differences were WPMI which passes the theoretical extra labels test but fails the experimental one. We believe this has to do with hyperparameter $(\alpha, \lambda)$ choices and that WPMI can in principle pass the test but with poor hyperparameters (small $\lambda$ ) it will not, leading us to overall recommend against using it in practice as hyperparameter choice is challenging in the real world. An interesting case is Inverse AUPRC. This metric is designed for imbalanced data and works well in that domain, + +but actually performs worse when the data is balanced. In particular Inverse AUPRC fails the test when data is perfectly balanced. This indicates caution should be used if relying on it, in case you have some neurons with extremely common concepts. + +We argue that being able to pass these tests regardless of activation frequency is important for any evaluation metric to be used, as we typically do not know what frequency each neuron will have in advance, in many cases the interesting neurons/concept might activate very sparsely, for example in Sparse Autoencoders. + +
Theoretical Missing Labels Test, Decrease Acc
Activation Frequency γ:0.4990.10.010.0010.0001Pass
Recall100.00%100.00%100.00%100.00%100.00%✓
Precision0.00%0.00%0.00%0.00%0.00%×
F1-score100.00%100.00%100.00%100.00%100.00%✓
IoU100.00%100.00%100.00%100.00%100.00%✓
Accuracy100.00%100.00%100.00%0.00%0.00%×
Balanced Acc.100.00%100.00%100.00%100.00%100.00%✓
Inverse Balanced Acc.100.00%100.00%100.00%0.00%0.00%×
AUC100.00%100.00%100.00%100.00%100.00%✓
Inverse AUC100.00%100.00%100.00%0.00%0.00%×
Correlation100.00%100.00%100.00%100.00%100.00%✓
Correlation(T&R)100.00%100.00%100.00%100.00%100.00%✓
Spearman Correlation100.00%100.00%100.00%22.70%13.30%×
Spearman Correlation(T&R)100.00%100.00%100.00%100.00%100.00%✓
Cosine100.00%100.00%100.00%100.00%100.00%✓
WPMI100.00%100.00%100.00%100.00%100.00%✓
MAD100.00%100.00%100.00%0.00%0.00%×
AUPRC100.00%100.00%100.00%100.00%100.00%✓
Inverse AUPRC100.00%100.00%100.00%100.00%100.00%✓
+ +Table C.1. Average Decrease Accuracy on Theoretical Missing labels Test. A metric fails if it has low decrease accuracy on any concept frequency $\gamma$ . + +
Theoretical Extra Labels Test, Decrease Acc
Activation Frequency γ:0.4990.10.010.0010.0001Pass
Recall0.00%0.00%0.00%0.00%0.00%×
Precision100.00%100.00%100.00%100.00%100.00%✓
F1-score100.00%100.00%100.00%100.00%100.00%✓
IoU100.00%100.00%100.00%100.00%100.00%✓
Accuracy100.00%100.00%100.00%48.40%0.00%×
Balanced Acc.100.00%100.00%100.00%0.00%0.00%×
Inverse Balanced Acc.100.00%100.00%100.00%100.00%100.00%✓
AUC100.00%100.00%100.00%0.00%0.00%×
Inverse AUC100.00%100.00%100.00%100.00%100.00%✓
Correlation100.00%100.00%100.00%100.00%100.00%✓
Correlation(T&R)100.00%92.80%22.60%2.70%0.10%×
Spearman Correlation100.00%100.00%5.60%3.20%11.60%×
Spearman Correlation(T&R)0.20%8.60%20.60%63.70%5.30%×
Cosine100.00%100.00%100.00%100.00%100.00%✓
WPMI100.00%100.00%100.00%100.00%100.00%✓
MAD100.00%100.00%100.00%100.00%100.00%✓
AUPRC100.00%100.00%100.00%100.00%100.00%✓
Inverse AUPRC47.70%100.00%100.00%100.00%100.00%×
+ +Table C.2. Average Decrease Accuracy on Theoretical Extra labels Test. A metric fails if it has low decrease accuracy on any concept frequency $\gamma$ . + +
Theoretical Missing Labels Test, Average Δs
Activation Frequency γ:0.4990.10.010.0010.0001limγ→0
Recall-0.5000-0.4999-0.5002-0.5007-0.5025-0.5000
Precision0.00000.00000.00000.00000.00000.0000
F1-score-0.3334-0.3333-0.3335-0.3341-0.3352-0.3333
IoU-0.5000-0.5002-0.4998-0.5005-0.5032-0.5000
Accuracy-0.2495-0.0500-0.0050-0.00050.00000.0000
Balanced Acc.-0.2500-0.2500-0.2501-0.2500-0.2500-0.2500
Inverse Balanced Acc.-0.1662-0.0263-0.0025-0.00020.00000.0000
AUC-0.2500-0.2500-0.2500-0.2493-0.2508-
Inverse AUC-0.1662-0.0263-0.0025-0.00030.0000-
Correlation-0.2111-0.1559-0.1474-0.1466-0.1479-
Correlation(T&R)-0.4965-0.4894-0.4649-0.3928-0.2449-
Spearman Correlation-0.2000-0.0686-0.0079-0.0006-0.0018-
Spearman Correlation(T&R)-0.1005-0.1009-0.1066-0.0902-0.2006-
Cosine-0.1464-0.1465-0.1465-0.1464-0.1474-
WPMI-0.3590-0.3591-0.3589-0.3587-0.3602-
MAD-0.2210-0.0350-0.0033-0.00030.0000-
AUPRC-0.2505-0.4499-0.4953-0.5003-0.4964-
Inverse AUPRC-0.5000-0.4999-0.5002-0.4988-0.4996-
+ +Table C.3. Simulation results missing labels test on idealized neuron with perfect correspondence to a concept activation. We can see most metrics pass when the data is relatively balanced, but several start to struggle on inbalanced data (low $\gamma$ ). In contrast, passing metrics maintain a clearly nonzero $\Delta s$ regardless of activation frequency. The $\lim_{\gamma \to 0}$ column is analytical solution from D.2. + +
Theoretical Extra Labels Test, Average Δs
Activation Frequency γ:0.4990.10.010.0010.0001limγ→0
Recall0.00000.00000.00000.00000.00000.0000
Precision-0.5000-0.5001-0.4999-0.4993-0.4963-0.5000
F1-score-0.3333-0.3334-0.3334-0.3336-0.3333-0.3333
IoU-0.5000-0.5000-0.5001-0.4997-0.4970-0.5000
Accuracy-0.4990-0.1000-0.0100-0.0010-0.00010.0000
Balanced Acc.-0.4980-0.0556-0.0051-0.00050.00000.0000
Inverse Balanced Acc.-0.2500-0.2500-0.2500-0.2500-0.2483-0.2500
AUC-0.7562-0.0844-0.0077-0.0008-0.0001-
Inverse AUC-0.2500-0.2500-0.2501-0.2500-0.2491-
Correlation-0.4777-0.1667-0.1483-0.1465-0.1461-
Correlation(T&R)-0.4929-0.0293-0.0027-0.00020.0000-
Spearman Correlation-0.5672-0.0238-0.0007-0.0002-0.0018-
Spearman Correlation(T&R)0.00020.0000-0.00360.0307-0.0064-
Cosine-0.1464-0.1464-0.1463-0.14640.1456-
WPMI-0.0292-0.0292-0.0292-0.0293-0.0292-
MAD-0.3324-0.3324-0.3324-0.3321-0.3298-
AUPRC-0.5000-0.5000-0.4999-0.4998-0.4974-
Inverse AUPRC-0.0010-0.4000-0.4899-0.4984-0.4957-
+ +Table C.4. Simulation results extra labels test on idealized neuron with perfect correspondence to a concept activation. We can see most metrics pass when the data is relatively balanced, but several start to struggle on inbalanced data (low $\gamma$ ). In contrast, passing metrics maintain a clearly nonzero $\Delta s$ regardless of activation frequency. The $\lim_{\gamma \to 0}$ column is analytical solution from D.2. + +# D. Analytical solution for Missing/Extra Labels Test + +In this section, we provide a theoretical analysis for missing label and extra label test for binary classification metrics. For simplicity of symbols, in this section we analyze the population statistics. Suppose we have following confusion matrix: + +
c=1c=0
a=1γb
a=0ηd
+ +Here, we use $a$ to denote neuron activation and $c$ to denote concept activation. In missing labels test, consider a general case where we randomly flip $c = 1$ into $c = 0$ with probability $p$ . Thus, the resulting confusion matrix is: + +
c=1c=0
a=1(1-p)γb+pγ
a=0(1-p)ηd+pη
+ +In extra labels test, similarly, we turn $c = 0$ into $c = 1$ with probability $q = \frac{p(\gamma + \eta)}{b + d}$ , the resulting confusion matrix is + +
c=1c=0
a=1γ+qb(1-q)b
a=0η+qd(1-q)d
+ +With these, we could plug in corresponding TP/FP/TN/FN into metrics to calculate metric value in these two tests. + +# 1. Recall: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left| \left| B \left(a _ {k}\right) \right| \right| _ {1}} = \frac {\gamma}{b + \gamma}. \tag {D.1} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {\gamma + q b}{b + \gamma} \geq s _ {M} \left(a _ {k}, c _ {t}\right). \tag {D.2} +$$ + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {\gamma - p \gamma}{b + \gamma} \leq s _ {M} \left(a _ {k}, c _ {t}\right). \tag {D.3} +$$ + +From the derivation above, we could see that increasing labels only raises recall metric while reducing labels always leads to a drop in recall as we found in our experiments. + +# 2. Precision: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left\| B \left(c _ {t}\right) \right\| _ {1}} = \frac {\gamma}{\gamma + \eta} \tag {D.4} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {\gamma + q b}{\gamma + q b + \eta + q d}. \tag {D.5} +$$ + +Precision will increase if $\frac{b}{b + d} > \frac{\gamma}{\gamma + \eta}$ . + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {(1 - p) \gamma}{(1 - p) \gamma + (1 - p) \eta} = s _ {M} \left(a _ {k}, c _ {t}\right). \tag {D.6} +$$ + +Thus, the precision does not change in the missing labels test. + +# 3. F1-score: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {2 \gamma}{2 \gamma + \eta + b} \tag {D.7} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {2 \gamma + 2 q b}{2 \gamma + q b + \eta + q d + b}. \tag {D.8} +$$ + +F1-score increases if $\frac{2b}{b + d} >\frac{2\gamma}{2\gamma + \eta + b}$ + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {2 (1 - p) \gamma}{2 (1 - p) \gamma + (1 - p) \eta + b + p \gamma} = \frac {2 \gamma - 2 p \gamma}{2 \gamma + (1 - p) \eta + b - p \gamma}. \tag {D.9} +$$ + +F1-score decreases in missing label test. + +# 4. IoU: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{\left\| B \left(a _ {k}\right) \right\| _ {1} + \left\| B \left(c _ {t}\right) \right\| _ {1} - B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)} = \frac {\gamma}{\gamma + \eta + b}. \tag {D.10} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {\gamma + q b}{\gamma + \eta + q d + b}. \tag {D.11} +$$ + +IoU increases if $\frac{b}{d} >\frac{\gamma}{\gamma + \eta + b}$ + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {(1 - p) \gamma}{(1 - p) \gamma + (1 - p) \eta + b + p \gamma} = \frac {\gamma - p \gamma}{\gamma + (1 - p) \eta + b}. \tag {D.12} +$$ + +Thus, IoU decreases in missing label test. + +# 5. Accuracy: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right) + \left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{n} = \gamma + d. \tag {D.13} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \gamma + q b + d - q d. \tag {D.14} +$$ + +accuracy increases if $b > d$ . + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \gamma - p \gamma + d + p \eta . \tag {D.15} +$$ + +Accuracy increases if $\eta >\gamma$ + +# 6. Balanced Accuracy: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{2 \left\| B \left(a _ {k}\right) \right\| _ {1}} + \frac {\left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{2 \left\| \left(1 - B \left(a _ {k}\right)\right) \right\| _ {1}} = \frac {\gamma}{2 \gamma + 2 b} + \frac {d}{2 \eta + 2 d}. \tag {D.16} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {\gamma + q b}{2 \gamma + 2 b} + \frac {d - q d}{2 \eta + 2 d}. \tag {D.17} +$$ + +balanced accuracy increases if $\frac{b}{2\gamma + 2b} > \frac{d}{2\eta + 2d}$ . + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {\gamma - p \gamma}{2 \gamma + 2 b} + \frac {d + p \eta}{2 \eta + 2 d}. \tag {D.18} +$$ + +balanced accuracy increases if $\frac{\gamma}{2\gamma + 2b} < \frac{\eta}{2\eta + 2d}$ . + +# 7. Inverse Balanced Accuracy: + +$$ +s _ {M} \left(a _ {k}, c _ {t}\right) = \frac {B \left(a _ {k}\right) \cdot B \left(c _ {t}\right)}{2 \left\| B \left(c _ {t}\right) \right\| _ {1}} + \frac {\left(\mathbf {1} - B \left(a _ {k}\right)\right) \cdot \left(\mathbf {1} - B \left(c _ {t}\right)\right)}{2 \left\| \left(1 - B \left(c _ {t}\right)\right) \right\| _ {1}} = \frac {\gamma}{2 \gamma + 2 \eta} + \frac {d}{2 b + 2 d}. \tag {D.19} +$$ + +In extra label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {+}\right) = \frac {\gamma + q b}{2 \gamma + 2 \eta + 2 q b + 2 q d} + \frac {d - q d}{2 b + 2 d - 2 q d - 2 q b}. \tag {D.20} +$$ + +In missing label test: + +$$ +s _ {M} \left(a _ {k}, c _ {t} ^ {-}\right) = \frac {\gamma - p \gamma}{2 \gamma + 2 \eta - 2 p \gamma - 2 p \eta} + \frac {d + p \eta}{2 b + 2 d + 2 p \gamma + 2 p \eta}. \tag {D.21} +$$ + +
MetricMissing label: smak,ct-Extra label: smak,ct+
Recall1 - p1
Precision11/1+p
F1-score2-2p/2-p2/2+p
IoU1 - p1/1+p
Accuracy1 - pγ1 - γp
Balanced Accuracy1 - p/21 - pγ/2(1-γ)
Inverse Balanced Accuracy(1-γ)/2(1-γ)+2pγ + 1/22+p/2(1+p)
+ +# D.1. Special case - Theoretical Test + +In this section, we consider a special case where the neuron activations perfectly match the concept, i.e. $c \equiv a$ . In this case, we have $\eta = b = 0$ , $d = 1 - \gamma$ . Plugging in those variables, we get the equations for metric scores under sanity test settings in Table D.1. Further simplifying this by plugging in the $p$ values we typically use we get the simple form for score diff in Table D.2. + +Table D.1. The evaluation scores for different metrics under missing and extra label tests on an ideal neuron whose activations perfectly match the presence of our concept. + +
MetricMissing labels test(p=0.5): +sM(ak,ct) - sM(ak,ct)Extra labels test(p=1): +sM(ak,ct+) - sM(ak,ct)
Recall-0.50
Precision0-0.5
F1-score-1/3-1/3
IoU-0.5-0.5
Accuracy-γ/2-γ
Balanced Accuracy-0.25-γ/2(1-γ)
Inverse Balanced Accuracy-γ/2(2-γ)-0.25
+ +Table D.2. Further simplifying from Table D.1 by plugging in $p$ values we typically use in our tests, and $s_M(a_k, c_t) = 1$ , we can calculate the theoretical score diff after running our tests for different binary metrics on ideal neurons. + +# E. Ablations and Extra checks + +# E.1. Increase/decrease Fraction in Missing/Extra labels test + +In our standard missing labels we reduce the fraction of positive labels by half, i.e. + +$$ +r _ {-} = \frac {\left| \left| c _ {t} ^ {-} \right| \right| _ {1}}{\left| \left| c _ {t} \right| \right|} = 0. 5 +$$ + +$$ +r _ {+} = \frac {\left| \left| c _ {t} ^ {+} \right| \right| _ {1}}{\left| \left| c _ {t} \right| \right| _ {1}} = 2 +$$ + +In this section we run an ablation on the importance of these specific values by running the test on two other combinations of values: $r_{-} = 0.75$ and $r_{+} = 1.33$ (smaller change) and $r_{-} = 0.33$ and $r_{+} = 3$ (larger change). We report the results on final layer neurons (including superclasses) of ViT-B-16 (trained on ImageNet) in Table E.1. We used ground turth $c_{t}$ . Overall we can see that these parameters do not impact our qualitative observations, i.e. which metric passes vs which doesn't. While larger changes to $r$ typically increases Decrease Acc, it doesn't affect which metrics approach zero score diff vs which do not, which is what we're mostly interested in. Overall this shows our sanity test is not sensitive to the specific parameter choice but instead reflects overall trends of the metric. + +
Missing Labels TestExtra Labels Test
r- = 0.33r- = 0.5r- = 0.75r+ = 1.33r+ = 2.0r+ = 3.0
Recall99.55%95.94%75.34%0.00%0.00%0.00%
Precision48.20%46.09%49.62%99.32%99.62%99.62%
F1-score97.07%95.64%92.78%99.62%99.70%99.70%
IoU96.84%95.34%92.41%99.32%99.62%99.62%
Accuracy0.00%0.00%0.00%16.24%63.08%99.92%
Balanced Acc.99.47%95.86%75.19%9.17%23.98%63.61%
Inverse Balanced Acc.48.05%45.56%48.35%99.17%99.62%99.92%
AUC98.65%95.34%76.32%16.99%30.23%59.32%
Inverse AUC24.51%21.35%16.47%99.92%99.92%99.92%
Correlation99.92%99.92%99.77%99.92%99.92%99.92%
Correlation(T&R)99.40%98.12%90.68%43.76%44.96%48.12%
Spearman Correlation57.29%53.91%46.92%37.07%38.05%37.67%
Spearman Correlation(T&R)97.14%93.61%82.63%49.92%50.75%52.26%
Cosine100.00%100.00%99.85%99.85%99.85%99.85%
WPMI99.55%95.94%75.34%99.77%99.70%99.77%
MAD50.83%49.47%49.02%99.70%99.70%99.70%
AUPRC99.47%99.25%98.27%99.32%99.62%99.62%
Inverse AUPRC100.00%100.00%99.85%99.70%99.62%99.32%
+ +Table E.1. Ablation study on sanity checks varying the magnitude of change in labels. We can see overall our results are consistent and not heavily dependent on the choice of $r$ + +# E.2. Failure case of cosine: Adding a constant activation + +In this section we discuss a failure case of cosine similarity as an evaluation metric. The main idea is that cosine similarity outputs are not independent of the mean of the neuron's activation, while all other evaluation metrics are. This causes it to associate neurons with large average activation values with very generic concepts that are almost always active. As an example, we added a constant (1) to all activations of concept neurons in a Concept Bottleneck Model (Koh et al., 2020) trained on CUB200, and ran our meta-AUPRC test(Sec 5). All other evaluation metrics are invariant to this change, but the AUPRC of Cosine drops from $99.07\%$ to $0.93\%$ with this small change, as shown in Table E.2. We believe this is a flaw that points against using cosine similarity, as the average activation of a hidden layer neuron is not functionally important, and could be absorbed into biases of the next layer. Instead we recommend using Pearson correlation which is identical to cosine similarity after normalizing to mean 0, as we show in Section A.4. + +
CUB200 - CBM concept neurons
Originalakak' = ak + 1
MetricAUPRCAUPRCΔ AUPRC
Recall0.39580.39580.0000
Precision0.68030.68030.0000
F1-score/IoU0.63860.63860.0000
Accuracy0.58530.58530.0000
Balanced Acc.0.71650.71650.0000
Inverse Balanced Acc.0.66280.66280.0000
AUC0.70450.70450.0000
Inverse AUC0.89560.89560.0000
Correlation0.88830.88830.0000
Correlation(T&R)0.71700.71700.0000
Spearman Correlation0.42330.42330.0000
Spearman Correlation(T&R)0.42430.42430.0000
Cosine0.89850.0443-0.8542
WPMI0.73230.73230.0000
MAD0.77600.77600.0000
AUPRC0.67120.67120.0000
Inverse AUPRC0.39750.39750.0000
+ +Table E.2. Adding a constant to the activation values of all neurons causes the cosine similarity to perform very poorly, while other metrics are unchanged. + +# E.3. Random vs Semantic subsets + +Our missing/extra labels tests are a mathematical model of semantic sub/superclasses that can be run without knowledge of the semantics or relationships between concepts. To test this mathematical model, we conducted a version of extra labels test on the ImageNet dataset where instead of randomly sampling $c^+$ , we used the smallest superclass of the concept according to WordNet hierarchy as $c^+$ , and a version of missing labels test where we used the largest subclass of the concept as $c^-$ . As shown in new Table G.5, the results are essentially identical to using random sub/supersets, showcasing our random sub/superset is a good model of real semantic relationships for our purposes. + +ViT-B-16 superclass neurons +ViT-B-16 single class neurons + +
Missing Labels TestExtra Labels Test
MetricRandom SubsetsSemantic SubsetsRandom SupersetsSemantic Supersets
Recall96.32%92.89%0.00%0.00%
Precision44.21%43.68%100.00%99.79%
F1-score97.37%91.84%100.00%99.79%
IoU96.84%91.58%100.00%99.79%
Accuracy44.74%31.32%46.11%71.37%
Balanced Acc.99.47%97.37%0.00%64.53%
Inverse Balanced Acc.28.95%37.37%100.00%99.79%
AUC99.21%97.11%17.47%52.11%
Inverse AUC51.58%54.47%100.00%96.00%
Correlation100.00%100.00%100.00%99.58%
Correlation(T&R)100.00%99.21%47.47%70.11%
Spearman Correlation70.53%75.26%37.37%20.63%
Spearman Correlation(T&R)98.42%97.63%51.05%35.16%
Cosine100.00%100.00%100.00%99.58%
WPMI100.00%100.00%0.00%0.00%
MAD58.42%51.58%100.00%100.00%
AUPRC99.21%96.84%100.00%99.37%
Inverse AUPRC100.00%100.00%100.00%99.37%
+ +Table E.3. Comparison of $c_{t}^{-}$ derived as a random subclass of $c_{t}$ vs a real semantic subclass of $c_{t}$ derived from the WordNet hierarchy. The missing labels test was evaluated on all 400 superclass neurons created in the final layer, while the extra labels test was conducted on all 1000 individual class neurons. We can see that from the point of view of passing our tests the random subclass behaves almost exactly as a real semantic subclass. + +# E.4. Epsilon ablation + +In this section we study the effect of the choice of $\epsilon$ in Equation 10 on our experimental missing/extra labels test. Overall we can see in Table E.4 that while changing $\epsilon$ by changes results for some metrics, for the most part it does not affect which metrics pass or do not pass the test despite 2 orders of magnitude change in $\epsilon$ , showing our tests are not very sensitive to this choice. + +Prehaps more importantly, theoretically we do not think the $\epsilon$ choice is important. An alternative and perhaps more fundamental definition for our theoretical tests could be as follows: A metric passes the test if + +$$ +\exists \epsilon > 0 \mathrm {s . t .} \forall \gamma > 0, \Delta s < - \epsilon \tag {E.1} +$$ + +where $\Delta s$ is calculated with the theoretical missing labels test defined in Appendix C and $\gamma$ is the concept/neuron activation frequency. This definition is purely a mathematical property of the metric without any hyperparameters or ties to any setting, and as far as we know matches our theoretical test results of Table C.1 and Table C.2 that use a fixed $\epsilon = 0.001$ . + +The issue with this alternative definition is that, we can only prove a metric passes this version of the test if we have an analytical solution, which we have for binary classification metrics in Table D.2. This makes this definition hard to use in practice. We can see for example accuracy fails this test as $\lim_{\gamma \to 0} \Delta s = 0$ , so no matter what $\epsilon$ we choose, $\exists \gamma$ s.t. $\Delta s > -\epsilon$ . On the other hand, for F1-score will pass the theoretical tests for any $\epsilon < 1/3$ regardless of $\gamma$ . From this we can see that if we decrease $\epsilon$ in the current theoretical test, more metrics would pass, but the same metrics would fail again if we expand Table C.1/C.2 to the right by including smaller values, while current passing metrics would not fail regardless of how many additional $\gamma$ values we test. + +
Setting 1: ViT-B-16 Final Layer neurons
Missing Labels Test - Decrease AccExtra Labels Test - Decrease Acc
ε = 0.0001ε = 0.001ε = 0.01ε = 0.0001ε = 0.001ε = 0.01
Recall97.07%97.07%97.07%0.00%0.00%0.00%
Precision48.65%47.14%37.74%99.70%99.20%97.89%
F1-score96.48%95.79%93.38%99.77%99.70%98.72%
IoU96.69%95.41%92.48%99.70%99.62%97.89%
Accuracy66.09%0.00%0.00%99.92%61.50%6.32%
Balanced Acc.97.07%97.07%97.07%99.77%23.08%3.76%
Inverse Balanced Acc.51.95%46.54%31.35%99.92%99.62%96.77%
AUC96.17%95.86%95.19%84.81%29.25%11.58%
Inverse AUC78.35%21.43%3.68%99.92%99.92%99.92%
Correlation100.00%100.00%99.92%99.92%99.92%99.92%
Correlation(T&R)97.52%97.29%96.47%48.42%46.02%37.07%
Spearman Correlation63.68%53.91%5.94%48.87%37.07%1.28%
Spearman Correlation(T&R)93.91%93.76%92.56%51.73%50.90%44.36%
Cosine100.00%100.00%100.00%99.92%99.85%99.70%
WPMI97.07%97.07%97.07%99.77%99.70%99.55%
MAD52.78%50.75%26.32%99.70%99.70%99.70%
AUPRC99.77%99.40%97.59%99.70%99.62%97.89%
Inverse AUPRC100.00%100.00%100.00%99.62%99.62%99.62%
+ +Table E.4. An Ablation study on the effect of $\epsilon$ choice on our results. While the exact percentages vary, we can see that changing $\epsilon$ by orders of magnitude mostly does not change which metrics pass the tests, highlighting robustness to this hyperparameter choice. + +# E.5. Number of samples for $c_{t}^{\pm}$ + +Most of our results only use one sample of $c_t^{\pm}$ to reduce computational cost, even though our equations are defined in terms of its expectation. In Table E.5 we test whether using more samples of $c_t^{\pm}$ affects our results. As we can see, the number of samples has very little effect on our results likely because they are already averages over many neurons and large datasets. + +
Setting 1: ViT-B-16 Final Layer neurons
Missing Labels TestExtra Labels Test
ct±samples per neuron:13101001310100
Recall97.07%100.00%100.00%100.00%0.00%0.00%0.00%0.00%
Precision47.14%45.04%44.29%38.80%99.20%99.62%99.62%99.62%
F1-score95.79%96.77%97.29%97.74%99.70%99.70%99.70%99.70%
IoU95.41%96.02%96.62%97.22%99.62%99.62%99.62%99.62%
Accuracy0.00%0.00%0.00%0.00%61.50%61.88%64.66%66.54%
Balanced Acc.97.07%99.92%99.77%99.85%23.08%22.48%23.31%22.18%
Inverse Balanced Acc.46.54%43.83%42.41%34.44%99.62%99.62%99.62%99.62%
AUC95.86%99.25%99.70%99.77%29.25%26.84%27.59%28.35%
Inverse AUC21.43%19.17%16.32%14.21%99.92%99.92%99.92%99.92%
Correlation100.00%100.00%99.92%99.92%99.92%99.92%99.92%99.92%
Correlation(T&R)97.29%99.32%99.85%99.77%46.02%52.48%54.51%55.19%
Spearman Correlation53.91%54.14%54.59%55.64%37.07%34.96%35.86%35.04%
Spearman Correlation(T&R)93.76%96.39%97.67%98.65%50.90%57.97%51.95%53.83%
Cosine100.00%100.00%100.00%100.00%99.85%99.85%99.85%99.85%
WPMI97.07%100.00%100.00%100.00%99.70%99.77%99.77%99.85%
MAD50.75%48.95%49.40%39.17%99.70%99.70%99.70%99.70%
AUPRC99.40%99.32%99.32%99.32%99.62%99.62%99.62%99.62%
Inverse AUPRC100.00%100.00%100.00%100.00%99.62%99.62%99.62%99.62%
+ +Table E.5. A study measuring whether our test results are sensitive to sampling $c_t^{\pm}$ only once per neuron. We see this randomness has no effect on our results in terms of which metrics pass and do not pass the test, likely because the results are already averaged over hundreds or thousands of neurons. + +# E.6. Combination Metrics + +In addition to individual metrics we studied in the main paper, we also explore whether combinations of different metrics could serve as good evaluation metrics. This investigation is inspired by the success of F1-score, which is the harmonic mean of the Recall and Precision metrics. + +$$ +s _ {F 1} = \frac {2}{1 / s _ {\text {R e c a l l}} + 1 / s _ {\text {P r e c i s i o n}}} = \frac {2 s _ {\text {R e c a l l}} s _ {\text {P r e c i s i o n}}}{s _ {\text {R e c a l l}} + s _ {\text {P r e c i s i o n}}} \tag {E.2} +$$ + +In this section we investigated using the harmonic mean of other metrics as our metric. The missing and extra labels test results are reported in Tables E.6, E.7 and E.8. We can see multiple combinations perform well and now pass the theoretical missing/extra labels tests. In general, our initial results indicate that combining a metric that passes the extra labels test with a metric that passes the missing labels test will pass both tests most of the time. Conversely, combining two metrics that fail the same test, such as Recall and AUC will still fail that test. In table E.6, we also measure the AUPRC (Sec 5) performance of these new metrics on a subset of our settings, and show that many combination metrics are competitive with top standard metrics. In particular the harmonic mean of Balanced Acc and Inverse Balanced Acc performed well. Overall this shows the promise of using novel combinations of concepts, but a more throughout study is needed to confirm their reliability. + +
Theoretical Missing Labels Test, Decrease Acc
Activation Frequency γ:0.4990.10.010.0010.0001Pass
AUC + Inverse AUC100.00%100.00%100.00%100.00%100.00%✓
Balanced Acc + Inverse Balanced Acc100.00%100.00%100.00%100.00%100.00%✓
Recall + AUC100.00%100.00%100.00%100.00%100.00%✓
Recall + Inverse AUC100.00%100.00%100.00%100.00%100.00%✓
Precision + Balanced Acc100.00%100.00%100.00%100.00%100.00%✓
Precision + Inverse Balanced Acc100.00%100.00%100.00%0.00%0.00%×
F1-score100.00%100.00%100.00%100.00%100.00%✓
+ +Table E.6. Theoretical Missing Labels test on combination metrics. + +
Theoretical Extra Labels Test, Decrease Acc
Activation Frequency γ:0.4990.10.010.0010.0001Pass
AUC + Inverse AUC100.00%100.00%100.00%100.00%100.00%✓
Balanced Acc + Inverse Balanced Acc100.00%100.00%100.00%100.00%100.00%✓
Recall + AUC100.00%100.00%100.00%0.00%0.00%×
Recall + Inverse AUC100.00%100.00%100.00%100.00%100.00%✓
Precision + Balanced Acc100.00%100.00%100.00%100.00%100.00%✓
Precision + Inverse Balanced Acc100.00%100.00%100.00%100.00%100.00%✓
F1-score100.00%100.00%100.00%100.00%100.00%✓
+ +Table E.7. Theoretical Extra Labels Test for combination metrics. + +
Setting 1: ViT-B-16 final layer neuronSetting 2: Resnet-50 layer4 neurons
Missing Labels TestExtra Labels TestMissing Labels TestExtra Labels Test
Combination MetricDecrease accDecrease accDecrease accDecrease acc
AUC + Inverse AUC95.64%99.77%89.05%99.90%
Balanced Acc +99.85%99.92%90.75%100.00%
Inverse Balanced Acc
Recall + AUC96.99%19.77%100.00%17.32%
Recall + Inverse AUC96.92%99.92%100.00%87.00%
Precision + Balanced Acc91.80%99.70%64.39%100.00%
Precision +48.87%99.92%47.38%100.00%
Inverse Balanced Acc
F1-score95.86%99.70%100.00%100.00%
+ +Table E.8. Experimental Missing and Extra Labels Test with new combination metrics. + +
Setting 3: gt ctSetting 4: SigLIP ct
ViT-B-16(ImageNet)ViT-B-16(ImageNet)
New metrics:AUPRCRankAUPRCRank
AUC + Inverse AUC0.897730.655110
Balanced Acc + Inverse Balanced Acc0.888550.70413
Recall + AUC0.7081170.612915
Recall + Inverse AUC0.889240.007722
Precision + Balanced Acc0.867980.71412
Precision + Inverse Balanced Acc0.861090.646812
Old metrics:
Recall0.0832220.575817
Precision0.8592110.642813
F1-score/IoU0.875970.69925
Accuracy0.7858130.585316
Balanced Accuracy0.7463150.615814
Inverse Balanced Acc.0.861090.647411
AUC0.7139160.69337
Inverse AUC0.8120120.543918
Correlation0.939910.70274
Correlation(T&R)0.4365180.490619
Spearman Correlation0.0125230.004723
Spearman Correlation(T&R)0.1783200.239520
Cosine0.903720.69486
WPMI0.7570140.68818
MAD0.1866190.126821
AUPRC0.883960.75111
Inverse AUPRC0.1131210.66889
+ +Table E.9. Performance of new combination on the meta-AUPRC evaluation introduced in section 5. We can see some combination metrics such as Balanced Acc + Inverse Balanced Acc perform well. + +# F. Detailed results + +# F.1. Missing and Extra Labels Test: + +Experimental Setup Details: We evaluate our experimental results across 8 settings: + +- Setting 1: Dataset $\mathcal{D} =$ ImageNet, ViT-B-16 (Dosovitskiy et al., 2021) trained onImagenet, 1400 final layer neurons(and superclass neurons), Table F.1 +- Setting 2: Dataset $\mathcal{D} =$ ImageNet, ResNet-50 trained onImagenet, 2048 layer4 neurons, Table F.1 +- Setting 3: Dataset $\mathcal{D} =$ Places365, ResNet-18 trained on Places365, 365 final layer neurons, Table F.2 +- Setting 4: Dataset $\mathcal{D} =$ Places365, ResNet-18 trained on Places365, 512 layer4 neurons, Table F.2 +- Setting 5: Dataset $\mathcal{D} =$ CUB200, CBM trained on CUB200, 112 concept neurons, Table F.3 +- Setting 6: Dataset $\mathcal{D} =$ CUB200, CLIP ViT-B-32 image encoder, linear probe trained to detect CUB-concepts, 112 concepts, Table F.3 +- Setting 7: Dataset $\mathcal{D} =$ OpenWebText(subset), GPT-2-small, finalprediction) layer neurons corresponding to 500 most common tokens, Table F.4 +- Setting 8: Dataset $\mathcal{D} =$ OpenWebText(subset), GPT-2-XL, final(probiction) layer neurons corresponding to 500 most common tokens, Table F.4 + +For all settings we used the ground truth labels from the dataset as $c_t$ . The ImageNet (Deng et al., 2009), Places (Zhou et al., 2017) and GPT-2 (Radford et al., 2019) models were pretrained. For CUB-CBM we trained our own model using the code released by (Koh et al., 2020). Our CBM reached $96.75\%$ concept accuracy on the test set which is in line with their reported results. For CLIP, we used the pretrained model from (Radford et al., 2021), and then learned a linear probe on top of frozen image embeddings to minimize binary cross-entropy loss on the training split of CUB200(Wah et al., 2011), with early stopping using validation data. Our linear probe reached $89.76\%$ concept accuracy. The CUB dataset is a small bird species classification dataset that contains detailed annotations for lower level concepts, such as wing color. Following (Koh et al., 2020), we only used the 112 concepts that are present on at least $5\%$ of the inputs and our CLIP linear probe was trained to predict these concepts, not the final class of inputs. + +For the final layer neurons as well as CUB neurons we let "correct" concept $t_k$ be the ground truth concept for that neuron. We choose the hyperparameter $\alpha$ that maximizes AUPRC(Sec 5) performance on validation neurons, and run the tests on test neurons. For all evaluations we used neuron activations after the activation function (i.e. softmax/sigmoid). + +For the Language Model evaluations we used a subset of 204,800 tokens from OpenWebText (Gokaslan et al., 2019) as $\mathcal{D}$ . We evaluated final layer neurons that directly predict next-token, so their explanation was a specific token, which allowed us the extract ground truth $c_{t}$ directly from the text. We focused on the neurons predicting 500 most common tokens to reduce computational cost and to make sure we focus on concepts where there are enough positive labels available for statistical significance. + +For layer4(after avg pool) neurons we defined the "correct" concept $t_k$ as the concept that maximizes IoU with $\alpha = 0.005$ similar to (Bau et al., 2017), using the class(and superclass) labels of the dataset as $c_t$ . For these layers we fixed $\alpha = 0.005$ for all metrics as that was used to determine the "ground truth". + +Interestingly, we find that more methods pass the tests on the CUB dataset than the other datasets we looked at, but the trends in terms of which metrics perform worse are still similar. We believe this is caused by data imbalance, as the concepts in CUB are relatively balanced (following (Koh et al., 2020) we only keep concepts that are present on at least $5\%$ of the inputs), while for example ImageNet classes are much more imbalanced (each class is positive on $0.1\%$ of the inputs). This is confirmed by our theoretical observations in Section C, which show that poor metrics are much more likely to fail the test when the concepts are imbalanced. + +
Setting 1: ViT-B-16 final layer neuronsSetting 2: Resnet-50 layer4 neurons
Missing Labels TestExtra Labels TestMissing Labels TestExtra Labels Test
MetricDecrease AccDecrease AccDecrease AccDecrease Acc
Recall95.94%0.00%100.00%0.00%
Precision46.09%99.62%47.33%100.00%
F1-score95.64%99.70%100.00%100.00%
IoU95.34%99.62%100.00%100.00%
Accuracy0.00%63.08%0.00%71.07%
Balanced Acc.95.86%23.98%100.00%21.12%
Inverse Balanced Acc.45.56%99.62%46.35%100.00%
AUC95.34%30.23%87.41%49.02%
Inverse AUC21.35%99.92%46.61%100.00%
Correlation99.92%99.92%100.00%100.00%
Correlation(T&R)98.12%44.96%85.05%50.51%
Spearman Correlation53.91%38.05%56.89%38.08%
Spearman Correlation(T&R)93.61%50.75%67.47%48.72%
Cosine100.00%99.85%100.00%97.84%
WPMI95.94%99.70%86.64%100.00%
MAD49.47%99.70%46.30%100.00%
AUPRC99.25%99.62%99.23%100.00%
Inverse AUPRC100.00%99.62%98.05%98.05%
+ +Table F.1. Detailed results of Missing/Extra Labels test on Setting 1 and 2. + +
Setting 3: RN18(Places365) final layerSetting 4: RN18(Places365) layer4
Missing Labels TestExtra Labels TestMissing Labels TestExtra Labels Test
MetricDecrease AccDecrease AccDecrease AccDecrease Acc
Recall95.68%0.00%100.00%0.00%
Precision48.13%98.85%45.38%100.00%
F1-score56.77%98.85%99.79%100.00%
IoU56.77%98.85%99.79%100.00%
Accuracy0.00%100.00%0.00%100.00%
Balanced Acc.95.68%99.42%100.00%65.71%
Inverse Balanced Acc.44.67%98.85%45.17%100.00%
AUC99.14%59.37%87.89%51.33%
Inverse AUC41.50%100.00%50.31%100.00%
Correlation99.14%99.42%100.00%100.00%
Correlation(T&R)95.10%48.70%83.16%51.33%
Spearman Correlation60.23%37.46%64.07%44.76%
Spearman Correlation(T&R)89.91%51.59%70.43%50.51%
Cosine99.42%99.42%100.00%99.79%
WPMI95.68%0.00%91.17%100.00%
MAD46.97%99.71%45.38%100.00%
AUPRC84.44%97.98%97.13%100.00%
Inverse AUPRC100.00%99.71%99.18%100.00%
+ +Table F.2. Detailed results of Missing/Extra Labels test on Setting 3 and 4. + +
Setting 5: CUB200 CBM neuronsSetting 6: CUB200 Linear Probe
Missing Labels TestExtra Labels TestMissing Labels TestExtra Labels Test
MetricDecrease AccDecrease AccDecrease AccDecrease Acc
Recall100.00%0.00%100.00%0.00%
Precision38.32%100.00%43.93%100.00%
F1-score100.00%100.00%100.00%100.00%
IoU100.00%100.00%100.00%100.00%
Accuracy86.92%100.00%100.00%95.33%
Balanced Acc.100.00%100.00%100.00%100.00%
Inverse Balanced Acc.100.00%100.00%98.13%100.00%
AUC100.00%100.00%100.00%90.65%
Inverse AUC100.00%100.00%100.00%100.00%
Correlation100.00%100.00%100.00%100.00%
Correlation(T&R)99.07%93.46%98.13%94.39%
Spearman Correlation100.00%90.65%100.00%87.85%
Spearman Correlation(T&R)93.46%89.72%95.33%85.05%
Cosine100.00%100.00%100.00%97.20%
WPMI100.00%91.59%100.00%79.44%
MAD95.33%99.07%96.26%96.26%
AUPRC100.00%100.00%100.00%100.00%
Inverse AUPRC100.00%93.46%100.00%73.83%
+ +Table F.3. Detailed results of Missing/Extra Labels test on Setting 5 and 6. + +
Setting 7: GPT-2-small final layerSetting 8: GPT-2-XL final layer
Missing Labels TestExtra Labels TestMissing Labels TestExtra Labels Test
MetricDecrease AccDecrease AccDecrease AccDecrease Acc
Recall98.11%0.00%99.58%0.00%
Precision47.16%100.00%49.47%100.00%
F1-score99.37%100.00%97.89%100.00%
IoU99.16%100.00%97.89%100.00%
Accuracy1.47%16.63%1.89%16.84%
Balanced Acc.98.11%9.68%99.58%9.47%
Inverse Balanced Acc.45.47%100.00%48.84%99.16%
AUC93.89%43.79%96.00%49.05%
Inverse AUC34.11%100.00%28.63%100.00%
Correlation97.47%100.00%98.74%100.00%
Correlation(T&R)69.26%48.00%74.74%50.74%
Spearman Correlation38.53%26.95%38.74%29.89%
Spearman Correlation(T&R)65.05%52.21%65.05%49.89%
Cosine97.47%100.00%98.74%100.00%
WPMI98.11%0.00%99.58%0.00%
MAD49.68%100.00%49.05%100.00%
AUPRC91.16%98.32%93.68%99.79%
Inverse AUPRC97.68%100.00%98.32%100.00%
+ +Table F.4. Detailed results of Missing/Extra Labels test on Setting 7 and 8. + +# F.2. Meta-AUPRC evaluation: + +Experimental Setup Details: We evaluate our meta-AUPRC test described in Section 5 on 10 different settings: + +- Setting 1: Dataset $\mathcal{D} =$ ImageNet, ViT-B-16(ImageNet), 1000 final layer neurons, ground truth $c_{t}$ +- Setting 2: Dataset $\mathcal{D} =$ ImageNet, ViT-B-16(ImageNet), 1000 final layer neurons, SigLIP $c_{t}$ +- Setting 3: Dataset $\mathcal{D} =$ ImageNet, ViT-B-16(ImageNet), 1400 final layer neurons+superclass neurons, ground truth $c_{t}$ +- Setting 4: Dataset $\mathcal{D} =$ ImageNet, ViT-B-16(ImageNet), 1400 final layer neurons+superclass neurons, SigLIP $c_{t}$ +- Setting 5: Dataset $\mathcal{D} =$ Places365, ResNet-18(Places365), 365 final layer neurons, ground truth $c_{t}$ +- Setting 6: Dataset $\mathcal{D} =$ Places365, ResNet-18(Places365), 365 final layer neurons, SigLIP $c_{t}$ +- Setting 7: Dataset $\mathcal{D} =$ CUB200, CBM trained on CUB200, 112 concept neurons, ground truth $c_{t}$ +- Setting 8: Dataset $\mathcal{D} =$ CUB200, CLIP ViT-B-32 image encoder, linear probe trained to detect 112 CUB-concepts, ground truth $c_{t}$ +- Setting 9: Dataset $\mathcal{D} =$ OpenWebText(subset), GPT-2-small, final(probiction) layer neurons corresponding to 500 most common tokens. +- Setting 10: Dataset $\mathcal{D} =$ OpenWebText(subset), GPT-2-XL, final(prediction) layer neurons corresponding to 500 most common tokens. + +SigLIP $c_{t}$ indicates we used Pseudo-labels generated from SigLIP (ViT-SO400M-14-SigLIP-384) (Zhai et al., 2023) as done by (Oikarinen & Weng, 2024). For all metrics and evaluations we choose hyperparameters such as $\alpha$ by finding the one with best performance on validation neurons (random subset of $5\%$ of the neurons), and use those hyperparameters to evaluate on test neurons. + +Tables F.5, F.6 and F.7 show the detailed results of our AUPRC evaluation experiment. While there is some differences on which metrics perform well on different setups, the overall trends are quite consistent, with Correlation and Cosine outperforming others on almost all settings, and AUPRC being the third best. Spearman Correlation also consistently performed the worst. + +
Setting 1: gt ctSetting 2: SigLIP ctSetting 3: gt ctSetting 4: SigLIP ct
originalK and CoriginalK and Coriginal+superclassK and Coriginal+superclassK and C
MetricAUPRCRankAUPRCRankAUPRCRankAUPRCRank
Recall0.998960.8638120.0832160.575812
Precision0.998960.964060.859260.64289
F1-score/IoU0.998960.947770.875940.69923
Accuracy0.998960.8497130.785880.585311
Balanced Acc.0.998960.9032110.7463100.615810
Inverse Balanced Acc.0.998960.966450.861050.64748
AUC0.9974140.943880.7139110.69335
Inverse AUC0.9415150.8452140.812070.543913
Correlation0.999820.973920.939910.70272
Correlation(T&R)0.999350.7257150.4365120.490614
Spearman Correlation0.0023170.0213170.0125170.004717
Spearman Correlation(T&R)0.6533160.4100160.1783140.239515
Cosine0.999820.973330.903720.69484
WPMI0.998960.921190.757090.68816
MAD0.999440.971640.1866130.126816
AUPRC0.998960.986610.883930.75111
Inverse AUPRC0.999910.9203100.1131150.66887
+ +Table F.5. Meta-AUPRC evaluation results on ImageNet Settings(1-4). + +
Setting 5: gt ctSetting 6: SigLIP ctSetting 7: gt ctSetting 8: gt ct
Resnet-18(Places)Resnet-18(Places)CBM(CUB200)Linear Probe(CUB200)
MetricAUPRCRankAUPRCRankAUPRCRankAUPRCRank
Recall0.9639120.762390.3958170.107817
Precision0.964060.777180.680390.209512
F1-score/IoU0.964060.791660.6386120.27927
Accuracy0.964060.6490140.5853130.223910
Balanced Acc.0.964060.7340110.716570.31864
Inverse Balanced Acc.0.964060.781370.6628110.26088
AUC0.9418140.7205120.704580.203114
Inverse AUC0.8927150.6877130.895620.37453
Correlation0.969310.832620.888330.46831
Correlation(T&R)0.966240.5326150.717060.29766
Spearman Correlation0.0213170.1214170.4233150.218511
Spearman Correlation(T&R)0.7424160.4005160.4243140.160715
Cosine0.969310.830440.898510.40672
WPMI0.965550.7539100.732350.208913
MAD0.9590130.832130.776040.24329
AUPRC0.964060.866910.6712100.29815
Inverse AUPRC0.967830.800650.3975160.130216
+ +Table F.6. Meta-AUPRC evaluation results on Places and CUB models Settings(5-8). + +
Setting 9: gt ctSetting 10: gt ct
GPT2-smallGPT2-XL
MetricAUPRCRankAUPRCRank
Recall0.975460.99516
Precision0.965580.97809
F1-score/IoU0.956990.98757
Accuracy0.7395130.833414
Balanced Acc.0.984240.99734
Inverse Balanced Acc.0.965870.97828
AUC0.8139120.919412
Inverse AUC0.7282140.848113
Correlation0.991810.99861
Correlation(T&R)0.6705150.769515
Spearman Correlation0.0137170.014217
Spearman Correlation(T&R)0.0917160.116816
Cosine0.991220.99852
WPMI0.977350.99585
MAD0.9014110.955711
AUPRC0.988030.99516
Inverse AUPRC0.9314100.97809
+ +Table F.7. Meta-AUPRC evaluation results on Language Models Settings(9-10). \ No newline at end of file diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/images.zip b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e6b60179fa5f28ae19ff498ce3ef8f6b73b1dc47 --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4624a8d173dda2f1505ca9027a2f38ab7ab6bb33d2d9a1fa1661af1810495f0 +size 3743040 diff --git a/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/layout.json b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..03610cb236cf005307a9ee76fd83a0a7c131f0b8 --- /dev/null +++ b/ICML/2025/Evaluating Neuron Explanations_ A Unified Framework with Sanity Checks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45c19a725547d4dcf11392c5697cb80dd59ccbccd3ea4ffe7345ac8c5ee99765 +size 1307355 diff --git a/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_content_list.json b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2b1cfc737b91c5eddba8a35aac23f734274e5c87 --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a6cd2d57dd64ef2b0d259613f48023598d1931492c3f53120083f3df73bf071 +size 229572 diff --git a/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_model.json b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..82fc9067d2e1779b7b2e95dbb878eb5a6df20910 --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3678200a03945db36f1389544b9aaf12570e90a73dd8e0f12a59d148bb689df3 +size 245600 diff --git a/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_origin.pdf b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..09ffb2769f8543acbb49687efe7651e173a52481 --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/1895645a-2739-44eb-9672-ff04a136f63e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbac14f43eaecf2903c59da2eedf248d8f319d60f1c49e2a4e0b658fe2ea922c +size 16193304 diff --git a/ICML/2025/Event-Customized Image Generation/full.md b/ICML/2025/Event-Customized Image Generation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cd30fe47006c0b0b61840775624351e799a8df7a --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/full.md @@ -0,0 +1,1291 @@ +# Event-Customized Image Generation + +# Zhen Wang1 Yilei Jiang1 Dong Zheng1 Jun Xiao1 Long Chen2 + +![](images/f7c4df0e8176682062104a4a5bd9a1d54a7cd9fe794ff5e4f5a2de68c2526828.jpg) +(a) The subject customization + +![](images/f67967d7a181f6d343a938474c5f0611e0b697656b882094eee8196d2e811673.jpg) +(b) The action and interaction customization + +![](images/a7030c2161d4a88f313ef3a7cccc03307a12c0d45491a0a8ad2fcf6ac52bd7c3.jpg) +(c) The event customization +Figure 1: Customized Image Generation. (a) Generating customized images with given subjects in new contexts. (b) Generating customized images with co-existing basic action or interaction in given images. (c) Generating customized images for complex events with various target entities. Different colors and numbers show associations between reference entities and corresponding target prompts. + +# Abstract + +Customized image generation has raised significant attention due to its creativity and novelty. With impressive progress achieved in subject customization, some pioneer works further explored the customization of action and interaction beyond entity (e.g., human and object) appearance. However, these approaches only focus on basic actions and interactions between two entities, and their effects are limited by insufficient "exactly same" reference images. To extend the customiza + +tion to more complex scenes, we propose a new task: event-customized image generation. Given a single reference image, we define the "event" as all specific actions, poses, relations, or interactions between different entities in the scene. This task aims at accurately capturing the complex event and generating customized images with various target entities. To solve this task, we proposed a novel training-free method: FreeEvent. Specifically, FreeEvent introduces two extra paths alongside the general diffusion denoising process: 1) Entity switching path: it applies cross-attention guidance and regulation for target entity generation. 2) Event transferring path: it injects the spatial feature and self-attention maps from the reference image to the target image for event generation. We further collected two new evaluation benchmarks. Extensive experiments have demonstrated the effectiveness of FreeEvent. + +# 1. Introduction + +Recently, large-scale pre-trained diffusion models (Dhariwal & Nichol, 2021; Nichol et al., 2022; Ramesh et al., 2022; Rombach et al., 2022; Sahara et al., 2022) have demonstrated remarkable success in generating diverse and photorealistic images from text prompts. Leveraging these unparalleled creative capabilities, a novel application — customized image generation (Gal et al., 2023a; Ruiz et al., 2023; Chen et al., 2024a) — has gained increasing attention for generating user-specified concepts. Significant progress has already been made in subject-customized image generation (Ye et al., 2023; Chen et al., 2024c). As shown in Figure 1(a), given a set of user-provided subject images, existing methods can accurately capture the unique appearance features of each subject (e.g., corgi) with a special identifier token, enabling creative rendering in new and diverse scenarios. Moreover, they can seamlessly integrate multiple subjects into cohesive compositions, preserving distinctive characteristics while adapting them to novel contexts. + +Beyond the appearance of different entities (i.e., humans, animals, and objects) in the images, pioneering approaches have been developed to customize the user-specified actions (Huang et al., 2024a), interactive relations (Huang et al., 2024b) and poses (Jia et al., 2024) between the entities. As shown in Figure 1(b), these methods attempt to capture the single-entity action (e.g., handstand) or interactions (e.g., back to back) between two entities that co-exist in the given reference images and transfer them to the synthesis of action- or interaction-specific images with new entities. + +However, for real-world scenes that typically involve multiple entities with more complex interactions (e.g., Figure 1(c), row 3: three humans are discussing in front of a computer with different poses), these works (Huang et al., 2024b;a; Jia et al., 2024) still face notable limitations. 1) Simplified Customization. Current action customization (Huang et al., 2024a) focuses solely on the basic actions of a single person. Similarly, interaction customizations (Huang et al., 2024b; Jia et al., 2024) are limited to basic interactive relations or poses between just two entities. There is a lack of exploration into more complex and diverse actions or interactions that involve multiple humans, animals, and objects. Additionally, while these methods typically perform well when generating images with the same type of entity (e.g., all monkeys or all cats), they struggle when faced with more diverse and complex entities and their combinations. These narrow focuses and limitation on entity generation have strictly limited their abilities to customize more complex and diverse scenes with creative content. 2) Insufficient Data. To capture specific actions or interactions, existing methods (Huang et al., + +2024b;a; Jia et al., 2024) tend to represent them by learning corresponding identifier tokens, which can be further used for generating new images. However, for each action, or interaction, these training-based processes typically require a set of reference images (e.g., 10 images) paired with corresponding textual descriptions across different entities. Unfortunately, each action or interaction is highly unique and distinctive, i.e., gathering images that depict the exact same action or interaction is challenging. As shown in Figure 1(b), there are still significant differences in the same action (e.g., handstand) between different reference images, which thus compromises the accuracy of learned tokens, leading to inconsistencies in action between generated images. This insufficient data issue for identical action or interaction has severely limited the practicality and generalizability of these methods. + +To address these limitations and extend customized image generation to more complex scenes, we propose a new and meaningful task: event-customized image generation. Given a single reference image, we define the "event" as all actions and poses of each single entity, and their relations and interactions between different entities. As shown in Figure 1(c), event customization aims to accurately capture the complex and diverse event from the reference image to generate target images with various combinations of target entities. Since it only needs one single reference image, the event customization also eliminates the need for collecting "exactly same" reference images. + +To solve this challenging task, we proposed a novel training-free event customization method, denoted as FreeEvent. Based on the two main components of the reference image, i.e., entity and event, FreeEvent decomposes the event customization into two parts: 1) Switching the entities in the reference image to target entities. 2) Transferring the event from the reference image to the target image. Following this idea, alongside the general denoising process of diffusion generation, we designed two extra paths: entity switching path and event transferring path. Specifically, entity switching path guides the localized layout of each target entity for entity generation. Event transferring path further extracts the event information from the reference image and then injects it into the denoising process to generate the specific event. Through this direct guidance and injection, FreeEvent offers a significant advantage over existing methods by eliminating the need for time-consuming training. Furthermore, as shown in Figure 1(c), FreeEvent can also serve as a plug-and-play framework to combine with subject customization methods, generating creative images with both user-specified events and subjects. + +Moreover, as a pioneering effort in this direction, we also collected two evaluation benchmarks from the existing dataset (i.e., SWiG (Pratt et al., 2020) and HICO-DET (Chao + +et al., 2015)) and the internet for event-customized image generation, dubbed SWiG-Event and Real-Event, respectively. Both benchmarks include reference images featuring diverse events and entities, along with manually crafted target prompts. Extensive experiments demonstrate that our approach achieves state-of-the-art performance, enabling more complex and creative customization with enhanced practicality and generalizability. + +In summary, we make several contributions in this paper: 1) We propose the novel event-customized image generation task, which extends customized image generation to more complex scenes in real-world applications. 2) We propose FreeEvent, the first training-free method for event customization, which can be further combined with subject customization methods for more creative and generalizable customizations. 3) We collect two evaluation benchmarks for event-customized image generation, and FreeEvent achieves outstanding performance compared with existing methods. + +# 2. Related Work + +Text-to-Image Diffusion Generation. Diffusion models (Ho et al., 2020; Nichol & Dhariwal, 2021; Song et al., 2021) have emerged as a leading approach for image synthesis. The text-to-image diffusion models (Nichol et al., 2022; Ramesh et al., 2022; Sahara et al., 2022) further inject user-provided text descriptions into the diffusion process via pre-trained text encoders. After trained on large-scale text-image pairs, they have shown great success in text-to-image generation. Different from these models that operate the diffusion process on pixel space, the latent diffusion models (LDMs) (Rombach et al., 2022) propose to perform it on latent space with enhanced computational efficiency. Besides, existing works (Hertz et al., 2023; Tumanyan et al., 2023; Cao et al., 2023; Alaluf et al., 2024) have discovered the spatial feature and attention maps in LDMs contain localized semantic information of the image and the layout correspondence between textual conditions. As a result, these features and attention maps have been utilized to control the layout, structure, and appearance in text-to-image generation. This can be achieved either through a plug-and-play feature injection (Tumanyan et al., 2023; Xu et al., 2024; Lin et al., 2024) or by computing specific diffusion guidance (Epstein et al., 2023; Mo et al., 2024) for generation. In this paper, we utilize the pre-trained LDM Stable Diffusion (Rombach et al., 2022) as our base model. + +Subject Customization. This task aims to generate customized images of user-specified subjects. Current mainstream subject customization works mainly focus on 1) Single subject customization, including learning specific identifier tokens (Gal et al., 2023a), finetuning the text-to-image diffusion model (Ruiz et al., 2023; 2024), introducing layer-wise learnable embeddings (Voynov et al., 2023) + +and training large-scale multimodal encoders (Gal et al., 2023b; Li et al., 2024). 2) Multi-subject composition, including cross-attention modification (Tewel et al., 2023), constrained model fine-tuning (Kumari et al., 2023), layout guidance (Liu et al., 2023), and gradient fusion of each subject (Gu et al., 2024). In conclusion, these works are tailored to capture the appearance of the entities in the image, without considering the customization of actions or poses. + +Action and Interaction Customization. They aim to generate customized images with co-existing actions or interactions in user-provided reference images. ReVersion (Huang et al., 2024b) first proposes to customize specific interactive relations by optimizing the learnable relation tokens. ADI (Huang et al., 2024a) makes progress in customizing specific actions for a single subject. And a following work (Jia et al., 2024) further extends it to learning interactive poses between two individuals. However, all these works only focus on simplified customization of some basic actions and interactions, and their effect is strictly limited by the insufficient data of reference images. In contrast, our proposed event customization only requires one reference image, and our training-free framework can achieve effective customization of complex events with various creative target entities. + +# 3. Methods + +# 3.1. Preliminary + +Latent Diffusion Model (LDM). Generally, LDMs include a pretrained autoencoder and a denoising network. Given an image $x$ , the encoder $\mathcal{E}$ maps the image into the latent code $z_0 = \mathcal{E}(x)$ , where the forward process is applied to sample Gaussian noise $\epsilon \sim \mathcal{N}(0, \mathbf{I})$ to it to obtain $z_t = \sqrt{\bar{\alpha}_t} z_0 + \sqrt{1 - \bar{\alpha}_t} \epsilon$ from time step $t \sim [1, T]$ with a predefined noise schedule $\bar{\alpha}$ . While the backward process iteratively removes the added noise on $z_t$ to obtain $z_0$ , and decodes it back to image with the decoder $x = \mathcal{D}(z_0)$ . Specifically, the diffusion model is trained by predicting the added noise $\epsilon$ conditioned on time step $t$ and possible conditions like text prompt P. The training objective is formulated as: + +$$ +\mathcal {L} _ {\mathrm {L D M}} = \mathbb {E} _ {z \sim \mathcal {E} (x), P, \epsilon \sim \mathcal {N} (0, 1), t} \left[ \| \epsilon - \epsilon_ {\theta} \left(z _ {t}; t, P\right) \| _ {2} ^ {2} \right]. \tag {1} +$$ + +where $\epsilon_{\theta}$ is the denoising network. + +Diffusion Guidance. The diffusion guidance modifies the sampling process (Ho et al., 2020) with additional score functions to guide it with more specific controls like object layout (Xie et al., 2023; Mo et al., 2024) and attributes (Epstein et al., 2023; Bansal et al., 2023). We express it as + +$$ +\hat {\epsilon} _ {t} = \epsilon_ {\theta} \left(z _ {t}; t, P\right) - s \cdot \mathbf {g} \left(z _ {t}; t, P\right), \tag {2} +$$ + +where $\mathbf{g}$ is the energy function and $s$ is a parameter that controls the guidance strength. + +![](images/e57e9a398cf1b74eff47193601b6a66cbfb91aea56f0990aa1478aebfb9538b7.jpg) +Figure 2: The overview of pipeline. Given the reference image, the event customization is overall a general diffusion denoising process with two extra paths. 1) The entity switching path guides the generation of each target entity through cross-attention guidance and regulation 2) The event transferring path injects the spatial features and self-attention maps from the reference image to the denoising process. The final $z_0^G$ is then transformed back to target image $I^G$ by the decoder. + +# 3.2. Task Definition: Event-customized Generation + +In this section, we first formally define the event-customized image generation task. Given a reference image $I^{R}$ involves $N$ reference entities $\mathrm{E}^{R} = \{R_{1},\dots,R_{N}\}$ , we define the "event" as the specific actions and poses of each single reference entity, and the relations and interactions between different reference entities. Together we have the entity masks $\mathrm{M} = \{m_1,\dots,m_N\}$ , where $m_{i}$ is the mask of its corresponding entity $R_{i}$ . The event-customized image generation task aims to capture the reference event, and further generate a target image $I^{G}$ under the same event but with diverse and novel target entities $\mathrm{E}^{G} = \{G_{1},\dots,G_{N}\}$ in the target prompt $\mathrm{P} = \{w_{0},\dots,w_{N}\}$ , where $w_{i}$ is the description of the target entity $G_{i}$ , and each target entity $G_{i}$ should keep the same action or pose with its corresponding reference entity $R_{i}$ . As the example shown in Figure 2, given the reference image with four reference entities (e.g., three people and one object), the event-customization aims to capture the complex reference event and generate the target image with a novel combination of different target entities (e.g., skeleton, statue, monkey, book). + +# 3.3. Approach + +Overview. We now introduce the proposed training-free event customization framework FreeEvent. Specifically, we decompose the event-customized image generation into two parts, 1) generating target entities (i.e., switching each reference entity to target entity), and 2) generating the same reference event (i.e., transferring the event from the reference image to the target image). Following this idea, we design two extra paths for the diffusion denoising process + +of event customization, denoted as the entity switching path and the event transferring path, respectively. Generally, as shown in Figure 2, the generation of $I^{G}$ starts by randomly initializing the latent $z_{T}^{G} \sim \mathcal{N}(0,\mathbf{I})$ , and iteratively denoise it to $z_0^G$ . During this denoising process, the entity switching path guides the generation of each target entity through cross-attention guidance and regulation based on the target prompt P and reference entity masks M. The event transferring path extracts the spatial features and self-attention maps from the reference image $I^{R}$ , and then injects them to the denoising process. The final $z_0^G$ is then transformed back to the target image $I^{G}$ by the decoder. + +U-Net Architecture The Stable Diffusion (Rombach et al., 2022) utilizes the U-Net architecture (Ronneberger et al., 2015) for $\epsilon_{\theta}$ , which contains an encoder and a decoder, where each consists of several basic encoder/decoder blocks, and each encoder/decoder block further contains several encoder/decoder layers. Specifically, as shown in Figure 3(a), each U-Net encoder/decoder layer consists of a residual module, a self-attention module, and a cross-attention module. For block $b$ , layer $l$ , and timestep $t$ , the residual module produces the spatial feature of the image as $\mathbf{f}$ . The self-attention module produces the self-attention map as $\mathbf{SA} = \mathrm{Softmax}(\frac{\mathbf{Q}_s\mathbf{K}_s^{\mathrm{T}}}{\sqrt{d}})$ , where $\mathbf{Q}_s$ and $\mathbf{K}_s$ are query and key features projected from the visual features. For text-to-image generation, the cross-attention module further produces the cross-attention map between the text prompt P and the image as $\mathbf{CA} = \mathrm{Softmax}(\frac{\mathbf{Q}_c\mathbf{K}_c^{\mathrm{T}}}{\sqrt{d}})$ , where $\mathbf{Q}_c$ is the query features projected from the visual features, and $\mathbf{K}_c$ is the key features projected from the textual embedding of P. + +![](images/54717c1247bf3911f88e678c773e2b079a9b4aa99bc206a592b092a33592cf5a.jpg) +(a) U-Net Layer + +![](images/d2a6e7f078b4261784d2c12192b325d63b4b7f8700554f1d9a343b1b85c4c2df.jpg) + +![](images/6013e6e2077e951f327879a8ef3b5254174f090102e0019197334d8aaf1bd4c3.jpg) +(c) Event Transferring +(b) Entity Switching +Figure 3: (a) The architecture of the U-Net layer. (b) The process of cross-attention guidance and regulation. (c) The process of spatial feature and self-attention injection. + +Entity Switching Path. This path aims on generating target entities $\mathrm{E}^G = \{G_1, \dots, G_N\}$ in $I^G$ by switching each refenrecce entity $R_i$ to $G_i$ based on the target prompt P and reference entity masks M. And the key is to ensure each target entity $G_i$ is generated at the same location as their corresponding reference entity $R_i$ and avoid the appearance leakage between different entities. Inspired by prior works (Hertz et al., 2023; Chen et al., 2024b) that utilize the cross-attention maps to control the layout of text-to-image generation, we apply the cross-attention guidance and regulation to achieve the entity switching. + +As shown in Figure 2(a), at the timestep $t$ of the denoising process, we first obtain the latent for entity switching as $z_{t}^{A} = z_{t}^{G}$ , we then input $z_{t}^{A}$ together with the target prompt $\mathbf{P}$ into the U-Net, and calculate the cross-attention maps as $\mathbf{CA}^{A}$ . Then, we introduce an energy function to bias the cross-attention of each token $w_{i}$ as (cf., Figure 3(b)): + +$$ +\mathbf {g} \left(\mathrm {C A} _ {i} ^ {A}, m _ {i}\right) = \left(1 - \frac {\mathrm {C A} _ {i} ^ {A} * m _ {i}}{\mathrm {C A} _ {i} ^ {A}}\right) ^ {2} \tag {3} +$$ + +where $\mathrm{CA}_i^A$ is the cross-attention map of token $w_{i}$ . Optimizing this function encourages the cross-attention maps of each target entity $G_{i}$ to obtain higher values inside the corresponding area specified by $m_{i}$ , which further guides the localized layout of each target entity. We calculate the gradient of this guidance via backpropagation to update + +latent $z_{t}^{G}$ : + +$$ +z _ {t} ^ {G} = z _ {t} ^ {A} - \sigma_ {t} ^ {2} \eta \nabla_ {z _ {t} ^ {A}} \sum_ {i \in N} \mathbf {g} \left(\mathrm {C A} _ {i} ^ {A}, m _ {i}\right) \tag {4} +$$ + +where $\eta$ is the guidance scale and $\sigma_{t} = \sqrt{(1 - \bar{\alpha}_{t} / \bar{\alpha}_{t})}$ . Additionally, to avoid the appearance leakage between each target entity, we further regulate the cross-attention map of each token within its corresponding area. Specifically, for cross-attention maps $\mathbf{CA}^{G}$ calculated at timestep $t$ during the denoising process, we have: + +$$ +\mathrm {C A} _ {i} ^ {G} = m _ {i} \odot \mathrm {C A} _ {i} ^ {G} \tag {5} +$$ + +where $\mathrm{CA}_i^G$ is the cross-attention map of token $w_{i}$ + +Event Transferring Path. This path aims to extract the specific reference event from the reference image $I^{R}$ , including the action, pose, relation, or interactions between each reference entity, and transferring them to the target image $I^{G}$ . Meanwhile, from the perspective of image spatial information, the event is essentially the structural, semantic layout, and shape details of the image. Thus, based on the observation that the spatial features and self-attention maps can be utilized to control the image layout and structure (Tumanyan et al., 2023; Xu et al., 2024; Lin et al., 2024), we perform spatial feature and self-attention map injection to achieve the event transferring. + +Specifically, as shown in Figure 2(b) we first get the latent code of the reference image $z_0^R = \mathcal{E}(I^R)$ , and at each time step $t$ during the denoising process, we obtain $z_t^R$ via the diffusion forward process. We then input $z_t^R$ into the U-Net to extract the spatial features and self-attention maps of the reference image as $\mathbf{f}^R$ and $\mathbf{SA}^R$ . Parallely, for the denoising process, we input $z_t^G$ together with the target prompt $\mathrm{P}$ into the U-Net, and calculate the spatial features and self-attention maps for the generated image as: $\mathbf{f}^G$ and $\mathbf{SA}^G$ . Then, as shown in Figure 3(c), we perform the injection by directly replacing corresponding spatial features and self-attention maps: + +$$ +\mathbf {f} ^ {G} \leftarrow \mathbf {f} ^ {R} \quad \text {a n d} \quad \mathbf {S A} ^ {G} \leftarrow \mathbf {S A} ^ {R}. \tag {6} +$$ + +Highlights. By applying cross-attention guidance and regulation on each text token, our attention-guided entity switching can also be used to generate target entities of user-specified subjects, i.e., represented by specific identifier tokens. Thus, our framework can be easily combined with subject customization methods to generate creative images with both customized events and subjects. + +# 4. Experiments + +# 4.1. Experimental Setup + +Evaluation Benchmarks. In order to provide sufficient and suitable conditions for both quantitative and qualitative + +
ModelImage RetrievalVerb DetectionImage SimilarityCLIP-T↑FID↓
R@1↑R@5↑R@10↑T-1↑T-5↑T-10↑CLIP-I↑DreamSim↑DINO↑
ControlNet10.6426.1236.8210.6623.9831.280.60090.37140.25990.219870.45
MIGC10.9027.0037.6410.6226.1435.040.64560.37720.24670.214549.81
BoxDiff8.6022.4832.085.5814.5219.420.58380.31350.20990.215368.49
FreeEvent41.1263.0272.7434.1062.0471.820.70440.62820.51160.223829.05
+ +Table 1: Performance of our model and state-of-art conditional text-to-image generation models on SWiG-Event. For image retrieval, the R@k represents that among the top-k images with the highest similarity to the target image, its corresponding reference image is included. For verb detection, the T-K represents the top-k detection accuracy. + +comparisons on this new task, we collect two new benchmarks1. 1) For quantitative evaluation, we present SWiG-Event, a benchmark derived from SWiG (Pratt et al., 2020) dataset, which comprises 5,000 samples with various events and entities, i.e., 50 kinds of different actions, poses, and interactions, where each kind of event has 100 reference images, and each reference image contains 1 to 4 entities with labeled bounding boxes and nouns. 2) For qualitative evaluation, we present Real-Event, which comprises 30 high-quality reference images from HICO-DET (Chao et al., 2015) and the internet with a wide range of events and entities (e.g., animal, human, object, and their combinations). We further employ Grounded-SAM (Kirillov et al., 2023; Ren et al., 2024) to extract the mask of each entity. + +Baselines. We compared several kinds of SOTA baselines. For conditioned text-to-image generation baselines, we compared with training-based method ControlNet (Zhang et al., 2023), MIGC (Zhou et al., 2024), and training-free method BoxDiff (Xie et al., 2023). For localized editing baselines, we compared with training-free methods PnP (Tumanyan et al., 2023) and MAG-Edit (Mao et al., 2024). For customization baselines, we compared with training-based methods Dreambooth (Ruiz et al., 2023) and ReVersion (Huang et al., 2024b). + +Implementation Details. We use Stable Diffusion v2-1-base as base model for all methods. Images are generated with a resolution of 512x512 on a NVIDIA A100 GPU1. + +# 4.2. Quantitative Comparisons + +We compare FreeEvent with state-of-the-art conditional text-to-image generation baselines ControlNet (Zhang et al., 2023), MIGC (Zhou et al., 2024), and BoxDiff (Xie et al., 2023) on the SWiG-Event. + +Setting. Each reference image in SWiG-Event contains reference entities together with labeled event class, bounding boxes, nouns, and their corresponding masks. Specifically, we construct the target prompt as a list of reference entity nouns, i.e., we ask all the methods to reproduce the event of the reference image with the same reference event and same + +reference entities. Additionally, ControlNet takes the semantic map merged from the masks as the layout condition. MIGC and BoxDiff take the bounding boxes with labeled entity nouns as the layout condition1. + +Evaluation. Our evaluations follow the principle of whether generated images are aligned or similar with their reference images, and we apply multiple metrics to evaluate the customization quality of 5,000 target images from different perspectives. 1) Global image similarity: image retrieval performance and similarity scores. We retrieved each target image for its corresponding reference image based on the CLIP score across all the 100 reference images that have the same reference event class. Specifically, we extracted the image feature of each image through a pre-trained CLIP (Radford et al., 2021) visual encoder and calculated the cosine similarities for image retrieval. Besides, we also used the CLIP-I, DreamSim (Fu et al., 2023), and DINO (Oquab et al.) scores to evaluate the image alignment of generated images with their reference images. 2) Event similarity: verb detection performance. We utilized the verb detection model GSRTR (Cho et al., 2021) which was trained on the SWIG dataset to detect the verb class of each generated image, and then calculated the detection accuracy based on the annotations of the reference images (i.e., whether the generated images and their reference images have the same verb class). 3) Entity similarity: CLIP-T (Radford et al., 2021) score. We use the CLIP-T score to evaluate the text alignment of the generated images with text prompts. 4) Standard image generation metric. For a more comprehensive comparison, we used the FID (Heusel et al., 2017) score to evaluate the overall quality of generated images. + +Results. As shown in Table 1, we can observe: 1) FreeEvent has better retrieval performance than both ControlNet, MIGC, and BoxDiff. This demonstrates that the target images generated by FreeEvent better preserve the overall characteristics of the reference event and entity. 2) FreeEvent also achieves the best verb detection performance, which indicates our method can better preserve the interaction semantics of the generated images. 3) FreeEvent further achieves superior performance over baselines across all similarity scores and standard image generation metrics, indicating our method can generate images with better qualities and + +![](images/69fc2ad5911f6ff65486bf8a9fa58e6467a4078c5567cb7c863fe4d60c0129d0.jpg) +Reference Image + +![](images/d5de098ac56c3da5dbebeec8892e5c16418454df372cc9e20a48a713b35bdd42.jpg) +Ours + +![](images/a0268ecff77e286c2b44406fd45aef4b495f7c6988a5e7e634b9e374c36ee286.jpg) +ControlNet +① Spiderman ② Batman + +![](images/5b4f255c9c84861b1e4c105a46cff74831d8c80debac0eef3e1b4a9f8729b23c.jpg) +BoxDiff + +![](images/c3eda1f2701f11e26d8d6638dcc9b58ff2c73e5b4a59e381cc9def162ac99da7.jpg) +PnP + +![](images/3b141ad03d8e296fd9ab8964e11733b7ac07738121e6016c6efcabe113b807f6.jpg) +MAG-Edit + +![](images/f8898952cd025032ec5d2205a8cbcb8aae7bbccfdf77a0f007658b037fe66d63.jpg) +DreamBooth + +![](images/aee5328bbd5e74ff8edecddd6a36c534239429f6f41bb2eeac3e82280b893676.jpg) +ReVersion + +![](images/839ee166181027b843bcd1051a2baca3da27e2e1d39fa657a30f0dc3560a89e9.jpg) + +![](images/21ba53c096b57cf0f437bdedc2bbf7d527fc9dd26c1894d9fc9aa0546ddc5632.jpg) + +![](images/5fd43046853f687e6d533472179d0e02249d1e3eb4695667e007f4e667cf884c.jpg) +$①$ robot $②$ bird $③$ apple + +![](images/b3498718a9e98a7e779321a2b171fe718fa37e379738db702ee64c55e47b0e27.jpg) + +![](images/03a647792b93a7bdaebc1313a6b062ef7e5de4cb24e0b149eda2706b6d6d89cd.jpg) + +![](images/ed32b04c43b0eb5c46042c64ab7714e7e4a36b918ba2a09e928a75fdd27d036d.jpg) + +![](images/45ac6e9b27efbb3457b350d267467776028b3ad9d069699db15fb403a42b18f9.jpg) + +![](images/55cbd544b88b64987b9ae981f7c8d4315c17c89a06005006587bfb76097e4d86.jpg) + +![](images/376eaecb97e18a90bb30c637ec1e5a00077d4d1194cab9e6e900ae1a2c83ccef.jpg) + +![](images/febdb991780a298c43b59b20447078d1a541f42df55cefa82ea7aa42912c1f89.jpg) + +![](images/e3b386b0fa24e3d83d7d69f6ba81d1df81a14f482856ffbc25561026b871e88b.jpg) +① Spiderman ② orange ③ strawberry + +![](images/583ff6f5d4b610d7d7a97de2e9e92ba6bc830c92eacc8aab9f7da3c7c1dd7cc3.jpg) + +![](images/e50f430a902964ec48e0484b9ec0140ce5ba2065e1571b9e2eaf9c2e3d59aee9.jpg) + +![](images/93eb32e48a3bf523f4e521a604ab6fdd4a739a8b2b8b585b9dfcae09e6b0acd3.jpg) + +![](images/70cc22a48284fe0baddc4fc1e84a3751de43d1bb76273788a5ed2372181fc840.jpg) + +![](images/a210d1b1866b90a9972cc63369ef47697a291807a2e4ef890aa94c8042b36a8d.jpg) + +![](images/f4b87cd979078282313c0ac587bee580ead5b53d3ba91c8b34b01fadab52664b.jpg) + +![](images/7b07f8191a34d45dc93f4eca011e38bae3b6b5a229f27098ca948e34def866c2.jpg) + +![](images/2e42004fa94ab69868818c8744dc00d0299cd00efa8d11556f26e4cc19edd923.jpg) + +![](images/90796ecfc7ecc321c3ca4125770ed032e9df09902750561528676044cf67d447.jpg) + +![](images/8694c44171d4d4678f75015c993369f40e7bbd688b9b75aa1954c7055273c277.jpg) + +![](images/6ea6d7a92d27a405f869202b897f34ddcbb8b0cee99752d339bd78496d38947a.jpg) + +![](images/db33cbdeae034aa869877f5cfb0b8d42ac0e3c5f27442c69f5a146eb10b18d27.jpg) + +![](images/69901592806cdab29fbd4b7cafe104a0ed495cc25f8263e08374e28ae350823c.jpg) + +![](images/2484698f489adfacd332afa784b5c559040927aa8ac89a9e60b77d36cb2d4710.jpg) + +![](images/4c76f8a1d92d3837073921da53d02aafd60244082bfbe1d32966efe626befd1f.jpg) + +![](images/69177ba65b92c0aa78ee03d35553c5a1ea0f6f840477d4bd00c6947f7463e2ac.jpg) +$①$ bear $②$ Spiderman $③$ panther + +![](images/5cdc6657861cfd9d4587cb61ce1563bf2e6f1a26d785efb80a049c2e2446d1be.jpg) + +![](images/9240e85e23b9bb026df4d4373d90e7f94a1d7f0c3fc75cde98f1269ee6a23324.jpg) + +![](images/47dbf245eb5e2be934d3a55e97c15f6b0c80e932d1b8a60b342da679864da205.jpg) + +![](images/55a99b515f92af91438d83911149af7f634ea68dce1d085cbeb99c4f1f787dd0.jpg) + +![](images/a52cc3873169f0868f69a45c9c4bf7e9a0f1fef1e68df6b4fdf7b1ee836677a8.jpg) + +![](images/f9477a3e77ff4425507e034e01057f68c568a8afa7293c7ef2c304b5955e3e4b.jpg) +Figure 4: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/660f6ef3bcb22abc2f39065dbd05269d2e8fa9a504e4af8693d4bc2075595a69.jpg) + +![](images/31d95700928d38fe00433066d64671b9d17e09dc086979b7d0d414cff786c9d5.jpg) +① Tarzan ② tiger ③ lion +① Spiderman ② robot ③ bear ④ monkey + +![](images/a98175de6e484f2c28876a2ebe9bea09ebcbdc4830cacd4c069d1876499e3978.jpg) + +![](images/860511b13fef502f43cc46eb850218d0665e2347e27b5ab6d27ee03ba84f8c34.jpg) + +![](images/a70a532c1d9d45274a09bfa1266682610f4cc66af0e378412f47e046649ec1fe.jpg) + +![](images/b39e2cb4aeceefcf2532a5ba1ea54f948e4810e74fbe0e72486918a7b8f095c2.jpg) + +![](images/ba8d7618ce1870c963a8c3e4ee2a9aef8c13dd9cfce632eb842832139b3a1f47.jpg) + +alignment with both the reference images and texts. These results all demonstrate the effectiveness of FreeEvent for event customization. + +# 4.3. Qualitative Comparisons + +We compare FreeEvent with a wide range of SOTA baselines on the Real-Event1, including conditioned text-to-image generation method ControlNet (Zhang et al., 2023) and BoxDiff (Xie et al., 2023), localized image editing method PnP (Tumanyan et al., 2023) and MAG-Edit (Mao et al., 2024), image customization methods Dreambooth (Ruiz et al., 2023) and ReVersion (Huang et al., 2024b). + +Setting. For each reference image in Real-Event, we manually constructed target prompts with various combinations of different target entities. Specifically, ControlNet takes + +the semantic map and BoxDiff takes the labeled bounding boxes as the layout conditions. MAG-Edit takes the reference entity masks for localized editing. Dreambooth and ReVersion learn event-specific identifier tokens for text-to-image generation. + +Results. As shown in Figure 4, we can observe: 1) Conditional text-to-image generation models ControlNet and BoxDiff can only maintain the rough layout of each entity and struggle to capture the detailed action, pose, or interaction between different entities. And they both failed to match the generated entity with the desired target prompt. 2) For localized image editing methods PnP and MAG-Edit, while they can capture the reference event, they both struggle to accurately generate the target entities, and suffer from severe appearance leakage between each target entity + +![](images/750c4be2642c385b92d7cd25b7b580e2f981ae3beeb451452ada7611fd539016.jpg) +Figure 5: Ablations of the proposed paths and the target prompt. The "guidance" and "regulation" denote the cross-attention guidance and cross-attention regulation in entity switching path, respectively. The "injection" denotes the event transferring path. + +(e.g., orange and strawberry in row three, tiger and lion in row five), and sometimes even failed to edit and output the original content. 3) The subject-customization model Dreambooth and the relation-customization model ReVersion both failed to generate satisfying results. As discussed before, these training-based methods require multiple reference images and are unable to learn the specific event when facing only one reference image. 4) Obviously, our FreeEvent successfully achieves the customization of various complex events with novel combinations of target entities. Meanwhile, the ControlNet and the localized image editing models tend to generate the target entities strictly matching the mask of their corresponding reference entities (e.g., bird in row two), which appears very incongruous. On the contrary, the entities generated by FreeEvent not only match the layout of the reference entity but also keep it harmonious. After all, while we use the reference entity mask to guide the generation of each target entity, the cross-attention guidance focuses on directing the overall layout of each target entity and doesn't restrict detailed appearance, allowing for more diverse generation of target entities1. + +# 4.4. Ablations + +Effectiveness of Entity Switching Path and Event Transferring Path. We first run ablations to verify the effect of two proposed paths during event customization. + +Results. As the results are shown in Figure 5(a), we can observe: 1) For the entity switching path, removing the + +cross-attention guidance results in the failure of target entities generation (e.g., the ape, the meat), and removing cross-attention regulation leads to the appearance leakage between entities (e.g., the tiger and lion, the skeleton and statue). 2) After removing the event transferring path, although the target entities can be generated, the reference events are completely lost (i.e., the pose, action, relations, and interactions between each entity). These results all corroborates the effect of two paths in event customization. + +Influence of Different Target Prompts. Notably, in our paper, the target prompt only contains the nouns of the target entities, we then run the ablations to analyze the influence of different descriptions (i.e., verb, background, style) in the target prompt for event customization. + +Results. From Figure 5(b) we can observe: 1) Adding verb description leads to a certain degree of negative impact on entity appearance (e.g., the head of the ape, the face of the monkey) since these verbs may not be aligned with the model. Besides, accurately describing events in complex scenes can be challenging for users. Therefore, since FreeEvent can already achieve precise extraction and transfer of the reference events, users do not need to describe the specific events in the target prompt, which further demonstrates FreeEvent's practicality. 2) FreeEvent can accurately generate extra contents for the background and style. Although there may be some detailed changes in the entity's appearance compared to the original output, these do not affect the entity's characteristics or the event. This also + +![](images/a5e4da3797b2cbb744d7f961618808a52e25ab847e959fa19bc478a6b1e05c10.jpg) +Figure 6: Results of Event-Subject Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +
ModelOursControlNetBoxDiffPnPMAGEditDreamBoothReVersion
HJ50257262383
+ +Table 2: Results of the user studies on the Real-Event. + +demonstrates FreeEvent's strong generalization capability. + +Combination of Event and Subject Customization. We further validate the ability of our framework to combine with subject customization methods to generate target entities with user-specified subjects, i.e., represented by identifier tokens. We took the Break-A-Scene model (Avrahami et al., 2023) to learn identifier tokens for subjects and replaced the Stable Diffusion models in Figure 2 with the fine-tuned one. + +Results. As shown in Figure 6, FreeEvent can effectively generate various given subjects in specific events. Specifically, FreeEvent enables the flexible generation of a wide range of subject concepts (e.g., humans, regular objects, and backgrounds) and their combinations. These results demonstrated the great potential of our framework for Event-Subject customization. + +# 4.5. User Study + +Setting. We conducted user studies on Real-Event to further evaluate the effectiveness of FreeEvent. Specifically, we invited 10 experts and gave them a reference image, a target prompt, and seven target images generated by different + +models. They are asked to select at least one and up to three images that they believe demonstrate the best results in event customization, taking into account the generation effects of the events and entities, as well as the overall coherence of the images. We prepared 50 trials and asked the experts to give their judgments. The target image which got more than six votes is regarded as human judgment. + +Results. As shown in Table 2, FreeEvent achieves better performance on human judgments (HJ) compared with all the baseline models. + +# 5. Conclusion + +In this paper, we proposed a new task: Event-Customized Image Generation. It focuses on the customization of complex events with various target entities. Meanwhile, we proposed the first training-free event-customization framework FreeEvent. To facilitate this new task, we also collected two evaluation benchmarks from existing datasets and the internet, dubbed SWiG-Event and Real-Event, respectively. We validate the effectiveness of FreeEvent with extensive comparative and ablative experiments. Moving forward, we are going to 1) extend the event customization into other modalities, e.g., video generation; 2) explore advanced techniques for the finer combination of different customization works, e.g., subject, event, and style customizations. + +# Acknowledgements + +This work was supported by the National Key Research & Development Project of China (2024YFB3312900), Key R&D Program of Zhejiang (2025C01128), an Fundamental Research Funds for the Central Universities. Long Chen was supported by the Hong Kong SAR RGC Early Career Scheme (26208924), the National Natural Science Foundation of China Young Scholar Fund (62402408), Huawei Gift Fund, and the HKUST Sports Science and Technology Research Grant (SSTRG24EG04). + +# Impact Statement + +Since FreeEvent can seamlessly integrate with subject customization methods to generate target entities based on user-specified subjects, this capability also raises the same concerns about the potential misuse of pretrained SD models for malicious applications (e.g., Deepfakes) involving real human figures. To address this, it is essential to implement robust safeguards and ethical guidelines, similar to the security measures and NSFW content detection mechanisms already present in existing diffusion models. + +# References + +Alaluf, Y., Garibi, D., Patashnik, O., Averbuch-Elor, H., and Cohen-Or, D. Cross-image attention for zero-shot appearance transfer. In ACM SIGGRAPH 2024 Conference Papers, pp. 1-12, 2024. +Avrahami, O., Aberman, K., Fried, O., Cohen-Or, D., and Lischinski, D. Break-a-scene: Extracting multiple concepts from a single image. In SIGGRAPH Asia 2023 Conference Papers, pp. 1-12, 2023. +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. +Cao, M., Wang, X., Qi, Z., Shan, Y., Qie, X., and Zheng, Y. Masactrl: Tuning-free mutual self-attention control for consistent image synthesis and editing. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 22560-22570, 2023. +Chao, Y.-W., Wang, Z., He, Y., Wang, J., and Deng, J. Hico: A benchmark for recognizing human-object interactions in images. In Proceedings of the IEEE international conference on computer vision, pp. 1017-1025, 2015. +Chen, H., Zhang, Y., Wu, S., Wang, X., Duan, X., Zhou, Y., and Zhu, W. Disenbooth: Identity-preserving disentangled tuning for subject-driven text-to-image generation. + +In The Twelfth International Conference on Learning Representations, 2024a. +Chen, M., Laina, I., and Vedaldi, A. Training-free layout control with cross-attention guidance. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 5343-5353, 2024b. +Chen, X., Huang, L., Liu, Y., Shen, Y., Zhao, D., and Zhao, H. Anydoor: Zero-shot object-level image customization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6593-6602, 2024c. +Cho, J., Yoon, Y., Lee, H., and Kwak, S. Grounded situation recognition with transformers. In *British Machine Vision Conference (BMVC)*, 2021. +Dhariwal, P. and Nichol, A. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780-8794, 2021. +Epstein, D., Jabri, A., Poole, B., Efros, A., and Holynski, A. Diffusion self-guidance for controllable image generation. Advances in Neural Information Processing Systems, 36: 16222-16239, 2023. +Fu, S., Tamir, N., Sundaram, S., Chai, L., Zhang, R., Dekel, T., and Isola, P. Dreamsim: Learning new dimensions of human visual similarity using synthetic data. Advances in Neural Information Processing Systems, 36:50742-50768, 2023. +Gal, R., Alaluf, Y., Atzmon, Y., Patashnik, O., Bermano, A. H., Chechik, G., and Cohen-or, D. An image is worth one word: Personalizing text-to-image generation using textual inversion. In The Eleventh International Conference on Learning Representations, 2023a. +Gal, R., Arar, M., Atzmon, Y., Bermano, A. H., Chechik, G., and Cohen-Or, D. Encoder-based domain tuning for fast personalization of text-to-image models. ACM Transactions on Graphics (TOG), 42(4):1-13, 2023b. +Gu, J., Wang, Y., Zhao, N., Fu, T.-J., Xiong, W., Liu, Q., Zhang, Z., Zhang, H., Zhang, J., Jung, H., et al. Photoswap: Personalized subject swapping in images. Advances in Neural Information Processing Systems, 36: 35202-35217, 2023. +Gu, Y., Wang, X., Wu, J. Z., Shi, Y., Chen, Y., Fan, Z., Xiao, W., Zhao, R., Chang, S., Wu, W., et al. Mix-of-show: Decentralized low-rank adaptation for multi-concept customization of diffusion models. Advances in Neural Information Processing Systems, 36, 2024. +Hertz, A., Mokady, R., Tenenbaum, J., Aberman, K., Pritch, Y., and Cohen-Or, D. Prompt-to-prompt image editing with cross-attention control. In ICLR, 2023. + +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. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020. +Huang, S., Gong, B., Feng, Y., Chen, X., Fu, Y., Liu, Y., and Wang, D. Learning disentangled identifiers for action-customized text-to-image generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7797-7806, 2024a. +Huang, Z., Wu, T., Jiang, Y., Chan, K. C., and Liu, Z. Reversion: Diffusion-based relation inversion from images. In SIGGRAPH Asia 2024 Conference Papers, pp. 1-11, 2024b. +Jia, X., Isobe, T., Li, X., Wang, Q., Mu, J., Zhou, D., Lu, H., Tian, L., Sirasao, A., Barsoum, E., et al. Customizing text-to-image generation with inverted interaction. In ACM Multimedia 2024, 2024. +Kirillov, A., Mintun, E., Ravi, N., Mao, H., Rolland, C., Gustafson, L., Xiao, T., Whitehead, S., Berg, A. C., Lo, W.-Y., et al. Segment anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4015-4026, 2023. +Kumari, N., Zhang, B., Zhang, R., Shechtman, E., and Zhu, J.-Y. Multi-concept customization of text-to-image diffusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1931-1941, 2023. +Li, D., Li, J., and Hoi, S. Blip-diffusion: Pre-trained subject representation for controllable text-to-image generation and editing. Advances in Neural Information Processing Systems, 36, 2024. +Lin, K. H., Mo, S., Klingher, B., Mu, F., and Zhou, B. Ctrl-x: Controlling structure and appearance for text-to-image generation without guidance. Advances in Neural Information Processing Systems, 37:128911-128939, 2024. +Liu, Z., Feng, R., Zhu, K., Zhang, Y., Zheng, K., Liu, Y., Zhao, D., Zhou, J., and Cao, Y. Cones: concept neurons in diffusion models for customized generation. In Proceedings of the 40th International Conference on Machine Learning, pp. 21548-21566, 2023. +Mao, Q., Chen, L., Gu, Y., Fang, Z., and Shou, M. Z. Magedit: Localized image editing in complex scenarios via mask-based attention-adjusted guidance. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 6842-6850, 2024. + +Mo, S., Mu, F., Lin, K. H., Liu, Y., Guan, B., Li, Y., and Zhou, B. Freecontrol: Training-free spatial control of any text-to-image diffusion model with any condition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7465-7475, 2024. +Nichol, A. Q. and Dhariwal, P. Improved denoising diffusion probabilistic models. In International conference on machine learning, pp. 8162-8171. PMLR, 2021. +Nichol, A. Q., Dhariwal, P., Ramesh, A., Shyam, P., Mishkin, P., Mcgrew, B., Sutskever, I., and Chen, M. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. In International Conference on Machine Learning, pp. 16784-16804. PMLR, 2022. +Oquab, M., Darcet, T., Moutakanni, T., Vo, H. V., Szafraniec, M., Khalidov, V., Fernandez, P., HAZIZA, D., Massa, F., El-Nouby, A., et al. Dinov2: Learning robust visual features without supervision. Transactions on Machine Learning Research. +Pratt, S., Yatskar, M., Weihs, L., Farhadi, A., and Kembhavi, A. Grounded situation recognition. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part IV 16, pp. 314-332. Springer, 2020. +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. +Ramesh, A., Dhariwal, P., Nichol, A., Chu, C., and Chen, M. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022. +Ren, T., Liu, S., Zeng, A., Lin, J., Li, K., Cao, H., Chen, J., Huang, X., Chen, Y., Yan, F., et al. Grounded sam: Assembling open-world models for diverse visual tasks. arXiv preprint arXiv:2401.14159, 2024. +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. +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. Springer, 2015. + +Ruiz, N., Li, Y., Jampani, V., Pritch, Y., Rubinstein, M., and Aberman, K. Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 22500-22510, 2023. +Ruiz, N., Li, Y., Jampani, V., Wei, W., Hou, T., Pritch, Y., Wadhwa, N., Rubinstein, M., and Aberman, K. Hyperdreambooth: Hypernetworks for fast personalization of text-to-image models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6527-6536, 2024. +Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton, E. L., Ghasemipour, K., Gontijo Lopes, R., Karagol Ayan, B., Salimans, T., et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in neural information processing systems, 35: 36479-36494, 2022. +Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021. +Tewel, Y., Gal, R., Chechik, G., and Atzmon, Y. Key-locked rank one editing for text-to-image personalization. In ACM SIGGRAPH 2023 Conference Proceedings, pp. 1-11, 2023. +Tumanyan, N., Geyer, M., Bagon, S., and Dekel, T. Plug-and-play diffusion features for text-driven image-to-image translation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1921-1930, 2023. +Voynov, A., Chu, Q., Cohen-Or, D., and Aberman, K. p+: Extended textual conditioning in text-to-image generation. arXiv preprint arXiv:2303.09522, 2023. +Wang, X., Fu, S., Huang, Q., He, W., and Jiang, H. MSDiffusion: Multi-subject zero-shot image personalization with layout guidance. In ICLR, 2025. +Xie, J., Li, Y., Huang, Y., Liu, H., Zhang, W., Zheng, Y., and Shou, M. Z. Boxdiff: Text-to-image synthesis with training-free box-constrained diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7452-7461, 2023. +Xu, S., Huang, Y., Pan, J., Ma, Z., and Chai, J. Inversion-free image editing with natural language. In Conference on Computer Vision and Pattern Recognition 2024, 2024. +Ye, H., Zhang, J., Liu, S., Han, X., and Yang, W. Ip-adapter: Text compatible image prompt adapter for text-to-image diffusion models. arXiv preprint arXiv:2308.06721, 2023. + +Zhang, L., Rao, A., and Agrawala, M. Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3836-3847, 2023. +Zhou, D., Li, Y., Ma, F., Zhang, X., and Yang, Y. Mige: Multi-instance generation controller for text-to-image synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6818-6828, 2024. + +![](images/ef830824ec9e9153cee898ea0aff8cf2eb82acc7d82446a9cf3196b1d2588022.jpg) +(a) SWiG-Event Sample +(b) Retrieval-based Evaluation +Figure 7: (a) The SWiG-Event sample. (b) The process of quantitative evaluation and image retrieval. + +# Appendix + +The Appendix is organized as follows: + +- In Sec. A, we show more implementation details. +- In Sec. B, we show more details of the SWiG-Event benchmark and the process of quantitative evaluation and image retrieval. +- In Sec. C, we show quantitative results for path effectiveness. +- In Sec. D, we show the results for attribute generation during event customization. +- In Sec. E, we show more results for event-subject customization comparisons. +- In Sec. F, we provide more discussion about the hyperparameter setting. +- In Sec. G, we provide the discussion of our work's limitations. +- In Sec. H, we show more qualitative comparison results of event customization on the Real-Event. + +# A. Implementation Details. + +The denoising process was set with 50 steps. For entity switching path, for all blocks and layers containing the cross-attention module, we apply the cross-attention guidance during the first 10 steps. And apply the cross-attention regulation during the whole 50 steps. For event transferring path, we perform spatial feature injection for block and layer at $\{\mathrm{decoder}$ block $1:[\mathrm{layer}1]\}$ during the whole 50 steps. And perform self-attention injection for blocks and layers at $\{\mathrm{decoder}$ block $1:[\mathrm{layer}1,2]$ , decoder block $2:[\mathrm{layer}0,1,2]$ , decoder block $3:[\mathrm{layer}0,1,2]\}$ during the first 25 steps. We set the classifier-free guidance scale to 15.0. + +# B. Details of SWiG-Event and process of image retrieval. + +As shown in Figure 7(a), each SWiG-Event sample consists of a reference image with labeled bounding boxes and masks for each reference entity, the nouns of each reference entity, and the event class. As shown in Figure 7(b), we constructed the target prompt as a list of reference entity nouns. The ControlNet takes the semantic map merged from the masks as the layout condition, and BoxDiff takes the bounding boxes with labeled entity nouns as the layout condition. + +To compare the image retrieval performance, we retrieved the target image for its corresponding reference image across all the 100 reference images that have the same reference event class. + +
ModelCLIP-I↑DINO↑DreamSim↑CLIP-T↑
FreeEvent0.57710.28650.38770.3445
FreeEvent w/o guidance0.51400.10580.20790.2979
FreeEvent w/o regulation0.54590.12970.30110.3205
FreeEvent w/o injection0.49450.08250.26940.3311
+ +Table 3: Quantitative results for ablation study of two paths on Real-Event. + +![](images/77878ae79070f4ee0254ff59107fd2229f3003a479b003196fa79af2b58356e0.jpg) +Reference Image + +![](images/82576430d65a9acb8c47c09e3da3cd1f799ffb77f0bcc2a70a505ae30577069f.jpg) +① Spiderman ② red apple + +![](images/9e08f3f5871110e6fee85b70c77372e0fd9afda0c030bf50d43bcf7f4eb09ecb.jpg) +① Spiderman ② green apple + +![](images/99d7f5d576dac1078b0017434c401d39ab7fa1b01f9b55c5dc5ab22b32349c1c.jpg) +① Spiderman ② crystal apple + +![](images/de5583cc080c4f03570547eabbd22a0f0446adf80ef3fe7eba5c219d67144e73.jpg) +① old lady ② cake + +![](images/16e7e6a57d7dac90e265fa73d7e36bdd77573044c3b61c8fc82774b95026ef52.jpg) +$①$ blonde lady $②$ cake + +![](images/e302cc4430180642ea66c038341af0e1c2fa98d0deb63e8db7ecf167504dbc95.jpg) +$①$ noble lady $②$ cake +Figure 8: The results of attribute generation during event customization. + +# C. Quantitative results for Path Effectiveness. + +We ran ablations of two paths on Real-Event. We evaluated the CLIP-I, DreamSim, and DINO scores for image similarity between reference images and the generated images. We also evaluated the CLIP-T score for image-text similarity between text prompts and the generated images. Table 3 demonstrates the effectiveness of two paths. + +# D. Attribute Generation Results. + +In this paper, we didn't explicitly model the attributes during generation. However, as the results are shown in Figure 8, since we can generate extra content for background and style by giving corresponding text descriptions, we thus tried to model the attributes by giving extra adjectives to the target prompt as an easy and natural exploration. Meanwhile, to ensure the accurate generation of the attributes, we applied the cross-attention guidance and regulation on each attribute using the mask of the entity they describe. As the results shown in Figure 8, our method successfully addresses the attributes of the corresponding entity (e.g., colors, materials, and ages). After all, while the attribute part is not the primary focus of our work, our approach shows potential and effectiveness in addressing it, and we would be happy to conduct further research in our future work. + +# E. More Event-Subject Customization Comparisons. + +In this section, we provide more event-subject customization comparisons with existing subject swapping and multi-subject customization methods, including Anydoor (Chen et al., 2024c), PhotoSwap (Gu et al., 2023) and MS-Diffuison (Wang et al., 2025). As shown in Figure 9, FreeEvent outperforms all other methods. + +We need to clarify that the primary focus of this paper is event customization, while event-subject combined customization is only a potential capability of FreeEvent, rather than a key aspect we intend to emphasize or compare with existing methods. Moreover, FreeEvent serves as a plug-and-play framework for event-subject combined customization, making it unsuitable + +![](images/1686affe2bdc322cf22c77d958aff4eef3488cf2bff83951977019cae12e71ef.jpg) +Suees + + +![](images/3ee8ce00f983c972ecde516165a9ca370c4b26c7db894969e30e52bb4891b1f7.jpg) + + +![](images/9e95a30b8c57ed312cd6ef4f2739e9d69d40fcc9664726db443b889bd676ddc9.jpg) + + +![](images/34249684f32b361c799f280c880b896cfa5159a385710f9cded782df90814512.jpg) + +![](images/bdefd7ef7285bae62a8bdd8e04ba8ad17ada176a1b386cab21f622695fbfcc9b.jpg) + + +Reference Image +![](images/594c956de9de5a029cd6e230aa977099e888f74d024b92656e2e7bd77b062c69.jpg) +① $< {V0} >$ + +Target Prompt +Ours +![](images/b28ba272dae2d26666ef095993a55fd4fa60bc2b9070ccbc0c31acd3e524b49b.jpg) +② $< {V5} >$ + +![](images/ac3b02ee3e000368e4c836092e289d5ffa001697c1bb20e63e0bd4a6321d01da.jpg) +Anydoor + +![](images/836660bf693f0b4b898cdb00e697f79156e6140fb6503f17ef879f277bca4503.jpg) +PhotoSwap + +![](images/6ae65ec9be48c216dec8a401554b1afd30e5d434c2080d643141d0867cc4732b.jpg) +MS-Diffusion + +![](images/85e9050aea3a7df7c0bbbad59666eb73e8f66155e1be4d0e7e037c773d44663b.jpg) +$①$ + +![](images/08f9fe7765c4250240f168b37edf98742a0726be8de7b2129b7786fb202e3a03.jpg) +② $< {v3} >$ + +![](images/d9d6317b4fc1d0b3f91664cbe41878769eaf5fe5e7e0d159c9416e2889caccaa.jpg) + +![](images/d1376c98a71a70059eac4404552bfcea50b9cb6e271c61fbe3b765968708249b.jpg) + +![](images/25c3fd580eb215d81b32c393986c87c7a598bbbed4966c8f6d4a1c26e6c660fb.jpg) + +![](images/70412080bf2551caa05d23ee03db7b6fbd7ab01dea276755bb426f9052cc03d2.jpg) +① $< v >$ + +![](images/3aa6a5a3cde48c00ea648f79c95ad872eb2fd392531bf0d58c02a63ff23551ee.jpg) +② $< {v1} >$ + +![](images/691d5b7dd64f5edd1fbf7ffad4288ea487acd403b87c9bf0a1468f979a752f3b.jpg) + +![](images/2bacc839b13321aa2bf61fb63deff5480ef4fd5fc78fb926e44ed07627662c75.jpg) + +![](images/31936454d6000f743831fff93fc7ad485d41b0ca77b0ac173c9af0111de0d428.jpg) + +Figure 9: Comparisons of Event-Subject Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. +![](images/5812f509a4c897e440ad9db0dab0c257b4a6051110e325e1ed5db3e9a2965e49.jpg) +③ $< {v2} >$ +① $< {V4} >$ +(2) bear +on $< V6>$ + +![](images/002a611fc4b9d328acef8376892793d1ef083fe459a73d2b59a65f5b455cdf46.jpg) +$④$ typewriter + +![](images/be0f592345efaa843ec6e1e324bfe0b322e0e63a1647f951df8a01904719484c.jpg) + +![](images/58c8bfddd6c2025f643cbbe2b99bcda65e0cc531bda06185d6fb24d8e5775342.jpg) + +![](images/19334e9f4abb6d45445059734d11be365babb939e579ba321793d9228f2556ec.jpg) + +for direct compare with subject customization methods as their settings and applicable scenarios differ. We will provide further discussions and results on event-subject customization in future work. + +# F. Discussion about hyperparameter Setting. + +As the first work on event customization, our goal is to enable FreeEvent to perform high-quality event customization across diverse reference images using a unified set of hyperparameters (see Appendix Sec A). This default setting ensures faithful event transferring while allowing flexibility in target entity generation. + +However, when there is a large shape discrepancy between the target entity and the reference entity, the layout information from the reference entity may undesirably affect the appearance of the target entity. This reflects a fundamental trade-off between event transferring and entity switching: prioritizing accurate event customization based on the reference image may lead to some compromise in the generation of the target entity. As the example shown in Figure 10, when the shape differences are significant (horse vs. dinosaur), the default setup may result in suboptimal generation (Target Image 1). + +A straightforward solution is to adjust the parameters of the event transferring and entity switching paths. Specifically, + +# Reference Image + +![](images/b3ef3ec985466e9f33104e34473012f86b2f12a12ed922e912e4596bc1ecdc47.jpg) +Figure 10: Comparisons of Event Customization with different hyperparameters settings. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +# Target Prompt + +$①$ knight $②$ dinosaur + +# Target Image1 + +![](images/2c103e1dcca34877db201e1071040b1748a583ac1adbb04df99e32caf3709486.jpg) + +# Target Image2 + +![](images/74ae594459d4e7927bb4c0e1e2832aafa98a4d7166ed8366cfb1e911e30705a8.jpg) + +
Cross-attention GuidanceCross-attention RegulationSpatial Feature InjectionSelf-attention Injection
Target Image110 steps50 steps50 steps25 steps
Target Image215 steps50 steps30 steps15 steps
+ +enhancing the entity switching to emphasize the generation of the dinosaur, while slightly reducing the strength of event transferring to mitigate layout constraints from the reference entity. + +As the shown in Figure 10, we provide an updated result (Target Image 2) by increasing the number of cross-attention guidance steps (from 10 to 15) and reducing the number of injection steps to $60\%$ of the original. This rebalancing enables a more suitable trade-off for this case, resulting in more prominent dinosaur features (e.g., shorter front claws and upright back legs) while still preserving the core event structure. + +This case study also demonstrates a practical and accessible way for users to adjust the trade-off between event transferring and entity switching according to their own customization needs. Looking ahead, we plan to explore more flexible and general solutions, such as adaptive parameter scheduling during generation or more explicit entity switching mechanisms, to further improve the controllability and diversity of target entities while maintaining event fidelity. + +# G. Limitation. + +The main limitation of FreeEvent lies in the complexity of events and the number of entities. The customization effect may be compromised when there are too many entities in an image, especially if they are too small. As the first work in this direction, we hope our method can unveil new possibilities for more complex customization and the generation of a greater number of richer, more diverse entities. Additionally, since our model is built on pretrained Stable Diffusion (SD) models, our performance depends on the generative capabilities of SD. This can lead to suboptimal results for entities that the current SD struggles with, such as human faces and hands. + +# H. More Qualitative Comparison Results. + +We show more comparisons on Real-Event in Figure 11, Figure 12, Figure 13, Figure 14 and Figure 15. Specifically, we list them by the order of entity numbers. And we use different combinations of target entities for the same reference image to generate diverse target images. + +(The figures are in the next pages.) + +![](images/5baf5b316fb806df9b8a869a61633b2406aaf164579537f9f8c2dfb998581781.jpg) +Reference Image + +![](images/68167656789764330a988067a41a934de700bfead8249804a5b660ce4f5b52fa.jpg) +Ours + +![](images/2292e8836a2120f9bce49c018535d08e6dfc87c79181083df02db2d292c18683.jpg) +ControlNet +① warrior ② sword + +![](images/7a47914447ef8443ec40fe9748bf539292799f3e686ebe7a848bd4d8718a623b.jpg) +BoxDiff + +![](images/7e872f7b02ad820e5eea635a8248766893c5951c3a5eb36f1ad308cea2afb520.jpg) +PnP + +![](images/bcd91580997cb200d06f431bddfe2ffff71cf5e383ee8af349a96c4154dcaf62.jpg) +MAG-Edit + +![](images/c17cbd6b91f47f305e8a81df519a4c07bae1bdecc52c3da5c7aaf800ee42fdc1.jpg) +DreamBooth + +![](images/09cf6a3afecdf2b4d37873ac57d5185e1a575e3738807dbdb19fff4db5ea2492.jpg) +ReVersion + +![](images/1aacb08be8bfdea7d11298c9a6014360db012a4d6c92f6514e0cc39b2169b157.jpg) + +![](images/78e9f292b558ee695ae78919b0320f5d23f574b57db4940940f722b76b4e1520.jpg) + +![](images/43d97e4bf67fa5c9484ff64e8b66b54ffd79713249df4c91f5285f516b35b1db.jpg) + +![](images/c88faebc1aae43030c70940410c3ba42d561a216091ebd1de3b7d64719b11b60.jpg) + +![](images/297129270073aeee9a1d073228dc6830180d45b6bba9f151e46c59cf0bec18bc.jpg) + +![](images/120a939aef442effac7aea3f6dc8e02a3f9998420d7d0d6f8fec5dc9fec7af70.jpg) + +![](images/9a50801d4651bbf2f1b15c29786fb9fd83cd5da1c18360f8e8c81c81f6264887.jpg) + +![](images/a75f451210466b55fcd4d7f47bb47afed4d077dc38307e8190fc3c1dc827e641.jpg) + +![](images/5d173c94f5801e9dd6ed745f9b3206aa5c6e9fa953b8bb212cabbe8978f68a24.jpg) + +![](images/743a088e4b098f2800a1c2cc043502bbdaf0ea60c85cd60a7a7e71240856aca7.jpg) + +![](images/c2fd352cecdb52c1f15b8331c9acef4f9e17260cb05fe633d4780bab8da6f14b.jpg) +① girl ② carrot + +![](images/ea4d0f0207590e82ef628707ae343cfca9653f072a2c38ed51c9a66206f0509a.jpg) + +![](images/caa92941a910c8300a4dcd635c5a9aceda15bb3fcf7bdc71660eb03b4ed6669a.jpg) + +![](images/283a9dc2fa4cb2ce369662a613ddcb5d197afa7319de8a17b12672caf75421b7.jpg) + +![](images/42ae210f8098ace0b4c69e9f756e29f1fb38d5411fe7de72789498a813c5a62f.jpg) + +![](images/09b61177c519a8a0dc115b8c432b796a875e112a8c7b98cc47f2d8d05f047684.jpg) + +![](images/680e85284f221e195dc0172d6abe349f0a2fc2e65a20e0109ab5f76ebf25057c.jpg) + +![](images/6bc2e6abfb3f175983334aa91c7f026746baeafbf7c50a6a5ea6eb3c11c9048b.jpg) + +![](images/e11dc504f780dec150d3a36a3d2f9ca803c222431a2b92115db36a6da3218e11.jpg) +$①$ Jedi $②$ lightsaber + +![](images/5c76d9d51216e5e73b5c639a8ef9c33618982143afb1e0be333362f4707c3a5a.jpg) + +![](images/35f8a0e118ca6dfffb1f7c58dd1010e11738681ecb34bd6580efa1fb88253ac6.jpg) + +![](images/884bf61bacd567b80a4cfac532268edea9d53fe0585beb9ed16deb9767ffe184.jpg) + +![](images/a9eec6195e007317edc50df788590706fd20e46b2a221d66efe5e221f1723073.jpg) + +![](images/6efd87b02db5be846bf9700c301548f6a76ac7fab9dca873c9e31336ae78e00c.jpg) + +![](images/b89eced499b69b69622f74339eadbebd812254002d175c0d21b5ad189f92af9d.jpg) + +![](images/9b88008899dc190c983445625a6bbced81c92c90fd83cf4652a5494ad05b710d.jpg) + +![](images/0efba3a7df71e422e51125013a6edce23103bc8bd686d478c08c85689b96da71.jpg) +$①$ ape $②$ robot + +![](images/e7ddfe636c32d69d82a16a63e05f5ddca3e02fbc85e08ab6fae357fec2a2bf69.jpg) + +![](images/751a5fcbc74348d675f7896f4a8473efe6c49fcfb67e53a118e2955ca19f3ac9.jpg) + +![](images/f175cc99e037ef2a9a5320ce99f98e358e5730976f6a4e7afd1fdfca89dcf04a.jpg) + +![](images/429e3c3113b0d99ec5f3e53c2aed36099e091f573d416d4757e783d2ca840642.jpg) + +![](images/4539b536723908a233f8f4f96e53359d7186e9d7e3c29e1fa2bd0cc4e1f7d306.jpg) + +![](images/a8686e056b6580e7f825f8265aff51f0ab3f5f74dfffc59bc14bb0dfec7d43c8.jpg) + +![](images/39ff7dafc3055b5bd09807ebd146a2a2ec4501c4c9553c4d852b6999445787ef.jpg) + +![](images/04ce9654009061ecb16781bf1c1d644170eb635f7db53ee9a9cca2c1543811d1.jpg) +① Spiderman ② Batman + +![](images/14d925d4d5a7abf73999b28a8c3762fa71199c374c8b36ea7fd77c42520e58ad.jpg) + +![](images/b26e60b78d563e395893a143c1b52f84c313508dcb858bf64cf61be74fbe20ad.jpg) + +![](images/fb800e5537799672612c221086d8c03377c8486e577be03a63e1fc7ff0d9d3d6.jpg) + +![](images/54641e238eb89116799ea8234ccf61e5e4c10744741890e3837512ffa72460e8.jpg) + +![](images/a6a079312d0e3a3c60049abaa8df425ad69902de39b5faf8a2d55c3cc3743f53.jpg) + +![](images/139f254759229e5dca654243cb583baa47a01bd3b50bb5cbd734633cebd3f7e8.jpg) + +![](images/23b4ddff9ffe44a997b6066b1b41e17dfafcc956b3968cbdcb49e1bb4a5e8679.jpg) + +![](images/bff38f243cf4b426148e2847f8ca70f8bf7380bb25bd0680c74370b9f560d0b3.jpg) +$①$ ape $②$ robot, cartoon + +![](images/8d2b22639609d961d6c507d1b6d0057f3766daf01220993150d17bb79fe88746.jpg) + +![](images/3b7ab937219e63dbbaa466d5285c1e96692e5a7b87abee58727be09d89927cc6.jpg) + +![](images/fd23911d624e3efe1d2c40c6b43141eadd9230c1ec0e0946a0a574807106a05c.jpg) + +![](images/209685d64ab7e73e769ad917eb760225d73c9c981fa52ee1f0e175e735e5d724.jpg) + +![](images/6d01fda426ced26761c9596ad092fa507ae347ea0154c1f8b1b71c4383abe910.jpg) + +![](images/dc607ea96fed4082f2bdb2aa6d28752e5abb11f433e59ea77445756f2be68d0b.jpg) + +![](images/5523ce6b3500a39191a0e0842ac27339615fafb1b7ab2276cc69cae85ea6be98.jpg) + +![](images/e1c5d42d74fabf4ef898adad8cb18ae1ce8163fdc24648cdea3a82cc1e617c63.jpg) +① Spiderman ② Batman + +![](images/3b7f58abd556883009752c80a0bf12db47d454e4a92e1f0d97770487f9a00455.jpg) + +![](images/24bf45a5c6b527f2c9ef0454e07d20ee119bebe4dcc21e77a21250b8504a606b.jpg) + +![](images/77e4bf938cd71aefa258150411805604ac1a520e4776b9e6190dd80f60e0bd38.jpg) + +![](images/c3499a08ec489baadf975a9560f11f7b59d15cfaa0e79a8e69ac0712aaab49bd.jpg) + +![](images/f5debdceeb52392fe28e05099ef6e9b1014da7a5e1933df51a9abb07d203aba0.jpg) + +![](images/26d25c4ba986eb55066780bbd56a20b3829c716b3db62d5721e80b3b0d5e0d6f.jpg) + +![](images/00e99d4f915d00239c9cd0d17a3ef720e459f9f42cbfd5604126fcf420dfc0f4.jpg) + +![](images/2620d961d1932e281e6509645a0883420d2a5ca6d8c2cadc5291e2f971daf9d4.jpg) +① monkey ② otter +① tiger ② otter + +![](images/001de715654b3149110c8436fa8196dfca27a9263e1ff648ab223c8677ea05b3.jpg) + +![](images/e83332b87823fc023ddb533641b772ea14ac9d9001bb495e54684758b45d69cc.jpg) + +![](images/211b70486deb3dbf1f85a85d540c09c1fbd071c3e1afade2eebafe5b9b344180.jpg) + +![](images/becd2b16d63b94267f8de077c7ddabd3c801319133177a3b6d0e82d59843f6a1.jpg) + +![](images/139fed6af8964e19ce5dd70272f6bc01bc597577d83187fa4c88be34f50b2c5c.jpg) + +![](images/764bf5177a256ee13950675613074da8c1ce24e342958486f14093c61e6e330b.jpg) +Figure 11: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/a2422271b0377339464ef45cbe737a02f569209f8befd6c95f8ab78e439f1f92.jpg) + +![](images/de420c7370ec3be206aeabc1fb2515ed524f34f1ca2b54a61ddbb8361dcd8693.jpg) +① Spiderman ② batman + +![](images/53d656609b7c88a5c80a2d3ff40cfad42c9e45fe784fa22e2020123925a786dc.jpg) + +![](images/3f86b96c0a2a193d760b680e9fd8997bd3d51c08aa0e9c3227b759694bce5a0e.jpg) + +![](images/dd6d40032b501f2b51e2f0c427ff8b6c465e4c6b96f2540cb7e1e1d5d7588be8.jpg) + +![](images/14be5f0f4b80ec4f523b2cae15d14f5805b53b6020efcee02952abb61f827e4b.jpg) + +![](images/3cae34a2d4bedb889e84005dceba9e4ded57316efeec98043dd89ae27348f528.jpg) + +![](images/f76ee2bf774d665dd625234350ab2aa3293d5300cc7e0aa3604c14323d07194d.jpg) +Figure 12: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/2d55010969c27b3977a22747dd81e3164d74b8bdfbad02c5d36e0e82fe352a8b.jpg) +Ours + +![](images/6bd067187c07c12a53436b5d292b2eac096e36ecd6cee1360b4b12e5a415cb41.jpg) +ControlNet +$①$ book $②$ sheep + +![](images/281e3f0bc148c59739131401f069f100b97aa5e98931946947c9f8c4c9e899e1.jpg) +BoxDiff + +![](images/a7e7ecbfb40e1156f07ae3661629de14051226a55370887af295bf7f54e9c095.jpg) +PnP + +![](images/51aa2618a4805cc53725f9c419ddd46b10e61aaceefb43203c8d569e240f32b6.jpg) +MAG-Edit + +![](images/e8e83a5b6856e5bb6aaec74f0a9333ca14a8178d3599ecaee37adf3e4c753ec9.jpg) +DreamBooth + +![](images/f4c4536fbf39611b831d318e092424cc7be03bfab73bc2394895c86f3569b2c6.jpg) +ReVersion + +![](images/47e2c1f9ded1de596977c5b5bcf29a9c6ad320b2aaddfcbd2de20bf2b485d75a.jpg) + +![](images/2d29ba09c10773323d2cff97c4aeb44cd0f12524c08bf19f49fc6b8127f892e5.jpg) + +![](images/d31d831d9b3747004c5fe89862a39323fe3297bd2c69d3eb95cab7cc1dcce3f3.jpg) +$①$ bear $②$ cake + +![](images/bfec4a9507866a88e9f126343841656de7e94923e6451cd71f8cf25949ba3bb5.jpg) + +![](images/eb36321eecda5f67d689ba6affaca4034b7ad9256505bf8b5020e37872b6640c.jpg) + +![](images/e4a3a5f3728a5b199f86806b32dd4182e8182ec09fdd395f1808dceb15c6ddae.jpg) + +![](images/a4d3a0ee6d22ab9feb666214ade5d601c4f5b9e642bad035d71d63d4d1edae91.jpg) + +![](images/b52dd14cdcd7d143bc98c841b1af15c2dcb05cd196c2d1f3a2f6a25b5d33db36.jpg) + +![](images/b7fd587a5611a16ca3fb31891eecaee7885578cfaf59fed67132b8006c49a379.jpg) + +![](images/d34270529224466d1bfa135f0ff7916b224b1dc1151c7d21d4ce0384bd610969.jpg) + +![](images/3e79e203ea161dc8766c0699590d4d20b2b6358d127248a792ae9a40d2dfc11a.jpg) +① flower ② backpack + +![](images/54720d31ff225684e3d1dd6539aa8ac3e682f2dc6c995d3934ffba112c2f4262.jpg) + +![](images/d1f24737ba3be7e21f09ebdf5ccf91b405a6f3688efceb448fc4c0c5f7823413.jpg) + +![](images/eaf947c9674a2de7585b7ebd9138be5daf295e0299ee9bb4d05e4951f5a91f14.jpg) + +![](images/52f6c6ddff87f3ec428bafefc21136a3702329f3f62fc7edfc5df94433988274.jpg) + +![](images/d07a56b285d7f0e8b2d07d96a8fa18932fddd40a3d98606ab51bb29dd2512c35.jpg) + +![](images/870bab4e255752c241d4903b5d174fc179565235114898720242e0f609ebefc6.jpg) + +![](images/67ff6087c4fd66162312931e3b3a545f87defe31873a42db38e504825a73f60f.jpg) + +![](images/c4a43b6bf94a5cf5ac2bb1fe408a0606cb3354cf838f9d1e29c5bcf1b92c35e6.jpg) + +![](images/c9a7f423161ad8ebb2915e2eb25e3c7e91d153284685b57d4f946b7f48826c65.jpg) + +![](images/f110eb3b346f1defea62e5e4b5c55f32b68c02c22b8547436db0a89a079131f0.jpg) + +![](images/c470f398e5d2662d73ebe7045b5d77b815b61d3566a9bb16177eb7472a87cd4e.jpg) + +![](images/a07cc5d1776783ff2c081764c56928ec26095a919d9e55f938bdfd82e6597b04.jpg) + +![](images/619dd3cd7ccc7718151a582ea917b79c495091c8e809cb3405eb8f9ee3b16a92.jpg) + +![](images/a79d9f7e45e74af6b18fa9581f312646f0d38b3dc4f9dd875080753a5a4d7f5d.jpg) + +![](images/43e4cf571d0c121ab894366258a4f4e3cdbce35dc28f6014febeb3efd6c5bc24.jpg) + +![](images/74eade92e4d989a22003aa1a18cf8cdbf676a81c30feeb28698e9455fb9a82de.jpg) +① Spiderman ② horse + +![](images/7284eccd70a18c34f09204401988ee63ee151ee8760226f179208664d5164f9a.jpg) + +![](images/d0a6d2061ba5bf7492b5104bdb1239c7f7a3cd97017d016a70a044384311c016.jpg) + +![](images/36c6b0164ce5deefd56af429b9d984caf9a0b7f5fd5108251f1ed03629b3cb66.jpg) + +![](images/a0ade00a8f6c1cb30d7a034d741e2956b490f572cbc8e7b2d0a481739bda6839.jpg) + +![](images/9eb17164ee619cd514c0b2c54d6c383a22b0588d8cfd15bf213932247bb7c4e7.jpg) + +![](images/973f677991e6912fce9c39a87b575382c103cc95d96975d32bd18e9e5315a175.jpg) + +![](images/8eb4add9db1e9381c1db48ea5487e8c8e6c6e1b2379622b6ba24eba9e117df34.jpg) + +![](images/7adcfea6236c95d347866250a15a31dc5cbe8a66706c93285e9505920631595a.jpg) +$①$ knight $②$ dinosaur + +![](images/5fdfaa16b09e07ea735adaa262f3d09f8780c3c153104af6cbcda3209165019b.jpg) + +![](images/a92fba3b1722cb60af7dfc96db21c53b6c036cee9c87ebf512e8b1be715c68d4.jpg) + +![](images/aeaeaa940b53235df1eb8193e68fff7a82867faddefdd3238e82a9ddb24910bc.jpg) + +![](images/903131dc151a67e8a76a431b772549da499d3802ff44c7adb1899be87df16c9c.jpg) + +![](images/90ac1ca9e4765fd4ae356a9cb83a4fc2f337aa024c45663ab44612ad562b37a0.jpg) + +![](images/680f0ca0447922e0597a8442fc72be23d4c5c2a22de6c2221d0d10995de3369d.jpg) + +![](images/893177fa574029524636ef8912dd01e02512e12b3283b4989f061a975b548abb.jpg) + +![](images/70b446842fef8024945eab60f43a8c4a1d711050b5ecb5af37278f7920a9ae42.jpg) +$①$ Egyptian $②$ camel + +![](images/92ca79c97ac7c31d23c23ae671252f2bdb2a88ed128320f4bab4d62afc9384ab.jpg) + +![](images/87b43aacfad3f2d6a44154d5e60ca3211d525655628fdd285030ac164b6f1867.jpg) + +![](images/0a8b50de0dd846a31d19f0dd62b6bd9d4f045f52d5329aef9eab55d9c070d96e.jpg) + +![](images/10536458609ff44adcd7434219b26a9ea41ab610c4c688971f657c8b6fa4888d.jpg) + +![](images/5dc4c4d674a716f323b0cb7b241086027aac0d476d5163626ddde32dbcc61ca0.jpg) + +![](images/ffe84e9043ff6e8f92194874d7d27288be2d26c8e91d83562e201e58ca5ab41c.jpg) + +![](images/18a48d955872297e7ce09b658167c4e8ac533307fe48075c14f12b197dbee285.jpg) + +![](images/5a9d171d642e6abf66d448d3f435a34313b1cac77e880773139bd9aa262ba857.jpg) +① monkey ② horse + +![](images/de45e8f930db1eeaac4fede428cf54ae7ef011337c7f2b74cc8b80c654f70732.jpg) + +![](images/445bbba607d7dc6596c346c447de897e419f5837736cbb207053b84ae9766d34.jpg) + +![](images/1e46218b18b415d8d479419ca037d61ce958e43287bb987d99255e0d23628789.jpg) + +![](images/7b0e858c91086f553fe09b788745d1ce1521e3422cb3175dff2d0e37bbb1d3a8.jpg) + +![](images/b61ad668977005450c53ef08949d197748a3f7801d60c8f7fd474d296ce5b99d.jpg) + +![](images/47640aa6f234dff4287c12d3038fa7b3271be0ba1fa562c0cb2d88e29d75b951.jpg) + +![](images/73dcb322af59cd1c5abf71af563e4c9da3d3365b73c65986b77d575bccacb567.jpg) + +![](images/b52beaad31afcf7f32dac8ff7831d6d900361db0f6a56303efe257d9feadf755.jpg) +$①$ princess $②$ unicorn + +![](images/a143c383114355b49a61b809b42908dc6b64a7a11c1a607301b096017defeb8f.jpg) + +![](images/5e733bc58efb3ac1f3457fd18b4b7b1c5e331ad7d1c99e97cea44f0918f7495d.jpg) + +![](images/3ca9c540bad3a2e10ba0a7e9919ab1b162724e58333fee20eeea30b677a2e512.jpg) + +![](images/032644bf8ce7159f39cd1229f0c811928d728fd542236356465ecaed80d179f5.jpg) + +![](images/5688cbc5fe5fec16028dac3058b015efaf255df13cedf1e643c42bf03a5c538b.jpg) + +![](images/df2cd478fcac378bfe440dd751de0e8660890d0d4da93c1ff5e413022f327636.jpg) +Figure 13: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/57e7f1fac09065edc18a5486fbdc4eff0e70935682637314b2f3f38b64847053.jpg) + +![](images/5d77a880a826632354056091e6506779cd8942c5c9db2f64d7c799b97b729b1a.jpg) +$①$ soldier $②$ tank +① Spiderman ② Batman ③ cat + +![](images/5efcb43d878637a907a300583f602ce318978f6867d16f5483d0c13cd6452878.jpg) + +![](images/e0e24e349af177f018cd244acc37c52892a2b6076b8c6a8b34d2e78e698f8ccd.jpg) + +![](images/302068f3db115feccf4a2501a8ced4f3248962ac4c8913b35bc8034ff02a893a.jpg) + +![](images/ef26eb7316660abf359afdbbdac3d2fe140a4057e37cdf3fc38da19bf40d9885.jpg) + +![](images/c4936d3c42446965baabae051b084c0e0a03f6e7fafbeb5a95110951a7cff4b2.jpg) + +![](images/7a2d1c76755180f8dfeaae1ce331b681e878c09a54d74e354544a9280bdb40c8.jpg) + +![](images/939525cc77a8defe84e7523d4bac069a1b7af456b8b0f8daf70f99c3a543836e.jpg) +Reference Image +Ours + +![](images/6a24bb29d76c10bd194c9a1b22cf16086e2640cbb4a78ec0d747e9ef1f659905.jpg) +ControlNet +$①$ bear $②$ fox $③$ polar bear + +![](images/b365a264951d3221c566da90475ec5f5ab95b547ccf9e3978ecc4ef2063293d8.jpg) +BoxDiff + +![](images/6f35e9049ce21998d8ed322385f806e579706b5d864248837d12f6802ada9dae.jpg) +PnP + +![](images/e1e69202e58fed540e2ac8fbb38c67c4cbd98cb1588ffb1a53fc842d9c636693.jpg) +MAG-Edit + +![](images/cc34577799e4644e5603d83840ca55b1b8e1f150d62c34b0796dc06b258ddd24.jpg) +DreamBooth + +![](images/c45a1c451d27065019ad581299dfe4ea34afde56b674e23c765aa3a1cdcab375.jpg) +ReVersion + +![](images/6efd94ba3189a1c32b45ef059aa076cf2b0c3de7550a3b38f95b74725e9273a9.jpg) + +![](images/5d8ce6cf3c48c1aa672f7fc30212fcb04c5ebb600e13bf1542712429bbbbeab2.jpg) + +![](images/a91404d66dd5a7d30a4db8bd95e2137744a79f8e4731f6475b61c3c41ce7d005.jpg) +① tiger ② cat ③ lion + +![](images/d87b7fa026c6c26a41c6900136e49adb704bcf1af9502f3c541913e385192e09.jpg) + +![](images/242c089968d34ddfd98521ba261f4171dbda3c6c3e4c01708cd5076fd40d6f82.jpg) + +![](images/38c9e684ae43cd1403023246507ff18301d1b226b5103df31b700da9120ec8a1.jpg) + +![](images/23b0ac64fec1c25891937b8b3a20a4673fd9ac32f9c5e19f4208b73800bd7530.jpg) + +![](images/e94f183d88af5aadde9847a6229581db215acfabe3714185af07513ea837db06.jpg) + +![](images/304594029d2215dac64a8a35d9e875be69178c9dc48f3790100d5ba5d5835780.jpg) + +![](images/837666550d69a5b65e3c2f0ff20b1afd9f8d14675c35ce14c079272e53a9110d.jpg) + +![](images/78295f788c1d9285d01857b179308ccd7b9f7fdd3c74a0cac42f792fce7a9318.jpg) + +![](images/31babd386bfd99c45e67556e113ce902191c42479df8d4bd31f537339569c0c3.jpg) + +![](images/4c11d16960e299ea909db41ac093843027a8dd0ef223019c8beae82a4a231fa6.jpg) + +![](images/fcca6349a7b4ee849a97a0f414bb7e084786f8f215cf2fa865071cf8cb98c926.jpg) + +![](images/f0427769a343aa4fcdfb7391cc58a7a8006a391de0a34beff0f1f9203cfefab9.jpg) + +![](images/5b866805d2cd42382666a17f548d27d21aec2da910ddb00ad387a4eea49e05b6.jpg) + +![](images/11c73ad59cd1dceec153e038aaf93de7a3d44bd6b28f30b2b50249de68664d98.jpg) + +![](images/b275b44efb62c2cfb4bd8219ab282297939c480e6f7b1cc965a8af81a62a51d2.jpg) + +![](images/196d21c16c5b994931bde07608a5ca0489305e562e07b9619171f343c94827e2.jpg) +$①$ bear $②$ Spiderman $③$ panther + +![](images/1fcec1fb4d3d2264d2c7868e66f8bb6bbdfa01eb03cf8d14c45b41506ea0c80f.jpg) + +![](images/3e6792ed01c3ab3c9c3cc8df7c76a408944b39b5030c65fdeb7568de1a3bb54e.jpg) + +![](images/ef1d498aec39a84593af0a641945e13bbd667a98fb4e6561aa3d5366a05086e9.jpg) + +![](images/c9a018c50ad3c622c7be713f5ce0a574c0515aa3e02784efe78e152969d0193c.jpg) + +![](images/a67a0e0efdaeec70211bd22d095936a7ad87afb192e58a0e61fd0b89c79c3c86.jpg) + +![](images/760cc3ab525d09022aa12a5c42b247f5ec2b918f554ecaf2a6a806f572a47c73.jpg) + +![](images/9f998e016d4f25bedda40a5cbefd5e71413e16fb7610d311455345bcc255466c.jpg) + +![](images/6c512309635966367243b9010464edea86ca9c23d7974c85a3737a21d74d240b.jpg) +$①$ cat $②$ dog $③$ orange +① tiger ② lion ③ meat + +![](images/7f2592e2e06ae2021ea056d209f4aab90c21f8c6a065a5d9b0b5029c4a6efaf5.jpg) + +![](images/86b6048323265ee8f200951bf675071687f44c260c920c1464530c96f6351666.jpg) + +![](images/80cee15c05b8b8ee2046ab4887064d929db6366d02a41c4a9655f11a7ea90ba6.jpg) + +![](images/fe12745e37231f6771dcf815867f0f708896c59dea5587b00bb2d4aca99b0d92.jpg) + +![](images/f61a77de4a5041cf12eed4571182080a0e70fea111d9f52746f7ebdc2a98bb06.jpg) + +![](images/b9b416f1d981fd6de6a1af129c5f0cf70035a71062285a29bfd6b12fcb3e10d4.jpg) + +![](images/6293c327fc89de12bc42fc7041b4e8c7211475df513711bb252d256898770760.jpg) + +![](images/7b6daa01b15519461d092a49d3ecf377479604f448e5678f4670b3b4a6db08a5.jpg) + +![](images/cfc9a90971b496bf09f5ec13b5e63ced18457c9b505e6882763e14d814cdb6ee.jpg) + +![](images/05c25968288c7a269762673b7f17afea4a2b94070af6259673ae4ddd51fedb8d.jpg) + +![](images/f566564d91d139363ac8b15c9c0b37669d878b413b93d3823846930f33caa452.jpg) + +![](images/c3cca625712ab69630c9937f8ec88625ccea055bb3f6fa1ed547074f928db3c3.jpg) + +![](images/3f5abfadaf6f30d9e1dc89f6cb2eefc708aa6719b6208b941775b3583e5ca0c8.jpg) + +![](images/f54cf2ddcb08af0227121ec56487ed40201f265cb38a6736568346427ba15581.jpg) + +![](images/db8fdc9ded49d54325781ead4f3f99cc70743e7e16505e4c6bffb1fa7f4719de.jpg) + +![](images/d125a076df09a6fe93ce9bad9e1522732a6536a6665637312997588360256205.jpg) +$①$ dog $②$ dog $③$ apple + +![](images/6225ccf51411c0b773f8bf48b8138e0f7a112f4fed5c851bf908cca48cecbce3.jpg) + +![](images/0bcf384a4d9f9666d43c7f1fe497ee6c8b0b59fa8e0312214b53c11e052b5a80.jpg) + +![](images/f932b2c2a1584fd6a0f5bbe9316678d2ba40ebec20ce15363ca36b0b5de64e47.jpg) + +![](images/29d7e23ca0f4b32fc629e45d269f97fea59dbf41aba964792d1582d80879cadb.jpg) + +![](images/ae181d5c81fa863c608ec6f93c00905d31b6f3a97e53c28b5533e668d6bd450a.jpg) + +![](images/b149407ad2a027aff496d90a9b63fb58a0607a55fc64523ca13f9ffa60f0dc9f.jpg) + +![](images/d164c7140569e170e0be68357295a5a344c79e76c4900eb906697455f4930dfd.jpg) + +![](images/5ec82a5316a68da276ce83fbf9531b8b9569cfe7119401d748053317b7459e89.jpg) +① monkey ② lemon ③ orange +$①$ robot $②$ cake $③$ donut + +![](images/3d0bb1bfc1c248071e58ea2135087b6887ee0cdba3174126da776e0c8e2246fa.jpg) + +![](images/061e332762e61243995682e88f3d00e3d09f9c15c394557ad1357732861a92cf.jpg) + +![](images/e79bc0c778f07f24580974c0aa33c1619d081beeb111e93ed3ffea8ce514cc51.jpg) + +![](images/99b3ecbbe95a1b07b558185004d55546787b4ef5c59f12445009fb9e22254aee.jpg) + +![](images/ced0f242c121a72df4466dd615c46e78cff8a344bbfb28e15abbafde15bc3089.jpg) + +![](images/e0cf22acfcb321cf392d8bbb0882c8da6492addd7d7c7d4653f462e31de5e2ab.jpg) + +![](images/f0a5198b431d1a6baf2a342b2a904f3368e686f5a60e6e5d06a72b1d4007c5b8.jpg) + +![](images/21c2a8c8dd5dd78dc639d173d983b8ddee94b4aa50a06151b5e1257056ad15ec.jpg) + +![](images/f48b595ab84204fe67491ab66d71af2c68f7ca2c50d84c5ba664c064b113cc32.jpg) + +![](images/942ae9915231a0b706a70f50a0aed58f5f8c4e50f43f8d90c49d42f4b63021af.jpg) + +![](images/8eafe797280bcff3b8def56211db39d23f6ee9cd183ed680dc287228d1e42867.jpg) + +![](images/19c4952f03855d05587a4cb14d386e64de4cd31a8d280b955bc5a2d71b240842.jpg) + +![](images/9824582b5466e8c1fa8c8eb698043e172e0e81029ecbcf9f01058f05abd0e1c0.jpg) + +![](images/b1fde1be7a3b019766644a1d43e68726eab285062efcd32980f6edd4ccef415f.jpg) +Figure 14: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/e13892b13c7ead4df40c8c910d7a10be7e36271007d2bf74001ef8d4f039c68f.jpg) + +![](images/930a40f812c7ac673e23dfe95980d8967be4c13fe0dff842b8d4f994c8803766.jpg) +① Spiderman ② orange +① Batman ② orange ③ st + +![](images/36abb10079934918eba43a11725a1cfb28468153519c3afa22edff7470eb00dc.jpg) + +![](images/4ed194afabb5b39a87fc4f30e903c3c3247da53aee766c6adca0b57ddef164a4.jpg) + +![](images/2dcf071ccafa3358e23c77257aa416e3b40aafc465e29eb6b9c653fae6d47d33.jpg) + +![](images/af634f38e06ad4c44c18688c8e4dca0ab72b1db4e4f2b968b6b2e27fefd0bd34.jpg) + +![](images/f01656432ccfb99e15ab7d36e969096d654e3885ceb75b692e205409127cbf33.jpg) + +![](images/01b9184a94494bf9b7e64523efb4014ac6e868e2056ad41e4bbf25e0b6a9cced.jpg) +Reference Image + +![](images/32be5942f040725384314ff6e8c633c0795d4c6a78da3a9f18acd4a0d6f68304.jpg) +Ours + +![](images/9905a58ac63c44d4fb68de577c5d817a8350c2f808fea9f70c33ef4a16749410.jpg) +ControlNet +$①$ robot $②$ bird $③$ apple + +![](images/ed7d3d5af8d9314766f60c9ddbc7cdec785ac8f8281c2217eb3d6f4ecfb6a068.jpg) +BoxDiff + +![](images/6478498577f98f6680cbad3fa6111a3911ab6f004dca2aef80c425234693393d.jpg) +PnP + +![](images/dabda27a175022dbab4ce4bbb9edea9748b6df69c284c61903e61b90484c029b.jpg) +MAG-Edit + +![](images/c6cd901c50bf1da787f69ec2e1734d4643708b814c96bf458606b0fb5e608d94.jpg) +DreamBooth + +![](images/48e1e2a1ca6f55e92449ba673fa60c760a4ddc903696ff04508f1a921abf4041.jpg) +ReVersion + +![](images/26d35af792157dda09cf2509c565eb870359d075a994d9c5ea28138b33025f48.jpg) + +![](images/ae5ab5e238d4ff025cfc3f32d78654bc16240a653539ca963f582602ca9c1c51.jpg) + +![](images/5794e37e64d103ed27dfe1933691363ff9805160e400adbc05f12eaca40e8318.jpg) + +![](images/8c6ca98dc32f891421fac4fc9a6460b40cc171f6a603b831178eaffcb0b55f1d.jpg) + +![](images/3e1e9b882b54b79a743aa30dcda5cd4b81c232a50556cbeeed7a8316a6af607b.jpg) + +![](images/8a5ca28df2ef21755f26c02102c88b6ce6bbfcb12854c71d9beae85d0ab875c8.jpg) + +![](images/beed0224605dce24595d9d0238d645ce6420d0924a3a6975775e6a094f071f5c.jpg) + +![](images/dd2331d6fcf67aeea82f927c32776dfdcf7a6ee99b3ca95f8ac023821b488d4c.jpg) + +![](images/f8fb0bddc61c97cc1d2da5441e710887dda75d0fa76baac7f082c320afe41481.jpg) + +![](images/b2f5e8b3bd9a7abb5dd0760d38c0bf678bf7cb491133b7f38720296fad908560.jpg) + +![](images/d18f23fe2b5d5233a8ce38015c13fff16306d644cc9c79916bdd0655cd395dd8.jpg) +① Spiderman ② cat ③ tiger + +![](images/de2ed9fb670dd84e54aef60345fb4ec47a491bab9f34cfd47ef10f54c40e940f.jpg) + +![](images/ff5df5bb4b5e4824281fc34e367f4076c5f74417e5693cb71f07869f72c3bed8.jpg) + +![](images/09982e0021608420a830661320d9a7735fcd9835bd72253e95aef3c5427b58a9.jpg) + +![](images/d80d803377c068ee46f567864cf3327aa5b0af2348f70728ae54217ba60d3a8e.jpg) + +![](images/06b191789bc5c46f64496b567efb80f717f885c17aefe8f0b93d42acaa78b7eb.jpg) + +![](images/8e7cae16512c85cb058e443e02d330b8964a551c7a7fa3433968418fca8c9d41.jpg) + +![](images/7a85b0d0cd55293a14d0ae5001b9fdbfe746ab2f19ed31080d6a917dfaaadbfb.jpg) + +![](images/740b6036e68d7fbf575c113231ae80fda900a44de18f8fee3544a38720d5e546.jpg) +① Batman ② wolf ③ bear, cartoon +① Tarzan ② tiger ③ lion + +![](images/6f13574a0f748fd8ec933816d1533da651537c89b254ee38dd87e5708a1f43c5.jpg) + +![](images/4b33f88376578ed2aa331eed172115915bab9423f4195a560defb550d7617c15.jpg) + +![](images/1f1cf085cc4cb0eac6df3ccee0a6994bc617e8f28355c18a1dc7b331f6720bb1.jpg) + +![](images/60bd6be43a3b22632d7e63d1557709eb1b46d07950285f1c5e7b2b49748f101a.jpg) + +![](images/1947aca8b390763ede27c56300485c5bea817845cffa55c5f23aef65254d5ec6.jpg) + +![](images/4618b1eb6301fa81c1a47f600d0bb8d8518706c260d2b5d6eac22eacdc734422.jpg) + +![](images/ef4bc16eda2d2212af514944ba14ae696c882c57abc0ca9a5d5a8b60b787ecbf.jpg) + +![](images/873c4d9c351337cdafe4b1c2bb19df3db6ec30977b586f22623f8c3f3b7af0ef.jpg) + +![](images/26dfb867ad1e14fd66729fc1059c1a510a8e56db1cc005320877e9be9f5ab6f5.jpg) + +![](images/72cf2fc9b3dee697fdca558cddda71b4dcccb196e8553aa822a7451841f35a47.jpg) + +![](images/7ab0ec177dc1e61511bb1068f48c3502455a21d4043f9dba17ad7198f2811e50.jpg) + +![](images/4e2f30fdb0fa28b58165bfa2a94871ebb108518bf0189728ecc73e67f6f7ecf6.jpg) + +![](images/5e979509984ca571f7f13ff3c487da9059c0f96ef2b649b0eb732fd7721659c8.jpg) + +![](images/33b90800a16df7ce5ff6e79c1f7fbb9e38833213b499bfc3d0c023dc21abd5f8.jpg) + +![](images/5375098a3b80bfe14b276a72f1f4778c06eba55fccf68b4a0565c2204987b07e.jpg) + +![](images/97aa17ee33531006d5d75e5da033181570fd4e1e7728bab592b25ea938a625cb.jpg) +$①$ bear $②$ tiger $③$ lion + +![](images/15aacff156df98d09f6928fa12e744698eaef23ae0da7fc4ad4b5625d2bfbf42.jpg) + +![](images/cfb5b5587c61f997fd57a0ebcdae62a34ba676dc47123501fef83f2c227f6ef2.jpg) + +![](images/6b8b520104402410647505bccc3887e88908dd0cf371ba818c449ac885cf9b5c.jpg) + +![](images/f8a0049fe2851eafec7bdd6baf5864d9535ed31c23fc8abba2dbb784748cb034.jpg) + +![](images/7f565e3881cd60f45e6d92517830a34a4209d56f4be82b623ebee1c86bf75356.jpg) + +![](images/487e634ce4079c7659f186d500e3ebb395a702be827b568771721021db412c6d.jpg) + +![](images/161506b0cd57d083d071e086b6c01424863992c068e37a58faa0ecfb7f24b33f.jpg) + +![](images/0ce7efbc236a1db7d94b39ddad504ad1cd78273d743de2079c8ed9ec3790b1d9.jpg) +$①$ robot $②$ tiger $③$ lion +① skeleton ② statue ③ m + +![](images/c5ff474d11359c78c48a21bbce43929877fca5531f1723b0133a7fe5c03aba80.jpg) + +![](images/88f5f15f698695cdc6d31307957be1cca703295b80bb3b156a5b16df6c5cb029.jpg) + +![](images/336d15a0bf48ac682640d36c1a40bf2d653f597c47e619bb7e5a8f6636a400b9.jpg) + +![](images/70305baba6605355dc8bf9578311f96dc921f0353ae84f39898bdc1171d6bedc.jpg) + +![](images/b30a2375e62019496e58b590a871123b7806cb7dffd59375ea43e3dc7344d0ed.jpg) + +![](images/28736fe041a5c89b47624852d02e219789ed078d97b0b79eae6c2394a0d3e89d.jpg) + +![](images/0698207920cb5161da1687bbd6edcfb115ab257d9c9f37108814c4b2a548cc86.jpg) + +![](images/422093dbe8a0c19588b91fb57b8dc87bcef8af2b48b5e7eefff81861970ad547.jpg) +① Wolverine ② Spiderman + +![](images/5418915a7a5d0ecdee9a6c958070dce21024fd39eb3fd9d0298deb1763003583.jpg) + +![](images/e523ee0b0f4589127c1898c76d30a3cdb4c6b0f1da71fca49535d69a78683e7f.jpg) + +![](images/e6ffd1c23714dda0c5d53ab99696925bf1efed01fb8e53c79f6b66b40fcce46c.jpg) + +![](images/1c5472ae92a16976e5f05f1c49740f63f9eab9f90662708f4532a41d53afd43d.jpg) + +![](images/972d8ee352ded80eecf7ea5bf650d30fde34f2c2d66ee6bbf97afe2a39864513.jpg) + +![](images/837cda102724a45fea92afe688c343f525e14b43943b553995f9f9d45e091886.jpg) + +![](images/3276bc7189924ce131107d6dd7afaa4b10aa747266ab0d74fbf456f3793a5184.jpg) + +![](images/08fb8a220fdeffd92bdd5cd57f56919e01de7ffc545ec81e7f4c8df8d5602c9a.jpg) +① Spiderman ② robot ③ + +![](images/779d398faf0864e49b5e46bd30801e26960e88c4fe71702bee5089ec627bd928.jpg) + +![](images/814486f168f74ff1ec9287d1369f2e0b95bbd8e5b6a4c2670a3c3e658e8b3b6e.jpg) + +![](images/5238192826b087eb3678a843c35c7e064980085777cccfe68c5e769d9d9cf227.jpg) + +![](images/cd99b4c0e5f6924bee7fd423b0d7a74b2e3f47c1e0f36e666b204f62ba0ad95d.jpg) + +![](images/225415c20f4f47119f073ae051e3e69225c479100f780025fa3fedea2823601b.jpg) + +![](images/55739ef3cc07db3da158d2bf6335ff07d99e6f4139c3ac697f7c11ea7a2b5cab.jpg) +Figure 15: Comparison of Event Customization. Different colors and numbers show the associations between reference entities and their corresponding target prompts. + +![](images/763f478f50429a1dec939e6914a936c2878e41b44dd40b4c12a83283de0c407d.jpg) + +![](images/c0c44652f1f10a47392c29bdaca9812a9fecad02bbc8da7b5f67578d2a6ec945.jpg) +① Spiderman ② robot ③ + +![](images/4dd69b0459a9aa656891000a4736ac93bd980760d4d3e6d7e40ed83c3c594d23.jpg) + +![](images/84c60c62c8f8a03b6f99820f8e3dd58588d1282c20c2b1c1d704b9dd79c54abd.jpg) + +![](images/6f171b2d691e075f96620edbb17ef6b00e4d4f2e0bfe38f2314f32d6f8429af9.jpg) + +![](images/beea9086e161289c5182c2788d1cc0cbcb3a54f0df4b545c75e0459941464515.jpg) + +![](images/9a6e5482f74b565c5826c1fe2ebdb256175d94052ea2d250d695de65da6146ba.jpg) \ No newline at end of file diff --git a/ICML/2025/Event-Customized Image Generation/images.zip b/ICML/2025/Event-Customized Image Generation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..45b7fd58b0371bf7761cd22a22352cee792e57c9 --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3c1d411cb0bd77f698cba4b8e4b406b4432b98cd4ba1332ffe3a6e57b68ad4f +size 4131277 diff --git a/ICML/2025/Event-Customized Image Generation/layout.json b/ICML/2025/Event-Customized Image Generation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c50ce5c5e52a582deaa278bbc5f204ef86876172 --- /dev/null +++ b/ICML/2025/Event-Customized Image Generation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:494cb08708bac84aa6afe2a93cff19dc4e5f4446c35114a1037b83981e5de37a +size 1412425 diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_content_list.json b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fb90ad5206418b6c9ffca4aabf2a2f4f02439c94 --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffcc3f094c90a40d4125c92f084e85d741da14eefb6a0f19242d8e4e58a469dd +size 176040 diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_model.json b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8193b123a129f73f9d53796a0c1cca626091ded9 --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1df0c9a0074a3c2c9ddfd52a11a00d3144c7d75632b19ec9fa274ad4cc132981 +size 209193 diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_origin.pdf b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..79182ee7fccc13a10b6d33ec2afc9c92c665fc16 --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/b41d3b59-5b26-4ff5-8a69-2cbcfdedaa6c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:662c2d45a4415d2a68e01ac607e20fa9c7554d920192339bfb560084f9ab19e5 +size 3191694 diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/full.md b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..104dc5d3ce461d8bbc61ee9a2ec3e8a8e2d37f8e --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/full.md @@ -0,0 +1,767 @@ +# Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in Superposition + +Zheyang Xiong1 Ziyang Cai1 John Cooper1 Albert Ge1 Vasilis Papageorgiou1 Zack Sifakis1 Angeliki Giannou1 Ziqian Lin1 Liu Yang1 Saurabh Agarwal2 Grigorios G Chrysos1 Samet Oymak3 Kangwook Lee1 Dimitris Papailiopoulos14 + +# Abstract + +Large Language Models (LLMs) have demonstrated remarkable in-context learning (ICL) capabilities. In this study, we explore a surprising phenomenon related to ICL: LLMs can perform multiple, computationally distinct ICL tasks simultaneously, during a single inference call, a capability we term "task superposition". We provide empirical evidence of this phenomenon across various LLM families and scales and show that this phenomenon emerges even if we train the model to in-context learn one task at a time. We offer theoretical explanations that this capability is well within the expressive power of transformers. We also explore how LLMs internally compose task vectors during superposition. Furthermore, we show that larger models can solve more ICL tasks in parallel, and better calibrate their output distribution. Our findings offer insights into the latent capabilities of LLMs, further substantiate the perspective of "LLMs as superposition of simulators", and raise questions about the mechanisms enabling simultaneous task execution. + +# 1. Introduction + +Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, with one of the most intriguing being in-context learning (ICL) (Brown et al., 2020; Xie et al., 2022a). ICL enables LLMs to perform tasks during inference without the need to fine-tune for that particular task, simply by providing a few examples within the input prompt. This ability has sparked significant + +1University of Wisconsin-Madison 2University of Texas at Austin 3University of Michigan 4Microsoft Research. Correspondence to: Zheyang Xiong , Dimitris Papailopoulos . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +interest in the research community, as it suggests that LLMs can adapt to novel tasks on-the-fly, using the capabilities that they acquired during pretraining, and the context provided. + +While ICL has been extensively studied from both theoretical and empirical perspectives (Xie et al., 2022a; Agarwal et al., 2024), many aspects of its underlying mechanisms remain elusive. In this work, we study a surprising phenomenon related to ICL that, to the best of our knowledge, has not been thoroughly studied before: LLMs can perform multiple distinct ICL tasks simultaneously, in a single inference call, a capability we refer to as "task superposition". + +Our study suggests that pretrained autoregressive LLMs such as Llama (Touvron et al., 2023) or GPT-3.5 $^1$ (Brown et al., 2020) display superposition of tasks purely in-context $^2$ . When presented with multiple in-context examples from different tasks, in the same prompt, the models can generate outputs that correspond to solutions for all these individual tasks. For instance, given examples of addition and translation, the model can concurrently produce correct answers for both tasks, as well as the composition of these tasks (e.g., the result of addition translated into another language). + +Figure 1 illustrates this phenomenon. In Figure 1a (left), given in-context examples of addition in different languages and the query “ $91 + 83 \rightarrow$ ”, the model generates probabilities for the correct sum in various languages, demonstrating its ability to perform addition and translation concurrently. + +This discovery aligns and lends further support to the view of LLMs as superposition of simulators (Janus, 2022; Shana-han et al., 2023; Nardo, 2023) and the Bayesian perspective of ICL proposed by Xie et al. (2022a). While not a mathematically rigorous formulation, we can conceptualize the output of an LLM as a weighted sum of conditional probabilities across possible tasks: + +$$ +\mathbb {P} (\text {o u t p u t} | \text {p r o m p t}) \approx \sum_ {\text {t a s k}} \mathbb {P} (\text {o u t p u t} | \text {t a s k}, \text {p r o m p t}) \mathbb {P} (\text {t a s k} | \text {p r o m p t}). +$$ + +![](images/3318712a56f1077874215be1ee53aa90e7d582039fc7420a54a6c11149074222.jpg) + +(a) (left) Two-digit addition in a variety of languages. (right) Naming the capital of a given country name, naming the continent of a given country name or capitalizing the country name. + +![](images/0f6ccac269f6c2ef20ebd38a7a64ba45b2a1ccbd6c437cebce83d48af6056688.jpg) + +(b) (left) Tasks copy (op1), copy (op2) and op1+op2. (right) First or last letter in upper or lower case $^a$ . + +${}^{a}$ In the actual prompt we use space to separate each letter in a word so that each letter is a separate token after tokenization. + +Figure 1: LLMs can perform task superposition. (a) Llama-3 70B and (b) GPT-3.5 Turbo are each presented with two sets of tasks. For each set of tasks, we show an example prompt such that all except the last row are in-context examples of one of the tasks and the last row is the query. We provide 20 in-context task examples for each task in the prompt with order randomized and provide the probabilities of outputs when correctly performing each task on the query. + +In this conceptual model, $\mathbb{P}(\text{output|prompt})$ represents the probability distribution over possible outputs given the input prompt, a task can be thought of as a latent variable representing different capabilities the model might possess (e.g., arithmetic, translation, sentiment analysis), $\mathbb{P}(\text{output|task, prompt})$ represents the output probability distribution if the model was specifically attempting to solve a single task, based on the test example in the prompt, and $\mathbb{P}(\text{task|prompt})$ represents the model's inferred probability that the prompt specifies a particular task. + +While this mental model is a simplification of how an LLM operates, it provides an intuitive way to support the task superposition phenomenon we observe. Our findings lend support to the idea that LLMs can simultaneously maintain + +and utilize multiple task distributions, resulting in outputs that reflect a combination of relevant tasks. + +Our Contributions: Our study makes several key contributions: + +1. Through extensive empirical investigation and theoretical results, we demonstrate that task superposition is prevalent across various pretrained LLM families (GPT3.5, LLama-3, Qwen). +2. We empirically show that task superposition emerges as we train on one task at a time. +3. We provide a theoretical construction showing that Transformers models are indeed capable of task super + +position, and have the capacity to implement multiple tasks in parallel. + +4. We explore how LLMs internally compose task vectors (Hendel et al., 2023) during superposition, and show how convex combinations of task vectors can reproduce the superposition effect. +5. We show that larger models can solve more tasks in parallel and more accurately reflect the distribution of in-context tasks. + +We believe that our findings offer new insights into the latent capabilities of LLMs and raise questions about the mechanisms enabling simultaneous task execution. We believe this work sheds more light on the ICL capabilities of frontier language models, and offers a glimpse on potential applications of task superposition in practical settings. + +# 2. Related Work + +Theory and practice of in-context learning. There is rich literature which formalizes in-context learning under diverse definitions. For example, prior works study in-context learning through a Bayesian framework for task retrieval (Xie et al., 2022a; Panwar et al., 2023; Zhang et al., 2023), martingales (Falck et al., 2024), optimizers (Akyurek et al., 2023; Oswald et al., 2023; Dai et al., 2022) and more (Reddy, 2024; Olsson et al., 2022). Other works confirm the theoretical framing of in-context learning by using it to implement a variety of algorithms and methods (Zhou et al., 2023; Ahn et al., 2023; Giannou et al., 2023; Wu et al., 2024; Laskin et al., 2022; Zhou et al., 2022), or to approximate general-purpose computing machines (Giannou et al., 2023; Wei et al., 2022). + +To bridge the gap between theory and practice, many works have used these theoretical insights to study in-context learning behaviors (Agarwal et al., 2024; Li et al., 2024; Choi & Li, 2024). Bai et al. (2023b) shows transformers are capable of in-context algorithm selection. We would like to note here that while one can think of superposition as an algorithm that outputs probability distribution that calibrates to in-context examples, the setting in Bai et al. (2023b) requires training on all such algorithm that calibrates the output distribution to in-context examples, which is likely not the case for pretrained LLMs since labels during LLMs training are in one-hot format. Therefore, while related, superposition cannot be explain by the framework from Bai et al. (2023b). + +Other works study the factors that influence how well models can learn through context (Raventos et al., 2023; Chan et al., 2022; Wei et al., 2023; Lin & Lee, 2024; Min et al., 2022; Lyu et al., 2022; Lampinen et al., 2022; Dinh et al., 2022). + +The development of new architectures such as state space models (Gu & Dao, 2023) has further motivated studying whether in-context learning is prevalent in alternative architectures such as Mamba (Park et al., 2024; Grazzi et al., 2024; Zeng et al., 2024) or in looped transformers (Yang et al., 2023). + +Steering models through in-context learning has been a growing area of interest. Recent work has hypothesized that in-context learning can be encapsulated by a high-dimensional description of a task, which can be used to replace, (Hendel et al., 2023) compose (Todd et al., 2024) or augment (Liu et al., 2024) the latent states of a model, in order to alter its default behavior. Task vectors can be combined via arithmetic operations to solve a variety of tasks (Ilharco et al., 2023). Prior work has also been investigating the power of tokens in defining a task (Bai et al., 2024). + +Other definitions of superposition. Our findings on superposition are inspired by notions of language models as multiverse generators (Reynolds & McDonell, 2021; moire, 2021). One consequence of LLMs as a superposition of tasks is that the outputs may collapse to unintended simulacra, a behavior known as the "Waluigi effect" (Nardo, 2023). + +Superposition has been defined in various related contexts of learning models. Feature superposition (Elhage et al., 2022) refers to a neural network's ability to represent multiple learned concept in a single neuron. Though our discovery of task superposition describes the same abstract idea, we stress that it is distinct from feature superposition because task superposition is most apparent in the final output of a model. + +Superposition is also described as a way to store multiple models in a single set of parameters (Cheung et al., 2019), processing multiple inputs simultaneously (Shen et al., 2024a; Murahari et al., 2022). In our work, we demonstrate task superposition directly as a result of language pre-training, without the necessity of additional adapters or decoding strategies. + +# 3. Problem Setup + +Notation. Let $\mathcal{X}$ be the input space, $x\in \mathcal{X}$ , and $\mathcal{V}$ be the output space. We define a task as a function $g:\mathcal{X}\to \mathcal{V}$ ; we denote a task answer as $g(x)$ , and $(x,g(x))$ as a task example of the task $g$ . + +In-context learning setting. Let prompt $= \mathbf{s}_m \oplus \mathbf{x}^{(m+1)} = [\mathbf{x}^{(1)}, g(\mathbf{x}^{(1)}), \dots, \mathbf{x}^{(m)}, g(x^{(m)}), \mathbf{x}^{(m+1)}]$ be a prompt consisting of $m$ task examples and a query $\mathbf{x}^{(m+1)}$ . $M$ is a model that predicts $M(\text{prompt}) \in \mathcal{V}$ . We say $M$ learns the task $\mathbf{g}$ in-context if $M(\text{prompt}) = g(x^{(m+1)})$ , i.e., $M$ learns $\mathbf{g}$ and performs the mapping on the query $\mathbf{x}^{(m+1)}$ . + +Let LM be a language model and let $\mathcal{V}$ be the vocabulary space (token space). Given a prompt, instead of outputing a $\pmb{y} \in \mathcal{V}$ directly, LM outputs a probability distribution over $\mathcal{V}$ , i.e., LM(prompt) = $[\mathbb{P}(\pmb{y}_1|\text{prompt}), \dots, \mathbb{P}(\pmb{y}_{|\mathcal{V}|}|\text{prompt})]$ for $\pmb{y}_j \in \mathcal{V}, j = 1, \dots, |\mathcal{V}|^3$ . In previous works (Brown et al., 2020; Xie et al., 2022b) all task examples in a prompt are from a single task $g$ ; LM would put most of the probability mass on a single task answer. + +We are the first to study a setting that task examples in a single prompt are from $K$ different tasks, i.e., we have tasks $\pmb{g}_1,\dots \pmb{g}_K$ which form prompt $= [x^{(1)},g^{(1)}(x^{(1)}),\dots,x^{(m)},g^{(m)}(x^{(m)}),x^{(m + 1)}]$ where $\pmb{g}^{(j)}\in \{\pmb{g}_1,\dots,\pmb{g}_K\}$ . Since LM outputs a probability distribution over $\mathcal{V}$ , we calculate the probability mass it assigns to each task answer $\pmb{g}_1(\pmb{x}^{(m + 1)}),\dots,\pmb{g}_K(\pmb{x}^{(m + 1)})$ . In Figure 1 we depict $[\mathbb{P}(\pmb{g}_1(\pmb{x}^{(m + 1)})|\mathrm{prompt}),\dots,\mathbb{P}(\pmb{g}_K(\pmb{x}^{(m + 1)})|\mathrm{prompt})]$ and find that LM assigns non-negligible probability on multiple task answers. We term this phenomenon task superposition. + +# 4. LLMs Are Superpositions of Multiple In-Context Learners + +In this section, we want to investigate if existing pre-trained models exhibit superposition of multiple tasks and whether this phenomenon is common. + +# Finding 1: LLMs can in-context learn multiple tasks in superposition when provided with prompts of a mixture of task examples. + +We consider four different settings of task mixtures. + +1. Numerical addition and addition in English, French or Spanish ( $K = 4$ ). Example prompt is shown in Figure 1a (left). +2. Given a name of a country, name the capital, continent or capitalize the country name ( $K = 3$ ). Example prompt is shown in Figure 1a (right). +3. Given input “{op1}@{op2}”, copy op1, op2 or add op1 and op2 ( $K = 3$ ). Example prompt is shown in Figure 1b (left). +4. Given a word (with each letter separated by a space), output first letter or last letter in lower or upper cases $(K = 4)$ . Example prompt is shown in Figure 1b (right). + +We provide GPT-3.5 (Brown et al., 2020), Llama-3 70B (AI@Meta, 2024) and Qwen-2.5 72B (Bai et al., 2023a) with prompts of uniform mixture of tasks (each task has 20 examples in the prompt ordered randomly). For each prompt consisting of in-context task examples (e.g., “ $11 + 26 \rightarrow 37$ ” for the first task in the first setting) and a query (e.g., “ $91 + 83 \rightarrow$ ”), we calculate the probabilities of outputs when correctly performing each task on the query and plot the distribution of probabilities for each task in Figure 2. Details on calculating the probabilities is in Appendix C. + +Figure 2 reveals that in all four sets of tasks, all models have non-negligible median values of probabilities for at least two tasks. This indicates that the models can in-context learn multiple tasks in superposition when provided with prompts of a mixture of task examples. + +We can also observe that, even though every task in a prompt has an equal number of in-context examples (20 examples), LLMs do not calibrate their output distribution perfectly with the in-context task example distribution and they still have bias on what task to perform. For example, Figure 2a(left) shows that Llama-3 70B prefers performing numerical addition over addition in other languages, Qwen-2.5 72B is not good at addition in Spanish while GPT-3.5 does not have a strong preference over a single task. On the other hand, in Figure 2a(right) GPT-3.5 has a strong preference over the capital task. + +Additionally, some tasks are "harder" than other tasks. For example, in Figure 2b(right), all models assign low probabilities for task answers of last_letter_cap. The category other has relatively high values for all models, indicating a high noise when prompted with in-context examples of this setting. In contrast, in Figure 2b(left), category other has very small values, indicating that all models most of the time would correctly assign the output probabilities to the correct answers. + +In Appendix B, we further show that, within the same LLM family, larger models can solve more tasks in parallel and better calibrate the output distribution to the in-context task examples distribution. + +# 5. Task Superposition in Models Trained from Scratch + +In Section 4 we investigated task superposition in pretrained LLMs at inference time. We further investigate how task superposition emerges in LLMs during training. Specifically, if we train the model to in-context learn one task at a time, can it perform task superposition when provided with prompts containing examples of multiple tasks? + +To answer this question, we train a small GPT-2 model (6 heads, 6 layers, $\sim 14$ million param + +![](images/b492a34801e074716352bf0f04769ba537663282f2e92cd9004c5a36368a56f9.jpg) + +![](images/767ca0d1da9c1eef8f75a254f4259146f93713e49aa4a538c251c0b9713eb9c8.jpg) + +![](images/8a1c7e1a05a3a58d891f0a208c3269f993217e638fa2e6736b490903ceb6b119.jpg) +(b) (left) copy (op1), copy (op2), and op1+op2 as in Figure 1b (left); (right) First or last letter in upper or lower cases as in Figure 1b (right). +Figure 2: Distributions (0/25/50/75/100-percentiles) of probabilities for correct outputs of each task. For every set of tasks, we tested with 100 prompts and for each prompt, every task has 20 random in-context task examples with order randomized like in Figure 1. Category other is the sum of probabilities of all other outputs. Gray dashed line in each figure is the ideal probability if we assume the model perfectly calibrates its output distribution to the distribution of in-context task examples. With uniform distribution of task examples, the dashed lines are at 0.25 (4 tasks setting) and 0.33 (3 tasks setting). + +![](images/a8ba11198e9ad45d5e95c1f84216e32beea01c0aa44253b975f1f23a5c95d97a.jpg) +(a) (left) Addition in original numerical form and in different languages as in Figure 1a (left); (right) Capital name, continent name and capitalization as in Figure 1a (right) + +eters) (Radford et al., 2019) to learn a family of retrieval tasks. The input has the form “{ch1}{ch2}{ch3}{ch4}{ch5}{ch6}{ch7}{ch8}→” where ch1, ..., ch8 are distinct single characters. We consider 8 retrieval tasks - ret1, ..., ret8 - where ret1 is to output ch1 and so on. The model is trained to in-context learn one task (retrieve one of {ch1, ..., ch8}) at a time in training. Namely, during training, the model is only provided with text data such that each prompt only contains in-context examples of a single randomly chosen task (and different prompts can correspond to different tasks). + +Concretely, for each sample, we randomly select task $t \in \{\mathrm{ret}1,\dots,\mathrm{ret}8\}$ and inputs $\pmb{x}^{(1)},\dots,\pmb{x}^{(m)}$ , where each $\pmb{x}^{(j)}$ is an eight-character long string. We train the model $\mathrm{LM}_{\theta}$ parametrized by $\theta$ using ICL training by minimizing the following objective: + +$$ +\min _ {\theta} \mathbf {E} _ {s} \left(\frac {1}{m - 1} \sum_ {j = 1} ^ {m - 1} \operatorname {C E} \left(\mathrm {L M} _ {\theta} \left(\boldsymbol {s} _ {j} \oplus \boldsymbol {x} ^ {(j + 1)}\right), \boldsymbol {g} _ {t} \left(\boldsymbol {x} ^ {(j + 1)}\right)\right)\right), \tag {1} +$$ + +where CE is the cross-entropy loss and $s_j \oplus \pmb{x}^{(j+1)} \equiv [\pmb{x}^{(1)}, \pmb{g}_t(\pmb{x}^{(1)}), \dots, \pmb{x}^{(j)}, \pmb{g}_t(\pmb{x}^{(j)}), \pmb{x}^{(j+1)}]$ . + +After training, we provide the model with prompts containing in-context examples of two tasks (in particular, we + +choose ret2 and ret6) and see if the model performs task superposition. We vary the proportion of in-context examples of two tasks and plot the output distributions in Figure 3a. + +Similarly, we consider a second setting involving 10 tasks. Given a two-digit integer input num, task plus0 outputs num, task plus1 outputs num + 1 and so on, up to task plus9. The model is trained to in-context learn one of plus0,..., plus9 at a time, following the procedure above. During inference time, the model is tested with prompts containing a mixture of in-context examples from tasks plus2 and plus6. We vary the mixture ratio and show the output distributions in Figure 3b. + +Finding 2: Transformers can in-context learn multiple tasks in superposition even if trained to in-context learn one task at a time. + +Remarkably, from Figure 3a and 3b, GPT-2 trained from scratch to in-context learn one task at a time can generalize to simultaneously performing multiple tasks and calibrate the output probabilities according to the in-context task example distribution when provided with a mixture of in-context examples. For example, in Figure 3a at the mixture ratio $\lambda = 0.5$ , meaning that 50 percent of the examples in the prompt is from task ret2 and the other $50\%$ comes from task ret6, we can see the output probabilities for task + +![](images/8f77ddf743179f6ff8dc30263a680db551217156216e5ceaf68431b92d05ec8f.jpg) +(a) Trained on retrieval tasks and tested on prompts with mixture of in-context examples of ret2 and ret6. + +![](images/82eee8d66f5411a8d8935d82b9c14cdb882aacce055083164c1313f9af91d199.jpg) +(b) Trained on addition tasks and tested on prompts with mixture of in-context examples of plus2 and plus6. +Figure 3: We consider two different settings of tasks: (a) given an eight-character length string as input, consider ret1, ..., ret8 where ret1 is to retrieve the first character and so on; and (b) given a two-digit integer as an input, consider plus0, ..., plus9 where plus0 is to add 0 on the input and so on. After training, for each setting, we select two tasks ad we provide the model with prompts containing in-context examples from these two tasks and vary the mixture ratio $\lambda$ such that the in-context task example distribution for two tasks is $[\lambda, 1 - \lambda]$ . We plot $\lambda$ on x-axis and the output probabilities of task answers for each task on y-axis. + +answers of ret2 and ret6 being roughly [0.5, 0.5]. We can observe similar behavior in Figure 3b. + +# 6. Transformers Have the Capacity to Perform Task Superposition + +In this section, we explore whether Transformers have the inherent expressivity to perform multiple tasks in superposition with a single inference call. To this end, we provide a theoretical construction of a Transformer which, given the ability to implement multiple tasks, performs task superposition depending on the examples given in-context. + +Theorem 1. A seven layer transformer with embedding dimension $\mathcal{O}(d + \log (mn))$ with $K$ heads per attention layer can perform $K$ tasks on vectors of dimension $d$ in superposition, with weighting based on $m$ different in-context examples each of length $n$ . + +The proof of Theorem 1 is provided in Appendix E.4. Note that while this does not guarantee that training a Transformer will actually find these parameters, it does indicate that Transformers are expressive enough to perform task + +superposition at test time. Below we outline the main ideas used in the proof. + +Prediction based on multiple tasks. Assume that we are given $m$ in-context samples $(\pmb{x}_1^{(j)},\dots,\pmb{x}_{n - 2}^{(j)},\mathbf{\Phi}^{\prime} = \mathbf{\Phi},\pmb{y}^{(j)})_{j = 1}^{m}$ where $\mathbf{\Phi}^{\prime} = \mathbf{\Phi}$ represents a specific value used only for preceding the label, and a set of $k$ different Transformers $\mathrm{TF}_i$ which can implement the $T$ different desired tasks, where each deterministic task is denoted as $\pmb {g}_i(\pmb {x}^{(j)})$ with $i\in [k]$ and $j\in [m]$ , i.e. $\pmb {y}^{(j)} = \pmb {g}_i(\pmb {x}^{(j)})$ for some task $i$ dependent on sample $j$ . Using the weights of each $\mathrm{TF}_i$ , we can compute outputs of the following form: + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \\ & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \end{array} \right] \to \left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \| \boldsymbol {g} _ {1} (\boldsymbol {x} ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \| \boldsymbol {g} _ {T} (\boldsymbol {x} ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \end{array} \right] +$$ + +We use the $l_{1}$ norm to aggregate the prediction, in case that the task is multi-dimensional. These differences are used to identify tasks, as $\| \pmb{g}_i(\pmb{x}^{(j)}) - \pmb{y}^{(j)}\|_1 \approx 0$ for $\pmb{y}^{(j)}$ coming from task $i$ . Different heads at each layer in the model are used to execute each of the tasks in parallel using the weights from $\mathrm{TF}_i$ . In Appendix E we construct tasks where an arbitrary function $\pmb{g}_i(\pmb{x}_l^{(j)})$ is implemented using ReLUs for some fixed $l$ that is task-specific. + +Creating task identifiers. Having the differences between the implemented function and the label, we first use the ReLUs to clean up the vectors $\pmb{v}_k$ so that only the positions in each vector that are associated with a task are maintained and the rest are set to $1^4$ . We thus create the vectors $(\pmb{v}_k')_i = \| \pmb{g}_k(\pmb{x}_{1:l-1}^{(j)}) - \pmb{x}_l^{(j)}\|_1$ and $(\pmb{v}_*)_* = 1$ otherwise. Now we use ReLUs to threshold and create an indicator vectors $\mathbf{1}_{\{\| \pmb{g}_k(\pmb{x}_{1:l-1}^{(j)}) - \pmb{x}_l^{(j)}\|_1 \approx 0\}}$ which identify the task, i.e., these are task identifiers. Notice that if the task is correctly predicted then the difference should be close to 0 (up to some error), while if the task is not identified the corresponding value would not be 0; the rest of the rows would be 1. We have created one vector for each task, which has 1 in the position of the corresponding task if the task was identified in the context. + +Averaging and task superposition. As a last step, we average all the task identifiers and place the result in the last column, in which the next prediction will happen. We then use the averaged task identifier to weight the prediction of each task based on it, as in task superposition. If the task has been identified multiple times in the context, it would be assigned a higher weight/probability. + +![](images/6b10f6845ab3a026bfc20cd735d55149672a84e9608ee92d5d612252aab0aee2.jpg) +(a) copy (op1) / copy (op2) / op1+op2 + +![](images/02426ad34aba1520a744afa282f7c16481b60ad688105e88c79acefe4930b33c.jpg) +(b) to_fr / to_de / to_it +Figure 4: Task vectors of Llama-3 8B projected onto two axes chosen by LDA for two sets of tasks: (a) copy (op1), copy (op2) and op1+op2 and (b) to-fr, to-de and to-it. For tasks $t_1, t_2, t_3$ , we use “ $\mathbb{P}(t_1) / \mathbb{P}(t_2) / \mathbb{P}(t_3)$ ” to denote different levels of task mixtures, e.g., “0.50/0.50/0.00” represents the case where the in-context task examples are 50% $t_1$ , 50% $t_2$ and 0% $t_3$ . + +# 7. Task Superposition Through the Lens of Task Vectors + +While in Section 6 we provide an existential result by constructing a Transformer that performs task superposition and shows that task superposition is well within the expressive power of Transformers, we would like to further investigate how task superposition manifest in pretrained LLMs internally. In this section we explore the underlying mechanisms that LLMs employ during task superposition. In particular, we focus our empirical study on task vectors (Hendel et al., 2023) where the detailed implementation is in Appendix D. Task vectors are vectors in the embedding space and are found to encode the algorithm that a model internally implements to solve a task given in-context demonstrations. + +We want to investigate if there is any relation between the task vectors of each individual task and the task vectors of a mixture of task examples in the prompt. To this end, we consider two sets of tasks: + +(a) copy (op1), copy (op2) and op1+op2 as in Figure 1b (left). +(b) Given a two-digit integer, task to_fr translates it to French, task to_de translates it to German and task to_it translates it to Italian. + +For each set of tasks, we collect the task vectors for each individual task and task vectors extracted from prompts that contain examples of different tasks. In Figure 4, we project task vectors along two axes chosen by linear discriminant analysis (LDA). + +# Finding 3: LLMs internally combine task vectors during task superposition. + +Interestingly, we observe that the locations of task vectors of a mixture of tasks strongly correlate with the locations of task vectors for each individual task and the in-context task example distribution (the mixture ratio for examples of different tasks). For example, if the prompt includes an equal number of in-context examples from each task, the task vectors are roughly centered in the middle; if the prompt only contains in-context examples of two tasks, then the task vectors roughly lie on the connecting line between task vectors of two individual tasks. We argue that this observation is indicative of the fact that, when prompted with a mixture of in-context task examples, LLMs internally combine task vectors. + +As we observe signs that LLMs internally compose task vectors, we want to further investigate whether we can reproduce the task superposition phenomenon by patching in a convex combination of task vectors. For example, for tasks copy (op1) and copy (op2), we first extract the corresponding task vectors $\mathbf{V}_{\mathrm{copy}(\mathrm{op1})}$ and $\mathbf{V}_{\mathrm{copy}(\mathrm{op2})}$ on Llama-3 8B using the method described in Appendix D. We then make a convex combination of the two task vectors with parameter $\lambda$ that controls the ratio: + +$$ +\mathbf {V} _ {\text {i n t e r p o l a t e}, \lambda} = \lambda \cdot \mathbf {V} _ {\text {c o p y (o p 1)}} + (1 - \lambda) \cdot \mathbf {V} _ {\text {c o p y (o p 2)}}. +$$ + +# Finding 4: Convex combinations of task vectors produce task superposition. + +For a new query (in this scenario in the form " $\{\mathrm{op1}\} \otimes \{\mathrm{op2}\} =$ "), we patch the vector $\mathrm{V}_{\mathrm{interpoleate},\lambda}$ into the model at the task vector layer. We calculate the model output probabilities that correspond to each task while we vary $\lambda$ . For each $\lambda$ , we use 100 different queries and plot the average probabilities in the top row of Figure 5. As a comparison, in the bottom rows of Figure 5, we plot the corresponding output probabilities when providing the models + +![](images/ccd50dc34bd5b89fda5d93a9d271bc99155f6418cd7762fa94761ffe39d989fe.jpg) +(a) Tasks: copy (op1) and copy (op2) + +![](images/bf23ac84c0e1781463fb7a5713d6f1e6e92c6c77664a48a689d23cdb2a31f426.jpg) +(b) Tasks: translate to_de and to_it +Figure 5: On Llama-3 8B, we vary the proportion, $\lambda$ , between two tasks and observe how the output probabilities for the correct answers change. The proportion $\lambda$ is varied in two ways: (1) in the top row, we plot the output from patching in a convex combination of task vectors for two tasks. (2) in the bottom row, we plot the output from a mixed proportion of in-context examples for the two tasks. Subplot (a) shows the output probabilities from mixing two copy tasks and (b) shows the probabilities from mixing two translate tasks. + +with prompts containing mixture of task examples where the mixture ratio is controlled by $\lambda$ . + +In top row of Figure 5, we observe that patching convex combinations of task vectors into the model produces task superposition. We would also like to point out that in Figure 5b, although irrelevant outputs sum up to a large probability, the task answers for two tasks to_de and to_it in most cases will still be the top-2 answers. + +Comparing the top rows and the bottom rows, we can see that top rows (the scenario of interpolating task vectors of individual tasks) have larger probabilities of irrelevant output (category other). Task vector interpolation also produces less of a linear relationship between $\lambda$ and the output probabilities. This shows that while convex combinations of task vectors are sufficient for producing task superposition, this does not fully explain task superposition. We leave it to future work to investigate other mechanistic explanations of task superposition. + +# 8. Limitations and Future Directions + +One limitation of our work is the current gap between the demonstrated capability of LLMs to perform task superposition and its practical application in real-world scenarios. While we have shown that LLMs possess the capacity to execute multiple tasks simultaneously, conventional decoding algorithms are not equipped to fully leverage this capability. This limitation stems from what we term "generation + +collapse," a phenomenon where, after the first token is generated, the model tends to converge on predicting tokens for a single task, effectively negating its ability for multi-task execution. + +This collapse presents a substantial challenge in harnessing the full power of task superposition. It highlights a critical area for future research: developing decoding strategies that can maintain the model's multi-task state throughout the generation process. Recent work by Shen et al. (2024b) offers some hope that this direction may be fruitful, by proposing a "superposed decoding" algorithm. Their method efficiently generates multiple streams of tokens from a single inference pass by utilizing superposed token embeddings. While this approach represents a significant step forward, it also highlights the potential for further innovation in this area. + +# 9. Conclusion + +We report on the discovery of task superposition, which is the ability of LLMs to simultaneously solve distinct tasks from in-context examples. Task superposition is present in a variety of pretrained models, and becomes more accurate at predicting the distribution of tasks as the model size increases (Appendix B). We also find evidence that while displaying task superposition, models internally mix the task vectors of each individual task. We hope that our findings will contribute to understanding in-context learning mechanisms and enhance our knowledge of LLMs overall. + +# Acknowledgment + +K.L. is supported by NSF Award DMS-2023239, NSF CAREER Award CCF-2339978, Amazon Research Award, and a grant from FuriosaAI. D.P. is supported by NSF Medium award No. 2403074, ONR Grant No. N00014-21-1-2806 and No. N00014-23-1-2848. + +# 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 + +Agarwal, R., Singh, A., Zhang, L. M., Bohnet, B., Chan, S., Anand, A., Abbas, Z., Nova, A., Co-Reyes, J. D., Chu, E., Behbahani, F., Faust, A., and Larochelle, H. Many-shot in-context learning, 2024. +Ahn, K., Cheng, X., Daneshmand, H., and Sra, S. Transformers learn to implement preconditioned gradient descent for in-context learning. arXiv preprint arXiv:2306.00297, 2023. +AI@Meta. Llama 3 model card. 2024. URL https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md. +Akyurek, E., Schuurmans, D., Andreas, J., Ma, T., and Zhou, D. What learning algorithm is in-context learning? Investigations with linear models, May 2023. URL http:// arxiv.org/abs/2211.15661.arXiv:2211.15661 [cs]. +Bai, J., Bai, S., Chu, Y., Cui, Z., Dang, K., Deng, X., Fan, Y., Ge, W., Han, Y., Huang, F., Hui, B., Ji, L., Li, M., Lin, J., Lin, R., Liu, D., Liu, G., Lu, C., Lu, K., Ma, J., Men, R., Ren, X., Ren, X., Tan, C., Tan, S., Tu, J., Wang, P., Wang, S., Wang, W., Wu, S., Xu, B., Xu, J., Yang, A., Yang, H., Yang, J., Yang, S., Yao, Y., Yu, B., Yuan, H., Yuan, Z., Zhang, J., Zhang, X., Zhang, Y., Zhang, Z., Zhou, C., Zhou, J., Zhou, X., and Zhu, T. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023a. +Bai, Y., Chen, F., Wang, H., Xiong, C., and Mei, S. Transformers as statisticians: Provable in-context learning with in-context algorithm selection, 2023b. +Bai, Y., Huang, H., Piano, C. S.-D., Rondeau, M.-A., Chen, S., Gao, Y., and Cheung, J. C. K. Identifying and analyzing task-encoding tokens in large language models. (arXiv:2401.11323), February 2024. doi: 10.48550/arXiv.2401.11323. URL http://arxiv.org/abs/2401.11323.arXiv:2401.11323 [cs]. + +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., 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 Advances in Neural Information Processing Systems, volume 33, pp. 1877-1901. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/bash/1457c0d6bcbd4967418bfb8ac142f64a-Abstract.html. +Chan, S., Santoro, A., Lampinen, A., Wang, J., Singh, A., Richemond, P., McClelland, J., and Hill, F. Data distributional properties drive emergent in-context learning in transformers. Advances in Neural Information Processing Systems, 35:18878-18891, 2022. +Cheung, B., Terekhov, A., Chen, Y., Agrawal, P., and Olshausen, B. Superposition of many models into one, June 2019. URL http://arxiv.org/abs/1902.05522.arXiv:1902.05522 [cs]. +Choi, H. K. and Li, Y. Picle: Eliciting diverse behaviors from large language models with persona in-context learning. (arXiv:2405.02501), May 2024. doi: 10.48550/arXiv.2405.02501. URL http://arxiv.org/abs/2405.02501.arXiv:2405.02501 [cs]. +Dai, D., Sun, Y., Dong, L., Hao, Y., Sui, Z., and Wei, F. Why can gpt learn in-context? language models secretly perform gradient descent as meta optimizers. arXiv preprint arXiv:2212.10559, 2022. +Dinh, T., Zeng, Y., Zhang, R., Lin, Z., Rajput, S., Gira, M., Sohn, J.-y., Papailiopoulos, D., and Lee, K. Lift: Language-interfaced fine-tuning for non-language machine learning tasks. arXiv preprint arXiv:2206.06565, 2022. +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, September 2022. URL http://arxiv.org/abs/2209.10652.arXiv:2209.10652 [cs]. +Falck, F., Wang, Z., and Holmes, C. Is in-context learning in large language models bayesian? a martingale perspective. (arXiv:2406.00793), June 2024. URL http:// arxiv.org/abs/2406.00793.arXiv:2406.00793 [cs, stat]. + +Giannou, A., Rajput, S., Sohn, J.-y., Lee, K., Lee, J. D., and Papailiopoulos, D. Looped transformers as programmable computers, 2023. +Grazzi, R., Siems, J., Schrodi, S., Brox, T., and Hutter, F. Is mamba capable of in-context learning? (arXiv:2402.03170), April 2024. doi: 10.48550/arXiv.2402.03170. URL http://arxiv.org/abs/2402.03170.arXiv:2402.03170 [cs]. +Gu, A. and Dao, T. Mamba: Linear-time sequence modeling with selective state spaces. (arXiv:2312.00752), December 2023. doi: 10.48550/ arXiv.2312.00752. URL http://arxiv.org/abs/ 2312.00752.arXiv:2312.00752 [cs]. +Hendel, R., Geva, M., and Globerson, A. In-Context Learning Creates Task Vectors, October 2023. URL http:// arxiv.org/abs/2310.15916.arXiv:2310.15916 [cs]. +Ilharco, G., Ribeiro, M. T., Wortsman, M., Gururangan, S., Schmidt, L., Hajishirzi, H., and Farhadi, A. Editing Models with Task Arithmetic, March 2023. URL http:// arxiv.org/abs/2212.04089.arXiv:2212.04089 [cs]. +Janus. Simulators, 2022. URL https://www.lesswrong.com/posts/vJFdjigzmcXMhNTsx/. +Lampinen, A. K., Dasgupta, I., Chan, S. C., Matthewson, K., Tessler, M. H., Creswell, A., McClelland, J. L., Wang, J. X., and Hill, F. Can language models learn from explanations in context? arXiv preprint arXiv:2204.02329, 2022. +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. +Li, T., Zhang, G., Do, Q. D., Yue, X., and Chen, W. Long-context llms struggle with long in-context learning. (arXiv:2404.02060), April 2024. doi: 10.48550/arXiv.2404.02060. URL http://arxiv.org/abs/2404.02060.arXiv:2404.02060 [cs]. +Lin, Z. and Lee, K. Dual Operating Modes of In-Context Learning, February 2024. URL http://arxiv.org/abs/2402.18819. arXiv:2402.18819 [cs]. +Liu, S., Ye, H., Xing, L., and Zou, J. In-context vectors: Making in context learning more effective and controllable through latent space steering. (arXiv:2311.06668), February 2024. doi: 10.48550/arXiv.2311.06668. URL http://arxiv.org/abs/2311.06668.arXiv:2311.06668 [cs]. + +Lyu, X., Min, S., Beltagy, I., Zettlemoyer, L., and Hajishirzi, H. Z-icl: Zero-shot in-context learning with pseudodemonstrations. arXiv preprint arXiv:2212.09865, 2022. +Min, S., Lyu, X., Holtzman, A., Artetxe, M., Lewis, M., Hajishirzi, H., and Zettlemoyer, L. Rethinking the role of demonstrations: What makes in-context learning work? (arXiv:2202.12837), October 2022. doi: 10.48550/arXiv.2202.12837. URL http://arxiv.org/abs/2202.12837.arXiv:2202.12837 [cs]. +moire. Language models are multiverse generators, January 2021. URL https://generative.ink/posts/ language-models-are-multiverse-generators/. +Murahari, V., Jimenez, C. E., Yang, R., and Narasimhan, K. Datamux: Data multiplexing for neural networks. (arXiv:2202.09318), November 2022. doi: 10.48550/ arXiv.2202.09318. URL http://arxiv.org/abs/ 2202.09318.arXiv:2202.09318 [cs]. +Nardo, C. The waluigi effect (mega-post), 2023. URL https://www.lesswrong.com/posts/D7PumeYTDPfBTp3i7/the-waluigi-effect-mega-post. +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. +Oswald, J. V., Niklasson, E., Randazzo, E., Sacramento, J., Mordvintsev, A., Zhmoginov, A., and Vlademyrov, M. Transformers Learn In-Context by Gradient Descent. In Proceedings of the 40th International Conference on Machine Learning, pp. 35151-35174. PMLR, July 2023. URL https://proceedings.mlr.press/v202/von-oswald23a.html. ISSN: 2640-3498. +Panwar, M., Ahuja, K., and Goyal, N. In-context learning through the bayesian prism, June 2023. URL https://arxiv.org/abs/2306.04891v2. +Park, J., Park, J., Xiong, Z., Lee, N., Cho, J., Oymak, S., Lee, K., and Papailiopoulos, D. Can mamba learn how to learn? a comparative study on in-context learning tasks. (arXiv:2402.04248), April 2024. doi: 10.48550/arXiv.2402.04248. URL http://arxiv.org/abs/2402.04248.arXiv:2402.04248 [cs]. +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. +Raventos, A., Paul, M., Chen, F., and Ganguli, S. The effects of pretraining task diversity on in-context learning of ridge regression. In ICLR Workshop on Mathematical and Empirical Understanding of Foundation Models (MEFoMo), 2023. + +Reddy, G. The mechanistic basis of data dependence and abrupt learning in an in-context classification task. In *The Twelfth International Conference on Learning Representations*, 2024. URL https://openreview.net/forum?id=aN4Jf6Cx69. +Reynolds, L. and McDonell, K. Multiversal views on language models, February 2021. URL http://arxiv.org/abs/2102.06391.arXiv:2102.06391 [cs]. +Shanahan, M., McDonell, K., and Reynolds, L. Role play with large language models. Nature, 623(7987):493-498, 2023. +Shen, E., Fan, A., Pratt, S. M., Park, J. S., Wallingford, M., Kakade, S. M., Holtzman, A., Krishna, R., Farhadi, A., and Kusupati, A. Superposed decoding: Multiple generations from a single autoregressive inference pass. (arXiv:2405.18400), May 2024a. doi: 10.48550/arXiv.2405.18400. URL http://arxiv.org/abs/2405.18400. arXiv:2405.18400 [cs]. +Shen, E., Fan, A., Pratt, S. M., Park, J. S., Wallingford, M., Kakade, S. M., Holtzman, A., Krishna, R., Farhadi, A., and Kusupati, A. Superposed decoding: Multiple generations from a single autoregressive inference pass. arXiv preprint arXiv:2405.18400, 2024b. +Todd, E., Li, M. L., Sharma, A. S., Mueller, A., Wallace, B. C., and Bau, D. Function vectors in large language models. (arXiv:2310.15213), February 2024. doi: 10. 48550/arXiv.2310.15213. URL http://arxiv.org/ abs/2310.15213.arXiv:2310.15213 [cs]. +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. +Wei, C., Chen, Y., and Ma, T. Statistically meaningful approximation: a case study on approximating Turing machines with transformers. Advances in Neural Information Processing Systems, 35:12071-12083, 2022. +Wei, J., Wei, J., Tay, Y., Tran, D., Webson, A., Lu, Y., Chen, X., Liu, H., Huang, D., Zhou, D., et al. Larger language models do in-context learning differently. arXiv preprint arXiv:2303.03846, 2023. +Wu, J., Zou, D., Chen, Z., Braverman, V., Gu, Q., and Bartlett, P. L. How many pretraining tasks are needed for in-context learning of linear regression? In International Conference on Learning Representations (ICLR), 2024. +Xie, S. M., Raghunathan, A., Liang, P., and Ma, T. An explanation of in-context learning as implicit bayesian inference. (arXiv:2111.02080), July 2022a. doi: 10. + +48550/arXiv.2111.02080. URL http://arxiv.org/abs/2111.02080.arXiv:2111.02080 [cs]. +Xie, S. M., Raghunathan, A., Liang, P., and Ma, T. An Explanation of In-context Learning as Implicit Bayesian Inference, July 2022b. URL http://arxiv.org/abs/2111.02080. arXiv:2111.02080 [cs]. +Yang, L., Lee, K., Nowak, R., and Papailiopoulos, D. Looped transformers are better at learning learning algorithms. arXiv preprint arXiv:2311.12424, 2023. +Zeng, Y., Kang, W., Chen, Y., Koo, H. I., and Lee, K. Can mllms perform text-to-image in-context learning? (arXiv:2402.01293), April 2024. doi: 10.48550/arXiv.2402.01293. URL http://arxiv.org/abs/2402.01293.arXiv:2402.01293 [cs]. +Zhang, Y., Zhang, F., Yang, Z., and Wang, Z. What and how does in-context learning learn? bayesian model averaging, parameterization, and generalization. (arXiv:2305.19420), October 2023. doi: 10.48550/arXiv.2305.19420. URL http://arxiv.org/abs/2305.19420. arXiv:2305.19420 [cs, stat]. +Zhou, H., Nova, A., Larochelle, H., Courville, A., Neyshabur, B., and Sedghi, H. Teaching algorithmic reasoning via in-context learning. arXiv preprint arXiv:2211.09066, 2022. +Zhou, H., Bradley, A., Littwin, E., Razin, N., Saremi, O., Susskind, J., Bengio, S., and Nakkiran, P. What algorithms can transformers learn? a study in length generalization. arXiv preprint arXiv:2310.16028, 2023. + +# A. Notations + +
NotationDescription
KNumber of tasks
lLength of a task's output
llayer l for a model
mNumber of in-context examples
nLength of each in-context example
vToken vocabulary
gi(·)Operation performed by Task i
x(j)Data for example j
y(j)Label for example j
smm in-context examples
f(·)Model (predictor)
pPositional encodings
+ +# B. Task superposition capabilities as the model scales + +# Finding 5: Within the same LLM family, bigger models can solve more tasks in parallel and better calibrate to ICL distribution. + +We want to further investigate how models' task superposition capabilities changes as the model size scales. In particular, we investigate two questions: 1) whether larger models can perform more tasks in-context and 2) whether larger models can align their output distribution more closely with the distribution of task examples provided in the prompt. We chose the Qwen-2.5 model family since it contains several model sizes ranging from 0.5B to 14B parameters. + +We first introduce a quantity which captures the capability of a model to perform multiple tasks. Given a prompt that contains examples of $K$ tasks, we define $r$ to be the number of these tasks whose correct answers appear among the model's top- $K$ most likely outputs. Note that $r \leq K$ . + +To see how close the model aligns the output distribution with the distribution of task examples, we use KL-divergence defined below: + +$$ +\operatorname {K L} (\mathcal {P} | | \mathcal {D}) = \sum_ {x \in X} \mathcal {P} (x) \log \left(\frac {\mathcal {P} (x)}{\mathcal {D} (x)}\right), \tag {2} +$$ + +where $\mathcal{P}$ is the models' probabilities on the outputs when correctly performing each task on the query and $\mathcal{D}$ is the in-context task example distribution. For example the prompt in Figure 1a (left) gives $\mathcal{P} = [0.5217, 0.1316, 0.1110, 0.2169, \ldots]$ and $\mathcal{D} = [0.25, 0.25, 0.25, 0.25, 0, \ldots]$ . + +We consider the setting of $K = 6$ different tasks: given an input of the form " $\{\mathsf{num}\} \to$ " where num is a two-digit integer, we consider 6 tasks that output (1) num itself, (2) negation of num, (3) num + 1, (4) num - 1, (5) num × 2 and (6) num². + +We choose the number of in-context examples $m = 60$ (each task has 10 examples) and configure the prompt with three different in-context task example distributions $\mathcal{D}_1, \mathcal{D}_2$ and $\mathcal{D}_3$ . In particular, $\mathcal{D}_1$ is the uniform distribution, $\mathcal{D}_2$ has probability 0.5 on the third task and 0.1 on other tasks, and $\mathcal{D}_3$ is a distribution with probabilities alternating between 0.25 and 0.083. + +For each in-context task examples distribution $\mathcal{D}_i$ , we generate 100 prompts and for each prompt we calculate the probabilities of outputs when correctly performing each task. The average values of $r$ and KL-divergence under three distributions are shown in Figure 6. + +![](images/9643c18f7324c15a9546581a006019eea0f028d58e189078802a085a7805314a.jpg) +(a) $r$ (the number of tasks whose correct answers appear in top- $K$ most likely outputs). + +![](images/d046f7acca0f60606d8930c0595c03b5e0646662053af464a9bd241d6eb697b8.jpg) +(b) KL divergence. +Figure 6: (a) Average number of tasks completed, $r$ , and (b) KL divergence for Qwen-2.5 model family under ICL distributions $\mathcal{D}_1, \mathcal{D}_2$ and $\mathcal{D}_3$ where $\mathcal{D}_1$ is the uniform distribution, $\mathcal{D}_2$ has probability 0.5 on the third task and 0.1 on other tasks, and $\mathcal{D}_3$ is a distribution with probabilities alternating between 0.25 and 0.083. + +In Figure 6a, we can observe that in general bigger models have higher $r$ values. This shows bigger models will have more correct answers of tasks show up in their top- $K$ probable outputs and therefore they can solve more tasks at the same time. In Figure 6b, we can see that for larger models like Qwen-2.5 7B and Qwen-2.5 14B, the KL-divergence values are small, and for each model, the differences between KL-divergence values under in-context task example distributions $\mathcal{D}_1$ , $\mathcal{D}_2$ and $\mathcal{D}_3$ are small. This indicates that bigger models can better calibrate their output distribution to the in-context task example distribution. + +# C. Implementation details on calculating probabilities + +In this section we provide details on how we calculate probabilities of different outputs given a prompt in our setting. + +Notations. Let $\mathcal{V}$ be the token vocabulary, LM be an LLM, $T$ be the tokenizer. We use "... to represent a string, $<\ldots>$ to represent a single token where the content within the angle brackets is an integer representing token's index in vocabulary. For example, token $<266>$ corresponds to "at". We use $[<\ldots>, \ldots, <\ldots>]$ to represent a sequence of tokens. Given a tokenizer, we use two functions $\text{tok}(\cdot)$ and $\text{detok}(\cdot)$ to tokenize strings and detokenize tokens. For example $\text{tok}("superposition") = [<9712>, <3571>]$ and $\text{detok}([\<16>, <10>, <16>, <28>, <17>]) = "1+1=2"$ . + +In our in-context learning setting, an input string consists of in-context examples (separated by the delimiter "\n") and a query. For example, an example prompt can be "1+1=2\n2+2=4\n3+3=". + +We view an LLM as a next-token predictor that outputs a probability distribution over the token space given input and there is a corresponding $\mathbb{P}(\cdot|\cdot)$ such that given a sequence of tokens $[v_1, \dots, v_M]$ where $v_j \in \mathcal{V}$ , $\mathbb{P}(u \mid [v_1, \dots, v_M])$ measures the probability of the next token being $u$ where $u \in \mathcal{V}$ . + +Measuring the probabilities of task answers. Let $I$ be the input prompt. For example, in the example in Figure 1a (left), the prompt is "11+26->37\n33+13->quarante-six\n...30+25->fifty-five\n91+83->". We consider four tasks: 1) numerical addition, 2) addition in English, 3) addition in French and 4) addition in Spanish. The corresponding task answers (the output of correctly performing task on the query) are "174", "one hundred and seventy-four", "cent soixante-quatorze" and "ciento setenta y cinco", respectively. We want to measure the probability of each task answer. + +Let $o$ be a task answer in string. Let $[v_1, \dots, v_M] := \mathsf{tok}(I)$ and let $[u_1, \dots, u_N] := \mathsf{tok}(o)$ . Then the probability of the task answer $o$ given prompt $I$ can be calculated as + +$$ +\mathbb {P} \left(u _ {1} \mid \left[ v _ {1}, \dots , v _ {M} \right]\right) \prod_ {j = 2} ^ {N} \mathbb {P} \left(u _ {j} \mid \left[ v _ {1}, \dots , v _ {M}, u _ {1}, \dots , u _ {j - 1} \right]\right). \tag {3} +$$ + +# D. Implementation details on task vectors + +We use the task vector definition from Hendel et al. (2023). For example, for task copy (op1) in Figure 1b (left), the procedure to collect the task vector consists of + +1. Collect a dataset of 100 ICL sample prompts. Each prompt consists of $m = 60$ in-context examples of a particular task and a query $\pmb{x}^{(m + 1)}$ . Each task example $(\pmb{x}^{(j)},\pmb{y}^{(j)})$ follows the form “ $\{\mathrm{op1}\} \text{@}\{\mathrm{op2}\} = \{\mathrm{op1}\}$ ”, where $\pmb{x}^{(j)}$ has the form “ $\{\mathrm{op1}\} \text{@}\{\mathrm{op2}\} =$ ” and $\pmb{y}^{(j)}$ is performing task copy (op1) on $\pmb{x}^{(j)}$ , namely op1. +2. For each prompt $\equiv s = [x^{(1)},y^{(1)},\dots,x^{(m)},y^{(m)},x^{(m + 1)}]$ in the dataset, we feed $s$ into the transformer model $\pmb{f}$ , and extract the feature (which is a vector) at the last “ $=$ ” token in layer $\ell$ . Call this vector $\pmb{f}(s;\ell)$ . Then we average $\pmb{f}(s;\ell)$ across all prompt $s$ to get $\pmb{v}(\ell)$ for layer $\ell$ . +3. Now for each layer $\ell$ we have a vector $\pmb{v}(\ell)$ . We run a forward pass with one query $\pmb{x}$ in the form “ $\{\mathrm{op1}\} \oplus \{\mathrm{op2}\} =$ ” and we patch in $\pmb{v}(\ell)$ at the “ $=$ ” token position in layer $\ell$ , simulating the effect of a complete context. We repeat this process 100 times for different query $\pmb{x}$ and get an accuracy $acc_{\ell}$ of performing task copy (op1) with vector $\pmb{v}(\ell)$ . + +4. The task vector layer $\ell^{*}$ is selected by + +$$ +\ell^ {*} = \arg \max _ {\ell} a c c _ {\ell}, +$$ + +and we define the task vector $\mathbf{V}_{\mathrm{copy}(\mathrm{op1})} \coloneqq \pmb{v} = \pmb{v}(\ell^{*})$ . + +Here we record the task vector layer where task vectors are extracted in Section 7. + +
TaskTask vector layer
copy(op1), copy(op2), op1+op214
to_de(op1), to_fr(op1), to_it(op1)19
+ +Table 1: Task vector layer for various tasks considered in Section 7. + +# E. Construction displaying superposition + +In this section we construct a Transformer that is performing superposition of multiple tasks at inference. For this purpose, we first construct a Transformer that copies from $n$ -tuple in-context examples the $i$ -th one, as well as any function using the ReLU layers. We then create indicator vectors, for each task, which show whether a specific task is present in-context or not. As a last step, we combine these indicator vectors to create the superposition of different tasks. Notice that using the parallel heads of the transformer architecture we can process each task independently until the last step in which the predictions are combined. + +# E.1. Overview + +Here we provide a brief overview of how the construction is implemented, while latter we provide the corresponding details. + +Prediction based on multiple tasks. Assume that we are given $m$ in-context samples $(\pmb{x}_1^{(j)},\dots,\pmb{x}_{n - 2}^{(j)},\mathbf{\sigma}^{'},\pmb{y}^{(j)})_{j = 1}^{m}$ where $\mathbf{\sigma}^{\prime} = \mathbf{\sigma}^{\prime}$ represents a specific value used only for preceding the label, and a set of $k$ different Transformers $\mathrm{TF}_i$ which can implement the $T$ different desired tasks, where each deterministic task is denoted as $\pmb {g}_i(\pmb{x}^{(j)})$ with $i\in [k]$ and $j\in [m]$ , i.e. $\pmb{y}^{(j)} = \pmb {g}_i(\pmb{x}^{(j)})$ for some task $i$ dependent on sample $j$ . Using the weights of each $\mathrm{TF}_i$ , we can compute outputs of the following form: + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \\ & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \end{array} \right] \to \left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \| \boldsymbol {g} _ {1} (\boldsymbol {x} ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \| \boldsymbol {g} _ {T} (\boldsymbol {x} ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \end{array} \right] +$$ + +We use the $l_{1}$ norm to aggregate the prediction, in case that the task is multi-dimensional. These differences are used to identify tasks, as $\| \pmb{g}_i(\pmb{x}^{(j)}) - \pmb{y}^{(j)}\|_1 \approx 0$ for $\pmb{y}^{(j)}$ coming from task $i$ . Different heads at each layer in the model are used to execute each of the tasks in parallel using the weights from $\mathrm{TF}_i$ . In Appendix E we construct tasks where an arbitrary function $\pmb{g}_i(\pmb{x}_l^{(j)})$ is implemented using RLUs for some fixed $l$ that is task-specific. + +Creating task identifiers. Having the differences between the implemented function and the label, we first use the ReLUs to clean up the vectors $\mathbf{v}_k$ so that only the positions in each vector that are associated with a task are maintained and the rest are set to $1^5$ . We thus create the vectors $(\mathbf{v}_k')_i = \| \mathbf{g}_k(\mathbf{x}_{1:l-1}^{(j)}) - \mathbf{x}_l^{(j)}\|_1$ and $(\mathbf{v}_*)_* = 1$ otherwise. Now we use ReLUs to threshold and create an indicator vectors $\mathbf{1}_{\{\| \mathbf{g}_k(\mathbf{x}_{1:l-1}^{(j)}) - \mathbf{x}_l^{(j)}\|_1 \approx 0\}}$ which identify the task, i.e. these are task identifiers. Notice that if the task is correctly predicted then the difference should be close to 0 (up to some error), while if the task is not identified the corresponding value would not be 0; the rest of the rows would be 1. We have created one vector for each task, which has 1 in the position of the corresponding task if the task was identified in the context. + +Averaging and task superposition. As a last step, we average all the task identifiers and place the result in the last column, in which the next prediction will happen. We then use the averaged task identifier to weight the prediction of each task based on it, as in task superposition. If the task has been identified multiple times in the context, it would be assigned a higher weight/probability. + +# E.2. Task Identification + +The first task for performing task superposition based on in-context examples is to define a set of tasks that the model is able to implement. + +First, the outputs of tasks need to be identified. + +Lemma 1. Consider the following input + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \ldots & \boldsymbol {y} ^ {(j - 1)} & \boldsymbol {x} _ {1} ^ {(j)} & \ldots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \ldots \\ 0 & \ldots & 0 & 0 & \ldots & 0 & 1 & 0 & 0 & \ldots \\ \boldsymbol {0} & \ldots & \boldsymbol {0} & \boldsymbol {0} & \ldots & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \ldots \end{array} \right], +$$ + +where $\pmb{x}_i^{(j)} \in \mathbb{R}^{d-1}$ before the positional encodings are added, with one additional dimension that represents if the symbol is an 'equals' symbol. Then, a 1-layer transformer with a single attention head and embedding dimension $\mathcal{O}(d + \log(mn))$ can output + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {y} ^ {(j - 1)} & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ 0 & \dots & 1 & 0 & \dots & 0 & 0 & 1 & 0 & \dots \end{array} \right] +$$ + +Proof. With positional encodings appended, let the input have the following structure: + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ 0 & \dots & 0 & 0 & \dots & 0 & 1 & 0 & 0 & \dots \\ \boldsymbol {p} _ {n + 1} & \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \boldsymbol {p} _ {(j + 1) n + 1} & \dots \\ \boldsymbol {p} _ {n} & \dots & \boldsymbol {p} _ {j n} & \boldsymbol {p} _ {j n + 1} & \dots & \boldsymbol {p} _ {j n + n - 3} & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {(j + 1) n} & \dots \end{array} \right] \tag {4} +$$ + +To rotate the second row one position to the right, use the following matrices. + +$$ +\boldsymbol {W} _ {Q} = \left[ \begin{array}{c c c c} \mathbf {0} & 0 & \mathbf {0} & \mathbb {I} \end{array} \right] +$$ + +$$ +\boldsymbol {W} _ {K} = \left[ \begin{array}{c c c c} \mathbf {0} & 0 & C \mathbb {I} & \mathbf {0} \end{array} \right] +$$ + +$$ +\boldsymbol {W} _ {V} = \left[ \begin{array}{c c c c} \mathbf {0} & \mathbf {0} & \mathbf {0} & \mathbf {0} \\ \mathbf {0} & 1 & \mathbf {0} & \mathbf {0} \\ \mathbf {0} & \mathbf {0} & \mathbf {0} & \mathbf {0} \\ \mathbf {0} & \mathbf {0} & \mathbf {0} & \mathbf {0} \end{array} \right] +$$ + +The pair $\mathbf{W}_Q$ and $\mathbf{W}_K$ attend tokens to the token directly to the right. The value matrix simply filters only the second row in-place. A second head can be used to clear the original 1s, resulting in + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ 0 & \dots & 0 & 0 & \dots & 0 & 0 & 1 & 0 & \dots \\ \boldsymbol {p} _ {n + 1} & \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \boldsymbol {p} _ {(j + 1) n + 1} & \dots \\ \boldsymbol {p} _ {n} & \dots & \boldsymbol {p} _ {j n} & \boldsymbol {p} _ {j n + 1} & \dots & \boldsymbol {p} _ {j n + n - 3} & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {(j + 1) n} & \dots \end{array} \right], \tag {5} +$$ + +as desired. + +Implementation of functions. To illustrate a set of operations that could be implemented with a transformer, we consider approximating functions as sums of ReLUs; we use a result from Bai et al. (2023b), which we present below. + +Definition 1 (Definition 12 in (Bai et al., 2023b)). A function $g: \mathbb{R}^k \to \mathbb{R}$ is $(\epsilon, R, M, C)$ -approximable by sum of ReLUs, if there exists an $"(M, C)$ -sum of ReLUs' function + +$$ +f _ {M, C} (\boldsymbol {x}) = \sum_ {m = 1} ^ {M} c _ {m} R e L U \left(\boldsymbol {a} _ {m} ^ {\top} [ \boldsymbol {x}; 1 ]\right) w i t h \sum_ {m = 1} ^ {M} | c _ {m} | \leq C, \max _ {m \in [ M ]} \| \boldsymbol {a} _ {m} \| _ {1} \leq 1, \boldsymbol {a} _ {m} \in \mathbb {R} ^ {k + 1}, c _ {m} \in \mathbb {R} +$$ + +such that $\sup_{\pmb{x} \in [-R, R|^k]} |g(\pmb{x}) - f_{(M,C)}(\pmb{x})| \leq \epsilon$ . + +Definition 2 (Definition A.1 in (Bai et al., 2023b)). We say a function $g: \mathbb{R}^k \to \mathbb{R}$ is $(R, C_l)$ -smooth if for $s = [(k - 1)/2] + 2$ , $g \in C^{26}$ on $[-R, R]^k$ and + +$$ +\sup _ {\boldsymbol {x} \in [ - R, R ] ^ {k}} \left\| \nabla^ {i} g (\boldsymbol {x}) \right\| _ {\infty} = \sup _ {\boldsymbol {x} \in [ - R, R ] ^ {k}} \max _ {j 1, \dots , j _ {i} \in [ k ]} \left| \partial_ {x _ {j 1}, \dots , x _ {j i}} g (\boldsymbol {x}) \right| \leq L _ {i} +$$ + +for all $i = 0,1,2$ with $\max_{0\leq i\leq s}L_iR^i\leq C_l$ + +Proposition 1 (Proposition A.1 in (Bai et al., 2023b)). For any $\epsilon > 0$ , $R \geq 1$ , $C_l > 0$ , we have that: Any $(R, C_l)$ -smooth function, $g: \mathbb{R} \to \mathbb{R}$ is $(\epsilon, R, M, C)$ -approximable by sum of ReLUs (Definition 1) with $M \leq C(k)C_l^2 \log(1 + C_l\epsilon) / \epsilon^2$ . + +Lemma 2. For any function $g: \mathbb{R}^k \to \mathbb{R}$ that is $(R, C_l)$ -smooth, there exists a transformer with two layers, one head and width $\mathcal{O}(\log(n) + d)$ , where $d$ satisfies the requirements of Prop. 1, such that given as input + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \ldots & \boldsymbol {y} ^ {(j - 1)} & \boldsymbol {x} _ {1} ^ {(j)} & \ldots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \ldots \\ 0 & \ldots & 1 & 0 & \ldots & 0 & 0 & 1 & 0 & \ldots \\ \boldsymbol {0} & \ldots & \boldsymbol {0} & \boldsymbol {0} & \ldots & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \ldots \end{array} \right], +$$ + +it outputs + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {y} ^ {(j - 1)} & \boldsymbol {x} _ {1} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ * & \dots & * & * & \dots & * & * & * & * & \dots \\ \mathbf {0} & \dots & \tilde {g} (\boldsymbol {x} _ {i} ^ {(j - 1)}) - \boldsymbol {y} ^ {(j - 1)} & * & \dots & * & * & \tilde {g} (\boldsymbol {x} _ {i} ^ {(j)}) - \boldsymbol {y} ^ {(j)} & * & \dots \end{array} \right] +$$ + +where $|\tilde{g}(x) - g(x)| \leq \epsilon$ and for some $i \in [1, \dots, n-2]$ . + +Proof. We consider that the positional encodings are added in the input and we have + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ 0 & \dots & 0 & 0 & \dots & 0 & 0 & 1 & 0 & \dots \\ \boldsymbol {0} & \dots & \boldsymbol {0} & \boldsymbol {0} & \dots & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \dots \\ 1 & \dots & 1 & 1 & \dots & 1 & 1 & 1 & 1 & \dots \\ \boldsymbol {p} _ {n + 1} & \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \boldsymbol {p} _ {(j + 1) n + 1} & \dots \\ \boldsymbol {p} _ {n + 1 - s} & \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 2 - s} & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \boldsymbol {p} _ {(j + 1) n + 1 - s} & \dots \end{array} \right] \tag {6} +$$ + +where we fix some positional encodings $\pmb{p}_k$ where $\pmb{p}_k^\top \pmb{p}_k$ is larger than $\pmb{p}_k^\top \pmb{p}_l$ by some threshold for $k \neq l$ . The encodings used here are the binary representations of $k \in \{-1, 1\}^{\log(mn)}$ . Further, we consider 1s in the positions with the results of the task to differentiate the context of the task and the result of the task. Define $s = n - i$ , the distance between the result and the associated value in the context. + +In the first layer, we use the MLP's to create $\tilde{g}$ according to Proposition 1 + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c c c c} \boldsymbol {x} _ {1} ^ {(1)} & \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \boldsymbol {x} _ {1} ^ {(j + 1)} & \dots \\ 0 & \dots & 0 & 0 & \dots & 0 & 0 & 1 & 0 & \dots \\ \tilde {g} (\boldsymbol {x} _ {1} ^ {(1)}) & \dots & \tilde {g} (\boldsymbol {x} _ {1} ^ {(j)}) & \tilde {g} (\boldsymbol {x} _ {2} ^ {(j)}) & \dots & \tilde {g} (\boldsymbol {x} _ {n - 2} ^ {(j)}) & \tilde {g} (=) & \tilde {g} (\boldsymbol {y} ^ {(j)}) & \tilde {g} (\boldsymbol {x} _ {1} ^ {(j + 1)}) & \dots \\ \boldsymbol {0} & \dots & \boldsymbol {0} & \boldsymbol {0} & \dots & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \boldsymbol {0} & \dots \\ 1 & \dots & 1 & 1 & \dots & 1 & 1 & 1 & 1 & \dots \\ \boldsymbol {p} _ {n + 1} & \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \boldsymbol {p} _ {(j + 1) n + 1} & \dots \\ \boldsymbol {p} _ {n + 1 - s} & \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 2 - s} & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \boldsymbol {p} _ {(j + 1) n + 1 - s} & \dots \end{array} \right] \tag {7} +$$ + +The next operation is a shift of the sequence of $\tilde{g} (\cdot)$ 's to the right by $s$ . This will align the desired output $\tilde{g} (x_i^{(j)})$ with the observed output $\pmb{y}^{(j)}$ . Consider the following weight matrices + +$$ +\boldsymbol {W} _ {Q} = \left[ \begin{array}{l l l l} \dots & 0 & \mathbf {0} & \mathbb {I} \end{array} \right] \tag {8} +$$ + +$$ +\boldsymbol {W} _ {K} = \left[ \begin{array}{l l l l} \dots & 0 & C \mathbb {I} & \boldsymbol {0} \end{array} \right] \tag {9} +$$ + +$$ +\boldsymbol {W} _ {V} = \left[ \begin{array}{l l l l l} \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} \\ \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} \\ \mathbf {0} & \mathbf {0} & \mathbb {I} & \dots & \mathbf {0} \\ \vdots & \vdots & \vdots & & \vdots \\ \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} \end{array} \right] \tag {10} +$$ + +for some large constant $C$ to decrease error from the softmax attending to the incorrect tokens. This produces (within a small error induced by using a softmax) + +$$ +\left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {X}\right) _ {i, j} = \boldsymbol {p} _ {n + i} ^ {\top} \boldsymbol {p} _ {n - s + j} \tag {11} +$$ + +$$ +\sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} X\right) _ {i, j} = \mathbb {1} _ {\{n + i = n - s + j \}} = \mathbb {1} _ {\{i = j - s \}} \tag {12} +$$ + +$$ +\boldsymbol {W} _ {V} \boldsymbol {X} = \left[ \begin{array}{c c c c c c c c} \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 0 & 0 & \dots & 0 & 0 & 0 & \dots \\ \dots & \tilde {g} \left(\boldsymbol {x} _ {1} ^ {(j)}\right) & \tilde {g} \left(\boldsymbol {x} _ {2} ^ {(j)}\right) & \dots & \tilde {g} \left(\boldsymbol {x} _ {n - 2} ^ {(j)}\right) & \tilde {g} (=) & \tilde {g} \left(\boldsymbol {y} ^ {(j)}\right) & \dots \\ & \vdots & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \end{array} \right] \tag {13} +$$ + +$$ +\boldsymbol {W} _ {V} \boldsymbol {X} \sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {X}\right) = \left[ \begin{array}{c c c c c c c c} \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 0 & 0 & \dots & 0 & 0 & 0 & \dots \\ \dots & * & * & \dots & * & * & \tilde {g} \left(\boldsymbol {x} _ {i} ^ {(j)}\right) & \dots \\ & \vdots & \vdots & & \vdots & \vdots & \vdots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \end{array} \right] \tag {14} +$$ + +$$ +\boldsymbol {X} + \boldsymbol {W} _ {V} \boldsymbol {X} \sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {X}\right) = \left[ \begin{array}{c c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 1} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 0 & 1 & \dots \\ \dots & * & * & \dots & * & * & \tilde {g} \left(\boldsymbol {x} _ {i} ^ {(j)}\right) & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & 1 & \dots \\ \dots & p _ {j n + 1} & p _ {j n + 2} & \dots & p _ {j n + n - 2} & p _ {j n + n - 1} & p _ {j n + n} & \dots \\ \dots & p _ {j n + 1 - s} & p _ {j n + 2 - s} & \dots & p _ {j n + n - 2 - s} & p _ {j n + n - 1 - s} & p _ {j n + n - s} & \dots \end{array} \right] \tag {15} +$$ + +Each matrix above only shows the slice that contains the $j$ -th in-context example. This is repeated for each of the other in-context examples. + +As a final step with an MLP, subtract row 1 from row 3 to achieve the following output: + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & \boldsymbol {x} _ {n - 1} ^ {(j)} & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 0 & 1 & \dots \\ \dots & * & * & \dots & * & * & \tilde {g} \left(\boldsymbol {x} _ {i} ^ {(j)}\right) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 0 & 0 & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & 1 & \dots \\ \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 2} & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \dots \\ \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 2 - s} & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \dots \end{array} \right] \tag {17} +$$ + +Copy Tasks As has been experimentally investigated, the situation where a specific position within the context is copied as the label can be easily implemented by setting $g(\boldsymbol{x}) = \boldsymbol{x}$ . The dependence on the subscript $i$ within the construction is what allows the position copied to vary. + +# E.2.1. IDENTIFYING IF TASK'S OUTPUT MATCHES THE IN-CONTEXT EXAMPLE + +Lemma 3. A three layer transformer with ReLU MLPs and embedding dimension $\mathcal{O}(d + \log (mn))$ can calculate the proportion of in context examples that come from a specific task, where $m$ is the number of in-context examples, each of length $n$ and dimension $d$ . + +Proof. We now have a matrix of the following form. + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 1 & \dots \\ \dots & * & * & \dots & * & f \left(\boldsymbol {x}. ^ {(j)}\right) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & \dots \\ \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \dots \\ \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \dots \end{array} \right] \tag {18} +$$ + +If the task is correct, then $f(\pmb{x}_{\cdot}^{(j)}) - \pmb{y}^{(j)} \approx \mathbf{0}$ , with some small error coming from softmaxs and function approximation error. First, we find the $L1$ -norm of $f(\pmb{x}_{\cdot}^{(j)}) - \pmb{y}^{(j)}$ using an MLP. For calculating $\| \pmb{z} \|_1$ for arbitrary $\pmb{z}$ , we can use + +$$ +\left\| \boldsymbol {z} \right\| _ {1} = \sum_ {i = 1} ^ {d} \operatorname {R e L U} \left(\boldsymbol {z} _ {i}\right) - \operatorname {R e L U} \left(- \boldsymbol {z} _ {i}\right) \tag {19} +$$ + +which can be done in a single 1-layer MLP. Thus, we have + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 1 & \dots \\ \dots & * & * & \dots & * & f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & * & * & \dots & * & \| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & \dots \\ \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \dots \\ \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \dots \end{array} \right] \tag {20} +$$ + +Notice that if some task has different dimension than another task, the "extra" rows would be zero and will not affect the result. + +For clarity, we set all $*$ values in the $\| \cdot \|_1$ row to 1s. These will cause the following $\hat{\delta}$ in the following set these to 0. This operation can be omitted as the construction handles these trash values at a later layer. + +Let $b$ represent the value of the flag in the second row marking the $y$ vectors and let $x$ represent the values in the row with $\| f(\pmb{x}^{(j)}) - \pmb{y}^{(j)}\|_1$ . The following RLUs set the * values to 1. + +$$ +x \leftarrow x + 1 - \operatorname {R e L U} (x - C b) - \operatorname {R e L U} (C b - C + 1) \tag {21} +$$ + +for some large constant $C$ . When $b = 0$ , this reduces to $x + 1 - x = 1$ , and when $b = 1$ , this reduces to $x + 1 - 1 = x$ , as desired. + +$$ +\left[ \begin{array}{c c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 1 & \dots \\ \dots & * & * & \dots & * & f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 1 & 1 & \dots & 1 & \| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & \dots \\ \dots & p _ {j n + 1} & p _ {j n + 2} & \dots & p _ {j n + n - 1} & p _ {j n + n} & \dots \\ \dots & p _ {j n + 1 - s} & p _ {j n + 2 - s} & \dots & p _ {j n + n - 1 - s} & p _ {j n + n - s} & \dots \end{array} \right] \tag {22} +$$ + +Now define a thresholding function $\hat{\delta}(z)$ that satisfies $\hat{\delta}(0) = 1$ and $\hat{\delta}(z) = 0$ for $z >> 0$ . One such function used here is + +$$ +\hat {\delta} _ {C} (z) = \operatorname {R e L U} (1 - C z) \tag {23} +$$ + +for some constant $C$ , where larger $C$ captures a narrower neighborhood of 0. + +However, a slight change needs to be added to $\hat{\delta}_C$ . In the same row as $\| f(\pmb{x}^{(j)}) - \pmb{y}^{(j)}\|$ are many values that need to be discarded. Let $b$ be the bit for the current column marking if the column contains an $\pmb{x}$ or a $\pmb{y}$ . We use instead + +$$ +\hat {\delta} _ {C} (b, z) = \operatorname {R e L U} (b - C z) \tag {24} +$$ + +This will be zero whenever $b = 0$ and $z \geq 0$ . We then have as output + +$$ +\left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 1 & \dots \\ \dots & * & * & \dots & * & f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 1 & 1 & \dots & 1 & \| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ \dots & 0 & 0 & \dots & 0 & \hat {\delta} _ {C} (\| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1}) & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & \dots \\ \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \dots \\ \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \dots \end{array} \right] \tag {25} +$$ + +Importantly, $\hat{\delta}_C(\| f(\pmb{x}.^{(j)}) - \pmb{y}^{(j)}\|_1) = 1$ when $f(\cdot)$ is the correct task and $\hat{\delta}_C(\| f(\pmb{x}.^{(j)}) - \pmb{y}^{(j)}\|_1) = 0$ when $f(\cdot)$ disagrees by more than $\frac{1}{C}$ in $L1$ -norm. + +Lastly, for the next step in the construction, we need to average these soft indicators $\hat{\delta}$ to see how common $f$ is within the context. This is done with an attention layer. Let $W_{Q}$ select the row with all 1s multiplied by some large constant C, and let $W_{K}$ select the row with flags for results $\mathbf{y}$ . Then + +$$ +\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {X} = \left[ \begin{array}{c c c c c} \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & \dots & 0 & 0 \\ 0 & 0 & \dots & 0 & 0 \\ \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & \dots & 0 & 0 \\ C & C & \dots & C & C \\ \vdots & \vdots & & \vdots & \vdots \end{array} \right] \tag {26} +$$ + +$$ +\sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {X}\right) \approx \left[ \begin{array}{c c c c c} \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & \dots & 0 & 0 \\ 0 & 0 & \dots & 0 & 0 \\ \vdots & \vdots & & \vdots & \vdots \\ 0 & 0 & \dots & 0 & 0 \\ 1 / m & 1 / m & \dots & 1 / m & 1 / m \\ \vdots & \vdots & & \vdots & \vdots \end{array} \right] \tag {27} +$$ + +where a $1 / m$ will appear in every row corresponding to a result $\pmb{y}$ . Let the value matrix select the row containing $\hat{\delta} (\| f(\pmb{x}^{(j)} - \pmb{y}^{(j)})\| _1)$ . Denote $p = \frac{1}{m}\sum_{j = 1}^{m}\hat{\delta} (\| f(\pmb{x}^{(j)} - \pmb{y}^{(j)})\| _1)$ . Without causal masking, we would have as output + +$$ +\left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(j)} & \boldsymbol {x} _ {2} ^ {(j)} & \dots & = & \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 0 & 0 & \dots & 0 & 1 & \dots \\ \dots & * & * & \dots & * & f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} & \dots \\ \dots & 1 & 1 & \dots & 1 & \| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1} & \dots \\ \dots & 0 & 0 & \dots & 0 & \hat {\delta} _ {C} (\| f (\boldsymbol {x}. ^ {(j)}) - \boldsymbol {y} ^ {(j)} \| _ {1}) & \dots \\ \dots & p & p & \dots & p & p & \dots \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} & \dots \\ \dots & 1 & 1 & \dots & 1 & 1 & \dots \\ \dots & \boldsymbol {p} _ {j n + 1} & \boldsymbol {p} _ {j n + 2} & \dots & \boldsymbol {p} _ {j n + n - 1} & \boldsymbol {p} _ {j n + n} & \dots \\ \dots & \boldsymbol {p} _ {j n + 1 - s} & \boldsymbol {p} _ {j n + 2 - s} & \dots & \boldsymbol {p} _ {j n + n - 1 - s} & \boldsymbol {p} _ {j n + n - s} & \dots \end{array} \right] \tag {28} +$$ + +However, with causal masking, we can only guarantee that $p$ will appear in the columns containing the most recent example being queried. Thankfully, this is all that is needed. + +# E.3. Task Execution + +Lemma 4. A two layer transformer, with embedding dimension $\mathcal{O}(d + \log (mn))$ can perform a task and weight its output by the proportion of examples of that task seen within the context. + +Now that the proportions of each task have been identified in the context, the task itself needs to be executed for the new example being queried. To simplify notation, let the input to this step be + +$$ +\boldsymbol {X} = \left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(m)} & \boldsymbol {x} _ {2} ^ {(m)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(m)} & = \\ \dots & * & * & \dots & * & * \\ \dots & p & p & \dots & p & p \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} \\ \dots & * & * & \dots & * & * \\ \dots & 1 & 1 & \dots & 1 & 1 \end{array} \right] \tag {29} +$$ + +Following the same process as outlined above, although with slightly different positional encodings, calculate $f(\pmb{x}^{(m)})$ and place that result in the final column being decoded. These need to be added at the beginning of the construction, but are only introduced here for clarity. + +$$ +\left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(m)} & \boldsymbol {x} _ {2} ^ {(m)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(m)} & \boldsymbol {x} _ {n - 1} ^ {(m)} \\ \dots & * & * & \dots & * & * \\ \dots & p & p & \dots & p & p \\ \dots & * & * & \dots & * & f (\boldsymbol {x} ^ {(m)}) \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} \\ \dots & * & * & \dots & * & * \\ \dots & 1 & 1 & \dots & 1 & 1 \\ \dots & 0 & 0 & \dots & 0 & 1 \\ \dots & 0 & 0 & \dots & 1 & 0 \end{array} \right] \tag {30} +$$ + +We will transform the row containing all $p$ to be able to approximately multiply $p$ by $f(\pmb{x}^{(m)})$ . Using the second to last row, perform $p \to 1 - p$ . Using the last two rows, clear out the rest of that row and fill it with $-C$ for some large constant $C$ . We then have + +$$ +\left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(m)} & \boldsymbol {x} _ {2} ^ {(m)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(m)} & \boldsymbol {x} _ {n - 1} ^ {(m)} \\ \dots & * & * & \dots & * & * \\ \dots & - C & - C & \dots & p & 1 - p \\ \dots & * & * & \dots & * & f (\boldsymbol {x} ^ {(m)}) \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} \\ \dots & * & * & \dots & * & * \\ \dots & 1 & 1 & \dots & 1 & 1 \\ \dots & 0 & 0 & \dots & 0 & 1 \\ \dots & 0 & 0 & \dots & 1 & 0 \end{array} \right] \tag {31} +$$ + +Further, use the second-to-last row to clear out all * in the rows below. + +$$ +\left[ \begin{array}{c c c c c c} \dots & \boldsymbol {x} _ {1} ^ {(m)} & \boldsymbol {x} _ {2} ^ {(m)} & \dots & \boldsymbol {x} _ {n - 2} ^ {(m)} & \boldsymbol {x} _ {n - 1} ^ {(m)} \\ \dots & * & * & \dots & * & * \\ \dots & - C & - C & \dots & p & 1 - p \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & f (\boldsymbol {x} ^ {(m)}) \\ \dots & \mathbf {0} & \mathbf {0} & \dots & \mathbf {0} & \mathbf {0} \\ \dots & * & * & \dots & * & * \\ \dots & 1 & 1 & \dots & 1 & 1 \\ \dots & 0 & 0 & \dots & 0 & 1 \\ \dots & 0 & 0 & \dots & 1 & 0 \end{array} \right] \tag {32} +$$ + +These previous operations can all be done in a single MLP. + +Lastly, use an attention layer where $W_{K}$ selects the row with the $-C$ s, $W_{Q}$ selects the row with all 1s, and $W_{V}$ selects the $f(\boldsymbol{x}^{(m)})$ . For the last token $\boldsymbol{x}_{L}$ , + +$$ +\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {x} _ {L} = \left[ \begin{array}{c} \vdots \\ - C \\ - C \\ \vdots \\ p \\ 1 - p \end{array} \right] [ 1 ] = \left[ \begin{array}{c} \vdots \\ - C \\ - C \\ \vdots \\ p \\ 1 - p \end{array} \right] \tag {33} +$$ + +$$ +\sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {x} _ {L}\right) \approx \left[ \begin{array}{c} \vdots \\ - \infty \\ - \infty \\ \vdots \\ p \\ 1 - p \end{array} \right] = \left[ \begin{array}{c} \vdots \\ 0 \\ 0 \\ \vdots \\ 1 \\ 1 - \frac {1}{1 + e ^ {1 - 2 p}} \end{array} \right] \tag {34} +$$ + +$$ +\boldsymbol {W} _ {V} \boldsymbol {x} _ {L} \sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {x} _ {L}\right) = \left[ \begin{array}{c} \vdots \\ \boldsymbol {0} \\ \frac {1}{1 + e ^ {1 - 2 p}} \boldsymbol {0} + \left(1 - \frac {1}{1 + e ^ {1 - 2 p}}\right) f \left(\boldsymbol {x} ^ {(m)}\right) \\ \boldsymbol {0} \\ \vdots \end{array} \right] \tag {35} +$$ + +$$ +\boldsymbol {x} _ {L} + \boldsymbol {W} _ {V} \boldsymbol {x} _ {L} \sigma_ {S} \left(\boldsymbol {X} ^ {\top} \boldsymbol {W} _ {K} ^ {\top} \boldsymbol {W} _ {Q} \boldsymbol {x} _ {L}\right) = \left[ \begin{array}{c} \boldsymbol {x} _ {n - 1} ^ {(m)} \\ * \\ 1 - p \\ \frac {1}{1 + e ^ {1 - 2 p}} f \left(\boldsymbol {x} ^ {(m)}\right) \\ \boldsymbol {0} \\ * \\ 1 \\ 1 \\ 0 \end{array} \right] \tag {36} +$$ + +Importantly, we are left with $\frac{1}{1 + e^{1 - 2p}} f(\boldsymbol{x}^{(m)})$ . The factor $\frac{1}{1 + e^{1 - 2p}}$ is approximately $p$ , especially around $\frac{1}{2}$ . This multiplication can also be calculated more accurately with approximations using ReLUs or sigmoids, but for brevity and following experimental evidence of a sigmoid shape in task superpositions, these options are omitted. + +# E.4. Superposed Tasks with Parallel Heads + +The above construction works for a single task, where the output is weighted by the proportions of the task within the context. To complete the construction of a transformer that does superposition of tasks, each of these models needs to be placed within the same overall transformer. This is described here. + +Let there be a collection of tasks $\{t_i\}_{i=1}^T$ which can be executed by transformers with model weights represented by subscripts $(\cdot_i)$ . With the input to each transformer being $X^{(i)}$ , the overall input matrix is given by vertically stacking these matrices. + +$$ +\boldsymbol {X} = \left[ \begin{array}{c} \boldsymbol {X} _ {1} \\ \boldsymbol {X} _ {2} \\ \vdots \\ \boldsymbol {X} _ {T - 1} \\ \boldsymbol {X} _ {T} \end{array} \right] \tag {37} +$$ + +Similarly, define each MLP's weights and biases as + +$$ +\boldsymbol {W} = \operatorname {d i a g} \left(\boldsymbol {W} _ {1}, \dots , \boldsymbol {W} _ {T}\right) \quad \boldsymbol {b} = \left[ \begin{array}{c} \boldsymbol {b} _ {1} \\ \vdots \\ \boldsymbol {b} _ {T} \end{array} \right] \tag {38} +$$ + +This puts every MLP to be independent of each other. Lastly, we need to change the attention layers. This requires the use of one head per task. In each of the following, $\mathbf{W}^{(i)}$ is a weight matrix for head $i$ , $(\mathbf{W})_i$ is the weight matrix for task $i$ in its individual transformer, and each matrix below is in the $i$ -th block. + +$$ +\boldsymbol {W} _ {V} ^ {(i)} = \left[ \begin{array}{c} \vdots \\ \mathbf {0} \\ (\boldsymbol {W} _ {V}) _ {i} \\ \mathbf {0} \\ \vdots \end{array} \right] ^ {\top} \quad \boldsymbol {W} _ {K} ^ {(i)} = \left[ \begin{array}{c} \vdots \\ \mathbf {0} \\ (\boldsymbol {W} _ {K}) _ {i} \\ \mathbf {0} \\ \vdots \end{array} \right] ^ {\top} \quad \boldsymbol {W} _ {Q} ^ {(i)} = \left[ \begin{array}{c} \vdots \\ \mathbf {0} \\ (\boldsymbol {W} _ {Q}) _ {i} \\ \mathbf {0} \\ \vdots \end{array} \right] ^ {\top} \tag {39} +$$ + +In all, this model executes multiple tasks in superposition by using parallel streams of heads that each performs a single task. Task identification can happen through the same mechanism as task execution by comparing the output of the task on each in context example with the true output. + +For context related tasks, there needs to be positional encodings that allow for looking back a fixed number of tokens. For context agnostic tasks, a wide MLP can be used to approximate arbitrary non-linear transformations of the input. Each of these tasks only require a small number of layers, significantly smaller than those of modern LLMs. It may be possible that LLMs do certain tasks with different combinations of layers. + +Also, if we take the feature $p$ from each parallel stream, this creates the following task identifier. + +$$ +\boldsymbol {v} = \left[ \begin{array}{c} p _ {1} \\ p _ {2} \\ \vdots \\ p _ {T} \end{array} \right] \tag {40} +$$ + +Interpolating between the pure tasks, represented by unit vectors, different amounts of each task will appear in the superposition in roughly equal proportions to those found in $\pmb{v}$ . + +Lastly, we restate this construction formally. + +Theorem 1. A seven layer transformer with embedding dimension $\mathcal{O}(d + \log (mn))$ with $K$ heads per attention layer can perform $k$ tasks on vectors of dimension $d$ in superposition, with weighting based on $m$ different in-context examples each of length $n$ . + +Proof. Using in succession each of Lemma 1, Lemma 2, Lemma 3, and Lemma 4, a transformer with the desired properties can execute $k$ tasks in parallel. Lemma 1 identifies positions within the context that contain the labels $y$ . Lemma 2 then uses function approximation to perform arbitrary tasks within the architecture, which are then used by 3 to find the proportions of each task and aggregate them into a single task identifier. Lastly, Lemma 4 uses this task identifier to create a weighted sum of outputs from the different tasks based on their in-context proportions. + +Remark. Transformers of greater depth than seven layers can also represent this construction by setting the weights in all other layers for the non-residual part to zero. + +# F. Additional experiment and analysis of task superposition in pretrained models + +GPT-3.5 Llama-3 70B Qwen-2.5 72B +![](images/6367cf4dfbc83d5488645ce894f2c00bb9724ec469d3c90c7e958c636f508619.jpg) +(a) (left) All task examples from task add; (right) equal number of task examples from add and add_in_en. + +![](images/772c0ca10512c2349ef7734c8e6a3fb50fce9002fc0802b577c4adb5f920daee.jpg) + +![](images/af8234fa24a84c4a1a0187df34d73e0de43892ff79e05863cd8107c805eb9740.jpg) +(b) (left) All task examples from task capital; (right) equal number of task examples from capital and continent. + +![](images/193bb0805e29fac3a9e3fb6d5591fca68cf3408fbdb96f58d381b1e6badabdfd.jpg) + +![](images/9743d5a93913c3322241e3ab06da9ef5044ee209c584b9839914e7df0e6343c9.jpg) +(c) (left) All task examples from task copy (op1); (right) equal number of task examples from copy (op1) and copy (op2). + +![](images/ddaa09536d63531b5b5b5264c92fb34ce7b12876aadb3bc16e37ac74a45c9814.jpg) + +Figure 7: For each subplot, we consider two tasks task1 and task2 and on the left side we plot the median probability for task answers where all task examples in prompts are from task1; on the right side we plot the median probability for task answer where task examples from task1 and from task2 in prompts are equal. +![](images/7db4cd9a2be46c0ec822d6e00b5afd6ec000d809bcbb91cf7eb1c81d10ae688c.jpg) +(d) (left) All task examples from task first_letter; (right) equal number of task examples from first_letter and first_letter_cap. + +![](images/ab701ebd1ad13eb01901c00a3f85e9f3aa619ff666c70cf5c44f47493e1a677d.jpg) + +# F.1. Is superposition really happening? + +In Figure 2 we plot distributions of probabilities for each task in four settings. Note that in setting 3 (corresponds to Figure 2b(left)), the other category has low probabilities for all models but for settings 1, 2 and 4 (correspond to Figure 2a(left), 2a(right) and 2b(right) respectively), the other category is not always low. A natural question to ask is: + +For the non-zero probabilities we observe on each task answer, are they indications of task superposition or by-products of prediction noise? + +We set up an experiment to investigate this. For each setting, we select two tasks task1 and task2; then we consider two scenarios: (1) we provide prompts where all task examples come from task1 and (2) we provide prompts where half of the task examples come from task1 and the other half of task examples come from task2; in both scenarios we measure the probabilities for task answers of task1 and task2 and see how these probabilities change between scenario (1) and (2). For each scenario, we test it on 300 prompts (each task has 10 in-context examples) and plot the median of task answers in Figure 7. As is shown in Figure 7 left side, where there is no task example from task2 in the prompt, the probabilities for task answers of task2 are near 0 for all models; on the right side, where there is an equal number of task examples that are from task1 and task2, the probabilities for task answers of task2 increase significantly. This indicates that when we provide prompts that mix task examples from different tasks, the prediction on each task answer is more than just pure prediction noise. + +# F.2. Measuring accuracy in task superposition + +We further investigate how task superposition affects task performance. In particular, for a prompt consisting of examples of $K$ tasks (each task has an equal number of task examples), we define a task being correctly performed if its task answer lies in the top- $K$ answers (that we use beam search to find). We compare the accuracy against individual task accuracy where we provide prompts consisting of task examples of only 1 task and define the task being correctly performed if the task answer is the top-1 answer. + +We calculate accuracy in $K = 1$ case and $K > 1$ case using 300 prompts and show the result in Table 2. We find that as we increase the number of tasks, all models exhibit an accuracy decrease in correctly performing each individual task. + +
ModelK=1K=4
t1t2t3t4t1t2t3t4
GPT-3.510099.7909597.3 (-2.7)90.7 (-9)80 (-10)80.3 (-14.7)
Llama-3 70B1001009799100 (0)99 (-1)95.7 (-1.3)93 (-6)
Qwen-2.5 72B1001008796.799.7 (-0.3)87.7 (-12.3)87.7 (+0.7)63.7 (-33)
+ +(a) Setting 1: Addition in original numerical form and in different languages where $t1 = \text{add}$ , $t2 = \text{add\_in\_en}$ , $t3 = \text{add\_in\_fr}$ , $t4 = \text{add\_in\_es}$ . + +
ModelK = 1K = 3
t1t2t3t1t2t3
GPT-3.597.710010093 (-4.7)61.7 (-38.3)42 (-58)
Llama-3 70B98.310010085.3 (-13)79 (-21)75 (-25)
Qwen-2.5 72B98.310010087.7 (-10.6)78.3 (-21.7)30 (-70)
+ +(b) Setting 2: Naming the capital, continent and capitalize the country name where $t1 =$ capital, $t2 =$ continent, $t3 =$ capitalization. + +
ModelK=1K=3
t1t2t3t1t2t3
GPT-3.5100100100100 (0)98.3 (-1.7)97.3 (-2.7)
Llama-3 70B10010099.799.7 (-0.3)99.7 (-0.3)99.3 (-0.4)
Qwen-2.5 72B100100100100 (0)100 (0)99 (-1)
+ +(c) Setting 3: $t1 = \text{copy}(\text{op1})$ , $t2 = \text{copy}(\text{op2})$ and $t3 = \text{op1} + \text{op2}$ . + +
ModelK=1K=4
t1t2t3t4t1t2t3t4
GPT-3.51001001009762 (−38)79.7 (−20.3)79 (−21)24.3 (−72.7)
Llama-3 70B1008510059.385 (−15)52.7 (−32.3)95.3 (−4.7)39 (−20.3)
Qwen-2.5 72B10098.71009753.3 (−46.7)98.3 (−0.4)42 (−58)84 (−13)
+ +(d) Setting 4: First or last letter in upper or lower cases where t1 = first_letter, t2 = last_letter, t3 = first_letter_cap, t4 = last_letter_cap. +Table 2: Accuracy for each task in percentage, with the delta change given in parenthesis. For each setting we calculate the accuracy with prompts consisting of task examples of only one task ( $K = 1$ case) and with prompts consisting of examples from multiple tasks ( $K > 1$ case). \ No newline at end of file diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/images.zip b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8719c240593b88d47780ac7ce1f1b6e25e089a35 --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23157dff07a0fd85a53d06555a4bcef63141030b6d9285e3d51210be7bc71a5e +size 1234474 diff --git a/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/layout.json b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5be11634253e013e6aafe85846f5a623bc8c71f0 --- /dev/null +++ b/ICML/2025/Everything Everywhere All at Once_ LLMs can In-Context Learn Multiple Tasks in Superposition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a5ade88b4ce2bce9939743abae50cfbc54c6b4bb057f1d886510c54c32afd70 +size 982936 diff --git a/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_content_list.json b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5998e2e8a1c5f0b65d73c14876904b9bd03f8f05 --- /dev/null +++ b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b70cb868ed9e2fb0f8c5f3b5efc6fdecc16a005a76668ce7ed4c932f502050ea +size 440768 diff --git a/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_model.json b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_model.json new file mode 100644 index 0000000000000000000000000000000000000000..191400be36173cbe1802c7129e8966b41e8bd98f --- /dev/null +++ b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:684f40a34185f9a3c8b9921b42aa5480aeb2c068d90d34d2ec5607199f1aa4b3 +size 512210 diff --git a/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_origin.pdf b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3e6d6e803426d652f1792c3aca8a181ada978afe --- /dev/null +++ b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/5a6c0ce5-89e3-4e6a-a23d-3bebe07dea07_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b09e9939a70083600bfb34e58f7386fe711707c61dc5bc79159905b9108eebeb +size 2910634 diff --git a/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/full.md b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8838ec7daac0aa2702908d518ed298ce474f5b70 --- /dev/null +++ b/ICML/2025/EvoControl_ Multi-Frequency Bi-Level Control for High-Frequency Continuous Control/full.md @@ -0,0 +1,1269 @@ +# EvoControl: Multi-Frequency Bi-Level Control for High-Frequency Continuous Control + +Samuel Holt†1 Todor Davchev2 Dhruva Tirumala2 Ben Moran2 Atil Iscen2 Antoine Laurens2 Yixin Lin2 Erik Frey2 Markus Wulfmeier‡2 Francesco Romano‡2 Nicolas Heess2 + +# Abstract + +High-frequency control in continuous action and state spaces is essential for practical applications in the physical world. Directly applying end-to-end reinforcement learning to high-frequency control tasks struggles with assigning credit to actions across long temporal horizons, compounded by the difficulty of efficient exploration. The alternative, learning low-frequency policies that guide higher-frequency controllers (e.g., proportional-derivative (PD) controllers), can result in a limited total expressiveness of the combined control system, hindering overall performance. We introduce EvoControl, a novel bi-level policy learning framework for learning both a slow high-level policy (using PPO) and a fast low-level policy (using Evolution Strategies) for solving continuous control tasks. Learning with Evolution Strategies for the lower-policy allows robust learning for long horizons that crucially arise when operating at higher frequencies. This enables EvoControl to learn to control interactions at a high frequency, benefitting from more efficient exploration and credit assignment than direct high-frequency torque control without the need to hand-tune PD parameters. We empirically demonstrate that EvoControl can achieve a higher evaluation reward for continuous-control tasks compared to existing approaches, specifically excelling in tasks where high-frequency control is needed, such as those requiring safety-critical fast reactions. + +$^{\dagger}$ Work done during an internship at Google DeepMind. ${}^{‡}$ Equal advising. ${}^{1}$ University of Cambridge ${}^{2}$ Google DeepMind. Correspondence to: Samuel Holt . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +High-frequency control is paramount for ensuring the safety and reliability of real-world robotic systems (Hogan, 1984; Oh et al., 2014; Venkataraman & Gulati, 1993; Dantec et al., 2022). Failures to respond in real-time to unexpected collisions, disturbances, or human interactions can lead to catastrophic consequences in safety-critical applications such as surgery (Kuchenbecker et al., 2010), autonomous driving (Guo et al., 2019), and industrial automation (Vasic & Billard, 2013). To achieve reliable performance, practical robotic systems commonly rely on low-level fixed controllers (e.g., proportional-derivative (PD) controllers) operating at high frequencies. However, this approach raises the fundamental question of whether we can remove these lower-level fixed controllers entirely and instead directly control motor torques at high frequency, potentially enabling faster reactions and finer control. + +Recent work falls into two main categories. First, directly learning end-to-end high-frequency (often torque-based (Al-jalbout et al., 2024)) policies, labeled direct torque control, presents significant learning challenges as this increases the number of state transitions within a fixed time window, resulting in longer trajectories with complex temporal dependencies that hinder exploration and credit assignment (Peng & Van De Panne, 2017; Sutton & Barto, 2018; Dabney et al., 2020)—and can often lead to suboptimal behavior (Section 5.2). + +Second, a common alternative is to learn a slower high-level policy that outputs target positions or velocities, which are then tracked by a faster (higher-frequency) low-level fixed controller, such as a PD controller (Wei, 2019). This bilevel approach, labeled as fixed controllers, is prevalent in real-world continuous control tasks (Aljalbout et al., 2024; Song et al., 2019) and simplifies learning by reducing the effective time horizon of the high-level policy (Sutton et al., 1999). For real-time control, this composition affords the high-level policy larger inference time, key for handling rich observations, such as images (i.e., at $30\mathrm{Hz}$ ) or using larger networks, such as Visual-Language-Models (Ma et al., 2024). While composing with a low-level PD controller that operates at higher-frequencies $\sim 500Hz$ on robotic plat + +forms, often only observing at high-frequency direct robot proprioceptive observations such as robot joint positions, velocities and torques (Borase et al., 2021). However, fixed controllers are unable to produce fast interaction behavior beyond simple state-goal-tracking limiting their expressiveness, and require manual tuning of their PD parameters for each task. + +An effective method for high-frequency control therefore aims to have the following three core properties: + +(P1) Efficient Exploration: Throughout learning, be able to efficiently explore the state space as well as a high-level policy with a fixed controller. +(P2) High-Frequency Interaction Control: Enable the learning of a low-level controller capable of complex, adaptive behaviors at high frequencies. +(P3) Automate Controller Tuning: Reduce manual tuning of the low-level PD controller parameters. + +With these considerations, we introduce EvoControl, a novel bi-level policy learning framework for learning both a slow high-level policy and a fast low-level policy for continuous control robotic tasks. EvoControl learns a high-level policy with proximal policy optimization (PPO) and a low-level proprioceptive policy with Evolution Strategies (ES) in alternating stages. The low-level policy is initialized as a fixed PD controller and gradually transitions to a learned neural network policy throughout training via an annealing parameter $\alpha$ . This staged training process enables stable learning and effective exploration. ES at the low level provides robust learning, particularly beneficial for long horizon credit assignment inherent in high-frequency control. These components enable EvoControl to learn high-frequency interaction control, automate controller tuning, and more efficiently explore than direct high-frequency torque control. + +Contributions: ① We introduce EvoControl, a novel bil-level policy learning framework for learning both a slow (e.g. $30\mathrm{Hz}$ ) high-level policy and a fast (e.g. $500\mathrm{Hz}$ ) low-level robot proprioceptive controller using PPO and ES, respectively, for continuous-control tasks (Section 3). ② Theoretically, we show that there exist some continuous-time Markov Decision Processes (CTMDPs) in which acting at higher frequencies can yield strictly higher expected cumulative reward (Proposition 2.1). Empirically, we demonstrate that EvoControl can achieve a higher evaluation reward for standard continuous-control tasks at high frequency compared to existing approaches, excelling in tasks where high-frequency control is needed, such as in safety-critical applications of unmodeled interactions (Section 5.1). ③ We gain insight and understanding of how EvoControl can achieve efficient exploration compared to direct torque control at high-frequency, learn fast interactions, and demonstrate robustness to mistuned PD parameter settings. + +# 2. Problem + +We follow the standard continuous control reinforcement learning (RL) setting with the inclusion of an optional low-level controller. + +States & Actions. We denote the environments state space as $S \subset \mathbb{R}^{d_s}$ and its action space as $\mathcal{U} \subset \mathbb{R}^{d_u}$ . At time $t \in \mathbb{R}$ , the system's state is represented by $\mathbf{s}_t \in S$ , and its action by $\mathbf{u}_t \in \mathcal{U}$ . Considering action (e.g., actuator) limits, the action space is constrained to a box in Euclidean space: $\mathcal{U} = [\mathbf{u}_{\min}, \mathbf{u}_{\max}]$ . + +Environment Dynamics. The transition dynamics for continuous control environments can be described by an underlying unknown differential equation of $\dot{s}_t = \frac{ds_t}{dt} = f(s_t, u_t)$ . The transition function, which describes the evolution of the state over a discrete time step $\Delta_t$ , can be approximated using the Euler method $s_{t + \Delta_t} \approx s_t + \Delta_t f(s_t, u_t)$ . Given an action $u_t$ and current state $s_t$ , $s_{t + \Delta_t} \sim P(s_{t + \Delta_t}|s_t, u_t)$ is implicitly defined by this approximation. More sophisticated numerical integration methods can also be used. We expand on the problem setup in Appendix A. + +Policies. The agent can be represented as a single policy $\pi : \mathbb{R}^{d_s} \to \mathbb{R}^{d_u}$ , that observes the current observation at time $t$ and samples an action $u_t \sim \pi(s_t)$ and then applies this action to the environment at a given fixed $\Delta_t$ . To formalize + +Algorithm 1 Bi-Level Policy Interaction (Single High-Level Step) + +1: $a_{k}\sim \rho (s_{k})$ {High-level action} +2: for $i = 0$ to $G - 1$ do +3: $u_{k + i}\sim \beta (s_{k + i},a_k)$ {Low-level action} +4: $s_{k + i + 1}\sim f(s_{k + i},u_{k + i},\Delta_t)$ +5: end for + +a bi-level policy, we decompose $\pi$ into two components: a slow, high-level policy, $\rho$ , and a fast, low-level policy, $\beta$ . Both policies interact with the environment as described in Algorithm 1. At time step $k$ , $\rho$ outputs a latent action $a_{k} \sim \rho(s_{k})$ (e.g., a target position or velocity). Operating at a higher frequency, $\beta$ receives $a_{k}$ and generates low-level actions $u_{k+i}$ (e.g., motor torques) at a finer-grained time step $i$ to achieve the target specified by $\rho$ . With $\beta$ operating at frequency $1 / \Delta_{t}$ , $\rho$ 's latent action is executed by $\beta$ for $G$ steps, making $\rho$ 's effective frequency $1 / (G \Delta_{t})$ . + +Objective. The environment produces a reward $r_t$ sampled from an unknown reward function $r(s_t, u_t)$ . The overall objective of the agent is to maximize the expected future discounted reward $\mathbb{E}_{s_{0:T}, u_{0:T-1}, r_{0:T-1}}\left[\sum_{i=0}^{T-1} \gamma^i r_i\right]$ , where $0 \leq \gamma < 1$ is the discount factor. + +# 2.1. Existence of CTMDPs Requiring Higher-Frequency Control for Optimality + +In certain continuous-time Markov Decision Processes (CT-MDPs), taking actions at a higher frequency strictly increases the achievable reward—a point we make formally in Proposition 2.1. + +Proposition 2.1. Consider a continuous-time Markov Decision Process (CTMDP) with a finite state space and action space. Let this CTMDP be discretized with time step $\Delta_t$ . There exist CTMDPs such that for any fixed discretization step $\Delta_t > 0$ , there exists a finer discretization $\Delta_t' < \Delta_t$ where the optimal policy for the $\Delta_t'$ -discretized MDP achieves a higher expected cumulative reward over a fixed time horizon $T$ than the optimal policy for the $\Delta_t$ -discretized MDP. + +Proof. Full proof is in Appendix B; however, we present the following sketch. Consider a CTMDP with states $\{s_{\mathrm{good}}, s_{\mathrm{bad}}\}$ and actions $\{a_{\mathrm{maintain}}, a_{\mathrm{recover}}\}$ . Under $a_{\mathrm{maintain}}$ , the system transitions from $s_{\mathrm{good}}$ to $s_{\mathrm{bad}}$ at rate $p > 0$ , while $a_{\mathrm{recover}}$ immediately transitions $s_{\mathrm{bad}}$ to $s_{\mathrm{good}}$ . Let rewards be $r(s_{\mathrm{good}}) = r_{\mathrm{good}} > 0$ and $r(s_{\mathrm{bad}}) = r_{\mathrm{bad}} < 0$ , with episode length $T$ . Discretizing at $\Delta_t$ , the optimal policy uses $a_{\mathrm{maintain}}$ when in $s_{\mathrm{good}}$ and $a_{\mathrm{recover}}$ when in $s_{\mathrm{bad}}$ , yielding expected return $R(\Delta_t) = T r_{\mathrm{good}} - T p \Delta_t(r_{\mathrm{good}} - r_{\mathrm{bad}})$ . Now refine to $\Delta_t' = \Delta_t / n$ where $(n > 1)$ . Recovery happens more quickly, reducing time spent in $s_{\mathrm{bad}}$ each $\Delta_t$ -interval, so the finer-discretized return is $R(\Delta_t') = T r_{\mathrm{good}} - \frac{T p \Delta_t}{n} (r_{\mathrm{good}} - r_{\mathrm{bad}})$ . The difference $R(\Delta_t') - R(\Delta_t) = T p \Delta_t (r_{\mathrm{good}} - r_{\mathrm{bad}}) (1 - \frac{1}{n}) > 0$ , so a finer discretization leads to a strictly higher expected cumulative reward under its optimal policy. + +This highlights the need for higher-frequency control in certain environments. This is analogous to the Pulse Width Modulation (PWM) sampling theorem (Huang et al., 2011), where variable pulse widths enable perfect signal reconstruction from discrete samples, similar to how high-frequency actions enable optimal control in our MDP setting. We further explore a continuous control safety-critical intuitive example in Appendix B.1. + +# 2.2. Background: Fixed PD Controllers + +In continuous control and robotics, hierarchical structures composed of a learned high-level policy $(\rho)$ and a fixed low-level controller (e.g., a PD controller (Oku et al., 2018; Findelsen et al., 1980)) are common. This hierarchical decomposition reduces the number of decision steps for the high-level policy by a factor of $G$ within a fixed episode duration $T$ , where $G$ is the number of low-level actions executed per high-level action. The high-level policy outputs a target $a_{k}$ , + +Table 1: Common Fixed Low-Level PD Controllers + +
MethodakControl Law
PD Absolute Positionqd=akτ(t)=Kp(qd-q)+Kd(qd-φ)
PD Delta Positionδqd=akτ(t)=Kp((qk+δqd)-q)+Kd(qd-φ)
PD Velocityˆqd=akτ(t)=Kp(ˆqd-φ)+Kd(0-φ)
PD Integrated Velocityˆqd=akτ(t)=Kp((qd+∫ˆqddt)-q)+Kd(0-φ)
PD Position & Kp{qd,Kp}=akτ(t)=Kp(qd-q)+Kd(qd-φ)
+ +often a desired position or velocity $^1$ , which the low-level PD controller then tracks. The controller computes a control signal $u_{t}$ based on the error between the target $a_{k}$ and the measured system state $s_t$ , $u_{t} = K_{p}(a_{k} - s_{t}) + K_{d}(\dot{a}_{k} - \dot{s}_{t})$ where $e_t = a_k - s_t$ is the tracking error, and $K_{p},K_{d}\in \mathbb{R}^{+}$ are constant proportional and derivative gains. Common PD controller designs using proprioceptive states (joint positions $q_{t}$ , velocities $\dot{q}_t$ , and torques $\tau_{t}$ ) are summarized in Table 1. We provide an expanded background on PD controllers in Appendix C. + +# 3. EvoControl: Evolved Low-Level Controller Framework + +We now propose EvoControl, a novel bi-level policy learning framework for learning both a slow high-level policy and a fast low-level policy for continuous control tasks. The key idea is to stabilize the bi-level on-policy learning of a higher-level policy by initially learning with a fixed-low-level PD controller and then annealing to a gradually ES-learned high-frequency controller—Figure 1 provides a block diagram. + +First, we formulate the bi-level policy optimization problem and its challenges. Then, we discuss our approach and the advantages of using ES for lower-level policy optimization. Specifically our framework can be applied starting with different semantically meaningful high-level actions $a_{k}$ from the high-level policy, such as position/velocity targets, commonly seen in existing PD controllers, as outlined in Table 1. + +# 3.1. Promise and Challenges of Policy Hierarchies + +Hierarchical reinforcement learning (HRL), employs multiple levels of policies with increasing temporal abstraction. It tackles complex tasks through improved exploration and long-horizon planning (Parr & Russell, 1997; Sutton et al., 1999; 2011). If high-level actions induce diverse low-level trajectories, exploration can become more effective (Sutton et al., 1999; Li et al., 2021; McClinton et al., 2021). For instance, fixed low-level PD controllers, combined with a learned high-level policy, act as temporally extended actions, facilitating efficient exploration if aligned with the + +![](images/45a4dd9ef6dc25141b12c1efedd492371c75d5fe57316b064f98112f9feda64c.jpg) +A) Bi-Level Rollout - Following Algorithm 1 +Figure 1: A) Bi-level Policy Interaction. The high-level policy $\rho_{\theta}$ outputs latent action $a_{k}$ , which guides the low-level policy $\beta_{\phi}$ for $G$ steps. B) EvoControl Training Loop. EvoControl trains both the high-level ( $\rho_{\theta}$ , with parameters $\theta$ ) and low-level ( $\beta_{\phi}$ , with parameters $\phi$ ) policies over the course of training divided into $K$ discrete sections. Each section $k$ first optimizes $\theta$ with PPO (fixed $\phi$ ), then optimizes $\phi$ with Evolution Strategies (fixed $\theta$ ). ES maintains a population of $\phi$ parameters, evaluates their fitness (episodic return, $F$ ), and updates the parameter distribution to maximize average fitness. This process, robust to long horizons, enables learning of complex low-level behaviors. To stabilize learning, $\beta_{\phi}$ is initially a PD controller ( $\beta_{\mathrm{PD}}$ , $\alpha = 1$ ) and transitions to a learned controller as $\alpha$ anneals towards 0. + +task2 (Chiaverini et al., 1999). + +However, simultaneously learning high- and low-level policies with an intermediate latent action can destabilize learning (Yang et al., 2021; Nachum et al., 2018a; Wöhlke et al., 2021). As the low-level policy updates, the same high-level latent action may produce different low-level action sequences, creating a non-stationary learning environment for the high-level policy. Conversely, effective low-level policy learning requires informative high-level latent actions, creating a co-dependency that can hinder both levels of the hierarchy. + +Bi-level learning presents further challenges: determining optimal latent actions (Nachum et al., 2018a) and the appropriate low-level policy reward function to optimize. While subgoal-based rewards (e.g., $r_t = -||s_{\mathrm{goal}} - s_t||_2$ ) are promising and relate to PD control, they can struggle to capture complex behaviors best optimized through overall episodic return ( $R = \sum_{i=0}^{T/\Delta_t-1} r(s_{i\Delta_t}, u_{i\Delta_t})\Delta_t$ ). Furthermore, optimizing $R$ requires long-term credit assignment, exacerbated by high-frequency low-level policies (Peng & Van De Panne, 2017). This motivates our framework for optimizing the episodic return $R$ directly. + +# 3.2. Efficient High-Level Policy Exploration + +In the following, we outline how we train both the slow high-level policy $\rho$ and the fast low-level policy $\beta$ by training each level in $K\in \mathbb{Z}_{+}$ stages, with the other fixed, which assists in mitigating the issues of instability and long-horizon credit assignment. + +To deliver on the key advantage of efficient high-level state-action exploration for the bi-level control approach, as outlined in Figure 1, we seek a stable way of initially learning the high-level policy to overcome the non-stationary challenge of learning with a continually updating lower-level policy. A key approach we choose, which, as we will see later, also assists in stably learning a lower-level policy, is to represent the lower-level policy as a convex combination of a fixed PD controller $\beta_{\mathrm{PD}}$ and a learned neural network actor policy $\beta_{\phi \mathrm{NN}}$ with parameters $\phi$ , and start initially training with only the PD controller, with $\alpha = 1, \alpha \in [0,1]$ and anneal $\alpha$ to 0 over the course of training. Specifically, we formulate the bi-level policies during training in Algorithm 1 as: + +$$ +\rho_ {\theta} (s _ {k}), +$$ + +$$ +\beta_ {\phi} \left(s _ {k + i}, a _ {k}\right) = \alpha \beta_ {\mathrm {P D}} \left(s _ {k + i}, a _ {k}\right) + (1 - \alpha) \beta_ {\phi \mathrm {N N}} \left(s _ {k + i}, a _ {k}\right) +$$ + +This brings two immediate advantages: 1) the high-level action $a_{k}$ output from the high-level policy has an initial semantic meaning, grounding it and allowing a user to select the most appropriate PD controller for the given task, and 2) + +as $\alpha$ is annealed throughout training from 1 to 0, we inherit the effective state-action exploration properties of having a fixed PD controller initially (Section 5.2), and yet can still retain the flexibility of learning more complex lower-level behavior, beyond just sub-goal/state tracking. + +To optimize the high-level policy, we employ Proximal Policy Optimization (PPO) (Schulman et al., 2017), a highly effective on-policy reinforcement learning algorithm for continuous control tasks. The high-level policy is represented by a continuous control agent consisting of a neural network with separate critic and actor heads. The actor head parameterizes a multivariate Gaussian distribution with a diagonal covariance matrix, with parameters $\theta$ . Specifically, the high-level policy is defined as: + +$$ +a _ {k} \sim \rho_ {\theta} (s _ {k}) = \mathcal {N} (\mu_ {\theta} (s _ {k}), \Sigma_ {\theta} (s _ {k})) +$$ + +where $\mu_{\theta}(s_k)$ is the mean vector and $\Sigma_{\theta}(s_k) = \mathrm{diag}(\sigma_{\theta,1}^2(s_k), \sigma_{\theta,2}^2(s_k), \dots, \sigma_{\theta,n}^2(s_k))$ is the diagonal covariance matrix, with $\sigma_{\theta,l}^2(s_k)$ representing the variance for the $l$ -th action dimension at time step $k$ . + +# 3.3. ES-learning a Fast Low-level Policy + +We seek to learn more complex lower-level behavior beyond prior work of simple goal-reaching low-level policies (Nachum et al., 2018a). However, directly optimizing the episodic return $(R)$ is challenging due to the extended credit assignment horizon, exacerbated by the higher-frequency low-level controller and its increased number of steps $(G)$ per high-level latent action $a_{k}$ . + +Policy gradient methods, while a natural choice for policy optimization, are known to struggle with the long horizons encountered in high-frequency control (Peng & Van De Panne, 2017) $^3$ . This difficulty is compounded by the credit assignment problem (Sutton & Barto, 2018), where the impact of individual low-level actions on the overall return becomes increasingly diffused over longer horizons (Dayan & Hinton, 1992). Furthermore, the increased temporal density of actions at higher frequencies can lead to heightened sensitivity to policy parameter variations, making the optimization landscapes more challenging to navigate and potentially leading to suboptimal solutions. Empirical evidence supporting these challenges is presented in Appendix J.2. + +Instead, we seek a learning method that is invariant to the long-horizon credit assignment issue and that can discover a globally optimal low-level policy. Motivated by this, we adopt an Evolutionary Strategies (ES) approach (often termed Neuroevolution when applied to training neural + +networks) (Rechenberg, 1973; Wierstra et al., 2014; Salimans et al., 2017). ES is a gradient-free, black box, global optimization method that optimizes the lower-level policy neural network parameters $\phi$ , by maintaining a population of parameters represented by a distribution $p_{\eta}(\phi)$ , itself parameterized by $\eta$ and maximizes the average fitness value $\mathbb{E}_{\phi \sim p_{\eta}}F(\phi)$ over the population by searching for $\phi$ with stochastic gradient ascent (Salimans et al., 2017). The core idea rests upon optimizing the score function estimator of + +$$ +\nabla_ {\phi} \mathbb {E} _ {\epsilon \sim \mathcal {N} (0, I)} [ F (\phi + \sigma \epsilon) ] = \frac {1}{\sigma} \mathbb {E} _ {\epsilon \sim \mathcal {N} (0, I)} [ F (\phi + \sigma \epsilon) \epsilon ], +$$ + +where $\mathcal{N}(0,I)$ is the standard multivariate normal distribution, and $\sigma$ is a step size parameter. This estimator allows for gradient estimation without explicit backpropagation by sampling perturbations of $\epsilon$ . Therefore, ES maintains a population of parameters, evaluates their fitness, and generates a new population through selection, mutation (adding noise $\sigma \epsilon$ ), and recombination, as determined by a specific ES algorithm used (Salimans et al., 2017). ES, while less sample efficient compared to RL, are particularly well-suited for scenarios where gradient-based methods struggle, such as those with delayed rewards, noisy environments, or long-horizon tasks (Salimans et al., 2017). The EvoControl framework supports different ES algorithms, and we empirically evaluate many competitive ES approaches in Appendix J.1 and find that the competitive approach of Policy Gradients with Parameter-Based Exploration (PGPE) (Sehnke et al., 2010) is both effective within EvoControl (Section 5.1) and straightforward to implement. + +One consideration is what to select as the fitness function $F(\phi)$ for the parameters. Given the bi-level setup, we seek to optimize the episodic return for the combined bi-level policy as a rollout in the environment, i.e. $F(\phi) = R$ . Doing so becomes a long horizon optimization problem, especially when the lower-level operates at a higher frequency. Interestingly, directly optimizing the parameters with gradient descent is infeasible due to stochastic noise on the state of the environment and potentially many steps of gradient propagation through an entire bi-level policy rollout of the environment. Crucially, to reduce the variance of the fitness function $F$ and improve learning convergence of the lower-level policy, we sample the mode of the probabilistic high-level actor, and parameterize the lower-level actor as a deterministic low-level policy neural network. + +Another advantage of using ES for lower-level policy optimization is the inherent parallelism of fitness evaluations. This parallelism can lead to faster wall-clock time convergence compared to gradient-based methods, even though ES generally requires more samples (Salimans et al., 2017). In our experiments, we find that this trade-off is beneficial: the increased sample complexity is outweighed by the ability to stably learn a high-frequency low-level policy + +# (Appendix J.3). + +The process of annealing with a PD controller further improves learning a lower-level policy that can be directed with a high-level latent action as input $a_{k}$ that is directed towards solving the task. Although initially the higher-level policy will provide a latent-action $a_{k}$ that would be applicable to a particular PD controller that it was initially trained with in the early stages of training, by enabling full optimization of the lower-level policy we can evolve a better performing lower-level policy, lessening the reliance on a tuned PD controller. In practice we find this effective, even if the PD controller is mistuned (Section 5.2). We provide pseudocode for EvoControl in Appendix G.1. + +# 4. Related Work + +Here we provide the existing approaches to continuous control, and provide an extended related work in Appendix D. + +Fixed Low-Level Controllers: Commonly involve combining a learned high-level policy (often operating at low frequency, e.g., 10-30Hz) with a fixed or analytical high-frequency low-level controller (e.g., a Proportional-Derivative (PD) controller operating at 500Hz or higher) (Song et al., 2019). Whilst prevalent, due to the ease of state-action space exploration (Peng & Van De Panne, 2017; Pateria et al., 2021), this approach suffers from several drawbacks. The low-level controller's PD parameters require careful tuning per task, and its fixed nature limits its ability to handle high-frequency interactions, such as unexpected collisions or disturbances, that involve more complex behavior than just reaching a given goal state or emergency braking. Furthermore, recent work applying RL algorithms to the physical world often restricts itself to relatively low-frequency control ( $\sim$ 20Hz) due to the reliance on analytical impedance controllers (Martín-Martín et al., 2019; Luo et al., 2018; Johannink et al., 2019; Davchev et al., 2022). Evo-Control, in contrast, aims to achieve efficient exploration while also enabling the learning of flexible and complex high-frequency behaviors in the low-level policy. + +Direct Torque Control: Methods learn end-to-end policies that output joint torques at high frequency (Peng & Van De Panne, 2017; Wahlström et al., 2015; Watter et al., 2015). While offering greater flexibility, this approach suffers from the curse of dimensionality imposed by the increased number of time steps in long horizons. The resulting explosion in the number of possible action sequences significantly hinders exploration and can lead to suboptimal policies (Martín-Martín et al., 2019; Peng & Van De Panne, 2017). EvoControl mitigates this challenge by employing a hierarchical structure, enabling more efficient exploration while retaining the adaptability afforded by direct torque control at the low level. + +Table 2: EvoControl Ablation of PD Controllers. + +
Controller VariantβNN Obs.βNN action
EvoControl (Full State)st, ak, et, qt, ðt, t/Tτ
EvoControl (Residual State)et, t/Tτ
EvoControl (Target + Proprioceptive)ak, qt, ðt, et, t/Tτ
EvoControl (Target)ak, qt, ðt, t/Tτ
EvoControl (Learned Gains)st, ak, qt, ðt, t/TKp, Kd
EvoControl (Delta Position)st, ak, et, qt, ðt, t/Tτ
+ +Hierarchical Reinforcement Learning (HRL): Methods, including options frameworks (Sutton et al., 1999; Bacon et al., 2017), hierarchical actor-critic architectures (Riedmiller et al., 2018; Vezzani et al., 2022), and recent extensions to effectively train deep policies and critics (Rao et al., 2021; Salter et al., 2022; Wulfmeier et al., 2020a,b), decompose complex tasks into simpler subtasks. While these methods have demonstrated success in improving exploration and learning, they typically focus on discrete skill/subgoal decomposition. Furthermore, HRL subgoal methods often learn simpler lower-level policies limited by subgoal attainment, rather than optimizing overall episode return for complex behavior. EvoControl, inspired by HRL, addresses the challenges of continuous high-frequency control with semantically meaningful exploration. Unlike typical HRL, which focuses on skill discovery, EvoControl targets learning a fast low-level policy that complements the slow high-level policy. Uniquely, EvoControl combines PPO and ES within its hierarchical framework for efficient exploration and complex high-frequency control. + +# 5. Experiments and Evaluation + +In this section, we evaluate EvoControl and verify that it can achieve a higher evaluation reward for both the same number of high-level policy steps and the same number of low-level environment steps compared to the existing training of a high-level policy either with fixed controllers or direct torque control. + +Benchmark Environments. We evaluate performance on thirteen high-dimensional continuous control environments. Ten environments are adapted from standard Gym MuJoCo tasks (Brockman et al., 2016a; Freeman et al., 2021), including locomotion (e.g., Ant, HalfCheetah, Humanoid) and manipulation tasks (e.g., Reacher, Pusher). Crucially, we substantially modify these benchmarks by increasing the control frequency to $500\mathrm{Hz}$ (with episodes lasting 1000 steps or 2 seconds of real-time) and removing the typical control-cost term. Typical Gym MuJoCo tasks operate at control frequencies between $12.5 - 100\mathrm{Hz}$ , whereas our modifications explicitly examine whether directly controlling motor torques at significantly higher frequencies can offer advantages such as faster reactions and finer motor control. Additionally, we introduce two novel safety-critical variants—Reacher and HalfCheetah—with randomly posi + +Table 3: Normalized evaluation returns $(\mathcal{R})$ for benchmarks trained for an equivalent number of 1M high-level $(\rho)$ steps per environment. EvoControl consistently outperforms baseline methods (fixed controllers and direct torque control), with results averaged over 384 random seeds (95% confidence intervals shown). Scores are normalized between 0 (random policy) and 100 (best-performing non-EvoControl baseline). Bold values exceed the best baseline performance (scores >100). Corresponding unnormalized results are provided in Table 28. + +
Same PPO high-level alg. ρ with a Low-Level Policy β ofAntHalfcheetahHopperHumanoidHumanoid StandupInverted Double Pend.Inverted Pend.PusherReacherReacher 1DWalker2D
R↑R↑R↑R↑R↑R↑R↑R↑R↑R↑R↑
Fixed Cont. - PD Position100±6.5661.2±0.44188.1±1.18100±2.96100±0.97499.9±0.03100±2.86e-1572.5±6.14100±1.885.2±2.8761.1±0.51
Fixed Cont. - PD Position Delta2.4±1.912.76±0.08896.2±1.3096.6±1.712.96±0.039753.8±1.57100±2.86e-150.0±0.040.9±3.2315.2±7.672.7±0.19
Fixed Cont. - PD Int. Velocity3.59±1.782.46±0.093271.8±0.8783.4±1.130±049.7±1.5586.5±20.0±0.00±00±069.3±2.06
Fixed Cont. - PD : Position & Kp3.55±2.5416.7±0.151100±1.0090.9±1.1929.8±1.4297.5±0.751100±2.86e-15100±6.6550.7±3.981.8±4.11100±0.24
Fixed Cont. - Random0.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.0
Direct Torque Cont. - High Freq. (500Hz)0±017.2±0.3161.37±0.5110.4±2.1910.3±0.5860±00±00.97±5.722.08±5.8445.3±6.740.0±0.0
Direct Torque Cont. - Low Freq. (31.25Hz)54.5±7.15100±1.2169.2±0.6298±2.5580.6±2.56100±0.0311100±2.86e-1553.0±9.3559.2±3.72100±1.9480.7±2.16
EvoControl (Full State)368±10.6157±1.1263±1.46123±2.7116±0.609101±0.0487100±2.86e-15262±8.04114±0.973106±0.936163±3.72
EvoControl (Residual State)182±8.58182±1.0297±0.51170±1.14212±4.9599.2±0.054100±2.86e-15271±7.75106±1.29104±1.19165±2.19
EvoControl (Target + Proprio.)319±14.1168±1.41164±5.08165±1.77165±4.9499.7±0.0417100±2.86e-15255±7.6196.8±3.54105±0.776143±1.86
EvoControl (Target)293±13.2162±1.58272±1.84164±1.8205±5.0499.6±0.0377100±2.86e-15255±6.93112±0.785105±0.78151±2.44
EvoControl (Learned Gains)266±14.1113±1.6198±9.62150±2.55117±0.20599.5±0.0947100±2.86e-15239±7.61116±0.747105±1.21158±3.63
EvoControl (Delta Position)362±12.8133±1.82216±2.88119±2.78105±0.285101±0.0364100±2.86e-15193±8.4165.5±3.7199.1±2.44147±1.90
+ +Table 4: Normalized evaluation returns $(\mathcal{R})$ for benchmarks trained over an equivalent number of low-level $(\beta)$ environment steps (fixed environment duration of 2s per rollout). EvoControl here uses an evolutionary strategy with population size $(es\_pop\_size = 64)$ , detailed further in Appendix J.4.1. Results, averaged over 6400 random seeds (95% confidence intervals shown), demonstrate EvoControl's superior normalized returns compared to baseline methods (fixed controllers and direct torque control). Scores are normalized to a 0-100 scale, where 0 indicates a random policy and 100 represents the highest score achieved by any non-EvoControl baseline. Bold values highlight scores surpassing this baseline (scores >100). + +
Same PPO high-level alg. ρ with a Low-Level Policy β ofAntHalfcheetahHopperHumanoidHumanoid StandupInverted Double Pend.Inverted Pend.PusherReacherReacher 1DWalker2D
R↑R↑R↑R↑R↑R↑R↑R↑R↑R↑R↑
Fixed Cont. - PD Position100±5.1766±0.55590.2±0.48992.8±2.987.8±1.399.6±0.0357100±1.53e-06100±9.4100±1.2488.7±2.668.7±0.285
Fixed Cont. - PD Position Delta4.93±1.672.88±0.089184.3±0.854100±1.793.16±0.02457.1±1.6100±1.53e-063.4±9.9842.8±2.9927.9±7.4885.4±0.513
Fixed Cont. - PD Int. Velocity5.94±1.82.59±0.093856.9±2.372.6±0.8720±061.3±1.5999±0.450±00±09.58±7.72100±0.681
Fixed Cont. - Random0.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.00.0±0.0
Direct Torque Cont. - High Freq. (500Hz)0±044±0.79442.9±0.5363.6±2.3753±2.1597.8±0.38749.9±2.369.18±7.6910.8±5.4281.1±4.2432.2±1.27
Direct Torque Cont. - Low Freq. (31.25Hz)70.4±6.52100±1.22100±1.2687.2±1.35100±0.204100±0.0178100±1.53e-0683.1±10.267.2±3.05100±1.7969.2±1.38
EvoControl (Full State)188±12165±1.15118±22.4111±15.990.2±6.6100±0.306100±0296±42.6109±1.86104±2.14127±126
EvoControl (Residual State)152±117166±16.9125±118108±43112±14.299.2±0.304100±0302±18.1102±1.08104±2.07169±59.6
EvoControl (Target + Proprio.)183±69.2135±11.1130±55.2126±12.1124±58.887.1±53.3100±0300±42.6107±2.77104±2.23130±12.7
EvoControl (Target)201±27.5164±10.6131±93.5125±4.52109±12.299.5±1.7100±0286±2783.5±63.4103±3.2122±38
EvoControl (Learned Gains)103±23.190±20.6141±845111±28.9102±1.593.9±26100±0263±46.8104±11.4102±4.85149±35.2
EvoControl (Delta Position)168±29.9123±75.295.9±40.8104±9.2394.2±8.68100±0.491100±0300±61.659±5.9399.9±7.07160±12.4
+ +tioned obstacles penalizing collisions, explicitly designed to test the value of rapid, high-frequency control. Environment implementation details are provided in Appendix E. + +Benchmark Methods. We compare EvoControl against established baselines, using the same high-level PPO policy $(\rho)$ learning algorithm across all, varying only the low-level policy $(\beta)$ . We consider fixed controllers: PD Position, PD Position Delta, PD Integrated Velocity and PD Position & $K_{p}$ (Aljalbout et al., 2024); direct torque control at both high $(500\mathrm{Hz})$ and low $(31.25\mathrm{Hz})$ frequencies (Chen et al., 2023); a Random policy $(30\mathrm{Hz})$ ; and several EvoControl ablations with varying state information provided to the low-level neural network controller (Table 2). Here, the EvoControl variants using position-based controllers are annealed from their corresponding PD controllers. Method implementation details are provided in Appendix F. + +Evaluation. Unless otherwise stated we train each policy (high-level $\rho$ and low-level $\beta$ ) for 1M high-level steps. Post-training, we evaluate performance using 128 rollouts (different random seeds) per trained policy, calculating the return for each 1,000-step episode. We repeat this process + +for three training seeds per baseline. Results are reported as the mean normalized score $\mathcal{R}$ (Yu et al., 2020) across all 384 evaluation rollouts (3 training seeds x 128 evaluation rollouts), scaled from 0 (random policy performance) to 100 (best non-EvoControl baseline)—detailed in Appendix H. + +# 5.1. Main Results + +We evaluated all benchmark methods across our environments, with results tabulated in Table 3 and Table 4, for the same number of high-level policy steps $(\rho)$ and the same number of low-level environment steps, respectively. EvoControl, on average, achieves higher normalized evaluation return $\mathcal{R}$ on all environments. Specifically, EvoControl can both achieve a high average return $\mathcal{R}$ while learning a slow $(31.25\mathrm{Hz})$ high-level policy and be able to solve an environment task with a fast $(500\mathrm{Hz})$ learned low-level policy. Furthermore, EvoControl can outperform direct torque control at high frequency, and outperform the same high-level policy learning algorithm with position PD controllers, and we provide insights in Section 5.2. Moreover, we also show that EvoControl can support other ES for optimizing the low-level policy in Appendix J.1. + +![](images/a2b8e66bfbac3cc0f56cb93f5d54e2db80d88997b07570d53d04de762cfc43e6.jpg) +Figure 2: Top 3 Sub-Plots: State visitation histogram for Reacher 1D. Empirically demonstrating that PPO with high-frequency-direct torque control suffers from less efficient exploration compared to using PPO at a low-frequency with a fixed-high-frequency PD controller. EvoControl can achieve the same efficient exploration as a PD controller. Bottom: Evaluation return $R$ versus $\rho$ policy steps on Reacher 1D. PPO at high-frequency with direct-torque control experiences slower convergence compared to learning PPO at a low-frequency with a fixed PD controller. EvoControl can evolve its lower-level controller throughout training, leading to a higher evaluation reward in comparison—additional plots are provided in Appendix I.1. + +# 5.2. Insight Experiments + +Next, we analyze why EvoControl performs better than learning a policy with standard fixed controllers or direct torque control. We highlight the importance of controlling an environment at high frequency when required without sacrificing learning convergence ability. + +Does EvoControl Possess Efficient Exploration? (P1). To explore if the benchmarked methods during training possess efficient exploration we analyze the learning curves for the Reacher 1D environment and their state space visitation frequency histograms in Figure 2 (with implementation details in Appendix I.1). We observe that EvoControl can initially achieve the same efficient state exploration due to temporal abstractions, similar to that of a fixed PD position controller, and then can further achieve a higher evaluation reward throughout training. This suggests that the higher-frequency control enabled by EvoControl, as theoretically motivated by Proposition 2.1, contributes to an increased reward. This is reminiscent of the principle behind Pulse Width Modulation (PWM), where higher frequency allows for finer control and more accurate signal representation (Huang et al., 2011). While a direct equivalence to PWM is not claimed, the ability of high-frequency actions to improve control, as demonstrated in Proposition 2.1, provides a theoretical + +Table 5: Normalized evaluation returns $(\mathcal{R})$ on the Safety Critical Reacher environment, using the same normalization from Table 3. EvoControl effectively learns a low-level controller capable of rapid, adaptive responses at a high frequency, surpassing the fixed-frequency limitations of traditional PD position controllers and enabling quicker reactions to unexpected collisions. In contrast, baseline controllers at lower frequencies fail to detect collisions quickly enough, resulting in substantially lower performance. + +
Same PPO high-level alg. ρ with a Low-Level Policy β ofSafety Critical Reacher R↑
Fixed Cont. - PD Position100±19.2
Fixed Cont. - PD Position Delta0±0
Fixed Cont. - PD Int. Velocity67.1±11.4
Fixed Cont. - Random0.0±0.0
Direct Torque Cont. - High Freq. (500Hz)0±0
Direct Torque Cont. - Low Freq. (31.25Hz)35.9±17.1
EvoControl (Full State)205±14.1
EvoControl (Residual State)124±24.3
EvoControl (Target + Proprio.)237±11
EvoControl (Target)121±24.9
EvoControl (Learned Gains)169±7.15
EvoControl (Delta Position)213±14.6
+ +underpinning for EvoControl's improved performance. Crucially, we observe performing direct high-frequency torque control suffers from poor state exploration, given the same number of training steps (Appendix I.1). + +Can EvoControl Learn High-Frequency Interaction Control? (P2). High-frequency control can be crucial for safety-critical tasks like collision avoidance, where rapid responses to unexpected contacts are paramount. To investigate such a setting, we adapted the Reacher 1D environment to introduce a random object in $25\%$ of the episodes which block the arm from reaching its intended goal and add both an observation for any measured contact force and a reward penalty for this contact force (Safety Critical Reacher). We tabulate the normalized performance of all baselines in Table 5. We observe that EvoControl is able to observe and react faster at high-frequency to un-modelled collisions, compared to a low-frequency policy with a fixed-high-frequency state tracking PD controller. Critically such a collision detection and avoidance environment exemplifies our intuition from Proposition 2.1, that higher-frequency actions can achieve a higher reward. Intuitively, a well-performing policy requires a change in behavior as soon as any un-modeled collision is detected, intuitively similar to fast automatic reflexes for a low-level system controller with a high-level system, beyond simple goal-state tracking. We provide experimental details in Appendix I.2. + +This finding is further supported by experiments on the higher-dimensional Safety Critical HalfCheetah task, detailed in Appendix J.14, which features a more complex 19-dimensional state space. In this task, EvoControl sim + +arily excels, leveraging high-frequency control to rapidly detect and adapt to collisions, reinforcing the robustness and generalizability of the approach. + +Furthermore, we validated EvoControl's practicality for real-world deployment by demonstrating zero-shot sim-to-real transfer on a 7-DoF Franka Emika Panda robot for tabletop manipulation tasks. Our real-world validation showed EvoControl can operate effectively at high-frequency (200Hz low-level control) with rapid inference (average $64~\mu \mathrm{s}$ per step), comfortably surpassing typical robotic control rates. Importantly, EvoControl reduced collision forces compared to a tuned PD controller, highlighting benefits for safety-critical applications. We include representative results and visualizations in Figure 3 and Figure 4, and refer to Appendix K for comprehensive details of these real-robot experiments. + +![](images/ef35ffee13d10891130173e15e71197cda6352e67d955a5a8a727046c2d2125e.jpg) +Figure 3: Real-World Robot Setup. Left: MuJoCo simulation of the Franka Emika Panda robot setup. Right: Corresponding real hardware configuration for sim-to-real validation. + +![](images/b908faaed39a66f7c573fa4fd8d927e63a135c2e0cc8b3fb959f0d15bc86deb5.jpg) +Figure 4: Real-Robot Tasks. Left: Block collision experiment measuring collision forces. Right: Bin-opening task demonstrating gentle high-frequency torque control. + +Can EvoControl Automate Tuning of PD parameters? (P3). A widespread limitation of any fixed-PD-low-level controller is the inherent sensitivity of its state-tracking performance to that of its fixed gains $(K_{p}, K_{d})$ . In practical scenarios such gains require careful manual tuning to each task and environment of operation. Therefore having an approach that can be more robust to tuning PD gains than just their inherent sensitivity is practically useful. Empiri + +Table 6: Normalized evaluation returns $(\mathcal{R})$ for benchmark methods on the Reacher 1D environment, using the same normalization from Table 3. EvoControl is more robust to the tuning of the underlying PD controller than existing fixed PD controllers, which can degrade as their PD controller parameter $(K_{p})$ becomes less tuned for the task. + +
Same PPO high-level alg. ρ with a Low-Level Policy β ofKp= 0.001Kp= 0.1Kp= 1.0Kp= 10.0
R↑R↑R↑R↑
Fixed Cont. - PD Position0±013.5±7.3981.8±2.81100±0.893
Fixed Cont. - PD Position Delta0±00±014.6±7.3178.8±3.58
Fixed Cont. - PD Int. Velocity0±00±00±080.5±4.17
Fixed Cont. - Random0.0±0.00.0±0.00.0±0.00.0±0.0
Direct Torque Cont. - High Freq. (500Hz)43.6±6.4843.6±6.4843.6±6.4843.6±6.48
Direct Torque Cont. - Low Freq. (31.25Hz)96.2±1.8796.2±1.8796.2±1.8796.2±1.87
EvoControl (Full State)99.1±3.1399.2±7.07102±3.25101±0.36
EvoControl (Residual State)100±4.5599.5±5.62100±3.29102±2.18
EvoControl (Target + Proprio.)98.6±3.597.9±1.48101±4.43101±0.894
EvoControl (Target)94.6±6.8596.5±10.1101±1.58100±0.995
EvoControl (Learned Gains)91.8±5.3793.4±6.69101±2.35100±3.04
EvoControl (Delta Position)95.8±8.2997.4±1.9295.4±12.297.6±8.52
+ +cally, evaluating on the Reacher 1D task, with varying the $K_{p} = \{0.001, 0.1, 1.0, 10.0\}$ gain, we observe EvoControl achieving a higher average normalized return $\mathcal{R}$ than a PD controller, crucially as the PD controllers become less tuned $K_{p} \rightarrow 0$ their performance decreases, highlighting the sensitivity of these fixed controllers. This highlights EvoControls robustness to PD parameters, which could arise due to the PD controller providing a semantically meaningful initial latent action $a_{k}$ that the lower-level policy can then refine. Ablating the initial PD controller annealing in EvoControl destabilizes learning of both the high-level and low-level policies, confirming its importance (Appendix J.5). + +# 6. Conclusion and Future Work + +In this paper, we present EvoControl, a novel bi-level policy learning framework for learning both a slow high-level policy and a fast low-level controller using PPO and ES, respectively, for continuous-control tasks. Theoretically, we show that there exist some CTMDPs in which acting at higher frequencies can yield a strictly higher expected cumulative reward. Empirically, EvoControl outperforms existing high-frequency control methods, particularly in tasks requiring fast reactions. Moreover the limitations of the current approach, are that EvoControl still relies on the existence of a fixed-PD controller for the task (common in robotics applications, Appendix J.5) and can use more computational complexity (Appendix J.4) compared to only performing PPO, which can be readily parallelized in practice with modern accelerated compute platforms, both could be readily improved. In addition, promising future directions include exploring more complex nested hierarchies, direct low-level to high-level information flow, and ensembles of policies (Appendix L). + +# Acknowledgements + +We thank the anonymous reviewers, and area chairs, and specifically Francesco Nori, Leonard Hasenclever, Steven Bohez, Thomas Lampe, Baruch Tabanpour, Antoine Moulin, Nimrod Gileadi, Jose Enrique Chen and Taylor Howell for their insightful comments and suggestions that ultimately improved this work. + +# Impact Statement + +Our novel bi-level policy learning framework, which trains a fast-reacting low-level controller alongside a slower high-level policy, offers the promise of safer, better control in areas such as surgical robotics, autonomous driving, and industrial automation. By enabling high-frequency decision-making, it can better handle unexpected events and reduce risks. However, leveraging learned control for safety-critical systems requires rigorous testing and transparency to prevent unexpected failures or behaviors. Organizations adopting this technology should address potential biases, prioritize robustness, and maintain thorough oversight to ensure reliable, ethical deployment. + +# References + +Abramowitz, S. and Nitschke, G. Scalable evolutionary hierarchical reinforcement learning. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pp. 272-275, 2022. +Aljalbout, E., Frank, F., Karl, M., and van der Smagt, P. On the role of the action space in robot manipulation learning and sim-to-real transfer. IEEE Robotics and Automation Letters, 2024. +Bäck, T., Foussette, C., and Krause, P. Contemporary evolution strategies, volume 86. Springer, 2013. +Bacon, P.-L., Harb, J., and Precup, D. The option-critic architecture. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 31, 2017. +Battaglia, P. W., Hamrick, J. B., Bapat, V., Sanchez-Gonzalez, A., Zambaldi, V., Malinowski, M., Tacchetti, A., Raposo, D., Santoro, A., Faulkner, R., et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018. +Bodnar, C., Day, B., and Lio, P. Proximal distilled evolutionary reinforcement learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 3283-3290, 2020. +Borase, R. P., Maghade, D., Sondkar, S., and Pawar, S. A review of pid control, tuning methods and applications. + +International Journal of Dynamics and Control, 9:818-827, 2021. +Bosman, P. A., Grahl, J., and Thierens, D. Benchmarking parameter-free amalgam on functions with and without noise. Evolutionary computation, 21(3):445-469, 2013. +Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., et al. Jax: Autograd and xla. Astrophysics Source Code Library, pp. ascl-2111, 2021. +Brockman, G., Cheung, V., Pettersson, L., Schneider, J., Schulman, J., Tang, J., and Zaremba, W. Openai gym, 2016a. +Brockman, G., Cheung, V., Pettersson, L., Schneider, J., Schulman, J., Tang, J., and Zaremba, W. OpenAI gym. CoRR, abs/1606.01540, 2016b. +Brunton, S. L., Proctor, J. L., and Kutz, J. N. Discovering governing equations from data by sparse identification of nonlinear dynamical systems. Proceedings of the national academy of sciences, 113(15):3932-3937, 2016. +Chen, B., Xu, M., Li, L., and Zhao, D. Delay-aware model-based reinforcement learning for continuous control. Neurocomputing, 450:119-128, 2021a. +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, 2021b. +Chen, S., Zhang, B., Mueller, M. W., Rai, A., and Sreenath, K. Learning torque control for quadrupedal locomotion. In 2023 IEEE-RAS 22nd International Conference on Humanoid Robots (Humanoids), pp. 1-8. IEEE, 2023. +Chentanez, N., Müller, M., Macklin, M., Makoviychuk, V., and Jeschke, S. Physics-based motion capture imitation with deep reinforcement learning. In Proceedings of the 11th Annual International Conference on Motion, Interaction, and Games, pp. 1-10, 2018. +Chi, C., Xu, Z., Feng, S., Cousineau, E., Du, Y., Burchfiel, B., Tedrake, R., and Song, S. Diffusion policy: Visuomotor policy learning via action diffusion. The International Journal of Robotics Research, pp. 02783649241273668, 2023. +Chiaverini, S., Siciliano, B., and Villani, L. A survey of robot interaction control schemes with experimental comparison. IEEE/ASME Transactions on mechatronics, 4 (3):273-285, 1999. + +Conti, E., Madhavan, V., Petroski Such, F., Lehman, J., Stanley, K., and Clune, J. Improving exploration in evolution strategies for deep reinforcement learning via a population of novelty-seeking agents. Advances in neural information processing systems, 31, 2018. +Dabney, W., Ostrovski, G., and Barreto, A. Temporally-extended $\epsilon$ -greedy exploration, 2020. +Dantec, E., Taix, M., and Mansard, N. First order approximation of model predictive control solutions for high frequency feedback. IEEE Robotics and Automation Letters, 7(2):4448-4455, 2022. +Davchev, T., Luck, K. S., Burke, M., Meier, F., Schaal, S., and Ramamoorthy, S. Residual learning from demonstration: Adapting dmps for contact-rich manipulation. IEEE Robotics and Automation Letters, 7(2):4488-4495, 2022. +Dayan, P. and Hinton, G. E. Feudal reinforcement learning. Advances in neural information processing systems, 5, 1992. +Elfwing, S., Uchibe, E., Doya, K., and Christensen, H. I. Evolutionary development of hierarchical learning structures. IEEE transactions on evolutionary computation, 11(2):249-264, 2007. +Findeisen, W., Bailey, F. N., Brdys, M., Malinowski, K., Tatjewski, P., and Wozniak, A. Control and coordination in hierarchical systems. John Wiley & Sons, 1980. +Freeman, C. D., Frey, E., Raichuk, A., Girgin, S., Mordatch, I., and Bachem, O. Brax-a differentiable physics engine for large scale rigid body simulation. arXiv preprint arXiv:2106.13281, 2021. +Garcia, E. and Antsaklis, P. J. Model-based event-triggered control for systems with quantization and time-varying network delays. IEEE Transactions on Automatic Control, 58(2):422-434, 2012. +Guo, J., Kurup, U., and Shah, M. Is it safe to drive? an overview of factors, metrics, and datasets for driveability assessment in autonomous driving. IEEE Transactions on Intelligent Transportation Systems, 21(8):3135-3151, 2019. +Hansen, N. and Ostermeier, A. Completely derandomized self-adaptation in evolution strategies. Evolutionary computation, 9(2):159-195, 2001. +Heess, N., Wayne, G., Tassa, Y., Lillicrap, T., Riedmiller, M., and Silver, D. Learning and transfer of modulated locomotor controllers. arXiv preprint arXiv:1610.05182, 2016. + +Hogan, N. Impedance control: An approach to manipulation. In 1984 American control conference, pp. 304-313. IEEE, 1984. +Holt, S., Hüyük, A., Qian, Z., Sun, H., and van der Schaar, M. Neural laplace control for continuous-time delayed systems. In International Conference on Artificial Intelligence and Statistics, pp. 1747-1778. PMLR, 2023a. +Holt, S., Hüyük, A., and van der Schaar, M. Active observing in continuous-time control. Advances in Neural Information Processing Systems, 36:46054-46092, 2023b. +Holt, S., Luyten, M. R., Berthon, A., and van der Schaar, M. G-sim: Generative simulations with large language models and gradient-free calibration. In *Forty-second International Conference on Machine Learning*, 2025. +Huang, J., Padmanabhan, K., and Collins, O. M. The sampling theorem with constant amplitude variable width pulses. IEEE Transactions on Circuits and Systems I: Regular Papers, 58(6):1178-1190, 2011. +Huang, S., Dossa, R. F. J., Ye, C., Braga, J., Chakraborty, D., Mehta, K., and AraÁšjo, J. G. Cleanrl: High-quality single-file implementations of deep reinforcement learning algorithms. Journal of Machine Learning Research, 23(274):1-18, 2022. +Johannink, T., Bahl, S., Nair, A., Luo, J., Kumar, A., Loskyll, M., Ojea, J. A., Solowjow, E., and Levine, S. Residual reinforcement learning for robot control. In 2019 international conference on robotics and automation (ICRA), pp. 6023-6029. IEEE, 2019. +Kacprzyk, K., Holt, S., Berrevoets, J., Qian, Z., and van der Schaar, M. Ode discovery for longitudinal heterogeneous treatment effects inference. arXiv preprint arXiv:2403.10766, 2024. +Khadka, S. and Tumer, K. Evolution-guided policy gradient in reinforcement learning. Advances in Neural Information Processing Systems, 31, 2018. +Kingma, D. and Ba, J. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014. +Kuchenbecker, K. J., Gewirtz, J., McMahan, W., Standish, D., Martin, P., Bohren, J., Mendoza, P. J., and Lee, D. I. Verrotouch: High-frequency acceleration feedback for telerobotic surgery. In Haptics: Generating and Perceiving Tangible Sensations: International Conference, EuroHaptics 2010, Amsterdam, July 8-10, 2010. Proceedings, Part I, pp. 189-196. Springer, 2010. + +Lange, R. T. evosax: Jax-based evolution strategies. In Proceedings of the Companion Conference on Genetic and Evolutionary Computation, pp. 659-662, 2023. +Li, P., Hao, J., Tang, H., Fu, X., Zhen, Y., and Tang, K. Bridging evolutionary algorithms and reinforcement learning: A comprehensive survey on hybrid algorithms. IEEE Transactions on Evolutionary Computation, 2024. +Li, S., Zhang, J., Wang, J., Yu, Y., and Zhang, C. Active hierarchical exploration with stable subgoal representation learning. arXiv preprint arXiv:2105.14750, 2021. +Lu, C., Kuba, J., Letcher, A., Metz, L., Schroeder de Witt, C., and Foerster, J. Discovered policy optimisation. Advances in Neural Information Processing Systems, 35: 16455-16468, 2022. +Luo, J., Solowjow, E., Wen, C., Ojea, J. A., and Agogino, A. M. Deep reinforcement learning for robotic assembly of mixed deformable and rigid objects. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 2062-2069. IEEE, 2018. +Ma, Y., Song, Z., Zhuang, Y., Hao, J., and King, I. A survey on vision-language-action models for embodied ai. arXiv preprint arXiv:2405.14093, 2024. +Martín-Martín, R., Lee, M. A., Gardner, R., Savarese, S., Bohg, J., and Garg, A. Variable impedance control in end-effector space: An action space for reinforcement learning in contact-rich tasks. In 2019 IEEE/RSJ international conference on intelligent robots and systems (IROS), pp. 1010-1017. IEEE, 2019. +McClinton, W., Levy, A., and Konidaris, G. Hac explore: Accelerating exploration with hierarchical reinforcement learning. arXiv preprint arXiv:2108.05872, 2021. +Mundhenk, T. N., Landajuela, M., Glatt, R., Santiago, C. P., Faissol, D. M., and Petersen, B. K. Symbolic regression via neural-guided genetic programming population seeding. arXiv preprint arXiv:2111.00053, 2021. +Nachum, O., Gu, S., Lee, H., and Levine, S. Data-efficient hierarchical reinforcement learning. In NeurIPS, 2018a. +Nachum, O., Gu, S., Lee, H., and Levine, S. Data-efficient hierarchical reinforcement learning. arXiv preprint arXiv:1805.08296, 2018b. +Nachum, O., Tang, H., Lu, X., Gu, S., Lee, H., and Levine, S. Why does hierarchy (sometimes) work so well in reinforcement learning? arXiv preprint arXiv:1909.10618, 2019. +Nomura, M. and Ono, I. Fast moving natural evolution strategy for high-dimensional problems. In 2022 IEEE + +Congress on Evolutionary Computation (CEC), pp. 1-8. IEEE, 2022. +Norris, J. R. Markov chains. Number 2. Cambridge university press, 1998. +Oh, S., Woo, H., and Kong, K. Frequency-shaped impedance control for safe human-robot interaction in reference tracking application. IEEE/ASME Transactions On Mechatronics, 19(6):1907-1916, 2014. +Oku, D. E., Obot, E. P., and Author, C. Comparative study of pd, pi and pid controllers for control of a single joint system in robots. Int. J. Eng. Sci, 7(9):V2, 2018. +Parr, R. and Russell, S. Reinforcement learning with hierarchies of machines. Advances in neural information processing systems, 10, 1997. +Pateria, S., Subagdja, B., Tan, A.-h., and Quek, C. Hierarchical reinforcement learning: A comprehensive survey. ACM Computing Surveys (CSUR), 54(5):1-35, 2021. +Peng, X. B. and Van De Panne, M. Learning locomotion skills using deeprl: Does the choice of action space matter? In Proceedings of the ACM SIGGRAPH/Eurographics Symposium on Computer Animation, pp. 1-13, 2017. +Peng, X. B., Abbeel, P., Levine, S., and van de Panne, M. DeepMimic: Example-guided deep reinforcement learning of physics-based character skills. ACM Transactions on Graphics (TOG), 37(4):143, 2018. +Raffin, A., Hill, A., Gleave, A., Kanervisto, A., Ernestus, M., and Dormann, N. Stable-baselines3: Reliable reinforcement learning implementations. Journal of Machine Learning Research, 22(268):1-8, 2021. URL http://jmlr.org/papers/v22/20-1364.html. +Rao, D., Sadeghi, F., Hasenclever, L., Wulfmeier, M., Zambelli, M., Vezzani, G., Tirumala, D., Aytar, Y., Merel, J., Heess, N. M. O., and Hadsell, R. Learning transferable motor skills with hierarchical latent mixture policies. *ArXiv*, abs/2112.05062, 2021. +Rechenberg, I. Evolutionsstrategie. Optimierung technischer Systeme nach Prinzipien derbiologischen Evolution, 1973. +Reda, D., Tao, T., and van de Panne, M. Learning to locomote: Understanding how environment design matters for deep reinforcement learning. In Proceedings of the 13th ACM SIGGRAPH conference on motion, interaction and games, pp. 1-10, 2020. +Reiter, R., Hoffmann, J., Reinhardt, D., Messerer, F., BaumgAIrtner, K., Sawant, S., Boedecker, J., Diehl, M., and Gros, S. Synthesis of model predictive control and + +reinforcement learning: Survey and classification. arXiv preprint arXiv:2502.02133, 2025. +Riedmiller, M., Hafner, R., Lampe, T., Neunert, M., Degrave, J., van de Wiele, T., Mnih, V., Heess, N., and Springenberg, J. T. Learning by playing - solving sparse reward tasks from scratch. In Proceedings of the 35th International Conference on Machine Learning, 2018. +Ros, R. and Hansen, N. A simple modification in cma-es achieving linear time and space complexity. In International conference on parallel problem solving from nature, pp. 296-305. Springer, 2008. +Salimans, T., Ho, J., Chen, X., Sidor, S., and Sutskever, I. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017. +Salter, S., Wulfmeier, M., Tirumala, D., Heess, N., Ried-miller, M., Hadsell, R., and Rao, D. Mo2: Model-based offline options. In Conference on Lifelong Learning Agents, pp. 902-919. PMLR, 2022. +Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. +Sehnke, F., Osendorfer, C., Rückstieß, T., Graves, A., Peters, J., and Schmidhuber, J. Parameter-exploring policy gradients. Neural Networks, 23(4):551-559, 2010. +Sigaud, O. Combining evolution and deep reinforcement learning for policy search: A survey. ACM Transactions on Evolutionary Learning, 3(3):1-20, 2023. +Song, P., Yu, Y., and Zhang, X. A tutorial survey and comparison of impedance control on robotic manipulation. Robotica, 37(5):801-836, 2019. +Storn, R. and Price, K. Differential evolution-a simple and efficient heuristic for global optimization over continuous spaces. Journal of global optimization, 11:341-359, 1997. +Suri, K., Shi, X. Q., Plataniotis, K. N., and Lawryshyn, Y. A. Maximum mutation reinforcement learning for scalable control. arXiv preprint arXiv:2007.13690, 2020. +Sutton, R. S. and Barto, A. G. Reinforcement Learning: An Introduction. A Bradford Book, Cambridge, MA, USA, 2018. ISBN 0262039249. +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. + +Sutton, R. S., Modayil, J., Delp, M., Degris, T., Pilarski, P. M., White, A., and Precup, D. Horde: A scalable real-time architecture for learning knowledge from unsupervised sensorimotor interaction. In The 10th International Conference on Autonomous Agents and Multiagent Systems - Volume 2, AAMAS '11, pp. 761-768. International Foundation for Autonomous Agents and Multiagent Systems, 2011. ISBN 0982657161. +Tang, Y., Tian, Y., and Ha, D. Evojax: Hardware-accelerated neuroevolution. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pp. 308-311, 2022. +Team, O. E. L., Stooke, A., Mahajan, A., Barros, C., Deck, C., Bauer, J., Sygnowski, J., Trebacz, M., Jaderberg, M., Mathieu, M., et al. Open-ended learning leads to generally capable agents. arXiv preprint arXiv:2107.12808, 2021. +Vasic, M. and Billard, A. Safety issues in human-robot interactions. In 2013 IEEE international conference on robotics and automation, pp. 197-204. IEEE, 2013. +Venkataraman, S. and Gulati, S. Terminal slider control of robot systems. Journal of Intelligent and Robotic Systems, 7:31-55, 1993. +Vezhnevets, A. S., Osindero, S., Schaul, T., Heess, N., Jaderberg, M., Silver, D., and Kavukcuoglu, K. Feudal networks for hierarchical reinforcement learning. In International Conference on Machine Learning, pp. 3540-3549. PMLR, 2017. +Vezzani, G., Tirumala, D., Wulfmeier, M., Rao, D., Abdolmaleki, A., Moran, B., Haarnoja, T., Humplik, J., Hafner, R., Neunert, M., et al. Skills: Adaptive skill sequencing for efficient temporally-extended exploration. arXiv preprint arXiv:2211.13743, 2022. +Wahlström, N., Schön, T. B., and Deisenroth, M. P. From pixels to torques: Policy learning with deep dynamical models. arXiv preprint arXiv:1502.02251, 2015. +Watter, M., Springenberg, J., Boedecker, J., and Riedmiller, M. Embed to control: A locally linear latent dynamics model for control from raw images. Advances in neural information processing systems, 28, 2015. +Wei, B. A tutorial on robust control, adaptive control and robust adaptive control—application to robotic manipulators. Inventions, 4(3):49, 2019. +Wierstra, D., Schaul, T., Glasmachers, T., Sun, Y., Peters, J., and Schmidhuber, J. Natural evolution strategies. The Journal of Machine Learning Research, 15(1):949-980, 2014. + +Wöhlke, J., Schmitt, F., and van Hoof, H. Hierarchies of planning and reinforcement learning for robot navigation. In 2021 IEEE international conference on robotics and automation (ICRA), pp. 10682-10688. IEEE, 2021. +Wulfmeier, M., Abdolmaleki, A., Hafner, R., Tobias Springenberg, J., Neunert, M., Siegel, N., Hertweck, T., Lampe, T., Heess, N., and Riedmiller, M. Compositional transfer in hierarchical reinforcement learning. Robotics: Science and Systems XVI, Jul 2020a. doi: 10.15607/rss.2020.xvi.054. URL http://dx.doi.org/10.15607/rss.2020.xvi.054. +Wulfmeier, M., Rao, D., Hafner, R., Lampe, T., Abdolmaleki, A., Hertweck, T., Neunert, M., Tirumala, D., Siegel, N., Heess, N., and Riedmiller, M. Data-efficient hindsight off-policy option learning, 2020b. +Xie, Z., Clary, P., Dao, J., Morais, P., Hurst, J., and Panne, M. Learning locomotion skills for cassie: Iterative design and sim-to-real. In Conference on Robot Learning, pp. 317-329. PMLR, 2020. +Yang, X., Ji, Z., Wu, J., Lai, Y.-K., Wei, C., Liu, G., and Setchi, R. Hierarchical reinforcement learning with universal policies for multistep robotic manipulation. IEEE Transactions on Neural Networks and Learning Systems, 33(9):4727-4741, 2021. +Yu, T., Thomas, G., Yu, L., Ermon, S., Zou, J., Levine, S., Finn, C., and Ma, T. Mopo: Model-based offline policy optimization. arXiv preprint arXiv:2005.13239, 2020. +Zakka, K., Tabanpour, B., Liao, Q., Haiderbhai, M., Holt, S., Luo, J. Y., Allshire, A., Frey, E., Sreenath, K., Kahrs, L. A., et al. Mujoco playground. arXiv preprint arXiv:2502.08844, 2025. +Zheng, H., Wei, P., Jiang, J., Long, G., Lu, Q., and Zhang, C. Cooperative heterogeneous deep reinforcement learning. Advances in Neural Information Processing Systems, 33: 17455-17465, 2020. + +# Appendix + +# Table of Contents + +A Expanded Problem 17 +B Proof of Proposition 2.1: Existence of CTMDPs Requiring Higher-Frequency Control for Optimality 18 + +B.1 Intuitive Continuous Control Safety-Critical Example 20 + +C Expanded Background: Fixed PD Controllers 20 +D Extended Related Work 21 + +E Environment Selection and Implementation Details 23 + +E.1 Standard Gym MuJuCo Tasks 23 +E.2 Reacher 1D 24 +E.3 Safety Critical Reacher 24 +E.4 Safety Critical HalfCheetah 25 +E.5 Low-Level Controller (PD) Parameters 26 + +F Benchmark Method Implementation Details 28 + +F.1 High-Level Policy and PPO Implementation 28 +F.2 PD Controller Implementation 29 +F.3 Fixed Controllers 29 +F.4 Direct Torque Control 29 + +G EvoControl Implementation Details 30 + +G.1 EvoControl PseudoCode 30 +G.2 Detailed Analysis of EvoControl 31 +G.3 Computational Considerations 32 + +H Evaluation Metrics 33 +I Additional Experimental Setup 33 + +I.1 Efficient Exploration Experimental Setup 33 +I.2 High-frequency Interaction Control in Safety Critical Reacher 33 + +J Additional Experiments 33 + +J.1 EvoControl Supports Other Competitive ES Approaches 33 +J.2 Ablation: Using PPO to Train the Lower-level Policy 35 +J.3 EvoControl Outperforms Direct Torque Control at High-frequency 35 +J.4 Ablation: Equal Computational Complexity for All Baselines 36 +J.5 Ablation: No annealing with PD Controller 41 +J.6 Ablation: Main Results for More High-level Steps 42 +J.7 Main Table of Results Additional Metrics 43 +J.8 Learning Curves for All Baselines 44 +J.9 Ablation: Training High-Level Policy with Evolution Strategies 48 +J.10 Rollout Trajectory Plots of High-level Action for Baselines 49 + +J.11 Ablation: Removing Communication Between the Layers in EvoControl 53 +J.12 Ablation on Varying Fixed Values of the Annealing Parameter $\alpha$ 56 +J.13PD Position Delta Action Scaling Sweep 56 +J.14 Safety Critical HalfCheetah 57 +J.15 Comprehensive Baseline Comparison 58 + +# K Real-World Validation on a Franka Emika Panda 59 + +# L Limitations & Future Work 61 + +# M Reproducibility Statement 61 + +# N Common Questions and Discussion 61 + +N.1 Why Not Simply Pre-train with a PD Controller and Imitate? 61 +N.2 Relationship to Pulse-Width Modulation 61 +N.3 Discussion of Theoretical Analysis on Convergence of the Bi-Level Framework 61 +N.4 Comparison of EvoControl with Model Predictive Control (MPC) 62 + +# A. Expanded Problem + +In the following we expand the problem setup from the main paper. + +States & Actions. We denote the environments state space as $S \subset \mathbb{R}^{d_s}$ and its action space as $\mathcal{U} \subset \mathbb{R}^{d_u}$ . At time $t \in \mathbb{R}$ , the system's state is represented by $\mathbf{s}_t \in S$ , and its action by $\mathbf{u}_t \in \mathcal{U}$ . Considering action (e.g. actuator) limits the action space is constrained to a box in Euclidean space: $\mathcal{U} = [\mathbf{u}_{\min}, \mathbf{u}_{\max}]$ . + +Environment Dynamics. The transition dynamics for continuous control environments can be described by an underlying unknown differential equation of $\dot{s}_t = \frac{ds_t}{dt} = f(s_t, u_t)$ . The transition function, which describes the evolution of the state over a discrete time step $\Delta_t$ , can be approximated using the Euler method $s_{t + \Delta_t} \approx s_t + \Delta_t f(s_t, u_t)$ . Given an action $u_t$ and current state $s_t$ , $s_{t + \Delta_t} \sim P(s_{t + \Delta_t}|s_t, u_t)$ is implicitly defined by this approximation. More sophisticated numerical integration schemes (e.g., Runge-Kutta methods) can be employed for higher accuracy. In stochastic environments, the dynamics function $f$ can be considered to be stochastic, leading to a probability distribution over next states given the current state and action. We consider the setting where there is an additional observation function that maps the current environment state to an underlying observation $z_t = g(s_t) + \epsilon$ , where $\epsilon$ is optional observation noise, e.g. Gaussian noise with zero mean $\epsilon_t \sim \mathcal{N}(0, \sigma_\epsilon^2)^4$ . To simplify notation we use observation and state interchangeably and clarify the specifics when needed. + +Policies. The agent can be represented as a single policy $\pi : \mathbb{R}^{d_s} \to \mathbb{R}^{d_u}$ , that observes the current observation at time $t$ and samples an action $u_t \sim \pi(s_t)$ and then applies this action to the environment at a given fixed $\Delta_t$ . In the case of a stochastic policy, the action is sampled from a distribution conditioned on the state: $u_t \sim \pi(\cdot | s_t)$ . + +To formalize a bi-level policy, we decompose $\pi$ into two components: a slow, high-level policy, $\rho$ , and a fast, low-level policy, $\beta$ . Both policies interact with the environment as described in Algorithm 1. The high-level policy $\rho$ operates at a lower frequency and outputs a high-level (latent) action, $a_{k} \sim \rho(s_{k})$ , at time step $k$ . This latent action often represents a desired high-level target, such as a target position or velocity. The low-level policy $\beta$ operates at a higher frequency and receives the high-level action $a_{k}$ as input. $\beta$ then generates the low-level actions, $u_{k+i}$ , at a finer-grained time step $i$ , corresponding to direct motor torques or other low-level control signals. These low-level actions aim to achieve the high-level target specified by $\rho$ . We denote the high-level time steps as $k$ and low-level time steps as $i$ to maintain this distinction. The fast, low-level policy $\beta$ operates at a frequency of $1/\Delta_{t}$ , where $\Delta_{t}$ is the low-level time step. The slow, high-level policy $\rho$ guides the low-level policy over a longer horizon. Specifically, $\rho$ issues a latent action which is executed by $\beta$ for $G$ steps. This means $\rho$ effectively operates at a frequency of $1/(G\Delta_{t})$ with a time step of $G\Delta_{t}$ . + +Objective. The environment produces a reward $r_t$ sampled from an unknown reward function $r(s_t, u_t)$ , $r: \mathcal{S} \times \mathcal{U} \to \mathbb{R}$ . The overall objective of the agent is to maximize the expected future discounted reward $\mathbb{E}_{s_0: T, u_0: T-1, R_0: T-1} \left[ \sum_{i=0}^{T-1} \gamma^i r_i \right]$ , where $0 \leq \gamma < 1$ is the discount factor. + +Markov Decision Process (MDP). We can model the environment as a Markov Decision Process (MDP), defined by the tuple $\mathcal{M} = \langle S, \mathcal{U}, P, r, \gamma \rangle$ , where: + +- $S \subset \mathbb{R}^{d_s}$ is the continuous state space. +- $\mathcal{U} \subset \mathbb{R}^{d_u}$ is the continuous action space. +- $P(s_{t + \Delta_t}|s_t,u_t)$ is the state transition probability distribution, implicitly defined by the dynamics function $f$ and the discretization scheme (e.g., Euler method). +- $r: \mathcal{S} \times \mathcal{U} \to \mathbb{R}$ is the reward function, providing a scalar reward $r_t = r(s_t, u_t)$ at each time step. +- $\gamma \in [0,1)$ is the discount factor, determining the importance of future rewards. + +# B. Proof of Proposition 2.1: Existence of CTMDPs Requiring Higher-Frequency Control for Optimality + +Proposition B.1. Consider a continuous-time Markov Decision Process (CTMDP) with a finite state space and action space. Let this CTMDP be discretized with time step $\Delta_t$ . There exist CTMDPs such that for any fixed discretization step $\Delta_t > 0$ , there exists a finer discretization $\Delta_t' < \Delta_t$ where the optimal policy for the $\Delta_t'$ -discretized MDP achieves a higher expected cumulative reward over a fixed time horizon $T$ than the optimal policy for the $\Delta_t$ -discretized MDP. + +# Full Set of Assumptions: + +We consider a CTMDP with state space $S$ and action space $A$ . When discretized with a time step $\Delta_t$ , the transition probabilities are governed by a transition rate matrix $Q(a)$ , where $Q_{ij}(a)$ denotes the transition rate from state $i$ to state $j$ under action $a$ . The transition probabilities in the discretized MDP are then given by: + +$$ +P (s _ {j} | s _ {i}, a, \Delta_ {t}) = \left\{ \begin{array}{l l} [ e ^ {Q (a) \Delta_ {t}} ] _ {i j} + O (\Delta_ {t} ^ {2}) & i \neq j \\ [ e ^ {Q (a) \Delta_ {t}} ] _ {i i} + O (\Delta_ {t} ^ {2}) & i = j \end{array} \right. +$$ + +where $e^{Q(a)\Delta_t}$ is the matrix exponential. This is a standard assumption when discretizing CTMDPs, justifiable by the Taylor expansion of the matrix exponential (see, e.g., Norris (1998), Chapter 2, Theorem 2.8.2). We assume that the error terms $O(\Delta_t^2)$ converge uniformly to zero as $\Delta_t \to 0$ . The reward function $r(s,a)$ is the same for both the continuous and discretized cases. The time horizon $T > 0$ is fixed, and we assume $T$ is an integer multiple of both $\Delta_t$ and $\Delta_t'$ . + +Proof. CTMDP and MDP Definition: We consider a CTMDP with the following properties: + +- State Space: $S = \{s_{\text{good}}, s_{\text{bad}}\}$ +- Action Space: $A = \{a_{\text{maintain}}, a_{\text{recover}}\}$ +Transition Rates: + +- Under $a_{\text{maintain}}$ : transition rate from $s_{\text{good}}$ to $s_{\text{bad}}$ is $p > 0$ . No other transitions. +- Under $a_{\mathrm{recover}}$ : instantaneous transition from $s_{\mathrm{bad}}$ to $s_{\mathrm{good}}$ . No other transitions. + +- Reward Function: $r(s_{\mathrm{good}},a) = r_{\mathrm{good}} > 0; r(s_{\mathrm{bad}},a) = r_{\mathrm{bad}} < 0.$ +- Discount Factor: $\gamma = 1$ (undiscounted) +- Episode Duration: $T$ +- Initial State: $s_{\text{good}}$ + +Discretizing this CTMDP with time step $\Delta_t$ yields an MDP with transition probabilities as described in the assumptions above, derived from the transition rates. Specifically, for small $\Delta_t$ : + +$$ +\begin{array}{l} P \left(s _ {\text {b a d}} \mid s _ {\text {g o o d}}, a _ {\text {m a i n t a i n}}, \Delta_ {t}\right) \approx p \Delta_ {t} \\ P \left(s _ {\text {g o o d}} \mid s _ {\text {g o o d}}, a _ {\text {m a i n t a i n}}, \Delta_ {t}\right) \approx 1 - p \Delta_ {t} \\ P \left(s _ {\text {g o o d}} \mid s _ {\text {b a d}}, a _ {\text {r e c o v e r}}, \Delta_ {t}\right) = 1 \\ \end{array} +$$ + +Cumulative Reward Definition: The cumulative reward $R(\pi, T, \Delta_t)$ for a policy $\pi$ over a time horizon $T$ in the MDP with discretization $\Delta_t$ is: + +$$ +R (\pi , T, \Delta_ {t}) = \mathbb {E} _ {\pi} \left[ \sum_ {t = 0} ^ {T / \Delta_ {t} - 1} r (s _ {t}, a _ {t}) \Delta_ {t} \right] +$$ + +# Proof Steps: + +1) Optimal Policies $(\pi^{*}(\Delta_{t}))$ : For any discretization $\Delta_t$ , the optimal policy $\pi^{*}(\Delta_{t})$ is to apply $a_{\mathrm{recover}}$ in $s_{\mathrm{bad}}$ and $a_{\mathrm{maintain}}$ in $s_{\mathrm{good}}$ . +2) Expected Cumulative Reward (Finer Discretization $\Delta_t' = \frac{\Delta_t}{n}$ ): Consider a finer discretization $\Delta_t' = \frac{\Delta_t}{n}$ for some integer $n > 1$ . Under $\pi^*(\Delta_t')$ , the probability of transitioning to $s_{bad}$ and staying there for a time $k\Delta_t'$ within a $\Delta_t$ interval is approximately $\binom{n}{k} (p\frac{\Delta_t}{n})^k (1 - p\frac{\Delta_t}{n})^{n-k}$ . Since recovery is immediate, the expected time in $s_{bad}$ within a $\Delta_t$ interval is $\sum_{k=1}^{n} k\Delta_t'(n/k)(p\frac{\Delta_t}{n})^k (1 - p\frac{\Delta_t}{n})^{n-k} = p\frac{(\Delta_t)^2}{n}$ . The expected time spent in $s_{good}$ is then $\Delta_t - \frac{p(\Delta_t)^2}{n}$ . Thus the expected reward per $\Delta_t$ interval is: + +$$ +(\Delta_ {t} - \frac {p (\Delta_ {t}) ^ {2}}{n}) r _ {g o o d} + \frac {p (\Delta_ {t}) ^ {2}}{n} r _ {b a d} = \Delta_ {t} r _ {g o o d} - \frac {p (\Delta_ {t}) ^ {2}}{n} (r _ {g o o d} - r _ {b a d}) +$$ + +And with $\frac{T}{\Delta_t}$ such intervals, the total expected cumulative reward is: + +$$ +\begin{array}{l} R (\pi^ {*} (\Delta_ {t} ^ {\prime}), T, \Delta_ {t} ^ {\prime}) = \frac {T}{\Delta_ {t}} (\Delta_ {t} r _ {g o o d} - \frac {p (\Delta_ {t}) ^ {2}}{n} (r _ {g o o d} - r _ {b a d})) \\ = T r _ {g o o d} - \frac {T p \Delta_ {t}}{n} (r _ {g o o d} - r _ {b a d}) \\ \end{array} +$$ + +3) Expected Cumulative Reward (Coarser Discretization $\Delta_t$ ): For a fixed $\Delta_t$ , the stationary distribution probabilities under $\pi^*(\Delta_t)$ can be approximated by solving the balance equations: $\mu_{good}(1 - p\Delta_t) + \mu_{bad}(1) = \mu_{good}$ and $\mu_{good}(p\Delta_t) + \mu_{bad}(0) = \mu_{bad}$ . Also $\mu_{good} + \mu_{bad} = 1$ . This gives $\mu_{bad} = p\Delta_t$ and $\mu_{good} = 1 - p\Delta_t$ . + +Thus, the expected reward per $\Delta_t$ step is: + +$$ +\begin{array}{l} R _ {s t e p} = \mu_ {g o o d} r _ {g o o d} + \mu_ {b a d} r _ {b a d} \\ = (1 - p \Delta_ {t}) r _ {\text {g o o d}} + (p \Delta_ {t}) r _ {\text {b a d}} \\ = r _ {g o o d} - p \Delta_ {t} r _ {g o o d} + p \Delta_ {t} r _ {b a d} \\ = r _ {g o o d} - p \Delta_ {t} \left(r _ {g o o d} - r _ {b a d}\right) \\ \end{array} +$$ + +Over the entire horizon $T$ , with $\frac{T}{\Delta_t}$ steps, this gives: + +$$ +\begin{array}{l} R (\pi^ {*} (\Delta_ {t}), T, \Delta_ {t}) = \frac {T}{\Delta_ {t}} (r _ {g o o d} - p \Delta_ {t} (r _ {g o o d} - r _ {b a d})) \Delta_ {t} \\ = T r _ {g o o d} - T p \Delta_ {t} \left(r _ {g o o d} - r _ {b a d}\right) \\ \end{array} +$$ + +4) Comparison: Comparing the rewards, we have: + +$$ +\begin{array}{l} R \left(\pi^ {*} \left(\Delta_ {t} ^ {\prime}\right), T, \Delta_ {t} ^ {\prime}\right) - R \left(\pi^ {*} \left(\Delta_ {t}\right), T, \Delta_ {t}\right) \\ = \left(T r _ {g o o d} - \frac {T p \Delta_ {t}}{n} \left(r _ {g o o d} - r _ {b a d}\right)\right) - \left(T r _ {g o o d} - T p \Delta_ {t} \left(r _ {g o o d} - r _ {b a d}\right)\right) \\ = T r _ {g o o d} - \frac {T p \Delta_ {t}}{n} (r _ {g o o d} - r _ {b a d}) - T r _ {g o o d} + T p \Delta_ {t} (r _ {g o o d} - r _ {b a d}) \\ = - \frac {T p \Delta_ {t}}{n} \left(r _ {\text {g o o d}} - r _ {\text {b a d}}\right) + T p \Delta_ {t} \left(r _ {\text {g o o d}} - r _ {\text {b a d}}\right) \\ = T p \Delta_ {t} \left(r _ {\text {g o o d}} - r _ {\text {b a d}}\right) \left(1 - \frac {1}{n}\right) \\ \end{array} +$$ + +Since $r_{good} > r_{bad}, p > 0, \Delta_t > 0$ , and $n > 1$ , this difference is positive. Therefore, for any $\Delta_t$ , a finer discretization $\Delta_t' = \frac{\Delta_t}{n}$ with $n > 1$ leads to a higher expected cumulative reward under its optimal policy. + +# B.1. Intuitive Continuous Control Safety-Critical Example + +Consider a safety-critical task involving a one-degree-of-freedom robot arm. The arm's state is its joint angle $\theta_{t}$ , and the action is the motor torque $\tau_{t}$ . The goal is to reach a target angle $\theta_{\mathrm{goal}}$ from an initial angle $\theta_0$ within a fixed episode duration $T$ . An immovable obstacle may appear in a random subset of episodes (e.g., $25\%$ of the time), obstructing the direct path to the goal. The reward function encourages reaching the target angle while penalizing contact forces with the obstacle: + +$$ +R = \int_ {0} ^ {T} \left(r _ {\text {g o a l}} e ^ {- | \theta_ {t} - \theta_ {\text {g o a l}} |} - r _ {\text {c o l l i s i o n}} F _ {t}\right) d t +$$ + +where $r_{\mathrm{goal}}$ and $r_{\mathrm{collision}}$ are positive weighting constants, and $F_{t}$ is the magnitude of the contact force between the arm and the obstacle at time $t$ (0 if no contact). The policy receives the observation $O_{t} = (\theta_{t}, \dot{\theta}_{t}, \tau_{t,\mathrm{measured}})$ , where $\tau_{t,\mathrm{measured}}$ is the measured torque, reflecting contact forces if any. + +A standard approach might use a position PD controller with a low-frequency high-level policy that provides the target angle $\theta_{\mathrm{target}}$ . However, this approach faces limitations. If the obstacle is present, the PD controller will exert a continuous force against it, incurring significant penalties. The low-frequency policy might only detect the collision after a substantial delay, making it difficult to react effectively. + +A high-frequency policy, on the other hand, can detect the collision much faster and take corrective action. Upon detecting a sudden increase in $\tau_{t,\mathrm{measured}}$ , it can immediately reduce the motor torque, minimizing the contact force $F_{t}$ . Furthermore, a sophisticated high-frequency policy can learn to approach the target cautiously, probing for the obstacle with small torques. If contact is detected, it can adjust its trajectory to reach the goal while avoiding further collisions. + +This intuitive example illustrates how high-frequency control can be crucial for safety-critical tasks. It enables faster reaction to unexpected events and allows for more nuanced control strategies that consider the full reward structure, including collision avoidance. This motivates the development of methods like EvoControl, capable of effectively learning such high-frequency policies. This example highlights scenarios where high-frequency control offers a significant advantage over traditional low-frequency control coupled with fixed controllers, especially in tasks requiring rapid responses and nuanced interaction behaviors. + +# C. Expanded Background: Fixed PD Controllers + +Low-level PD controllers are extensively used within robotics applications, specifically when combined with a learned high-level policy $\rho$ . This hierarchical structure simplifies the learning problem and effectively reduces the number of decision steps for the high-level policy. This reduction is achieved by allowing the high-level policy to operate at a timestep of $G\Delta_{t}$ , where $G$ is the number of low-level actions executed per high-level action, effectively reducing the number of high-level actions within a fixed episode duration $T$ . + +In continuous control and robotics, these hierarchical structures, composed of a learned high-level policy $(\rho)$ and a fixed low-level controller (e.g., a PD controller (Oku et al., 2018)), are common (Peng & Van De Panne, 2017; Song et al., 2019; Chentanez et al., 2018; Peng et al., 2018; Xie et al., 2020). The high-level policy outputs a target $a_{k}$ which the low-level PD controller tracks using a control signal based on the error between $a_{k}$ and the measured system state $s_{t}$ . + +Commonly, PD control is designed to track a second-order signal, such as position or velocity. The control signal, $u_{t}$ , is given by: + +$$ +u _ {t} = K _ {p} \left(a _ {k} - s _ {t}\right) + K _ {d} \left(\dot {a} _ {k} - \dot {s} _ {t}\right), \tag {1} +$$ + +where $K_{p}, K_{d} \in \mathbb{R}^{+}$ are constant proportional and derivative gains, and $e_t = a_k - s_t$ represents the tracking error. + +Specifically for robotics, proprioceptive observed states can be represented as joint positions $(q_{t})$ , joint velocities $(\dot{q}_{t})$ , and torques $(\tau_{t})$ . This leads to several common PD control designs, summarized in Table 1. These designs differ in how the high-level target $a_{k}$ is interpreted and used in the control law. For instance, in "PD Absolute Position," $a_{k}$ directly specifies the desired joint position $(q^{d})$ , while in "PD Delta Position," $a_{k}$ represents a change in joint position $(\delta q^{d})$ relative to the current position. The state $s_{t}$ in the control law can encompass a wider range of proprioceptive information beyond just joint positions $(q_{t})$ . We present the target $a_{k}$ and tracking error in terms of position/velocity for clarity and to align with common PD controller formulations. + +# D. Extended Related Work + +Table 7: Comparison with related bi-level learning approaches in RL. Our method, EvoControl, can achieve efficient state-action space exploration, whilst learning high-frequency interaction behavior, and avoids tuning of PD parameters. + +
ApproachRef.πLow-level β RewardHigh-level Action Duration ΔρHigh-level Action ρ(P1) Efficient Exploration(P2) High-Frequency Interaction Control(P3) Automate Controller Tuning PD Parameters
Fixed Controllers(Song et al., 2019){ρm, βpd controller}|s(t) - sdesired(t)||2GΔt{qd, qd, τd}✓✗✗
Direct Torque Control(Peng & Van De Panne, 2017){ρ}R = ∑i=0T/Δt-1r(sid, utΔt)ΔtΔta(t)✗✓✓
HRL: Skills(Sutton et al., 1999; Rao et al., 2021){ρmanager, {β0, β1, ..., βn}, n ∈ Zn}R = ∑i=0T/Δt-1r(stid, utΔt)Δtzn ∈ Zn✗✓✓
HRL: Sub Goals(Nachum et al., 2018b){ρ, β}|s(t) - sdesired(t)||2GΔtsdesired(t)✓✗✓
EvoControl(Ours){ρ, β}R = ∑i=0T/Δt-1r(stid, utΔt)ΔtGΔtz ∈ {qd, qd, τd}✓✓✓
+ +Existing approaches to continuous control in robotics primarily fall into two categories: those employing fixed low-level controllers and those utilizing direct torque control learned end-to-end. EvoControl aims to address limitations inherent in both approaches, and we summarize the key differences in Table 7. + +Fixed Low-Level Controllers: A common strategy involves combining a learned high-level policy (often operating at low frequency, e.g., 10-30Hz) with a fixed, high-frequency low-level controller (e.g., a Proportional-Derivative (PD) controller operating at 500Hz or higher) (Song et al., 2019; Chentanez et al., 2018; Peng et al., 2018; Xie et al., 2020). The high-level policy generates setpoints (e.g., desired positions or velocities), and the low-level controller tracks these setpoints by adjusting actuator torques. While prevalent, this approach suffers from several drawbacks. The low-level controller's parameters require careful tuning, and its fixed nature limits its ability to handle high-frequency interactions such as unexpected collisions or disturbances. Furthermore, recent work applying RL algorithms to the physical world often restricts itself to relatively low-frequency control ( $\sim$ 20Hz) due to the reliance on analytical impedance controllers (Martín-Martín et al., 2019; Luo et al., 2018; Johannink et al., 2019). Even hierarchical approaches employing analytical controllers often limit high-level policy frequencies (Davchev et al., 2022). EvoControl, in contrast, aims to achieve efficient exploration while also enabling the learning of flexible and complex high-frequency behaviors in the low-level policy. + +Evolutionary Strategies: Direct evolutionary strategies (ES approaches, (Bäck et al., 2013)) have been shown to provide an alternative for solving reinforcement learning environments; however the direct application of them, as shown by others are that they can be sample inefficient, get stuck in global minima; however excel at discovering good performing long-horizon tasks, sparse reward tasks and delayed reward tasks, as they often optimize the episodic return, rather than the intermediate temporal difference return (Salimans et al., 2017). There exist works formulating hierarchical ES for both levels, however still under-perform gradient-based RL policy methods (Abramowitz & Nitschke, 2022). EvoControl through it's novel combination of a PPO learned high-level policy, and a ES-learned low-level policy empirically outperforms the ablation version of using ES for both the high-level and low-level in EvoControl, as shown in Appendix J.9. + +Direct Torque Control: Alternatively, some methods learn an end-to-end policy that directly outputs joint torques at a high frequency (Peng & Van De Panne, 2017; Wahlström et al., 2015; Watter et al., 2015). This approach, while potentially offering greater adaptability, faces significant challenges. High-frequency control suffers from the curse of dimensionality imposed by the increased number of time steps in long horizons. The resulting explosion in the number of possible action sequences significantly hinders exploration and can lead to suboptimal policies (Martín-Martín et al., 2019; Peng & Van De Panne, 2017). EvoControl mitigates these challenges by employing a hierarchical structure, enabling more efficient exploration while retaining the adaptability afforded by direct torque control at the low level. Moreover, the related work of Peng & Van De Panne (2017) compares learning policies with four different action spaces of direct torque control, PD position control, PD velocity control and a muscle activation's for the task of imitating gaits for planar walking robot environments (continuous control). Their findings correlate with ours, in that they observed on average faster learning convergence and higher task reward using a low-level high-frequency (fast) controller, such as PD controller compared to performing direct torque control. Additionally Peng & Van De Panne (2017) due to having no prior controller parameters for the environments that they wanted to control, Peng & Van De Panne (2017) similarly performed a related approach where they optimized the fixed low-level controller parameters throughout training a high-level policy. However, all of their low-level controllers used are simple, few parameter (2-7) controllers, such as a PD controller, and such fixed simple controllers are all only capable of sub-goal simple tracking behavior. Whereas EvoControl, can represent the fast lower-level policy with a neural network policy and learn this throughout training the high-level policy, learning fast adaptive behavior of the low-level policy, that goes beyond simple sub-goal tracking behavior. Furthermore, the related work of Reda et al. (2020) studied environment design for continuous control tasks, and found that varying the control frequency of performing direct torque control in standard Mujoco Gym like environments (e.g. Ant, Hopper) could yield better learning and overall policy return, however requires tuning the control frequency (or discrete action repeats of the simulation timestep $\Delta_t$ ) + +for each environment and task to get the best performance—likely due to matching the inherent control frequency of the dynamics of the environment. They also studied the use of learning with PD controllers, and determined that PD controllers can aid in converging faster to good policy, however can get stuck in lower-reward solutions (local minima), motivating the need for a method to practically perform high-frequency torque control. In summary, EvoControl can overall learn a high-frequency policy $\pi$ by learning both a slow-high-level policy $\rho$ combined with a fast-low-level policy $\beta$ , learning adaptive low-level behavior of an equivalent high-frequency policy, avoiding the difficulties of learning a direct torque control high-frequency policy directly. Furthermore, we provide empirical evidence for the difficulty of learning a direct torque control high-frequency policy, as even with an ever-increasing number of training steps, such a policy may converge to local minima Appendix J.3. + +Hierarchical Reinforcement Learning (HRL): EvoControl draws inspiration from the HRL paradigm, which decomposes complex tasks into simpler subtasks managed by separate policies. Existing HRL methods such as options frameworks (Sutton et al., 1999; Bacon et al., 2017) and hierarchical actor-critic architectures (Riedmiller et al., 2018; Vezzani et al., 2022) have been successfully applied to improve exploration and learning efficiency. However, these methods typically focus on discrete skill selection or subgoal decomposition (Heess et al., 2016), while EvoControl explicitly addresses the challenges of learning a low-level controller for continuous high-frequency control, enabling semantically meaningful exploration in different control modes. Related work in the RHPO/HO2/MO2/HeLMS family (Rao et al., 2021; Salter et al., 2022; Wulfmeier et al., 2020a;b) has also explored hierarchical approaches. However, unlike typical HRL, which focuses on skill discovery, EvoControl targets learning a fast low-level policy that complements the slow high-level policy. Uniquely, EvoControl combines PPO and ES within its hierarchical framework for efficient exploration and complex high-frequency control. + +Hybrid Combinations of RL and ES: Existing related work has looked into combining evolutionary strategies ES to improve RL algorithms, specifically using them to collect diverse data as ES methods show superior exploration capabilities compared to on-policy and off-policy RL algorithms, and also take updates for the RL agent itself (Sigaud, 2023; Suri et al., 2020; Khadka & Tumer, 2018; Conti et al., 2018; Li et al., 2024; Bodnar et al., 2020). Specifically, Suri et al. (2020); Khadka & Tumer (2018) use RL (SAC/DDPG) with ES data collection to collect diverse trajectories into the replay buffer to update the RL agent. Suri et al. (2020) propose automatic mutation tuning to improve the ES component, and demonstrate improved performance on 10 out of 15 continuous-control environments compared to the equivalent RL method baselines. Khadka & Tumer (2018) also uses ES (Neuroevolution) to collect diversified trajectories, and use these trajectories in a replay buffer to train an off-policy RL agent. They further, update the ES data collection agent with snapshots of the trained RL agent throughout training, and demonstrate on continuous control tasks that this can lead to higher reward evaluation and faster convergence in higher-dimensional state-action challenging environments. Furthermore, Zheng et al. (2020) proposes a transfer approach that has a pool of agents containing three classes of agents: on-policy agents, off-policy agents, and a population-based ES agents. All agents explore and collect trajectories into a replay buffer, with the on-policy and ES agent initially transferred from the weights off-policy (global) agent; the trajectories of the on-policy agents are then more frequently sampled when used to update the off-policy global agent, and use a threshold to control the frequency of policy parameter transfer. There also exist alternative solutions to combine ES and RL, such as seeding ES with an RL agent for symbolic regression (Mundhenk et al., 2021). Moreover, Elfwing et al. (2007) proposed a task decomposition method, using MAXQ, to break down a complex task into a hierarchy of subtasks on small dimensional state-action space problems, and used a genetic programming algorithm to learn the hierarchical task decomposition automatically. Specifically in Elfwing et al. (2007), each hierarchy corresponds to a different subtask that can be performed. Unlike EvoControl, all of these related works do not consider the problem of learning at higher frequencies, operating their continuous control environments at default large discrete time steps (e.g. $20 - 100\mathrm{Hz}$ (Brockman et al., 2016a)), and do not focus on an hierarchical approach of having a high-level policy outputting a latent action and a low-level policy following this latent action for $G$ steps (providing temporal action abstractions)—which limits the practical deployment of their agent, as if rich features are used as inputs to the agent such as images or the use of larger architectures, such as Vision Language Transformers, the inference time of the agent would increase (e.g. $\approx 30Hz$ for images from video), limiting the agents use where high-frequency control is necessary for an environment. Conversely, EvoControl enabled from its hierarchical structure decomposing a high-level policy and a low-level policy, the low-level policy can remain a simple neural network agent of a smaller size being able to run with a fast inference time, and hence fast control operation of $500 - 1KHz$ , and still gain the benefit of having a higher-level policy that can still take as input rich features arriving at a lower-frequency such as images. + +Continuous-Time Control & Planning: A surge of recent work tackles reinforcement learning in continuous-time settings where observations arrive irregularly and actions experience latency. Neural Laplace Control marries a Laplace-domain + +dynamics model with model predictive control (MPC) to handle unknown delays (Holt et al., 2023a). Complementarily, Active Observing in Continuous-Time Control shows that when to measure the state is as critical as what to do, proving that irregular sampling can strictly outperform uniform sensing while remaining computationally tractable (Holt et al., 2023b). These ideas resonate with event-triggered control in multi-agent systems (Garcia & Antsaklis, 2012) and with delay-robust model-based RL methods, e.g. Delay-Aware Model-Based RL (Chen et al., 2021a). For long horizons, sequence-modelling planners—including Decision Transformer (Chen et al., 2021b) and diffusion-based policy refinement (Chi et al., 2023)—provide strong baselines that can be embedded inside MPC loops, yielding hybrid RL-MPC schemes with favourable stability guarantees (Reiter et al., 2025). While orthogonal to EvoControl, continuous-time control methods naturally connect to high-frequency control—reducing the discretization timestep brings discrete-time methods closer to continuous-time behavior. Future extensions of EvoControl could incorporate these continuous-time approaches, enabling extremely fast-reacting low-level neural policies that outperform traditional MPC or planning methods constrained by computational budget at very high control frequencies. + +Interpretable Dynamics and Generative Simulation: Replacing black-box predictors with symbolic or sparse representations improves transparency and extrapolation. SINDy uncovers compact governing equations from data (Brunton et al., 2016), and recent work extends this philosophy to causal inference, which learns closed-form differential systems that remain valid under irregular sampling, enabling counterfactual policy evaluation (Kacprzyk et al., 2024). Beyond inference, high-fidelity simulators are indispensable for safe planning. Recent work automates simulator construction by letting a large language model propose causal structure which is then empirically calibrated via gradient-free optimisation, achieving robust generalisation beyond historical support (Holt et al., 2025). Such approaches complement physics-grounded generative agents (Battaglia et al., 2018) and underscore the trend toward marrying interpretable models with powerful planners for trustworthy, data-efficient control. In relation to EvoControl, leveraging automated simulator construction enables the generation of diverse, open-ended training environments (Team et al., 2021), facilitating scalable online policy learning. Future versions of EvoControl could integrate these capabilities, significantly enhancing the approach's applicability to more complex, varied tasks and objectives. + +# E. Environment Selection and Implementation Details + +Benchmark environments. We compare against ten standard continuous-control environments (Brockman et al., 2016a; Freeman et al., 2021), and also a safety critical continuous control environment. Specifically we use the continuous control suite from Brax5 (Freeman et al., 2021), which consists of ten standard continuous control environments, such as locomotion based robot control tasks such as Ant, HalfCheetah and larger state-action space environments such as Humanoid (e.g. controlling a humanoid robot with a state-action dimension of 60 to walk forwards with a given velocity). All the Brax environments are released under the Apache-2.0 license. Furthermore, within this standard suite of tasks is manipulation based environments such as Reacher and Pusher, where pusher is a 7 degree of freedom (DOF) robotic arm, with the task to push a movable object on a table to a desired goal location. Moreover, we also construct a safety inspired environment, adapting a single arm version of the Reacher environment, where introduce a random un-modeled contact that incurs a large negative reward when the robot manipulator collides with the object. To compare the frequency element, we set the frequency of each environment to $500\mathrm{Hz}$ , and then motivated by a low-lever controller running at lower frequency such as $31.25\mathrm{Hz}$ ( $G = 16$ ) (a realistic assumption when involving cameras to determine state), we set this as the low-level frequency. + +# E.1. Standard Gym MuJuCo Tasks + +We use Brax (Freeman et al., 2021), a differentiable physics engine, which provides efficient implementations of the Ant, HalfCheetah, Hopper, Humanoid, HumanoidStandup, InvertedDoublePendulum, Pusher, Reacher, and Walker2d environments. These environments encompass a range of locomotion and manipulation tasks, providing a diverse testbed for evaluating EvoControl. For each environment, we set the simulation timestep $\Delta_t$ to 0.002 (500Hz operation). High-level policies operate at a frequency of $31.25\mathrm{Hz}$ , achieved by executing each high-level action for $G = 16$ simulation steps. To ensure a fair comparison across different control modes, we remove the action magnitude penalization from the default reward function of each environment. The low-level policy receives the high-level action concatenated to a subset of the environment observation state as its own observation, and the exact input specification for each EvoControl variation is provided in Table 2. This allows the low-level controller to condition its actions on the target specified by the high-level policy. The low-level action space is the same as the high-level action space. All environments have a fixed episode length + +of low-level timesteps of 1,000 environment steps. To increase the realism of the simulation, we run the Brax environments with the backend of MJX, that is a MuJoCo environment in Jax with XLA. This enables us to even modify the MuJoCo xml definition file (to create the Safety Critical Reacher) environment. For all MuJoCo environments, we incorporated fixed PD controllers. We tuned the PD gains for each environment individually. Specifically, we set the proportional gain $(K_{p})$ to 1.0. This value was chosen as the environments, by default, accept actions with a magnitude of 1, representing a normalized torque input. To determine the optimal derivative gain $(K_{d})$ , we leveraged MuJoCo's dampratio parameter, setting it to 1.0 (critically damped). We then empirically observed the $K_{d}$ value that corresponds to this dampratio within the simulation. These tuned $K_{p}$ and $K_{d}$ values were used consistently throughout our experiments unless explicitly stated otherwise, providing a standardized and well-tuned PD baseline for comparison with EvoControl. This approach ensured that the PD controllers were appropriately configured for each environment's dynamics, providing a strong benchmark for evaluating the performance of learned low-level policies. + +# E.2. Reacher 1D + +The Reacher 1D environment is a simplified version of the standard Reacher environment. We remove the second arm link, creating a 1DOF task suitable for detailed analysis. The goal is randomly placed within the reachable workspace of the single arm link. The high-level state space consists of the angle and angular velocity of the arm, and the 2D position of the target. The high-level action is the desired angle. The low-level state comprises the high-level state concatenated with the high-level action, and the low-level action is the torque applied to the joint. To ensure reproducibility we provide the full environment MuJoCo xml specification below. + +```xml + +``` + +# E.3. Safety Critical Reacher + +The Safety Critical Reacher environment builds upon the Reacher 1D environment by introducing a safety aspect. In $25\%$ of the episodes, a randomly positioned obstacle is introduced, which the arm must avoid. A contact force sensor is added to the observations, and a penalty is applied to the reward for any contact force exceeding a threshold. This encourages the development of low-level controllers capable of reacting quickly to avoid collisions. The high-level state space adds a contact force sensor to the Reacher 1D state, while action spaces for both high and low level controllers remain the same as the Reacher 1D environment. This environment directly tests the hypothesis that higher-frequency actions can lead to significantly better performance in safety-critical scenarios, aligning with the intuition presented in Proposition 2.1. The + +faster reaction time allowed by a high-frequency low-level controller is crucial for effective collision avoidance. To ensure reproducibility we provide the full environment MuJoCo xml specification below. We also use the following reward: + +$$ +r = - \left\| q _ {0} - \frac {\pi}{2} \right\| - 3. 1 4 1 5 9 2 7 \cdot \mathbb {I} (\left\| f _ {c} \right\| > 0) \tag {2} +$$ + +where $q_{0}$ is the joint angle (where $q_{0}$ indicates the first dimension of $q$ at time $t$ ), $f_{c}$ is the contact force between the arm and the obstacle, and $\mathbb{I}(\cdot)$ is an indicator function that equals 1 if the condition inside is true, and 0 otherwise. Where we used a fixed goal location of $\pi /2$ , and initial starting state of $q_{0} = 0$ . To ensure reproducibility we provide the full environment MuJoCo xml specification below. + +```xml +