diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_content_list.json b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..61ac81f35f7d2eb9848a12b19435e4956c690e5d
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d1062ac2e01814aeac024143294a9b0186627e613c3eb02c9f2fe2fd032b65c
+size 160409
diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_model.json b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..1f30ccaf1dd3960416e730e0e9cd6ab968b2baa4
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cf9869cce68e22955f97d1b23a3461d3000963d8c00f8172aa9be0d486099fc6
+size 198162
diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_origin.pdf b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6b5034cbb68f9a5eeaeca4adf354c70190aee65d
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/e1df493c-31c9-4191-9369-0d9f58e263ca_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c517295cf76548a01b1f79503c685acec8e2b7175f9fbce451d8dfafa112f95b
+size 1211421
diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/full.md b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..d224aabd00835baf3f927c3dc7d5d2ec6d475d15
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/full.md
@@ -0,0 +1,740 @@
+# CAMEX: CURVATURE-AWARE MERGING OF EXPERTS
+
+Dung V. Nguyen $^{1*}$ Minh H. Nguyen $^{1*}$ Luc Q. Nguyen $^{2*}$ Rachel S.Y. Teo $^{3}$ Tan M. Nguyen $^{3\dagger}$ Linh Duy Tran $^{2\dagger}$
+
+$^{1}$ Faculty of Mathematics and Informatics, Hanoi University of Science and Technology
+$^{2}$ Viettel AI, Viettel Group
+$^{3}$ Department of Mathematics, National University of Singapore
+{dung.nv232215M, minh.nh232331M}@sis.hust.edu.vn
+{lucnq1, linhtd15}@viettel.com.vn
+rachel.tsy@u.nus.edu, tanmn@nus.edu.sg
+
+# ABSTRACT
+
+Existing methods for merging experts during model training and fine-tuning predominantly rely on Euclidean geometry, which assumes a flat parameter space. This assumption can limit the model's generalization ability, especially during the pre-training phase, where the parameter manifold might exhibit more complex curvature. Curvature-aware merging methods typically require additional information and computational resources to approximate the Fisher Information Matrix, adding memory overhead. In this paper, we introduce CAMEx (Curvature-Aware Merging of Experts), a novel expert merging protocol that incorporates natural gradients to account for the non-Euclidean curvature of the parameter manifold. By leveraging natural gradients, CAMEx adapts more effectively to the structure of the parameter space, improving alignment between model updates and the manifold's geometry. This approach enhances both pre-training and fine-tuning, resulting in better optimization trajectories and improved generalization without the substantial memory overhead typically associated with curvature-aware methods. Our contributions are threefold: (1) CAMEx significantly outperforms traditional Euclidean-based expert merging techniques across various natural language processing tasks, leading to enhanced performance during pre-training and fine-tuning; (2) we introduce a dynamic merging architecture that optimizes resource utilization, achieving high performance while reducing computational costs, facilitating efficient scaling of large language models; and (3) we provide both theoretical and empirical evidence to demonstrate the efficiency of our proposed method. The code is publicly available at: https://github.com/kpup1710/CAMEx.
+
+# 1 INTRODUCTION
+
+Sparse Mixture of Experts (SMoE) (Jacobs et al., 1991; Shazeer et al., 2017) is currently a core component for constructing foundation and large language models (LLMs), whose parameters count can rise up to billions and trillions (Devlin et al., 2019; Yang et al., 2019; Liu et al., 2019; Raffel et al., 2020; Nguyen et al., 2022b; Fedus et al., 2022; Wei et al., 2022; Teo & Nguyen, 2025). Nevertheless, (Hoffmann et al., 2024; Kaplan et al., 2020) recognized a scaling law that underpins the LLM's evolution, which is larger models require exponentially more computational resources and data to continue improving, and without sufficient scaling in all dimensions, performance gains may plateau. Thus, identifying and implementing efficient methodologies for the sustainable scaling of LLMs is imperative. SMoE addresses this challenge by sparsely activating parameters of large models, which can boost model performance with only minor losses in computational efficiency. The methodology is integrated chiefly into feedforward layers of transformers, processing tokens by selectively activating a small number of experts and hence trimming down the computing memory and FLOPS (Fedus et al., 2022; Lepikhin et al., 2021).
+
+Since its debut in (Shazeer et al., 2017), SMoE has gone through numerous explorations and advancements in routing mechanism development and expert architecture design. (Dai et al., 2022) proposes a two-phase
+
+training strategy for stabilizing the gate function so that the expert's selection of one token does not fluctuate between different inference times. (Zhou et al., 2022) changes the perspective of the router to experts with experts choice routing, ensuring a balancing load between experts. (Teo & Nguyen, 2024) incorporates heavy-ball momentum in SMoE to enhance the model's stability and robustness. (Chi et al., 2022) and (Chen et al., 2023) address the concern of representation collapse in SMoE by proposing cosine scoring and a fixed random initialized router, respectively. Some other works view the routing mechanism as a reinforcement learning, clustering, or optimal transport problem (Nielsen et al., 2025). In terms of expert design orientation, (Rajbhandari et al., 2022) and (Dai et al., 2024) introduce the concept of shared experts wherein each token is processed by a fixed expert and another selected through gating, achieving two experts engagement per layer without increasing the communication cost beyond that of top-1 gating. (Muqeeth et al., 2024) proposes to merge experts by taking the weighted mean of the expert's parameters with respect to router scores. This methodology is then extended in (He et al., 2023), (Zhong et al., 2024), and (Li et al., 2024) for causal language modeling pretraining and fine-tuning tasks.
+
+Among existing rigorous research on SMoE, our work focuses on the experts merging lines of research. Specifically, we systemically integrate natural gradient into task-specific merging protocol for SMoE. To the best of our knowledge, the current merging protocol applied for SMoE still deems the parameter space of the expert's parameters as Euclidean ones. Nevertheless, it has been shown that the space of neural network parameters brings the characteristic of the Riemannian manifold (Amari, 1998). Therefore, it is natural for us to make an effort in such a direction for merging experts. Although some existing works on merging models have already leveraged the Fisher Information Matrix (Matena & Raffel, 2022; Jin et al., 2023), we find that they require large computational space and complicated steps to perform well. In contrast, our merging protocol is simple and straightforward to implement while still taking into account the curvature of the parameters manifold. We discover the superior performance of curvature-aware merging in our method compared to the regular merging procedure applied to SMoE. Our main contributions are three-fold:
+
+1. We introduce a novel rapid and efficient merging technique named Curvature-Aware Merging of Experts (CAMEx) for SMOE that includes information about the curvature of the expert's parameters manifold.
+2. We propose a new architecture based on CAMEx, which dynamicalizes the merging protocol along with parameters reduction. Our empirical experiments prove the dominant performance of this architecture on pre-training tasks.
+3. We theoretically prove that our CAMEx obtains better alignment between experts and the training task domain.
+
+We empirically demonstrate that 1) our proposed merging method can add in rapidness of convergence speed for pre-training and 2) when combined with other merging protocols, it can boost the model's performance on a variety of practical tasks, including language modeling, text classification, question answering, and image classification.
+
+# 2 CURVATURE-AWARE MERGING OF EXPERTS
+
+This section aims to give an overview of model merging methods and their integration into SMoE architecture. We then introduce our curvature-aware merging protocol stamping from the natural gradient. Finally, we perform a theoretical analysis to support our proposal.
+
+# 2.1 BACKGROUND: EXPERT MERGING IN SPARSE MIXTURE OF EXPERTS
+
+It is convenient to recall the concept of SMOE and a few well-known experts merging methods for SMOE. From this point to the rest of our paper, let us use the notations summarized in Table 1.
+
+Sparse Mixture of Experts. A SMOE layer processes the tokens series as follows:
+
+$$
+\left\{ \begin{array}{l} \mathbf {y} _ {t} = \sum_ {i \in S _ {t}} \mathbf {G} (t, i) \cdot \mathbf {E} _ {i} \mathbf {h} _ {t} \\ \mathbf {G} (t, \cdot) = \operatorname {s o f t m a x} \left(\mathbf {W} _ {g} \mathbf {h} _ {t}\right) \\ S _ {t} = \operatorname {t o p - k} (\mathbf {G} (t, \cdot)) \end{array} \right. \tag {1}
+$$
+
+SMEAR. (Muqeeth et al., 2024) introduces the ensemble of expert parameters through weighted average computation with the factors being the router scores.
+
+
+Figure 1: Overview of CAMEx for a causal language modeling SMoE. The experts are merged through the router scores and the curvature-matrix M. During the merging protocol, we can generate the masks for the domain-vectors, denoted as $\gamma_{i}$ , such as Ties or Dare. We follow the causal segmenting pipeline from (Zhong et al., 2024) to achieve both memory efficiency and causal information constraints. Note that stop gradient operator is applied for the first segment router scores.
+
+Table 1: Notations and Definitions.
+
+
Symbol
Description
Symbol
Description
T
Number of tokens
k
Number of selected experts
N
Total number of experts
Ei∈Rd×h
Weights for theith expert
h∈RT×d
Input tokens or hidden states
G(·,·)∈RT×N
Gating function output
St
Set of top-k experts for token ht
α∈[0,1]
Rescalling factor
+
+Task-specific merging in SMoE. Our work will follow the scheme of task-specific merging (Ilharco et al., 2023). In such a setting, we assume the existence of $N$ pre-trained models parameterized by $\theta_{i}$ , each of which was pre-trained on a different task. We then define the task-vector for each pre-trained model through the merged model $\theta_{m}$ as $\tau_{i} = \theta_{i} - \theta_{m}$ . The merging protocol will be performed by Eqn. Merg. Under the context of SMoE, each expert learns to handle a particular subset of the input space or specializes in a specific type of feature or pattern (Jacobs et al., 1991; Dai et al., 2024). We believe it is more suitable to reference this technique as domain-specific merging. We, therefore, will rename the tensors $\tau_{i} = \mathbf{E}_{i} - \mathbf{E}_{m}$ as domain-vector. Additionally, to take the router information into account, we will define the formulation for domain-specific merging in a SMoE layer as follows:
+
+$$
+\hat {\mathbf {E}} _ {m} = \mathbf {E} _ {m} + \alpha \sum_ {i = 1} ^ {N - 1} s _ {i} \tau_ {i} \tag {2}
+$$
+
+where $s_i$ denotes the score of the router for the $i$ th expert. We want to note that with $0 < \alpha < 1$ , domain-specific merging aligns with soft merging.
+
+# 2.2 BACKGROUND: OTHER MODEL MERGING METHODS
+
+In this section, we discuss other recent and widely-adopted model merging methods outside the context of SMOE that we will combine with our curvature-aware merging method in our experiments in Section 3.
+
+TIES merging. (Yadav et al., 2023) improves upon task arithmetic by removing interference between the task vectors. Specifically, TIES zeros out entries in a given task vector with low magnitude and resolves sign conflicts across different task vectors.
+
+DARE merging. Different from TIES, DARE merging randomly zeros out the neurons like a Dropout layer (Yu et al., 2024).
+
+Fisher merging. Existing work on Fisher merging suffers from computational complexity since computing and inverting the Fisher Information Matrix, especially for large neural networks, is often intractable. Even when using approximations like diagonal or block-diagonal Fisher matrices, these methods can
+
+still be computationally expensive and challenging to apply at scale. Furthermore, the accuracy of Fisher approximations, such as diagonal or block-diagonal, can be problematic (Matena & Raffel, 2022).
+
+# 2.3 GRADIENT INTERPRETATION OF MODELS MERGING
+
+We want to emphasize the alignments between the paradigm of gradient descent and model merging. For this, we denote $\theta \in \mathbb{R}^N$ , $\mathcal{L}(\theta)$ , and $\eta$ as the model's parameters, the empirical loss function, and the learning rate, respectively. During the training process of a deep learning model, the parameters are updated following the gradient descent formula:
+
+$$
+\theta_ {n + 1} = \theta_ {n} + \eta (- \nabla \mathcal {L} (\theta_ {n})) \tag {GD}
+$$
+
+In the aspect of deep models merging, we also have an update rule in a similar manner, which is
+
+$$
+\hat {\theta} ^ {m} = \theta^ {m} + \alpha \sum_ {i = 1} ^ {n} \underbrace {\left(\theta^ {i} - \theta^ {m}\right)} _ {\substack {\text {gradient-like} \\ \text {update direction}}} \tag{Merg}
+$$
+
+where $\theta^m$ denotes the merged model's parameters, and $\theta^i$ denotes the parameters of the $i$ th expert. Here, we interpret $\theta^i$ as the optimal parameters of the model for a specific task or domain, and then the update rule gives us a direction toward optimizing for all tasks.
+
+However, it has been pointed out by (Amari, 1998) that the parameter space structure of deep learning models has Riemannian characteristics. Therefore, a more natural gradient updating scheme was proposed,
+
+$$
+\theta_ {n + 1} = \theta_ {n} + \eta \underbrace {G \left(\theta_ {n}\right) (- \nabla \mathcal {L} \left(\theta_ {n}\right))} _ {\text {n a t u r a l g r a d i e n t}} \tag {NGD}
+$$
+
+In this formula, $G(\theta_n) \in \mathbb{R}^{N \times N}$ denotes the Riemannian metric tensor (Amari, 1998; Amari & Douglas, 1998), which characterizes the intrinsic curvature of a particular manifold in $N$ -dimensional space (Martens, 2020) or sometimes, the inversed Fisher Information Matrix. The same ideology was introduced for merging large language models in Fisher merging (Matena & Raffel, 2022) and Regmean (Jin et al., 2023). However, both methods suffer from the bottleneck in the computation cost of approximating the Fisher Information. Moreover, these methods are challenging to apply in sparse layers of SMOE since they would introduce huge latency, FLOPS, and memory for computing and storing matrices whose number of entries is proportional to a number of expert parameters.
+
+# 2.4 EXPERTS MERGING WITH CURVATURE-AWARE
+
+In this section, for the sake of conciseness, we focus on the language modeling task; a similar methodology can be applied to other tasks, such as classification. We introduce an efficient way to merge experts within SMoE layers, based on the causal segmenting approach proposed by (Zhong et al., 2024). The goal of the causal segment routing strategy is to enhance the efficiency of expert merging operations while maintaining the autoregressive nature of language models. More details about this algorithm can be found in Appendix C.1 and Algorithm 1. We then perform the following merging protocols:
+
+$$
+\hat {\mathbf {E}} _ {m} ^ {l} = \mathbf {E} _ {m} ^ {l} + \alpha \sum_ {i = 1} ^ {N - 1} \mathbf {M} _ {i} \cdot \left(s _ {i} ^ {l} * \tau_ {i} ^ {l}\right) \tag {CA-Merg}
+$$
+
+where $\mathbf{M}_I\in \mathbb{R}^{d_{in}d_{out}\times d_{in}d_{out}}$ denote the curvature matrix which performs matrix product with the gradient-like component. The curvature of the parameters manifold will be learned through these tensors while optimizing the empirical loss. This approach has also proven its effectiveness in meta-learning for few-shot classification (Park & Oliva, 2019). We further explore the computing efficiency of merging experts by proposing a novel dynamic merging formula
+
+$$
+\left\{ \begin{array}{l l} \mathbf {E} _ {m} ^ {l + 1} & = \mathbf {E} _ {m} ^ {l} + \frac {\alpha}{N - 1} \sum_ {i = 1} ^ {N - 1} \mathbf {M} _ {i} \cdot \tau_ {i} ^ {l} \\ \hat {\mathbf {E}} _ {m} ^ {l + 1} & = \mathbf {E} _ {m} ^ {l + 1} + \alpha \sum_ {i = 1} ^ {N - 1} \mathbf {M} _ {i} \cdot \left(s _ {i} ^ {l + 1} * \tau_ {i} ^ {l + 1}\right) \end{array} \right. \tag {Dynamic-Merg}
+$$
+
+
+Figure 2: Overall architecture of different SMOE layers. The figure presents the vanilla SMOE layer on the left, the merging expert layer in the middle, and our proposed dynamic merging SMOE layer on the right. Our architecture reduces the number of parameters compared to the other two, while maintaining the same number of activated neurons per layer. Importantly, despite the dynamic merging mechanism, our architecture preserves the same number of experts at each layer as the other SMOE architectures, ensuring comparable model capacity, i.e., the number of activated parameters per layer.
+
+
+
+
+
+The architecture corresponding to this recurrent representation can be found in Figure 2. The architecture contains a global expert that traverses through the SMoE layers by the updating rule in Eqn. Dynamic-Merg. Not only will this allow a notable reduction in model size and GFLOPS, but it also ensures the number of experts in each SMoE is the same as in the full-expert setting, where each layer has the same number of experts. We refer to Appendix F for a step-by-step walkthrough of key equations in CAMEx.
+
+# 2.5 EFFICENCY
+
+Parameter efficient approximation of curvature matrix. Storing and computing a curvature matrix requires a whopping memory and time complexity of $O(n^{4})$ and $O(n^{4})$ , respectively. This is infeasible even for a simple SMoE layer, as one layer can contain many experts. To mitigate this problem, we follow (Martens & Grosse, 2015) and approximate the curvature matrix using the Kronecker product. It has been proven by (Hameed et al., 2022) that we can approximate an arbitrary matrix using a finite sum of Kronecker products. For a curvature matrix $\mathbf{M}_i \in \mathbb{R}^{d_{in}d_{out} \times d_{in}d_{out}}$ , we present the rank-1 approximation as below:
+
+$$
+\mathbf {M} _ {i} \approx \mathbf {M} _ {i} ^ {\text {i n}} \otimes \mathbf {M} _ {i} ^ {\text {o u t}} \tag {3}
+$$
+
+with $\mathbf{M}_i^{in} \in \mathbb{R}^{d_{in} \times d_{in}}$ and $\mathbf{M}_i^{out} \in \mathbb{R}^{d_{out} \times d_{out}}$ . Still, this form of approximation is too large to compute and store during training time, so we further decompose $\mathbf{M}_i^{in}$ and $\mathbf{M}_i^{out}$ using Kronecker product because of the efficient computation using tensor algebra. This form of approximation reduces the number of parameters added and only puts negligible memory and computational overhead to the training process at the cost of additional $O(n)$ memory complexity and $O(n^{2.5})$ computational complexity. Although this might limit the representative capacity of the curvature matrix, we empirically find that the performance of our method still surpasses other merging methods.
+
+Efficient test-time inference with reparameterization. We focus on the case where $\alpha = 1$ . To further optimize the computation of curvature-aware merging, we embed the curvature matrices into the domain-vectors using the following reparameterization trick:
+
+$$
+\mathbf {E} _ {i} ^ {\prime} \leftarrow \mathbf {E} _ {m} + \mathbf {M} _ {i} \cdot \tau_ {i} \tag {4}
+$$
+
+In this case, the merging formula at test time becomes:
+
+$$
+\hat {\mathbf {E}} _ {m} = \mathbf {E} _ {m} + \sum_ {i = 1} ^ {N - 1} s _ {i} \cdot \left(\mathbf {E} _ {i} ^ {\prime} - \mathbf {E} _ {m}\right) = \mathbf {E} _ {m} + \sum_ {i = 1} ^ {N - 1} \mathbf {M} _ {i} \cdot \left(s _ {i} \cdot \tau_ {i}\right)
+$$
+
+Thus, during inference, we avoid storing the curvature matrices and recomputing their product with domain vectors, reducing the total FLOPs. This explains the computational efficiency seen in Section 3.
+
+# 2.6 THEORETICAL ANALYSIS
+
+In this section, we investigate how optimizing the curvature matrix $\mathbf{M}$ in Eqn. CA-Merg can improve the generalization of the expert merging process for downstream tasks. We first recall the formulation for domain-specific merging
+
+$$
+\hat {\mathbf {E}} _ {m} = \mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} s _ {j} \cdot \tau_ {j} \tag {5}
+$$
+
+We begin by calculating the gradient of the downstream task loss function, denoted by $\mathcal{L}$ , with respect to $\mathbf{M}_j$ at a specific $l$ th layer as follows:
+
+$$
+\frac {\partial \mathcal {L}}{\partial \mathbf {M} _ {j}} = \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m}} \cdot \frac {\partial \hat {\mathbf {E}} _ {m}}{\partial \mathbf {M} _ {j}} = \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m}} \cdot (\alpha s _ {j} * \tau_ {j}) = \alpha s _ {j} * \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m}} \cdot (\mathbf {E} _ {j} - \mathbf {E} _ {m}) \tag {6}
+$$
+
+This is the outer product of the gradients of the task loss and the domain vectors. It is important to note the connection with the Fisher Information Matrix. For a downstream task, if we define the loss function as the negative log-likelihood, such as in a supervised classification task $\mathcal{L}(\theta) = \mathbb{E}_{(x,y)\sim p}[-\log_{\theta}p(y|x)]$ , then the empirical Fisher Information Matrix can be defined as
+
+$$
+\mathbf {F} = \mathbb {E} _ {(x, y) \sim p} [ \nabla_ {\theta} \log_ {\theta} p (y | x) \nabla_ {\theta} \log_ {\theta} p (y | x) ^ {\top} ]
+$$
+
+Next, we consider how the gradient of the curvature matrix can contribute to better performance. Given a time step $t$ , the standard gradient descent from an initial point $\mathbf{M}_j$ with learning rate $\beta$ yields the following update:
+
+$$
+\mathbf {M} _ {j} ^ {t + 1} = \mathbf {M} _ {j} ^ {t} - \beta * \frac {\partial \mathcal {L}}{\partial M _ {j} ^ {t}} = \mathbf {M} _ {j} ^ {t} - \alpha \beta * s _ {j} ^ {t} * \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m} ^ {t}} \cdot (\mathbf {E} _ {j} ^ {t} - \mathbf {E} _ {m} ^ {t}) \tag {7}
+$$
+
+We assume standard gradient descent for simplicity, but the argument extends to other advanced gradient algorithms, such as momentum (Polyak, 1964; Sutskever et al., 2013; Nguyen et al., 2020; He et al., 2020; Wang et al., 2022; Nguyen et al., 2022a) and ADAM (Kingma & Ba, 2015; Loshchilov & Hutter, 2019). We then apply $\mathbf{M}_j$ to the merging process in Eqn. CA-Merg and get
+
+$$
+\hat {\mathbf {E}} _ {m} = \quad \mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t + 1} * \mathbf {M} _ {j} ^ {t} \cdot \tau_ {j} ^ {t + 1} - \alpha^ {2} \beta \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t} s _ {j} ^ {t + 1} * \left(\tau_ {j} ^ {t} ^ {\top} \cdot \tau_ {j} ^ {t + 1}\right) \cdot \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m} ^ {t}} \tag {8}
+$$
+
+domain-specific merging with curvature-aware
+
+The detail for the derivation can be found in Appendix E. We can see that the first term in Eqn. 8 is the classic domain-specific merging formula with the guidance of the learned curvature. Furthermore, the second term contains the direction from the task loss gradient and the inner product between domain-vectors from two consecutive gradient steps. If $\mathbf{M}_j = \mathbf{I} \forall j$ , this term can be seen as an auxiliary signal from task loss of the previous update step guiding the merging direction. The term $s_j^t s_j^{t+1} \cdot (\tau_j^{t^\top} \tau_j^{t+1})$ modeling the agreement of the merging direction between updating steps: if there are conflicts between current and the previous updating direction, then this signal will be alleviated, thus dampening the harm to the merging direction of the current step; otherwise if they show strong agreement, this amplifies the impact of the updating direction toward minimizing the task loss with respect to the previous step, thus accelerate the training process while implicitly helping current merging direction with additional experience.
+
+On the other hand, we can rewrite Eqn. 8 as follows:
+
+$$
+\hat {\mathbf {E}} _ {m} = \mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t + 1} * \mathbf {M} _ {j} ^ {t} \cdot \tau_ {j} ^ {t + 1} - \alpha^ {2} \beta \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t} s _ {j} ^ {t + 1} * \underbrace {\left(\tau_ {j} ^ {t ^ {\top}} \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m} ^ {t}}\right) \cdot \tau_ {j} ^ {t + 1}} _ {\text {g r a d i e n t m a t c h i n g}} \tag {9}
+$$
+
+We now have the inner-product between the gradient of the task loss and the domain-vector. This can be interpreted as the matching between the update from the task loss gradient and the domain-specific direction. We then have the updated domain-specific direction for each expert whose weighting factors are calculated by the inner-product. Therefore, we are performing a soft nearest distance voting to find the experts that agree the most with the task loss and enhance the merged experts with the corresponding domain-vector.
+
+Table 2: Performance of T5-base variants on the fine-tuning tasks for GLUE. All SMoE variants have 8 experts per layer. We follow (Devlin et al., 2019) in conducting experiments on the GLUE benchmark. Our curvature-aware methods outperform all baselines across tasks, while maintaining the same number of parameters and FLOPs as the SMoE models.
+
+
Methods
Params
TFLOPs
SST-2
MRPC
CoLA
QQP
STSB
QNLI
RTE
MNLI
Vanilla
220M
4.65
93.34
89.70
58.06
88.76
89.06
92.34
74.36
86.36
SMoE
1.0B
4.65
94.26
90.87
56.78
88.69
89.44
92.07
70.75
86.38
Domain-Specific
1.0B
4.65
93.57
90.19
58.07
88.77
89.40
92.51
72.56
86.40
Ties
1.0B
4.65
93.92
91.44
58.54
86.47
88.58
91.87
75.54
86.39
Dare
1.0B
4.65
93.80
89.46
58.33
88.72
89.13
92.29
73.64
86.20
Domain-specific-CA
1.0B
4.65
93.80
91.16
58.57
88.86
89.47
92.60
74.72
86.44
Dare-CA
1.0B
4.65
94.49
91.15
58.56
88.76
89.56
92.80
78.70
86.34
Ties-CA
1.0B
4.65
94.61
92.49
60.06
88.83
89.54
91.89
75.81
86.45
+
+# 3 EXPERIMENTAL RESULTS
+
+We perform evaluations on four major tasks, including language modeling, text classification, question answering, and image classification. For language modeling, we use the Wikitext-2 and Wikitext-103 (Merit et al., 2016) benchmarks. For text classification, we employ a subset of the GLUE (Wang et al., 2019) benchmark, a collection of eight diverse tasks designed to test different aspects of language understanding. For question answering, we employ two famous benchmarks: SQuAD (Rajpurkar et al., 2016) and WikiQA (Yang et al., 2015). Finally, the ImageNet-1k (Deng et al., 2009) dataset is chosen for image classification evaluation.
+
+We choose GPT-2 (Radford et al., 2019) small and SwinTransformer small (Liu et al., 2021) as our backbones for language modeling and image classification, respectively. Regarding GLUE and question-answering tasks, T5 base (Raffel et al., 2020) is chosen.
+
+Our experimental results confirm that the proposed merging method accelerates pre-training convergence and, when combined with other merging protocols, enhances model performance across tasks and settings. All results are averaged over 5 runs with different random seeds. Detailed information on the datasets, models, training procedures, and hyperparameters is provided in Appendix B and Appendix D. For additional experiments on different routers and merging methods, we refer to Appendix H.1, and H.2.
+
+
+Figure 3: Perplexity of GPT2-small variants starting at the tenth epoch.
+
+# 3.1 TRAINING AND EVALUATION DETAILS
+
+We fix the number of epochs for all models on each task. For each text-related task, we first undertake a comprehensive hyper-parameter search. This encompasses batch sizes from $\{8, 16, 32, 64\}$ , learning rates from $\{3e - 4, 1e - 4, 3e - 5, 1e - 5\}$ , to pinpoint the optimal fine-tuned models. Regarding image classification tasks, a batchsize of 96 was chosen for all models. In addition, we choose AdamW (Loshchilov & Hutter, 2019) as the default optimizer and conduct all experiments on NVIDIA A100 GPUs. We compare our proposal to three merging baselines, including domain-specific, Ties, and Dare merging. There exists prior works on merging methods with the aid of the Fisher Information Matrix, such as (Matena & Raffel, 2022), which rely on access to a validation set used to compute the Fisher matrix or fine-tune hyperparameters. To eliminate the need for a validation set, (Jin et al., 2023) proposes storing and transmitting inner product matrices derived from the training data for each task, which are of the same size as the original model. However, this approach becomes costly for large models, as storage and transmission demands increase linearly with model size and the number of tasks as well as the number of experts. Therefore, we choose baselines that are needless of extra information and computational cost to perform comparisons. More details about theoretical comparison between CAMEx and Fisher-based
+
+merging methods can be found in Appendix A. We want to note that our merging protocol can be easily integrated into other works such as merge then compress protocol (Li et al., 2024).
+
+# 3.2 RESULTS
+
+In the following tables, the row with our method's results is highlighted in grey. Results with the best and second best performance are written in bold and underline, respectively. In addition, methods with the postfix "-CA" denote the curvature-aware version of the corresponding baseline.
+
+In Table 2, the results demonstrate that CA-augmented models consistently outperform their non-CA counterparts. Ties-CA achieves the highest scores on SST-2 (94.61), MRPC (92.49), CoLA (60.06), and MNLI (86.45), showing considerable improvements over both the vanilla and standard Ties models. Similarly, Dare-CA performs best on RTE (78.70), surpassing Dare (73.64), indicating that CA improves performance on smaller datasets and tasks with higher variability. Furthermore, Domain-specific-CA exceeds the non-CA version on QNLI and MNLI, demonstrating the broader applicability of curvature-aware methods. We provided a significant t-test at Appendix G.
+
+In Table 3, the Domain-specific-CA and Dynamic outperform the Vanilla, SMoE, and Domain-specific baselines, with lower perplexity values. Domain-specific-CA achieves the lowest perplexity score of 21.50, showcasing superior performance in language modeling tasks when compared to all other methods. The Dynamic architecture follows closely with a perplexity of 21.55 while also reducing the parameter count by $9\%$ , compared to the
+
+Table 3: Performance of GPT-2 small variants for the pre-training task on Wikitext-103.
+
+
Methods
Perplexity↓
Params (M)
GFLOPS ↓
Vanilla
23.03
125
292.5
SMoE
22.42
522
292.5
Domain-specific
21.64
522
292.5
Domain-specific-CA
21.50
522
292.5
Dynamic
21.55
470
292.5
+
+other methods. This highlights the Dynamic architecture's efficiency in maintaining strong performance with fewer parameters, making it ideal for resource-constrained environments. Moreover, the Dynamic architecture is competitive with Domain-specific-CA and outperforms the rest in terms of convergence speed, which is shown in Figure 3.
+
+In Table 4, the Vanilla model reaches a perplexity of 21.84. Despite increasing parameters, SMoE only slightly improves to 21.60. Domain-specific, Ties, and Dare methods show small gains, with Ties reaching 21.45. However, curvature-aware (CA) methods outperform all others. Domain-specific-CA achieves the best perplexity at 21.06, followed by Ties-CA (21.11) and Dare-CA (21.42), each significantly improving over their non-CA counterparts. All models beyond Vanilla share the same computational cost, indicating that CA methods enhance performance without added complexity.
+
+Domain-specific-CA stands out, demonstrating the clear advantage of curvature-aware optimization.
+
+Table 4: Performance of GPT-2 small variants for the supervised fine-tuning task on Wikitext-2
+
+
Methods
Perplexity↓
Params (M)
GFLOPS ↓
Vanilla
21.84
125
292.5
SMoE
21.60
522
292.5
Domain-specific
21.56
522
292.5
Ties
21.45
522
292.5
Dare
21.60
522
292.5
Domain-specific-CA
21.06
522
292.5
Dare-CA
21.42
522
292.5
Ties-CA
21.11
522
292.5
+
+In Table 5, the baseline models, including Vanilla, SMOE, and non-CA versions of Ties and Dare, achieve solid results but show diminishing improvements as model complexity increases. In contrast, our curvature-aware methods significantly outperform their counterparts. For instance, on the SQuAD dataset, Dare-CA achieves the highest Exact Match (EM) score of $81.76\%$ and an F1 score of $88.60\%$ , surpassing all other methods. Similarly, on WikiQA, Ties-CA attains the highest accuracy of $96.55\%$ , with Dare-CA closely following at $96.23\%$ .
+
+Table 5: Performance of T5-base variants on question answering tasks.
+
+
Methods
Params
TFLOPs
SQuAD Em/F1
WikiQA Accuracy
Vanilla
222M
2.86
81.01/88.14
96.06
SMoE
1.0B
2.86
81.25/88.50
96.04
Domain-specific
1.0B
2.86
80.21/87.44
95.32
Ties
1.0B
2.86
80.76/88.11
95.87
Dare
1.0B
2.86
80.88/88.03
96.01
Domain-specific-CA
1.0B
2.86
80.44/87.69
95.72
Ties-CA
1.0B
2.86
81.52/88.60
96.55
Dare-CA
1.0B
2.86
81.76/88.60
96.23
+
+In Table 6, while Vanilla and SMOE exhibit solid accuracy scores, they are surpassed by the curvature-aware (CA) enhanced versions of the models. Notably, Ties-CA delivers the best top-1 accuracy at $83.38\%$ and
+
+
+Figure 4: Impact of the $\alpha$ parameter on Curvature-Aware method performance across NLP tasks. We observe that the scaling factors that are within the range [0.8,1] consistently improve model's performance.
+
+
+Figure 5: Impact of the Kronecker rank of curvature matrix on model's performance. We observe that as the rank increases the performance drops and then saturates. However, we would like to note that this curve might change depending on the downstream tasks and the merging protocol.
+
+the highest top-5 accuracy at $96.96\%$ , slightly edging out Dare-CA, which achieves $83.38\%$ and $96.94\%$ , respectively.
+
+# 4 ABLATION
+
+Impact of the scaling factor. The plot in Figure 4 illustrates the impact of the $\alpha$ parameter on the performance of three curvature-aware (CA) model variants Domain-specific-CA, Ties-CA, and Dare-CA across three natural language processing tasks: STSB, MRPC, and RTE. The $\alpha$ parameter ranges from 0.5 to 1.0. The overall trend suggests that increasing $\alpha$ leads to better generalization, particularly for complex tasks such as RTE, where sentence-level entailment and similarity benefit from stronger curvature-aware representations. Moreover, across all tasks, the model reaches its peak performance when $\alpha$ is inside the range [0.8,1]. This observation aligns with that indicated by (Yadav et al., 2023). For a more comprehensive analysis on the impact of $\alpha$ and number of experts, we direct the readers to Appendix H.4.1 and H.4.2.
+
+Improved performance with higher Kronecker rank. Across all three tasks (STSB, MRPC, and RTE), the evaluation metrics tend to improve as the rank increases from 1 to 8. This indicates that higher-ranked models generally perform better, suggesting a positive correlation between rank and task performance. Notably, the Domain-specific-CA model consistently achieves high performance across all tasks, especially in STSB, where metrics approach 0.90. Although MRPC and RTE show slightly lower metrics, ranging from 0.50 to 0.75, there is a clear improvement in performance as
+
+rank increases, particularly in the lower-to-mid ranks. However, we observed a decline in performance for Ties-CA and Dare-CA as the rank increases. We hypothesize that this is due to the masking mechanism employed by these methods, which may interfere with the learning process of the curvature matrices.
+
+Table 6: Comparison of Accuracy for SwinTransformer small variants on ImageNet-1k.
+
+
Methods
Params (M)
GFLOPs
Acc@1
Acc@5
Vanilla
50
6.75
83.14
96.90
SMoE
157
6.75
83.15
96.71
Domain-specific
157
6.75
83.15
96.91
Ties
157
6.75
83.28
96.93
Dare
157
6.75
83.13
96.88
Domain-specific-CA
157
6.75
83.29
96.95
Ties-CA
157
6.75
83.38
96.96
Dare-CA
157
6.75
83.38
96.94
+
+Robustness against noise. Table 7 demonstrates that curvature-aware models offer superior performance on corrupted ImageNet datasets compared to both Vanilla and SMOE variants. Among the models, our best configuration (Ties-CA) stands out as the best performer, showcasing robustness to corruptions across all datasets. These results suggest that incorporating curvature-awareness can
+
+substantially improve model robustness in challenging conditions.
+
+Table 7: Comparison for Swin-Transformer small variants on corrupted ImageNet.
+
+
Methods
ImageNet-O
ImageNet-A
ImageNet-R
Vanilla
45.88
23.68/53.10
37.34/52.34
SMoE
43.34
23.72/53.15
38.02/55.17
Ours
50.69
25.45/54.24
38.37/55.42
+
+# 5 RELATED WORK
+
+Sparse Mixture-of-Experts (SMoE). As the demand for model scaling grows increasingly widespread, there is a pressing inquiry into efficient ways to optimize computing costs while minimizing the impact on model performance. To address this need, Sparse Mixture of Experts (SMoE) has emerged and undergone extensive research and exploration (Shazeer et al., 2017; Lepikhin et al., 2021; Fedus et al., 2022). Starting with (Shazeer et al., 2017), the integration of SMoE into transformer architectures followed shortly after with the works of (Lepikhin et al., 2021) and (Fedus et al., 2022). The principle of SMoE is based on a simple concept: scaling the horizontal dimension of models (i.e., the number of feedforward blocks) rather than the vertical dimension (i.e., the number of stacked layers). This allows the model to selectively activate units or parameters based on the input tokens, thereby optimizing resource usage while maintaining performance.
+
+SMoE Efficiency Bottlenecks and Emerging Solutions. While it remains controversial whether to use Top-1 or Top-K routing, some research has highlighted the potential performance gains from increasing the number of activated experts (Shazeer et al., 2017; Chen et al., 2023). Other studies have found redundancies among experts in MoE layers (Li et al., 2024; Lu et al., 2024a). Additionally, some work has proposed using low-rank experts (Wu et al., 2024b; Liu et al., 2024; Wu et al., 2024a) inspired by LoRA (Hu et al., 2022). Despite the varying research directions, these studies consistently show that training a robust SMoE requires substantial computational and memory resources. This has motivated researchers such as (Li et al., 2024), (He et al., 2023), and (Zhong et al., 2024) to merge experts within each MoE layer, reducing the number of experts to a single one and significantly improving training and inference efficiency.
+
+Model Merging with curvature-aware. Though numerous methods for merging models have been introduced and developed (Yadav et al., 2023; Cai et al., 2023; Ilharco et al., 2022; Matena & Raffel, 2022; Jin et al., 2022; Don-Yehiya et al., 2022; Rame et al., 2023; Tuan et al., 2024; Lu et al., 2024b), most of these works consider merging protocols in the Euclidean parameter space. However, it has been noted that the space of deep neural network models is a Riemannian one (Amari, 1998). (Matena & Raffel, 2022) and (Jin et al., 2022) were the first to fuse model weights while accounting for the Fisher Information. Despite their promising results, these methods require massive computation to approximate the inversion of the Fisher matrix. Moreover, the Fisher matrix has a size proportional to the dimension of the model parameters, which significantly increases memory usage. Consequently, these methods are challenging for directly integrating into SMoE layers to fuse expert weights.
+
+# 6 LIMITATION AND CONCLUSION
+
+In this work, we introduced CAMEx, a curvature-aware approach to expert merging in Mixture of Experts architectures. By leveraging natural gradients to account for the parameter manifold's curvature, CAMEx enhances model performance and reduces computational costs during both pre-training and fine-tuning, outperforming traditional Euclidean-based methods. Additionally, our dynamic merging architecture optimizes resource usage by incorporating a global expert across layers, thus minimizing model size without sacrificing accuracy. Despite the overall improvements, a minor limitation is that curvature-aware merging demonstrates reduced compatibility with Ties and Dare merging at higher Kronecker ranks. Future work could dive deeper into this phenomenon and extend CAMEx to other expert merging methods and explore curvature-aware approaches in broader neural network models to further enhance our dynamic architecture. This research lays the groundwork for developing more efficient and scalable models in large-scale machine learning.
+
+# ACKNOWLEDGMENTS
+
+Dung V. Nguyen was funded by the Master, PhD Scholarship Programme of Vingroup Innovation Foundation (VINIF), code VINIF.2023.ThS.024.
+This research / project is supported by the National Research Foundation Singapore under the AI Singapore Programme (AISG Award No: AISG2-TC-2023-012-SGIL). This research / project is supported by the Ministry of Education, Singapore, under the Academic Research Fund Tier 1 (FY2023) (A-8002040-00-00, A-8002039-00-00). This research / project is also supported by the NUS Presidential Young Professorship Award (A-0009807-01-00) and the NUS Artificial Intelligence Institute-Seed Funding (A-8003062-00-00).
+Reproducibility Statement: Source codes for our experiments are provided in the supplementary materials of the paper. The details of our experimental settings and computational infrastructure are given in Section 3 and the Appendix D. All datasets that we used in the paper are published, and they are easy to find in the Internet.
+Ethics Statement: Given the nature of the work, we do not foresee any negative societal and ethical impacts of our work.
+
+# REFERENCES
+
+S. Amari and S.C. Douglas. Why natural gradient? In Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP '98 (Cat. No.98CH36181), volume 2, pp. 1213-1216 vol.2, 1998. doi: 10.1109/ICASSP.1998.675489.
+Shun-ichi Amari. Natural gradient works efficiently in learning. Neural Computation, 10(2):251-276, 1998. doi: 10.1162/089976698300017746.
+Ruisi Cai, Zhenyu Zhang, and Zhangyang Wang. Robust weight signatures: Gaining robustness as easy as patching weights? arXiv preprint arXiv:2302.12480, 2023.
+Daniel Cer, Mona Diab, Eneko Agirre, Inigo Lopez-Gazpio, and Lucia Specia. SemEval-2017 task 1: Semantic textual similarity multilingual and crosslingual focused evaluation. In Proceedings of the 11th International Workshop on Semantic Evaluation (SemEval-2017), pp. 1-14, Vancouver, Canada, August 2017. Association for Computational Linguistics. doi: 10.18653/v1/S17-2001.
+Tianlong Chen, Zhenyu Zhang, AJAY KUMAR JAISWAL, Shiwei Liu, and Zhangyang Wang. Sparse moe as the new dropout: Scaling dense and self-slimmable transformers. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=wlhwFUb_81.
+Zewen Chi, Li Dong, Shaohan Huang, Damai Dai, Shuming Ma, Barun Patra, Saksham Singhal, Payal Bajaj, Xia Song, and Furu Wei. On the representation collapse of sparse mixture of experts. arXiv preprint arXiv:2204.09179, 2022.
+Ido Dagan, Oren Glickman, and Bernardo Magnini. The pascal recognizing textual entailment challenge. In Proceedings of the First PASCAL Challenges Workshop on Recognising Textual Entailment, 2006.
+Damai Dai, Li Dong, Shuming Ma, Bo Zheng, Zhifang Sui, Baobao Chang, and Furu Wei. StableMoE: Stable routing strategy for mixture of experts. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 7085-7095, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.acl-long.489.
+Damai Dai, Chengqi Deng, Chenggang Zhao, R. X. Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Y. Wu, Zhenda Xie, Y. K. Li, Panpan Huang, Fuli Luo, Chong Ruan, Zhifang Sui, and Wenfeng Liang. Deepseekmoe: Towards ultimate expert specialization in mixture-of-experts language models, 2024. URL https://arxiv.org/abs/2401.06066.
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. IEEE, 2009.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. *ArXiv*, abs/1810.04805, 2019.
+
+William B Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Proceedings of the Third International Workshop on Paraphrasing (IWP2005), 2005.
+Shachar Don-Yehiya, Elad Venezian, Colin Raffel, Noam Slonim, Yoav Katz, and Leshem Choshen. Cold fusion: Collaborative descent for distributed multitask finetuning. arXiv preprint arXiv:2212.01378, 2022.
+William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1-39, 2022. URL http://jmlr.org/papers/v23/21-0998.html.
+Marawan Gamal Abdel Hameed, Marzieh S. Tahaei, Ali Mosleh, and Vahid Partovi Nia. Convolutional neural network compression through generalized kronecker product decomposition. Proceedings of the AAAI Conference on Artificial Intelligence, 36(1):771-779, Jun. 2022. doi: 10.1609/aaai.v36i1.19958. URL https://ojs.aaai.org/index.php/AAAI/article/view/19958.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9729-9738, 2020.
+Shwai He, Run-Ze Fan, Liang Ding, Li Shen, Tianyi Zhou, and Dacheng Tao. Merging experts into one: Improving computational efficiency of mixture of experts. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 14685-14691, Singapore, December 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.emnlp-main.907.
+Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, 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.
+Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15262-15271, 2021b.
+Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Oriol Vinyals, Jack W. Rae, and Laurent Sifre. Training compute-optimal large language models. In Proceedings of the 36th International Conference on Neural Information Processing Systems. Curran Associates Inc., 2024. ISBN 9781713871088.
+Edward J Hu, yelong shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=nZeVKeeFYf9.
+Gabriel Ilharco, Mitchell Wortsman, Samir Yitzhak Gadre, Shuran Song, Hannaneh Hajishirzi, Simon Kornblith, Ali Farhadi, and Ludwig Schmidt. Patching open-vocabulary models by interpolating weights. Advances in Neural Information Processing Systems, 35:29262-29277, 2022.
+Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=6t0Kwf8-jrj.
+Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. *Neural Computation*, 3(1):79-87, 1991. doi: 10.1162/neco.1991.3.1.79.
+Xisen Jin, Xiang Ren, Daniel Preotiac-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. arXiv preprint arXiv:2212.09849, 2022.
+Xisen Jin, Xiang Ren, Daniel Preotiac-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=FCnohuR6AnM.
+
+Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, 2020. URL https://arxiv.org/abs/2001.08361.
+Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.
+Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan First, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. {GS}hard: Scaling giant models with conditional computation and automatic sharding. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=qrwe7XHTmYb.
+Pingzhi Li, Zhenyu Zhang, Prateek Yadav, Yi-Lin Sung, Yu Cheng, Mohit Bansal, and Tianlong Chen. Merge, then compress: Demystify efficient SMoe with hints from its routing policy. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=eFWG9Cy3WK.
+Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
+Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), 2021.
+Zihan Liu, Hanyi Wang, Yaoyu Kang, and Shilin Wang. Mixture of low-rank experts for transferable ai-generated image detection, 2024. URL https://arxiv.org/abs/2404.04883.
+Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=Bkg6RiCqY7.
+Xudong Lu, Qi Liu, Yuhui Xu, Aojun Zhou, Siyuan Huang, Bo Zhang, Junchi Yan, and Hongsheng Li. Not all experts are equal: Efficient expert pruning and skipping for mixture-of-experts large language models, 2024a. URL https://arxiv.org/abs/2402.14800.
+Zhenyi Lu, Chenghao Fan, Wei Wei, Xiaoye Qu, Dangyang Chen, and Yu Cheng. Twin-merging: Dynamic integration of modular expertise in model merging. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024b. URL https://openreview.net/forum?id=81YIt63TTn.
+James Martens. New insights and perspectives on the natural gradient method. J. Mach. Learn. Res., 21(1), Jan 2020. ISSN 1532-4435.
+James Martens and Roger Grosse. Optimizing neural networks with kronecker-factored approximate curvature. In Proceedings of the 32nd International Conference on International Conference on Machine Learning - Volume 37, ICML'15, pp. 2408-2417. JMLR.org, 2015.
+Michael S Matena and Colin A Raffel. Merging models with fisher-weighted averaging. Advances in Neural Information Processing Systems, 35:17703-17716, 2022.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. URL https://openreview.net/forum?id=Byj72udxe.
+Mohammed Muqeeth, Haokun Liu, and Colin Raffel. Soft merging of experts with adaptive routing. Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL https://openreview.net/forum?id=7I1991c54z. Featured Certification.
+
+Ho Huu Nghia Nguyen, Tan Nguyen, Huyen Vo, Stanley Osher, and Thieu Vo. Improving neural ordinary differential equations with nesterov's accelerated gradient method. Advances in Neural Information Processing Systems, 35:7712-7726, 2022a.
+Tan Nguyen, Richard Baraniuk, Andrea Bertozzi, Stanley Osher, and Bao Wang. Momentumrnn: Integrating momentum into recurrent neural networks. Advances in neural information processing systems, 33: 1924-1936, 2020.
+Tan Nguyen, Minh Pham, Tam Nguyen, Khai Nguyen, Stanley Osher, and Nhat Ho. Fourierformer: Transformer meets generalized fourier integral theorem. Advances in Neural Information Processing Systems, 35:29319-29335, 2022b.
+Stefan Nielsen, Rachel Teo, Laziz Abdullaev, and Tan Minh Nguyen. Tight clusters make specialized experts. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=Pu3c0209cx.
+Eunbyung Park and Junier B Oliva. Meta-curvature. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. URL https://proceedings.neurips.cc/paper_files/paper/2019/file/57c0531e13f40b91b3b0f1a30b529a1d-Paper.pdf.
+Boris T Polyak. Some methods of speeding up the convergence of iteration methods. Ussr computational mathematics and mathematical physics, 4(5):1-17, 1964.
+Quora. Quora question pairs, 2017. https://quoradata.quora.com/First-Quora-Dataset-Release-Question-Pairs.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI Blog, 1(8):9, 2019.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. arXiv preprint arXiv:1910.10683, 2020.
+Samyam Rajbhandari, Conglong Li, Zhewei Yao, Minjia Zhang, Reza Yazdani Aminabadi, Ammar Ahmad Awan, Jeff Rasley, and Yuxiong He. Deepspeed-moe: Advancing mixture-of-experts inference and training to power next-generation ai scale. arXiv preprint arXiv:2201.05596, 2022.
+Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 2383-2392, Austin, Texas, 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1264. URL https://aclanthology.org/D16-1264.
+Alexandre Rame, Kartik Ahuja, Jianyu Zhang, Matthieu Cord, Léon Bottou, and David Lopez-Paz. Model ratatouille: Recycling diverse models for out-of-distribution generalization. arXiv preprint arXiv:2212.10445, 2023.
+Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. arXiv preprint arXiv:1701.06538, 2017.
+Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631-1642, 2013.
+Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In International conference on machine learning, pp. 1139-1147. PMLR, 2013.
+Rachel Teo and Tan Minh Nguyen. MomentumSMoe: Integrating momentum into sparse mixture of experts. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=y929esCZNJ.
+
+Rachel Teo and Tan Minh Nguyen. MoLEx: Mixture of layer experts for fine-tuning with sparse upcycling. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=rWui9vLhOc.
+Tran Anh Tuan, Nguyen Viet Dung, and Tran Ngoc Thang. A hyper-transformer model for controllable pareto front learning with split feasibility constraints. *Neural Networks*, 179:106571, 2024. ISSN 0893-6080. doi: https://doi.org/10.1016/j.neunet.2024.106571.
+Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R. Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461, 2019.
+Bao Wang, Hedi Xia, Tan Nguyen, and Stanley Osher. How does momentum benefit deep neural networks architecture design? a few case studies. Research in the Mathematical Sciences, 9(3):57, 2022.
+Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. Neural network acceptability judgments. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence, pp. 6732-6739, 2019.
+Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Ed Chi, Quoc Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. arXiv preprint arXiv:2201.11903, 2022.
+Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1112–1122, 2018.
+Jialin Wu, Xia Hu, Yaqing Wang, Bo Pang, and Radu Soricut. Omni-smola: Boosting generalist multimodal models with soft mixture of low-rank experts. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 14205-14215, June 2024a.
+Xun Wu, Shaohan Huang, and Furu Wei. Mixture of loRA experts. In The Twelfth International Conference on Learning Representations, 2024b. URL https://openreview.net/forum?id=uWvKBCYh4S.
+Prateek Yadav, Derek Tam, Leshem Choshen, Colin Raffel, and Mohit Bansal. Resolving interference when merging models. In NeurIPS, New Orleans, USA, 2023. Proceedings of Machine Learning Research.
+Yi Yang, Wen-tau Yih, and Christopher Meek. WikiQA: A challenge dataset for open-domain question answering. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pp. 2013-2018, Lisbon, Portugal, 2015. Association for Computational Linguistics. doi: 10.18653/v1/D15-1237. URL https://aclanthology.org/D15-1237.
+Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. Xlnet: Generalized autoregressive pretraining for language understanding. Advances in neural information processing systems, 32, 2019.
+Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, and Yongbin Li. Language models are super mario: Absorbing abilities from homologous models as a free lunch. In *Forty-first International Conference on Machine Learning*, 2024.
+Zexuan Zhong, Mengzhou Xia, Danqi Chen, and Mike Lewis. Lory: Fully differentiable mixture-of-experts for autoregressive language model pre-training. In First Conference on Language Modeling, 2024. URL https://openreview.net/forum?id=LKEJPySnlt.
+Yanqi Zhou, Tao Lei, Hanxiao Liu, Nan Du, Yanping Huang, Vincent Y Zhao, Andrew M. Dai, Zhifeng Chen, Quoc V Le, and James Laudon. Mixture-of-experts with expert choice routing. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=jdJo1HIVinI.
+
+# Supplement to “CAMEx: Curvature-aware Merging of Experts”
+
+# Table of Contents
+
+# A Comprision of CAMEx and Fisher-based merging methods 16
+
+# B Additional Details on datasets 18
+
+B.1 Language Modeling on WikiText 18
+B.2 Text classification on GLUE benchmark 18
+B.3 Question-answering on SQuAD and WikiQA 18
+B.4 Image Classification on Imagenet 18
+B.5 Adversarial Examples and Out-of-distribution datasets 19
+
+# C Algorithm and implementation details 19
+
+C.1 Causal segmenting 19
+C.2 Some implementations 20
+
+# D More Experiment Details 20
+
+# E Derivation 21
+
+# F Step-by-step walkthrough for key equations of CAMEx 21
+
+F.1 Key equation for merging of CAMEx 21
+F.2 Key equation for merging in dynamic architecture 21
+F.3 Curvature update 22
+
+# G Student's t-test for experiments on GLUE dataset 22
+
+# H Additional Experiments 23
+
+H.1 Integrating CAMEx into Twin-Merging 23
+H.2 Experiments on Token-choice vs Expert-choice routing 24
+H.3 Longer training for Wikitext-103 pre-training 24
+H.4 More comprehensive ablation study on hyperparameters 25
+
+H.4.1 Ablation study on $\alpha$ 25
+H.4.2 Ablation study on number of experts 25
+
+H.5 Results on large backbone (Phi-3) 26
+
+# A COMPRISION OF CAMEX AND FISHER-BASED MERGING METHODS
+
+The pipeline comparison between CAMEx and Fisher-based merging methods is shown in Figure 6. Both approaches aim to capture the curvature of the parameter space during the merging process. (Diagonal) Fisher Merging (Matena & Raffel, 2022) applies a diagonal approximation to the Fisher information matrix. In this work, they estimate the diagonal of the Fisher matrix as:
+
+$$
+\mathbf {F} = \underset {\mathbf {x} \sim \mathbf {D} _ {\mathrm {m}}} {\mathbb {E}} \left[ \underset {\mathbf {y} \sim \mathbf {p} _ {\theta} (\mathbf {y} | \mathbf {x})} {\mathbb {E}} \left[ \nabla_ {\theta} \log \mathbf {p} _ {\theta} (\mathbf {y} | \mathbf {x}) \nabla_ {\theta} \log \mathbf {p} _ {\theta} (\mathbf {y} | \mathbf {x}) ^ {\top} \right] \right], \tag {10}
+$$
+
+
+a) CAMEx
+
+
+b) Fisher Merging
+Figure 6: CAMEx merging pipeline vs Fisher-based merging pipeline. Note that Fisher merging requires the storing of the $\nabla_{E_i}\log p_{E_i}(y|x)$ for all experts and all $x$ in training dataset. Furthermore, it has been pointed out that Fisher merging will have poor performance while using fewer examples to estimate the Fisher.
+
+The expectation over $y$ can be estimated via sampling from $p_{\theta}(y|x_i)$ or computed exactly when the number of classes is small. The closed-form solution for Fisher merging (without necessarily applying the diagonal approximation) is given by:
+
+$$
+\hat {\mathbf {E}} _ {\mathbf {m}} ^ {\mathrm {l}} = \left(\sum_ {\mathbf {m} = 1} ^ {\mathrm {M}} \mathbf {F} _ {\mathbf {m}} ^ {\mathrm {l}}\right) ^ {- 1} \left(\sum_ {\mathrm {i} = 1} ^ {\mathrm {N}} \mathbf {F} _ {\mathrm {i}} ^ {\mathrm {l}} \mathbf {E} _ {\mathrm {i}} ^ {\mathrm {l}}\right). \tag {11}
+$$
+
+Thus, to approximate the Fisher Information Matrix for SMOE models, Fisher merging requires storing $\nabla_{E_i}\log p_{E_i}(y|x)$ for all experts and all $x$ in the training dataset. Additionally, it has been noted that Fisher merging can suffer from poor performance when fewer examples are used to estimate the Fisher matrix (Matena & Raffel, 2022).
+
+In the case of our method (depicted in Figure 6a), by denoting $\mathbf{M}_i$ as the curvature matrix of the $i$ -th expert, CAMEx utilizes the formula for merging experts derived from the natural gradient descent update as:
+
+$$
+\hat {\mathbf {E}} _ {\mathbf {m}} ^ {\mathrm {l}} = \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {l}} + \alpha \sum_ {\mathrm {i} = 1} ^ {\mathrm {N} - 1} \mathbf {M} _ {\mathrm {i}} \cdot \left(\mathbf {s} _ {\mathrm {i}} ^ {\mathrm {l}} * \tau_ {\mathrm {i}} ^ {\mathrm {l}}\right) \quad (\text {C A - M e r g})
+$$
+
+CAMEx implicitly implements the gradient-based matching between the task loss gradient and domain-vector of the corresponding expert to approximate the empirical Fisher through the dynamic of gradient descend update of $\mathbf{M}_{\mathrm{i}}$ :
+
+$$
+\mathbf {M} _ {\mathbf {i}} ^ {\mathrm {t} + 1} = \mathbf {M} _ {\mathbf {i}} ^ {\mathrm {t}} - \beta * \frac {\partial \mathcal {L}}{\partial \mathbf {M} _ {\mathbf {i}} ^ {\mathrm {t}}} = \mathbf {M} _ {\mathbf {i}} ^ {\mathrm {t}} - \alpha \beta * \mathbf {s} _ {\mathbf {i}} ^ {\mathrm {t}} * \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {\mathbf {m}} ^ {\mathrm {t}}} \cdot \left(\mathbf {E} _ {\mathbf {i}} ^ {\mathrm {t}} - \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {t}}\right), \tag {12}
+$$
+
+where the term $\frac{\partial\mathcal{L}}{\partial\hat{\mathbf{E}}_{\mathbf{m}}}\cdot (\mathbf{E}_{\mathbf{i}} - \mathbf{E}_{\mathbf{m}})$ represents the outer product of the gradients of the task loss and the domain vectors. This operation contributes to capturing the curvature of the expert parameter space,
+
+ensuring curvature awareness during the merging process. This approach eliminates the need to compute the inversion of the empirical Fisher Information Matrix, thereby reducing computational overhead while maintaining sensitivity to parameter space curvature.
+
+# B ADDITIONAL DETAILS ON DATASETS
+
+This section provides detailed information on the datasets and evaluation metrics used in the experiments in Section 3.
+
+# B.1 LANGUAGE MODELING ON WIkIText
+
+The WikiText-103 dataset consists of Wikipedia articles designed to capture long-range contextual dependencies. The training set includes approximately 28,000 articles, totaling around 103 million words. The validation and test sets have 218,000 and 246,000 words, respectively, spread across 60 articles per set, with each set comprising roughly 268,000 words. Our experiments follow the standard procedure described in (Merit et al., 2017).
+
+WikiText-2 is a smaller version of WikiText-103, containing 2 million tokens and a vocabulary of 33,000 words.
+
+# B.2 TEXT CLASSIFICATION ON GLUE BENCHMARK
+
+These tasks include MNLI (Williams et al., 2018), which assesses a model's ability to determine entailment between pairs of sentences; QQP (Quora, 2017) and MRPC (Dolan & Brockett, 2005), which focus on identifying sentence similarity and paraphrase detection; SST-2 (Socher et al., 2013) for sentiment analysis; CoLA (Warstadt et al., 2019) for grammaticality judgment; and QNLI (Wang et al., 2019) for question-answer classification. Additionally, STSB (Cer et al., 2017) evaluates the model's ability to measure sentence similarity, while RTE (Dagan et al., 2006) tests logical reasoning.
+
+# B.3 QUESTION-ANSWERING ON SQUAD AND WIKIQA
+
+SQuADv1.1 (Rajpurkar et al., 2016) (Stanford Question Answering Dataset) is a widely used benchmark for reading comprehension and question answering tasks. It contains over 100,000 question-answer pairs sourced from more than 500 Wikipedia articles. Each question is paired with a paragraph from the article, where the answer is a span of text extracted from the passage. The dataset consists of natural language questions that cover a wide range of topics, context paragraphs from Wikipedia, and answers marked by their start and end positions within the context. The primary task is to extract the correct answer span based on the posed question. Key features of the dataset include the need for exact span extraction, the large dataset size, and its task design focused on reading comprehension. Evaluation is typically done using Exact Match (EM), which measures the percentage of predictions that exactly match the ground-truth answers, and the F1 score, which measures the overlap between predicted and ground-truth answers by calculating the harmonic mean of precision and recall.
+
+WikiQA (Yang et al., 2015) is an open-domain question answering dataset designed for answer sentence selection tasks. It consists of natural language questions primarily extracted from search engine queries, with candidate sentences sourced from Wikipedia articles. Each candidate sentence is labeled as either a correct or incorrect answer for the given question. The dataset contains 3,047 questions and 29,258 candidate sentences. The main challenge is selecting the correct sentence from a set of candidates, unlike SQuADv1.1, where the task focuses on extracting a text span. Key features include its real-world query origins, the sentence selection task, and the open-domain nature, which requires models to identify relevant sentences from diverse topics. WikiQA is evaluated using Accuracy.
+
+# B.4 IMAGE CLASSIFICATION ON IMAGENET
+
+ImageNet-1k, the most widely utilized subset of the ImageNet dataset introduced by (Deng et al., 2009), comprises 1.28 million images for training and 50,000 images for validation, across 1,000 categories. Performance evaluation is typically based on top-1 and top-5 accuracy metrics.
+
+Algorithm 1 The Overall Procedures of CAMEx.
+1: Initialize: A model $\mathcal{M}$ with $l$ SMOE layers, the total number of original experts $N$ .
+2: Let $\mathsf{H}^t \in \mathbb{R}^{B \times L \times N}$ and $\mathsf{T}^t \in \mathbb{R}^{B \times L \times d}$ denote the router logits and the sequence of tokens at intermediate layer $t$ , respectively.
+3: for layer $t = 1, \dots, l$ do
+4: $K = L / S, T^l \gets \text{RESHAPE}(T, B * K, S, d)$
+5: $\mathsf{H}^l \gets \mathbf{G}(T^l)$
+6: $\mathsf{H}^l \gets \text{ROLLandDETACH}(\mathsf{H}^l)$
+7: if TIES-MERGING then
+8: for expert $i = 1, \dots, N - 1$ do
+9: $\tau_i \gets \mathbf{E}_i - \mathbf{E}_m$
+10: $\gamma_i \gets sgn(\tau_i)$
+11: end for
+12: $\gamma^m = sgn(\sum_{i=1}^{N-1} \tau_i)$
+13: for expert $i = 1, \dots, N - 1$ do
+14: $\tau_i^m \gets \gamma_i \wedge \gamma^m$
+15: $\tau_i \gets \tau_i \cdot \mathbf{M}_i$
+16: end for
+17: else
+18: Generate mask for DARE-MERGING
+19: end if
+20: $\mathbf{E}_m \gets \mathbf{E}_m + \gamma_m * \sum_{i=1}^{N-1} H_i^l * \tau_i$
+Merge Experts
+
+# B.5 ADVERSARIAL EXAMPLES AND OUT-OF-DISTRIBUTION DATASETS
+
+ImageNet-A: The ImageNet-A dataset (Hendrycks et al., 2021b) contains real-world images specifically curated to fool ImageNet classifiers. It focuses on 200 classes, a subset of the 1,000 classes in ImageNet-1k. Errors made within these 200 classes are considered particularly significant, as they represent a wide variety of categories from ImageNet-1k.
+
+ImageNet-O: This dataset consists of examples adversarially filtered to challenge out-of-distribution (OOD) detectors on ImageNet (Hendrycks et al., 2021b). It includes images from the larger ImageNet-22k dataset but excludes those present in ImageNet-1k. The selected samples are those that a ResNet-50 model confidently misclassifies as an ImageNet-1k class, and the primary evaluation metric is the area under the precision-recall curve (AUPR).
+
+ImageNet-R: ImageNet-R contains a variety of artistic renditions of object classes found in the original ImageNet dataset (Hendrycks et al., 2021a). This dataset includes 30,000 artistic representations of images from 200 classes, selected from the ImageNet-1k subset. The dataset was created to challenge models with non-standard visual interpretations of the classes.
+
+# C ALGORITHM AND IMPLEMENTATION DETAILS
+
+# C.1 CAUSAL SEGMENTING
+
+Background of Causal Segmenting: A significant advancement in SMOE design centers on fully differentiable architectures that eliminate the need for additional loss terms to stabilize training. In (Muqeeth et al., 2024), a model was introduced that computes a weighted average of expert feed-forward networks (FFNs). For an input $x$ with corresponding routing weights, the output is defined as:
+
+$$
+o _ {x} = \operatorname {F F N} \left(h _ {x}; \sum_ {i = 1} ^ {N} s _ {i} \cdot \mathbf {E} _ {i}\right), \quad \text {w h e r e} \quad s _ {i} = \operatorname {S o f t m a x} \left(\mathbf {G} \left(h _ {x}\right)\right) _ {i}.
+$$
+
+However, applying this approach to autoregressive language models is computationally costly, as the merged FFN must be computed for each token in the sequence, leading to costs that scale linearly with the number of experts. An alternative based on pooling—routing via the sequence's average representation, as
+
+follows:
+
+$$
+s _ {i} = \operatorname {S o f t m a x} \left(\mathbf {G} \left(\frac {\sum_ {j = 1} ^ {L} h _ {x _ {j}}}{L}\right)\right) _ {i}.
+$$
+
+This, however, disrupts the autoregressive property essential for pre-training. To address this, (Zhong et al., 2024) introduced causal segment routing. This technique merges FFNs in an MoE layer by utilizing information from the preceding segment to process the current segment. Specifically, given a training instance $X$ consisting of $L$ tokens (e.g., $L = 4096$ ), we divide the instance into $N$ segments, each containing $T$ (e.g., $T = 256$ ) consecutive tokens. For the $k$ -th segment $S_{k}$ , where $k > 1$ , we compute the average of the hidden representations from the previous segment $S_{k-1}$ , denoted as $\bar{h}_{k-1}$ . By using the average hidden representation, the model can adapt to prompts of varying lengths during inference. The average hidden representation $\bar{h}_{k-1}$ is then employed to determine the routing weights, leading to a merged expert $\bar{\mathbf{E}}$ :
+
+$$
+\bar {h} _ {k - 1} = \frac {1}{T} \sum_ {x \in S _ {k - 1}} h _ {x}, \quad s _ {i} = \operatorname {S o f t m a x} \left(\mathbf {G} \left(\bar {h} _ {k - 1}\right)\right), \quad \bar {\mathbf {E}} = \sum_ {i} s _ {i} \cdot \mathbf {E} _ {\mathbf {i}}. \tag {13}
+$$
+
+The merged expert $\bar{\mathbf{E}}$ is then used to process all tokens in the current segment $S_{k}$ , i.e., $o_{x} = \mathrm{FFN}(h_{x};\bar{\mathbf{E}}), \forall x \in S_{k}$ . This approach ensures that the model's routing decisions rely exclusively on data from preceding positions. For the first segment $S_{1}$ , the segment's own representation is used to compute the merging weights for its FFN. To prevent information leakage, a stop-gradient operation is applied to $\mathbf{G}(\bar{h}_1)$ :
+
+$$
+\bar {h} _ {0} = \frac {1}{T} \sum_ {x \in S _ {0}} ^ {T} h _ {x} \tag {14}
+$$
+
+These tokens are then used to calculate the scores for the merging procedure
+
+$$
+s _ {0} = \operatorname {D E T A C H} \left(\mathbf {G} \left(\bar {h} _ {1}, k\right)\right) \quad (\text {R O L L a n d D E T A C H})
+$$
+
+$$
+s _ {i} = \mathbf {G} (\bar {h} _ {i - 1}), \quad i = 1, \dots , S - 1
+$$
+
+# C.2 SOME IMPLEMENTATIONS
+
+Implementation of Kronecker product We consider the case where experts are linear layers
+```txt
+# Calculating domain-specific vectors
+taus = weights - weight_m
+# output_size = dim_out1 * dim_out2, input_size = dim_in1 * dim_in2
+taus = taus.view(1, -1, dim_out1, dim_out2, dim_in1, dim_in2).repeat(rank, 1, 1, 1, 1, 1)
+# Calculate Kronecker-product
+taus = torch.einsum("rbij, rbjklm->rbiklm", curvel_out, taus)
+taus = torch.einsum("rbik, rbjklm->rbjilm", curve2_out, taus)
+taus = torch.einsum("rbil, rbjklm->rbjkim", curvel_in, taus)
+taus = torch.einsum("rbim, rbjklm->rbjkli", curve2_in, taus)
+# Summation along the Kronecker rank dimension and reshape
+taus = taus.sum(0)
+taus = taus.reshape(-1, output_size, input_size)
+```
+
+# D MORE EXPERIMENT DETAILS
+
+Supervised Fine-Tuning Hyper-Parameters Besides {batch size, learning rate, epoch counts} which vary for each task, we keep other hyper-parameters of supervised fine-tuning fixed for all tasks. These are shown in Table 8.
+
+Table 8: Fine-tuning hyper-parameters of all models in Section 3
+
+
Hyper-Parameters
Values
Optimizer
ADAMW
Adam ε
1e-6
Adam β
(0.9, 0.98)
Warm-up steps
16
Weight decay
0.01
LR scheduler
LINEAR DECAY
Scaling factor α
1
Kronecker rank r
1
+
+# E DERIVATION
+
+This is the derivation for Eqn 8 in Section 2.6
+
+$$
+\begin{array}{l} \hat {\mathbf {E}} _ {m} = \mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} \mathbf {M} _ {j} ^ {t + 1} \cdot \left(s _ {j} ^ {t + 1} * \tau_ {j} ^ {t + 1}\right) (15) \\ = \mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} \left[ \mathbf {M} _ {j} ^ {t} - \alpha \beta * s _ {j} ^ {t} * \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m} ^ {t}} \cdot \tau_ {j} ^ {t} \right] \cdot \left(s _ {j} ^ {t + 1} * \tau_ {j} ^ {t + 1}\right) (16) \\ = \underbrace {\mathbf {E} _ {m} + \alpha \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t + 1} * \mathbf {M} _ {j} ^ {t} \cdot \tau_ {j} ^ {t + 1}} _ {\text {d o m a i n - s p e c i f i c m e r g i n g w i t h c u r v a t u r e - a w a r e}} - \alpha^ {2} \beta \sum_ {j = 1} ^ {N - 1} s _ {j} ^ {t} s _ {j} ^ {t + 1} * \left(\tau_ {j} ^ {t ^ {\top}} \cdot \tau_ {j} ^ {t + 1}\right) \cdot \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {m} ^ {t}} (17) \\ \end{array}
+$$
+
+# F STEP-BY-STEP WALKTHROUGH FOR KEY EQUATIONS OF CAMEX
+
+F.1 KEY EQUATION FOR MERGING OF CAMEX
+
+$$
+\hat {\mathbf {E}} _ {\mathbf {m}} ^ {\mathrm {l}} = \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {l}} + \alpha \sum_ {\mathrm {i} = 1} ^ {\mathrm {N} - 1} \mathbf {M} _ {\mathrm {i}} \cdot \left(\mathbf {s} _ {\mathrm {i}} ^ {\mathrm {l}} * \tau_ {\mathrm {i}} ^ {\mathrm {l}}\right) \quad (\text {C A - M e r g})
+$$
+
+In (CA-Merg) equation, we consider the merging of experts at $l$ -th layer of the model. $\mathbf{E}_{\mathbf{m}}^{1}$ denotes the "base" expert that is not included in the routing process. $\tau_{i}^{l} = \mathbf{E}_{\mathbf{i}}^{1} - \mathbf{E}_{\mathbf{m}}^{1}$ denotes $i$ -th the domain-vector that adapts the "base" expert to the corresponding domain. Finally, $s_i^l$ denotes the score of the $i$ -th domain vector w.r.t the input. We view the merging of experts as a optimization problem where $\alpha * s_i^l$ acts as the adaptive learning rate. Therefore, it is straightforward to integrate natural gradient approach into this equation by introducing curvature matrices $\mathbf{M}_{\mathrm{i}}$ . Due to the challenging tractability of the Fisher Matrix in the intermediate layers of deep models, we proposed to learn them empirically through backpropagation as indicated by Eqn. 6 in the main text and a similar approach using meta-learning (Park & Oliva, 2019).
+
+F.2 KEY EQUATION FOR MERGING IN DYNAMIC ARCHITECTURE
+
+$$
+\left\{ \begin{array}{l l} \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {l + 1}} & = \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {l}} + \frac {\alpha}{\mathbf {N} - \mathbf {1}} \sum_ {\mathrm {i} = 1} ^ {\mathrm {N} - 1} \mathbf {M} _ {\mathrm {i}} \cdot \tau_ {\mathrm {i}} ^ {\mathrm {l}} \\ \hat {\mathbf {E}} _ {\mathbf {m}} ^ {\mathrm {l + 1}} & = \mathbf {E} _ {\mathbf {m}} ^ {\mathrm {l + 1}} + \alpha \sum_ {\mathrm {i} = 1} ^ {\mathrm {N} - 1} \mathbf {M} _ {\mathrm {i}} \cdot \left(\mathbf {s} _ {\mathrm {i}} ^ {\mathrm {l + 1}} * \tau_ {\mathrm {i}} ^ {\mathrm {l + 1}}\right) \end{array} \right. \tag {Dynamic-Merg}
+$$
+
+The (Dynamic-Merg) system performs two steps which are calculating base expert for the next layer and performing (CA-Merge), respectively. For the first step, we eliminate the score and take the average of curvature-aware domain vector instead to avoid information leakage. The result then takes the role as the base expert for the next layer.
+
+# F.3 CURVATURE UPDATE
+
+In the main text, we try to give an explanation of how our method we update the curvature matrix with the curvature information of the parameters space. To achieve that, we first take the derivative of equation (CA-Merge) w.r.t the curvature matrix $\mathbf{M}_1$ :
+
+$$
+\frac {\partial \hat {\mathbf {E}} _ {\mathbf {m}}}{\partial \mathbf {M} _ {\mathbf {j}}} = (\alpha s _ {j} * \tau_ {j}) = \alpha s _ {j} * \left(\mathbf {E} _ {\mathbf {j}} - \mathbf {E} _ {\mathbf {m}}\right) \tag {18}
+$$
+
+To evaluate the gradient of the task loss $\mathcal{L}$ w.r.t $\mathbf{M}_{\mathrm{i}}$ we apply the chain-rule:
+
+$$
+\frac {\partial \mathcal {L}}{\partial \mathbf {M} _ {\mathbf {j}}} = \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {\mathbf {m}}} \cdot \frac {\partial \hat {\mathbf {E}} _ {\mathbf {m}}}{\partial \mathbf {M} _ {\mathbf {j}}} = \alpha s _ {j} * \frac {\partial \mathcal {L}}{\partial \hat {\mathbf {E}} _ {\mathbf {m}}} \cdot (\mathbf {E} _ {\mathbf {j}} - \mathbf {E} _ {\mathbf {m}}) \tag {19}
+$$
+
+# G STUDENT'S T-TEST FOR EXPERIMENTS ON GLUE DATASET
+
+We report the t-test results, beginning with the null hypothesis $H_0$ : The performance between each pair of T5-Ties-CA vs T5-Ties, and T5 on GLUE SST-2, MRPC, CoLA, and MNLI are the same.. In this test, we choose the significant value to be 0.05.
+
+Table 9: Evaluation results on SST-2 with different random seeds.
+
+
Index
Ties_CA
Ties
Vanilla
1
94.44
93.77
93.31
2
94.86
94.13
93.33
3
94.62
93.90
93.21
4
94.60
94.12
93.46
5
94.54
93.70
93.41
6
94.55
93.87
93.56
7
94.37
94.03
93.67
+
+Table 10: T-statistic and p-value when evaluating on SST-2.
+
+
Test
t-statistic
p-value
Ties-CA vs Vanilla
13.72
1.08e-8
Ties-CA vs Ties
7.36
8.74e-6
+
+Table 11: Evaluation results on MRPC with different random seeds.
+
+
Index
Ties_CA
Ties
Vanilla
1
92.35
91.35
89.85
2
92.61
91.30
89.65
3
92.55
91.40
89.74
4
92.40
91.55
89.49
5
92.54
91.62
89.76
6
92.44
91.77
89.85
7
92.33
91.43
89.62
+
+Table 12: T-statistic and p-value when evaluating on MRPC.
+
+
Test
t-statistic
p-value
Ties-CA vs Vanilla
42.91
1.67e-14
Ties-CA vs Ties
12.95
2.06e-8
+
+Table 13: Evaluation results on CoLA with different random seeds.
+
+
Index
Ties_CA
Ties
Vanilla
1
61.01
57.95
57.74
2
59.53
58.63
57.82
3
60.36
58.90
58.03
4
60.13
58.92
58.23
5
59.41
58.31
58.51
6
59.33
57.38
57.36
7
60.03
58.53
58.40
+
+Table 14: T-statistic and p-value when evaluating on CoLA.
+
+
Test
t-statistic
p-value
Ties-CA vs Vanilla
7.14
1.18e-5
Ties-CA vs Ties
5.16
2.00e-4
+
+Table 15: Evaluation results on MNLI with different random seeds.
+
+
Index
Ties_CA
Ties
Vanilla
1
86.52
86.25
86.22
2
86.45
86.32
86.31
3
86.37
86.39
86.36
4
86.59
86.46
86.41
5
86.32
86.53
86.50
6
86.54
86.38
86.34
7
86.47
86.41
86.34
+
+Table 16: T-statistic and p-value when evaluating on MNLI.
+
+
Test
t-statistic
p-value
Ties-CA vs Vanilla
2.29
0.04
Ties-CA vs Ties
1.49
0.16
+
+Based on the p-values in the tables above, we draw the following conclusions:
+
+- The T5-Ties-CA variant significantly outperforms T5-Ties and T5-Vanilla on SST-2, MRPC, and CoLA.
+- While T5-Ties-CA does not statistically significantly outperform T5-Ties on MNLI, it still demonstrates significant improvement over T5-Vanilla.
+
+# H ADDITIONAL EXPERIMENTS
+
+# H.1 INTEGRATING CAMEX INTO TWIN-MERGING
+
+We expand our experiments to include a broader range of most recent merging expert methods. Specifically, we integrated our CAMEx method with the Twin-Merging approach (Lu et al., 2024b). Key distinctions between CAMEx and Twin-Merging lie in their core mechanisms:
+
+- Our method is a non-Euclidean merging method, which utilizes the curvature-aware matrix, whereas Twin-Merging is a model merging method, which relies on Euclidean merging.
+- Our approach is specifically designed for finetuning, in contrast to Twin-Merging, which is intended for post-training.
+
+- Finally, our dynamic mechanism performs inter-layer to form the merged expert, unlike Twin-Merging, which uses within-layer pre-calculations for merging. To integrate our method with Twin-Merging, we first fine-tune the Curvature Aware model for a specific GLUE task. At test time, we apply the Twin-Merging algorithm to merge experts, referring to our approach as Twin-CA. Notably, we found Twin-Merging to be a simple yet powerful technique that is easy to implement and helps reduce memory usage during inference. We adhere to the original implementation settings, using a sparsity density value of 0.2.
+
+Table 17: Performance of Twin-Merging and its Curvature Aware (CA) variant on GLUE tasks.
+
+
Method
MRPC
RTE
STSB
Twin-Merging
91.97
72.20
88.56
Twin-CA (Ours)
92.30
74.73
89.55
+
+The results in Table 17 demonstrate the effectiveness of our CAMEx approach when integrated with the Twin-Merging mechanism on GLUE tasks, highlighting its strong potential for incorporation into more advanced merging techniques.
+
+# H.2 EXPERIMENTS ONTOKEN-CHOICE VS EXPERT-CHOICE ROUTING
+
+We also demonstrate our merging approach with the following routing mechanisms. We compare the baseline performance (i.e., the ties merging expert without Curvature Aware) under different routing mechanisms with the corresponding Curvature-Aware counterparts to see how different routing functions affect CAMEx performance. It is worth noting that Expert Choice routing is not compatible with the experts merging method, as discussed by Lory (Zhong et al., 2024) in their Subsection 5.3.:
+
+- Stable MoE routing (Dai et al., 2022).
+- Naive routing (Shazeer et al., 2017).
+X-MoE routing (Chi et al., 2022).
+
+Note that the Curvature Aware model leverages the segment routing strategy (the causal segmenting strategy) proposed in Lory (Zhong et al., 2024), enabling a direct comparison between our model and the expert choice method. The results in Table 18 suggest that Curvature-Aware merging benefit from more advanced routing strategies. The CA model consistently outperforms the baseline with Ties merging across all routing mechanisms. Additionally, we observe that both Naive routing CA and X-MoE routing CA deliver robust performance across GLUE tasks, while Stable MoE routing CA emerges as the most reliable choice overall.
+
+Table 18: Performance of T5-base variants on the finetuning GLUE tasks
+
+
Method
MRPC
RTE
STSB
SST-2
Expert Choice MoE
93.10
66.78
89.19
93.80
Stable MoE routing Ties
91.92
75.48
89.48
93.37
Stable MoE routing CA
92.96
78.76
89.64
94.63
Naive routing Ties
91.44
75.54
88.58
93.92
Naive routing CA
92.49
78.70
89.56
94.61
X-MoE routing Ties
91.99
75.29
88.42
93.26
X-MoE routing CA
92.79
78.20
89.26
94.38
+
+# H.3 LONGER TRAINING FOR WIKTEXT-103 PRE-TRAINING
+
+We conduct additional experiments by training for longer iterations on the Wikitext-103 dataset. The performance gaps between methods remain stable starting around epoch 40.
+
+As shown in Figure 7 the trends demonstrate consistent improvements of our method over the baseline, with the gap remaining significant even after prolonged training.
+
+
+Figure 7: Performance of Vannila, Domain-specific, Domain-specific-CA under longer pre-training.
+
+# H.4 MORE COMPREHENSIVE ABLATION STUDY ON HYPERPARAMETERS
+
+# H.4.1 ABLATION STUDY ON $\alpha$
+
+We extend the range of $\alpha$ for the ablation study, specifically evaluating Dare-CA and Ties-CA with $\alpha \in [0.1, 1.6]$ . The evaluation is conducted using 5 different seeds, and the results are averaged.
+
+
+Figure 8: Test performance of Curvature-Aware methods under varying settings of $\alpha$ .
+
+
+
+
+
+The results in Figure 8 lead to the following observations:
+
+- The performance of the models is suboptimal or even worse than the vanilla baseline when $\alpha$ is either too small ( $\alpha \in [0.1, 0.4]$ ) or too large ( $\alpha > 1.1$ ).
+- Dare-CA is more sensitive to the choice of $\alpha$ , showing sharper improvements and declines across the range.
+- Ties-CA exhibits more gradual changes, suggesting it is more robust to variations in $\alpha$ . The optimal range for $\alpha$ is [0.8,1.0].
+
+# H.4.2 ABLATION STUDY ON NUMBER OF EXPERTS
+
+We conduct additional studies on our method using different numbers of experts in the T5 backbone.
+
+The following conclusions can be drawn from Figures 9:
+
+- Increasing the number of experts generally improves accuracy up to a certain point: Accuracy improves as the number of experts increases, with the most significant gains occurring from 4 to 8 experts.
+
+
+Figure 9: Test performance of Curvature-Aware methods under varying number of experts.
+
+
+
+
+
+- After 12 experts, the accuracy either saturates or slightly decreases.
+- We suggest using eight experts, as it provides a balanced trade-off between performance and efficiency.
+
+# H.5 RESULTS ON LARGE BACKBONE (PHI-3)
+
+To evaluate the effectiveness of CAMEx with large backbone, we experiment with Phi-3.
+
+Table 19: Performance of Phi-3-mini variants on the fine-tuning tasks for the GLUE benchmark.
+
+
Model
Params
SST-2
MRPC
CoLA
STSB
RTE
QQP
QNLI
MNLI
Phi-3
3.8B
95.76
90.12
61.36
88.7
80.51
92.38
94.84
90.39
Phi3-Ties
7.4B
96.56
92.25
62.33
89.99
87.73
94.13
95.58
91.28
Phi3-Ties-CA
7.4B
97.23
94.04
63.43
90.27
88.09
94.80
95.82
92.13
+
+- The Ties-CA and Ties variants remarkably outperform the vanilla version, creating a substantial performance gap.
+- Ties-CA further enhances the performance of Ties in all listed tasks.
+
+Thus, we believe that curvature awareness has potential for improving other language models (LMs).
\ No newline at end of file
diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/images.zip b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..4b2be959e119303560e6f5911cdd8c628eff2ce2
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c4aa3e15f4902c87cc3f976cc7c7e11b250cbaffb23316818f169e5f654af43d
+size 998182
diff --git a/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/layout.json b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..5108df23c8e8444587b05a8f3ba4640aab182891
--- /dev/null
+++ b/ICLR/2025/CAMEx_ Curvature-aware Merging of Experts/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1aca9848fd8e26a442ae9584df7cb27b59bca069f8abdaff68fcaeed9bfadcc9
+size 781254
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_content_list.json b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..69a48c6afb2b58054488fa0e8d00156f1970d0a4
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7d14c2f6530b041c5d960552548a10ce237f7e05fb5714de26454706c9428fef
+size 92501
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_model.json b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..ff684a24ae66bd6770ddb6be4f1c085320f105a5
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:196ecd963a4857bae09bcc14f2647ff8c00fbaff94687cb48b5b11ff2f1ffe00
+size 110269
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_origin.pdf b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..91600d79d6b1cfa54e5e61163e798e1bfbbacece
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/179a5cdb-2697-4146-afa4-4ac0998de6e7_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6ff7ef0832edf9387b23d19f9c4c063f932cbac3f2cb4fb75365378ccb874cb
+size 1758381
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/full.md b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..3f9c8c6afa360c6a286816de9e348054cb587568
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/full.md
@@ -0,0 +1,398 @@
+# CARTS: ADVANCING NEURAL THEOREM PROVING WITH DIVERSIFIED TACTIC CALIBRATION AND BIAS-RESISTANT TREE SEARCH
+
+Xiao-Wen Yang $^{1,2}$ , Zhi Zhou $^{1}$ , Haiming Wang $^{3,5}$ , Aoxue Li $^{4}$ , Wen-Da Wei $^{1,2}$ , Hui Jin $^{4}$ , Zhenguo Li $^{4}$ , Yu-Feng Li $^{1,2*}$
+
+$^{1}$ National Key Laboratory for Novel Software Technology, Nanjing University
+
+$^{2}$ School of Artificial Intelligence, Nanjing University
+
+$^{3}$ Sun Yat-sen University $^{4}$ Noah's Ark Lab, Huawei $^{5}$ Moonshot AI
+
+# ABSTRACT
+
+Recent advancements in neural theorem proving integrate large language models with tree search algorithms like Monte Carlo Tree Search (MCTS), where the language model suggests tactics and the tree search finds the complete proof path. However, many tactics proposed by the language model converge to semantically or strategically similar, reducing diversity and increasing search costs by expanding redundant proof paths. This issue exacerbates as computation scales and more tactics are explored per state. Furthermore, the trained value function suffers from false negatives, label imbalance, and domain gaps due to biased data construction. To address these challenges, we propose CARTS (diversified tactic CALibration and bias-Resistant Tree Search), which balances tactic diversity and importance while calibrating model confidence. CARTS also introduce preference modeling and an adjustment term related to the ratio of valid tactics to improve the bias-resistance of the value function. Experimental results demonstrate that CARTS consistently outperforms previous methods achieving a pass@1 rate of $49.6\%$ on the miniF2F-test benchmark. Further analysis confirms that CARTS improves tactic diversity and leads to a more balanced tree search. The code for our implementation is available at https://github.com/njuyxw/CARTS.
+
+# 1 INTRODUCTION
+
+Automated theorem proving (ATP) (Harrison et al., 2014) is an essential task of artificial intelligence (AI) with significant challenge. Recently, the development of large language models has brought new vitality and advancements to this field (Han et al., 2022; Jiang et al., 2023; Xin et al., 2024a). For example, AlphaProof (Deepmind, 2024; Trinh et al., 2024) solved four out of six problems from International Mathematical Olympiad (IMO), achieving the same level as a silver medalist in the competition. These advancements stem from the integration of language models and formal theorem proving systems (such as Lean (Moura & Ullrich, 2021) or Isabella (Paulson, 1994)), which model the theorem proving task as a Markov Decision Process (MDP) (Polu & Sutskever, 2020). The language model functions as a policy network that provides heuristic proof tactics, while tree search methods are utilized to explore correct sequence of steps that maximize the reward.
+
+Although the improvements of language models (Xin et al., 2024a) can significantly improve the performance of theorem proving, efficient tree search methods remains crucial for theorems with long and complex proof steps. Existing search techniques (Polu & Sutskever, 2020; Wang et al., 2023; Xin et al., 2024a) primarily rely on Best First Search (BFS) or Monte Carlo Tree Search (MCTS) (Kocsis & Szepesvári, 2006). While these methods can achieve impressive performance, they have two significant drawbacks. Firstly, the output sampling of auto-regressive language models frequently exhibits significant redundancy, often producing similar tactics. Although the language model generates a substantial number of tactics that differ at the character level, they share the same underlying semantics. For instance, both 'intro h' and 'intro H' can be generated
+
+
+Figure 1: Overall Framework. Diversified tactic calibration can calibrate the model confidence and enhance the diversity of candidate tactics, thus mitigating ineffective exploration. The bias-resistant value function can adapt to the test data, provide more accurate scores for evaluating tactics, thus improving the efficiency of utilization.
+
+by the language model; however, they convey the same meaning in Lean4, as they both introduce a hypothesis into the proving context. This redundancy can also lead to an imbalance in the number of high-level proof strategies. For example, most of the tactics generated by the language model may focus on the strategy of proof by contradiction, while there are relatively few tactics involving mathematical induction. These will result in a huge amount of ineffective exploration during the tree search process, thus increasing search costs. This issue worsens as computation scales and more tactics are explored per state. Secondly, the construction of value function training data often relies on existing policy models to generate negative samples and thus introducing bias. On one hand, this construction may produce a substantial number of negative samples, potentially far exceeding the positive ones. This could result in label imbalance, causing the cross-entropy loss used in training the value function to easily converge to local optima. On the other hand, the samples generated by the policy model may contain false negatives, introducing noise into the dataset. Additionally, the domain gap between the training dataset (e.g., Mathlib) and the test dataset (e.g., IMO problems) exacerbates the bias of the value function during the inference stage. This leads to inaccurate evaluations of the current proof state's value, hindering effective exploitation during the tree search process. Overall, these two issues prevent existing tree search techniques from efficient exploration and effective exploitation, resulting in sub-optimal search performance.
+
+In order to solve these challenges, we propose diversified tactic CAlibration and bias-Resistant Tree Search (CARTS). Diversified tactic calibration involves reordering and rescoring multiple candidate tactics generated by a language model's sampling output. This approach balances importance and diversity, thereby enhancing exploration efficiency. We use the Maximal Marginal Relevance (MMR) algorithm (Peng et al., 2005) to achieve this, which is a classical method in the field of information retrieval. Meanwhile, we propose a bias-resistant value function. During the training stage, preference modeling is employed to construct the training dataset, and the Bradley-Terry model (Bradley & Terry, 1952) is utilized to train the value network. This approach addresses the issue of data imbalance and false negatives. During the inference stage, we introduce an adjustment term related to the ratio of valid tactics into the value function to mitigate the domain gap between the training and test dataset. This stems from a insight that if the number of valid tactics is limited, concerns
+
+may arise regarding the effectiveness of the current policy model, necessitating a reduced value for the current action. Bias-resistant value function can enhance the effectiveness of exploitation during the search process. The complete framework of CARTS is shown in Figure 1. We conducted sufficient experiments on the widely recognized theorem-proving benchmarks, namely miniF2F (Zheng et al., 2022) and ProofNet (Azerbayev et al., 2023) in Lean. Our proposed CARTS demonstrates superior performances compared to all other search methods when the policy network remains unchanged. We achieved a pass@1 success rate of $49.6\%$ on the miniF2F-test dataset, which is the state-of-the-art performance among all one-step tree search methods.
+
+To summarize, this paper (i). proposes a diversified tactic calibration assisted monte carlo tree search to improve the exploration efficiency. (ii). proposes a bias-resistant value function to improve the exploitation effectiveness. (iii). demonstrates the effectiveness of the proposed method across different models and benchmarks in experiments.
+
+# 2 RELATED WORK
+
+Neural theorem proving. In recent years, the advancement of large language models has brought new progress to theorem proving (Li et al., 2024). GPT-f (Polu & Sutskever, 2020) is the first to utilize language models trained on proof data to predict candidate proof steps and employ search algorithms to discover the complete proof path. A series of subsequent studies have employed diverse language model techniques from various perspectives to enhance theorem proving performance. In terms of model training, PACT (Han et al., 2022) employs a set of self-supervised auxiliary tasks to train the model. Curriculum Learning (Polu et al., 2023) introduces curriculum expert iterations to update the network. Llemma (Azerbayev et al., 2024) continues pre-training the CodeLlama models (Roziere et al., 2023) on a math-focused corpus. AlphaGeometry (Trinh et al., 2024) integrates a transformer model trained on synthetic geometry data with a symbolic deduction engine to solve olympiad geometry problems. InterLM2-Math (Ying et al., 2024b) compiles a substantial collection of both formal and informal contest-level math problems (Ying et al., 2024a; Wu et al., 2024). First et al. (2023) incorporates a repair feedback mechanism in proof generation. This feedback is facilitated by an LLM fine-tuned on tuples consisting of incorrect proof, error message and correct proof. In terms of algorithmic design, Reprover (Yang et al., 2023) employs retrieval-augmented generation for proof generation. DSP (Jiang et al., 2023) initially uses informal hints to guide proofs by translating informal proofs into formal sketches, which are then completed with Isabelle's automated reasoning tactics. LEGOProver (Xin et al., 2024c) enhances DSP with a skill library that expands throughout the proof search. Lyra (Zheng et al., 2024) iterates on DSP by using error feedback to modify the formal sketch, employing automated reasoning tools to correct incorrect proofs of intermediate hypotheses. COPRA (Thakur et al., 2024) utilizes in-context learning agents to augment theorem proving. These methods employ different formal systems. In our paper, we focus on Lean, which has been verified to perform well on IMO-level tasks (Deepmind, 2024).
+
+Search methods for theorem proving. Neural theorem proving primarily consists of two categories: whole proof generation methods Xin et al. (2024a); Wang et al. (2024b) and tree search methods. Tree search methods are increasingly becoming the mainstream approach in recent years. A typical approach involves using Best First Search (BFS), as seen in methods like GPT-f (Polu & Sutskever, 2020), Reprover (Yang et al., 2023) and others (Lin et al., 2024; Welleck & Saha, 2023). In contrast, Thakur et al. (2024) employs depth-first search (DFS). Inspired by AlphaZero (Silver et al., 2018), many methods utilize MCTS, such as HyperTree Proof Search (Lample et al., 2022). There are also several improvements to the MCTS algorithm for theorem proving tasks. For instance, DT-Solver (Wang et al., 2023) uses virtual nodes and a proof-level value function to dynamically guide the MCTS search. Wang et al. (2024a) introduces a novel method that allows for the emergence of unproven lemmas during the search, which are subsequently proven recursively. The aforementioned methods are all one-step tree search techniques, which generates a single tactic at each step. Recently, multi-step tree search methods have been developed. For instance, DeepSeekProver-V1.5 (Xin et al., 2024b) employs MCTS to enhance the whole proof generation process, utilizing intrinsic rewards and discounted upper confidence bounds to guide exploration. Despite the success of these methods, challenges remain, namely the lack of diversity for searched proof paths and bias in the trained value function. This paper focuses on addressing these challenges by employing our diversified tactic calibration and bias-resistant tree search.
+
+Algorithm 1 Maximal Marginal Relevance for Diversified Tactic Calibration
+Require: current state $s$ , tactics set $\{a_1, a_2, \dots, a_e\}$ , next state set $\{s_1', s_2', \dots, s_e'\}$ , number of selected tactics $k$ , parameter $\lambda$ $S \gets \{s\}$ $A \gets \{\}$
+while $|A| < \min(k, e)$ do
+[ a^* \gets \arg \max_{a_i} \left( \lambda \cdot v_{policy}(s, a_i) - (1 - \lambda) \cdot \max_{s_j' \in S} f_{enc}(s_i')^\top f_{enc}(s_j') \right) ]
+Add $a^*$ to $A$
+Add the corresponding next state $s^*$ to $S$
+end while
+return the expanded action set $A$
+
+# 3 METHOD
+
+In this section, we present the details of our proposed method CARTS, which consists of two components. We begin by introducing the diversified tactic calibration (3.1), followed by giving details of our bias-resistant value function (3.2). Together, these two approaches enhance the effectiveness of exploration and exploitation during the search process.
+
+# 3.1 DIVERSIFIED TACTIC CALIBRATION
+
+In practice, the multiple candidate tactics generated by language models often exhibit redundancy. Diversified tactic calibration addresses this by calibrating candidate tactics' model confidence based on their intrinsic similarity. We implement the calibration using the Maximal Marginal Relevance (MMR) algorithm (Peng et al., 2005) and structure our method's framework through Monte Carlo Tree Search (Kocsis & Szeptsvári, 2006).
+
+The standard MCTS method used in theorem proving (Wang et al., 2023; Xin et al., 2024b) involves three steps: Selection, Expansion and Backpropagation. We incorporate diversified tactic calibration into the Expansion phase, resulting in our CARTS method, which comprises three steps: Selection, Calibration & Expansion, and Backpropagation. Details of each step are provided as follows.
+
+Selection. In the selection phase, the algorithm starts from the root node and traverses the tree down to a leaf node. It uses a tree policy to choose child nodes that balance exploration and exploitation. The tree policy at a tree node $s$ selects an action $a$ that maximizes the weighted upper confidence bound (WUCB) score, the WUCB score for each tree node $s$ is formulated as follows:
+
+$$
+\mathrm {W U C B} (s, a) = \frac {W (s , a)}{N (s , a)} + w (s, a) \cdot \frac {\sqrt {N (s , \cdot)}}{N (s , a)} \tag {1}
+$$
+
+Here, $N(s,a)$ denotes the count of how many times action $a$ has been taken in state $s$ and $N(s,\cdot)$ the total number of times any action has been taken in state $s$ during the whole search. $W(s,a)$ denotes the total value accumulated. Unlike the PUCT score used in DT-Solver (Wang et al., 2023), which incorporates probabilities estimated by the language model, we introduce a weight $w(s,a)$ that represents both importance (model confidence) and diversity for the tactic at the current state. We will detail the weights in the calibration phase.
+
+Calibration & Expansion. At this stage, multiple candidate tactics are generated from the language model, followed by verification through the Lean prover. Verified tactics that pass in Lean are calibrated and expanded into the search tree. Concretely, the proof generation model is designed to generate a one-step proof tactic $a$ from a given proof state $s$ , along with a conditional probability $p(a|s)$ . Typically, we use beam search to sample a large collection of tactics (the quantity is $E$ ) from the language model, which may result in much low probabilities for each tactic. This will lead to reduced exploration during the search process. To fix this, we apply a length penalty, defined as $v_{policy}(s,a) = p^{\frac{1}{l}}(s|a)$ , where $l$ is the token length of tactic $a$ . This value reflects the model's confidence or the importance of the current action.
+
+After verification by Lean, only $e$ tactics remain, denoted as $\{a_1, a_2, \dots, a_e\}$ . Here, we do not directly expand these tactics into the search tree because they often exhibit significant redundancy. Therefore, we need to capture the similarity between these tactics and then reorder them for both diversity and importance. We can compare the similarities between two actions using a pre-trained and fixed sentence encoder. However, directly using action similarity poses a challenge: similar actions may lead to different next states, or dissimilar actions may result in the same next state. This undermines our goal of enhancing search diversity. Therefore, we assess next states similarities after executing these tactics. Formally, we denote the set of the next states as $\{s_1', s_2', \dots, s_e'\}$ , where $s_i'$ represents the next state of $s$ following the execution of action $a_i$ . We use a sentence encoder $f_{enc}(\cdot)$ , which has been already pre-trained on a large-scale corpus, to accept the textualized state and outputs high-dimensional embeddings. Then we utilize the MMR algorithm to reorder the tactics and calibrate the model confidence. The algorithm iteratively selects items (e.g., tactics in our context) from a candidate set to maximize the following objective function:
+
+$$
+\operatorname {M M R} (s, a _ {i}) = \lambda \cdot v _ {\text {p o l i c y}} (s, a _ {i}) - (1 - \lambda) \cdot \max _ {s _ {j} ^ {\prime} \in S} f _ {\text {e n c}} \left(s _ {i} ^ {\prime}\right) ^ {\top} f _ {\text {e n c}} \left(s _ {j} ^ {\prime}\right) \tag {2}
+$$
+
+Where, $\lambda$ is a parameter that controls the trade-off between importance and diversity. It typically ranges from 0 to 1. The calculation of the MMR score serves a calibration, effectively penalizing tactics with low diversity, as represented by the second term in the formula. The algorithm begins with an initial state set $S = \{s\}$ and an empty action set $A$ . While the size of $A$ is less than the predefined value $k$ , which is smaller than $E$ , the action with the highest MMR score is selected and added to $A$ , along with its next state being added to $S$ . Once $k$ actions have been chosen, the set $A$ is returned. If $k < e$ , we select all the tactics and reorder them. The value $k$ serves as a constraint on the maximum number of expansion nodes. It is worth noting that we add the current state $s$ into the initial state set $S$ to mitigate the recurrence of identical states. The reason this way is effective is that our algorithm assigns a lower MMR score to the actions when the next state closely resembles the current state. Algorithm 1 illustrates the complete process of diversified tactic calibration.
+
+After diversified tactic calibration, we obtain a small set of actions $A$ that contains both importance and diversity. Then, these actions are treated as edges, with their corresponding next state as nodes, which are expanded into the current search tree. For each edge $a_i$ , we assign a weight $w(s, a_i) = \max \{0, \mathrm{MMR}(s, a_i)\}$ , utilized during the selection phase to assess the need for exploration. Unlike traditional MCTS (Kocsis & Szepesvári, 2006) or DT-Solver (Wang et al., 2023), our weights place greater emphasis on encouraging the exploration of tactics with high diversity.
+
+Backpropagation. At this stage, we update the statistics of the nodes and edges along the search trajectory. We have a bias-resistant value function $V(s,a)$ which will be detailed in the next section, estimating the value of taking action $a$ from the source node $s$ . For a given trajectory, we use the value function to evaluate the value of the leaf node and accumulate this value along all edges in the path. Specifically, we update the weight of the edge recursively as follows: $W(s_{t},a_{t}) + = V(s,a)$ , where $s_t$ and $a_{t}$ represent the node and edge at the trajectory. Additionally, we increment the visit count for the edge: $N(s_{t},a_{t}) + = 1$ . This process ensures that the statistics reflect the outcomes of the simulations, allowing for improved selection in future iterations.
+
+# 3.2 BIAS-RESISTANT VALUE FUNCTION
+
+In MCTS-based methods, training a value function is crucial (Polu & Sutskever, 2020; Lample et al., 2022), typically involving the creation of positive and negative samples using the policy network on training data. Positive samples consist of correct actions (or trajectories (Wang et al., 2023)) from the dataset, while negative samples are those generated by the policy network that lead to undesirable states. Binary cross-entropy loss is then used to train the value network. Due to the hardness of verifying the correctness of actions not on the proof path, previous work (Polu & Sutskever, 2020) often treats these actions as negative samples, resulting in an excessive number of negative samples, some of which are even inaccurate. This makes binary loss unsuitable and biases the value function. Furthermore, the domain gap between the training and test datasets also contributes to biases. In this paper, we conduct debiasing during both training and inference stages, as detailed below.
+
+Training. To mitigate bias introduced by data collection, we first structure the dataset into preference pairs of positive and negative samples. We utilize an embedding model $f_{enc}$ to effectively
+
+filter out noisy samples. Specifically, if $f_{enc}(s')^\top f_{enc}(s'_pos) > \tau$ , we discard the action $a$ . $s'$ is the next state from a sampled negative action $a$ at the current state $s$ , $s'_pos$ is the correct next state and $\tau$ is a threshold. This filtering ensures that the selected negative actions are more likely to be undesirable, thus reducing data noise. Moreover, we adopt the preference modeling framework to train our bias-resistant value function. We employ the Bradley-Terry (BT) (Bradley & Terry, 1952) model, a widely used technique for preference modeling. The BT model posits that the probability of action $a_{pos}$ being preferred over action $a_{neg}$ given state $s$ is expressed as:
+
+$$
+\mathbb {P} \left(a _ {p o s} \succ a _ {n e g} \mid s\right) = \frac {\exp \left(V _ {\theta} (s , a _ {p o s})\right)}{\exp \left(V _ {\theta} (s , a _ {p o s})\right) + \exp \left(V _ {\theta} (s , a _ {n e g})\right)} \tag {3}
+$$
+
+Assuming access to the filtered dataset $D = \{(s^{(i)},a_{pos}^{(i)},a_{neg}^{(i)})\}_{i = 1}^{N}$ , we can parametrize the value function $V_{\theta}(s,a)$ and estimate the parameters $\theta$ by minimizing the negative log-likelihood.
+
+Preference modeling offers several advantages. Firstly, by only providing the relative superiority among samples, false negative samples do not require further processing. This is because we can reasonably assume that the correct proof steps provided in the dataset are always optimal and align with human theorem proving's preferences. Additionally, since the dataset is presented in the form of preference pairs, this effectively oversamples (Shi et al., 2023) the positive pairs, alleviating the issue of class imbalance between positive and negative samples, as demonstrated in some studies (Zhang et al., 2024; Pattnaik et al., 2024).
+
+Inference. To mitigate the domain gap between the training and test datasets, we introduce an adjustment term into the value function during the inference stage. As previously mentioned, before calibration in CARTS, all $E$ tactics should be processed through the Lean system to filter out $e$ valid tactics. Intuitively, if the number of valid tactics is small, people will raise concerns about the capability of the current policy model, needing for a reduced reward for the current action. We define this reward adjustment as: $\alpha = e / E$ , representing the ratio between the number of valid tactics and the total number of tactics generated by the language model at the current state. This adjustment term serves as a test-time adaptation to the test dataset. The final bias-resistant value function integrates both the trained value network and this adjustment term as:
+
+$$
+V (s, a) = \left\{ \begin{array}{l l} 0, & \text {i f} s ^ {\prime} \text {h a s n o c h i l d n o d e s}, \\ 1, & \text {e l s e i f} s ^ {\prime} \text {i s t h e p r o v e d s t a t e}, \\ \frac {1}{2} (\alpha + V _ {\theta} (s, a)), & \text {o t h e r w i s e}. \end{array} \right. \tag {4}
+$$
+
+Where $s'$ is the next state. Unlike the intrinsic reward introduced by DeepSeek-Prover-V1.5 (Xin et al., 2024b), which only considers whether the search expands nodes, we consider both the expansion capability of the policy network and the generalizability of the value network, forming our final bias-resistant value function. The adjustment term can be interpreted as a form of test-time adaptation to the distribution of test data, thus can mitigate the domain gap.
+
+# 4 EXPERIMENTS
+
+In this section, we evaluate the theorem-proving performance of CARTS in Lean. We first describe the experimental setup, then present the main results, followed by an analysis of our method. Currently, theorem-proving methods are primarily categorized into two main types: whole-proof generation methods and tree search methods. Our approach is applicable exclusively to one-step tree search methods; therefore, we focus our comparison solely on this category.
+
+# 4.1 EXPERIMENTAL SETUP
+
+Datasets. We follow Internlm-math (Ying et al., 2024b; Wu et al., 2024) and DeepSeek-Prover-V1.5 (Xin et al., 2024b), utilizing miniF2F benchmark (Zheng et al., 2022) and ProofNet benchmark (Azerbayev et al., 2023) for our evaluation. We specifically use the test split of miniF2F same as (Xin et al., 2024b), which includes 244 problems ranging from basic algebra and number theory and also contains AIME and IMO challenging problems. ProofNet is a benchmark for undergraduate-level mathematics, comprising 371 formal problems derived from widely-used undergraduate pure mathematics textbooks. It covers topics such as real and complex analysis, abstract algebra, and
+
+Table 1: Results on the miniF2F-test for various models and search methods. The highest performance for each search method is highlighted in bold.
+
+
Model
Sample Budget
Search Method
miniF2F-test
Tree Search Methods
COPRA(Code Llama) (Thakur et al., 2024)
500
DFS
5.7%
COPRA(GPT-3.5) (Thakur et al., 2024)
60
DFS
9.0%
COPRA(GPT-4) (Thakur et al., 2024)
60
DFS
26.6%
Llemma-7B (Azerbayev et al., 2024)
32 × 100
BFS
26.2%
Llemma-34B (Azerbayev et al., 2024)
32 × 100
BFS
25.8%
LLMStep (Welleck & Saha, 2023)
32 × 100
BFS
27.9%
Curriculum Learning (Polu et al., 2023)
8 × 512
BFS
29.6%
InternLM2-Math-7B (Ying et al., 2024b)
32 × 100
BFS
30.3%
InternLM2-Math-Plus-7B (Ying et al., 2024a)
32 × 100
BFS
43.4%
DeepSeek-Prover-V1.5-SFT (Xin et al., 2024b)
3200
RMaxTS
53.5%
DeepSeek-Prover-V1.5-RL (Xin et al., 2024b)
3200
RMaxTS
55.0%
Reprover-Lean4 (229M) (Yang et al., 2023)
64 × 100
BFS
35.7%
MCTS
36.5%
DTSolver
36.0%
CARTS
37.7%
InternLM2-Math-Plus-1.8B (Ying et al., 2024b)
64 × 100
BFS
38.9%
MCTS
39.3%
DTSolver
38.5%
CARTS
41.0%
StepProver (7B) (Wu et al., 2024)
32 × 300
BFS
48.8%
MCTS
46.7%
DTSolver
46.3%
CARTS
49.6%
+
+topology. This benchmark presents a greater challenge than miniF2F, posing significant difficulties for theorem provers. Although the original versions of both benchmarks are Lean3, we have modified them to Lean4 for CARTS's evaluation, aligning with the development of the Lean community.
+
+Baselines models. We include baselines representing classical and state-of-the-art neural theorem proving in Lean. COPRA (Thakur et al., 2024) is an in-context learning agent that utilizes general language models to generate tactics for finding the final proof. Llemma (Azerbayev et al., 2024) is trained on extensive mathematical corpora. Additionally, we incorporate advanced models such as LLMStep (Welleck & Saha, 2023), Reprover (Yang et al., 2023), Curriculum Learning (Polu et al., 2023), InternLM2-Math (Ying et al., 2024b), and StepProver (Wu et al., 2024). All these models are based on one-step tree search methods. We also include DeepSeek-Prover-V1.5 (Xin et al., 2024b), which integrates whole proof generation and tree search. However, it is not suitable for our CARTS, and thus, we mark it in gray.
+
+Search methods. Baseline models employ various search methods, such as depth-first search (DFS) (Thakur et al., 2024), best first search (BFS) (Yang et al., 2023), and monte carlo tree search (MCTS). Additionally, DT-Solver extends MCTS using virtual nodes. We compared the performance of BFS, MCTS, DT-Solver and CARTS on Reprover (Yang et al., 2023), InternLM2-Math (Ying et al., 2024b), and InternLM2-StepProver (Wu et al., 2024). For MCTS and DT-Solver, we replace the value network with the intrinsic reward (Xin et al., 2024b) for simplicity. It is noteworthy that multiple tree search attempts with different seeds can be applied and ensemble (Polu & Sutskever, 2020; Lin et al., 2024; Xin et al., 2024a); however, due to computational cost limitation, we only compared the results for one single tree search attempt.
+
+Metrics. We evaluate the performance of various search methods using the pass@1 metric with a budget $B$ . Similar to (Xin et al., 2024b), if $B$ is a single value, it indicates the number of model
+
+Table 2: Results on the ProofNet for various models and search methods.
+
+
Model
Sample Budget
Search Method
ProofNet
Reprover-Lean4 (Yang et al., 2023)
64 × 100
BFS
11.1%
MCTS
11.7%
CARTS
11.9%
StepProver (Wu et al., 2024)
32 × 300
BFS
18.1%
MCTS
18.3%
CARTS
18.8%
+
+
+Figure 2: Improvement curve in pass@1 for the miniF2F test as the expansion budget varies. Left illustrates Reprover-Lean4 (Yang et al., 2023) and right illustrates StepProver (Xin et al., 2024b).
+
+
+
+generations used in tree expansions. If $B = E \times T$ , $E$ represents the number of tactics generated per expansion, and $T$ denotes the number of expansion iterations.
+
+Experimental details. In terms of parameter settings, for Reprover-Lean4 (Yang et al., 2023), we set $\lambda = 0.8$ , and for InternLM2-Math-Plus-1.8B (Ying et al., 2024b) and StepProver (Wu et al., 2024), we set $\lambda = 0.9$ . Additionally, we set $k = 8$ for all models. We use the text embedding model intfloat/e5-small1-v2 (Wang et al., 2022) as the encoder $f_{enc}$ . Details regarding data collection and training for the bias-resistant value function are presented in Appendix A.
+
+# 4.2 MAIN RESULTS
+
+In Table 1, we illustrate the pass@1 successful rate on the miniF2F-test benchmark of various models and search methods. Our proposed CARTS surpasses all compared search methods when the policy model is fixed. The results encompass different architectures and parameter sizes of language models, demonstrating that our method is more effective at search stage regardless of the policy model. Notably, we achieve a $49.6\%$ success rate on the miniF2F-test, representing state-of-the-art performance among one-step tree search methods. Table 2 demonstrates the results on the ProofNet benchmark. Due to the dataset's complexity, current policy models exhibit low accuracy, which constrain the search performances. However, our proposed CARTS also achieves the highest performance compared to other search methods when the budget is fixed.
+
+Additionally, to demonstrate that CARTS has the superior search efficiency, we present a comparison of the pass@1 performance among four search methods on miniF2F-test when varying the expansion budget, as illustrated in Figure 2. It is evident that while the performance of different search methods is comparable under a low budget, our method exhibits a significant improvement as the expansion budget increases. Furthermore, we observed that the CARTS curve increases more rapidly relative to other search methods. These findings demonstrate that our approach enhances the efficiency and effectiveness of tree search.
+
+Table 3: Ablation study of various components of CARTS on the miniF2F-test. We compare the pass@1 performance across three models, with the highest performance highlighted in bold.
+
+
Search Method
Model
Reprover-Lean4
InternLM2-Math-Plus-1.8B
StepProver
▷ Baselines:
BFS
35.7%
38.9%
48.8%
MCTS
36.5%
39.3%
46.7%
▷ Ablations:
Diversified tactic calibration
36.1%
41.0%
49.2%
Bias-resistant value function
36.9%
40.6%
46.3%
CARTS (without adjustment term)
37.3%
41.3%
49.2%
CARTS (Ours)
37.7%
41.0%
49.6%
+
+# 4.3 ANALYSIS
+
+In this section, we conduct a detailed analysis of CARTS' effectiveness through experiments. We include ablation studies and specifically investigate the length distribution of results produced by CARTS, supplemented by several case studies.
+
+Ablation for different components of CARTS. CARTS consists of two components: diversified tactic calibration and a bias-resistant value function. We isolated these components for analysis. Additionally, we compared the performance of CARTS without the adjustment term in the value function. The experimental results are shown in Table 3. The results indicate that both components enhance performance, and their combination further increases the pass rate, suggesting that CARTS can significantly improve the efficiency of tree search exploration. Our findings reveal that for InternLM2-Math-Plus-1.8B, CARTS without the adjustment term achieves superior results, whereas CARTS with the adjustment does not perform optimally. We believe this is because the adjustment term is merely a heuristic calibration; the policy model generates more unacceptable tactics, the less likely it is to generate accurate tactics. This is not always valid due to differences between the properties of the proof state. Nonetheless, experiments across multiple models suggest that it is generally effective for debiasing the value function.
+
+Ablation study for $k$ . The parameter $k$ limits the maximum expansion number of nodes after diversified tactic calibration. A smaller $k$ significantly restricts the search space, potentially leading to performance degradation. Conversely, a larger $k$ expands the search space, increasing the likelihood of identifying the correct tactic. However, this comes at the cost of substantially increased search time, thereby reducing overall efficiency. To assess its impact on CARTS, we test multiple values of $k$ using Reprover-Lean4 on the miniF2F-test. The experimental results are shown in the left side of Figure 3. As $k$ increases, the pass@1 rate initially improves, reaching a peak, and then gradually declines. This indicates that there is an optimal range for $k$ that balances performance and search efficiency. Therefore, we recommend choosing a moderate $k$ , such as $k = 8$ , in practice.
+
+Analysis of the length distribution of discovered proofs. To comprehensively demonstrate the effectiveness of CARTS, we analyze the proof step lengths obtained by the Reprover-Lean4 model on the miniF2F-test. The results are presented on the right side of Figure 3. As illustrated, BFS yields a higher proportion of theorems with step lengths of one and two, but with none exceeding three steps. In contrast, CARTS achieves more theorems with lengths of three or greater, significantly outperforming both BFS and MCTS. This indicates that CARTS enhances search efficiency, enabling the exploration of longer proof chains within the same budget. Additionally, we find that CARTS discover two proofs with the length of five. We examine this case in detail in next paragraph.
+
+Case study. We conduct a comprehensive case study to closely examine the results of the CARTS search. Figure 4 demonstrates one theorem which is proved by CARTS on Reprover-Lean4 model.
+
+
+Figure 3: The left figure shows the ablation study for $k$ , while the right figure illustrates the length distribution of proofs searched by CARTS. Both analyses are conducted on the miniF2F-test using the Reprover-Lean4 (Yang et al., 2023) model.
+
+
+Figure 4: Case study. Proved theorem induction_12dvd4expnplp20 by CARTS in miniF2F-test of ReProver-Lean 4 (Yang et al., 2023). This theorem is proved in 77 expansions.
+
+```txt
+Case: induction_12dvd4expnplp20 theorem induction_12dvd4expnplp20 (n : N) : 12 | 4^(n + 1) + 20 := by norm_num [Nat.pow_succ] induction' n with n n_ih case zero => simpa using n_ih rw [pow_succ] omega
+```
+
+This case has proof path of five length. This theorem induction_12dvd4expnplp20 pertains to divisibility and its initial step involves simplification using norm_num [Nat.pow_succ]. However, the tactic generated by Repover-Lean4 exhibits a low confidence level, only ranking eight compared to other incorrect tactics. If the BFS approach is to be applied, it would necessitate the exploration of numerous redundant tactics before arriving at this specific action. Our experiments reveal that the CARTS improves the score of this tactic and increases its rank to six. Furthermore, we find that the score of the second tactic, namely induction' n with n n.i.h, improves from an initial rank of sixth to fourth. While the increase in the ranking of the correct tactic score is only by two, the exponential growth in the complexity of tree search highlights the significance of early exploration of the correct action at the root node. Therefore, these improvements in rankings play a crucial role in successfully proving this theorem within a limited number of expansion.
+
+# 5 CONCLUSION AND LIMITATION
+
+In this paper, we presented CARTS, a novel approach that combines diversified tactic calibration with a bias-resistant value function for enhancing the performance of neural theorem proving. Our diversified tactic calibration effectively mitigates the redundancy in language model generations, promoting a more diverse and balanced exploration of candidate tactics. The bias-resistant value function addresses the prevalent biases during both the training and inference stage, thereby refining the exploitation capabilities of the tree search by providing more accurate and reliable evaluations of tactics. Experimental results on miniF2F and ProofNet have demonstrated that CARTS significantly outperforms existing one-step tree search methods, achieving state-of-the-art results.
+
+While CARTS has proven effective, it also has limitations. Our method currently only supports one-step tree search, whereas multi-step tree search, such as DeepSeek-Prover-V1.5 (Xin et al., 2024b), has shown promise but is not supported by our approach. In the future, we will explore variants of CARTS that can be integrated into multi-step tree search methods.
+
+# ACKNOWLEDGMENT
+
+This research was supported by the Key Program of Jiangsu Science Foundation (BK20243012), Leading-edge Technology Program of Jiangsu Science Foundation (BK20232003), the Jiangsu Science Foundation (BG2024036) and the Fundamental Research Funds for the Central Universities (022114380023). We would like to thank the reviewers for their constructive suggestions.
+
+# REFERENCES
+
+Zhangir Azerbayev, Bartosz Piotrowski, Hailey Schoelkopf, Edward W Ayers, Dragomir Radev, and Jeremy Avigad. ProofNet: Autoformalizing and Formally Proving Undergraduate-Level Mathematics. arXiv preprint arXiv:2302.12433, 2023.
+Zhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen McAleer, Albert Q Jiang, Jia Deng, Stella Biderman, and Sean Welleck. Llemma: An Open Language Model for Mathematics. In Proceedings of the International Conference on Learning Representations, 2024.
+Ralph Allan Bradley and Milton E Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 1952.
+Deepmind. AI Achieves Silver-medal Standard Solving International Mathematical Olympiad Problems. 2024.
+Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
+Emily First, Markus Rabe, Talia Ringer, and Yuriy Brun. Baldur: Whole-Proof Generation and Repair with Large Language Models. In Proceedings of the ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering, 2023.
+Jesse Michael Han, Jason Rute, Yuhuai Wu, Edward W Ayers, and Stanislas Polu. Proof Artifact Co-Training for Theorem Proving with Language Models. In Proceedings of the International Conference on Learning Representations, 2022.
+John Harrison, Josef Urban, and Greek Wiedijk. History of interactive theorem proving. In Computational Logic, volume 9, pp. 135-214. 2014.
+Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
+Albert Q Jiang, Sean Welleck, Jin Peng Zhou, Wenda Li, Jiacheng Liu, Mateja Jamnik, Timothée Lacroix, Yuhuai Wu, and Guillaume Lample. Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofs. In Proceedings of the International Conference on Learning Representations, 2023.
+Levente Kocsis and Csaba Szepesvári. Bandit based monte-carlo planning. In Johannes Furnkranz, Tobias Scheffer, and Myra Spiliopoulou (eds.), European Conference on Machine Learning, volume 4212, pp. 282-293, 2006.
+Guillaume Lample, Timothee Lacroix, Marie-Anne Lachaux, Aurelien Rodriguez, Amaury Hayat, Thibaut Lavril, Gabriel Ebner, and Xavier Martinet. Hypertree Proof Search for Neural Theorem Proving. In Proceedings of the International Conference on Neural Information Processing Systems, 2022.
+Yuanzhi Li, Sébastien Bubeck, Ronen Eldan, Allie Del Giorno, Suriya Gunasekar, and Yin Tat Lee. Textbooks are all you need ii: phi-1.5 technical report. arXiv preprint arXiv:2309.05463, 2023.
+Zhaoyu Li, Jialiang Sun, Logan Murphy, Qidong Su, Zenan Li, Xian Zhang, Kaiyu Yang, and Xujie Si. A survey on deep learning for theorem proving. In First Conference on Language Modeling, 2024.
+
+Haohan Lin, Zhiqing Sun, Yiming Yang, and Sean Welleck. Lean-STaR: Learning to Interleave Thinking and Proving. arXiv preprint arXiv:2407.10040, 2024.
+Leonardo de Moura and Sebastian Ullrich. The Lean 4 Theorem Prover and Programming Language. In Proceedings of the International Conference on Automated Deduction, 2021.
+Pulkit Pattnaik, Rishabh Maheshwary, Kelechi Ogueji, Vikas Yadav, and Sathwik Tejaswi Madhusudhan. Curry-dpo: Enhancing alignment using curriculum learning & ranked preferences. arXiv preprint arXiv:2403.07230, 2024.
+Lawrence C Paulson. Isabelle: A Generic Theorem Prover. Springer, 1994.
+Hanchuan Peng, Fuhui Long, and Chris Ding. Feature selection based on mutual information criteria of max-dependency, max-relevance, and min-redundancy. IEEE Transactions on pattern analysis and machine intelligence, 27, 2005.
+Stanislas Polu and Ilya Sutskever. Generative Language Modeling for Automated Theorem Proving. arXiv preprint arXiv:2009.03393, 2020.
+Stanislas Polu, Jesse Michael Han, Kunhao Zheng, Mantas Baksys, Igor Babuschkin, and Ilya Sutskever. Formal Mathematics Statement Curriculum Learning. In Proceedings of the International Conference on Learning Representations, 2023.
+Qwen Team. Qwen2.5: A party of foundation models, September 2024.
+Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, et al. Code llama: Open foundation models for code. arXiv preprint arXiv:2308.12950, 2023.
+Jiang-Xin Shi, Tong Wei, Yuke Xiang, and Yu-Feng Li. In Proceedings of the International Conference on Neural Information Processing Systems, 2023.
+David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Marc Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, et al. A General Reinforcement Learning Algorithm That Masters Chess, Shogi, and Go Through Self-Play. Science, 2018.
+Amitayush Thakur, George Tsoukalas, Yeming Wen, Jimmy Xin, and Swarat Chaudhuri. An In-Context Learning Agent for Formal Theorem-Proving. arXiv preprint arXiv:2310.04353, 2024.
+Trieu H Trinh, Yuhuai Wu, Quoc V Le, He He, and Thang Luong. Solving Olympiad Geometry without Human Demonstrations. Nature, 2024.
+Haiming Wang, Ye Yuan, Zhengying Liu, Jianhao Shen, Yichun Yin, Jing Xiong, Enze Xie, Han Shi, Yujun Li, Lin Li, et al. DT-Solver: Automated Theorem Proving with Dynamic-Tree Sampling Guided by Proof-level Value Function. In Proceedings of the Annual Meeting of the Association for Computational Linguistics, 2023.
+Haiming Wang, Huajian Xin, Zhengying Liu, Wenda Li, Yinya Huang, Jianqiao Lu, Zhicheng Yang, Jing Tang, Jian Yin, Zhenguo Li, et al. Proving Theorems Recursively. arXiv preprint arXiv:2405.14414, 2024a.
+Liang Wang, Nan Yang, Xiaolong Huang, Binxing Jiao, Linjun Yang, Daxin Jiang, Rangan Majumder, and Furu Wei. Text embeddings by weakly-supervised contrastive pre-training. arXiv preprint arXiv:2212.03533, 2022.
+Ruida Wang, Jipeng Zhang, Yizhen Jia, Rui Pan, Shizhe Diao, Renjie Pi, and Tong Zhang. Theorem-llama: Transforming general-purpose lms into lean4 experts. arXiv preprint arXiv:2407.03203, 2024b.
+Sean Welleck and Rahul Saha. LLMSTEP: LLM Proofstep Suggestions in Lean. In International Conference on Neural Information Processing Systems Workshop on MATH-AI, 2023.
+Zijian Wu, Jiayu Wang, Dahua Lin, and Kai Chen. Lean-github: Compiling github lean repositories for a versatile lean prover. arXiv preprint arXiv:2407.17227, 2024.
+
+Huajian Xin, Daya Guo, Zhihong Shao, Zhizhou Ren, Qihao Zhu, Bo Liu, Chong Ruan, Wenda Li, and Xiaodan Liang. DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Data. arXiv preprint arXiv:2405.14333, 2024a.
+Huajian Xin, Z.Z. Ren, Junxiao Song, Zhihong Shao, Zhao Wanjia, Haocheng Wang, Bo Liu, Liyue Zhang, Xuan Lu, Qiushi Du, Wenjun Gao, Qihao Zhu, Dejian Yang, Zhibin Gou, Z.F. Wu, Fuli Luo, and Chong Ruan. DeepSeek-Prover-V1.5: Harnessing Proof Assistant Feedback for Reinforcement Learning and Monte-Carlo Tree Search. arXiv preprint arXiv:2408.08152, 2024b.
+Huajian Xin, Haiming Wang, Chuanyang Zheng, Lin Li, Zhengying Liu, Qingxing Cao, Yinya Huang, Jing Xiong, Han Shi, Enze Xie, et al. LEGO-Prover: Neural Theorem Proving with Growing Libraries. In Proceedings of the International Conference on Learning Representations, 2024c.
+Kaiyu Yang, Aidan Swope, Alex Gu, Rahul Chalamala, Peiyang Song, Shixing Yu, Saad Godil, Ryan Prenger, and Anima Anandkumar. LeanDojo: Theorem Proving with Retrieval-Augmented Language Models. In Proceedings of the International Conference on Neural Information Processing Systems, 2023.
+Huaiyuan Ying, Zijian Wu, Yihan Geng, Jiayu Wang, Dahua Lin, and Kai Chen. Lean Workbook: A Large-Scale Lean Problem Set Formalized from Natural Language Math Problems. arXiv preprint arXiv:2406.03847, 2024a.
+Huaiyuan Ying, Shuo Zhang, Linyang Li, Zhejian Zhou, Yunfan Shao, Zhaoye Fei, Yichuan Ma, Jiawei Hong, Kuikun Liu, Ziyi Wang, et al. InternLM-Math: Open Math Large Language Models Toward Verifiable Reasoning. arXiv preprint arXiv:2402.06332, 2024b.
+Xuan Zhang, Chao Du, Tianyu Pang, Qian Liu, Wei Gao, and Min Lin. Chain of preference optimization: Improving chain-of-thought reasoning in llms. arXiv preprint arXiv:2406.09136, 2024.
+Chuanyang Zheng, Haiming Wang, Enze Xie, Zhengying Liu, Jiankai Sun, Huajian Xin, Jianhao Shen, Zhenguo Li, and Yu Li. Lyra: Orchestrating Dual Correction in Automated Theorem Proving. Transactions on Machine Learning Research, 2024.
+Kunhao Zheng, Jesse Michael Han, and Stanislas Polu. MiniF2F: A Cross-System Benchmark for Formal Olympiad-Level Mathematics. In Proceedings of the International Conference on Learning Representations, 2022.
+
+# A DETAILS OF BIAS-RESISTANT VALUE FUNCTION
+
+Data Construction To train our bias-resistant value function on Lean4, we utilized two data sources. The first source is the random portion of the leandrojoenchmark (Yang et al., 2023), which is derived from mathlib4 (commit: 3ce43c18f614b76e161f911b75a3e1ef641620ff). The second source is Lean-Github (Wu et al., 2024), a recently released dataset compiled from over 100 Lean 4 repositories. We employed InternLM2-Math-Plus-7B (Ying et al., 2024b) to generate eight candidate tactics for each proof state in the dataset. Tactics that differed from the correct tactic in the generations are used as negative samples, which we then paired with positive samples to form preference pairs. However, as discussed in the main text, this dataset contains significant noise, with positive and negative samples being semantically similar, as illustrated in Figure 5. To address this, we filtered the samples based on their similarity, using the embedding model intfloat/e5-small-v2 (Wang et al., 2022) and a threshold $\tau = 0.85$ . After filtering, the dataset consists of 1,797,951 (about 1800K) training preference pairs and 2,000 test preference pairs.
+
+```txt
+STATE:
+case a.h
+m : Type u
+n : Type v
+ $\alpha$ :Type w
+ $\mathrm{inst}^{+4}$ :DecidableEq n
+ $\mathrm{inst}^{+3}$ :Fintype n
+ $\mathrm{inst}^{+2}$ :DecidableEq m
+ $\mathrm{inst}^{+1}$ :Fintype m
+ $\mathrm{inst}+$ : CommRing $\alpha$
+A : Matrix n n $\alpha$
+i j : n
+ $\vdash \forall (x:\mathrm{Perm}~n),$ (20 $x\in \mathrm{univ}\rightarrow$ ↑↑(↑sign x)*Ii1:n,updateRow A I (Pi(single j 1)(↑x i_1)i_1= ↑↑(↑sign x)*Ii1:n,updateColumn A j(Pi.single i 1)(↑x i_1)i_1
+POSITIVE ACTION:
+intro $\sigma_{-}$
+NEGATIVE ACTION:
+intros $\sigma_{-}$
+```
+
+Before Filtering
+
+```txt
+STATE:
+case a.h
+m : Type u
+n : Type v
+ $\alpha$ :Type w
+ $\mathrm{inst}^{+4}$ :DecidableEq n
+ $\mathrm{inst}^{+3}$ :Fintype n
+ $\mathrm{inst}^{+2}$ :DecidableEq m
+ $\mathrm{inst}^{+1}$ :Fintype m
+ $\mathrm{inst}+$ : CommRing $\alpha$
+A : Matrix n n $\alpha$
+i j : n
+ $\vdash \forall (x:\mathrm{Perm}~n),$ (20 $x\in \mathrm{univ}\rightarrow$ ↑(sign x)*Ii1:n,updateRow A I (Pi.single j 1)(↑x i_1)i_1= ↑(sign x)*IIi_1:n,updateColumn A j(Pi.single i 1)(↑x i_1)i_1
+POSITIVE ACTION:
+intro $\sigma_{-}$
+NEGATIVE ACTION:
+simp only [updateRow_apply, updateColumn_apply]
+```
+
+After Filtering
+
+Figure 5: This illustrates an example of our dataset organization: the left side contains unfiltered data with noise, while the right side shows the samples after filtering.
+
+Training Details We utilized the microsoft/phi-1.5 model (Li et al., 2023), which contains 1.3 billion parameters. Phi-1.5 has been trained on a large-scale code corpus, endowing it with a strong understanding of formal languages. We fine-tuned the model using LoRA (Hu et al., 2021) for one training epoch, using the learning rate as $1 \times 10^{-4}$ . After training, the model attained an accuracy of $94.10\%$ on the test dataset. The training loss curve and validation accuracy curve are illustrated in Figure 6.
+
+# B EFFECTIVENESS OF BIAS-RESISTANT VALUE FUNCTION
+
+In this section, we supplement experiments to demonstrate the effectiveness of our bias-resistant value function and draw the following conclusions: 1. The Bradley-Terry (BT) model effectively addresses the issue of class imbalance in training the value function. 2. Our analysis underscores the critical importance of data filtering and provides a way for determining the hyperparameter $\tau$ .
+
+
+Figure 6: The training loss curve and the validation accuracy curve.
+
+
+
+# B.1 ANALYSIS BETWEEN BT AND CE
+
+We reconstruct the pairwise dataset and employ various models to validate the effectiveness of the BT modeling approach for the value function. Unlike the main text, where both leandojoenchmark (Yang et al., 2023) and Lean-Github (Wu et al., 2024) are utilized as data sources, this analysis exclusively uses leandojoenchmark for training, with its test split serving as the evaluation dataset. Furthermore, data from Lean-Github are employed for Out-of-Distribution (OOD) evaluation. To enable training of Cross-Entropy (CE) loss, we convert the pair-wise datasets into the binary classification datasets. The training data exhibits an imbalance between positive and negative samples (approximately $1:5$ ), while we ensured that both test sets remains class-balanced. Detailed statistics of the dataset are presented in Table 4.
+
+Table 4: Statistics of our constructed dataset.
+
+
Split
Count
For BT
For CE
Train
694,600
861,186
Test
3,465
6,930
Test-OOD
3,499
6,998
+
+We conducted training on three models to compare the differences between BT and CE, including Qwen-2.5-0.5B (Qwen Team, 2024), Llama3.2-1B (Dubey et al., 2024), and Llama3.2-3B (Dubey et al., 2024). We evaluated the accuracy (Acc) on Test and the out-of-distribution accuracy (Acc-OOD) on Test-OOD. All experiments are full fine-tuning for one epoch with a learning rate of 1e-5. The experimental results are presented in Table 5.
+
+The experimental results show that BT significantly outperforms CE in terms of in-domain accuracy, highlighting the advantages of using BT for modeling. Furthermore, we observe a slight performance improvement in BT as model size increases; however, the improvements remains relatively small. We attribute this to the limited dataset size, which hinders the emergence of clear scaling properties. In addition, we observe that CE shows poor performance in scenarios with a significant domain gap, and its accuracy is almost the same as random guessing. In contrast, the BT model achieves approximately a $5\%$ improvement in such cases, although its overall performance remains limited. We believe this is due to the significant domain gap between the leandojoenchmark and Lean-Github datasets, making the task inherently challenging. (Note: In our main text, both datasets were included in the training set to mitigate the gap with miniF2F.)
+
+Table 5: Results between BE and CE of different models.
+
+
Model
Method
Acc (%)
Acc-OOD (%)
Qwen-2.5-0.5B (Qwen Team, 2024)
CE
63.2
50.9
BT
76.5
55.2
Llama3.2-1B (Dubey et al., 2024)
CE
67.4
52.2
BT
76.6
54.6
Llama3.2-3B (Dubey et al., 2024)
CE
63.0
50.7
BT
77.7
56.0
+
+# B.2 ANALYSIS OF DATA FILTERING
+
+In Section 3.2, we introduced a filtering step for the data constructed. Here we conduct experiments to analyze the necessity of this step. Specifically, we perform an ablation study on the filtering process using the Qwen-2.5-0.5B model (Qwen Team, 2024), comparing the model's performance before and after applying filtering. The results in Table 6 demonstrate that filtering improves the model's performance. We have presented examples of noise introduced by the absence of filtering in Figure 5, further highlighting the necessity of this step.
+
+Table 6: Ablation study of data filtering.
+
+
Method
Acc
Acc-OOD
Before filtering
76.2
54.9
After filtering
76.5
55.2
+
+The choice of $\tau$ represents a trade-off: setting it too high introduces excessive noisy data, while setting it too low reduces the number of training samples. To provide insight into the selection of $\tau$ , we analyze the similarity distribution of positive and negative samples before data filtering, as shown in Figure 7. The results reveal a bimodal distribution. Higher similarity values indicate a greater likelihood of noisy samples, leading us to hypothesize that one of the components corresponds to noise. Using Gaussian Mixture Model (GMM) analysis, we identify an approximate threshold of 0.87 to distinguish noisy samples. Consequently, the selection of 0.85 for $\tau$ in the main text is considered reasonable.
+
+
+Figure 7: The distribution of similarities between positive and negative samples.
+
+# C EXAMPLE SOLUTIONS
+
+We show several typical theorems proven by CARTS below.
+
+Case 1:mathd_algebra_148
+```txt
+theorem mathd_algebra_148 (c : $\mathbb{R}$ ) (f : $\mathbb{R} \to \mathbb{R}$ )
+ $(h_0: \forall x, f x = c * x^3 - 9 * x + 3)$ $(h_1: f 2 = 9): c = 3 :=$
+by
+rcases eq_or_ne c 1 with hc | hc
+cases c
+all_goals simp_all [h_0]
+on_goal 1 => norm_num at h_1
+linarith only [h_0, h_1]
+```
+
+Figure 8: Case 1. Proved theorem mathd_algebra_148 by CARTS in mini-F2F-test of ReProver-Lean 4 (Yang et al., 2023). This theorem is proved in 68 expansions.
+
+Case 2: mathd_numbertheory_234
+```txt
+theorem mathd_numbertheory_234
+(a b : N)
+(h0 : 1 ≤ a ∧ a ≤ 9 ∧ b ≤ 9)
+(h1 : (10 * a + b) ^ 3 = 912673) :
+a + b = 16 :=
+by
+simp only [Nat.one_le_iff_ne_zero] at h0
+obtain
:= h0
+interval_cases a <;> interval_cases b <;> simp_all
+```
+
+Figure 9: Case 2. Proved theorem mathd_numbertheory_234 by CARTS in mini-F2F-test of InternLM2-Plus-1.8B (Ying et al., 2024b). This theorem is proved in 12 expansions.
+
+Case 3: mathd_numbertheory_135
+```txt
+theorem mathd_numbertheory_135
+(n A B C : N)
+(h0 : n =3^17 +3^10)
+(h1 : 11 | (n +1))
+(h2 : [A,B,C].Pairwise (∅·))
+(h3 : {A,B,C} ⊆Fsubset.Icc 0 9)
+(h4 : Odd A ∧Odd C)
+(h5 : ¬3 | B)
+(h6 : Nat.digits 10 n = [B,A,B,C,C,A,C,B,A] : 100 *A +10 *B +C =129 := by
+rw [h0] at h1
+simp [h0] at h6
+linarith [h6]
+```
+
+Figure 10: Case 3. Proved theorem mathd_numbertheory_135 by CARTS in mini-F2F-test of InternLM2-Plus-1.8B (Yang et al., 2023). This theorem is proved in 38 expansions.
+
+Case 4: mathd_numbertheory_314
+```txt
+theorem mathd_numbertheory_314
+(r n : N)
+(h0 : r = 1342 % 13)
+(h1 : 0 < n)
+(h2 : 1342 | n)
+(h3 : n % 13 < r) :
+6710 ≤ n :=
+by
+obtain {k, hk} := h2
+contrapose! h1
+rw [hk] at h1
+have h2 : k < 5 := by linarith
+interval_cases k <> simp_all
+```
+
+Figure 11: Case 4. Proved theorem mathd_numbertheory_314 by CARTS in mini-F2F-test of StepProver (Wu et al., 2024). This theorem is proved in 159 expansions.
+
+Case 5: artin exercise_13_6_10
+```txt
+theorem exercise_13_6_10 {K : Type*} [Field K] [Fintype K^x] :
+(Π x : K^x, x) = -1 :=
+by
+have h : Πx : K^x, x = Πx : K^x, x^{-1-1} := by congr
+simp only [inv_inv] at h
+haveI : DecidableEq K := Classical.decEq K
+apply FiniteField.prod_univ.units_id_eq_neg_one
+```
+
+Figure 12: Case 5. Proved theorem artin exercise_13_6_10 by CARTS in ProofNet of StepProver (Wu et al., 2024). This theorem is proved in 119 expansions.
\ No newline at end of file
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/images.zip b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a6d591ef91eb7bd7b74faf008cf077a4f97d0687
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:345195371df466e68d908ab96ee6180fa796cedab52e7822547136dc3c922d4a
+size 512287
diff --git a/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/layout.json b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..502382dfe29928f2995d82cae0eeb892037fd114
--- /dev/null
+++ b/ICLR/2025/CARTS_ Advancing Neural Theorem Proving with Diversified Tactic Calibration and Bias-Resistant Tree Search/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b29fed1ebc61ace05258ecdbc5eaa387269241fa961b91fc5025a9334c7f6a30
+size 468442
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_content_list.json b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..da9d5c56a9fa5573e27fad4622c3a22d79ea17e4
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5e8c4baa67936dc0043956859bb6d15ce5e5b80f1aabd7456824ec1e12568b4c
+size 134361
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_model.json b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..599b2dd0901a10cd3a529470b10061b6889c1c9d
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0c5fd90cba23fa869f140a38f4527093c8e1cecba0db5a28e7c95b83184c7267
+size 152487
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_origin.pdf b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..8a62836d1eaf3fc828cd00409154f2298b2ab660
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/743978f8-fab9-4cc0-a3fe-53f1531565d4_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7fd7a1721c319f228e3d924450426c9018f0cecc551696c67c0c19e224a92a74
+size 17360390
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/full.md b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..f038c6dd659886cc13941ce3d00f13a1e655663e
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/full.md
@@ -0,0 +1,437 @@
+# CAT-3DGS: A CONTEXT-ADAPTIVE TRIPLANE APPROACH TO RATE-DISTORTION-OPTIMIZED 3DGS COMPRESSION
+
+Yu-Ting Zhan\*, Cheng-Yuan Ho\*, Hebi Yang\*, Yi-Hsin Chen\*, Jui Chiu Chiang\* Yu-Lun Liu\*, Wen-Hsiao Peng\*
+
+$^{1}$ National Yang Ming Chiao Tung University, Taiwan
+$^{2}$ National Chung Cheng University, Taiwan
+{dotori25.i12, kelvinhe0218.cs12}@nycu.edu.tw
+{mrrrIMAGE32.cs13, yhchen12101.cs09}@nycu.edu.tw
+rachel@ccu.edu.tw
+{yulunliu,wpeng}@cs.nycu.edu.tw
+* Contributed equally
+
+
+
+
+(e) Rate-distortion Comparison
+
+
+
+
+(c) View Frequency-aware Masking
+
+
+(d) PCA-guided Triplanes
+Figure 1: Comparison of the proposed CAT-3DGS and HAC (Chen et al., 2024). CARM: Channelwise Autoregressive Models. SARM: Spatial Autoregressive Models.
+
+# ABSTRACT
+
+3D Gaussian Splitting (3DGS) has recently emerged as a promising 3D representation. Much research has been focused on reducing its storage requirements and memory footprint. However, the needs to compress and transmit the 3DGS representation to the remote side are overlooked. This new application calls for rate-distortion-optimized 3DGS compression. How to quantize and entropy encode sparse Gaussian primitives in the 3D space remains largely unexplored. Few early attempts resort to the hyperprior framework from learned image compression. But, they fail to utilize fully the inter and intra correlation inherent in Gaussian primitives. Built on ScaffoldGS, this work, termed CAT-3DGS, introduces a context-adaptive triplane approach to their rate-distortion-optimized coding. It features multi-scale triplanes, oriented according to the principal axes of Gaussian primitives in the 3D space, to capture their inter correlation (i.e. spatial correlation) for spatial autoregressive coding in the projected 2D planes. With these triplanes serving as the hyperprior, we further perform channel-wise autoregressive coding to leverage the intra correlation within each individual Gaussian prim
+
+itive. Our CAT-3DGS incorporates a view frequency-aware masking mechanism. It actively skips from coding those Gaussian primitives that potentially have little impact on the rendering quality. When trained end-to-end to strike a good rate-distortion trade-off, our CAT-3DGS achieves the state-of-the-art compression performance on the commonly used real-world datasets.
+
+# 1 INTRODUCTION
+
+3D Gaussian Splatting (3DGS) (Kerbl et al., 2023) has emerged as a promising representation for 3D scenes. It lends itself to novel view synthesis particularly within differentiable rendering frameworks. Unlike Neural Radiance Fields (NeRF) (Mildenhall et al., 2021), which require many sampling points per pixel for volumetric rendering, 3DGS, as a rasterization-based method, uses 3D Gaussians as geometric primitives, achieving greater efficiency for real-time rendering and the state-of-the-art rendering quality.
+
+Despite these advantages, the redundancy inherent in the 3DGS representation has prompted new research directions. Many prior works have been focused on a compact representation of Gaussian primitives. This category of methods aim at minimizing the parameter count or quantizing parameters to save storage space and memory footprint. These techniques include pruning insignificant Gaussian primitives (Lee et al., 2024; Fan et al., 2023; Girish et al., 2024; Ali et al., 2024; Wang et al., 2024a), vector quantizing their attributes (Lee et al., 2024; Fan et al., 2023; Navaneet et al., 2023; Niedermayr et al., 2024; Wang et al., 2024a; Morgenstern et al., 2023), developing compact latent representations for attributes (Girish et al., 2024), and representing sparse Gaussian primitives in a more structural way (Lu et al., 2024; Ren et al., 2024; Sun et al., 2024). However, most of them overlook the needs to transmit the compressed 3DGS representation to the remote side, which calls for entropy coding and rate-distortion-optimized compression.
+
+Recently, the rate-distortion-optimized compression for 3DGS started to attract attention. Unlike the compact 3DGS representation, this new school of thought (Wang et al., 2024a; Liu et al., 2024; Chen et al., 2024; Wang et al., 2024b) aims to strike an optimized trade-off between the compressed bit rate and rendering image quality in an end-to-end manner. Built on the vanilla 3DGS representation, RDO-Gaussian (Wang et al., 2024a) adopts the entropy-constrained vector quantization to quantize the attributes (e.g. opacity, scales, rotations and colors) of each Gaussian primitive. Instead of performing vector quantization, HAC (Chen et al., 2024) and ContextGS (Wang et al., 2024b) turn to the ScaffoldGS (Lu et al., 2024) representation to perform scalar quantization with respect to the latent features of these attributes, a technique analogous to the well-established transform coding plus scalar quantization for image/video compression. To entropy encode the quantized features, both introduce the hyperprior from learned image compression (Ballé et al., 2018) to model their coding probabilities. In formulating the hyperprior, HAC (Chen et al., 2024) draws inspiration from BiRF (Shin & Park, 2024) to create multi-scale binary hash grids (Figure 1 (a)), whereas ContextGS learns a separate feature as the hyperprior for each individual Gaussian primitive. Both assume the components of the hyperprior are independent and identically distributed, in coding the hyperprior. Notably, ContextGS organizes Gaussian primitives in the 3D space in a hierarchical manner in order to benefit from the contextual coding of the quantized latent features. In this regard, CompGS (Liu et al., 2024) shares parallels with ContextGS.
+
+This work introduces a novel rate-distortion-optimized compression framework for 3DGS (Figure 1 (b)). First, motivated by the tensor decomposition (Fridovich-Keil et al., 2023), we project the unorganized Gaussian primitives in the 3D space onto a set of multi-scale triplanes. These triplanes, oriented according to the principal components of the Gaussian primitives (Figure 1 (d)), serve as the hyperprior for coding their attributes in the latent space. Because they capture largely the inter correlation (i.e. spatial correlation) between the Gaussian primitives in the 3D space, we are able to encode efficiently the triplane-based hyperprior by spatial autoregressive models. This design aspect differs significantly from most existing techniques, in which the hyperprior is assumed to be factorial. Second, given that our triplane-based hyperprior has exploited much of the inter correlation between the Gaussian primitives, we decouple their coding dependency and encode their latent features independently by channel-wise autoregressive models. This avoids the challenge of having to organize sparse Gaussian primitives in the 3D space to leverage their inter correlation. Moreover, the intra correlation within each individual Gaussian primitive is explored for coding. Lastly, we
+
+
+Figure 2: Taxonomy of the rate-distortion-optimized 3DGS compression.
+
+develop a view frequency-aware masking mechanism, skipping from coding the Gaussian primitives that contribute little to the rendering quality (Figure 1 (c)). To sum up, our contributions include:
+
+- A triplane-based hyperprior that leverages the inter correlation (i.e. spatial correlation) between Gaussian primitives in the 3D space for efficient spatial autoregressive coding.
+- A channel-wise autoregressive model with uneven slice partition that exploits the intra correlation within each individual Gaussian primitive to further improve coding efficiency.
+- A view frequency-aware masking mechanism that evaluates the significance of Gaussian primitives based on their impact on the rendering quality to skip less critical ones from coding.
+
+With these novel elements, our scheme, called CAT-3DGS, is able to achieve the state-of-the-art rate-distortion performance on several commonly used real-world datasets (Figure 1 (e)).
+
+# 2 RELATED WORK
+
+The related work can be divided into two main categories: the compact 3DGS representation and the rate-distortion-optimized 3DGS compression.
+
+Compact 3DGS Representation. This category of methods, being a weak form of compression, aims to make more compact the 3DGS representation by pruning, quantizing, or structuring Gaussian primitives. Typical methods that involve pruning include Compact3DGS (Lee et al., 2024), LightGaussian (Fan et al., 2023), EAGLES (Girish et al., 2024), and Trimming the fat (Ali et al., 2024). Compact3DGS features a learnable binary mask and a mask loss to suppress less critical Gaussian primitives during training. In contrast, LightGaussian and EAGLES adopt a post-processing strategy to remove less significant Gaussians based on score-based criteria. In a similar vein, Trimming the fat (Ali et al., 2024) performs pruning progressively. Other methods that involve structuring sparse Gaussian primitives are ScaffoldGS (Lu et al., 2024), OctreeGS (Ren et al., 2024), and F3DGS (Sun et al., 2024). For instance, ScaffoldGS takes an anchor-based approach, where each anchor represents a group of Gaussian primitives whose attributes are represented collectively by a latent feature vector.
+
+Rate-distortion-optimized 3DGS Compression. This emerging research area targets the generation and coding of Gaussian primitives in an end-to-end and rate-distortion-optimized manner. Figure 2 presents a taxonomy for methods in this category, including RDO-Gaussian (Wang et al., 2024a), CompGS (Liu et al., 2024), ContextGS (Wang et al., 2024b), and HAC (Chen et al., 2024). Unlike the compact 3DGS representation, these compression techniques involve entropy coding the quantized Gaussian primitives. One central theme is how to predict the probability distributions of the coding features and/or attributes. To this end, some (Chen et al., 2024; Liu et al., 2024; Wang et al., 2024b) borrow the idea of hyperprior from learned image compression to model the distributions of the latent features of Gaussian primitives. One exception is RDO-Gaussian (Wang et al., 2024a), which applies entropy-constrained vector quantization to the Gaussian attributes. As opposed to HAC (Chen et al., 2024) and CompGS (Liu et al., 2024), ContextGS (Wang et al., 2024b) additionally introduces contextual coding in the latent space to leverage the inter correlation between Gaussian primitives. In common, all these schemes consider the hyperprior to be factorial. From Figure 2, our CAT-3DGS represents a novel attempt that makes use of both inter and intra
+
+correlation for coding Gaussian primitives. In terms of the use of inter correlation, it differs from ContextGS (Wang et al., 2024b) and CompGS (Liu et al., 2024) in performing spatial autoregressive coding in the hyperprior domain, which is made possible with our triplane-based hyperprior. More than that, it makes full use of the intra correlation within each individual Gaussian primitive by performing channel-wise autoregressing coding in the latent domain, which is first proposed for 3DGS compression.
+
+# 3 PRELIMINARY
+
+ScaffoldGS (Lu et al., 2024) builds upon 3DGS (Kerbl et al., 2023) and introduces a storage-efficient, anchor-based representation of 3D Gaussian primitives. Instead of directly storing a large number of Gaussian primitives and their attributes, ScaffoldGS introduces the notion of anchor points, with each representing a cluster of Gaussian primitives. The attributes of a Gaussian primitive include its 3D position $\mu^g$ , scale $s$ , rotation $r$ , spherical harmonic coefficients $c$ , and opacity $\alpha$ . Likewise, each anchor is characterized by its position $x$ , latent feature $f$ , scaling factor $l$ , and $K$ learnable offsets $\{O_i\}_{i=1}^K$ . The latent feature $f$ encodes the attributes of the Gaussian primitives attached to the same anchor, effectively reducing the data redundancy. The learnable offsets indicate their relative positions with respect to that of the anchor.
+
+With ScaffoldGS, rendering a 2D image involves decoding the view-dependent attributes for all the Gaussians primitives from an anchor representation according to the anchor feature $\pmb{f}$ and camera position $\pmb{x}_c$ :
+
+$$
+\left\{\boldsymbol {c} _ {i}, \boldsymbol {r} _ {i}, \boldsymbol {s} _ {i}, \boldsymbol {\alpha} _ {i} \right\} _ {i = 1} ^ {K} = F _ {S} (\boldsymbol {f}, \boldsymbol {\sigma} _ {c}, \vec {\boldsymbol {d}} _ {c}), \tag {1}
+$$
+
+where $\sigma_{c} = \| (\pmb{x} - \pmb{x}_{c})\|_{2}$ , $\vec{d_c} = \pmb{x} - \pmb{x}_c / \| \pmb{x} - \pmb{x}_c\|_2$ , and $F_{S}$ is an MLP decoder. The position $\mu_i^g$ of a Gaussian in the cluster is evaluated by adding the anchor position $\pmb{x}$ to the offsets $O_{i}$ regularized by the scaling factor $l$ , as follows:
+
+$$
+\left\{\boldsymbol {\mu} _ {i} ^ {g} \right\} _ {i = 1} ^ {K} = \boldsymbol {x} + \left\{\boldsymbol {O} _ {i} \right\} _ {i = 1} ^ {K} \cdot \boldsymbol {l}. \tag {2}
+$$
+
+Given these parameters, the rendering process proceeds similarly to 3DGS (Kerbl et al., 2023).
+
+# 4 PROPOSED METHOD: CAT-3DGS
+
+Based on ScaffoldGS, this work (termed CAT-3DGS) introduces a content-adaptive triplane approach to coding the anchors' attributes (i.e. the latent feature $f \in \mathbb{R}^{50}$ , scaling factor $l \in \mathbb{R}^6$ , and offsets $\{O_i \in \mathbb{R}^3\}_{i=1}^K$ ) in an end-to-end, rate-distortion-optimized fashion. Our CAT-3DGS adopts a hyperprior framework to model the probability distributions of the anchors' attributes. Because of the unordered and sparse nature of the anchor points, which collectively form an unorganized point cloud in the 3D space, we project them onto the multi-scale, dense triplanes oriented according to the principal components of the anchor points. As such, our triplane-based hyperprior organizes the projected anchor points in an ordered way on the 2D triplanes. This enables us to use spatial autoregressive models to exploit their inter correlation (i.e. spatial correlation) for better entropy coding the hyperprior itself and thus the anchors' attributes. In comparison, the 3D hash-based grid hyperprior (Chen et al., 2024), although compact, is not able to exploit such inherent inter correlation due to the pseudo random mapping between the dense grid points and their hyperprior representations in the hash table. In addition, CAT-3DGS features a channel-wise contextual coding scheme to leverage the intra correlation among the components of individual latent features $f$ for their coding. Lastly, we incorporate a view frequency-aware masking mechanism to skip from coding those Gaussian primitives that contribute little to the rendering quality in different views.
+
+# 4.1 SYSTEM OVERVIEW
+
+Figure 3 illustrates our CAT-3DGS framework. The encoding of a 3D scene begins with the generation of the anchor points characterized by their positions $\pmb{x} \in \mathbb{R}^3$ and attributes, including the latent feature $\pmb{f} \in \mathbb{R}^{50}$ , offsets $\{O_i \in \mathbb{R}^3\}_{i=1}^K$ and scaling $l \in \mathbb{R}^6$ . Given the geometry information $\pmb{x}$ of the anchor points, we formulate multi-scale, dense triplanes by conducting a principal component analysis. These triplanes consist of regularly structured grid points, which are quantized and coded by our lightweight spatial autoregressive models (Sec. 4.2). They serve the purpose of
+
+
+Figure 3: Illustration of our CAT-3DGS framework. CARM: Channel-wise Autoregressive Models. SARM: Spatial Autoregressive Models.
+
+the hyperprior, and are queried and decoded to arrive at the coding distributions of the learned attributes associated with an anchor point according to its position $\pmb{x}$ (Sec. 4.2). Considering that the latent features $\pmb{f}$ collectively constitute a large portion of the compressed bitstream, they each are encoded recursively by channel-wise autoregressive coding (Sec. 4.4). During the learning process, our view frequency-aware masking mechanism is incorporated to mask out the Gaussian primitives which have a minimal impact on the rendering quality (Sec. 4.5). With CAT-3DGS, the information to be compressed in the bitstream include (a) the triplanes, (b) the anchors' attributes and positions, (c) the binary mask, (d) the network weights of the MLP decoder $F_{s}$ , spatial autoregressive model $F_{ARM}$ , hyperprior decoder $F_{tri}$ , and channel-wise autoregressive model $F_{ch}$ . The anchors' positions $\pmb{x}$ and the network weights are signaled in 16-bit and 32-bit floating-point formats, respectively. The binary mask is entropy encoded.
+
+The rendering of a 2D image proceeds in much the same way as Scaffold-GS (Lu et al., 2024). Specifically, we use an MLP decoder $F_{S}$ to decode the coded latent feature $\hat{f}$ of an anchor point to obtain the attributes (i.e. color, opacity, rotation, scale) of all the Gaussian primitives belonging to the same anchor. Accordingly, the coded offsets $\{\hat{O}_i\}_{i=1}^K$ and scaling $\hat{l}$ are combined with the anchor's position $x$ to reconstruct their positions. The same decoding process is repeated for the remaining anchor points needed to render the 2D image of a specific viewpoint.
+
+# 4.2 TRIPLANE-BASED HYPERPRIOR
+
+Our triplane-based hyperprior aims to learn the prior distributions on the attributes (the latent features $f$ , offsets $\{O_i\}_{i=1}^K$ and scaling $l$ ) of the anchor points. Conceptually, a triplane is composed of three 2D planes, denoted as $\mathcal{P}_c$ , $c \in \{xy, yz, zx\}$ , of the same 2D spatial resolution and channel dimension (See Figure 1 (b)). The notion of triplanes originates from decomposing a dense, 3D grid, which is costly to represent, into three 2D planes, which are storage friendly yet with more restricted expressiveness. Each grid point in these 2D planes is a learnable parameter. Our CAT-3DGS learns multiple triplanes of various resolutions to capture both coarse and fine detail. We thus augment $\mathcal{P}_c$ with an upsampling scale $r$ as $\mathcal{P}_{r,c} \in \mathbb{R}^{ch \times rB \times rB}$ , where $ch$ denotes the number of channels, $r$ are integers denoting the upsampling scales and $B$ denotes the spatial resolution of the triplane at the lowest scale (i.e. $r = 1$ ).
+
+To retrieve the hyperprior $h(\pmb{x})$ for an anchor point $\pmb{x}$ in the 3D space, we project $\pmb{x}$ onto each 2D plane $\mathcal{P}_{r,c}$ , with the projected 2D coordinates given by $\pi_{r,c}(\pmb{x})$ . When $\pi_{r,c}(\pmb{x})$ is fractional, we interpolate between the nearest integer grid points with an interpolation kernel $\psi$ to get the triplane feature. In symbols, we have $\psi(\mathcal{P}_{r,c}, \pi_{r,c}(\pmb{x}))$ . The same process is repeated for every combination of permissible $r$ and $c$ , with the resulting triplane features concatenated to formulate the hyperprior
+
+$h(\pmb {x})$ ..
+
+$$
+h (\boldsymbol {x}) = \bigcup_ {r} \bigcup_ {c \in \{x y, y z, z x \}} \psi \left(\mathcal {P} _ {r, c}, \pi_ {r, c} (\boldsymbol {x})\right). \tag {3}
+$$
+
+In doing so, we notice that $\pmb{x}$ may potentially be unbounded. However, the spatial resolutions of the triplanes must be bounded, because these triplanes need to be signaled in the bitstream. With their finite spatial resolutions, a contraction function (Barron et al., 2022b) is applied in order to fit the potentially unbounded $\pmb{x}$ to our bounded triplanes:
+
+$$
+\operatorname {c o n t r a c t} (\boldsymbol {x}) = \left\{ \begin{array}{l l} \boldsymbol {x} & \text {i f} \| \boldsymbol {x} \| \leq 1 \\ (2 - \frac {1}{\| \boldsymbol {x} \|}) \left(\frac {\boldsymbol {x}}{\| \boldsymbol {x} \|}\right) & \text {i f} \| \boldsymbol {x} \| > 1. \end{array} \right. \tag {4}
+$$
+
+Careful examination of Eq. (4) reveals that $\pmb{x}$ needs to be normalized in order to minimize the impact of the non-linear scaling applied to $\pmb{x}$ with $\| \pmb{x} \| > 1$ while maximizing the usage of the grid points in each triplane to represent those $\pmb{x}$ with $\| \pmb{x} \| \leq 1$ . To this end, we conduct a principal component analysis (PCA) with respect to the positions $\pmb{x}$ of the anchor points, performing a linear transformation $T(\pmb{x})$ of $\pmb{x}$ before it is contracted with Eq. (4). More specifically, $T(\pmb{x})$ is given by
+
+$$
+\boldsymbol {x} ^ {\prime} = T (\boldsymbol {x}) = \operatorname {c o n t r a c t} \left(\frac {\boldsymbol {R} ^ {\boldsymbol {x}} \left(\boldsymbol {x} - \boldsymbol {\mu} ^ {\boldsymbol {x}}\right)}{\boldsymbol {\sigma} ^ {\boldsymbol {x}}}\right), \tag {5}
+$$
+
+where $\pmb{\mu}^{\pmb{x}}\in \mathbb{R}^{3}$ is the mean vector, $\sigma^x\in \mathbb{R}^3$ are the variances along the three principal axes, and $\pmb{R}^{\pmb{x}}\in \mathbb{R}^{3\times 3}$ is the PCA rotation matrix. As illustrated in Figure 1 (d), this transformation centers the point cloud of the anchor points, allowing most of the central anchor points to be linearly scaled. We finally substitute $T(\pmb {x})$ into Eq. (3) to evaluate the hyperprior $h(x^{\prime})$
+
+To entropy encode (or decode) the quantized attributes $\hat{\pmb{a}}\in \{\hat{f}_1,\{\hat{O}_i\} ,\hat{l}\}$ ) of an anchor, an MLP $F_{tri}$ is used to decode $h(\pmb{x}^{\prime})$ to predict their means, variances, and quantization step size. That is, $(\pmb {\mu},\pmb {\sigma},q) = F_{tri}(h(\pmb{x}^{\prime}))$ . Notably, each of these attributes is assumed to follow a Gaussian distribution, with their coding probabilities given by
+
+$$
+p \left(\hat {\boldsymbol {a}} \mid h \left(\boldsymbol {x} ^ {\prime}\right)\right) = \int_ {\hat {\boldsymbol {a}} - \frac {q}{2}} ^ {\hat {\boldsymbol {a}} + \frac {q}{2}} \mathcal {N} (\boldsymbol {\mu}, \boldsymbol {\sigma}) d \boldsymbol {a}. \tag {6}
+$$
+
+The acute reader may have observed that only part of the latent feature $\hat{f}$ is involved in Eq. (6). The coding of the remaining part (i.e. $\hat{f}_2, \hat{f}_3, \ldots$ ) will be elaborated in Sec. 4.4.
+
+# 4.3 SPATIAL AUTOREGRESSIVE MODELS (SARM) FOR TRIPLANE CODING
+
+The triplane-based hyperprior must be encoded into the bitstream. Observing that the grid points in each 2D plane capture to a large extent the inter correlation (i.e. spatial correlation) between the anchor points in the 3D space, we introduce spatial autoregressive models for triplane coding. Currently, a dedicated autoregressive model $F_{ARM}$ is learned and shared for 2D planes $\mathcal{P}_{r,c}$ of the same orientation $c \in \{xy, yz, zx\}$ without regard to its upsampling scale $r$ . Thus, a total of three $F_{ARM}$ , one for each orientation, are learned. Moreover, the 2D plane $\mathcal{P}_{r,c}$ has $ch$ channels. These channels are encoded (and decoded) independently of each other with the same $F_{ARM}$ to strike a balance between complexity and coding efficiency. In fact, all the channels from these 2D planes $\mathcal{P}_{r,c}$ can be encoded (and decoded) in parallel.
+
+To entropy encode (and decode) a grid point $y_{i,j,k}$ in the channel $k$ of the 2D plane $\mathcal{P}_{r,c}$ , $F_{ARM}$ formulates the context $c_{i,j,k}$ by referring to the previously decoded grid points of the same channel in the neighborhood specified by $c_{i,j,k} = [\hat{y}_{i-2:i-1,j-2:j+2,k};\hat{y}_{i,j-2:j-1,k}]$ (Figure 3 (e)). It outputs the parameters $(\mu_{i,j,k},\sigma_{i,j,k}) = F_{ARM}(c_{i,j,k})$ of a Laplace distribution that models the distribution of $y_{i,j,k}$ . The coding probability of the quantized grid point $\hat{y}_{i,j,k}$ is then given by
+
+$$
+p \left(\hat {y} _ {i, j, k} \mid c _ {i, j, k}\right) = \int_ {\hat {y} _ {i, j, k} - \frac {Q}{2}} ^ {\hat {y} _ {i, j, k} + \frac {Q}{2}} \operatorname {L a p l a c e} \left(\mu_ {i, j, k}, \sigma_ {i, j, k}\right) d y _ {i, j, k}, \tag {7}
+$$
+
+where $Q = 1 / 16$ is the quantization step size. This small quantization step is chosen to make the training more stable when the training process transitions from the non-quantization-aware training to the quantization-aware training.
+
+# 4.4 CHANNEL-WISE AUTOREGRESSIVE MODELS (CARM) FOR FEATURE CODING
+
+The coding of the latent features $\pmb{f}$ deserves additional effort as they normally represent a considerable portion of the compressed bitstream. For efficient feature coding, we leverage the intra correlation among the components of a feature $\pmb{f}$ . We divide every individual feature $\pmb{f}$ into $M$ slices along the channel dimension, followed by introducing a channel-wise autoregressive models for coding these slices. The coding of slice $\pmb{f}_{m}$ with $m > 1$ is able to benefit from referring to the previous coded slices, i.e. $\{\pmb{f}_i|i < m\}$ , and the hyperprior. In symbols, we have the coding probability of the quantized slice $\hat{\pmb{f}}_m$ as
+
+$$
+p \left(\hat {\boldsymbol {f}} _ {\boldsymbol {m}} \mid h \left(\boldsymbol {x} ^ {\prime}\right), \hat {\boldsymbol {f}} _ {\boldsymbol {0}: \boldsymbol {m} - 1}\right) = \int_ {\hat {\boldsymbol {f}} _ {\boldsymbol {m}} - \frac {q}{2}} ^ {\hat {\boldsymbol {f}} _ {\boldsymbol {m}} + \frac {q}{2}} N \left(\boldsymbol {\mu} + \boldsymbol {\mu} _ {\boldsymbol {c h}}, \boldsymbol {\sigma} + \boldsymbol {\sigma} _ {\boldsymbol {c h}}\right) d \boldsymbol {f}, \tag {8}
+$$
+
+where $(\pmb{\mu}, \pmb{\sigma}, q) = F_{tri}(h(\pmb{x}'))$ and $(\pmb{\mu}_{ch}, \pmb{\sigma}_{ch}) = F_{ch}(\hat{\pmb{f}}_{0:m-1})$ . In our design, the slices are unevenly partitioned, with further details provided in Sec. 5.3.
+
+# 4.5 VIEW FREQUENCY-AWARE MASKING
+
+Our view frequency-aware masking is designed to distinguish between Gaussian primitives in terms of their potential contribution to the rendering quality. As observed in Compact-3DGS (Lee et al., 2024) and HAC (Chen et al., 2024), using a learnable binary mask $M_{n,k}$ to mask out the $k$ -th Gaussian primitive of the $n$ -th anchor can be effective in reducing the number of Gaussian primitives to be signaled, thereby saving the storage space and transmission bandwidth. This masking mechanism is usually implemented as $M_{n,k} = \mathbb{1}(\text{sigmoid}(m_{n,k}) > \epsilon)$ , where $m_{n,k}$ is a learnable parameter and $\epsilon$ is a global hyperparameter shared across every Gaussian primitive to determine its existence. Although effective, this blind approach may risk removing some critical Gaussian primitives. A question that arises naturally is whether we could prioritize Gaussian primitives in the masking process according to their potential contribution to the rendering quality. We observe that during training, some Gaussian primitives are more frequently used in rendering the training views. As such, we attach to each Gaussian primitive a weight $p_{n,k}$ that reflects its relative frequency of being used in rendering these training views. We adopt $p_{n,k}$ in our masking function:
+
+$$
+M _ {n, k} = \mathbb {1} (\operatorname {s i g m o i d} \left(m _ {n, k}\right) \cdot p _ {n, k} > \epsilon). \tag {9}
+$$
+
+With the same $\epsilon$ applied to every Gaussian primitive, a higher $p_{n,k}$ requires sigmoid $(m_{n,k})$ to approach zero more closely in order to skip the corresponding Gaussian primitive, making the task more difficult. As a result, more Gaussian primitives that are critical to rendering the training views are retained. For this scheme to work well, the basic premise is that the distribution of training views should be similar to that of test views. We argue that this is true to some extent because when their distributions differ significantly, there is little guarantee of the rendering quality in those test views.
+
+# 4.6 TRAINING OBJECTIVES
+
+The training of CAT-3DGS involves minimizing the rate-distortion cost $L_{\mathrm{Scaffold}} + \lambda_r L_{\mathrm{rate}}$ together with a masking loss $\lambda_m L_m$ :
+
+$$
+L = L _ {\text {S c a f f o l d}} + \lambda_ {r} L _ {\text {r a t e}} + \lambda_ {m} L _ {m}, \tag {10}
+$$
+
+where we follow Scaffold-GS Lu et al. (2024) to evaluate $L_{\mathrm{Scaffold}}$ , which includes the distortion between the original and rendered images as well as a regularization term imposed on the scales $s$ of Gaussian primitives. $L_{\mathrm{rate}}$ indicates the number of bits needed to signal the hyperprior and the anchors' attributes:
+
+$$
+L _ {\text {r a t e}} = \frac {1}{N (5 0 + 6 + 3 K)} \left(L _ {\text {r a t e}} ^ {\mathcal {A}} + \lambda_ {\text {t r i}} L _ {\text {r a t e}} ^ {\mathcal {P}}\right), \tag {11}
+$$
+
+where $L_{\mathrm{rate}}^{\mathcal{A}} = -\sum_{\hat{\boldsymbol{a}}} \log_2 p(\hat{\boldsymbol{a}})$ is the estimated bit rate of the anchors' attributes, $L_{\mathrm{rate}}^{\mathcal{P}} = -\sum_{\hat{y}} \log_2 p(\hat{y})$ is the triplanes' bit rate, and $N(50 + 6 + 3K)$ is the total number of parameters of anchors' attributes. In Eq. (10), $L_{m}$ is the mask loss adopted from Compact3DGS (Lee et al., 2024) to regularize the view frequency-aware masking:
+
+$$
+L _ {m} = \sum_ {n = 1} ^ {N} \sum_ {k = 1} ^ {K} \operatorname {s i g m o i d} \left(m _ {n, k}\right). \tag {12}
+$$
+
+
+
+
+
+
+Total Size (MB)
+
+
+
+
+
+
+Figure 4: Rate-distortion comparison of our CAT-3DGS, HAC, ContextGS, RDO-Gaussian, CompGS, and several other compact 3DGS representations (normally without entropy coding and visualized as rate-distortion points).
+
+
+(a) Reference image (The scene bicycle from Mip-NeRF 360 dataset)
+
+
+
+
+
+
+
+
+(a) Reference image (The scene amstderdam from BungeeNeRF dataset)
+Figure 5: Qualitative results of our CAT-3DGS, HAC and ScaffoldGS.
+
+
+(27.10 dB/243 MB)
+
+
+(b)ScaffoldGS
+
+
+(c) HAC
+(27.25 dB / 31.84 MB)
+
+
+(d) Ours (CAT-3DGS)
+(27.57 dB / 31.98 MB)
+
+In particular, $\lambda_{m} = \max (10^{-3}, 0.3 \cdot \lambda_{r})$ changes with the rate parameter $\lambda_{r}$ . Further details about this design aspect are provided in Appendix B.
+
+# 5 EXPERIMENTAL RESULTS
+
+# 5.1 IMPLEMENTATION DETAILS
+
+This part summarizes some crucial implementation details for reproducibility. First, the spatial resolution $B$ of the triplane at the lowest scale ( $r = 1$ ) is determined in proportional to the number of anchor points obtained after 10k training iterations. The choices of the other hyperparameters include: the channel number $ch = 72$ , $\epsilon = 0.01$ (0.0004 for BungeeNeRF) for the view frequency-aware masking, $M = 4$ with uneven slices (5, 10, 15, 25) for the channel-wise autoregressive coding. The rate parameter $\lambda_r$ ranges from 0.002 to 0.04, and from 0.001 to 0.02 for BungeeNeRF. Lastly, our triplanes have only two scales; that is, $r = 1, 2$ .
+
+# 5.2 RATE-DISTORTION COMPARISON
+
+Baselines. For comparison, our baseline methods include (1) the vanilla 3DGS, (2) ScaffoldGS (our base model), and (3) four rate-distortion-optimized approaches—namely, HAC (Chen et al., 2024), RDO-Gaussian (Wang et al., 2024a), CompGS (Liu et al., 2024), and ContextGS (Wang et al., 2024b). Notably, ContextGS is a concurrent work of our CAT-3DGS. Due to the emerging nature of the rate-distortion-optimized 3DGS compression, there are only few early attempts. We thus also include for comparison several compact 3DGS techniques without joint rate-distortion-optimized training (Lee et al., 2024; Fan et al., 2023; Niedermayr et al., 2024; Navaneet et al., 2023; Morgenstern et al., 2023; Girish et al., 2024; Ali et al., 2024). Generally, these techniques do not consider entropy coding. They are visualized as individual rate-distortion points in our rate-distortion plots.
+
+
+Figure 6: (a) Rate-distortion curves comparing our triplanes and the binary hash grids in HAC. (b) Rate-distortion curves comparing our SARM with the factorized model (FM).
+
+
+
+
+
+
+
+Datasets. We follow the common test protocol to test our CAT-3DGS on real-world scenes, including Mip-NeRF 360 (Barron et al., 2022a), Tanks & Temples (Knapitsch et al., 2017), Deep Blending (Hedman et al., 2018) and BungeeNeRF (Xiangli et al., 2022). For comparison, we choose the same scenes from each dataset as those used in the prior works (Lu et al., 2024; Chen et al., 2024).
+
+Metrics. We compare the rate-distortion performance of the competing methods by visualizing their rate-distortion plots. The quality metric is PSNR measured in the RGB domain. The bit rate is the file size of the compressed bitstream obtained by performing entropy encoding. When reporting the rate-distortion results for a dataset, we take the average of the per-sequence PSNRs and file sizes. In our ablation study, we additionally report the BD-rate saving (Bjontegaard, 2001) to single out the contribution of individual components. In particular, the BD-rate saving is evaluated for each test scene and averaged across all the scenes in the dataset. Negative values suggest rate saving at the same quality level as compared to the anchor (a chosen baseline method) and vice versa. Note that evaluating the BD-rate requires at least 4 rate-distortion points and largely overlapping distortion intervals. We thus use it only in our ablation study.
+
+Compression Results. In Figure 4, our CAT-3DGS outperforms the competing methods (particularly those rate-distortion-optimized ones) across all the datasets, achieving the state-of-the-art rate-distortion performance. On the Mip-NeRF 360 dataset, our CAT-3DGS achieves (at its second highest rate point) $78 \times$ and $26 \times$ rate reductions than 3DGS and ScaffoldGS, respectively, while achieving slightly higher PSNR by $0.16 \mathrm{~dB}$ . Figure 5 offers the subjective quality comparison among ScaffoldGS, HAC, and our CAT-3DGS. On the bicycle scene, our CAT-3DGS achieve a $57\%$ size reduction while showing similar visual quality to HAC. Likewise, on the amsterdam scene, it achieves $0.32 \mathrm{~dB}$ higher PSNR and better subjective quality than HAC, but with a similar file size.
+
+# 5.3 ABLATION EXPERIMENTS
+
+We conduct ablation experiments on the Mip-NeRF360 dataset for its diverse scenes.
+
+Triplanes versus Binary Hash Grids. This study investigates the benefits of our triplane-based hyperprior. Based on the HAC framework, we change its hyperprior from the binary hash grids to our multi-scale triplanes with spatial autoregressive coding. The remaining components and training procedure are the same as HAC. From Figure 6 (a), our triplane-based hyperprior achieves an $18\%$ BD-rate saving. It highlights the advantage of the triplane representations, which are able to capture the spatial correlation of the anchor points and enable more efficient entropy coding with spatial autoregressive models.
+
+Spatial Autoregressive Models (SARM) versus Factorized Models (FM). Based on CAT-3DGS, this ablation study replaces our SARM with FM. The latter assumes that the triplane-based hyperprior has independent and identically distributed components. For fair comparison, 3 FMs (one for each plane orientation) are trained and used for coding the triplanes. The result on Mip-NeRF360 indicates that our SARM achieves $19\%$ BD-rate saving as compared to FM. The result suggests the strong spatial correlation in the triplane-based hyperprior. Figure 6 (b) offers a breakdown analysis, showing that SARM benefits not only the coding of the triplane-based hyperprior, but more importantly that of the anchors' attributes, which constitute the major portion of the compressed bitstream.
+
+
+Figure 7: Breakdown analysis of different coding parts w/ and w/o our CARM for the bicycle scene.
+
+Table 1: The impact of the slice number and partition in our CARM on compression performance The results are obtained with Mip-NeRF 360.
+
+
M Slices
Channels per Slice
BD-rate
1
50
0
2
25, 25
-6.3
2
15, 35
-8.9
4
12, 12, 13, 13
-8.9
4
5, 10, 15, 20
-11.9
+
+Table 2: Comparison of decoding time and rendering throughput: Ours (CAT-3DGS) vs. HAC.
+
+
Scene
Anchor Count (K)
Base Resolution B
Decoding Time (s) ↓
Rendering Speed (FPS) ↑
Triplane
Anchor Attributes
Total
Ours
room
36.5
64
11.4
2.2
13.6
127.0
amsterdam
533.0
128
47.4
17.0
64.4
83.4
HAC
room
228.8
N/A
N/A
-
6.6
103.1
amsterdam
483.5
N/A
N/A
-
11.3
77.9
+
+Channel-wise Autoregressive Models (CARM). Figure 7 presents two pie charts to single out the contribution of our CARM on the bicycle scene. As shown, CARM reduces the compressed size of the latent features from $5.7\mathrm{MB}$ to $3.4\mathrm{MB}$ , amounting to a $40\%$ rate reduction in this part of the bitstream. We also observe a similar trend in the other scenes. More results are provided in Appendix F. From Table 1, more slices lead to improved coding performance. Unevenly-partitioned slices perform slightly better than evenly-partitioned slices. With uneven slices, we found that more essential information is packed in the first or two slices, an effect that is similar to energy compaction and is much desirable for coding purposes. More discussions are presented in Appendix C.
+
+View Frequency-Aware Masking. We conduct another ablation study that disables the view frequency-aware masking in our CAT-3DGS. In other words, we remove the weight $p_{n,k}$ in the masking function. Doing so results in a $16\%$ BD-rate drop on Mip-NeRF360. The removal of Gaussian primitives less critical to the rendering quality helps reduce the bit rate. More results are provided in Appendix D.
+
+Decoding Time and Rendering Throughput. Table 2 compares the decoding time (seconds) and rendering throughput (frames per second) of our CAT-3DGS and HAC for two scenes, amsterdam in BungeeNeRF (Xiangli et al., 2022) and room in Mip-NeRF360 (Barron et al., 2022b). This information is collected on one NVIDIA V100. CAT-3DGS has much higher decoding time than HAC due to the use of autoregressive models. However, in terms of rendering throughput, our CAT-3DGS is faster than HAC. This is because our frequency-aware masking effectively reduces the number of anchors. The decoding time of CAT-3DGS can be further improved by making full use of the parallelism in decoding triplanes. Recall that all the 2D planes in our triplane-based hyerprior are independently decodable and so are the channels in each 2D plane (Sec. 4.3). Currently, only the channel parallelism is used in our implementation. The decoding of different anchor attributes is parallelizable to some extent. The coding dependency is in the channel dimension and not between the anchors' attributes. Last but not least, the 3DGS system normally has decoding and rendering as two decoupled processes. The Gaussian primitives are decoded first, followed by rendering images in different views. The decoding is generally less time sensitive and has little impact on the rendering process, which is the same as ScaffoldGS (Lu et al., 2024) with our CAT-3DGS.
+
+# 6 CONCLUSIONS
+
+This work presents a novel rate-distortion-optimized 3DGS compression framework. In an effort to leverage the inter correlation between Gaussian primitives for coding, it features PCA-guided triplanes as the hyperprior and incorporates a spatial autoregressive model for their coding. Furthermore, a channel-wise autoregressive model is introduced for the first time to explore the intra correlation within each individual Gaussian primitive for coding. When combined with a view frequency-aware masking mechanism, these features lead to the state-of-the-art coding performance.
+
+# ACKNOWLEDGMENTS
+
+This work is supported by National Science and Technology Council, Taiwan under the Grant NSTC 113-2634-F-A49-007-, MediaTek, and National Center for High-performance Computing, Taiwan.
+
+# REFERENCES
+
+Muhammad Salman Ali, Maryam Qamar, Sung-Ho Bae, and Enzo Tartaglione. Trimming the fat: Efficient compression of 3d gaussian splats through pruning. arXiv preprint arXiv:2406.18214, 2024.
+Johannes Balle, David Minnen, Saurabh Singh, Sung Jin Hwang, and Nick Johnston. Variational image compression with a scale hyperprior, 2018. URL https://arxiv.org/abs/1802.01436.
+Jonathan T Barron, Ben Mildenhall, Dor Verbin, Pratul P Srinivasan, and Peter Hedman. Mip-nerf 360: Unbounded anti-aliased neural radiance fields. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5470-5479, 2022a.
+Jonathan T. Barron, Ben Mildenhall, Dor Verbin, Pratul P. Srinivasan, and Peter Hedman. Mipnerf 360: Unbounded anti-aliased neural radiance fields, 2022b. URL https://arxiv.org/abs/2111.12077.
+Gisle Bjontegaard. Calculation of average psnr differences between rd-curves. ITU SG16 Doc. VCEG-M33, 2001.
+Yihang Chen, Qianyi Wu, Jianfei Cai, Mehrtash Harandi, and Weiyao Lin. Hac: Hash-grid assisted context for 3d gaussian splatting compression. arXiv preprint arXiv:2403.14530, 2024.
+Zhiwen Fan, Kevin Wang, Kairun Wen, Zehao Zhu, Dejia Xu, and Zhangyang Wang. Lightgaussian: Unbounded 3d gaussian compression with $15\mathrm{x}$ reduction and $200+$ fps, 2023.
+Sara Fridovich-Keil, Giacomo Meanti, Frederik Warburg, Benjamin Recht, and Angjoo Kanazawa. K-planes: Explicit radiance fields in space, time, and appearance, 2023. URL https:// arxiv.org/abs/2301.10241.
+Sharath Girish, Kamal Gupta, and Abhinav Shrivastava. Eagles: Efficient accelerated 3d gaussians with lightweight encodings. European Conference on Computer Vision, 2024.
+Peter Hedman, Julien Philip, True Price, Jan-Michael Frahm, George Drettakis, and Gabriel Bros-tow. Deep blending for free-viewpoint image-based rendering. ACM Transactions on Graphics (ToG), 37(6):1-15, 2018.
+Bernhard Kerbl, Georgios Kopanas, Thomas Leimkuhler, and George Drettakis. 3d gaussian splatting for real-time radiance field rendering. ACM Trans. Graph., 42(4):139-1, 2023.
+Arno Knapitsch, Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics (ToG), 36(4):1-13, 2017.
+Joo Chan Lee, Daniel Rho, Xiangyu Sun, Jong Hwan Ko, and Eunbyung Park. Compact 3d gaussian representation for radiance field. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 21719-21728, 2024.
+Xiangrui Liu, Xinju Wu, Pingping Zhang, Shiqi Wang, Zhu Li, and Sam Kwong. Compgs: Efficient 3d scene representation via compressed gaussian splatting. arXiv preprint arXiv:2404.09458, 2024.
+Tao Lu, Mulin Yu, Linning Xu, Yuanbo Xiangli, Limin Wang, Dahua Lin, and Bo Dai. Scaffolds: Structured 3d gaussians for view-adaptive rendering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20654-20664, 2024.
+Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM, 65(1):99-106, 2021.
+
+Wieland Morgenstern, Florian Barthel, Anna Hilsmann, and Peter Eisert. Compact 3d scene representation via self-organizing gaussian grids. arXiv preprint arXiv:2312.13299, 2023.
+KL Navaneet, Kossar Pourahmadi Meibodi, Soroush Abbasi Koohpayegani, and Hamed Piriavash. Compact3d: Compressing gaussian splat radiance field models with vector quantization. arXiv preprint arXiv:2311.18159, 2023.
+Simon Niedermayr, Josef Stumpfegger, and Rüdiger Westermann. Compressed 3d gaussian splatting for accelerated novel view synthesis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10349-10358, June 2024.
+Kerui Ren, Lihan Jiang, Tao Lu, Mulin Yu, Linning Xu, Zhangkai Ni, and Bo Dai. Octreegs: Towards consistent real-time rendering with lod-structured 3d gaussians. arXiv preprint arXiv:2403.17898, 2024.
+Seungjoo Shin and Jaesik Park. Binary radiance fields. Advances in neural information processing systems, 36, 2024.
+Xiangyu Sun, Joo Chan Lee, Daniel Rho, Jong Hwan Ko, Usman Ali, and Eunbyung Park. F-3dgs: Factorized coordinates and representations for 3d gaussian splatting. arXiv preprint arXiv:2405.17083, 2024.
+Henan Wang, Hanxin Zhu, Tianyu He, Runsen Feng, Jiajun Deng, Jiang Bian, and Zhibo Chen. End-to-end rate-distortion optimized 3d gaussian representation. arXiv preprint arXiv:2406.01597, 2024a.
+Yufei Wang, Zhihao Li, Lanqing Guo, Wenhan Yang, Alex C Kot, and Bihan Wen. Contextgs: Compact 3d gaussian splattering with anchor level context model. arXiv preprint arXiv:2405.20721, 2024b.
+Yuanbo Xiangli, Linning Xu, Xingang Pan, Nanxuan Zhao, Anyi Rao, Christian Theobalt, Bo Dai, and Dahua Lin. Bungeenerf: Progressive neural radiance field for extreme multi-scale scene rendering. In European conference on computer vision, pp. 106-122. Springer, 2022.
+
+# A TRAINING PROCESS
+
+
+Figure 8: Detailed Training Process of our CAT-3DGS.
+
+Figure 8 depicts our detailed training procedure. It includes the following training stages.
+
+Anchor Spawning In this stage, we adopt ScaffoldGS to ensure a stable start of both anchor attribute training and anchor spawning. However, to simulate the quantization effect, we introduce noise to the attributes of the anchor points starting at iteration 3000. To prevent the generation of an excessive number of anchors, we disable anchor growing during iterations 3000 to 4000.
+
+Triplane-based Hyperprior After adding noise to the attributes of the anchor points during iterations 3000 to 10,000, we begin using the triplane as a hyperprior to learn the distribution of anchors' attributes starting from the 10,000th iteration.
+
+Spatial Autoregressive Models for Triplane Coding We start triplane coding at iteration 15,000. Specifically, we warm up the spatial autoregressive model while freezing the other learnable parameters between iterations 15,000 and 16,000.
+
+# B RATE-AWARE MASK TRADE-OFF (RMT)
+
+
+(a)
+Figure 9: Rate-distortion comparison w/ and w/o our rate-aware mask trade-off. RMT: Rate-aware Mask Trade-off.
+
+
+(b)
+
+
+
+Based on the observation that the number of anchors can be further reduced while maintaining similar PSNR, we accordingly relate the mask hyperparameter $\lambda_{m}$ to the rate hyperparameter $\lambda_{r}$ using the relationship $\lambda_{m} = \max(10^{-3}, 0.3 \cdot \lambda_{r})$ . This implies that, at higher bit rates, $\lambda_{r}$ decreases and more offsets (i.e. Gaussian primitives) and anchors are kept. Conversely, at lower bit rates, $\lambda_{r}$ increases and more offsets and anchors are removed.
+
+In Figure 9 (a), we evaluate the performance with a fixed mask trade-off set to 0.0005 (labeled "w/o RMT") and compare it with the rate-aware mask trade-off approach (labeled "w/ RMT") on Mip-
+
+NeRF 360. The rate-aware mask trade-off has greater coding performance gain, particularly at lower bit rates. For further details regarding this gain, we select the treehill scene from Mip-NeRF 360, as shown in Figure 9 (b). Our method with RMT demonstrates that, at the lowest rate point, the number of anchor points is only one-third of that "w/o RMT", and the total size achieves a $60\%$ reduction, while maintaining similar PSNR.
+
+# C THE IMPACT OF SLICE PARTITIONING ON OUR CARM
+
+Table 3: Analysis the number of bits per channel within a slice in different cases.
+
+
Method
slices
Channels per slice
Size per channel within one slice (kB)
Size for f (MB)
Total size (MB)
PSNR
w/o CARM
1
(50)
(8.91)
0.44
1.69
30.78
w/ CARM (even)
4
(12, 12, 13, 13)
(22.2, 6.38, 4.65, 3.98)
0.45
1.74
30.85
w/ CARM (uneven)
4
(5, 10, 15, 20)
(17.22, 9.61, 5.35, 3.64)
0.33
1.59
30.89
+
+In this section, we further analyze the number of bits per channel within a slice in the cases of w/o CARM, w/ CARM (even), and w/ CARM (uneven), as shown in Table 3. We observe that when only one slice is used, indicating CARM is disabled, the kilo bytes per channel is 8.91. However, when CARM is enabled, the first slice uses 22.2 kilo bytes per channel for the even partition case and 17.22 kilo bytes per channel for the uneven case. The data suggest that the earlier slices contain more information, resulting in larger sizes. This also indicates that the richer information in the earlier slices can help the coding of the subsequent slices, allowing them to use fewer bits. As for the even and uneven cases, we observe that the uneven partition yields a better result, reducing the size of $f$ by 0.12MB compared to the even case.
+
+# D VIEW FREQUENCY-AWARE MASKING
+
+
+Figure 10: Rate-distortion comparison w/ and w/o our view frequency-aware masking. VFM: View Frequency-aware Masking.
+
+In Figure 10, we compare CAT-3DGS (denoted by "w/ VFM") with a variant (denoted by "w/o VFM") that removes the weight $p_{n,k}$ in the masking function. The view frequency-aware masking has a significant effect at low bit rates, reducing the total size by $29\%$ at the lowest rate point while PSNR drops by only 0.1dB. At the highest rate point, it reduces the total size by $14\%$ while still maintaining similar PSNR. This indicates that the view frequency-aware masking can retain more important points while pruning a larger number of relatively less important ones, even when most of the anchors are masked out.
+
+# E BITSTREAM OF EACH COMPONENT
+
+Our bit stream consists of seven components: the anchor positions $\mathbf{a}$ , three anchor attributes (features $\mathbf{f}$ , offsets $\{O_i\}$ , and scaling factors $l$ ), a set of triplanes $\mathcal{P}$ , binary masks $M$ , and MLPs $F_S$ , $F_{tri}$ , $F_{ch}$ , $F_{ARM}$ . After applying our triplane hyperprior and channel-wise autoregressive model, the size of the attributes has been significantly reduced. Additionally, due to the spatial autoregressive
+
+model, the triplane size occupies only a small portion. The rate-aware mask tradeoff further allows us to reduce the number of anchors that need to be compressed at low bit rates, thereby reducing the total size.
+
+Table 4: Bitstream of each component. The result is for the scene treehill on Mip-NeRF 360 dataset.
+
+
Number of Anchors (K)
Bitstream of Each Component (MB)
Total size (MB)
Fidelity
Position
Feature
Scaling
Offsets
Masks
MLPs
Triplane
PSNR
SSIM
treehill (high-rate)
516.3
3.10
7.75
2.47
3.19
0.53
0.35
0.11
17.5
23.28
0.646
treehill (low-rate)
85.1
0.51
0.33
0.28
0.18
0.06
0.35
0.04
1.74
22.71
0.558
+
+# F ADDITIONAL BREAKDOWN RESULTS FOR CARM
+
+
+Figure 11: The breakdown analyses of different coding parts w/ and w/o our CARM for the flower and bonsai scenes, respectively.
+
+
+
+Figure 11 provides additional breakdown results for flower and bonsai scenes. The results confirm again that our CARM effectively reduces the compressed size of the latent features associated with anchors' attributes.
+
+# G THE IMPACT OF CARM ON DECODING TIME
+
+Table 5: Comparison of the decoding time w/ and w/o our CARM.
+
+
Scene
Method
Decoding Time (s)
Triplane
Anchor Attributes
Total
room
CAT-3DGS (w/ CARM)
11.4
2.2
13.6
CAT-3DGS w/o CARM
11.3
2.1
13.4
amsterdam
CAT-3DGS (w/ CARM)
47.4
17.0
64.4
CAT-3DGS w/o CARM
47.2
14.9
62.1
+
+We compare the decoding time of our schemes w/ and w/o CARM in Table 5. The results indicate that CARM has a negligible impact on the decoding time.
+
+# H COMPLETE BREAKDOWN OF QUANTITATIVE RESULTS
+
+Quantitative results For a more comprehensive data presentation, we present detailed information on the rate-distortion curves, as shown in Figure 4, and the quantitative results are shown in Table 6.
+
+Per-scene Results of Our CAT-3DGS Framework The detailed results of our approach for MipNeRF 360 dataset (Barron et al., 2022a) are presented in Table 7.
+
+The detailed results of our approach for BungeeNeRF dataset (Xiangli et al., 2022) are presented in Table 8.
+
+The detailed results of our approach for Tank&Temples dataset (Knapitsch et al., 2017) are presented in Table 9.
+
+The detailed results of our approach for Deep Blending dataset (Hedman et al., 2018) are presented in Table 10.
+
+Per-scene Results of the Baseline Models Per-scene results for all datasets from our two baseline models, ScaffoldGS (Lu et al., 2024) and HAC (Chen et al., 2024) are also provided in Table 15 and Table 11 12 13 14, respectively.
+
+Table 6: The Quantitative results of our CAT-3DGS and other approaches. 3DGS (Kerbl et al., 2023) and ScaffoldGS (Lu et al., 2024) are baseline methods, which are presented in the first section. Approaches in the second section are compact representation, while the third section covers rate-distortion-optimized compression approaches. For comparison, we also provide two results of different size and fidelity tradeoffs by adjusting $\lambda_r$ . The size is measured in megabytes (MB).
+
+
Datasets
Mip-NeRF360
Tank&Temples
DeepBlending
BungeeNeRF
Methods
psnr ↑
ssim ↑
lpips ↓
size ↓
psnr ↑
ssim ↑
lpips ↓
size ↓
psnr ↑
ssim ↑
lpips ↓
size ↓
psnr ↑
ssim ↑
lpips ↓
size ↓
3DGS(SIGGRAPH'23)
27.49
0.813
0.222
744.7
23.69
0.844
0.178
431.0
29.42
0.899
0.247
663.9
24.87
0.841
0.205
1616
ScaffoldGS (CVPR'24)
27.50
0.806
0.252
253.9
23.96
0.853
0.177
86.50
30.21
0.906
0.254
66.00
26.62
0.865
0.241
183.0
EAGLES(ECCV'24)
27.15
0.808
0.238
68.89
23.41
0.840
0.200
34.00
29.91
0.910
0.250
62.00
25.24
0.843
0.221
117.1
LightGaussian
27.00
0.799
0.249
44.54
22.83
0.822
0.242
22.43
27.01
0.872
0.308
33.94
24.52
0.825
0.255
87.28
Compact3DGS (CVPR'24)
27.08
0.798
0.247
48.80
23.32
0.831
0.201
39.43
29.79
0.901
0.258
43.21
23.36
0.788
0.251
82.60
Compressed3D (CVPR'24)
26.98
0.801
0.238
28.80
23.32
0.832
0.194
17.28
29.38
0.898
0.253
25.30
24.13
0.802
0.245
55.79
Morgenstern et al.
26.01
0.772
0.259
23.90
22.78
0.817
0.211
13.05
28.92
0.891
0.276
8.40
-
-
-
-
Navaneet et al.
27.16
0.808
0.228
50.30
23.47
0.840
0.188
27.97
29.75
0.903
0.247
42.77
24.63
0.823
0.239
104.3
Trimming the fat
27.13
0.798
0.248
20.057
23.68
0.831
0.210
8.555
29.42
0.897
0.267
12.49
-
-
-
-
CompGS (high-rate)
27.26
0.802
0.239
16.5
23.70
0.835
0.205
9.61
29.33
0.900
0.270
10.4
-
-
-
-
CompGS (low-rate)
26.79
0.791
0.258
11.0
23.105
0.815
0.235
5.89
28.99
0.900
0.280
7.00
-
-
-
-
RDO-Gaussian (high-rate)
27.05
0.802
0.239
23.46
23.34
0.835
0.195
12.02
29.63
0.902
0.252
18.00
-
-
-
-
RDO-Gaussian (low-rate)
24.43
0.683
0.406
1.71
22.09
0.755
0.318
1.32
28.38
0.872
0.331
1.22
-
-
-
-
HAC (ECCV'24)(high-rate)
27.77
0.811
0.230
21.87
24.40
0.853
0.177
11.24
30.34
0.906
0.258
6.35
27.05
0.868
0.217
26.16
HAC (ECCV'24)(low-rate)
26.11
0.759
0.312
5.96
23.11
0.809
0.238
3.68
28.62
0.888
0.302
2.64
24.56
0.768
0.327
9.74
Ours (high-rate)
27.77
0.809
0.241
12.35
24.41
0.853
0.189
6.93
30.29
0.909
0.269
3.56
27.35
0.886
0.183
26.59
Ours (low-rate)
25.82
0.730
0.362
1.72
22.97
0.786
0.293
1.42
28.53
0.878
0.336
0.93
25.19
0.808
0.279
10.14
+
+Table 7: Results of Our approach for each scene from Mip-NeRF 360 dataset (Barron et al., 2022a).
+
+
λr
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.002
bicycle
25.04
0.735
0.280
21.42
bonsai
32.98
0.947
0.192
6.06
counter
29.66
0.915
0.197
6.33
flower
21.41
0.580
0.375
18.92
garden
27.49
0.847
0.152
18.64
kitchen
31.34
0.926
0.135
6.92
room
31.95
0.924
0.212
4.11
stump
26.79
0.766
0.271
11.23
treehill
23.28
0.646
0.359
17.50
AVG
27.77
0.809
0.241
12.35
0.004
bicycle
25.16
0.738
0.280
16.56
bonsai
32.74
0.944
0.198
4.79
counter
29.51
0.911
0.203
4.98
flower
21.37
0.576
0.383
14.28
garden
27.30
0.840
0.164
14.55
kitchen
30.97
0.922
0.140
5.36
room
31.73
0.921
0.221
3.22
stump
26.87
0.766
0.278
8.50
treehill
23.27
0.642
0.370
13.20
AVG
27.66
0.807
0.249
9.49
0.01
bicycle
25.03
0.728
0.302
9.40
bonsai
31.67
0.932
0.217
2.94
counter
28.89
0.898
0.225
3.15
flower
21.25
0.564
0.403
8.13
garden
26.83
0.816
0.210
8.65
kitchen
30.37
0.911
0.160
3.32
room
31.24
0.911
0.243
2.06
stump
26.62
0.752
0.309
4.45
treehill
23.22
0.629
0.400
7.17
AVG
27.24
0.793
0.274
5.47
0.015
bicycle
24.80
0.714
0.323
6.59
bonsai
31.25
0.927
0.227
2.35
counter
28.51
0.886
0.244
2.45
flower
21.12
0.552
0.419
6.13
garden
26.56
0.803
0.231
6.82
kitchen
29.90
0.902
0.174
2.59
room
30.90
0.902
0.262
1.60
stump
26.38
0.736
0.333
3.25
treehill
23.08
0.616
0.423
5.13
AVG
26.94
0.782
0.293
4.10
0.03
bicycle
24.38
0.676
0.368
3.35
bonsai
29.99
0.905
0.260
1.58
counter
27.63
0.860
0.285
1.49
flower
20.74
0.519
0.455
3.32
garden
25.81
0.755
0.304
3.85
kitchen
28.76
0.878
0.216
1.53
room
30.19
0.887
0.292
1.05
stump
25.64
0.690
0.389
1.83
treehill
22.84
0.580
0.472
2.44
AVG
26.22
0.750
0.338
2.27
0.04
bicycle
24.02
0.646
0.399
2.36
bonsai
29.44
0.892
0.277
1.30
counter
27.14
0.845
0.306
1.23
flower
20.44
0.496
0.477
2.42
garden
25.40
0.727
0.337
3.01
kitchen
28.16
0.862
0.244
1.20
room
29.73
0.879
0.307
0.88
stump
25.30
0.666
0.415
1.35
treehill
22.71
0.558
0.499
1.74
AVG
25.82
0.730
0.362
1.72
+
+Table 8: Results of Our approach for each scene from BungeeNeRF dataset (Xiangli et al., 2022).
+
+
λr
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.001
amsterdam
27.57
0.908
0.148
31.98
bilbao
28.25
0.897
0.165
25.38
hollywood
25.16
0.815
0.254
24.58
pompidou
25.82
0.864
0.214
28.83
quebec
30.59
0.943
0.144
21.72
rome
26.74
0.887
0.178
27.06
AVG
27.35
0.886
0.184
26.59
0.002
amsterdam
27.52
0.903
0.159
27.33
bilbao
28.15
0.892
0.176
22.03
hollywood
25.12
0.808
0.268
20.95
pompidou
25.70
0.857
0.224
24.26
quebec
30.23
0.938
0.154
17.84
rome
26.57
0.881
0.190
23.17
AVG
27.22
0.880
0.195
22.60
0.003
amsterdam
27.28
0.897
0.169
24.47
bilbao
28.13
0.888
0.181
19.41
hollywood
25.05
0.801
0.280
18.72
pompidou
25.69
0.854
0.232
21.52
quebec
30.04
0.934
0.163
15.89
rome
26.42
0.875
0.200
20.81
AVG
27.10
0.875
0.204
20.14
0.006
amsterdam
26.96
0.882
0.194
19.38
bilbao
27.72
0.876
0.202
15.63
hollywood
24.68
0.778
0.307
14.90
pompidou
25.21
0.839
0.251
17.22
quebec
29.53
0.925
0.178
13.28
rome
25.78
0.856
0.223
16.87
AVG
26.65
0.859
0.226
16.21
0.01
amsterdam
26.32
0.863
0.215
15.96
bilbao
27.26
0.861
0.222
12.73
hollywood
24.41
0.757
0.325
12.71
pompidou
24.86
0.825
0.267
14.33
quebec
28.84
0.914
0.197
10.68
rome
25.13
0.834
0.245
13.86
AVG
26.14
0.842
0.245
13.38
0.02
amsterdam
25.65
0.833
0.253
12.33
bilbao
26.30
0.829
0.258
9.74
hollywood
23.80
0.714
0.361
9.12
pompidou
23.78
0.789
0.298
10.75
quebec
27.76
0.891
0.225
8.28
rome
23.85
0.790
0.283
10.63
AVG
25.19
0.808
0.280
10.14
+
+Table 9: Results of Our approach for each scene from Tank & Temples dataset (Knapitsch et al., 2017).
+
+
λr
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.002
train
22.68
0.820
0.221
6.28
truck
26.14
0.885
0.157
7.57
AVG
24.41
0.853
0.189
6.93
0.004
train
22.45
0.817
0.226
5.06
truck
25.98
0.882
0.162
5.88
AVG
24.22
0.850
0.194
5.47
0.01
train
22.31
0.802
0.249
3.43
truck
25.68
0.871
0.184
3.74
AVG
23.99
0.837
0.217
3.58
0.015
train
22.23
0.794
0.262
2.71
truck
25.55
0.866
0.195
3.00
AVG
23.89
0.830
0.228
2.86
0.03
train
22.01
0.769
0.295
1.80
truck
24.97
0.842
0.238
1.89
AVG
23.49
0.806
0.266
1.85
0.04
train
21.42
0.750
0.315
1.47
truck
24.51
0.822
0.271
1.38
AVG
22.97
0.786
0.293
1.42
+
+Table 10: Results of Our approach for each scene from Deep Blending (Hedman et al., 2018).
+
+
λr
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.002
drjohnson
29.67
0.906
0.266
4.27
playroom
30.90
0.911
0.272
2.85
AVG
30.29
0.909
0.269
3.56
0.004
drjohnson
29.51
0.904
0.272
3.43
playroom
30.81
0.909
0.279
2.21
AVG
30.16
0.906
0.275
2.82
0.01
drjohnson
29.23
0.898
0.288
2.12
playroom
30.23
0.903
0.295
1.46
AVG
29.73
0.900
0.292
1.79
0.015
drjohnson
29.06
0.892
0.299
1.76
playroom
29.91
0.897
0.309
1.21
AVG
29.48
0.894
0.304
1.48
0.03
drjohnson
28.52
0.879
0.323
1.20
playroom
29.19
0.887
0.331
0.85
AVG
28.85
0.883
0.327
1.03
0.04
drjohnson
28.31
0.874
0.332
1.09
playroom
28.74
0.881
0.340
0.76
AVG
28.53
0.878
0.336
0.93
+
+Table 11: Results of HAC (Chen et al., 2024) for each scene from Mip-NeRF 360 dataset (Barron et al., 2022a).
+
+
λe
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.001
bicycle
25.11
0.742
0.259
39.15
bonsai
32.97
0.948
0.180
12.72
counter
29.74
0.918
0.184
10.44
flower
21.27
0.575
0.377
27.55
garden
27.46
0.849
0.139
32.17
kitchen
31.63
0.930
0.122
12.07
room
31.90
0.926
0.198
7.85
stump
26.59
0.763
0.264
25.26
treehill
23.26
0.648
0.345
29.65
AVG
27.77
0.811
0.230
21.87
0.002
bicycle
25.10
0.742
0.262
33.14
bonsai
32.70
0.945
0.184
10.51
counter
29.65
0.915
0.189
8.88
flower
21.32
0.576
0.377
23.73
garden
27.43
0.847
0.143
27.52
kitchen
31.46
0.928
0.125
10.05
room
31.87
0.925
0.201
6.47
stump
26.59
0.761
0.268
21.75
treehill
23.34
0.647
0.350
24.83
AVG
27.72
0.809
0.233
18.54
0.004
bicycle
25.05
0.742
0.264
27.54
bonsai
32.28
0.942
0.189
8.56
counter
29.35
0.911
0.195
7.26
flower
21.26
0.572
0.381
19.59
garden
27.28
0.842
0.151
22.69
kitchen
31.16
0.923
0.131
8.05
room
31.55
0.921
0.208
5.53
stump
26.58
0.762
0.269
18.11
treehill
23.30
0.645
0.356
20.04
AVG
27.53
0.807
0.238
15.26
0.01
bicycle
24.79
0.733
0.284
17.80
bonsai
31.27
0.933
0.208
5.16
counter
28.68
0.898
0.220
4.54
flower
21.18
0.561
0.400
12.15
garden
26.76
0.822
0.188
14.53
kitchen
30.51
0.914
0.149
4.85
room
31.20
0.912
0.234
3.27
stump
26.54
0.752
0.296
11.21
treehill
23.13
0.628
0.392
12.27
AVG
27.12
0.795
0.263
9.53
0.02
bicycle
24.60
0.717
0.306
14.97
bonsai
30.51
0.922
0.225
4.24
counter
27.78
0.878
0.248
3.30
flower
20.84
0.537
0.425
8.90
garden
26.34
0.800
0.222
10.87
kitchen
29.86
0.902
0.169
3.69
room
30.51
0.900
0.256
2.56
stump
26.20
0.730
0.326
8.68
treehill
23.03
0.610
0.418
9.25
AVG
26.63
0.777
0.288
7.38
0.035
bicycle
24.16
0.694
0.333
11.59
bonsai
29.63
0.909
0.242
3.72
counter
27.19
0.864
0.269
2.68
flower
20.57
0.513
0.449
7.17
garden
25.86
0.780
0.252
8.90
kitchen
29.09
0.886
0.191
3.08
room
29.94
0.889
0.276
2.15
stump
25.77
0.707
0.358
7.03
treehill
22.82
0.591
0.443
7.32
AVG
26.11
0.759
0.312
5.96
+
+Table 12: Results of HAC (Chen et al., 2024) for each scene from BungeeNeRF dataset (Xiangli et al., 2022).
+
+
λe
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.001
amsterdam
27.25
0.886
0.190
31.84
bilbao
27.98
0.886
0.190
24.38
hollywood
24.59
0.772
0.319
23.41
pompidou
25.58
0.851
0.236
29.19
quebec
30.30
0.934
0.163
21.23
rome
26.61
0.876
0.203
26.91
AVG
27.05
0.868
0.217
26.16
0.002
amsterdam
27.13
0.880
0.202
27.14
bilbao
28.02
0.880
0.205
20.91
hollywood
24.43
0.763
0.330
20.09
pompidou
25.27
0.842
0.249
24.85
quebec
29.98
0.929
0.175
17.90
rome
26.28
0.866
0.219
23.07
AVG
26.85
0.860
0.230
22.33
0.003
amsterdam
26.95
0.873
0.214
24.41
bilbao
27.82
0.872
0.218
18.76
hollywood
24.27
0.753
0.342
17.87
pompidou
25.34
0.837
0.255
22.49
quebec
29.67
0.924
0.185
16.15
rome
25.98
0.855
0.231
20.83
AVG
26.67
0.852
0.241
20.08
0.004
amsterdam
26.80
0.865
0.224
22.49
bilbao
27.65
0.864
0.231
17.14
hollywood
24.25
0.748
0.347
16.55
pompidou
25.16
0.829
0.266
20.40
quebec
29.33
0.918
0.192
15.06
rome
25.68
0.845
0.243
19.30
AVG
26.48
0.845
0.250
18.49
0.008
amsterdam
26.13
0.839
0.258
17.22
bilbao
26.81
0.842
0.262
14.01
hollywood
23.83
0.713
0.377
12.90
pompidou
24.48
0.807
0.289
16.10
quebec
28.60
0.906
0.216
11.71
rome
24.71
0.811
0.276
15.34
AVG
25.76
0.820
0.280
14.55
0.02
amsterdam
25.03
0.788
0.308
11.92
bilbao
25.84
0.799
0.308
9.08
hollywood
22.92
0.640
0.425
8.38
pompidou
23.16
0.759
0.332
10.43
quebec
27.15
0.872
0.262
8.18
rome
23.25
0.750
0.327
10.47
AVG
24.56
0.768
0.327
9.74
+
+Table 13: Results of HAC (Chen et al., 2024) for each scene from Tank & Temples dataset (Knapitsch et al., 2017).
+
+
λe
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.001
truck
26.02
0.883
0.147
12.42
train
22.78
0.823
0.207
10.07
AVG
24.40
0.853
0.177
11.24
0.004
truck
25.88
0.878
0.158
9.26
train
22.19
0.815
0.216
6.94
AVG
24.04
0.846
0.187
8.10
0.01
truck
25.69
0.874
0.172
7.04
train
22.13
0.807
0.230
5.26
AVG
23.91
0.841
0.201
6.15
0.02
truck
25.36
0.863
0.189
5.59
train
22.02
0.795
0.250
3.97
AVG
23.69
0.829
0.219
4.78
0.035
truck
24.96
0.853
0.208
5.04
train
21.96
0.783
0.266
3.17
AVG
23.46
0.818
0.237
4.10
0.045
truck
24.81
0.847
0.216
4.64
train
21.42
0.771
0.279
2.72
AVG
23.11
0.809
0.248
3.68
+
+Table 14: Results of HAC (Chen et al., 2024) for each scene from Deep Blending dataset (Hedman et al., 2018).
+
+
λe
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
0.001
playroom
30.84
0.906
0.262
5.03
drjohnson
29.85
0.906
0.255
7.67
AVG
30.34
0.906
0.258
6.35
0.002
playroom
30.66
0.905
0.265
4.12
drjohnson
29.69
0.905
0.258
6.51
AVG
30.17
0.905
0.262
5.32
0.004
playroom
30.44
0.902
0.272
3.15
drjohnson
29.53
0.903
0.265
5.55
AVG
29.98
0.902
0.269
4.35
0.01
playroom
30.31
0.906
0.279
2.58
drjohnson
29.34
0.901
0.275
4.23
AVG
29.83
0.903
0.277
3.40
0.02
playroom
29.87
0.900
0.292
2.23
drjohnson
28.81
0.893
0.288
3.65
AVG
29.34
0.897
0.290
2.94
0.035
playroom
29.26
0.893
0.302
2.01
drjohnson
27.97
0.883
0.302
3.26
AVG
28.62
0.888
0.302
2.64
+
+Table 15: Results of ScaffoldGS (Lu et al., 2024) for all evaluated datasets.
+
+
Datasets
Scenes
PSNR↑
SSIM↑
LPIPS↓
SIZE↓
Mip-NeRF360
bicycle
24.50
0.705
0.306
248.00
bonsai
32.70
0.946
0.185
258.00
counter
29.34
0.914
0.191
194.00
flower
21.14
0.566
0.417
253.00
garden
27.17
0.842
0.146
271.00
kitchen
31.30
0.928
0.126
173.00
room
31.93
0.925
0.202
133.00
stump
26.27
0.784
0.284
493.00
treehill
23.19
0.642
0.410
262.00
AVG
27.50
0.806
0.252
253.89
Tank&Temples
truck
25.77
0.883
0.147
107.00
train
22.15
0.822
0.206
66.00
AVG
23.96
0.853
0.177
86.50
DeepBlending
playroom
30.62
0.904
0.258
63.00
drjohnson
29.80
0.907
0.250
69.00
AVG
30.21
0.906
0.254
66.00
BungeeNeRF
amsterdam
27.16
0.898
0.188
223.00
bilbao
26.60
0.857
0.257
178.00
hollywood
24.49
0.787
0.318
155.00
pompidou
24.94
0.839
0.271
209.00
quebec
30.28
0.936
0.190
159.00
rome
26.23
0.873
0.225
174.00
AVG
26.62
0.865
0.241
183.00
\ No newline at end of file
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/images.zip b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..d58f7c238f9f5382fe8cf6bc09c4a5ec9f0b3709
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2764fd0fd7be29e1a4010c2bbebcfe34482e8e038aa7feec01e6b01355f472a
+size 2043149
diff --git a/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/layout.json b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..7eababfd65e6e1d2852b4f0c41506064993a0478
--- /dev/null
+++ b/ICLR/2025/CAT-3DGS_ A Context-Adaptive Triplane Approach to Rate-Distortion-Optimized 3DGS Compression/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8f885837754d521be0493f238e3f20b681bd27e3ea95e0cc3927eb813ed5a142
+size 617235
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_content_list.json b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..a8fc68fa2e838226d36fa75aa95489975cb9c65b
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:48f6509646d4e5f710b7c266cd9a45ff17a68807aaa463a341651788a2ca8282
+size 224292
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_model.json b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..ba81d7ccb5d50db04c406c94dd6f7a67745d9b5f
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:727882e26c4171f87d761729ce05f0dd6c312027715e91eb5ee4d174905b2b06
+size 259799
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_origin.pdf b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..53ae5a34257e1d149dc8e568ecadb12a868ac525
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/e521e435-1479-401f-9a6f-6200228cc557_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dbac1aad3de623e5bfbec084ad560b97da79ed52b03312f72cf3f3bd2e333221
+size 2396451
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/full.md b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..86b4034ce381c5de7fd0cb456a890e90f7cd36a5
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/full.md
@@ -0,0 +1,534 @@
+# CATCH: CHANNEL-AWARE MULTIVARIATE TIMESERIES ANOMALY DETECTION VIA FREQUENCY PACHING
+
+Xingjian Wu $^{1}$ , Xiangfei Qiu $^{1}$ , Zhengyu Li $^{1}$ , Yihang Wang $^{1}$ , Jilin Hu $^{1}$ , Chenjuan Guo $^{1}$ , Hui Xiong $^{2}$ , Bin Yang $^{1*}$
+
+$^{1}$ East China Normal University
+2The Hong Kong University of Science and Technology (Guangzhou)
+
+{xjwu,xfqiu,lizhengyu,yhwang}@stu.ecnu.edu.cn,
+
+{jlhu,cjguo,byang}@dase.ecnu.edu.cn,xionghui@ust.hk
+
+# ABSTRACT
+
+Anomaly detection in multivariate time series is challenging as heterogeneous subsequence anomalies may occur. Reconstruction-based methods, which focus on learning normal patterns in the frequency domain to detect diverse abnormal subsequences, achieve promising results, while still falling short on capturing fine-grained frequency characteristics and channel correlations. To contend with the limitations, we introduce CATCH, a framework based on frequency patching. We propose to patchify the frequency domain into frequency bands, which enhances its ability to capture fine-grained frequency characteristics. To perceive appropriate channel correlations, we propose a Channel Fusion Module (CFM), which features a patch-wise mask generator and a masked-attention mechanism. Driven by a bi-level multi-objective optimization algorithm, the CFM is encouraged to iteratively discover appropriate patch-wise channel correlations, and to cluster relevant channels while isolating adverse effects from irrelevant channels. Extensive experiments on 12 real-world datasets and 12 synthetic datasets demonstrate that CATCH achieves state-of-the-art performance. We make our code and datasets available at https://github.com/decisionintelligence/CATCH.
+
+# 1 INTRODUCTION
+
+Modern cyber physical systems are often monitored by multiple sensors, which produce successive multivariate time series data (Wang et al., 2024f; Dai et al., 2024; Sun et al., 2025; Tian et al., 2025; Guo et al., 2014). In recent years, there has been significant progress in multivariate time series analysis, with key tasks such as forecasting (Qiu et al., 2025c; Yu et al., 2023; Wu et al., 2024b; Liu et al., 2024a; Huang et al., 2024; Chen et al., 2024), classification (Yao et al., 2024b; Campos et al., 2023), and imputation (Gao et al., 2024; Wang et al., 2024c;b), among others (Huang et al., 2023; Yao et al., 2024a; Liu et al., 2025), gaining attention. Among these, Multivariate Time Series Anomaly Detection (MTSAD), which focuses on identifying abnormal data in multivariate time series, stands out as a critical studied task. It is applied widely including but not limited to financial fraud detection, medical disease identification, and cybersecurity threat detection (Wen et al., 2022; Yang et al., 2023a; Kieu et al., 2018; 2019; Wu et al., 2024c; Shentu et al., 2024; Yang et al., 2021).
+
+Time series anomalies are typically classified into point anomalies and subsequence anomalies. The point anomalies can be further classified as contextual or global anomalies (Lai et al., 2021). Recent reconstruction-based methods show strong capability of detecting point anomalies, which are characterized by specific values that significantly deviate from the normal range of the probability distribution. However, subsequence anomalies consist of values that fall within the probability distribution, making them much harder to detect (Paparrizos et al., 2022b; Nam et al., 2024). According to the behavior-driven taxonomy (Lai et al., 2021), the subsequence anomalies can be further divided
+
+into seasonal, shapelet, and trend anomalies—see Figure 1a. A promising approach is to transform the time series into the frequency domain to better derive the subsequence anomalies.
+
+When transformed into the frequency domain, distinct subsequence anomalies also show prominent differences against the normal series in different frequency bands (Figure 1a). In this case, shapelet anomalies mainly affect the third frequency band while seasonal anomalies affect the first two frequency bands. However, the frequency domain features a long-tailed distribution that most information centralizes in the low frequency bands. Coarse-grained reconstruction-based methods may neglect the details in the high frequency bands (Guo et al., 2023; Piao et al., 2024; Park & Kim, 2022; Wang et al., 2022), thus failing to detect correspond anomalies, which calls for fine-grained modeling in each frequency band to precisely reconstruct the normal patterns, so that heterogeneous subsequence anomalies can be detected. Moreover, considering the relationships among channels also promotes better reconstruction for normal patterns.
+
+Figure 1b shows a multivariate time series with three channels, and we observe the varying channel associations in different frequency bands, where Channel 1 and Channel 2 are similar in the third band but dissimilar to Channel 3, and all channels are similar in the fourth band but show dissimilarity in the fifth. However, the commonly-used Channel-Independent (CI) and Channel-Dependent (CD) strategies exhibit polarization effects, rendering them inadequate for this task. CI uses the same model across different channels and overlooks potential channel correlations, which offers robustness (Nie et al., 2023; Qiu et al., 2025a) but lacks generalizability and capacity. CD considers all channels simultaneously with larger capacity, but may be susceptible to noise from irrelevant channels, thus lacking robustness (Han et al., 2024; Qiu et al., 2025a). This calls for flexibly adapting the distinct channel interrelationships in different frequency bands.
+
+Inspired by the above observations, we propose CATCH, a Channel-Aware MTSAD framework via frequency patching. Technically, we utilize Fourier Transformation to stretch across time and frequency domains to facilitate the detection of both point and subsequence anomalies, of which the latter can be improved by patching in the frequency domain for fine-grained modeling. To flexibly utilize the channel correlations in frequency bands, we propose a Channel Fusion Module (CFM) that incorporates a Channel Correlation Discovering mechanism and utilizes masked attention through a bi-level multi-objective optimization process. Specifically, we utilize a patch-wise mask generator to adaptively discover channel correla
+
+tion for each frequency band. The discovered channel correlation is between CI and CD, providing both the capacity and robustness by clustering relevant channels while isolating the adverse effects from irrelevant channels. The contributions are summarized as follows:
+
+
+(a) Different subsequence anomalies.
+
+
+(b) Varying correlations among channels.
+
+Figure 1: The frequency domain is partitioned into five frequency bands with the high-frequency bands zoomed in for clarity. (a) Shows a normal time series and its variations after being injected seasonal, shapelet, trend and mixture subsequence anomalies. In the time domain, anomalies are highlighted in red, while the affected frequency bands in the frequency domain are emphasized in gray. (b) Shows the frequency bands of a multivariate time series with three channels. These channels exhibit varying correlations across different frequency bands, where Channels 1 and 2 exhibit similar behavior in the third frequency band and are therefore marked in red, while Channel 3 exhibits distinct characteristics and is marked in yellow. In the fourth frequency band, all channels behave similarly and are marked in green, while in the fifth band, they exhibit distinct characteristics and are marked in different colors.
+
+- We propose a general framework called CATCH, which enables simultaneous detection of heterogeneous point and subsequence anomalies via frequency patch learning. The framework enhances subsequence anomaly detection through frequency-domain patching and integrates fine-grained adaptive channel correlations across frequency bands.
+
+- We design the CFM to fully utilize the fine-grained channel correlations. Driven by a bi-level multi-objective optimization algorithm, the CFM is able to iteratively discover appropriate channel correlations and facilitate the isolation of irrelevant channels and the clustering of relevant channels, which provides both the capacity and robustness.
+- We conduct extensive experiments on 24 multivariate datasets. The results show that CATCH outperforms state-of-the-art baselines.
+
+# 2 RELATED WORK
+
+# 2.1 MULTIVARIATE TIME-SERIES ANOMALY DETECTION
+
+Traditional MTSAD methods can be classified into non-learning (Breunig et al., 2000; Goldstein & Dengel, 2012; Yeh et al., 2016; Li et al., 2024a) and machine learning (Liu et al., 2008; Ramaswamy et al., 2000). Recently, deep learning has made impressive progress in natural language processing (He et al., 2025b; Wang et al., 2024e; Wu et al., 2024a; 2025a), computer vision (Wu et al., 2025b; Li et al., 2025a;b; Yu et al., 2024b), and other aspects (Yi et al., 2025; He et al., 2025a; Li et al., 2023). Studies have shown that learned features may perform better than human-designed features (Yu et al., 2025; 2024a). Therefore, many deep learning-based MTSAD methods have been proposed and have received substantial extensive attention (Liu et al., 2024b; Liu & Paparrizos, 2024; Hu et al., 2024; Wang et al., 2023; Li et al., 2021; Wang et al., 2024a,g). They can be classified into forecasting-based, reconstruction-based and contrastive-based methods. GDN (Deng & Hooi, 2021) is a forecasting-based model that uses a graph structure to learn topology and a graph attention network to encode input series, with anomaly detection based on the maximum forecast error among channel variables. Anomaly Transformer is a reconstructive approach that combines series and prior association to make anomalies distinctive (Xu et al., 2021). DCdetector uses contrastive learning in anomaly detection to create an embedding space where normal data samples are close together and anomalies are farther apart (Yang et al., 2023b).
+
+# 2.2 CHANNEL STRATEGIES IN MTSAD
+
+A channel refers to a variable in MTSAD, while a channel strategy refers to how these channel correlations are effectively considered during the modeling process. CATCH employs a reconstruction-based MTSAD algorithm, using reconstruction error as the anomaly score, making reconstruction quality crucial for anomaly detection accuracy. Since the channels in multivariate time series often exhibit complex dependencies, explicitly modeling these correlations enables a more comprehensive capture of global features, thereby improving reconstruction capabilities and anomaly detection performance. There are mainly two existing approaches that consider relationships among channels. Channel-Independent (CI) based methods such as: PatchTST (Nie et al., 2023) and SparseTSF (Lin et al., 2024) impose the constraint of using the same model across different channels. While it offers robustness, it overlooks potential interactions among channels and can be limited in generalizability and capacity for unseen channels (Han et al., 2024). Previous studies have shown that correlation discovery in data is crucial for time series anomaly detection (Song et al., 2018). Channel-Dependent (CD) based methods such as: MSCRED (Zhang et al., 2019) uses a convolutional-LSTM network with attention and a loss function to reconstruct correlation matrices among channels in multivariate time series input. MTAD-GAT (Zhao et al., 2020) treats each univariate time series as a feature and uses two parallel graph attention layers to capture dependencies across both temporal and channel dimensions. The existing methods could not adequately extract interrelationships, they may be susceptible to noise from irrelevant channels, reducing the model's robustness.
+
+# 2.3 FREQUENCY DOMAIN ANALYSIS FOR TSAD
+
+Frequency domain analysis can uncover subsequence anomalies that are challenging to detect in the time domain, such as anomalies in periodic fluctuations or oscillation patterns, significantly enhancing detection accuracy (Zhang et al., 2022). Conse
+
+Table 1: Comparison of existing TSAD methods.
+
+
Property
Mmultivariate time
+serie anomaly detection
Time-frequency
+granularity alignment
Handle high-frequency
+information
Capture channel
+correlations
SR-CNN
X
X
X
X
PFT
X
X
X
X
TFAD
✓
X
X
X
Dual-TF
✓
✓
X
X
CATCH
✓
✓
✓
✓
+
+
+Figure 2: CATCH architecture. (1) Forward Module normalizes the input data, patchifies the frequency domain, and then projects it into the hidden space. (2) Channel Fusion Module captures channel interrelationships in each frequency band with a Channel-Masked Transformer (CMT) Layer, where the mask matrix (channel correlation) is generated by Mask Generator (MG). During training, MG and CMT are optimized by Channel Correlation Discovering (CCD) for more appropriate channel correlations. (3) Time-Frequency Reconstruction Module obtains the frequency reconstruction through Flatten & Linear Head Layer, and obtains the time reconstruction after iFFT.
+
+sequently, frequency-based time series anomaly detection models have garnered widespread attention in recent years. SR-CNN (Ren et al., 2019), the first method to leverage the frequency domain for TSAD, employs a frequency-based approach to generate saliency maps for identifying anomalies, and PFT (Zhang et al., 2022) built on this foundation by introducing partial Fourier transform to achieve substantial acceleration. However, both methods are confined to univariate time series and fail to address the complexities of multivariate scenarios. TFAD (Zhang et al., 2022) emerges as the first approach to integrate time-domain and frequency-domain analyses for MTSAD, yet it lacks time-frequency granularity alignment. Dual-TF (Nam et al., 2024), the most recent algorithm for MTSAD using time-frequency analysis, partially addresses the time-frequency granularity alignment issue but lacks a tailored backbone, instead relying directly on the Anomaly Transformer (Xu et al., 2021). While TFAD and Dual-TF represent progress in this area, they still exhibit the following limitations: i) Frequency-domain modeling methods have inherent biases, often overlooking high-frequency information; 2) Insufficient exploration and utilization of channel correlations in multivariate time series.
+
+# 3 CATCH
+
+In the context of time series anomaly detection, $\mathrm{X} \in \mathbb{R}^{N \times T}$ denotes a time series with $N$ channels and length $T$ . For clear delineation, we separate dimensions with commas and use this format throughout this paper. For example, we denote $\mathrm{X}_{i,j}$ as the $i$ -th channel at the $j$ -th timestamp, $\mathrm{X}_{n,:} \in \mathbb{R}^T$ as the time series of $n$ -th channel, where $n = 1,2,\dots,N$ . The multivariate time series anomaly detection problem is to determine whether $\mathrm{X}_{:,t}$ is anomaly or not.
+
+# 3.1 STRUCTURE OVERVIEW
+
+Figure 2 shows the overall architecture of the CATCH, which consists of three main modules: 1) the Forward Module, 2) the Channel Fusion Module (CFM), and 3) the Time-Frequency Reconstruction Module (TFRM). Specifically, the input multivariate time series is firstly processed via the Forward Module, consisting of the Instance Norm Layer, FFT&Patching Layer, and Projection Layer.
+
+The Instance Norm Layer is firstly to mitigate the distributional shifts between the training and testing data caused by varying statistical properties, enhancing the model's generalization in reconstructing the testing data. Then, the FFT&Patching Layer is to perform fine-grained modeling in each frequency band (patch). Specifically, we utilize the efficient FFT (Brigham & Morrow, 1967) to transform time series into orthogonal trigonometric signals in the frequency domain, where we keep
+
+both the real and imaginary parts through $\mathrm{X}^R, \mathrm{X}^I = \mathrm{FFT}(\mathrm{X})$ for maximum information retention, where $\mathrm{X}, \mathrm{X}^R, \mathrm{X}^I \in \mathbb{R}^{N \times T}$ . Next, we apply the frequency patching operation to create fine-grained frequency bands (patches), which can be formalized as follows.
+
+$$
+\left\{\mathrm {P} ^ {R _ {1}}, \mathrm {P} ^ {R _ {2}}, \dots , \mathrm {P} ^ {R _ {L}} \right\} = \operatorname {P a t c h i n g} \left(\mathrm {X} ^ {R}\right), \left\{\mathrm {P} ^ {I _ {1}}, \mathrm {P} ^ {I _ {2}}, \dots , \mathrm {P} ^ {I _ {L}} \right\} = \operatorname {P a t c h i n g} \left(\mathrm {X} ^ {I}\right), \tag {1}
+$$
+
+where $\mathrm{P}^{R_i},\mathrm{P}^{I_i}\in \mathbb{R}^{N\times p}$ denote the $i$ -th patch of $\mathrm{X}^R$ and $\mathrm{X}^I$ . $L = [T - p] / s + 1$ is the total patch number, where $p$ is the patch size and $s$ is the patch stride.
+
+We then concat each pair of $\mathrm{P}^{R_i}$ and $\mathrm{P}^{I_i}$ into $\mathrm{P}^i\in \mathbb{R}^{N\times 2p}$ , as the $i$ -th frequency patch. After patching in the frequency domain, the frequency patches are then projected into the high-dimensional hidden space through the Projection Layer: $\mathrm{P}^{\prime i} = \mathrm{Projection}(\mathrm{P}^i)$ .
+
+After the Forward Module, the processed time series is fed into the Channel Fusion Module (CFM) to dynamically model the channel correlations in each fine-grained frequency band.
+
+$$
+\left\{\tilde {\mathrm {P}} ^ {1}, \tilde {\mathrm {P}} ^ {2}, \dots , \tilde {\mathrm {P}} ^ {L} \right\} = \operatorname {C F M} \left(\left\{\mathrm {P} ^ {\prime 1}, \mathrm {P} ^ {\prime 2}, \dots , \mathrm {P} ^ {\prime L} \right\}\right), \tag {2}
+$$
+
+where $\mathrm{P}^{\prime i},\tilde{\mathrm{P}}^{i}\in \mathbb{R}^{N\times d}$ , $N$ is the number of channels and $d$ is the hidden dimension in attention blocks. The CFM parallels in a patch-wise way to model the frequency patches simultaneously. We further introduce the details of CFM in Section 3.2.
+
+Next, we utilize the Time-Frequency Reconstruction Module (TFRM) to reconstruct all frequency spectrums for real and imaginary patches and simultaneously obtain their temporal reconstruction:
+
+$$
+\mathrm {X} ^ {\prime}, \mathrm {X} ^ {\prime R}, \mathrm {X} ^ {\prime I} = \operatorname {T F R M} \left(\left\{\tilde {\mathrm {P}} ^ {R _ {1}}, \tilde {\mathrm {P}} ^ {R _ {2}}, \dots , \tilde {\mathrm {P}} ^ {R _ {L}} \right\}, \left\{\tilde {\mathrm {P}} ^ {I _ {1}}, \tilde {\mathrm {P}} ^ {I _ {2}}, \dots , \tilde {\mathrm {P}} ^ {I _ {L}} \right\}\right), \tag {3}
+$$
+
+where $\mathrm{X}^{\prime}$ is the temporal reconstruction, and $\mathrm{X}^{\prime R},\mathrm{X}^{\prime I}\in \mathbb{R}^{N\times T}$ are the frequency reconstruction. Finally, we integrate the reconstruction error in both time and frequency domains as anomaly score.
+
+# 3.2 CHANNEL FUSION MODULE
+
+The Channel Fusion Module (CFM) contains the following three components: 1) the Mask Generator (MG), 2) the Channel-Masked Transformer Layer (CMT), and 3) the Channel Correlation Discovering (CCD) mechanism. Specifically, the MG is to perceive and generate the mask matrices (channel correlations) in different frequency bands and guide the masked attention in CMT. The CMT aims to model the appropriate patch-wise channel correlations. And the CCD is to guide the MG and CMT to explore better channel correlations during optimization.
+
+Mask Generator. Inspired by Selective State Space Models such as Mamba (Dao & Gu, 2024), which utilizes Linear projections to flexibly update the hidden states based on the current data for larger capacity, the patch-wise channel associations can also be treated as a changing hidden state strongly associated with the current patch. Therefore, we devise a Linear-based mask generator to perceive the suitable channel associations for each frequency band by generating binary mask matrices to isolate the adverse effects from irrelevant channels. Note that the binary mask is an intermediate state between CI (identity matrix) and CD (all-ones matrix) strategies. We take the $i$ -th frequency patch as an example:
+
+$$
+\mathcal {D} ^ {i} = \sigma \left(\operatorname {L i n e a r} \left(\mathrm {P} ^ {\prime i}\right)\right), \mathcal {M} ^ {i} = \operatorname {R e s a m p l e} \left(\mathcal {D} ^ {i}\right), \tag {4}
+$$
+
+where $\mathrm{P}^{\prime i}\in \mathbb{R}^{N\times d}$ , $\mathcal{D}^i\in \mathbb{R}^{N\times N}$ , and $\mathcal{M}^i\in \mathbb{R}^{N\times N}$ are the hidden representation, the probability matrix, and the binary mask matrix of $i$ -th patch, respectively. $\sigma$ projects the values to probabilities.
+
+Since our goal is to filter out the adverse effects of irrelevant channels, we further perform Bernoulli resampling on the probability matrices to obtain binary mask matrix $\mathcal{M}^i$ with the same shape. Higher probability $\mathcal{D}_{l,m}^{i}$ results in $\mathcal{M}_{l,m}^{i}$ closer to 1, indicating a relationship between channel $l$ and channel $m$ . And we manually keep the diagonal items to 1. To ensure the propagation of gradients, we use the Gumbel Softmax reparameterization trick (Jang et al., 2017) during Bernoulli resampling.
+
+Channel-Masked Transformer Layer. After the Mask Generator outputs the mask matrices for frequency bands, we utilize the transformer layer to further capture the fine-grained channel correlations. The Layer Normalization is applied before each attention block to mitigate the over-focusing
+
+phenomenon on frequency components with larger amplitudes (Piao et al., 2024):
+
+$$
+\mathrm {P} ^ {* i} = \operatorname {L a y e r N o r m} \left(\mathrm {P} ^ {\prime i}\right) = \left(\mathrm {P} ^ {\prime i} - \operatorname {M e a n} _ {n = 1} ^ {N} \left(\mathrm {P} _ {n,:} ^ {\prime i}\right)\right) / \sqrt {\operatorname {V a r} _ {n = 1} ^ {N} \left(\mathrm {P} _ {n,:} ^ {\prime i}\right)}, \tag {5}
+$$
+
+where $\mathrm{P}^{\prime i}\in \mathbb{R}^{N\times d}$ and $\mathrm{P}^{*i}\in \mathbb{R}^{N\times d}$ are the hidden representation and the normalized representation of $i$ -th patch, respectively. Empirically, we utilize the masked attention mechanism to further model the fine-grained interrelationships among relevant channels and integrate the mask matrix in a calculated way to keep the propagation of gradients:
+
+$$
+\mathrm {Q} ^ {i} = \mathrm {P} ^ {* i} \cdot \mathrm {W} ^ {Q}, \mathrm {K} ^ {i} = \mathrm {P} ^ {* i} \cdot \mathrm {W} ^ {K}, \mathrm {V} ^ {i} = \mathrm {P} ^ {* i} \cdot \mathrm {W} ^ {V}, \tag {6}
+$$
+
+$$
+\mathcal {T} ^ {i} = \mathrm {Q} ^ {i} \cdot \left(\mathrm {K} ^ {\mathrm {i}}\right) ^ {T}, \mathcal {S} ^ {i} = \mathcal {T} ^ {i} \odot \mathcal {M} ^ {i} + \left(1 - \mathcal {M} ^ {i}\right) \odot (- \infty), \tag {7}
+$$
+
+$$
+\text {M a s k e d S c o r e s} ^ {i} = \mathcal {S} ^ {i} / \sqrt {d}, \tilde {\mathrm {P}} ^ {i} = \operatorname {S o f t m a x} (\text {M a s k e d S c o r e s} ^ {i}) \cdot \mathrm {V} ^ {i}, \tag {8}
+$$
+
+where $\mathrm{W}^Q, \mathrm{W}^K, \mathrm{W}^V \in \mathbb{R}^{d \times d}$ . $\mathcal{M}^i \in \mathbb{R}^{N \times N}$ , $\mathcal{T}^i \in \mathbb{R}^{N \times N}$ , $\mathcal{S}^i \in \mathbb{R}^{N \times N}$ , and $\tilde{\mathrm{P}}^i \in \mathbb{R}^{N \times d}$ are the binary mask matrix, the attention matrix, the masked attention matrix, and the hidden representation processed by CMT of $i$ -th patch, respectively.
+
+We utilize the same Feed-Forward networks and skip connections as the classical transformers (Vaswani et al., 2017). We also apply multi-head mechanism to jointly attend to information from different representational subspaces and the CMT can be stacked multiple times.
+
+Channel Correlation Discovering. From an optimization perspective, it is essential to design appropriate optimization objectives to enhance the effectiveness of generated masks. A direct motivation is to explicitly enhance the attention scores between relevant channels defined by the mask, thus aligning the attention mechanism with the currently discovered optimal channel correlation, which helps isolate the adverse effects from irrelevant channels and provides robustness for the attention mechanism. Then we iteratively optimize the Mask Generator to refine the channel correlations, tuning the capacity of attention mechanism in the Channel-Masked Transformer Layer to fully capture the interrelationships between channels. Intuitively, we devise two loss functions to guide the Mask Generator exploring the space of channel correlations (from CI to CD). The proposed loss functions are formalized as:
+
+$$
+\text {C l u s t e r i n g L o s s} = - \frac {1}{N} \sum_ {k = 1} ^ {N} \log \left(\frac {\sum_ {m = 1} ^ {N} \exp \left(\mathcal {S} _ {k , m} ^ {i}\right) / \tau}{\sum_ {l = 1} ^ {N} \exp \left(\mathcal {T} _ {k , l} ^ {i}\right) / \tau}\right), \tag {10}
+$$
+
+where $\tau$ is the temperature coefficient, $N$ is the number of channels, I is the identity matrix, and $\| \cdot \| _F$ is the Frobenius norm. $\mathcal{T}^i\in \mathbb{R}^{N\times N}$ $\mathcal{S}^i\in \mathbb{R}^{N\times N}$ , and $\mathcal{M}^i\in \mathbb{R}^{N\times N}$ are the attention matrix, the masked attention matrix, and the binary mask matrix for $i$ -th patch, respectively.
+
+The ClusteringLoss is similar to the InfoNCE (He et al., 2020) in form but does not fix the number of "positive" pairs. In contrast, it changes its "positive" pairs for different patches based on the current discovered channel correlation $\mathcal{M}^i$ . Theoretically, the similarities between "positive" or "negative" pairs are also calculated through inner product, so we share the calculating results of $S^i$ and $\mathcal{T}^i$ from the attention mechanism to save the computational cost. As shown in Figure 2, we exhibit the "positive" and "negative" pairs in the attention matrix $\mathcal{T}$ and masked attention matrix $S$ . Specifically, it sets the Query and Key views of relevant channels in a frequency band $(\mathcal{M}_{l,m}^i = 1)$ as the "positive" pairs, otherwise $(\mathcal{M}_{l,m}^i = 0)$ "negative" pairs, thus encouraging the $\mathrm{W}^Q$ and $\mathrm{W}^K$ to cluster the patch-wise relevant channels in the hidden spaces and lead to higher attention scores. However, only a single ClusteringLoss may cause some adverse effects by urging the Mask Generator to output constant ones matrix, so that we add a RegularLoss to mitigate this risk by restricting the number of relevant channels. Equipped with the two optimization objectives, the Mask Generator is encouraged to discover appropriate patch-wise channel correlations between CI and CD, and the attention mechanism is also enhanced by optimizing the $\mathrm{W}^Q$ and $\mathrm{W}^K$ to learn fine-grained channel representations in the hidden spaces.
+
+# 3.3 TIME FREQUENCY RECONSTRUCTION MODULE
+
+The Time-Frequency Reconstruction Module (TFRM) contains the following two components: 1) the Flatten & Linear Head Layer and 2) the iFFT Layer. Specifically, after the CFM fully extract
+
+the fine-grained channel correlations, we utilize the TFRM to flatten the patch-wise representations and reconstruct all frequency spectrums with MLP projections separately for real and imaginary patches, and obtain temporal reconstruction through iFFT:
+
+$$
+\mathrm {X} ^ {\prime R} = \operatorname {P r o j e c t i o n} _ {R} \left(\text {F l a t t e n H e a d} \left(\left\{\tilde {\mathrm {P}} ^ {R _ {1}}, \tilde {\mathrm {P}} ^ {R _ {2}}, \dots , \tilde {\mathrm {P}} ^ {R _ {L}} \right\}\right)\right), \tag {11}
+$$
+
+$$
+\mathrm {X} ^ {\prime I} = \operatorname {P r o j e c t i o n} _ {I} \left(\text {F l a t t e n H e a d} \left(\left\{\tilde {\mathrm {P}} ^ {I _ {1}}, \tilde {\mathrm {P}} ^ {I _ {2}}, \dots , \tilde {\mathrm {P}} ^ {I _ {L}} \right\}\right)\right), \tag {12}
+$$
+
+$$
+\mathrm {X} ^ {\prime} = \mathrm {i F T} \left(\mathrm {X} ^ {\prime R}, \mathrm {X} ^ {\prime I}\right), \tag {13}
+$$
+
+where $\mathbf{X}^{\prime R},\mathbf{X}^{\prime I}$ , and $\mathbf{X}^{\prime}\in \mathbb{R}^{N\times T}$ . We then adopt the reconstruction loss functions both in time and frequency domains to separately enhance the ability of point-to-point and subsequence modeling. The reconstruction functions in time and frequency domains are formalized as:
+
+$$
+\operatorname {R e c L o s s} ^ {\text {t i m e}} = \left| \left| X - X ^ {\prime} \right| \right| _ {F} ^ {2} \quad (1 4) \quad \operatorname {R e c L o s s} ^ {\text {f r e q}} = \left| \left| X ^ {R} - X ^ {\prime R} \right| \right| _ {1} + \left| \left| X ^ {I} - X ^ {\prime I} \right| \right| _ {1} \tag {15}
+$$
+
+We utilize 2-norm in the time domain and 1-norm in the frequency domain due to the distinct numerical characteristics of time and frequency domains (Wang et al., 2024d).
+
+# 3.4 JOINT BI-LEVEL OPTIMIZATION
+
+We then design a novel joint bi-level training process to enhance the model's ability to detect both point anomalies and subsequence anomalies. Our TotalLoss $\mathcal{L}$ mainly consists of reconstruction loss functions in the time (RecLoss $^{\text{time}}$ ) and frequency (RecLoss $^{\text{freq}}$ ) domains, ClusteringLoss and RegularLoss from the Channel Correlation Discovering mechanism. The reconstruction loss functions are used to enhance model's ability in both time and frequency domains to detect point and subsequence anomalies. The ClusteringLoss and RegularLoss are used to guide the discovering for fine-grained channel correlations. Specifically, we weightsum these four optimization objectives:
+
+$$
+\mathcal {L} = \operatorname {R e c L o s s} ^ {\text {t i m e}} + \lambda_ {1} \cdot \operatorname {R e c L o s s} ^ {\text {f r e q}} + \lambda_ {2} \cdot \text {C l u s t e r i n g L o s s} + \lambda_ {3} \cdot \text {R e g u l a r L o s s}, \tag {16}
+$$
+
+where $\lambda_1, \lambda_2$ , and $\lambda_3$ are empirical coefficients. We then utilize a bi-level optimization Algorithm 1 to iteratively update the Mask Generator and other model parameters. Intuitively, the process optimizes model parameters for current channel correlations and then discovers better channel correlations for the optimized model parameters, which facilitates the refinement of channel correlations in a continuous way.
+
+# 3.5 ANOMALY SCORING
+
+When calculating the anomaly score, the ner by assigning an anomaly score for point anomalies in the time domain.
+
+existing methods often consider coarse-grained window-granularity scoring, which adds a frequency anomaly score to each point in the whole input window (Ren et al., 2019; Park et al., 2021; Zhang et al., 2022). However, they fail to know the actual boundaries of subsequence anomalies, thus causing misjudgment or omission. During scoring, we perform the patching operation in the input window with the stride length equal to 1. In Figure 3, the shadow in the Time Series indicates a series of subsequence anomalies. Take the calculation of the
+
+convention is to obey the point-to-point maneach timestamp, thus mainly reflecting the To better quantify subsequence anomalies,
+
+
+Figure 3: Anomaly Scoring.
+
+anomaly score for the red time point in the Time Series as an example, we first calculate the time domain reconstruction error (RecLoss $^{time}$ ) between its reconstructed value in the time domain and the true value using Equation 14, and denote the result as the time domain anomaly score (time-score). At the same time, we collect all patches containing the red time point, transform these patches into the frequency domain, and compute the frequency reconstruction error (RecLoss $^{freq}$ ) between the reconstructed value and the true frequency-domain value using Equation 15. The average frequency reconstruction error of all patches is then taken as the frequency domain anomaly score (freq-score)
+
+for this red time point, as the average performs better than the minimum or maximum value (Schmidl et al., 2022). Finally, we weightsum the time-score and freq-score point-to-point to obtain the final anomaly score for the Time Series.
+
+$$
+\text {A n o m a l y S c o r e} = \text {t i m e - s c o r e} + \lambda_ {\text {s c o r e}} \cdot \text {f r e q - s c o r e} \tag {17}
+$$
+
+For ease of understanding, we provide an efficient implementation version of the calculation of freq-score in Appendix A.6. Obviously, our method can reflect the real surroundings of each point by considering all possible subsequence anomalies around this point, thus achieving the point-granularity alignment and showing strong sensitivity (Nam et al., 2024).
+
+# 4 EXPERIMENTS
+
+Datasets We conduct experiments using 12 real-world datasets and 12 synthetic datasets (TODS datasets) to assess the performance of CATCH, more details of the benchmark datasets are included in Appendix A.1. The synthetic datasets are generated using the method reported in (Lai et al., 2021). Please refer to Appendix A.7 for specific implementation. We report the results on 12 real-world MTSAD datasets, including MSL, SMAP, PSM, SMD, SWAT, CICIDS, CalIt2, NYC, Creditcard, GECCO, Genesis, and ASD in the main text. We also report the mean results of the 6 types of synthetic anomalies. The complete results can be found in the Appendix C.
+
+Baselines We comprehensively compare our model against 15 baselines, including the latest state-of-the-art (SOTA) models. These baselines feature the 2024 SOTA iTransformer (iTans) (Liu et al., 2024c), ModernTCN (Modern) (Luo & Wang, 2024), and DualTF (Nam et al., 2024), along with the 2023 SOTA Anomaly Transformer (ATrans) (Xu et al., 2021), DCdetector (DC) (Yang et al., 2023b), TimesNet (TsNet) (Wu et al., 2023), PatchTST (Patch) (Nie et al., 2023), DLinear (DLin) (Zeng et al., 2023), NLinear (NLin) (Zeng et al., 2023), TFAD (Zhang et al., 2022), and AutoEncoder (AE) (Sakurada & Yairi, 2014). Additionally, we include non-learning methods such as One-Class SVM (OCSVM)(Schölkopf et al., 1999), Isolation Forest (IF)(Liu et al., 2008), Principal Component Analysis (PCA) (Shyu et al., 2003), and HBOS (Goldstein & Dengel, 2012).
+
+Setup To keep consistent with previous works, we adopt Label-based metric: Affiliated-F1-score $(Aff - F)$ (Huet et al., 2022) and Score-based metric: Area under the Receiver Operating Characteristics Curve (ROC) (Fawcett, 2006) as evaluation metrics. We report the algorithm performance under a total of 16 evaluation metrics in the Appendix C, and the details of the 16 metrics can be found in Appendix A.2. More implementation details are presented in the Appendix A.3.
+
+# 4.1 MAIN RESULTS
+
+We first evaluate CATCH with 15 competitive baselines on 12 real-world multivariate and 6 types of synthetic multivariate datasets generated by the methods reported in TODS (Lai et al., 2021) as shown in Table 2. It can be seen that our proposed CATCH achieves SOTA results under the widely used Affiliated-F1-score metric in most benchmark datasets. Besides, CATCH has the highest AUC-ROC values on most datasets. It means that our model performs well in the false-positive and true-positive rates under various pre-selected thresholds, which is important for real-world applications. Since the continuous abnormal segments in SWAT exceed the look-back window supported by the reconstruction model, CATCH cannot effectively capture this kind of abnormality. In summary, CATCH effectively handles both point (Contextual, Global) and subsequence (Seasonal, Shapelet, Trend, Mixture) anomalies while showing greater improvement in detecting the subsequence anomalies.
+
+# 4.2 MODEL ANALYSIS
+
+Ablation study To ascertain the impact of different modules within CATCH, we perform ablation studies focusing on the following components: (1) Substitute the channel correlation discovering mechanism with fixed Channel Strategies. (2) Delete one of the four optimization objectives separately. (3) Remove the patching operation during training process. (4) Replace the Scoring technique with others. (5) Replace the bi-level optimization process with a normal process to optimize the Mask Generator and model simultaneously.
+
+Table 2: Average A-R (AUC-ROC) and Aff-F (Affiliated-F1) accuracy measures for 12 real-world datasets and 6 synthetic datasets of different types of anomalies. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modem
iTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
Ocsvm
IF
PCA
HBOS
TFAD
CICIDS
Aff-F
0.787
0.654
0.708
0.692
0.560
0.664
0.657
0.660
0.669
0.669
0.243
0.693
0.604
0.619
0.542
0.579
A-R
0.795
0.697
0.692
0.603
0.528
0.638
0.732
0.716
0.751
0.691
0.629
0.537
0.787
0.601
0.760
0.504
Callt2
Aff-F
0.835
0.780
0.812
0.751
0.729
0.697
0.794
0.793
0.793
0.757
0.587
0.783
0.402
0.768
0.756
0.744
A-R
0.838
0.676
0.791
0.574
0.533
0.527
0.771
0.808
0.752
0.695
0.767
0.804
0.775
0.790
0.798
0.504
SWAT
Aff-F
0.755
0.728
0.718
0.695
0.696
0.696
0.793
0.716
0.736
0.715
0.738
0.703
0.681
0.708
0.650
0.686
A-R
0.345
0.244
0.242
0.567
0.405
0.501
0.288
0.242
0.521
0.231
0.817
0.657
0.346
0.819
0.831
0.500
Credit
Aff-F
0.750
0.744
0.713
0.663
0.650
0.632
0.744
0.746
0.738
0.742
0.561
0.714
0.634
0.710
0.695
0.600
A-R
0.958
0.957
0.934
0.703
0.552
0.504
0.957
0.957
0.954
0.948
0.909
0.953
0.860
0.871
0.951
0.500
GECCO
Aff-F
0.908
0.893
0.839
0.701
0.782
0.687
0.894
0.906
0.893
0.882
0.823
0.666
0.424
0.785
0.708
0.627
A-R
0.970
0.952
0.795
0.714
0.516
0.555
0.954
0.949
0.947
0.936
0.769
0.804
0.619
0.711
0.557
0.499
Genesis
Aff-F
0.896
0.833
0.891
0.810
0.856
0.776
0.864
0.856
0.856
0.829
0.854
0.677
0.788
0.814
0.721
0.535
A-R
0.974
0.676
0.690
0.937
0.947
0.659
0.913
0.685
0.696
0.755
0.931
0.733
0.549
0.815
0.897
0.497
MSL
Aff-F
0.740
0.726
0.710
0.588
0.692
0.694
0.734
0.724
0.725
0.723
0.625
0.641
0.584
0.678
0.680
0.665
A-R
0.664
0.633
0.611
0.576
0.508
0.507
0.613
0.637
0.624
0.592
0.562
0.524
0.524
0.552
0.574
0.500
NYC
Aff-F
0.994
0.769
0.684
0.708
0.853
0.862
0.794
0.776
0.828
0.819
0.689
0.667
0.648
0.680
0.675
0.689
A-R
0.816
0.466
0.640
0.633
0.671
0.549
0.791
0.709
0.768
0.671
0.504
0.456
0.475
0.666
0.446
0.502
PSM
Aff-F
0.859
0.825
0.854
0.725
0.710
0.682
0.842
0.831
0.831
0.843
0.707
0.531
0.620
0.702
0.658
0.628
A-R
0.652
0.593
0.592
0.600
0.514
0.501
0.592
0.586
0.580
0.585
0.650
0.619
0.542
0.648
0.620
0.500
SMD
Aff-F
0.847
0.840
0.827
0.679
0.724
0.675
0.831
0.845
0.841
0.844
0.439
0.742
0.626
0.738
0.629
0.660
A-R
0.811
0.722
0.745
0.631
0.508
0.502
0.727
0.736
0.728
0.738
0.774
0.602
0.664
0.679
0.626
0.500
SMAP
Aff-F
0.699
0.635
0.587
0.674
0.703
0.701
0.638
0.606
0.616
0.601
0.463
0.503
0.512
0.505
0.509
0.675
A-R
0.504
0.455
0.409
0.478
0.511
0.522
0.453
0.448
0.397
0.434
0.522
0.393
0.487
0.396
0.585
0.500
ASD
Aff-F
0.804
0.782
0.780
0.605
0.674
0.702
0.800
0.777
0.782
0.766
0.731
0.617
0.781
0.656
0.669
0.630
A-R
0.824
0.692
0.759
0.579
0.506
0.520
0.805
0.760
0.739
0.690
0.704
0.588
0.618
0.656
0.603
0.502
Contextual
Aff-F
0.823
0.619
0.802
0.635
0.601
0.597
0.666
0.766
0.780
0.700
0.755
0.696
0.679
0.475
0.481
0.569
A-R
0.910
0.562
0.905
0.598
0.546
0.525
0.908
0.854
0.700
0.530
0.896
0.711
0.821
0.538
0.464
0.504
Global
Aff-F
0.949
0.748
0.922
0.649
0.656
0.567
0.910
0.940
0.928
0.808
0.919
0.849
0.912
0.704
0.528
0.566
A-R
0.997
0.873
0.976
0.595
0.564
0.514
0.989
0.992
0.979
0.675
0.996
0.996
0.938
0.758
0.608
0.500
Seasonal
Aff-F
0.997
0.681
0.992
0.776
0.788
0.859
0.992
0.989
0.993
0.951
0.927
0.805
0.938
0.637
0.673
0.686
A-R
0.998
0.512
0.946
0.701
0.584
0.644
0.958
0.922
0.823
0.623
0.949
0.829
0.918
0.437
0.516
0.502
Shapelet
Aff-F
0.985
0.675
0.961
0.699
0.699
0.737
0.941
0.933
0.961
0.759
0.871
0.771
0.887
0.683
0.640
0.684
A-R
0.970
0.522
0.864
0.573
0.519
0.597
0.877
0.818
0.684
0.563
0.865
0.655
0.748
0.517
0.337
0.503
Trend
Aff-F
0.916
0.734
0.901
0.677
0.584
0.765
0.897
0.888
0.721
0.830
0.699
0.691
0.914
0.693
0.669
0.642
A-R
0.892
0.612
0.847
0.524
0.500
0.569
0.858
0.835
0.671
0.642
0.482
0.471
0.878
0.484
0.468
0.502
Mixture
Aff-F
0.892
0.856
0.862
0.652
0.641
0.709
0.863
0.879
0.727
0.839
0.673
0.676
0.881
0.676
0.667
0.710
A-R
0.931
0.763
0.854
0.570
0.522
0.516
0.861
0.863
0.767
0.749
0.493
0.475
0.911
0.517
0.531
0.501
+
+Table 3 illustrates the unique impact of each module. We have the following observations: 1) Compared to the Channel-Independent (CI) Strategy, considering the relationships between variables using Channel Dependent (CD) Strategy or random masking yields better results, with the random masking performing worse than the CD method. Ours outperforms the CD method, further demonstrating the effectiveness of the channel correlation discovering mechanism. 2) Removing any of the four optimization objectives leads to
+
+a decline in model performance, with the most significant drop occurring when the frequency loss is removed. This fully demonstrates the rationality and effectiveness of the four optimization objectives. 3) When the patching operation is removed during training and replaced with a window-based approach to model the relationships between variables, the model performance significantly decreases. This indicates that the patching operation captures fine-grained frequency information, which is more conducive to anomaly detection. 4) When replacing the combination of point-granularity temporal anomaly scores and patch-wise point-aligned frequency anomaly scores with the combination of point-granularity temporal anomaly scores and window-granularity frequency anomaly scores, or when using only one of them, the model performance decreases in both cases. This indicates our Scoring technique shows stronger sensitivity in detecting anomalies. 5) When using a normal optimization process, the model performance also decreases consistently, which provides empirical evidence for the bi-level optimization.
+
+Parameter Sensitivity We also study the parameter sensitivity of the CATCH. Figure 4a shows the performance under different input window sizes. As discussed, a single point can not be taken as an instance in time series. Window segmentation is widely used in the analysis, and window size is a significant parameter. For our primary evaluation, the window size is usually set as 96 or 192. Besides, we adopt the score weight in section 3.5 to trade off the temporal score and the
+
+
+(a) Window size
+
+
+(b) $\lambda_{score}$
+
+
+Figure 4: Parameter sensitivity studies of main hyper-parameters in CATCH.
+
+
+(c) Training patch size
+(d) Testing patch size
+
+frequency score—see Figure 4b. We find that score weight is mostly stable and easy to tune in the range of 0.01 to 0.1. Figure 4c and Figure 4d present that our model is stable to the Traing patch size and Testing patch size respectively over extensive datasets. Note that a small patch size indicates a larger memory cost and a larger patch number. Especially, only considering the performance, its relationship to the patch size can be determined by the data pattern. For example, our model performs better when the training patch size is 8 for MSL, the testing patch size is 32 for CICIDS.
+
+
+Figure 5: Visualization of dual-domain anomaly scores from CATCH for different categories of point and subsequence anomalies using the TODS dataset.
+
+Anomaly criterion visualization We show how CATCH works by visualizing different anomalies in Figure 5. This figure showcases CATCH's performance across five anomaly categories (Lai et al., 2021) on the TODS dataset, with temporal and frequency scores displayed in the second row, and the final anomaly scores in the third row. For point anomalies (first and second columns), the temporal scores exhibit sharp increases at the true anomaly locations, dominating the total scores. In contrast, for subsequence anomalies (third, fourth, and fifth columns), frequency scores remain elevated across the entire anomaly interval, show strong sensitivity to the actual boundaries of subsequence anomalies and compensate for the insensitivity of the temporal scores. Consequently, each domain contributes uniquely, allowing the final anomaly scores to accurately capture both point and subsequence anomalies.
+
+# 5 CONCLUSION
+
+In this paper, we propose a novel framework, CATCH, capable of simultaneously detecting both point and subsequence anomalies. To sum up, it patchifys the frequency domain for fine-grained insights into frequency bands, flexibly perceives and discovers appropriate channel correlations, optimizes the attention mechanism for both robustness and capacity with a bi-level optimization algorithm. These innovative mechanisms collectively empower CATCH to precisely detect both point and subsequence anomalies. Comprehensive experiments on real-world and synthetic datasets demonstrate that CATCH achieves state-of-the-art performance.
+
+# ACKNOWLEDGEMENTS
+
+This work was partially supported by National Natural Science Foundation of China (62472174, 62372179). Bin Yang is the corresponding author of the work.
+
+# REFERENCES
+
+Markus M Breunig, Hans-Peter Kriegel, Raymond T Ng, and Jörg Sander. LOF: identifying density-based local outliers. In Proceedings of the 2000 ACM SIGMOD international conference on Management of data, pp. 93-104, 2000.
+E Oran Brigham and RE Morrow. The fast fourier transform. IEEE spectrum, 4(12):63-70, 1967.
+David Campos, Miao Zhang, Bin Yang, Tung Kieu, Chenjuan Guo, and Christian S. Jensen. LightTS: Lightweight time series classification with adaptive ensemble distillation. Proc. ACM Manag. Data, 1(2):171:1-171:27, 2023.
+Peng Chen, Yingying Zhang, Yunyao Cheng, Yang Shu, Yihang Wang, Qingsong Wen, Bin Yang, and Chenjuan Guo. Pathformer: Multi-scale transformers with adaptive pathways for time series forecasting. In ICLR, 2024.
+Tao Dai, Beiliang Wu, Peiyuan Liu, Naiqi Li, Jigang Bao, Yong Jiang, and Shu-Tao Xia. Periodicity decoupling framework for long-term series forecasting. In ICLR, 2024.
+Tri Dao and Albert Gu. Transformers are ssms: Generalized models and efficient algorithms through structured state space duality. arXiv preprint arXiv:2405.21060, 2024.
+Jesse Davis and Mark Goadrich. The relationship between precision-recall and roc curves. In Proceedings of the international conference on machine learning, pp. 233-240, 2006.
+Ailin Deng and Bryan Hooi. Graph neural network-based anomaly detection in multivariate time series. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pp. 4027-4035, 2021.
+Tom Fawcett. An introduction to roc analysis. Pattern recognition letters, 27(8):861-874, 2006.
+Hongfan Gao, Wangmeng Shen, Xiangfei Qiu, Ronghui Xu, Jilin Hu, and Bin Yang. DiffImp: Efficient diffusion model for probabilistic time series imputation with bidirectional mamba backbone. arXiv preprint arXiv:2410.13338, 2024.
+Markus Goldstein and Andreas Dengel. Histogram-based outlier score (hbos): A fast unsupervised anomaly detection algorithm. *KI* 2012 - German Conference on Artificial Intelligence: poster and demo track, 1:59-63, 2012.
+Chenjuan Guo, Christian S. Jensen, and Bin Yang. Towards total traffic awareness. SIGMOD Record, 43(3):18-23, 2014.
+Xiaojun Guo, Yifei Wang, Tianqi Du, and Yisen Wang. Contranorm: A contrastive learning perspective on oversmoothing and beyond. In The Eleventh International Conference on Learning Representations, 2023.
+Lu Han, Han-Jia Ye, and De-Chuan Zhan. The capacity and robustness trade-off: Revisiting the channel independent strategy for multivariate time series forecasting. IEEE Trans. Knowl. Data Eng., 36(11):7129-7142, 2024.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9729-9738, 2020.
+Yangfan He, Sida Li, Kun Li, Jianhui Wang, Binxu Li, Tianyu Shi, Jun Yin, Miao Zhang, and Xueqian Wang. Enhancing low-cost video editing with lightweight adaptors and temporal-aware inversion. arXiv preprint arXiv:2501.04606, 2025a.
+
+Yangfan He, Jianhui Wang, Kun Li, Yijin Wang, Li Sun, Jun Yin, Miao Zhang, and Xueqian Wang. Enhancing intent understanding for ambiguous prompts through human-machine co-adaptation. arXiv preprint arXiv:2501.15167, 2025b.
+Shiyan Hu, Kai Zhao, Xiangfei Qiu, Yang Shu, Jilin Hu, Bin Yang, and Chenjuan Guo. MultiRC: Joint learning for time series anomaly prediction and detection with multi-scale reconstructive contrast. arXiv preprint arXiv:2410.15997, 2024.
+Qihe Huang, Lei Shen, Ruixin Zhang, Shouhong Ding, Binwu Wang, Zhengyang Zhou, and Yang Wang. CrossGNN: Confronting noisy multivariate time series via cross interaction refinement. In NeurIPS, pp. 46885-46902, 2023.
+Qihe Huang, Lei Shen, Ruixin Zhang, Jiahuan Cheng, Shouhong Ding, Zhengyang Zhou, and Yang Wang. HDMixer: Hierarchical dependency with extendable patch for multivariate time series forecasting. In AAAI, pp. 12608-12616, 2024.
+Alexis Huet, Jose Manuel Navarro, and Dario Rossi. Local evaluation of time series anomaly detection algorithms. In Proceedings of the ACM SIGKDD international conference on knowledge discovery & data mining, pp. 635-645, 2022.
+Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparametrization with gumble-softmax. In International Conference on Learning Representations (ICLR 2017). OpenReview.net, 2017.
+Tung Kieu, Bin Yang, and Christian S Jensen. Outlier detection for multidimensional time series using deep neural networks. In 2018 19th IEEE International Conference on Mobile Data Management (MDM), 2018.
+Tung Kieu, Bin Yang, Chenjuan Guo, and Christian S Jensen. Outlier detection for time series with recurrent autoencoder ensembles. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 2019.
+Kwei-Herng Lai, Daochen Zha, Junjie Xu, Yue Zhao, Guanchu Wang, and Xia Hu. Revisiting time series outlier detection: Definitions and benchmarks. In Proceedings of the conference on neural information processing systems datasets and benchmarks track (round 1), 2021.
+Xing Li, Qiquan Shi, Gang Hu, Lei Chen, Hui Mao, Yiyuan Yang, Mingxuan Yuan, Jia Zeng, and Zhuo Cheng. Block access pattern discovery via compressed full tensor transformer. In Proceedings of the 30th ACM International Conference on Information & Knowledge Management, pp. 957-966, 2021.
+Yijie Li, Hewei Wang, Zhenqi Li, Shaofan Wang, Soumyabrata Dev, and Guoyu Zuo. Daanet: Dual attention aggregating network for salient object detection. In 2023 IEEE International Conference on Robotics and Biomimetics (ROBIO), pp. 1-7, 2023.
+Yijie Li, Hewei Wang, and Aggelos Katsaggelos. CPDR: Towards Highly-Efficient Salient Object Detection via Crossed Post-decoder Refinement. In 35th British Machine Vision Conference 2024, BMVC 2024, Glasgow, UK, November 25-28, 2024, 2024a.
+Yijie Li, Hewei Wang, Jinfeng Xu, Zixiao Ma, Puzhen Wu, Shaofan Wang, and Soumyabrata Dev. CP2M: Clustered-Patch-Mixed Mosaic Augmentation for Aerial Image Segmentation. arXiv preprint arXiv:2501.15389, 2025a.
+Yijie Li, Hewei Wang, Jinfeng Xu, Puzhen Wu, Yunzhong Xiao, Shaofan Wang, and Soumyabrata Dev. DDUNet: Dual Dynamic U-Net for Highly-Efficient Cloud Segmentation. arXiv preprint arXiv:2501.15385, 2025b.
+Zhe Li, Xiangfei Qiu, Peng Chen, Yihang Wang, Hanyin Cheng, Yang Shu, Jilin Hu, Chenjuan Guo, Aoying Zhou, Qingsong Wen, et al. FoundTS: Comprehensive and unified benchmarking of foundation models for time series forecasting. arXiv preprint arXiv:2410.11802, 2024b.
+Shengsheng Lin, Weiwei Lin, Wentai Wu, Haojun Chen, and Junjie Yang. SparseTSF: Modeling long-term time series forecasting with 1k parameters. In ICML, pp. 30211-30226, 2024.
+
+Fei Tony Liu, Kai Ming Ting, and Zhi-Hua Zhou. Isolation forest. In Proceedings of the 2008 IEEE international conference on data mining, pp. 413-422, 2008.
+Peiyuan Liu, Hang Guo, Tao Dai, Naiqi Li, Jigang Bao, Xudong Ren, Yong Jiang, and Shu-Tao Xia. CALF: Aligning llms for time series forecasting via cross-modal fine-tuning. arXiv preprint arXiv:2403.07300, 2024a.
+Qinghua Liu and John Paparrizos. The elephant in the room: Towards a reliable time-series anomaly detection benchmark. In NeurIPS, 2024.
+Qinghua Liu, Paul Boniol, Themis Palpanas, and John Paparrizos. Time-series anomaly detection: Overview and new trends. Proc. VLDB Endow., 17(12):4229-4232, 2024b.
+Sicong Liu, Yang Shu, Chenjuan Guo, and Bin Yang. Learning generalizable skills from offline multi-task data for multi-agent cooperation. In The Thirteenth International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=HR1ujVR0ig.
+Yong Liu, Tengge Hu, Haoran Zhang, Haixu Wu, Shiyu Wang, Lintao Ma, and Mingsheng Long. Transformer: Inverted transformers are effective for time series forecasting. In The Twelfth International Conference on Learning Representations, 2024c.
+Donghao Luo and Xue Wang. Modern纯 convolution structure for general time series analysis. In The Twelfth International Conference on Learning Representations, 2024.
+Youngeun Nam, Susik Yoon, Yooju Shin, Minyoung Bae, Hwanjun Song, Jae-Gil Lee, and Byung Suk Lee. Breaking the time-frequency granularity discrepancy in time-series anomaly detection. In Proceedings of the ACM on Web Conference 2024, pp. 4204-4215, 2024.
+Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. In The Eleventh International Conference on Learning Representations, 2023.
+John Paparrizos, Paul Boniol, Themis Palpanas, Ruey S Tsay, Aaron Elmore, and Michael J Franklin. Volume Under the Surface: A New Accuracy Evaluation Measure for Time-Series Anomaly Detection. Proceedings of the VLDB Endowment, 15(11):2774-2787, 2022a.
+John Paparrizos, Yuhao Kang, Paul Boniol, Ruey S Tsay, Themis Palpanas, and Michael J Franklin. Tsb-uad: an end-to-end benchmark suite for univariate time-series anomaly detection. Proceedings of the VLDB Endowment, 15(8):1697-1711, 2022b.
+Namuk Park and Songkuk Kim. How do vision transformers work? In 10th International Conference on Learning Representations, 2022.
+Yong-chan Park, Jun-Gi Jang, and U Kang. Fast and accurate partial fourier transform for time series data. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pp. 1309-1318, 2021.
+Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Z. Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In NeurIPS, pp. 8024-8035, 2019.
+Xihao Piao, Zheng Chen, Taichi Murayama, Yasuko Matsubara, and Yasushi Sakurai. Fredformer: Frequency debiased transformer for time series forecasting. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 2400-2410, 2024.
+Xiangfei Qiu, Jilin Hu, Lekui Zhou, Xingjian Wu, Junyang Du, Buang Zhang, Chenjuan Guo, Aoying Zhou, Christian S. Jensen, Zhenli Sheng, and Bin Yang. TFB: Towards comprehensive and fair benchmarking of time series forecasting methods. Proc. VLDB Endow., 17(9):2363-2377, 2024.
+
+Xiangfei Qiu, Hanyin Cheng, Xingjian Wu, Jilin Hu, and Chenjuan Guo. A comprehensive survey of deep learning for multivariate time series forecasting: A channel strategy perspective. arXiv preprint arXiv:2502.10721, 2025a.
+Xiangfei Qiu, Xiuwen Li, Ruiyang Pang, Zhicheng Pan, Xingjian Wu, Liu Yang, Jilin Hu, Yang Shu, Xuesong Lu, Chengcheng Yang, Chenjuan Guo, Aoying Zhou, Christian S. Jensen, and Bin Yang. Easytime: Time series forecasting made easy. In ICDE, 2025b.
+Xiangfei Qiu, Xingjian Wu, Yan Lin, Chenjuan Guo, Jilin Hu, and Bin Yang. DUET: Dual clustering enhanced multivariate time series forecasting. In SIGKDD, 2025c.
+Sridhar Ramaswamy, Rajeev Rastogi, and Kyuseok Shim. Efficient algorithms for mining outliers from large data sets. In Proceedings of the 2000 ACM SIGMOD international conference on management of data, pp. 427-438, 2000.
+Hansheng Ren, Bixiong Xu, Yujing Wang, Chao Yi, Congrui Huang, Xiaoyu Kou, Tony Xing, Mao Yang, Jie Tong, and Qi Zhang. Time-series anomaly detection service at microsoft. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining, pp. 3009-3017, 2019.
+Mayu Sakurada and Takehisa Yairi. Anomaly detection using autoencoders with nonlinear dimensionality reduction. In Proceedings of the MLSDA 2014 2nd workshop on machine learning for sensory data analysis, pp. 4-11, 2014.
+Sebastian Schmidl, Phillip Wenig, and Thorsten Papenbrock. Anomaly detection in time series: a comprehensive evaluation. Proceedings of the VLDB Endowment, 15(9):1779-1797, 2022.
+Bernhard Schölkopf, Robert C Williamson, Alex Smola, John Shawe-Taylor, and John Platt. Support vector method for novelty detection. Advances in neural information processing systems, 12, 1999.
+Qichao Shentu, Beibu Li, Kai Zhao, Yang Shu, Zhongwen Rao, Lujia Pan, Bin Yang, and Chenjuan Guo. Towards a general time series anomaly detector with adaptive bottlenecks and dual adversarial decoders. arXiv preprint arXiv:2405.15273, 2024.
+Mei-Ling Shyu, Shu-Ching Chen, Kanoksri Sarinnapakorn, and LiWu Chang. A novel anomaly detection scheme based on principal component classifier. In Proceedings of the IEEE foundations and new directions of data mining workshop, pp. 172-179, 2003.
+Dongjin Song, Ning Xia, Wei Cheng, Haifeng Chen, and Dacheng Tao. Deep r-th root of rank supervised joint binary embedding for multivariate time series retrieval. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2229-2238, 2018.
+Yanru Sun, Zongxia Xie, Dongyue Chen, Emadeldeen Eldele, and Qinghua Hu. Hierarchical classification auxiliary network for time series forecasting. In AAAI, 2025.
+Nesime Tatbul, Tae Jun Lee, Stan Zdonik, Mejbah Alam, and Justin Gottschlich. Precision and recall for time series. Advances in neural information processing systems, 31, 2018.
+Jindong Tian, Yuxuan Liang, Ronghui Xu, Peng Chen, Chenjuan Guo, Aoying Zhou, Lujia Pan, Zhongwen Rao, and Bin Yang. Air quality prediction with physics-guided dual neural odes in open systems. ICLR, 2025.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, pp. 5998-6008, 2017.
+Chengsen Wang, Zirui Zhuang, Qi Qi, Jingyu Wang, Xingyu Wang, Haifeng Sun, and Jianxin Liao. Drift doesn't matter: Dynamic decomposition with diffusion reconstruction for unstable multivariate time series anomaly detection. In Thirty-seventh Conference on Neural Information Processing Systems, 2023.
+
+Chengsen Wang, Qi Qi, Jingyu Wang, Haifeng Sun, Zirui Zhuang, Jinming Wu, and Jianxin Liao. Rethinking the power of timestamps for robust time series forecasting: A global-local fusion perspective. In NeurIPS, 2024a.
+Hao Wang, Zhichao Chen, Zhaoran Liu, Haozhe Li, Degui Yang, Xinggao Liu, and Haoxuan Li. Entire space counterfactual learning for reliable content recommendations. IEEE Trans. Autom. Sci. Eng., pp. 1-12, 2024b.
+Hao Wang, Zhichao Chen, Zhaoran Liu, Licheng Pan, Hu Xu, Yilin Liao, Haozhe Li, and Xinggao Liu. Spot-i: Similarity preserved optimal transport for industrial IoT data imputation. IEEE Transactions on Industrial Informatics, 2024c.
+Hao Wang, Licheng Pan, Zhichao Chen, Degui Yang, Sen Zhang, Yifei Yang, Xinggao Liu, Haoxuan Li, and Dacheng Tao. Fredf: Learning to forecast in frequency domain. arXiv preprint arXiv:2402.02399, 2024d.
+Junqiao Wang, Zeng Zhang, Yangfan He, Yuyang Song, Tianyu Shi, Yuchen Li, Hengyuan Xu, Kunyu Wu, Guangwu Qian, Qiuwu Chen, et al. Enhancing code llms with reinforcement learning in code generation. arXiv preprint arXiv:2412.20367, 2024e.
+Peihao Wang, Wenqing Zheng, Tianlong Chen, and Zhangyang Wang. Anti-oversmoothing in deep vision transformers via the fourier domain analysis: From theory to practice. In International Conference on Learning Representations, 2022.
+Yihang Wang, Yuying Qiu, Peng Chen, Kai Zhao, Yang Shu, Zhongwen Rao, Lujia Pan, Bin Yang, and Chenjuan Guo. ROSE: Register assisted general time series forecasting with decomposed frequency learning. arXiv preprint arXiv:2405.17478, 2024f.
+Yuanyi Wang, Haifeng Sun, Chengsen Wang, Mengde Zhu, Jingyu Wang, Wei Tang, Qi Qi, Zirui Zhuang, and Jianxin Liao. Interdependency matters: Graph alignment for multivariate time series anomaly detection. arXiv preprint arXiv:2410.08877, 2024g.
+Qingsong Wen, Linxiao Yang, Tian Zhou, and Liang Sun. Robust time series analysis and applications: An industrial perspective. In Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 4836-4837, 2022.
+Haixu Wu, Tengge Hu, Yong Liu, Hang Zhou, Jianmin Wang, and Mingsheng Long. Timesnet: Temporal 2d-variation modeling for general time series analysis. In ICLR, 2023.
+Wangyu Wu, Xianglin Qiu, Siqi Song, Xiaowei Huang, Fei Ma, and Jimin Xiao. Prompt categories cluster for weakly supervised semantic segmentation. arXiv preprint arXiv:2412.13823, 2024a.
+Wangyu Wu, Tianhong Dai, Zhenhong Chen, Xiaowei Huang, Fei Ma, and Jimin Xiao. Generative prompt controlled diffusion for weakly supervised semantic segmentation. Neurocomputing, pp. 130103, 2025a.
+Wangyu Wu, Siqi Song, Xianglin Qiu, Xiaowei Huang, Fei Ma, and Jimin Xiao. Image fusion for cross-domain sequential recommendation. In Companion Proceedings of the ACM Web Conference 2025, 2025b.
+Xinle Wu, Xingjian Wu, Bin Yang, Lekui Zhou, Chenjuan Guo, Xiangfei Qiu, Jilin Hu, Zhenli Sheng, and Christian S. Jensen. AutoCTS++: zero-shot joint neural architecture and hyperparameter search for correlated time series forecasting. VLDB J., 33(5):1743-1770, 2024b.
+Xinle Wu, Xingjian Wu, Dalin Zhang, Miao Zhang, Chenjuan Guo, Bin Yang, and Christian S Jensen. Fully automated correlated time series forecasting in minutes. arXiv preprint arXiv:2411.05833, 2024c.
+Jiehui Xu, Haixu Wu, Jianmin Wang, and Mingsheng Long. Anomaly Transformer: Time series anomaly detection with association discrepancy. In International Conference on Learning Representations, 2021.
+Sean Bin Yang, Chenjuan Guo, Jilin Hu, Jian Tang, and Bin Yang. Unsupervised path representation learning with curriculum negative sampling. In *IJCAI*, pp. 3286-3292, 2021.
+
+Yiyuan Yang, Rongshang Li, Qiquan Shi, Xijun Li, Gang Hu, Xing Li, and Mingxuan Yuan. Sgdp: A stream-graph neural network based data prefetcher. In 2023 International Joint Conference on Neural Networks (IJCNN), pp. 1-8, 2023a.
+Yiyuan Yang, Chaoli Zhang, Tian Zhou, Qingsong Wen, and Liang Sun. Dcdetector: Dual attention contrastive representation learning for time series anomaly detection. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 3033-3045, 2023b.
+Yuanyuan Yao, Shenjia Dai, Yilin Li, Lu Chen, Dimeng Li, Yunjun Gao, and Tianyi Li. A demonstration of TENDS: time series management system based on model selection. Proc. VLDB Endow., 17(12):4357-4360, 2024a.
+Yuanyuan Yao, Hailiang Jie, Lu Chen, Tianyi Li, Yunjun Gao, and Shiting Wen. Tsec: An efficient and effective framework for time series classification. In ICDE, pp. 1394-1406, 2024b.
+Chin-Chia Michael Yeh, Yan Zhu, Liudmila Ulanova, Nurjahan Begum, Yifei Ding, Hoang Anh Dau, Diego Furtado Silva, Abdullah Mueen, and Eamonn Keogh. Matrix profile i: all pairs similarity joins for time series: a unifying view that includes motifs, discords and shapelets. In Proceedings of the 2016 IEEE international conference on data mining, pp. 1317-1322, 2016.
+Qiang Yi, Yangfan He, Jianhui Wang, Xinyuan Song, Shiyao Qian, Miao Zhang, Li Sun, and Tianyu Shi. Score: Story coherence and retrieval enhancement for ai narratives. arXiv preprint arXiv:2503.23512, 2025.
+Chengqing Yu, Fei Wang, Zezhi Shao, Tao Sun, Lin Wu, and Yongjun Xu. DSformer: A double sampling transformer for multivariate time series long-term prediction. In CIKM, pp. 3062-3072, 2023.
+Xinlei Yu, Ahmed Elazab, Ruiquan Ge, Hui Jin, Xinchen Jiang, Gangyong Jia, Qing Wu, Qinglei Shi, and Changmiao Wang. Ich-scnet: Intracerebral hemorrhage segmentation and prognosis classification network using clip-guided sam mechanism. In 2024 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 2795-2800, 2024a.
+Xinlei Yu, Xinyang Li, Ruiquan Ge, Shibin Wu, Ahmed Elazab, Jichao Zhu, Lingyan Zhang, Gangyong Jia, Taosheng Xu, Xiang Wan, et al. Ichpro: Intracerebral hemorrhage prognosis classification via joint-attention fusion-based 3d cross-modal network. In 2024 IEEE International Symposium on Biomedical Imaging (ISBI), pp. 1-5, 2024b.
+Xinlei Yu, Ahmed Elazab, Ruiquan Ge, Jichao Zhu, Lingyan Zhang, Gangyong Jia, Qing Wu, Xi-ang Wan, Lihua Li, and Changmiao Wang. Ich-prnet: a cross-modal intracerebral haemorrhage prognostic prediction method using joint-attention interaction mechanism. Neural Networks, 184: 107096, 2025.
+Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. Are transformers effective for time series forecasting? In Proceedings of the AAAI conference on artificial intelligence, volume 37, pp. 11121-11128, 2023.
+Chaoli Zhang, Tian Zhou, Qingsong Wen, and Liang Sun. Tfad: A decomposition time series anomaly detection architecture with time-frequency analysis. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, pp. 2497-2507, 2022.
+Chuxu Zhang, Dongjin Song, Yuncong Chen, Xinyang Feng, Cristian Lumezanu, Wei Cheng, Jingchao Ni, Bo Zong, Haifeng Chen, and Nitesh V Chawla. A deep neural network for unsupervised anomaly detection and diagnosis in multivariate time series data. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 1409-1416, 2019.
+Hang Zhao, Yujing Wang, Juanyong Duan, Congrui Huang, Defu Cao, Yunhai Tong, Bixiong Xu, Jing Bai, Jie Tong, and Qi Zhang. Multivariate time-series anomaly detection via graph attention network. In 2020 IEEE international conference on data mining (ICDM), pp. 841-850, 2020.
+
+# A EXPERIMENTAL DETAILS
+
+# A.1 DATASETS
+
+Table 4: Statistics of multivariate datasets (AR: anomaly ratio).
+
+
Dataset
Domain
Dim
AR (%)
Avg Total Length
Avg Test Length
Description
MSL
Spacecraft
55
5.88
132,046
73,729
Spacecraft incident and anomaly data from the MSL Curiosity rover
SMAP
Spacecraft
25
9.72
562,800
427,617
Presents the soil samples and telemetry information used by the Mars rover
PSM
Server Machine
25
11.07
220,322
87,841
A dataset collected from multiple application server nodes at eBay
SMD
Server Machine
38
2.08
1,416,825
708,420
Telemetry dataset collected from 28 different server machines at a large Internet company
Creditcard
Finance
29
0.17
284,807
142,404
Credit card dataset includes a subset of online transactions that occurred over two days
GECCO
Water treatment
9
1.25
138,521
69,261
Water quality dataset published in the GECCO Industrial Challenge
SWAT
Water treatment
51
5.78
944,919
449,919
Obtained from 51 sensors of the critical infrastructure system under continuous operations
CICIDS
Web
72
1.28
170,231
85,116
Network traffic data from CICFlowMeter with 80+ features and attack labels
CallIt2
Visitors flowrate
2
4.09
5,040
2,520
Person flow dataset records the movement of people in and out of a building over 15 days
Genesis
Machinery
18
0.31
16,220
12,616
A sensor and control signals dataset collected from cyber-physical production systems
NYC
Transport
3
0.57
17,520
4,416
Transportation dataset provides information on taxi and ride-hailing trips in New York
ASD
Application Server
19
1.55
12,848
4,320
Application Server Dataset collected from a large Internet company
TODS
Synthetic
5
6.35
20,000
5,000
Including 6 anomaly types: global, contextual, shapelet, seasonal, trend, and mix anomalies
+
+In order to comprehensively evaluate the performance of CATCH, we evaluate 12 real-world datasets and 12 synthetic datasets which cover 9 domains. The anomaly ratio varies from $0.17\%$ to $11.07\%$ , the range of feature dimensions varies from 3 to 72, and the sequence length varies from 5,040 to 1,416,825. This substantial diversity of the datasets enables comprehensive studies of MTSAD methods. Table 4 lists statistics of the 24 multivariate time series.
+
+# A.2 METRICS
+
+The metrics we support can be divided into two categories: Score-based and Label-based. Label-based metrics include Accuracy $(Acc)$ , Precision $(P)$ , Recall $(R)$ , F1-score $(F1)$ , Range-Precision $(R - P)$ , Range-Recall $(R - R)$ , Range-F1-score $(R - F)$ (Tatbul et al., 2018), Precision@k, Affiliated-Precision $(Aff - P)$ , Affiliated-Recall $(Aff - R)$ , and Affiliated-F1-score $(Aff - F)$ (Huet et al., 2022). Score-based metrics include the Area Under the Precision-Recall Curve $(A - P)$ (Davis & Goadrich, 2006), the Area under the Receiver Operating Characteristics Curve $(A - R)$ (Fawcett, 2006), the Range Area Under the Precision-Recall Curve $(R - A - P)$ , the Range Area under the Receiver Operating Characteristics Curve $(R - A - R)$ (Paparrizos et al., 2022a), the Volume Under the Surface of Precision-Recall $(V - PR)$ , and the Volume Under the Surface of Receiver Operating Characteristic $(V - ROC)$ (Paparrizos et al., 2022a). As noted earlier, CATCH computes all metrics to provide a complete picture of each method. More implementation details are presented in the Appendix A.3.
+
+# A.3 IMPLEMENTATION DETAILS
+
+The "Drop Last" issue is reported by several researchers (Qiu et al., 2024; Li et al., 2024b; Qiu et al., 2025b). That is, in some previous works evaluating the model on test set with drop-last=True setting may cause additional errors related to test batch size. In our experiment, to ensure fair comparison in the future, we set the drop last to False for all baselines to avoid this issue.
+
+All experiments are conducted using PyTorch (Paszke et al., 2019) in Python 3.8 and execute on an NVIDIA Tesla-A800 GPU. We employ the ADAM optimizer during training. Initially, the batch size is set to 32, with the option to reduce it by half (to a minimum of 8) in case of an Out-Of-Memory (OOM) situation. We do not use the "Drop Last" operation during testing. To ensure reproducibility and facilitate experimentation, datasets and code are available at: https://github.com/decisionintelligence/CATCH.
+
+# A.4 MODEL HYPERPARAMETER SETTINGS
+
+For each baseline method, we strictly follow the hyperparameter configurations recommended in their original papers. Additionally, we conduct hyperparameter searches on multiple sets and select the optimal configurations based on these evaluations to ensure a comprehensive and fair assessment of each method's performance.
+
+The hyperparameters for the baseline methods are set as follows:
+
+- AutoEncoder: The architecture of Autoencoder is selected from (10, 3), (25, 10, 5), (50, 20, 10).
+- One-Class SVM: The RBF kernel is used. The upper bound on the fraction of training errors is set to be 0.5.
+- Isolaion Forest: The number of estimators is selected from 3, 5, 25, 50, 60, 70, 80, 90, 100, 110.
+- Principal Component Analysis: The number of principal components is the smaller of the number of samples and the number of features.
+- HBOS: The number of bins is selected from 3, 5, 10, 20, 30, 40, 50
+- ModernTCN: The dimension of hidden states is 256. The FFN ratio is 2. Patch size is set as 16 and patch stride is set as 8.
+- Anomaly Transformer, DualTF: The number of layers is selected from 1, 2, 3, the channel number of hidden states dmodel is 512, and the number of heads is 8. The loss function hyperparameter lambda for balancing two parts is set as 3.
+- iTransformer, TimesNet, DCdetector, PatchTST: The number of blocks is selected from 1, 2, 3. The dmodel is selected from 8, 64, 128, 256, 512 and the number of heads is 8.
+- DLinear, NLinear: The length of the reconstructed sequence is set to 100.
+- TFAD: The number of layers in the TCN is selected from 5, 6, 7, 8, and the number of kernels is selected from 5, 7.
+
+# A.5 BI-LEVEL GRADIENT DESCENT OPTIMIZATION
+
+Algorithm 1 Bi-level Gradient Descent Optimization
+1: Input: Model parameters $\theta_{\mathrm{model}}$ $\theta_{\mathrm{mask}}$ , learning rate $\eta_{\mathrm{model}}$ $\eta_{\mathrm{mask}}$ , number of iterations $\mathcal{N}_0$ $\mathcal{N}_I$ , loss function $\mathcal{L} = \mathrm{RecLoss}^{time}+$ $\lambda_1\cdot \mathrm{RecLoss}^{Treq} + \lambda_2\cdot \mathrm{ClusteringLoss} + \lambda_3\cdot \mathrm{RegularLoss}$
+2: Initialize: $\theta_{\mathrm{model}}\gets$ initial value, $\theta_{\mathrm{mask}}\gets$ initial value
+3: For $i = 1$ to $\mathcal{N}_0$
+4: Outer Loop: Update the mask generator parameters
+5: $\theta_{\mathrm{mask}}\gets \theta_{\mathrm{mask}} - \eta_{\mathrm{mask}}\cdot \nabla \theta_{\mathrm{mask}}\mathcal{L}(\theta_{\mathrm{model}},\theta_{\mathrm{mask}})$ ▷ Update the Mask Generator
+6: For $j = 1$ to $\mathcal{N}_I$
+7: Inner Loop: Update the model parameters
+8: $\theta_{\mathrm{model}}\gets \theta_{\mathrm{model}} - \eta_{\mathrm{model}}\cdot \nabla \theta_{\mathrm{model}}\mathcal{L}(\theta_{\mathrm{model}},\theta_{\mathrm{mask}})$ ▷ Update the model
+9: EndFor
+10: EndFor
+11: Output: Optimized parameters $\theta_{\mathrm{model}}$ $\theta_{\mathrm{mask}}$
+
+# A.6 IMPLEMENTATION DETAILS OF SCORING
+
+We provide an efficient implementation of Frequency-Enhanced Point-Granularity Scoring in Section 3.5. We present the pseudo-code in Algorithm 2. Specifically, we adopt the scatter operation in Pytorch to efficiently parallel the collection of patches to which each point belongs.
+
+Algorithm 2 Calculation of freq-score
+```python
+from einops import rearrange
+import torch
+class frequency Criterion(torch(nnModule): def__init__(self, configs): super(frequencyCriterion,self).__init_() #Define the frequency metric self(metric $=$ frequency_loss(configs,dim $\coloneqq$ 1,keep_dim $\equiv$ True) self.batch_size $=$ config.inference_batch_size self.batch_stride $=$ config.inference_batch_stride self.win_size $=$ config.seq_len self.batch_num $=$ int((self.win_size - self.batch_size) / self.batch_stride +1) self(padding_length $=$ self.win_size-(self.batch_size + (self.batch_num-1)\*self.batch_stride) def forward(self, outputs, batch_y): output_batch $=$ outputsunfold(dimension $\coloneqq$ 1, size $\coloneqq$ self.batch_size,step $\coloneqq$ self.batch_stride) b,n,c,p $=$ output_batch_shape output_batch $=$ rearrange(output_batch,'b_n_c_p->>(b_n)_p_c') y_batch $=$ batch_y.unfold(dimension $\coloneqq$ 1, size $\coloneqq$ self.batch_size,step $\coloneqq$ self.batch_stride) y_batch $=$ rearrange(y_batch,'b_n_c_p->>(b_n)_p_c') main_part_loss $=$ self(metric(output_batch,y_batch) #Create the patches main_part_loss $=$ main_part_lossrepeat(1,self.batch_size,1) main_part_loss $=$ rearrange(main_part_loss, 'b_n_p_c->b_n_p_c',b=b) #Calculate the overlapped indices end_point $=$ self.batch_size $+$ (self.batch_num-1) \*self.batch_stride-1 startIndices $=$ np.array(range(0,end_point,self.batch_stride)) endIndices $=$ startIndices $+$ self.batch_size indices $=$ torch.tensor([range(startIndices[i],endIndices[i]) for i in range(n)).unsqueeze(0).unsqueeze(-1) indices $=$ indicesrepeat(b,1,1,c).to(main_part_lossdevice) #Point-Granularity Alignment main_loss $=$ torch.zeros((b,n,self.win_size - self(padding_length,c)).to(main_part_loss_device) main_lossscatter_(dim=2,index=indices,src $\equiv$ main_part_loss) non_zero_cnt $=$ torch.count_nonzero(main_loss,dim $\coloneqq$ 1) main_loss $=$ main_loss.sum(1)/non_zero_cnt # Calculate the metric of the remained part if self(padding_length>0: padding_loss $=$ self(metric(outputs[(:, -self(padding_length:, :, batch_y[(:, -self(padding_length:, :]) padding_loss $=$ padding_lossrepeat(1,self(padding_length,1) total_loss $=$ torch.cat([main_loss,padding_loss],dim $\coloneqq$ 1) else: total_loss $=$ main_loss return total_loss
+```
+
+# A.7 COMMAND USED FOR GENERATING THE SYNTHETIC DATASETS
+
+We use the provided source code (Lai et al., 2021) without alterations as demonstrated below, except for adjusting the length parameter to generate a longer time series, to ensure a fair comparison.
+
+Algorithm 3 TODS Synthesis
+```python
+This code is based on the original implementation from the TODS project. Original author: DATA Lab @ Rice University
+Source URL: https://github.com/datamllab/tods
+Set base values and behavior types
+DIM_NUM = 5
+BEHAVIOR = [sine, cosine, sine, cosine, sine]
+CONFIG = {"freq": 0.04, "coef": 1.5, "offset": 0.0, "noise_amp": 0.05}
+VALUES = [0.145, 0.128, 0.094, 0.077, 0.111, 0.145, 0.179, 0.214, 0.214}
+Generate training data
+train_data = MultivariateDataGenerator(dim=DIM_NUM, stream_length=20000, behavior=BEHAVIOR, behavior_config=CONFIG)
+Generate test data
+test_data = MultivariateDataGenerator(dim=DIM_NUM, stream_length=5000, behavior=BEHAVIOR, behavior_config=CONFIG)
+Add anomalies based on the specified anomaly type
+for i in range(DIM_NUM):
+ if anomaly_type == "global_anomaly":
+ test_data_point_global_outliers(dim_no=i, ratio=0.01, factor=3.5, radius=5)
+ elif anomaly_type == "contextual_anomaly":
+ test_data_point_contextual_outliers(dim_no=i, ratio=0.01, factor=2.5, radius=5)
+ elif anomaly_type == "shapelet_anomaly":
+ test_data-collective_global_outliers(dim_no=i, ratio=0.01, radius=5, option='square', coef=1.5, noise_amp=0.03, level=20, freq=0.04, base=VALUES, offset=0.0)
+ elif anomaly_type == "seasonal_anomaly":
+ test_data-collective_seasonal_outliers(dim_no=i, ratio=0.01, factor=3, radius=5)
+ elif anomaly_type == "trend_anomaly":
+ test_data-collective_trend_outliers(dim_no=i, ratio=0.01, factor=0.5, radius=5)
+ elif anomaly_type == "mixed_subsequence_anomaly":
+ test_data-collective_global_outliers(dim_no=i, ratio=0.006, radius=5, option="square", coef=1.5, noise_amp=0.03, level=20, freq=0.04, base=VALUES, offset=0.0)
+ test_data-collective_seasonal_outliers(dim_no=i, ratio=0.006, factor=3, radius=5)
+ test_data-collective_trend_outliers(dim_no=i, ratio=0.006, factor=0.5, radius=5)
+```
+
+# B ADDITIONAL CASE STUDIES
+
+As shown in Figure 6, we visualize the anomaly scores of various recent SOTAs to obtain an intuitive comparison of detecting accuracy. Our proposed CATCH shows most distinguishable anomaly scores in detecting both point and subsequence anomalies.
+
+
+Figure 6: Visualization of anomaly scores from recent SOTAs for the TODS datasets.
+
+# C FULL EXPERIMENTAL RESULTS
+
+The full MTSAD results are provided in the following section due to the space limitation of the main text. Tables 5, 6, 7, 8, 9, and 10, show the (Accuracy), (AUC-ROC, R-AUC-ROC, VUS-ROC), (AUC-PR, R-AUC-PR, VUS-PR), (Precision, Recall, F1-score), (Range-Recall, Range-Precision, Range-F1-score), (Affiliated-Precision, Affiliated-Recall, Affiliated-F1-score) results, respectively.
+
+Table 5: Average Acc (Accuracy) measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
Acc
0.758
0.750
0.762
0.565
0.745
0.750
0.750
0.751
0.757
0.754
0.994
0.952
0.082
0.852
0.656
0.913
Callt2
Acc
0.946
0.889
0.930
0.910
0.944
0.841
0.946
0.889
0.887
0.844
0.960
0.942
0.867
0.968
0.884
0.886
Credit
Acc
0.981
0.981
0.951
0.688
0.847
0.716
0.981
0.980
0.981
0.980
0.994
0.992
0.893
0.996
0.868
0.847
GECCO
Acc
0.984
0.984
0.981
0.612
0.983
0.979
0.984
0.989
0.981
0.987
0.888
0.985
0.055
0.989
0.240
0.590
Genesis
Acc
0.992
0.965
0.986
0.970
0.931
0.991
0.991
0.987
0.987
0.972
0.987
0.991
0.424
0.983
0.888
0.771
MSL
Acc
0.853
0.857
0.854
0.891
0.891
0.892
0.855
0.873
0.858
0.872
0.891
0.891
0.818
0.890
0.812
0.816
NYC
Acc
0.978
0.972
0.797
0.976
0.977
0.977
0.977
0.976
0.976
0.977
0.974
0.977
0.029
0.974
0.904
0.895
PSM
Acc
0.730
0.729
0.728
0.697
0.719
0.615
0.726
0.729
0.726
0.728
0.715
0.720
0.737
0.723
0.682
0.736
SMD
Acc
0.918
0.931
0.914
0.863
0.952
0.774
0.931
0.934
0.943
0.943
0.959
0.954
0.865
0.958
0.860
0.841
SWAT
Acc
0.857
0.836
0.794
0.635
0.867
0.865
0.873
0.837
0.822
0.794
0.709
0.878
0.196
0.877
0.375
0.748
SMAP
Acc
0.862
0.689
0.685
0.663
0.845
0.868
0.689
0.685
0.685
0.685
0.871
0.868
0.813
0.870
0.815
0.821
ASD
Acc
0.933
0.913
0.898
0.851
0.942
0.930
0.928
0.942
0.947
0.912
0.946
0.950
0.871
0.953
0.863
0.870
Contextual4.9
Acc
0.961
0.734
0.957
0.713
0.641
0.618
0.734
0.888
0.943
0.742
0.965
0.874
0.888
0.956
0.848
0.865
Contextual7.2
Acc
0.960
0.721
0.937
0.603
0.702
0.611
0.739
0.886
0.893
0.729
0.956
0.859
0.877
0.939
0.818
0.850
Global4.8
Acc
0.993
0.896
0.994
0.833
0.174
0.639
0.989
0.995
0.993
0.895
0.980
0.876
0.903
0.977
0.698
0.872
Global7.2
Acc
0.978
0.849
0.972
0.326
0.232
0.665
0.987
0.984
0.985
0.900
0.978
0.855
0.915
0.970
0.644
0.843
Seasonal4.8
Acc
0.988
0.861
0.973
0.956
0.956
0.952
0.974
0.974
0.974
0.964
0.959
0.947
0.890
0.957
0.855
0.863
Seasonal7.7
Acc
0.979
0.792
0.964
0.894
0.928
0.925
0.963
0.960
0.965
0.943
0.938
0.916
0.887
0.939
0.839
0.849
Shapelet4.9
Acc
0.969
0.820
0.966
0.942
0.950
0.946
0.967
0.953
0.968
0.947
0.950
0.947
0.879
0.952
0.851
0.855
Shapelet7.4
Acc
0.957
0.715
0.949
0.871
0.921
0.823
0.951
0.943
0.947
0.891
0.932
0.913
0.872
0.925
0.838
0.839
Mixture5.7
Acc
0.903
0.893
0.885
0.658
0.928
0.940
0.896
0.889
0.400
0.882
0.692
0.921
0.183
0.948
0.183
0.190
Mixture8.9
Acc
0.808
0.849
0.822
0.638
0.882
0.910
0.822
0.814
0.587
0.804
0.650
0.859
0.123
0.923
0.124
0.215
Trend4.8
Acc
0.838
0.873
0.891
0.811
0.941
0.946
0.913
0.891
0.590
0.812
0.655
0.947
0.064
0.955
0.065
0.222
Trend7.8
Acc
0.911
0.813
0.790
0.785
0.903
0.911
0.801
0.878
0.603
0.864
0.640
0.893
0.079
0.927
0.080
0.319
\( 1^{st} \) Count
7
0
0
0
0
1
1
2
0
0
4
1
1
7
0
0
+
+Table 6: Average A-R (AUC-ROC), R-A-R (R-AUC-ROC) and V-ROC (VUS-ROC) accuracy measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
A-R
0.795
0.697
0.692
0.603
0.528
0.638
0.732
0.716
0.751
0.691
0.629
0.504
0.537
0.787
0.601
0.760
R-A-R
0.737
0.637
0.584
0.434
0.392
0.492
0.684
0.650
0.692
0.609
0.574
0.498
0.481
0.739
0.478
0.720
V-ROC
0.743
0.649
0.626
0.485
0.408
0.528
0.693
0.662
0.703
0.631
0.586
0.498
0.505
0.750
0.496
0.735
Callt2
A-R
0.838
0.676
0.791
0.574
0.533
0.527
0.771
0.808
0.752
0.695
0.767
0.504
0.804
0.775
0.790
0.798
R-A-R
0.854
0.726
0.817
0.666
0.523
0.505
0.807
0.830
0.794
0.743
0.798
0.502
0.840
0.818
0.796
0.847
V-ROC
0.848
0.716
0.809
0.630
0.517
0.503
0.796
0.824
0.781
0.728
0.789
0.501
0.828
0.802
0.786
0.831
Credit
A-R
0.958
0.957
0.934
0.703
0.552
0.504
0.957
0.957
0.954
0.948
0.909
0.500
0.953
0.860
0.871
0.951
R-A-R
0.921
0.919
0.882
0.535
0.379
0.483
0.919
0.918
0.914
0.902
0.843
0.498
0.914
0.809
0.784
0.904
V-ROC
0.917
0.908
0.881
0.575
0.398
0.483
0.914
0.911
0.908
0.897
0.840
0.498
0.905
0.818
0.805
0.896
GECCO
A-R
0.970
0.952
0.795
0.714
0.516
0.555
0.954
0.949
0.947
0.936
0.769
0.499
0.804
0.619
0.711
0.557
R-A-R
0.990
0.978
0.884
0.725
0.501
0.609
0.977
0.984
0.987
0.977
0.634
0.501
0.757
0.680
0.598
0.510
V-ROC
0.987
0.975
0.871
0.717
0.503
0.593
0.974
0.979
0.982
0.971
0.637
0.500
0.756
0.677
0.595
0.503
Genesis
A-R
0.974
0.676
0.690
0.937
0.947
0.659
0.913
0.685
0.696
0.755
0.931
0.497
0.733
0.549
0.815
0.897
R-A-R
0.981
0.727
0.797
0.975
0.976
0.744
0.919
0.737
0.741
0.791
0.917
0.499
0.734
0.693
0.822
0.819
V-ROC
0.978
0.729
0.773
0.971
0.970
0.730
0.913
0.728
0.735
0.787
0.916
0.499
0.733
0.660
0.816
0.827
MSL
A-R
0.664
0.633
0.611
0.576
0.508
0.507
0.613
0.637
0.624
0.592
0.562
0.500
0.524
0.524
0.552
0.574
R-A-R
0.747
0.708
0.686
0.662
0.529
0.596
0.701
0.720
0.703
0.681
0.635
0.515
0.594
0.575
0.631
0.643
V-ROC
0.735
0.701
0.678
0.652
0.527
0.587
0.692
0.712
0.695
0.672
0.628
0.514
0.590
0.571
0.622
0.635
NYC
A-R
0.816
0.466
0.640
0.633
0.671
0.549
0.791
0.709
0.768
0.671
0.504
0.502
0.456
0.475
0.666
0.446
R-A-R
0.836
0.598
0.697
0.754
0.753
0.524
0.765
0.722
0.762
0.706
0.636
0.509
0.612
0.632
0.744
0.545
V-ROC
0.827
0.579
0.689
0.737
0.722
0.530
0.771
0.719
0.760
0.701
0.619
0.509
0.589
0.610
0.730
0.536
PSM
A-R
0.652
0.593
0.592
0.600
0.514
0.501
0.592
0.586
0.580
0.585
0.650
0.500
0.619
0.542
0.648
0.620
R-A-R
0.640
0.588
0.589
0.507
0.453
0.489
0.593
0.586
0.579
0.585
0.587
0.499
0.530
0.543
0.584
0.572
V-ROC
0.639
0.589
0.588
0.507
0.451
0.479
0.593
0.585
0.579
0.585
0.589
0.499
0.532
0.542
0.585
0.575
SMD
A-R
0.811
0.722
0.745
0.631
0.508
0.502
0.727
0.736
0.728
0.738
0.774
0.500
0.602
0.664
0.679
0.626
R-A-R
0.800
0.743
0.762
0.594
0.500
0.505
0.747
0.760
0.754
0.762
0.783
0.500
0.579
0.679
0.656
0.597
V-ROC
0.797
0.742
0.761
0.592
0.499
0.505
0.746
0.758
0.751
0.760
0.782
0.500
0.578
0.678
0.655
0.597
SWAT
A-R
0.345
0.244
0.242
0.567
0.405
0.501
0.288
0.242
0.521
0.231
0.817
0.500
0.657
0.346
0.819
0.831
R-A-R
0.473
0.357
0.353
0.611
0.437
0.511
0.402
0.354
0.588
0.338
0.645
0.509
0.628
0.431
0.717
0.815
V-ROC
0.462
0.348
0.344
0.608
0.434
0.511
0.392
0.345
0.581
0.330
0.628
0.508
0.618
0.424
0.687
0.784
SMAP
A-R
0.504
0.455
0.409
0.478
0.511
0.522
0.453
0.448
0.397
0.434
0.522
0.500
0.393
0.487
0.396
0.585
R-A-R
0.546
0.491
0.441
0.516
0.520
0.552
0.490
0.483
0.435
0.466
0.545
0.504
0.430
0.499
0.420
0.565
V-ROC
0.543
0.489
0.439
0.515
0.520
0.552
0.489
0.482
0.435
0.465
0.544
0.504
0.428
0.499
0.419
0.566
ASD
A-R
0.824
0.692
0.759
0.579
0.506
0.520
0.805
0.760
0.739
0.690
0.704
0.502
0.588
0.618
0.656
0.603
R-A-R
0.861
0.746
0.812
0.624
0.508
0.515
0.835
0.813
0.793
0.741
0.753
0.506
0.612
0.694
0.682
0.624
V-ROC
0.853
0.739
0.804
0.611
0.507
0.516
0.831
0.806
0.784
0.735
0.745
0.506
0.608
0.685
0.674
0.619
Contextual4.9
A-R
0.921
0.566
0.916
0.660
0.554
0.535
0.919
0.862
0.709
0.545
0.914
0.497
0.706
0.840
0.538
0.470
R-A-R
0.859
0.386
0.851
0.504
0.396
0.405
0.856
0.761
0.543
0.391
0.848
0.498
0.517
0.736
0.364
0.310
V-ROC
0.854
0.443
0.845
0.548
0.431
0.422
0.850
0.768
0.586
0.437
0.842
0.501
0.563
0.743
0.405
0.362
Contextual7.2
A-R
0.899
0.558
0.893
0.536
0.539
0.514
0.897
0.845
0.691
0.515
0.879
0.510
0.716
0.802
0.538
0.458
R-A-R
0.818
0.388
0.812
0.361
0.374
0.436
0.816
0.730
0.522
0.360
0.789
0.466
0.530
0.674
0.362
0.297
V-ROC
0.822
0.442
0.814
0.424
0.406
0.443
0.819
0.746
0.567
0.409
0.797
0.472
0.585
0.693
0.401
0.351
Global4.8
A-R
0.998
0.885
0.981
0.631
0.560
0.515
0.991
0.993
0.981
0.685
0.996
0.501
0.998
0.947
0.770
0.609
R-A-R
0.995
0.804
0.963
0.464
0.388
0.383
0.982
0.986
0.962
0.554
0.991
0.463
0.995
0.916
0.654
0.454
V-ROC
0.979
0.806
0.952
0.533
0.430
0.402
0.967
0.967
0.942
0.579
0.972
0.468
0.973
0.903
0.687
0.489
Global7.2
A-R
0.997
0.861
0.971
0.559
0.568
0.513
0.988
0.992
0.978
0.665
0.996
0.499
0.995
0.928
0.745
0.608
R-A-R
0.993
0.772
0.948
0.395
0.403
0.383
0.977
0.984
0.957
0.534
0.992
0.498
0.989
0.886
0.618
0.478
V-ROC
0.987
0.772
0.937
0.442
0.439
0.397
0.962
0.966
0.939
0.560
0.972
0.502
0.972
0.771
0.653
0.512
Seasonal4.8
A-R
0.999
0.511
0.945
0.865
0.590
0.661
0.958
0.922
0.819
0.613
0.943
0.498
0.840
0.921
0.447
0.522
R-A-R
1.000
0.613
0.929
0.972
0.560
0.642
0.933
0.932
0.847
0.676
0.895
0.528
0.849
0.898
0.573
0.629
V-ROC
0.999
0.596
0.929
0.950
0.567
0.634
0.932
0.929
0.839
0.668
0.896
0.522
0.845
0.897
0.544
0.609
Seasonal7.7
A-R
0.997
0.513
0.946
0.537
0.579
0.628
0.959
0.921
0.827
0.634
0.954
0.506
0.817
0.915
0.426
0.509
R-A-R
0.997
0.640
0.946
0.638
0.558
0.623
0.943
0.931
0.860
0.691
0.907
0.532
0.844
0.818
0.463
0.615
V-ROC
0.994
0.615
0.945
0.616
0.559
0.611
0.946
0.929
0.851
0.710
0.490
0.516
0.842
0.817
0.446
0.612
Shapelet4.9
A-R
0.982
0.527
0.856
0.623
0.532
0.627
0.871
0.812
0.670
0.552
0.857
0.502
0.651
0.767
0.490
0.342
R-A-R
0.996
0.608
0.883
0.742
0.608
0.602
0.880
0.851
0.714
0.642
0.854
0.531
0.716
0.800
0.624
0.510
V-ROC
0.992
0.599
0.874
0.723
0.594
0.596
0.875
0.844
0.712
0.627
0.851
0.525
0.711
0.794
0.601
0.485
Shapelet7.4
A-R
0.957
0.518
0.872
0.523
0.506
0.567
0.882
0.824
0.697
0.573
0.874
0.503
0.660
0.728
0.545
0.332
R-A-R
0.991
0.618
0.877
0.624
0.527
0.546
0.885
0.860
0.748
0.640
0.853
0.530
0.745
0.780
0.687
0.512
V-ROC
0.984
0.606
0.876
0.613
0.518
0.537
0.885
0.853
0.741
0.633
0.856
0.527
0.727
0.771
0.658
0.486
Mixture5.7
A-R
0.906
0.628
0.859
0.524
0.490
0.577
0.870
0.851
0.692
0.648
0.452
0.503
0.440
0.881
0.470
0.443
R-A-R
0.910
0.746
0.909
0.649
0.466
0.519
0.910
0.922
0.759
0.738
0.390
0.511
0.386
0.876
0.394
0.465
V-ROC
0.900
0.726
0.899
0.623
0.463
0.522
0.902
0.892
0.835
0.839
0.389
0.515
0.381
0.877
0.389
0.458
1stCount
+
+Table 7: Average A-P (AUC-PR), R-A-P (R-AUC-PR) and V-PR (VUS-PR) accuracy measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
A-P
0.002
0.001
0.002
0.002
0.001
0.002
0.002
0.001
0.002
0.001
0.001
0.003
0.001
0.003
0.001
0.003
R-A-P
0.002
0.002
0.002
0.001
0.001
0.001
0.002
0.002
0.002
0.002
0.001
0.002
0.364
0.002
0.001
0.002
V-PR
0.003
0.002
0.002
0.002
0.001
0.002
0.002
0.002
0.002
0.002
0.002
0.002
0.389
0.003
0.001
0.002
CallIt2
A-P
0.114
0.054
0.106
0.057
0.045
0.035
0.078
0.116
0.097
0.054
0.084
0.030
0.095
0.080
0.073
0.080
R-A-P
0.124
0.070
0.111
0.088
0.089
0.087
0.092
0.115
0.097
0.073
0.096
0.060
0.109
0.095
0.106
0.113
V-PR
0.121
0.070
0.110
0.082
0.083
0.083
0.090
0.115
0.095
0.072
0.097
0.051
0.109
0.091
0.103
0.108
Credit
A-P
0.101
0.088
0.042
0.023
0.007
0.002
0.091
0.089
0.081
0.087
0.040
0.002
0.053
0.074
0.029
0.173
R-A-P
0.053
0.054
0.024
0.009
0.002
0.002
0.056
0.054
0.053
0.053
0.020
0.002
0.038
0.040
0.009
0.081
V-PR
0.051
0.051
0.024
0.011
0.002
0.002
0.053
0.051
0.050
0.051
0.020
0.002
0.037
0.039
0.012
0.076
GECCO
A-P
0.418
0.447
0.096
0.130
0.013
0.012
0.410
0.400
0.349
0.304
0.206
0.012
0.039
0.052
0.234
0.199
R-A-P
0.473
0.459
0.134
0.050
0.022
0.020
0.428
0.444
0.416
0.372
0.033
0.019
0.098
0.085
0.047
0.032
V-PR
0.465
0.461
0.128
0.049
0.022
0.019
0.429
0.439
0.406
0.363
0.033
0.018
0.101
0.083
0.046
0.033
Genesis
A-P
0.249
0.015
0.019
0.051
0.058
0.010
0.036
0.013
0.017
0.011
0.055
0.004
0.007
0.005
0.011
0.059
R-A-P
0.384
0.015
0.021
0.101
0.101
0.012
0.038
0.013
0.016
0.013
0.047
0.003
0.506
0.011
0.015
0.090
V-PR
0.371
0.015
0.020
0.097
0.095
0.012
0.037
0.013
0.016
0.014
0.047
0.003
0.506
0.010
0.015
0.087
MSL
A-P
0.167
0.146
0.151
0.156
0.107
0.107
0.146
0.157
0.147
0.140
0.148
0.106
0.153
0.114
0.157
0.132
R-A-P
0.260
0.224
0.227
0.220
0.165
0.157
0.231
0.242
0.225
0.222
0.200
0.162
0.185
0.174
0.203
0.190
V-PR
0.256
0.220
0.224
0.218
0.162
0.156
0.227
0.237
0.221
0.218
0.199
0.159
0.185
0.173
0.200
0.189
NYC
A-P
0.076
0.020
0.033
0.040
0.045
0.034
0.060
0.046
0.046
0.062
0.025
0.023
0.020
0.022
0.046
0.019
R-A-P
0.120
0.038
0.051
0.065
0.096
0.045
0.069
0.059
0.061
0.066
0.046
0.046
0.333
0.047
0.076
0.031
V-PR
0.114
0.037
0.051
0.063
0.087
0.047
0.070
0.059
0.061
0.065
0.045
0.047
0.318
0.045
0.072
0.032
PSM
A-P
0.434
0.385
0.383
0.411
0.298
0.281
0.391
0.378
0.371
0.376
0.465
0.279
0.418
0.334
0.468
0.394
R-A-P
0.435
0.383
0.386
0.353
0.293
0.283
0.395
0.379
0.372
0.378
0.420
0.291
0.369
0.334
0.423
0.369
V-PR
0.436
0.384
0.387
0.354
0.293
0.283
0.395
0.380
0.373
0.379
0.420
0.291
0.370
0.334
0.423
0.370
SMD
A-P
0.172
0.130
0.146
0.069
0.046
0.043
0.141
0.147
0.139
0.141
0.188
0.042
0.104
0.122
0.128
0.145
R-A-P
0.159
0.130
0.145
0.070
0.055
0.046
0.140
0.152
0.145
0.145
0.182
0.052
0.080
0.099
0.109
0.088
V-PR
0.159
0.130
0.145
0.070
0.054
0.046
0.140
0.152
0.144
0.145
0.181
0.052
0.081
0.099
0.109
0.088
SWAT
A-P
0.166
0.093
0.084
0.143
0.121
0.121
0.107
0.085
0.131
0.081
0.713
0.123
0.170
0.093
0.726
0.738
R-A-P
0.251
0.138
0.122
0.172
0.111
0.154
0.178
0.125
0.170
0.113
0.446
0.165
0.535
0.133
0.533
0.586
V-PR
0.241
0.132
0.118
0.171
0.109
0.153
0.169
0.121
0.167
0.111
0.434
0.164
0.523
0.129
0.504
0.561
SMAP
A-P
0.131
0.114
0.114
0.122
0.130
0.132
0.114
0.115
0.104
0.111
0.126
0.128
0.102
0.122
0.104
0.148
R-A-P
0.155
0.129
0.126
0.141
0.152
0.150
0.131
0.132
0.118
0.126
0.142
0.134
0.117
0.135
0.118
0.165
V-PR
0.155
0.129
0.126
0.141
0.152
0.150
0.131
0.132
0.118
0.127
0.143
0.133
0.117
0.136
0.118
0.166
ASD
A-P
0.231
0.158
0.164
0.095
0.052
0.049
0.245
0.174
0.170
0.132
0.203
0.052
0.142
0.195
0.144
0.133
R-A-P
0.269
0.170
0.197
0.103
0.082
0.090
0.254
0.202
0.191
0.139
0.208
0.089
0.102
0.197
0.154
0.132
V-PR
0.261
0.170
0.194
0.103
0.080
0.090
0.253
0.200
0.188
0.139
0.208
0.091
0.103
0.197
0.149
0.130
Contextual4.9
A-P
0.754
0.090
0.754
0.086
0.070
0.054
0.773
0.640
0.274
0.055
0.732
0.049
0.522
0.323
0.066
0.044
R-A-P
0.585
0.060
0.585
0.075
0.055
0.055
0.614
0.432
0.135
0.054
0.556
0.025
0.293
0.225
0.054
0.047
V-PR
0.562
0.074
0.559
0.094
0.068
0.067
0.586
0.423
0.148
0.066
0.534
0.047
0.292
0.230
0.068
0.057
Contextual7.2
A-P
0.770
0.106
0.756
0.087
0.099
0.074
0.767
0.672
0.309
0.990
0.721
0.109
0.542
0.374
0.105
0.075
R-A-P
0.612
0.083
0.594
0.078
0.078
0.769
0.608
0.477
0.166
0.075
0.546
0.082
0.324
0.260
0.079
0.067
V-PR
0.594
0.100
0.579
0.097
0.094
0.590
0.469
0.183
0.090
0.533
0.097
0.333
0.333
0.271
0.098
0.181
Global4.8
A-P
0.978
0.552
0.939
0.087
0.064
0.051
0.959
0.959
0.927
0.999
0.971
0.998
0.981
0.435
0.136
0.113
R-A-P
0.957
0.363
0.881
0.068
0.055
0.050
0.918
0.918
0.858
0.077
0.942
0.051
0.961
0.404
0.110
0.163
V-PR
0.901
0.361
0.834
0.092
0.069
0.062
0.866
0.864
0.808
0.889
0.884
0.062
0.903
0.394
0.140
0.174
Global7.2
A-P
0.974
0.517
0.921
0.088
0.098
0.074
0.947
0.960
0.912
0.134
0.973
0.747
0.977
0.492
0.182
0.106
R-A-P
0.949
0.346
0.854
0.082
0.084
0.074
0.902
0.923
0.834
0.106
0.948
0.060
0.953
0.429
0.145
0.199
V-PR
0.905
0.347
0.818
0.099
0.101
0.089
0.860
0.876
0.796
0.122
0.899
0.067
0.904
0.426
0.182
0.107
Seasonal4.8
A-P
0.975
0.555
0.865
0.476
0.158
0.128
0.889
0.776
0.622
0.063
0.884
0.884
0.732
0.727
0.061
0.588
R-A-P
0.994
0.739
0.719
0.162
0.223
0.750
0.681
0.681
0.540
0.999
0.718
0.152
0.604
0.679
0.992
0.888
V-PR
0.987
0.755
0.676
0.165
0.210
0.763
0.695
0.551
0.999
0.737
0.138
0.621
0.679
0.679
0.991
0.885
Seasonal7.7
A-P
0.963
0.992
0.881
0.163
0.164
0.906
0.773
0.645
0.743
0.109
0.990
0.133
0.734
0.733
0.116
0.080
R-A-P
0.978
0.748
0.808
0.139
0.192
0.260
0.805
0.723
0.599
0.163
0.758
0.195
0.645
0.752
0.169
0.132
V-PR
0.963
0.141
0.819
0.134
0.194
0.246
0.823
0.732
0.605
0.159
0.782
0.185
0.658
0.743
0.160
0.132
Shapelet4.9
A-P
0.774
0.665
0.633
0.124
0.066
0.142
0.683
0.499
0.382
0.853
0.659
0.102
0.482
0.282
0.094
0.043
R-A-P
0.949
0.253
0.386
0.160
0.152
0.199
0.403
0.364
0.239
0.243
0.165
0.145
0.250
0.627
0.154
0.226
V-PR
0.468
0.247
0.375
0.157
0.150
0.192
0.393
0.357
0.322
0.236
0.162
0.149
0.246
0.619
0.151
0.221
Trend4.8
A-P
0.377
0.215
0.254
0.062
0.139
0.378
0.243
0.228
0.155
0.133
0.156
0.556
0.244
0.615
0.254
0.154
R-A-P
0.538
0.343
0.368
0.093
0.092
0.439
0.385
0.241
0.223
0.293
0.169
0.233
0.338
0.589
0.292
0.239
V-PR
0.516
0.329
0.360
0.162
0.128
0.435
0.369
0.359
0.377
0.237
0.216
0.169
0.318
0.588
0.299
0.233
+
+Table 8: Average P (Precision), R (Recall) and F1 (F1-score) accuracy measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
P
0.003
0.001
0.002
0.001
0.001
0.001
0.001
0.001
0.002
0.001
0.000
0.001
0.001
0.000
0.001
0.000
0.000
R
0.759
0.278
0.481
0.595
0.253
0.266
0.354
0.380
0.506
0.380
0.000
0.038
0.987
0.063
0.405
0.013
F1
0.006
0.002
0.004
0.003
0.002
0.002
0.003
0.003
0.004
0.003
0.000
0.001
0.002
0.001
0.002
0.000
CallIt2
P
0.138
0.074
0.124
0.073
0.085
0.034
0.104
0.091
0.083
0.066
0.067
0.038
0.089
0.125
0.084
0.075
R
0.162
0.243
0.230
0.176
0.095
0.162
0.108
0.311
0.284
0.324
0.027
0.041
0.378
0.014
0.297
0.257
F1
0.149
0.114
0.161
0.103
0.090
0.056
0.106
0.141
0.128
0.109
0.038
0.039
0.144
0.024
0.131
0.117
Credit
P
0.059
0.058
0.026
0.003
0.001
0.001
0.058
0.058
0.057
0.057
0.047
0.005
0.013
0.156
0.009
0.009
R
0.758
0.740
0.843
0.596
0.139
0.238
0.740
0.749
0.726
0.744
0.135
0.018
0.901
0.283
0.731
0.915
F1
0.110
0.107
0.051
0.006
0.003
0.003
0.107
0.107
0.105
0.107
0.069
0.007
0.026
0.201
0.017
0.018
GECCO
P
0.380
0.373
0.173
0.009
0.012
0.008
0.379
0.475
0.332
0.384
0.021
0.009
0.011
0.214
0.014
0.014
R
0.818
0.779
0.207
0.340
0.008
0.804
0.585
0.781
0.460
0.215
0.004
0.993
0.012
0.988
0.542
F1
0.518
0.504
0.189
0.018
0.010
0.008
0.516
0.524
0.466
0.418
0.039
0.006
0.022
0.023
0.027
0.027
Genesis
P
0.116
0.015
0.065
0.066
0.053
0.016
0.119
0.075
0.055
0.013
0.047
0.000
0.007
0.006
0.017
0.017
R
0.160
0.120
0.180
0.500
0.960
0.020
0.200
0.200
0.140
0.080
0.120
0.000
1.000
0.020
0.480
0.980
F1
0.134
0.027
0.095
0.116
0.100
0.018
0.149
0.109
0.079
0.022
0.068
0.000
0.014
0.009
0.033
0.033
MSL
P
0.185
0.166
0.158
0.248
0.143
0.181
0.166
0.194
0.173
0.193
0.219
0.107
0.128
0.180
0.130
0.127
R
0.117
0.090
0.089
0.019
0.008
0.008
0.093
0.066
0.093
0.067
0.014
0.005
0.125
0.014
0.137
0.128
F1
0.143
0.117
0.114
0.035
0.015
0.016
0.119
0.098
0.121
0.100
0.026
0.010
0.126
0.025
0.133
0.127
NYC
P
1.000
0.000
0.034
0.111
0.333
0.250
0.000
0.000
0.000
0.000
0.059
0.000
0.022
0.056
0.059
0.000
R
0.010
0.000
0.293
0.010
0.010
0.010
0.000
0.000
0.000
0.000
0.010
0.000
0.980
0.010
0.222
0.000
F1
0.020
0.000
0.061
0.019
0.020
0.019
0.000
0.000
0.000
0.000
0.017
0.000
0.043
0.017
0.094
0.000
PSM
P
0.624
0.653
0.600
0.461
0.396
0.278
0.591
0.653
0.658
0.644
0.444
0.282
0.548
0.802
0.427
0.544
R
0.064
0.047
0.058
0.559
0.025
0.243
0.048
0.047
0.025
0.047
0.110
0.005
0.299
0.004
0.421
0.302
F1
0.116
0.089
0.105
0.506
0.046
0.259
0.088
0.088
0.047
0.087
0.176
0.010
0.387
0.007
0.424
0.389
SMD
P
0.194
0.151
0.162
0.091
0.112
0.042
0.176
0.185
0.197
0.201
0.706
0.043
0.107
0.454
0.117
0.095
R
0.305
0.145
0.255
0.257
0.022
0.201
0.181
0.173
0.124
0.126
0.007
0.005
0.304
0.020
0.359
0.332
F1
0.237
0.148
0.198
0.135
0.037
0.069
0.178
0.152
0.155
0.154
0.014
0.009
0.158
0.039
0.176
0.148
SWAT
P
0.195
0.119
0.088
0.143
0.105
0.107
0.329
0.110
0.308
0.088
0.151
0.135
0.130
0.128
0.152
0.290
R
0.056
0.055
0.074
0.404
0.013
0.016
0.044
0.048
0.375
0.074
0.302
0.001
0.990
0.002
0.907
0.742
F1
0.087
0.075
0.080
0.212
0.023
0.028
0.077
0.067
0.338
0.080
0.201
0.001
0.230
0.004
0.261
0.417
SMAP
P
0.236
0.096
0.086
0.119
0.154
0.121
0.094
0.086
0.086
0.084
0.084
0.125
0.078
0.092
0.084
0.092
R
0.035
0.171
0.151
0.256
0.047
0.005
0.167
0.151
0.152
0.148
0.001
0.005
0.042
0.002
0.045
0.045
F1
0.061
0.123
0.110
0.163
0.072
0.010
0.121
0.109
0.110
0.107
0.001
0.010
0.055
0.004
0.059
0.060
ASD
P
0.309
0.237
0.230
0.116
0.076
0.069
0.348
0.261
0.301
0.207
0.222
0.077
0.063
0.455
0.088
0.100
R
0.225
0.178
0.253
0.183
0.022
0.043
0.299
0.147
0.135
0.177
0.101
0.010
0.160
0.063
0.265
0.242
F1
0.219
0.158
0.184
0.107
0.031
0.047
0.258
0.177
0.163
0.146
0.129
0.017
0.085
0.108
0.125
0.131
Contextual4.9
P
0.584
0.667
0.555
0.044
0.051
0.049
0.101
0.264
0.446
0.119
0.670
0.041
0.234
0.577
0.072
0.029
R
0.733
0.340
0.696
0.235
0.356
0.364
0.559
0.713
0.656
0.656
0.591
0.069
0.559
0.393
0.174
0.053
F1
0.650
0.112
0.618
0.075
0.089
0.086
0.172
0.385
0.531
0.201
0.628
0.051
0.330
0.467
0.102
0.037
Contextual7.2
P
0.744
0.095
0.548
0.085
0.080
0.067
0.157
0.352
0.373
0.160
0.775
0.084
0.306
0.633
0.103
0.053
R
0.686
0.336
0.719
0.461
0.297
0.342
0.600
0.700
0.717
0.650
0.556
0.597
0.556
0.350
0.197
0.064
F1
0.714
0.148
0.622
0.143
0.126
0.112
0.249
0.468
0.491
0.257
0.647
0.090
0.394
0.451
0.135
0.058
Global4.8
P
0.936
0.277
1.000
-
-
-
-
-
-
-
-
-
-
-
-
R
-
-
-
-
-
-
-
-
-
-
-
-
-
-
F1
-
-
-
-
-
-
-
-
-
-
-
-
-
Global7.2
P
-
-
-
-
-
-
-
-
-
-
-
-
-
R
-
-
-
-
-
-
-
-
-
-
-
-
-
F1
-
-
-
-
-
-
-
-
-
-
-
-
Seasonal4.8
P
-
-
-
-
-
-
-
-
-
-
-
-
-
R
-
-
-
-
-
-
-
-
-
-
-
-
F1
-
-
-
-
-
-
-
-
-
-
-
Seasonal7.2
P
-
-
-
-
-
-
-
-
-
-
-
-
R
-
-
-
-
-
-
-
-
-
-
-
F1
-
-
-
-
-
-
-
-
-
-
Shapelet4.9
P
-
-
-
-
-
-
-
-
-
-
-
-
R
-
-
-
-
-
-
-
-
-
-
F1
-
-
-
-
-
-
-
-
-
+
+Table 9: Average R-R (Range-Recall), R-P (Range-Precision) and R-F (Range-F1-score) accuracy measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
R-R
0.786
0.277
0.494
0.586
0.243
0.283
0.369
0.389
0.523
0.386
0.000
0.043
0.986
0.057
0.394
0.009
R-P
0.004
0.002
0.002
0.001
0.001
0.001
0.002
0.002
0.003
0.001
0.000
0.001
0.004
0.001
0.001
0.000
R-F
0.007
0.003
0.004
0.003
0.003
0.002
0.003
0.004
0.005
0.003
0.000
0.001
0.008
0.001
0.003
0.000
CallIt2
R-R
0.278
0.318
0.344
0.209
0.161
0.205
0.161
0.424
0.315
0.325
0.055
0.074
0.359
0.031
0.280
0.309
R-P
0.139
0.069
0.113
0.056
0.105
0.031
0.095
0.077
0.091
0.064
0.067
0.038
0.096
0.125
0.099
0.086
R-F
0.185
0.114
0.170
0.088
0.127
0.053
0.120
0.131
0.142
0.107
0.060
0.051
0.152
0.049
0.147
0.134
Credit
R-R
0.735
0.716
0.828
0.564
0.150
0.234
0.716
0.725
0.701
0.721
0.135
0.020
0.892
0.292
0.709
0.907
R-P
0.054
0.052
0.024
0.002
0.003
0.002
0.051
0.052
0.049
0.052
0.047
0.005
0.012
0.156
0.008
0.009
R-F
0.101
0.097
0.047
0.004
0.007
0.003
0.096
0.096
0.092
0.097
0.070
0.007
0.023
0.204
0.015
0.017
GECCO
R-R
0.795
0.644
0.266
0.146
0.063
0.040
0.782
0.366
0.790
0.274
0.188
0.030
0.953
0.030
0.986
0.361
R-P
0.065
0.086
0.111
0.039
0.013
0.008
0.053
0.289
0.042
0.296
0.021
0.009
0.006
0.214
0.041
0.016
R-F
0.119
0.152
0.156
0.062
0.022
0.013
0.099
0.323
0.080
0.285
0.038
0.013
0.011
0.052
0.079
0.031
Genesis
R-R
0.497
0.174
0.507
0.550
0.855
0.079
0.211
0.385
0.180
0.162
0.356
0.000
1.000
0.077
0.325
0.861
R-P
0.119
0.014
0.057
0.030
0.005
0.016
0.086
0.067
0.059
0.013
0.047
0.000
0.003
0.006
0.035
0.002
R-F
0.192
0.026
0.102
0.058
0.010
0.027
0.122
0.114
0.089
0.024
0.083
0.000
0.005
0.011
0.063
0.005
MSL
R-R
0.241
0.194
0.182
0.049
0.150
0.126
0.224
0.176
0.202
0.162
0.110
0.138
0.202
0.112
0.237
0.199
R-P
0.150
0.129
0.125
0.267
0.143
0.179
0.130
0.136
0.130
0.137
0.219
0.107
0.098
0.180
0.113
0.119
R-F
0.185
0.155
0.148
0.084
0.146
0.148
0.164
0.153
0.158
0.149
0.146
0.120
0.132
0.138
0.153
0.149
NYC
R-R
0.208
0.000
0.223
0.208
0.208
0.208
0.000
0.000
0.000
0.000
0.208
0.000
0.461
0.208
0.289
0.000
R-P
1.000
0.000
0.023
0.143
0.333
0.250
0.000
0.000
0.000
0.000
0.059
0.000
0.040
0.056
0.053
0.000
R-F
0.344
0.000
0.042
0.169
0.256
0.227
0.000
0.000
0.000
0.092
0.000
0.074
0.088
0.089
0.089
0.000
PSM
R-R
0.450
0.376
0.470
0.410
0.133
0.211
0.455
0.370
0.399
0.359
0.230
0.054
0.133
0.139
0.505
0.265
R-P
0.557
0.553
0.533
0.456
0.374
0.274
0.537
0.557
0.584
0.587
0.444
0.282
0.385
0.802
0.459
0.467
R-F
0.498
0.448
0.499
0.432
0.197
0.238
0.493
0.444
0.474
0.446
0.303
0.091
0.198
0.237
0.481
0.338
SMD
R-R
0.478
0.378
0.360
0.187
0.126
0.276
0.385
0.426
0.400
0.384
0.079
0.053
0.323
0.122
0.404
0.297
R-P
0.095
0.092
0.115
0.055
0.101
0.042
0.110
0.121
0.124
0.131
0.706
0.043
0.067
0.454
0.123
0.062
R-F
0.158
0.148
0.175
0.085
0.112
0.073
0.171
0.189
0.189
0.196
0.143
0.047
0.111
0.192
0.188
0.103
SWAT
R-R
0.184
0.200
0.203
0.220
0.203
0.203
0.201
0.190
0.204
0.203
0.173
0.115
0.924
0.133
0.719
0.442
R-P
0.124
0.072
0.066
0.122
0.115
0.120
0.140
0.079
0.233
0.072
0.151
0.135
0.014
0.128
0.071
0.067
R-F
0.148
0.106
0.099
0.157
0.147
0.151
0.165
0.112
0.217
0.106
0.161
0.124
0.027
0.130
0.129
0.116
SMAP
R-R
0.182
0.276
0.211
0.226
0.204
0.140
0.298
0.234
0.280
0.230
0.054
0.118
0.134
0.092
0.137
0.128
R-P
0.164
0.087
0.110
0.120
0.121
0.124
0.084
0.079
0.107
0.080
0.084
0.125
0.079
0.092
0.086
0.075
R-F
0.173
0.133
0.124
0.148
0.151
0.130
0.131
0.118
0.155
0.118
0.066
0.122
0.100
0.092
0.105
0.094
ASD
R-R
0.303
0.255
0.291
0.145
0.097
0.116
0.328
0.265
0.232
0.215
0.174
0.062
0.166
0.196
0.312
0.217
R-P
0.212
0.185
0.165
0.165
0.081
0.070
0.218
0.182
0.232
0.181
0.222
0.077
0.087
0.455
0.106
0.084
R-F
0.219
0.192
0.176
0.098
0.084
0.083
0.237
0.185
0.207
0.179
0.185
0.066
0.102
0.266
0.146
0.111
Contextual4.9
R-R
0.733
0.341
0.697
0.232
0.347
0.361
0.556
0.709
0.656
0.659
0.603
0.070
0.559
0.396
0.181
0.053
R-P
0.586
0.071
0.559
0.110
0.120
0.121
0.084
0.079
0.107
0.125
0.125
0.670
0.041
0.240
0.577
0.061
R-F
0.651
0.118
0.620
0.069
0.097
0.083
0.222
0.388
0.526
0.210
0.635
0.052
0.336
0.470
0.092
0.34
Contextual7.2
R-R
0.692
0.335
0.725
0.453
0.291
0.345
0.597
0.697
0.717
0.654
0.580
0.096
0.553
0.360
0.192
0.061
R-P
0.744
0.100
0.546
0.070
0.080
0.060
0.227
0.353
0.365
0.164
0.775
0.084
0.304
0.633
0.087
0.053
R-F
0.717
0.154
0.623
0.122
0.125
0.103
0.328
0.468
0.483
0.263
0.664
0.090
0.392
0.459
0.129
0.057
Global4.8
R-R
0.919
0.266
0.874
0.206
0.859
0.327
0.855
0.887
0.870
0.823
0.887
0.078
0.996
0.759
0.733
0.178
R-P
0.939
0.292
1.000
0.733
1.018
1.079
1.877
1.978
1.978
1.362
0.747
0.046
0.338
0.766
0.113
0.116
R-F
0.929
0.416
0.933
1.118
1.177
1.177
1.978
1.978
1.978
1.511
0.811
0.158
0.505
0.762
0.196
0.149
Global7.2
R-R
0.922
0.716
0.881
0.742
0.840
0.320
0.832
0.916
0.869
0.801
0.849
0.068
0.982
0.761
0.712
0.083
R-P
0.832
0.297
0.773
0.778
0.972
1.177
1.992
1.978
1.978
1.469
0.871
0.166
0.457
0.834
0.125
0.070
R-F
0.874
0.420
0.824
0.141
0.197
0.117
0.902
0.894
0.892
0.584
0.860
0.064
0.624
0.796
0.213
0.076
Seasonal4.8
R-R
0.475
0.244
0.464
0.247
0.238
0.170
0.453
0.441
0.433
0.364
0.280
0.000
0.478
0.280
0.238
0.187
R-P
0.999
0.062
1.000
0.597
0.864
0.500
1.000
1.000
1.966
0.630
0.630
R-F
0.644
0.099
0.634
0.350
0.373
0.254
0.624
0.612
0.604
0.529
0.387
Seasonal7.7
R-R
0.480
0.254
0.425
0.089
0.173
0.191
0.423
0.409
0.397
0.355
0.278
0.232
0.453
0.278
0.187
0.223
R-P
0.944
0.071
1.000
0.112
0.962
0.588
0.993
0.917
1.000
9262
692
R-F
0.636
0.111
0.596
0.999
0.293
0.289
0.594
0.566
0.569
0.513
0.396
Shapelet4.9
R-R
0.447
0.297
0.431
0.154
0.174
0.398
0.445
0.445
0.445
0.297
0.279
R-P
0.944
0.679
0.104
0.433
0.382
0.382
0.348
0.479
0.778
0.213
0.479
R-F
0.607
0.117
0.527
0.277
0.247
0.245
0.566
0.566
0.230
Shapelet7.4
R-R
0.471
0.304
0.473
0.197
0.138
0.343
0.442
0.457
0.466
0.365
0.277
R-P
0.980
0.883
0.620
0.123
0.339
0.583
0.818
0.479
0.598
0.211
0.583
R-F
0.636
0.130
0.536
0.151
0.191
0.212
0.574
0.468
0.524
0.268
Mixture5.7
R-R
0.601
0.341
0.508
0.347
0.119
0.119
0.515
0.487
0.705
0.364
0.277
R-P
0.455
0.991
1.168
0.697
1.112
1.138
1.515
R-F
0.532
0.237
1.148
1.115
+
+Table 10: Average Aff-P (Affiliated-Precision), Aff-R (Affiliated-Recall) and Aff-F (Affiliated-F1-score) accuracy measures for all datasets. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Dataset
Metric
CATCH
Modern
iTrans
DualTF
ATrans
DC
TsNet
Patch
DLin
NLin
AE
TFAD
Ocsvm
IF
PCA
HBOS
CICIDS
Aff-P
0.667
0.563
0.586
0.553
0.531
0.533
0.566
0.569
0.575
0.579
0.543
0.550
0.530
0.548
0.541
0.538
Aff-R
0.959
0.781
0.892
0.926
0.593
0.882
0.783
0.785
0.799
0.794
0.156
0.611
1.000
0.672
0.724
0.545
Aff-F
0.787
0.654
0.708
0.692
0.560
0.664
0.657
0.660
0.669
0.669
0.243
0.579
0.693
0.604
0.619
0.542
CallIt2
Aff-P
0.742
0.650
0.703
0.617
0.645
0.571
0.691
0.667
0.668
0.616
0.560
0.619
0.652
0.539
0.688
0.620
Aff-R
0.955
0.975
0.963
0.959
0.838
0.894
0.932
0.976
0.976
0.984
0.617
0.933
0.982
0.321
0.869
0.969
Aff-F
0.835
0.780
0.812
0.751
0.729
0.697
0.794
0.793
0.793
0.757
0.587
0.744
0.783
0.402
0.768
0.756
Credit
Aff-P
0.618
0.611
0.559
0.513
0.521
0.488
0.610
0.612
0.605
0.608
0.560
0.585
0.556
0.658
0.564
0.620
Aff-R
0.956
0.952
0.984
0.935
0.865
0.898
0.953
0.955
0.948
0.952
0.562
0.757
0.997
0.612
0.959
0.999
Aff-F
0.750
0.744
0.713
0.663
0.650
0.632
0.744
0.746
0.738
0.742
0.561
0.660
0.714
0.634
0.710
0.695
GECCO
Aff-P
0.832
0.808
0.735
0.633
0.690
0.567
0.810
0.831
0.808
0.793
0.836
0.526
0.499
0.647
0.646
0.620
Aff-R
0.998
0.998
0.979
0.786
0.903
0.872
0.997
0.995
0.997
0.992
0.810
0.776
1.000
0.315
1.000
0.827
Aff-F
0.908
0.893
0.839
0.701
0.782
0.687
0.894
0.906
0.893
0.882
0.823
0.627
0.666
0.424
0.785
0.708
Genesis
Aff-P
0.835
0.728
0.822
0.683
0.749
0.659
0.780
0.763
0.772
0.724
0.759
0.437
0.512
0.673
0.691
0.564
Aff-R
0.966
0.974
0.972
0.996
1.000
0.943
0.968
0.974
0.959
0.971
0.976
0.687
1.000
0.951
0.991
1.000
Aff-F
0.896
0.833
0.891
0.810
0.856
0.776
0.864
0.856
0.856
0.829
0.854
0.535
0.677
0.788
0.814
0.721
MSL
Aff-P
0.599
0.578
0.566
0.562
0.549
0.576
0.589
0.584
0.577
0.584
0.521
0.516
0.497
0.502
0.538
0.520
Aff-R
0.966
0.975
0.951
0.618
0.933
0.874
0.973
0.952
0.975
0.948
0.781
0.936
0.902
0.697
0.914
0.982
Aff-F
0.740
0.726
0.710
0.588
0.692
0.694
0.734
0.724
0.725
0.723
0.625
0.665
0.641
0.584
0.678
0.680
NYC
Aff-P
1.000
0.639
0.520
0.551
0.751
0.769
0.750
0.719
0.814
0.817
0.529
0.689
0.500
0.481
0.516
0.525
Aff-R
0.989
0.965
0.999
0.988
0.988
0.980
0.843
0.843
0.843
0.821
0.989
0.689
1.000
0.989
0.997
0.946
Aff-F
0.994
0.769
0.684
0.708
0.853
0.862
0.794
0.776
0.828
0.819
0.689
0.689
0.667
0.648
0.680
0.675
PSM
Aff-P
0.808
0.734
0.765
0.622
0.600
0.538
0.762
0.739
0.777
0.762
0.776
0.543
0.652
0.904
0.712
0.621
Aff-R
0.918
0.941
0.966
0.868
0.871
0.932
0.939
0.948
0.893
0.942
0.649
0.744
0.447
0.472
0.692
0.700
Aff-F
0.859
0.825
0.854
0.725
0.710
0.682
0.842
0.831
0.831
0.843
0.707
0.628
0.531
0.620
0.702
0.658
SMD
Aff-P
0.773
0.755
0.736
0.527
0.607
0.510
0.745
0.748
0.761
0.762
0.889
0.517
0.649
0.801
0.680
0.557
Aff-R
0.938
0.948
0.943
0.956
0.895
0.998
0.938
0.970
0.940
0.946
0.291
0.913
0.866
0.513
0.807
0.722
Aff-F
0.847
0.840
0.827
0.679
0.724
0.675
0.831
0.845
0.841
0.844
0.439
0.660
0.742
0.626
0.738
0.629
SWAT
Aff-P
0.623
0.593
0.568
0.535
0.539
0.539
0.698
0.582
0.586
0.565
0.604
0.613
0.542
0.574
0.571
0.527
Aff-R
0.956
0.942
0.976
0.993
0.981
0.982
0.918
0.932
0.988
0.972
0.949
0.777
0.999
0.835
0.932
0.847
Aff-F
0.755
0.728
0.718
0.695
0.696
0.696
0.793
0.716
0.736
0.715
0.738
0.686
0.703
0.681
0.708
0.650
SMAP
Aff-P
0.574
0.472
0.439
0.509
0.545
0.548
0.475
0.450
0.455
0.447
0.416
0.515
0.392
0.425
0.399
0.399
Aff-R
0.895
0.971
0.885
0.997
0.991
0.973
0.972
0.931
0.953
0.914
0.524
0.979
0.703
0.645
0.687
0.703
Aff-F
0.699
0.635
0.587
0.674
0.703
0.701
0.638
0.606
0.616
0.601
0.463
0.675
0.503
0.512
0.505
0.509
ASD
Aff-P
0.693
0.669
0.660
0.551
0.553
0.569
0.693
0.662
0.690
0.650
0.600
0.532
0.505
0.761
0.532
0.538
Aff-R
0.966
0.953
0.969
0.760
0.870
0.921
0.963
0.954
0.918
0.944
0.942
0.785
0.810
0.842
0.871
0.891
Aff-F
0.804
0.782
0.780
0.604
0.674
0.702
0.800
0.777
0.782
0.766
0.731
0.630
0.617
0.781
0.656
0.669
Contextual4.9
Aff-P
0.838
0.505
0.821
0.503
0.517
0.490
0.552
0.669
0.773
0.563
0.861
0.526
0.619
0.861
0.488
0.487
Aff-R
0.812
0.814
0.761
0.776
0.792
0.779
0.837
0.883
0.806
0.908
0.674
0.666
0.769
0.582
0.463
0.547
Aff-F
0.825
0.623
0.790
0.611
0.625
0.602
0.666
0.761
0.789
0.695
0.756
0.588
0.686
0.694
0.475
0.515
Contextual7.2
Aff-P
0.907
0.508
0.826
0.519
0.498
0.496
0.566
0.705
0.709
0.585
0.901
0.523
0.660
0.877
0.505
0.476
Aff-R
0.748
0.782
0.803
0.905
0.685
0.735
0.806
0.851
0.841
0.887
0.647
0.580
0.760
0.535
0.447
0.422
Aff-F
0.820
0.616
0.814
0.660
0.577
0.592
0.665
0.771
0.770
0.705
0.753
0.550
0.707
0.665
0.645
0.474
Global4.8
Aff-P
0.985
0.661
1.000
0.549
0.506
0.479
0.964
1.000
0.994
0.721
0.916
0.520
0.713
0.938
0.599
0.535
Aff-R
0.922
0.867
0.876
0.749
0.933
0.737
0.865
0.889
0.875
0.947
0.629
0.679
0.996
0.866
0.872
0.510
Aff-F
0.953
0.750
0.934
0.633
0.656
0.581
0.912
0.941
0.930
0.804
0.914
0.589
0.831
0.919
0.717
0.544
Global7.2
Aff-P
0.954
0.662
0.926
0.515
0.506
0.481
0.993
0.949
0.975
0.769
0.958
0.513
0.771
0.950
0.572
0.514
Aff-R
0.935
0.857
0.893
0.939
0.937
0.648
0.836
0.928
0.881
0.861
0.895
0.577
0.771
0.952
0.821
0.514
Aff-F
0.945
0.746
0.909
0.665
0.657
0.552
0.907
0.938
0.926
0.812
0.925
0.543
0.868
0.906
0.691
0.512
Seasonal4.8
Aff-P
1.000
0.533
1.000
0.950
0.945
0.912
1.000
1.000
1.000
1.000
1.938
1.873
1.654
1.654
1.654
Aff-R
0.998
0.955
0.986
0.761
0.784
0.817
0.988
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
Aff-F
0.999
0.684
0.993
0.845
0.857
0.879
0.993
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
Seasonal7.7
Aff-P
0.992
0.934
1.111
0.838
0.570
0.810
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
Aff-R
0.998
0.934
1.111
0.838
0.570
0.810
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
Aff-F
0.995
0.679
0.992
0.778
0.718
0.839
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
1.111
Shapelet4.9
Aff-P
0.997
0.517
0.952
0.653
0.779
0.763
0.968
0.874
0.979
0.646
0.732
0.603
0.606
0.832
0.547
0.492
Aff-R
0.977
0.976
0.979
0.732
0.704
0.743
0.871
0.983
0.979
0.877
0.992
0.512
0.988
0.965
0.898
0.940
Aff-F
0.987
0.676
0.969
0.690
0.740
0.753
0.917
0.925
0.979
0.744
0.842
0.554
0.751
0.894
0.680
0.646
Shapelet7.4
Aff-P
0.999
0.514
0.941
0.591
0.658
0.641
0.965
0.913
0.914
0.656
0.827
0.738
0.662
0.821
0.567
0.499
Aff-R
0.969
0.975
0.922
0.810
0.721
0.737
0.925
0.954
0.983
0.954
0.985
0.717
0.739
0.879
0.997
0.969
Aff-F
0.923
0.753
0.893
0.689
0.618
0.768
0.897
0.894
0.923
0.723
0.833
0.716
0.709
0.922
0.703
0.665
Mixture8.9
Aff-P
0.841
0.607
0.838
0.510
0.502
0.814
0.820
0.797
0.568
0.744
0.520
0.561
0.517
0.868
0.518
0.515
Aff-R
0.988
0.871
0.991
0.954
0.608
0.718
0.989
0.990
0.975
0.929
0.991
0.897
1.000
1.042
1.000
Aff-F
0.909
0.716
0.908
0.665
0.550
0.763
0.897
0.883
0.718
0.827
0.682
0.690
1.682
1.906
1.683
+
+Table 11: Average A-R (AUC-ROC) and Aff-F (Affiliated-F1) accuracy measures for 4 synthetic datasets of different types of anomalies. The best results are highlighted in bold, and the second-best results are underlined.
+
+
Model
CATCH
Modern
iTrans
DualTF
TFAD
Metric
Aff-F
A-R
Aff-F
A-R
Aff-F
A-R
Aff-F
A-R
Aff-F
A-R
Low-frequency anomalies
0.998
0.996
0.811
0.873
0.850
0.929
0.744
0.662
0.700
0.538
Mid-frequency anomalies
0.927
0.987
0.814
0.859
0.913
0.984
0.723
0.575
0.638
0.519
High-frequency anomalies
0.915
0.987
0.738
0.809
0.864
0.927
0.462
0.602
0.668
0.513
Not distinctly frequency band
0.873
0.917
0.775
0.765
0.852
0.910
0.720
0.630
0.619
0.495
+
+# D EMPIRICAL VERIFICATION SHOWS THAT CATCH CAN PERFORM FINE-GRAINED MODELING IN EACH FREQUENCY BAND
+
+We design a set of experiments to validate the advantages of our method in capturing fine-grained frequency characteristics. We use the synthetic dataset creation method provided by TODS (Lai et al., 2021) to generate four synthetic datasets—see Figure 7, simulating scenarios with known frequency-specific anomalies: low-frequency anomalies, medium-frequency anomalies, high-frequency anomalies, and anomalies that are not distinctly separated across different frequency bands. We then test CATCH and several state-of-the-art methods on these datasets.
+
+The experimental results in Table 11 show that CATCH consistently outperforms other algorithms across all four datasets. Notably, most algorithms perform poorly when dealing with time series containing high-frequency anomalies, while CATCH demonstrates outstanding performance. Moreover, even on time series where anomalies are uniformly distributed across each frequency band, CATCH still achieves outstanding results. These findings provide strong evidence that CATCH excels in capturing fine-grained frequency characteristics, significantly enhancing the performance of time series anomaly detection.
+
+
+
+
+
+
+(a) Time series containing low-frequency anomalies
+
+
+
+
+(b) Time series containing medium-frequency anomalies
+
+
+
+
+(c) Time series containing high-frequency anomalies
+Figure 7: Four synthetic time series simulating scenarios with known frequency-specific anomalies.
+
+
+(d) Anomalies that are not distinctly separated across different frequency bands
\ No newline at end of file
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/images.zip b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..d8dc557cc25dfee5b18126b754ef616f794fe072
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9a539aecc46b96710e95f1433ecfa80d2483451e80fd2e32784f2afbd8cb8b5f
+size 3356736
diff --git a/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/layout.json b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..0e9e2d2e8cb098950185f97b8b9be82e1c51a658
--- /dev/null
+++ b/ICLR/2025/CATCH_ Channel-Aware Multivariate Time Series Anomaly Detection via Frequency Patching/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c86f63939a475f74f2c847c7b47b44d0b7c938b7610736507018670d880256df
+size 787254
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_content_list.json b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..bb2af9c620f44becfb09980df2b527d7f545b65e
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:220182421e58c761a3518f72a72d0fe5e1f71f31d48bde0090b28aac664f554f
+size 109122
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_model.json b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..a2e4eaa75c42c622ab7f7398bfc0805670d5a1d7
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8e38ae8ff7c5cc9270d11f06becdb6b7fb7b590a56d048a711fadb6aaf90817b
+size 125105
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_origin.pdf b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..18205c2b70d139d58c2c75d4c31c11c9bbc985c5
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/62b86e30-930f-469c-b847-f0c9f0bebc71_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f838f0a40195ca8757cc5cf72e6fca6f43aecc99b15c907e790e40c96e4ed502
+size 1749828
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/full.md b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..208d63c3ae5b62a382beff17a3fc23e32a3e0caa
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/full.md
@@ -0,0 +1,442 @@
+# CBMA: IMPROVING CONFORMAL PREDICTION THROUGH BAYESIAN MODEL AVERAGING
+
+# Pankaj Bhagwat
+
+Department of Mathematical and Statistical Sciences, University of Alberta, AB, Canada pbhagwat@ualberta.ca
+
+# Linglong Kong
+
+Department of Mathematical and Statistical Sciences, University of Alberta, AB, Canada lkong@ualberta.ca
+
+# Bai Jiang
+
+Department of Mathematical and Statistical Sciences, University of Alberta, AB, Canada beil@ualberta.ca
+
+# ABSTRACT
+
+Conformal prediction has emerged as a popular technique for facilitating valid predictive inference across a spectrum of machine learning models, under minimal assumption of exchangeability. Recently, Hoff (2023) showed that full conformal Bayes provides the most efficient prediction sets (smallest by expected volume) among all prediction sets that are valid at the $(1 - \alpha)$ level if the model is correctly specified. However, a critical issue arises when the Bayesian model itself may be mis-specified, resulting in prediction set that might be suboptimal, even though it still enjoys the frequentist coverage guarantee. To address this limitation, we propose an innovative solution that combines Bayesian model averaging (BMA) with conformal prediction. This hybrid not only leverages the strengths of Bayesian conformal prediction but also introduces a layer of robustness through model averaging. Theoretically, we prove that the resulting prediction set will converge to the optimal level of efficiency, if the true model is included among the candidate models. This assurance of optimality, even under potential model uncertainty, provides a significant improvement over existing methods, ensuring more reliable and precise uncertainty quantification.
+
+# 1 INTRODUCTION
+
+Conformal prediction is a distribution-free uncertainty quantification method that generates prediction sets with valid coverage under minimal assumptions of exchangeability (Vovk et al., 2005). By building on existing machine learning techniques, conformal prediction uses available data to establish valid prediction set $C_{\alpha}(X_{n + 1})$ for new instances $X_{n + 1}$ with coverage guarantee $P(Y_{n + 1}\in C_{\alpha}(X_{n + 1}))\geq 1 - \alpha$ . Prediction sets that include the ground truth with high probability are essential for high-stakes applications, such as autonomous vehicles (Bojarski et al., 2016) and clinical settings (Esteva et al., 2017). However, it is also preferable for the prediction sets $C_{\alpha}(X_{n + 1})$ to be efficient i.e. as small as possible, as smaller sets are more informative. Recently, Hoff (2023) investigated the optimal efficiency of full conformal Bayes prediction sets under a correctly specified Bayesian model, showing that they yield prediction sets with the minimum expected volume at a given target coverage level $(1 - \alpha)$ . In addition, Fong & Holmes (2021) introduced scalable methods for generating full conformal Bayes prediction sets applicable to any Bayesian model, highlighting the advantages of conformal Bayesian predictions over traditional Bayesian posterior predictive sets, especially in the presence of model misspecification.
+
+However, constructing or selecting the correct Bayesian model to obtain optimally efficient conformal prediction sets is a challenging task. Although conformal prediction sets provide finite-sample coverage guarantees for any model, they may fail to achieve volume optimality when the underlying
+
+model is misspecified. This challenge underscores a broader limitation of traditional conformal prediction methods, which typically rely on a fixed machine learning model to generate prediction sets with a predetermined marginal coverage level. Given the vast array of possible predictive models for a given problem, and the fact that conformal methods yield valid sets for all of them, identifying the most appropriate model becomes inherently difficult. This issue of model uncertainty has long been a persistent and underexplored problem in the conformal prediction literature.
+
+Our Contributions: In this paper, we provide an innovative solution in the form of Conformal Bayesian model averaging (CBMA) to the challenging issue of constructing efficient conformal prediction sets when there is model uncertainty in the Bayesian framework. Our proposed CBMA prediction method seamlessly combines conformity scores of each Bayesian model in order to construct a single conformal prediction set. This paves the way for incorporating model averaging procedures into conformal prediction framework which is currently lacking in the literature. To the best of our knowledge, our CBMA approach is the first method which combines conformity scores from diverse models to construct valid conformal prediction sets and requires no data splitting (data efficient). Our choice of conformity scores in the form of posterior predictive densities is also optimal and leads to the most efficient prediction set when the underlying Bayesian model is true (Hoff, 2023). Our CBMA method can construct full conformal prediction sets given samples for model parameters of each model from their posterior distributions and posterior model probabilities, which can be obtained as the output of BMA. Theoretically, we also prove the optimal efficiency achieved by conformal prediction sets constructed using CBMA method as the sample size increases. Such guarantee of optimal efficiency even under model uncertainty provides an improvement over existing methods. Finally, our method incorporates both data and model uncertainty into the construction of prediction sets which enhances the reliability of the predictions.
+
+# 2 PRELIMINARIES
+
+We consider a collection of i.i.d. observations $Z_{1:n} = \{(X_i,Y_i)\}_{i=1}^n$ , where each observation $(X_i,Y_i) \in \mathbb{R}^d \times \mathbb{R}$ is a covariate-response pair. We begin by summarizing full conformal prediction framework (Vovk et al., 2005), conformal Bayes (Fong & Holmes, 2021) and Bayesian model averaging (BMA) (Raftery et al., 1997).
+
+# 2.1 FULL CONFORMAL PREDICTION
+
+In the full conformal prediction method, candidate labels $y_{n + 1}$ are included in $C_{\alpha}(X_{n + 1})$ if the resulting pair $(X_{n + 1},y_{n + 1})$ is sufficiently similar to the examples in $Z_{1:n}$ . A conformity score $\sigma_{i}$
+
+$$
+\sigma_ {i} := \sigma (Z _ {1: n + 1}; Z _ {i}),
+$$
+
+takes as input a set of data points $Z_{1:n+1} = Z_{1:n} \cup Z_{n+1}$ where $Z_{n+1} = \{(X_{n+1}, y_{n+1})$ , and computes how similar the data point $Z_i$ is for $i = 1, \ldots, n+1$ . The key property of any conformity score is that it must be exchangeable in the first argument, meaning the conformity core for $Z_i$ remains unchanged under permutation of $Z_{1:n+1}$ . We refer to a conformity score with this property as a valid conformity score. Assuming $Z_{1:n+1}$ is exchangeable, $\sigma_{1:n+1}$ will also be exchangeable, and its rank will be uniformly distributed among $\{1, \ldots, n+1\}$ (assuming continuous $\sigma_{1:n+1}$ ). This implies that the rank of $\sigma_{n+1}$ is a valid p-value. For a given value $Y_{n+1} = y$ (with $X_{n+1}$ known), we can denote the rank of $\sigma_{n+1}$ among $\sigma_{1:n+1}$ as
+
+$$
+r (y) = \frac {1}{n + 1} \sum_ {i = 1} ^ {n + 1} \mathbf {1} (\sigma_ {i} \leq \sigma_ {n + 1}).
+$$
+
+For miscoverage level $\alpha$ , the full conformal predictive set, $C_{\alpha}(X_{n + 1}) = \{y\in \mathcal{V}:\bar{r} (y) > \alpha \}$ , ensures the desired frequentist coverage $\mathbf{P}\left(Y_{n + 1}\in C_{\alpha}(X_{n + 1})\right)\geq 1 - \alpha$ , where $\mathbf{P}$ is over $Z_{1:n + 1}$ . A formal proof can be found in Vovk et al. (2005), Chapter 8.7. For continuous $\sigma_{1:n + 1}$ , Lei et al. (2018), Theorem 1 show that the conformal predictive set does not significantly over-cover.
+
+# 2.2 FULL CONFORMAL BAYES
+
+In the Bayesian prediction, given the model likelihood $p_{\theta}(y|x)$ and prior on parameters, $\pi(\theta)$ for $\theta \in \mathbb{R}^p$ , the Bayesian posterior predictive distribution for the response at new instance
+
+$X_{n + 1} = x_{n + 1}$ conditioned on the observed data $Z_{1:n}$ represents subjective and coherent beliefs. As noted by Draper (1995) and Fraser (2011), Bayesian predictive sets such as Highest posterior density predictive credible sets are poorly calibrated in the frequentist sense. This has consequences for the robustness of such approaches and trust in using Bayesian models to aid decisions. Conformal inference for calibrating Bayesian models was previously suggested in Vovk et al. (2005); Wasserman (2011). In a Bayesian model, it is natural to consider the posterior predictive density as the conformity score:
+
+$$
+\sigma_ {i} = p \left(Y _ {i} \mid X _ {i}, Z _ {1: n + 1}\right) = \int p _ {\theta} \left(y _ {i} \mid x _ {i}\right) \pi \left(\theta \mid Z _ {1: n + 1}\right) d \theta
+$$
+
+This is a valid conformity score, $\sigma_{i}$ is indeed invariant to the permutation of $Z_{1:n + 1}$ due to the form of $\pi (\theta |Z_{1:n + 1})\propto \pi (\theta)\prod_{i = 1}^{n + 1}p_{\theta}(y_i|x_i)$ . This method is referred to as Conformal Bayes in Fong & Holmes (2021).
+
+# 2.3 BMA: BAYESIAN MODEL AVERAGING
+
+In detail discussion on BMA can be found in the seminal work of Hoeting et al. (1999), Wasserman (2000), Raftery et al. (1997). Let $X \in \mathbb{R}^d$ denote the vector consisting of all predictors under consideration and $Y \in \mathbb{R}$ denote the response variable. In the supervised learning tasks, our goal is to construct a predictive model for $Y$ based on $X$ via some model $\mathcal{M}$ . The Bayesian model $\mathcal{M}$ in such scenario can be represented as
+
+$$
+Y | X, \theta , \mathcal {M} \sim p _ {\theta} (y | x); \theta | \mathcal {M} \sim \pi (\theta),
+$$
+
+where $\theta$ denotes the parameters of the model $\mathcal{M}$ , $\pi(\theta)$ denotes the prior on the parameters and $p_{\theta}(y|x)$ denotes the likelihood function under the model $\mathcal{M}$ .
+
+Now suppose, we have several competitive models $\mathcal{M}_k$ with parameters $\theta_k \in \Theta_k$ leading to model space $\mathcal{M} = \{\mathcal{M}_1, \dots, \mathcal{M}_K\}$ . The Bayesian model for each model is described as:
+
+$$
+Y | X, \theta_ {k}, \mathcal {M} _ {k} \sim p _ {\theta_ {k}} (y | x); \quad \theta_ {k} | \mathcal {M} _ {k} \sim \pi_ {k} (\theta_ {k}).
+$$
+
+If $\Delta$ is a quantity of interest, say predicted values at a covariate $x\in \mathbb{R}^d$ , then the expected value of $\Delta$ given the data $Z_{1:n}$ is obtained by first finding the posterior expectation of $\Delta$ under each model, and then weighting each expectation by the posterior probability of the model in the BMA framework:
+
+$$
+\mathbf {E} [ \Delta | Z _ {1: n} ] = \sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k} | Z _ {1: n}) \mathbf {E} [ \Delta | Z _ {1: n}, \mathcal {M} _ {k} ].
+$$
+
+Similarly, the posterior distribution for $\Delta$ can be represented as a mixture distribution over all models,
+
+$$
+p (\Delta | Z _ {1: n}) = \sum_ {k = 1} ^ {K} p \left(\mathcal {M} _ {k} \mid Z _ {1: n}\right) p \left(\Delta \mid Z _ {1: n}, \mathcal {M} _ {k}\right) \tag {1}
+$$
+
+where $p(\Delta |Z_{1:n},\mathcal{M}_k)$ is the posterior distribution of $\Delta$ under model $\mathcal{M}_k$ . In equation 1 the posterior probability of model $\mathcal{M}_k$ is given by
+
+$$
+p(\mathcal{M}_{k}|Z_{1:n}) = \frac{m(Z_{1:n}|\mathcal{M}_{k})p(\mathcal{M}_{k})}{\sum_{k = 1}^{K}m(Z_{1:n}|\mathcal{M}_{k})p(\mathcal{M}_{k})},
+$$
+
+where $p(\mathcal{M}_k)$ is the prior probability that $\mathcal{M}_k$ is the true model and $m(Z_{1:n}|\mathcal{M}_k)$ is the marginal likelihood under model $\mathcal{M}_k$ ,
+
+$$
+{m (Z _ {1: n} | \mathcal {M} _ {k})} {= \int \prod_ {i = 1} ^ {n} p _ {\theta_ {k}} (Y _ {i} | X _ {i}) \pi_ {k} (\theta_ {k}) d \theta_ {k}}
+$$
+
+obtained by integrating over the prior distributions for model specific parameters. Note that all conditional expressions in this section denote condition on $Z_{1:n} = \{(X_i,Y_i)\}_{i=1}^n$ .
+
+# 2.4 PROBLEM SETUP
+
+Our objective is to construct a conformal prediction set $C_{\alpha}(X_{n + 1}) \subseteq \mathbb{R}$ that provides a range of possible responses for a test point $X_{n + 1}$ based on a collection of i.i.d. observations $Z_{1:n} = \{(X_i,Y_i)\}_{i = 1}^n$ . We focus on Bayesian prediction based on the training data $Z_{1:n}$ . Suppose we have $K$ competing models for this data, denoted as $\mathcal{M}_1,\dots ,\mathcal{M}_K$ , forming a model space $\mathcal{M} = \{\mathcal{M}_1,\ldots ,\mathcal{M}_K\}$ . For each model $\mathcal{M}_k$ with $k = 1,2,\ldots ,K$ , the data likelihood is specified as $p_{\theta_k}(y_i\mid x_i)$ , where $\theta_{k}$ represents the parameters of model $\mathcal{M}_k$ . Let $\pi_k(\theta_k)$ denote the prior distribution on the parameters $\theta_{k}$ of model $\mathcal{M}_k$ .
+
+The key question is: with multiple candidate models in $\mathcal{M}$ , how can we combine their predictions to create a single conformal prediction set? Additionally, we aim to construct prediction sets using a transductive conformal approach, rather than relying on data-splitting inductive methods, which are often less efficient in terms of information usage. We propose to average conformity scores from each model to construct combined conformity score. This task presents several challenges including the issue of the same dataset being utilized to train individual models, the conformity scores are not independent. Also, note that, we need to combine conformity scores in a fashion that assigns higher weights to the conformity scores of the true model, if it is included in the model space. Thus, weights used for averaging should be data dependent.
+
+# 2.5 RELATED WORKS
+
+Conformal Bayes has been a topic of research interest for a long time. But some recent advances in terms of optimal efficiency of such prediction sets and scalable methods for the construction of full conformal sets are noteworthy. Hoff (2023) demonstrated that the log predictive densities are the optimal conformity measure to construct conformal prediction sets (minimum expected volume) when the underlying Bayesian model is true. Fong & Holmes (2021) recently provided a scalable Full conformal Bayes algorithm to construct a Bayes conformal set efficiently. They also explored the benefits of conformal Bayes prediction over Bayesian predictive sets when the model is misspecified. But, the conformal prediction set they construct may be inefficient. We address this issue by incorporating model averaging technique of Bayesian model averaging (BMA) into the conformal framework. BMA has been proposed as a natural Bayesian solution to account for model uncertainty (Hoeting et al., 1999; Wasserman, 2000; Raftery et al., 1997). Some recent works proposing model aggregation strategies to combine conformal prediction sets or p-values include Gasparin & Ramdas (2024a), Gasparin & Ramdas (2024b), and Yang & Kuchibhotla (2024). Gasparin & Ramdas (2024b) proposed conformal set aggregation by majority vote strategy, and proved that a merged set suffers a loss in coverage i.e. merged conformal set will have at least $1 - 2\alpha$ marginal coverage if the individual sets have $1 - \alpha$ marginal coverage. Furthermore, size of such merged sets is shown to be no larger than the maximum size among the given sets. However, they do not show if the merged set will achieve optimal efficiency under certain conditions. Yang & Kuchibhotla (2024) provide efficiency first conformal prediction method but this approach suffers from a coverage loss in the aggregation step. Many existing works are available for aggregating inductive conformal predictors which require data splitting (Vovk, 2015; Linusson et al., 2017; Carlsson et al., 2014; Toccaceli & Gammerman, 2019) and are based on combining p-values which may not be well-calibrated. Linusson et al. (2020) proposed the use of out-of-bag ensemble conformal predictors. But, their theoretical validity of coverage is only approximate and evaluated solely based on empirical studies. Few methods attempt to merge conformal scores from various models under the assumption that distinct data are employed to train each model (Gauraha & Spjuth, 2021), thereby constructing conformal sets accordingly. Overall, common limitations of existing methods include all or some of the following: the requirement data splitting or access to hold-out set for calibration, which may not be feasible for small sample sizes, the lack of coverage in the aggregation step, not targeted to achieve efficient prediction sets (instead focus on efficient set aggregation which may not lead to narrower prediction sets), and no theoretical guarantees of coverage and efficiency. To overcome these pitfalls of the existing approaches, we propose CBMA framework which (1) provide theoretical guarantee of efficiency of conformal prediction sets under model uncertainty, (2) allows the use of full data for all model fits and computing conformity scores for each model as well as aggregation weights are data and prior dependent, which are computed using the same data. Thus, there is no efficiency loss by data splitting at any step, and (3) no coverage loss in the aggregation process.
+
+# 3 CBMA: CONFORMAL BAYESIAN MODEL AVERAGING
+
+In this section, we describe our CBMA approach to construct conformal predictive sets. For each model $\mathcal{M}_k$ in the model space $\mathcal{M} = \{\mathcal{M}_1,\dots ,\mathcal{M}_K\}$ , we consider Bayesian prediction using training data $Z_{1:n}$ for an outcome of interest $Y_{i}\in \mathbb{R}$ and covariates $X_{i}\in \mathbb{R}^{d}$ . Given a model likelihood $p_{\theta_k}(y_i|x_i)$ and prior on parameters, $\pi_k(\theta_k)$ for $\theta_{k}\in \Theta_{k}$ , the posterior predictive distribution for the response at a new $X_{n + 1} = x_{n + 1}$ takes on the form
+
+$$
+p _ {\mathcal {M} _ {k}} (y | x _ {n + 1}, Z _ {1: n}) = \int p _ {\theta_ {k}} (y | x _ {n + 1}) \pi_ {k} (\theta_ {k} | Z _ {1: n}) \mathrm {d} \theta_ {k},
+$$
+
+where $\pi_k(\theta_k|Z_{1:n})$ is the Bayesian posterior and $\pi_k(\theta_k|Z_{1:n})\propto \pi_k(\theta_k)\prod_{i = 1}^n p_{\theta_k}(y_i|x_i)$ . We first fit $K$ candidate models using BMA. Following Fong & Holmes (2021), full conformal Bayes prediction sets are constructed using posterior predictive densities as conformity measures:
+
+$$
+\sigma_ {i} ^ {\mathcal {M} _ {k}} = p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i}, Z _ {1: n + 1})
+$$
+
+This is a valid conformity score, $\sigma_{i}^{\mathcal{M}_{k}}$ is indeed invariant to the permutation of $Z_{1:n + 1}$ due to the form of $\pi (\theta |Z_{1:n})$ . For each model $\mathcal{M}_k$ , we employ the Add-One-In importance sampling strategy as described by Fong & Holmes (2021) once we obtain posterior samples $\theta_k^{1:T}\sim \pi_k(\theta_k|Z_{1:n})$ for a large $T$ using MCMC. Specifically, for $Y_{n + 1} = y$ and $\theta_k^{1:T}\sim \pi_k(\theta_k|Z_{1:n})$ , we can compute:
+
+$$
+\hat {\sigma} _ {i} ^ {\mathcal {M} _ {k}} = \hat {p} _ {\mathcal {M} _ {k}} \left(Y _ {i} \mid X _ {i}, Z _ {1: n + 1}\right) = \sum_ {t = 1} ^ {T} \tilde {w} _ {k} ^ {(t)} p _ {\theta_ {k} ^ {(t)}} \left(Y _ {i} \mid X _ {i}\right), \tag {2}
+$$
+
+where weights $\tilde{w}_k^{(t)}$ are of the form
+
+$$
+w _ {k} ^ {(t)} = p _ {\theta_ {k} ^ {(t)}} (y | x _ {n + 1}), \quad \tilde {w} _ {k} ^ {(t)} = \frac {w _ {k} ^ {(t)}}{\sum_ {t = 1} ^ {T} w _ {k} ^ {(t)}}.
+$$
+
+We can also compute posterior model probabilities $p(\mathcal{M}_k|Z_{1:n})$ based on the observations $Z_{1:n}$ so that we don't need to refit the models.
+
+Finally, we aggregate individual model conformity scores $\sigma_{i}^{\mathcal{M}_{k}}$ to construct a weighted combination $\sigma_{i}^{CBMA}$ defined as:
+
+$$
+\sigma_ {i} ^ {C B M A} = \sum_ {k = 1} ^ {K} q _ {k} \left(Z _ {1: n}, Z _ {n + 1}\right) \sigma_ {i} ^ {\mathcal {M} _ {k}}, \tag {3}
+$$
+
+where
+
+$$
+q _ {k} \left(Z _ {1: n}, Z _ {n + 1}\right) = \frac {p \left(\mathcal {M} _ {k} \mid Z _ {1 : n}\right) p _ {\mathcal {M} _ {k}} \left(y \mid x _ {n + 1} , Z _ {1 : n}\right)}{\sum_ {k = 1} ^ {K} p \left(\mathcal {M} _ {k} \mid Z _ {1 : n}\right) p _ {\mathcal {M} _ {k}} \left(y \mid x _ {n + 1} , Z _ {1 : n}\right)}. \tag {4}
+$$
+
+The aggregation weights are proportional to the posterior probabilities of the models and predictive posterior density of new test instance $(y, x_{n+1})$ conditioned on the observed data $Z_{1:n}$ . Note that, we can easily obtain both the terms using posterior samples for parameters based on $Z_{1:n}$ and BMA also provides posterior model probabilities in the output. Now combined score $\sigma_i^{CBMA}$ can be computed as
+
+$$
+\hat {\sigma} _ {i} ^ {C B M A} = \frac {\sum_ {k = 1} ^ {K} \hat {p} \left(\mathcal {M} _ {k} \mid Z _ {1 : n}\right) \left(\frac {1}{T} \sum_ {t = 1} ^ {T} w _ {k} ^ {(t)}\right) \hat {\sigma} _ {i} ^ {\mathcal {M} _ {k}}}{\sum_ {k = 1} ^ {K} \hat {p} \left(\mathcal {M} _ {k} \mid Z _ {1 : n}\right) \frac {1}{T} \sum_ {t = 1} ^ {T} w _ {k} ^ {(t)}}. \tag {5}
+$$
+
+Note that because of the data dependent weights $q(Z_{1:n}, Z_{n+1})$ in the construction of $\sigma_i^{CBMA}$ , it is not clear if it is a valid conformity score in order to construct conformal prediction set. In Lemma 1, we show that $\sigma_i^{CBMA}$ is indeed a conformity measure satisfying the exchangeability criterion. Then, we construct full conformal prediction sets with coverage guarantee. We call this method as Conformal Bayesian model averaging (CBMA). We summarize our method in Algorithm 1.
+
+Algorithm 1 CBMA: Conformal Bayesian Model averaging
+Input: Observed data is $Z_{1:n}$ ; test point $X_{n+1}$ ; Specify miscoverage level $\alpha$ ; for every model $\mathcal{M}_k \in \mathcal{M}$ , Model likelihood $p_{\theta_k}(y|x)$ and prior $\pi_k(\theta_k)$ .
+Output: Return $C_\alpha^{BMA}(X_{n+1})$ , Individual sets $C_\alpha^{M_k}(X_{n+1})$
+(Run the usual BMA)
+for $k \in 1:K$ do
+ Obtain posterior samples $\theta_k^{1:T} \sim \pi_k(\theta_k|Z_{1:n})$ through MCMC
+ Compute $\hat{p}(\mathcal{M}_k|Z_{1:n})$
+end for
+for $y \in Y_{Grid}$ do
+ Compute $\sigma_{1:n}^{M_k}$ and $\sigma_{n+1}^{M_k}$ using (2).
+ Store the rank, $r_k(y)$ , of $\sigma_{n+1}^{M_k}$ among $\sigma_{1:n+1}^{M_k}$ .
+ Compute $\sigma_{1:n}^{CBMA}$ and $\sigma_{n+1}^{CBMA}$ , using (3) and (4).
+ Store the rank, $r_{BMA}(y)$ , of $\sigma_{n+1}^{CBMA}$ among $\sigma_{1:n}^{CBMA}$ .
+end for
+Return: Set $C_\alpha^{CBMA}(X_{n+1}) = \{y \in Y_{Grid}: r_{CBMA}(y) > \alpha\}$ ; Individual Sets $C_\alpha^{M_k}(X_{n+1}) = \{y \in Y_{Grid}: r_k(y) > \alpha\}$
+
+# 4 THEORETICAL PROPERTIES
+
+In the Lemma 1, we show that aggregated score $\sigma_{i}^{CBMA}$ in (7) is indeed a valid conformity score. Our proof of Lemma 1 relies on an alternative representation for $\sigma_{i}^{CBMA}$ which can be interpreted as the posterior predictive density under the hierarchical Bayesian model:
+
+$$
+Y | X, \theta_ {k}, \mathcal {M} _ {k} \sim p _ {\theta_ {k}} (y | x) \quad \theta_ {k} | \mathcal {M} _ {k} \sim \pi_ {k} (\theta_ {k}); \quad \mathcal {M} _ {k} \sim p (\mathcal {M} _ {k}). \tag {6}
+$$
+
+Lemma 1 The aggregated score $\sigma_{i}^{CBMA}$ can be rewritten as
+
+$$
+\sigma_ {i} ^ {C B M A} = \sum_ {k = 1} ^ {K} p \left(\mathcal {M} _ {k} \mid Z _ {1: n + 1}\right) p _ {\mathcal {M} _ {k}} \left(Y _ {i} \mid X _ {i}, Z _ {1: n + 1}\right) = \sum_ {k = 1} ^ {K} p \left(\mathcal {M} _ {k} \mid Z _ {1: n + 1}\right) \sigma_ {i} ^ {\mathcal {M} _ {k}}. \tag {7}
+$$
+
+This is the posterior predictive density under the hierarchical model (6) and hence, is a valid conformity measure. Here $p(\mathcal{M}_k|Z_{1:n + 1})$ is the posterior model probability of $\mathcal{M}_k$ conditional on $Z_{1:n + 1}$ .
+
+Proof: We provide the details of obtaining alternative representation in (7) for aggregated scores given in (3) in Appendix A.1. Hierarchical model (6) is fully Bayesian with two kinds of parameters: the parameters $\theta_{k}$ of each of the model $\mathcal{M}_k$ and the models $\mathcal{M}_k$ 's themselves. Thus, we note that for i.i.d. observations $Z_{1:n+1} = \{(Y_i, X_i)\}_{i=1}^{n+1}$ from the hierarchical model (6) are exchangeable. Also, the conformity measure considered is the posterior predictive density function, which is invariant to the permutation of $Z_{1:n+1}$ . This follows by observing that the likelihood under each model is $\prod_{i=1}^{n+1} p_{\theta_k}(Y_i | X_i)$ is invariant under the permutations of $Z_{1:n+1}$ . Thus, this is a valid conformity measure.
+
+Once we have established $\sigma_{i}^{CBMA}$ as a valid conformity measure, we can define the conformal prediction set as
+
+$$
+r _ {C B M A} (y) = \frac {\sum_ {i = 1} ^ {n + 1} \mathbf {1} \left(\sigma_ {i} ^ {C B M A} \leq \sigma_ {n + 1} ^ {C B M A}\right)}{n + 1}, \quad C _ {\alpha} ^ {C B M A} \left(X _ {n + 1}\right) = \left\{y \in \mathcal {Y}: r _ {C B M A} (y) > \alpha \right\}. \tag {8}
+$$
+
+Theorem 1 Assume that $Z_{1:n+1} = \{(Y_i, X_i)\}_{i=1}^{n+1}$ are exchangeable, and the conformity measure $\sigma_i^{CBMA}$ as in (7) is invariant to the permutation of $Z_{1:n+1}$ . We then have
+
+$$
+\mathbf {P} \left(Y _ {n + 1} \in C _ {\alpha} ^ {C B M A} (X _ {n + 1})\right) \geq 1 - \alpha ,
+$$
+
+where, $C_{\alpha}(X_{n+1})$ is defined in (8) and $\mathbf{P}$ is over $Z_{1:n+1}$ . Moreover, if the conformity measures $\{\sigma_i^{CBMA}\}_{i=1}^n$ are almost surely distinct, then we have
+
+$$
+\mathbf {P} \left(Y _ {n + 1} \in C _ {\alpha} ^ {C B M A} \left(X _ {n + 1}\right)\right) \leq 1 - \alpha + \frac {1}{n + 1}.
+$$
+
+Our next result demonstrates the convergence of CBMA prediction sets to the conformal prediction sets based on the true model as the sample size increases, if the true model is included in the model space $\mathcal{M}$ . The intuition behind this result is grounded in the established observation that BMA approaches the true model as the sample size $n$ becomes large, provided the true model is within the considered model space (Le & Clarke, 2022). This convergence ensures that the CBMA prediction sets become increasingly accurate and reliable, mirroring the properties of conformal prediction sets derived from the true model. The detailed proof of this result is provided in the Appendix A.2.
+
+Theorem 2 Suppose true model $\mathcal{M}_{\text{true}}$ is in the model space $\mathcal{M} = \{\mathcal{M}_i\}_{i=1}^k$ . Under the hypothesis of Theorem 3 in Le & Clarke (2022), as $n \to \infty$ , under $\mathcal{M}_{\text{true}}$ , we have $q_k(Z_{1:n}, Z_{n+1}) \to 1$ in probability when $\mathcal{M}_k = \mathcal{M}_{\text{true}}$ and $q_k(Z_{1:n}, Z_{n+1}) \to 0$ in probability when $\mathcal{M}_k \neq \mathcal{M}_{\text{true}}$ . Thus, for any $i$ , the conformity score $\sigma_i^{CBMA}$ converges in probability to conformity score $\sigma_i^{M_{\text{true}}}$ under true model. Furthermore, let $V_{CBMA}(X_{new}, Z_{1:n})$ denote the volume of the CBMA prediction set and $V_{true}(X_{new}, Z_{1:n})$ denote the volume of the optimal conformal prediction set under the true model $\mathcal{M}_{\text{true}}$ . Then, $\lim_{n \to \infty} |\mathbb{E}V_{CBMA}(X_{new}, Z_{1:n}) - \mathbb{E}V_{true}(X_{new}, Z_{1:n})| = 0$ .
+
+Remark 1 Theorem 2 implies that, as the sample size $n$ becomes large, our CBMA prediction set will be similar to conformal Bayes prediction set based on true model. Thus, the expected volume of the CBMA prediction set converges to the expected volume of the conformal Bayes prediction set based on the true model. It is important to note that the expected volume of the conformal prediction set under the true model is optimal in terms of minimum expected volume (Hoff, 2023). Therefore, as $n$ grows, our CBMA prediction set becomes as efficient as the optimal conformal prediction set derived from the true model. This convergence ensures that the CBMA prediction set not only aligns with the true model but also maintains efficiency, making it a powerful tool for practical applications where model uncertainty is present.
+
+Remark 2 In the case of small sample sizes, inferring the true model for the data generation process is challenging and often impossible. In such scenarios, our method can enhance the performance of predictions by leveraging the improved predictive power of BMA. Note that BMA has been shown to outperform individual models in terms of log scores (Raftery et al., 1997).
+
+Remark 3 When the true model is not in the model space, we note that $q_{k}(Z_{1:n}, Z_{n+1}) \to 1$ in probability as $n \to \infty$ for $\mathcal{M}_{k^*}$ such that $D_{KL}(p_{\mathcal{M}_{true}}||p_{\mathcal{M}_{k^*}}) = \inf_{k=1,\dots,K} D_{KL}(p_{\mathcal{M}_{true}}||p_{\mathcal{M}_k})$ , where $D_{KL}(\cdot|\cdot)$ denotes the Kullback-Leibler (KL) divergence. This follows from general posterior concentration results (White, 1982; Berk, 1966; Ramamoorthi et al., 2015). Thus, if model space is large enough to contain a model in the KL divergence neighborhood of the true model, our CBMA approach will construct near-optimal conformal prediction sets.
+
+# 5 SIMULATION STUDY
+
+We evaluate the performance of our conformal Bayesian model averaging prediction method in two experimental settings: $(i)$ when true model is a part of the model space, and $(ii)$ when true model is not included in the model space. In the former case, our numerical results show that the performance of our methodology is similar to that of conformal Bayes and Bayes predictive sets based on true model. This is in accordance with the results obtained by Fong & Holmes (2021) and Hoff (2023) but our method also incorporates model uncertainty adding an extra layer of robustness to the predictive inference and elevate reliability. In the second scenario, we note that our methodology leads to construction of valid prediction sets with smaller average size as compared to conformal Bayes prediction sets and Bayesian sets for individual models. This demonstrates the advantage offered by our proposed method over conformal Bayes by Fong & Holmes (2021). The details of our simulation experiments are given in the Appendix A. All codes and results are provided in the supplementary material.
+
+# 5.1 QUADRATIC MODEL
+
+We draw independent and identically distributed (i.i.d.) samples $x_{i} \sim \text{Unif}(0,1)$ , for $i = 1, \ldots, n$ . The response $y$ is then generated through following model:
+
+$$
+y _ {i} = \beta_ {0} + \beta_ {1} x _ {i} + \beta_ {2} x _ {i} ^ {2} + \epsilon_ {i};
+$$
+
+$$
+\beta_ {0} \sim \mathcal {N} (0, 0. 2 5), \beta_ {1} \sim \mathcal {N} (1, 0. 2 5), \beta_ {2} \sim \mathcal {N} (0. 5, 0. 2 5), \epsilon \sim \mathcal {N} (0, 0. 2).
+$$
+
+We consider three models: Model 1 $(\mathcal{M}_1)$ represents the true model, Model 2 $(\mathcal{M}_2:y_i = \beta_0 + \beta_1x_i + \epsilon_i)$ is a linear model derived by omitting the quadratic term from Model 1, and Model 3 $(\mathcal{M}_3:y_i = \beta_0 + \beta_2x_i^2 +\epsilon_i)$ includes only an intercept and a quadratic term. In this experiment, we set the miscoverage level $\alpha = 0.20$ . We use $40\%$ of the total sample size $n$ as the test set with the remaining $60\%$ forming the training set. The summary of the results of the different prediction sets is given in Table 1 (for sample sizes $n = 100$ and $n = 200$ ), provided in A.4.1.
+
+We observe that, all conformal prediction sets (which are intervals here) achieve the target coverage in all cases. Also, as observed by Fong & Holmes (2021), conformal Bayes prediction sets have shorter lengths as compared to their corresponding Bayesian prediction sets, for both true and misspecified models. Our proposed CBMA method provides prediction sets which have similar average lengths as that of conformal Bayes based on true model. Note that CBMA also incorporates model uncertainty as opposed to conformal Bayes, hence, leads to reliable predictive inference and provides more precise uncertainty quantification. Furthermore, as shown in Figure 1, CBMA achieves optimal mean length, equal to CB under model $\mathcal{M}_1$ , even at smaller sample sizes $n = 100, 200$ , demonstrating practical utility of our CBMA approach.
+
+
+Figure 1: Quadratic model: Comparison of CBMA and CBM1 for different sample sizes.
+
+# 5.2 APPROXIMATION USING HERMITE POLYNOMIALS
+
+In this section, we consider a data generating mechanisms similar to Lu & Su (2015). Let $X_{i} \sim \mathrm{Weibull}(1,1)$ are i.i.d. The data is generated from the following model
+
+$$
+Y _ {i} = \theta \frac {\exp \left\{X _ {i} \right\}}{1 + \exp \left\{X _ {i} \right\}} + \epsilon_ {i}.
+$$
+
+Here, we consider $\epsilon_{i} = (0.01 + X_{i})\zeta_{i}$ and $\zeta_i\sim \mathcal{N}(0,1)$ . This is a scenario of heteroskedasticity. In this study, we employ Hermite polynomials to approximate the unknown function $\theta \frac{\exp\{X_i\}}{1 + \exp\{X_i\}}$ . We build a model space consisting of $K$ models with the covariates $X_{ij},j = 1,2,\ldots$
+
+$$
+X _ {i j} = (X _ {i} - \bar {X}) ^ {j - 1} \exp \left\{- \frac {(X _ {i} - \bar {X}) ^ {2}}{2 s _ {X} ^ {2}} \right\}, j = 1, 2, \ldots ,
+$$
+
+where $\bar{X}$ and $s_X^2$ represent the sample mean and standard deviation of the set $X_{i}$ , respectively. In our simulation experiment, we set $1 - \alpha = 0.8$ . We use $40\%$ of the total sample size as the test set, with the remaining $60\%$ forming the training set ( $n_{train} = 0.60 \times n$ ). The number of models considered is $K = 11$ . We consider nested model sequence, i.e. for $k = 1, \ldots, K$ , model $\mathcal{M}_k$ includes covariates $X_{i1}, \ldots, X_{ik}$ . We summarize our results based on $E = 50$ experiments for samples size $n = 100$ in Figure 2 and Figure 5 (in A.4.2). The results for other studies for $n = 100, \theta = 10$ and $n = 50, \theta = 1$ are reported in Table 5 and Table 6 in Appendix A.4.2. We note that our CBMA method provides sets (here, prediction sets are in the form of intervals) for which average length is smaller than all other prediction sets. Also, note that, most of Bayes prediction sets overcover and hence have larger sizes. Conformal Bayes as well as our CBMA prediction sets have valid target coverage. But, on average, CBMA prediction sets have shorter length than CB prediction sets. These results demonstrate the empirical efficiency of CBMA prediction sets over CB prediction sets.
+
+
+Figure 2: Approximation using Hermite polynomials: Comparison of mean length for prediction sets obtained with different methods: CBMA (proposed method), BMA, individual Bayes prediction sets (in red), and individual conformal Bayes (CB) prediction sets (in blue). Here, we report results based on $E = 50$ number of experiments. We have set the target coverage as $(1 - \alpha) = 0.80$ , sample size $n = 100$ and $\theta = 1$ .
+
+# 5.3 REAL DATA EXAMPLE: CALIFORNIA HOUSING DATA
+
+We demonstrate our method using the California Housing dataset. The dataset is available in sklearn, and consists of $n = 20640$ subjects, where the continuous response variable denotes the median house value for California districts, expressed in hundreds of thousands of dollars (100,000), and $d = 8$ covariates, including median income and median house age in block group, average number of rooms per household, block group population. This dataset was derived from the 1990 U.S. census. We first draw random samples of sizes $n = 50, 100$ or 150 from this dataset for our study. We then standardize all covariates and the response to have mean 0 and standard deviation 1. We consider four different models for these experiments by considering only two covariates in the model. Thus, the models we consider are
+
+$$
+\mathcal {M} _ {k}: y = \beta_ {0} + \beta_ {1} X _ {k} + \beta_ {1} X _ {k + 1} + \epsilon , k = 1, 2, 3, 4.
+$$
+
+The priors we consider on the parameters are $\beta_{i} \sim N(0,5)$ , $\epsilon \sim N_{+}(0,1)$ , half-normal distribution. Among all four models, $\mathcal{M}_1$ seems more appropriate as it contains important covariates median income and median house age in block group, as opposed to other covariates. We fit these four models to obtain MCMC samples from the posterior distribution and compute marginal likelihoods for each model. To check coverage, we repeatedly divide our dataset into a training and test dataset for 50 repeats, with $40\%$ of the dataset in the test split. We adopt the setup for simulations similar to Fong & Holmes (2021) in their section 4.1, so that we can compare the performance of our
+
+CBMA method with individual conformal Bayes. We set the miscoverage level at $\alpha = 0.2$ . To illustrate the time complexity, we note that, for $n = 150$ , the average times for constructing conformal Bayes prediction sets were $0.806(0.004)$ , $0.793(0.002)$ , $0.786(0.002)$ and $0.794(0.003)$ for four models, Bayes credible sets took average times of $0.447(0.003)$ , $0.444(0.002)$ , $0.441(0.002)$ and $0.449(0.004)$ . Further, to construct Bayes credible sets using BMA, average additional time was $0.091(0.005)$ and our CBMA method, additional average time was $0.128(0.007)$ . We report average lengths and coverages of various prediction sets (prediction intervals in this case) in Figure 3 and 6. We note that, as suggested earlier, model $\mathcal{M}_1$ fits data well as compared to other three models, we expect to have conformal Bayes prediction sets based on this model will be the shortest among all four models. As indicated by our Theorem 2 and Remark 3, our CBMA intervals achieve the shortest lengths as the sample size becomes sufficiently large enough. In our results, we can see CBMA achieves shortest lengths even at finite sample size of $n = 150$ . All conformal Bayes approaches as well as CBMA achieves, on average, the target coverage of $1 - \alpha = 0.80$ . On the other hand, Bayes models over cover in almost all cases.
+
+
+Figure 3: California Housing data: comparison of mean lengths of intervals using Bayes prediction, conformal Bayes (CB) for all four models, CBMA and BMA for different sample sizes.
+
+
+
+
+
+# 6 CONCLUSIONS
+
+In this work, we identified a challenging issue with the traditional conformal prediction framework: selecting a model in advance in order to construct conformal prediction sets may result in suboptimal prediction sets. In addressing this issue of model uncertainty within the conformal prediction framework, we offer a natural Bayesian solution by integrating Bayesian model averaging in conformal prediction framework. Our proposed CBMA framework seamlessly amalgamates conformity scores from individual Bayesian models to construct a unified conformal prediction set, thus introducing the incorporation of model averaging procedures—a notable advancement currently overlooked from current literature on conformal prediction theory. Additionally, we present an efficient algorithm for constructing CBMA prediction sets, which essentially represent full conformal predictions. Theoretically, we establish the optimal efficiency of our CBMA prediction sets as sample sizes increase, underpinning the efficacy of our approach. Overall, our method holds particular value in real-world scenarios where model uncertainty is a prevalent concern, providing a robust solution within the conformal prediction framework.
+
+However, our approach does have limitations due to the inherent characteristics of MCMC algorithms. The error in these sampling methods can affect prediction sets constructed using CBMA. As noted in Fong & Holmes (2021), we can also expect some robustness to conformal sets as they are based on ranks and not actual values. Furthermore, since we are averaging over multiple models, we expect that the errors in one of the models' training can be masked on averaging.
+
+# ACKNOWLEDGMENTS
+
+Bei Jiang and Linglong Kong were partially supported by grants from the Canada CIFAR AI Chairs program, the Alberta Machine Intelligence Institute (AMII), and Natural Sciences and Engineering Council of Canada (NSERC), and Linglong Kong was also partially supported by grants from the
+
+Canada Research Chair program from NSERC. The authors would also like to thank the anonymous reviewers for their constructive comments that improved the quality of this article.
+
+# REFERENCES
+
+Robert H Berk. Limiting behavior of posterior distributions when the model is incorrect. The Annals of Mathematical Statistics, 37(1):51-58, 1966.
+Mariusz Bojarski, Davide Del Testa, Daniel Dworakowski, Bernhard Firner, Beat Flepp, Prasoon Goyal, Lawrence D Jackel, Mathew Monfort, Urs Muller, Jiakai Zhang, et al. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316, 2016.
+Lars Carlsson, Martin Eklund, and Ulf Norinder. Aggregated conformal prediction. In Artificial Intelligence Applications and Innovations: AIAI 2014 Workshops: CoPA, MHDW, IIVC, and MT4BD, Rhodes, Greece, September 19-21, 2014. Proceedings 10, pp. 231-240. Springer, 2014.
+David Draper. Assessment and propagation of model uncertainty. Journal of the Royal Statistical Society Series B: Statistical Methodology, 57(1):45-70, 1995.
+Andre Esteva, Brett Kuprel, Roberto A Novoa, Justin Ko, Susan M Swetter, Helen M Blau, and Sebastian Thrun. Dermatologist-level classification of skin cancer with deep neural networks. nature, 542(7639):115-118, 2017.
+Edwin Fong and Chris C Holmes. Conformal bayesian computation. Advances in Neural Information Processing Systems, 34:18268-18279, 2021.
+D. A. S. Fraser. Is bayes posterior just quick and dirty confidence? Statistical Science, 26(3):299 - 316, 2011. doi: 10.1214/11-STS352.
+Matteo Gasparin and Aaditya Ramdas. Conformal online model aggregation. arXiv preprint arXiv:2403.15527, 2024a.
+Matteo Gasparin and Aaditya Ramdas. Merging uncertainty sets via majority vote. arXiv preprint arXiv:2401.09379, 2024b.
+Niharika Gauraha and Ola Spjuth. Synergy conformal prediction. In Conformal and Probabilistic Prediction and Applications, pp. 91-110. PMLR, 2021.
+Jennifer A Hoeting, David Madigan, Adrian E Raftery, and Chris T Volinsky. Bayesian model averaging: a tutorial. Statistical science, 14(4):382-417, 1999.
+Peter Hoff. Bayes-optimal prediction with frequentist coverage control. Bernoulli, 29(2):901-928, 2023.
+Tri M Le and Bertrand S Clarke. Model averaging is asymptotically better than model selection for prediction. Journal of Machine Learning Research, 23(33):1-53, 2022.
+Jing Lei, Max G'Sell, Alessandro Rinaldo, Ryan J Tibshirani, and Larry Wasserman. Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113 (523):1094-1111, 2018.
+H. Linusson, U. Johansson, and H. Boström. Efficient conformal predictor ensembles. Neurocomputing, 397:266-278, 2020. ISSN 0925-2312. doi: https://doi.org/10.1016/j.neucom.2019.07.113. URL https://www.sciencedirect.com/science/article/pii/S0925231219316108.
+Henrik Linusson, Ulf Norinder, Henrik Bostrom, Ulf Johansson, and Tuve Lofstrom. On the calibration of aggregated conformal predictors. In Proceedings of the Sixth Workshop on Conformal and Probabilistic Prediction and Applications, volume 60 of Proceedings of Machine Learning Research, pp. 154-173. PMLR, 13-16 Jun 2017.
+Xun Lu and Liangjun Su. Jackknife model averaging for quantile regressions. Journal of Econometrics, 188(1):40-58, 2015.
+
+Adrian E Raftery, David Madigan, and Jennifer A Hoeting. Bayesian model averaging for linear regression models. Journal of the American Statistical Association, 92(437):179-191, 1997.
+RV Ramamoorthi, Karthik Sriram, and Ryan Martin. On posterior concentration in misspecified models. Bayesian Analysis, 10(4):759-789, 2015.
+Paolo Toccaceli and Alexander Gammerman. Combination of inductive mondrian conformal predictors. Machine Learning, 108:489-510, 2019.
+Vladimir Vovk. Cross-conformal predictors. Annals of Mathematics and Artificial Intelligence, 74: 9-28, 2015.
+Vladimir Vovk, Alexander Gammerman, and Glenn Shafer. Algorithmic learning in a random world, volume 29. Springer, 2005.
+Larry Wasserman. Bayesian model selection and model averaging. Journal of mathematical psychology, 44(1):92-107, 2000.
+Larry Wasserman. Frasian inference. Statistical Science, 26(3):322-325, 2011. ISSN 08834237.
+Halbert White. Maximum likelihood estimation of misspecified models. *Econometrica: Journal of the econometric society*, pp. 1-25, 1982.
+Yachong Yang and Arun Kumar Kuchibhotla. Selection and aggregation of conformal prediction sets. Journal of the American Statistical Association, pp. 1-13, 2024. doi: 10.1080/01621459.2024.2344700.
+
+# A APPENDIX
+
+# A.1 PROOF OF LEMMA 1:
+
+(Representation for the conformity measure $\sigma_{i}^{CBMA}$ in (7)) Under hierarchical Bayesian model in (6), the posterior predictive density for new text point $(y, x_{n+1})$ can be obtained as follows:
+
+$$
+\begin{array}{l} p (Y _ {i} | X _ {i}, Z _ {1: n + 1}) = \sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k} | Z _ {1: n + 1}) p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i}, Z _ {1: n + 1}) \\ = \sum_ {k = 1} ^ {K} \frac {m (Z _ {1 : n + 1} | \mathcal {M} _ {k}) p (\mathcal {M} _ {k})}{\sum_ {k ^ {\prime} = 1} ^ {K} m (Z _ {1 : n + 1} | \mathcal {M} _ {k ^ {\prime}}) p (\mathcal {M} _ {k ^ {\prime}})} p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i}, Z _ {1: n + 1}) \\ = \frac {\sum_ {k = 1} ^ {K} m \left(Z _ {1 : n + 1} \mid \mathcal {M} _ {k}\right) p \left(\mathcal {M} _ {k}\right) p _ {\mathcal {M} _ {k}} \left(Y _ {i} \mid X _ {i} , Z _ {1 : n + 1}\right)}{\sum_ {k = 1} ^ {K} m \left(Z _ {1 : n + 1} \mid \mathcal {M} _ {k}\right) p \left(\mathcal {M} _ {k}\right)} \\ = \frac {\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k}) \frac {m (Z _ {1 : n} | \mathcal {M} _ {k})}{m (Z _ {1 : n} | \mathcal {M} _ {k})} m (Z _ {1 : n + 1} | \mathcal {M} _ {k}) p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i} , Z _ {1 : n + 1})}{\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k}) \frac {m (Z _ {1 : n} | \mathcal {M} _ {k})}{m (Z _ {1 : n} | \mathcal {M} _ {k})} m (Z _ {1 : n + 1} | \mathcal {M} _ {k})} \\ = \frac {\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k}) p _ {\mathcal {M} _ {k}} (y | x _ {n + 1} , Z _ {1 : n}) m (Z _ {1 : n} | \mathcal {M} _ {k}) p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i} , Z _ {1 : n + 1})}{\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k}) p _ {\mathcal {M} _ {k}} (y | x _ {n + 1} , Z _ {1 : n}) m (Z _ {1 : n} | \mathcal {M} _ {k})} \\ = \frac {\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k} | Z _ {1 : n}) p _ {\mathcal {M} _ {k}} (y | x _ {n + 1} , Z _ {1 : n}) p _ {\mathcal {M} _ {k}} (Y _ {i} | X _ {i} , Z _ {1 : n + 1})}{\sum_ {k = 1} ^ {K} p (\mathcal {M} _ {k} | Z _ {1 : n}) p _ {\mathcal {M} _ {k}} (y | x _ {n + 1} , Z _ {1 : n})}. \\ \end{array}
+$$
+
+# A.2 PROOF OF THEOREM 2:
+
+Theorem 3 in Le & Clarke (2022) establishes conditions under which the posterior model probabilities converge to their true values. Below, we summarize key assumptions necessary for proving the theorem, which are also detailed in Le & Clarke (2022).
+
+1. For each $k = 1,\dots ,K$ , let $\theta_{k}\in \Theta_{k}$ , an open subset of $\mathbb{R}^{d_k}$
+2. The densities $p_{\theta_k}(y_i|x_i)$ are measurable in $y$ for all $\theta_k$ , $x$ and continuous in $\theta_k$ . All second partial derivatives of $p_{\theta_k}(y_i|x_i)$ w.r.t. $\theta_k$ exist and are continuous for all $x, y$ , and maybe passed under the integral sign in $\int p_{\theta_k}(y_i|x_i) dy$ .
+3. There exists a function $K(\cdot)$ such that $E_{\theta_k}K(Y) < \infty$ and each element of the matrix $\left(\frac{\partial^2}{\partial\theta_{k,l}\partial\theta_{k,j}}\log p_{\theta_k}(y_i|x_i)\right)_{l,j = 1,\ldots ,d_j}$ is absolute value by $K(y)$ uniformly for $\theta_{k}$ in an open neighbourhood of $\theta_{k,0}$ .
+4. Assume that, for any $x_{i}$ ,
+
+$$
+I _ {i} (\theta_ {k, 0} | x _ {i}) = \left(- E _ {\theta_ {k, 0}} \frac {\partial^ {2}}{\partial \theta_ {k , l} \partial \theta_ {k , j}} \log p _ {\theta_ {k}} (y _ {i} | x _ {i})\right) _ {l, j = 1, \dots , d _ {k}}
+$$
+
+is continuous on an open set around the true value $\theta_{k,0}$ and is positive definite at $\theta_{k,0}$ .
+
+5. For any $\theta_{k,0} \in \Theta_k$ and any $x_i$ , $p_{\theta_k}(y_i|x_i) = p_{\theta_{k,0}}(y_i|x_i)$ a.e. in $y$ implies $\theta_k = \theta_{k,0}$ .
+
+6. The average $(1/n)\sum I_i(\theta_{k,0}|x_i)$ is invertible for any $n$ and the $d_k$ -vector $\Psi(\theta_{k,0}|x,y) = \left(\nabla_{\theta_k}\log p_{\theta_{k,0}}(y_i|x_i)\right)^T$ satisfies
+
+$$
+\sum E \| \frac {1}{n} \left(\sum I _ {i} \left(\theta_ {k, 0} | x _ {i}\right)\right) ^ {- 1 / 2} \Psi \left(\theta_ {k, 0} | x, Y\right) \| ^ {3} = o \left(\frac {1}{n ^ {3 / 2}}\right).
+$$
+
+7. Priors $\pi_k(\theta_k)$ are continuous for $\theta_{k}\in \Theta_{k}$
+
+Under these conditions, the posterior model probabilities satisfy
+
+$$
+p \left(\mathcal {M} _ {k} \mid Z _ {1: n + 1}\right)\rightarrow 1 \text {o r} 0 \text {i n p r o b a b i l i t y a s} n \rightarrow \infty ,
+$$
+
+when $\mathcal{M}_k$ corresponds to the true model $\mathcal{M}_{\mathrm{true}}$ or an incorrect model, respectively. This result directly implies
+
+$$
+\sigma_ {i} ^ {C B M A} \rightarrow \sigma_ {i} ^ {\mathcal {M} _ {\text {t r u e}}}, \quad \text {i n p r o b a b i l i t y , a s} n \rightarrow \infty .
+$$
+
+Consequently, the conformal Bayesian model averaging (CBMA) prediction set indicator satisfies
+
+$$
+\mathbf {1} (y \in C _ {\alpha} ^ {C B M A} (X _ {n + 1})) \rightarrow \mathbf {1} (y \in C _ {\alpha} ^ {\mathcal {M} _ {\text {t r u e}}} (X _ {n + 1})) \text {i n p r o b a b i l i t y a s} n \rightarrow \infty .
+$$
+
+Thus, the CBMA algorithm (Algorithm 1) produces prediction sets that asymptotically converge to the conformal Bayes prediction set $C_{\alpha}^{\mathcal{M}\mathrm{true}}(X_{n + 1})$ based on the true model $\mathcal{M}_{\mathrm{true}}$ .
+
+# A.3 EXPERIMENTS
+
+# A.4 COMPLEXITY OF CONSTRUCTING CBMA INTERVALS
+
+Given the posterior samples and posterior model probabilities, obtaining individual models' conformity scores has a complexity of $\mathcal{O}(n_{\mathrm{grid}} \times \mathrm{posterior~samples} \times n_{\mathrm{train}})$ (Fong & Holmes, 2021). The aggregation step (requires dot product of $K$ weights and $K$ conformity scores) has a linear overhead of $\mathcal{O}(K)$ , where $K$ is the number of models.
+
+# A.4.1 QUADRATIC MODEL
+
+We now examine the experimental results for the quadratic model, as discussed in Section 5. Figure 4 presents the posterior model probabilities (PMP) for all three models under consideration across $E = 50$ repetitions with a sample size of $n = 100$ . The results indicate that Model 1 frequently attains the highest posterior model probability. However, Model 2 also exhibits a substantial number of instances where it achieves a higher PMP. This variability suggests that pre-selecting either Model 1 or Model 2 for constructing conformal prediction sets may lead to suboptimal uncertainty quantification. In contrast, our CBMA method leverages predictions from multiple models, ensuring a more comprehensive integration of model uncertainty. This leads to more efficient and reliable uncertainty quantification. Additionally, Table 2 presents descriptive statistics from these repeated experiments. Notably, CBMA prediction set lengths exhibit a symmetric distribution, whereas CB.M1 prediction sets display a negatively skewed length distribution. This suggests that CBMA results in smaller prediction sets in many instances compared to CB.M1, enhancing efficiency without compromising coverage.
+
+# EXECUTION TIMES:
+
+Given the posterior samples obtained from MCMC, we evaluate the computational efficiency of constructing Conformal Bayes (CB) prediction sets and Bayes prediction sets. Table 3 reports the mean execution times (with standard errors in parentheses) for constructing these intervals across different models and sample sizes. Additionally, Table 4 presents the execution times for CBMA and BMA methods. Notably, CBMA incurs higher computational costs compared to BMA, reflecting the additional complexity introduced by model averaging in the conformal framework. However, these times remain negligible relative to the broader MCMC sampling process, making CBMA a computationally feasible approach for uncertainty quantification.
+
+
+Figure 4: Posterior model probabilities (PMP) for all three models considered in our experiment with quadratic model with sample size $n = 100$ .
+
+Table 1: Quadratic model: Comparison of coverage and length for prediction sets obtained with different methods: CBMA (proposed method), BMA, individual Bayes prediction sets BayesM1, BayesM2, BayesM3, individual conformal Bayes prediction sets CBM1, CBM2, CBM3. Here, we report mean and standard error (SE) based on $E = 50$ number of experiments. We have set the target coverage as $(1 - \alpha) = 0.80$ .
+
+
Method
CBMA
BMA
BayesM1
BayesM2
BayesM3
CBM1
CBM2
CBM3
Coverage
n = 100
Mean
0.800
0.811
0.813
0.803
0.804
0.801
0.799
0.804
SE
0.010
0.010
0.010
0.010
0.009
0.010
0.011
0.010
n = 200
Mean
0.807
0.811
0.813
0.813
0.805
0.812
0.815
0.805
SE
0.007
0.007
0.007
0.007
0.007
0.007
0.007
0.008
Length
n = 100
Mean
0.535
0.537
0.537
0.545
0.579
0.534
0.547
0.577
SE
0.008
0.007
0.007
0.007
0.009
0.008
0.009
0.010
n = 200
Mean
0.522
0.522
0.522
0.532
0.558
0.524
0.536
0.559
SE
0.006
0.004
0.004
0.005
0.006
0.006
0.007
0.007
+
+# A.4.2 APPROXIMATION USING HERMITE POLYNOMIALS
+
+The results of studies for $n = 100$ , 50, $\theta = 10$ and $n = 50$ , $\theta = 1$ are reported in Table 5 and Table 6. We note that CBMA sets have shorter lengths on average in all these experiments.
+
+Table 2: Descriptive statistics for average lengths of prediction sets obtained with different methods: CBMA, BMA, individual Bayes prediction sets Bayes M1, Bayes M2, Bayes M3, individual conformal Bayes prediction sets CB M1, CB M2, CB M3. Here, we report Median, Mean, Standard error (SE), Lower and upper quartiles $(Q_{1}$ and $Q_{3})$ , Inter-Quantile range (IQR) based on $T = 50$ number of experiments. We have set $\alpha = 0.1$ .
+
+
Prediction
CBMA
BMA
Bayes M1
Bayes M2
Bayes M3
CB M1
CB M2
CB M3
n = 100
Median
0.684
0.697
0.695
0.715
0.739
0.702
0.688
0.736
Q1
0.64
0.651
0.652
0.666
0.706
0.643
0.64
0.666
Q3
0.736
0.738
0.74
0.756
0.788
0.735
0.755
0.782
IQR
0.096
0.087
0.088
0.09
0.082
0.092
0.115
0.116
Mean
0.686
0.697
0.696
0.709
0.745
0.687
0.696
0.732
SE
0.01
0.008
0.008
0.009
0.008
0.009
0.01
0.011
n = 200
Median
0.676
0.676
0.675
0.69
0.706
0.671
0.681
0.709
Q1
0.643
0.644
0.647
0.664
0.683
0.64
0.646
0.681
Q3
0.711
0.699
0.699
0.711
0.745
0.711
0.71
0.74
IQR
0.068
0.055
0.052
0.047
0.062
0.071
0.064
0.059
Mean
0.673
0.676
0.675
0.691
0.714
0.672
0.682
0.708
SE
0.007
0.006
0.006
0.006
0.007
0.007
0.006
0.008
+
+
Model
n = 100
n = 200
CBM1
11.198 (0.071)
25.470 (0.067)
CBM2
11.631 (0.075)
28.040 (0.222)
CBM3
11.637 (0.140)
25.950 (0.222)
BayesM1
4.425 (0.038)
8.380 (0.040)
BayesM2
4.641 (0.037)
9.496 (0.113)
BayesM3
4.661 (0.061)
8.956 (0.110)
+
+Table 3: Mean times (SE) for CB and Bayes prediction intervals for models $(\mathcal{M}_1,\mathcal{M}_1,\mathcal{M}_1)$ .
+
+
Model
n = 100
n = 200
CBMA
0.02397 (0.0014346)
0.09902 (0.0039647)
BMA
0.00077 (0.0000435)
0.00123 (0.0000492)
+
+Table 4: Additional mean times (SE) for CBMA and BMA prediction intervals.
+
+# A.5 REAL DATA EXAMPLE: CALIFORNIA HOUSING DATA
+
+Figure 6 presents the mean coverage probabilities for different methods, with a confidence level of $1 - \alpha = 0.8$ . The results indicate that Bayes prediction intervals overcover, providing overly conservative intervals. In contrast, Conformal Bayes (CB) and CBMA consistently achieve the target coverage, ensuring both reliability and efficiency. Additionally, CBMA, by integrating model uncertainty, results in more adaptive and stable prediction intervals compared to individual CB models.
+
+Furthermore, we compare our CBMA set aggregation step with majority vote conformal set aggregation method proposed by Gasparin & Ramdas (2024b). While this method is designed to effectively aggregate sets while preserving the coverage guarantee, it does not necessarily aim to minimize the size of the merged set. In contrast, our CBMA approach offers the additional advantage of allowing the weights in the aggregation step to be learned directly from the same data, addressing a key limitation of existing model aggregation methods. We conducted a direct evaluation by comparing the lengths of CBMA-aggregated intervals to those obtained from the majority vote strategy using individual conformal Bayes prediction sets. For this comparison, we applied Corollary 4.1 from Gasparin & Ramdas (2024b), accounting for the dependency among our individual sets. In our example, the mean ratios of the lengths of intervals from the majority vote procedure relative to
+
+
+Figure 5: Approximation using Hermite polynomials: Comparison of mean coverage for prediction sets obtained with different methods: CBMA (proposed method), BMA, individual Bayes prediction sets (in red), and individual conformal Bayes (CB) prediction sets (in blue). Here, we report results based on $E = 50$ number of experiments. We have set the target coverage as $(1 - \alpha) = 0.80$ , sample size $n = 100$ and $\theta = 1$ .
+
+
+Figure 6: California Housing data: comparison of mean coverages of intervals using Bayes prediction, conformal Bayes (CB) for all four models, CBMA and BMA for different sample sizes. Here, we set $1 - \alpha = 0.8$ .
+
+
+
+
+
+those from CBMA were observed to be 1.0765 (0.0253), 1.1196 (0.0151), and 1.1458 (0.0133) for sample sizes $n = 50$ , $n = 100$ , and $n = 150$ , respectively. These results show that our CBMA approach gives shorter intervals as compared to majority vote aggregation strategy.
+
+Table 5: Approximation using Hermite polynomials: Comparison of coverage and length for prediction sets obtained with different methods: CBMA (proposed method), BMA, individual Bayes prediction sets (BayesM1-BayesM11), and individual conformal Bayes prediction sets (CBM1-CBM11). Here, we report mean and standard error (SE) based on $E = 50$ number of experiments. We have set the target coverage as $(1 - \alpha) = 0.80$ and $\theta = 1$ .
+
+
Method
Length
Coverage
n=100
n=50
n=100
n=50
Mean
SE
Mean
SE
Mean
SE
Mean
SE
BayesM1
3.485
0.118
3.574
0.144
0.858
0.011
0.862
0.014
BayesM2
3.492
0.121
3.574
0.146
0.858
0.011
0.854
0.013
BayesM3
3.410
0.118
3.537
0.148
0.858
0.011
0.856
0.013
BayesM4
3.384
0.118
3.461
0.142
0.856
0.01
0.853
0.013
BayesM5
3.348
0.116
3.389
0.141
0.853
0.01
0.846
0.013
BayesM6
3.333
0.116
3.344
0.139
0.848
0.01
0.845
0.013
BayesM7
3.297
0.115
3.290
0.137
0.844
0.01
0.838
0.014
BayesM8
3.208
0.108
3.240
0.143
0.837
0.011
0.827
0.015
BayesM9
3.138
0.103
3.182
0.141
0.837
0.011
0.828
0.016
BayesM10
3.087
0.099
3.131
0.141
0.830
0.010
0.829
0.016
BayesM11
3.039
0.094
3.067
0.141
0.830
0.010
0.829
0.015
CBM1
2.689
0.097
2.864
0.128
0.801
0.011
0.819
0.017
CBM2
2.693
0.098
2.857
0.131
0.806
0.012
0.811
0.016
CBM3
2.689
0.101
2.883
0.132
0.799
0.012
0.808
0.016
CBM4
2.667
0.094
2.877
0.137
0.798
0.012
0.819
0.015
CBM5
2.679
0.095
2.884
0.136
0.795
0.012
0.816
0.015
CBM6
2.705
0.093
2.867
0.120
0.797
0.012
0.818
0.015
CBM7
2.703
0.095
2.873
0.120
0.796
0.013
0.818
0.015
CBM8
2.691
0.094
2.823
0.121
0.794
0.013
0.818
0.016
CBM9
2.694
0.093
2.763
0.115
0.798
0.012
0.821
0.016
CBM10
2.704
0.094
2.740
0.112
0.799
0.012
0.822
0.015
CBM11
2.692
0.092
2.753
0.114
0.800
0.012
0.818
0.014
BMA
3.122
0.103
3.130
0.134
0.831
0.011
0.829
0.014
CBMA
2.634
0.091
2.683
0.118
0.792
0.013
0.808
0.015
+
+Table 6: Approximation using Hermite polynomials: Comparison of mean Coverage and Length for prediction sets obtained with different methods: CBMA (proposed method), BMA, individual Bayes prediction sets (BayesM1 - BayesM11), individual conformal Bayes prediction sets CBM1, ..., CBM11. We have set the target coverage as $(1 - \alpha) = 0.8$ . Here, $\theta = 10, K = 11, n = 100$ .
+
+
Method
Length
Coverage
Mean
SE
Mean
SE
B1
4.958
0.101
0.861
0.01
B2
3.780
0.121
0.862
0.011
B3
3.634
0.121
0.856
0.011
B4
3.499
0.122
0.855
0.01
B5
3.465
0.121
0.852
0.01
B6
3.432
0.121
0.847
0.01
B7
3.406
0.120
0.843
0.01
B8
3.282
0.109
0.835
0.011
B9
3.189
0.103
0.835
0.011
B10
3.141
0.099
0.834
0.011
B11
3.094
0.096
0.831
0.011
CB1
3.989
0.083
0.812
0.011
CB2
2.922
0.091
0.805
0.010
CB3
2.726
0.092
0.798
0.011
CB4
2.708
0.094
0.803
0.011
CB5
2.707
0.091
0.799
0.011
CB6
2.703
0.088
0.800
0.011
CB7
2.722
0.090
0.799
0.011
CB8
2.722
0.090
0.800
0.011
CB9
2.716
0.090
0.801
0.011
CB10
2.733
0.098
0.801
0.012
CB11
2.718
0.098
0.800
0.012
BMA
3.163
0.099
0.834
0.010
CBMA
2.683
0.089
0.799
0.011
\ No newline at end of file
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/images.zip b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..cb241df78544147b0c4b7a501cc834beba058e37
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e7e391cfe155c6c4a897677fedea8dd165020fc843358e8fb275775d1e9a2b81
+size 997612
diff --git a/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/layout.json b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..fc00ed6c3452decc67536ab4b8d0fbaa8c8dd382
--- /dev/null
+++ b/ICLR/2025/CBMA_ Improving Conformal Prediction through Bayesian Model Averaging/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e80738d984988f2c3771c3cbd518b3c7e86f30fb25961347e4a1b63b18ceb33
+size 662166
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_content_list.json b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..26e38e7ca7db104c1505e28433455b9aca6412f4
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2bc66ae86850b4b7af70aafce8fa51007e0debee022f442ef0b2ec9397939380
+size 222684
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_model.json b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..c341b60375f35881ab392d7af300a28081ce421b
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:24522fb546b3f491b099210e56785e4c36399e2bd198b95f830ef7ef47f42047
+size 264218
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_origin.pdf b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a5692fbad115faa9aa2b0205b5edbf9d402e352f
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/8f30726b-9f4c-4ca5-8fee-5f67ef38e1b7_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:468089ecc8a3ef8dae5e854bd98c7a3096dadf9b311bb39a6049cbda9df57bab
+size 2081294
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/full.md b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..8ea7f99a9dc2f51bb26ede33d6ba4d4250feff98
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/full.md
@@ -0,0 +1,712 @@
+# CBRAMOD: A CRISS-CROSS BRAIN FOUNDATION MODEL FOR EEG DECODING
+
+Jiquan Wang $^{1,2}$ , Sha Zhao $^{1,2*}$ , Zhiling Luo $^{3}$ , Yangxuan Zhou $^{1,2}$ , Haiteng Jiang $^{4,5,1}$ , Shijian Li $^{1,2}$ , Tao Li $^{4,5,1}$ , Gang Pan $^{1,2,5*}$
+
+$^{1}$ State Key Laboratory of Brain-machine Intelligence, Zhejiang University
+$^{2}$ College of Computer Science and Technology, Zhejiang University
+3Alibaba Group
+$^{4}$ Department of Neurobiology, Affiliated Mental Health Center & Hangzhou Seventh People's Hospital, Zhejiang University School of Medicine
+$^{5}$ MOE Frontier Science Center for Brain Science and Brain-machine Integration, Zhejiang University
+
+{wangjiquan, szhao, zyangxuan, h.jiang}@zju.edu.cn;
+
+{shijianli, litaozjusc, gpan}@zju.edu.cn;
+
+godot.lzl@alibaba-inc.com
+
+# ABSTRACT
+
+Electroencephalography (EEG) is a non-invasive technique to measure and record brain electrical activity, widely used in various BCI and healthcare applications. Early EEG decoding methods rely on supervised learning, limited by specific tasks and datasets, hindering model performance and generalizability. With the success of large language models, there is a growing body of studies focusing on EEG foundation models. However, these studies still leave challenges: Firstly, most of existing EEG foundation models employ full EEG modeling strategy. It models the spatial and temporal dependencies between all EEG patches together, but ignores that the spatial and temporal dependencies are heterogeneous due to the unique structural characteristics of EEG signals. Secondly, existing EEG foundation models have limited generalizability on a wide range of downstream BCI tasks due to varying formats of EEG data, making it challenging to adapt to. To address these challenges, we propose a novel foundation model called C BraMod. Specifically, we devise a criss-cross transformer as the backbone to thoroughly leverage the structural characteristics of EEG signals, which can model spatial and temporal dependencies separately through two parallel attention mechanisms. And we utilize an asymmetric conditional positional encoding scheme which can encode positional information of EEG patches and be easily adapted to the EEG with diverse formats. C BraMod is pre-trained on a very large corpus of EEG through patch-based masked EEG reconstruction. We evaluate C BraMod on up to 10 downstream BCI tasks (12 public datasets). C BraMod achieves the state-of-the-art performance across the wide range of tasks, proving its strong capability and generalizability. The source code is publicly available at https://github.com/wjq-learning/C BraMod.
+
+# 1 INTRODUCTION
+
+Brain-Computer Interface (BCI) refers to a system that allows direct communication between the brain and external devices or computers (Schalk et al., 2004; Wu et al., 2013; Zhang et al., 2019b). Electroencephalography (EEG) is a technique used to measure and record electrical activity in the brain, where electrodes are placed on the scalp to detect and amplify the brain's electrical signals. EEG plays a crucial role in BCI as it provides a non-invasive and real-time measure of brain activity that can be used to decode and interpret user's intentions or commands. By analyzing the patterns and features in EEG signals, algorithms and models have been developed to decode specific brain
+
+
+(a) EEG Patches
+
+
+(b) Full EEG Modeling
+
+
+(c) Criss-Cross EEG Modeling
+Figure 1: EEG patches and different EEG modeling strategies.
+
+states, including but not limited to emotion recognition (Dadebayev et al., 2022; Gao et al., 2024), motor imagery classification (Altaheri et al., 2021; Dai et al., 2020), seizure detection (Ahmad et al., 2022; Yildiz et al., 2022) and sleep staging (Phan & Mikkelsen, 2022; Wang et al., 2024b; Zhou et al., 2024a).
+
+Early studies on EEG decoding predominantly employed traditional machine learning methods (Lotte et al., 2007). With the rapid advancement of deep learning (LeCun et al., 2015), various deep neural networks have been developed to decode EEG signals (Craik et al., 2019) and perform downstream BCI tasks (Pan et al., 2018; Sekkal et al., 2022). These deep learning-based EEG models include Convolution Neural Network (CNN) (Lawhern et al., 2018; Ding et al., 2022), Long Short-Term Memory (LSTM) (Wang et al., 2018; Phan et al., 2019), CNN-LSTM (Zhang et al., 2019a; Wang et al., 2023a), Transformer (Song et al., 2021; Phan et al., 2022), CNN-Transformer (Song et al., 2022; Peh et al., 2022), Graph Neural Networks (GNN) (Jia et al., 2020; Ding et al., 2023) and etc. However, most of deep learning models employ supervised learning methods tailored for specific tasks or datasets, and lack generalization ability. There are still significant challenges in improving the generalizability and performance due to many factors, such as limited data amounts and substantial differences in EEG signal formats. The EEG is usually collected for specific BCI tasks, and the amount is relatively small, because collecting and labeling EEG is expensive and time-consuming. Meanwhile, the EEG signal formats significantly differ across different datasets, such as channel configurations and time lengths.
+
+Impressed by self-supervised learning (SSL) (Liu et al., 2021c) on computer vision (CV) and natural language processing (NLP), some studies (Kostas et al., 2021; Chien et al., 2022; Yang et al., 2023; Foumani et al., 2024; Jiang et al., 2024; Wang et al., 2024a) propose EEG foundation models which are pre-trained on a vast amount of EEG data with self-supervised learning and fine-tuned on downstream datasets for some clinical or BCI applications. Most of these methods segment the original EEG signals into patches of EEG channels to ensure that the neural network can deal with EEG signals with diverse channels and time length, shown in Figure 1(a). Consistent with the approach of handling image patches used in ViT (Dosovitskiy et al., 2020), they flatten the EEG patches and feed them into transformers to model the dependencies among all EEG patches, called full EEG modeling strategy shown in Figure 1(b). Meantime, they adopted absolute positional encoding based on electrode numbering as a channel embedding to encode positional information. However, existing methods ignore two characteristics of EEG signals: Unique structural characteristics: EEG signals have different structural characteristics compared to image. It contain heterogeneous spatial and temporal dependencies, but images contain only spatial dependencies. And the dependencies among EEG patches within the same channel or time interval could be stronger than those among patches from different channels and time intervals, but such a prior assumption may not be valid in image. The full EEG modeling strategy models the dependencies among all EEG patches together, ignoring the unique structural characteristics of EEG signals. Channel variation: EEG channels are not solely defined by electrode position but are also influenced by the referencing scheme used (e.g., earlobe, average, REST, or bipolar references). Existing EEG foundation models, such as LaBraM (Jiang et al., 2024), employ absolute positional encoding based on electrode numbering as a channel embedding, but this method assumes a fixed relationship between EEG channels and electrode positions. As a result, absolute positional encodings tied directly to electrode numbering may limit the model's adaptability across tasks and datasets that vary in spatial and reference properties.
+
+To address these issues, we first propose a criss-cross EEG modeling strategy to thoroughly leverage the structural characteristics of EEG signals, inspired by some studies (Huang et al., 2019; Dong et al., 2022) which adopt similar strategies on vision modeling. Based on this strategy, we then propose an EEG foundation model, which can model spatial and temporal dependencies in parallel, as shown in Figure 1(c). Meantime, we propose asymmetric conditional positional encoding (ACPE) as a more flexible approach to positional encoding. ACPE employs a convolutional network to dynamically learn spatial relationships among patches, allowing the model to capture relative positional information from various channel format. This dynamic position learning enhances the model's adaptability, making it better suited for downstream tasks with varying spatial configurations and reference contexts. Our detailed contributions are as follows:
+
+- We propose a novel EEG foundation model, called CBraMod, for EEG decoding on various clinical and BCI application. CBraMod is pre-trained on Temple University Hospital EEG Corpus (TUEG) for learning generic representations from both time-domain and frequent-domain EEG signals through patch-based masked EEG reconstruction. To the best of our knowledge, TUEG is the largest public EEG corpus so far.
+- For modeling effective spatial-temporal dependencies among EEG patches and adapting to various downstream datasets, we firstly devise a criss-cross transformer, based on criss-cross EEG modeling strategy, as the backbone of CBetaMod. It models spatial and temporal dependencies separately through two parallel attention mechanisms, spatial and temporal attentions. Meanwhile, we utilize an asymmetric conditional positional encoding (ACPE) scheme to encode positional information. ACPE can dynamically generate positional encoding, which can well be adapted to arbitrary EEG formats of different downstream datasets.
+- We evaluate the performance of CBigInt on up to 10 downstream BCI tasks using 12 public datasets. The majority of downstream datasets are sourced from institutions different from the pretraining dataset. The experimental results demonstrate that CBigInt achieves state-of-the-art performance across all the tasks, highlighting its successful generalizability. To the best of our knowledge, this is the first study to comprehensively evaluate EEG foundation models across such a broad range of downstream BCI tasks.
+
+
+Figure 2: CBetaMod pre-training overview.
+
+# 2 METHOD
+
+The pre-training framework of C BraMod is shown in Figure 2. Firstly, we segment EEG samples into patches using a fixed time window and randomly mask some patches with a mask token. Next, each EEG patch is fed into a patch encoding network to obtain corresponding patch embedding. Spatial-temporal positional embeddings are obtained through an asymmetric conditional positional encoding (ACPE) scheme and added to the patch embeddings. Then, the patch embeddings are fed into criss-cross transformer blocks with criss-cross attention mechanism to learn EEG representations. Finally, a reconstruction head is utilized to reconstruct the masked EEG patches from the learned representations. We will provide a detailed description of C BraMod.
+
+Patching & Masking We denote an EEG sample as $S \in \mathbb{R}^{C \times T}$ , where $C$ is the number of electrode channels and $T$ is the number of timestamps. In order to ensure that the neural network can deal with EEG signals with diverse channels and time length, we segment the original EEG sample into patches of EEG channels through a fixed-length time window. Specifically, we divide $S$ with time window length $t$ to get a set of patches $X \in \mathbb{R}^{C \times n \times t}$ , where $n = \left\lfloor \frac{T}{t} \right\rfloor$ is the number of patches in each channel, or sequence length. Thus an EEG patch can be denoted as $x \in \mathbb{R}^t$ and we can get $X = \{x_{i,j} | i \in [1,2,\dots,C], j \in [1,2,\dots,n]\}$ . The total number of patches in $X$ is $|X| = Cn$ . After EEG patching, we randomly generate a mask $\mathcal{M} = \{m_{i,j} | i \in [1,2,\dots,C], j \in [1,2,\dots,n]\}$ from a Bernoulli distribution of $r$ proportion, where $m_{i,j} \in \{0,1\}$ denotes the mask indicator of $x_{i,j}$ . Then we mask the EEG patches of $X$ by replacing the EEG patch $x_{i,j}$ with $x_M$ as follows:
+
+$$
+\tilde {x} _ {i, j} = \left\{ \begin{array}{l l} x _ {i, j}, & m _ {i, j} = 0 \\ x _ {M}, & m _ {i, j} = 1 \end{array} \right. \tag {1}
+$$
+
+$$
+\tilde {X} = \{\tilde {x} _ {i, j} | i \in [ 1, 2, \dots , C ], j \in [ 1, 2, \dots , n ] \} \tag {2}
+$$
+
+where $x_{M}\in \mathbb{R}^{t}$ is the mask token and $\tilde{X}\in \mathbb{R}^{C\times n\times t}$ is the set of all EEG patches after masking.
+
+Time-Frequency Patch Encoding In order to extract the local features from each patch $\tilde{x}_{i,j}$ of $\tilde{X}$ , we devise a patch encoder applied to each patch. Our patch encoder consists of two branches, time-domain branch and frequency-domain branch. The time-domain branch comprises multiple convolution blocks designed to extract time-domain features within each patch. A convolution block consists of an one-dimensional convolution layer, a group normalization layer, and a GELU activation function. We feed each EEG patch $\tilde{x}_{i,j}$ into the time-domain branch to obtain the time-domain embedding $e_{i,j}^{t} \in \mathbb{R}^{d}$ , where $d$ is the dimension of the embedding. The frequency-domain branch comprises fast Fourier transform (FFT) and a fully-connected layer to extract frequency-domain features from each patch. Specifically, we leverage FFT to extract an energy vector for each patch $\tilde{x}_{i,j}$ where every dimension indicates the energy of a specific frequency. Then we feed the energy vector into a fully-connected layer to get frequency-domain embedding $e_{i,j}^{f} \in \mathbb{R}^{d}$ . Afterwards, we add each time-domain embedding and the corresponding frequency-domain embedding as follows:
+
+$$
+e _ {i, j} = e _ {i, j} ^ {t} + e _ {i, j} ^ {f} \tag {3}
+$$
+
+$$
+E = \left\{e _ {i, j} \mid i \in [ 1, 2, \dots , C ], j \in [ 1, 2, \dots , n ] \right\} \tag {4}
+$$
+
+where $e_{i,j}\in \mathbb{R}^d$ represents the patch embedding, $E\in \mathbb{R}^{C\times n\times d}$ is the set of patch embeddings.
+
+Asymmetric Conditional Positional Encoding Differing from existing EEG foundation models that primarily utilize an absolute positional encoding (APE) scheme, we employ an asymmetric conditional positional encoding (ACPE) scheme to encode spatial and temporal positional information of EEG patches. This is a modification upon conditional positional encoding (CPE) (Chu et al., 2021) that is applied to encode positional information of image patches. Compared to APE, ACPE can dynamically encode the temporal and spatial positional information of each EEG patch, improving adaptation to diverse channel configurations and time lengths. Compared to CPE, ACPE is designed in an asymmetric fashion to encode short-range temporal positional information and long-range spatial positional information. It is because EEG signals are multi-channels sequential neural signals, requiring the model to encode different-range positional information in spatial and temporal dimension.
+
+Specifically, we devise a convolution layer as positional encoder to dynamically generate ACPE from the spatial-temporal neighborhoods of an EEG patch, shown in Figure 2. The convolution network is composed of a depthwise two-dimension convolution layer with kernel $(k_{s}, k_{t})$ and $\left(\frac{k_{s} - 1}{2}, \frac{k_{t} - 1}{2}\right)$ zero paddings, where $k_{s}$ is the kernel size of spatial (channel) dimension and $k_{t}$ is the kernel size of temporal dimension. Differing from CPE, we utilize an asymmetric convolution kernel $(k_{s} > k_{t})$ to encode spatial-temporal positional information. The longer side in spatial dimension is used to encode longer-range spatial positional information, and the shorter in temporal dimension is used to encode shorter-range temporal positional information. We feed patch embeddings $E$ into the positional encoder to generate the ACPE $E^{p} = \{e_{i,j}^{p} | i \in [1, 2, \dots, C], j \in [1, 2, \dots, n]\}$ , where $E^{p} \in \mathbb{R}^{C \times n \times d}$ and $e_{i,j}^{p} \in \mathbb{R}^{d}$ . Then we add ACPE to patch embeddings:
+
+$$
+E ^ {o} = E + E ^ {p} = \left\{e _ {i, j} + e _ {i, j} ^ {p} \mid i \in [ 1, 2, \dots , C ], j \in [ 1, 2, \dots , n ] \right\} \tag {5}
+$$
+
+
+(a) Criss-Cross Transformer Block
+
+
+(b) Criss-Cross Attention Mechanism
+Figure 3: Criss-Cross Transformer Block.
+
+where $E^o \in \mathbb{R}^{C \times n \times d}$ is the set of EEG patch embeddings with positional information.
+
+Criss-Cross Transformer We propose criss-cross transformer to capture the heterogeneous spatial and temporal dependencies among EEG patches, whose architecture is shown in Figure 3.
+
+Criss-Cross Transformer Block. As shown in Figure 3(a), a criss-cross transformer block consists of layer normalization layer, criss-cross attention, addition component, and feed forward layer. In order to ensure the stability and efficiency of the transformer training process, we utilize the pre-norm strategy. We incorporate layer normalization to the queries and keys prior to the attention mechanism to prevent the occurrence of excessively large values in attention logits. This approach helps to maintain more consistent gradients across layers, resulting in better convergence during the training process (Xiong et al., 2020; Dehghani et al., 2023). Here, we feed EEG patch embeddings $E^{o}$ into layer normalization to get normalized patch embedding $\tilde{E} \in \mathbb{R}^{C \times n \times d}$ . Then we feed $\tilde{E}$ into the criss-cross attention to capture spatial-temporal dependencies among EEG patches.
+
+Criss-Cross Attention Mechanism. The criss-cross attention is shown in Figure 3(b). It consists of parallel spatial attention (S-Attention) and temporal attention (T-Attention). The S-Attention is used to capture spatial dependencies among EEG patches within the same time interval and the T-Attention is used to capture temporal dependencies among EEG patches within the same channel. Based on the multi-head self-attention mechanism, the input embeddings $\tilde{E} \in \mathbb{R}^{C \times n \times d}$ will undergo an initial linear projection to $K$ heads, and each head will subsequently apply either S-Attention or T-Attention. For S-Attention, we can partition $\tilde{E}$ into $n$ spatial stripes as $\tilde{E} = [\tilde{E}^1, \tilde{E}^2, \dots, \tilde{E}^n]$ , where $\tilde{E}^1, \dots, \tilde{E}^n \in \mathbb{R}^{C \times d}$ . We suppose the projected queries, keys and values of the $k$ -th head all have dimension $d_k$ , then the process of S-Attention for the $k$ -th head is as follows:
+
+$$
+F _ {k} ^ {j} = \text {A t t e n t i o n} \left(\tilde {E} ^ {j} W _ {k} ^ {Q}, \tilde {E} ^ {j} W _ {k} ^ {K}, \tilde {E} ^ {j} W _ {k} ^ {V}\right) \tag {6}
+$$
+
+$$
+\text {S - A t t e n t i o n} _ {k} (\tilde {E}) = \left[ F _ {k} ^ {1}, F _ {k} ^ {2}, \dots , F _ {k} ^ {n} \right] \tag {7}
+$$
+
+where $j \in [1,2,\dots,n]$ represents the $j$ -th spatial stripes, $W_{k}^{Q}, W_{k}^{K}, W_{k}^{V} \in \mathbb{R}^{d \times d_{k}}$ is the linear projection matrices of queries, keys and values for the $k$ -th head respectively, and $d_{k} = d / K$ . The process of T-Attention closely resembles that of S-Attention. Then we concatenate the outputs of S-Attention and T-Attention as follows:
+
+$$
+\operatorname {C r i s s} - \operatorname {C r o s s} - \operatorname {A t t e n t i o n} (\tilde {E}) = \operatorname {C o n c a t} \left(\operatorname {h e a d} _ {1}, \operatorname {h e a d} _ {2}, \dots , \operatorname {h e a d} _ {\mathrm {K}}\right) \tag {8}
+$$
+
+$$
+\operatorname {h e a d} _ {\mathrm {k}} = \left\{ \begin{array}{l l} \text {S - A t t e n t i o n} _ {k} (\tilde {E}), & k \in [ 1, 2, \dots , K / 2 ] \\ \text {T - A t t e n t i o n} _ {k} (\tilde {E}), & k \in [ K / 2 + 1, K / 2 + 2, \dots , K ] \end{array} \right. \tag {9}
+$$
+
+where $\mathrm{head_k}$ represents the output of the $k$ -th head.
+
+There are $M$ criss-cross transformer blocks in CBraMod. The output of criss-cross transformer is denoted as $E^{r} = \{e_{i,j}^{r}|i\in [1,2,\dots,C],j\in [1,2,\dots,n]\}$ , where $e_{i,j}^{r}\in \mathbb{R}^{d}$ is an EEG patch representation, and $E^r\in \mathbb{R}^{C\times n\times d}$ is the set of EEG patch representations.
+
+Masked EEG Reconstruction In order to learn powerful generic representations from unlabeled EEG data, we need to utilize the task of self-supervised representation learning to pre-train C BraMod. Masked autoencoder (MAE) has been proved to be a simple and effective self-supervised pretraining approach in the fields of natural language understanding, computer vision, and time series forecasting (Devlin et al., 2018; He et al., 2022; Nie et al., 2022). We utilize patch-based masked EEG reconstruction to learn generic representation from EEG. Specifically, a reconstruction head, composed of a fully-connected layer, is used to project learned EEG representations $E^{r}$ into predicted EEG patches $\hat{X} = \{\hat{x}_{i,j}|i\in [1,2,\dots,C],j\in [1,2,\dots,n]\}$ , where $\hat{x}_{i,j}\in \mathbb{R}^t$ is the predicted EEG patch corresponding to one original EEG patch $x_{i,j}$ , and $\hat{X}\in \mathbb{R}^{C\times n\times t}$ is the set of predicted EEG patches corresponding to the set of original EEG patches $X$ .
+
+Consistent with most of existing MAE studies(He et al., 2022; Xie et al., 2022), we only reconstruct the masked EEG patches. Given the mentioned mask $\mathcal{M} = \{m_{i,j}|i\in [1,2,\dots,C],j\in [1,2,\dots,n]\}$ , we get the set of the masked predicted EEG patches $\hat{X}^M$ and the set of the masked original EEG patches $X^{M}$ as follows:
+
+$$
+\hat {X} ^ {M} = \left\{\hat {x} _ {i, j} \mid m _ {i, j} = 1, i \in [ 1, 2, \dots , C ], j \in [ 1, 2, \dots , n ] \right\} \tag {10}
+$$
+
+$$
+X ^ {M} = \left\{x _ {i, j} \mid m _ {i, j} = 1, i \in [ 1, 2, \dots , C ], j \in [ 1, 2, \dots , n ] \right\} \tag {11}
+$$
+
+where $m_{i,j}\in \{0,1\}$ denotes the mask indicator of $x_{i,j}$ .
+
+Finally, we use the mean square error (MSE) as reconstruction loss function:
+
+$$
+\mathcal {L} = \left\| \hat {X} ^ {M} - X ^ {M} \right\| ^ {2} \tag {12}
+$$
+
+# 3 EXPERIMENTS
+
+# 3.1 PRE-TRAINING
+
+Pre-training Dataset CBraMod is pre-trained on a very large public dataset, Temple University Hospital EEG corpus (TUEG) (Obeid & Picone, 2016). The TUEG dataset consists of a diverse archive of 69,652 clinical EEG recordings from 14,987 subjects across 26,846 sessions, with a total duration of 27,062 hours. The archive has over 40 different channel configurations and varying duration of recordings. Most of the recordings are sampled at $256\mathrm{Hz}$ . Unfortunately, the TUEG dataset suffers from significant data contamination, including a substantial amount of unmarked noise, artifacts, and faulty channels. Manual removal of these interference factors presents considerable challenges. Thus we utilize a range of automated techniques to preprocess the data.
+
+Preprocessing Firstly, the recordings with a total duration of no more than 5 minutes are removed, then the first one minute and last one minute of each recording are also discarded, so that we can remove low-quality data as much as possible. Next, we select 19 common EEG channels (Fp1, Fp2, F7, F3, Fz, F4, F8, T3, C3, Cz, C4, T4, T5, P3, Pz, P4, T6, O1, O2) that meet a subset of the 10-20 international electrode placement system standards to obtain clean and uniformly formatted pre-training data. Then a band-pass filtered $(0.3\mathrm{Hz} - 75\mathrm{Hz})$ is applied to remove the low-frequency and high-frequency noise. A notch filter $(60\mathrm{Hz})$ is used to remove the power line noise. All EEG signals are resampled to $200\mathrm{Hz}$ and segmented to 30-second non-overlapping EEG samples. However, the aforementioned preprocessing still cannot completely solve the quality issues of EEG data. Therefore, we adopt a simple and automated EEG bad sample removal scheme to obtain clean pre-training EEG data. Specifically, we regard EEG samples as bad samples in which any data point has an absolute amplitude exceeding $100~\mu \mathrm{V}$ , and remove them from the dataset. Finally, we normalize EEG by setting the unit to $100~\mu \mathrm{V}$ to guarantee the value mainly between -1 to 1, consistent with LaBraM (Jiang et al., 2024). To sum up, there are 1,109,545 EEG samples retained for pre-training and longer than 9000 hours in total, significantly exceeding the amount of EEG samples used for pretraining LaBraM (2,534.78hours) (Jiang et al., 2024).
+
+Pre-training Settings We implemented C BraMod based on the Python 3.11.7 and PyTorch $2.1.2+$ CUDA 12.1. We set the time duration of each EEG patch as 1 second (200 data points), and one 30-second EEG sample is segmented to $19 \times 30 = 570$ EEG patches. For the model configurations, the patch encoder consists of 3-layer 1D convolution with group normalization and GELU activation. The positional encoder is an one-layer 2D depthwise CNN. The backbone of C BraMod is a 12-layer
+
+criss-cross transformer with 200 hidden dimensions, 800 inner dimensions (feed-forward), and 8-head criss-cross attention (4 heads for S-Attention and 4 heads for V-Attention). $50\%$ of mask ratio is used to randomly mask the patches. The batch size was set to 128 and the number of epochs was set to 40. The model is trained using the AdamW optimizer with default settings, the learning rate is set to 5e-4 and the weight decay is set to 5e-2. CosineAnnealingLR was used to dynamically adjust the learning rate during the pre-training. C BraMod was pre-trained on one machine with Intel Xeon Gold 6226R CPU and four NVIDIA RTX A5000 GPU for about 5 days. More details can be found in Appendix B.
+
+# 3.2 EXPERIMENT SETUP OF DOWNSTREAM BCI TASKS
+
+Downstream BCI Tasks and Datasets To comprehensively evaluate the performance of our method, we select up to 10 downstream BCI tasks. All the downstream BCI tasks with the corresponding datasets are presented in Table 1 and Appendix D.1. For all the downstream datasets, we resampled the EEG signals into $200\mathrm{Hz}$ and set the time duration of each EEG patch as 1 second (200 data points), consistent with the pre-training data. More details of each dataset and its preprocessing are introduced in Section 3.3 and Appendix E.
+
+Table 1: Overview of downstream BCI tasks and datasets.
+
+
BCI Tasks
Datasets
Rate
# Channels
Duration
# Samples
Label
I. Emotion Recognition
FACED
250Hz
32
10s
10,332
9-class
SEED-V
1000Hz
62
1s
117,744
5-class
II. Motor Imagery Classification
PhysioNet-MI
160Hz
64
4s
9,837
4-class
SHU-MI
250Hz
32
4s
11,988
2-class
III. Sleep Staging
ISRUC
200Hz
6
30s
89,240
5-class
IV. Seizure Detection
CHB-MIT
256Hz
16
10s
326,993
2-class
V. Imagined Speech Classification
BCIC2020-3
256Hz
64
3s
6,000
5-class
VI. Mental Disorder Diagnosis
Mumtaz2016
256Hz
19
5s
7,143
2-class
VII. Vigilance Estimation
SEED-VIG
200Hz
17
8s
20,355
regression
VIII. Mental Stress Detection
MentalArithmetic
500Hz
20
5s
1,707
2-class
IX. Event Type Classification
TUEV
250Hz
16
5s
112,491
6-class
X. Abnormal Detection
TUAB
250Hz
16
10s
409,455
2-class
+
+Baselines We compare CBetaMod with both non-foundation-model and foundation-model baseline on all the downstream BCI tasks, for comprehensive evaluation. We adopt the following methods as non-foundation-model baselines: EEGNet (Lawhern et al., 2018), EEGConformer (Song et al., 2022), SPaRCNet (Jing et al., 2023), ContraWR (Yang et al., 2021), CNN-Transformer (Peh et al., 2022), FFCL (Li et al., 2022), and ST-Transformer (Song et al., 2021). We re-implemented above baselines based on the public code provided by BIOT (Yang et al., 2023) unless their experimental results have already been reported in existing studies. Besides, we use BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024) as the foundation-model baselines. We fine-tune BIOT and LaBraM based on their public code and pre-trained weights, unless their experimental results have already been reported in the original papers. Notably, LaBraM has three different configurations, LaBraM-Base, LaBraM-Large and LaBraM-Huge, but only the pre-trained weights of LaBraM-Base are opened publicly. We only fine-tune the LaBraM-Base in our experiments.
+
+Metrics We adopt Balanced Accuracy, AUC-PR and AUROC as evaluation metrics for binary classification, where AUROC is set as the monitor score. For multi-class classification, we use Balanced Accuracy, Cohen's Kappa and Weighted F1 for evaluation, where Cohen's Kappa is set as the monitor score. Pearson's Correlation, R2 Score and RMSE are used as evaluation metrics for regression, where R2 score is utilized as the monitor score. We obtain all the results with five different random seeds and report the mean and standard deviation values. Appendix D shows more.
+
+# 3.3 RESULTS
+
+For proving the capability and generalizability of CBraMod, we evaluate CBetaMod and baselines on up to 10 downstream BCI tasks using 12 publicly available datasets, listed in Table 1. In all the experiments, we ensure strict consistency in the splits of training, validation, and test sets for every method. In this section, we show the experimental results on downstream BCI tasks of emotion recognition and motor imagery classification on 4 datasets. More results are shown in Appendix E.
+
+Performance Comparison with Baselines We compare CBetaMod with the baselines as follows:
+
+Table 2: The results of different methods on emotion recognition.
+
+
Methods
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
EEGNet
0.4090 ± 0.0122
0.3342 ± 0.0251
0.4124 ± 0.0141
0.2961 ± 0.0102
0.1006 ± 0.0143
0.2749 ± 0.0098
EEGConformer
0.4559 ± 0.0125
0.3858 ± 0.0186
0.4514 ± 0.0107
0.3537 ± 0.0112
0.1772 ± 0.0174
0.3487 ± 0.0136
SPaRCNet
0.4673 ± 0.0155
0.3978 ± 0.0289
0.4729 ± 0.0133
0.2949 ± 0.0078
0.1121 ± 0.0139
0.2979 ± 0.0083
ContraWR
0.4887 ± 0.0078
0.4231 ± 0.0151
0.4884 ± 0.0074
0.3546 ± 0.0105
0.1905 ± 0.0188
0.3544 ± 0.0121
CNN-Transformer
0.4697 ± 0.0132
0.4017 ± 0.0168
0.4720 ± 0.0125
0.3678 ± 0.0078
0.2072 ± 0.0183
0.3642 ± 0.0088
FFCL
0.4673 ± 0.0158
0.3987 ± 0.0383
0.4699 ± 0.0145
0.3641 ± 0.0092
0.2078 ± 0.0201
0.3645 ± 0.0132
ST-Transformer
0.4810 ± 0.0079
0.4137 ± 0.0133
0.4795 ± 0.0096
0.3052 ± 0.0072
0.1083 ± 0.0121
0.2833 ± 0.0105
BIOT
0.5118 ± 0.0118
0.4476 ± 0.0254
0.5136 ± 0.0112
0.3837 ± 0.0187
0.2261 ± 0.0262
0.3856 ± 0.0203
LaBraM-Base
0.5273 ± 0.0107
0.4698 ± 0.0188
0.5288 ± 0.0102
0.3976 ± 0.0138
0.2386 ± 0.0209
0.3974 ± 0.0111
CBraMod
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
+
+Emotion Recognition. We use FACED (Chen et al., 2023) and SEED-V $^1$ (Liu et al., 2021b) as the evaluation datasets of emotion recognition. FACED is a large finer-grained affective computing EEG dataset recording 32-channel EEG signals at $250\mathrm{Hz}$ sampling rate from 123 subjects, which covers nine emotion categories including amusement, inspiration, joy, tenderness, anger, fear, disgust, sadness, and neutral emotion. The EEG signals are segmented into 10,332 10-second samples and resampled to $200\mathrm{Hz}$ . We use subject 1 to 80 for training, 81 to 100 for validation, and 101 to 123 for test in FACED. SEED-V is an emotion EEG dataset containing five emotion categories (happy, sad, neutral, disgust, and fear), consisting of EEG signals (62 channels, $1000\mathrm{Hz}$ ) from 16 subjects through three sessions per subject, where one session has fifteen trials. The EEG signals are segmented into 117,744 1-second samples and resampled to $200\mathrm{Hz}$ . We divide the fifteen trials of each session into three equal parts (5:5:5) as the training, validation and test sets, respectively. The experimental results of emotion recognition are presented in Table 2. CBraMod achieves the state-of-the-art performance on both FACED and SEED-V. Specifically, CBraMod obtains a great performance improvement compared to the best baseline LaBraM (0.5041 v.s. 0.4698 in Cohen's Kappa on FACED and 0.2569 v.s. 0.2386 in Cohen's Kappa on SEED-V).
+
+Table 3: The results of different methods on motor imagery classification.
+
+
Methods
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.5814 ± 0.0125
0.4468 ± 0.0199
0.5796 ± 0.0115
0.5889 ± 0.0177
0.6311 ± 0.0142
0.6283 ± 0.0152
EEGConformer
0.6049 ± 0.0104
0.4736 ± 0.0171
0.6062 ± 0.0095
0.5900 ± 0.0107
0.6370 ± 0.0093
0.6351 ± 0.0101
SPaRCNet
0.5932 ± 0.0152
0.4564 ± 0.0234
0.5937 ± 0.0147
0.5978 ± 0.0097
0.6510 ± 0.0062
0.6431 ± 0.0082
ContraWR
0.5892 ± 0.0133
0.4527 ± 0.0248
0.5918 ± 0.0116
0.5873 ± 0.0128
0.6315 ± 0.0105
0.6273 ± 0.0113
CNN-Transformer
0.6053 ± 0.0118
0.4725 ± 0.0223
0.6041 ± 0.0105
0.5975 ± 0.0169
0.6412 ± 0.0076
0.6323 ± 0.0082
FFCL
0.5726 ± 0.0092
0.4323 ± 0.0182
0.5701 ± 0.0079
0.5692 ± 0.0252
0.5943 ± 0.0172
0.6014 ± 0.0168
ST-Transformer
0.6035 ± 0.0081
0.4712 ± 0.0199
0.6053 ± 0.0075
0.5992 ± 0.0206
0.6394 ± 0.0122
0.6431 ± 0.0111
BIOT
0.6153 ± 0.0154
0.4875 ± 0.0272
0.6158 ± 0.0197
0.6179 ± 0.0183
0.6770 ± 0.0119
0.6609 ± 0.0127
LaBraM-Base
0.6173 ± 0.0122
0.4912 ± 0.0192
0.6177 ± 0.0141
0.6166 ± 0.0192
0.6761 ± 0.0083
0.6604 ± 0.0091
CBraMod
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
+
+Motor Imagery Classification. We use PhysioNet-MI (Goldberger et al., 2000; Schalk et al., 2004) and SHU-MI (Ma et al., 2022) for evaluation on motor imagery classification. PhysioNet-MI is an EEG motor imagery dataset collected from 109 subjects with 64 channels and $160\mathrm{Hz}$ sampling rate. It covers four motor imagery classes including left fist, right fist, both fists and both feet. The EEG signals are divided into 9,837 4-second samples and resampled to $200\mathrm{Hz}$ . Subject 1-70, 71-89, 90-109 are used for training, validation and test, respectively. SHU-MI is an EEG motor imagery dataset with two categories (left hand and right hand). It consists of 32-channel EEG signals with 250 Hz sampling rate, collected from 25 subjects. The EEG signals are segmented into 11,988 samples and resampled to $200\mathrm{Hz}$ . We use subject 1 to 15 for training, subject 16 to 20 for validation, and 21 to 25 for test. The results are shown in Table 3. C BraMod achieves the best performance on both datasets. Specifically, C BraMod achieves a significant performance gain compared to the best baseline LaBraM (0.5222 v.s. 0.4912 in Cohen's Kappa) on PhysioNet-MI. On SHU-MI, C BraMod obtains a better performance compared to the best baseline BIOT (0.6988 v.s. 0.6609 in AUROC).
+
+All the above results indicate that CBetaMod can learn powerful EEG representations which are helpful to the downstream BCI tasks of emotion recognition and motor imagery classification.
+
+
+Figure 4: The results of attention mechanism comparison.
+
+Attention Mechanism Comparison In order to prove the effectiveness of criss-cross attention mechanism, we compare it with other attention mechanism such as full attention (Vaswani et al., 2017; Dosovitskiy et al., 2020), axial attention (Ho et al., 2019) and the criss-cross attention module in CCNet (Huang et al., 2019). Full attention mechanism equally models the spatial-temporal dependencies among all EEG patches in one transformer block. Axial attention mechanism models the dependencies along specific axial dimensions of EEG patches in one transformer block. It can sequentially model spatial or temporal dependencies among EEG patches in different blocks. In our experiment, the axial attention only models the spatial dependencies in transformer block 1-6 and models the temporal dependencies in transformer block 7-12. The criss-cross attention mechanism in CCNet is based on the affinity operation, using a single attention map to achieve criss-cross modeling. We pre-trained and fine-tuned the models based on the three attention mechanisms with the same settings as CBraMod. The performance comparison on emotion recognition and motor imagery classification is shown in Figure 4. Full attention achieves the worst performance across all datasets. It indicates that full attention equally models the dependencies among all EEG patches, ignoring the unique structural characteristics of EEG signals. Meanwhile, there are more than 570 EEG patches in one EEG sample (19 channels, 30 seconds) in the pre-training dataset, which exceeds the appropriate modeling range for full attention. Axial attention outperforms full attention because it prioritizes directly modeling specific axial dimensions of EEG patches, which can effectively capture the spatial-temporal dependencies among EEG patches. But it performs worse than criss-cross attention in CBraMod. It indicates that the criss-cross attention can model spatial and temporal dependencies among EEG patches in parallel, which are more effective than sequential modeling of axial attention for EEG modeling. The attention in CCNet performs slightly better than full attention but significantly worse that our attention mechanism, indicating that the single-map criss-cross attention designed for image in CCNet may be not suitable for EEG modeling. EEG signals contain heterogeneous spatial and temporal dependencies. Our method employs dual parallel spatial and temporal attentions to capture spatial and temporal dependencies, which is more suitable for EEG modeling.
+
+
+Figure 5: The results of positional encoding comparison.
+
+Positional Encoding Comparison We conduct the positional encoding comparison to evaluate the effectiveness of asymmetric conditional positional encoding (ACPE). Specifically, we compare ACPE with following settings: 1) without positional encoding (w/o PE): do not use positional encoding to encode positional information; 2) with absolute positional encoding (w/ APE): replace ACPE with
+
+APE; 3) with conditional positional encoding (w/ CPE): replace ACPE with CPE. The results are shown in Figure 5. C BraMod without PE performs the worst, indicating that positional encoding is important in EEG modeling. APE performs better than w/o PE but worse than CPE and ACPE, indicating that APE is not so effective as CPE in adapting to different EEG formats. CPE, usually used for image patches, performs slightly worse compared to ACPE in C BraMod, indicating that the asymmetric designs are slightly better than symmetric designs in EEG modeling. It may be because that EEG patches exhibit different dependencies in spatial (channel) and temporal dimension, which are different from the dependencies between image patches.
+
+Table 4: The results of ablation study on pre-training.
+
+
Settings
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
clean pre-training
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
dirty pre-training
0.5319 ± 0.0245
0.4768 ± 0.0348
0.5397 ± 0.0219
0.3914 ± 0.0217
0.2224 ± 0.0318
0.3894 ± 0.0243
w/o pre-training
0.5232 ± 0.0216
0.4615 ± 0.0289
0.5304 ± 0.0187
0.3902 ± 0.0241
0.2211 ± 0.0384
0.3879 ± 0.0225
Settings
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
clean pre-training
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
dirty pre-training
0.6245 ± 0.0153
0.5063 ± 0.0256
0.6223 ± 0.0167
0.6301 ± 0.0189
0.7026 ± 0.0176
0.6895 ± 0.0131
w/o pre-training
0.6196 ± 0.0143
0.4994 ± 0.0289
0.6157 ± 0.0145
0.6289 ± 0.0179
0.7032 ± 0.0145
0.6878 ± 0.0166
+
+Ablation Study on Pre-training To further evaluate the effectiveness of pre-training, we conduct an ablation study on pre-training. The pre-training ablation experiment is designed as follows: 1) w/o pre-training: directly training C BraMod on downstream datasets; 2) dirty pre-training: pre-training C BraMod on TUEG corpus without bad samples dropping. 3) clean pre-training: pre-training C BraMod on TUEG corpus with bad samples dropping. The results are presented in Table 4. Obviously, clean pre-training achieves the best performance, obtaining significant performance increases compared to dirty pre-training and w/o pre-training. Besides, the performance has a smaller variance compared to dirty pre-training and w/o pre-training. These indicate that our pretraining strategy can help C BraMod learn generic representations from EEG, which can improve the generalizability and stability of C BraMod on downstream datasets. Dirty pre-training performs slightly better than w/o pre-training, indicating that a large amount of dirty data in the original dataset can weaken the effectiveness of pre-training.
+
+# 4 CONCLUSION
+
+In this paper, we propose an EEG foundation model called CBraMod, which can learn generic representations of EEG signals through patch-based masked EEG reconstruction. Specifically, we devise a criss-cross transformer as the backbone of CBraMod to model the spatial and temporal dependencies between EEG patches in parallel, and an asymmetric convolutional positional encoding scheme to encode spatial-temporal positional information of EEG signals with diverse formats. CBraMod is pre-trained on TUEG, a very large corpus of EEG. CBraMod achieves the state-of-the-art performance across up to 10 downstream BCI tasks (12 public datasets), proving its strong capability and generalizability. We hope that the proposed modeling approach and positional encoding scheme can provide meaningful insights for building EEG foundation models, thereby advancing the development of real-world BCI systems.
+
+# ACKNOWLEDGMENTS
+
+This work was supported by STI 2030 Major Projects (2021ZD0200400), Natural Science Foundation of China (No. 61925603) and the Key Program of the Natural Science Foundation of Zhejiang Province, China (No. LZ24F020004). The corresponding authors are Dr. Sha Zhao and Dr. Gang Pan.
+
+# REFERENCES
+
+Ahmed Abdelhameed and Magdy Bayoumi. A deep learning approach for automatic seizure detection in children with epilepsy. Frontiers in Computational Neuroscience, 15:650050, 2021.
+
+Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
+Ijaz Ahmad, Xin Wang, Mingxing Zhu, Cheng Wang, Yao Pi, Javed Ali Khan, Siyab Khan, Oluwarotimi Williams Samuel, Shixiong Chen, and Guanglin Li. Eeg-based epileptic seizure detection via machine/deep learning approaches: A systematic review. Computational Intelligence and Neuroscience, 2022, 2022.
+Ali Al-Saegh, Shefa A Dawwd, and Jassim M Abdul-Jabbar. Deep learning for motor imagery eeg-based classification: A review. Biomedical Signal Processing and Control, 63:102172, 2021.
+Hamdi Altaheri, Ghulam Muhammad, Mansour Alsulaiman, Syed Umar Amin, Ghadir Ali Altuwaijri, Wadood Abdul, Mohamed A Bencherif, and Mohammed Faisal. Deep learning techniques for classification of electroencephalogram (eeg) motor imagery (mi) signals: A review. Neural Computing and Applications, pp. 1-42, 2021.
+Hubert Banville, Omar Chehab, Aapo Hyvarinen, Denis-Alexander Engemann, and Alexandre Gramfort. Uncovering the structure of clinical eeg signals with self-supervised learning. Journal of Neural Engineering, 18(4):046020, 2021.
+Ali Bashashati, Mehrdad Fatourechi, Rabab K Ward, and Gary E Birch. A survey of signal processing algorithms in brain-computer interfaces based on electrical brain signals. Journal of Neural engineering, 4(2):R32, 2007.
+Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.
+Tim Brooks, Bill Peebles, Connor Holmes, Will DePue, Yufei Guo, Li Jing, David Schnurr, Joe Taylor, Troy Luhman, Eric Luhman, Clarence Ng, Ricky Wang, and Aditya Ramesh. Video generation models as world simulators. 2024. URL https://openai.com/research/video-generation-models-as-world-simulators.
+Clemens Brunner, Robert Leeb, Gernot Müller-Putz, Alois Schlögl, and Gert Pfurtscheller. Bci competition 2008-graz data set a. Institute for knowledge discovery (laboratory of brain-computer interfaces), Graz University of Technology, 16:1-6, 2008.
+Jingjing Chen, Xiaobin Wang, Chen Huang, Xin Hu, Xinke Shen, and Dan Zhang. A large finer-grained affective computing eeg dataset. Scientific Data, 10(1):740, 2023.
+Mouxiang Chen, Lefei Shen, Zhuo Li, Xiaoyun Joy Wang, Jianling Sun, and Chenghao Liu. Visions: Visual masked autoencoders are free-lunch zero-shot time series forecasters. arXiv preprint arXiv:2408.17253, 2024.
+Hsiang-Yun Sherry Chien, Hanlin Goh, Christopher M Sandino, and Joseph Y Cheng. Maeeg: Masked auto-encoder for eeg representation learning. arXiv preprint arXiv:2211.02625, 2022.
+Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021.
+Alexander Craik, Yongtian He, and Jose L Contreras-Vidal. Deep learning for electroencephalogram (eeg) classification tasks: a review. Journal of neural engineering, 16(3):031001, 2019.
+Didar Dadebayev, Wei Wei Goh, and Ee Xion Tan. Eeg-based emotion recognition: Review of commercial eeg devices and machine learning techniques. Journal of King Saud University-Computer and Information Sciences, 34(7):4385-4401, 2022.
+Guanghai Dai, Jun Zhou, Jiahui Huang, and Ning Wang. Hs-cnn: a cnn with hybrid convolution scale for eeg motor imagery classification. Journal of neural engineering, 17(1):016025, 2020.
+Muhammad Najam Dar, Muhammad Usman Akram, Sajid Gul Khawaja, and Amit N Pujari. Cnn and lstm-based emotion charting using physiological signals. Sensors, 20(16):4551, 2020.
+
+Mostafa Dehghani, Josip Djolonga, Basil Mustafa, Piotr Padlewski, Jonathan Heek, Justin Gilmer, Andreas Steiner, Mathilde Caron, Robert Geirhos, Ibrahim Alabdulmohsin, et al. Scaling vision transformers to 22 billion parameters. In Proceedings of the 40th International Conference on Machine Learning, pp. 7480-7512, 2023.
+Guifeng Deng, Mengfan Niu, Yuxi Luo, Shuying Rao, Jing Sun, Junyi Xie, Zhenghe Yu, Wenjuan Liu, Sha Zhao, Gang Pan, Xiaojing Li, Wei Deng, Wanjuan Guo, Tao Li, and Haiteng Jiang. Lpsgm: A unified flexible large psg model for sleep staging and mental disorder diagnosis. medRxiv, 2024. doi: 10.1101/2024.12.11.24318815. URL https://www.medrxiv.org/content/ early/2024/12/11/2024.12.11.24318815.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
+Yi Ding, Neethu Robinson, Su Zhang, Qiuhao Zeng, and Cuntai Guan. Tsception: Capturing temporal dynamics and spatial asymmetry from eeg for emotion recognition. IEEE Transactions on Affective Computing, 2022.
+Yi Ding, Neethu Robinson, Chengxuan Tong, Qiuhao Zeng, and Cuntai Guan. Lggnet: Learning from local-global-graph representations for brain-computer interface. IEEE Transactions on Neural Networks and Learning Systems, pp. 1-14, 2023.
+Xiaoyi Dong, Jianmin Bao, Dongdong Chen, Weiming Zhang, Nenghai Yu, Lu Yuan, Dong Chen, and Baining Guo. Cswin transformer: A general vision transformer backbone with cross-shaped windows. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 12124-12134, 2022.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
+Yang Du, Yongling Xu, Xiaoan Wang, Li Liu, and Pengcheng Ma. Eeg temporal-spatial transformer for person identification. *Scientific Reports*, 12(1):14378, 2022.
+Yassine El Ouahidi, Vincent Gripon, Bastien Pasdeloup, Ghaith Bouallegue, Nicolas Farrugia, and Giulia Lioi. A strong and simple deep learning baseline for bci motor imagery decoding. IEEE transactions on neural systems and rehabilitation engineering, 32:3338-3347, 2024.
+Emadeldeen Eldele, Mohamed Ragab, Zhenghua Chen, Min Wu, Chee Keong Kwoh, Xiaoli Li, and Cuntai Guan. Time-series representation learning via temporal and contextual contrasting. arXiv preprint arXiv:2106.14112, 2021.
+Navid Mohammadi Foumani, Geoffrey Mackellar, Soheila Ghane, Saad Irtza, Nam Nguyen, and Mahsa Salehi. Eeg2rep: Enhancing self-supervised eeg representation through informative masked inputs. arXiv preprint arXiv:2402.17772, 2024.
+Pengxuan Gao, Tianyu Liu, Jia-Wen Liu, Bao-Liang Lu, and Wei-Long Zheng. Multimodal multiview spectral-temporal masked autoencoder for self-supervised emotion recognition. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1926-1930. IEEE, 2024.
+Ary L Goldberger, Luis AN Amaral, Leon Glass, Jeffrey M Hausdorff, Plamen Ch Ivanov, Roger G Mark, Joseph E Mietus, George B Moody, Chung-Kang Peng, and H Eugene Stanley. Physiobank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals. circulation, 101(23):e215-e220, 2000.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
+Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dólár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16000-16009, 2022.
+
+Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019.
+Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Cnet: Criss-cross attention for semantic segmentation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 603-612, 2019.
+Conrad Iber, Sonia Ancoli-Israel, Andrew L. Chesson, and Stuart F. Quan. The American Academy of Sleep Medicine (AASM) Manual for the Scoring of Sleep and Associated Events: Rules, Terminology and Technical Specifications, volume 1. American academy of sleep medicine Westchester, IL, 2007.
+Ji-Hoon Jeong, Jeong-Hyun Cho, Young-Eun Lee, Seo-Hyun Lee, Gi-Hwan Shin, Young-Seok Kweon, José del R Millán, Klaus-Robert Müller, and Seong-Whan Lee. 2020 international brain-computer interface competition: A review. Frontiers in Human Neuroscience, 16:898300, 2022.
+Ziyu Jia, Youfang Lin, Jing Wang, Ronghao Zhou, Xiaojun Ning, Yuanlai He, and Yaoshuai Zhao. Graphsleepnet: Adaptive spatial-temporal graph convolutional networks for sleep stage classification. In *IJCAI*, volume 2021, pp. 1324–1330, 2020.
+Ziyu Jia, Youfang Lin, Jing Wang, Xiaojun Ning, Yuanlai He, Ronghao Zhou, Yuhan Zhou, and H Lehman Li-wei. Multi-view spatial-temporal graph convolutional networks with domain generalization for sleep stage classification. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 29:1977-1986, 2021.
+Weibang Jiang, Liming Zhao, and Bao liang Lu. Large brain model for learning generic representations with tremendous EEG data in BCI. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=QzTpTRVtrP.
+Jin Jing, Wendong Ge, Shenda Hong, Marta Bento Fernandes, Zhen Lin, Chaoqi Yang, Sungtae An, Aaron F Struck, Aline Herlopian, Ioannis Karakis, et al. Development of expert-level classification of seizures and rhythmic and periodic patterns during eeg interpretation. *Neurology*, 2023.
+Sirvan Khalighi, Teresa Sousa, José Moutinho Santos, and Urbano Nunes. Isruc-sleep: A comprehensive public dataset for sleep researchers. Computer methods and programs in biomedicine, 124: 180-192, 2016.
+Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4015-4026, 2023.
+Demetres Kostas, Stephane Aroca-Ouellette, and Frank Rudzicz. Bendr: using transformers and a contrastive self-supervised learning task to learn from massive amounts of eeg data. Frontiers in Human Neuroscience, 15:653659, 2021.
+Vernon J Lawhern, Amelia J Solon, Nicholas R Waytowich, Stephen M Gordon, Chou P Hung, and Brent J Lance. Eegnet: a compact convolutional neural network for eeg-based brain-computer interfaces. Journal of neural engineering, 15(5):056013, 2018.
+Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436-444, 2015.
+Hongli Li, Man Ding, Ronghua Zhang, and Chunbo Xiu. Motor imagery eeg classification algorithm based on cnn-lstm feature fusion network. Biomedical signal processing and control, 72:103342, 2022.
+Jiyao Liu, Li Zhang, Hao Wu, and Huan Zhao. Transformers for eeg emotion recognition. arXiv preprint arXiv:2110.06553, 2021a.
+Wei Liu, Jie-Lin Qiu, Wei-Long Zheng, and Bao-Liang Lu. Comparing recognition performance and robustness of multimodal deep learning models for multimodal emotion recognition. IEEE Transactions on Cognitive and Developmental Systems, 14(2):715-729, 2021b.
+
+Xiao Liu, Fanjin Zhang, Zhenyu Hou, Li Mian, Zhaoyu Wang, Jing Zhang, and Jie Tang. Self-supervised learning: Generative or contrastive. IEEE transactions on knowledge and data engineering, 35(1):857-876, 2021c.
+Fabien Lotte, Marco Congedo, Anatole Lecuyer, Fabrice Lamarche, and Bruno Arnaldi. A review of classification algorithms for eeg-based brain-computer interfaces. Journal of neural engineering, 4(2):R1, 2007.
+Jun Ma, Banghua Yang, Wenzheng Qiu, Yunzhe Li, Shouwei Gao, and Xinxing Xia. A large eeg dataset for studying cross-session variability in motor imagery brain-computer interface. Scientific Data, 9(1):531, 2022.
+Dennis J McFarland, Charles W Anderson, K-R Muller, Alois Schlogl, and Dean J Krusienski. Bci meeting 2005-workshop on bci signal processing: feature extraction and translation. IEEE transactions on neural systems and rehabilitation engineering, 14(2):135-138, 2006.
+Leland McInnes, John Healy, and James Melville. Umap: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426, 2018.
+Jianliang Min, Ping Wang, and Jianfeng Hu. Driver fatigue detection through multiple entropy fusion analysis in an eeg-based system. PLoS one, 12(12):e0188756, 2017.
+Wajid Mumtaz. MDD Patients and Healthy Controls EEG Data (New). 11 2016. doi: 10.6084/m9.figshare.4244171.v2. URL https://figshare.com/articles/dataset/ EEG_Data_New/4244171.
+Yuqi Nie, Nam H Nguyen, Phanwadee Sinthong, and Jayant Kalagnanam. A time series is worth 64 words: Long-term forecasting with transformers. arXiv preprint arXiv:2211.14730, 2022.
+Iyad Obeid and Joseph Picone. The temple university hospital eeg data corpus. Frontiers in neuroscience, 10:196, 2016.
+Gang Pan, Jia-Jun Li, Yu Qi, Hang Yu, Jun-Ming Zhu, Xiao-Xiang Zheng, Yue-Ming Wang, and Shao-Min Zhang. Rapid decoding of hand gestures in electrocorticography using recurrent neural networks. Frontiers in neuroscience, 12:555, 2018.
+Saman Parvaneh, Jonathan Rubin, Saeed Babaeizadeh, and Minnan Xu-Wilson. Cardiac arrhythmia detection using deep learning: A review. Journal of electrocardiology, 57:S70-S74, 2019.
+Wei Yan Peh, Yuanyuan Yao, and Justin Dauwels. Transformer convolutional neural networks for automated artifact detection in scalp eeg. In 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), pp. 3599-3602. IEEE, 2022.
+Mathias Perslev, Sune Darkner, Lykke Kempfner, Miki Nikolic, Poul Jørgen Jennum, and Christian Igel. U-sleep: resilient high-frequency sleep staging. NPJ digital medicine, 4(1):72, 2021.
+Huy Phan and Kaare Mikkelsen. Automatic sleep staging of eeg signals: recent development, challenges, and future directions. Physiological Measurement, 2022.
+Huy Phan, Fernando Andreotti, Navin Cooray, Oliver Y Chén, and Maarten De Vos. Sequsleepnet: end-to-end hierarchical recurrent neural network for sequence-to-sequence automatic sleep staging. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27(3):400-410, 2019.
+Huy Phan, Kaare Mikkelsen, Oliver Y Chén, Philipp Koch, Alfred Mertins, and Maarten De Vos. Sleeptransformer: Automatic sleep staging with interpretability and uncertainty quantification. IEEE Transactions on Biomedical Engineering, 69(8):2456-2467, 2022.
+Yu Qi, Bin Liu, Yueming Wang, and Gang Pan. Dynamic ensemble modeling approach to nonstationary neural decoding in brain-computer interfaces. In Proceedings of the 33rd International Conference on Neural Information Processing Systems, pp. 6089-6098, 2019.
+
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 18-24 Jul 2021.
+Siavash Sakhavi, Cuntai Guan, and Shuicheng Yan. Learning temporal information for brain-computer interface using convolutional neural networks. IEEE transactions on neural networks and learning systems, 29(11):5619-5629, 2018.
+Gerwin Schalk, Dennis J McFarland, Thilo Hinterberger, Niels Birbaumer, and Jonathan R Wolpaw. Bci2000: a general-purpose brain-computer interface (bci) system. IEEE Transactions on biomedical engineering, 51(6):1034-1043, 2004.
+Robin Tibor Schirrmeister, Jost Tobias Springenberg, Lukas Dominique Josef Fiederer, Martin Glasstetter, Katharina Eggensperger, Michael Tangermann, Frank Hutter, Wolfram Burgard, and Tonio Ball. Deep learning with convolutional neural networks for eeg decoding and visualization. Human brain mapping, 38(11):5391-5420, 2017.
+Rym Nihel Sekkal, Fethi Bereksi-Reguig, Daniel Ruiz-Fernandez, Nabil Dib, and Samira Sekkal. Automatic sleep stage classification: From classical machine learning methods to deep learning. Biomedical Signal Processing and Control, 77:103751, 2022.
+Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. 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.
+Ali Hossam Shoeb. Application of machine learning to epileptic seizure onset detection and treatment. PhD thesis, Massachusetts Institute of Technology, 2009.
+Yonghao Song, Xueyu Jia, Lie Yang, and Longhan Xie. Transformer-based spatial-temporal feature learning for eeg decoding. arXiv preprint arXiv:2106.11170, 2021.
+Yonghao Song, Qingqing Zheng, Bingchuan Liu, and Xiaorong Gao. Eeg conformer: Convolutional transformer for eeg decoding and visualization. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 31:710-719, 2022.
+Akara Supratak, Hao Dong, Chao Wu, and Yike Guo. Deepsleepnet: A model for automatic sleep stage scoring based on raw single-channel eeg. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 25(11):1998-2008, 2017.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
+Christopher Wang, Vighnesh Subramaniam, Adam Uri Yaari, Gabriel Kreiman, Boris Katz, Ignacio Cases, and Andrei Barbu. Brainbert: Self-supervised representation learning for intracranial recordings. In The Eleventh International Conference on Learning Representations, 2022.
+Guangyu Wang, Wenchao Liu, Yuhong He, Cong Xu, Lin Ma, and Haifeng Li. EEGPT: Pretrained transformer for universal and reliable representation of EEG signals. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024a. URL https://openreview.net/forum?id=1vS2b8CjG5.
+Jialing Wang, Shiwei Cheng, Jieming Tian, and Yuefan Gao. A 2d cnn-lstm hybrid algorithm using time series segments of eeg data for motor imagery classification. Biomedical Signal Processing and Control, 83:104627, 2023a.
+Jiquan Wang, Sha Zhao, Yangxuan Zhou, Haiteng Jiang, Zhenghe Yu, Tao Li, Shijian Li, and Gang Pan. Narcolepsy diagnosis with sleep stage features using psg recordings. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 2023b.
+
+Jiquan Wang, Sha Zhao, Haiteng Jiang, Shijian Li, Tao Li, and Gang Pan. Generalizable sleep staging via multi-level domain alignment. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 265-273, 2024b.
+Jiquan Wang, Sha Zhao, Haiteng Jiang, Yangxuan Zhou, Zhenghe Yu, Tao Li, Shijian Li, and Gang Pan. Caresleepnet: A hybrid deep learning network for automatic sleep staging. IEEE Journal of Biomedical and Health Informatics, 2024c.
+Ping Wang, Aimin Jiang, Xiaofeng Liu, Jing Shang, and Li Zhang. Lstm-based eeg classification in motor imagery tasks. IEEE transactions on neural systems and rehabilitation engineering, 26(11): 2086-2095, 2018.
+Gerald Woo, Chenghao Liu, Akshit Kumar, Caiming Xiong, Silvio Savarese, and Doyen Sahoo. Unified training of universal time series forecasting transformers. arXiv preprint arXiv:2402.02592, 2024.
+Zhaohui Wu, Gang Pan, and Nenggan Zheng. Cyborg intelligence. IEEE Intelligent Systems, 28(5): 31-33, 2013.
+Zhenda Xie, Zheng Zhang, Yue Cao, Yutong Lin, Jianmin Bao, Zhuliang Yao, Qi Dai, and Han Hu. Simmim: A simple framework for masked image modeling. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9653-9663, 2022.
+Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tie-Yan Liu. On layer normalization in the transformer architecture. In Proceedings of the 37th International Conference on Machine Learning, pp. 10524-10533, 2020.
+Chaoqi Yang, Danica Xiao, M Brandon Westover, and Jimeng Sun. Self-supervised EEG representation learning for automatic sleep staging. arXiv preprint arXiv:2110.15278, 2021.
+Chaoqi Yang, Zhenbang Wu, Patrick Jiang, Zhen Lin, and Jimeng Sun. Pyhealth: A deep learning toolkit for healthcare predictive modeling, 09 2022. URL https://github.com/sunlabuiuc/PyHealth, 2022.
+Chaoqi Yang, M Westover, and Jimeng Sun. Biot: Biosignal transformer for cross-data learning in the wild. In Advances in Neural Information Processing Systems, volume 36, pp. 78240-78260, 2023.
+Ikhay Yildiz, Rachael Garner, Matthew Lai, and Dominique Duncan. Unsupervised seizure identification on EEG. Computer methods and programs in biomedicine, 215:106604, 2022.
+Zhizhang Yuan, Daoze Zhang, Junru Chen, Geifei Gu, and Yang Yang. Brant-2: Foundation model for brain signals. arXiv preprint arXiv:2402.10251, 2024.
+Daoze Zhang, Zhizhang Yuan, Yang Yang, Junru Chen, Jingjing Wang, and Yafeng Li. Brant: Foundation model for intracranial neural signal. In Advances in Neural Information Processing Systems, 2023.
+Daoze Zhang, Zhizhang Yuan, Junru Chen, Kerui Chen, and Yang Yang. Brant-x: A unified physiological signal alignment framework. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 4155-4166, 2024.
+Ruilong Zhang, Qun Zong, Liqian Dou, and Xinyi Zhao. A novel hybrid deep learning scheme for four-class motor imagery classification. Journal of neural engineering, 16(6):066004, 2019a.
+Shaomin Zhang, Sheng Yuan, Lipeng Huang, Xiaoxiang Zheng, Zhaohui Wu, Kedi Xu, and Gang Pan. Human mind control of rat cyborg's continuous locomotion with wireless brain-to-brain interface. Scientific reports, 9(1):1321, 2019b.
+Xiang Zhang, Ziyuan Zhao, Theodoros Tsiligkaridis, and Marinka Zitnik. Self-supervised contrastive pre-training for time series via time-frequency consistency. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 3988-4003. Curran Associates, Inc., 2022.
+
+Yangxuan Zhou, Sha Zhao, Jiquan Wang, Haiteng Jiang, Benyan Luo, Tao Li, Gang Pan, et al. Personalized sleep staging leveraging source-free unsupervised domain adaptation. arXiv preprint arXiv:2412.12159, 2024a.
+Yangxuan Zhou, Sha Zhao, Jiquan Wang, Haiteng Jiang, Zhenghe Yu, Shijian Li, Tao Li, and Gang Pan. Simplifying multimodal with single eog modality for automatic sleep staging. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 32:1668-1678, 2024b.
+Igor Zyma, Sergii Tukaev, Ivan Seleznov, Ken Kiyono, Anton Popov, Mariia Chernykh, and Oleksii Shpenkov. Electroencephalograms during mental arithmetic task performance. Data, 4(1):14, 2019.
+
+# A RELATED WORK
+
+EEG Decoding. EEG is a non-invasive technique to measure brain activity. Early studies on EEG decoding predominantly employed traditional machine learning methods (Bashashati et al., 2007; McFarland et al., 2006; Lotte et al., 2007; Qi et al., 2019), which usually depend on handcrafted features that require lots of prior knowledge and could have weak generalizability. With the development of deep learning (LeCun et al., 2015) techniques, an increasing number of researchers are shifting their focus to studying EEG decoding methods based on deep learning (Parvaneh et al., 2019; Craik et al., 2019; Al-Saegh et al., 2021; Sekkal et al., 2022; Yang et al., 2022). For example, some studies utilize convolutional neural network (CNN) to extract temporal and spatial features from EEG for different BCI tasks like motor imagery classification, emotion recognition and seizure detection (Schirrmeister et al., 2017; Sakhavi et al., 2018; Lawhern et al., 2018; Abdelhameed & Bayoumi, 2021; Ding et al., 2022). Long Short-Term Memory (LSTM) is also used for EEG feature extraction and classification on BCI tasks such as motor imagery classification and sleep staging (Wang et al., 2018; Phan et al., 2019). Some researchers propose CNN-LSTM to learn EEG features for motor imagery classification, emotion recognition and sleep staging (Supratak et al., 2017; Zhang et al., 2019a; Dar et al., 2020; Li et al., 2022; Wang et al., 2023a), where CNN is usually used to extract local features and LSTM is utilized to capture global dependencies. Transformer architecture is also utilized to learn spatial-temporal feature for BCI tasks including emotion recognition, sleep staging and person identification (Song et al., 2021; Liu et al., 2021a; Du et al., 2022; Phan et al., 2022). To combine the strengths of CNN and transformer, some works devise a CNN-Transformer network for EEG classification (Song et al., 2022; Peh et al., 2022; Wang et al., 2023b; Zhou et al., 2024b; Wang et al., 2024c). In addition, some studies use graph neural networks learn spatial-temporal features from multi-channel EEG for various BCI tasks (Jia et al., 2020; 2021; Ding et al., 2023). These methods perform well on specific tasks or datasets, but collecting labeled EEG data is costly and labor-intensive. Meantime, the variations in EEG signal formats across different datasets pose challenges for enhancing model performance and generalizability.
+
+Brain Foundation Model. A foundation model (Bommasani et al., 2021) is a deep learning model trained on extensive data, typically using self-supervision at a large scale, and can be adapted, such as through fine-tuning, for various downstream tasks. Foundation models, such as BERT (Devlin et al., 2018), MAE (He et al., 2022), CLIP (Radford et al., 2021), GPT-4 (Achiam et al., 2023), SAM (Kirillov et al., 2023) and SORA (Brooks et al., 2024), have achieved remarkable success in computer vision, natural language, and multimodal, but there is still a vast unexplored potential for foundation models in brain signals. Some studies propose time series pre-trained models (Eldele et al., 2021; Zhang et al., 2022; Woo et al., 2024; Chen et al., 2024; Deng et al., 2024) based on contrastive learning or others for many scenarios (e.g., weather, traffic flow, exchange rates), one of which is brain signals. Some studies learn unsupervised representations from EEG by utilizing self-supervised learning pretext tasks to uncover the structure of clinical EEG signals (Banville et al., 2021). BENDER (Kostas et al., 2021) is proposed to address the problem of limited labeled data on EEG by using a contrastive self-supervised learning task to learn generic EEG representations. MAEEG (Chien et al., 2022) is masked auto-encoder for learning EEG representations by reconstruction-based self-supervised learning. BrainBERT (Wang et al., 2022) is a pre-training model for intracranial recordings, which learns a complex non-linear transformation of neural data by construction of the masked stereo-electroencephalographic (SEEG) spectrogram. Brant (Zhang et al., 2023) is a foundation model for intracranial neural signals which attends long-term dependency and captures spatial correlation across channels. Brant-2 (Yuan et al., 2024) represents an improved version of Brant, tailored for the integration of scalp EEG and intracranial EEG. Brant-X (Zhang et al., 2024) extends this framework to achieve alignment between different physiological signals and EEG. BIOT (Yang et al., 2023) is a generic biosignal learning model which enables joint pre-training and knowledge transfer across different biosignal datasets in the wild. EEG2Rep (Foumani et al., 2024) is a self-prediction approach for self-supervised representation learning from EEG, which predicting masked inputs in the latent representation space. LaBraM (Jiang et al., 2024) is a large brain model, which learns EEG generic representations by predicting the corresponding neural tokens of masked EEG patches. EEGPT (Wang et al., 2024a) is a pretrained transformer model designed for universal EEG feature extraction, based on a mask-based dual self-supervised learning method for efficient feature extraction. However, most of existing EEG foundational model the spatial and temporal dependencies between all EEG patches together, ignoring the unique structural characteristics of
+
+EEG signals. Meanwhile, existing EEG foundation models have limited generalizability, performing well only on a limited range of downstream tasks.
+
+# B MORE DETAILS FOR EXPERIMENTAL SETTINGS ON PRE-TRAINING
+
+Here, we introduce more details for experimental settings on CBetaMod pre-training.
+
+For preprocessing of pre-training dataset, as C Bra Mod adopts criss-cross EEG modeling which can address EEG signals with long time duration well, we segment all EEG recordings to 30-second EEG samples, which is longer than the time duration of pre-training samples on existing studies such as BIOT (Yang et al., 2023) (10 seconds) and LaBraM (Jiang et al., 2024) (4 or 8 seconds). We choose this time duration for two main reasons: 1) longer segments may help the model learn more long-term dependencies, potentially improving performance on downstream tasks, as noted in BENDER (Kostas et al., 2021); 2) 30 seconds generally covers the length of EEG sample segments for all the downstream tasks in this work. More hyperparameters are listed in Table 5.
+
+Table 5: Hyperparameters for CBetaMod pre-training.
+
+
+
+# C PRE-TRAINING VISUALIZATION
+
+The pretraining loss curve of CBetaMod is presented in Figure 6. From the curve, it is evident that during the 40-epoch pretraining process, the loss function generally follows a downward trend, with minor fluctuations observed between epochs 10 and 14. The overall trend suggests that our model is effectively learning from the pretraining data, leading to the extraction of reliable EEG representations.
+
+
+Figure 6: The pre-training loss curve of CBetaMod.
+
+# D MORE DETAILS FOR EXPERIMENTAL SETTINGS ON DOWNSTREAM BCI TASKS
+
+We provide more details for experiment settings on downstream BCI tasks.
+
+# D.1 MORE DETAILS FOR DOWNSTREAM TASK
+
+I. Emotion Recognition refers to detecting and interpreting emotional states or patterns based on EEG. We choose FACED (Chen et al., 2023) and SEED-V (Liu et al., 2021b) as downstream datasets for this task.
+
+II. Motor Imagery Classification is a process that involves decoding or classifying motor imagery tasks based on brain activity patterns captured through EEG. We use PhysioNet-MI (Schalk et al., 2004) and SHU-MI (Ma et al., 2022) to evaluate the performance of CBraMod on this task.
+
+III. Sleep Staging, also known as sleep stage classification, categorizes different stages of sleep based on physiological signals (e.g. EEG) recorded during sleep. ISRUC (Khalighi et al., 2016) is a commonly used benchmark for sleep staging.
+
+IV. Seizure Detection refers to the process of identifying and recognizing epileptic seizures based on physiological signals, such as EEG. Here, CHB-MIT (Shoeb, 2009) is chosen for this task.
+
+V. Imagined Speech Classification involves the identification and interpretation of imagined speech or covert speech intentions based on brain activity patterns such as EEG. BCIC2020-3 (Jeong et al., 2022) is a dataset for this task on 2020 international brain-computer interface competition.
+
+VI. Mental Disorder Diagnosis refers to the process of identifying and categorizing mental health states based on EEG. Mumtaz2016 (Mumtaz, 2016) is an EEG dataset collected from patients with major depressive disorder and normal controls.
+
+VII. Vigilance Estimation refers to the assessment and measurement of an individual's level of vigilance or sustained attention from EEG. SEED-VIG (Min et al., 2017) is dataset used to assess the level of vigilance.
+
+VIII. Mental Stress Detection involves using EEG to identify an individual's level of stress. MentalArithmetic (Zyma et al., 2019) is a dataset containing EEG recordings of subjects before and during the performance of mental arithmetic tasks.
+
+IX. EEG Events Classification involves the categorization and identification of specific events or patterns in EEG. We choose TUEV (Obeid & Picone, 2016) for evaluation, which was consistent with BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024).
+
+X. Abnormal Detection refers to the process of identifying and detecting abnormal patterns or events in EEG. Similarly, TUAB (Obeid & Picone, 2016) is used for evaluation, consistent with BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024).
+
+# D.2 BASELINES
+
+Here, we introduce the details of the baselines for performance evaluation.
+
+EEGNet (Lawhern et al., 2018) is a compact convolutional neural network based on depthwise and separable convolutions.
+
+EEGConformer (Song et al., 2022) is EEG model using CNN to learn low-level local features and self-attention to extract the global correlation within the local temporal features.
+
+SPaRCNet (Jing et al., 2023) is a deep neural network based on 1D CNN with dense residual connections.
+
+ContraWR (Yang et al., 2021) is a CNN based model, which first transforms the biosignals into multi-channel spectrogram and then uses 2D-CNN based ResNet (He et al., 2016) to extract features from spectrogram.
+
+CNN-Transformer (Peh et al., 2022) is model utilizing CNN to extract local features and using transformer to capture global dependencies.
+
+FFCL (Li et al., 2022) is neural network combining CNN and LSTM in parallel, where the CNN extracts spatial features and the LSTM extracts temporal features.
+
+ST-Transformer Song et al. (2021) is a transformer based network which relies on the attention mechanism to learn the spatial and temporal features of EEG signals.
+
+BIOT (Yang et al., 2023) is an EEG foundation model which learns EEG generic representations based on linear transformer and supervised-unsupervised-combined pre-training. It is worth noting that the pre-trained BIOT can only accept EEG signals with a maximum of 18 channels as input. Therefore, for EEG signals with more than 18 channels, we will use multiple BIOT models to process different sets of channels.
+
+LaBraM (Jiang et al., 2024) is a large brain model, which learns EEG generic representations by predicting the corresponding neural tokens of masked EEG patches based on full-attention transformer.
+
+# D.3 METRICS
+
+In this section, we introduce the details of the metrics used in the paper. Consistent with LaBraM (Jiang et al., 2024), we adopt the following metrics:
+
+Balanced Accuracy is a performance metric that considers the accuracy of each class in imbalanced datasets, which is defined as the average of recall obtained on each class. We use it for both binary classification and multi-class classification.
+
+AUC-PR is a performance metric calculating the area under the precision recall (PR) curve for binary classification task.
+
+AUROC is a widely used statistic calculating the area under the receiver operating characteristic (ROC) curve. We use it for binary classification.
+
+Coken's Kappa is a statistical measure used to assess the agreement between two raters or classifiers in categorical classification tasks, which is usually used for imbalanced multi-class classification task.
+
+Weighted F1 is a weighted average of individual F1-scores from each class, with each score weighted by the number of samples in the corresponding class, which provides a reliable measure in multi-class classification tasks.
+
+Pearson's correlation is a statistical measure that quantifies the linear relationship between two continuous variables, which can be used to quantify the performance of a regression model.
+
+R2 score, also known as the coefficient of determination, is a statistical measure commonly used to evaluate the goodness of fit of a regression model.
+
+RMSE (Root Mean Square Error) is a commonly used performance metric in regression tasks to measure the average magnitude of the errors made by a regression model, which calculates the square root of the average of the squared differences between the predicted values and the true values.
+
+# D.4 FINE-TUNING
+
+Table 6: Hyperparameters for CBetaMod fine-tuning.
+
+
Hyperparameters
Settings
Epochs
50
Batch size
64
Dropout
0.1
Optimizer
AdamW
Learning rate
1e-4
Adam β
(0.9, 0.999)
Adam ε
1e-8
Weight decay
5e-2
Scheduler
CosineAnnealingLR
Cosine cycle epochs
50
Minimal learning rate
1e-6
Clipping gradient norm
1
Label smoothing (multi-class classification)
0.1
+
+We load the pre-trained weights of C BraMod and replace the reconstruction head with a task-specific head which is composed of multi-layer perceptrons. Here the learned EEG representations are flattened and fed into the task-specific head for downstream tasks. Then we fine-tune C BraMod in downstream datasets. We employ binary cross-entropy (BCE) loss for binary classification, cross-entropy loss for multi-class classification, and mean-square-error loss function for regression. More hyperparameters for C BraMod fine-tuning on downstream datasets are shown in Table 6.
+
+# E MORE RESULTS ON OTHER DOWNSTEAM BCI TASKS
+
+In this section, we report more results of CBraMod and baselines on other downstream BCI tasks.
+
+# E.1 SLEEP STAGING
+
+Table 7: The results of different methods on sleep staging (ISRUC, 5-class).
+
+
Methods
Params
Balanced Accuracy
Cohen's Kappa
Weighted F1
EEGNet
0.003M
0.7154 ± 0.0121
0.7040 ± 0.0173
0.7513 ± 0.0124
EEGConformer
0.55M
0.7400 ± 0.0133
0.7143 ± 0.0162
0.7634 ± 0.0151
SPaRCNet
0.79M
0.7487 ± 0.0075
0.7097 ± 0.0132
0.7624 ± 0.0092
ContraWR
1.6M
0.7402 ± 0.0126
0.7178 ± 0.0156
0.7610 ± 0.0137
CNN-Transformer
3.2M
0.7363 ± 0.0087
0.7129 ± 0.0121
0.7719 ± 0.0105
FFCL
2.4M
0.7277 ± 0.0182
0.7016 ± 0.0291
0.7614 ± 0.0197
ST-Transformer
3.5M
0.7381 ± 0.0205
0.7013 ± 0.0352
0.7681 ± 0.0175
DeepSleepNet
21M
0.7419 ± 0.0144
0.7036 ± 0.0241
0.7643 ± 0.0122
USleep
1.1M
0.7586 ± 0.0116
0.7209 ± 0.0143
0.7805 ± 0.0105
BIOT
3.2M
0.7527 ± 0.0121
0.7192 ± 0.0231
0.7790 ± 0.0146
LaBraM-Base
5.8M
0.7633 ± 0.0102
0.7231 ± 0.0182
0.7810 ± 0.0133
CBraMod
4.0M
0.7865 ± 0.0110
0.7442 ± 0.0152
0.8011 ± 0.0099
+
+ISRUC (Khalighi et al., 2016) is a sleep dataset, which comprises 100 all-night PSG recordings of 100 adults. In our experiments, we used PSG recordings in Sub-group 1 to evaluate our method. The
+
+EEG signals of ISRUC are collected with 6 channels (F3-A2, C3-A2, O1-A2, F4-A1, C4-A1, O2-A1) and $200\mathrm{Hz}$ sampling rate. All EEG signals are segmented into 89,240 30-second samples, which are classified into five different sleep stages (Wake, N1, N2, N3, REM) by sleep experts according to the American Academy of Sleep Medicine (AASM) sleep standard (Iber et al., 2007). In our experiment, we set subject 1 to 80 as training set, subject 81 to 90 as validation set and subject 91 to 100 as test set. Notably, according to AASM standard (Iber et al., 2007), experts usually identify the current stage based on the transition patterns, combining the sleep stages of other samples in a sleep sequence together. The transition patterns of sleep stages between epochs play a critical role in automatic sleep staging. Existing works on sleep staging (Phan & Mikkelsen, 2022) usually regard sleep staging as a sequence-to-sequence classification task and set 20 as the sequence length, where one sleep sequence has 20 30-second samples. Therefore, in experiment on sleep staging, we set each compared model as sample encoder, and use a one-layer transformer as sequence encoder. Specifically, we included two widely recognized baseline in the field of sleep staging, DeepSleepNet (Supratak et al., 2017) and USleep (Perslev et al., 2021), to compare the performance of our method with that of classic algorithms in the field. As shown in Table 7, C BraMod outperforms all baselines. Specifically, C BraMod obtain significantly better performance compared to existing best method LaBraM (0.7442 v.s. 0.7231 in Cohen's Kappa).
+
+# E.2 SEIZURE DETECTION
+
+Table 8: The results of different methods on seizure detection (CHB-MIT, 2-class).
+
+
Methods
Params
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.003M
0.5658 ± 0.0106
0.1914 ± 0.0182
0.8048 ± 0.0136
EEGConformer
0.55M
0.5976 ± 0.0141
0.2209 ± 0.0215
0.8226 ± 0.0170
SPaRCNet
0.79M
0.5876 ± 0.0191
0.1247 ± 0.0119
0.8143 ± 0.0148
ContraWR
1.6M
0.6344 ± 0.0002
0.2264 ± 0.0174
0.8097 ± 0.0114
CNN-Transformer
3.2M
0.6389 ± 0.0067
0.2479 ± 0.0227
0.8662 ± 0.0082
FFCL
2.4M
0.6262 ± 0.0104
0.2049 ± 0.0346
0.8271 ± 0.0051
ST-Transformer
3.5M
0.5915 ± 0.0195
0.1422 ± 0.0094
0.8237 ± 0.0491
BIOT
3.2M
0.7068 ± 0.0457
0.3277 ± 0.0460
0.8761 ± 0.0284
LaBraM-Base
5.8M
0.7075 ± 0.0358
0.3287 ± 0.0402
0.8679 ± 0.0199
CBraMod
4.0M
0.7398 ± 0.0284
0.3689 ± 0.0382
0.8892 ± 0.0154
+
+CHB-MIT (Goldberger et al., 2000; Shoeb, 2009) is a database, collected at the Children's Hospital Boston, consisting of EEG recordings from 23 pediatric subjects with intractable seizures. Subjects were monitored for up to several days following withdrawal of anti-seizure medication in order to characterize their seizures and assess their candidacy for surgical intervention. All EEG signals are collected based on the international 10-20 system of EEG electrode positions and are sampled at $256\mathrm{Hz}$ , with binary classes (seizure or not). In our experiment, we preprocess the EEG signals of CHB-MIT based on the strategy consistent with BIOT (Yang et al., 2023). We use the common 16 bipolar montage channels for CHB-MIT dataset. All EEG signals are resampled to $200\mathrm{Hz}$ and divided 326,993 10-second samples. We use subject 1 to 19 for training, subject 20, 21 for validation, and subject 22,23 for test. The results of seizure detection are shown in Table 8. CBraMod achieves the state-of-the-art performance.
+
+# E.3 IMAGINED SPEECH CLASSIFICATION
+
+BCIC2020-3 (Jeong et al., 2022) is a dataset for imagined speech classification on 2020 international brain-computer interface competition. During the data collection experiment, 15 subjects were seated in a comfortable chair in front of a 24-inch LCD monitor screen. The subjects were instructed to imagine the silent pronunciation of the given word as if they were performing real speech, without moving any articulators nor making the sound. EEG signals of five-class imagined speech words/phrases ("hello", "help me", "stop", "thank you" and "yes") were recorded at 64 channels and $256\mathrm{Hz}$ sampling rate. Training, validation and test set are provided by the dataset. Specifically, 60 trials per class are released for training purpose, 10 trials per class are released for validation purpose and 10 trials per class are released for test purpose. The sum of trials is $80 \times 5 \times 15 = 6000$ .
+
+Table 9: The results of different methods on imagined speech classification (BCIC2020-3, 5-class).
+
+
Methods
Params
Balanced Accuracy
Cohen's Kappa
Weighted F1
EEGNet
0.003M
0.4413 ± 0.0096
0.3016 ± 0.0123
0.4413 ± 0.0102
EEGConformer
0.55M
0.4506 ± 0.0133
0.3133 ± 0.0183
0.4488 ± 0.0154
SPaRCNet
0.79M
0.4426 ± 0.0156
0.3033 ± 0.0233
0.4420 ± 0.0108
ContraWR
1.6M
0.4257 ± 0.0162
0.3078 ± 0.0218
0.4407 ± 0.0182
CNN-Transformer
3.2M
0.4533 ± 0.0092
0.3166 ± 0.0118
0.4506 ± 0.0127
FFCL
2.4M
0.4678 ± 0.0197
0.3301 ± 0.0359
0.4689 ± 0.0205
ST-Transformer
3.5M
0.4126 ± 0.0122
0.2941 ± 0.0159
0.4247 ± 0.0138
BIOT
3.2M
0.4920 ± 0.0086
0.3650 ± 0.0176
0.4917 ± 0.0079
LaBraM-Base
5.8M
0.5060 ± 0.0155
0.3800 ± 0.0242
0.5054 ± 0.0205
CBraMod
4.0M
0.5373 ± 0.0108
0.4216 ± 0.0163
0.5383 ± 0.0096
+
+One trial is a 3-second EEG signal, which is regard as one sample. Thus we get 6,000 64-channel 3-second EEG samples, which are resampled to $200\mathrm{Hz}$ . The experimental results of imagined speech classification are shown in Table 9. CBraMod achieves a great performance increases compared to the best baseline LaBraM (0.4216 v.s. 0.3800 in Cohen's Kappa).
+
+# E.4 MENTAL DISORDER DIAGNOSIS
+
+Table 10: The results of different methods on mental disorder diagnosis (Mumtaz2016, 2-class).
+
+
Methods
Params
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.003M
0.9232 ± 0.0104
0.9626 ± 0.0095
0.9639 ± 0.0093
EEGConformer
0.55M
0.9308 ± 0.0117
0.9684 ± 0.0105
0.9702 ± 0.0101
SPaRCNet
0.79M
0.9316 ± 0.0095
0.9754 ± 0.0065
0.9781 ± 0.0083
ContraWR
1.6M
0.9195 ± 0.0115
0.9589 ± 0.0102
0.9621 ± 0.0092
CNN-Transformer
3.2M
0.9305 ± 0.0068
0.9757 ± 0.0074
0.9742 ± 0.0059
FFCL
2.4M
0.9314 ± 0.0038
0.9717 ± 0.0021
0.9753 ± 0.0033
ST-Transformer
3.5M
0.9135 ± 0.0103
0.9578 ± 0.0086
0.9594 ± 0.0059
BIOT
3.2M
0.9358 ± 0.0052
0.9736 ± 0.0034
0.9758 ± 0.0042
LaBraM-Base
5.8M
0.9409 ± 0.0079
0.9798 ± 0.0093
0.9782 ± 0.0057
C BraMod
4.0M
0.9560 ± 0.0056
0.9923 ± 0.0032
0.9921 ± 0.0025
+
+Mumtaz2016 (Mumtaz, 2016) is an EEG dataset collected from 34 patients with major depressive disorder (MDD) and 30 normal controls (NCs). All EEG signals recorded from 19 electrodes placed according to the international 10-20 system. The sampling rate is $256\mathrm{Hz}$ . The data collection experiment comprises three sessions including eyes-open session, eyes-closs session and task session. In our experiment, we only use eyes-open and eyes-close sessions. 24 MDD patients and 19 NCs are used for training, 5 MDD patients and 4 NCs are used for validation, and 5 MDD patients and 5 NCs are used for test. EEG signals are band-pass filtered $(0.3\mathrm{Hz} - 75\mathrm{Hz})$ to remove low and high frequency noise, notch filtered $(50\mathrm{Hz})$ to remove power line noise and resampled to $200\mathrm{Hz}$ . Then we segment all EEG signals into 7,143 5-second samples. As shown in Table 10, C BraMod achieve the state-of-the-art performance. Specifically, C BraMod performs $1.4\%$ better compared to the best baseline LaBraM (0.9560 v.s. 0.9409 in balanced accuracy, 0.9923 v.s. 0.9798 in AUC-PR and 0.9921 v.s. 0.9782 in AUROC).
+
+# E.5 VIGILANCE ESTIMATION
+
+SEED-VIG (Min et al., 2017) is dataset oriented at exploring the vigilance estimation problem. In the data collection experiment, the researchers built a virtual driving system, in which an enormous screen is placed in front of a real car. Subjects can play a driving game in the car, as if they are driving in the real-world environment. The SEED-VIG dataset is collected when the subjects drive in the system. The vigilance level is labeled with the PERCLOS indicator by the SMI eye-tracking glasses. All EEG signals are recorded from 23 subjects at 17 channels and $200\mathrm{Hz}$ sampling rate, and
+
+Table 11: The results of different methods on vigilance estimation (SEED-VIG, regression).
+
+
Methods
Params
Pearson's Correlation
R2 Score
RMSE↓
EEGNet
0.003M
0.5701 ± 0.0167
0.2366 ± 0.0084
0.2828 ± 0.0074
EEGConformer
0.55M
0.5750 ± 0.0139
0.2344 ± 0.0091
0.2850 ± 0.0083
SPaRCNet
0.79M
0.5715 ± 0.0163
0.2433 ± 0.0055
0.2798 ± 0.0043
ContraWR
1.6M
0.5854 ± 0.0142
0.2453 ± 0.0062
0.2782 ± 0.0056
CNN-Transformer
3.2M
0.5714 ± 0.0172
0.2371 ± 0.0052
0.2805 ± 0.0039
FFCL
2.4M
0.5647 ± 0.0097
0.2301 ± 0.0035
0.2914 ± 0.0052
ST-Transformer
3.5M
0.5752 ± 0.0127
0.2366 ± 0.0071
0.2838 ± 0.0036
BIOT
3.2M
0.5996 ± 0.0182
0.2543 ± 0.0073
0.2742 ± 0.0029
LaBraM-Base
5.8M
0.5931 ± 0.0098
0.2432 ± 0.0085
0.2762 ± 0.0048
C BraMod
4.0M
0.6459 ± 0.0098
0.3365 ± 0.0068
0.2587 ± 0.0039
+
+are segmented into 20,355 8-second samples. In our experiment, we use subject 1 to 15 for training, subject 16 to 19 for validation and subject 20 to 23 for test. The experiment results of vigilance estimation are presented in Table 11. Obviously, CBetaMod obtains a great performance increases compared to the best baseline BIOT (0.5996 v.s. 0.6459 in Pearson's correlation, 0.3365 v.s. 0.2543 in R2 score and 0.2587 v.s. 0.2742 in RMSE).
+
+# E.6 MENTAL STRESS DETECTION
+
+Table 12: The results of different methods on mental stress detection (MentalArithmetic, 2-class).
+
+
Methods
Params
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.003M
0.6770 ± 0.0116
0.5763 ± 0.0102
0.7321 ± 0.0108
EEGConformer
0.55M
0.6805 ± 0.0123
0.5829 ± 0.0134
0.7424 ± 0.0128
SPaRCNet
0.79M
0.6879 ± 0.0107
0.5825 ± 0.0193
0.7418 ± 0.0132
ContraWR
1.6M
0.6631 ± 0.0097
0.5787 ± 0.0164
0.7332 ± 0.0082
CNN-Transformer
3.2M
0.6779 ± 0.0268
0.5777 ± 0.0285
0.7258 ± 0.0336
FFCL
2.4M
0.6798 ± 0.0142
0.5786 ± 0.0266
0.7330 ± 0.0198
ST-Transformer
3.5M
0.6631 ± 0.0173
0.5672 ± 0.0259
0.7132 ± 0.0174
BIOT
3.2M
0.6875 ± 0.0186
0.6004 ± 0.0195
0.7536 ± 0.0144
LaBraM-Base
5.8M
0.6909 ± 0.0125
0.5999 ± 0.0155
0.7721 ± 0.0093
C BraMod
4.0M
0.7256 ± 0.0132
0.6267 ± 0.0099
0.7905 ± 0.0073
+
+MentalArithmetic (Goldberger et al., 2000; Zyma et al., 2019) is a dataset containing EEG recordings of 36 subjects before and during the performance of mental arithmetic tasks. EEG recordings before mental arithmetic tasks are classified into the label of "without mental stress" and ones during mental arithmetic tasks are classified into the label of "with mental stress". All EEG signals are recorded from 20 electrodes placed according to the international 10-20 system at $500\mathrm{Hz}$ sampling rate. Band-pass filtering $(0.5\mathrm{Hz} - 45\mathrm{Hz})$ are used to remove low and high frequency noise. In our experiment, we resample EEG signals to $200\mathrm{Hz}$ and segment them into 1,707 5-second samples. Subject 1 to 28 are set to training set, subject 29 to 32 are set to validation set and subject 33 to 36 are set to test set. As shown in Table 12, C BraMod achieves the state-of-the-art performance. Specifically, C BraMod performs $2.5\%$ better compared to the best baselines LaBraM (0.7256 v.s. 0.6909 in balanced accuracy, 0.6267 v.s. 0.5999 in AUC-PR and 0.7905 v.s. 0.7721 in AUROC).
+
+# E.7 EVENT TYPE CLASSIFICATION
+
+TUEV (Obeid & Picone, 2016) is EEG corpus that contains annotations of EEG segments as one of six classes: (1) spike and sharp wave (SPSW), (2) generalized periodic epileptiform discharges (GPED), (3) periodic lateralized epileptiform discharges (PLED), (4) eye movement (EYEM), (5) artifact (ARTF) and (6) background (BCKG), which is usually used by existing studies (Yang et al., 2023; Jiang et al., 2024). The EEG signals are recorded at 23 channels and $250\mathrm{Hz}$ sampling rate. For fair comparison with reported results by BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024),
+
+Table 13: The results of different methods on event type classification (TUEV, 6-class).
+
+
Methods
Params
Balanced Accuracy
Cohen's Kappa
Weighted F1
EEGNet
0.003M
0.3876 ± 0.0143
0.3577 ± 0.0155
0.6539 ± 0.0120
EEGConformer
0.55M
0.4074 ± 0.0164
0.3967 ± 0.0195
0.6983 ± 0.0152
SPaRCNet
0.79M
0.4161 ± 0.0262
0.4233 ± 0.0181
0.7024 ± 0.0104
ContraWR
1.6M
0.4384 ± 0.0349
0.3912 ± 0.0237
0.6893 ± 0.0136
CNN-Transformer
3.2M
0.4087 ± 0.0161
0.3815 ± 0.0134
0.6854 ± 0.0293
FFCL
2.4M
0.3979 ± 0.0104
0.3732 ± 0.0188
0.6783 ± 0.0120
ST-Transformer
3.5M
0.3984 ± 0.0228
0.3765 ± 0.0306
0.6823 ± 0.0190
BIOT
3.2M
0.5281 ± 0.0225
0.5273 ± 0.0249
0.7492 ± 0.0082
LaBraM-Base
5.8M
0.6409 ± 0.0065
0.6637 ± 0.0093
0.8312 ± 0.0052
LaBraM-Large
46M
0.6581 ± 0.0156
0.6622 ± 0.0136
0.8315 ± 0.0040
LaBraM-Huge
369M
0.6616 ± 0.0170
0.6745 ± 0.0195
0.8329 ± 0.0086
CBraMod (excluding TUEV)
4.0M
0.6659 ± 0.0124
0.6744 ± 0.0121
0.8331 ± 0.0071
CBraMod
4.0M
0.6671 ± 0.0107
0.6772 ± 0.0096
0.8342 ± 0.0064
+
+we adopt a similar preprocessing strategy as theirs. Specifically, we use the common 16 bipolar montage channels in the international 10-20 system for TUEV. A band-pass filtered $(0.3\mathrm{Hz} - 75\mathrm{Hz})$ was applied to remove the low-frequency and high-frequency noise. A notch filter $(60\mathrm{Hz})$ was used to remove the power line noise. All EEG signals are resampled to $200\mathrm{Hz}$ and divided into 112,491 5-second samples. The original dataset provides the training and test splits. We further divide the training subjects into training and validation set by $80\% :20\%$ , consistent with BIOT. Given that the TUEV dataset is a subset of the pretraining dataset TUEG, we introduced an additional experimental setup, C BraMod (excluding TUEV), to eliminate potential effects of data leakage. In this setup, we excluded TUEV from the pretraining process, re-pretrained a new instance of C BraMod, and subsequently evaluated it on TUEV. The experimental results of event type classification are shown in Table 13. LaBraM-Huge achieves good performance with such a large number of parameters (369 M), but C BraMod still performs slightly better compared to it (0.6671 v.s. 0.6616 in balanced accuracy, 0.6772 v.s. 0.6745 in Cohen's Kappa and 0.8342 v.s. 0.8329 in weighted F1). C BraMod (excluding TUEV) exhibits slight fluctuations compared to C BraMod, yet it remains competitive. This indicates that our method successfully learns a generic EEG representation through pre-training, thereby enhancing the performance on datasets unseen during pre-training.
+
+# E.8 ABNORMAL DETECTION
+
+Table 14: The results of different methods on abnormal detection (TUAB, 2-class).
+
+
Methods
Params
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.003M
0.7642 ± 0.0036
0.8299 ± 0.0043
0.8412 ± 0.0031
EEGConformer
0.55M
0.7758 ± 0.0049
0.8427 ± 0.0054
0.8445 ± 0.0038
SPaRCNet
0.79M
0.7896 ± 0.0018
0.8414 ± 0.0018
0.8676 ± 0.0012
ContraWR
1.6M
0.7746 ± 0.0041
0.8421 ± 0.0104
0.8456 ± 0.0074
CNN-Transformer
3.2M
0.7777 ± 0.0022
0.8433 ± 0.0039
0.8461 ± 0.0013
FFCL
2.4M
0.7848 ± 0.0038
0.8448 ± 0.0065
0.8569 ± 0.0051
ST-Transformer
3.5M
0.7966 ± 0.0023
0.8521 ± 0.0026
0.8707 ± 0.0019
BIOT
3.2M
0.7959 ± 0.0057
0.8792 ± 0.0023
0.8815 ± 0.0043
LaBraM-Base
5.8M
0.8140 ± 0.0019
0.8965 ± 0.0016
0.9022 ± 0.0009
LaBraM-Large
46M
0.8226 ± 0.0015
0.9130 ± 0.0005
0.9127 ± 0.0005
LaBraM-Huge
369M
0.8258 ± 0.0011
0.9204 ± 0.0011
0.9162 ± 0.0016
CBraMod (excluding TUAB)
4.0M
0.8249 ± 0.0025
0.9221 ± 0.0015
0.9156 ± 0.0017
CBraMod
4.0M
0.8289 ± 0.0022
0.9258 ± 0.0008
0.9227 ± 0.0011
+
+We use TUAB (Obeid & Picone, 2016) for evaluation on abnormal detection consistent with BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024). TUAB is an EEG corpus that have been annotated as normal or abnormal. Similar to TUEV, the EEG signals of TUAB are recorded at 23 channels and $250\mathrm{Hz}$ sampling rate. For fair comparison, we also adopt a similar preprocess
+
+ing strategy as BIOT and LaBraM. The common 16 bipolar montage channels in the international 10-20 system are used for TUAB. We utilize a band-pass filtered $(0.3\mathrm{Hz} - 75\mathrm{Hz})$ to remove the low-frequency and high-frequency noise, and use a notch filter $(60\mathrm{Hz})$ to remove the power line noise. Then all EEG signals are resampled to $200\mathrm{Hz}$ and divided into 409,455 10-second samples, which are used for binary classification to predict normal/abnormal. The original dataset provides the training and test splits. Be same as BIOT, we further divide the training subjects into training and validation set by $80\% :20\%$ . Considering that the TUAB dataset is a subset of the pretraining dataset TUEG, we implemented an additional experimental setup, CBraMod (excluding TUAB), to mitigate potential data leakage effects. In this setup, TUAB was excluded from the pre-training process, a new instance of CBraMod was re-pretrained, and its performance was subsequently evaluated on TUAB. As shown in Table 14, CBraMod achieves the state-of-the-art performance, obtaining slightly better results compared to LaBraM-Huge. CBraMod (excluding TUAB) exhibits slight fluctuations compared to CBraMod but remains competitive, demonstrating its capability to learn generic EEG representations that enhance performance on datasets not encountered during pre-training.
+
+# E.9 MOTOR IMAGERY CLASSIFICATION
+
+Table 15: The results of different methods on motor imagery classification (BCIC-IV-2a, 4-class).
+
+
Methods
Params
Balanced Accuracy
AUC-PR
AUROC
EEGNet
0.003M
0.4482 ± 0.0094
0.2693 ± 0.0121
0.4226 ± 0.0108
EEGConformer
0.55M
0.4696 ± 0.0106
0.2924 ± 0.0141
0.4533 ± 0.0128
SPaRCNet
0.79M
0.4635 ± 0.0117
0.2847 ± 0.0147
0.4432 ± 0.0126
ContraWR
1.6M
0.4678 ± 0.0125
0.2905 ± 0.0160
0.4413 ± 0.0142
CNN-Transformer
3.2M
0.4600 ± 0.0108
0.2800 ± 0.0148
0.4460 ± 0.0114
FFCL
2.4M
0.4470 ± 0.0143
0.2627 ± 0.0176
0.4238 ± 0.0139
ST-Transformer
3.5M
0.4575 ± 0.0145
0.2733 ± 0.0198
0.4471 ± 0.0142
BIOT
3.2M
0.4748 ± 0.0093
0.2997 ± 0.0139
0.4607 ± 0.0125
LaBraM-Base
5.8M
0.4869 ± 0.0085
0.3159 ± 0.0154
0.4758 ± 0.0103
CBraMod
4.0M
0.5138 ± 0.0066
0.3518 ± 0.0094
0.4984 ± 0.0085
+
+To further validate the performance of C BraMod on the motor imagery tasks, we conducted additional experiments on the BCIC-IV-2a (Brunner et al., 2008) dataset2. The BCI Competition IV Dataset 2a, provided by Graz University of Technology, comprises EEG recordings from 9 subjects performing 4 motor imagery tasks: imagining movements of the left hand, right hand, both feet, and tongue. Data were collected over two sessions on separate days using $22\mathrm{Ag / AgCl}$ electrodes at a sampling rate of $250\mathrm{Hz}$ . Each session consisted of 288 EEG trials, with 72 trials per task. We used [2, 6] seconds of each trial. A band-pass filtered $(0.3\mathrm{Hz} - 40\mathrm{Hz})$ was applied to remove the low-frequency and high-frequency noise. We resample the EEG signals to $200\mathrm{Hz}$ and obtain 5,088 4-second samples. We use a strict subject-independent train/validation/test strategy as other MI datasets in our paper. Subject 1-5, 6-7, 8-9 are used for training, validation, and test, respectively. The results are shown in Table 15. C BraMod continues to outperform existing methods on this dataset, further reinforcing the generalizability of our method.
+
+All the results across such wide range of downstream BCI tasks indicate that CBraMod can learn generic EEG representations, which contributes to its strong capability and generalizability.
+
+# F SCALING DATA SIZE AND MODEL SIZE
+
+Given the positioning of this work as a foundational model, we conduct experiments to explore whether scaling laws hold at both the data scale and model size levels. Specifically, in the data scale experiments, we examine how the performance of C Bra Mod varies with different pretraining data sizes, ranging from 1 hour to 9000 hours. For the model size experiments, we design multiple variants
+
+
+(a) Performance comparison as the pre-training data increases.
+Figure 7: Scaling Data Size and Model Size.
+
+
+(b) Performance comparison as the model size increases.
+
+of C Bra Mod with varying model sizes (0.1M to 4M parameters) and evaluate their performance on downstream tasks. The results of these experiments are presented in Table 7. As shown in Table 7(a), the performance of C Bra Mod improves as the scale of pretraining data increases, although the rate of improvement slows beyond 1000 hours. Similarly, Table 7(b) demonstrates that larger model sizes lead to better performance in downstream tasks. Nevertheless, the 9000-hour pretraining data and 4M model size explored in this study do not represent the upper bounds of scaling laws. In the domain of large language models, both data scale and model size have already surpassed the billion-level threshold. While computational constraints have limited our exploration to this range, prior studies (Jiang et al., 2024) on scaling laws suggest that larger model sizes could further improve performance in EEG downstream tasks.
+
+# G ARCHITECTURE COMPARISON ON OUR PRE-TRAINING DATASETS
+
+
+Figure 8: Performance comparison with architectures of existing EEG foundation models on our pre-training datasets.
+
+In this paper, we use different model architecture and pre-training dataset compared to BIOT (Yang et al., 2023) and LaBraM (Jiang et al., 2024). To further evaluate whether the model architecture or the pre-training dataset contributes more to performance improvement, we conduct a comparison experiment. Specifically, we pre-trained the architecture of BIOT and LaBraM on our pre-training dataset with the same settings as CBraMod, and compared the performance with BIOT (original), LaBraM (original) and CBraMod on downstream datasets. The experimental results are shown in Figure 8.
+
+BIOT (ours) and BIOT (original) exhibit very similar performance. LaBraM (ours) generally achieves slightly better performance than LaBraM (original), particularly on the FACED dataset. But CBraMod performs significantly better than LaBraM (ours) on all datasets. All results empirically prove that the model architecture contributes more to the performance improvement compared to the larger size of pretraining dataset.
+
+# H COMPARISON ON SEGMENT LENGTH
+
+Table 16: Performance comparison on segment length of pre-training data. Bold indicates the best. Underline indicates the second best.
+
+
Methods
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
BIOT
0.5118 ± 0.0118
0.4476 ± 0.0254
0.5136 ± 0.0112
0.3837 ± 0.0187
0.2261 ± 0.0262
0.3856 ± 0.0203
LaBraM
0.5273 ± 0.0107
0.4698 ± 0.0188
0.5288 ± 0.0102
0.3976 ± 0.0138
0.2386 ± 0.0209
0.3974 ± 0.0111
CBraMod (4s)
0.5448 ± 0.0112
0.4938 ± 0.0132
0.5541 ± 0.0125
0.4086 ± 0.0136
0.2539 ± 0.0171
0.4097 ± 0.0126
CBraMod (8s)
0.5453 ± 0.0092
0.4950 ± 0.0119
0.5534 ± 0.0108
0.4083 ± 0.0144
0.2573 ± 0.0186
0.4112 ± 0.0131
CBraMod (30s)
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
Methods
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
BIOT
0.6153 ± 0.0154
0.4875 ± 0.0272
0.6158 ± 0.0197
0.6179 ± 0.0183
0.6770 ± 0.0119
0.6609 ± 0.0127
LaBraM
0.6173 ± 0.0122
0.4912 ± 0.0192
0.6177 ± 0.0141
0.6166 ± 0.0192
0.6761 ± 0.0083
0.6604 ± 0.0091
CBraMod (4s)
0.6360 ± 0.0113
0.5149 ± 0.0185
0.6374 ± 0.0128
0.6340 ± 0.0196
0.7089 ± 0.0110
0.6951 ± 0.0105
CBraMod (8s)
0.6392 ± 0.0104
0.5189 ± 0.0198
0.6398 ± 0.0096
0.6338 ± 0.0182
0.7098 ± 0.0105
0.6946 ± 0.0089
CBraMod (30s)
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
+
+We conduct an experiment to further evaluate the impact of segment length. Specifically, we pretrained CBetaMod in 4s or 8s segment length on our pre-training dataset and compared the results with BIOT, LaBraM and CBetaMod (30s). On most datasets, CBetaMod (4s or 8s) performs slightly worse than CBetaMod (30s), but significantly better than BIOT and LaBraM. It indicates that the segment length has an impact on performance improvement, but the effect is relatively minor.
+
+# I ABLATION STUDY ON TIME-DOMAIN AND FREQUENCY-DOMAIN SIGNALS
+
+Table 17: The results of ablation study on time-domain and frequency-domain signals.
+
+
Settings
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
Combining
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
Time-domain
0.5435 ± 0.0078
0.4956 ± 0.0134
0.5531 ± 0.0085
0.4078 ± 0.0134
0.2548 ± 0.0204
0.4077 ± 0.0123
Frequency-domain
0.5205 ± 0.0157
0.4652 ± 0.0241
0.5218 ± 0.0143
0.3987 ± 0.0184
0.2356 ± 0.0315
0.3975 ± 0.0201
Settings
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
Combining
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
Time-domain
0.6324 ± 0.0097
0.5108 ± 0.0175
0.6333 ± 0.0086
0.6302 ± 0.0145
0.7015 ± 0.0104
0.6879 ± 0.0094
Frequency-domain
0.6158 ± 0.0076
0.4898 ± 0.0138
0.6149 ± 0.0094
0.6181 ± 0.0167
0.6817 ± 0.0125
0.6659 ± 0.0113
+
+C Bra Mod combines both time-domain and frequency-domain signals to learn generic representation. Here, we conduct an ablation study to verify the effectiveness of time-domain and frequency-domain signals. The results are shown in Table 17. It is obvious that combining time-domain and frequency-domain signals achieves a better performance compared to only using time-domain features or frequency-domain signals, indicating that both time-domain and frequency-domain signals are important for learning EEG representations. Notably, only using time-domain signals performs significantly better compared to frequency-domain signals, and slightly worse compared to combining time-domain and frequency-domain signals. The reason could be that time-domain signals contain frequency-domain information, which can be implicitly captured by neural networks. However, frequency-domain signals lack time-domain information due to the FFT process, leading to a decrease in performance.
+
+# J ABLATION STUDY ON FINE-TUNING
+
+In this section, we conduct an ablation study on fine-tuning to explore the impact of fine-tuning. The experiment is designed as follows: 1) C BraMod: adjusting all parameters of C BraMod during training on downstream datasets; 2) C BraMod (fixed): fixing the pre-trained parameters of C BraMod and only adjusting the parameters of the classifier during training on downstream datasets. 3) BIOT (fixed): fixing the pre-trained parameters of BIOT and only adjusting the parameters of the classifier
+
+Table 18: The results of ablation study on fine-tuning. Bold indicates the best. Underline indicates the second best.
+
+
Settings
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
CBraMod
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
CBraMod (Fixed)
0.3146 ± 0.0346
0.2579 ± 0.0542
0.3077 ± 0.0298
0.2536 ± 0.0257
0.0842 ± 0.0384
0.2568 ± 0.0275
BIOT (Fixed)
0.2775 ± 0.0318
0.1839 ± 0.0512
0.2599 ± 0.0271
0.2461 ± 0.0287
0.0798 ± 0.0361
0.2489 ± 0.0257
LaBraM (Fixed)
0.3004 ± 0.0458
0.2377 ± 0.0617
0.2943 ± 0.0375
0.2521 ± 0.0267
0.0854 ± 0.0342
0.2543 ± 0.0265
Settings
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
CBraMod
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
CBraMod (Fixed)
0.3845 ± 0.0345
0.2983 ± 0.0498
0.3946 ± 0.0378
0.5217 ± 0.0247
0.5304 ± 0.0253
0.5238 ± 0.0317
BIOT (Fixed)
0.3698 ± 0.0371
0.2703 ± 0.0472
0.3723 ± 0.0364
0.5123 ± 0.0206
0.5215 ± 0.0197
0.5146 ± 0.0264
LaBraM (Fixed)
0.3715 ± 0.0432
0.2814 ± 0.0586
0.3796 ± 0.0472
0.5233 ± 0.0272
0.5329 ± 0.0284
0.5218 ± 0.0275
+
+during training on downstream datasets. 4) LaBraM (fixed): fixing the pre-trained parameters of LaBraM and only adjusting the parameters of the classifier during training on downstream datasets. The results are shown in Table 18. Obviously, fixing the pre-trained parameters during training on downstream datasets will lead to a very large performance decline. It indicates that C BraMod cannot currently serve as a fixed-parameter feature extractor like CLIP (Radford et al., 2021) and SAM (Kirillov et al., 2023), and fine-tuning is still necessary. Notably, C BraMod (fixed) outperforms BIOT (fixed) and LaBraM (fixed), indicating that C BraMod has better generalizability on unseen datasets compared existing methods on the fixing setting.
+
+# K LOW-RESOURCE COMPARISON WITH EXISTING METHODS
+
+Table 19: Performance comparison on low-resource settings with $30\%$ of fine-tuning data. Bold indicates the best. Underline indicates the second best.
+
+
Methods
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
CBraMod (full data)
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
CBraMod (30%)
0.4035 ± 0.0233
0.3239 ± 0.0265
0.4056 ± 0.0256
0.3877 ± 0.0236
0.2291 ± 0.0246
0.3886 ± 0.0255
BIOT (30%)
0.3428 ± 0.0329
0.2573 ± 0.0346
0.3501 ± 0.0341
0.3505 ± 0.0375
0.1775 ± 0.0425
0.3492 ± 0.0416
LaBraM (30%)
0.3513 ± 0.0315
0.2672 ± 0.0371
0.3548 ± 0.0325
0.3686 ± 0.0305
0.2044 ± 0.0384
0.3700 ± 0.0321
Methods
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
CBraMod (full data)
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
CBraMod (30%)
0.5613 ± 0.0162
0.4150 ± 0.0267
0.5621 ± 0.0184
0.6231 ± 0.0198
0.6901 ± 0.0134
0.6754 ± 0.0105
BIOT (30%)
0.5189 ± 0.0312
0.3477 ± 0.0371
0.5201 ± 0.0308
0.5419 ± 0.0345
0.6260 ± 0.0273
0.6021 ± 0.0301
LaBraM (30%)
0.5269 ± 0.0237
0.3598 ± 0.0342
0.5288 ± 0.0225
0.5636 ± 0.0289
0.6519 ± 0.0227
0.6467 ± 0.0274
+
+In practical applications, obtaining labeled data for brain-computer interface (BCI) systems or clinical studies often demands substantial time and financial resources. This limitation highlights the critical need for developing and investigating EEG foundational models, which can reduce reliance on extensive labeled datasets. To illustrate the practical utility of our approach, we compare C BraMod with existing foundational models across multiple datasets with limited labeled data availability. Specifically, we fine-tune C BraMod, BIOT, and LaBraM using $30\%$ of labeled data. The results are presented in Table 19. The results clearly demonstrate that C BraMod consistently outperforms existing foundational models in low-resource settings across these datasets. This observation underscores C BraMod's superior capability to effectively capture and leverage generic EEG representations, even when the availability of labeled data is limited. Importantly, when we compare the low-resource results with the results of full-data fine-tuning, we observe that the performance of C BraMod in low-resource scenarios is only marginally lower than the full-data performance when trained on SEED-V and SHU-MI. This finding further highlights the practical utility of C BraMod, showcasing its ability to sustain strong performance even with limited labeled data. This empirically demonstrates that our model can effectively mitigate the challenges posed by limited downstream task training data to some extent, offering significant advantages for real-world applications where labeled data is often scarce.
+
+# L COMPARISON ON SPLIT RATIO OF CRISS-CROSS ATTENTION
+
+Table 20: Performance comparison on split ratio of criss-cross attention.
+
+
Settings
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
CBraMod (2:6)
0.5405 ± 0.0096
0.4921 ± 0.0134
0.5526 ± 0.0106
0.4046 ± 0.0105
0.2438 ± 0.0155
0.4062 ± 0.0101
CBraMod (4:4)
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
CBraMod (6:2)
0.5413 ± 0.0124
0.4910 ± 0.0145
0.5531 ± 0.0128
0.4033 ± 0.0093
0.2410 ± 0.0166
0.4051 ± 0.0119
Settings
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
CBraMod (2:6)
0.6253 ± 0.0105
0.4995 ± 0.0176
0.6271 ± 0.0129
0.6205 ± 0.0170
0.6904 ± 0.0090
0.6751 ± 0.0088
CBraMod (4:4)
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
CBraMod (6:2)
0.6268 ± 0.0102
0.5013 ± 0.0188
0.6291 ± 0.0104
0.6210 ± 0.0139
0.6897 ± 0.0115
0.6764 ± 0.0072
+
+Our criss-cross transformer models spatial and temporal dependencies separately through two parallel attention mechanisms: spatial and temporal attention. It splits the 8 heads of the intermediate layer embeddings into two equal parts (spatial heads : temporal heads = 4:4), which are then processed by the spatial and temporal attention mechanisms, respectively, ensuring the model assigns equal emphasis to spatial and temporal dependencies. In this section, we adjust the split ratio of heads and observe how the decoding performance on downstream tasks varies when the model prioritizes spatial dependencies or temporal dependencies. The experimental results are shown in Table 20. Evidently, the model's performance shows a noticeable decline when it prioritizes either spatial (6:2) or temporal (2:6) dependencies over treating them equally. This indicates that spatial and temporal dependencies are equally important in EEG representation learning, providing empirical evidence for the validity of our criss-cross attention mechanism.
+
+# M MASK RATIO ANALYSIS
+
+
+
+
+
+
+(a) FACED
+(c) PhysioNet-MI
+Figure 9: Performance comparison on mask ratio.
+
+
+(b) SEED-V
+(d) SHU-MI
+
+In this section, we conduct comparison experiment on mask ratio to explore its impact on performance of C Bra Mod on downstream datasets. The results are as shown in Figure 9. C Bra Mod usually achieves a better performance when the range of mask ratio is 0.3 to 0.7. On FACED, C Bra Mod performs the best when mask ratio is set to 0.5, shown in Figure 9(a). As shown in Figure 9(b), C Bra Mod achieves the best performance on SEED-V as mask ratio is 0.6 and 0.5 mask ratio follows 0.6. In Figure 9(c) we can see that 0.2 mask ratio is the best on PhysioNet-MI, and 0.5 mask ratio perform the second best. Finally, on SHU-MI, 0.4 is the best mask ratio and performance of 0.5 mask ratio is close to 0.4
+
+mask ratio, shown in Figure 9(d). In summary, 0.5 mask ratio is a very appropriate choice to achieve good performance on multiple downstream datasets.
+
+# N MASKTOKEN COMPARISON
+
+Table 21: The results of mask token comparison.
+
+
Methods
FACED, 9-class
SEED-V, 5-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
Cohen's Kappa
Weighted F1
Full-zero token
0.5509 ± 0.0089
0.5041 ± 0.0122
0.5618 ± 0.0093
0.4091 ± 0.0097
0.2569 ± 0.0143
0.4101 ± 0.0108
Learnable token
0.5527 ± 0.0096
0.5033 ± 0.0131
0.5627 ± 0.0094
0.4078 ± 0.0105
0.2517 ± 0.0148
0.4089 ± 0.0123
Methods
PhysioNet-MI, 4-class
SHU-MI, 2-class
Balanced Accuracy
Cohen's Kappa
Weighted F1
Balanced Accuracy
AUC-PR
AUROC
Full-zero token
0.6417 ± 0.0091
0.5222 ± 0.0169
0.6427 ± 0.0100
0.6370 ± 0.0151
0.7139 ± 0.0088
0.6988 ± 0.0068
Learnable token
0.6399 ± 0.0112
0.5211 ± 0.0215
0.6433 ± 0.0175
0.6349 ± 0.0142
0.7156 ± 0.0101
0.7012 ± 0.0096
+
+In this section, we compare the performance of full-zero mask token and learnable mask token of explore the effectiveness of mask token type. The experiment is designed as follows: 1) Full-zero token: utilizing a full-zero vector with the same dimension as patch embeddings to mask the EEG patches; 2) Learnable token: using a vector whose parameters are learnable to mask the EEG patches. The results of mask token comparison are presented in Table 21. There is no significant performance difference between full-zero and learnable mask token, indicating that their capabilities are similar.
+
+# O PARAMETERS AND FLOPS COMPARISON
+
+Table 22: Parameters and FLOPs comparison on CHB-MIT (16 channels, 10 seconds).
+
+
Methods
Params
FLOPs
EEGNet
0.003M
8.9M
Conformer
0.55M
29.6M
SPaRCNet
0.79M
65.7M
ContraWR
1.6M
66.4M
CNN-Transformer
3.2M
79.1M
FFCL
2.4M
209.9M
ST-Transformer
3.5M
42.1M
BIOT
3.2M
483.3M
LaBraM-Base
5.8M
483.0M
LaBraM-Large
46M
3.06G
LaBraM-Huge
369M
22.8G
CBraMod (full attention)
4.1M
469.4M
CBraMod (axial attention)
4.0M
334.7M
CBraMod (attention of CCNet)
4.0M
354.6M
CBraMod (criss-cross attention)
4.0M
318.9M
+
+In this section, taking the CHB-MIT dataset as an example, we compare the parameter counts and FLOPs of C BraMod with existing methods and C BraMod with other attention mechanism. The numbers of parameters in baselines are provided by LaBraM (Jiang et al., 2024), and others are calculated by Thop3. The results are shown in Table 22. The parameters and FLOPs of foundation models are more than the non-foundation-model baselines because the foundation model usually need to be large for learning generic representations. LaBraM-Large and LaBraM-Huge achieve a good performance on some downstream datasets, but their parameters and FLOPs are significantly more than C BraMod. C BraMod has fewer FLOPs compared to the foundation models with similar parameter counts, BIOT and LaBraM-Base. Moreover, the C BraMod based on criss-cross attention has the fewest FLOPs compared to other attention mechanism. It indicates that C BraMod achieves lower computational complexity by our criss-cross EEG modeling.
+
+# P INTERPRETABILITY ANALYSIS
+
+# P.1 TOPOGRAPHY VISUALIZATION
+
+
+Figure 10: Topography visualization on motor imagery classification (PhysioNet-MI).
+
+In this section, we provide a topography visualization on motor imagery classification. The setup of visualization analysis are as follows: Raw EEG topography: We computed the energy intensity of the raw EEG signals for each channel and visualized the results using a topographic map. Class Activation Topography of C BraMod: We utilized Grad-CAM (Gradient-weighted Class Activation Mapping) (Selvaraju et al., 2017) to compute the contribution of each channel in the learned representations of C BraMod to the classification outcomes, visualizing the results as a Class Activation Topography. The visualization results are shown in Figure 10. Electrodes related to left and right fist movements exhibit symmetric patterns, while bilateral electrodes are linked to both fists and both feet movements, with distinct channels corresponding to each of the four classes. Compared to the raw EEG signals, the representations learned by C BraMod exhibit more pronounced differences in the importance assigned to various channels for different classes.
+
+# P.2 REPRESENTATION VISUALIZATIONS ON DOWNSSTREAM DATASETS
+
+In this section, we provide a representation visualization analysis on downstream datasets using UMAP (McInnes et al., 2018) dimensionality reduction. The experimental setup is as follows: 1) Raw EEG sample of a downstream dataset: we directly visualize the raw EEG sample from a downstream dataset. 2) C BraMod (w/o fine-tuning) on a downstream dataset: we visualize the representations of the pre-trained C BraMod without fine-tuning on the test set of a downstream dataset. 3) C BraMod (w/ fine-tuning) on a downstream dataset: we fine-tune the pre-trained C BraMod on the training set of a downstream dataset and visualize its representations on the test set. The visualization results are as shown in Figure 11. It is evident that the representation distributions in Figure 11(b) and (e) exhibit better clustering effects compared to the distribution of the raw EEG samples. It indicates that pre-training enables C BraMod to learn generic EEG representations, allowing it to capture label-related features of downstream datasets to some extent, even without fine-tuning. Additionally, the representation distributions in Figure 11(c) and (f) also exhibit better clustering effects compared to the representations distribution without fine-tuning. It reflects the role of fine-tuning on the downstream data.
+
+
+(a) Raw EEG sample of FACED
+
+
+(b) CBraMod (w/o fine-tuning) on FACED
+
+
+(c) CBraMod (w/ fine-tuning) on FACED
+
+
+(d) Raw EEG sample of PhysioNet-MI
+
+
+(e) CBetaMod (w/o fine-tuning) on PhysioNet-MI
+
+
+(f) CBraMod (w/ fine-tuning) on PhysioNet-MI
+
+
+Figure 11: Representation visualizations on downstream datasets.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 12: Visualization of patch relationships from each criss-cross transformer layer.
+
+
+
+
+
+
+
+# P.3 VISUALIZATION OF PATCH RELATIONSHIPS FROM EACH CRISS-CROSS TRANSFORMER LAYER
+
+In this section, we provide a visualization analysis for criss-cross EEG modeling. Specifically, we feed EEG samples (19 channels $\times 30$ seconds) of TUEG into the pre-trained CBetaMod to obtain the output of each criss-cross transformer layer, $E_{m}\in \mathbb{R}^{C\times n\times d}$ , where $m\in [1,2,\dots,12]$ is the layer number, $C = 19$ is the number of channels, $n = 30$ is the number of time segments and $d = 200$ is the dimension of patch embedding. Thus, $E_{m}$ consists of $19\times 30$ EEG patches. Without loss of generality, we select the 16-th patch of the Cz channel as the central patch, then calculate the correlation coefficient between the embedding of this patch and the embeddings of all other patches. The results are visualized in the form of a heatmap, as shown in the Figure 12. In the Figure 12, the channels are arranged in a sequence corresponding to the anterior brain, Cz, and posterior brain regions. It is evident that the correlation coefficients between the other patches and
+
+the central patch exhibit a criss-cross shape. It indicates that the proposed method has successfully learned the criss-cross spatial-temporal dependencies pattern between patches in the EEG signal. Furthermore, in the deeper transformer layers, we observe that the associations between all patches and the central patch are stronger. This suggests that the criss-cross transformer is also capable of learning non-criss-cross dependencies through its multi-layered structure. All of these visualizations provide interpretability for the criss-cross EEG modeling approach we propose.
+
+# Q A LEAVE-ONE-SUBJECT-OUT COMPARISON WITH EEG-SIMPLECONV ON BCIC-IV-2A
+
+Table 23: The results of the LOSO comparison with EEG-SimpleConv (BCIC-IV-2a, 4-class).
+
+
Methods
Balanced Accuracy
AUC-PR
AUROC
EEG-SimpleConv (w/o Key Ingredients)
0.5650 ± 0.0989
0.4201 ± 0.1319
0.5484 ± 0.1047
CBraMod (w/o Key Ingredients)
0.5968 ± 0.0816
0.4558 ± 0.1088
0.5889 ± 0.0875
EEG-SimpleConv (w/ Key Ingredients)
0.7221 ± 0.0768
0.5765 ± 0.1069
0.6977 ± 0.0918
CBraMod (w/ Key Ingredients)
0.7405 ± 0.0635
0.5997 ± 0.0833
0.7195 ± 0.0682
+
+Specifically, we included the performance comparison with the strong baseline, EEG-SimpleConv (El Ouahidi et al., 2024), under the leave-one-subject-out (LOSO) protocol on BCIC-IV-2a. In EEG-SimpleConv paper, the reported performance of $72.1 \pm 7.3$ accuracy under the leave-one-subject-out (LOSO) protocol relies heavily on several advanced preprocessing and training techniques referred to as "Key Ingredients," including Euclidean Alignment (EA), session statistics, Mixup, and subject-wise regularization. When these techniques are not employed, EEG-SimpleConv achieves significantly lower performance: $56.4 \pm 9.0$ accuracy, reported in the original paper.
+
+To provide a more rigorous and fair evaluation, we conducted experiments under the same LOSO protocol used by EEG-SimpleConv, both with and without incorporating the "Key Ingredients." The results are summarized as shown in Table 23. These results demonstrate that: 1) Our reproduction of EEG-SimpleConv matches the original paper's findings. 2) CBraMod consistently outperforms EEG-SimpleConv under both settings, achieving higher balanced accuracy, Cohen's Kappa, and weighted F1 scores while also demonstrating lower inter-subject variance, highlighting its robustness and effectiveness.
+
+# R COMPARISON ON CONVERGENCE SPEED WITH SUPERVISED MODEL
+
+
+Figure 13: Performance curves comparison for downstream task fine-tuning in FACED.
+
+In this section, we compared the performance curves of our method with existing supervised learning models during downstream task training (using EEGConformer on the FACED dataset as an example). Specifically, we fine-tuned the pretrained CBetaMod on the FACED training set, testing its performance on the validation set at the end of each epoch. We then plotted the performance variation curve and compared it with the performance curve of EEGConformer. The results are shown in Figure 13.
+
+Obviously, CBigInt can achieve a decent result within the first epoch and converge within 10 epochs. However, EEGConformer achieves a Cohen's Kappa result close to 0 in the first epoch, and it only reaches convergence after approximately 30 epochs. These results demonstrate that our pretrained model achieves faster convergence on downstream tasks, further proving that our method is capable of learning generic EEG representations that can effectively adapt to downstream tasks.
+
+# S DISCUSSION
+
+# S.1 IMPLICATION
+
+Novel Insights for EEG Foundation Model Construction The proposed criss-cross EEG modeling strategy and asymmetric conditional positional encoding (ACPE) scheme offer profound insights into the construction of EEG foundation models. Traditional EEG modeling approaches often overlook the unique structural characteristics of EEG signals, which exhibit heterogeneous spatial and temporal dependencies. By devising a criss-cross transformer that models these dependencies in parallel, our approach captures the intricate relationships within EEG data more effectively. This strategy not only enhances the model's ability to generalize across diverse EEG formats but also provides a more nuanced understanding of the underlying brain dynamics. The ACPE scheme further augments this capability by dynamically encoding positional information, making the model adaptable to varying channel configurations and reference contexts. This flexibility is crucial for EEG foundation models, as it allows them to be applied across a wide range of clinical and BCI applications. The success of our approach underscores the importance of tailored modeling strategies for EEG data, setting a new baseline for future research in this domain.
+
+Real-World BCI System Development The exploration of EEG foundation models, as exemplified by our work, holds significant promise for the development of practical BCI systems, particularly in the context of universal BCI systems. By leveraging large-scale pre-training on large EEG corpora, our model can learn generic representations that are robust and adaptable to various downstream tasks. This capability is essential for building BCI systems that can be deployed across different user populations and clinical settings, thereby enhancing their accessibility and utility. Moreover, the strong generalization ability of our model reduces the dependency on task-specific labeled data, which is often scarce and expensive to obtain. This is particularly beneficial in real-world applications where data collection can be challenging and resource-intensive. The ability to fine-tune the model on limited data while maintaining high performance is a critical step towards the realization of universal BCI systems that can be widely adopted in clinical practice.
+
+In summary, the novel modeling strategies and the demonstrated generalizability of our EEG foundation model provide valuable insights and practical benefits for the development of advanced BCI systems. These advancements not only push the boundaries of current EEG decoding techniques but also pave the way for more inclusive and effective brain-computer interfaces in the future.
+
+# S.2 LIMITATION
+
+Our work still has some limitations. Firstly, TUEG corpus is a very large dataset with a high amount of dirty data. We employed a rather crude approach to filter out clean data for pre-training, which helped address the issue of having a high amount of dirty data. However, it also resulted in a significant reduction in the amount of available pre-training data. Secondly, our method has achieved success on multiple downstream datasets and has lower computational complexity compared to other EEG Foundation models, but it still has a higher parameter count and computational complexity compared to non-foundation models. The high parameter count and computational complexity result in a higher usage threshold for EEG foundation models and makes it difficult to deploy them on devices with lower computational power. Next, due to limited computational resources, we have not yet analyzed the potential scaling laws for EEG pre-training in a larger scale (e.g. billion level). Finally, large models have achieved tremendous success in fields such as vision and language. However, there is still a lack of sufficient exploration on how to utilize these pre-trained large models in other fields for understanding EEG signals and various other brain signals.
+
+# S.3 FUTURE WORK
+
+Giving the above limitations, our future works are as follows: 1) A larger and cleaner EEG corpus is essential to train a better EEG foundation model. We will collect more EEG corpus and explore more automated and effective data preprocessing methods for learning more powerful representations. 2) We will explore ways to develop an effective and efficient EEG foundation model. For example, we can directly train a smaller EEG foundation model or utilize techniques such as knowledge distillation to obtain a smaller EEG foundation model from a pre-trained large EEG foundation model. 3) We will explore using larger pretraining datasets and model size, to further enhance the performance of the EEG foundation model and analyze the potential scaling laws for EEG pre-training. 4) We will explore establishing connections between large models in other fields (e.g. vision and language) and brain signals, utilizing the knowledge from these models to decode brain signals. It may involve techniques such as transfer learning.
\ No newline at end of file
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/images.zip b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..03330d27971f491b917a8e660c8f0b0af191a06e
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f1fe3161063567a69a22e805cc84c7ea8e2cc7070917f842135b1d804a29a2d8
+size 2488512
diff --git a/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/layout.json b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..cf7bc4c2dd5f1aa8e3765f1e67c4815f38f18c34
--- /dev/null
+++ b/ICLR/2025/CBraMod_ A Criss-Cross Brain Foundation Model for EEG Decoding/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c00fa029d8a808d05c4e15a01d6bf426152e5d6f5828d16d33588c33a1195427
+size 923379
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_content_list.json b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..dfae4fe071fd239b20f80a0d93825a7b624b3c02
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5df30af5ab97a0ae19ca8744ca54f0cb0e01f6b2a6bc7a1ab7cbc9aa0e496a86
+size 131831
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_model.json b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..e6574775bbf3cfca8e9aaab7c5e11272faf9a3bf
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a384a13e95912e47a89f84068d6cba3e959de129c201f03c4a7b5a7c63ee10d1
+size 160805
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_origin.pdf b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..85090958a865df58939434b8c7827da1ab2d99c6
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/6ef1a00d-2e63-40ff-9b9a-ed724a9eb67b_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a7d0ec7133f866729b94d51ebe3231a938175a7c4245fcbab47267265c1afb3
+size 857052
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/full.md b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..3f6002b9d45474568483bb181506737ac0a16e4d
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/full.md
@@ -0,0 +1,505 @@
+# CFD: LEARNING GENERALIZED MOLECULAR REPRESENTATION VIA CONCEPT-ENHANCED FEEDBACK DISENTANGLEMENT
+
+Among Wu, Cheng Deng*
+
+School of Electronic Engineering, Xidian University, Xi'an, China
+
+amwu@xidian.edu.cn, chdeng@mail.xidian.edu.cn
+
+# ABSTRACT
+
+To accelerate biochemical research, e.g., drug and protein discovery, molecular representation learning (MRL) has attracted much attention. However, most existing methods follow the closed-set assumption that training and testing data share identical distribution, which limits their generalization abilities in out-of-distribution (OOD) cases. In this paper, we explore designing a new disentangled mechanism for learning generalized molecular representation that exhibits robustness against distribution shifts. And an approach of Concept-Enhanced Feedback Disentanglement (CFD) is proposed, whose goal is to exploit the feedback mechanism to learn distribution-agnostic representation. Specifically, we first propose two dedicated variational encoders to separately decompose distribution-agnostic and spurious features. Then, a set of molecule-aware concepts are tapped to focus on invariant substructure characteristics. By fusing these concepts into the disentangled distribution-agnostic features, the generalization ability of the learned molecular representation could be further enhanced. Next, we execute iteratively the disentangled operations based on a feedback received from the previous output. Finally, based on the outputs of multiple feedback iterations, we construct a self-supervised objective to promote the variational encoders to possess the disentangled capability. In the experiments, our method is verified on multiple real-world molecular datasets. The significant performance gains over state-of-the-art baselines demonstrate that our method can effectively disentangle generalized molecular representation in the presence of various distribution shifts. The source code will be released at https://github.com/AmingWu/MoleculeCFD.
+
+# 1 INTRODUCTION
+
+With the rejuvenation of deep neural networks, to advance the development of biochemical research, e.g., drug discovery (Sanchez-Fernandez et al., 2022) and protein design (Ingraham et al., 2019), molecular representation learning (MRL) has attracted growing attention, which aims to transform molecules into low-dimensional and dense vectors (Gilmer et al., 2017; Yang et al., 2019; Rong et al., 2020; Fang et al., 2022; Yang et al., 2022; Zhuang et al., 2023). By means of the learned molecular representation, many downstream tasks could be addressed effectively, including drug property prediction (Wang et al., 2024b), binding affinity analysis (Karimi et al., 2019), and search of antibiotics (Stokes et al., 2020), etc.
+
+Though MRL has achieved significant progress, most existing methods often follow the closed-set assumption, i.e., the training and testing data share the same distribution. However, in practical biochemical research, molecules may exhibit many variants and originate from different distributions (Ji et al., 2022; Mendez et al., 2019). Taking the virtual screening (Lim et al., 2019) as an example, the model may be affected by the distribution shift in the molecule itself, e.g., size (Ji et al., 2022) or scaffold (Wu et al., 2018) changes. Furthermore, some unpredictable events like COVID-19 may bring new target molecules from unknown distributions. Obviously, these scenarios pose significant
+
+
+Figure 1: Three different mechanisms for disentangling generalized features. (a) and (b) are commonly used disentangled methods (Zhuang et al., 2023). (a) first uses a subgraph generator to separate the input, then each subgraph is encoded, respectively. (b) first encodes the input, then the representation is separated by a scorer (Zhuang et al., 2023). (c) is our proposed mechanism for learning generalized representation, i.e., Concept-Enhanced Feedback Disentanglement, which exploits the iteration manner to perform variational disentangled operations based on the feedback received from the previous iteration's output. The combination of all decomposed generalized features is taken as the final generalized representation for downstream tasks.
+
+
+
+challenges for closed-set assumption based MRL methods. To this end, improving the generalization of molecular representation is meaningful for reducing the impact of distribution shifts.
+
+Existing methods (Ahuja et al., 2021; Yang et al., 2024) mainly focus on learning generalized representation for regular Euclidean data (e.g., images). Instead, to preserve rich structural information (Gilmer et al., 2017), molecules are often represented as graphs, a typical non-Euclidean data, where atoms and bonds are separately taken as nodes and edges. Thus, the methods (Ahuja et al., 2021; Yang et al., 2024) corresponding to Euclidean data could not be directly applied to molecular graph data. Particularly, the work (Ji et al., 2022) points out that existing OOD methods (Sagawa et al., 2019; Sun & Saenko, 2016; Zhang, 2017) fail to significantly improve the performance of MRL tasks against distribution shifts. In this paper, we explore designing a disentangled mechanism for learning generalized molecular representation.
+
+Recently, some studies (Chen et al., 2022; Li et al., 2022b; Yang et al., 2022) have attempted to improve the generalization of molecular representation, which could be classified into two types, i.e., First-Separation-Then-Encoding and First-Encoding-Then-Separation (Zhuang et al., 2023). Specifically, as shown in Fig. 1 (a), the first type first divides the graph into generalized and spurious subgraphs and then encodes each part separately. However, this kind of method usually relies on the separation quality. For certain molecules involving complex structures, since there is no high-quality decomposition, the performance of these methods may be weakened severely. To this end, the work (Zhuang et al., 2023) introduces a "First-Encoding-Then-Separation" mechanism. As shown in Fig. 1 (b), it first employs a Graph Neural Network (GNN) (Kipf & Welling, 2017; Hamilton et al., 2017) to encode the molecule. Then, another GNN is utilized to calculate the score of molecule representation, which is taken as the critical factor for separating generalized and spurious features. However, for extremely complex and entangled molecules, e.g., biomacromolecules, only leveraging the calculated score could not effectively obtain expected separation results. Meanwhile, this method (Zhuang et al., 2023) fails to focus on certain important substructures containing invariant characteristics, affecting its performance in real-world molecules.
+
+In Fig. 1 (c), we propose a new disentangled mechanism, i.e., Concept-Enhanced Feedback Disentanglement (CFD), which still follows the "First-Encoding-Then-Separation" strategy and exploits the feedback mechanism (Zamir et al., 2017) to learn generalized representation. Concretely, given an input molecule, we first exploit a GNN to encode its representation. Then, two dedicated variational encoders are designed to separately decompose distribution-agnostic generalized features and spurious features. Next, a series of concepts are learned to capture certain critical substructures involving invariant molecule characteristics. By fusing these concepts into the decomposed distribution-agnostic features, the generalization ability could be further strengthened. Later, we iteratively perform the above disentangled operations based on a feedback received from the previous iteration's output.
+
+Finally, based on the outputs of multiple feedback iterations, a self-supervised objective is constructed to encourage the variational encoders to own the disentangled capability. Extensive experimental results on multiple molecular datasets demonstrate the superiorities of our method.
+
+The contributions are summarized as follows:
+
+(1) We propose a paradigm of feedback disentanglement that utilizes the iteration manner to decompose generalized molecular representation, improving the robustness against distribution shifts.
+(2) We propose a concept mining module focusing on certain critical substructures involving invariant characteristics. By fusing these concepts into the disentangled representation, the generalization ability could be further enhanced.
+(3) We conduct extensive experiments on a diverse set of real-world molecule datasets (Zhuang et al., 2023) with various distribution shifts. The significant performance gains over multiple baselines demonstrate that our method can disentangle generalized molecular representation effectively. Moreover, to further verify the ability of capturing important substructure, our method is evaluated on a new task, i.e., Molecule's Ground-State Conformation Prediction (Xu et al., 2024). We observe that plugging our method into Transformer architecture (Xu et al., 2024) could still improve the prediction performance, indicating the superiorities of our method.
+
+# 2 RELATED WORK
+
+OOD Generalization. Recent research (Wang et al., 2022a; Robey et al., 2021; Zhou et al., 2024) has indicated that existing machine learning methods usually suffer from significant performance degradation under distribution shifts, motivating a surge of works on OOD generalization. Particularly, most existing methods (Evuru et al., 2024; Ratner et al., 2017; Feder et al., 2024) attempt to improve the generalization from the data and representation perspectives. Particularly, an effective strategy is to utilize data augmentation to improve the generalization. Zhou et al. (Zhou et al., 2020) utilize domain information for creating an additive noise to increase the diversity of training data distribution while preserving the semantic information of data. Xu et al. (Xu et al., 2021a) exploit the classical Fourier transformation to obtain the augmented images with diverse styles, which enhances the generalization ability effectively. Besides, by simply mixing up different styles of input data, the work (Zhou et al., 2021) could strengthen the generalization performance significantly.
+
+Another effective strategy is to learn invariant representations (Chang et al., 2020; Creager et al., 2021). In general, the learned invariant representation should satisfy such a principle: 1) sufficiency: shows sufficient predictive power for the target, 2) invariance: contributes to optimal performance for the downstream tasks across all environments. Therefore, some works (Mahajan et al., 2021; Lv et al., 2022; Wang et al., 2022b) explore learning invariant representation from the causal perspective. Furthermore, feature disentanglement (Li et al., 2022a; Zhang et al., 2022; Wu et al., 2021) is also a commonly used mechanism to decompose distribution-agnostic representations. Though these methods have been demonstrated to be effective on many tasks, they often pay attention to regular Euclidean data (e.g., images). However, molecules are usually represented as graphs, which belong to a typical non-Euclidean data. At this time, directly employing the above methods to process graph data does not achieve satisfactory performance. Thus, it is meaningful to design a proper mechanism for learning generalized molecular representation.
+
+OOD Generalization on Molecular Representation. Recently, in order to promote the application of biochemical research, learning generalized molecular representation has attracted growing attention. Some methods (Yang et al., 2022; Chen et al., 2022; Fan et al., 2022) follows the "first-separationthen-encoding" paradigm. And they first design a dedicated module to disentangle the original input graph into two different parts. Then, two independent GNN are utilized to encode these two parts, respectively. However, this kind of methods are prone to relying on the separation results. For certain molecules with complex structures, these methods (Yang et al., 2022; Chen et al., 2022; Fan et al., 2022) could not achieve the expected performance. To this end, Zhuang et al. (Zhuang et al., 2023) propose a new strategy, i.e., "first-encoding-then-separation". Concretely, they first employ a GNN to encode molecules. Then, a disentangled module is designed to perform representation decomposition. Though this method has been shown to be effective, for certain biomacromolecules, the proposed score module could not disentangle invariant representations successfully, limiting its application in real-world molecules. In this paper, we explore a new mechanism, i.e., Concept-Enhanced Feedback
+
+
+Figure 2: The details of our method for disentangling generalized molecule representation. Our method mainly contains two components: (1) Feedback Disentanglement, and (2) Molecule Concept Extraction. Particularly, based on the current extracted representation, two variational encoders are designed to separately obtain spurious features and generalized features. By maximizing the distance between two estimated distributions, the decomposition ability of two variational encoders could be enhanced. Next, a series of concepts are learned to focus on certain important substructures involving invariant characteristics. By fusing these concepts into the disentangled features, the generalization ability could be further enhanced. Finally, by combining the generalized features from multiple iterations, the output could be taken as the final generalized representation for downstream tasks.
+
+Disentanglement, which aims to utilize the iteration manner for learning generalized molecular representation. Meanwhile, a series of concepts are mined to focus on certain critical substructures, which further enhances the generalization ability. Extensive experimental results on multiple real-world molecule datasets demonstrate that our method could indeed disentangle distribution-agnostic invariant molecular representation.
+
+# 3 CONCEPT-ENHANCED FEEDBACK DISENTANGLEMENT
+
+In this paper, we focus on disentangling generalized molecular representation to reduce the impact of distribution shifts. Here, we first define the OOD generalization problem for MRL.
+
+In general, a molecular graph can be represented as $G = (V, E)$ , where $V$ is the graph's node set corresponding to atoms and $E$ denotes the graph's edge sets corresponding to bonds. The goal of MRL task is to predict the target label $\mathcal{Y}$ given the associated input molecule $\mathcal{G}$ . The OOD problem on MRL is defined as follows:
+
+$$
+\min _ {f} \max _ {e \in \xi} \mathbb {E} _ {\left(\mathcal {G} _ {i}, \mathcal {Y} _ {i}\right) \sim P \left(\mathcal {G}, \mathcal {Y} | e\right)} \left[ \mathcal {L} \left(f \left(\mathcal {G} _ {i}\right), \mathcal {Y} _ {i}\right) | e \right], \tag {1}
+$$
+
+where $\xi$ represents the support of environments, $f(\cdot)$ is the prediction model and $\mathcal{L}(\cdot ,\cdot)$ indicates a loss function. $\mathbb{E}_{(\mathcal{G}_i,\mathcal{Y}_i)\sim P(\mathcal{G},\mathcal{Y}|e)}[\mathcal{L}(f(\mathcal{G}_i),\mathcal{Y}_i)|e]$ is called the risk function under a given environment $e$ (Krueger et al., 2021). The reason of resulting in the OOD problem on MRL lies in that the training data only cover very limited environments in $\xi$ while the model is expected to perform well on all environments. Meanwhile, the OOD problem can be categorized into two cases, i.e., covariate and concept shift (Krueger et al., 2021; Widmer & Kubat, 1996). In covariate shift, the distribution of input differs. And the category space of input is the same. Instead, for concept shift, the distribution of input remains the same. But the category space between the training and testing data is inconsistent. In the experiments, we consider these two shift cases.
+
+# 3.1 VARIATIONAL DISENTANGLEMENT FOR MOLECULAR REPRESENTATION
+
+As shown in Fig. 2, our method follows "first-encoding-then-separation" mechanism (Zhuang et al., 2023) for learning generalized molecule representation. Different from this work (Zhuang et al., 2023), we leverage the feedback idea (Zamir et al., 2017) to iteratively extract distribution-agnostic representation, which is more applicable to molecules with highly complex structures. Moreover,
+
+considering that this work (Zhuang et al., 2023) fails to focus on critical molecular substructures, we propose to mine a series of concepts that involve invariant characteristics of certain molecule substructures, which could be used to further improve the generalization of the learned representation. Next, we will introduce the details of our method.
+
+Specifically, given an input molecule $\mathcal{G}$ , we first utilize a GNN to encode it. The output is $F$ :
+
+$$
+F = \operatorname {G N N} (\mathcal {G}) \in \mathbb {R} ^ {| \mathcal {V} | \times d}, \tag {2}
+$$
+
+where $|\mathcal{V}|$ is the number of atoms in $\mathcal{G}$ , and $d$ is the dimensionality of the encoded features. Then, a spurious encoder (i.e., $W_{\mu}^{Spu}(\cdot)$ and $W_{\sigma}^{Spu}(\cdot)$ ) and a generalized encoder (i.e., $W_{\mu}^{Gen}(\cdot)$ and $W_{\sigma}^{Gen}(\cdot)$ ), each consisting of three fully-connected layers, are designed to separately estimate the corresponding distribution. The processes are shown as follows:
+
+$$
+\mu_ {t} ^ {S p u} = W _ {\mu} ^ {S p u} (Q _ {t}), \sigma_ {t} ^ {S p u} = W _ {\sigma} ^ {S p u} (Q _ {t}), \mu_ {t} ^ {G e n} = W _ {\mu} ^ {G e n} (Q _ {t}), \sigma_ {t} ^ {G e n} = W _ {\sigma} ^ {G e n} (Q _ {t}), \quad (3)
+$$
+
+where $Q_{t} = \phi ([Z_{t - 1}^{Gen},Z_{t - 2}^{Gen}])$ . $t = 0,\dots ,T$ . And $Q_{0} = F$ , $Q_{1} = Z_{0}^{Gen}$ . '[.,.'] indicates the concatenation operation. ' $\phi (\cdot)$ represents a fully-connected layer that transforms channels. $\mu_t^{Spu}\in \mathbb{R}^{|\mathcal{V}|\times d}$ and $\mu_t^{Gen}\in \mathbb{R}^{|\mathcal{V}|\times d}$ are the estimated means for spurious and generalized features at the current iteration $t$ . $\sigma_t^{Spu}\in \mathbb{R}^{|\mathcal{V}|\times d}$ and $\sigma_t^{Gen}\in \mathbb{R}^{|\mathcal{V}|\times d}$ represent the estimated variances for spurious and generalized features. Next, we separately perform a sampling operation to obtain the disentangled features $Z_{t}^{Spu}\in \mathbb{R}^{|\mathcal{V}|\times d}$ and $\tilde{Z}_{t}^{Gen}\in \mathbb{R}^{|\mathcal{V}|\times d}$ :
+
+$$
+Z _ {t} ^ {S p u} = D ^ {S p u} \left(\mu_ {t} ^ {S p u} + \epsilon \cdot \exp \left(\sigma_ {t} ^ {S p u}\right)\right), \quad \tilde {Z} _ {t} ^ {G e n} = D ^ {G e n} \left(\mu_ {t} ^ {G e n} + \epsilon \cdot \exp \left(\sigma_ {t} ^ {G e n}\right)\right), \tag {4}
+$$
+
+where $D^{Spu}(\cdot)$ and $D^{Gen}(\cdot)$ are two defined decoders, each consisting of three fully-connected layers. $\epsilon$ denotes Gaussian noise sampled from $\mathcal{N}(0,I)$ .
+
+To promote $Z_{t}^{Spu}$ and $\tilde{Z}_{t}^{Gen}$ to separately contain rich spurious and distribution-agnostic information, we first enlarge the distance between the two estimated distributions. Meanwhile, to encourage $\tilde{Z}_{t}^{Gen}$ to involve plentiful invariant characteristics related to the input molecule, we further define a contrast loss. Finally, the loss $\mathcal{L}_{vd}^{t}$ for variational disentanglement is defined as follows:
+
+$$
+\mathcal {L} _ {v d} ^ {t} = - \log \frac {\exp \left(\sin \left(\tilde {Z} _ {t} ^ {G e n} , F\right) / \tau\right)}{\exp \left(\sin \left(\tilde {Z} _ {t} ^ {G e n} , F\right) / \tau\right) + \exp \left(\sin \left(Z _ {t} ^ {S p u} , F\right) / \tau\right)} - \lambda \cdot K L \left(P _ {t} ^ {S p u}, P _ {t} ^ {G e n}\right), \tag {5}
+$$
+
+where $\mathrm{sim}(\tilde{Z}_t^{Gen},F)$ denotes the average of the cosine similarity between all corresponding elements of $\tilde{Z}_t^{Gen}$ and $F$ . $\tau$ and $\lambda$ are two hyper-parameters, which are separately set to 1.0 and 0.01 in the experiments. $P_{t}^{Spu} = \mathcal{N}(\mu_{t}^{Spu},\sigma_{t}^{Spu})$ and $P_{t}^{Gen} = \mathcal{N}(\mu_{t}^{Gen},\sigma_{t}^{Gen})$ . Obviously, by minimizing the loss $\mathcal{L}_{vd}^t$ , the gap between $\tilde{Z}_t^{Gen}$ and $Z_{t}^{Spu}$ could be enlarged from both semantic and distribution perspectives, which enhances the disentangled ability of our method.
+
+# 3.2 LEARNING MOLECULE CONCEPTS
+
+In general, the critical substructures involving invariant characteristics usually play an important role in downstream tasks. To this end, we explore mining a series of concepts that do not specialize to one particular type or class of molecule, which is instrumental in strengthening the generalization of the learned representation (Locatello et al., 2020).
+
+Concretely, the concepts are defined as $C \sim \mathcal{N}(\mu_c, \sigma_c) \in \mathbb{R}^{K \times d}$ , where $\mu_c$ and $\sigma_c$ are learnable parameters. $K$ indicates the number of concepts. Next, based on the disentangled representation $\tilde{Z}_t^{Gen} \in \mathbb{R}^{|\mathcal{V}| \times d}$ , we calculate descriptors that represent molecule-level information:
+
+$$
+\mathcal {M} = \mathrm {K A N} \left(\tilde {Z} _ {t} ^ {\text {G e n}}\right), \quad \mathcal {H} _ {i} = \sum_ {j = 1} ^ {| \nu |} \frac {\exp \left(\mathcal {M} _ {j , i}\right)}{\sum_ {i = 1} ^ {K} \exp \left(\mathcal {M} _ {j , i}\right)} \left(\tilde {Z} _ {t, j} ^ {\text {G e n}} - C _ {i}\right), \tag {6}
+$$
+
+where $i = 1,\dots ,K$ . Here, we employ one KAN layer (Liu et al., 2024) to transform $\tilde{Z}_t^{Gen}$ , which outputs $\mathcal{M} \in \mathbb{R}^{|V| \times K}$ . Different from MLPs having fixed activation functions on neurons, KANs have learnable activation functions (Liu et al., 2024), which is beneficial for improving the flexibility of the learned concepts. $\mathcal{H} \in \mathbb{R}^{K \times d}$ represents the output descriptors. $\tilde{Z}_{t,j}^{Gen} - C_i$ denotes the
+
+residual operation. By means of this operation, we can assign molecule substructure features to the corresponding concept $C_i \in \mathbb{R}^d$ . Finally, the learned concepts are utilized to enhance the current representation $\tilde{Z}_t^{Gen}$ . The corresponding processes are shown as follows:
+
+$$
+\tilde {\mathcal {H}} = \mathrm {K A N} \left(\mathcal {H} _ {r}\right), Z _ {t} ^ {G e n} = \mathrm {K A N} \left(\left[ \tilde {\mathcal {H}}, \tilde {Z} _ {t} ^ {G e n} \right]\right), \tag {7}
+$$
+
+where $H_{r}\in \mathbb{R}^{1\times Kd}$ is the reshaped result of $\mathcal{H}$ . $\tilde{\mathcal{H}}\in \mathbb{R}^{1\times d}$ . $Z_{t}^{Gen}\in \mathbb{R}^{|V|\times d}$ is the output generalized representation at the step $t$ . By the concatenation operation, the learned concepts could be fused into the current decomposed representation, which is conducive to enhancing the generalization of the output representation $Z_{t}^{Gen}$ . In the experiments, $Z_{t}^{Gen}$ is utilized as the representation for computing the corresponding task loss, e.g., molecule property prediction, which promotes the learned concepts to capture plentiful task-specific invariant molecule characteristics.
+
+# 3.3 FEEDBACK SEPARATING GENERALIZED MOLECULAR REPRESENTATION
+
+Existing methods (Zhuang et al., 2023; Yang et al., 2022) for learning generalized molecular representation generally employ a one-step disentangled strategy, i.e., directly separating the input into generalized and spurious parts. However, in practice, we may encounter some unknown biomacromolecules containing more atoms and highly complex structures. At this time, using the original one-step mechanism could not obtain satisfactory disentangled results. To this end, we exploit the feedback idea (Zamir et al., 2017) to iteratively separate generalized molecular representation.
+
+As shown in Fig. 3, we assume that the number of feedback iterations is $T$ . Given the current feature $Q_{t} \in \mathbb{R}^{|\mathcal{V}| \times d}$ that is the concatenation of the previous two iteration outputs, we first leverage the above operations to disentangle $Q_{t}$ into $Z_{t}^{Spu}$ and $Z_{t}^{Gen}$ , where $t = 0, \dots, T$ . Then, $Q_{t + 1} = \phi([Z_{t - 1}^{Gen}, Z_{t}^{Gen}])$ is taken as the
+
+
+Figure 3: Computation graph of One-Step vs Feedback Disentanglement. For the molecules with complex structures, using one-step disentanglement could not obtain the expected separation results. Instead, the feedback mechanism with multiple iteration steps is beneficial for decomposing complex structures.
+
+input of the current step to repeat the above disentangled operations. In the computation graph of feedback disentanglement (as shown in Fig. 3), we can observe that compared with One-Step disentanglement, the feedback strategy follows a hierarchical disentangled mechanism, which is instrumental in improving the ability of decomposing the molecules with complex structures. Finally, through multiple feedback iterations, we can obtain a series of generalized outputs, i.e., $(Z_0^{Gen}, Z_1^{Gen}, \dots, Z_T^{Gen})$ , and spurious outputs, i.e., $(Z_0^{Spu}, Z_1^{Spu}, \dots, Z_T^{Spu})$ . A self-supervised objective is constructed to close the distance between the output generalized features at each step and enlarge the distance between the decomposed generalized and spurious features at the same step, which strengthens the disentangled ability effectively:
+
+$$
+\mathcal {L} _ {f d} = - \log \left(\frac {1}{T \times T} \sum_ {i = 0} ^ {T} \sum_ {j = 0} ^ {T} \sin \left(Z _ {i} ^ {\text {G e n}}, Z _ {j} ^ {\text {G e n}}\right) _ {i \neq j} - \beta \cdot \frac {1}{T} \sum_ {i = 0} ^ {T} \sin \left(Z _ {i} ^ {\text {G e n}}, Z _ {i} ^ {\text {S p u}}\right)\right), \tag {8}
+$$
+
+where $\beta$ is a hyper-parameter, which is set to 0.5 in the experiments. Finally, we take the concatenation result, i.e., $Z^{Gen} = \psi ([Z_0^{Gen},Z_1^{Gen},\dots ,Z_T^{Gen}])\in \mathbb{R}^{|\mathcal{V}|\times d}$ , as the last generalized representation for downstream tasks, where $\psi (\cdot)$ indicates a fully-connected layer that transforms the channels.
+
+For specific downstream tasks, their goals are to provide the generalized representation $Z^{Gen}$ with predictive capabilities. Since our method is to learn generalized molecule representations, it could be applied to different molecular tasks. During training, the choice of prediction loss function depends on the type of task. For classification loss, we employ the cross-entropy loss, while for regression tasks, we utilize the mean squared error loss. Taking the binary classification task as an example, the cross-entropy loss is computed between the predicted probability $\hat{Y} = Prob(Z^{Gen})$ and the
+
+Table 1: Evaluation performance on GOOD benchmark. - denotes abnormal results caused by under-fitting declared in the leaderboard, and / denotes that the method cannot be applied to this dataset. For different distribution shifts, our method obtains superior generalization performance.
+
+
Method
GOOD-HIV ↑
GOOD-ZINC ↓
GOOD-PCBA ↑
scaffold
size
scaffold
size
scaffold
size
covariate
concept
covariate
concept
covariate
concept
covariate
concept
covariate
concept
covariate
concept
ERM
69.55
72.48
59.19
61.91
0.1802
0.1301
0.2319
0.1325
17.11
21.93
17.75
15.60
IRM
70.17
71.78
59.94
(-)
0.2164
0.1339
0.6984
0.1336
16.89
22.37
17.68
15.82
VREx
69.34
72.21
58.49
61.21
0.1815
0.1287
0.2270
0.1311
17.10
21.65
17.80
15.85
GroupDRO
68.15
71.48
57.75
59.77
0.1870
0.1323
0.2377
0.1333
16.55
21.91
16.74
15.21
Coral
70.69
72.96
59.39
60.29
0.1769
0.1303
0.2292
0.1261
17.00
22.00
17.83
16.88
DANN
69.43
71.70
62.38
65.15
0.1746
0.1269
0.2326
0.1348
17.20
22.03
17.71
15.78
Mixup
70.65
71.89
59.11
62.80
0.2066
0.1391
0.2531
0.1547
16.52
20.52
17.42
13.71
DIR
68.44
71.40
57.67
74.39
0.3682
0.2543
0.4578
0.3146
16.33
23.82
16.04
16.80
GSAT
70.07
72.51
60.73
56.96
0.1418
0.1066
0.2101
0.1038
16.45
20.18
17.57
13.52
GREA
71.98
70.76
60.11
60.96
0.1691
0.1157
0.2100
0.1273
16.28
20.23
17.12
13.82
CAL
69.12
72.49
59.34
56.16
/
/
/
/
15.87
18.62
16.92
13.01
DisC
58.85
64.82
49.33
74.11
/
/
/
/
/
/
/
/
MoleOOD
69.39
69.08
58.63
55.90
0.2752
0.1996
0.3468
0.2275
12.90
12.92
12.64
10.30
CIGA
69.40
71.65
61.81
73.62
/
/
/
/
/
/
/
/
iMoLD
72.93
74.32
62.86
77.43
0.1410
0.1014
0.1863
0.1029
17.32
22.58
18.02
18.21
Ours (CFD)
76.42
77.83
64.14
79.28
0.1187
0.0765
0.1421
0.0852
19.78
25.64
19.18
20.03
+
+ground-truth label $\mathcal{V}$ ..
+
+$$
+\mathcal {L} _ {p r e d} = \mathcal {Y} \log \hat {\mathcal {Y}} + (1 - \mathcal {Y}) \log (1 - \hat {\mathcal {Y}}), \tag {9}
+$$
+
+where $Prob(\cdot)$ represents a function that computes probability. Finally, the learning objective can be defined as the weighted sum of the above losses:
+
+$$
+\mathcal {L} _ {\text {t a s k}} = \mathcal {L} _ {p r e d} + \alpha_ {1} \cdot \mathcal {L} _ {f d} + \alpha_ {2} \cdot \sum_ {t = 0} ^ {T} \mathcal {L} _ {v d} ^ {t}, \tag {10}
+$$
+
+where $\alpha_{1}$ and $\alpha_{2}$ are hyper-parameters, which are separately set to 0.1 and 0.01 in the experiments.
+
+# 4 EXPERIMENTS
+
+In this section, we conduct extensive experiments to answer the research questions. (1) Can our method CFD achieve better OOD generalization performance against baselines? (2) Does our method possess the ability to capture important substructures and improve the performance of molecular substructure prediction? (3) How does each component contribute to the final performance?
+
+# 4.1 EXPERIMENTAL SETUP
+
+Datasets. For OOD molecular representation learning, we follow the settings of the work (Zhuang et al., 2023) and employ two real-world datasets, i.e., GOOD (Gui et al., 2022) that is a systematic benchmark tailored specifically for graph OOD problems, and DrugOOD (Ji et al., 2022) that is a OOD benchmark for AI-aided drug discovery. Besides, for molecule's ground-state prediction, we follow the settings of the work (Xu et al., 2024) and utilize Molecule3D (Xu et al., 2021b) and QM9 (Ramakrishnan et al., 2014) to evaluate the ability of our method for focusing on substructures. In Appendix, we will introduce more details about these datasets.
+
+Implementation Details. Our method is used for learning specific molecule representation and could be plugged into existing methods (Zhuang et al., 2023; Xu et al., 2024). The number of the learned concepts is set to 12. The number of feedback iterations is set to 8. It is worth noting that during feedback, we do not introduce new parameters.
+
+Baselines. For OOD molecular representation learning, we mainly compare our method with some common approaches for non-Euclidean data, i.e., ERM (Vapnik, 2013), IRM (Arjovsky et al., 2019), VREx (Krueger et al., 2021), GroupDRO (Sagawa et al., 2019), Coral (Sun & Saenko, 2016), DANN (Ganin et al., 2016), Mixup (Zhang, 2017), and iMoLD (Zhuang et al., 2023). Meanwhile, our method is compared with some graph-specific algorithms, e.g., graph OOD algorithms such as CAL (Sui et al., 2022), DisC (Fan et al., 2022), MoleOOD (Yang et al., 2022), and CIGA (Chen et al., 2022), as well as interpretable graph learning methods, e.g., DIR (Wu et al., 2022), GSAT (Miao et al., 2022), and GREA (Liu et al., 2022).
+
+# 4.2 ANALYSIS OF OOD MOLECULAR REPRESENTATION LEARNING
+
+To evaluate the generalization ability of our method, our method is evaluated on GOOD benchmark (Gui et al., 2022). Table 1 shows the performance. We can observe that some graph-specific OOD methods could achieve effective performance on some synthetic datasets (e.g., to predict whether a specific motif is present in a synthetic graph). However, they do not perform well on molecules with complex data structures and distributions, which shows that our method could apply to molecules with complex structures and improve the generalization performance. Besides, the performance of iMoLD (Zhuang et al., 2023) outperforms MoleOOD (Yang et al., 2022), which shows the effectiveness of the strategy "first-encoding-then-separation". However, iMoLD (Zhuang et al., 2023) fails to capture the critical substructures that involve certain invariant characteristics, which may affect its performance. We can see that our method improves the performance significantly. This indicates that the feedback disentanglement could indeed decompose generalized features. Meanwhile, our method could be applied to complex molecules. This also shows that the learned concepts are beneficial for capturing important substructures, which further strengthens the generalization ability.
+
+Table 2 further evaluates our method on DrugOOD dataset (Ji et al., 2022). Particularly, the recent work MILI (Wang et al., 2024a) follows "first-separationthen-encoding" mechanism. And it first identifies privileged substructure and develops a dual-head GNN to achieve invariant representations of substructures. When the molecular substructures are accurately identified, the generalization performance of OOD molecule representation could be improved effectively. We can see that our method still outperforms iMoLD (Zhuang et al., 2023) and MILI (Wang et al., 2024a). This demonstrates that using the feedback iteration idea is beneficial for extracting general
+
+Table 2: Evaluation performance on DrugOOD dataset.
+
+
Method
IC50↑
EC50↑
Assay
Scaffold
Size
Assay
Scaffold
Size
ERM
71.63
68.79
67.50
67.39
64.98
65.10
IRM
71.15
67.22
61.58
67.77
63.86
59.19
Coral
71.28
68.36
64.53
72.08
64.83
58.47
MixUp
71.49
68.59
67.79
67.81
65.77
65.77
DIR
69.84
66.33
62.92
65.81
63.76
61.56
GSAT
70.59
66.45
66.70
73.82
64.25
62.65
GREA
70.23
67.02
66.59
74.17
64.50
62.81
CAL
70.09
65.90
66.42
74.54
65.19
61.21
DisC
61.40
62.70
61.43
63.71
60.57
57.38
MoleOOD
71.62
68.58
65.62
72.69
65.74
65.51
CIGA
71.86
69.14
66.92
69.15
67.32
65.65
iMoLD
72.11
68.84
67.92
77.48
67.79
67.09
MILI
72.67
69.58
68.40
77.11
68.07
65.97
Ours (CFD)
73.86
70.02
69.73
78.32
69.13
67.62
+
+ized molecular characteristics. By fusing the concepts capturing plentiful substructure content, the generalization ability could be further enhanced.
+
+Table 3: Performance of molecule's ground-state prediction based on Molecule3D and QM9 datasets.
+
+
Validation
Test
D-MAE↓
D-RMSE↓
C-RMSD↓
D-MAE↓
D-RMSE↓
C-RMSD↓
(a) Molecule3D Random Split
RDKit DG
0.581
0.930
1.054
0.582
0.932
1.055
RDKit ETKDG
0.575
0.941
0.998
0.576
0.942
0.999
DeeperGCN-DAGNN (Xu et al., 2021b)
0.509
0.849
-
0.571
0.961
-
GINE (Hu et al., 2019)
0.590
1.014
1.116
0.592
1.018
1.116
GATv2 (Brody et al., 2021)
0.563
0.983
1.082
0.564
0.986
1.083
GPS (Rampášek et al., 2022)
0.528
0.909
1.036
0.529
0.911
1.038
GTMGC (Xu et al., 2024)
0.432
0.719
0.712
0.433
0.721
0.713
GTMGC + Ours
0.397
0.682
0.684
0.407
0.695
0.688
(b) QM9
RDKit DG
0.358
0.616
0.722
0.358
0.615
0.722
RDKit ETKDG
0.355
0.621
0.691
0.355
0.621
0.689
GINE (Hu et al., 2019)
0.357
0.673
0.685
0.357
0.669
0.693
GATv2 (Brody et al., 2021)
0.339
0.663
0.661
0.339
0.659
0.666
GPS (Rampášek et al., 2022)
0.326
0.644
0.662
0.326
0.640
0.666
GTMGC (Xu et al., 2024)
0.262
0.468
0.362
0.264
0.470
0.367
GTMGC + Ours
0.223
0.434
0.305
0.218
0.442
0.309
+
+# 4.3 ANALYSIS OF MOLECULE'S GROUND-STATE PREDICTION
+
+The molecular ground-state conformation refers to the lowest energy state of a molecule on its potential energy surface (Xu et al., 2024). It belongs to substructures of original molecules, which
+
+
+Ground Truth
+
+
+Our Prediction
+
+
+Ground Truth
+Figure 4: The prediction results of the molecule's ground-state conformation. Compared with ground truth, our method could localize the critical substructures, improving the prediction accuracy.
+
+
+Our Prediction
+
+play a crucial role in determining the physical, chemical, and biological properties of molecules. By evaluating this task, we can directly observe CFD's ability for capturing critical substructures. Here, our method is directly plugged into GTMGC (Xu et al., 2024) that is a transformer architecture. The training processes and optimization objectives are kept unchanged. In Table 3, we can observe that plugging our method could improve GTMGC's prediction performance effectively. This indicates that our method is able to capture critical substructure characteristics. Meanwhile, our method could be plugged into Transformer architecture, showing our method's flexibility.
+
+In Fig. 4, we provide two prediction examples from our method. We can observe that compared with ground truth results, our method could accurately capture those critical substructures, further demonstrating the effectiveness of our method.
+
+Table 4: Analysis of our CFD method. 'Feedback' and 'Concepts' separately indicate feedback disentanglement and molecule concept learning. 'Cov-Sold', 'Cet-Sold', 'Cov-Size', and 'Cet-Size' denote scaffold-covariate, scaffold-concept, size-covariate, and size-concept shifts, respectively.
+
+
Feedback
Concepts
Cov-Sold
Cet-Sold
Cov-Size
Cet-Size
✓
0.1391
0.0923
0.1754
0.0983
✓
0.1685
0.1172
0.2046
0.1268
✓
✓
0.1187
0.0765
0.1421
0.0852
+
+# 4.4 ABLATION ANALYSIS
+
+To evaluate the effectiveness of each component, we take GOOD-ZINC (Gui et al., 2022) as the dataset to make an ablation analysis.
+
+Analysis of our method. As shown in Fig. 2, our method mainly consists of two components, i.e., feedback disentanglement and molecule concept mining. Meanwhile, these two modules could be taken as the independent module. In Table 4, we make an ablation experiment. 'Concepts' represents that the concept learning module is plugged into ERM (Vapnik,
+
+2013). We can see that for different shifts, using feedback disentanglement and learning molecule concepts could improve the performance significantly. This shows that our method could effectively separate generalized features from spurious features. Meanwhile, the mined concepts could capture critical substructure characteristics, further enhancing the disentangled features' generalization.
+
+Number of feedback iterations. To achieve the expected generalized representation, we employ multiple feedback iterations. In Table 5, we can see that the iteration number affects the generalization performance. For molecules with complex structures, using fewer iterations could not decompose the expected generalized representation effectively, which weakens the
+
+performance. Meanwhile, we observe that the performance change is very small when the iteration number is larger than 12 for the given dataset. For our method, the performance of using 8 feedback iterations is the best.
+
+Table 5: Analysis of feedback iteration number.
+
+
Iterations
Cov-Sold
Cet-Sold
Cov-Size
Cet-Size
1
0.1378
0.1012
0.1789
0.1021
4
0.1285
0.1008
0.1573
0.0963
8
0.1187
0.0765
0.1421
0.0852
12
0.1191
0.0799
0.1453
0.0844
16
0.1172
0.0805
0.1479
0.0867
+
+Table 6: Analysis of molecule concept number. Here, we only change the concept number. Other operations and settings are kept unchanged.
+
+
Number
Cov-Sold
Cet-Sold
Cov-Size
Cet-Size
8
0.1233
0.0892
0.1541
0.0927
12
0.1187
0.0765
0.1421
0.0852
16
0.1201
0.0743
0.1478
0.0874
+
+Number of molecule concepts. As shown in Fig. 2, we explore extracting a series of molecule concepts to focus on critical substructures. In Table 6, we can observe that the concept number affects the performance. Utilizing fewer concepts could not capture sufficient substructure characteristics
+
+effectively, which reduces the performance. For our method, when the concept number is set to 12, the generalization performance is the best. Besides, during mining molecule concepts (equation 6 and equation 7), we employ KAN (Liu et al., 2024) to improve the concept accuracy. Here, we find that replacing KAN with MLP results in performance degradation. For example, for Cov-Sold case, the performance is decreased by around $0.6\%$ , indicating KAN's effectiveness.
+
+# 5 CONCLUSION
+
+In this paper, we propose a new method, i.e., Concept-Enhanced Feedback Disentanglement, for learning generalized molecular representation against distribution shifts. Particularly, by performing multiple feedback iterations, our method could progressively decompose expected features involving rich generalized information. Meanwhile, fusing the concepts that focus on substructures could further strengthen the generalization. Extensive experimental results on multiple datasets and tasks demonstrate that our method could indeed disentangle generalized molecular representations.
+
+# ACKNOWLEDGEMENT
+
+This work is supported in part by the National Key R&D Program of China (No. 2023YFC3305600), Joint Fund of Ministry of Education of China (8091B022149, 8091B02072404), National Natural Science Foundation of China (62472333, 62132016, 62171343), and Natural Science Basic Research Program of Shaanxi (2020JC-23).
+
+# REFERENCES
+
+Kartik Ahuja, Ethan Caballero, Dinghuai Zhang, Jean-Christophe Gagnon-Audet, Yoshua Bengio, Ioannis Mitliagkas, and Irina Rish. Invariance principle meets information bottleneck for out-of-distribution generalization. NeurIPS, 34:3438-3450, 2021.
+Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
+Maria Boulougouri, Pierre Vandergheynst, and Daniel Probst. Molecular set representation learning. Nature Machine Intelligence, 6(7):754-763, 2024.
+Shaked Brody, Uri Alon, and Eran Yahav. How attentive are graph attention networks? arXiv preprint arXiv:2105.14491, 2021.
+Shiyu Chang, Yang Zhang, Mo Yu, and Tommi Jaakkola. Invariant rationalization. In ICML, pp. 1448-1458. PMLR, 2020.
+Yongqiang Chen, Yonggang Zhang, Yatao Bian, Han Yang, MA Kaili, Binghui Xie, Tongliang Liu, Bo Han, and James Cheng. Learning causally invariant representations for out-of-distribution generalization on graphs. NeurIPS, 35:22131-22148, 2022.
+Yongqiang Chen, Yatao Bian, Kaiwen Zhou, Binghui Xie, Bo Han, and James Cheng. Does invariant graph learning via environment augmentation learn invariance? NeurIPS, 36, 2024.
+Elliot Creager, Jorn-Henrik Jacobsen, and Richard Zemel. Environment inference for invariant learning. In ICML, pp. 2189-2200. PMLR, 2021.
+Chandra Kiran Reddy Evuru, Sreyan Ghosh, Sonal Kumar, Utkarsh Tyagi, Dinesh Manocha, et al. Coda: Constrained generation based data augmentation for low-resource nlp. arXiv preprint arXiv:2404.00415, 2024.
+Shaohua Fan, Xiao Wang, Yanhu Mo, Chuan Shi, and Jian Tang. Debiasing graph neural networks via learning disentangled causal substructure. NeurIPS, 35:24934-24946, 2022.
+Yin Fang, Qiang Zhang, Haihong Yang, Xiang Zhuang, Shumin Deng, Wen Zhang, Ming Qin, Zhuo Chen, Xiaohui Fan, and Huajun Chen. Molecular contrastive learning with chemical element knowledge graph. In AAAI, volume 36, pp. 3968-3976, 2022.
+
+Amir Feder, Yoav Wald, Claudia Shi, Suchi Saria, and David Blei. Causal-structure driven augmentations for text ood generalization. NeurIPS, 36, 2024.
+Yaroslav Ganin, Evgeniya Ustinova, Hana Ajakan, Pascal Germain, Hugo Larochelle, François Laviolette, Mario March, and Victor Lempitsky. Domain-adversarial training of neural networks. Journal of machine learning research, 17(59):1-35, 2016.
+Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In ICML, pp. 1263-1272. PMLR, 2017.
+Rafael Gómez-Bombarelli, Jennifer N Wei, David Duvenaud, José Miguel Hernández-Lobato, Benjamín Sánchez-Lengeling, Dennis Sheberla, Jorge Aguilera-Iparraguirre, Timothy D Hirzel, Ryan P Adams, and Alán Aspuru-Guzik. Automatic chemical design using a data-driven continuous representation of molecules. ACS central science, 4(2):268-276, 2018.
+Shurui Gui, Xiner Li, Limei Wang, and Shuiwang Ji. Good: A graph out-of-distribution benchmark. NeurIPS, 35:2059-2073, 2022.
+Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. NeurIPS, 30, 2017.
+Weihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik, Percy Liang, Vijay Pande, and Jure Leskovec. Strategies for pre-training graph neural networks. arXiv preprint arXiv:1905.12265, 2019.
+John Ingraham, Vikas Garg, Regina Barzilay, and Tommi Jaakkola. Generative models for graph-based protein design. NeurIPS, 32, 2019.
+Yuanfeng Ji, Lu Zhang, Jiaxiang Wu, Bingzhe Wu, Long-Kai Huang, Tingyang Xu, Yu Rong, Lanqing Li, Jie Ren, Ding Xue, 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.
+Mostafa Karimi, Di Wu, Zhangyang Wang, and Yang Shen. Deepaffinity: interpretable deep learning of compound-protein affinity through unified recurrent and convolutional neural networks. Bioinformatics, 35(18):3329-3338, 2019.
+Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. *ICLR*, 2017.
+Andreš Nikolaevich Kolmogorov. On the representation of continuous functions of several variables by superpositions of continuous functions of a smaller number of variables. American Mathematical Society, 1961.
+David Krueger, Ethan Caballero, Joern-Henrik Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Out-of-distribution generalization via risk extrapolation (rex). In ICML, pp. 5815-5826. PMLR, 2021.
+Bo Li, Yifei Shen, Yezhen Wang, Wenzhen Zhu, Dongsheng Li, Kurt Keutzer, and Han Zhao. Invariant information bottleneck for domain generalization. In AAAI, volume 36, pp. 7399-7407, 2022a.
+Haoyang Li, Ziwei Zhang, Xin Wang, and Wenwu Zhu. Learning invariant graph representations for out-of-distribution generalization. NeurIPS, 35:11828-11841, 2022b.
+Jaechang Lim, Seongok Ryu, Kyubyong Park, Yo Joong Choe, Jijeon Ham, and Woo Youn Kim. Predicting drug-target interaction using a novel graph neural network with 3d structure-embedded graph representation. Journal of chemical information and modeling, 59(9):3981-3988, 2019.
+Gang Liu, Tong Zhao, Jiaxin Xu, Tengfei Luo, and Meng Jiang. Graph rationalization with environment-based augmentations. In KDD, pp. 1069-1078, 2022.
+Ziming Liu, Yixuan Wang, Sachin Vaidya, Fabian Ruehle, James Halverson, Marin Soljacic, Thomas Y Hou, and Max Tegmark. Kan: Kolmogorov-arnold networks. arXiv preprint arXiv:2404.19756, 2024.
+
+Francesco Locatello, Dirk Weissenborn, Thomas Unterthiner, Aravindh Mahendran, Georg Heigold, Jakob Uszkoreit, Alexey Dosovitskiy, and Thomas Kipf. Object-centric learning with slot attention. NeurIPS, 33:11525-11538, 2020.
+Fangrui Lv, Jian Liang, Shuang Li, Bin Zang, Chi Harold Liu, Ziteng Wang, and Di Liu. Causality inspired representation learning for domain generalization. In CVPR, pp. 8046-8056, 2022.
+Divyat Mahajan, Shruti Tople, and Amit Sharma. Domain generalization using causal matching. In ICML, pp. 7313-7324. PMLR, 2021.
+David Mendez, Anna Gaulton, A Patrícia Bento, Jon Chambers, Marleen De Veij, Eloy Félix, María Paula Magariños, Juan F Mosquera, Prudence Mutowo, Michal Nowotka, et al. Chembl: towards direct deposition of bioassay data. *Nucleic acids research*, 47(D1):D930–D940, 2019.
+Siqi Miao, Mia Liu, and Pan Li. Interpretable and generalizable graph learning via stochastic attention mechanism. In ICML, pp. 15524-15543. PMLR, 2022.
+Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
+Raghunathan Ramakrishnan, Pavlo O Dral, Matthias Rupp, and O Anatole Von Lilienfeld. Quantum chemistry structures and properties of 134 kilo molecules. *Scientific data*, 1(1):1-7, 2014.
+Ladislav Rampášek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu, Guy Wolf, and Dominique Beaini. Recipe for a general, powerful, scalable graph transformer. NeurIPS, 35: 14501-14515, 2022.
+Alexander J Ratner, Henry Ehrenberg, Zeshan Hussain, Jared Dunnmon, and Christopher Ré. Learning to compose domain-specific transformations for data augmentation. NeurIPS, 30, 2017.
+Alexander Robey, George J Pappas, and Hamed Hassani. Model-based domain generalization. NeurIPS, 34:20210-20229, 2021.
+Yu Rong, Yatao Bian, Tingyang Xu, Weiyang Xie, Ying Wei, Wenbing Huang, and Junzhou Huang. Self-supervised graph transformer on large-scale molecular data. NeurIPS, 33:12559-12571, 2020.
+Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generalization. arXiv preprint arXiv:1911.08731, 2019.
+Ana Sanchez-Fernandez, Elisabeth Rumetshofer, Sepp Hochreiter, and Günter Klambauer. Contrastive learning of image-and structure-based representations in drug discovery. In *ICLR2022 Machine Learning for Drug Discovery*, 2022.
+Jonathan M Stokes, Kevin Yang, Kyle Swanson, Wengong Jin, Andres Cubillos-Ruiz, Nina M Donghia, Craig R MacNair, Shawn French, Lindsey A Carfrae, Zohar Bloom-Ackermann, et al. A deep learning approach to antibiotic discovery. Cell, 180(4):688-702, 2020.
+Yongduo Sui, Xiang Wang, Jiancan Wu, Min Lin, Xiangnan He, and Tat-Seng Chua. Causal attention for interpretable and generalizable graph classification. In KDD, pp. 1696-1705, 2022.
+Baochen Sun and Kate Saenko. Deep coral: Correlation alignment for deep domain adaptation. In Computer Vision-ECCV 2016 Workshops: Amsterdam, The Netherlands, October 8-10 and 15-16, 2016, Proceedings, Part III 14, pp. 443-450. Springer, 2016.
+Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. NeurIPS, 30, 2017.
+Vladimir Vapnik. The nature of statistical learning theory. Springer science & business media, 2013.
+Jindong Wang, Cuiling Lan, Chang Liu, Yidong Ouyang, Tao Qin, Wang Lu, Yiqiang Chen, Wenjun Zeng, and S Yu Philip. Generalizing to unseen domains: A survey on domain generalization. IEEE transactions on knowledge and data engineering, 35(8):8052-8072, 2022a.
+
+Ruijia Wang, Haoran Dai, Cheng Yang, Le Song, and Chuan Shi. Advancing molecule invariant representation via privileged substructure identification. In KDD, pp. 3188-3199, 2024a.
+Xinyi Wang, Michael Saxon, Jiachen Li, Hongyang Zhang, Kun Zhang, and William Yang Wang. Causal balancing for domain generalization. arXiv preprint arXiv:2206.05263, 2022b.
+Yili Wang, Kaixiong Zhou, Ninghao Liu, Ying Wang, and Xin Wang. Efficient sharpness-aware minimization for molecular graph transformer models. ICLR, 2024b.
+Gerhard Widmer and Miroslav Kubat. Learning in the presence of concept drift and hidden contexts. Machine learning, 23:69-101, 1996.
+Among Wu, Yahong Han, Linchao Zhu, and Yi Yang. Instance-invariant domain adaptive object detection via progressive disentanglement. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(8):4178-4193, 2021.
+Ying-Xin Wu, Xiang Wang, An Zhang, Xiangnan He, and Tat-Seng Chua. Discovering invariant rationales for graph neural networks. ICLR, 2022.
+Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Molecularnet: a benchmark for molecular machine learning. Chemical science, 9(2):513-530, 2018.
+Guikun Xu, Yongquan Jiang, PengChuan Lei, Yan Yang, and Jim Chen. Gtmgc: Using graph transformer to predict molecule's ground-state conformation. In ICLR, 2024.
+Qinwei Xu, Ruipeng Zhang, Ya Zhang, Yanfeng Wang, and Qi Tian. A fourier-based framework for domain generalization. In CVPR, pp. 14383-14392, 2021a.
+Zhao Xu, Youzhi Luo, Xuan Zhang, Xinyi Xu, Yaochen Xie, Meng Liu, Kaleb Dickerson, Cheng Deng, Maho Nakata, and Shuiwang Ji. Molecule3d: A benchmark for predicting 3d geometries from molecular graphs. arXiv preprint arXiv:2110.01717, 2021b.
+Jingkang Yang, Kaiyang Zhou, Yixuan Li, and Ziwei Liu. Generalized out-of-distribution detection: A survey. International Journal of Computer Vision, pp. 1-28, 2024.
+Kevin Yang, Kyle Swanson, Wengong Jin, Connor Coley, Philipp Eiden, Hua Gao, Angel Guzman-Perez, Timothy Hopper, Brian Kelley, Miriam Mathea, et al. Analyzing learned molecular representations for property prediction. Journal of chemical information and modeling, 59(8): 3370-3388, 2019.
+Nianzu Yang, Kaipeng Zeng, Qitian Wu, Xiaosong Jia, and Junchi Yan. Learning substructure invariance for out-of-distribution molecular representations. *NeurIPS*, 35:12964–12978, 2022.
+Amir R Zamir, Te-Lin Wu, Lin Sun, William B Shen, Bertram E Shi, Jitendra Malik, and Silvio Savarese. Feedback networks. In CVPR, pp. 1308-1317, 2017.
+Hanlin Zhang, Yi-Fan Zhang, Weiyang Liu, Adrian Weller, Bernhard Schölkopf, and Eric P Xing. Towards principled disentanglement for domain generalization. In CVPR, pp. 8024-8034, 2022.
+Hongyi Zhang. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
+Kaiyang Zhou, Yongxin Yang, Timothy Hospedales, and Tao Xiang. Deep domain-adversarial image generation for domain generalisation. In AAAI, volume 34, pp. 13025-13032, 2020.
+Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Domain generalization with mixstyle. arXiv preprint arXiv:2104.02008, 2021.
+Kaiyang Zhou, Yongxin Yang, Yu Qiao, and Tao Xiang. Mixstyle neural networks for domain generalization and adaptation. International Journal of Computer Vision, 132(3):822-836, 2024.
+Xiang Zhuang, Qiang Zhang, Keyan Ding, Yatao Bian, Xiao Wang, Jingsong Lv, Hongyang Chen, and Huajun Chen. Learning invariant molecular representation in latent discrete space. NeurIPS, 36:78435-78452, 2023.
+
+# A APPENDIX
+
+To learn generalized molecular representation, this paper proposes a new method, i.e., Concept-Enhanced Feedback Disentanglement, aiming to use feedback decomposition and concepts involving critical substructures to improve the generalization of the learned representation. In the appendix, we provide more experimental details, additional analyses, and more prediction results.
+
+# B DATASETS AND METRICS
+
+Datasets. For molecular representation learning, we employ two benchmarks, i.e., GOOD (Gui et al., 2022) and DrugOOD (Ji et al., 2022). Particularly, we follow the work (Zhuang et al., 2023) to utilize three molecular datasets for the prediction task: (1) GOOD-HIV (Wu et al., 2018), where the purpose is binary classification to predict whether a molecule can inhibit HIV; (2) GOOD-ZINC (Gómez-Bombarelli et al., 2018), which is a regression dataset aimed at predicting molecular solubility; and (3) GOOD-PCBA (Wu et al., 2018), which includes 128 bioassays and forms 128 binary classification tasks. Each dataset contains two environment-splitting strategies (scaffold and size), and two shift types (covariate and concept) are applied per splitting outcome, resulting in a total of 12 distinct datasets (as shown in Table 1). Furthermore, DrugOOD (Ji et al., 2022) provides three environment-splitting strategies, including assay, scaffold, and size, and applies these three splitting to two measurements (IC50 and EC50). As a result, we obtain 6 datasets (as shown in Table 2), and each dataset contains a binary classification task for drug target binding affinity prediction
+
+For molecule's ground-state prediction, we follow the work (Xu et al., 2024) to utilize Molecule3D (Xu et al., 2021b) and QM9 (Wu et al., 2018) as benchmarks. Particularly, Molecule3D aims to use DNNs to predict the ground-state 3D geometries of molecules based solely on their 2D graph structure. And this large-scale dataset comprises approximately 4 million molecules, each with its own 2D molecular graph, ground-state 3D geometric structure, and four additional quantum properties. In this paper, we employ the random splitting according to the same distribution based on the molecule's core component. Besides, QM9 is a quantum chemistry dataset that provides geometry, energy, electronic, and thermodynamic properties for nearly 130,000 organic molecules with 9 heavy atoms, containing molecular most stable conformation.
+
+Metrics. For molecular representation learning, we report the ROC-AUC score for GOOD-HIV and DrugOOD datasets as the task is binary classification. For GOOD-ZINC, we use the Mean Average Error (MAE) since the task is regression. While for GOOD-PCBA, we use Average Precision (AP) averaged over all tasks as the evaluation metric due to extremely imbalanced classes.
+
+For molecule's ground-state prediction, we follow the work (Xu et al., 2024) to utilize three metrics, i.e., D-MAE, D-RMSD, and C-RMSD. Concretely, given a dataset with $N$ interatomic distances, the Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) between the prediction $\{d_i^*\}_{i=1}^N$ and the ground truth $\{d_i\}_{i=1}^N$ are used to evaluate the performance at node-pair level:
+
+$$
+\mathrm {D} - \operatorname {M A E} \left(\left\{d _ {i} \right\} _ {i = 1} ^ {N}, \left\{d _ {i} ^ {*} \right\} _ {i = 1} ^ {N}\right) = \frac {1}{N} \sum_ {i = 1} ^ {N} \left| d _ {i} - d _ {i} ^ {*} \right|, \tag {11}
+$$
+
+$$
+\mathrm {D} - \operatorname {R M S E} \left(\left\{d _ {i} \right\} _ {i = 1} ^ {N}, \left\{d _ {i} ^ {*} \right\} _ {i = 1} ^ {N}\right) = \sqrt {\frac {1}{N} \sum_ {i = 1} ^ {N} \left(d _ {i} - d _ {i} ^ {*}\right) ^ {2}}. \tag {12}
+$$
+
+Additionally, C-RMSD between the ground truth $\mathbf{G}$ and the prediction $\mathbf{G}^*$ is computed as follows:
+
+$$
+\mathrm {C} - \operatorname {R M S D} \left(\mathbf {G}, \mathbf {G} ^ {*}\right) = \sqrt {\frac {1}{n} \sum_ {i = 1} ^ {n} \left\| g _ {i} - g _ {i} ^ {*} \right\| _ {2} ^ {2}}. \tag {13}
+$$
+
+# C THE CAUSE OF MOLECULAR DISTRIBUTION SHIFT
+
+For molecule data, there exist many kinds of distribution shifts. In this paper, we investigate three types of shift strategies, i.e., scaffold, size, and assay. Here, we give more explanations.
+
+
+Figure 5: More prediction results of molecule's ground-state conformation. We can observe that our method could accurately localize critical ground-state parts that determine the physical, chemical, and biological properties of the molecule in most cases, which demonstrates the effectiveness of our method for learning generalized molecule representation and capturing substructure characteristics.
+
+(1) Scaffold Environment: molecular scaffold is the fundamental structure of a molecule with desirable bioactive properties. Molecules with the same scaffold belong to the same environment. Distribution shift arises when there is a change in the molecular scaffold.
+(2) Size Environment: the size of a molecule refers to the total number of atoms in the molecule. Molecular size is also an inherent structural characteristics of molecular graphs. The distribution shift occurs when size changes.
+(3) Assay Environment: assay is an experimental method as an examination or determination for molecular characteristics. Due to variations in assay environments and targets, activity values measured by different assays often differ significantly. Samples tested within the same assay belong to a single environment, while a change in the assay leads to a distribution shift.
+
+# D MORE ABLATION EXPERIMENTS OF HYPER-PARAMETERS
+
+In equation 10, we utilize two hyper-parameters, i.e., $\alpha_{1}$ and $\alpha_{2}$ , to balance the two loss terms, i.e., $\mathcal{L}_{fd}$ and $\mathcal{L}_{vd}$ . Here, based on GOOD-ZINC with Covariate-Scaffold shift, we make an ablation analysis. We only change the settings of hyper-parameters.
+
+Analysis of hyper-parameter $\alpha_{1}$ . In equation 10, the goal of the loss term $\mathcal{L}_{fd}$ is to encourage the feedback disentangled process to decompose generalized representation effectively. Thus, the setting of hyper-parameter $\alpha_{1}$ is important. Here, we make an experiment. When $\alpha_{1}$ is separately set to 0.5, 0.1, and 0.05, the corresponding performance is 0.1251, 0.1187, and 0.1239.
+
+Analysis of hyper-parameter $\alpha_{2}$ . In equation 10, the loss term $\mathcal{L}_{vd}^{t}$ is to promote the decomposed features to involve plentiful invariant characteristics related to the input molecule while enlarging the estimated distribution gap between the generalized and spurious features. Thus, the hyper-parameter $\alpha_{2}$ is still an important hyper-parameter. Here, we make an experiment. When $\alpha_{2}$ is separately set to 0.05, 0.01, and 0.005, the performance is 0.1248, 0.1187, and 0.1225.
+
+Input: Molecule Dataset $\{G,Y\}$ , randomly initialized GNN, randomly initialized spurious encoder and generalized encoder, randomly initialized concept learning module, weight $\alpha_{1}$ for the loss $\mathcal{L}_{fd}$ , weight $\alpha_{2}$ for the loss $\mathcal{L}_{vd}$ .
+
+Output: Trained parameters.
+
+Algorithm 1 Training Process of Concept-Enhanced Feedback Disentanglement
+while train do
+Sample molecules from the given dataset $\{G,Y\}$
+Utilize a GNN to extract the representation $F$
+for $t = 0$ do $Q_{0} = F$ Use equation 3 to estimate corresponding means (i.e., $\mu_0^{Spu}$ and $\mu_0^{Gen}$ ) and variances (i.e., $\sigma_0^{Spu}$ and $\sigma_0^{Gen}$ ) for spurious and generalized features. Perform sampling and encoding operations to obtain $Z_{0}^{Spu}$ and $\tilde{Z}_0^{\mathrm{Gen}}$ based on equation 4. Learn molecule concepts $C$ and calculate the generalized representation $Z_{0}^{Gen}$ based on equation 6 and equation 7.
+end
+for $t = 1$ do $Q_{1} = Z_{0}^{Gen}$ Use equation 3 to estimate corresponding means (i.e., $\mu_1^{Spu}$ and $\mu_1^{Gen}$ ) and variances (i.e., $\sigma_1^{Spu}$ and $\sigma_1^{Gen}$ ) for spurious and generalized features. Perform sampling and encoding operations to obtain $Z_{1}^{Spu}$ and $\tilde{Z}_1^{Gen}$ based on equation 4. Learn molecule concepts $C$ and calculate the generalized representation $Z_{1}^{Gen}$ based on equation 6 and equation 7.
+end
+for $t = 2,\ldots ,T$ do $Q_{t} = \phi ([Z_{t - 1}^{Gen},Z_{t - 2}^{Gen}])$ Use equation 3 to estimate corresponding means (i.e., $\mu_t^{Spu}$ and $\mu_t^{Gen}$ ) and variances (i.e., $\sigma_t^{Spu}$ and $\sigma_t^{Gen}$ ) for spurious and generalized features. Perform sampling and encoding operations to obtain $Z_{t}^{Spu}$ and $\tilde{Z}_{t}^{Gen}$ based on equation 4. Learn molecule concepts $C$ and calculate the generalized representation $Z_{t}^{Gen}$ based on equation 6 and equation 7.
+end Calculate the overall training objective $\mathcal{L}_{\mathrm{task}}$ using equation 5, equation 8, equation 9. Update the trained parameters based on equation 10.
+end
+
+Finally, Algorithm 1 shows the training processes of our method. For step $t > = 2$ , the feedback is from the outputs of the previous two steps. By means of feedback disentanglement, our method could decompose generalized molecular representation effectively, which improves the performance of downstream tasks. In Fig. 5, we show more prediction results of molecule's ground-state conformation. We can see that our method could localize critical ground-state molecular substructures, which further demonstrates the superiorities of our method.
+
+# E MORE CHEMICAL INSPIRATION OF OUR METHOD
+
+This method is mainly based on the following chemical observations:
+
+(1) A chemical molecule is a complex composed of multiple atoms and bonds. The reason for the OOD problem is the structural change of molecules. For example, changes in molecular chirality can lead to deviations in molecular properties. Thus, learning robust molecule representation is important for molecule-based tasks, e.g., drug discovery.
+(2) Lines 082-095 have indicated that existing methods could be classified into two types, i.e., First-Separation-Then-Encoding and First-Encoding-Then-Separation (as shown in Fig. 1 (a) and (b)). As indicated in Lines 272-283 and Fig. 3, these methods for learning generalized molecular representation generally employ a one-step disentangled strategy, i.e., directly separating the input into
+
+generalized and spurious parts. However, in practice, we may encounter some unknown biomacromolecules containing more atoms and highly complex structures, e.g., entanglement of multiple substructures. At this time, using the original one-step mechanism could not obtain satisfactory disentangled results. To this end, we exploit the feedback idea to iteratively and progressively separate generalized molecular representation.
+
+(3) In general, the molecule's ground-state conformation belongs to the substructures of molecules and determines their properties. Therefore, it is important to capture substructure-related characteristics. To this end, we define a series of concepts to build connections between molecule substructures and corresponding concepts, which further improves the performance.
+
+# F MORE EXPERIMENTS TO EVALUATE INVARIANCE
+
+Table 7: To further demonstrate the ability of disentangling invariance, we further evaluate our method on Two-Piece Graph Datasets Chen et al. (2024).
+
+
Datasets
{0.8, 0.9}
{0.7, 0.9}
Avg.
DisC Fan et al. (2022)
45.06
39.42
42.24
CIGA Chen et al. (2022)
57.87
43.62
50.75
GALA Chen et al. (2024)
76.42
72.50
74.46
Ours
78.26
74.32
76.29
+
+We follow the work Chen et al. (2024) and further evaluate our method on Two-Piece Graph Datasets Chen et al. (2024). Particularly, each dataset is generated from a variation of two-piece graph model, denoted as $\{\mathbf{a},\mathbf{b}\}$ , where a refers to the invariant correlation strength and b refers to the spurious correlation strength. The results are shown in Table 7.
+
+We can observe that our method indeed improves the performance. Particularly, when the invariant correlation strength is weaker than the spurious correlation strength, the performance of our method outperforms state-of-the-art methods, further demonstrating that our method is indeed beneficial for disentangling invariant characteristics.
+
+# G COMPARISON BETWEEN RVQ AND MOLECULE CONCEPT LEARNING
+
+Our molecule concept learning module is significantly different from Residual Vector Quantization (RVQ) Zhuang et al. (2023). In essence, RVQ is to perform feature replacement. Our method is to build the connection to capture critical molecule substructures:
+
+(1) The motivation is different. RVQ aims to leverage the discretized continuous representation to improve the model generalization. As shown in Fig. 6, our method is to learn a series of concepts that could capture critical molecule structure information involving plentiful task-specific invariant molecule characteristics.
+(2) The operations are different. RVQ first introduces a shared learnable codebook as a discrete latent space. For each node representation in molecular graph, RVQ looks up and fetches the nearest neighbor in the codebook and outputs it as the result. Meanwhile, a sum operation is further used to strengthen the representation ability. During training, similar to VQ-VAE Van Den Oord et al. (2017), RVQ employs the exponential moving average updates for the codebook.
+
+Differently, our concepts are first sampled from a learnable Gaussian distribution. And we employ KAN operation to promote the learning of concepts. Importantly, as shown in equation 6, the weighted residual operation is to align critical molecule substructure features to the corresponding concept, building the connection between molecule substructures and corresponding concepts. During training, we only utilize the task loss, e.g., molecule property prediction, to promote the learned concepts to capture plentiful task-specific invariant molecule characteristics.
+
+(3) Experimental results show the effectiveness of our method. Taking GOOD-ZINC as the example, for iMoLD Zhuang et al. (2023), we first remove the RVQ operation and keep other operations unchanged. We observe that removing RVQ does not affect the performance. Instead, our concept mining module could be plugged into iMoLD to further improve its performance. For the
+
+
+Figure 6: Molecule concepts (colorful stars) are learned from all molecule structures, which are not specific to certain molecule structures. By means of the residual operation (as shown in solid arrows), we can build the connection between molecule substructures and corresponding concepts, which is beneficial for aligning critical molecule substructure features to the corresponding concept.
+
+covariate case of scaffold, the performance is improved by 0.0142. Furthermore, the prediction results of the molecule's ground-state conformation in Fig. 4 and 5 also show that our learned concepts are beneficial for capturing critical substructures.
+
+# H FURTHER ANALYSIS OF THE LOSS FUNCTION
+
+equation 10 is the optimization objective, consisting of three terms, i.e., $\mathcal{L}_{pred}$ , $\mathcal{L}_{fd}$ (as shown in equation 8), and $\mathcal{L}_{vd}^t$ (as shown in equation 5).
+
+Proposition 1. $\mathcal{L}_{vd}^{t}$ mainly is a contrastive loss. Minimizing $\mathcal{L}_{vd}^{t}$ could enlarge the gap between the disentangled $\tilde{Z}_t^{Gen}$ and $Z_{t}^{Spu}$ . Meanwhile, $\tilde{Z}_t^{Gen}$ is promoted to retain plentiful input-related content.
+
+Analysis. The first term of $\mathcal{L}_{vd}^t$ is related to the InfoNCE loss Oord et al. (2018). Concretely, we set $\mathcal{B}_1 = \exp (\mathrm{sim}(\tilde{Z}_t^{Gen},F))$ and $\mathcal{B}_2 = \exp (\mathrm{sim}(Z_t^{Spu},F))$ :
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \log \frac {\mathcal {B} _ {1}}{\mathcal {B} _ {1} + \mathcal {B} _ {2}} \right] = \mathbb {E} \left[ \log \mathcal {B} _ {1} \right] - \mathbb {E} \left[ \log \left(\mathcal {B} _ {1} + \mathcal {B} _ {2}\right) \right] \tag {14} \\ \leq \mathbb {E} [ \log \mathcal {B} _ {1} ] - \mathbb {E} [ \log \mathcal {B} _ {2} ] \\ \end{array}
+$$
+
+Obviously, maximizing equation 14 narrows the semantic distance between $\tilde{Z}_t^{Gen}$ and the input $F$ and enlarges the semantic gap between $Z_{t}^{Spu}$ and $F$ . Equally, this operation enlarges the gap between $\tilde{Z}_{t}^{Gen}$ and $Z_{t}^{Spu}$ , which is beneficial for strengthening the disentangled ability.
+
+Proposition 2. Minimizing $\mathcal{L}_{fd}$ is instrumental in achieving the invariant representation $Z^{Gen}$ .
+
+Analysis. In equation 8, $\mathcal{L}_{fd}$ mainly consists of two terms, i.e., $\sum_{i=0}^{T} \sum_{j=0}^{T} \sin(Z_i^{Gen}, Z_j^{Gen})_{i \neq j}$ and $\sum_{i=0}^{T} \sin(Z_i^{Gen}, Z_i^{Spu})$ :
+
+$$
+\sum_ {i = 0} ^ {T} \sum_ {j = 0} ^ {T} \sin \left(Z _ {i} ^ {\text {G e n}}, Z _ {j} ^ {\text {G e n}}\right) _ {i \neq j} - \sum_ {i = 0} ^ {T} \sin \left(Z _ {i} ^ {\text {G e n}}, Z _ {i} ^ {\text {S p u}}\right) \tag {15}
+$$
+
+Maximizing equation 15 first enlarges the gap between $Z_{i}^{Gen}$ and $Z_{i}^{Spu}$ at the $i$ -th iteration, which is beneficial for enhancing the disentangled ability. Secondly, $Z_{i}^{Gen}$ and $Z_{j}^{Gen}$ separately represent disentangled generalized outputs at different iterations. Here, we assume that when taking a representation involving plentiful invariant information as the input, the disentangled output should contain less spurious information, i.e., the output is equal to the input. Therefore, narrowing the semantic distance is conducive to learning invariant representations across various environments.
+
+
+Figure 7: Visualization examples of molecule concepts. Here, we directly project the captured concepts into the predicted molecules. The green regions represent the focused content.
+
+# I EXAMINING IMPORTANCE OF CONCEPTS ACROSS ITERATIONS
+
+Table 5 analyzes the impact of iteration number. We can observe that when the iteration number increases, inserting concepts could improve the performance effectively, which indicates the effectiveness of the learned concepts. To further analyze the impact of iteration number on concepts, we also make a new ablation experiment, i.e., removing the concepts at the 4th, and 8th iteration. The results are shown as follows:
+
+Table 8: Examining importance of concepts across iterations.
+
+
Iterations
Concepts
CovSold
CetSold
CovSize
CetSize
4
✓
0.1285
0.1008
0.1573
0.0963
4
-
0.1402
0.1117
0.1738
0.1102
8
✓
0.1187
0.0765
0.1421
0.0852
8
-
0.1189
0.0783
0.1449
0.0897
+
+We can observe that when the iteration number is small, inserting concepts could significantly affect the performance. Instead, when the iteration number is large, the impact of concepts is somewhat weak. The reason may be that when the iteration number is small, leveraging concepts is beneficial for capturing critical substructures, improving the performance. As the iteration number increases, concepts progressively pay attention to meaningful substructure characteristics, reducing the iteration impact on performance.
+
+# J MORE ANALYSIS OF MOLECULE CONCEPTS
+
+We perform an ablation experiment of the decoder that calculates task-related representation. We observe that for classification and regression tasks, using decoders with more layers leads to the performance degradation. The reason may be that this operation introduces more parameters, resulting in the overfitting risk.
+
+In Fig. 7, we show some visualization examples of molecule concepts. Since these concepts are learned from all molecule data, they are not specific to certain kinds of molecules, which is beneficial for improving the generalization of molecule concepts. For different predictions, we can observe that the learned concepts could indeed focus on critical molecule substructures, which strengthens the performance of molecule prediction.
+
+# K ANALYSIS OF COMPUTATIONAL COSTS
+
+We observe that introducing feedback iterations indeed increases computational costs. During training, based on the same batch size, the memory is increased by around 0.9GB. However, in Fig. 8, we observe that the convergence speed is significantly faster than the baseline Zhuang et al. (2023).
+
+During inference, compared with one-step disentanglement, the inference time of using 8 iterations is increased by around 0.06s. Although the inference time is longer, the disentangled invariant representations are more accurate, which is instrumental in improving the generalization ability. Particularly, for molecules with multiple atoms and various structures, we observe that employing
+
+
+Figure 8: The training loss of the baseline Zhuang et al. (2023) and our method.
+
+our method could significantly improve the performance of downstream tasks, further demonstrating the effectiveness of our method.
+
+# L QUANTIFY CONTRIBUTION OF FEEDBACK MECHANISM
+
+To quantify the contribution of feedback iterations, we make an ablation experiment of the iteration number. Here, we only change the iteration number. Other operations are kept unchanged. The results are shown in Table 5.
+
+Table 9: Quantify contribution of feedback mechanism on highly complex molecules.
+
+
1
4
8
12
16
0.3014
0.1867
0.1341
0.1279
0.1254
+
+We can observe that compared with one-step disentanglement, using multiple feedback iterations indeed improves the performance, indicating that our method is beneficial for decomposing invariant molecule representations. Besides, we also observe that when the iteration number is larger than 12, the performance improvement is limited. The reason is that for the current dataset, using 12 iterations is sufficient for disentangling highly complex molecules.
+
+Finally, we observe that complex molecules usually contain more atoms. Therefore, to further demonstrate the effectiveness of our method on highly complex molecules, we select those molecules with more than 12 atoms for additional evaluation. The results are shown in Table 9.
+
+We can see that for complex molecules, using one-step disentanglement could not decompose invariant characteristics effectively. Using multiple feedback iterations could indeed decouple the representations involving plentiful invariant information, which strengthens the generalization ability.
+
+# M PROTEIN-LIGAND BINDING-AFFINITY PREDICTION
+
+For OOD molecular representation learning, in Table 1 and 2, we show the corresponding results. Furthermore, in Table 3, our method is evaluated on an additional task, i.e., molecule's ground-state prediction. These results demonstrate that our method could effectively disentangle invariant molecule characteristics, which strengthens the generalization ability.
+
+Finally, to further demonstrate the superiorities of our method, we evaluate our method on protein-ligand binding-affinity prediction. Binding affinity is an important metric in biology and medicinal chemistry that measures the strength of a reversible association between biological macromolecules,
+
+such as proteins or DNA, and small-molecule ligands, such as drugs Boulougouri et al. (2024). Here, we follow the work Boulougouri et al. (2024) and employ the same datasets and metrics to verify our feedback disentanglement method. The results are shown in Table 10.
+
+Table 10: Analysis of protein-ligand binding-affinity prediction.
+
+
Method
RMSE
MAE
R
MAT
1.457
1.154
0.747
DimeNet
1.453
1.138
0.752
CMPNN
1.408
1.117
0.765
SR-BIND Boulougouri et al. (2024)
1.383
1.122
0.780
CFD
1.356
1.073
0.794
+
+Here, MAT, DimeNet, CMPNN are three GNN-based methods. RMSE, MAE, and R are three predefined metrics. We can observe that for the challenging protein-ligand binding-affinity prediction, employing our method still improves the performance for the given three metrics. This further demonstrates that for biological macromolecules, using feedback disentanglement is meaningful, which improves the generalization of the learned molecule representations.
+
+# N MORE INTERPRETATIONS OF KAN
+
+In general, molecules consist of multiple atoms and bonds. For certain biomacromolecules, their structures are entanglement of various substructures, which poses the challenge for learning molecule concepts that focus on critical substructures.
+
+Inspired by the Kolmogorov-Arnold representation theorem Kolmogorov (1961), KAN allows learning custom activations of the network. In this way, it is possible to analyze the contribution of individual components of the input, then providing a more transparent view of the network's decision-making process.
+
+Thus, using KAN could sufficiently convert the analyzed components to the corresponding concepts that involve plentiful molecule-aware substructure information, which is beneficial for strengthening the generalization of molecule representations.
\ No newline at end of file
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/images.zip b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..22850654fd21034207fa6cab93d63d4321b70304
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:20961634c77dbf797a68ec6a712cdde8d9f855637a343d2f423df74d4fec3bc7
+size 830789
diff --git a/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/layout.json b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..5ceb6f1d5ed77734f5d01454bbdb4b15d81c6f60
--- /dev/null
+++ b/ICLR/2025/CFD_ Learning Generalized Molecular Representation via Concept-Enhanced Feedback Disentanglement/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:93689402b143476912bb16c7a3662f08543cbdae513741e2b7bee064b10e0ec0
+size 654659
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_content_list.json b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..f309896d5e3d94670dcd70b601e2f5f1fb5990ec
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dfe9f42276c888974aeb0023854cb1391d9e6fcb437ccaa8546d92320bc81096
+size 161540
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_model.json b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..63dc5523ef7bfce90ce5a829c0c7ba558114bc0c
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:542b41115847dd4bbcc1e0e450ef44fc4797e0594ca81d37015827dea114145d
+size 185389
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_origin.pdf b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..4ff2b0b5044de197cb72170ac78f5217e886877f
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/e03d544d-f158-44c3-9a25-13eddf9dbdff_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:06f6897cf3c63a4be50bddfe4d6332b59b1bc05b8985226dba5b753a65fa54f3
+size 15809151
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/full.md b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..ed97f51898628b985f2ec01d908efd5fa97c3ab2
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/full.md
@@ -0,0 +1,720 @@
+# CFG++: MANIFOLD-CONSTRAINED CLASSIFIER FREE GUIDANCE FOR DIFFUSION MODELS
+
+Hyungjin Chung*, Jeongsol Kim*, Geon Yeong Park*, Hyelin Nam*, Jong Chul Ye KAIST
+
+*: Equal Contribution
+
+{hj.chung, jeongsol, pky3436, hyelin.nam, jong.ye}@kaist.ac.kr
+
+
+beautiful lady, freckles, big smile, blue eyes, short ginger hair, wearing a floral blue vest top, soft light, dark gray background
+Figure 1: (Top) Comparison of T2I results by SDXL-Turbo for the prompt "kayak in the water, optical color, aerial view, rainbow". The CFG-guided image has significant artifacts, which are reduced in the CFG++ version. (Middle) DDIM Inversion results under CFG show noticeable artifacts at various CFG scales, which are significantly reduced by CFG++. (Bottom) The evolution of denoised estimates differs between CFG and CFG++. CFG exhibits sudden shifts and intense color saturation early in reverse diffusion, while CFG++ transitions smoothly from low to high-resolution.
+
+# ABSTRACT
+
+Classifier-free guidance (CFG) is a fundamental tool in modern diffusion models for text-guided generation. Although effective, CFG has notable drawbacks. For instance, DDIM with CFG lacks invertibility, complicating image editing; furthermore, high guidance scales, essential for high-quality outputs, frequently
+
+result in issues like mode collapse. This paper reveals that the problems may stem from the off-manifold phenomenon associated with CFG, rather than the diffusion models themselves. More specifically, inspired by the recent advancements of diffusion model-based inverse problem solvers (DIS), we reformulate text-guidance as an inverse problem with a text-conditioned score matching loss and develop CFG++, a novel approach that tackles the off-manifold challenges inherent in traditional CFG. CFG++ features a surprisingly simple fix to CFG, yet it offers significant improvements, including better sample quality for text-to-image generation, invertibility, smaller guidance scales, etc. Furthermore, CFG++ enables seamless interpolation between unconditional and conditional sampling at lower guidance scales, consistently outperforming traditional CFG at all scales. Moreover, CFG++ can be easily integrated into high-order diffusion solvers and naturally extends to distilled diffusion models. Experimental results confirm that our method significantly enhances performance in text-to-image generation, DDIM inversion, editing, and solving inverse problems, suggesting a wide-ranging impact and potential applications in various fields that utilize text guidance. Project Page: https://cfgpp-diffusion.github.io.
+
+# 1 INTRODUCTION
+
+Classifier-free guidance (CFG) (Ho & Salimans, 2021) forms the key basis of modern text-guided generation with diffusion models (Dhariwal & Nichol, 2021; Rombach et al., 2022). Nowadays, it is common practice to train a diffusion model with large-scale paired text-image data (Schuhmann et al., 2022), so that sampling (i.e. generating) a signal (e.g. image, video) from a diffusion model can either be done unconditionally from $p_{\theta}(\pmb{x}|\varnothing) \equiv p_{\theta}(\pmb{x})$ , or conditionally from $p_{\theta}(\pmb{x}|c)$ , where $c$ is the text conditioning. Once trained, it seems natural that one would acquire samples from the conditional distribution by simply solving the probability-flow ODE or SDE sampling (Song et al., 2021b;a; Karras et al., 2022) with the conditional score function. In practice, however, it is observed that the conditioning signal is insufficient when used naively. To emphasize the guidance, one uses the guidance scale $\omega > 1$ , where the direction can be defined by the direction from the unconditional score to the conditional score (Ho & Salimans, 2021).
+
+In modern text-to-image (T2I) diffusion models, the guidance scale $\omega$ is typically set within the range of [5.0, 30], referred to as the moderately high range of CFG guidance (Chen et al., 2024; Podell et al., 2023). The insufficiency in guidance also holds for classifier guidance (Dhariwal & Nichol, 2021; Song et al., 2021b) so that a scale of 10 was used. While using a high guidance scale yields higher-quality images with better alignment to the condition, it is also prone to mode collapse, reduces sample diversity, and yields an inevitable accumulation of errors during the sampling process. One example is DDIM inversion (Dhariwal & Nichol, 2021), a pivotal technique for controllable synthesis and editing (Mokady et al., 2023), where running the inversion process with $\omega > 1.0$ leads to significant compromise in the reconstruction performance (Mokady et al., 2023; Wallace et al., 2023). Another extreme example would be score distillation sampling (SDS) (Poole et al., 2022), where the guidance scale in the order of a few hundred is chosen. Using such a high guidance scale leads to better asset quality to some extent, but induces blurry and saturated results. Several research efforts have been made to mitigate this downside by exploring methods where using a smaller guidance scale suffices (Wang et al., 2024; Liang et al., 2023). Although recent progress in SDS-type methods has reduced the necessary guidance scale to a range that is similar to those of ancestral samplers, using a moderately large $\omega$ is considered an inevitable choice.
+
+In this work, we aim to give an answer to this conundrum by revisiting the geometric view of diffusion models. In particular, inspired by the recent advances in diffusion-based inverse problem solvers (DIS) (Kadkhodaie & Simoncelli, 2021; Chung et al., 2023a; Song et al., 2023; Kim et al., 2024b; Chung et al., 2024), we reformulate the text guidance as an inverse problem with a text-conditioned score-matching loss and derive a reverse diffusion sampling strategy by utilizing decomposed diffusion sampling (DDS) (Chung et al., 2024). This results in a surprisingly simple fix of CFG to the sampling process without any computational overhead. The resulting process, which we call CFG++, works with a small guidance scale, typically $\lambda \in [0.0,1.0]$ , that smoothly interpolates between unconditional and conditional sampling, with $\lambda = 1.0$ having a similar effect as using CFG sampling with $\omega \sim 12.5$ at 50 neural function evaluation (NFE). Furthermore, CFG++ reduces the inversion
+
+
+
+Figure 2: Comparison between reverse diffusion process by CFG and CFG++. CFG++. proposes a simple but surprisingly effective fix: using $\hat{\epsilon}_{\emptyset}(\pmb{x}_t)$ instead of $\hat{\epsilon}_{c}^{\omega}(\pmb{x}_t)$ in updating $\pmb{x}_{t-1}$ .
+
+error, enhancing and simplifying image reconstruction, as well as editing. Comparing CFG++ against CFG shows that we achieve consistently better sample quality for text-to-image (T2I) generation, significantly better DDIM inversion capabilities that lead to enhanced reconstruction and editing, and enabling the incorporation of CFG guidance to diffusion inverse solvers (DIS) (Chung et al., 2023a). While the applications of CFG++ that we show in this work are limited, we believe that our work will have a broad impact that can be applied to all applications that leverage text guidance through the traditional CFG.
+
+# 2 BACKGROUND
+
+Diffusion models. Diffusion models (Ho et al., 2020; Song et al., 2021b; Karras et al., 2022) are generative models designed to learn the reversal of a forward noising process. This process starts with an initial distribution $p_0(\pmb{x})$ where $\pmb{x} \in \mathbb{R}^n$ , and progresses towards the standard Gaussian distribution $p_T(\pmb{x}) \approx \mathcal{N}(\pmb{0}, \pmb{I})$ , utilizing forward Gaussian perturbation kernels. Sampling from the data distribution can be performed by solving either the reverse stochastic differential equation (SDE) or the equivalent probability-flow ordinary differential equation (PF-ODE) (Song et al., 2021b). For example, under the choice $p(\pmb{x}_t | \pmb{x}_0) = \mathcal{N}(\pmb{x}_0, \sigma_t^2 \pmb{I})$ , the generative PF-ODE reads
+
+$$
+d \boldsymbol {x} _ {t} = - \sigma_ {t} \nabla_ {\boldsymbol {x} _ {t}} \log p (\boldsymbol {x} _ {t}) d t = \frac {\boldsymbol {x} _ {t} - \mathbb {E} [ \boldsymbol {x} _ {0} | \boldsymbol {x} _ {t} ]}{\sigma_ {t}} d t, \quad \boldsymbol {x} _ {T} \sim p _ {T} (\boldsymbol {x} _ {T}), \tag {1}
+$$
+
+where Tweedie's formula (Efron, 2011) $\mathbb{E}[\pmb{x}_0|\pmb{x}_t] = \pmb{x}_t + \sigma_t^2\nabla_{\pmb{x}_t}\log p(\pmb{x}_t)$ is applied to achieve the second equality. When aiming for a text-conditional diffusion model that can condition on arbitrary $c$ , one can extend epsilon matching to a conditional one where the condition is dropped with a certain probability (Ho & Salimans, 2021) so that null conditioning with $c = \varnothing$ is possible. The neural network architecture of $\epsilon_{\theta}$ is designed so that the condition $c$ can modulate the output through cross attention (Rombach et al., 2022). For simplicity in notation throughout the paper, we define $\hat{\epsilon}_{c} := \epsilon_{\theta}(\pmb{x}_{t},\pmb{c})$ and $\hat{\epsilon}_{\emptyset} := \epsilon_{\theta}(\pmb{x}_{t},\emptyset)$ by dropping $\theta$ and $\pmb{x}_t$ .
+
+Extending the result of Tweedie's formula to the unconditional case under the variance preserving (VP) framework of DDPMs (Ho et al., 2020), we have
+
+$$
+\mathbb {E} \left[ \boldsymbol {x} _ {0} \mid \boldsymbol {x} _ {t}, \varnothing \right] = \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) := \left(\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right)\right) / \sqrt {\bar {\alpha} _ {t}}. \tag {2}
+$$
+
+Leveraging (2), it is common to use DDIM sampling (Song et al., 2021b) to solve the conditional probability-flow ODE (PF-ODE) of the generative process. Specifically, a single iteration reads
+
+$$
+\hat {\boldsymbol {x}} _ {\varnothing} = \left(\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {\varnothing}\right) / \sqrt {\bar {\alpha} _ {t}} \tag {3}
+$$
+
+$$
+\boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \hat {\boldsymbol {x}} _ {\varnothing} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing}, \tag {4}
+$$
+
+where $\hat{\pmb{x}}_{\emptyset} := \hat{\pmb{x}}_{\emptyset}(\pmb{x}_t) = \mathbb{E}[x_0|\pmb{x}_t,\emptyset]$ is the denoised signal by Tweedie's formula, and (4) corresponds to the renoising step1. This is repeated for $t = T,T - 1,\dots ,1$
+
+For modern diffusion models, it is common to train a diffusion model in the latent space (Rombach et al., 2022) with the latent variable $z$ . While most of our experiments are performed with latent diffusion models (LDM), as our framework holds both for pixel- and latent-diffusion models, we will simply use the notation $x$ regardless of the choice.
+
+Classifier free guidance. For a conditional diffusion, Ho & Salimans (2021) considered the sharpened posterior distribution $p^{\omega}(\pmb{x}|\pmb{c}) \propto p(\pmb{x})p(\pmb{c}|\pmb{x})^{\omega}$ . Using Bayes rule for some timestep $t$ ,
+
+$$
+\nabla_ {\boldsymbol {x}} \log p ^ {\omega} (\boldsymbol {x} _ {t} | \boldsymbol {c}) = \nabla_ {\boldsymbol {x} _ {t}} \log p (\boldsymbol {x} _ {t}) + \omega \left(\nabla_ {\boldsymbol {x} _ {t}} \log p (\boldsymbol {x} _ {t} | \boldsymbol {c}) - \nabla_ {\boldsymbol {x} _ {t}} \log p (\boldsymbol {x} _ {t})\right) \tag {5}
+$$
+
+
+(a)
+Figure 3: Off-manifold phenomenon of CFG arise from: (a) the typical CFG scale $\omega > 1.0$ which leads to extrapolation and deviation from the piecewise linear data manifold, and (b) CFG's renoising process, which introduces a nonzero offset $\Delta^{\omega}$ from the correct manifold. CFG++ effectively mitigates all these artifacts.
+
+
+(b)
+
+Parametrizing the score function with $\epsilon_{\theta}$ , as in DDPM (Ho et al., 2020), we have
+
+$$
+\hat {\epsilon} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t}\right) := \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) + \omega \left[ \hat {\epsilon} _ {c} \left(\boldsymbol {x} _ {t}\right) - \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) \right] \tag {6}
+$$
+
+where we introduce a compact notation $\hat{\epsilon}_c^{\omega}$ that guides the sampling from the sharpened posterior. When sampling with CFG guidance with DDIM sampling, one replaces $\hat{\epsilon}_{\emptyset}$ with $\hat{\epsilon}_c^{\omega}$ for both the Tweedie estimate (3) and the subsequent update step (4), leading to Algorithm 1.
+
+Diffusion model-based inverse problem solvers. Diffusion model-based inverse problem solvers (DIS) aims to perform posterior sampling from an unconditional diffusion model (Kadkhodaie & Simoncelli, 2021; Chung et al., 2023a; Song et al., 2023; Kim et al., 2024b). Specifically, for a given loss function $\ell(\pmb{x})$ which often stems from the likelihood, the goal of DIS is to address the optimization problem $\min_{\pmb{x} \in \mathcal{M}} \ell(\pmb{x})$ , where $\mathcal{M}$ represents the clean data manifold sampled from the unconditional distribution $p_0(\pmb{x})$ . It is essential to navigate in a way that minimizes cost while also identifying the correct clean manifold.
+
+Chung et al. (2023a) proposed diffusion posterior sampling (DPS), where the updated estimate from the noisy sample $\boldsymbol{x}_t \in \mathcal{M}_t$ is constrained to stay on the same noisy manifold $\mathcal{M}_t$ . This is achieved by computing the manifold constrained gradient (MCG) (Chung et al., 2022) on a noisy sample $\boldsymbol{x}_t \in \mathcal{M}_t$ as $\nabla_{\boldsymbol{x}_t}^{mcg}\ell(\boldsymbol{x}_t) \coloneqq \nabla_{\boldsymbol{x}_t}\ell(\hat{\boldsymbol{x}}_t)$ , where $\hat{\boldsymbol{x}}_t$ is the denoised sample in (2) through Tweedie's formula (Efron, 2011). The resulting algorithm with DDIM (Song et al., 2021b) can be stated as follows:
+
+$$
+\boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \left(\hat {\boldsymbol {x}} _ {\varnothing} - \gamma_ {t} \nabla_ {\boldsymbol {x} _ {t}} \ell (\hat {\boldsymbol {x}} _ {\varnothing})\right) + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {e}} _ {\varnothing}, \tag {7}
+$$
+
+where $\gamma_{t} > 0$ denotes the step size. Under the linear manifold assumption (Chung et al., 2022; 2023a), this allows precise transition to $\mathcal{M}_{t-1}$ . To mitigate the computational complexity and the instability of neural network backprop, Chung et al. (2024) shows that (7) can be equivalently represented as
+
+$$
+\boldsymbol {x} _ {t - 1} \simeq \sqrt {\bar {\alpha} _ {t - 1}} \left(\hat {\boldsymbol {x}} _ {\varnothing} - \gamma_ {t} \nabla_ {\hat {\boldsymbol {x}} _ {\varnothing}} \ell \left(\hat {\boldsymbol {x}} _ {\varnothing}\right)\right) + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {\epsilon}} _ {\varnothing} \tag {8}
+$$
+
+under further assumptions on $\mathcal{M}$ . This method, often referred to as the decomposed diffusion sampling (DDS), bypasses the computation of the score Jacobian, similar to Poole et al. (2022), making it stable and suitable for large-scale medical imaging inverse problems (Chung et al., 2024). In the following, we leverage the insight from DDS to propose an algorithm to improve upon the CFG algorithm.
+
+# 3 CFG++: MANIFOLD-CONSTRAINED CFG
+
+# 3.1 DERIVATION OF CFG++
+
+Instead of uncritically adopting the sharpened posterior distribution $p^{\omega}(\boldsymbol{x}|\boldsymbol{c}) \propto p(\boldsymbol{x})p(\boldsymbol{c}|\boldsymbol{x})^{\omega}$ as introduced by Ho & Salimans (2021), we adopt a fundamentally different strategy by reformulating text-guidance as an optimization problem. Specifically, our focus is on identifying a loss function $\ell(\boldsymbol{x})$ in (8) such that, when minimized under the condition set by the text, enables the reverse diffusion process to generate samples that increasingly satisfy the text condition progressively.
+
+One of the most significant contributions of this paper is to reveal that the text-conditioned score matching loss or alternatively, score distillation sampling (SDS) loss (Poole et al., 2022) is ideally
+
+suited for our purpose. Specifically, we are interested in solving the following inverse problem through diffusion models:
+
+$$
+\min _ {\boldsymbol {x} \in \mathcal {M}} \ell_ {s d s} (x), \quad \ell_ {s d s} (\boldsymbol {x}) := \| \boldsymbol {\epsilon} _ {\theta} (\sqrt {\bar {\alpha} _ {t}} \boldsymbol {x} + \sqrt {1 - \bar {\alpha} _ {t}} \boldsymbol {\epsilon}, \boldsymbol {c}) - \boldsymbol {\epsilon} \| _ {2} ^ {2} \tag {9}
+$$
+
+This implies that our goal is to identify solutions on the clean manifold $\mathcal{M}$ that optimally aligns with the text condition $c$ .
+
+To avoid the Jacobian computation, in this paper, we attempt to solve (9) through DDS in (8). The resulting sampling process from reverse diffusion is then given by
+
+$$
+\boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \left(\hat {\boldsymbol {x}} _ {\varnothing} - \gamma_ {t} \nabla_ {\hat {\boldsymbol {x}} _ {\varnothing}} \ell_ {s d s} (\hat {\boldsymbol {x}} _ {\varnothing})\right) + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing}. \tag {10}
+$$
+
+By using $\pmb{x}_t = \sqrt{\bar{\alpha}_t} \pmb{x} + \sqrt{1 - \bar{\alpha}_t} \pmb{\epsilon}$ from the clean image $\pmb{x} \in \mathcal{M}$ , we can equivalently write the loss as $\ell_{sds}(\pmb{x}) = \frac{\alpha_t}{1 - \bar{\alpha}_t} \| \pmb{x} - \hat{\pmb{x}}_c \|^2$ , which leads to
+
+$$
+\boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \left(\hat {\boldsymbol {x}} _ {\varnothing} + \lambda \left(\hat {\boldsymbol {x}} _ {\boldsymbol {c}} - \hat {\boldsymbol {x}} _ {\varnothing}\right)\right) + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing} \tag {11}
+$$
+
+where $\lambda := \frac{2\bar{\alpha}_t}{1 - \bar{\alpha}_t}\gamma_t$ . Using the CFG notation $\hat{\epsilon}_{\mathbf{c}}^{\lambda}(\boldsymbol{x}_t) := \hat{\epsilon}_{\emptyset}(\boldsymbol{x}_t) + \lambda [\hat{\epsilon}_{\mathbf{c}}(\boldsymbol{x}_t) - \hat{\epsilon}_{\emptyset}(\boldsymbol{x}_t)]$ and $\hat{x}_{\emptyset} + \lambda (\hat{x}_{\mathbf{c}} - \hat{x}_{\emptyset}) = (\boldsymbol{x}_t - \sqrt{1 - \bar{\alpha}_t}\hat{\epsilon}_{\mathbf{c}}^{\lambda}(\boldsymbol{x}_t)) / \sqrt{\bar{\alpha}_t}$ , (11) can be equivalently represented as
+
+$$
+\hat {\boldsymbol {x}} _ {\boldsymbol {c}} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right) = \left(\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right)\right) / \sqrt {\bar {\alpha} _ {t}} \tag {12}
+$$
+
+$$
+\boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \hat {\boldsymbol {x}} _ {c} ^ {\lambda} (\boldsymbol {x} _ {t}) + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t}) \tag {13}
+$$
+
+which is summarized in Algorithm 2. By examining Algorithm 1 and Algorithm 2, we observe that CFG and CFG++ are mostly the same, with a crucial difference in the renoising process. This surprisingly simple fix of utilizing the unconditional noise $\hat{\epsilon}_{\emptyset}(\pmb{x}_t)$ instead of $\hat{\epsilon}_{c}^{\omega}(\pmb{x}_t)$ leads to a smoother trajectory of generation, (Fig. 1 bottom) and generation with superior quality (Fig. 1 top).
+
+Although we focus our construction of the solver on DDIM for simplicity, note that DDIM is just one way of reverse sampling. There are other widely-used solvers such as Karras Euler and its variants (Karras et al., 2022), DPM-solver (Lu et al., 2022a;b), their ancestral variants $^{2}$ , etc. For most widely used solvers up to the second order, a single-step update of solving the unconditional PF-ODE can be represented as
+
+$$
+\boldsymbol {x} _ {i} = \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {i - 1}\right) + a _ {i} \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {i - 1}\right) + b _ {i} \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {i - 2}\right) + c _ {i} \boldsymbol {x} _ {i - 1} + d _ {i} \epsilon , \quad \epsilon \sim \mathcal {N} (0, I), \tag {14}
+$$
+
+with $d_{i} \neq 0$ when one uses an ancestral sampler. Note that the first right-hand side term in (14) corresponds to the denosing, whereas the rest terms describe the higher-order corrected version of the renoising process. As the goal of CFG++ is to optimize the denoising process under the text-guidance while keeping the renoising components equivalent to unconditional sampling, applying CFG++ to the general iteration in (14) simply leads to
+
+$$
+\begin{array}{l} \boldsymbol {x} _ {i} = \left(\hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {i - 1}) - \lambda \nabla_ {\hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {i - 1})} \ell_ {s d s} \left(\hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {i - 1})\right)\right) + a _ {i} \hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {i - 1}) + b _ {i} \hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {i - 2}) + c _ {i} \boldsymbol {x} _ {i - 1} + d _ {i} \epsilon \\ = \hat {x} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {i - 1}\right) + a _ {i} \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {i - 1}\right) + b _ {i} \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {i - 2}\right) + c _ {i} \boldsymbol {x} _ {i - 1} + d _ {i} \boldsymbol {\epsilon}, \boldsymbol {\epsilon} \sim \mathcal {N} (0, I). \tag {15} \\ \end{array}
+$$
+
+Moreover, CFG++ naturally extends to distilled diffusion models, such as SDXL-turbo (Sauer et al., 2023) and SDXL-lightning (Lin et al., 2024), where akin to (15), we use the conditional denoised estimate, but for the rest of the noise components in the Euler solver, we use the unconditional estimate. For details in how to apply CFG++ to various solvers, see Appendix A.
+
+# 3.2 GEOMETRY OF CFG++
+
+Mitigating off-manifold phenomenon. In Fig. 1 (bottom), we illustrate the evolution of the posterior mean through Tweedie's formula during the reverse diffusion process. Notably, in the early phases of reverse diffusion sampling under CFG, there is a sudden shift in the image and intense color saturation. Conversely, CFG++ is free from the undesirable off-manifold phenomenon. In the following, we investigate why this is the case.
+
+Note that the denoised estimate of CFG and CFG++ at time $t$ can be equivalently represented as
+
+$$
+\hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right) = (1 - \lambda) \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) + \lambda \hat {\boldsymbol {x}} _ {c} \left(\boldsymbol {x} _ {t}\right), \quad \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t}\right) = (1 - \omega) \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) + \omega \hat {\boldsymbol {x}} _ {c} \left(\boldsymbol {x} _ {t}\right). \tag {16}
+$$
+
+
+Figure 4: Text-conditioned score matching loss throughout the reverse diffusion sampling for both CFG and CFG++ in SDXL. Avg. loss computed with 55 prompts from (Chen et al., 2024).
+
+$\lambda, \omega \in [0,1]$ facilitates an interpolation. However, with $\omega > 1.0$ , CFG extrapolates beyond the unconditional and conditional estimates. Consequently, under the assumption that the clean manifold be piecewise linear (Chung et al., 2024), the conditional posterior mean estimates from CFG obtained with a guidance scale outside the range of $[0,1]$ , can easily extend beyond the piecewise linear manifold. This may lead to the estimates potentially "falling off" the data manifold, as depicted by an orange arrow pointing downwards in Fig. 3(a). Thus, we select $\lambda \in [0,1]$ as the guidance scale for CFG++ to ensure it remains an interpolation between the unconditional and conditional estimate, thus preventing it from falling off the clean data manifold. An additional source of the off-manifold phenomenon in CFG occurs during the transition from the clean manifold $\mathcal{M}$ to the subsequent noisy manifold $\mathcal{M}_{t-1}$ , due to a similar off-manifold phenomenon from the large guidance scale (i.e. extrapolation), illustrated in Fig. 3(b).
+
+Text-Image alignment. In Fig. 1 (top), and Fig. 10, we observe enhanced text-to-image alignment achieved with CFG++. This enhanced alignment capability is a natural consequence of CFG++, which directly minimizes the text-conditioned score-matching loss as shown in (9). In contrast, CFG indirectly seeks text alignment through the sharpened posterior distribution $p^{\omega}(\boldsymbol{x}|\boldsymbol{c}) \propto p(\boldsymbol{x})p(\boldsymbol{c}|\boldsymbol{x})^{\omega}$ . Therefore, CFG++ inherently outperforms CFG in terms of text alignment due to its fundamental design principle. For example, Fig. 4 displays the normalized text-conditioned score matching loss, represented as $(1 - \bar{\alpha}_t) \| \epsilon - \epsilon_\theta (\boldsymbol{x}_t, \boldsymbol{c}) \|^2 / \bar{\alpha}_t = \| \boldsymbol{x} - \hat{\boldsymbol{x}}_c \|^2$ , throughout the reverse diffusion sampling process for both CFG and CFG++. The loss plot associated with CFG shows fluctuations and maintains a noticeable gap compared to CFG++. Even after the completion of the reverse diffusion process. In fact, the fluctuation associated with CFG is also related to the off-manifold issue, and from Fig. 4 we can easily see that the off-manifold phenomenon is more dominant at early stage of reverse diffusion sampling. Conversely, the loss trajectory for CFG++ demonstrates a much smoother variation, particularly during the early stages of reverse diffusion.
+
+DDIM inversion. As discussed in (Song et al., 2021a), the denoising process for unconditional DDIM is approximately invertible, meaning that $\boldsymbol{x}_t$ can generally be recovered from $\boldsymbol{x}_{t-1}$ . Specifically, from (3) and (4), we have the following approximate inversion formula for unconditional DDIM:
+
+$$
+\hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) = \left(\boldsymbol {x} _ {t - 1} - \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right)\right) / \sqrt {\bar {\alpha} _ {t - 1}} \simeq \left(\boldsymbol {x} _ {t - 1} - \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t - 1}\right)\right) / \sqrt {\bar {\alpha} _ {t - 1}} \tag {17}
+$$
+
+$$
+\boldsymbol {x} _ {t} = \sqrt {\bar {\alpha} _ {t}} \hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {t}) + \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t}) \simeq \sqrt {\bar {\alpha} _ {t}} \hat {\boldsymbol {x}} _ {\emptyset} (\boldsymbol {x} _ {t}) + \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t - 1}) \tag {18}
+$$
+
+where the approximation arises from $\hat{\epsilon}_{\emptyset}(\pmb{x}_t) \simeq \hat{\epsilon}_{\emptyset}(\pmb{x}_{t-1})$ . A similar inversion procedure has been employed for conditional DDIM inversion under CFG by assuming $\hat{\epsilon}_c^{\omega}(\pmb{x}_t) \simeq \hat{\epsilon}_c^{\omega}(\pmb{x}_{t-1})$ , and replacing $\hat{\epsilon}_{\emptyset}$ by $\hat{\epsilon}_c^\omega$ as detailed in Algorithm 3.
+
+On the other hand, by examining (12) and (13), we can obtain the following approximate DDIM inversion formula under CFG++:
+
+$$
+\hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right) \simeq \left(\boldsymbol {x} _ {t - 1} - \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\epsilon} _ {\emptyset} \left(\boldsymbol {x} _ {t - 1}\right)\right) / \sqrt {\bar {\alpha} _ {t - 1}} \tag {19}
+$$
+
+$$
+\boldsymbol {x} _ {t} \simeq \sqrt {\bar {\alpha} _ {t}} \hat {\boldsymbol {x}} _ {c} ^ {\lambda} (\boldsymbol {x} _ {t}) + \sqrt {1 - \bar {\alpha} _ {t}} \hat {\boldsymbol {\epsilon}} _ {c} ^ {\lambda} (\boldsymbol {x} _ {t - 1}) \tag {20}
+$$
+
+
Method
ω = 2.0, λ = 0.2
ω = 5.0, λ = 0.4
ω = 7.5, λ = 0.6
ω = 9.0, λ = 0.8
ω = 12.5, λ = 1.0
FID ↓
CLIP ↑
IR ↑
FID ↓
CLIP ↑
IR ↑
FID ↓
CLIP ↑
IR ↑
FID ↓
CLIP ↑
IR ↑
FID ↓
CLIP ↑
IR ↑
CFG (Ho & Salimans, 2021)
13.84
0.298
-0.235
15.08
0.310
0.068
17.71
0.312
0.152
20.01
0.312
0.170
21.23
0.313
0.192
CFG++ (ours)
12.75
0.303
-0.218
14.95
0.310
0.071
17.47
0.312
0.156
19.34
0.313
0.208
20.88
0.313
0.194
+
+where we apply the approximation $\hat{\epsilon}_{\mathbf{c}}^{\lambda}(\boldsymbol{x}_t) \simeq \hat{\epsilon}_{\mathbf{c}}^{\lambda}(\boldsymbol{x}_{t-1})$ alongside the usual assumption $\hat{\epsilon}_{\emptyset}(\boldsymbol{x}_t) \simeq \hat{\epsilon}_{\emptyset}(\boldsymbol{x}_{t-1})$ . This formulation underpins the CFG++ guided DDIM inversion algorithm, presented in Algorithm 4.
+
+In practice, for small time step size the error $\hat{\epsilon}_{\emptyset}(\pmb{x}_t) \simeq \hat{\epsilon}_{\emptyset}(\pmb{x}_{t-1})$ is relatively small, so the unconditional DDIM inversion by (17) and (18) lead to relatively insignificant errors. Unfortunately, the corresponding inversion from conditional diffusion under CFG is quite distorted as noted in (Mokady et al., 2023; Wallace et al., 2023). In fact, this distortion is originated from the inaccuracy of the approximation $\hat{\epsilon}_{c}^{\omega}(\pmb{x}_{t}) \simeq \hat{\epsilon}_{c}^{\omega}(\pmb{x}_{t-1})$ . More specifically, even when $\hat{\epsilon}_{\emptyset}(\pmb{x}_t) \simeq \hat{\epsilon}_{\emptyset}(\pmb{x}_{t-1})$ , the approximation error from the CFG is given by
+
+$$
+\begin{array}{l} \varepsilon_ {c f g} := \hat {\epsilon} _ {c} ^ {\omega} (\boldsymbol {x} _ {t}) - \hat {\epsilon} _ {c} ^ {\omega} (\boldsymbol {x} _ {t - 1}) = \left(\hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t}) - \hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t - 1})\right) + \omega \left(\delta \hat {\epsilon} _ {c} (\boldsymbol {x} _ {t}) - \delta \hat {\epsilon} _ {c} (\boldsymbol {x} _ {t - 1})\right) \\ \simeq \omega \left(\delta \hat {\epsilon} _ {c} \left(\boldsymbol {x} _ {t}\right) - \delta \hat {\epsilon} _ {c} \left(\boldsymbol {x} _ {t - 1}\right)\right), \tag {21} \\ \end{array}
+$$
+
+where $\delta \hat{\epsilon}_c(\pmb{x}_t) \coloneqq \hat{\epsilon}_c(\pmb{x}_t) - \hat{\epsilon}_{\emptyset}(\pmb{x}_t)$ denotes the directional component from unconditional to the conditional diffusion. Since the directional component by the text guidance scale is not negligible, this error becomes significant for high guidance scale $\omega$ . Accordingly, the guidance scale must be heavily downweighted in order for inversions on real world images to be stable, thus limiting the strength of edits. To mitigate this issue, the authors in (Mokady et al., 2023; Wallace et al., 2023) developed null text optimization and coupled transform techniques, respectively.
+
+On the other hand, under the usual DDIM assumption $\hat{\epsilon}_{\emptyset}(\pmb{x}_t) \simeq \hat{\epsilon}_{\emptyset}(\pmb{x}_{t-1})$ , the approximation error of CFG++ mainly arises from (20), which is smaller than that of CFG since we have
+
+$$
+\left\| \boldsymbol {\varepsilon} _ {c f g + +} \right\| = \lambda \| \delta \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} (\boldsymbol {x} _ {t}) - \delta \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} (\boldsymbol {x} _ {t - 1}) \| < \| \boldsymbol {\varepsilon} _ {c f g} \| \tag {22}
+$$
+
+thanks to $\lambda < \omega$ . Therefore, CFG++ significantly improves the DDIM inversion as shown Fig. 1 (middle) for representative results and Sec. 4.2 for further discussions.
+
+# 4 EXPERIMENTAL RESULTS
+
+In this section, we design experiments to show the limitations of CFG and how CFG++ can effectively mitigate these downsides. The main experiments were conducted with SD v1.5 or SDXL with 50 NFE DDIM sampling. In this regime, we searched for the matching guidance values of $\omega$ and $\lambda$ for a fair comparison. We fix $\lambda = 0.2, 0.4, 0.6, 0.8, 1.0$ and find the $\omega$ values that produce the images that are of closest proximity in terms of LPIPS distance given the same seed. We found that the corresponding values were $\omega = 2.0, 5.0, 7.5, 9.0, 12.5$ , respectively. Some of the experiments were also conducted with distilled model such as SDXL-turbo, lightning.
+
+# 4.1 TEXT-TO-IMAGE GENERATION
+
+Using the corresponding scales for $\omega$ and $\lambda$ , we directly compare the performance of the T2I task using SD v1.5 and SDXL. In Tab. 1, we report quantitative metrics using 10k images generated from COCO captions (Lin et al., 2014). Here, we observe a constant improvement of the FID metric across all guidance scales (also see Fig. 15 for an apples-to-apples comparison), with approximately the same level of CLIP similarity or better. Additionally, we evaluate Im
+
+Table 1: Quantitative evaluation of 50 NFE DDIM T2I with SD v1.5 on COCO 10k
+
+
Model
Metric
CFG
CFG++ (ours)
SDXL-Turbo
FID↓
59.67
59.21
CLIP↑
0.320
0.325
ImageReward↑
0.777
0.968
SDXL-Lightning
FID↓
56.11
55.19
CLIP↑
0.322
0.324
ImageReward↑
0.691
0.829
SD v1.5 (DPM++ 2M)
FID↓
32.72
32.58
CLIP↑
0.313
0.312
ImageReward↑
0.086
0.023
+
+Table 2: Quant. eval. on accelerated T2I sampling
+
+ageReward (IR) (Xu et al., 2024), trained on human judgment data for better correlation, and observe improvements in this metric as well. The improvements can also be clearly seen in Fig. 11 (SD v1.5), where the unnatural components of the generated images are corrected. Specifically, we see that unnatural depictions of human hands, and incorrect renderings of the text are corrected in CFG++, a
+
+
+Figure 5: T2I using SDXL- $\{$ turbo, lightning\}, 6 NFE, CFG vs CFG++.
+
+
+
+long-standing research question in and of its own (Podell et al., 2023; Pelykh et al., 2024; Chen et al., 2023). We find that the improvement gain from CFG++ is even more dramatic for distilled diffusion models such as SDXL-{turbo, lightning}. We quantify the results on the same 5k prompts with 6 NFE sampling. In Fig. 5, Fig. 12 and Fig. 13 we see significant boosts in the quality of the generated images, which is also depicted in the improvements seen in Tab. 2.
+
+To show the compatibility of CFG++ with higher-order solvers, we experiment with the DPM++ 2M (Lu et al., 2022b) solver using 20 NFE. We note that in such a low NFE regime, a CFG scale of 5.0 corresponds to a CFG++ scale of 1.0, and we have to slightly extrapolate the value of $\lambda \geq 1.0$ to achieve stronger guidance results. In Tab. 2, we observe that CFG++ is broadly comparable to CFG. This outcome differs from the consistent improvement of CFG++ over CFG observed with 50 NFE DDIM sampling. We attribute this to two factors: (1) the overall image quality for 20 NFE DPM++ 2M is generally lower compared to 50 NFE DDIM, leading to noisier quantitative metrics, particularly for metrics like ImageReward that are sensitive to subtle quality changes; and (2) the difference between CFG and CFG++ tends to be less pronounced in low NFE regimes without distillation, as stronger guidance effects emerge with higher NFEs.
+
+# 4.2 DIFFUSION IMAGE INVERSION AND EDITING
+
+We further explore the effect of CFG++ on DDIM inversion (Dhariwal & Nichol, 2021), where the source image is reverted to a latent vector that can reproduce the original image through generative process. DDIM inversion is well-known to break down in the usual CFG setting as CFG magnifies the accumulated error of each inversion step (Mokady et al., 2023), violating local linearization assumptions (Wallace et al., 2023). We show that CFG++ mitigates this issue by improving the inversion and image editing capabilities. We evaluate our method following the experimental setups in Park et al. (2024) and Kim et al. (2024b).
+
+Diffusion Image Inversion. Using the matched set of scales for $\omega$ and $\lambda$ , we demonstrate the effect of CFG++ on the diffusion image inversion task. Specifically, we reconstruct the images after inversion and evaluate it through PSNR and RMSE, following the methodology of Wallace et al. (2023). In Fig. 6, we illustrate the reconstructed examples (6a) from a real image from COCO data set and computed metrics (6b) for 5k COCO-2014 (Lin et al., 2014) validation set. Both qualitative and quantitative evaluations demonstrate a consistent improvement on reconstruction performance induced by CFG++. Notably, DDIM inversion with CFG++ leads to a consistent reconstruction of the source image across all guidance scales, while DDIM inversion with CFG fails to reconstruct it, as shown in Fig. 16 for another real image.
+
+Image Editing. Fig. 6c compares the image editing result using CFG and CFG++ followed by image inversion with 5 NFEs. In the image editing stage, a word in the source text highlighted by green
+
+
+Figure 6: Inversion and editing results. (a) Reconstructed samples after inversion by CFG and CFG++. (b) Quantitative comparison between CFG and CFG++. for reconstruction. (c) Image editing comparison via SDXL.
+
+color is swapped with the target concept, and this modified text is used as the condition for sampling. CFG++ successfully edits the target concept while preserving other concepts, such as background. In particular, the water splashing in the background, which tends to disappear in the conventional CFG, is maintained through the inversion process by CFG++. This emphasizes CFG++.s superior ability to retain specific scene elements that are frequently lost in the standard CFG approach. Moreover, standard CFG's disrupted DDIM inversion leads to saturated and less faithful editing results, whereas CFG++. delivers precise and high-fidelity edits.
+
+# 4.3 TEXT-CONDITIONED INVERSE PROBLEMS
+
+Inverse problem involves restoring the original data $\pmb{x}$ from a noisy measurement $\pmb{y} = \mathcal{A}(\pmb{x}) + \pmb{n}$ , where $\mathcal{A}$ represents an imaging operator introduces distortions (e.g., Gaussian blur) and $\pmb{n}$ denotes the measurement noise. Diffusion inverse solvers (DIS) address this challenge by leveraging pretrained diffusion models as implicit priors and performing posterior sampling $\pmb{x} \sim p(\pmb{x}|\pmb{y})$ . Methods that leverage latent diffusion have gained recent interest (Rout et al., 2024; Song et al., 2024), but leveraging texts for solving these problems remains relatively underexplored (Chung et al., 2023b; Kim et al., 2023). One of the main reasons for this is that naively using CFG on top of latent DIS leads to diverging samples (Chung et al., 2023b). Several heuristic modifications such as null prompt optimization (Kim et al., 2023) with modified sampling schemes were needed to mitigate this drawback. This naturally leads to the question: Is it possible to leverage CFG guidance as a plug-and-play component of existing solvers? Here, we answer this question with a positive by showing that CFG++ enables the incorporation of text prompts into a standard solver. Specifically, we focus on comparing the performance of PSLD (Rout et al., 2024) combined with CFG and CFG++ in solving linear inverse problems. This evaluation utilizes the FFHQ (Karras et al., 2019) 512x512 dataset and the text prompt "a high-quality photo of a face". Further details about the experimental settings can be found in the Appendix E.
+
+As shown in Tab. 3, our method mostly outperforms both the vanilla PSLD and PSLD with CFG. The superiority is also evident from the Fig. 7, where CFG++ consistently delivers high-quality reconstructions across all tasks. PSLD with CFG often suffers from artifacts and blurriness. Conversely, CFG++ achieves better fidelity, clearly distinguishing between faces and faithfully reproducing fine details like eyelids and hair texture. For more results, please refer to the Appendix F.
+
+
+Figure 7: Qualitative comparison on various inverse problems using PSLD (Rout et al., 2024) under CFG and CFG++. For more results, please refer to the Appendix F.
+
+
Method
SR (x8)
Deblur (motion)
Deblur (gauss)
Inpaint
FID ↓
LPIPS ↓
PSNR ↑
FID ↓
LPIPS ↓
PSNR ↑
FID ↓
LPIPS ↓
PSNR ↑
FID ↓
LPIPS ↓
PSNR ↑
PSLD
46.24
0.413
24.41
97.51
0.500
21.83
41.65
0.388
26.88
10.27
0.053
30.15
PSLD + CFG
41.24
0.394
24.91
91.90
0.493
22.29
41.52
0.390
26.94
9.36
0.055
30.27
PSLD + CFG++ (ours)
36.58
0.385
24.87
65.67
0.482
21.93
39.85
0.400
26.90
9.78
0.052
30.31
+
+Table 3: Quantitative comparison (FID, LPIPS, PSNR) of PSLD, PSLD with CFG, and PSLD with CFG++ on Latent Diffusion Inverse Solver.
+
+# 5 RELATED WORKS AND DISCUSSIONS
+
+Kynkänniemi et al. (2024) observed that applying CFG guidance at the earlier stages of sampling always led to detrimental effects and drastically reduced the diversity of the samples. The guidance at the later stages of sampling had minimal effects. Drawing upon these observations, it was empirically shown that applying CFG only in the limited time interval near the middle led to the best performance. Similar observations were made in the SD community (Howard & Prashanth, 2022; Birch, 2023) in adjusting the guidance scale across $t$ . These works try to empirically adjust the strength of the guidance, while we derive our trajectory in a principled manner. More recently, Bradley & Nakkiran (2024) observed that the CFG score is not a valid denoising direction, showing that in the asymptotic limit, CFG sampling can be considered as a specific type of predictor-corrector (PC) sampling, dubbed PCG. PCG shares a similar spirit with CFG++ in that for the mainstream of sampling, one defers from the use of mixed CFG score (we use unconditional score, PCG uses conditional score) to avoid invalid directions. While PCG derives an interesting connection of PC sampling with CFG, the proposed algorithm does not improve the sampling performance. In contrast, CFG++ improves the sample quality without additional computation overhead. Since CFG++ attempts to make adjustments of CFG using a linear combination of score functions, it is not surprising to see that CFG++ sampling can be achieved by setting a time-varying schedule. Specifically, by setting a time-varying schedule $\omega_{t}$ as $\omega_{t} = -\omega \left( \sqrt{1 - \bar{\alpha}_{t-1}} - \sqrt{\frac{1 - \bar{\alpha}_{t-1}}{\alpha_{t}}} \right)$ , one can achieve the same effect with CFG as CFG++. Details are shown in App. D. However, this specific choice of time-varying guidance scale has not been reported in the literature, as it is a schedule that is relatively complex to be drawn heuristically. We further show in Appendix C that such choice removes undesirable oscillatory behavior in the evolution of the posterior mean.
+
+# 6 CONCLUSION
+
+This paper revises the most widespread guidance method, classifier-free guidance (CFG), highlighting that a small and reasonable guidance scale, e.g. $\lambda \in [0.0, 1.0]$ , might suffice successful guidance with a proper geometric correction. Observing that the original CFG suffers from off-manifold issues during sampling, we propose a simple but surprisingly effective fix. This change translates the conditional guidance from extrapolating to interpolating between unconditional and conditional sampling trajectories, leading to more interpretable guidance in contrast to the conventional CFG which relies on heuristic $\omega$ scaling. Given that CFG++ mitigates off-manifold issues, it may be beneficial for other downstream applications requiring accurate latent denoised estimate representations, e.g. DIS, as demonstrated in our experiments.
+
+# ACKNOWLEDGMENTS
+
+This work was supported by the National Research Foundation of Korea under Grant RS-2024-00336454 and by the Institute for Information & Communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (RS-2019-II190075, Artificial Intelligence Graduate School Program, KAIST).
+
+# REFERENCES
+
+Alex Birch. Turning off classifier-free guidance at low noise levels. https://twitter.com/Birchlabs/status/1640033271512702977, 2023. Idea mentioned on Twitter.
+Arwen Bradley and Preetum Nakkiran. Classifier-free guidance is a predictor-corrector. arXiv preprint arXiv:2408.09000, 2024.
+Jingye Chen, Yupan Huang, Tengchao Lv, Lei Cui, Qifeng Chen, and Furu Wei. Textdiffuser: Diffusion models as text painters. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=ke3RgcDmfO.
+Junsong Chen, Jincheng YU, Chongjian GE, Lewei Yao, Enze Xie, Zhongdao Wang, James Kwok, Ping Luo, Huchuan Lu, and Zhenguo Li. PixArt-a: Fast training of diffusion transformer for photorealistic text-to-image synthesis. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=eAKmQPe3m1.
+Hyungjin Chung, Byeongsu Sim, Dohoon Ryu, and Jong Chul Ye. Improving diffusion models for inverse problems using manifold constraints. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL: https://openreview.net/forum?id=nJJjv0JDJju.
+Hyungjin Chung, Jeongsol Kim, Michael Thompson McCann, Marc Louis Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In International Conference on Learning Representations, 2023a. URL https://openreview.net/forum?id=OnD9zGAGT0k.
+Hyungjin Chung, Jong Chul Ye, Peyman Milanfar, and Mauricio Delbracio. Prompt-tuning latent diffusion models for inverse problems. arXiv preprint arXiv:2310.01110, 2023b.
+Hyungjin Chung, Suhyeon Lee, and Jong Chul Ye. Decomposed diffusion sampler for accelerating large-scale inverse problems. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=DsEhqQtfAG.
+Prafulla Dhariwal and Alexander Quinn Nichol. Diffusion models beat GANs on image synthesis. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, 2021.
+Bradley Efron. Tweedie's formula and selection bias. Journal of the American Statistical Association, 106(496):1602-1614, 2011.
+Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. In NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications, 2021. URL https://openreview.net/forum?id=qw8AKxfYbI.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in Neural Information Processing Systems, 33:6840-6851, 2020.
+Jeremy Howard and Rekil Prashanth. Adjusting guidance weight as a function of time. https://twitter.com/jeremyphoward/status/1584771100378288129, 2022. Idea mentioned on Twitter.
+Zahra Kadkhodaie and Eero P Simoncelli. Stochastic solutions for linear inverse problems using the prior implicit in a denoiser. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=x5hh6N9bUUb.
+
+Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4401-4410, 2019.
+Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models. In Proc. NeurIPS, 2022.
+Beomsu Kim, Yu-Guan Hsieh, Michal Klein, Marco Cuturi, Jong Chul Ye, Bahjat Kawar, and James Thornton. Simple reflow: Improved techniques for fast flow models. arXiv preprint arXiv:2410.07815, 2024a.
+Jeongsol Kim, Geon Yeong Park, Hyungjin Chung, and Jong Chul Ye. Regularization by texts for latent diffusion inverse solvers. arXiv preprint arXiv:2311.15658, 2023.
+Jeongsol Kim, Geon Yeong Park, and Jong Chul Ye. Dreamsampler: Unifying diffusion sampling and score distillation for image manipulation. arXiv preprint arXiv:2403.11415, 2024b.
+Tuomas Kynkänniemi, Miika Aittala, Tero Karras, Samuli Laine, Timo Aila, and Jaakko Lehtinen. Applying guidance in a limited interval improves sample and distribution quality in diffusion models. arXiv preprint arXiv:2404.07724, 2024.
+Yixun Liang, Xin Yang, Jiantao Lin, Haodong Li, Xiaogang Xu, and Yingcong Chen. Luciddreamer: Towards high-fidelity text-to-3d generation via interval score matching. arXiv preprint arXiv:2311.11284, 2023.
+Shanchuan Lin, Anran Wang, and Xiao Yang. Sdxl-lightning: Progressive adversarial diffusion distillation. arXiv preprint arXiv:2402.13929, 2024.
+Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dóllár, and C Lawrence Zitnick. 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.
+Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. DPM-solver: A fast ODE solver for diffusion probabilistic model sampling in around 10 steps. In Advances in Neural Information Processing Systems, 2022a. URL https://openreview.net/forum?id=2uAaGwlP_V.
+Cheng Lu, Yuhao Zhou, Fan Bao, Jianfei Chen, Chongxuan Li, and Jun Zhu. Dpm-solver++: Fast solver for guided sampling of diffusion probabilistic models. arXiv preprint arXiv:2211.01095, 2022b.
+Ron Mokady, Amir Hertz, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Null-text inversion for editing real images using guided diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6038-6047, 2023.
+Geon Yeong Park, Jeongsol Kim, Beomsu Kim, Sang Wan Lee, and Jong Chul Ye. Energy-based cross attention for bayesian context update in text-to-image diffusion models. Advances in Neural Information Processing Systems, 36, 2024.
+Anton Pelykh, Ozge Mercanoglu Sincan, and Richard Bowden. Giving a hand to diffusion models: a two-stage approach to improving conditional human image generation. arXiv preprint arXiv:2403.10731, 2024.
+Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. Sdxl: Improving latent diffusion models for high-resolution image synthesis. arXiv preprint arXiv:2307.01952, 2023.
+Ben Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. Dreamfusion: Text-to-3d using 2d diffusion. arXiv, 2022.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10684-10695, 2022.
+
+Litu Rout, Negin Raoof, Giannis Daras, Constantine Caramenis, Alex Dimakis, and Sanjay Shakkottai. Solving linear inverse problems provably via posterior sampling with latent diffusion models. Advances in Neural Information Processing Systems, 36, 2024.
+Chitwan Sahara, William Chan, Huiwen Chang, Chris Lee, Jonathan Ho, Tim Salimans, David Fleet, and Mohammad Norouzi. Palette: Image-to-image diffusion models. In ACM SIGGRAPH 2022 conference proceedings, pp. 1-10, 2022.
+Axel Sauer, Dominik Lorenz, Andreas Blattmann, and Robin Rombach. Adversarial diffusion distillation. arXiv preprint arXiv:2311.17042, 2023.
+Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, 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.
+Bowen Song, Soo Min Kwon, Zecheng Zhang, Xinyu Hu, Qing Qu, and Liyue Shen. Solving inverse problems with latent diffusion models via hard data consistency. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id= j8hdRqOUhN.
+Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In 9th International Conference on Learning Representations, ICLR, 2021a.
+Jiaming Song, Arash Vahdat, Morteza Mardani, and Jan Kautz. Pseudoinverse-guided diffusion models for inverse problems. In International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=9_gsMA8MRKQ.
+Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In 9th International Conference on Learning Representations, ICLR, 2021b.
+Bram Wallace, Akash Gokul, and Nikhil Naik. EDICT: Exact diffusion inversion via coupled transformations. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22532-22541, 2023.
+Zhengyi Wang, Cheng Lu, Yikai Wang, Fan Bao, Chongxuan Li, Hang Su, and Jun Zhu. Prolificdreamer: High-fidelity and diverse text-to-3d generation with variational score distillation. Advances in Neural Information Processing Systems, 36, 2024.
+Jiazheng Xu, Xiao Liu, Yuchen Wu, Yuxuan Tong, Qinkai Li, Ming Ding, Jie Tang, and Yuxiao Dong. Imagereward: Learning and evaluating human preferences for text-to-image generation. Advances in Neural Information Processing Systems, 36, 2024.
+
+
Algorithm 3 DDIM Inversion with CFG
Algorithm 4 DDIM Inversion with CFG++
Require: x0, 0 ≤ ω ∈ R1: for i = 0 to T - 1 do2: \(\hat{\epsilon}_{c}^{\omega}\left(\boldsymbol{x}_{t}\right)=\hat{\epsilon}_{\varnothing}\left(\boldsymbol{x}_{t}\right)+\omega\left[\hat{\epsilon}_{c}\left(\boldsymbol{x}_{t}\right)-\hat{\epsilon}_{\varnothing}\left(\boldsymbol{x}_{t}\right)\right]\)3: \(\hat{\boldsymbol{x}}_{c}^{\omega}\left(\boldsymbol{x}_{t}\right)\gets\left(\boldsymbol{x}_{t}-\sqrt{1-\bar{\alpha}_{t}}\hat{\epsilon}_{c}^{\omega}\left(\boldsymbol{x}_{t}\right)\right)/\sqrt{\bar{\alpha}_{t}}\)4: \(\boldsymbol{x}_{t+1}=\sqrt{\bar{\alpha}_{t+1}}\hat{\boldsymbol{x}}_{c}^{\omega}\left(\boldsymbol{x}_{t}\right)+\sqrt{1-\bar{\alpha}_{t+1}}\hat{\epsilon}_{c}^{\omega}\left(\boldsymbol{x}_{t}\right)\)5: end for6: return xT
Require: x0, λ ∈ [0,1]1: for i = 0 to T - 1 do2: \(\hat{\epsilon}_{c}^{\lambda}\left(\boldsymbol{x}_{t}\right)=\hat{\epsilon}_{\varnothing}\left(\boldsymbol{x}_{t}\right)+\lambda\left[\hat{\epsilon}_{c}\left(\boldsymbol{x}_{t}\right)-\hat{\epsilon}_{\varnothing}\left(\boldsymbol{x}_{t}\right)\right]\)3: \(\hat{\boldsymbol{x}}_{c}^{\lambda}\left(\boldsymbol{x}_{t}\right)\gets\left(\boldsymbol{x}_{t}-\sqrt{1-\bar{\alpha}_{t}}\hat{\epsilon}_{\varnothing}\left(\boldsymbol{x}_{t}\right)\right)/\sqrt{\bar{\alpha}_{t}}\)4: \(\boldsymbol{x}_{t+1}=\sqrt{\bar{\alpha}_{t+1}}\hat{\boldsymbol{x}}_{c}^{\lambda}\left(\boldsymbol{x}_{t}\right)+\sqrt{1-\bar{\alpha}_{t+1}}\hat{\epsilon}_{c}^{\lambda}\left(\boldsymbol{x}_{t}\right)\)5: end for6: return xT
+
+Figure 8: Comparison between DDIM inversion. CFG++ proposes a simple yet effective fix: using $\hat{\epsilon}_{\varnothing}(\boldsymbol{x}_t)$ instead of $\hat{\epsilon}_c^{\omega}(\boldsymbol{x}_t)$ in Tweedie's denoising step.
+
+# A EXTENSION OF CFG++ TO OTHER SOLVERS
+
+In this section, we discuss ways in which we can apply CFG++ to a more diverse set of ODE/SDE solvers. We consider solving the variance exploding (VE) PF-ODE as presented in (1), as reparametrization VP diffusion models can easily recover the VE formulation, as often implemented in widely used frameworks such as https://github.com/crowsonkb/k-diffusion. Following the notation in Lu et al. (2022b), we consider a sequence of timesteps $\{t_i\}_{i=0}^M$ , where $t_0 = T$ denotes the initial starting point of the reverse sampling (i.e. Gaussian noise).
+
+Euler (Karras et al., 2022) The construction is the same as in DDIM. We include it here for completeness. The update step reads
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right)}{\sigma_ {t _ {i}}} \cdot \sigma_ {t _ {i + 1}}, \tag {CFG}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i}}\right)}{\sigma_ {t _ {i}}} \cdot \sigma_ {t _ {i + 1}}, \quad (\mathrm {C F G} + +)
+$$
+
+Euler Ancestral Euler Ancestral sampler follows Euler sampler, but introduces stochasticity by taking larger steps and then adding a slight amount of noise. Adjusting with CFG++ is straightforward.
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right)}{\sigma_ {t _ {i}}} \cdot \left(\sigma_ {t _ {d _ {i}}} - \sigma_ {t _ {i}}\right) + \sigma_ {t _ {i}} \boldsymbol {\epsilon}, \tag {CFG}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i}}\right)}{\sigma_ {t _ {i}}} \cdot \left(\sigma_ {t _ {d _ {i}}} - \sigma_ {t _ {i}}\right) + \sigma_ {t _ {i}} \boldsymbol {\epsilon}, \quad (\text {C F G} + +)
+$$
+
+where $t_i > t_{d_i} > t_{i + 1}$ and $\epsilon \sim \mathcal{N}(0,\pmb {I})$
+
+DPM-solver++ 2M (Lu et al., 2022b) Define $\sigma_t \coloneqq e^{-t}$ , $h_i \coloneqq t_i - t_{i-1}$ , and $r_i \coloneqq h_{i-1} / h_i$ . After initializing $\boldsymbol{x}_{t_0}$ with Gaussian noise, the first iteration is given by
+
+$$
+\boldsymbol {x} _ {t _ {1}} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {0}}\right) + e ^ {- h _ {1}} \left(\boldsymbol {x} _ {t _ {0}} - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {0}}\right)\right) \tag {CFG}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {1}} = \hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t _ {0}}\right) + e ^ {- h _ {1}} \left(\boldsymbol {x} _ {t _ {0}} - \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {0}}\right)\right) \quad (\text {C F G} + +)
+$$
+
+The following iterations by using the standard CFG reads
+
+$$
+\boldsymbol {D} _ {i} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) + \frac {1}{2 r _ {i}} \left(\hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 2}}\right)\right), \tag {23}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i}} = e ^ {- h _ {i}} \boldsymbol {x} _ {t _ {i - 1}} - \left(e ^ {- h _ {i}} - 1\right) \boldsymbol {D} _ {i}. \tag {24}
+$$
+
+Rearranging (23), (24), we can rewrite the update steps as
+
+$$
+\boldsymbol {x} _ {t _ {i}} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - e ^ {- h _ {i}} \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) + \frac {1 - e ^ {- h _ {i}}}{2 r _ {i}} \left(\hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 2}}\right)\right) + e ^ {- h _ {i}} \boldsymbol {x} _ {t _ {i - 1}}. \tag {25}
+$$
+
+Notice that in order to apply CFG++ to (25), we should only keep the first term as the conditional Tweedie, and use the unconditional estimates for the rest of the components. i.e.
+
+$$
+\boldsymbol {x} _ {t _ {i}} = \hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - e ^ {- h _ {i}} \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) + \frac {1 - e ^ {- h _ {i}}}{2 r _ {i}} \left(\hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t _ {i - 2}}\right)\right) + e ^ {- h _ {i}} \boldsymbol {x} _ {t _ {i - 1}} \tag {26}
+$$
+
+DPM-solver++ 2S (Lu et al., 2022b) With the same choices of $\sigma_t, h_i$ , we additionally define the timesteps $\{s_i\}_{i=1}^M$ with $t_i > s_{i+1} > t_{i+1}$ . Further, let $r_i = \frac{s_i - t_{i-1}}{t_i - t_{i-1}}$ . Using standard CFG, the iteration reads
+
+$$
+\boldsymbol {u} _ {i} = e ^ {- r _ {i} h _ {i}} \boldsymbol {x} _ {t _ {i - 1}} + \left(1 - e ^ {- r _ {i} h _ {i}}\right) \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) \tag {27}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i}} = \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - e ^ {- h _ {i}} \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) + \frac {1 - e ^ {- h _ {i}}}{2 r _ {i}} \left(\hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {u} _ {i}\right) - \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i - 1}}\right)\right) + e ^ {- h _ {i}} \boldsymbol {x} _ {t _ {i - 1}} \tag {28}
+$$
+
+Applying the general transition rule from CFG to $\mathrm{CFG + + }$ as introduced in (15), we can keep all of the Tweedie estimates to be unconditional, and only change the first term of (28), i.e.
+
+$$
+\boldsymbol {u} _ {i} = e ^ {- r _ {i} h _ {i}} \boldsymbol {x} _ {t _ {i - 1}} + \left(1 - e ^ {- r _ {i} h _ {i}}\right) \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) \tag {29}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i}} = \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) - e ^ {- h _ {i}} \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i - 1}}\right) + \frac {1 - e ^ {- h _ {i}}}{2 r _ {i}} \left(\hat {\boldsymbol {x}} _ {c} ^ {\lambda} (\boldsymbol {u} _ {i}) - \hat {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i - 1}}\right)\right) + e ^ {- h _ {i}} \boldsymbol {x} _ {t _ {i - 1}}. \tag {30}
+$$
+
+For the ancestral version of DPM-solver++ 2S, we can follow the general transition rule, as was shown for Euler $\rightarrow$ Euler Ancestral.
+
+# B EXTENSION OF CFG++ TO FLOW MATCHING
+
+Here, we generalize CFG++ with flow matching which subsumes diffusion models as specific instantiations. Let $p_0$ and $p_1$ be two data distributions on $\mathbb{R}^n$ , and $Q_{01}$ denotes a coupling of $p_0$ and $p_1$ . Then, the flow matching loss is defined as follows:
+
+$$
+\ell_ {\mathrm {F M}} (\theta ; Q _ {0 1}) = \mathbb {E} _ {(\boldsymbol {x} _ {0}, \boldsymbol {x} _ {1}) \sim Q _ {0 1}, t \sim \operatorname {u n i f} (0, 1)} \left[ \ell_ {\mathrm {M S E}} (\boldsymbol {x} _ {1} - \boldsymbol {x} _ {0}, \boldsymbol {v} _ {\theta} (\boldsymbol {x} _ {t}, t)) \right], \tag {31}
+$$
+
+where $\pmb{v}_{\theta}:\mathbb{R}^n\times (0,1)\to \mathbb{R}^n$ refers to a velocity parameterized by $\theta$ , $\ell_{\mathrm{MSE}}(\pmb {x},\pmb {y}) = \| \pmb {x} - \pmb {y}\| _2^2$ , and $\pmb{x}_t = (1 - t)\pmb {x}_0 + t\pmb{x}_1$ . This objective can be reformulated in the form of denoising as follows:
+
+$$
+\ell_ {\mathrm {F M}} (\theta ; Q _ {0 1}) = \mathbb {E} _ {\left(\boldsymbol {x} _ {0}, \boldsymbol {x} _ {1}\right) \sim Q _ {0 1}, t \sim \operatorname {u n i f} (0, 1)} \left[ \frac {1}{t ^ {2}} \ell_ {\mathrm {M S E}} \left(\boldsymbol {x} _ {0}, \boldsymbol {D} _ {\theta} \left(\boldsymbol {x} _ {t}, t\right)\right) \right], \tag {32}
+$$
+
+where $D_{\theta}(\pmb{x}_t,t) = \pmb{x}_t - t\pmb{v}_{\theta}(\pmb{x}_t,t)$ serves as a denoiser function. Then, one can derive an ODE which translates samples from $p_0$ and $p_1$ given a vector field $\pmb{v}_{\theta}$ :
+
+$$
+d \boldsymbol {x} _ {t} = \boldsymbol {v} _ {\theta} (\boldsymbol {x} _ {t}, t) d t = \frac {\boldsymbol {x} _ {t} - \boldsymbol {D} _ {\theta} (\boldsymbol {x} _ {t} , t)}{t} d t, \quad t \in (0, 1), \tag {33}
+$$
+
+which resembles (1) with a choice of $\sigma_t = t$ . For text-conditional flow, CFG can be applied to (33) by solving the following ODE (Kim et al., 2024a):
+
+$$
+d \boldsymbol {x} _ {t} = \left[ \boldsymbol {v} _ {\theta} (\boldsymbol {x} _ {t}, t, \varnothing) + \omega \left(\boldsymbol {v} _ {\theta} (\boldsymbol {x} _ {t}, t, \boldsymbol {c}) - \boldsymbol {v} _ {\theta} (\boldsymbol {x} _ {t}, t, \varnothing)\right) \right] d t = \tilde {\boldsymbol {v}} _ {c} ^ {\omega} (\boldsymbol {x} _ {t}) d t, \quad t \in (0, 1). \tag {34}
+$$
+
+We similarly define $\tilde{\pmb{x}}_c^\omega (\pmb {x}_t) = \pmb {x}_t - t\tilde{v}_c^\omega (\pmb {x}_t)$ , $\tilde{\pmb{x}}_{\emptyset}(\pmb {x}_t) = \pmb {x}_t - t\pmb {v}_{\theta}(\pmb {x}_t,t,\emptyset) = \pmb {x}_t - t\tilde{\pmb{v}}_{\emptyset}(\pmb {x}_t)$ , and $\tilde{\pmb{x}}_c^{\lambda}(\pmb {x}_t) = \pmb {x}_t - t\tilde{v}_c^{\lambda}(\pmb {x}_t)$ . Based on this ODE, we can reproduce results from a diverse set of solvers in Sec. A. For example, a single update step of Euler solver reads:
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \tilde {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \tilde {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t _ {i}}\right)}{t _ {i}} \cdot t _ {i + 1}, \tag {CFG}
+$$
+
+$$
+\boldsymbol {x} _ {t _ {i + 1}} = \tilde {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t _ {i}}\right) + \frac {\boldsymbol {x} _ {t _ {i}} - \tilde {\boldsymbol {x}} _ {\emptyset} \left(\boldsymbol {x} _ {t _ {i}}\right)}{t _ {i}} \cdot t _ {i + 1}. \quad (\mathrm {C F G} + +)
+$$
+
+This implies that $\mathrm{CFG} + +$ is potentially compatible with various flow-based generative models.
+
+# C EVOLUTION OF THE POSTERIOR MEAN: CFG VS. CFG++
+
+Recall that one can equivalently view the evolution of the posterior mean $\mathbb{E}[\pmb{x}_0|\pmb{x}_t]$ rather than the noisy variables $\pmb{x}_t$ . In this context, we derive the sequential evolution of conditional posterior mean $\hat{\pmb{x}}_c^\omega$ and $\hat{\pmb{x}}_c^\lambda$ through time $t$ to further understand the underlying behavior of the proposed sampling.
+
+Proposition 1. Let $d\boldsymbol{z}(\boldsymbol{x}_t) \coloneqq \boldsymbol{z}(\boldsymbol{x}_t) - \boldsymbol{z}(\boldsymbol{x}_{t+1})$ denote the discrete time evolution of some random variable $z$ at time $t$ . Then, the evolution of $\hat{\boldsymbol{x}}_c^\omega$ of CFG and $\hat{\boldsymbol{x}}_c^\lambda$ of CFG++ is given by
+
+$$
+d \hat {\boldsymbol {x}} _ {c} ^ {\omega} (\boldsymbol {x} _ {t}) = \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} d \hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t}) + \omega (\Delta (\boldsymbol {x} _ {t}, \boldsymbol {c}) - \Delta (\boldsymbol {x} _ {t + 1}, \boldsymbol {c})) \tag {35}
+$$
+
+$$
+d \hat {\boldsymbol {x}} _ {c} ^ {\lambda} (\boldsymbol {x} _ {t}) = \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} \underbrace {d \hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t})} _ {\text {u n c o n d . s h i f t}} + \lambda \underbrace {\Delta (\boldsymbol {x} _ {t} , \boldsymbol {c})} _ {\text {c o n d . s h i f t}}, \tag {36}
+$$
+
+where $\Delta (\pmb {x}_t,\pmb {c})\coloneqq \hat{\pmb{x}}_c(\pmb {x}_t) - \hat{\pmb{x}}_{\emptyset}(\pmb {x}_t)$
+
+Proof. We start by writing the iteration from $t + 1 \rightarrow t$
+
+$$
+\boldsymbol {x} _ {t} = \sqrt {\bar {\alpha} _ {t}} \hat {\boldsymbol {x}} _ {c} ^ {\omega} (\boldsymbol {x} _ {t + 1}) + \sqrt {1 + \bar {\alpha} _ {t}} \hat {\epsilon} _ {c} ^ {\omega} (\boldsymbol {x} _ {t + 1}). \tag {37}
+$$
+
+The Tweedie estimate for the next step is then written as
+
+$$
+\begin{array}{l} \hat {\boldsymbol {x}} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t}\right) = \frac {\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t}\right)}{\sqrt {\bar {\alpha} _ {t}}} (38) \\ = \frac {\sqrt {\bar {\alpha} _ {t}} \hat {x} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t + 1}\right) + \sqrt {1 - \bar {\alpha} _ {t}} \left(\hat {\epsilon} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t + 1}\right) - \hat {\epsilon} _ {c} ^ {\omega} \left(\boldsymbol {x} _ {t}\right)\right)}{\sqrt {\bar {\alpha} _ {t}}} (39) \\ = \hat {\boldsymbol {x}} _ {c} ^ {\omega} (\boldsymbol {x} _ {t + 1}) + \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} \Big [ \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t + 1}) - \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t}) + \omega (\hat {\epsilon} _ {c} (\boldsymbol {x} _ {t + 1}) - \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t + 1})) \\ \left. - \omega \left(\hat {\epsilon} _ {c} \left(\boldsymbol {x} _ {t}\right) - \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right)\right) \right]. (40) \\ \end{array}
+$$
+
+Using the relation $\hat{\epsilon}_c^\omega (\pmb {x}_t) = -(\sqrt{\bar{\alpha}_t}\hat{\pmb{x}}_c^\omega (\pmb {x}_t) - \pmb {x}_t) / \sqrt{1 - \bar{\alpha}_t}$ , we have
+
+$$
+d \hat {\boldsymbol {x}} _ {c} ^ {\omega} (\boldsymbol {x} _ {t}) = \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} d \hat {\epsilon} _ {\varnothing} (\boldsymbol {x} _ {t}) + \omega (\hat {\boldsymbol {x}} _ {c} (\boldsymbol {x} _ {t}) - \hat {\boldsymbol {x}} _ {\varnothing} (\boldsymbol {x} _ {t})) - \omega (\hat {\boldsymbol {x}} _ {c} (\boldsymbol {x} _ {t + 1}) - \hat {\boldsymbol {x}} _ {\varnothing} (\boldsymbol {x} _ {t + 1})). \tag {41}
+$$
+
+Similarly, for $\mathrm{CFG} + +$
+
+$$
+\begin{array}{l} \hat {x} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right) = \frac {\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\epsilon} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right)}{\sqrt {\bar {\alpha} _ {t}}} (42) \\ = \frac {\sqrt {\bar {\alpha} _ {t}} \hat {x} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t + 1}\right) + \sqrt {1 - \bar {\alpha} _ {t}} \left(\hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t + 1}\right) - \hat {\epsilon} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right)\right)}{\sqrt {\bar {\alpha} _ {t}}} (43) \\ = \hat {\boldsymbol {x}} _ {c} ^ {\lambda} (\boldsymbol {x} _ {t + 1}) + \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} \left[ \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t + 1}) - \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t}) - \lambda \left(\hat {\epsilon} _ {c} (\boldsymbol {x} _ {t}) - \hat {\epsilon} _ {\emptyset} (\boldsymbol {x} _ {t})\right) \right]. (44) \\ \end{array}
+$$
+
+Hence,
+
+$$
+d \hat {\boldsymbol {x}} _ {c} ^ {\lambda} \left(\boldsymbol {x} _ {t}\right) = \frac {\sqrt {1 - \bar {\alpha} _ {t}}}{\sqrt {\bar {\alpha} _ {t}}} d \hat {\epsilon} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right) + \lambda \left(\hat {\boldsymbol {x}} _ {c} \left(\boldsymbol {x} _ {t}\right) - \hat {\boldsymbol {x}} _ {\varnothing} \left(\boldsymbol {x} _ {t}\right)\right), \tag {45}
+$$
+
+Proposition 1 implies that the CFG++ update of $\hat{x}_c^\lambda$ is decomposed into two shift terms: 1) $d\hat{\epsilon}_{\emptyset}(\pmb{x}_t)$ represents the difference between consecutive unconditional scores (i.e. unconditional shift), and 2) $\Delta (\pmb{x}_t,\pmb{c})$ denotes the direction of conditional guidance at time $t$ (i.e. conditional shift). The conditional shift term is multiplied by a small interpolation factor $\lambda$ in the case of CFG++, inducing a small nudge toward the condition.
+
+CFG $\hat{x}_c^\omega$ , on the other hand, has the same unconditional shift, but has an oscillatory behavior for the conditional shift. The difference between CFG/CFG++ sampling arises from the unexpected additional shift from the previous timestep $t + 1$ that exists for the CFG decomposition: $-\Delta (\pmb{x}_{t + 1},\pmb{c})$ , and the scaling constant $\omega$ . The initial conditional shift $\omega \Delta (\pmb{x}_t,\pmb{c})$ with a large $\omega$ pushes the trajectory off the manifold, but cancels some of its effects by subtracting the conditional shift from the previous step $\omega \Delta (\pmb{x}_{t + 1},\pmb{c})$ . The compounded vector $\Delta (\pmb{x}_t,\pmb{c}) - \Delta (\pmb{x}_{t + 1},\pmb{c})$ does induce a nudge closer to the condition but requires a large value of $\omega$ to have a meaningful effect, and thus is hard to interpret.
+
+
+Figure 9: Continuous transition between CFG and CFG++ schedule
+
+# D CFG++ AS REWEIGHTED CFG
+
+One can rewrite the update step of CFG and $\mathrm{CFG} + +$ succinctly as
+
+$$
+\begin{array}{l} \boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \hat {\boldsymbol {x}} _ {\boldsymbol {c}} ^ {\omega} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} ^ {\omega^ {\prime}} (46) \\ = \sqrt {\bar {\alpha} _ {t - 1}} \left(\frac {\boldsymbol {x} _ {t} - \sqrt {1 - \bar {\alpha} _ {t}} \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} ^ {\omega} (\boldsymbol {x} _ {t})}{\sqrt {\bar {\alpha} _ {t}}} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} ^ {\omega^ {\prime}}\right), (47) \\ \end{array}
+$$
+
+where for CFG, $\omega' = \omega$ , and for CFG++, $\omega' = 0$ . Note that we are using the same notation $\omega$ here, but the guidance scale (represented as $\lambda$ in the previous sections), is much smaller. One can derive
+
+$$
+\begin{array}{l} \boldsymbol {x} _ {t - 1} = \sqrt {\bar {\alpha} _ {t - 1}} \hat {\boldsymbol {x}} _ {\varnothing} - \frac {\omega \sqrt {1 - \bar {\alpha} _ {t}} (\hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} - \hat {\boldsymbol {\epsilon}} _ {\varnothing})}{\sqrt {\alpha_ {t}}} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {\epsilon}} _ {\varnothing} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \omega^ {\prime} (\hat {\boldsymbol {\epsilon}} _ {\boldsymbol {c}} - \hat {\boldsymbol {\epsilon}} _ {\varnothing}) (48) \\ = \left(\sqrt {\bar {\alpha} _ {t - 1}} \hat {\boldsymbol {x}} _ {\emptyset} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \hat {\boldsymbol {\epsilon}} _ {\emptyset}\right) - \frac {\omega \sqrt {1 - \bar {\alpha} _ {t}} \left(\hat {\boldsymbol {\epsilon}} _ {\mathbf {c}} - \hat {\boldsymbol {\epsilon}} _ {\emptyset}\right)}{\sqrt {\alpha_ {t}}} + \sqrt {1 - \bar {\alpha} _ {t - 1}} \omega^ {\prime} \left(\hat {\boldsymbol {\epsilon}} _ {\mathbf {c}} - \hat {\boldsymbol {\epsilon}} _ {\emptyset}\right) (49) \\ = \boldsymbol {x} _ {t - 1, \varnothing} + \left(\hat {\epsilon} _ {c} - \hat {\epsilon} _ {\varnothing}\right) \underbrace {\omega^ {\prime} \sqrt {1 - \bar {\alpha} _ {t - 1}} - \omega \sqrt {\frac {1 - \bar {\alpha} _ {t - 1}}{\alpha_ {t}}}} _ {=: - \omega_ {t}} (50) \\ \end{array}
+$$
+
+Here, we see that the guidance scale used in the original CFG is a composition of two time-dependent functions. When composited with the same strength for $\omega^{\prime}$ and $\omega$ , as depicted in Fig. 9 (b), the guidance scale of CFG peaks at the earlier stages of sampling, drops down, then rises back up. The sudden peak in the earlier stages may explain the unnatural saturation in the earlier stages of sampling using CFG. In contrast, the guidance scale of CFG++ has a convex-like function, where the scale gradually increases to some value.
+
+By enforcing that the guidance scales integrate to 1 (i.e. enforce it as a PDF), we can generalize CFG/CFG++, and scrutinize the behavior when we interpolate between these two by setting $0 < \omega' < \omega$ . The guidance scale functions for these interpolations are shown in Fig. 9. In Tab. 4, we see that the image quality measured by FID and ImageReward on COCO-1K data, gradually gets better as we transition from CFG++ to CFG.
+
+
ω' = 0.0 (CFG++)
ω' = 0.4
ω' = 0.6
ω' = 0.8
ω' = 1.0 (CFG)
ImageReward ↑
-0.112
-0.125
-0.126
-0.153
-0.420
FID ↓
66.52
66.60
66.78
67.50
68.10
+
+# EXPERIMENTAL DETAILS
+
+# E.1 TEXT-CONDITIONED INVERSE PROBLEMS
+
+Problem settings. We evaluate our approach across following degradation types: 1) Super-resolution with a scale factor of x8, 2) Motion deblurring from an image convolved with a $61 \times 61$ motion kernel, randomly sampled with an intensity value $0.3^2$ , 3) Gaussian deblurring from an image convolved with a $61 \times 61$ kernel with an intensity value 0.5, and 4) Inpainting from $10 - 20\%$ free-form masking, as implemented in (Saharia et al., 2022). In inpainting evaluations, regions outside the mask are overlaid with the ground truth image.
+
+Datasets, Models. For evaluation, we use the FFHQ (Karras et al., 2019) 512x512 dataset and follow (Chung et al., 2023a) by selecting the first 1,000 images for testing. For the pre-trained latent diffusion model including baseline methods, we choose SD v1.5 trained on the LAION dataset. As a baseline for latent DIS, we consider PSLD (Rout et al., 2024). It enforces fidelity by projecting onto the subspace of $\mathcal{A}$ during the intermediate step between decoding and encoding, in conjunction with the DPS (Chung et al., 2023a) loss term. For gradient updates in both vanilla PSLD and PSLD with CFG, we use static step sizes of $\eta = 1.0$ and $\gamma = 0.1$ as recommended in (Rout et al., 2024). For CFG scale $\omega$ , we applied the corresponding scales that we found to be corresponded for CFG++ scale $\lambda$ . Please refer to the Tab. 5 for the hyperparameters used for PSLD with CFG++.
+
+Table 4: Quantitative results of COCO-1k by interpolating between CFG and CFG++
+
+
SR(x8)
Deblur(motion)
Deblur(gauss)
Inpaint
η
1.3
0.4
1.0
1.0
γ
0.1
0.025
0.12
0.1
λ
0.1
0.2
0.2
0.6
ω
1.5
2.0
2.0
7.5
+
+Table 5: Hyperparameters for PSLD (Rout et al., 2024) with CFG++ and corresponding CFG scale $\omega$ .
+
+# F FURTHER EXPERIMENTAL RESULTS
+
+# F.1 T2I
+
+Since the range of guidance scales for CFG and $\mathrm{CFG + + }$ is different, we matched the guidance values of $\omega$ and $\lambda$ for comparison by computing the LPIPS distance using the same seed.
+
+Fig. 14 shows the clean estimates at each diffusion sampling time $t$ , computed using Tweedie's formula, both with and without CFG. It is evident that the original CFG induces significant error, particularly at earlier times, leading to off-manifold samples. However, the CFG++ addresses this issue by adjusting the DDIM re-noising step and the guidance scale.
+
+# F.2 REAL IMAGE EDITING
+
+In Fig. 17-19, we provide qualitative comparison on real image editing via DDIM inversion with CFG and CFG++. For the DDIM inversion stage, we use "a photography of [source concept]" as conditioning prompt. For the sampling stage, we swap [source concept] to [target concept] and use it as conditioning prompt for generation. For example, in Fig. 17, we set [source concept] to "dog" and [target concept] to "cat". For all experiments, we set the guidance scale as $\omega = 9.0$ and $\lambda = 0.8$ as described in the main paper. The comparison demonstrates that CFG++ successfully edits the given image which was not possible by CFG. This results also support our claim on reduced error during DDIM inversion by CFG++.
+
+
+Figure 10: Enhanced T2I results by SDXL ( $\omega = 9.0$ , $\lambda = 0.8$ ) with CFG++. Under CFG, the lion cub is not visible (top-left), the dog appears with two tails (top-right), the goggles have an unusual shape (bottom-left), and the tree trunk is folded (bottom-right). These artifacts are absent in those produced by CFG++.
+
+# F.3 TEXT-CONDITIONED INVERSE PROBLEMS
+
+In Fig. 20-23, we display additional qualitative comparison for text-conditioned inverse problem solver with CFG and CFG++. Experiments are conducted with FFHQ (512x512) validation set and CFG++ consistently leads to better reconstruction of true solution for various tasks.
+
+
+C
+"A man wearing a suit is taking a self portrait with a camera"
+
+
+... coffee shop with neon sign ... little girl with red hair...
+
+
+"A painter study hard to learn how to draw ..."
+
+
+C+G
+Figure 11: T2I using SD v1.5, CFG vs CFG++ ( $\omega = 9.0$ , $\lambda = 0.8$ ). Unnatural depictions of human hands, and incorrect renderings of the text by CFG are corrected in CFG++.
+
+
+
+
+
+
+G
+Large brick building with a clock tower at its height.
+
+
+"Spectacular Tiny World in the Transparent Jar..."
+"A silhouette of a grand piano overlooking a dusky cityscape...."
+
+
+
+
+C
+Figure 12: T2I using SDXL-Turbo, 6 NFE, CFG vs CFG++. The overall image quality and sophistication have improved with CFG++. DreamShaper XL was used for both images and metrics in main part.
+
+
+
+
+
+
+CFG
+"An alpaca made of colorful building blocks, cyberpunk."
+
+
+"Floating, colossal, futuristic statue in the sky, ..."
+"A detailed oil painting of an old sea captain, steering his ship..."
+
+
+
+
+CFG++
+
+
+Figure 13: T2I using SDXL-Lightning, 6 NFE, CFG vs CFG++. The overall image quality and sophistication have improved with CFG++. Leosam's HelloWorld XL was used for both images and metrics in main part.
+
+
+
+
+
+
+"A small cactus with a happy face in the Sahara desert."
+
+
+"A baby painter trying to draw very simple picture, white background"
+
+
+"A blue jay standing on a large basket of rainbow macarons."
+
+
+"A transparent sculpture of a duck made out of glass. The sculpture is in front of a painting of a landscape."
+"A 4k dsrl image of a lemur wearing a red magician hat and a blue coat performing magic tricks with cards in a garden."
+Figure 14: The discrete evolution of the posterior mean in CFG and CFG++. Denoised estimates in latent space are decoded into pixel space at each timestep using SDXL.
+
+
+Figure 15: Interpolating behavior of T2I along various guidance scales using SD v1.5 with CFG and CFG++
+
+
+Figure 16: Real image inversion results at various CFG and CFG++ scales using SDv1.5. The image is from COCO dataset. We use the text prompt "a white dog is sleeping on a street and a bicycle" during the inversion.
+
+
+Figure 17: Comparison on real image editing via DDIM inversion under CFG and CFG++ using SDXL. Cat $\rightarrow$ Dog.
+
+
+Figure 18: Comparison on real image editing via DDIM inversion under CFG and CFG++ using SDXL. Horse $\rightarrow$ Zebra.
+
+
+Figure 19: Comparison on real image editing via DDIM inversion under CFG and CFG++ using SDXL. Cat $\rightarrow$ Cat with glasses.
+
+
+Figure 20: Results of PSLD using CFG and CFG++ on the FFHQ dataset at Super-Resolution (x8).
+
+
+GT
+
+
+Degraded
+
+
+CFG
+
+
+CFG++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 21: Results of PSLD using CFG and CFG++ on the FFHQ dataset at Motion Deblurring.
+
+
+
+
+
+
+
+
+GT
+
+
+Degraded
+
+
+CFG
+
+
+CFG++
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 22: Results of PSLD using CFG and CFG++ on the FFHQ dataset at Gaussian Deblurring.
+
+
+
+
+
+
+
+
+
+
+Figure 23: Results of PSLD using CFG and CFG++ on the FFHQ dataset at Inpainting.
\ No newline at end of file
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/images.zip b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..7de937c739bcd731a6a182471ba82c17e0e8591f
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:82c5ec64cddffc32c5c449a1201bd17af81310aa16d57daa29a93b8d96f7ea78
+size 2917784
diff --git a/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/layout.json b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..ab009ea710ca2f9898fd0d9e611fea470b785aa3
--- /dev/null
+++ b/ICLR/2025/CFG++_ Manifold-constrained Classifier Free Guidance for Diffusion Models/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed726de2d8e3f7c11a996df4b5924b2a76ca2afc24941802f349fb838f9d6db2
+size 826676
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_content_list.json b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..37a002ffb4f428ec6166a79dddbdcecacc7000fa
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85c973bdac430b921cff95fb241c8132dae9fab5c04279c238ba50304a67920d
+size 206988
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_model.json b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..654e1d6b9408761387736b8982a55eab3aa184e5
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f6772f83813ee03be9a77bb8c6e59513e6007fcc410042bc89522f8ceaef875c
+size 269996
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_origin.pdf b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ee32e2cb4d5477d0c4b87cb4889758a23a1646f3
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/32760580-1925-4c74-a794-e4e5e5f81da5_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6820d142a54d4be864a572d0b2dc8d2ce088dc5c91f0fb0b6d79a18e3ef89d8b
+size 5642093
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/full.md b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..999c410d935f687f176fca7593f269c12f801733
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/full.md
@@ -0,0 +1,916 @@
+# CG-BENCH: CLUE-GROUNDED QUESTION ANSWERING BENCHMARK FOR LONG VIDEO UNDERSTANDING
+
+Guo Chen $^{1,\ast}$ , Yicheng Liu $^{1,\ast}$ , Yifei Huang $^{2,3,\ast}$ , Yuping He $^{1}$ , Baoqi Pei $^{2,4}$ , Jilan Xu $^{2,5}$ , Yali Wang $^{2}$ , Tong Lu $^{1}$ , Limin Wang $^{1,2,\dagger}$
+
+1 State Key Laboratory for Novel Software Technology, Nanjing University
+$^{2}$ Shanghai Artificial Intelligence Laboratory $^{3}$ The University of Tokyo
+$^{4}$ Zhejiang University, $^{5}$ Fudan University
+
+chenguo1177@gmail.com
+
+# ABSTRACT
+
+The existing video understanding benchmarks for multimodal large language models (MLLMs) mainly focus on short videos. The few benchmarks for long video understanding often rely on multiple-choice questions (MCQs). Due to the limitations of MCQ evaluations and the advanced reasoning abilities of MLLMs, models can often answer correctly by combining short video insights with elimination, without truly understanding the content. To bridge this gap, we introduce CG-Bench, a benchmark for clue-grounded question answering in long videos. CG-Bench emphasizes the model's ability to retrieve relevant clues, enhancing evaluation credibility. It includes 1,219 manually curated videos organized into 14 primary, 171 secondary, and 638 tertiary categories, making it the largest benchmark for long video analysis. The dataset features 12,129 QA pairs in three question types: perception, reasoning, and hallucination. To address the limitations of MCQ-based evaluation, we develop two novel clue-based evaluation methods: clue-grounded white box and black box evaluations, assessing whether models generate answers based on accurate video understanding. We evaluate multiple closed-source and open-source MLLMs on CG-Bench. The results show that current models struggle significantly with long videos compared to short ones, and there is a notable gap between open-source and commercial models. We hope CG-Bench will drive the development of more reliable and capable MLLMs for long video comprehension. All annotations and video data are available at https://cg-bench.github.io/leaderboard/.
+
+# 1 INTRODUCTION
+
+Recently, video understanding has made significant progress with the advent of multimodal large language models (MLLMs). To evaluate these models, many recent efforts have been made to create video understanding benchmarks (Li et al., 2023b; Mangalam et al., 2024; Liu et al., 2024e), providing assessments of model comprehension capabilities and clues for future improvement.
+
+Since early benchmarks only focus on short video clips, recent works have started to create benchmarks (Fu et al., 2024a; Wu et al., 2024b; Zhou et al., 2024; Huang et al., 2024) for longer videos ( $\geq$ 10 minutes). However, these works employ multiple-choice questions (MCQ), where the difficulty level is heavily influenced by the configuration of negative options. In such scenarios, models (Chen et al., 2023d; Li et al., 2024a; Zhang et al., 2024b; Lin et al., 2024) tend to focus on only general video knowledge and use elimination to avoid selecting the negative options. As a result, the models can achieve correct answers without genuinely engaging with the relevant video content, leading to a lack of trustworthiness. One illustration can be found in question 2 of Figure 1, the option 'A' can be easily eliminated based purely on textual information. Recently, the NExT-GQA (Xiao et al., 2024) benchmark tries to address the problem of credible models by incorporating temporal grounding into MCQ. However, NExT-GQA is limited to the NextQA (Xiao et al., 2021) dataset, which lacks di
+
+
+Figure 1: Left: examples of CG-Bench's clue-grounded annotation. To correctly answer the questions, models need to ground their reasoning into the correct clue. Right: CG-Bench provides an evaluation suite with two novel credibility evaluation criteria while supporting both MCQ and open-ended evaluations.
+
+versity and primarily consists of short videos. A comprehensive benchmark for credibly evaluating generalist MLLMs for long video understanding, is still missing in the research community.
+
+To make up this gap, we introduce CG-Bench, illustrated in Figure 1, a novel benchmark designed to evaluate clue-grounded question answering in long videos. In contrast to traditional benchmarks that focus primarily on the accuracy of question answering, CG-Bench goes a step further by evaluating whether the model bases its answers on relevant clues within the video. CG-Bench designs two novel clue-based evaluation methods to provide more reliable model performance assessments. 1) clue-grounded white box evaluation requires the model to directly provide the clue interval corresponding to the question while selecting the correct answer. 2) clue-grounded black box evaluation requires the model to align the accuracy of video-level and clue-level MCQ. Furthermore, we propose a novel heuristic method, aided by human-annotated clues, for open-ended QA evaluation, to effectively balance the cost and performance.
+
+CG-Bench features 1,219 meticulously curated videos and 12,129 human-annotated question-answer-clue (QAC) triplets, establishing it as the largest and held-out VideoQA and question grounding benchmark for long videos. It employs a highly detailed manual classification system, organizing each video into 14 primary categories, 171 secondary categories, and 638 tertiary categories. The benchmark includes three main question types: perception, reasoning, and hallucination. Perception questions are further divided into 10 subcategories, such as object and attribute recognition, while reasoning questions are categorized into 12 subcategories, including relation reasoning, etc.
+
+We evaluate a range of closed-source and open-source MLLMs using this benchmark. The commercial models, GPT-4o (OpenAI, 2024) and Gemini-1.5 Pro (Anil et al., 2023) achieve scores of 53.9 and 43.4, respectively, with 128 frames for long-video multiple-choice questions. The leading open-source MLLM, Qwen2-VL-72B (Wang et al., 2024b), scores 51.4 under the same conditions, indicating its initial benchmarking against GPT-4o. However, our credibility assessments and open-ended evaluations reveal a significant drop in accuracy for existing MLLMs, with scores decreasing from 53.9 to 21.7. This underscores the considerable room for improvement in current MLLMs for long video understanding. We hope this benchmark can become a vital tool for advancing research and development of more reliable and capable MLLMs.
+
+# 2 RELATED WORK
+
+Multimodal Large Language Models (MLLMs) have rapidly gained popularity due to their proficiency in integrating visual and textual information (Liu et al., 2024a; 2023; Chen et al., 2023d; Wang et al., 2022; 2024d). Recent advancements, such as LLaVA-Next-Video (Zhang et al., 2024b), LLaVA-OneVision (Li et al., 2024a), InternVL2 (Chen et al., 2024e) and Eagle-2 (Li et al., 2025), focus on enhancing MLLMs by integrating LLM backbones with visual encoders and specialized adapters, or creating higher-quality multimodal instruction data. This results in improved performance across tasks that involve both text and images.
+
+Another area of focus is multimodal video understanding. Most models (Chen et al., 2024e; Li et al., 2023a; Maaz et al., 2023; Pei et al., 2024; Huang et al., 2018; 2020b) are optimized for short videos, typically a few seconds or at most a few minutes, without exploring their visual understanding with
+
+
+Figure 2: Distribution of video root categories, displaying the number of videos within each category.
+
+
+Figure 3: Distribution of question root types, illustrating the frequency of different question types.
+
+longer context. In response, researchers have explored methods such as compressing video frames into fewer visual tokens to allow for the handling of longer videos, as seen in models like LLaMA-Vid (Li et al., 2023c), MovieChat (Song et al., 2024), MA-LMM (He et al., 2024), VideoChat-Flash (Li et al., 2024b) and Oryx (Liu et al., 2024f). In addition, LongVA (Zhang et al., 2024a) and LongViLA (Xue et al., 2024) explore the system-level optimization for long-context MLLMs which can natively support long video understanding. Despite the continuous proposal of various MLLMs, their real-world performance in long video understanding is still under explored.
+
+MLLM Benchmarks. The development of benchmarks is becoming increasingly essential, especially for evaluating the MLLM performance in video understanding tasks. As the field develops, various benchmarks have been established to assess MLLMs across different modalities and video lengths. Previous efforts primarily focused on short videos, with traditional specialized VideoQA datasets like TVQA (Lei et al., 2018), NextQA (Xiao et al., 2021), and benchmarks for MLLM like VideoBench (Ning et al., 2023), MVBench (Li et al., 2023b) and EgoSchema (Mangalam et al., 2024). MVBench provides a comprehensive framework for evaluating general temporal understanding capabilities through question-answering on short clips, while EgoSchema focuses on egocentric video understanding with multi-choice questions. The videos in these benchmarks typically range from a few seconds to several tens of seconds, making them similar to image benchmarks and thus hindering the development of general video LLMs.
+
+Recently, several works such as VideoMME (Fu et al., 2024a), CinePile (Rawal et al., 2024), MLVU (Zhou et al., 2024), LongVideoBench (Wu et al., 2024b), MoVQA (Zhang et al., 2023b), HourVideo (Chandrasegaran et al., 2024), and LVBench (Wang et al., 2024c), have introduced long video benchmarks to evaluate MLLMs. VideoMME constructs a diverse video MCQ dataset, incorporating multimodal evaluations with visuals, subtitles, and audio. MLVU designs a range of tasks that focus on granular detail understanding to assess long video comprehension capabilities. However, a common limitation of these benchmarks is their reliance on MCQs, where the difficulty is heavily influenced by the construction of negative options. This allows MLLMs to often eliminate incorrect answers using sparse frames and common sense reasoning, which can inflate performances. With our clue interval annotation, CG-Bench enhances the evaluation quality of MLLMs in long video understanding by introducing new evaluation mechanisms on credibility.
+
+# 3 CG-BENCH
+
+# 3.1 DATASET CONSTRUCTION
+
+The dataset construction process of CG-Bench consists of three steps: video collection, question-answering-clue annotation, and quality review iteration. We provide details as follows.
+
+Video Collection. To avoid using videos that have been used for pre-training by existing MLLMs, we manually collect videos from the internet and provide new annotations on them. To facilitate the collection of raw videos from the Internet, we define 14 root domains as listed in Figure 2. During the collection process, we manually assign a brief tag (4-8 words) to categorize the content of each video. This supplementary tagging helps to ensure the diversity of the videos. We define
+
+a video to be long if it exceeds 10 minutes in duration. Accordingly, we collected videos longer than 10 minutes while considering the distribution of video duration. Furthermore, we retain the accompanying subtitles and audio to provide multimodal information. We carefully review and filter the videos manually for 7 rounds. More details about the video collection can be found in the supplementary material.
+
+Question-Answer-Clues Annotation. After collecting the raw video data, we annotate it with high-quality question-answer-clue (QAC) triplets. To ensure question diversity, we establish a taxonomy with three types: Perception, Reasoning, and Hallucination. As shown in Figure 3, Perception and Reasoning questions are further divided into 10 and 14 subcategories, respectively, while Hallucination questions combine elements of both. Annotators are instructed to include negative options to create a multiple-choice QA format, facilitating straightforward and cost-effective assessments. To minimize expression loss, annotators use their native language during the annotation process. Each video is annotated with 6 to 15 QAC triplets, depending on its duration. To ensure consistency in QAC triplets, we standardized the annotation process by first annotating the QA pairs and then identifying the clues. Annotators must watch the entire video, select a question type from the predefined categories, and then annotate a new question and its corresponding answer. Next, they select one or more intervals from the video to form a QAC triplet. Since the actual clue intervals often consist of multiple short moments, annotating each fragment is costly. Therefore, annotators are required to mark intervals that cover these short moments while ensuring the completeness of each event.
+
+Review Iteration. To ensure the difficulty and quality of the dataset, we conduct a repetitive review and iteration process to enhance annotation quality. We reject annotations that do not meet our quality standards and request annotators to revise them. Our quality requirements for annotations and the measures taken to ensure them are as follows: 1) The rationality of the question, options, and answer: we conduct manual reviews; 2) The video dependency of the question, options, and answer: we input questions and options into GPT-4 and filter out QA pairs that can be answered solely based on pure text; 3) The difficulty of negative options in multiple-choice questions: we input the video, questions and options into MLLMs and filter out QA pairs that can be answered using only sparse frames and small models; 4) The positional diversity of clue intervals: We monitor the distribution of clue duration and position and provide timely guidance to annotators.
+
+# 3.2 DATASET STATISTICS & COMPARISONS
+
+We present the detailed statistics of our dataset to provide a more comprehensive understanding, including meta-information, QAC triplets, qualitative analysis, and comparison to previous works.
+
+# 3.2.1 DATASET STATISTICS
+
+Video Meta. Our dataset comprises a total of 1219 videos with multimodal information, including vision, audio, and subtitles. The duration of the videos varies between 10 and 80 minutes, with a distribution illustrated in Figure 4. Notably, videos that last between 20 and 30 minutes are the most prevalent. This selection process is manual, based on content relevance, which mirrors real-world duration distributions and highlights a long-tail effect for longer videos. As illustrated in Figure 2, each video is classified using a three-tiered tagging system that succinctly encapsulates its content and assigns it to fundamental categories. The primary classification is augmented by a secondary layer of 171 tags and a tertiary layer consisting of 638 tags. This multi-level tagging mechanism guarantees a broad diversity of data content. For a more detailed classification of tags, please consult the supplementary materials.
+
+QAC Annotation. CG-Bench includes 12,129 annotations consisting of questions, answers, and clues. Table 1 presents the sentence lengths and totals for the annotated questions and answers, highlighting the linguistic diversity within our dataset. Each QAC triplet is annotated with 4 to 7 negative samples, resulting in an approximately uniform distribution with ratios of options A to H of $12.4\%$ , $14.7\%$ , $12.1\%$ , $14.8\%$ , $15.1\%$ , $16.1\%$ , $11.6\%$ , and $3.1\%$ . There are a total of 14,362 clue intervals across all QAC triplets, with an average duration of 19.24 seconds each. Additionally, we conduct a further analysis of the positions of clue intervals within the video. Figure 5 illustrates the frequency with which each normalized timestamp is represented by intervals. This demonstrates the unbiased nature of our interval annotations and highlights the diversity of our QA content in temporal position.
+
+
+Figure 4: Video duration distribution, showing the number of videos for different duration intervals.
+
+
+Figure 5: Clue time coverage, illustrating the frequency of clues across different time bins.
+Table 1: Annotation statistics, detailing the number of QAC triplets, questions, options, and clues.
+
+
Annotation Statistics
#QAC Triplets
12129
#Avg/QAC per video
9.95
#Avg/Option per QAC
6.96
#Avg/Clue per QAC
1.18
#Avg/Words of Questions
20.07
#Avg/Words of Options
22.88
#Avg/Duration of Clues
19.24
+
+Table 2: Comparison of benchmarks across key aspects: number of videos (#Video), average duration (#Duration), number of QA pairs (#QA Pairs), number of clues (#Clue), annotation method (M/A for manual/automatic), Open-Domain (OD), Open-Ended (OE), Multi-modal (MME), and Credibility (CE) Evaluation.
+
+
Benchmark
#Video
#Dur.(s)
#QA Pairs
#Clue
Anno.
OD
OE
MME
CE
Question-Clue Grounding
NextGQA (Xiao et al., 2024)
1,000
39.5
-
10,531
M
✘
-
-
-
Ego4D-NLQval (Grauman et al., 2022)
415
499.7
-
4,554
M
✘
-
-
-
Ego4D-NLQtest (Grauman et al., 2022)
333
493.7
-
4,005
M
✘
-
-
-
MultiHop-EgoQA test (Chen et al., 2024c)
360
-
-
1,080
A&M
✘
-
-
-
E.T. Benchtest (Liu et al., 2024d)
-
129.3
-
2,011
M
✓
-
-
-
RexTime test (Chen et al., 2024a)
-
141.1
-
2,143
A&M
✘
-
-
-
CG-Bench-QG
1,219
1624.4
-
14,362
M
✓
-
-
-
Short-Video QA
TVQA (Lei et al., 2018)
2,179
11.2
15,253
15,253
M
✘
✘
✘
✘
STAR (Wu et al., 2024a)
914
11.9
7,098
7,098
A
✘
✘
✘
✘
NextQA (Xiao et al., 2021)
1,000
44.0
8,564
✘
A
✘
✓
✘
✘
EgoSchema (Mangalam et al., 2024)
5,063
180.0
5,063
✘
A&M
✘
✘
✘
✘
TempCompass (Liu et al., 2024e)
410
11.4
7,540
✘
A&M
✘
✘
✘
✘
RexTime test (Chen et al., 2024a)
-
141.1
-
2,143
A&M
✘
✘
✘
✓
MVBench (Li et al., 2023b)
3,641
16.0
4,000
✘
A&M
✘
✘
✘
✘
MMBench-Video (Fang et al., 2024)
600
165.4
1,998
✘
M
✓
✓
✘
✘
CG-Bench-Clue
12,129
22.8
12,129
-
M
✓
-
✓
-
Long-Video QA
EgoTimeQA test (Di & Xie, 2024)
148
492
500
✘
A
✘
✘
✘
✘
MovieChat-1K (Song et al., 2024)
130
500.0
1,950
✘
M
✘
✘
✘
✘
Video-MME (Fu et al., 2024a)
900
1017.9
2,700
✘
M
✓
✘
✓
✘
LongVideoBench (Wu et al., 2024b)
966
1408.0
6,678
✘
M
✓
✘
✘
✘
MLVU (Zhou et al., 2024)
757
720.0
2,593
✘
M
✘
✘
✘
✘
CG-Bench
1,219
1624.4
12,129
14,362
M
✓
✓
✓
✓
+
+# 3.2.2 COMPARISON WITH PREVIOUS BENCHMARKS
+
+CG-Bench is characterized by its diverse features, allowing it to be compared with three distinct types of benchmarks, as depicted in the three sections of Table 2: Question Clue Grounding, Short-Video QA, and Long-Video QA benchmarks. For the question clue grounding benchmarks, NextGQA (Xiao et al., 2024), Ego4D-NLQ (Grauman et al., 2022), MultiHop-EgoQA (Chen et al., 2024c), E.T. Bench (Liu et al., 2024d), and RexTime (Chen et al., 2024a) are primarily centered around action and egocentric domains. Their videos are sampled from academic datasets. In comparison, the question clue grounding part of CG-Bench, CG-Bench-QG, stands out with the highest number of videos and the longest average length, the diversity of which fosters a broad spectrum of question-grounding queries.
+
+Furthermore, we transform QAC triplets to our novel Short-Video QA benchmark, termed CG-Bench-Clue. When contrasted with prior short video benchmarks such as TempCompass (Liu et al., 2024e), MVBench (Li et al., 2023b) and MMBench-Video (Fang et al., 2024), our CG-Bench-Clue emerges as the largest, held-out, open-domain and multimodal Short-Video QA benchmark.
+
+As for the Long-Video QA benchmark, CG-Bench excels in the number of videos, length, quantity of questions, and annotation quality. Owing to our clue interval annotations, CG-Bench further facilitates reliable evaluations for long videos and open-ended evaluations with clue assistance, a feature that sets it apart from existing long video benchmarks like Video-MME (Fu et al., 2024a) and MLVU (Zhou et al., 2024).
+
+# 3.3 EVALUATION
+
+In this section, we describe the evaluation tasks of our CG-Bench which include traditional MCQ, the unique credibility evaluation, and clue-aided open-ended QA evaluation.
+
+# 3.3.1 MULTIPLE-CHOICE QUESTION EVALUATION
+
+We assess the accuracy of MCQ in two settings: Long-Video MCQ and Clue-based MCQ. In the Long-Video MCQ setting, the model receives the entire video as input and is required to select the correct answer based on the video, the question, and the candidate options. For the Clue-based MCQ setting, the model is given only the video within the annotated clue interval as input. The model has access only to the clue clip, the question, and the candidate options. It does not have access to the original long video. Since a single QA may correspond to multiple clues, we merge these clues and treat the combined clue as a single, cohesive clue segment.
+
+# 3.3.2 CREDIBILITY EVALUATION
+
+The ability of a model to identify relevant clues related to questions is a crucial factor in determining its reliability. Therefore, we define a model's reliability based on its proficiency in locating accurate clues when addressing problems. To achieve this, we introduce two clue-grounded mechanisms for credibility assessment: white-box evaluation and black-box evaluation.
+
+White-Box Evaluation requires the model to directly output the intervals of clues that can accurately answer the question. This task is similar to video temporal grounding (Lei et al., 2021; Huang et al., 2023). Therefore, we use tIoU (Temporal Intersection over Union) as the evaluation metric. Since each question may correspond to multiple intervals of clues, we allow the model to predict multiple possible intervals. Given a set of prediction $\mathcal{P}$ and ground truths $\mathcal{G}$ , the tIoU is defined as:
+
+$$
+\mathrm{tIoU} = \frac{\sum_{i\in\mathcal{G},j\in\mathcal{P}}\max(0,\min(b_{i},d_{j}) - \max(a_{i},c_{j}))}{\sum_{i\in\mathcal{G}}(b_{i} - a_{i}) + \sum_{j\in\mathcal{P}}(d_{j} - c_{j}) - \sum_{i\in\mathcal{G},j\in\mathcal{P}}\max(0,\min(b_{i},d_{j}) - \max(a_{i},c_{j}))} \times 100\%, \tag{1}
+$$
+
+where $a_{i}, b_{i}$ are the start and end timestamps of the $i$ -th ground truth interval of $\mathcal{G}$ . $c_{j}, d_{j}$ are the start and end timestamps of the $j$ -th predicted interval of $\mathcal{P}$ . We calculate the mean IoU ( $\mathbf{mIoU}$ ) by averaging the tIoU scores obtained by the model across all question queries. To further improve the robustness of question grounding evaluation, we introduce the rec.@IoU metric. This metric measures the probability of successfully recalling clue intervals at various IoU thresholds.
+
+Additionally, we propose acc.@IoU that evaluates both MCQ accuracy and clue-grounding ability. A response is considered correct only if the selected answer is accurate and the tIoU exceeds $(>$ a predefined threshold $\tau$ . Since locating short-duration clues in the long videos in CG-Bench is inherently challenging, we set the default $\tau$ to be 0 for the more obvious comparison on ablation studies. Setting $\tau = 0$ ensures that acc.@IoU requires the model to select the correct option and produce a time interval that overlaps at least slightly (tIoU $>0$ ) with the annotated clue interval, rather than reducing to naive MCQ accuracy. We calculate the rec.@IoU and acc.@IoU at IoU thresholds of 0.1, 0.2, 0.3, 0.4, and 0.5 to determine the final result.
+
+Black-Box Evaluation aims to evaluate the model's ability to seek out clues implicitly. Understanding long videos involves the retrieval of clues distributed across various spatiotemporal locations within the entire video. Therefore, an effective model for long videos should naturally focus on capturing human-annotated clue intervals in its hidden states. However, beyond the explicitly annotated clue intervals, there are likely hidden clues scattered throughout the video that can also help to determine the correct answer. Thus, a model with access to the full video should yield higher accuracy compared to solely relying on the clue interval. In other words, the accuracy of Long-Video MCQ (long-acc.) should be greater than or equal to the accuracy of Clue-based MCQ (clue-acc.).
+
+With this insight, for the black box evaluation, we define a new metric called Clue Recovery Rate (CRR). This metric evaluates the model's robustness to context dilution, i.e., how stable a model can find related clues from long but diluted video context. CRR is calculated by:
+
+$$
+\mathrm {CRR} = \frac {\operatorname* {m i n} (\text {long - acc .} , \text {clue - acc .})}{\text {clue - acc .}} \times 100 \% \tag{2}
+$$
+
+A CRR of less than $100\%$ suggests that the MLLM's ability to retrieve short clues from long video representations is not optimal.
+
+
+Question: In the video, who ate the orange jelly?
+GT: girl in black clothes
+Prediction: Girl with blonde hair
+
+
+Question: In the video, how does the protagonist show the bag she is carrying today?
+GT: Show it while standing sideways.
+Prediction: Show it by taking a selfie in front of the mirror.
+Figure 6: Two examples illustrating the ambiguity challenge of using LLMs for open-ended evaluation. While in different expressions, GT and prediction should both be treated as correct answers.
+
+# 3.3.3 CLUE-AIDED OPEN-ENDED QA EVALUATION
+
+CG-Bench supports open-ended QA evaluation for a more comprehensive assessment. Previous works like MM-Vet (Yu et al., 2023) and MMBench-Video (Fang et al., 2024) have used LLMs to evaluate open-ended QA for images and short videos. However, long videos contain more complex information, leading to ambiguous user-generated questions. This can result in discrepancies between LLM-evaluated scores and the actual QA ability of models, as shown in Figure 6.
+
+To address this, we use a low-hallucination MLLM to evaluate the similarity between text output and visual information. We selected GPT-4o (OpenAI, 2024) as the multimodal evaluator due to its high ranking in benchmarks like OpenCompass (Contributors, 2023) and the Lmsys leaderboard (Chiang et al., 2024), and its relatively low hallucination rate compared to other MLLMs. Since using GPT-4o directly for multimodal judging can still introduce hallucination errors and incur high API costs, we propose a heuristic evaluation method to mitigate biases and reduce costs. First, GPT-4o determines if the output can be evaluated based solely on the text answer. It outputs yes or no; if not, it requests visual cues by stating, "I need visual clues." This prompts the inclusion of supplementary visual data to aid GPT-4o in its evaluation. By using pre-annotated time intervals with question clues, we sample frames as visual aids, further reducing hallucination errors and costs. We analyze this evaluation method in Sec 4.3, with more details available in the supplementary materials.
+
+# 4 EXPERIMENTS
+
+In this section, we evaluate a wide range of MLLMs using CG-Bench. We first introduce the evaluation setup, followed by quantitative results for both closed-source and open-source models. Finally, we analyze some key factors in the evaluation.
+
+# 4.1 SETTINGS
+
+We first briefly describe the settings used in our experiments. The supplementary material provides more detailed settings.
+
+Models. We evaluate the performance of three mainstream commercial models on our CG-Bench: GPT4o (OpenAI, 2024), Gemini-1.5 (Anil et al., 2023), and Claude-3.5, including their different versions. Also, we assess the representative open-source image-MLLMs, such as LLaVA-OV (Li et al., 2024a), Qwen2-VL (Wang et al., 2024b) and InternVL2 (Chen et al., 2024e), video-MLLMs, such as VideoChat2 (Li et al., 2023b).
+
+Frame Sampling. For long video understanding, the frame sampling strategy significantly impacts evaluation results. For open-source MLLMs, we make the best use of our computational resources to use as many frames as possible. For closed-source MLLMs, since the local computational resource is no longer a bottleneck, we can use even more frames. We uniformly sample (Wang et al., 2019) 128 frames for Long-video MCQ, and use 32 frames as the for Clue-based MCQ.
+
+Modality. We also explore other modalities: subtitles and audio. For subtitles, we employ a uniform sampling method. If the timestamp of a sampled frame falls within the time interval of a subtitle, that subtitle will be included in the analysis. Each subtitle is considered only once to avoid redundancy.
+
+Prompt. For MCQ tasks, the model is prompted to provide the uppercase letter corresponding to the correct option. In Open-Ended QA tasks, the model responds freely based on the questions. For the Clue Grounding task, we append the timestamps of each frame and subtitle to enhance the model's time-awareness, requiring it to return nested lists in the format $\left[\left[s1,e1\right],\left[s2,e2\right],\ldots\right]$ . For open-ended evaluation, we require the model to assess the correctness between the predictions and the ground truth and respond with yes or no.
+
+Table 3: Performance of various open-source and closed-source MLLMs on CG-Bench. We provide human evaluation for showing annotation agreements and the difficulty of our benchmark.
+
+
Models
LLM #param
#F
MCQ
Cred. Eval.
OE acc.
clue
long
clue-acc.
long-acc.
mIoU
rec.@IoU
acc.@IoU
CRR
Random
-
-
-
14.2
14.2
0.13
0.16
0.09
100
0
Human (full-video)
-
-
-
92.2
90.3
35.5
51.2
29.8
97.9
83.7
Human (sparse frames)
-
-
128
-
59.9
-
-
-
-
-
GPT4o (text)
-
0
0
16.8
16.8
0.14
0.2
0.15
100
2.1
Open-source MLLMs
Video-LLAVA (Lin et al., 2023)
7B
8
8
34.2
16.2
1.13
1.96
0.59
47.4
12.3
VideoLLAMA (Zhang et al., 2023a)
7B
32
32
36.8
18.4
1.21
1.87
0.84
50.0
15.8
Videochat2 (Li et al., 2023b)
7B
16
16
35.2
19.3
1.28
1.98
0.94
54.8
18.6
Qwen-VL-Chat (Bai et al., 2023)
7B
4
4
38.3
21.6
0.89
1.19
0.42
56.4
19.4
ST-LLM (Liu et al., 2024c)
7B
32
64
39.6
23.8
2.23
2.86
1.13
60.1
20.7
ShareGPT4Video (Chen et al., 2024b)
16B
16
16
41.4
26.7
1.85
2.65
1.01
64.5
22.0
Chat-UniVi-v1.5 (Jin et al., 2024)
13B
32
64
41.5
25.9
2.07
2.53
1.21
62.4
21.4
ViLA (Lin et al., 2024)
8B
14
14
41.8
28.7
1.56
2.89
1.35
68.7
24.0
GroundVQA (Liu et al., 2024d)
0.25B
-
1200
27.3
-
1.33
1.37
-
-
-
GeLM (Chen et al., 2024c)
7B
-
100
-
-
2.25
2.81
-
-
-
ET-Chat (Liu et al., 2024d)
4B
-
1fps
17.6
-
1.38
1.43
-
-
-
InternVL-Chat-v1.5 (Chen et al., 2023d)
20B
10
10
42.5
28.9
2.18
2.38
1.15
68.0
23.1
MiniCPM-v2.6 (Yao et al., 2024)
8B
32
32
44.6
30.1
2.35
2.61
1.04
67.5
26.6
LongVA (Zhang et al., 2024a)
7B
32
128
42.8
28.7
2.94
3.86
1.78
67.1
25.1
LLaVA-OneVision (Li et al., 2024a)
7B
16
16
43.2
31.1
1.63
1.78
1.08
72.0
25.4
Video-CCAM (Fei et al., 2024)
14B
32
96
43.6
29.7
2.63
3.48
1.83
68.1
25.3
Kangaroo (Liu et al., 2024b)
8B
32
64
45.9
30.2
2.56
2.81
1.94
65.8
24.5
VITA (Fu et al., 2024b)
8x7B
32
32
47.8
33.3
3.06
3.53
2.06
69.7
27.5
Qwen2-VL (Wang et al., 2024b)
72B
32
128
56.2
41.3
3.58
5.32
3.31
73.5
33.6
InternVL2 (Chen et al., 2024e)
78B
32
32
58.5
42.2
3.91
5.05
2.64
72.1
32.5
Closed-source MLLMs
GPT-4o-08-06 (OpenAI, 2024)
-
32
128
58.3
45.2
5.62
8.30
4.38
77.5
39.5
GPT-4mini-08-06 (OpenAI, 2024)
-
32
128
48.3
33.4
3.75
5.18
2.21
69.2
25.4
Gemini-1.5-Pro (Anil et al., 2023)
-
32
128
50.1
37.2
3.95
5.81
2.53
74.3
29.3
Gemini-1.5-Flash (Anil et al., 2023)
-
32
128
47.0
32.3
3.67
5.44
2.45
68.7
26.3
Claude3.5-Sonnet
-
32
50
56.2
40.5
3.99
5.67
2.79
72.1
35.2
+
+# 4.2 MAIN RESULTS
+
+As shown in Table 3, the closed-source MLLM GPT4o (OpenAI, 2024) leads significantly, surpassing other models across all metrics. Notably, GPT4o's long-acc. reaches $45.2\%$ , much higher than Gemini-1.5-Pro (Anil et al., 2023), demonstrating its strong capabilities in long video understanding. Among open-source MLLMs, Qwen2-VL (Wang et al., 2024b) performs impressively, achieving results comparable to GPT4o in long-acc. and clue-acc. Other models underperform due to insufficient context support or inadequate video training. While these MLLMs perform well on MCQ tasks, they experience significant performance drops in credibility and open-ended evaluations on CG-Bench. For instance, GPT-4o's long-acc. falls from 45.2 to 4.38 in Acc@IoU and 39.5 in OE-acc. Additionally, with the same number of sampling frames, GPT-4o achieves a CRR of 77.5, whereas Gemini-1.5-Pro only reaches 74.3, indicating its weaker ability to retrieve short-term clues from long videos. Overall, current MLLMs do not perform well on CG-Bench, suggesting considerable room for improvement in their capability and credibility.
+
+Since it is difficult to input more than 128 frames due to the hardware limitations, we alternatively conducted a human evaluation experiment under constrained visual conditions, to see how severe the "undersampling" issue is for longer video. We uniformly sampled 30 videos from CG-Bench, resulting in 296 questions. For each video, we uniformly sampled 128 frames and asked volunteers to perform an MCQ testing. The resulting accuracy was $59.85\%$ (row 3 in Table 3). This result indicates that our dataset is indeed challenging and that it is difficult to derive solutions from a limited number of frames. It also highlights that even the most advanced models, such as GPT-4o, have ample room for improvement in long video comprehension.
+
+# 4.3 ANALYSIS
+
+Furthermore, we perform a comprehensive analysis of the two leading closed-source MLLMs, GPT4o (OpenAI, 2024) and Gemini-1.5 Pro (Anil et al., 2023), as well as the best performing open-source MLLM, Qwen2-VL (Wang et al., 2024b), on our CG-Bench. In this analysis, we use 1000
+
+Table 4: Impact of different prompts and modalities. Each prompt can be composed of frames (F), frame timestamps (FT), subtitles (S), subtitle timestamps (ST), and audio (A). We conduct the main experiments with GPT4o-0806 (OpenAI, 2024) while studying the audio modality with Gemini-1.5 Pro (Anil et al., 2023).
+
+
model
prompt & modality
clue-acc.
long-acc.
mIoU
Acc@IoU
CRR
OE-acc.
GPT4o
S (128 frames)
-
31.5
-
-
-
-
GPT4o
S (full-video)
-
34.3
-
-
-
-
GPT4o
F
65.8
51.8
3.39
10.7
78.7
35.4
GPT4o
F+FT
65.3(−0.5)
51.6(−0.2)
5.73(+2.34)
20.4(+9.7)
79.0(−0.3)
36.8(+1.4)
GPT4o
F+S
66.7(+0.9)
53.4(+1.6)
3.96(+0.57)
11.2(+0.5)
80.1(+1.4)
38.2(+2.8)
GPT4o
F+S+ST
67.1(+1.3)
54.1(+2.3)
5.19(+1.80)
13.2(+2.5)
80.6(+1.9)
38.4(+3.0)
GPT4o
F+S+FT
67.4(+1.6)
53.2(+1.4)
7.80(+4.41)
22.3(+11.6)
78.9(+0.2)
37.9(+2.5)
GPT4o
F+S+ST+FT
67.5(+1.7)
54.9(+3.0)
9.68(+6.29)
26.7(+16.0)
81.3(+2.6)
39.5(+4.1)
Gemini
F+S+ST+FT
62.1
45.1
9.16
20.7
72.6
23.2
Gemini
F+S+ST+FT+A
62.3(+0.2)
45.0(−0.1)
9.10(−0.06)
19.8(−0.9)
72.2(−0.4)
23.5(+0.3)
+
+
+(a) Long Acc
+
+
+(b) mIoU
+
+
+(c) Acc@IoU
+Figure 7: Impact of sampling frame numbers on different metrics for GPT-4o-0806 (OpenAI, 2024), Gemini1.5 Pro (Anil et al., 2023) and Qwen2VL-72B (Wang et al., 2024b).
+
+
+(d) CRR
+
+
+(e) Open ended
+
+QAC triplets sampled uniformly from all annotations for fast experiments. We report acc.@IoU with $\tau = 0$ for a more obvious comparison.
+
+Impact of Prompt & Modality. As shown in Table 4, we conduct the ablation studies on the subset that contains subtitles and explore the impact of different prompts on GPT4o and the effect of the audio modality on Gemini-1.5 Pro. Our findings indicate that all prompt types (FT/S/ST), except video frames (F), provide performance benefits across most metrics. Subtitles contribute more to long-acc. than they do to clue-acc.. Additionally, the inclusion of timestamp information (FT/ST) is critical for interval prediction. Timestamps from both frames and subtitles enhance IoU-related metrics, revealing a complementary effect. When both FT and ST are added simultaneously, mIoU increases from 3.39 to 9.68, and Acc@IoU rises from 10.7 to 26.7. When S, FT, and ST are all used in the prompt, the model achieves the best performance across all metrics. In contrast, our exploration of the audio modality (A) revealed that audio does not yield significant performance gain and, in some cases, even slightly degrades the results, as shown in Table 4. Finally, we conduct experiments using only subtitles from 128 frames versus the full video. The results show that while subtitles offer useful semantic cues, their impact is significantly reduced when visual input is included. This suggests that our benchmark favors visual signals.
+
+Impact of Frame Number. As illustrated in Figure 7, we conducted experiments to analyze the performance across various metrics as the number of frames increases. Overall, the performance of all three MLLMs gradually improves with the addition of more frames, with GPT-4o consistently outperforming the others across all metrics. For long-acc. and OE acc., Qwen2VL achieves performance comparable to GPT-4o. However, compared with Qwen2VL, Gemini excels in terms of mIoU and Acc@IoU. Regarding CRR, GPT-4o demonstrates greater consistency between clue-acc. and long-acc. across more frames, indicating its superior reliability in long video understanding. For open-ended QA, Gemini's higher refusal rate results in a noticeable decline in performance.
+
+Open-ended Evaluation Quality. To assess the stability and accuracy of various MLLMs as evaluators, we utilized four models—Gemini, Qwen2VL, Claude, and GPT-4o—each of which evaluated GPT-4o's predictions five times. Human evaluations of GPT-4o's predictions are also conducted for reference. The results, shown in Figure 8, indicate that GPT-4o has the highest stability and the smallest deviation from human-assigned scores. Furthermore, Table 5 explores the impact of different evaluation methods. When evaluators were provided only with ground truth (col. "GT") or visual information (col. "Vis"), the scoring bias (absolute difference) between human and model
+
+
+Figure 8: Comparison of using different LLMs as open-ended evaluators for GPT-4o's outputs.
+
+
GT
GT+Vis
Vis
Ours
Bias(%)↓
12.4
6.4
17.0
1.0
Time (s)↓
741
20,040
19,640
3,600
Price ($)↓
0.05
6.1
6
2
Trigger Rate (%)↓
0
100
100
14
Trigger Recall Rate (%)↑
0
100
100
88
+
+
+Figure 9: Long-Video-MCQ Accuracy grouped by video duration for GPT4o-0806 with 128 frames.
+
+Table 5: Comparison of different modes: GT-only, visual-only, GT+vision and heuristic (Ours).
+
+
#Frames
Resolution
Sampling Strategy
long-acc.
128
Low
Uniform
53.9
50
Low
Uniform
46.7
50
Low
Keyframe
45.7
50
High
Uniform
51.0
+
+Table 6: Impact of different frame sampling strategies on long-acc. for GPT4o-0806.
+
+based evaluation increased. While fully leveraging visual information (col. "GT+Vis") improved evaluation accuracy, it also significantly increased the time and cost required. Our proposed heuristic evaluation method achieves the lowest evaluation bias. Additionally, we manually annotated 200 evaluation samples to determine the necessity of visual request triggers. From the bottom block in Table 5, the statistics show that our method achieved a visual request trigger rate (the probability that the model triggers "visual clues required") of $14\%$ . The recall rate of this triggering achieves $88\%$ . This proves that our approach effectively balances cost and performance.
+
+Performance grouped by Video Duration. We grouped videos by duration and evaluated the long-acc. performance of GPT-4o-0806 using 128 frames. Figure 9 shows that the model struggles with undersampling, especially for longer videos.
+
+Impact of Frame Sampling Strategy. We investigate how different frame sampling strategies affect performance. To expedite testing, we primarily evaluated GPT4o-0806 using 50 uniformly sampled frames, focusing on the long-acc metric. The experiment consists of three parts: 1) low resolution, 2) high resolution, and 3) keyframe extraction (via FFmpeg) combined with low resolution. As shown in Table 6, higher resolution offers some improvement, while keyframe extraction has no significant impact.
+
+# 5 CONCLUSION AND FUTURE WORK
+
+In this paper, we introduce CG-Bench, a novel benchmark designed to evaluate clue-grounded question answering capabilities in long video understanding. Unlike existing benchmarks that focus on short videos or rely solely on multiple-choice questions, CG-Bench emphasizes the importance of models retrieving and grounding their answers in specific video segments, enhancing evaluation credibility. CG-Bench includes 1,219 manually curated videos organized into a detailed three-tier system, with 12,129 QA pairs covering perception, reasoning, and hallucination question types. This provides a comprehensive and diverse dataset for assessing MLLMs. We propose two clue-based evaluation methods—clue-grounded white-box and black-box evaluations—that offer novel ways to determine whether models genuinely comprehend video content or merely rely on superficial cues. Extensive experiments with various closed-source and open-source MLLMs reveal that current models significantly underperform in long video understanding compared to short videos. We hope that CG-Bench will serve as a valuable resource for the research community, driving the development of more trustworthy and capable MLLMs for long video understanding.
+
+Acknowledgement. This work is supported by the National Key R&D Program of China (No. 2022ZD 0160900), the National Natural Science Foundation of China (No. 62372223 and U24A20330), Jiangsu Frontier Technology Research and Development Program (No. BF2024076), Postgraduate Research & Practice Innovation Program of Jiangsu Province (No. KYCX24_0260), and Nanjing University-China Mobile Communications Group Co., Ltd. Joint Institute.
+
+# REFERENCES
+
+Rohan Anil, Sebastian Borgeaud, Yonghui Wu, Jean-Baptiste Alayrac, Jiahui Yu, Radu Soricut, Johan Schalkwyk, Andrew M. Dai, Anja Hauth, Katie Millican, David Silver, Slav Petrov, Melvin Johnson, Ioannis Antonoglou, Julian Schrittwieser, Amelia Glaese, Jilin Chen, Emily Pittler, Timothy P. Lillicrap, Angeliki Lazaridou, Orhan Firat, James Molloy, Michael Isard, Paul Ronald Barham, Tom Hennigan, Benjamin Lee, Fabio Viola, Malcolm Reynolds, Yuanzhong Xu, Ryan Doherty, Eli Collins, Clemens Meyer, Eliza Rutherford, Erica Moreira, Kareem Ayoub, Megha Goel, George Tucker, Enrique Piqueras, Maxim Krikun, Iain Barr, Nikolay Savinov, Ivo Danihelka, Becca Roelofs, Anaïs White, Anders Andreassen, Tamara von Glehn, Lakshman Yagati, Mehran Kazemi, Lucas Gonzalez, Misha Khalman, Jakub Sygnowski, and et al. Gemini: A family of highly capable multimodal models. CoRR, abs/2312.11805, 2023.
+Jinze Bai, Shuai Bai, Shusheng Yang, Shijie Wang, Sinan Tan, Peng Wang, Junyang Lin, Chang Zhou, and Jingren Zhou. Qwen-vl: A versatile vision-language model for understanding, localization, text reading, and beyond. arXiv preprint arXiv:2308.12966, 2023.
+Keshigeyan Chandrasegaran, Agrim Gupta, Lea M. Hadzic, Taran Kota, Jimming He, Cristobal Eyzaguirre, Zane Durante, Manling Li, Jiajun Wu, and Fei-Fei Li. Hourvideo: 1-hour video-language understanding. In Advances in Neural Information Processing Systems, volume 37, 2024.
+Aozhu Chen, Ziyuan Wang, Chengbo Dong, Kaibin Tian, Ruixiang Zhao, Xun Liang, Zhanhui Kang, and Xirong Li. Chinaopen: A dataset for open-world multimodal learning. In Proceedings of the 31st ACM International Conference on Multimedia, pp. 6432-6440, 2023a.
+Jr-Jen Chen, Yu-Chien Liao, Hsi-Che Lin, Yu-Chu Yu, Yen-Chun Chen, and Yu-Chiang Frank Wang. Rextime: A benchmark suite for reasoning-across-time in videos. arXiv preprint arXiv:2406.19392, 2024a.
+Lin Chen, Xin Wei, Jinsong Li, Xiaoyi Dong, Pan Zhang, Yuhang Zang, Zehui Chen, Haodong Duan, Bin Lin, Zhenyu Tang, et al. Sharegpt4video: Improving video understanding and generation with better captions. arXiv preprint arXiv:2406.04325, 2024b.
+Qirui Chen, Shangzhe Di, and Weidi Xie. Grounded multi-hop videoqa in long-form egocentric videos. arXiv preprint arXiv:2408.14469, 2024c.
+Sihan Chen, Xingjian He, Longteng Guo, Xinxin Zhu, Weining Wang, Jinhui Tang, and Jing Liu. Valor: Vision-audio-language omni-perception pretraining model and dataset. arXiv preprint arXiv:2304.08345, 2023b.
+Sihan Chen, Handong Li, Qunbo Wang, Zijia Zhao, Mingzhen Sun, Xinxin Zhu, and Jing Liu. Vast: A vision-audio-subtitle-text omni-modality foundation model and dataset. Advances in Neural Information Processing Systems, 36:72842-72866, 2023c.
+Tsai-Shien Chen, Aliaksandr Siarohin, Willi Menapace, Ekaterina Deyneca, Hsiang-wei Chao, Byung Eun Jeon, Yuwei Fang, Hsin-Ying Lee, Jian Ren, Ming-Hsuan Yang, et al. Panda-70m: Captioning 70m videos with multiple cross-modality teachers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13320-13331, 2024d.
+Zhe Chen, Jiannan Wu, Wenhai Wang, Weijie Su, Guo Chen, Sen Xing, Zhong Muyan, Qinglong Zhang, Xizhou Zhu, Lewei Lu, et al. Internvl: Scaling up vision foundation models and aligning for generic visual-linguistic tasks. arXiv preprint arXiv:2312.14238, 2023d.
+Zhe Chen, Weiyun Wang, Hao Tian, Shenglong Ye, Zhangwei Gao, Erfei Cui, Wenwen Tong, Kongzhi Hu, Jiapeng Luo, Zheng Ma, et al. How far are we to gpt-4v? closing the gap to commercial multimodal models with open-source suites. arXiv preprint arXiv:2404.16821, 2024e.
+Wei-Lin Chiang, Lianmin Zheng, Ying Sheng, Anastasios Nikolas Angelopoulos, Tianle Li, Dacheng Li, Hao Zhang, Banghua Zhu, Michael Jordan, Joseph E Gonzalez, et al. Chatbot arena: An open platform for evaluating llms by human preference. arXiv preprint arXiv:2403.04132, 2024.
+OpenCompass Contributors. Opencompass: A universal evaluation platform for foundation models. https://github.com/open-compass/opencompass, 2023.
+Shangzhe Di and Weidi Xie. Grounded question-answering in long egocentric videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12934-12943, 2024.
+Xinyu Fang, Kangrui Mao, Haodong Duan, Xiangyu Zhao, Yining Li, Dahua Lin, and Kai Chen. Mmbench-video: A long-form multi-shot benchmark for holistic video understanding. arXiv preprint arXiv:2406.14515, 2024.
+
+Miquel Farre, Andi Marafioti, Lewis Tunstall, Leandro Von Werra, and Thomas Wolf. Finevideo. https://huggingface.co/datasets/HuggingFaceFV/finevideo, 2024.
+Jiajun Fei, Dian Li, Zhidong Deng, Zekun Wang, Gang Liu, and Hui Wang. Video-ccam: Enhancing video-language understanding with causal cross-attention masks for short and long videos. arXiv preprint arXiv:2408.14023, 2024.
+Chaoyou Fu, Yuhan Dai, Yondong Luo, Lei Li, Shuhuai Ren, Renrui Zhang, Zihan Wang, Chenyu Zhou, Yunhang Shen, Mengdan Zhang, Peixian Chen, Yanwei Li, Shaohui Lin, Sirui Zhao, Ke Li, Tong Xu, Xiawu Zheng, Enhong Chen, Rongrong Ji, and Xing Sun. Video-mme: The first-ever comprehensive evaluation benchmark of multi-modal llms in video analysis. CoRR, abs/2405.21075, 2024a.
+Chaoyou Fu, Haojia Lin, Zuwei Long, Yunhang Shen, Meng Zhao, Yifan Zhang, Xiong Wang, Di Yin, Long Ma, Xiawu Zheng, Ran He, Rongrong Ji, Yunsheng Wu, Caifeng Shan, and Xing Sun. Vita: Towards open-source interactive omni multimodal llm. arXiv preprint arXiv:2408.05211, 2024b.
+Kristen Grauman, Andrew Westbury, Eugene Byrne, Zachary Chavis, Antonino Furnari, Rohit Girdhar, Jackson Hamburger, Hao Jiang, Miao Liu, Xingyu Liu, et al. Ego4d: Around the world in 3,000 hours of egocentric video. pp. 18995-19012, 2022.
+Mingfei Han, Linjie Yang, Xiaojun Chang, and Heng Wang. Shot2story20k: A new benchmark for comprehensive understanding of multi-shot videos. arXiv preprint arXiv:2312.10300, 2023.
+Bo He, Hengduo Li, Young Kyun Jang, Menglin Jia, Xuefei Cao, Ashish Shah, Abhinav Shrivastava, and Ser-Nam Lim. Ma-lmm: Memory-augmented large multimodal model for long-term video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13504-13514, 2024.
+Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. pp. 961-970, 2015.
+Gabriel Huang, Bo Pang, Zhenhai Zhu, Clara Rivera, and Radu Soricut. Multimodal pretraining for dense video captioning. CoRR, abs/2011.11760, 2020a.
+Yifei Huang, Minjie Cai, Zhenqiang Li, and Yoichi Sato. Predicting gaze in egocentric video by learning task-dependent attention transition. In Proceedings of the European conference on computer vision (ECCV), pp. 754-769, 2018.
+Yifei Huang, Yusuke Sugano, and Yoichi Sato. Improving action segmentation via graph-based temporal reasoning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 14024-14034, 2020b.
+Yifei Huang, Lijin Yang, and Yoichi Sato. Weakly supervised temporal sentence grounding with uncertainty-guided self-training. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 18908-18918, 2023.
+Yifei Huang, Guo Chen, Jilan Xu, Mingfang Zhang, Lijin Yang, Baoqi Pei, Hongjie Zhang, Lu Dong, Yali Wang, Limin Wang, et al. Egoexolearn: A dataset for bridging asynchronous ego-and exo-centric view of procedural activities in real world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22072-22086, 2024.
+Peng Jin, Ryuichi Takanobu, Wancai Zhang, Xiaochun Cao, and Li Yuan. Chat-univi: Unified visual representation empowers large language models with image and video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13700-13710, 2024.
+Xuan Ju, Yiming Gao, Zhaoyang Zhang, Ziyang Yuan, Xintao Wang, Ailing Zeng, Yu Xiong, Qiang Xu, and Ying Shan. Miradata: A large-scale video dataset with long durations and structured captions. arXiv preprint arXiv:2407.06358, 2024.
+Will Kay, João Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, Mustafa Suleyman, and Andrew Zisserman. The kinetics human action video dataset. CoRR, abs/1705.06950, 2017.
+Jie Lei, Licheng Yu, Mohit Bansal, and Tamara L Berg. Tvqa: Localized, compositional video question answering. arXiv preprint arXiv:1809.01696, 2018.
+Jie Lei, Tamara L. Berg, and Mohit Bansal. Detecting moments and highlights in videos via natural language queries. pp. 11846-11858, 2021.
+
+Bo Li, Yuanhan Zhang, Dong Guo, Renrui Zhang, Feng Li, Hao Zhang, Kaichen Zhang, Yanwei Li, Ziwei Liu, and Chunyuan Li. Llava-onevision: Easy visual task transfer. arXiv preprint arXiv:2408.03326, 2024a.
+KunChang Li, Yinan He, Yi Wang, Yizhuo Li, Wenhai Wang, Ping Luo, Yali Wang, Limin Wang, and Yu Qiao. Videochat: Chat-centric video understanding. arXiv preprint arXiv:2305.06355, 2023a.
+Kunchang Li, Yali Wang, Yinan He, Yizhuo Li, Yi Wang, Yi Liu, Zun Wang, Jilan Xu, Guo Chen, Ping Luo, Limin Wang, and Yu Qiao. Mvbench: A comprehensive multi-modal video understanding benchmark. CoRR, abs/2311.17005, 2023b.
+Xinhao Li, Yi Wang, Jiashuo Yu, Xiangyu Zeng, Yuhan Zhu, Haian Huang, Jianfei Gao, Kunchang Li, Yinan He, Chenting Wang, et al. Videochat-flash: Hierarchical compression for long-context video modeling. arXiv preprint arXiv:2501.00574, 2024b.
+Yanwei Li, Chengyao Wang, and Jiaya Jia. Llama-vid: An image is worth 2 tokens in large language models. CoRR, abs/2311.17043, 2023c.
+Zhiqi Li, Guo Chen, Shilong Liu, Shihao Wang, Vibashan VS, Yishen Ji, Shiyi Lan, Hao Zhang, Yilin Zhao, Subhashree Radhakrishnan, et al. Eagle 2: Building post-training data strategies from scratch for frontier vision-language models. arXiv preprint arXiv:2501.14818, 2025.
+Bin Lin, Bin Zhu, Yang Ye, Munan Ning, Peng Jin, and Li Yuan. Video-llava: Learning united visual representation by alignment before projection. arXiv preprint arXiv:2311.10122, 2023.
+Ji Lin, Hongxu Yin, Wei Ping, Pavlo Molchanov, Mohammad Shoeybi, and Song Han. Vila: On pre-training for visual language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 26689-26699, 2024.
+Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning. CoRR, abs/2310.03744, 2023.
+Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. 36, 2024a.
+Jiajun Liu, Yibing Wang, Hanghang Ma, Xiaoping Wu, Xiaqi Ma, Xiaoming Wei, Jianbin Jiao, Enhua Wu, and Jie Hu. Kangaroo: A powerful video-language model supporting long-context video input. arXiv preprint arXiv:2408.15542, 2024b.
+Ruyang Liu, Chen Li, Haoran Tang, Yixiao Ge, Ying Shan, and Ge Li. ST-LLM: large language models are effective temporal learners. CoRR, abs/2404.00308, 2024c.
+Ye Liu, Zongyang Ma, Zhongang Qi, Yang Wu, Ying Shan, and Chang Wen Chen. Et bench: Towards open-ended event-level video-language understanding. arXiv preprint arXiv:2409.18111, 2024d.
+Yuanxin Liu, Shicheng Li, Yi Liu, Yuxiang Wang, Shuhuai Ren, Lei Li, Sishuo Chen, Xu Sun, and Lu Hou. Tempcompass: Do video llms really understand videos? arXiv preprint arXiv:2403.00476, 2024e.
+Zuyan Liu, Yuhao Dong, Ziwei Liu, Winston Hu, Jiwen Lu, and Yongming Rao. Oryx mllm: On-demand spatial-temporal understanding at arbitrary resolution. arXiv preprint arXiv:2409.12961, 2024f.
+Muhammad Maaz, Hanoona Rasheed, Salman Khan, and Fahad Shahbaz Khan. Video-chatgpt: Towards detailed video understanding via large vision and language models. arXiv preprint arXiv:2306.05424, 2023.
+Karttikeya Mangalam, Raiymbek Akshulakov, and Jitendra Malik. Egoschema: A diagnostic benchmark for very long-form video language understanding. Advances in Neural Information Processing Systems, 36, 2024.
+Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto100m: Learning a text-video embedding by watching hundred million narrated video clips. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 2630-2640, 2019.
+Kepan Nan, Rui Xie, Penghao Zhou, Tiehan Fan, Zhenheng Yang, Zhijie Chen, Xiang Li, Jian Yang, and Ying Tai. Openvid-1m: A large-scale high-quality dataset for text-to-video generation. arXiv preprint arXiv:2407.02371, 2024.
+Munan Ning, Bin Zhu, Yujia Xie, Bin Lin, Jiaxi Cui, Lu Yuan, Dongdong Chen, and Li Yuan. Video-bench: A comprehensive benchmark and toolkit for evaluating video-based large language models. arXiv preprint arXiv:2311.16103, 2023.
+
+Andreea-Maria Oncescu, Joao F Henriques, Yang Liu, Andrew Zisserman, and Samuel Albanie. Queryd: A video dataset with high-quality text and audio narrations. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 2265-2269. IEEE, 2021.
+OpenAI. GPT-4 technical report. CoRR, abs/2303.08774, 2023.
+OpenAI. Hello gpt-4o. 2024. URL https://openai.com/index/hello-gpt-4o/.
+Baoqi Pei, Guo Chen, Jilan Xu, Yuping He, Yicheng Liu, Kanghua Pan, Yifei Huang, Yali Wang, Tong Lu, Limin Wang, et al. Egovieo: Exploring egocentric foundation model and downstream adaptation. arXiv preprint arXiv:2406.18070, 2024.
+Ruchit Rawal, Khalid Saifullah, Ronen Basri, David Jacobs, Gowthami Somepalli, and Tom Goldstein. Cinepile: A long video question answering dataset and benchmark. arXiv preprint arXiv:2405.08813, 2024.
+Dian Shao, Yue Zhao, Bo Dai, and Dahua Lin. Finegym: A hierarchical video dataset for fine-grained action understanding. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2616-2625, 2020a.
+Dian Shao, Yue Zhao, Bo Dai, and Dahua Lin. Intra-and inter-action understanding via temporal action parsing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 730-739, 2020b.
+Enxin Song, Wenhao Chai, Guanhong Wang, Yucheng Zhang, Haoyang Zhou, Feiyang Wu, Haozhe Chi, Xun Guo, Tian Ye, Yanting Zhang, et al. Moviechat: From dense token to sparse memory for long video understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18221-18232, 2024.
+Min Sun, Ali Farhadi, and Steve Seitz. Ranking domain-specific highlights by analyzing edited videos. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13, pp. 787-802. Springer, 2014.
+Yuchong Sun, Hongwei Xue, Ruihua Song, Bei Liu, Huan Yang, and Jianlong Fu. Long-form video-language pre-training with multimodal temporal contrastive learning. Advances in neural information processing systems, 35:38032-38045, 2022.
+Yansong Tang, Dajun Ding, Yongming Rao, Yu Zheng, Danyang Zhang, Lili Zhao, Jiwen Lu, and Jie Zhou. Coin: A large-scale dataset for comprehensive instructional video analysis. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1207-1216, 2019.
+Du Tran, Heng Wang, Matt Feiszli, and Lorenzo Torresani. Video classification with channel-separated convolutional networks. pp. 5551-5560, 2019.
+Han Wang, Tan Rui Yang, Usman Naseem, and Roy Ka-Wei Lee. Multihateclip: A multilingual benchmark dataset for hateful video detection on youtube and bilibili. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 7493–7502, 2024a.
+Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaou Tang, and Luc Van Gool. Temporal segment networks for action recognition in videos. 41(11):2740-2755, 2019.
+Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191, 2024b.
+Weihan Wang, Zehai He, Wenyi Hong, Yean Cheng, Xiaohan Zhang, Ji Qi, Shiyu Huang, Bin Xu, Yuxiao Dong, Ming Ding, et al. Lybench: An extreme long video understanding benchmark. arXiv preprint arXiv:2406.08035, 2024c.
+Weiyao Wang, Matt Feiszli, Heng Wang, and Du Tran. Unidentified video objects: A benchmark for dense, open-world segmentation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 10776-10785, 2021.
+Yi Wang, Kunchang Li, Yizhuo Li, Yinan He, Bingkun Huang, Zhiyu Zhao, Hongjie Zhang, Jilan Xu, Yi Liu, Zun Wang, Sen Xing, Guo Chen, Junting Pan, Jiashuo Yu, Yali Wang, Limin Wang, and Yu Qiao. Intern-video: General video foundation models via generative and discriminative learning. CoRR, abs/2212.03191, 2022.
+
+Yi Wang, Yinan He, Yizhuo Li, Kunchang Li, Jiashuo Yu, Xin Ma, Xinhao Li, Guo Chen, Xinyuan Chen, Yaohui Wang, et al. Internvid: A large-scale video-text dataset for multimodal understanding and generation. arXiv preprint arXiv:2307.06942, 2023.
+Yi Wang, Kunchang Li, Xinhao Li, Jiashuo Yu, Yinan He, Guo Chen, Baoqi Pei, Rongkun Zheng, Jilan Xu, Zun Wang, et al. Internvideo2: Scaling video foundation models for multimodal video understanding. arXiv preprint arXiv:2403.15377, 2024d.
+Bo Wu, Shoubin Yu, Zhenfang Chen, Joshua B. Tenenbaum, and Chuang Gan. STAR: A benchmark for situated reasoning in real-world videos. CoRR, abs/2405.09711, 2024a.
+Haoning Wu, Dongxu Li, Bei Chen, and Junnan Li. Longvideobench: A benchmark for long-context interleaved video-language understanding. arXiv preprint arXiv:2407.15754, 2024b.
+Junbin Xiao, Xindi Shang, Angela Yao, and Tat-Seng Chua. Next-qa: Next phase of question-answering to explaining temporal actions. pp. 9777-9786, June 2021.
+Junbin Xiao, Angela Yao, Yicong Li, and Tat-Seng Chua. Can i trust your answer? visually grounded video question answering. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13204-13214, 2024.
+Fuzhao Xue, Yukang Chen, Dacheng Li, Qinghao Hu, Ligeng Zhu, Xiuyu Li, Yunhao Fang, Haotian Tang, Shang Yang, Zhijian Liu, et al. Longvila: Scaling long-context visual language models for long videos. arXiv preprint arXiv:2408.10188, 2024.
+An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. Qwen2 technical report. arXiv preprint arXiv:2407.10671, 2024a.
+Antoine Yang, Arsha Nagrani, Ivan Laptev, Josef Sivic, and Cordelia Schmid. Vidchapters-7m: Video chapters at scale. Advances in Neural Information Processing Systems, 36, 2024b.
+Dongjie Yang, Suyuan Huang, Chengqiang Lu, Xiaodong Han, Haoxin Zhang, Yan Gao, Yao Hu, and Hai Zhao. Vript: A video is worth thousands of words. arXiv preprint arXiv:2406.06040, 2024c.
+Yuan Yao, Tianyu Yu, Ao Zhang, Chongyi Wang, Junbo Cui, Hongji Zhu, Tianchi Cai, Haoyu Li, Weilin Zhao, Zhihui He, et al. Minicpm-v: A gpt-4v level mllm on your phone. arXiv preprint arXiv:2408.01800, 2024.
+Weihao Yu, Zhengyuan Yang, Linjie Li, Jianfeng Wang, Kevin Lin, Zicheng Liu, Xinchao Wang, and Li-juan Wang. Mm-vet: Evaluating large multimodal models for integrated capabilities. arXiv preprint arXiv:2308.02490, 2023.
+Abhay Zala, Jaemin Cho, Satwik Kottur, Xilun Chen, Barlas Oguz, Yashar Mehdad, and Mohit Bansal. Hierarchical video-moment retrieval and step-captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23056-23065, 2023.
+Rowan Zellers, Jiasen Lu, Ximing Lu, Youngjae Yu, Yanpeng Zhao, Mohammadreza Salehi, Aditya Kusupati, Jack Hessel, Ali Farhadi, and Yejin Choi. Merlot reserve: Neural script knowledge through vision and language and sound. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16375-16387, 2022.
+Hang Zhang, Xin Li, and Lidong Bing. Video-llama: An instruction-tuned audio-visual language model for video understanding. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, EMNLP 2023 - System Demonstrations, Singapore, December 6-10, 2023, pp. 543-553. Association for Computational Linguistics, 2023a.
+Hongjie Zhang, Yi Liu, Lu Dong, Yifei Huang, Zhen-Hua Ling, Yali Wang, Limin Wang, and Yu Qiao. Movqa: A benchmark of versatile question-answering for long-form movie understanding. arXiv preprint arXiv:2312.04817, 2023b.
+Peiyuan Zhang, Kaichen Zhang, Bo Li, Guangtao Zeng, Jingkang Yang, Yuanhan Zhang, Ziyue Wang, Hao ran Tan, Chunyuan Li, and Ziwei Liu. Long context transfer from language to vision. arXiv preprint arXiv:2406.16852, 2024a. URL https://arxiv.org/abs/2406.16852.
+Yuanhan Zhang, Bo Li, haotian Liu, Yong jae Lee, Liangke Gui, Di Fu, Jiashi Feng, Ziwei Liu, and Chunyuan Li. Llava-last: A strong zero-shot video understanding model, April 2024b. URL https://llava-v1.github.io/blog/2024-04-30-llava-last-video/.
+Hang Zhao, Antonio Torralba, Lorenzo Torresani, and Zhicheng Yan. HACS: human action clips and segments dataset for recognition and temporal localization. pp. 8667-8677. IEEE, 2019.
+
+Junjie Zhou, Yan Shu, Bo Zhao, Boya Wu, Shitao Xiao, Xi Yang, Yongping Xiong, Bo Zhang, Tiejun Huang, and Zheng Liu. Mlvu: A comprehensive benchmark for multi-task long video understanding. arXiv preprint arXiv:2406.04264, 2024.
+Luowei Zhou, Chenliang Xu, and Jason Corso. Towards automatic learning of procedures from web instructional videos. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
+Dimitri Zhukov, Jean-Baptiste Alayrac, Ramazan Gokberk Cinbis, David Fouhey, Ivan Laptev, and Josef Sivic. Cross-task weakly supervised learning from instructional videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3537-3545, 2019.
+
+# APPENDIX
+
+A: Annotation
+
+- A.1: Quality Control
+A.2: Statistics
+A.3: QA Examples
+
+B: Model Inference and Evaluation
+
+- B.1: Common Prompts
+- B.2: Inference Prompts
+- B.3: Evaluation Prompts
+
+C: Video
+
+- C.1: Video Collection
+- C.2: Video Tags
+C.3: Statistics
+
+D: Additional Experiments
+
+# A ANNOTATION
+
+# A.1 QUALITY CONTROL
+
+During the annotation process, we implement a quality control system as illustrated in Figure 10. We use a batch increment method for data iteration, reviewing each batch of about 1,000 items.
+
+
+Figure 10: Annotation Quality Control Flowchart.
+
+First, a manual review checks for typos and ensures question quality. We focus on two main aspects: clarity and granularity. Questions must have a clear anchor point, such as an event or scene, to avoid confusion. The granularity should be appropriate; overly broad questions provide too many easy clues, which undermines our goal of testing the model's ability to pinpoint clues.
+
+Next, to ensure question difficulty, we conduct tests using LLM, such as GPT4 (OpenAI, 2023) and Qwen2.5 (Yang et al., 2024a), with pure text and small MLLM, like InternVL2-2B (Chen et al., 2024e) and InternVL2-4B, with sparse frames. The pure text test ensures that questions and options don't reveal too much information, allowing models to answer without visual data.
+
+Finally, the second manual review catches other remaining issues, resulting in the final test set.
+
+We provide two examples of filtered samples for "Small Model & Sparse Frame Check" in Figure 11 and Figure 12. For Figure 11, the protagonist is cycling in a first-person view, and the outfit appears throughout the video. For Figure 12, the climbing wall is a prominent target, and the distinctions between the options are very clear, requiring minimal comprehension.
+
+And here is another example of filtered sample for "Pure Text Check":
+
+In the video, according to the content shown in the PPT, the teacher talked about ethylene. So what will be produced after ethylene is oxidized by potassium permanganate?
+
+A.acetone
+B.acetic acid
+C.acetaldehyde
+D. carbon dioxide
+E. carbon monoxide
+
+This QA is essentially a simple chemistry question and therefore did not pass the check.
+
+
+Figure 11: Example 1 of filtered QA by "Small Model & Sparse Frame Check".
+
+
+Figure 12: Example 2 of filtered QA by "Small Model & Sparse Frame Check".
+
+# A.2 STATISTICS
+
+Question Categories and Definition. We list all question categories in Table 7. We also provide a rough definition of each question type:
+
+- Entity Recognition: Identifying entities within the context, focusing on recognizing specific objects or entities present in the scene.
+- Entity Counting: Addressing the quantity of entities, focusing on counting the number of specific objects.
+- Entity Attribute: Exploring the attributes of entities, such as shape, color, material, etc.
+- Entity State: Investigating the state of an object, including its current condition and any changes over time, focusing on the status of the entity and its evolution.
+- Event Recognition: Identifying events within the context, focusing on recognizing specific occurrences or actions taking place in the scene.
+- Event Counting: Counting the occurrences of events, focusing on how many times a particular event takes place within the context.
+- Scene Recognition: Identifying and understanding the scene where an event takes place. Questions may explore details about the setting, such as its characteristics, background elements, or overall atmosphere.
+- Text Recognition:
+- Text Counting: Addressing the number of specific aspects of the text, focusing on the number of certain elements or directions within the text.
+- Time Localization: Identifying the temporal range or specific time points of an event.
+- Time-grounded Question: Exploring questions based on the time points or intervals of specific entities, such as when certain entities appear or events occur.
+- Spatiotemporal-grounded Question: Exploring questions based on both the spatial and temporal aspects of specific entities.
+- Entity 2D Spatial Perception: Inquiring about the 2D spatial position of entities within the video frame, referencing specific areas such as top, bottom, left, right, center, lower-right, lower-left, etc.
+
+Table 7: 3-level Question Categories.
+
+
Level-1
Level-2
Level-3
Example
Perception
Entity Perception
Entity Recognition
Figure 13
Entity Counting
Figure 14
Entity Attribute
Figure 15
Entity State
Figure 16
Event Perception
Event Recognition
Figure 17
Event Counting
Figure 18
Scene Perception
Scene Recognition
Figure 19
Text Perception
Text Recognition
Figure 20
Text Counting
Figure 21
Time Perception
Time Localization
Figure 22
Time-grounded Question
Figure 23
Spatialtemporal-grounded Question
Figure 24
2D Spatial Perception
Entity 2D Spatial Perception
Figure 25
Reasoning
Entity Reasoning
Character Identity Reasoning
Figure 26
Character Emotion Reasoning
Figure 27
Character Intention Reasoning
Figure 28
Character Relationship Reasoning
Figure 29
Entity General Reasoning
Figure 30
Entity Spatial Relationship
Figure 31
Event Reasoning
Event General Reasoning
Figure 32
Event Time Relationship
Figure 33
Event Causal Reasoning
Figure 34
Scene Reasoning
Scene Time Relationship
Figure 35
Text Reasoning
Text General Reasoning
Figure 36
Text Spatial Relationship
Figure 37
Time Reasoning
Time Interval Reasoning
Figure 38
Duration Time Reasoning
Figure 39
Hallucination
Hallucination
Hallucination
Figure 40 41
+
+- Character Identity Reasoning: Inquiring about the identity of a character, focusing on deducing or identifying who a character is within the context.
+- Character Emotion Reasoning: Understanding a character's emotions, focusing on analyzing or interpreting the feelings or emotional state of a character.
+- Character Intention Reasoning: Reasoning about a character's motivations or intentions within the video context, exploring the underlying purpose of actions by analyzing situational details and motivations.
+- Character Relationship Reasoning: Delving into questions regarding the social or interpersonal relationships between characters, focusing on the type of relationship or connection shared based on observed interactions and context.
+- Entity General Reasoning: Examining general relationships between entities, including person-object and object-object interactions, clarifying connections or associations beyond spatial or social relationships.
+- Entity Spatial Relationship: Understanding spatial relationships between objects or entities, focusing on relative positioning to form a mental map of the scene's layout.
+- Event General Reasoning: Answering questions requiring deeper reasoning or cognitive understanding of events, encouraging a comprehensive interpretation of actions, motivations, and consequences.
+- Event Time Relationship: Understanding the temporal sequence of events, focusing on ordering events correctly or identifying a particular event's position within a sequence to grasp the flow of actions in the video.
+- Event Causal Reasoning: Exploring cause-and-effect relationships within events, facilitating an understanding of why an event occurred by linking it to its underlying causes.
+- Scene Time Relationship: Exploring the sequence in which different scenes occur, focusing on chronological order or progression between different backgrounds.
+- Text General Reasoning: Answering questions involving inferential content within text in the video, deducing implied meanings, identifying underlying messages, or drawing conclusions from textual information.
+
+- Text Spatial Relationship: Addressing the positioning of text within the video frame, such as identifying specific locations (top, bottom, left, right, or center) to clarify the visual layout.
+- Time Interval Reasoning: Addressing the time interval between two events, focusing on the time gap or separation between occurrences.
+- Duration Time Reasoning: Exploring the duration of a specific event, inquiring about how long an event lasts or the time span of an action within the context.
+- Hallucination: Evaluating multiple statements related to video content. Unlike single-statement hallucination questions, the multiple hallucination class involves listing statements and judging which ones are correct. It emphasizes attention to detail and careful assessment of options, distinguishing between accurate and subtly altered statements.
+
+# A.3 QA EXAMPLES
+
+We provide an example for each problem category from Figures 13 to 41.
+
+
+Figure 13: An example of QA in CG-Bench for Entity Recognition.
+
+# B MODEL INFERENCE AND EVALUATION
+
+In this section, we list the prompt we use in inference and evaluating existing models.
+
+# B.1 COMMON PROMPTS
+
+Subtitle Prompt (Denoted as $<\mathrm{Sub}>)):$
+
+```txt
+The subtitles of the video are as follows:
+```
+
+# Subtitle Time Prompt
+
+
+Figure 14: An example of QA in CG-Bench for Entity Counting.
+
+
+Figure 15: An example of QA in CG-Bench for Entity Attribute.
+
+
+Figure 16: An example of QA in CG-Bench for Entity State.
+
+
+Figure 17: An example of QA in CG-Bench for Event Recognition.
+
+
+Figure 18: An example of QA in CG-Bench for Event Counting.
+
+
+Figure 19: An example of QA in CG-Bench for Scene Recognition.
+
+
+Figure 20: An example of QA in CG-Bench for Text Recognition.
+
+
+Figure 21: An example of QA in CG-Bench for Text Counting.
+
+
+Figure 22: An example of QA in CG-Bench for Time Localization.
+
+
+
+
+
+
+
+User: What is the video author doing in the interval [00:14:59, 00:15:17]?
+
+A. Watering a plant
+B. Reading a book
+C. Cooking a meal
+D. Playing the guitar
+E. Playing with cat
+
+
+Figure 23: An example of QA in CG-Bench for Time-grounded Question.
+
+
+
+
+
+User: In the video, from 3:12 to 3:18, what is the object in the center of the video?
+
+A. Fruit basket
+B.Meet
+C. Plastic bag
+D. Dining Table
+E. Cats
+
+
+Figure 24: An example of QA in CG-Bench for Spatiotemporal-grounded Question.
+
+
+
+
+
+User: What pattern appeared at the center of the screen at the end of the video?
+
+A. A blue rectangle
+B. A green triangle
+C. A red circle
+D. A blue circle
+E. A red rectangle
+
+
+Figure 25: An example of QA in CG-Bench for Entity 2D Spatial Perception.
+
+
+Figure 26: An example of QA in CG-Bench for Character Identity Reasoning.
+
+
+
+User: At the beginning of the video, in front of the clock tower building, a person dressed in all black squats down to take a photo of someone?
+A. Woman wearing a rabbit headdress and a floral shirt
+B. Woman with long red hair and blue top
+C. Woman with long hair wearing a lolita skirt
+D. Woman with brown hair and black pants
+E. Woman in white dress
+
+
+
+
+
+
+
+User: Why did the protagonist keep laughing after singing "Red Peach Sister Rocks Together"?
+
+A. Because the lipstick stuck to his teeth
+B. Because he forgot the lyrics halfway through the song.
+C. Because her microphone stopped working
+D. Because her voice cracked during a high note
+E. Because she noticed her reflection and found it amusing
+
+
+Figure 27: An example of QA in CG-Bench for Character Emotion Reasoning.
+
+
+
+
+
+User: After the protagonist of the video republished the game, he clicked into the STEAMWORKS platform again. What was he doing?
+
+A. In order to update the game's description
+B. In order to adjust the game's release date
+C. In order to price the game
+D. In order to configure the game's graphics settings
+E. In order to manage the game's download size
+
+
+Figure 28: An example of QA in CG-Bench for Character Intention Reasoning.
+
+
+
+
+
+User: In the video, when the first-person perspective protagonist pulls a small pile of boxes into the store with a car, what is the relationship between the person who appears and the protagonist?
+
+A. They are employer-employee relationship
+B. They are old friends
+C. They are neighbors
+D. They are colleagues
+E. They are strangers
+
+
+Figure 29: An example of QA in CG-Bench for Character Relationship Reasoning.
+
+
+Figure 30: An example of QA in CG-Bench for Entity General Reasoning.
+
+
+
+User: In the video, the protagonist is introducing what can be controlled and remotely controlled in the left armrest of the seat?
+
+A. Seats, Curtains, TV, In-flight entertainment system
+B. Table, Doors, Charging port
+C. Reading light, Safety instructions, Armres
+D. Temperature, Lights
+E. Reclining feature, Storage bin, Table
+
+
+
+
+
+
+
+User: Where is the box of macaroni in the video placed after use?
+
+A. Under the table
+B. In the sink
+C. On the shelf
+D. Next to the microwave
+E. On the counter
+
+
+Figure 31: An example of QA in CG-Bench for Entity Spatial Relationship.
+
+
+
+
+
+User: Which two ties emerged in the first game?
+
+A.3:3,4:4
+B. 6:6, 9:9
+C. 4:4, 6:6
+D. 5:5, 8:8
+E. 5:5, 9:9
+
+
+Figure 32: An example of QA in CG-Bench for Event General Reasoning.
+
+
+
+
+
+User: In the video, what is the third-to-last action that the protagonist performs before
+
+cleaning the first squid?
+
+A. Removing the Hard Squid Mouth
+B. Pulling Out the Internal Organs
+C. Detaching the Squid's Tentacles
+D. Cutting Open the Squid's Head
+E. Removing the Squid Eyes
+
+
+Figure 33: An example of QA in CG-Bench for Event Time Relationship.
+
+
+Figure 34: An example of QA in CG-Bench for Event Causal Reasoning.
+
+
+
+User: Why did the step count of the protagonist in August 2020 decrease in the video?
+
+A. Because the protagonist was injured and needed to rest at home
+B. Because the protagonist joined a new gym and focused on indoor workouts
+C. Because the protagonist decided to dedicate more time to reading books
+D. Because the protagonist quit his job and made YouTube videos at home
+E. Because the protagonist took a vacation and traveled less
+
+
+Figure 35: An example of QA in CG-Bench for Scene Time Relationship.
+
+
+Figure 36: An example of QA in CG-Bench for Text General Reasoning.
+
+
+Figure 37: An example of QA in CG-Bench for Text Spatial Relationship.
+
+
+Figure 38: An example of QA in CG-Bench for Time Interval Reasoning.
+
+
+Figure 39: An example of QA in CG-Bench for Duration Time Reasoning.
+
+
+Figure 40: Example 1 in CG-Bench for Hallucination.
+
+
+Figure 41: Example 2 in CG-Bench for Hallucination.
+
+Frame Time Prompt (Denoted as $<\mathrm{FT}>$ )
+```txt
+ -> [start, end]: (Optional)
+```
+
+Choices Prompt (Denoted as $<$ Choices>)
+```latex
+A total of $<\mathsf{n}>$ frames are uniformly sampled from the video, and their corresponding timestamps are $<\text{frame_time1}>$ , $<\text{frame_time2}>$ , ..., $<\text{frame_time n}>$
+```
+
+```txt
+A. ChoiceA
+B. ChoiceB
+...
+E/H. ChoiceE/ChoiceH (5~8 choices)
+```
+
+# B.2 INFERENCE PROMPTS
+
+Long-Video-MCQ & Clue-based-MCQ
+```txt
+Task description:
+You will watch a video and read a multiple-choice question based on the video content. You need to choose an answer that best matches the video content from five to eight options..
+, , ...,
+ (Optional)
+ (Optional)
+Multiple-choice question:
+
+
+Important: - You must only output the uppercase letter corresponding to the correct answer. - Do not include any additional text, punctuation, or explanations in your response.
+Your output is:
+```
+
+# Blind-MCQ
+
+```txt
+Task description:
+You will be read a multiple-choice question related to a visual task. However, no visual context or information will be given. Please do your best to answer the question based solely on the textual information. Choose the most likely answer from the given options, even if the question appears to require visual input..
+Multiple-choice question:
+
+Important:
+- You must only output the uppercase letter corresponding to the correct answer.
+- Do not include any additional text, punctuation, or explanations in your response.
+```
+
+Your output is:
+
+# Question-Clue Grounding
+
+Task description:
+
+You will watch a video and read a multiple-choice question based on the video content. You need to output each clue interval that can answer this question in a nested list format.
+
+```txt
+, , ...,
+ (Optional)
+ (Optional)
+```
+
+Multiple-choice question:
+
+
+
+
+
+Important:
+
+- The output must strictly follow the format: [[start1, end1], [start2, end2], ...] where start and end are the timestamps in seconds.
+
+- Any output that does not conform to this nested array format will be considered incorrect.
+
+Your output is:
+
+# Open-Ended QA
+
+Task description:
+
+You will watch a video and read a question based on the video content. Please answer this question directly based on the frames sampled from the video.
+
+```txt
+, , ...,
+ (Option)
+ (Option)
+```
+
+Question:
+
+Important:
+
+- You must provide an answer. If explicit clues are lacking, make an inference. Do your best based on the given frames.
+
+- Failure to provide an inferred answer will be considered incorrect.
+
+Your output is:
+
+# B.3 EVALUATION PROMPTS
+
+# Heuristic Evaluation Method for Open-ended QA: Step 1
+
+Task Description:
+
+You are a judge. You will read a question, a model's prediction, and the ground truth answer to this question. You need to judge whether the model's prediction is correct. In most cases, this judgment can be made by determining whether the meaning of the two texts is consistent. That is, if the meaning of the model's prediction is consistent with the meaning of the ground truth answer, the prediction
+
+is considered correct; otherwise, it is considered incorrect. However, there are some special cases among the incorrect ones, where inconsistencies may just focus on different details of the same visual scene and don't have fundamental differences. In this case, the problem cannot be judged only by text, and additional visual information needs to be introduced.
+
+Therefore, I hope you:
+
+Output "yes" if the meaning of the two texts of the model's prediction and the ground truth answer is consistent.
+
+Output "no" if the model's prediction and the ground truth answer are not consistent, and their meanings are fundamentally different.
+
+Output "need visual clue" if the model's prediction and the ground truth answer are not consistent but the model's prediction does not appear to be fundamentally different from the ground truth answer. It is possible that the two focus on different details of the same visual scene. Visual information is needed for further judgment. You are required to give an explanation as to why they might focus on different details.
+
+Question: " The model's prediction is: ""
+
+Important:
+
+- The "model's prediction" has already been made based on visual information. So "need visual clue" means that you need visual information to make the next judgment, not that the model needs it.
+- The "ground truth answer" is annotated by a human, so it is ABSOLUTELY RIGHT.
+
+Therefore, for relatively simple problems such as counting, if the model's prediction is different from the ground truth, just output "no" directly and don't need additional visual information. The only difference between the "ground truth answer" and the "model's prediction" that requires further judgment based on visual information is maybe the different details of the same visual scene they focus on.
+
+Your output is:
+
+# Heuristic Evaluation Method for Open-ended QA: Step 2
+
+Task description:
+
+You are a judge. You will read a question, a model's prediction, and the sampling frames of the clue intervals of this question. You need to determine whether the model answered the question correctly based on the visual information.
+
+I hope you:
+- Output "yes", if the model's prediction answers this question correctly.
+- Output "no", if the model's prediction doesn't answer this question correctly.
+
+Question:
+The model's prediction is:""
+,,...,
+(Option)
+
+Pure Text Evaluation Method for Open-ended QA
+```txt
+ (Option)
+Your output is:
+```
+
+Full Vision-aided Evaluation Method for Open-ended QA: With Ground Truth Answer
+```txt
+Task description:
+You are a judge. You will read a question, a model's prediction and the ground truth answer to this question. You need to determine whether the model answered the question correctly. I hope you: - Output "yes", if the model's prediction answers this question correctly. - Output "no", if the model's prediction doesn't answer this question correctly. Question: The ground truth answer is: "" The model's prediction is: "" Your output is:
+```
+
+Full Vision-aided Evaluation Method for Open-ended QA: Without Ground Truth Answer
+```txt
+Task description:
+You are a judge. You will read a question, a model's prediction, the ground truth answer to this question, and the sampling frames of the clue intervals of this question. You need to judge whether the model has answered the question correctly based on the sampling frames of the clue intervals.
+, , ...,
+ (Option)
+ (Option)
+Question:
+
+The ground truth answer is:"" The model's prediction is:"" Your output is:
+```
+
+```txt
+Task description:
+You are a judge. You will read a question, a model's prediction, and the sampling frames of the clue intervals of this question. You need to judge whether the model has answered the question correctly based on the sampling frames of the clue intervals..
+, , ...,
+ (Option)
+ (Option)
+Question:
+
+The model's prediction is:""
+Your output is:
+```
+
+# C VIDEO
+
+# C.1 VIDEO COLLECTION
+
+Our videos primarily come from Bilibili and YouTube. We initially constructed broad Level-1 and Level-2 video tags and used these tags for manual searches. During this process, we expanded the Level-2 tags and annotated Level-3 tags. In the manual filtering process, we applied the following criteria:
+
+1. Videos must exhibit sufficient dynamism.
+2. For knowledge-related videos, we retained those with some visual dynamism and excluded those that were purely speech-based.
+3. We prioritized selecting the most recently uploaded videos to ensure they are as held-out as possible.
+4. For each Level-3 tag, we retained only 1-2 videos.
+5. We developed a checking program to ensure that the selected video IDs do not overlap with those in major existing video datasets, including COIN (Tang et al., 2019), YouCook2 (Zhou et al., 2018), ActivityNet (Heilbron et al., 2015), HACS (Zhao et al., 2019), CinePile (Rawal et al., 2024), CrossTask (Zhukov et al., 2019), FineGym (Shao et al., 2020a), FineVideo (Farré et al., 2024), HDVILA-100M (Sun et al., 2022), HiREST (Zala et al., 2023), HowTo100M (Miech et al., 2019), InternVid (Wang et al., 2023), Kinetics (Kay et al., 2017), Mira Data (Ju et al., 2024), OpenVid1M (Nan et al., 2024), Panda70M (Chen et al., 2024d), QueryD (Oncescu et al., 2021), QVHighlight (Lei et al., 2021), Shot2Story (Han et al., 2023), Sports1M (Tran et al., 2019), TAPOS (Shao et al., 2020b), UVO (Wang et al., 2021), VALOR (Chen et al., 2023b), VAST (Chen et al., 2023c), VidChapters (Yang et al., 2024b), VITT (Huang et al., 2020a), Vript (Yang et al., 2024c), YouTubeHL (Sun et al., 2014), YT-Temporal-1B (Zellers et al., 2022), MultiHateClip (Wang et al., 2024a), and ChinaOpen (Chen et al., 2023a).
+
+By this means, approximately 20M video IDs were excluded to ensure that our video data are held out to the largest extent.
+
+# C.2VIDEOTAGS
+
+We collected 1219 videos on the two platforms, of which 570 videos were collected on YouTube, accounting for $46.8\%$ ; and 649 videos were collected on Bilibili, accounting for $53.2\%$ . $50.12\%$ of the videos have subtitles. In addition, we assigned a level-2 or level-3 tag to each video, of which there are 171 level-2 tags and 638 level-3 tags. The specific categories and quantities of tag-2 and tag-3 are shown in Tables 8 and 9.
+
+
+Figure 42: Distribution of video root categories, displaying the number of videos within each category.
+
+
+Figure 44: Distribution of video language.
+
+
+Figure 43: Distribution of video resolution.
+
+# C.2.1 TAG-1
+
+The categories and quantities of Tag-1 (root categories) are shown in Figure 42.
+
+# C.2.2 TAG-2
+
+The specific categories and quantities of Tag-2 are shown in Tables 8.
+
+Table 8: Categories and counts of the level-2 video tags.
+
+
Category
#
Category
#
Category
#
Category
#
Category
#
Diverse life
66
Beach
3
Diet
47
Knowledge sharing
3
Variety shows
46
First-person work
40
Forest
3
Traditional sports
41
Board games
3
Travel
34
Extreme sports
28
Pet care
2
Simulation games
37
Russian cuisine
2
Movies/TV dramas
29
Software demonstration
28
Racing games
2
Wildlife
24
MOBA games
2
Social games
25
Festivals
22
Driver's license test
2
Documentary
21
Waterside living
2
Play
24
Coding
22
InDesign
2
Humor/Comedy
20
Designbuilder
2
Learning
21
Working
18
Illustrator
2
Makeup
17
ZBrush
2
Eating
16
Traditional crafts
16
Bus
2
RPG games
15
Digital product reviews
2
Shopping sharing
16
Pets
14
Reality challenge games
2
Public safety
13
Karting
2
Fitness
13
Cooking
12
Excavator
2
Housekeeping services
12
Social news
2
Animation
12
Strategy games
11
Helicopter
2
Renovation
11
Motorcycle
2
Handicraft
10
Funny videos
10
Efficiency tool software
2
Shopping
10
Ruins
2
Underwater
9
Music
9
House tour
2
Architecture
9
Political news
2
Humanities
9
Fashion
9
Insects
2
Dance
8
First-person augmented reality experience
2
Technology
8
Real battlefield/Counter-terrorism
7
Business news
2
School
7
Chemistry
2
Open world games
7
First aid
6
Antarctica
2
Shooting games
7
Debate competition
2
In the cave
7
Medical care
6
Human-animal relationship
2
Art
7
Auction
2
Stage performance
6
Real-time strategy games
6
First-person live-action CS
1
Board games
6
Prison
2
Note-taking software
6
Desert
6
Raccoon
1
Clothing
6
Primates
2
Test drive
5
First-person sports
5
Battlefield
1
Packing
5
Chinese dim sum
1
First-person cooking
5
Aquatic animals
5
Installation
1
Storage
5
Robots
1
Cave
4
Trucks
4
Texas Hold'em
1
Graphic design software
5
Laboratory
1
Train
4
Cars
4
Game: Cities Skylines
1
First-person driving
4
Driver's license
1
Space
4
Knowledge management software
4
Photography
1
Electric vehicles
4
Tea culture
1
Comprehensive
4
Snow
4
Comic convention
1
Sailing
4
Tennis
1
Religion
4
Health and wellness
3
First-person adventure
1
Airplane
4
Motorcycle maintenance
1
Repair
3
Street photography
3
Wild
1
Selection
4
Canyoning
1
Beach
3
Video editing software
3
Cycling
1
Animation and image generation software
4
First-person homework
1
Street interviews
1
Economic news
1
First-person work: Coffee shop
1
Entertainment news
4
Driving
1
Diet and wellness
1
Rescue and disaster relief
1
First-person virtual reality experience
1
Environmental news
4
Sports games
1
Music production software
1
Jade carving
1
First-person work: Burger shop
1
Detective
1
Military news
1
Drawing techniques
1
International news
1
Polar animals
1
First-person games
1
+
+# C.2.3 TAG-3
+
+The specific categories and quantities of Tag-3 are shown in Tables 9.
+
+Table 9: Categories and counts of the level-3 video tags.
+
+
Category
#
Category
#
Category
#
Category
#
Category
#
Eight Cuisines
16
Photography Tips
2
Cat
5
Python
2
TV Series
5
Chinese Pastries
6
Raft Survival
2
Short Film
5
Psychology
2
Merchandise
5
Tea Culture
5
Portal
2
Opera
5
Drama
2
Giant Panda
2
Electric Vehicle
4
MasterChef
2
Pottery
4
Food Exploration
2
Basketball
4
Cleaning Tips
4
Action Film
2
Football
4
MatLab
2
Bullet Journal
4
Sketch
4
The Amazing Race
2
Motorcycle
4
History and Culture: Museum
2
Parenting
3
Grocery Shopping
3
Detective Chinatown
2
Public Service Short Film
3
Space Launch
2
Keep Running
3
Food Delivery
3
Unity
2
Taiwan Travel
3
Prison Documentary
2
Dog
3
Rescue and Disaster Relief
3
Kung Fu
2
Monopoly
3
Golf
2
Tennis
3
Organization Tips
3
Pandemic Response
2
Grading Homework
3
Human-Animal Symbiosis
2
Hide and Seek
3
Extreme Challenge
3
The Great British Bake Off
2
Dou Dizhu
3
The Life We Long For
2
Premiere Pro
3
Comedy
3
Shark
1
SketchUp
3
Puppy
1
Stable Diffusion
3
Meal Prep Tips
3
Dumplings
1
Winemaking
3
Driving Test
1
Turkish Cuisine
3
Photoshop
3
Gua Sha
1
Economy
3
Cardboard
1
Japan
3
Korea Shopping
3
VR
1
Pr
3
Japan Travel
1
Divas Hit the Road
3
Face Painting
2
Gourmet Food
1
Special Effects Makeup
2
Cream Cake
1
Everyday Makeup
2
Campus Life
2
Freediving
1
Graduation
2
Biology/Chemistry Experiments
1
Tap Dance
2
Nursing Procedures
2
Biology Experiment
1
Escape Room
2
Special Forces Training
1
Underwater Exploration
2
Racing
2
Surfing
1
Rock Climbing
2
Horizon
1
Wingsuit Flying
2
Paragliding
2
Foundation Makeup
1
Gymnastics
2
Cake
1
DOTA2
2
Civilization VI
2
Subway
1
Plants vs. Zombies
2
Pop-up Book
1
New Energy Vehicle Test Drive
2
Novice Highway Driving
2
Handmade Soap
1
CSGO
2
Milk Tea Shop
1
GTA5
2
Driver's License
2
Solo Dining
1
Test Drive
2
Cheesecake
1
Night Market Experience
2
Housework
2
Puff Pastry
1
Work Life
2
Annual Comedy Competition
1
Craft Making
2
Music MV
2
Belly Dance
1
Symphony Orchestra
2
Trauma Care
1
Castle
2
Underwater Salvage
2
Pyramid
1
Skiing
2
Eyebrow Drawing
1
Baseball
2
Skating
2
Parrot
1
Counter-Terrorism Action
2
Subway Operations
1
Rhino
2
No Man's Sky
2
Sushi
1
Stardew Valley
2
Nail Art
1
Supermarket Restocking
2
Amusement Park
2
Meal Prep
1
Family Feast
2
Underwater Fishing
1
Procurement
2
Magic
2
Underwater Welding
1
Where Are We Going, Dad?
2
Music Festival
1
Street Dance of China
2
Cave
2
Rabbit
1
Freediving
2
Biology
1
Cosplay Makeup
2
Velvet Flowers
2
Coffee
1
Lantern Festival
2
Medicine
1
Sailing
2
Car
2
Cultural District
1
Truck Driver's Daily Life
2
Healthy Living Habits
1
Restaurant Waiter
2
Mountain Village
2
Baduanjin
1
Trash Picking
2
Elephant
1
Behind the Scenes
2
Latin Dance
2
Lion
1
Medical Equipment Use
2
Meerkat
1
College Entrance Exam
2
F1 Racing
2
Winter Solstice
1
Badminton
2
Mediterranean Diet
1
Long-Distance Running
2
Fitness Plan
2
Makeup Removal
1
Truth or Dare
2
Korean Makeup
1
Leather Craft
2
Hanfu
2
Shoe Making
1
Red Alert 2
2
Freelancer
1
Cooking
2
Shopping
2
Mountain Biking
1
Theme Park
2
Red Panda
1
Librarian
2
Concert
2
Brown Bear
1
Earthquake Drill
2
Wolf
1
Snowmobile
2
Cultural Relics Archaeology
2
Oolong Tea
1
Embroidery
2
Paper Cutting
1
Indian Cuisine
2
Luxury Car Test Drive
2
Collage
1
Heathstone
2
Vanity
1
Vegetarianism
2
Microfilm
2
Mushroom Picking
1
Street Dance
2
Arab Robe
1
Emergency Evacuation
2
Rescue
2
Beading
1
Space Station Life
2
Beachcombing
1
Skateboarding
2
Diving
2
Fishing
1
Truck
2
Duck House
1
Skyline
2
Ocean Park
2
Violin
1
Rehabilitation Training
2
Dungeon
1
Real Battlefield
2
Water Splashing Festival
2
Polar Animals
1
Minecraft
2
Traditional Chinese Medicine
1
Cloud Notes
2
GoodNotes
2
Forza Horizon
1
Market Shopping
2
Delivery Service
1
Antique Market Shopping
2
Volleyball
2
Convenience Store
1
Board Games
2
Board Game: Who Are You
1
Sculpture
2
Bus
2
Board Game: Storytelling
1
Valorant
2
Making Small Books
1
Notion
2
City Walk
2
Eyebrow Shaping
1
Superhero Movies
2
Watch Repair
1
Train
2
Fried Chicken
2
Concealer
1
Zotero
2
Laptop
1
Duty-Free Shopping
2
Waterside Life: Beachcombing
2
Takoyaki
1
CPR
2
Creative Market
1
Free Fighting
2
Temple of Heaven
2
Variety Show
1
National Day
2
Board Game: Redemption Journey
1
Halloween
2
Dragon Boat Festival
2
Tacit Challenge
1
Acupuncture
2
Supermarket Challenge
1
Ancient Greek Temples
2
Go-Karting
2
Elephants - Wild
1
Yacht
2
Airplane
1
World of Warcraft
2
After Effects
2
Digital Product Review
1
Obsidian
2
Theme Park
1
PixelComposer
2
Furniture Assembly
2
Digital Product Review: Smart Home
1
Digital Painting
2
Shopping in Europe
1
Digital Product Review: Tablet
2
Abandoned Buildings
2
Digital Product Review: Ergonomic Chair
1
Fat Loss Training
2
Chocolate Making
1
Ab Workout
2
Hockey
2
DIY Mini House
1
Spring Festival
2
Waterside Life: Fishing
1
Easter
2
Warcraft III
2
Digital Product Review: Smartphone
1
Wasteland Delivery
2
Drawing Techniques
1
Pizzeria
2
High-Altitude Work
2
Braised Pork Rice
1
Farming
2
Fish Pond Construction
1
Shopping in Thailand
2
Museum
2
Italy
1
Flea Market
2
Happy Old Friends
1
Art Gallery
2
Ace vs. Ace
2
Wilderness Survival
1
I Am a Singer
2
Medieval Dynasty
1
Firefighting
2
Military Exercise
2
The Witch
1
Snow Survival
2
Planet Zoo
1
Beach Camping
2
Dumbbell Training
2
Aircraft Loading
1
Bowling
2
Real-life CS
1
Fitness Ball Training
2
Italian Cuisine
2
Car Repair
1
Japanese Cuisine
2
Pet Store Job
1
Elden Ring
2
Water Obstacle Course
2
Ergonomic Chair
1
Markdown
2
Basement
1
Word
2
CapCut
2
Glacier Climbing
1
Ruby
2
Pufferfish
1
VSCode
2
Blender
2
Jade Carving
1
Australian Travel
2
Ancient Greek Philosophy
1
Baking Techniques
2
Wedding
2
Train Driving Simulator
1
Drowning
2
Theory of Relativity
1
Ruins Exploration
2
Archery
2
Used Cars
1
Colosseum
2
Taiwan Shopping
1
Thanksgiving
2
Autonomous Driving Experience
2
AI Painting
1
Excavator
2
Fishing
1
Call of Duty
2
Adobe Acrobat Pro
2
Farm
1
Summer Outfits
2
Daily Life After Returning Home
1
Southeast Asia Travel
2
Camping
2
Home Tour
1
Disney
2
Village School
1
Massage Therapy
2
The Tonight Show Starring Jimmy Fallon
2
Desert
1
Fire Drill
2
Parkour
1
Fire Evacuation
2
Qipao
2
Buddhism
1
French Cuisine
2
Great Wall
1
Helicopter
2
Manor Lord
2
Real-Life Subway Game
1
Fallout Shelter
2
Mixed Noodles
1
Mover
2
PPT
2
Epoxy Resin
1
SQL
2
Knitting
1
Spring Outfits
2
Seafood Buffet
2
Paris
1
Studio
2
Yoga
1
North American Travel
2
Helicopter Skiing
2
Calligraphy
1
Qiki Festival
2
Thriller
1
Spanish Cuisine
2
German Cuisine
2
Real Battlefield/Counter-Terrorism
1
inZOI
2
Chinese Painting
1
Vision Pro
2
Mailing and Packaging
2
Opera
1
Making Hot Dogs
2
Luggage
1
LaTeX
2
Steam
2
Digital Product Review: Electric Toothbrush
1
Family Feud
2
Mythical Fantasy Film
1
Thai Cuisine
2
Christianity
2
Strange House
1
Kingdom of Order
2
Mahjong
1
Plants vs. Zombies Hybrid
2
Sunny and Warm
2
Cat Café
1
Grounded
2
Kimono (Japan)
1
Coffee Shop
2
JS
2
Cleaning
1
Quicker
2
Editing Tips: Movie Commentary Editing
1
Hunting
2
Department Store Shopping
2
Chicago
1
Home Gardening
2
Market Simulator
1
Costume Drama
2
+
+Table 10: Impact of different prompts and modalities on the full test set. Each prompt can be composed of frames (F), frame timestamps (FT), subtitles (S), subtitle timestamps (ST), and audio (A). We conduct the main experiments with GPT4o-0806 (OpenAI, 2024) while studying the audio modality with Gemini-1.5 Pro (Anil et al., 2023).
+
+
model
prompt & modality
clue-acc.
long-acc.
mIoU
Acc@IoU
CRR
OE-acc.
GPT4o
S (128 frames)
-
28.9
-
-
-
-
GPT4o
S (full-video)
-
31.2
-
-
-
-
GPT4o
F
66.0
52.4
3.41
10.2
79.4
35.8
GPT4o
F+FT
65.1(−0.9)
52.2(+0.2)
6.10(+2.69)
20.6(+10.4)
80.2(+0.8)
36.5(+0.7)
GPT4o
F+S
66.1(+0.1)
53.4(+1.2)
3.54(+0.13)
11.0(+0.8)
80.8(+1.4)
37.2(+1.4)
GPT4o
F+S+ST
66.3(+0.2)
52.4(+0.0)
4.63(+1.22)
16.3(+6.1)
78.8(−0.6)
36.8(+1.0)
GPT4o
F+S+FT
66.5(+0.5)
52.2(−0.2)
6.45(+3.04)
21.3(+11.1)
78.5(−0.9)
36.9(+1.1)
GPT4o
F+S+ST+FT
66.5(+0.5)
53.9(+1.5)
8.33(+4.92)
21.7(+11.5)
81.1(+1.9)
37.2(+1.3)
Gemini
F+S+ST+FT
61.0
43.0
7.64
18.7
70.5
18.1
Gemini
F+S+ST+FT+A
61.2(+0.2)
43.1(+0.1)
7.56(−0.08)
18.6(−0.1)
70.5(+0.0)
18.9(+0.8)
+
+
Category
#
Category
#
Category
#
Category
#
Category
#
Robot Wars
2
FamiStudio
1
Movie Trailers
2
Tattoo Covering
1
Snow Mountain Adventure
2
Equestrian
2
Organic Chemistry
1
Desert Off-Roading
2
Street Food
1
Porcelain
2
Yacht Driving
2
Drawing Tips: AI Drawing
1
OBS
2
Switzerland
1
C++
2
Clothing
2
Iceland
1
Dishwashing
2
America's Got Talent
1
Olympics
2
Rugby
2
New Journey to the West
1
Korean Cuisine
2
Sand Sculpture Art
1
7 Days to Die
2
Bartender
2
Rafting
1
Radiomics
2
Battlefield
1
European Travel
2
Livehouse
2
Delivery
1
Hiking
2
Coat
1
Ping Pong
2
Christmas
2
Tea Set
1
Cat and Mouse Game
2
Thailand
1
Frostpunk
2
Black Myth: Wukong
2
Interior Design
1
First-Person Cooking
2
Hengdian
1
PC Building
2
Rainforest Survival
2
Who's the Undercover
1
High-Intensity Interval Training
2
Real-Life Hide and Seek
1
The Sinking Land
2
+
+# C.3 VIDEO STATISTICS
+
+We provide an overview of the dataset's characteristics through two statistical visualizations Figure 43 and Figure 44, which demonstrate the distribution of video resolutions, and languages.
+
+Figure 43 illustrates the distribution of video resolutions. The majority of videos (1,065) have a resolution between 720p and 1080p, while 120 videos are exactly 720p. Only 34 videos have a resolution below 720p.
+
+Figure 44 shows the distribution of video languages using a logarithmic scale. The most frequent languages are Chinese (730 videos) and English (432 videos). Additionally, 38 videos have no speech. Other languages such as German, Korean, and Japanese are also represented but in smaller quantities.
+
+# D ADDITIONAL EXPERIMENTS
+
+We further report the ablation studies of different prompts and modalities on the full test subset in Figure 10.
\ No newline at end of file
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/images.zip b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..0e30b0c257ff8be98035d55bea4bc67917a85691
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e20a1b28175a1b5f833bd4813fc58e959b8a63895a6ff4f98c9e34e1df211f55
+size 2793175
diff --git a/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/layout.json b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..55c71d527d65391554d98b9ca28a9a98600dcd4c
--- /dev/null
+++ b/ICLR/2025/CG-Bench_ Clue-grounded Question Answering Benchmark for Long Video Understanding/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:21b8f92edc3f3c5740fe75a566fab2500add1aa5bc6f739274b72bbb1ef02332
+size 1021107
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_content_list.json b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..d02a1ee722f7c6fb2fffad1cedeb84b6944cd1f2
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:922d1fab3802b26e72832447d3e33e7dcd002e1f6ce37ac2ab03dcf5b70c7efa
+size 161869
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_model.json b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..0a2d16703912a3134ee678807d1182aa9cd55779
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e30e33563a6e94689db92cfdca4d1b1ff172b1b94e1bcfa1d048c789734c0d0a
+size 192414
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_origin.pdf b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ff71bd6b276d86239d941b251d7c3c8fe6211aa1
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/8a2787b6-2984-44a3-b834-9e5f14cd2ba1_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c99f8e90e2817d31f4a168f230f828f7b22396ce60daff7003469c5e575ca749
+size 8949308
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/full.md b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..48205b1e33fca19d4ac9860cfffdf05a827e45dd
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/full.md
@@ -0,0 +1,635 @@
+# CHAMP: CONFORMALIZED 3D HUMAN MULTIHYPOTHESIS POSE ESTIMATORS
+
+Harry Zhang, Luca Carlone
+
+Massachusetts Institute of Technology
+
+Cambridge, MA 02139, USA
+
+{harryz, lcarlone}@mit.edu
+
+# ABSTRACT
+
+We introduce CHAMP, a novel method for learning sequence-to-sequence, multi-hypothesis 3D human poses from 2D keypoints by leveraging a conditional distribution with a diffusion model. To predict a single output 3D pose sequence, we generate and aggregate multiple 3D pose hypotheses. For better aggregation results, we develop a method to score these hypotheses during training, effectively integrating conformal prediction into the learning process. This process results in a differentiable conformal predictor that is trained end-to-end with the 3D pose estimator. Post-training, the learned scoring model is used as the conformity score, and the 3D pose estimator is combined with a conformal predictor to select the most accurate hypotheses for downstream aggregation. Our results indicate that using a simple mean aggregation on the conformal prediction-filtered hypotheses set yields competitive results. When integrated with more sophisticated aggregation techniques, our method achieves state-of-the-art performance across various metrics and datasets while inheriting the probabilistic guarantees of conformal prediction. Interactive 3D visualization, code, and data will be available at this website.
+
+# 1 INTRODUCTION
+
+Learning to estimate 3D human poses from videos is an important task in computer vision and robotics. Typical 3D human pose estimators learn to predict a single 3D human pose from an RGB image, either in an end-to-end manner or by relying on pre-existing 2D keypoint detection methods applied to the RGB images. Recent advances in sequence-to-sequence modeling enable learning 3D human poses in sequence by using RGB videos, which significantly improves the flexibility and efficiency of such estimators (Zhang et al., 2022b;a). While promising, such approaches only focus on single-hypothesis predictions, which is an inherently ill-posed problem when trying to reconstruct a 3D human pose given inputs collected from one viewpoint.
+
+Thus, a more recent line of work focuses on learning multi-hypothesis 3D human pose estimators from 2D inputs. Instead of learning one deterministic target, such methods model the 2D-to-3D pose learning problem as learning a conditional distribution, which describes the distribution of the 3D poses given 2D inputs. This change in problem formulation prompts the use of generative models such as GANs, VAEs, and Diffusion models (Li & Lee, 2020; Sharma et al., 2019; Shan et al., 2023), which can propose multiple hypotheses of 3D poses given a single 2D input. For practical uses, one should also consider aggregating the hypotheses to generate one single output prediction. However, due to the imperfection of the trained generative models, using all hypotheses when aggregating could be inefficient and suboptimal if some are exceedingly inaccurate.
+
+To counter the aforementioned problems, we take inspiration from an important tool in statistical learning, conformal prediction (CP) (Shafer & Vovk, 2008; Angelopoulos & Bates, 2021), which uses a post-training calibration step to guarantee a user-specified coverage: by allowing to predict confidence sets $C(X)$ , CP guarantees the true value $Y$ to be included with confidence level $\alpha$ , i.e. $P(Y \in C(X)) \geq 1 - \alpha$ when the calibration examples $(X_i, Y_i) \in I_{\mathrm{cal}}$ are drawn exchangeably from the test distribution. There are typically two steps involved in the CP process: In the calibration step, the conformity scores on the calibration set are ranked to determine a cut-off threshold $\tau$ for the
+
+predicted values guaranteeing coverage $1 - \alpha$ , usually via quantile computation. In the prediction step, conformity scores, which measure the conformity between the output and possible ground-truth values, are computed to construct the confidence sets $C(X)$ by using the calibrated threshold $\tau$ . CP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 1: CHAMP sample results obtained on in-the-wild videos collected from TikTok. Having observed 2D keypoints, CHAMP proposes multiple hypotheses of the 3D human skeleton poses, and then a conformal predictor trained end-to-end with the pose estimator refines the confidence set by filtering out low-conformity-score hypotheses. This smaller set will be used in downstream aggregation for a single output prediction.
+
+
+
+
+
+
+
+
+
+
+
+is highly flexible as it can be applied to any machine learning model. However, since it is applied post-training, learning the model parameters is not informed about the post-hoc conformalization step: the model is not tuned towards any specific CP objective such as reducing expected confidence set size (inefficiency). To bias the training towards lower inefficiency, ConfTr (Stutz et al., 2021) proposes a fully differentiable CP operation for classification tasks, which is applied end-to-end with the prediction model and optimizes a differentiable inefficiency loss in tandem with the original class loss for the classifier. This operation allows the model to learn parameters to reduce the inefficiency of the confidence set size during conformalization. Inspired by this, we wish to learn a scoring model that scores the "quality" of each hypothesis by measuring its conformity to the ground truth. We can then use this scoring model to simulate CP and optimize for the inefficiency in a differentiable manner, as done in (Stutz et al., 2021). During test time, we propose a large number of hypotheses and do regular CP to filter out the low-score ones before feeding into the downstream aggregation steps. The learned CP procedure can be applied to any multi-hypothesis estimator training process to refine the hypotheses confidence set size during test time for better aggregation results. With this learned CP wrapper, we present CHAMP, a Conformalized 3D HumAn Multi-Hypotheses Pose Estimator. To summarize, the contributions of this work include:
+
+- A novel sequence-to-sequence, multi-hypothesis 3D human pose estimator from 2D keypoints.
+- A novel method to conformalize 3D human pose estimates during training by learning a score function to rank the quality of the proposed hypotheses.
+- A novel method to aggregate the multiple hypotheses from the estimator output using conformalization based on a learned score function.
+- Quantitative and qualitative results that demonstrate the state-of-the-art results of our method on a variety of real-world datasets.
+
+# 2 RELATED WORK
+
+Diffusion Models are a family of generative models that gradually corrupt data by adding noise, and then learn to recover the original data by reversing this process (Sohl-Dickstein et al., 2015; Ho et al., 2020; Song & Ermon, 2020; Song et al., 2020b;a). They have achieved success in generating high-fidelity samples in various applications such as image generation (Ho et al., 2022; Sahara et al., 2022a; Nichol et al., 2021; Batzolis et al., 2021; Rombach et al., 2022; Sahara et al., 2022b), multi-modal learning (Levkovitch et al., 2022; Kim et al., 2022; Huang et al., 2022; Avrahami et al., 2022; Fan et al., 2023) and pose estimations in 3D vision problems (Gong et al., 2023; Wu et al., 2023). We use Diffusion models to learn 3D human poses from 2D keypoints.
+
+3D Human Pose Estimation is an important problem in computer vision and robotics. With deep learning, various end-to-end approaches have been proposed (Tekin et al., 2016; Pavlakos et al., 2017; Sun et al., 2018). However, with the maturity of 2D human keypoints detection, (Ho et al., 2022), more robust approaches focus on uplifting 2D keypoints to 3D, resulting in better performance (Xu & Takano, 2021; Zhao et al., 2019; Ma et al., 2021), where one typically deals with a frame-to-frame problem, or a sequence-to-sequence problem. Being able to predict a 3D keypoints sequence directly from a 2D keypoints sequence is highly desirable as it has higher efficiency and flexibility. In this scheme, deterministic methods learn to predict one single 3D output from the 2D input (Zhan et al., 2022; Zhang et al., 2022b; Zhao et al., 2023). However, with a single viewpoint, such a formulation is ill-posed because there could be many possible 3D poses satisfying the same 2D keypoints configuration. Thus, it is desirable to model the problem as a conditional probability distribution. Deep generative models have shown great potential in modeling such distributions. Specifically, mixed-density network (Li & Lee, 2019), VAE (Sharma et al., 2019), normalizing flows (Wehrbein et al., 2021), GAN (Li & Lee, 2019), and Diffusion models (Holmquist & Wandt, 2023; Shan et al., 2023) have all been applied to modeling such conditional distribution. In our work, we use (Zhang et al., 2022b) as the backbone for generating 3D keypoints sequences from 2D keypoints sequences. To infer multiple hypotheses, we follow the frameworks in (Shan et al., 2023; Gong et al., 2023; Zhou et al., 2023) to learn to recover 3D pose hypotheses from Gaussian noises. Ci et al. (2023) uses an innovative approach to learning probabilistic human poses via gradient flow diffusion. Zhu et al. (2023) proposes a novel framework for scaling up 2D-3D human pose learning. Mehraban et al. (2024) models local dependencies inherent in human pose sequences, outperforming transformers backbones. Xu et al. (2024) proposes multiple hypotheses with Diffusion and learns to score them end-to-end, but it does not consider the inefficiency of the prediction set during training.
+
+Conformal Prediction (CP) is a powerful and flexible distribution-free uncertainty quantification technique that can be applied to any machine learning model (Angelopoulos & Bates, 2021; Shafer & Vovk, 2008). Assuming the exchangeability of the calibration data, CP has desirable coverage guarantees. Thus, it has been applied to many fields such as robotics (Huang et al., 2023; Lindemann et al., 2023), pose estimation (Yang & Pavone, 2023), and image regression (Teneggi et al., 2023; Angelopoulos et al., 2022). More sophisticated CP paradigms have been also proposed to tackle distribution shift and online learning problems (Gibbs & Candès, 2022; Bhatnagar et al., 2023). Since CP is applied post-training, the learned model is not aware of such conformalization during training. To gain better control over the confidence set of CP, learning conformal predictors and nonconformity score end-to-end with the model has been proposed in (Stutz et al., 2021; Fisch et al., 2021; Bai et al., 2022). More closely related to our proposal is the work of (Stutz et al., 2021), but instead of using raw logits as the conformity score for classification, we learn an extra scoring model as the score to rank the hypotheses and simulate CP during training.
+
+# 3 PROBLEM FORMULATION
+
+We are interested in the problem of learning a sequence of 3D human poses from a sequence of 2D human pose keypoints. We assume the 2D keypoints are available to us, which could be detected from the RGB images using well-established methods such as (Li et al., 2022b). Formally, given the input 2D keypoints sequence $\pmb{x} = \{p_n^{2d}|n = 1,\dots ,N\}$ , where $p_n^{2d}\in \mathbb{R}^{J\times 2}$ , our goal is to learn a conditional distribution for the possible corresponding 3D positions of all joints $p_{\theta}(\pmb {y}|\pmb {x})$ , where the sequence $\pmb {y} = \{p_n^{3d}|n = 1,\dots ,N\}$ and $p_n^{3d}\in \mathbb{R}^{J\times 3}$ . Here, $N$ represents the number of input and output frames and $J$ is the number of human joints in each frame. With the learned distribution $p_{\theta}(\pmb {y}|\pmb {x})$ , we are able to do inference and generate hypotheses of 3D poses $H_{\pmb{y}}\in \mathbb{R}^{H\times N\times J\times 3}$ , where $H$ is the number of the hypotheses. We then conformalize the hypotheses to select the higher-quality ones and aggregate the latter in order to obtain a single estimate $\tilde{\pmb{y}}$ as the final output.
+
+# 4 METHODS
+
+We use a Diffusion Model (Ho et al., 2020) to learn the conditional distribution $p_{\theta}(\pmb{y}|\pmb{x})$ due to its capability of modeling complex distributions and producing high-quality samples. With the trained Diffusion Model, we are able to generate many hypotheses sequences and aggregate them to produce a robust single prediction sequence for the final output. To achieve this, we learn an extra scoring model to rank the hypotheses and optimize the size of the hypotheses confidence set, thresholded by
+
+
+Figure 2: CHAMP Overview. CHAMP takes as input a sequence of 2D keypoints detected on a series of input RGB video frames. The 2D keypoints sequence gets fed into a Diffusion Model to produce 3D keypoints hypotheses for the sequence. The output of the Diffusion Model is supervised via a Pose Loss. Then we apply differentiable CP end-to-end during training on the hypotheses sequences, resulting in a smaller confidence set. The confidence set is used to calculate an Inefficiency Loss during training. Note that we show one frame in the sequence and hard assignment for the confidence set during training for better interpretability.
+
+the $90\%$ quantile score, effectively simulating conformal prediction during training, as illustrated in Fig. 2.
+
+# 4.1 LEARNING 3D HUMAN POSES WITH A DIFFUSION MODEL
+
+The use of Diffusion Models in 3D human pose estimation has been shown effective in various previous works (Feng et al., 2023; Gong et al., 2023; Shan et al., 2023; Choi et al., 2023), and we adapt the same paradigm in modeling the forward and the reverse process for the Diffusion Model.
+
+Forward Process. In the forward process, the Diffusion Model takes as input a ground-truth 3D human pose sequence $\mathbf{y}_0\in \mathbb{R}^{N\times J\times 3}$ and a sampled time step $t\sim \mathrm{Unif}(0,T)$ , where $T$ is the maximum number of diffusion steps. Then the forward process gradually diffuses the input by adding independent Gaussian noises $\epsilon \sim \mathcal{N}(0,I)$ at each step. The nice property reported in (Ho et al., 2020) shows that the process can be succinctly written as:
+
+$$
+q \left(\boldsymbol {y} _ {t} \mid \boldsymbol {y} _ {0}\right) = \sqrt {\bar {\alpha} _ {t}} \boldsymbol {y} _ {0} + \sqrt {1 - \bar {\alpha} _ {t}} \boldsymbol {\epsilon} \tag {1}
+$$
+
+where $\bar{\alpha}_t$ is a constant depending on the cosine variance schedule.
+
+Reverse Process. To train such a Diffusion Model, in the reverse process, we denoise the corrupted 3D pose sequence $\pmb{y}_t$ . While the derivation in (Ho et al., 2020) simplifies the ELBO objective to minimizing the distance between the injected noise $\pmb{\epsilon}_t$ and a learned noise $\pmb{\epsilon}_{\theta}(\sqrt{\bar{\alpha}_t}\pmb{y}_0 + \sqrt{1 - \bar{\alpha}_t}\pmb{\epsilon}_t,t)$ , we frame the problem slightly differently, following (Shan et al., 2023). Instead of training a network to learn the injected noise, we train a denoiser model $D_{\theta}$ that outputs the predicted pose $\bar{\pmb{y}}_0$ directly:
+
+$$
+\bar {\mathbf {y}} _ {0} = D _ {\theta} \left(\mathbf {y} _ {t}, \mathbf {x}, t\right) \tag {2}
+$$
+
+where the denoiser model takes as input the corrupted 3D pose sequence, the input 2D keypoints sequence, and the diffusion step to recover the uncorrupted input pose sequence $\bar{y}_0$ . We then supervise the predicted sequence with the ground-truth sequence using the mean per-joint MSE:
+
+$$
+\mathcal {L} _ {\text {p o s e}} = \frac {\left| \left| \boldsymbol {y} _ {0} - \bar {\boldsymbol {y}} _ {0} \right| \right| _ {2} ^ {2}}{N \cdot J} \tag {3}
+$$
+
+Denoiser Model. We build upon the MixSTE model (Zhang et al., 2022b) as the denoiser model in the reverse process of the Diffusion Model. MixSTE uses two separate attention mechanisms, effectively learning spatial and temporal relationships of the keypoints sequence in a modular way by combining several spatial and temporal attention blocks. To condition the MixSTE network on the corrupted 3D keypoints sequence, we change the network input by concatenating 2D keypoints and noisy 3D poses and we add a diffusion timestep embedding after the input embedding in the first attention block. A detailed description of the denoiser model is given in Appendix B and D.
+
+Generating Hypotheses. Using the denoiser model, which models the conditional distribution $p_{\theta}(\pmb{y}|\pmb{x})$ , we are able to generate a number of hypotheses during inference. Following the reverse
+
+process of the Diffusion Model, we obtain the hypotheses set $\mathbf{H}_{\mathbf{y}} = \{\bar{\mathbf{y}}^1,\bar{\mathbf{y}}^2,\dots ,\bar{\mathbf{y}}^H\}$ of size $H$ by sampling standard normal noises $\pmb {y}_T^h\sim \mathcal{N}(0,\pmb {I})\in \mathbf{R}^{N\times J\times 3}$ , where the superscript $h = [1,2,\ldots ,H]$ indexes the hypotheses, and feeding them into the denoiser model $D_{\theta}$ :
+
+$$
+\bar {\boldsymbol {y}} ^ {h} = D _ {\theta} \left(\boldsymbol {y} _ {T} ^ {h}, \boldsymbol {x}, T\right) \tag {4}
+$$
+
+# 4.2 LEARNING CONFORMALIZATION FOR THE HYPOTHESES CONFIDENCE SET
+
+While we are able to generate arbitrarily large numbers of hypotheses during test time with the distribution learned by the Diffusion Model, we still need to aggregate the proposed hypotheses into a single prediction. The correct way to aggregate the hypotheses remains an open problem. Taking a naive average would be suboptimal as the existence of outliers in the proposed hypotheses might skew the average. Other approaches improve the aggregation step by selecting the hypotheses that result in closer distances to 2D keypoints after projection via camera matrices, but still retain a large set of hypotheses before the aggregation step (Shan et al., 2023).
+
+Conformal Prediction. A possible solution is to conformalize the hypotheses using conformal prediction (CP). Conformal prediction produces a set of predictions which covers the ground truth with high probability: given a trained prediction model $f_{\theta}$ , conformal prediction first calibrates a cutoff value $\tau$ by ranking a calibration set $I_{\mathrm{cal}}$ given each component's conformity score $\phi(\mathbf{y}_{\mathrm{cal}})$ and setting the cutoff value as the user-specified $(1 + 1 / |I_{\mathrm{cal}}|) \alpha$ -quantile of the calibration set scores. After the calibration step (conditioned on the trained model), the conformal predictor constructs the conformal prediction set as follows:
+
+$$
+C _ {\theta} (\boldsymbol {x}, \tau) = \left\{\boldsymbol {y}: \phi_ {\theta} (\boldsymbol {y}) \geq \tau \right\} \tag {5}
+$$
+
+With a properly selected conformity score function $\phi$ , as well as a user-specified coverage parameter $\alpha$ , the post-training conformal prediction guarantees the true value's conformity score has a set membership in $C_{\theta}(\pmb{x},\tau)$ with confidence level $\alpha$ , i.e., $P(\pmb{y}_{\mathrm{GT}}\in C_{\theta}(\pmb{x},\tau))\geq \alpha$ . A key metric for a conformal predictor is the size of the confidence set $C_{\theta}(\pmb{x},\tau)$ , or inefficiency: a good confidence set should be large enough to cover the ground truth, and small enough to be informative (low inefficiency). A very large confidence set could cover the ground truth with high probability, but it might not be necessarily useful as it is inefficient to consider a lot of possible values (high inefficiency). Given $H$ hypotheses of 3D human pose sequences, we wish to use the threshold conformal predictor above to refine the hypotheses set, resulting in $H^{\prime}$ "good" hypotheses, where $H^{\prime}\leq H$ . Essentially, we wish to have a low-inefficiency conformal predictor, which selects a smaller number of elite hypotheses from the set for downstream aggregation. CP is intended to be used as a "wrapper" around the prediction model, and we wish to achieve better, fine-grained control over the inefficiency of the CP wrapper for downstream aggregation, conditioned on the input 2D and output 3D human pose sequence data. Thus, inspired by (Stutz et al., 2021), we integrate CP into the training, optimizing for the inefficiency of the confidence set online by simulating CP during training in a differentiable manner.
+
+Learning CP via Inefficiency Optimization. We would like to make the model itself aware of the post-hoc hypotheses aggregation step so that the aggregation step does not get skewed by low-quality hypotheses. Thus, there should be an extra component in the model to shape the hypotheses confidence set. We build on top of the ConfTr paradigm proposed in (Stutz et al., 2021). We first design a conformity score function for poses. Unlike (Yang & Pavone, 2023), where the score function $\phi$ is hand-designed, we wish to learn a conformity score function $\phi_{\theta}$ that measures the distance between the proposed hypothesis and the ground truth. During training, we propose $H_{\mathrm{train}}$ predicted output sequences as the hypotheses for each input 2D keypoints sequence $\pmb{x}$ in the minibatch. To implement the score function, we reuse the input embedding layer of the modified MixSTE and further project the embeddings (conditioned on input 2D keypoints $\pmb{x}$ ) into two scalar values with an extra MLP that predicts a value $\in [0,1]$ representing the probability that the hypothesis embedding belongs to the manifold of plausible 3D human pose embeddings. The conformity score function is implemented as a discriminator-style scoring function that measures the quality of the generated 3D keypoints (Kocabas et al., 2020). Thus, a higher score function output means the hypothesis is more likely (more realistic) to be from ground-truth 3D pose sequence distribution in the embedding space. Formally, the scoring function optimizes the following loss:
+
+$$
+\mathcal {L} _ {S} = \mathbb {E} \left[ \left(S _ {\theta} \left(\Theta_ {\mathrm {G T}}\right) - 1\right) ^ {2} \right] + \mathbb {E} \left[ S _ {\theta} \left(\bar {\Theta} ^ {h}\right) ^ {2} \right], \tag {6}
+$$
+
+where $\Theta_{\mathrm{GT}}$ and $\bar{\Theta}^h$ are the input embeddings of ground-truth 3D poses and generated 3D poses conditioned on the 2D keypoints $x$ , and $S_{\theta}$ is the scoring function MLP. We also add an adversarial loss that will be back-propagated into the denoiser model, as done in Kocabas et al. (2020); Goodfellow et al. (2014), which encourages the 3D pose prediction model to output more realistic samples:
+
+$$
+\mathcal {L} _ {\mathrm {a d v}} = \mathbb {E} \left[ \left(S _ {\theta} \left(\bar {\Theta} ^ {h}\right) - 1\right) ^ {2} \right] \tag {7}
+$$
+
+Lastly, during training, we use the output of $S_{\theta}$ as the conformity score between the hypothesis 3D pose sequence $\bar{\mathbf{y}}^h$ and the ground-truth 3D pose sequence $\mathbf{y}_{\mathrm{GT}}$ :
+
+$$
+\phi_ {\theta} \left(\bar {\boldsymbol {y}} ^ {h}\right) = S _ {\theta} \left(\bar {\Theta} ^ {h}\right). \tag {8}
+$$
+
+With the conformity score model output, we perform differentiable CP on each mini-batch of size $B$ during training. Similar to (Stutz et al., 2021), we split each set of $H_{\mathrm{train}}$ hypotheses of the minibatch in half: the first half, $H_{\mathrm{cal}}$ , is used for calibration, and the second half, $H_{\mathrm{pred}}$ , for prediction and loss computation. On $H_{\mathrm{cal}}$ , we calibrate $\tau$ by computing the $(1 + 1 / |H_{\mathrm{cal}}|)\alpha$ -quantile of the conformity scores in a differentiable manner. On $H_{\mathrm{pred}}$ , we calculate the soft inefficiency score by using the soft assignment of hypothesis $\bar{\mathbf{y}}^h$ being in the prediction set given the quantile threshold $\tau$ :
+
+$$
+\tilde {C} _ {\theta} (\boldsymbol {x}, \tau) := \sigma \left(\frac {\phi_ {\theta} \left(\bar {\boldsymbol {y}} ^ {h}\right) - \tau}{\eta}\right) \tag {9}
+$$
+
+where $\sigma$ here is the sigmoid function and $\eta$ is the temperature hyperparameter. When $\eta \rightarrow 0$ , we recover the hard assignment and $\tilde{C}_{\theta}(\boldsymbol{x},\tau) = 1$ if $\phi_{\theta}(\bar{\boldsymbol{y}}^h)\geq \tau$ and $0$ otherwise1. Thus, we are able to measure the size of the CP set of the hypotheses by $\sum_{h}\tilde{C}_{\theta}(\boldsymbol{x},\tau)$ . On $\pmb{H}_{\mathrm{pred}}$ , we compute $\tilde{C}_{\theta}(\boldsymbol{x},\tau)$ and then calculate the differentiable inefficiency score:
+
+$$
+\Omega (\tilde {C} _ {\theta} (\boldsymbol {x}, \tau)) = \max \left(\sum_ {h = 1} ^ {| H _ {\text {p r e d}} |} \tilde {C} _ {\theta} (\boldsymbol {x}, \tau) - \kappa , 0\right) \tag {10}
+$$
+
+where $\kappa$ is a hyperparameter that avoids penalizing singletons. With the differentiable inefficiency score defined, we are able to optimize the expected prediction set size across batches during training:
+
+$$
+\mathcal {L} _ {\text {s i z e}} = \log \mathbb {E} [ \Omega (\tilde {C} _ {\theta} (\boldsymbol {x}, \tau)) ] \tag {11}
+$$
+
+Combined with the adversarial loss, we have the "inefficiency" loss:
+
+$$
+\mathcal {L} _ {\text {i n e f f}} = \mathcal {L} _ {\text {s i z e}} + \mathcal {L} _ {\text {a d v}}. \tag {12}
+$$
+
+Full Training Objective. The computational graph of this loss involves the denoiser model input embedding, and since every operation is made differentiable by construction, we are able to backpropagate the inefficiency loss into the model, further shaping the model on top of the original pose loss. The final training objective of our model is thus:
+
+$$
+\mathcal {L} = \mathcal {L} _ {\text {p o s e}} + \lambda \mathcal {L} _ {\text {i n e f f}} \tag {13}
+$$
+
+where $\lambda$ is the weight for combined the inefficiency loss.
+
+# 4.3 CONFORMALIZED INFERENCE
+
+During inference, any Conformal Prediction method can be applied to re-calibrate $\tau$ on a held-out calibration set $I_{\mathrm{cal}}$ as usual, i.e., the thresholds $\tau$ obtained during training is not kept during test time. Given a trained pose estimation denoiser model $D_{\theta}$ and the conformity scoring model $\phi_{\theta}$ trained end-to-end with $D_{\theta}$ , for each testing 2D keypoints sequence, $\pmb{x}$ , we wish to construct a hypotheses confidence set for the downstream aggregation as follows:
+
+$$
+C _ {\theta} (\boldsymbol {x}, \tau) = \{\bar {\boldsymbol {y}}: \phi_ {\theta} (\bar {\boldsymbol {y}}) \geq \tau \}. \tag {14}
+$$
+
+To generate candidate hypotheses for the hypotheses confidence set, we sample from the learned distribution $p_{\theta}(\boldsymbol{y}|\boldsymbol{x})$ $H$ times using (4) and refine them using (14), resulting in a smaller hypotheses set of size $H^{\prime}$ . We then aggregate the set $C_{\theta}(\boldsymbol{x},\tau)$ by using a weighted average based on the conformity score output values to obtain a single output for practical use:
+
+$$
+\underline {{\bar {y}}} _ {\text {o u t p u t}} = \frac {\sum_ {\bar {y} \in C _ {\theta} (\boldsymbol {x} , \tau)} \phi_ {\theta} (\bar {\boldsymbol {y}}) \cdot \bar {\boldsymbol {y}}}{\sum_ {\bar {y} \in C _ {\theta} (\boldsymbol {x} , \tau)} \phi_ {\theta} (\bar {\boldsymbol {y}})} \tag {15}
+$$
+
+# 5 EXPERIMENTS
+
+To evaluate our method, we train and test on standard human pose estimation datasets and provide quantitative results. We also provide qualitative results on in-the-wild videos.
+
+Human3.6M (Ionescu et al., 2013) is the standard indoor dataset for 3D human pose estimation. The dataset collects videos from 11 actors engaging in 15 activities and the pose sequence videos are captured by 4 synchronized and calibrated cameras at $50\mathrm{Hz}$ . Similar to (Shan et al., 2023; Zhang et al., 2022b), we train on 5 actors (S1, S5, S6, S7, S8) and evaluate on 2 actors (S9, S11). Quantitatively, following the standard evaluation scheme, we report the mean per joint position error (MPJPE), which is often referred to as Protocol #1, which computes the mean Euclidean distance between estimated and ground truth 3D joint positions in millimeters. We also provide Protocol #2 results in Appendix E.
+
+MPI-INF-3DHP (Mehta et al., 2017) is a more challenging dataset consisting of indoor and outdoor activities, from 14 camera views which cover a greater diversity of poses. The training set contains 8 activities, and the test set contains 6. We preprocess the dataset with the valid frames provided by the authors for testing, following (Zhang et al., 2022b; Shan et al., 2023; Gong et al., 2023). Quantitatively, we report MPJPE, the percentage of correct keypoints (PCK), which describes the percentage of keypoints with Euclidean error less than $150\mathrm{mm}$ , as well as the AUC score for this percentage.
+
+For both of the datasets, in our setting, we hold out $2\%$ of the training dataset for conformal calibration during test time. The held-out calibration set is not seen by the network during training. We compare 4 variations of our method. The backbone (weights) of the variations and the training process remain the same, but the key difference lies in the aggregation step during test time:
+
+- CHAMP-Naive: Trained with inefficiency loss, but for multi-hypothesis scenarios, during test time, we do not refine the hypotheses set with CP, and we use all hypotheses for aggregation. In single-hypothesis scenarios, we only propose 1 hypothesis as the output.
+- CHAMP-Naive-Agg: CHAMP-Naive but aggregated with the J-Agg method from (Shan et al., 2023) instead of taking a simple average.
+- CHAMP: Same backbone as CHAMP-Naive, but only aggregates refined hypotheses confidence set in eq. (14) via weighted mean aggregation.
+- CHAMP-Agg: Instead of taking the average, we use the J-Agg method from (Shan et al., 2023) on the set in eq. (14), which uses known or estimated intrinsic camera parameters to reproduce 3D hypotheses to the 2D camera plane and selecting the joint hypotheses with the minimum reprojection error.
+- CHAMP-Best: We use J-Best method in (Shan et al., 2023) on the set in eq. (14), which selects the joint hypothesis that is closest to the ground truth, and then combines the selected joints into the final 3D pose. This is the upper bound of J-Agg performance.
+
+# 5.1 RESULTS ON HUMAN-3.6M
+
+We discuss the quantitative results on the Human-3.6M dataset. In the single-hypothesis setting, we set $H = 1$ to compare with other deterministic methods. While our method primarily focuses on multi-hypothesis scenarios, we propose 1 hypothesis and use the CHAMP-Naive variation, without using the conformal prediction pipeline. As the results suggest in Table 1, our method achieves performance on par with the current state-of-the-art methods in the single-hypothesis case.
+
+In the multi-hypothesis setting, we set $H = 80$ . CHAMP variants achieve SOTA results, especially when combined with more sophisticated aggregations proposed in D3DP (Shan et al., 2023). On average, without the conformal prediction pipeline, CHAMP-Naive is able to achieve $39.2\mathrm{mm}$ MPJPE error and improves by $2.3\mathrm{mm}$ when using conformal prediction and mean aggregation. Using J-Agg and J-Best, CHAMP gets further improved by $2.1\mathrm{mm}$ and $4.0\mathrm{mm}$ respectively.
+
+# 5.2 RESULTS ON MPI-INF-3DHP
+
+We discuss the results on the MPI-INF-3DHP dataset in Table 2. In the single-hypothesis setting, CHAMP-Naive achieves results on par with other deterministic methods for the three metrics.
+
+
Mean Per-Joint Position Error (Protocol # 1) - mm
AVG.
Dir
Disc.
Eat
Greet
Phone
Photo
Pose
Pur.
Sit
SitD.
Smoke
Wait
WalkD.
Walk
WalkT.
Single Hypothesis
Ray3D (Zhan et al., 2022)
49.7
44.7
48.7
48.7
48.4
51.0
59.9
46.8
46.9
58.7
61.7
50.2
46.4
51.5
38.6
41.8
STE (Li et al., 2022a)
43.6
39.9
43.4
40.0
40.9
46.4
50.6
42.1
39.8
55.8
61.6
44.9
43.3
44.9
29.9
30.3
P-STMO (Shan et al., 2022)
42.8
38.9
42.7
40.4
41.1
45.6
49.7
40.9
39.9
55.5
59.4
44.9
42.2
42.7
29.4
29.4
MixSTE (Zhang et al., 2022b)
41.0
37.9
40.1
37.5
39.4
43.3
50.0
39.8
39.9
52.5
56.6
42.4
40.1
40.5
27.6
27.7
DUE (Zhang et al., 2022a)
40.6
37.9
41.9
36.8
39.5
40.8
49.2
40.1
40.7
47.9
53.5
40.2
41.1
40.3
30.8
28.6
D3DP (Shan et al., 2023)
40.0
37.7
39.9
35.7
38.2
41.9
48.8
39.5
38.3
50.5
53.9
41.6
39.4
39.8
27.4
27.5
CHAMP-Naive (H=1)
39.7
37.8
40.0
35.7
38.1
41.5
48.7
39.2
38.2
50.1
53.3
41.5
38.9
39.7
26.7
27.2
Multiple Hypotheses
MHFormer (Li et al., 2022b)
43.0
39.2
43.1
40.1
40.9
44.9
51.2
40.6
41.3
53.5
60.3
43.7
41.1
43.8
29.8
30.6
GraphMDN (Okarinen et al., 2021)
61.3
51.9
56.1
55.3
58.0
63.5
75.1
53.3
56.5
69.4
92.7
60.1
58.0
65.5
49.8
53.6
DiffuPose (Choi et al., 2023)
49.4
43.4
50.7
45.5
50.2
49.6
53.4
48.6
45.0
56/9
70.7
47.8
48.2
51.3
43.1
43.4
DiffPose (Gong et al., 2023)
36.9
33.2
36.6
33.0
35.6
37.6
45.1
35.7
35.5
46.4
49.9
37.3
35.6
36.5
24.4
24.1
DiffPose (Feng et al., 2023)
43.3
38.1
43.3
35.3
43.1
46.6
48.2
39.0
37.6
51.9
59.3
41.7
47.6
45.5
37.4
36.0
D3DP (Shan et al., 2023)
39.5
37.3
39.5
35.6
37.8
41.4
48.2
39.1
37.6
49.9
52.8
41.2
39.2
39.4
27.2
27.1
CHAMP-Naive
39.2
37.1
39.1
35.1
37.1
41.4
48.1
39.0
36.9
49.4
52.0
40.6
38.9
38.9
27.3
27.1
CHAMP-Naive-Agg
38.7
36.8
38.9
34.4
36.4
41.0
47.2
38.7
36.5
48.8
51.2
40.2
38.4
38.2
27.3
26.5
CHAMP
36.9
36.2
38.4
32.3
33.2
39.1
43.9
36.2
34.5
44.9
48.7
39.1
37.4
37.7
25.3
26.2
CHAMP-Agg
34.8
34.9
36.5
31.1
31.1
37.8
41.3
33.5
32.4
41.8
45.2
37.2
34.9
36.1
24.4
24.1
D3DP-Best* (Shan et al., 2023)
35.4
33.0
34.8
31.7
33.1
37.5
43.7
34.8
33.6
45.7
47.8
37.0
35.0
35.0
24.3
24.1
CHAMP-Best*
32.8
32.9
33.2
28.9
29.6
35.7
41.4
32.3
31.4
39.7
43.9
36.1
32.9
32.8
22.8
22.8
+
+In the multi-hypothesis setting, we again set $H = 80$ . CHAMP-Naive again yields fairly competitive results and when combined with conformal prediction and mean, J-Agg, and J-Best aggregation techniques, the performance continuously gets improved across the three metrics, with the CHAMP-Agg metric being the most competitive one, achieving SOTA results. These results here on this dataset follow the same trend as those on the Human3.6M dataset.
+
+Table 1: MPJPE (↓) results on Human-3.6M dataset. Red: lowest error. Blue: second lowest error. In the single-hypothesis setting, our method runs without CP. In the multi-hypothesis setting, we compare four different variants of CHAMP as discussed in the main text. *Upper-bound performance, uses ground truth.
+
+
PCK↑
AUC↑
MPJPE↓
Single Hypothesis
P-STMO (Shan et al., 2022)
97.9
75.8
32.2
MixSTE (Zhang et al., 2022b)
96.9
75.8
35.4
D3DP (Shan et al., 2023)
97.7
77.8
30.2
CHAMP-Naive
97.9
76.0
30.1
Multiple Hypotheses
MHFormer (Li et al., 2022b)
93.8
63.3
58.0
DiffPose (Gong et al., 2023)
98.0
75.9
29.1
DiffPose (Feng et al., 2023)
94.6
62.8
64.6
D3DP-Agg (Shan et al., 2021)
97.7
78.2
29.7
CHAMP-Naive
97.5
78.1
29.9
CHAMP-Naive-Agg
97.6
78.2
29.6
CHAMP
97.9
78.4
29.1
CHAMP-Agg
98.1
78.7
28.6
D3DP-Best (Shan et al., 2021)
98.0
79.1
28.1
CHAMP-Best
98.2
79.2
28.0
+
+# 5.3 IN-THE-WILD VIDEOS
+
+To show the generalizability of our method to in-the-wild videos, we collect videos from YouTube and Tik
+
+Tok. To construct 2D keypoints input, we use Cascaded Pyramid Network (Chen et al., 2018) fine-tuned on the Human3.6M dataset as the default weights are trained on MSCOCO (Lin et al., 2014), which has a slightly different skeleton structure. We directly apply the CHAMP model trained on the Human3.6M dataset to test on in-the-wild videos. Sample results are shown in Fig. 1, where the input videos are collected from TikTok. Qualitative results suggest that CHAMP is able to filter out outlier hypotheses using the conformity score function trained end-to-end with the pose estimation model. More results are shown in Appendix G. For 3D visualization, please refer to this anonymized website to interact with CHAMP's predictions in 3D.
+
+# 5.4 ABLATION STUDIES WITH HUMAN3.6M DATASET
+
+
+E2E
+
+
+Sep.
+
+
+Fix.
+
+Table 2: Results on the 3DHP dataset.
+
+
E2E
Sep.
Fix.
MPJPE
32.8
35.1
35.3
+
+
+Figure 4: Comparison of conformity scores. Top: filtered hypotheses of two joints using the three scoring functions. Bottom: MPJPE (mm) values.
+
+
+Figure 5: Comparison of #hypotheses in training and inference with 4 variants of CHAMP. Red: Naive, Yellow: CHAMP, Brown: Agg, Green: Best.
+Figure 6: Comparison of $\lambda$ in loss definition $\mathcal{L}$ (Eq. 13) with 4 variants of CHAMP. Red: Naive, Yellow: CHAMP, Brown: Agg, Green: Best.
+
+Choice of the Conformity Function. We compare our proposed end-to-end learned conformity score function with a separately trained conformity score function (Corso et al., 2022), and a hand-designed conformity score function. We compare the average performance across all actions on the Human3.6M dataset. For the separately trained conformity score function, we first only train the pose estimation backbone and generate 100 hypotheses per input sequence over a small subset of the training dataset. We then train the score function to predict if the proposed hypothesis conditioned on the input 2D keypoints results in an MPJPE of less than $25\mathrm{mm}$ and use the ground-truth pose sequence as supervision. For the hand-designed conformity score, we use $\phi_{\mathrm{peak}}$ from (Yang & Pavone, 2023), measuring the maximum MPJPE with respect to the ground truth across output frames. Note $\phi_{\mathrm{peak}}$ measures "nonconformity", so we negate such values to fit our setup. All three variants use the J-Best aggregation method. From Fig. 4, end-to-end (E2E) score function yields the best performance and the two learned variants supersede the hand-designed version. In the two examples shown in Fig. 4, the filtered hypotheses seem to be more concentrated for learned score functions. It's worth noting that all three variants result in competitive performance, demonstrating the importance of CP.
+
+Number of Hypotheses. Another interesting ablation study to conduct is to ablate on the number of hypotheses during training $(H_{\mathrm{train}})$ and inference $(H)$ . We compare the effects of $H_{\mathrm{train}}$ , $H$ in Fig. 5, on the four variants of CHAMP. To compare the effect of $H_{\mathrm{train}}$ , we fix $H = 80$ and train a model for each value of hypotheses proposed during differentiable CP. Similarly, to compare the effect of $H$ , we fix $H_{\mathrm{train}} = 20$ during training and use the same model with different $H$ during inference for CP. Results suggest that a good performance can be achieved with $H_{\mathrm{train}} = 20$ during training, while any number higher than 20 brings marginal improvement and requires more GPU memory. Moreover, $H = 80$ during inference is sufficient for all four variants.
+
+Strength of the Inefficiency Loss. Finally, we ablate on the value of $\lambda$ in the overall training objective $\mathcal{L}$ . This is an important ablation in that we can find suitable strength of the inefficiency loss $\mathcal{L}_{\mathrm{ineff}}$ to make sure it does not conflict $\mathcal{L}_{\mathrm{pose}}$ . Results in Fig. 6 suggest that $\lambda = 0.6$ is the most efficient strength across all values, as smaller $\lambda$ does not train the scoring model sufficiently and higher $\lambda$ conflicts with the pose loss. This corroborates the smaller-scale hyperparameter sweep experiments we conducted before training the models.
+
+Correlation between Conformity Score and Prediction Error. We also investigate if the learned conformity score is correlated with prediction error (MPJPE). To achieve this, we collect 500 random test samples and generate hypotheses as well as the predicted conformity score values. We plot these values in Fig. 7. Experiment data suggest that the predicted conformity score has a Pearson correlation value of -0.41 with the MPJPE value. We further fit an Ordinary Least Squares (OLS) regression line by regressing the predicted score onto the prediction error. The resulting OLS fit achieves an $R^2$ of 0.26, demonstrating that the conformity score has a fairly strong explanatory power to explain the prediction error.
+
+
+Figure 7: Correlation and OLS fit between MPJPE and predicted conformity score.
+
+# Other Uncertainty-Augmented Human Pose Estimation Methods.
+
+We now compare different implementations for uncertainty estimation in human pose estimation. Several prior works have explored uncertainty in 3D human pose/shape reconstruction (Rempe et al., 2021; Dwivedi et al., 2024; Biggs et al., 2020; Zhang et al., 2023; 2024). The cited works all simultaneously recover shape and pose and we only compare with the pose metrics. While the methods all incorporate uncertainty in the pose estimation process, sampling with the (learned) uncertainty remains nontrivial due to the lack of flexibility. Moreover, multiple-hypothesis-based methods from probabilistic generative models (Shan et al., 2023; Gong et al., 2023) significantly
+
+
Baseline
MPJPE (mm)
3DMB (Biggs et al., 2020)
58.2
HuMOR (Rempe et al., 2021)
49.9
POCO (Dwivedi et al., 2024)
47.7
RoHM (Zhang et al., 2024)
41.6
KNOWN (Zhang et al., 2023)
40.5
D3DP Shan et al. (2023)
39.5
DiffPose Gong et al. (2023)
36.9
CHAMP (Ours)
34.8
+
+Table 3: Comparison with other uncertainty design choices.
+
+outperform other models. CHAMP builds on top of this and added an extra layer of uncertainty
+
+learning, which further improves the generative model's performance. We also provide detailed design choice comparisons with the aforementioned methods in the Appendix F.
+
+# 5.5 EXCHANGEABILITY AND CP GUARANTEE
+
+The inherent assumption of CP requires the calibration dataset to be exchangeable, which is weaker than asking them to be independent (Angelopoulos & Bates, 2021). This assumption typically fails when the calibration set is a single video sequence, where the image frames are temporally correlated. We learn a sequence-to-sequence model, where the input and output are long sequences of image frames from different videos, instead of single frames from the same video. This would drastically decrease the temporal correlation across the calibration dataset. Moreover, as shown in (Yang & Pavone, 2023), the video frames tend to be more independent if the videos are taken by multiple evenly spaced cameras, which is the case for our datasets of interest. We also investigate the empirical coverage of our method in Human 3.6M test set in Appendix A. Results suggest that we are able to inherit the coverage guarantee from CP with the learned conformity score even if the dataset is not fully exchangeable.
+
+# 5.6 IMPLEMENTATION AND TRAINING DETAILS
+
+CHAMP's denoiser model uses Adam optimizer with a weight decay parameter of 0.1 and momentum parameters $\beta_{1} = \beta_{2} = 0.99$ . For the training objective in eq. (13), we use $\lambda = 0.6$ . We train the CHAMP model using an NVIDIA V100 GPU, where the training process consumes an amortized GPU memory of 30GB, for 300 epochs with a batch size of 8 and a learning rate of 5e-5 and reduce it on plateau with a factor of 0.5. Following previous work (Zhang et al., 2022b; Shan et al., 2021; 2023), we use input pose sequence of 243 frames ( $N = 243$ ) of Human3.6M universal skeleton format. During training, the number of hypotheses is 20, and #DDIM iterations is set to 1. During inference, they are set to 80 and 10. The maximum number of diffusion steps is $T = 999$ .
+
+# 6 LIMITATIONS
+
+While our method shows a promising improvement over the current 3D human pose estimation methods, it does have several limitations. First, many hypotheses need to be proposed during training to improve the learned conformity score, which consumes a lot more GPU memory. Second, a lot of computation is needed for training the scoring function, making the whole training process fairly slow. Lastly, CHAMP only learns single-human 3D skeleton estimation, without considering human shape estimation.
+
+# 7 CONCLUSION
+
+This work presents CHAMP, a novel method for learning multi-hypotheses 3D human poses with a learned conformal predictor from 2D keypoints. We empirically show that CHAMP achieves competitive results across multiple metrics and datasets, and when combined with more sophisticated downstream aggregation methods, it achieves state-of-the-art performance. Future work includes using more recent CP techniques that relax the exchangeability assumption (Barber et al., 2023), using more efficient sequence-to-sequence models such as Mamba (Gu & Dao, 2023), and scaling the pipeline up to dense human pose-shape joint prediction scenarios (Loper et al., 2023).
+
+# 8 ETHICS STATEMENT
+
+We take ethics very seriously and our research conforms to the ICLR Code of Ethics. Human pose estimation is a well-established research area, and this paper inherits all the impacts of the research area, including potential for dual use of the technology in both civilian and military applications. We believe that the work does not impose a high risk for misuse. Furthermore, the paper does not involve crowdsourcing or research with human subjects.
+
+# 9 REPRODUCIBILITY STATEMENT
+
+Our paper makes use of publicly available open-source datasets, ensuring that the data required for reproducing our results is accessible to all researchers. We have thoroughly documented all aspects of our model's training, including the architecture, hyperparameters, optimizer settings, learning rate schedules, and any other implementation details for achieving the reported results. These details are provided in Section 5 and Appendix C, D of our paper. Additionally, we specify the hardware and software configurations used for our experiments to facilitate replication. We anticipate that it should not be challenging for other researchers to reproduce the results and findings presented in this paper.
+
+# ACKNOWLEDGEMENTS
+
+This work was partially funded by Amazon Robotics under the "Safe Autonomy Leveraging Intelligent Optimization" program, by the ARL DCIST program, and by the ONR RAPID program.
+
+# REFERENCES
+
+Anastasios N Angelopoulos and Stephen Bates. A gentle introduction to conformal prediction and distribution-free uncertainty quantification. arXiv preprint arXiv:2107.07511, 2021.
+Anastasios N Angelopoulos, Amit Pal Kohli, Stephen Bates, Michael Jordan, Jitendra Malik, Thayer Alshaabi, Srigokul Upadhyayula, and Yaniv Romano. Image-to-image regression with distribution-free uncertainty quantification and applications in imaging. In International Conference on Machine Learning, pp. 717-730. PMLR, 2022.
+Omri Avrahami, Dani Lischinski, and Ohad Fried. Blended diffusion for text-driven editing of natural images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18208-18218, 2022.
+Yu Bai, Song Mei, Huan Wang, Yingbo Zhou, and Caiming Xiong. Efficient and differentiable conformal prediction with general function classes. arXiv preprint arXiv:2202.11091, 2022.
+Rina Foygel Barber, Emmanuel J Candes, Aaditya Ramdas, and Ryan J Tibshirani. Conformal prediction beyond exchangeability. The Annals of Statistics, 51(2):816-845, 2023.
+Georgios Batzolis, Jan Stanczuk, Carola-Bibiane Schonlieb, and Christian Etmann. Conditional image generation with score-based diffusion models. arXiv preprint arXiv:2111.13606, 2021.
+Aadyot Bhatnagar, Huan Wang, Caiming Xiong, and Yu Bai. Improved online conformal prediction via strongly adaptive online learning. In International Conference on Machine Learning, pp. 2337-2363. PMLR, 2023.
+Benjamin Biggs, David Novotny, Sebastien Ehrhardt, Hanbyul Joo, Ben Graham, and Andrea Vedaldi. 3d multi-bodies: Fitting sets of plausible 3d human models to ambiguous image data. Advances in neural information processing systems, 33:20496-20507, 2020.
+Yilun Chen, Zhicheng Wang, Yuxiang Peng, Zhiqiang Zhang, Gang Yu, and Jian Sun. Cascaded pyramid network for multi-person pose estimation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7103-7112, 2018.
+Jeongjun Choi, Dongseok Shim, and H Jin Kim. Diffupose: Monocular 3d human pose estimation via denoising diffusion probabilistic model. In 2023 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 3773-3780. IEEE, 2023.
+Hai Ci, Mingdong Wu, Wentao Zhu, Xiaoxuan Ma, Hao Dong, Fangwei Zhong, and Yizhou Wang. Gfpose: Learning 3d human pose prior with gradient fields. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4800-4810, 2023.
+Gabriele Corso, Hannes Stärk, Bowen Jing, Regina Barzilay, and Tommi Jaakkola. Diffdock: Diffusion steps, twists, and turns for molecular docking. arXiv preprint arXiv:2210.01776, 2022.
+
+Sai Kumar Dwivedi, Cordelia Schmid, Hongwei Yi, Michael J Black, and Dimitrios Tzionas. Poco: 3d pose and shape estimation with confidence. In 2024 International Conference on 3D Vision (3DV), pp. 85-95. IEEE, 2024.
+Wan-Cyuan Fan, Yen-Chun Chen, DongDong Chen, Yu Cheng, Lu Yuan, and Yu-Chiang Frank Wang. Frido: Feature pyramid diffusion for complex scene image synthesis. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 579-587, 2023.
+Runyang Feng, Yixing Gao, Tze Ho Elden Tse, Xueqing Ma, and Hyung Jin Chang. Diffpose: Spatiotemporal diffusion model for video-based human pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14861-14872, 2023.
+Adam Fisch, Tal Schuster, Tommi Jaakkola, and Regina Barzilay. Few-shot conformal prediction with auxiliary tasks. In International Conference on Machine Learning, pp. 3329-3339. PMLR, 2021.
+Isaac Gibbs and Emmanuel Candès. Conformal inference for online prediction with arbitrary distribution shifts. arXiv preprint arXiv:2208.08401, 2022.
+Jia Gong, Lin Geng Foo, Zhipeng Fan, Qiuhong Ke, Hossein Rahmani, and Jun Liu. Diffpose: Toward more reliable 3d pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13041-13051, 2023.
+Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
+Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Jonathan Ho, Chitwan Sahara, William Chan, David J Fleet, Mohammad Norouzi, and Tim Salimans. Cascaded diffusion models for high fidelity image generation. Journal of Machine Learning Research, 23(47):1-33, 2022.
+Karl Holmquist and Bastian Wandt. Diffpose: Multi-hypothesis human pose estimation using diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15977-15987, 2023.
+Huang Huang, Satvik Sharma, Antonio Loquercio, Anastasios Angelopoulos, Ken Goldberg, and Jitendra Malik. Conformal policy learning for sensorimotor control under distribution shifts. arXiv preprint arXiv:2311.01457, 2023.
+Rongjie Huang, Zhou Zhao, Huadai Liu, Jinglin Liu, Chenye Cui, and Yi Ren. Prodiff: Progressive fast diffusion model for high-quality text-to-speech. In Proceedings of the 30th ACM International Conference on Multimedia, pp. 2595-2605, 2022.
+Catalin Ionescu, Dragos Papava, Vlad Olaru, and Cristian Sminchisescu. Human3. 6m: Large scale datasets and predictive methods for 3d human sensing in natural environments. IEEE transactions on pattern analysis and machine intelligence, 36(7):1325-1339, 2013.
+Heeseung Kim, Sungwon Kim, and Sungroh Yoon. Guided-tts: A diffusion model for text-to-speech via classifier guidance. In International Conference on Machine Learning, pp. 11119-11133. PMLR, 2022.
+Muhammed Kocabas, Nikos Athanasiou, and Michael J Black. Vibe: Video inference for human body pose and shape estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5253-5263, 2020.
+Alon Levkovitch, Eliya Nachmani, and Lior Wolf. Zero-shot voice conditioning for denoising diffusion models. arXiv preprint arXiv:2206.02246, 2022.
+
+Chen Li and Gim Hee Lee. Generating multiple hypotheses for 3d human pose estimation with mixture density network. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9887-9895, 2019.
+Chen Li and Gim Hee Lee. Weakly supervised generative network for multiple 3d human pose hypotheses. arXiv preprint arXiv:2008.05770, 2020.
+Wenhao Li, Hong Liu, Runwei Ding, Mengyuan Liu, Pichao Wang, and Wenming Yang. Exploiting temporal contexts with strided transformer for 3d human pose estimation. IEEE Transactions on Multimedia, 25:1282-1293, 2022a.
+Wenhao Li, Hong Liu, Hao Tang, Pichao Wang, and Luc Van Gool. Mhformer: Multi-hypothesis transformer for 3d human pose estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13147-13156, 2022b.
+Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. 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.
+Lars Lindemann, Matthew Cleaveland, Gihyun Shim, and George J Pappas. Safe planning in dynamic environments using conformal prediction. IEEE Robotics and Automation Letters, 2023.
+Matthew Loper, Naureen Mahmood, Javier Romero, Gerard Pons-Moll, and Michael J Black. *Smpl: A skinned multi-person linear model*. In *Seminal Graphics Papers: Pushing the Boundaries*, Volume 2, pp. 851-866. 2023.
+Xiaoxuan Ma, Jiajun Su, Chunyu Wang, Hai Ci, and Yizhou Wang. Context modeling in 3d human pose estimation: A unified perspective. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6238-6247, 2021.
+Soroush Mehraban, Vida Adeli, and Babak Taati. Motionagformer: Enhancing 3d human pose estimation with a transformer-gcnformer network. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pp. 6920-6930, 2024.
+Dushyant Mehta, Helge Rhodin, Dan Casas, Pascal Fua, Oleksandr Sotnychenko, Weipeng Xu, and Christian Theobalt. Monocular 3d human pose estimation in the wild using improved cnn supervision. In 2017 international conference on 3D vision (3DV), pp. 506-516. IEEE, 2017.
+Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021.
+Tuomas Oikarinen, Daniel Hannah, and Sohrob Kazerounian. Graphmdn: Leveraging graph structure and deep learning to solve inverse problems. In 2021 International Joint Conference on Neural Networks (IJCNN), pp. 1-9. IEEE, 2021.
+Chuer Pan, Brian Okorn, Harry Zhang, Ben Eisner, and David Held. Tax-pose: Task-specific cross-posed estimation for robot manipulation. In Conference on Robot Learning, pp. 1783-1792. PMLR, 2023.
+Georgios Pavlakos, Xiaowei Zhou, Konstantinos G Derpanis, and Kostas Daniilidis. Coarse-to-fine volumetric prediction for single-image 3d human pose. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7025-7034, 2017.
+Davis Rempe, Tolga Birdal, Aaron Hertzmann, Jimei Yang, Srinath Sridhar, and Leonidas J Guibas. Humor: 3d human motion model for robust pose estimation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 11488-11499, 2021.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684-10695, 2022.
+
+Chitwan Sahara, William Chan, Huiwen Chang, Chris Lee, Jonathan Ho, Tim Salimans, David Fleet, and Mohammad Norouzi. Palette: Image-to-image diffusion models. In ACM SIGGRAPH 2022 conference proceedings, pp. 1-10, 2022a.
+Chitwan Sahara, Jonathan Ho, William Chan, Tim Salimans, David J Fleet, and Mohammad Norouzi. Image super-resolution via iterative refinement. IEEE transactions on pattern analysis and machine intelligence, 45(4):4713-4726, 2022b.
+Glenn Shafer and Vladimir Vovk. A tutorial on conformal prediction. Journal of Machine Learning Research, 9(3), 2008.
+Wenkang Shan, Haopeng Lu, Shanshe Wang, Xinfeng Zhang, and Wen Gao. Improving robustness and accuracy via relative information encoding in 3d human pose estimation. In Proceedings of the 29th ACM International Conference on Multimedia, pp. 3446-3454, 2021.
+Wenkang Shan, Zhenhua Liu, Xinfeng Zhang, Shanshe Wang, Siwei Ma, and Wen Gao. P-stmo: Pre-trained spatial temporal many-to-one model for 3d human pose estimation. In European Conference on Computer Vision, pp. 461-478. Springer, 2022.
+Wenkang Shan, Zhenhua Liu, Xinfeng Zhang, Zhao Wang, Kai Han, Shanshe Wang, Siwei Ma, and Wen Gao. Diffusion-based 3d human pose estimation with multi-hypothesis aggregation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14761-14771, 2023.
+Saurabh Sharma, Pavan Teja Varigonda, Prashast Bindal, Abhishek Sharma, and Arjun Jain. Monocular 3d human pose estimation by generation and ordinal ranking. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 2325-2334, 2019.
+Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International conference on machine learning, pp. 2256-2265. PMLR, 2015.
+Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a.
+Yang Song and Stefano Ermon. Improved techniques for training score-based generative models. Advances in neural information processing systems, 33:12438-12448, 2020.
+Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020b.
+David Stutz, Ali Taylan Cemgil, Arnaud Doucet, et al. Learning optimal conformal classifiers. arXiv preprint arXiv:2110.09192, 2021.
+Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5693-5703, 2019.
+Xiao Sun, Bin Xiao, Fangyin Wei, Shuang Liang, and Yichen Wei. Integral human pose regression. In Proceedings of the European conference on computer vision (ECCV), pp. 529-545, 2018.
+Bugra Tekin, Artem Rozantsev, Vincent Lepetit, and Pascal Fua. Direct prediction of 3d body poses from motion compensated sequences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 991-1000, 2016.
+Jacopo Teneggi, Matthew Tivnan, Web Stayman, and Jeremias Sulam. How to trust your diffusion model: A convex optimization approach to conformal risk control. In International Conference on Machine Learning, pp. 33940-33960. PMLR, 2023.
+Timo Von Marcard, Roberto Henschel, Michael J Black, Bodo Rosenhahn, and Gerard Pons-Moll. Recovering accurate 3d human pose in the wild using imus and a moving camera. In Proceedings of the European conference on computer vision (ECCV), pp. 601-617, 2018.
+
+Tom Wehrbein, Marco Rudolph, Bodo Rosenhahn, and Bastian Wandt. Probabilistic monocular 3d human pose estimation with normalizing flows. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 11199-11208, 2021.
+Yue Wu, Yongzhe Yuan, Xiaolong Fan, Xiaoshui Huang, Maoguo Gong, and Qiguang Miao. Pcrdiffusion: Diffusion probabilistic models for point cloud registration. arXiv preprint arXiv:2312.06063, 2023.
+Tianhan Xu and Wataru Takano. Graph stacked hourglass networks for 3d human pose estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16105-16114, 2021.
+Yuan Xu, Xiaoxuan Ma, Jiajun Su, Wentao Zhu, Yu Qiao, and Yizhou Wang. Scorehypo: Probabilistic human mesh estimation with hypothesis scoring. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 979-989, 2024.
+Cheng-Yen Yang, Jiajia Luo, Lu Xia, Yuyin Sun, Nan Qiao, Ke Zhang, Zhongyu Jiang, Jenq-Neng Hwang, and Cheng-Hao Kuo. Camerapose: Weakly-supervised monocular 3d human pose estimation by leveraging in-the-wild 2d annotations. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 2924-2933, 2023.
+Heng Yang and Marco Pavone. Object pose estimation with statistical guarantees: Conformal keypoint detection and geometric uncertainty propagation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8947-8958, 2023.
+Yu Zhan, Fenghai Li, Renliang Weng, and Wongun Choi. Ray3d: ray-based 3d human pose estimation for monocular absolute 3d localization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13116-13125, 2022.
+Jinlu Zhang, Yujin Chen, and Zhigang Tu. Uncertainty-aware 3d human pose estimation from monocular video. In Proceedings of the 30th ACM International Conference on Multimedia, pp. 5102-5113, 2022a.
+Jinlu Zhang, Zhigang Tu, Jianyu Yang, Yujin Chen, and Junsong Yuan. Mixste: Seq2seq mixed spatio-temporal encoder for 3d human pose estimation in video. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 13232-13242, 2022b.
+Siwei Zhang, Bharat Lal Bhatnagar, Yuanlu Xu, Alexander Winkler, Petr Kadlecek, Siyu Tang, and Federica Bogo. Rohm: Robust human motion reconstruction via diffusion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14606-14617, 2024.
+Yufei Zhang, Hanjing Wang, Jeffrey O Kephart, and Qiang Ji. Body knowledge and uncertainty modeling for monocular 3d human body reconstruction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9020-9032, 2023.
+Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris N Metaxas. Semantic graph convolutional networks for 3d human pose regression. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 3425-3435, 2019.
+Qitao Zhao, Ce Zheng, Mengyuan Liu, Pichao Wang, and Chen Chen. Poseformerv2: Exploring frequency domain for efficient and robust 3d human pose estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 8877-8886, 2023.
+Ce Zheng, Sijie Zhu, Matias Mendieta, Taojiannan Yang, Chen Chen, and Zhengming Ding. 3d human pose estimation with spatial and temporal transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 11656-11665, 2021.
+Jieming Zhou, Tong Zhang, Zeeshan Hayden, Lars Petersson, and Mehrtash Harandi. Diff3dhpe: A diffusion model for 3d human pose estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2092-2102, 2023.
+Wentao Zhu, Xiaoxuan Ma, Zhaoyang Liu, Libin Liu, Wayne Wu, and Yizhou Wang. Motionbert: A unified perspective on learning human motion representations. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15085-15099, 2023.
+
+# A COVERAGE GUARANTEE AND EMPIRICAL COVERAGE
+
+Please refer to the standard proof shown in (Angelopoulos & Bates, 2021; Shafer & Vovk, 2008) for the coverage guarantees of conformal prediction.
+
+To evaluate the empirical coverage of CHAMP, we calculate the mean coverage percentage across test data. Specifically, we use eq. (14) to check if the ground truth belongs in the confidence set formed by the conformity function on the test data:
+
+$$
+\begin{array}{l} \bar {\mathcal {C}} = \frac {1}{| I _ {\text {t e s t}} |} \sum_ {\boldsymbol {y} _ {\mathrm {G T}} \sim I _ {\text {t e s t}}} \mathbb {1} \left(\boldsymbol {y} _ {\mathrm {G T}} \in C _ {\theta} (\boldsymbol {x}, \tau)\right) \\ = \frac {1}{\left| I _ {\text {t e s t}} \right|} \sum_ {\boldsymbol {y} _ {\mathrm {G T}} \sim I _ {\text {t e s t}}} \mathbb {1} \left(\phi_ {\theta} (\boldsymbol {y} _ {\mathrm {G T}}) \geq \tau\right) \\ \end{array}
+$$
+
+We compare the three choices of conformity scores for the empirical coverage calculation. We use the test set from Human 3.6M and calculate the empirical coverage values across all activities. During training and testing, we keep $\alpha = 0.1$ for CP. From Fig. 8, we see the empirical coverage is
+
+
+Figure 8: Empirical coverage comparison across three different conformity functions. We keep the best $\lambda = 0.6$ for comparison.
+
+around $90\% \pm 5\%$ for all activities, which remains close to $1 - \alpha$ , and in some cases, it exceeds this value. This is encouraging given the exchangeability assumption is not fully satisfied in our dataset.
+
+# B DENOISER IN TRAINING VS INFERENCE
+
+We first revisit DDIM (Song & Ermon, 2020). We start with the reverse process derivation and rewrite $q(\pmb{y}_{t-1} | \pmb{y}_t, \pmb{y}_0)$ to be parameterized by a desired standard deviation $\sigma_t$ :
+
+$$
+\begin{array}{l} \boldsymbol {y} _ {t - 1} = \sqrt {\alpha_ {t - 1}} \boldsymbol {y} _ {0} + \sqrt {1 - \alpha_ {t - 1}} \boldsymbol {\epsilon} _ {t - 1} \\ = \sqrt {\alpha_ {t - 1}} \boldsymbol {y} _ {0} + \sqrt {1 - \alpha_ {t - 1} - \sigma_ {t} ^ {2}} \boldsymbol {\epsilon} _ {t - 1} + \sigma_ {t} \boldsymbol {\epsilon} \\ = \sqrt {\alpha_ {t - 1}} \left(\boldsymbol {y} _ {t} - \sqrt {1 - \alpha_ {t}} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t})\right) + \sqrt {1 - \alpha_ {t - 1} - \sigma_ {t} ^ {2}} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t}) + \sigma_ {t} \boldsymbol {\epsilon} \\ = \sqrt {\alpha_ {t - 1}} \left(\boldsymbol {y} _ {t} - \sqrt {1 - \alpha_ {t}} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t})\right) + \sqrt {1 - \alpha_ {t - 1} - \sigma_ {t} ^ {2}} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t}) + \sigma_ {t} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t}). \\ \end{array}
+$$
+
+where the model $\pmb{\epsilon}_{\theta}^{(t)}(\cdot)$ predicts the $\pmb{\epsilon}_t$ from $\pmb{y}_t$ . Since $q(\pmb{y}_{t-1}|\pmb{y}_t, \pmb{y}_0) = \mathcal{N}(\pmb{y}_{t-1}; \mu(\pmb{y}_t, \pmb{y}_0), \beta_t\mathbf{I})$ , therefore we have:
+
+$$
+\tilde {\beta} _ {t} = \sigma_ {t} ^ {2} = \frac {1 - \bar {\alpha} _ {t - 1}}{1 - \bar {\alpha} _ {t}} \beta_ {t}
+$$
+
+Let $\sigma_t^2 = \eta \cdot \beta_t$ where $\eta$ is a hyperparameter that controls the sampling stochasticity. During generation, we don't have to follow the whole chain $t = 1,\dots,T$ , but only a subset of steps. Denote $t' < t$ as two steps in this accelerated trajectory. The DDIM update step is defined as follows:
+
+$$
+q _ {t ^ {\prime}, \theta} (\boldsymbol {y} _ {t ^ {\prime}} | \boldsymbol {y} _ {t}, \boldsymbol {y} _ {0}) = \mathcal {N} \left(\boldsymbol {x} _ {t ^ {\prime}}; \sqrt {\alpha_ {t ^ {\prime}}} \left(\boldsymbol {y} _ {t} - \sqrt {1 - \alpha_ {t}} \boldsymbol {\epsilon} _ {\theta} ^ {(t)} (\boldsymbol {y} _ {t})\right), \sigma_ {t} ^ {2} \mathbf {I}\right)
+$$
+
+Following D3DP (Shan et al., 2023), the denoiser model $D_{\theta}$ uses DDIM to sample denoised poses from the corrupted ones. During training, we run DDIM for only 1 step for the sake of efficiency:
+
+$$
+\bar {\boldsymbol {y}} ^ {h} = D _ {\theta} (\boldsymbol {y} _ {T} ^ {h}, \boldsymbol {x}, T), \boldsymbol {y} _ {T} ^ {h} \sim \mathcal {N} (0, \mathbf {I}) \quad \forall h = \{1, \dots , H \}
+$$
+
+During inference, we run DDIM for $K = 10$ times, and each step is defined as:
+
+$$
+\begin{array}{l} t = T \cdot (1 - k / K), t ^ {\prime} = T \cdot (1 - (k + 1) / K)), k = \{0, \dots , K - 1 \} \\ \bar {\boldsymbol {y}} ^ {h} = D _ {\theta} \left(\bar {\boldsymbol {y}} _ {t} ^ {h}, \boldsymbol {x}, t\right), \quad \forall h = \{1, \dots , H \} \\ \bar {\boldsymbol {y}} _ {t ^ {\prime}} ^ {h} = \sqrt {\overline {{\alpha}} _ {t ^ {\prime}}} \cdot \bar {\boldsymbol {y}} ^ {h} + \sqrt {1 - \overline {{\alpha}} _ {t ^ {\prime}} - \sigma_ {t} ^ {2}} \cdot \boldsymbol {\epsilon} _ {t} + \sigma_ {t} \boldsymbol {\epsilon} \\ t \gets t ^ {\prime} \\ \end{array}
+$$
+
+# C TRAINING-CALIBRATION-TESTING DATA SPLIT
+
+We discuss the split of training, calibration, and testing data. We first split the testing data the same way as (Zhang et al., 2022b; Shan et al., 2023; Gong et al., 2023) to ensure the fairness of results. We then further split the training set into the actual training dataset and a calibration dataset before inference. Specifically, we split the training dataset by uniformly sampling a $2\%$ subset as the calibration dataset, and CHAMP is only trained on the remaining $98\%$ . Note here that this $2\%$ calibration dataset is not seen during training by any means. During training, we split each minibatch evenly into $B_{\mathrm{pred}}$ and $B_{\mathrm{cal}}$ .
+
+# D ARCHITECTURE DETAILS
+
+We provide a more detailed version of Fig. 2. We illustrate the detailed architecture of the denoiser model $D_{\theta}$ as well as the conformity scoring model $s_{\theta}$ in Fig. 9. MixSTE (Zhang et al., 2022b) is used as the backbone of the denoiser. MixSTE combines 16 alternative spatial and temporal attention blocks. In the implementation, the channel size is set to 512. Similar to (Shan et al., 2023; Gong et al., 2023), we concatenate 2D keypoints and noisy 3D poses as inputs and add a diffusion timestep embedding after the input embedding using a sinusoidal function. For the conformity scoring model, we concatenate 2D keypoints and predicted hypotheses 3D poses as inputs, reuse the input embedding layer, and use an extra MLP to project the input embeddings into a score in the range [0, 1]. In training, CP is made differentiable by using soft ranking and soft assignment, resulting in a differentiable inefficiency loss $\mathcal{L}_{\mathrm{ineff}}$ . This loss is combined with the pose loss $\mathcal{L}_{\mathrm{pose}}$ when backpropagating into the network. During inference (light cyan shaded area), we refine the hypotheses confidence set with regular CP on a held-out calibration set, resulting in $H' < H$ hypotheses. We then aggregate the refined set, resulting in a single final prediction.
+
+# E PROCUSTES-MPJPE PERFORMANCE
+
+The Procrustes MPJPE (P-MPJPE) metric, which is often referred to as Protocol #2, computes MPJPE after the estimated poses align to the ground truth using a rigid transformation. It is another
+
+
+Figure 9: Detailed architecture of $D_{\theta}$ and $S_{\theta}$ , the denoiser and conformity score models during training and inference. During training, the construction of refined hypotheses set after differentiable CP is done via soft assignment. During inference, regular CP is used with the trained conformity score function.
+
+standard metric for measuring a 3D pose estimator's performance (Pan et al., 2023). We report the performance of the four variants of CHAMP against other baselines on the Human3.6M dataset in Table 4. Quantitative results suggest our method achieves SOTA performance on this metric as well.
+
+
Procrustes Per-Joint Position Error (Protocol # 2) - mm
AVG.
Dir
Disc.
Eat
Greet
Phone
Photo
Pose
Pur.
Sit
SitD.
Smoke
Wait
WalkD.
Walk
WalkT.
Single Hypothesis
STE Li et al. (2022a)
35.2
32.7
35.5
32.5
35.4
35.9
41.6
33.0
31.9
45.1
50.1
36.4
33.5
35.1
23.9
25.0
P-STMO Shan et al. (2022)
34.4
31.3
35.2
32.9
33.9
35.4
39.3
32.5
31.5
44.6
48.2
36.3
32.9
34.4
23.8
23.9
MixSTE Zhang et al. (2022b)
32.6
30.8
33.1
30.3
31.8
33.1
39.1
31.1
30.5
42.5
44.5
34.0
30.8
32.7
22.1
22.9
DUE Zhang et al. (2022a)
32.5
30.3
34.6
29.6
31.7
31.6
38.9
31.8
31.9
39.2
42.8
32.1
32.6
31.4
25.1
23.8
D3DP Shan et al. (2023)
31.7
30.6
32.5
29.1
31.0
31.9
37.6
30.3
29.4
40.6
43.6
33.3
30.5
31.4
21.5
22.4
CHAMP-Naive
31.0
30.7
32.0
29.1
30.6
31.1
35.8
29.1
28.4
39.7
41.4
33.0
30.1
31.3
20.8
22.3
Multiple Hypotheses
MHFormer Li et al. (2022b)
34.4
34.9
32.8
33.6
35.3
39.6
32.0
32.2
43.5
48.7
36.4
32.6
34.3
23.9
25.1
34.4
GraphMDN Oikarinen et al. (2021)
46.9
39.7
43.4
44.0
46.2
48.8
54.5
39.4
41.1
55.0
69.0
49.0
43.7
49.6
38.4
42.4
DiffuPose Choi et al. (2023)
39.9
35.9
40.3
36.7
41.4
39.8
43.4
37.1
35.5
46.2
59.7
39.9
38.0
41.9
32.9
34.2
DiffPose Gong et al. (2023)
28.7
26.3
29.0
26.1
27.8
28.4
34.6
26.9
26.5
36.8
39.2
29.4
26.8
28.4
18.6
19.2
DiffPose Feng et al. (2023)
32.0
28.1
31.5
28.0
30.8
33.6
35.3
28.5
27.6
40.8
44.6
31.8
32.1
32.6
28.1
26.8
D3DP-Agg Shan et al. (2023)
31.6
30.6
32.4
29.2
30.9
31.9
37.4
30.2
29.3
40.4
43.2
33.2
30.4
31.3
21.5
22.3
CHAMP-Naive
31.2
30.4
32.9
30.4
31.0
32.0
37.1
28.6
28.1
40.2
42.4
33.9
30.1
30.1
21.2
22.1
CHAMP
28.7
26.8
29.4
26.7
28.8
29.1
36.1
25.8
24.9
37.5
39.7
30.9
29.1
27.6
19.0
20.0
CHAMP-Agg
27.9
26.1
28.7
25.6
28.1
28.2
35.1
25.3
24.4
37.1
38.4
30.1
28.8
25.9
18.2
19.4
D3DP-Best* Shan et al. (2023)
28.7
27.5
29.4
26.6
27.7
29.2
34.3
27.5
26.2
37.3
39.0
30.3
27.7
28.2
19.6
20.3
CHAMP-Best*
27.1
25.9
28.1
25.2
27.3
28.1
34.4
24.7
23.1
35.2
37.9
28.9
27.4
23.9
18.1
19.3
+
+Table 4: P-MPJPE (↓) results on Human-3.6M dataset. *Upper-bound performance, needs ground truth.
+
+# F COMPARISON TO OTHER UNCERTAINTY DESIGN CHOICES
+
+We now discuss different design choices for uncertainty estimation in human pose estimation. Several prior works have explored uncertainty in 3D human pose/shape reconstruction (Rempe et al., 2021; Dwivedi et al., 2024; Biggs et al., 2020; Zhang et al., 2023; 2024). While methods such as (Dwivedi et al., 2024) also learn an explicit confidence value for occlusion, using the confidence to sample good poses is non-trivial. Moreover, motion-based methods such as (Zhang et al., 2024; Rempe et al., 2021) use physical contacts and trajectory consistency to make the uncertain estimates more robust, which does not explicitly model the "quality" of the samples. Zhang et al. (2023) use explicit anatomy constraints and also shows that uncertainty modeling can indeed improve model performance. Lastly, Biggs et al. (2020) generates a fixed number of hypotheses and learns to choose the best ones, which is similar in flavor to CHAMP but lacks the probabilistic flexibility and the coverage guarantee from CP. While all aforementioned works are valid design choices for uncertainty in human pose learning, CHAMP lends itself particularly well to probabilistic pose estimation meth
+
+
+Figure 10: Results of running CHAMP on in-the-wild videos collected from TikTok and YouTube.
+
+ods, which can then be augmented with an explicit uncertainty modeling function learned in tandem with the pose estimation model.
+
+# G MORE QUALITATIVE RESULTS ON IN-THE-WILD VIDEOS
+
+We showcase the performance of CHAMP on more in-the-wild videos in this section. We collect various YouTube and TikTok videos and detect 2D keypoints with Cascaded Pyramid Network. Note that the official weights provided by CPN are trained in COCO format, so we used a fine-tuned version of the weights for Human3.6M universal skeleton format. With such 2D keypoints, we are able to directly use the model trained on Human3.6M dataset and apply it to real-world videos without any fine-tuning. In Fig. 10, for each row, we show two examples. For every three images,
+
+the leftmost image is the RGB observation, and the middle image is all the hypotheses proposed by CHAMP's pose estimation backbone, and the rightmost image is the hypotheses set refined by the learned conformal predictor.
+
+# H LEARNED CP IN CHAMP
+
+We provide more demonstrations of the learned conformal predictor in CHAMP. Specifically, in Fig. 11, we provide more examples of predicted hypotheses before and after the conformal predictor powered by the learned score function.
+
+
+
+
+
+
+
+
+Before CP
+
+
+
+
+
+
+
+
+After CP
+Figure 11: Examples of CP in CHAMP filtering out bad hypotheses during inference. Qualitatively, the learned score function filters out outlier predictions.
+
+# I CONFORMITY SCORE VISUALIZATION
+
+We also show some qualitative visualization of the learned conformity score. We use heatmap to color-code different hypotheses.
+
+
+Figure 12: Failure case and the predicted conformity score. While we do see that hypotheses further away from the ground truth get lower weight, most of the hypotheses here are off, significantly skewing the final output. Moreover, we see that the variance of the estimate of the most incorrect joint (i.e. the right elbow) does appear a lot higher than others, looking more spread out. This shows that higher uncertainty tends to be associated with higher error.
+
+
+
+
+
+
+Figure 13: Learned conformity score prediction on 3DPW data. We see that in both cases, the conformity score is higher in the more concentrated areas and vice versa.
+
+
+
+
+
+
+
+
+
+# J SINGLE-FRAME VARIATION
+
+When demonstrating the effectiveness of the proposed method, one problem is that the ambiguity in video 3D pose estimation where temporal information is abundant is not as significant as in the single-frame case. Thus, we are interested in if the proposed CP pipeline could be beneficial for single-frame image-based 3D pose estimation. Note that this requires minimal change to our method pipeline as we can adjust the number of frames $(N)$ to 1 from 243. We thus train our method as well as the baseline methods with $N = 1$ and test on the same dataset.
+
+
Single Frame (N=1) Mean Per-Joint Position Error (Protocol # 1) - mm
AVG.
Dir
Disc.
Eat
Greet
Phone
Photo
Pose
Pur.
Sit
SitD.
Smoke
Wait
WalkD.
Walk
WalkT.
DiffPose (Gong et al., 2023)
40.5
37.5
39.2
40.1
40.7
40.1
48.2
39.0
35.5
53.1
55.1
41.1
39.6
39.7
28.7
28.9
D3DP (Shan et al., 2023)
42.1
40.1
41.2
41.1
42.1
44.3
50.2
41.8
39.4
51.2
56.7
43.2
40.4
40.3
30.5
29.1
CHAMP-Naive
41.9
39.8
41.1
40.8
41.8
43.9
49.1
40.9
38.6
51.1
56.4
43.1
39.6
39.8
30.1
28.9
CHAMP-Naive-Agg
40.7
38.9
39.9
39.4
40.4
42.8
48.9
39.8
38.1
50.8
55.2
41.2
39.1
38.8
29.3
27.7
CHAMP
38.6
38.2
39.4
34.5
36.3
40.1
46.2
37.1
36.4
46.9
50.9
40.4
38.2
38.1
27.2
27.7
CHAMP-Agg
37.1
36.5
38.1
33.1
34.2
38.4
44.1
35.1
33.9
44.9
49.2
40.2
37.9
37.8
26.5
27.2
+
+Table 5: MPJPE (↓) results on Human-3.6M dataset. Note that all baselines shown are trained with input frames number $N = 1$ .
+
+As expected, with fewer frames available, all tested baselines should result in worse performance than with multiple frames. Interestingly, as we can see in Table 5, CHAMP-Agg is able to achieve a more significant edge over the previous SOTA (DiffPose) in single-frame setting vs in multi-frame (3.4mm vs 2.1mm). Moreover, CHAMP-Agg achieves more improvement over the backbone D3DP in the single-frame setting. Thus, even with less temporal information available (i.e. when the ambiguity is more severe), CHAMP achieves even more competitive performance compared to baselines.
+
+# K DIVERSE HYPOTHESES UNDER LARGE UNCERTAINTY
+
+Another interesting study to conduct is to test the proposed method's behaviors under large uncertainty. Here, we specify large uncertainty as three scenarios:
+
+- Truncation in 2D RGB input.
+- Wrong 2D keypoints prediction.
+- Self-occlusion in 2D RGB input.
+
+While first two types large uncertainty, truncation in 2D RGB input (which gives inaccurate 2D keypoints) and wrong 2D keypoints, are not the focus of our work (since we assume 2D keypoints from some off-the-shelf method), it would be interesting to see how CHAMP behaves when such uncertainty occurs. To test this, we use the single-frame model trained in the previous section—this allows us to isolate the temporal effects and focus on uncertainty in 2D RGB inputs only, as the temporal nature of the data may already provide additional constraints, reducing ambiguity.
+
+# K.1 TRUNCATED RGB INPUT
+
+When the RGB image input is truncated, meaning that some keypoints are not fully visible, it might be possible that the 2D keypoints detector can still predict decent 2D keypoints. As shown in CPN Chen et al. (2018) and HRNet Sun et al. (2019), the 2D keypoints detector does have some robustness to truncation (external occlusion). We synthetically create truncated (externally occluded) images and test CHAMP on them, shown in Fig. 14. In the first case, the two feet are truncated and in the second case, one hand is truncated. In both cases, the 2D keypoints detector was able to predict the truncated 2D keypoints. Since our method takes as input 2D keypoints, so long as all keypoints are available, it will run as usual, agnostic to the truncation.
+
+# K.2 WRONG 2D KEYPOINTS
+
+It is also likely that the 2D keypoints detector makes mistakes due to noisy background, imprecise segmentation, etc. Under this circumstance, the 2D keypoints are off to begin with. Granted, when the 2D keypoints are extremely wrong, the 3D keypoints output will also be off —this constitutes
+
+
+
+
+
+
+
+
+
+
+2D Keypoints
+
+
+All Hypotheses
+
+
+After Refinement
+
+
+Another View
+Figure 14: CHAMP Performance on Truncated Images. As long as the keypoints are detected, the pipeline can output 3D keypoints as usual. This relies on 2D keypoint detector's robustness to external occlusion.
+
+one key failure mode of CHAMP. However, we are interested to see if the uncertainty score in CHAMP is able to "correct" the output by proposing more diverse samples. In Fig. 15, we select two images where the 2D keypoint detector makes mistakes. In the first image, the left leg keypoints are completely off. Interestingly, the proposed 3D keypoints are a lot more diverse for the left leg than other joints. After the CP refinement step, the left leg joints are still more diverse, covering a wider region than other joints outputs do. In the second image, the two hands keypoints are off. We again see a much noisier proposal set for the two joints. After the refinement, the two hands outputs are noticeably more diverse. One possible reason for this interesting phenomenon could be that the 2D keypoints input itself are seen as "unnatural" compared to the training data, forcing the network to output more diverse 3D poses.
+
+# K.3 SELF-OCCLUDED RGB INPUTS
+
+Lastly, another source of large uncertainty in RGB inputs is self-occlusion. Note that self-occlusion typically happens when the human subject itself occludes some joints, and this is different from truncation, where the source of occlusion is external. We are interested in testing CHAMP when self-occlusion is present and checking if any interesting behavior occurs. In Fig. 16, we show two images where the human subject occludes itself, obstructing the visibility of some joints. In the first image, the dancer's left arm is occluded by the right arm entirely. While the 2D detector is able to differentiate the two joints and output two different 2D keypoints, they are very close and the 3D locations are ambiguous. CHAMP outputs noisier proposals for the occluded arm joints (elbow and hand). Interestingly, after the CP refinement, the elbow joint pose outputs are almost "bimodal" and the hand pose outputs are still a lot noisier than other joints. For the second image, the dancer's right leg is occluded by the left leg. Similarly, CHAMP outputs noisier proposals for the right knee and right foot both before and after the CP refinement. One possible reason for this interesting phenomenon is that the network intrinsically learned to output different poses when the 2D keypoints are close to each other, suggesting possible self-occlusion.
+
+# L PERFORMANCE ON 3DPW
+
+The 3DPW dataset Von Marcard et al. (2018) is a more challenging dataset collected in outdoor environment using IMU (inertial measurement unit) sensors with mobile phone lens. To ensure a
+
+
+
+
+2D Keypoints
+
+
+
+
+All Hypotheses
+
+
+
+
+After Refinement
+
+
+
+
+Another View
+
+
+Figure 15: CHAMP Performance on Wrong 2D Keypoints. Interestingly, CHAMP outputs a lot more diverse proposals for the joints that are off than for more correct joints.
+
+
+2D Keypoints
+
+
+
+
+All Hypotheses
+
+
+
+
+After Refinement
+
+
+
+
+Another View
+Figure 16: CHAMP Performance on Self-Occluded RGB Inputs. Interestingly, CHAMP outputs a lot more diverse proposals for the joints that are occluded than for non-occluded joints.
+
+fair comparison, following Yang et al. (2023), we compare CHAMP with other baselines by taking as input ground-truth 2D keypoints. We compare CHAMP ( $N = 1$ ), D3DP ( $N = 1$ ) Shan et al. (2023), DiffPose ( $N = 1$ ) Gong et al. (2023), and CameraPose Yang et al. (2023) trained jointly on Human 3.6M and MPII without using 3DPW during training and test on 3DPW using the PA-MPJPE (aligned after rigid transformation) in Table 6. Note that in Shan et al. (2023) did not provide quantitative results on 3DPW so we retrained D3DP jointly on Human 3.6M and MPII and tested on 3DPW.
+
+
Baseline
CHAMP-Naive
CHAMP-Naive-Agg
CHAMP
CHAMP-Agg
D3DP
CameraPose
DiffPose
PA-MPJPE (mm)
64.2
63.7
61.5
60.8
64.3
63.3
64.0
+
+As we can see, CHAMP outperforms other baselines by a noticeable margin. Even though 3DPW was not seen during training, our method achieves competitive performance. Moreover, we see a similar trend that J-Agg's edge is less than CP refinement: from CHAMP-Naive to CHAMP-Naive-Agg, the error is reduced by $0.5\mathrm{mm}$ , but it gets reduced by $2.7\mathrm{mm}$ going from CHAMP-Naive to CHAMP, where CP refinement is added. This again indicates the importance of using CP to aggregate the hypotheses.
+
+# M MODULAR DESIGN
+
+CHAMP uses the idea of attention mechanism to encode both spatial and temporal information. This is inherited from the usage of the MixSTE - D3DP backbone, which uses a Transformer-based encoder. While prior work such as Zheng et al. (2021); Zhao et al. (2023) do not consider multi-hypothesis settings or uncertainty quantification, switching the transformer in D3DP backbone in CHAMP with Zheng et al. (2021) or Zhao et al. (2023) will result in a similar multi-hypothesis model that is able to quantify uncertainty via end-to-end CP.
+
+Similarly, Ci et al. (2023) uses an innovative approach to learning probabilistic human poses via gradient flow diffusion. The key difference lies in the formulation of the diffusion process to generate multiple hypotheses. We show that CHAMP's framework is modular enough as we are able to replace the diffusion backbone with GFpose's gradient-based diffusion. Mehraban et al. (2024) uses GCNFormer to improve the modeling of local dependencies inherent in human pose sequences, which is shown to outperform transformers. The key difference is again the choice of backbone. We replace the human pose backbone in CHAMP with GCNFormer and show the improvement gained using the conformity score.
+
+Thus, for the aforementioned baselines, we finetune them with the end-to-end score function proposed in our work and compare how much the MPJPE gets reduced. We show the improvement brought by using the end-to-end conformal score function on the Human 3.6M dataset below in Table 7.
+
+Table 6: Baseline Methods Trained on Human3.6M and MPII and Tested on 3DPW with PA-MPJPE Metric
+
+
Baseline
PoseFormer
PoseFormer V2
GFPose
MotionAGFormer
CHAMP
MPJPE Reduction (mm)
1.5
1.2
1.7
1.8
2.3
+
+Table 7: Using CHAMP's End-to-End Score Function on Different Backbones
\ No newline at end of file
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/images.zip b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..cd1f8881a1d4ecd12ed589fb580dab753fff5f8b
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ed6aa6d194ff65a6aec205a3eed6c3e989312ddde7482abda44ea285b7065efa
+size 1324101
diff --git a/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/layout.json b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..451e1174fdca4a1e648a92a7322f1c9dd9136475
--- /dev/null
+++ b/ICLR/2025/CHAMP_ Conformalized 3D Human Multi-Hypothesis Pose Estimators/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:81477532fb483b0321ed4422ba8fd8944eb403015e2eac17742cab7aeb6ba8da
+size 799864
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_content_list.json b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..f142ef998e990ffcef8c1d8ce91f71167edac3c3
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:99ec52eb3f067cf72cb7591809a0c0d39c967b7b8014c9bf1a5c23ed4b8e5b57
+size 152857
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_model.json b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..6cac24d06a0ab2ae3b5a29a37c8ba5c7b5499de0
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:52f750bc9299bcd8817d0cd53fd33bb591d42f3e1028128d791d85176749b594
+size 187553
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_origin.pdf b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5d48043b635231d0710636ac1cca4c51c5cb68c3
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/8e713248-eee5-49cc-be5b-0d6a78ada6c8_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b89c94984df1650992c385819c8cfde8c39f35de528bdabdd4bd77740ef00869
+size 1914836
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/full.md b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..b496c2a950b9be5adf69193fdae1c53f6038c0a8
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/full.md
@@ -0,0 +1,656 @@
+# CHASE-SQL: MULTI-PATH REASONING AND PREFERENCE OPTIMIZED CANDIDATE SELECTION IN TEXTTO-SQL
+
+Mohammadreza Pourreza $^{1*}$ , Hailong Li $^{1*}$ , Ruoxi Sun $^{1}$ , Yeounoh Chung $^{1}$ , Shayan Talaei $^{2}$ , Gauray Tarlok Kakkar $^{1}$ , Yu Gan $^{1}$ , Amin Saberi $^{2}$ , Fatma Özcan $^{1}$ , Sercan Ö. Arik $^{1}$
+
+1Google Cloud, Sunnyvale, CA, USA
+$^{2}$ Stanford University, Stanford, CA, USA
+
+{pourreza, hailongli, ruoxis, yeounoh}@google.com
+
+{g kakkar, gany, forzan, soarik}@google.com
+
+{stalaei, saberi}@stanford.edu
+
+*Equal contribution
+
+# ABSTRACT
+
+We present CHASE-SQL, a novel framework addressing large language model (LLM) performance challenges for Text-to-SQL tasks by leveraging multi-agent modeling and test-time compute for improved candidate generation and selection. CHASE-SQL uses LLMs to generate diverse SQL candidates with: (1) a divide-and-conquer approach to break down complex queries, (2) chain-of-thought reasoning based on query execution plans, and (3) instance-aware synthetic example generation for tailored few-shot demonstrations. A selection agent ranks candidates via pairwise comparisons using a fine-tuned binary selection LLM, offering robust performance. This framework improves SQL query quality and diversity, achieving state-of-the-art execution accuracy of $73.0\%$ on the BIRD Text-to-SQL benchmark test set, topping the leaderboard at the time of submission.
+
+# 1 INTRODUCTION
+
+Text-to-SQL, as a bridge between human language and machine-readable structured query languages, is crucial for many use cases, converting natural language questions into executable SQL commands (Androutsopoulos et al., 1995; Hristidis et al., 2003; Li & Jagadish, 2014; Li et al., 2024c; Yu et al., 2018). By enabling users to interact with complex database systems without requiring SQL proficiency, Text-to-SQL empowers users to extract valuable insights, perform streamlined data exploration, make informed decisions, generate data-driven reports and mine better features for machine learning (Wang et al., 2019; Pourreza & Rafiei, 2024a; Sun et al., 2023; Chen et al., 2023; Pourreza et al., 2024; Pérez-Mercado et al., 2023; Xie et al., 2023). Furthermore, Text-to-SQL systems play a pivotal role in automating data analytics with complex reasoning and powering conversational agents, expanding their applications beyond traditional data retrieval (Sun et al., 2023; Xie et al., 2023). As data continues to grow exponentially, the ability to query databases efficiently without extensive SQL knowledge becomes increasingly vital for a broad range of applications.
+
+Text-to-SQL can be considered a specialized form of code generation, with the contextual information potentially including the database schema, its metadata and along with the values. In the broader code generation domain, utilizing LLMs to generate a wide range of diverse candidates and select the best one has proven to be effective (Li et al., 2022; Ni et al., 2023; Chen et al., 2021). However, it is non-obvious what leads to most effective candidate proposal and winner selector mechanisms. A straightforward yet effective approach involves generating candidates using zero-/few-shot or open-ended prompting, followed by selecting the best options utilizing self-consistency (Wang et al., 2022), which entails clustering candidates based on their execution outputs. This approach has demonstrated promising results in several studies (Maamari et al., 2024; Talaei et al., 2024; Lee et al., 2024; Wang et al., 2023). However, a single prompt design might not fully unleash the extensive Text-to-SQL knowledge of LLMs, and self-consistency methods might not be always effective.
+
+In fact, as illustrated in Table 1, the most consistent answers would not always be the correct ones, with an upper-bound performance $14\%$ higher than that achieved through self-consistency. This substantial gap highlights the potential for significant improvement by implementing more effective selection methods to identify the best answer from the pool of candidate queries.
+
+Building on the challenges outlined in the previous section, we propose novel approaches to improve LLM performance for Text-to-SQL by leveraging judiciously-designed test-time computations in an agentic framework. As indicated by the upper bound in Table 1, utilizing LLMs' intrinsic knowledge offers significant potential for improvement. We propose methods that generate a diverse set of high-quality candidate responses and apply a selection mechanism to identify the best answer. Achieving both high-quality and diverse candidate responses is critical for the success of scoring-based selection methods. Low diversity limits improvement potential and reduces the difference between self-consistency and scoring-based
+
+Table 1: Evaluating single-query generation vs. ensemble methods of self-consistency and the upper bound that can be achieved for Text-to-SQL with Gemini 1.5 Pro on the BIRD dev set. EX stands for execution accuracy.
+
+
Method
EX (%)
Single query
63.01
Self-consistency
68.84 (+5.84)
Upper-bound
82.79 (+19.78)
+
+approaches. While techniques like increasing temperature or reordering prompt contents can boost diversity, they often compromise the quality of the candidates. To address this, we introduce effective candidate generators designed to enhance diversity while maintaining high-quality outputs. Specifically, we propose three distinct candidate generation approaches, each capable of producing high-quality responses. The first is inspired by the divide-and-conquer algorithm, which breaks down complex problems into smaller, manageable parts to handle difficult queries. The second employs a query execution-plan-based chain-of-thought strategy, where the reasoning process mirrors the steps a database engine takes during query execution. Lastly, we introduce a novel online synthetic example generation method, which helps the model better understand the underlying data schema of the test database. These methods, when used independently, can produce highly-accurate SQL outputs. To effectively select the best answer among candidates, we introduce a selection agent, trained with a classification objective, that assigns scores based on pairwise comparisons between candidate queries. With this agent, we construct a comparison matrix for all candidates and select the final response based on the highest cumulative score. By combining these candidate generation methods with the proposed scoring model, we create an ensemble approach that leverages the strengths of each strategy to significantly improve overall performance.
+
+We present comprehensive evaluations on the efficacy of proposed methodologies of CHASE-SQL. Our innovative candidate generation approaches demonstrate superior performance compared to traditional generic CoT prompts, illustrating their capability in guiding LLMs through the decomposition of complex problems into manageable intermediate steps. Furthermore, the proposed selection agent significantly outperforms conventional consistency-based methods, contributing to the state-of-the-art results. Specifically, CHASE-SQL reaches an execution accuracy of $73.01\%$ and $73.0\%$ on the development set and test set of the challenging BIRD Text-to-SQL dataset which outperforms all of the published and undisclosed methods on this benchmark, by a large margin. Moreover, by leveraging entirely open-source models—Mistral Large Model (AI, 2024) as the candidate generator and a fine-tuned Qwen-2.5-coder model (Team, 2024) as the selector—our method achieved a state-of-the-art performance of 70.33 on the BIRD development set with open-source models.
+
+# 2 METHODS
+
+# 2.1 OVERALL FRAMEWORK
+
+This section outlines the proposed CHASE-SQL framework, which consists of four primary components: 1) Value retrieval, 2) Candidate generator, 3) Query fixer, and 4) Selection agent. As illustrated in Fig. 1. The proposed framework begins by retrieving relevant database values. Subsequently, all contextual information, including retrieved values, database metadata, and schema, is provided to an LLM to generate candidate queries. These candidate queries then undergo a fixing loop, and finally, all candidates are compared in a pairwise way using the trained selection agent to pick the correct answer. The following sections delve into the details of each component.
+
+
+Figure 1: Overview of the proposed CHASE-SQL framework for Text-to-SQL, with value retrieval and using a selection agent for improve picking of the answers among the generated candidates along with a fixer to provide feedback for refinement of the outputs.
+
+# 2.2 VALUE RETRIEVAL
+
+Databases might contain very high number of rows, with often only a few being relevant to a query. Retrieving relevant values is crucial as they can be used in various SQL clauses like 'WHERE' and 'HAVING'. Similar to the approach in (Talaei et al., 2024), we begin by extracting keywords from the given question using an LLM prompted with few-shot examples. For each keyword, we employ locality-sensitive hashing (LSH) (Datar et al., 2004) to retrieve the most syntactically-similar words, and re-rank them based on embedding-based similarity and edit distance. This approach is robust to typos in the question and considers keyword semantics during retrieval.
+
+# 2.3 MULTI-PATH CANDIDATE GENERATION
+
+As shown in Table 1, relying solely on consistency among responses can lead to sub-optimal performance. Therefore, we prioritize diversity in generation of multiple response candidates to increase the likelihood of generating at least one correct answer. Among the diverse responses generated by the candidate generators, we select one as the final response using a selection agent that compares candidates pairwise. To generate diverse responses, we increase the next token sampling temperature, and also shuffle the order of columns and tables in the prompt.
+
+Chain-of-Thought (CoT) prompting (Wei et al., 2022) has been proposed to enhance LLMs' reasoning abilities by conditioning their final responses on a step-by-step chain of reasoning. Most CoT prompting approaches rely on few-shot examples in the prompt to guide LLMs on thinking step-by-step, following the format $M = (q_{\mathrm{i}}, r_{\mathrm{i}}, s_{\mathrm{i}})$ , where $q_{\mathrm{i}}$ is the example question, $r_{\mathrm{i}}$ is the reasoning path, and $s_{\mathrm{i}}$ is the ground truth SQL query for $q_{\mathrm{i}}$ . We employ two distinct reasoning methods and an online synthetic example generation approach. As shown in Fig. 3a, different generators can yield different outputs, indicating their effectiveness for specific questions and databases.
+
+Divide and Conquer CoT: Divide-and-conquer perspective brings breaking down complex problems into smaller sub-problems, solving each individually, and then combining the solutions to obtain the final answer. Along these lines, we propose a CoT prompting approach that first decomposes the given question into smaller sub-problems using pseudo-SQL queries. In the 'conquer' step, the solutions to these sub-problems are aggregated to construct the final answer. Finally, an optimization step is applied to the constructed query to remove redundant clauses and conditions. This approach is particularly powerful handling complex scenarios that involve nested queries, e.g. intricate WHERE or HAVING conditions, and queries requiring advanced mathematical operations. In Appendix Fig. 18, we exemplify a question and its corresponding SQL query that was successfully solved using this generator, a scenario the other methods considered in this paper could not address due to the query's complex conditions and SQL clauses. For a more detailed view of the divide-and-conquer prompt, please see Appendix Fig. 17. Additionally, Alg. 1 outlines the step-by-step process of this strategy to generate the final SQL output using a single LLM call.
+
+Query Plan CoT: A query (execution) plan is a sequence of steps that the database engine follows to access or modify the data described by a SQL command. When a SQL query is executed, the database management systems' query optimizers translate the SQL text into a query plan that the database engine can execute. This plan outlines how tables are accessed, how they are joined, and
+
+Algorithm 1 Divide and Conquer Chain-of-Thought (CoT) Strategy for Text-to-SQL.
+Require: Set of human-annotated few-shot examples $M$ , user question $Q_{u}$ , target database $D$ associated with the question, and a large language model (LLM) $\theta$
+Divide:
+1: $S_q\gets \theta (M,D,Q_u)$ // Decompose the original question $Q_{u}$ into a set of sub-questions $S_{q}$
+2: $S_{sq}\gets \emptyset$ // Initialize an empty set $S_{sq}$ to store partial SQL queries for each sub-question Conquer:
+3: for each sub-question $q_{i}$ in $S_{q}$ do
+4: // Generate a partial SQL query for each sub-question $q_{i}$
+5: $S_{sq}\gets S_{sq}\cup \{\theta (M,D,Q_u,q_1,\dots ,q_i,sql_1,\dots ,s q l_{i - 1})\}$
+6: end for
+Assemble:
+7: $S_f\gets \theta (M,D,Q_u,S_q,S_{sq})$ // Assemble the final SQL query $S_{f}$ from all sub-queries in $S_{sq}$
+8: return $S_{f}$
+
+the specific operations performed on the data (see Appendix Fig. 20 as an example). Inspired by the step-by-step process that database engines use to execute SQL queries, we propose a reasoning strategy to construct the final SQL output. Query plans for any given SQL query can be obtained using the "EXPLAIN" command, which provides a detailed breakdown of execution steps. However, this output is often presented in a format that is difficult to interpret by LLMs (e.g. in SQLite). To address this, we convert the output of "EXPLAIN" command into a human-readable text format that aligns more closely with the pretraining data of LLMs. The human-readable version of query plans consists of three key steps: (1) identifying and locating the relevant tables for the question, (2) performing operations such as counting, filtering, or matching between tables, and (3) delivering the final result by selecting the appropriate columns to return. This reasoning method complements the divide-and-conquer CoT strategy. While the divide-and-conquer approach is better suited for decomposing complex questions, the query plan approach excels when questions require more reasoning over the relationships between different parts of the question and the database schema. It systematically explains which tables to scan, how to match columns, and how to apply filters. Appendix Fig. 21 shows an example of a question that was answered correctly only by this method. Appendix Fig. 19 provides the prompt used for this reasoning strategy.
+
+Online Synthetic Example Generation: Using a set of human-annotated demonstrations for few-shot in-context learning has shown promising results on various related tasks (Pourreza & Rafiei, 2024a). Besides using a few select demonstrations helping with specifying the task and illustrate the step-by-step process deriving the output, question and SQL example pairs are also used for few-shot in-context learning for text-to-SQL (Liu et al., 2022; Nan et al., 2023). While prior works focused on selecting a few handful of relevant examples from existing example pools (e.g., training dataset), we synthesize many example pairs using different schema elements and SQL features per incoming question. Unlike prior few-shot in-context learning approaches, we generate many more than just a few (3-5) examples (Pourreza & Rafiei, 2024a; Li et al., 2024b), as we observe that many-shot learning consistently outperforms few-shot learning (Agarwal et al., 2024).
+
+Algorithm 2 Online Synthetic example generation strategy for Text-to-SQL.
+Require: User question $Q_{u}$ , additional user hint $H_{u}$ , target database $D$ and filtered relevant table columns $t$ associated with the question, LLM $\theta$ , guidelines $R_{f}$ for generating examples by SQL features, guidelines $R_{t}$ for generating examples with filtered schema, and the numbers of examples to generate $n_f$ $n_t$ respectively 1: $P\gets \emptyset / \{(q_i,s_i)\mid q_i,s_i\in \Sigma^*\}$ , where $q_{i}$ is input question, $s_i$ is output SQL for the i-th example 2: $P\gets P\cup \{\theta (D,R_f,n_f)\} /$ Generate n examples with entire database by common SQL features 3: $P\gets P\cup \{\theta (t,R_t,n_t)\} /$ Generate examples with filtered columns to highlight correct schema usage 4: return $P$
+
+Algorithm 2 outlines the online synthetic example generation approach with two LLM generation steps. The first step focuses on generating illustrative examples with common SQL features described in the guideline $R_f$ . The SQL features include equality and non-equality predicates, single table and multi-table JOIN, nested JOIN, ORDER BY and LIMIT, GROUP BY and HAVING, various aggregation functions. These are widely applicable SQL clauses and functions – the generated example SQL queries, incorporating these features, follow the BIRD SQL feature distribution (Appendix Fig 25a). The second step focuses on generating examples highlighting correct interpretation of the underlying data schema – the model $\theta$ is asked to generate examples using $t_i$ (column selec
+
+tion using an approach similar to (Talaei et al., 2024)) and that are similar to the examples outlined in $R_{t}$ . Appendix A.13 provides the prompts used for the example generation).
+
+While a relevant example (e.g. showing a nested JOIN query with multiple tables) can be helpful for questions that require complex JOIN queries, it might also mislead the LLM for overuse (e.g. when a simple single table query is sufficient). This and the inherent ambiguity of natural language query $q_{i}$ , for which we draw the examples by relevance, make the example selection challenging. Thus, we generate and inject the examples to the prompt online per $q_{i}$ . We ask the LLM to generate many input-output pairs for in-context learning. The final set of synthetic examples for $q_{i}$ contains examples generated with both $R_{f}$ and $R_{t}$ . This ensures that the example set is diverse both in SQL features/clauses and the choice of relevant tables/columns used. The diversity of the example set is desirable to avoid over-fitting the output to certain patterns (e.g., the model always writes a SQL with JOIN if shown mostly JOIN examples). Mixing various examples for various SQL features and database tables with and without column filtering is observed to result in better generation quality overall (see Appendix Table 8). The generated synthetic examples can guide the model for more accurate text-to-SQL generation. In Appendix A.13, Table 9, we discuss how our synthetic example generation performs compared to selecting examples from often limited examples pools (e.g., training dataset and cross-domain data augmentation (Li et al., 2024b)).
+
+# 2.4 QUERY FIXER
+
+In some cases, LLMs might generate queries that are syntactically incorrect. These queries are clear candidates for correction, as they fail to provide the correct answers. To address this, we apply an LLM-based query fixer that leverages the self-reflection (Shinn et al., 2024) method. The fixer reflects on the previously generated query, using feedback such as syntax error details or empty result sets to guide the correction process. We continue this iterative fixing approach up to a specified number of attempts, $\beta$ (set to three in this paper). Appendix Fig. 22 demonstrates the prompt used for this query fixing step. Additionally, Appendix section A.4 provides a detailed algorithm of the query fixing step.
+
+# 2.5 SELECTION AGENT
+
+With three different methods for generating SQL queries, we can generate a set of candidate queries for any given question. The key challenge in this step is selecting the correct SQL query from this pool of candidates. A naive approach would be to measure consistency among the candidates by executing them, grouping them based on their execution results, and selecting a query from the largest group as the most likely correct answer. However, this would assume that the most consistent answer is always the best one, which is not always the case. Instead, we propose a more refined picking strategy, Algorithm 3, that relies on a selection agent. Given a set of candidates SQL queries $C = \{c_1, c_2, \dots, c_n\}$ , the final responses are selected by finding the candidate that has the highest score assigned by the selection model. This model $\theta_p$ can take $k$ candidates and rank them based on how accurately each of them answers the given question. Concretely, we formulate the selection of the final response as:
+
+$$
+c _ {f} = \arg \max _ {c \in C} \left(\sum_ {i = 1} ^ {\binom {n} {k}} \theta_ {p} \left(c _ {i _ {1}}, \dots , c _ {i _ {k}} \mid Q _ {u}, H _ {u}, D\right)\right), \tag {1}
+$$
+
+where $Q_{u}$ refers to the user's question, $H_{u}$ is the provided hint, and $D$ is the target database from which the question is being asked. In Eq. 1, we pass $k$ candidates to the selection model to be ranked, with $k$ being between 1 and $n$ . In the extreme case of $k = 1$ , the model is unable to make comparisons between candidates, which complicates the evaluation process for the model. As $k$ increases, comparing more candidates makes the process more challenging for the model, as it needs to consider different aspects simultaneously. Consequently, we set $k = 2$ and train a model with a classification objective to compare only two candidates at a time.
+
+Having a set of high-quality and diverse candidates, the most straightforward solution is to employ off-the-shelf LLMs to make pairwise selections. However, experiments with Gemini-1.5-pro showed that using the LLM without fine-tuning resulted in only $58.01\%$ binary classification accuracy. This is primarily due to the candidates being very similar to one another, requiring a fine-tuned
+
+model to learn the nuances and make more accurate decisions. To train the selection agent, we first generate candidate SQL queries on the training set (of Text-to-SQL benchmarks), and group them into clusters based on their execution results. For cases where at least one cluster contains correct queries and others contains incorrect ones, we create training examples in the form of tuples $(Q_{u},C_{i},C_{j},D_{ij},y_{ij})$ , where $Q_{u}$ is the user's question, $C_i$ and $C_j$ are the two candidate queries being compared, $D_{ij}$ is the database schema used by both candidates (Using the union of candidate schemas is important as it reduces cost and eliminates unnecessary information during comparison.), and $y_{ij} \in 0,1$ is the label indicating whether $C_i$ or $C_j$ is the correct query. To avoid order bias during training, we randomly shuffle the order of correct and incorrect queries in each pair. Since the number of cases with both correct and incorrect candidates is limited, for instances where no correct candidate exists, we include the ground truth SQL query in the prompt as a hint to guide the model in generating correct candidates.
+
+Algorithm 3 Picking the final SQL query from a pool of candidates.
+```txt
+Require: Set of candidate SQL queries \(C = \{c_1, c_2, \dots, c_n\}\), user question \(Q_u\), hint \(H_u\), target database \(D\), and a selection model \(\theta_p\), \(er(c_i, D)\) as the execution result of \(c_i\) on \(D\)
+1: \(r_i \gets 0\) for all \(c_i \in C\) // Initialize the score \(r_i\) for each candidate query to zero
+2: for each distinct pair \((c_i, c_j)\) where \(i \neq j\) do
+3: if \(er(c_i, D) = er(c_j, D)\) then
+4: \(w \gets i // c_i\) is the winner if the execution results match
+5: else
+6: \(S_{i,j} \gets schema_union(c_i, c_j, D) // Construct union of schemas used in \(c_i\) and \(c_j\)
+7: \(w \gets \theta_p(S_{i,j}, Q_u, H_u, c_i, c_j) w \in \{i, j\} // Use binary classifier \(\theta_p\) to select the winner; \(w \in \{i, j\}\)
+8: end if
+9: \(r_w \gets r_w + 1 // Increase the score of the winner \(c_w\) by 1
+10: end for
+11: \(c_f \gets \arg \max_{c_i \in C} r_i // Select the candidate with the highest score as the final SQL query \(c_f\)
+12: return \(c_f\)
+```
+
+In the pseudo-code for Algorithm 3, we begin by initializing a score of zero for each candidate query. Then, for every distinct pair of queries $(c_i, c_j)$ , we compare both $(c_i, c_j)$ and $(c_j, c_i)$ to mitigate any order bias, ensuring that both candidates in a pair are fairly evaluated (ignoring the both side comparison will reduce the final performance by roughly $2\%$ ). If both queries produce the same execution result on the database, we mark one as the winner and increment its score, as these results suggest consistency. If the execution results differ, we generate a union of the schema used by both queries and use the binary classifier to determine which query is more likely to be correct. The classifier takes into account the question, the two candidate queries, and the combined schema to make its decision. The winner's score is then updated accordingly. After all comparisons, the candidate with the highest score is selected as the final query. In the rare case of a tie in the final scores, we break the tie by selecting one of the candidates arbitrarily.
+
+# 3 EXPERIMENTS
+
+Datasets and Models We evaluate the performance of the proposed CHASE-SQL framework on two widely-recognized cross-domain datasets: BIRD (Li et al., 2024c) and Spider (Yu et al., 2018). BIRD contains over 12,751 unique question-SQL pairs from 95 large databases, spanning more than 37 professional domains, with databases designed to resemble real-world scenarios, featuring messy data rows and complex schemas. Spider consists of 10,181 questions and 5,693 unique complex SQL queries across 200 databases, covering 138 domains. The Spider dataset is divided into non-overlapping training, development, and test sets similar to BIRD. For both, we use execution accuracy (EX), the official metric for their respective leaderboard, as the primary evaluation metric to compare methods. Details of the models and their hyperparameters are provided in Appendix section A.3.
+
+BIRD results We present the end-to-end Text-to-SQL performance of the proposed CHASE-SQL framework using Claude-3.5-sonnet, Gemini 1.5 pro, and Mistral Large models on the BIRD development set, and Gemini 1.5 pro on the BIRD test set. We compare with both published methods (either with an available codebase and/or paper) and undisclosed methods. For a fair comparison with Gemini 1.5 pro, all LLM calls in the Claude-3.5-sonnet setting, except for the selection model, are made using Claude-3.5-sonnet (previously-trained selection model is reused). To evaluate the
+
+performance of fully open-source models, we used a fine-tuned Qwen2.5-coder model (Team, 2024) as the selection model for the Mistral Large model. As shown in Table 2, CHASE-SQL with Gemini 1.5 pro achieves $73.01\%$ accuracy on the BIRD development set and $73.0\%$ on the BIRD holdout test set, outperforming all previous works and setting a new state-of-the-art performance.
+
+Table 2: Performance Comparison of different Text-Table 3: Performance Comparison of different Textto-SQL methods on BIRD benchmark. to-SQL methods on Spider test set.
+
+
Method
EX (Dev)
EX (Test)
Published
CHASE-SQL + Gemini 1.5 (Ours)
73.01
73.0
CHASE-SQL + Claude 3.5 Sonnet (Ours)
69.53
-
CHASE-SQL + Mistral Large (Ours)
70.33
-
Distillery + GPT-4o
(Maamari et al., 2024)
67.21
71.83
CHESS
(Talaei et al., 2024)
65.00
66.69
MCS-SQL + GPT-4
(Lee et al., 2024)
63.36
65.45
SuperSQL
(Li et al., 2024a)
58.5
62.66
Undisclosed
Insights AI
72.16
70.26
AskData + GPT-4o
72.03
72.39
OpenSearch-v2 + GPT-4o
69.3
72.28
PURPLE-RED + GPT-4o
68.12
70.21
Arcwise + GPT-4o
67.99
66.21
ExSL + granite-34b-code
67.47
67.76
MCS-SQL + GPT-4
(Talaei et al., 2024)
67.21
71.83
CHESS
(Talaei et al., 2024)
65.00
66.69
DAIL-SQL + GPT-4
(Gao et al., 2023)
86.6
✓
DIN-SQL + GPT-4
(Pourreza & Rafiei, 2024a)
85.3
✓
C3 + ChatGPT
(Dong et al., 2023)
82.3
✓
RESDSQL 3B
(Li et al., 2023a)
79.9
✓
DIN-SQL + CodeX
(Pourreza & Rafiei, 2024a)
78.2
✓
T5-3B+NatSQL
(Rai et al., 2023)
78.0
✓
Graphix-3B+PICARD
(Li et al., 2023b)
77.6
✓
+
+Spider results We assess the generalizability of the proposed CHASE-SQL by evaluating it in an end-to-end way on the Spider test set without modifying the few-shot samples in the prompts or training a new selection model, i.e. without using and data from the target distribution. This approach allows us to test the performance of CHASE-SQL on different unseen query and database distributions compared to the data from training distributions. Table 3 demonstrates that CHASE-SQL achieves an execution accuracy of $87.6\%$ on the Spider test set, placing it second among methods that have undergone specific training or prompt optimization for the Spider dataset. This highlights the strong generalizability of CHASE-SQL and its potential for generating high quality Text-to-SQL for unseen samples coming from very different distributions and unique challenges.
+
+# 3.1 GENERATOR AND SELECTION PERFORMANCE
+
+Generator + Fixer: To reveal performance of generators, we conducted an ablation study to evaluate the performance of each candidate generation method before and after applying the query fixer using two models of Gemini1.5-pro and Mistral Large (AI, 2024). We compare the performance of the proposed generators in producing a single candidate query against the original BIRD prompt (Li et al., 2024c), augmented with zero-shot CoT reasoning (Kojima et al., 2022), which serves as the baseline for assessing the quality of prompts. The results, shown in Table 4, indicate that the proposed methods significantly improve SQL generation performance, compared to the naive
+
+Table 4: Ablation studies on single candidate generation performance of the candidate generators compared with original BIRD prompt + zero-shot CoT with Gemini 1.5 pro and Mistral Large on the BIRD dev set.
+
+
Method
Gemini 1.5 pro
Mistral Large
EX (%)
Δ(%)
EX (%)
Δ(%)
Baseline
57.75
-
54.88
-
QP CoT
63.62
+5.87
59.64
4.76
DC CoT
63.92
+6.17
58.99
4.11
OS ICL
67.09
+9.34
56.32
1.44
Baseline w Query Fixer
61.58
+3.83
60.03
5.15
QP CoT w Query Fixer
65.51
+7.76
62.64
7.76
DC CoT w Query Fixer
65.77
+8.02
63.75
8.87
OS ICL w Query Fixer
68.02
+10.27
61.47
6.59
+
+baseline, towards the goal of producing high-quality candidates while maintaining diversity. Among the candidate generators, the online synthetic data generation approach produced an impressive performance of $68.02\%$ with Gemini-1.5-pro model, demonstrating its effectiveness in leveraging test-time compute to improve LLM performance by generating high-quality synthetic examples. Furthermore, the query fixer proved crucial, enhancing the quality of the candidate pool and increasing performance by nearly $2\%$ across all candidate generators.
+
+Selection: We conducted an analysis on the binary selection accuracy of the selection agent for cases where, in a pairwise comparison, one candidate is correct and the other is incorrect. We exclude cases where both candidates are either correct or incorrect, as the selection would not affect the outcome since both candidates have the same label. We compare the performance of Claude-3.5-sonnet and Gemini-1.5-pro (both out-of-the-box without fine-tuning) with two fine-tuned models: 1) Gemma 2 9B and 2) Gemini-1.5-flash. As shown in Table 5, both fine-tuned models achieve higher accuracy than the untuned counterparts, demonstrating the importance of fine-tuning to teach the model about the specific preferences.
+
+Candidate Generation Analysis: We analyze the performance of each candidate generator method individually. To better understand the performance potential when effectively selecting the correct SQL query from the candidate pool, we generate seven candidate SQL queries from each generator method (21 candidates in total) for all samples in the BIRD development set. We determine this number of candidates based on the observation that increasing the candidate pool beyond 20 did not yield significant improvements, as illustrated in Fig. 2d. By assuming access to an oracle
+
+Table 5: Evaluating the binary selection accuracy of the different selection models.
+
+
Selection Model
Binary Acc. (%)
Claude-3.5-sonnet
60.21
Gemini-1.5-pro
63.98
Tuned Gemma 2 9B
64.28
Tuned Gemini-1.5-flash
71.01
+
+selection model that always selects the correct SQL query from the seven candidates, we calculate the upper-bound performance achievable for each generator. Conversely, by assuming an adversarial selection model that always selects the wrong SQL query, we determine the lower-bound performance. Fig. 2 illustrates the upper-bound and lower-bound performance for all three methods together with the performance of our selection agent. As shown, the upper-bound performance of the two different CoT methods is generally higher than that of the synthetic example generation method for different number of candidates. However, their lower-bound performance is also lower than the synthetic method. Lower-bound accuracy reflects cases where all candidates are correct, reducing the noise in the selection process since it doesn't matter which candidate is chosen, so a higher lower-bound is preferred. This is evident in the selection agent's performance, where a drop in the lower bound leads to diminishing returns from increasing the upper bound, causing the selection agent's performance to plateau. Additionally, the upper-bound performance of combining all three methods reaches $82.79\%$ , highlighting the significant room for improvement through better candidate picking methods. This demonstrates that the LLM's parametric knowledge already contains the information needed to solve most questions, highlighting the need for ensemble approaches to effectively extract and utilize this knowledge.
+
+Additionally, we evaluate the upper-bound performance by combining all candidates from three candidate generation methods across the simple, moderate, and challenging difficulty levels for the BIRD development set. These difficulty categories are assigned by human experts during the creation of the BIRD development set. Fig. 2d shows that, as expected, the upper-bound performance increases with the number of candidates across all difficulty levels. However, for the challenging and moderate classes, the improvement plateaus earlier than in the simple class, suggesting that generating more samples does not further improve the upper-bound performance for these two difficulty levels.
+
+Fig. 2 presents a Venn diagram showcasing the performance of three generation methods: Query Plan, Divide and Conquer, and with Synthetic Examples. The numbers within the intersecting regions represent the instances where multiple methods generated at least one correct candidate. This diagram visually highlights the unique contributions of each method, which indicates the necessity of using all three generators. Additionally, in Fig. 3b, we compare the number of correct queries generated by each SQL generation method that are not correct by the other generators. The divide-and-conquer approach outperforms the others on challenging questions, while the query plan method excels on moderately difficult queries. To further analyze the performance of the generators across different domains and varying numbers of columns and tables, we compare the number of correct queries generated for each database, as shown in Appendix Fig. 5. As illustrated, both CoT methods generally perform similarly across databases, while the online synthetic example generation method significantly increases diversity, resulting in more correct answers overall across different databases.
+
+
+(a) Upper-bound and lower-bound Accuracy for Divide and Conquer CoT
+
+
+(c) Upper-bound and lower-bound performance for Query Plan CoT.
+
+
+
+
+(b) Upper-bound and lower-bound Accuracy for Online Synthetic Example
+(d) Upper-bound performance of all three candidate generators across different difficulty categories.
+
+
+Figure 2: Comparison of the upper- and lower-bound performance of different candidate generators.
+(a) Venn diagram illustrating the number of instances for which each method: Query Plan, Synthetic Example, Divide and Conquer, produces at least one correct candidate. The overlap regions represent multiple methods generating correct candidates.
+
+
+(b) Number of correct queries across different complexity levels that were answered by each method.
+Figure 3: Comparison of SQL generation methods: Venn diagram showing unique and overlapping correct answers (left) and the performance across different complexity levels (right).
+
+Selection Agent Analysis: We evaluate the query-picking performance by comparing the Text-to-SQL execution accuracy of the selection agent with the self-consistency method (using majority voting) Wang et al. (2022), an oracle model (upper bound), and an adversarial model (lower bound). To conduct the evaluation, we generate 10 samples from each candidate generation method using two different sampling temperatures: 0.5 and 1.8. The results, shown in Table 6, demonstrate that the selection agent significantly outperforms the self-consistency method with a large margin, roughly $6\%$ . As expected, increasing the sampling temperature raises the upper bound but also lowers the lower bound. This effect is more pronounced for the synthetic data generation method compared to the two CoT methods, mainly because LLMs generate reasoning steps before producing the final SQL query, which helps mitigate the randomness introduced by high-temperature sampling. The performance with self-consistency method generally decreases as temperature increases, since the
+
+majority cluster becomes smaller with more random queries. However, the proposed trained selection agent is less affected by temperature scaling and, in two cases, even improved its performance with a more diverse pool of samples.
+
+Table 6: Performance comparison of different picking methods on the candidates generated by the candidate generators on BIRD development set with two different temperatures. QP refers to query plan COT, DC refers to divide and conquer COT, and OS is the online synthetic example generation method.
+
+
Picking Method
QP (T=0.5)
QP (T=1.8)
DC (T=0.5)
DC (T=1.8)
OS (T=0.5)
OS (T=1.8)
Lower Bound
50.46
48.63
51.37
47.39
60.43
50.98
Upper Bound
78.55
80.44
78.42
79.34
74.77
79.66
Self-consistency
65.78
65.51
66.43
64.41
67.34
66.88
Our Selection Agent
71.7
71.73
71.31
70.53
70.4
71.38
+
+# 3.2 ABLATION STUDIES
+
+In the previous sections, we evaluate the importance of the selection agent and each candidate generation method. Next, we focus on the analysis of the remaining components of CHASE-SQL: LSH for value retrieval, the query fixer, and three reasoning strategies (QP, OS, and DC). Table 7 shows the performance of CHASE-SQL without each of these steps, highlighting their significance in achieving higher-quality performance. The results demonstrate the contribution of each component, where
+
+Table 7: Ablation studies on the performance of CHASE-SQL after removing the query fixer, LSH for value retrieval, and reasoning strategies, i.e., QP, OS, and DC.
+
+
Method
Execution Accuracy (%)
Δ(%)
CHASE-SQL All
73.01
-
CHASE-SQL w self-consistency
68.84
-4.17
CHASE-SQL w ranker agent
65.51
-7.5
CHASE-SQL w/o LSH
70.09
-2.92
CHASE-SQL w/o Query Fixer
69.23
-3.78
CHASE-SQL w/o QP
72.36
-0.65
CHASE-SQL w/o OS
72.16
-0.85
CHASE-SQL w/o DC
71.77
-1.24
+
+removing LSH, the query fixer, or any of the candidate generators leads to a reduction in execution accuracy, further validating the importance of these components of CHASE-SQL. Moreover, the table compares the performance of our binary selection agent with two other selection methods: self-consistency (Wang et al., 2022) and a ranker agent. The ranker agent receives all candidates generated by our three candidate generators in a single prompt, compares them, and produces a ranking for each. For the ranker agent, we select the query with the lowest rank as the best answer. The binary selection agent significantly outperforms both the self-consistency and ranker agents, demonstrating the effectiveness of the proposed method.
+
+# 4 CONCLUSION
+
+We introduce a novel agentic framework, CHASE-SQL, to leverage test-time compute for generating diverse, high-quality SQL queries and accurately selecting the correct one. We propose multiple chain-of-thought prompting methods and an online synthetic example generation technique, along with a query selection mechanism that scores candidates based on pairwise comparisons. Our framework, CHASE-SQL, sets a new state-of-the-art in the notable public Text-to-SQL leaderboard (at the time of the submission), demonstrating the effectiveness of test-time computation for both generating diverse queries and selecting the most accurate response. CHASE-SQL addresses key issues like query diversity and selection optimization, paving the way for further improvements in complex reasoning tasks encountered at real-world Text-to-SQL challenges.
+
+# REFERENCES
+
+Rishabh Agarwal, Avi Singh, Lei M Zhang, Bernd Bohnet, Luis Rosias, Stephanie C.Y. Chan, Biao Zhang, Aleksandra Faust, and Hugo Larochelle. Many-shot in-context learning. In ICML 2024 Workshop on In-Context Learning, 2024. URL https://openreview.net/forum?id=goi7DFHlqS.
+Mistral AI. Mistral large 2407. https://mistral.ai/news/mistral-large-2407/, 2024. Accessed: 2024-11-16.
+
+Ion Androutsopoulos, Graeme D Ritchie, and Peter Thanisch. Natural language interfaces to databases—an introduction. Natural language engineering, 1(1):29-81, 1995.
+Ruichu Cai, Jinjie Yuan, Boyan Xu, and Zhifeng Hao. Sadga: Structure-aware dual graph aggregation network for text-to-sql. Advances in Neural Information Processing Systems, 34:7664-7676, 2021.
+Ruisheng Cao, Lu Chen, Zhi Chen, Yanbin Zhao, Su Zhu, and Kai Yu. Lgesql: line graph enhanced text-to-sql model with mixed local and non-local relations. arXiv preprint arXiv:2106.01093, 2021.
+Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
+Xinyun Chen, Maxwell Lin, Nathanael Scharli, and Denny Zhou. Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128, 2023.
+DongHyun Choi, Myeong Cheol Shin, EungGyun Kim, and Dong Ryeol Shin. Ryansql: Recursively applying sketch-based slot fillings for complex text-to-sql in cross-domain databases. Computational Linguistics, 47(2):309-332, 2021.
+Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab S Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the twentieth annual symposium on Computational geometry, pp. 253-262, 2004.
+Xuemei Dong, Chao Zhang, Yuhang Ge, Yuren Mao, Yunjun Gao, Jinshu Lin, Dongfang Lou, et al. C3: Zero-shot text-to-sql with chatgpt. arXiv preprint arXiv:2307.07306, 2023.
+Dawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun, Yichen Qian, Bolin Ding, and Jingren Zhou. Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363, 2023.
+Jonathan Herzig, Paweł Krzysztof Nowak, Thomas Müller, Francesco Piccinno, and Julian Martin Eisenschlos. Tapas: Weakly supervised table parsing via pre-training. arXiv preprint arXiv:2004.02349, 2020.
+Vagelis Hristidis, Yannis Papakonstantinou, and Luis Gravano. Efficient ir-style keyword search over relational databases. In Proceedings 2003 VLDB Conference, pp. 850-861. Elsevier, 2003.
+Wonseok Hwang, Jinyeong Yim, Seunghyun Park, and Minjoon Seo. A comprehensive exploration on wikisql with table-aware word contextualization. arXiv preprint arXiv:1902.01069, 2019.
+George Katsogiannis-Meimarakis and Georgia Koutrika. A survey on deep learning approaches for text-to-sql. The VLDB Journal, 32(4):905-936, 2023.
+Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. Large language models are zero-shot reasoners. Advances in neural information processing systems, 35:22199-22213, 2022.
+Dongjun Lee, Choongwon Park, Jaehyuk Kim, and Heesoo Park. Mcs-sql: Leveraging multiple prompts and multiple-choice selection for text-to-sql generation. arXiv preprint arXiv:2405.07467, 2024.
+Boyan Li, Yuyu Luo, Chengliang Chai, Guoliang Li, and Nan Tang. The dawn of natural language to sql: Are we fully ready? arXiv preprint arXiv:2406.01265, 2024a.
+Fei Li and Hosagrahar V Jagadish. Constructing an interactive natural language interface for relational databases. Proceedings of the VLDB Endowment, 8(1):73-84, 2014.
+Haoyang Li, Jing Zhang, Cuiping Li, and Hong Chen. Resdqsl: Decoupling schema linking and skeleton parsing for text-to-sql. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 13067-13075, 2023a.
+
+Haoyang Li, Jing Zhang, Hanbing Liu, Ju Fan, Xiaokang Zhang, Jun Zhu, Renjie Wei, Hongyan Pan, Cuiping Li, and Hong Chen. Codes: Towards building open-source language models for text-to-sql. Proceedings of the ACM on Management of Data, 2(3):1-28, 2024b.
+Jinyang Li, Binyuan Hui, Reynold Cheng, Bowen Qin, Chenhao Ma, Nan Huo, Fei Huang, Wenyu Du, Luo Si, and Yongbin Li. Graphix-t5: Mixing pre-trained transformers with graph-aware layers for text-to-sql parsing. arXiv preprint arXiv:2301.07507, 2023b.
+Jinyang Li, Binyuan Hui, Ge Qu, Jiaxi Yang, Binhua Li, Bowen Li, Bailin Wang, Bowen Qin, Ruiying Geng, Nan Huo, et al. Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls. Advances in Neural Information Processing Systems, 36, 2024c.
+Yujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-level code generation with alphabet. Science, 378(6624):1092-1097, 2022.
+Jiachang Liu, Dinghan Shen, Yizhe Zhang, Bill Dolan, Lawrence Carin, and Weizhu Chen. What makes good in-context examples for GPT-3? In Eneko Agirre, Marianna Apidianaki, and Ivan Vulic (eds.), Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd Workshop on Knowledge Extraction and Integration for Deep Learning Architectures, pp. 100–114, Dublin, Ireland and Online, May 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.deelio-1.10. URL https://aclanthology.org/2022.deelio-1.10.
+Karime Maamari, Fadhil Abubaker, Daniel Jaroslawicz, and Amine Mhedhbi. The death of schema linking? text-to-sql in the age of well-reasoned language models. arXiv preprint arXiv:2408.07702, 2024.
+Linyong Nan, Yilun Zhao, Weijin Zou, Narutatsu Ri, Jaesung Tae, Ellen Zhang, Arman Cohan, and Dragomir Radev. Enhancing few-shot text-to-sql capabilities of large language models: A study on prompt design strategies. arXiv preprint arXiv:2305.12586, 2023.
+Ansong Ni, Srini Iyer, Dragomir Radev, Veselin Stoyanov, Wen-tau Yih, Sida Wang, and Xi Victoria Lin. Lever: Learning to verify language-to-code generation with execution. In International Conference on Machine Learning, pp. 26106-26128. PMLR, 2023.
+Rubén Pérez-Mercado, Antonio Balderas, Andrés Muñoz, Juan Francisco Cabrera, Manuel Palomo-Duarte, and Juan Manuel Dodero. Chatbotsq: Conversational agent to support relational database query language learning. SoftwareX, 22:101346, 2023.
+Mohammadreza Pourreza and Davood Rafiei. Din-sql: Decomposed in-context learning of text-tosql with self-correction. Advances in Neural Information Processing Systems, 36, 2024a.
+Mohammadreza Pourreza and Davood Rafiei. Dts-sql: Decomposed text-to-sql with small large language models. arXiv preprint arXiv:2402.01117, 2024b.
+Mohammadreza Pourreza, Ruoxi Sun, Hailong Li, Lesly Miculicich, Tomas Pfister, and Sercan O Arik. SQL-gen: Bridging the dialect gap for text-to-sql via synthetic data and model merging. arXiv preprint arXiv:2408.12733, 2024.
+Abdul Quamar, Vasilis Efthymiou, Chuan Lei, and Fatma Ozcan. Natural language interfaces to data. Found. Trends Databases, 11(4):319-414, 2022. doi: 10.1561/1900000078. URL https://doi.org/10.1561/1900000078.
+Daking Rai, Bailin Wang, Yilun Zhou, and Ziyu Yao. Improving generalization in language model-based text-to-sql semantic parsing: Two simple semantic boundary-based techniques. arXiv preprint arXiv:2305.17378, 2023.
+Noah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan, and Shunyu Yao. Reflexion: Language agents with verbal reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024.
+
+Ruoxi Sun, Sercan Ö Arik, Alex Muzio, Lesly Miculicich, Satya Gundabathula, Pengcheng Yin, Hanjun Dai, Hootan Nakhost, Rajarishi Sinha, Zifeng Wang, et al. SQL-palm: Improved large language model adaptation for text-to-sql (extended). arXiv preprint arXiv:2306.00739, 2023.
+Shayan Talaei, Mohammadreza Pourreza, Yu-Chen Chang, Azalia Mirhoseini, and Amin Saberi. Chess: Contextual harnessing for efficient sql synthesis. arXiv preprint arXiv:2405.16755, 2024.
+Qwen LM Team. Qwen2.5-coder. https://qwenlm.github.io/blog/qwen2.5-coder/, 2024. Accessed: 2024-11-16.
+Bailin Wang, Richard Shin, Xiaodong Liu, Oleksandr Polozov, and Matthew Richardson. Ratsql: Relation-aware schema encoding and linking for text-to-sql parsers. arXiv preprint arXiv:1911.04942, 2019.
+Bing Wang, Changyu Ren, Jian Yang, Xinnian Liang, Jiaqi Bai, Qian-Wen Zhang, Zhao Yan, and Zhoujun Li. Mac-sql: Multi-agent collaboration for text-to-sql. arXiv preprint arXiv:2312.11242, 2023.
+Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022.
+Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022.
+Tianbao Xie, Fan Zhou, Zhoujun Cheng, Peng Shi, Luoxuan Weng, Yitao Liu, Toh Jing Hua, Junning Zhao, Qian Liu, Che Liu, et al. Openagents: An open platform for language agents in the wild. arXiv preprint arXiv:2310.10634, 2023.
+Pengcheng Yin, Graham Neubig, Wen-tau Yih, and Sebastian Riedel. Tabert: Pretraining for joint understanding of textual and tabular data. arXiv preprint arXiv:2005.08314, 2020.
+Tao Yu, Rui Zhang, Kai Yang, Michihiro Yasunaga, Dongxu Wang, Zifan Li, James Ma, Irene Li, Qingning Yao, Shanelle Roman, et al. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task. arXiv preprint arXiv:1809.08887, 2018.
+Tao Yu, Chien-Sheng Wu, Xi Victoria Lin, Bailin Wang, Yi Chern Tan, Xinyi Yang, Dragomir Radev, Richard Socher, and Caiming Xiong. Grappa: Grammar-augmented pre-training for table semantic parsing. arXiv preprint arXiv:2009.13845, 2020.
+
+# A APPENDIX
+
+# A.1 LIMITATIONS AND FUTURE WORKS
+
+Based on the analysis presented in this paper, we demonstrate that the parametric knowledge of recent large language models, such as Gemini-1.5-pro and Mistral Large, contains the necessary information to answer most challenging questions in notable text-to-SQL benchmarks, as evidenced by their high pass@K performance. This highlights the challenge of effectively utilizing the reasoning ability of these models to select the best answer among the candidates. In our work, we concluded that pairwise comparison is an effective approach to identify the best candidate. However, we believe this performance could be further improved by leveraging the reasoning capabilities of the models, either through chain-of-thought prompting or employing more sophisticated search methods, which we leave as directions for future work. Additionally, further research is needed to address the detection of ambiguous questions and to improve the reliability of text-to-SQL systems. Most methodologies in this domain assume that all questions are answerable, which remains a significant limitation in current text-to-SQL approaches.
+
+# A.2 RELATED WORKS
+
+Early Text-to-SQL methods predominantly utilized sequence-to-sequence architectures, encoding user queries and database schemas using models such as Graph Neural Networks (GNNs), Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, and pre-trained transformer encoders (Hwang et al., 2019; Cai et al., 2021; Cao et al., 2021). On the decoding side, these systems employed either slot-filling or auto-regressive modelling approaches to construct the final SQL queries from the encoded inputs (Choi et al., 2021; Wang et al., 2019). Additionally, tabular language models like TaBERT (Yin et al., 2020), TaPas (Herzig et al., 2020), and Grappa (Yu et al., 2020) have been developed to encode both tables and textual data effectively. However, the landscape has evolved with the widespread use of LLMs, which have largely replaced earlier methods with their superior performance (Katsogiannis-Meimarakis & Koutrika, 2023; Quamar et al., 2022). Initially, efforts concentrated on optimizing prompt designs for these LLMs (Pourreza & Rafiei, 2024a; Gao et al., 2023; Dong et al., 2023). Subsequent advancements have introduced more complex methodologies, including schema linking (Li et al., 2024b; Talaei et al., 2024; Pourreza & Rafiei, 2024a;b), self-correction or self-debugging (Chen et al., 2023; Wang et al., 2023; Talaei et al., 2024), and self-consistency techniques (Lee et al., 2024; Sun et al., 2023; Talaei et al., 2024; Maamari et al., 2024), further enhancing the performance by proposing complex LLM-based pipelines.
+
+As previously discussed, one approach to enhance Text-to-SQL performance is based on the consistency of LLM responses. The self-consistency approach, as proposed by Wang et al. (2022), involves sampling multiple responses from an LLM and selecting the most consistent answer based on the majority vote. In the Text-to-SQL context, this technique extends to generating multiple SQL queries for a given question, grouping these queries by their execution results, and selecting a query from the largest cluster as the most consistent answer (Gao et al., 2023; Sun et al., 2023; Talaei et al., 2024). However, recent studies have pointed out the limitations of this method in reliably identifying the correct answer. In response, MCS-SQL (Lee et al., 2024) introduced an approach that utilizes an LLM to rerank the most consistent answers, moving beyond simple majority voting. Despite these advancements, reliance on consistency as a filtering mechanism can inadvertently exclude correct queries that are less frequent among generated candidates, as a critical bottleneck.
+
+# A.3 MODELS
+
+All experiments are conducted using models from the Gemini and Claude, known for their ability to handle long contextual information (Maamari et al., 2024), which is crucial for the Text-to-SQL task involving queries from large databases. For candidate generation, online synthetic example generation, query fixing, column filtering, and keyword extraction, we reported the performance with two models of Gemini 1.5 Pro and Claude-3.5-Sonnet. For the query-picking model, we train a Gemini 1.5 Flash model (which has much less latency than the Gemini 1.5 Pro model) on a dataset of 3.8K samples generated by running the candidate generators on the BIRD training dataset. The
+
+Gemini 1.5 Flash model is trained for 10 epochs using a LoRA adapter with a rank of 16 using Vertex AI tuning API.
+
+# A.4 QUERY FIXING ALGORITHM
+
+In this section, we present the algorithm of the query fixing step of our propose approach.
+
+Algorithm 4 Query fixing method.
+```txt
+Require: Set of candidate SQL queries $C = \{c_1,c_2,\dots ,c_n\}$ ,user question $Q_{u}$ , hint $H_{u}$ , target database $D$ max query fixing threshold $\beta$ , and a fixer model $\theta_{f}$
+1: $C_{fixed}\gets \emptyset /I$ Initialize an empty set $C_{fixed}$ to store the fixed queries
+2: for each candidate query $c_{i}\in C$ do
+3: Execution $\mathbf{\dot{\iota}}\leftarrow$ Execute $(c_i,D)$ // Execute the SQL query over the database
+4: if error in Execution or Execution $= 1$ then
+5: for $j\in \{1,2,\ldots ,\beta \}$ do // Try fixing up to $\beta$ times
+6: $c_{i}\gets \theta_{f}(D,c_{i},Execution_{i})$ // Fix the query using the fixer model
+7: Execution $\mathbf{\dot{\iota}}\leftarrow$ Execute $(c_i,D)$ // Re-execute the fixed query
+8: if not (error in Execution or Execution $= 1$ ) then
+9: $C_{fixed}\gets C_{fixed}\cup \{c_i\} /$ Add the fixed query to the set
+10: break // Exit the fixing loop if successful
+11: end if
+12: end for
+13: else
+14: $C_{fixed}\gets C_{fixed}\cup \{c_i\} /$ Add the query as is if no fixing is needed
+15: end if
+16: end for
+17: return $C_{fixed}$ // Return the set of fixed queries
+```
+
+# A.5 VALUE RETRIEVAL EXAMPLE
+
+In this section, we provide an example of the value retrieval step. For the Given Question: "What is the highest eligible free rate for K-12 students in the schools in Alameda County?", from the "california_schools" Database, the closest database values that are retrieved from the LSH and after reranking are as follows:
+
+```javascript
+Table "schools": "SOCType": ["Preschool"], "EILName": ["Preschool"], "School": [ "Preschool", "MethodSchools", "Alameda County Community", "Alameda County Opportunity", "Alameda High"], "MailStreet": ["4600 Student Lane"], "Street": ["4600 Student Lane"], "AdmLName1": ["Free"], "AdmLName2": ["Freeman"], "MailCity": ["Alameda"], "City": ["Alameda"], "AdmFName1": ["Kate", "Nate", "Bree"], "GServed": ["K-12"], "GSoffered": ["K-12"], "StreetAbr": ["4600 Student Ln.", "MailStrAbr": ["4600 Student Ln.", "AdmLName3": ["Yount"], "AdmFName3": ["Bree"], "County": ["Alameda"], "District": ["Alameda Unified", "Tri-County ROP"], Table "frpm": "School Type": ["Preschool"], "School Name": [ "MethodSchools", "Alameda County Community", "Alameda High"], "County Name": ["Alameda"], Table "satscores": "sname": ["Alameda High"], "cname": ["Alameda"], "dname": ["Alameda County Office of Education"]
+```
+
+Figure 4: An example of the divide and conquer CoT method
+
+# A.6 PERFORMANCE BASED ON DATABASE
+
+In this section, we present the number of samples across different databases where only one of the candidate generators produces a correct result, meaning the other two generators fail to provide a correct answer. A value of zero for any generator in this figure indicates that whenever that generator produces a correct result, the other two generators also manage to generate at least one correct answer.
+
+
+Figure 5: Number of correct queries by each method across different databases of BIRD development set.
+
+# A.7 ERROR ANALYSIS
+
+
+Figure 6: Distribution of system performance based on the final answer correctness. The chart shows the proportion of correct final answers, correct queries existing among candidates but not chosen (wrong selection), no correct candidate cases, and cases were the golden SQL query is wrong.
+
+Fig. 6 provides a pie chart that breaks down the system's performance into four categories: correct final answer (72.9%), correct exists among candidates but not chosen (10.4%), wrong generations or no correct candidate (6.7%), and wrong golden query (10.0%). The majority of responses are correct final answers, but a notable portion falls under correct answers not being chosen by the system. This breakdown helps in understanding areas where the system excels and where improvements can be targeted.
+
+
+Figure 7: Correctness comparison of the system across different databases in two metrics: (1) percentage where the correct query exists among the candidates, and (2) percentage where the correct query is chosen by the selection agent.
+
+Fig. 7 presents a comparative analysis of system correctness across multiple databases. The x-axis lists various databases or categories such as California Schools, Formula 1, and Superhero, while the y-axis represents the percentage performance. Two key metrics are visualized: the first is the percentage where the correct answer exists among the candidates (shown by one bar per category), and the second is the percentage where the correct answer is chosen by the selection system (depicted by a second bar for each category).
+
+# A.7.1 SELECTION AGENT ERROR ANALYSIS
+
+In this section, we examine cases where at least one of the candidate SQL queries generated by the three generators matched the ground truth answer, but the selection agent assigned the highest score to another, incorrect candidate. We categorized these errors into four groups: (1) Vague questions, (2) Wrong picking, (3) Data Integrity Error, and (4) Incorrect gold query. Fig. 8 illustrates the distribution of each category among the sample queries. In the following sections, we will discuss each of these categories in more detail.
+
+
+Figure 8: Error analysis on the cases where selection agent failed to pick the correct SQL query which was among the candidates.
+
+Wrong Picking Errors: The largest portion of errors occurs when the candidate with the highest score from the selection agent is missing a required column, table, or SQL clause. In our analysis, we could not identify a specific types of patterns in the model's mistakes as these mistakes include different types of the errors almost for each instance. Fig. 9 provides an example where the selected SQL query incorrectly uses * to return all columns, instead of just returning the id as specified in the ground truth answer.
+
+
+Figure 9: An example of selection agent preferred SQL query which is incorrect.
+
+Wrong Golden Query Error: The second largest portion of errors occurs when the ground truth SQL query is incorrect, and one of the candidate queries generated by our model replicates the same mistake. However, the selection agent ultimately picks another candidate that correctly answers the question. Fig. 10 provides an example of such a case, where the ground truth query includes an extra molecule_ID column in the SELECT clause, which was not specified in the question.
+
+
+Figure 10: An example of an error case where the selection agent picked a correct SQL query and the gold query was wrong.
+
+Vague Question: Another significant portion of errors occurs when the question does not specify which column to return or use for filtering, and multiple columns could satisfy the query. In these cases, although one of the candidates was the correct SQL query, the selection model favored another response that could also be considered correct. Fig. 11 illustrates such a case where "Fresno" could refer to either a city or a county, but the question doesn't specify which one to return. The selection model chose the query that used "city" and did not select the candidate that used "county.
+
+
+Figure 11: An example of an error case where the selection model picked a query which could be considered as correct as the question is vague.
+
+Data Integrity Error: Finally, the smallest category of errors involves cases where two or more columns are supposed to have consistent values, but one or more columns contain missing values.
+
+For example, Fig. 12 shows a case where the "School" and "School Name" columns were both expected to contain the names of schools, but one of the columns has missing values.
+
+
+Figure 12: An example of an error case where the selection agent picked a correct candidate but because of the data inconsistency the execution accuracy was zero for this candidate.
+
+# A.7.2 ERROR ANALYSES
+
+We present the manual error analysis we conducted on one-third of the cases where none of the generated candidate queries were correct. We categorized these errors into five main types: (1) Schema linking errors, (2) Incorrect logic, (3) SQL function errors, (4) JOIN issues, and (5) Ignoring evidence. Fig. 13 illustrates the distribution of these error categories. As shown, the most common errors occur when none of the candidate queries correctly utilized the columns or tables required to answer the question. In the following section, we describe the specific types of errors that fall under each category.
+
+
+Figure 13: Error analysis on the cases where all candidate generators failed to produce a single correct answer.
+
+Schema Linking Errors: The schema linking errors category includes cases where none of the generated candidate SQL queries correctly use the columns required to answer the question. These errors often occur in databases where column names are ambiguous or confusing for the model. Fig. 14 provides an example where the LLM failed to correctly calculate the average to return the correct column that was expected.
+
+Wrong Logic Error: This category, which represents the second largest portion of errors, includes cases where the logic of the generated candidate queries is incorrect. These errors involve missing elements such as the DISTINCT keyword, NOT NULL conditions, missing columns in the SELECT clause, or incorrect or missing conditions in the WHERE or HAVING clauses. An example is shown in Fig. 15, provides an example where the LLM failed to correctly calculate the average total price due to incorrect logic computing the average total price.
+
+
+Figure 14: An example of schema linking error category.
+
+
+Figure 15: An example of wrong logic error category.
+
+SQL Functions Error: This category, the third-largest source of errors, includes queries where the error results from the incorrect use of, or failure to include, SQL functions such as COUNT(), CAST(), AVG(), ROUND(), and others. Fig. 16 illustrates a case where none of the candidate queries used the ROUND() function as required by the question.
+
+
+Figure 16: An example of wrong usage of SQL functions error category.
+
+Joins Error: This category represents a smaller portion of the error cases, where the source of the error is missing one or more tables in the JOIN clauses of the predicted SQL queries.
+
+Ignoring Evidence Error: This category represents the smallest portion of error cases, where the correct column or table is explicitly mentioned in the provided evidence, but the LLM disregards it and uses its own selection instead.
+
+# A.8 DIVIDE AND CONQUER PROMPT
+
+In this section, we provide an example of a divide-and-conquer prompt used in one of the few-shot in-context learning demonstrations to illustrate the decomposition and aggregation steps.
+
+
Database Info
+{DATABASE_SCHEMA}
**********
Question
Question: What is the gender of the youngest client who opened account in the lowest average salary branch?
Hint: Given that Later birthdate refers to younger age; A11 refers to average salary
**********
**1. Divide and Conquer:**
* **Main Question:** What is the gender of the youngest client who opened account in the lowest average salary branch?
* **Analysis:** Question asking about 'gender', and it appears in table 'client'. We will use this as the output column, selecting it from the youngest client in the lowest average salary branch.
* **Pseudo SQL:** SELECT 'T1'. 'gender' FROM 'client' AS 'T1' WHERE youngest client in the lowest average salary branch
* **Sub-question 1:** youngest client in the lowest average salary branch
* **Analysis:** According to the hint, we need to use the 'A11' from 'district' to get the salary info, and the youngest client can be obtained from using the 'birth_date' column of table 'client'. The items between these two tables can be INNER JOIN using district_id.
* **Pseudo SQL:** SELECT 'T1'. 'client_id' FROM 'client' AS 'T1' INNER JOIN 'district' AS 'T2' ON 'T1'. 'district_id' = 'T2'. 'district_id' WHERE lowest average salary branch ORDER BY 'T1'. 'birth_date' DESC NULLS LAST LIMIT 1
* **Sub-question 1.1:** lowest average salary branch
* **Analysis:** We can get the lowest average salary branch using order by 'A11' ASC and pick top 1. The column 'A11' is not NULLABLE, so we do not need to add "IS NOT NULL" filter *
**Pseudo SQL:** SELECT 'district_id' FROM 'district' ORDER BY 'A11' ASC LIMIT 1
**2. Assembling SQL:**
* **Sub-question 1.1 (lowest average salary branch):** * **SQL:** SELECT 'district_id' FROM 'district' ORDER BY 'A11' ASC LIMIT 1
* **Sub-question 1 (youngest client in the lowest average salary branch):**
* **SQL:** SELECT 'T1'. 'client_id' FROM 'client' AS 'T1' INNER JOIN 'district' AS 'T2' ON 'T1'. 'district_id' = 'T2'. 'district_id' WHERE 'T2'. 'district_id' IN (SELECT 'district_id' FROM 'district' ORDER BY 'A11' ASC LIMIT 1) ORDER BY 'T1'. 'birth_date' DESC NULLS LAST LIMIT 1
* **Main Question (gender of the client):**
* **SQL:** SELECT 'T1'. 'gender' FROM 'client' AS 'T1' WHERE 'T1'. 'client_id' = (SELECT 'T1'. 'client_id' FROM 'client' AS 'T1' INNER JOIN 'district' AS 'T2' ON 'T1'. 'district_id' = 'T2'. 'district_id' WHERE 'T2'. 'district_id' IN (SELECT 'district_id' FROM 'district' ORDER BY 'A11' ASC LIMIT 1) ORDER BY 'T1'. 'birth_date' DESC NULLS LAST LIMIT 1)
**3. Simplification and Optimization:**
* The nested queries can be combined using a single 'INNER JOIN' and the filtering can be done within a single 'ORDER BY' clause.
**Final Optimized SQL Query:**
SELECT 'T1'. 'gender' FROM 'client' AS 'T1' INNER JOIN 'district' AS 'T2' ON 'T1'. 'district_id' = 'T2'. 'district_id' ORDER BY 'T2'. 'A11' ASC, 'T1'. 'birth_date' DESC NULLS LAST LIMIT 1
+
+Figure 17: An example of the divide and conquer CoT method
+
+An example of question/SQL pair where the divide-and-conquer CoT approach was the only generator that solved the problem.
+
+
+Figure 18: An example of query that has been solved only with the divide and conquer CoT method.
+
+# A.9 QUERY PLAN PROMPT
+
+In this section, we provide an example of a query (execution) plan prompt used in one of the few-shot in-context learning demonstrations to illustrate the steps.
+
+Database Info
+
+{DATABASE_SCHEMA}
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Answer Repeating the question and evidence, and generating the SQL with a query plan.
+
+**Question**: How many Thai restaurants can be found in San Pablo Ave, Albany?
+
+**Evidence**: Thai restaurant refers to food_type = 'thai'; San Pablo Ave Albany refers to street_name = 'san pablo ave' AND T1.city = 'albany'
+
+**Query Plan**:
+
+** Preparation Steps:**
+
+1. Initialize the process: Start preparing to execute the query.
+2. Prepare storage: Set up storage space (registers) to hold temporary results, initializing them to NULL.
+3. Open the location table: Open the location table so we can read from it.
+4. Open the generalinfo table: Open the generalinfo table so we can read from it.
+
+** Matching Restaurants:**
+
+1. Start reading the location table: Move to the first row in the location table.
+2. Check if the street matches: Look at the street_name column of the current row in location. If it's not "san pablo ave," skip this row.
+3. Identify the matching row: Store the identifier (row ID) of this location entry.
+4. Find the corresponding row in generalinfo: Use the row ID from location to directly find the matching row in generalinfo.
+5. Check if the food type matches: Look at the food_type column in generalinfo. If it's not "thai," skip this row.
+6. Check if the city matches: Look at the city column in generalinfo. If it's not "albany," skip this row.
+
+** Counting Restaurants:**
+
+1. Prepare to count this match: If all checks pass, prepare to include this row in the final count.
+2. Count this match: Increment the count for each row that meets all the criteria.
+3. Move to the next row in location: Go back to the location table and move to the next row, repeating the process until all rows are checked.
+4. Finalize the count: Once all rows have been checked, finalize the count of matching rows.
+5. Prepare the result: Copy the final count to prepare it for output.
+
+** Delivering the Result:**
+
+1. Output the result: Output the final count, which is the number of restaurants that match all the specified criteria.
+2. End the process: Stop the query execution process.
+3. Setup phase: Before starting the actual query execution, the system prepares the specific values it will be looking for, like "san pablo ave," "thai," and "albany."
+
+**Final Optimized SQL Query:**
+
+SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2_street_name = 'san pablo ave'
+
+Figure 19: An example of the query plan CoT method
+
+
+Fig. 20 provides an example of a query plan generated by using the EXPLAIN command.
+Figure 20: An example of SQLite query plan generated by using the EXPLAIN command.
+
+Additionally Fig. 21 provides an example question that was solved by using the query plan-based CoT strategy.
+
+
+Figure 21: An example of query that has been solved only with the query plan CoT method.
+
+# A.10 QUERY FIXING PROMPT
+
+In this section, we provide the prompt template for the SQL query fixing step.
+
+**Task Description:**
+
+You are an SQL database expert tasked with correcting a SQL query. A previous attempt to run a query did not yield the correct results, either due to errors in execution or because the result returned was empty or unexpected. Your role is to analyze the error based on the provided database schema and the details of the failed execution, and then provide a corrected version of the SQL query.
+
+**Procedure:**
+
+1. Review Database Schema:
+- Examine the table creation statements to understand the database structure.
+2. Analyze Query Requirements:
+- Original Question: Consider what information the query is supposed to retrieve.
+- Hint: Use the provided hints to understand the relationships and conditions relevant to the query.
+- Executed SQL Query: Review the SQL query that was previously executed and led to an error or incorrect result.
+- Execution Result: Analyze the outcome of the executed query to identify why it failed (e.g., syntax errors, incorrect column references, logical mistakes).
+3. Correct the Query:
+- Modify the SQL query to address the identified issues, ensuring it correctly fetches the requested data according to the database schema and query requirements.
+
+**Output Format:**
+
+Present your corrected query as a single line of SQL code, after Final Answer. Ensure there are no line breaks within the query.
+
+Here are some examples:
+
+{EXAMPLES}
+
+- - - - - - Your task - - - - - -
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Table creation statements
+
+{DATABASE_SCHEMA}
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+The original question is:
+
+Question:
+
+{QUESTION}
+
+Evidence:
+
+{HINT}
+
+The SQL query executed was:
+
+{QUERY}
+
+The execution result:
+
+{RESULT}
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Based on the question, table schema and the previous query, analyze the result try to fix the query.
+
+Figure 22: The prompt template used for query fixing
+
+# A.11 SELECTION AGENT PROMPT
+
+In this section, we provide the prompt template used for training and query picking at test time by the trained selection agent. Note that the database schema used in this step is the union of the columns and tables by the two candidates instead of using the full-schema of all tables in the database.
+
+```txt
+Instruction:
+Given the DB info and question, there are two candidate queries. There is correct one and incorrect one, compare the two candidate answers, analyze the differences of the query and the result. Based on the original question and the provided database info, choose the correct one.
+Database Schema
+{DATABASE_SCHEMA}
+**********
+Question:
+{QUESTION}
+Evidence:
+{HINT}
+**********
+Candidate A
+{CANDIDATE_A_QUERY}
+Execution result
+{CANDIDATE_A_result}
+**********
+Candidate B
+{CANDIDATE_B_QUERY}
+Execution result
+{CANDIDATE_B_RESULT}
+Just output the correct answer "A" or "B".
+```
+
+Figure 23: The prompt template used for query fixing
+
+# A.12 GENERATED SYNTHETIC EXAMPLES ANALYSIS
+
+
+Figure 24: Synthetic examples generated for the 'california_schools' database question with different guidelines for common SQL features and filtered columns.
+
+Table 8: Ablation studies on synthetic example generation guidelines, $R_f$ with common SQL features and $R_t$ with filtered schema. The baseline is the original BIRD prompt Zero-shot CoT with Gemini 1.5 pro on the BIRD dev set. Total of 75 examples are generated for each example set $(R_f, R_t)$ and for the mixed $(R_f + R_t)$
+
+
Method
Execution Accuracy (%)
Δ(%)
Baseline (Zero-shot)
57.75
-
OS w/ Rf
65.45
+7.7
OS w/ Rt
66.75
+9.0
OS w/ Rf + Rt
67.09
+9.34
+
+Table 8 illustrates the ablation studies done with different guidelines and their generated example sets. Compared to the baseline (no example), the user question and its associated data schema targeted synthetic examples can help; we try to promote the diversity of the examples to avoid overfitting the output to certain patterns (e.g., the model always writes a SQL with JOIN if shown mostly JOIN examples).
+
+Figure 25: Distribution (normalized) of synthetic vs. ground truth examples in different SQL features/clauses. All examples are generated using gemini-1.5-pro for the questions and schemas from the BIRD-Bench dev dataset.
+
+
+(a) Our synthetic examples with explicit guidelines, $R_{f}$ and $R_{t}$
+
+
+(b) Synthetic examples following cross-domain data augmentation strategy (Li et al., 2024b)
+
+Fig. 25a shows the SQL feature distribution of the generated synthetic examples for the BIRD dev dataset, which closely follows the actual SQL features distribution, except CASE statement. We
+
+omit CASE statement examples, since showing examples with CASE statement did not help with the generation, unless the ground-truth SQL query actually used it.
+
+Table 9: Example quality comparison between our synthetic examples (OS) and other example sets, prepared by two other approaches: relevant training examples by question similarity $(\sigma(\text{train}))$ and a different synthetic example generation strategy (CodeS). To isolate the impact of example quality, we only generated a single output candidate without any self-correction with varying numbers of examples $n$ .
+
+
n
5
25
75
125
σ(train)
58.80
58.54
57.69
56.91
CodeS
60.76
60.63
59.97
59.06
OS
62.13
64.02
64.41
63.69
+
+Table 9 demonstrates how the online synthetic example generation (OS) yields more useful example set for in-context learning, compared to two other approaches. Training dataset is a commonly used source of few-shot examples, where examples are selected by question similarity $(\sigma(\text{train}))$ . Data augmentation is another technique used for cross-domain adaptation, where either extra fine-tuning data or few-shot examples are synthesized. The proposed technique in (Li et al., 2024b) uses two-step example generation, where the model is 1) asked to come up with questions to ask given the schema; 2) asked to fill in the blanks of example templates with the schema elements. There is no specific guidelines to the example and SQL structures for the first step, and the second step uses a set of universal question/SQL templates with limited complexity (e.g., only single table, non-nested queries with up to 3 columns). The resulting example SQL feature distribution is shown in Fig. 25b.
+
+# A.13 SYNTHETIC EXAMPLE GENERATION PROMPTS
+
+In this section we provided the prompt template for the online synthetic example generation step.
+
+You are a SQLite SQL expert. Your job is to create $\{\mathbf{k}\}$ examples, where each example consists of a question and a SQL query to fetch the data for it. I want each example to look like this, question input and SQL output pairs:
+
+··
+
+"input": "What's the description of the series code SM.POP.TOTL for Aruba? (Hints: Aruba is the name of the country where ShortName = 'Aruba')"
+
+"output": "SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Name = 'Aruba' AND T2.Seriescode = 'SM.POP.TOTL'"
+
+You should generate examples that examine and showcase different aspects and relationships of the following table schemas, described in "Table creation statements". Understand the database tables and their relationships. Understand the columns and their types and meanings to construct interesting examples.
+
+Generate a mixture of SQL examples that include:
+
+- some simple SQL query examples without JOIN
+- some SQL query examples with aggregates, like COUNT
+- some simple SQL query examples with JOIN
+- some complex SQL query examples with nested JOIN
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Table creation statements
+
+{TARGET_database_SCHEMA}
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Generate total of $\{\mathbf{k}\}$ examples. Only outputs the examples (question input and SQL output pairs), and each example can be separated by a new line.
+
+Figure 26: Synthetic example generation prompt used for common SQL features examples generation. TARGET_database_SCHEMA contains all the tables from the target database.
+
+You are a SQLite SQL expert. Your job is to create a set of examples, where each example consists of a question and a SQL query to fetch the data for it.
+
+You should generate examples that examine and showcase different aspects and relationships of the following table schemas. Understand the database tables and their relationships. Understand the columns and their types and meanings to construct interesting examples.
+
+I will also show you multiple examples generated for the other database and its table schemas, so you can see what kind of examples can be generated for a given database.
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Examples from other database## The following is the table schemas and column examples for other database:
+
+The database (\{'TRAIN_DATABASE_NAME\}) structure is defined by the following table schemas (comments after $-$ provide additional column descriptions).
+
+{TRAIN_database_SCHEMA}
+
+The following are the examples generated for the above database schemas:
+
+Example 1) "input": "Among the countries in the group of Heavily Indebted Poor Countries, how many of them are under the lending category of the International Development Associations?
+
+(Hints: group of Heavily Indebted Poor Countries is OtherGroups = 'HIPC'; International Development Associations refers to lendingcategory = 'IDA')
+
+"output": "SELECT COUNT(CountryCode) FROM Country WHERE LendingCategory = 'IDA' AND OtherGroups = 'HIPC'"
+
+···
+
+Example 10) "input": "What is the description of the footnote on the series code AG.LND.FRST.K2 in 1990 for Aruba?
+
+(Hints: Year = 1990; Aruba is the name of country where ShortName = 'Aruba')
+
+"output": "SELECT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2' AND T2 Year = 'YR1990'"
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Now similarly, generate examples (question input and SQL output pairs) for the table schemas defined below, in "Table creation statements".
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Table creation statementsTARGET DATABASE SCHEMA
+
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+
+Only outputs the examples (question input and SQL output pairs), and each example can be separated by a new line.
+
+Figure 27: Synthetic example generation prompt. This is use TARGET_database_SCHEMA filtered with column selection result, and the model is asked to generate simple examples similar to the ones taken from the training dataset (separate from the test or dev dataset).
\ No newline at end of file
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/images.zip b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..66d612fc55e7741962aad02f8873f9fc4493ae43
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:19813711f2f5517d905d70a2e15ce0cb7fa4b1bc7b74409dcee480af5cee6326
+size 1277195
diff --git a/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/layout.json b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..b39d345c3e82431426b84e7aeec7c81cda54bc3b
--- /dev/null
+++ b/ICLR/2025/CHASE-SQL_ Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d8198442f687f3f22dc4920cc97f27406414038cd3e0de30cf96d4e3baee2ee5
+size 738284
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_content_list.json b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..a7770edd1d1d0eebaa5665a23574fa3ed0e88b45
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:42b1075eef2c48f46bcc36a3f2264d6ed59238bbe193a7f7f6a0e118e2475c62
+size 144790
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_model.json b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..caa4d3982616f814a619c6270dc9a99c392f256c
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e0c70a641589f652e6216a536a7a7102683564d25549213ae9e53b6c9dad6795
+size 173873
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_origin.pdf b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..cb41dcb96647b67f7bec56917500e281103753ed
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/3ae3051c-9f1d-42d4-b7ef-2aba5b70d1e0_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4df5fc9088bb2e6218569f61e07ba4e5d36c7eb1702b52dc31001cc3377248b8
+size 7988451
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/full.md b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..57bbbeaa8d2c7231f4a437b7aa0a1d98ee9de672
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/full.md
@@ -0,0 +1,646 @@
+# CHiP: CROSS-MODAL HIERARCHICAL DIRECT PREFERENCE OPTIMIZATION FOR MULTIMODAL LLMS
+
+Jinlan Fu1 Shenzhen Huangfu1,2* Hao Fei1 Xiaoyu Shen3
+Bryan Hooi1 Xipeng Qiu2† See-Kiong Ng1
+
+$^{1}$ National University of Singapore $^{2}$ Fudan University
+$^{3}$ Digital Twin Institute, Eastern Institute of Technology, Ningbo
+
+jinlanjonna@gmail.com, shenzhenhuangfu@gmail.com
+
+# ABSTRACT
+
+Multimodal Large Language Models (MLLMs) still struggle with hallucinations despite their impressive capabilities. Recent studies have attempted to mitigate this by applying Direct Preference Optimization (DPO) to multimodal scenarios using preference pairs from text-based responses. However, our analysis of representation distributions reveals that multimodal DPO struggles to align image and text representations and to distinguish between hallucinated and non-hallucinated descriptions. To address these challenges, in this work, we propose a Cross-modal Hierarchical Direct Preference Optimization (CHiP) to address these limitations. We introduce a visual preference optimization module within the DPO framework, enabling MLLMs to learn from both textual and visual preferences simultaneously. Furthermore, we propose a hierarchical textual preference optimization module that allows the model to capture preferences at multiple granular levels, including response, segment, and token levels. We evaluate CHiP through both quantitative and qualitative analyses, with results across multiple benchmarks demonstrating its effectiveness in reducing hallucinations. On the Object Hal-Bench dataset, CHiP outperforms DPO in hallucination reduction, achieving improvements of $52.7\%$ and $55.5\%$ relative points based on the base model Muffin and LLaVA models, respectively. We make all our datasets and code publicly available. $^1$
+
+# 1 INTRODUCTION
+
+The emergence of large language models (LLMs) has demonstrated unprecedented intelligence (Chiang et al., 2023; Touvron et al., 2023; AI@Meta, 2024), bringing us closer to achieving human-level AI. Concurrently, building on the foundation of text-based LLMs, research in Multimodal Large Language Models (MLLMs) has also rapidly surged, leading to the development of powerful multimodal models such as GPT-4V (OpenAI, 2023), BLIP2 (Li et al., 2023a), and LLaVA (Liu et al., 2024c). The current MLLMs typically integrate the visual encoder into the text-oriented backbone LLMs through a connector to achieve the understanding of visual signals (Liu et al., 2024c; Yao et al., 2024). Although MLLMs have achieved impressive results, hallucination remains a significant challenge, where the model's output is not based on the visual input (Bai et al., 2024; Jiang et al., 2024).
+
+With the help of Direct Preference Optimization (DPO) (Rafailov et al., 2024) (Fig. 2-(a)), text-oriented LLMs have achieved satisfactory alignment with human preferences, which can help prevent hallucinations and enhance their ability to meet human needs. However, the alignment techniques for Multimodal LLMs (MLLMs) remain underexplored. A natural approach is to extend DPO from the text modality to multimodal contexts through multimodal DPO (Pi et al., 2024; Sarkar et al., 2024a) (Fig. 2-(b)). However, simply replacing text preference data with multimodal preference data
+
+
+(a) LLaVA
+
+
+(b) LLaVA+DPO
+
+
+(c) $\mathrm{LLaVA + CHiP}$
+
+
+(d) Performance
+
+
+(a) DPO
+Figure 2: Comparison of preference optimization in different scenarios: (a) DPO, (b) Multimodal DPO, and (c) Cross-modal Hierarchical Direct Preference Optimization (CHiP). $x$ represents the instruction. $y_{w}$ denotes the response preferred by the human over $y_{l}$ . $m_{w}$ represents the image that is more likely to generate the preferred response $y_{w}$ than $m_{l}$ . $\star (\triangle)$ and $\star (\triangle)$ represent the segments (tokens) involved in the hierarchy reward calculation in the preferred and unpreferred responses.
+
+
+(b) Multimodal DPO
+
+
+Figure 1: Comparison of representation distributions and performance across models. Representations are constructed by selecting 150 samples (images, non-hallucinated descriptions, and hallucinated descriptions). The image or text semantics are represented using the last token embedding from the LLM. (d) is the hallucination rate (lower the better) comparison of different models on hallucination benchmarks, namely ObjHal, MMHal, and AMBER. Findings: (1) DPO struggles to align image and description representations and to effectively distinguish between hallucinated and non-hallucinated descriptions. (2) The proposed CHiP method, which incorporates both image and fine-grained text preferences, achieves better alignment between images and ground-truth descriptions while increasing the distance between ground-truth and hallucinated descriptions. (3) CHiP outperforms DPO and original LLaVA in terms of hallucination rate.
+(c) CHiP
+
+
+
+is insufficient to handle complex multimodal scenarios. In this work, we identify the limitations of multimodal DPO by visualizing the representation distributions of both images and texts and propose solutions to overcome these challenges. Ideally, for well-aligned MLLMs, the representations of an image and its ground-truth description should be as close as possible, while the representations of ground-truth and hallucinated descriptions should be more distant. Fig. 1 shows a visualization of the last token representations of image and text in the LLM (specifically LLaMA (Touvron et al., 2023)) for LLaVA-1.6 (Liu et al., 2024b), using 150 samples (image, ground-truth description, and hallucinated description). Fig. 1-(a, b, d) highlights the limitations of multimodal DPO, showing its difficulty in aligning image and description representations and distinguishing between hallucinated and non-hallucinated descriptions, hindering performance improvement in hallucination evaluations.
+
+To address these limitations, we propose Cross-modal Hierarchical Direct Preference Optimization (CHiP) (Fig. 2-(c)), which enhances the alignment from multiple textual granularities (e.g., response, segment, token levels) and visual preferences. Specifically, we introduce Visual Preference Optimization by constructing visual preference pairs, allowing the model to learn preferences from both text and visual modalities, aligning text and image representations more closely. Moreover, we introduce a Hierarchical Textual Preference Optimization to allow MLLMs to acquire preference information at multiple granular levels, namely, response, segment, and token, enhancing their ability to differentiate between hallucinated and non-hallucinated text. To validate the efficacy of CHiP, we evaluate it on four popular hallucination benchmarks under LLaVA-1.6 and Muffin frameworks. The results show that CHiP outperforms GPT-4V significantly on the evaluated benchmarks. Moreover, on the Object HalBench dataset, based on Muffin and LLaVA-1.6 models, CHiP outperforms DPO in hallucination reduction, with performance improvements of $52.7\%$ and $55.5\%$ relative points, respectively.
+
+To sum up, our contributions are threefold:
+
+- We analyze the limitations of multimodal DPO through image and text representation distributions, emphasizing its failure to achieve cross-modal semantic alignment and distinguish between hallucinated and non-hallucinated descriptions.
+- We propose CHiP to address these limitations. CHiP includes a hierarchical textual preference optimization module to capture fine-grained (i.e., response, segment, and token) preferences and a visual preference optimization module to extract cross-modal preferences.
+- We equipped CHiP with various MLLMs, and the results of multiple datasets demonstrate that CHiP reduces hallucinations and enhances cross-modal semantic alignment.
+
+# 2 RELATED WORK
+
+Multimodal Large Language Models (MLLMs) (Liu et al., 2024c; Bai et al., 2023; Dai et al., 2023; He et al., 2024) play a crucial role in multimodal understanding and reasoning tasks by processing both images and text. Their development has been fueled by progress in open-source LLMs (Touvron et al., 2023; AI@Meta, 2024; Chiang et al., 2023) and cutting-edge image encoders (Radford et al., 2021b; Wang et al., 2023c; Li et al., 2022).
+
+However, misalignment between images and text causes MLLMs to face issues like hallucinations and errors. Mitigating hallucinations is a crucial research of MLLMs. Hallucination mitigation strategies generally fall into two categories: training-free and training-based methods. Training-free approaches (Huang et al., 2024; Yin et al., 2023) handle potential hallucinations by post-processing MLLMs' outputs. On the other hand, training-based approaches aim to reduce hallucinations through instruction fine-tuning (Liu et al., 2023b; Zhang et al., 2024) or preference learning (Gunjal et al., 2024; Li et al., 2023b; Sun et al., 2023; Yu et al., 2024a; Deng et al., 2024; Wang et al., 2024). For example, REVERIE (Zhang et al., 2024) is a reflective instruction tuning method that incorporates rationale learning into visual instruction tuning. As for the preference learning, for example, Gunjal et al. (2024) proposed Fine-grained DPO (FDPO) and trained a fine-grained multimodal reward model based on InstructBLIP (Dai et al., 2023).
+
+Different from previous research, we address the visual-language preference misalignment in MLLMs by introducing a novel cross-modal hierarchical DPO (i.e., CHiP), which simultaneously optimizes preferences in both the text and image modalities from a fine-grained perspective. Our approach demonstrates better alignment between the two modalities from the visualization of representation and reduced hallucination generation.
+
+# 3 PRELIMINARIES
+
+Direct Preference Optimization (DPO) (Rafailov et al., 2024) is primarily a preference optimization method that focuses on aligning language models with human preferences without the need for explicit reward modeling or reinforcement learning. Given a model to be optimized $\pi_{\theta}$ , and the reference policy $\pi_{\mathrm{ref}}$ , which is a supervised fine-tuning model, the RL optimization of RLHF can be formulated as:
+
+$$
+\max _ {\pi_ {\theta}} \mathbb {E} _ {x \sim \mathcal {D}, y \sim \pi_ {\theta} (y | x)} [ r (x, y) ] - \beta \mathbb {D} _ {\mathrm {K L}} [ \pi_ {\theta} (y \mid x) | | \pi_ {\text {r e f}} (y \mid x) ]. \tag {1}
+$$
+
+By maximizing the KL-constrained reward objective to obtain the optimal solution and establishing a mapping between the reward model and the optimal policy, the representation of the reward function is derived as follows:
+
+$$
+r (x, y) = \beta \log \frac {\pi_ {\theta} (y | x)}{\pi_ {\text {r e f}} (y | x)} + \beta \log Z (x), \tag {2}
+$$
+
+where $x$ is the input instruction, $y$ is the response, $\beta$ is a constant, and $Z(x)$ is the partition function.
+
+Given the chosen response $y_{w}$ , where the evaluator preferred it over the rejected response $y_{l}$ , DPO is expected to learn to maximize the reward difference between chosen $(y_{w})$ and rejected responses $(y_{l})$ . The preference optimization objective becomes:
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathcal {D P O}} = - \mathbb {E} _ {(x, y _ {w}, y _ {l})} [ \log \sigma (r (x, y _ {w}) - r (x, y _ {l})) ] \\ = - \mathbb {E} _ {\left(x, y _ {w}, y _ {l}\right)} \left[ \log \sigma \left(\beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} \mid x\right)}{\pi_ {\text {r e f}} \left(y _ {l} \mid x\right)}\right) \right], \tag {3} \\ \end{array}
+$$
+
+where DPO learns preferences based on the ranking of the entire response, and the action score can be formulated as:
+
+$$
+\log \pi (y | x) = \sum_ {y _ {i} \in y} \log p \left(y _ {i} \mid x, y _ {< i}\right), \tag {4}
+$$
+
+where $y_{i}$ denotes the $i$ -th token of the response $y$ . During DPO training, the reference model $\pi_{\mathrm{ref}}(y|x)$ is usually kept fixed while the policy model $\pi_{\theta}(y|x)$ is updated.
+
+# 4 METHODOLOGY: CROSS-MODAL HIERARCHICAL DIRECT PREFERENCE OPTIMIZATION
+
+In this section, we will introduce the Cross-modal Hierarchical Direct Preference Optimization (CHiP). CHiP consists of two modules: (1) Hierarchical Textual Preference Optimization, which incorporates preference optimization at the response, segment, and token levels; and (2) Visual Preference Optimization, which addresses the overlooked visual information.
+
+# 4.1 HIERARCHICAL TEXTUAL PREFERENCE OPTIMIZATION
+
+Image-based responses are often long and complex, and response-level preference optimization relies on rough rankings of response quality without clearly identifying which segments or tokens contain hallucinations. This makes it challenging to assign credit to desirable behaviors, leading to reward hacking (Laidlaw et al., 2024) and the need for a large amount of labeled data. Therefore, we introduce the Hierarchical Textual Preference Optimization module to assign rewards from fine-grained.
+
+For MLLMs, each sample includes an image $(m)$ in addition to prompt $x$ , chosen response $y_{w}$ , and rejected response $y_{l}$ . Multimodal DPO relies on both prompt $x$ and image $m$ to select the preferred response from $\{y_w,y_l\}$ . Next, we will provide a detailed illustration of the three levels of preference optimization for text: response-level, segment-level, and token-level.
+
+Response-level Preference Optimization $(\mathcal{L}_{\mathcal{DPO}_r})$ . At the response level, DPO in the MLLMs' scenario aims to maximize $\sigma (r(x,m_w,y_w) - r(x,m_w,y_l))$ , and the objective function can be formulated as:
+
+$$
+\mathcal {L} _ {\mathcal {D P O} _ {r}} = - \log \sigma \left(\beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid m , x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid m , x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} \mid m , x\right)}{\pi_ {\text {r e f}} \left(y _ {l} \mid m , x\right)}\right), \tag {5}
+$$
+
+$\log \pi (y|x)$ can be formulated as:
+
+$$
+\log \pi (y | x, m) = \sum_ {y _ {i} \in y} \log p \left(y _ {i} \mid x, m, y _ {< i}\right), \tag {6}
+$$
+
+where $y_{i}$ denotes the $i$ -th token of the response $y$ .
+
+Segment-level Preference Optimization $(\mathcal{L}_{\mathcal{DPO}_s})$ . Intuitively, the corrected segments, particularly entity nouns, play a crucial role in eliminating hallucinations and should be assigned more rewards. Following Yu et al. (2024a), we assign higher rewards to the segments that differ between the chosen response and the rejection response. Based on Eq. 6, the action score for the segment-level can be denoted as:
+
+$$
+\log \pi^ {\sec} (y | x, m) = \frac {1}{C} \left(\sum_ {y _ {i} \in y} \log p \left(y _ {i} \mid x, m, y _ {< i}\right) + \gamma \sum_ {y _ {i} \in y _ {c}} \log p \left(y _ {i} \mid x, m, y _ {< i}\right)\right), \tag {7}
+$$
+
+where $y_{c}$ indicates the segments where changes have occurred. $y_{i}$ denotes the $i$ -th token of the response $y$ . To prevent the model from being misled into giving higher scores to longer responses, $\frac{1}{C}$ is used as a normalization factor, where $C = |y| + \gamma * |y_{c}|$ . By substituting Eq. 7 into Eq. 5, we can obtain the objective function of segment-level preference optimization $\mathcal{L}_{\mathcal{DPO}_S}$ .
+
+Token-level Preference Optimization $(\mathcal{L}_{\mathcal{PO}k})$ . For most previous methods, the optimization objective of DPO was constructed based on sentence-level KL divergence Eq. 1). However, the output generated from images is an autoregressive sequence, so aligning MLLMs with human values at the
+
+token level is natural. Finer-grained alignment not only improves alignment performance but also helps the model maintain diversity (Zeng et al., 2024). Unlike response-level optimization, which computes a single reward and KL divergence for the entire response, token-level optimization evaluates each token individually, with the cumulative token values forming the score of response. The sequential KL divergence can be defined as:
+
+$$
+\mathcal {L} _ {\mathcal {P O} k} = s g \left(\beta D _ {\text {S e q K L}} \left(x, m, y _ {w}; \pi_ {\text {r e f}} \| \pi_ {\theta}\right)\right) - \beta D _ {\text {S e q K L}} \left(x, m, y _ {l}; \pi_ {\text {r e f}} \| \pi_ {\theta}\right), \tag {8}
+$$
+
+where $sg$ represents the stop-gradient operator, and
+
+$$
+D _ {\text {S e q K L}} (x, m, y; \pi_ {\text {r e f}} \| \pi_ {\theta}) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(\pi_ {\text {r e f}} \left(y | x, y ^ {< t}\right) \| \pi_ {\theta} \left(y | x, y ^ {< t}\right)\right). \tag {9}
+$$
+
+Hierarchical Textual Preference Optimization (HDPO). includes the response, segment, and token-level preference optimization. It can be formulated as:
+
+$$
+\mathcal {L} _ {\mathcal {H D P O}} = \mathcal {L} _ {\mathcal {D P O} _ {r}} + \lambda \mathcal {L} _ {\mathcal {D P O} _ {s}} + \gamma \mathcal {L} _ {\mathcal {P O} k}, \tag {10}
+$$
+
+where $\lambda$ and $\gamma$ represent the weights of $\mathcal{L}_{\mathcal{DPO}_r}$ and $\mathcal{L}_{\mathcal{PO}_k}$ , respectively.
+
+# 4.2 VISUAL PREFERENCE OPTIMIZATION
+
+To mitigate MLLMs' over-reliance on large language models, we next introduce our Visual Preference Optimization Module. This module forces the model to make preference judgments based on visual information by constructing pairs of images with preferences as variables. Given a pair of images $(m_w, m_l)$ , where $m_w$ allows the prompt $x$ to better match the chosen response $y_w$ compared to $m_l$ , Visual Preference Optimization tries to maximize $\sigma(r(x, m_w, y_w) - r(x, m_l, y_w))$ , and the objective function can be formulated as:
+
+$$
+\mathcal {L} _ {\mathcal {D P O} v} = - \log \sigma \left(\beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid m _ {w} , x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid m _ {w} , x\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid m _ {l} , x\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid m _ {l} , x\right)}\right), \tag {11}
+$$
+
+where the rejection image $m_{l}$ can be generated by rotating, cropping, or adding noise to the chosen image $m_{w}$ . The objective of CHiP is a combination of the hierarchical textual (Eq. 10) and visual (Eq. 11) preference optimizations:
+
+$$
+\mathcal {L} _ {\mathcal {C H} \rangle \mathcal {P}} = \mathcal {L} _ {\mathcal {D P O} _ {v}} + \mathcal {L} _ {\mathcal {D P O} _ {r}} + \lambda \mathcal {L} _ {\mathcal {D P O} _ {s}} + \gamma \mathcal {L} _ {\mathcal {P O} _ {k}}. \tag {12}
+$$
+
+Since the entire response and image encapsulate modality semantics, we assign a weight of 1 (fully consider) to response-level $(\mathcal{L}_{\mathcal{DPO}_r})$ and visual preference optimization $(\mathcal{L}_{\mathcal{DPO}_v})$ . $\lambda$ and $\gamma (< 1)$ (partially consider) adjust the contributions of segment- and token-level preference optimizations. We refer to the model that only considers response-level and visual preference optimization as Cross-modal Direct Preference Optimization (CMDPO), which can be formulated as: $\mathcal{L}_{\mathcal{CMDPO}} = \mathcal{L}_{\mathcal{DPO}_v} + \mathcal{L}_{\mathcal{DPO}_r}$ .
+
+Hierarchical textual preference optimization module tries to maximizes $\sigma(r(x, m, y_w) - r(x, m, y_l))$ from different levels, while the visual preference optimization module tries to maximizes $\sigma(r(x, m_w, y_w) - r(x, m_l, y_w))$ . The combination of the them allows MLLMs to choose preferences based on both fine-grained textual and visual modalities.
+
+# 5 EXPERIMENT AND RESULTS
+
+In this section, we empirically investigate the effectiveness of CHiP in reducing hallucination.
+
+# 5.1 EXPERIMENTAL SETTINGS
+
+Comparing Models. We consider applying CHiP to two different multimodal LLMs: LLaVA-1.6 (Liu et al., 2024b) and Muffin (Yu et al., 2023). For LLaVA-1.6, we have chosen the model size of 7B, using CLIP (Radford et al., 2021a) as the visual encoder and Vicuna-1.5-7B (Zheng et al., 2023) as the LLM backbone. For Muffin, we have chosen a model size of 13B, using BEiT3 (Wang et al., 2023b) as the visual module and 13B Vicuna v1.0 (Chiang et al., 2023) as the LLM backbone, and a version fine-tuned on the VQAv2 dataset (Goyal et al., 2017) (released by Yu et al. (2024a)).
+
+Training Data. There are several publicly available training datasets that include preference pairs for multimodal hallucinations. Here, we choose to use the RLHF-V-Dataset (Yu et al., 2024a;b) with 5k training samples as our training dataset.
+
+Baselines. We primarily compare CHiP with standard DPO based on the same models. While other multimodal LLMs cannot be directly compared due to differences in base models, preference data, and alignment methods, we provide these results for reference. LLaVA (Liu et al., 2024c), Muffin (Yu et al., 2023), LRV (Liu et al., 2023a), LLaVA-RLHF (Sun et al., 2023), InstructBLIP (Dai et al., 2023), Qwen-VL-Chat (Bai et al., 2023), LLaVA 1.5 (Liu et al., 2023c), RLHF-V (Yu et al., 2024a), HALVA (13B) (Sarkar et al., 2024b).
+
+# Benchmarks and Evaluation Metrics.
+
+- Object HalBench (ObjHal) (Rohrbach et al., 2018) is a widely used benchmark for evaluating object hallucination. To improve evaluation stability, the benchmark includes 8 diverse prompts and is tested on 300 instances. Metrics: Following Yu et al. (2024a); Wang et al. (2024), we report both the response-level hallucination rate (R.) and mention-level hallucination rate (M.).
+- MMHal-Bench (MMHal) (Sun et al., 2023) is a question-answering benchmark that covers 8 question categories and 12 object topics. Metrics: It uses GPT-4 to assess response quality (Ova.) and hallucination rates (R.).
+- HallusionBench (Guan et al., 2024) evaluates visual illusions and knowledge hallucinations, featuring 346 images and 1129 questions. It was the GPT4-assisted evaluation. Metrics: Question Pair Accuracy (qA), Figure Accuracy (fA), and All Accuracy (aA).
+- AMBER (Wang et al., 2023a) was designed to be evaluated without LLM assistance. Following previous works (Wang et al., 2024), we only consider the generative tasks. Metrics: (a) CHAIR (Rohrbach et al., 2018) (CHAIR); (b) Object coverage of responses (Cover); (c) Response-level hallucination (Hal); (d) Human cognition hallucination (Cog).
+
+Implementation Details. We train the Muffin (13B) (Yu et al., 2023) and LLaVA-1.6 (7B) (Liu et al., 2024b) with CHiP for 3 epochs, with learning rate of 5e-7 and a batch size of 32. For the training time, LLAVA-1.6 took about three hours to train with CHiP on 4 H100 GPUs, while Muffin took approximately five hours. Hyperparameter: Since our training dataset is RLHF-V dataset Yu et al. (2024a), we followed Yu et al. (2024a) to set the hyperparameter $\beta = 0.5$ and followed (Zeng et al., 2024) to set $\gamma = 0.1$ for token-level preference optimization. As for the weight of segment-level preference optimization, namely $\lambda$ , we set to $\lambda = 1$ and $\lambda = 3$ for the Muffin and LLaV dataset set (Sec. 5.3). How to Identify Hallucinated Segments? Our training dataset, RLHF-V contains both pre-correction (hallucinated) and post-correction (non-hallucinated) descriptions. We enumerate all segments longer than two tokens in rejected responses and classify those absent in accepted responses as hallucinations. How to construct the rejected images? The rejected images are built based on the chosen image of the forward diffusion process at $T = 500$ steps (Sec. 6.2).
+
+# 5.2 RESULTS AND OBSERVATIONS
+
+Tab. 1 presents the experimental results of applying CHiP to the LLaVA-1.6 and Muffin on four popular hallucination benchmarks. The main findings are listed below: (1) CHiP significantly reduces hallucinations of base models Muffin and LLaVA-1.6. Compared to the base model Muffin (LLaVA), CHiP reduced response- (R.) and mention-levels (M.) hallucinations by $71.2\%$ ( $65.3\%$ ) and $66.4\%$ ( $56.7\%$ ) relative point on the ObjHal dataset and human cognitive hallucinations ( $\mathsf{Cog}$ ) by $57.1\%$ ( $61.9\%$ ) and Hal by $45.2\%$ ( $49.6\%$ ) relative point on the AMBER dataset. Furthermore, the consistent improvements of CHiP in question pairs ( $\mathrm{qA}$ ) and visual understanding types ( $\mathrm{fA}$ ) on the HallucinationBench, as well as in overall object hallucinations (Overall) on the MMHal dataset. (2) Based on Muffin and LLaVA, CHiP consistently outperforms DPO in reducing hallucination on the four benchmarks. This indicates that CHiP, which includes the visual preference optimization module and the hierarchical textual preference optimization module, can effectively improve preference alignment performance. (3) LLaVA and Muffin with CHiP achieve fewer hallucinations compared to GPT-4 on the ObjHal and AMBER datasets. Compared to GPT-4, LLaVA (Muffin) with CHiP reduced hallucination rates at the response level and mention level by $64.0\%$ ( $54.4\%$ ) and $56.2\%$ ( $46.6\%$ ) relative point respectively on the Object HalBench. On the AMBER dataset, the hallucination rate for the $\mathsf{Cog}$ metric decreased by $42.3\%$ ( $38.5\%$ ) relative point, with continuous reductions observed across several other categories as well.
+
+Table 1: The results of hallucination evaluation on the Object HalBench (ObjHal), MMHal-Bench (MMHal), HallusionBench, and AMBER datasets. Values in bold indicate the best performance under the same setting. “↑” indicates that a higher value is better for this metric, while “↓” indicates that a lower value is better. The baseline results are reported in (Yu et al., 2024a) for ObjHal and MMHal, in (Guan et al., 2024) for HallucinationBench, and in (Wang et al., 2024) for AMBER.
+
+
Model
ObjHal
MMHal
HallusionBench
AMBER
R.↓
M.↓
Ova.↑
R.↓
qA↑
fA↑
aA↑
CHAIR↓
Cover↑
Hal↓
Cog↓
Referenced Results (Not Directly Comparable)
LLaVA-1.0 (Liu et al., 2024c)
63.0
29.5
-
70.8
-
-
-
-
-
-
-
Muffin (Yu et al., 2023)
50.5
24.5
-
68.8
-
-
-
-
-
-
-
LRV (Liu et al., 2023a)
32.3
22.3
-
78.1
8.8
13.0
42.8
-
-
-
-
LLaVA-RLHF (Sun et al., 2023)
38.1
18.9
2.5
57.0
-
-
-
7.7
52.1
39.0
4.4
InstructBLIP (Dai et al., 2023)
25.9
14.3
2.1
58.0
9.5
10.1
45.3
8.8
52.2
38.2
4.4
Qwen-VL-Chat (Bai et al., 2023)
43.8
20.0
2.9
43.0
5.9
6.7
39.2
6.6
53.2
31.0
2.9
LLaVA-1.5 (Liu et al., 2023c)
46.3
22.6
2.4
52.1
10.6
24.9
46.9
7.8
51.0
36.4
4.2
RLHF-V (Yu et al., 2024a)
12.2
7.5
2.5
51.0
-
-
-
6.3
46.1
25.1
2.1
HALVA (Sarkar et al., 2024b)
-
-
-
-
13.9
20.1
49.1
-
-
-
-
GPT-4V (OpenAI, 2023)
13.6
7.3
-
31.3
28.8
39.9
65.3
4.6
67.1
30.7
2.6
Muffin (13B)
21.5
11.6
2.4
60.42
16.0
20.8
50.9
8.0
48.3
32.1
3.5
+DPO
13.1
6.6
2.5
52.1
17.4
23.4
52.5
6.2
46.9
26.5
2.5
+CHiP
6.2
3.9
2.6
49.0
19.1
24.9
54.0
4.4
45.3
17.6
1.5
LLaVA-1.6 (7B)
14.1
7.4
2.8
42.7
15.8
20.8
51.6
8.3
61.0
48.6
4.2
+DPO
11.0
6.6
2.7
43.8
22.2
28.3
56.6
5.9
61.0
38.9
3.0
+CHiP
4.9
3.2
2.9
39.6
23.5
26.0
58.5
3.7
57.8
24.5
1.6
+
+# 5.3 ABLATION STUDY
+
+Effect of Component Combination. To evaluate the contribution of each component in CHiP and the effect of their combinations, we conducted a comprehensive ablation study on CHiP based on LLaVA. The experimental results are shown in Tab. 2. The main observations are as follows: (1) Both hierarchical textual preference optimization (HDPO) and visual preference optimization (CMDPO) are effect. On the ObjHal and MMHal datasets, both HDPO (CHiP- $\mathcal{L}_{\mathcal{DPO}_v}$ ) and CMDPO ( $\mathcal{L}_{\mathcal{DPO}_s} - \mathcal{L}_{\mathcal{POT}}$ ) outperform DPO. This suggests that: (a) more granular preference signals can reduce label ambiguity at the response level (DPO), helping the model learn more effectively; (b) The introduction of visual preference optimization enhances the model's alignment between the image and text. (2) The combination of visual preference optimization and hierarchical preference optimization strategies makes DPO the most powerful. On both evaluation datasets, CMDPO introduced segment-level ( $\mathcal{L}_{\mathcal{DPO}_s}$ ), token-level ( $\mathcal{L}_{\mathcal{POT}}$ ), or both segment- and token-levels (CHiP), resulting in a consistent and significant reduction in hallucination rates across different evaluation perspectives, such as response level and mention level. Specifically, when CMDPO incorporates both segment-level and token-level optimization (CHiP), the response- and mention-level hallucination rate on ObjHal datasets decreased by $49.6\%$ and $41.3\%$ , respectively.
+
+Human Evaluation. Due to incomplete text annotations on the MMHal, GPT-4 couldn't reliably detect hallucinations. To make the results more reliable, we invited experts to manually annotate the data to compare CHiP with DPO based on LLaVA. As shown in Figure 3, CHiP and DPO performed equally on $63.5\%$ of samples, with CHiP winning $24\%$ . In the $36.5\%$ of samples where a distinction was possible, CHiP outperformed DPO in $31.6\%$ .
+
+
+Figure 3: Human evaluation results on MMHal-Bench (MMHal).
+
+Strength of Hierarchical Textual Preference Optimization. Hierarchical text preference optimization includes preference optimization at the response, segment, and token levels. Here, we discuss the impact of their weights. We fully consider response-level since its global textual semantics by setting its parameter to 1 (Eq. 12). and following Touvron et al. (2023), we set the
+
+token-level weight $\gamma = 0.1$ . As for segment-level, given its crucial role in providing fine-grained feedback on the preference of hallucinations, we fully explore the range of its weight $\lambda$ (as shown in Eq. 10). From the results of Fig. 4, we found that the best performance was achieved when $\lambda = 1$ and $\lambda = 3$ for the Muffin and LLaVA frameworks, respectively, and we adopted these settings in all the experiments presented in this paper.
+
+Table 2: The ablation results of CHiP based on LLaVA. Values in bold denote the best performance.
+
+
Model
ObjHal
MMHal
R.↓
M.↓
Ova.↑
R.↓
DPO
11.03
6.61
2.73
43.75
CHiP
4.92
3.21
2.89
39.63
-LOPOv
9.19
5.77
2.70
42.40
-LOPOs
8.55
5.16
2.69
40.63
-LOPo t
6.08
3.77
2.71
40.75
-LOPOs-LOPo t
9.76
5.47
2.78
41.71
+
+Table 3: Results of training or freezing the visual encoder (VE) in LLaVA during preference optimization. $\times$ and $\sqrt{}$ denote the visual encoder states of training and freezing, respectively.
+
+
Model
VE
MMHal
AMBER
ObjHal
Ova.↑
R.↓
CHAIR↓
Cover↑
Hal↓
R.↓
M.↓
LLaVA
-
2.75
42.7
8.30
61.0
48.6
14.1
7.4
+DPO
×
2.73
43.8
5.94
61.0
38.9
11.0
6.6
+DPO
✓
2.71
44.8
5.88
61.6
38.3
10.1
5.7
+CHiP
×
2.89
39.6
3.72
57.8
24.5
4.9
3.2
+CHiP
✓
2.68
43.8
3.74
54.9
22.1
5.3
3.3
+
+
+(a) Muffin+CHAIR
+
+
+(b) Muffin+Hal Rate
+Figure 4: Results of Muffin+CHiP and LLaVA+CHiP evaluated on the AMBER dataset with different choices of weight $\lambda$ to control the strength of segment-level preference optimization. Findings: When $\lambda = 1$ ( $\lambda = 3$ ), the best performance of the CHAIR and Hallucination Rate metric is achieved on AMBER based on Muffin (LLaVA-1.6).
+
+
+(c) LLaVA+CHAIR
+
+
+(d) LLaVA+Hal Rate
+
+Impact of Training Paradigm. The misalignment between image and text semantics is a significant cause of hallucinations in MLLMs (Liu et al., 2024a). However, most approaches (Wang et al., 2024) freeze the visual encoder and train only the connector and LLM during preference optimization. There raises a scientific question: Can full-model training during MLLM preference optimization reduce hallucinations? To investigate this, we explored the impact of freezing versus training the visual backbone on LLaVA enhanced by CHiP and DPO. The results are shown in Tab. 3. Results: DPO achieves a lower hallucination rate when the visual encoder is trained, whereas CHiP, which incorporates multi-level textual preference and visual preference optimization, does not achieve the expected reduction in hallucination rate when the visual encoder is trained. A possible reason is that the multiple optimization objectives may dilute the model's focus on image-text semantic alignment during the joint training of the visual encoder.
+
+# 6 FURTHER ANALYSIS
+
+# 6.1 GENERAL CAPABILITY ANALYSIS
+
+Preference learning may compromise a model's general understanding capabilities. In this section, we evaluate and analyze the general capability performance of an MLLM enhanced by our CHiP. Specifically, we selected several popular general capability evaluation datasets, including MMMU (val) (Yue et al., 2024), MMMU (test), MMB-ENG (Liu et al., 2025), MMB-CN, ScienceQA (Lu et al., 2022), and LLaVA-Wild (Liu et al., 2024c). We compared the performance of LLaVA and LLaVA+CHiP on these datasets, with the results shown in Tab. 4.
+
+**Observation:** We observe that LLaVA+CHiP outperforms LLaVA on five out of the six datasets. This indicates that CHiP slightly improves performance on the MMMU, LLaVA-Wild, and MMB-CN while maintaining comparable performance on others.
+
+Table 4: The general capability evaluation results. Values in black indicate the best performance, in red show improvement with CHiP, and in green indicate a decline. Values with * are reproduced results. For LLaVA-Wild, we used gpt-4o-2024-05-13 as evaluator due to GPT-4-0314 was outdated; for MMMU-test, there was a lack of official LLaVA-1.6 reports.
+
+
MMMU(val)
MMMU(test)
MMB-ENG
MMB-CN
ScienceQA
LLaVA-Wild
Num Samples
900
10500
6666
6666
4241
90
LLaVA
35.80
31.70*
67.40
60.60
70.10
74.90
LLaVA+CHiP
36.8+1.0
32.1+0.4
66.6-0.8
60.82+0.22
70.15+0.05
76.2+1.3
+
+# 6.2 IMPACT OF REJECTION IMAGE CONSTRUCTION STRATEGY
+
+Preference sample quality depends on rejection image quality and its gap from the chosen image. In this section, we explore various strategies for constructing rejection images.
+
+Strategies. The construction rejection images are listed below: (1) Diffusion: Following the forward diffusion process in image generation (Ho et al., 2020), small amounts of Gaussian noise are gradually added to the chosen image for $T = 500$ steps. (2) Blackness: set all the RGB values of the chosen image to 0. (3) Crop: random cropping strategy is utilized to the chosen image. (4) Rotation: randomly rotate the chosen image by 10 to 80 degrees. (5) Randomness: select an image from the training set randomly.
+
+
+(a) Chosen
+
+
+(b) Diffusion
+
+
+(c) Blackness
+Figure 5: Examples of rejection images constructed by different strategies. (a) is the chosen image.
+
+
+(d) Crop
+
+
+(e) Rotation
+
+
+(f) Randomness
+
+Results. The experimental results of CHiP under different construction strategies of rejection images are shown in Fig. 5. Observations: The high similarity between the rejection and chosen images can lead to better preference optimization with CHiP. The diffusion and cropping strategies represent blurred and sub-images of the chosen image, respectively, both retaining a significant amount of the chosen image's visual information, resulting in better performance. However, the blackness and randomness strategies by completely masking and replacing the chosen image
+
+Table 5: Results of CHiP under different rejection image construction strategies. The bold values indicate the best performance. Observation: CHiP achieves the best performance with the diffusion strategy constructed rejection images.
+
+
Strategy
ObjHal
MMHal
R.↓
M.↓
Ova.↑
R.↓
Diffusion
4.9
3.2
2.9
39.6
Black
9.4
5.0
2.4
43.8
Cropping
5.8
3.6
2.8
40.6
Random
10.9
5.9
2.9
41.7
Rotate
7.8
4.4
2.8
43.8
+
+
+Figure 6: Results of $\mathrm{LLaVA + CHiP}$ evaluated on the ObjHal dataset with different values of noise step T. "Response" represents the response-level hallucination rate, while "Mention" represents the mentionlevel hallucination rate.
+
+
+
+
+(a) LLaVA
+
+
+(b) LLaVA+DPO
+Figure 7: The visualization of representation distributions of various preference optimization strategies. Findings: our CHiP makes more alignment between images and non-hallucination descriptions and improves the model's ability to distinguish between hallucinatory and non-hallucinatory text.
+
+
+(c) LLaVA+CMDPO
+
+
+(d) LLaVA+CHiP
+
+almost do not retain the information of the chosen image, leading to poorer performance. Although rotation preserves much of the chosen image's information, it creates significant differences in visual tokens after tokenization, resulting in poor performance.
+
+Impact of Noise Step T. We further explored the impact of noise steps T on the performance of CHiP, as shown in Fig. 6 for the ObjHal dataset. CHiP performs best at $\mathrm{T} = 500$ . Possible reasons: (1) Fewer noise steps make the rejected image too similar to the chosen one, causing label ambiguity and weakening optimization. (2) Too many noise steps erase image details, making distinctions too easy and limiting the module's use of visual information.
+
+# 6.3 REPRESENTATION VISUALIZATION
+
+Ideally, a MLLM with a low hallucination rate should ensure that the representations of the textual description for the image are as close as possible to the representations of the image itself, while keeping the representations of hallucinated and non-hallucinated texts as far apart as possible. We analyze the effectiveness of CHiP compared to DPO and several ablation preference optimization strategies from a representational perspective. Specifically, we sampled 150 image-ground truth description pairs from the COCO-2017 (Lin et al., 2014) validation set, and GPT-4 was used to generate more detailed non-hallucinated descriptions (manually verified), as well as hallucinated descriptions. We then input the images, non-hallucinated texts, and hallucinated texts into LLaVA separately, and took the representation of the last token of the LLM (in this case, LLaMA) as the representation of the text or the image. We applied Principal Component Analysis (PCA) $^{2}$ to reduce the dimensionality of the high-dimensional representations, and the results are shown in Fig. 7.
+
+Observations: Compared to LLaVA, DPO struggles with aligning image and text representations but can distinguish hallucinated from non-hallucinated text. After introducing image preference optimization based on DPO, namely CMDPO, the model not only distinguishes between hallucinated and non-hallucinated texts but also brings the representations of the image and the ground-truth description closer. With the introduction of more fine-grained text and image preference optimization, namely CHiP, the alignment between the image and ground-truth descriptions becomes even closer, while maintaining the ability to distinguish between hallucinated and non-hallucinated texts.
+
+# 7 CONCLUSION
+
+In this paper, we tackle the issue of hallucinations in multimodal large language models (MLLMs) by proposing Cross-Modal Hierarchical DPO (CHiP). CHiP integrates visual and hierarchical textual preference optimization, facilitating cross-modal preference capture and finer-grained distinctions. Experiments on four widely-used datasets demonstrate that CHiP effectively reduces hallucinations. We visualized the representations of images, non-hallucinatory descriptions, and hallucinatory descriptions. The results show that CHiP, compared to standard multimodal DPO, more effectively bridges the semantic gap between images and non-hallucinatory descriptions while enhancing the distinction between hallucinatory and non-hallucinatory descriptions.
+
+# ACKNOWLEDGMENTS
+
+This research is supported by A*STAR, CISCO Systems (USA) Pte. Ltd and National University of Singapore under its Cisco-NUS Accelerated Digital Economy Corporate Laboratory (Award I21001E0002). This work was also supported by the National Key Research and Development Program of China (No. U24B20181).
+
+# REFERENCES
+
+AI@Meta. Llama 3 model card. 2024. URL https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md.
+Jinze Bai, Shuai Bai, Shusheng Yang, Shijie Wang, Sinan Tan, Peng Wang, Junyang Lin, Chang Zhou, and Jingren Zhou. Qwen-vl: A frontier large vision-language model with versatile abilities. CoRR, abs/2308.12966, 2023. doi: 10.48550/ARXIV.2308.12966. URL https://doi.org/10.48550/arXiv.2308.12966.
+Zechen Bai, Pichao Wang, Tianjun Xiao, Tong He, Zongbo Han, Zheng Zhang, and Mike Zheng Shou. Hallucination of multimodal large language models: A survey. arXiv preprint arXiv:2404.18930, 2024.
+Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. Vicuna: An open-source chatbot impressing gpt-4 with $90\%$ * chatgpt quality. See https://vicuna.lmsys.org (accessed 14 April 2023), 2(3):6, 2023.
+Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, and Steven C. H. Ho. Instructclip: Towards general-purpose vision-language models with instruction tuning. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, 2023.
+Yihe Deng, Pan Lu, Fan Yin, Ziniu Hu, Sheng Shen, James Zou, Kai-Wei Chang, and Wei Wang. Enhancing large vision language models with self-training on image comprehension. arXiv preprint arXiv:2405.19716, 2024.
+Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6904-6913, 2017.
+Tianrui Guan, Fuxiao Liu, Xiyang Wu, Ruiqi Xian, Zongxia Li, Xiaoyu Liu, Xijun Wang, Lichang Chen, Furong Huang, Yaser Yacoob, et al. Hallusionbench: an advanced diagnostic suite for entangled language hallucination and visual illusion in large vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14375-14385, 2024.
+Anisha Gunjal, Jihan Yin, and Erhan Bas. Detecting and preventing hallucinations in large vision language models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 18135-18143, 2024.
+Muyang He, Yexin Liu, Boya Wu, Jianhao Yuan, Yueze Wang, Tiejun Huang, and Bo Zhao. Efficient multimodal learning from data-centric perspective. arXiv preprint arXiv:2402.11530, 2024.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and HsuanTien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips.cc/paper/2020/bit/4c5bcfec8584af0d967f1ab10179ca4b-Abstract.html.
+
+Qidong Huang, Xiaoyi Dong, Pan Zhang, Bin Wang, Conghui He, Jiaqi Wang, Dahua Lin, Weiming Zhang, and Nenghai Yu. Opera: Alleviating hallucination in multi-modal large language models via over-trust penalty and retrospection-allocation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13418-13427, 2024.
+Chaoya Jiang, Haiyang Xu, Mengfan Dong, Jiaxing Chen, Wei Ye, Ming Yan, Qinghao Ye, Ji Zhang, Fei Huang, and Shikun Zhang. Hallucination augmented contrastive learning for multimodal large language model. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 27036-27046, 2024.
+Cassidy Laidlaw, Shivam Singhal, and Anca Dragan. Preventing reward hacking with occupancy measure regularization. arXiv preprint arXiv:2403.03185, 2024.
+Junnan Li, Dongxu Li, Silvio Savarese, and Steven C. H. Hoi. BLIP-2: bootstrapping language-image pre-training with frozen image encoders and large language models. In International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, pp. 19730-19742, 2023a.
+Lei Li, Zhihui Xie, Mukai Li, Shunian Chen, Peiyi Wang, Liang Chen, Yazheng Yang, Benyou Wang, and Lingpeng Kong. Silkie: Preference distillation for large visual language models. arXiv preprint arXiv:2312.10665, 2023b.
+Lianian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Liujuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10965-10975, 2022.
+Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. 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.
+Fuxiao Liu, Kevin Lin, Linjie Li, Jianfeng Wang, Yaser Yacoob, and Lijuan Wang. Aligning large multi-modal model with robust instruction tuning. arXiv preprint arXiv:2306.14565, 2023a.
+Fuxiao Liu, Kevin Lin, Linjie Li, Jianfeng Wang, Yaser Yacoob, and Lijuan Wang. Mitigating hallucination in large multi-modal models via robust instruction tuning. In The Twelfth International Conference on Learning Representations, 2023b.
+Hanchao Liu, Wenyuan Xue, Yifei Chen, Dapeng Chen, Xiutian Zhao, Ke Wang, Liping Hou, Rongjun Li, and Wei Peng. A survey on hallucination in large vision-language models. arXiv preprint arXiv:2402.00253, 2024a.
+Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning. CoRR, abs/2310.03744, 2023c. doi: 10.48550/ARXIV.2310.03744. URL https://doi.org/10.48550/arXiv.2310.03744.
+Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. Llava-last: Improved reasoning,OCR, and world knowledge, January 2024b. URL https:// lllava-v1.github.io/blog/2024-01-30-llava-last/.
+Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. Advances in neural information processing systems, 36, 2024c.
+Yuan Liu, Haodong Duan, Yuanhan Zhang, Bo Li, Songyang Zhang, Wangbo Zhao, Yike Yuan, Jiaqi Wang, Conghui He, Ziwei Liu, et al. Mmbench: Is your multi-modal model an all-around player? In European Conference on Computer Vision, pp. 216-233. Springer, 2025.
+Pan Lu, Swaroop Mishra, Tanglin Xia, Liang Qiu, Kai-Wei Chang, Song-Chun Zhu, Oyvind Tafjord, Peter Clark, and Ashwin Kalyan. Learn to explain: Multimodal reasoning via thought chains for science question answering. Advances in Neural Information Processing Systems, 35:2507-2521, 2022.
+
+OpenAI. GPT-4 technical report. CoRR, abs/2303.08774, 2023.
+Renjie Pi, Tianyang Han, Wei Xiong, Jipeng Zhang, Runtao Liu, Rui Pan, and Tong Zhang. Strengthening multimodal large language model with bootstrapped preference optimization. CoRR, abs/2403.08730, 2024.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang (eds.), Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 2021a. URL http://proceedings.mlr.press/v139/radford21a.html.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021b.
+Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024.
+Anna Rohrbach, Lisa Anne Hendricks, Kaylee Burns, Trevor Darrell, and Kate Saenko. Object hallucination in image captioning. arXiv preprint arXiv:1809.02156, 2018.
+Pritam Sarkar, Sayna Ebrahimi, Ali Etemad, Ahmad Beirami, Sercan Ö. Arik, and Tomas Pfister. Mitigating object hallucination via data augmented contrastive tuning. CoRR, abs/2405.18654, 2024a.
+Pritam Sarkar, Sayna Ebrahimi, Ali Etemad, Ahmad Beirami, Sercan Ö Arik, and Tomas Pfister. Mitigating object hallucination via data augmented contrastive tuning. arXiv preprint arXiv:2405.18654, 2024b.
+Zhiqing Sun, Sheng Shen, Shengcao Cao, Haotian Liu, Chunyuan Li, Yikang Shen, Chuang Gan, Liang-Yan Gui, Yu-Xiong Wang, Yiming Yang, et al. Aligning large multimodal models with factually augmented rlhf. arXiv preprint arXiv:2309.14525, 2023.
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
+Fei Wang, Wenxuan Zhou, James Y Huang, Nan Xu, Sheng Zhang, Hoifung Poon, and Muhao Chen. mdpo: Conditional preference optimization for multimodal large language models. arXiv preprint arXiv:2406.11839, 2024.
+Junyang Wang, Yuhang Wang, Guohai Xu, Jing Zhang, Yukai Gu, Haitao Jia, Ming Yan, Ji Zhang, and Jitao Sang. An llm-free multi-dimensional benchmark for mllms hallucination evaluation. arXiv preprint arXiv:2311.07397, 2023a.
+Wenhui Wang, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal, Owais Khan Mohammed, Saksham Singhal, Subhojit Som, and Furu Wei. Image as a foreign language: BEIT pretraining for vision and vision-language tasks. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2023, Vancouver, BC, Canada, June 17-24, 2023, pp. 19175-19186. IEEE, 2023b. doi: 10.1109/CVPR52729.2023.01838. URL https://doi.org/10.1109/CVPR52729.2023.01838.
+Wenhui Wang, Hangbo Bao, Li Dong, Johan Bjorck, Zhiliang Peng, Qiang Liu, Kriti Aggarwal, Owais Khan Mohammed, Saksham Singhal, Subhojit Som, et al. Image as a foreign language: Beit pretraining for vision and vision-language tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19175-19186, 2023c.
+
+Yuan Yao, Tianyu Yu, Ao Zhang, Chongyi Wang, Junbo Cui, Hongji Zhu, Tianchi Cai, Haoyu Li, Weilin Zhao, Zhihui He, Qianyu Chen, Huarong Zhou, Zhensheng Zou, Haoye Zhang, Shengding Hu, Zhi Zheng, Jie Zhou, Jie Cai, Xu Han, Guoyang Zeng, Dahai Li, Zhiyuan Liu, and Maosong Sun. Minicpm-v: A gpt-4v level mllm on your phone. arXiv preprint 2408.01800, 2024.
+Shukang Yin, Chaoyou Fu, Sirui Zhao, Tong Xu, Hao Wang, Dianbo Sui, Yunhang Shen, Ke Li, Xing Sun, and Enhong Chen. Woodpecker: Hallucination correction for multimodal large language models. arXiv preprint arXiv:2310.16045, 2023.
+Tianyu Yu, Jinyi Hu, Yuan Yao, Haoye Zhang, Yue Zhao, Chongyi Wang, Shan Wang, Yinxv Pan, Jiao Xue, Dahai Li, et al. Reformulating vision-language foundation models and datasets towards universal multimodal assistants. arXiv preprint arXiv:2310.00653, 2023.
+Tianyu Yu, Yuan Yao, Haoye Zhang, Taiwen He, Yifeng Han, Ganqu Cui, Jinyi Hu, Zhiyuan Liu, Hai-Tao Zheng, Maosong Sun, et al. Rlhf-v: Towards trustworthy mllms via behavior alignment from fine-grained correctional human feedback. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13807-13816, 2024a.
+Tianyu Yu, Haoye Zhang, Yuan Yao, Yunkai Dang, Da Chen, Xiaoman Lu, Ganqu Cui, Taiwen He, Zhiyuan Liu, Tat-Seng Chua, and Maosong Sun. RLAIF-V: aligning mllms through open-source AI feedback for super GPT-4V trustworthiness. CoRR, abs/2405.17220, 2024b. doi: 10.48550/ ARXIV.2405.17220. URL https://doi.org/10.48550/arXiv.2405.17220.
+Xiang Yue, Yuansheng Ni, Kai Zhang, Tianyu Zheng, Ruoqi Liu, Ge Zhang, Samuel Stevens, Dongfu Jiang, Weiming Ren, Yuxuan Sun, et al. Mmmu: A massive multi-discipline multimodal understanding and reasoning benchmark for expert agi. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9556-9567, 2024.
+Yongcheng Zeng, Guoqing Liu, Weiyu Ma, Ning Yang, Haifeng Zhang, and Jun Wang. Token-level direct preference optimization. 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=1RZKuvqYCR.
+Jinrui Zhang, Teng Wang, Haigang Zhang, Ping Lu, and Feng Zheng. Reflective instruction tuning: Mitigating hallucinations in large vision-language models. arXiv preprint arXiv:2407.11422, 2024.
+Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36:46595-46623, 2023.
+
+# A DIFFERENCES BETWEENTOKEN-ANDRESPONSE-LEVEL OPTIMIZATION
+
+Here, we first summarize the differences between token-level optimization and response-level optimization (in Sec. A.1). For clarity, the following two subsections provide detailed derivations of response-level (in Sec. A.2) and token-level (in Sec. A.3) optimization for reference.
+
+# A.1 OVERVIEW
+
+The preference optimization function can be divided into two components: (1) the reward function, which quantifies user preferences and drives the optimization direction; and (2) KL divergence, which controls the difference between the output distributions of the policy model and the preference model.
+
+Given the input instruction $x$ , image $m$ , and response $y$ , the Response-level Preference Optimization can be formulated as below:
+
+$$
+\max _ {\pi_ {\theta}} \mathbb {E} _ {x, m \sim \mathcal {D}, y \sim \pi_ {\theta} (y | x)} [ r (x, m, y) ] - \beta \mathbb {D} _ {\mathrm {K L}} [ \pi_ {\theta} (y \mid x, m) | | \pi_ {\text {r e f}} (y \mid x, m) ], \tag {13}
+$$
+
+where the reward function can be denoted as:
+
+$$
+r (x, m, y) = \beta \log \frac {\pi_ {\theta} (y | x , m)}{\pi_ {\mathrm {r e f}} (y | x , m)} + \beta \log Z (x, m), \tag {14}
+$$
+
+And, the Token-level Preference Optimization can be defined as below:
+
+$$
+\max _ {\pi_ {\theta}} \mathbb {E} _ {x, m, y ^ {< t} \sim \mathcal {D}, y ^ {t} \sim \pi_ {\theta} (\cdot | [ x, m, y ^ {< t} ])} \left[ r (x, m, y) \right] - D _ {\operatorname {S e q K L}} (x, m, y; \pi_ {\theta} \| \pi_ {r e f})), \tag {15}
+$$
+
+where the reward function can be denoted as:
+
+$$
+r (x, m, y) = \sum_ {t = 1} ^ {T} \gamma^ {t - 1} R ([ x, m, y ^ {< t} ], y ^ {t}) \tag {16}
+$$
+
+where $D_{\mathrm{SeqKL}}(x,m,y;\pi_\theta \| \pi_{ref})$ denotes the sequential KL divergence, and it can be defined as:
+
+$$
+D _ {\text {S e q K L}} (x, m, y; \pi_ {\theta} \| \pi_ {r e f}) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(\pi_ {\theta} \left(\cdot | [ x, m, y ^ {< t} ]\right) \| \pi_ {r e f} \left(\cdot | [ x, m, y ^ {< t} ]\right)\right). \tag {17}
+$$
+
+# Comparison:
+
+(1) Reward Function For response-level preference optimization, the reward function is calculated based on the generation probabilities of a response by the policy model and the reference model (as shown in Eq. 14). The probability of the entire response is first obtained, and then the reward for the entire response is calculated.
+
+For token-level preference optimization, the reward function calculates the reward for each token individually (for example, $y^{t}$ , based on the $x$ and $m$ , and $y^{< t}$ ) and then sums up the rewards of all tokens to obtain the reward for the entire response, as shown in Eq. 16.
+
+(2) KL Divergence For response-level optimization (as shown in Eq. 13), KL divergence is calculated as the distance between the distributions of the response $y$ given $x$ and $m$ , as modeled by the policy model and the reference model (note: this is based on the response distribution).
+
+For token-level optimization, KL divergence is computed as the distance between the distributions of $y^{t}$ given $x$ and $m$ , and $y^{< t}$ , as modeled by the policy model and the reference model. The overall distance between the policy and reference models is obtained by summing these distances across all tokens. Eq. 17 formulate this process.
+
+# A.2 RESPONSE-LEVEL PREFERENCE OPTIMIZATION
+
+Direct Preference Optimization (DPO) (Rafailov et al., 2024) is primarily a preference optimization method that focuses on aligning language models with human preferences without the need for
+
+explicit reward modeling or reinforcement learning. Given a model to be optimized $\pi_{\theta}$ , and the reference policy $\pi_{\mathrm{ref}}$ , which is a supervised fine-tuning model, the RL optimization of RLHF can be formulated as:
+
+$$
+\max _ {\pi_ {\theta}} \mathbb {E} _ {x, m \sim \mathcal {D}, y \sim \pi_ {\theta} (y | x)} [ r (x, m, y) ] - \beta \mathbb {D} _ {\mathrm {K L}} [ \pi_ {\theta} (y \mid x, m) | | \pi_ {\text {r e f}} (y \mid x, m) ]. \tag {18}
+$$
+
+By maximizing the KL-constrained reward objective to obtain the optimal solution and establishing a mapping between the reward model and the optimal policy, the representation of the reward function is derived as follows:
+
+$$
+r (x, m, y) = \beta \log \frac {\pi_ {\theta} (y | x , m)}{\pi_ {\mathrm {r e f}} (y | x , m)} + \beta \log Z (x, m), \tag {19}
+$$
+
+where $x$ is the input instruction, $m$ is the image, $y$ is the response, $\beta$ is a constant, and $Z(x,m)$ is the partition function.
+
+Given the chosen response $y_{w}$ , where the evaluator preferred it over the rejected response $y_{l}$ , DPO is expected to learn to maximize the reward difference between chosen $(y_{w})$ and rejected responses $(y_{l})$ . The preference optimization objective becomes:
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathcal {D P O}} = - \mathbb {E} _ {(x, m, y _ {w}, y _ {l})} \left[ \log \sigma \left(r (x, m, y _ {w}) - r (x, m, y _ {l})\right) \right] \\ = - \mathbb {E} _ {\left(x, m, y _ {w}, y _ {l}\right)} \left[ \log \sigma \left(\beta \log \frac {\pi_ {\theta} \left(y _ {w} \mid x , m\right)}{\pi_ {\text {r e f}} \left(y _ {w} \mid x , m\right)} - \beta \log \frac {\pi_ {\theta} \left(y _ {l} \mid x , m\right)}{\pi_ {\text {r e f}} \left(y _ {l} \mid x , m\right)}\right) \right], \tag {20} \\ \end{array}
+$$
+
+where DPO learns preferences based on the ranking of the entire response, and the action score can be formulated as:
+
+$$
+\log \pi (y | x, m) = \sum_ {y _ {i} \in y} \log p \left(y _ {i} \mid x, m, y _ {< i}\right), \tag {21}
+$$
+
+where $y_{i}$ denotes the $i$ -th token of the response $y$ . During DPO training, the reference model $\pi_{\mathrm{ref}}(y|x,m)$ is usually kept fixed while the policy model $\pi_{\theta}(y|x,m)$ is updated.
+
+# A.3TOKEN-LEVEL PREFERENCE OPTIMIZATION
+
+The objective function of DPO operates at the sentence level, as shown in Eq. 18. The principle of token-level preference optimization is similar to sentence-level preference optimization. The difference between them lies in the reward function. In token-level preference optimization, the reward function is token-wise, which can be viewed as the cumulative reward for generating the text.
+
+Given a response composed of $T$ tokens $y = [y^{1},y^{2},\dots,y^{T}]$ , where $y^{t}\in \mathcal{V}$ , and $\mathcal{V}$ represents the vocabulary. Additionally, we define $y^{< 1} = []$ . Given a prompt $x$ , a image $m$ , and model-generated response $y$ 's first $t - 1$ tokens, the LM predicts the probability distribution of the next token can be formulated as $\pi_{\theta}(\cdot |[x,m,y^{< t}])$ . Therefore, the objective of token-level preference optimization can be denoted as below:
+
+$$
+\max _ {\pi_ {\theta}} \mathbb {E} _ {x, m, y ^ {< t} \sim \mathcal {D}, y ^ {t} \sim \pi_ {\theta} (\cdot | [ x, m, y ^ {< t} ])} \left[ \sum_ {t = 1} ^ {T} \gamma^ {t - 1} R ([ x, m, y ^ {< t} ], y ^ {t}) \right] - D _ {\operatorname {S e q K L}} (x, m, y; \pi_ {\theta} \| \pi_ {r e f})), \tag {22}
+$$
+
+where $D_{\mathrm{SeqKL}}(x,m,y;\pi_\theta \| \pi_{ref})$ denotes the sequential KL divergence, and it can be defined as:
+
+$$
+D _ {\text {S e q K L}} (x, m, y; \pi_ {\theta} \| \pi_ {r e f}) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(\pi_ {\theta} (\cdot | [ x, m, y ^ {< t} ]) \| \pi_ {r e f} (\cdot | [ x, m, y ^ {< t} ])\right). \tag {23}
+$$
+
+where $\sum_{t=1}^{T} \gamma^{t-1} R([x, m, y^{
Model
AMBER
MMHal
ObjHal
LLaVA
131
44
164
LLaVA+DPO
127
40
160
LLaVA+CHiP
124
43
151
+
+# B.2 ANNOTATOR BACKGROUND IN HUMAN EVALUATION
+
+To mitigate the errors in GPT evaluations caused by incomplete annotations in the MMHal dataset, we introduced human experts for manual evaluation to ensure more reliable conclusions: CHiP has a lower hallucination rate compared to traditional DPO. Details about the annotators: We invited three human experts who specialize in multimodal hallucination tasks. These experts are well-versed in various types of hallucinations, such as object hallucinations, attribute hallucinations, and environment hallucinations. We consider object hallucinations to be more severe than attribute and environment hallucinations. This prioritization allows the expert to efficiently classify and label hallucination types during the annotation process, enabling them to assign reasonable and accurate scores.
+
+# B.3 EFFECT OFTOKEN-LEVEL PREFERENCE OPTIMIZATION
+
+In this section, we explored whether using token-level preference optimization independently as an optimization objective would still allow the model to work effectively. The evaluation results on four datasets are presented in the Tab. 7 It can be observed that solely using token-level preference optimization results in lower hallucination rates compared to traditional DPO and the original LLaVA, which holds for the four datasets.
+
+Table 7: Performance comparison of LLaVA after token-level preference optimization (TDPO) and direct preference optimization (DPO). Values in bold indicate the best performance.
+
+
Model
ObjHal
MMHal
HallusionBench
AMBER
Resp.↓
Mention↓
Overall↑
Resp.↓
(qAcc) ↑
(fAcc) ↑
(aAcc) ↑
CHAIR↓
Cover↑
Hal↓
Cog↓
TDPO
9.56
5.50
2.73
42.71
22.64
28.32
57.22
5.90
61.30
37.60
3.10
DPO
11.03
6.61
2.73
43.75
22.20
28.32
56.60
5.90
61.00
38.90
3.00
+
+# B.4 FINE-GRAINED ANALYSIS
+
+Here, we conducted a fine-grained evaluation of the base model (i.e., Muffin and LLaVA), DPO, and CHiP on the AMBER, MMHal-Bench (MMHal), and Object HalBench (ObjHal) datasets. The results are shown in Tab. 8, Tab. 9, and Tab. 10. The main finding is that CHiP performed well on many fine-grained evaluation metrics across these three datasets.
+
+Table 8: Fine-grained results on AMBER. Bold values indicate the best performance. $\uparrow$ indicates that a higher value represents better performance, while $\downarrow$ indicates that a lower value is better. Findings: Our CHiP achieves the best AMBER Score under both the base model Muffin and the LLaVA model.
+
+
Model
Generative
Discriminative
AMBER Score↑
CHAIR↓
Cover↑
Hal↓
Cog↓
F1↑
F1E↑
F1A↑
F1R↑
Muffin (13B)
8.0
48.3
32.1
3.5
86.4
95.0
79.3
71.4
89.20
+DPO
6.2
46.9
26.5
2.5
86.9
95.9
79.9
70.4
90.35
+CHiP
4.4
45.3
17.6
1.5
87.6
96.1
80.5
73.3
91.60
LLaVA-1.6 (7B)
8.3
61.0
48.6
4.2
87.0
95.1
81.5
69.6
89.35
+DPO
5.9
61.0
38.9
3.0
87.4
97.8
81.3
63.4
90.75
+CHiP
3.7
57.8
24.5
1.6
86.9
98.3
80.3
62.0
91.60
+
+Table 9: Fine-grained results on MMHal-Bench (MMHal). Bold values indicate the best performance. $\uparrow$ indicates that a higher value represents better performance, while $\downarrow$ indicates that a lower value is better. Findings: Our CHiP achieves the best Overall score and Hallucination rate under both the base model Muffin and the LLaVA model.
+
+
Model
Overall↑
Hallu↓
Score in Each Question Type ↑
Attribute
Adversarial
Comparison
Counting
Relation
Environment
Holistic
Other
Muffin
2.41
60.42
2.67
3.17
2.83
2.83
2.42
3.00
2.08
0.25
+DPO
2.49
52.08
3.50
2.33
2.92
2.08
2.50
2.67
2.33
1.58
+CHiP
2.58
48.96
3.58
2.58
2.08
3.42
2.83
2.58
1.50
2.08
LLaVA
2.78
42.71
3.75
3.50
3.50
1.50
1.92
4.08
1.75
2.83
+DPO
2.73
43.75
4.17
2.92
3.00
2.67
2.67
4.25
1.17
1.00
+CHiP
2.84
39.58
4.17
3.33
2.67
2.67
2.25
4.08
1.67
1.92
+
+Table 10: Fine-grained results on Object HalBench (ObjHal). Bold values indicate the best performance. $\uparrow$ indicates that a higher value represents better performance, while $\downarrow$ indicates that a lower value is better. Findings: Our CHiP performs best on all the fine-grained evaluation metrics (except for the Object Recall) under the base model Muffin and the LLaVA model.
+
+
Model
Response Hall↑
Object Hall↑
Response Correct↑
Object Correct↑
Object Recall↑
Muffin
21.53
11.61
78.47
88.39
56.29
+DPO
10.65
5.18
89.35
94.82
51.78
+CHiP
6.17
3.91
93.83
96.09
40.99
LLaVA
14.08
7.37
85.92
92.63
55.03
+DPO
11.03
6.61
88.97
93.39
52.83
+CHiP
4.92
3.21
95.08
96.79
48.95
+
+Your task consists of two parts: one is to provide a more detailed and accurate description of no less than 100 words based on the ground truth caption of the image. Secondly, modify the description you generated in the first step to create a similar but incorporate many elements of hallucination.
+
+Here are three examples for your reference:
+
+-Start of examples
+
+Example-1:
+
+Ground Truth Caption:
+
+A white plate with a sandwich and sides on it.
+
+Non-Hallucinative Caption:
+
+A white plate with a sandwich and sides on it. The sandwich is made of two slices of bread with a filling inside. The sides are a small bowl of white creamy dip and some fried onions. There is also a side dish of sliced oranges in a clear glass bowl.
+
+Hallucinative Caption:
+
+A white plate with a sandwich and sides on it. The sandwich is made of two slices of bread with a filling of ham and cheese inside. The sides are a small bowl of creamy dill dip and some crunchy onions. There is also a side dish of sliced oranges in a clear glass bowl, served with a glass of wine. The plate is placed on a table with a placemat made of woven reeds.
+
+Example-2:
+
+Ground Truth Caption:
+
+An orange truck driving down a street full of men in the back.
+
+Non-Hallucinative Caption:
+
+An orange dump truck is driving down the street with several men standing in the back of the truck bed. All the men are wearing red caps and white shirts. There is a smaller yellow bus to the left of the truck, and there is a light pole in the middle of the frame.
+
+Hallucinative Caption:
+
+An orange dump truck is driving down a street full of people in the back, all of them wearing red caps and white shirts. The truck is driving past a yellow bus that is full of people and is about to pass a fire hydrant on the side of the road. The truck is driving very fast and there are police cars chasing it. The men in the back of the truck are holding their hands in the air and yelling, "We're not gonna stop! We're gonna take back the streets!".
+
+Example-3:
+
+Ground Truth Caption:
+
+A pizza sitting on top of a pizza box covered in cheese.
+
+Non-Hallucinative Caption:
+
+A pizza with cheese, tomato sauce and toppings sits inside a cardboard pizza box. The pizza appears to be cut into 6 slices and the box has some grease stains.
+
+Hallucinative Caption:
+
+A perfectly cooked pizza sits inside a cardboard pizza box. The pizza is covered in melted cheese and pepperonis and there are traces of red pepper flakes around the edges. A small, green pepper rests on top of the pizza.
+
+The box is stained with a sauce that is most likely marinara.
+
+-End of examples
+
+Ground Truth Caption:
+
+{caption}
+
+Please output in this format:
+
+[Non-Hallucinative Caption:]
+
+[Hallucinative Caption:]
+
+Table 11: The prompt used to generate hallucinated and non-hallucinated descriptions for a given input image.
+
+# B.5 PROMPT
+
+To reveal the limitations of existing multimodal DPO from the representation perspective and demonstrate how our method, CHiP, effectively mitigates these limitations, we extracted 150 images and their ground-truth descriptions from the COCO-2017 (Lin et al., 2014) validation set. Gemini (The version we choose to use is gemini-1.5-flash-latest) was then used to generate more detailed non-hallucinated and hallucinated descriptions, with the non-hallucinated descriptions manually verified. Tab. 11 presents the prompts we used to guide Gemini in generating these detailed non-hallucinated and hallucinated descriptions.
+
+
+Question: How many oysters can you see in the photo?
+
+# LLaVA
+
+There are six oysters visible in the photo.
+
+# LLaVA + DPO
+
+There are six oysters in the photo.
+
+# LLaVA + CHiP
+
+There are 5 oysters in the photo.
+
+
+Question: What can you see in the reflection from the sunglasses?
+Figure 8: Qualitative results of LLaVA+CHiP compared with LLaVA+DPO and LLaVA on MMHal-Bench dataset. Correct answers and hallucinations are highlighted in green and red, respectively.
+
+# LLaVA
+
+In the reflection from the sunglasses, you can see a blurred image of what appears to be a person wearing a top hat and sunglasses. The person in the reflection seems to be wearing a similar outfit to the person in the foreground, which includes a top hat and sunglasses, but the details are not clear due to the blur.
+
+# LLaVA + DPO
+
+In the reflection from the sunglasses, you can see the person wearing the sunglasses and the person in the background. The person in the background appears to be wearing a white shirt.
+
+# LLaVA + CHiP
+
+In the reflection from the sunglasses, you can see what appears to be the upper part of another person's head and shoulders, suggesting that the person wearing the sunglasses is not alone in the image. The reflection is somewhat blurred, indicating that the sunglasses may have a reflective surface that distorts the image being reflected. The details of the other person's appearance are not clear due to the reflection's distortion.
+
+# C QUALITATIVE RESULT
+
+To demonstrate the effectiveness of our approach, we present qualitative results on the MMHal-Bench dataset in this section, as shown in Fig. 8. LLaVA+CHiP demonstrates a significant reduction in hallucinations in text generation tasks. This improvement can be attributed to the multi-level preference optimization, which enables the model to capture image-text relationships across varying granularities. Additionally, the visual preference optimization module enhances semantic alignment between the two modalities, further contributing to the reduction in hallucinations.
\ No newline at end of file
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/images.zip b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a0153a2de2ede9b6b8aedd4d3d7a5f8f64984677
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7cbde9abff75d9a20382b0b6ec30b2ae3b87af562d95b83b6ba45d1b011f3323
+size 950453
diff --git a/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/layout.json b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..21bc292acd4a952790e58427ceb8397a923fdb68
--- /dev/null
+++ b/ICLR/2025/CHiP_ Cross-modal Hierarchical Direct Preference Optimization for Multimodal LLMs/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3adf3ea7184ddbdfe202dd7221931eaaf45d76c1ced3b4a0d747471d6192c65
+size 741623
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_content_list.json b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..74c283158c37fdba989e40cb3d6ed0568cb0319d
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5426fa4ecfb4226f9ed52c57c88e662bd9bc1070c30fcbd19621eea747d2c62d
+size 226605
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_model.json b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..062c56180bce5c1e5702e856e496aae54258aa66
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fdf194867bd780d2634a0e5639431ecc585939bf678cfecb7faeb41869fdd7b1
+size 249599
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_origin.pdf b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..955be13c4e02037893bc761255fad080029dc147
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/2bdf6e48-29bc-4c7e-9914-e544eab70d7e_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d1639b38ce3d7d8c6151e6d664c54d2bf23a15b641feb86521cc88600c35d77b
+size 4773011
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/full.md b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a82921447c436404fd994084edef1a77f4241bea
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/full.md
@@ -0,0 +1,991 @@
+# CL-DIFFPHYCON: CLOSED-LOOP DIFFUSION CONTROL OF COMPLEX PHYSICAL SYSTEMS
+
+Long Wei $^{1*}$ Haodong Feng $^{1*}$ Yuchen Yang $^{2§}$ Ruiqi Feng $^{1}$ Peiyan Hu $^{3§}$
+
+Xiang Zheng $^{48}$ Tao Zhang $^{1}$ Dixia Fan $^{1}$ Tailin Wu $^{1\dagger}$
+
+$^{1}$ Department of Artificial Intelligence, Westlake University,
+$^{2}$ School of Statistics and Data Science, Nankai University,
+$^{3}$ Academy of Mathematics and Systems Science, Chinese Academy of Sciences,
+4School of Future Technology, South China University of Technology
+
+{weilong,fenghaodong,wutailin}@westlake.edu.cn
+
+# ABSTRACT
+
+The control problems of complex physical systems have broad applications in science and engineering. Previous studies have shown that generative control methods based on diffusion models offer significant advantages for solving these problems. However, existing generative control approaches face challenges in both performance and efficiency when extended to the closed-loop setting, which is essential for effective control. In this paper, we propose an efficient Closed-Loop Diffusion method for Physical systems Control (CL-DiffPhyCon). By employing an asynchronous denoising framework for different physical time steps, CL-DiffPhyCon generates control signals conditioned on real-time feedback from the system with significantly reduced computational cost during sampling. Additionally, the control process could be further accelerated by incorporating fast sampling techniques, such as DDIM. We evaluate CL-DiffPhyCon on two tasks: 1D Burgers' equation control and 2D incompressible fluid control. The results demonstrate that CL-DiffPhyCon achieves superior control performance with significant improvements in sampling efficiency. The code can be found at https://github.com/AI4Science-WestlakeU/CL_DiffPhyCon.
+
+# 1 INTRODUCTION
+
+The control problem of complex physical systems is a critical research area for optimizing a sequence of control actions to achieve specific objectives. It has wide applications in science and engineering fields, including fluid control (Verma et al., 2018), plasma control (Degrave et al., 2022), and particle dynamics control (Reyes Garza et al., 2023). The challenge in controlling such systems arises from their high-dimensional and highly nonlinear characteristics. Therefore, to achieve good control performance, there is an inherent requirement of closed-loop control, which is particularly necessary for control tasks that involve extra challenges, such as stochastic dynamics. Specifically, each control decision should be based on the latest state feedback from the system dynamics, allowing for continuous adaptation of the control inputs in response to any changes.
+
+Over recent decades, several methods have been developed to address this problem, including classical control methods, recent reinforcement learning approaches, and the latest generative methods. Among them, diffusion models, such as DiffPhyCon (Wei et al., 2024), have demonstrated competitive performance, often outperforming both classical control and reinforcement learning methods in complex physical systems control. The superiority of diffusion models for general decision-making problems has also been widely demonstrated recently (Ajay et al., 2022; Janner et al., 2022a).
+
+However, these diffusion control approaches encounter significant challenges in handling the closed-loop control problems, due to their reliance on a synchronous denoising strategy. The diffusion models start from pure noise to a denoised sample for all physical time steps within the model horizon. Applying a full sampling process at each physical time step can realize the closed-loop control, but
+
+
+Figure 1: Advantages of our CL-DiffPhyCon (right) over previous diffusion control methods (left and middle). The diffusion model horizon is denoted as $H$ and the total number of diffusion steps is $T$ . By employing an asynchronous denoising framework, our method could achieve closed-loop control and accelerate the sampling process significantly. The notation DiffPhyCon- $h$ means conducting a full sampling process including $T$ denoising steps every $h$ physical time steps.
+
+
+
+
+
+incurs high sampling cost. Moreover, it may disrupt the consistency of the control signals, thereby affecting overall performance (Kaelbling & Lozano-Perez, 2011). On the other hand, conducting a full sampling process every several physical time steps improves sampling efficiency but no longer conforms to the closed-loop requirement, leading to inferior control decisions due to outdated system states. Although an online replanning strategy has been proposed recently to determine when to replan adaptively (Zhou et al., 2024), they do not establish a fully closed-loop framework. In addition, it involves extra computation of likelihood estimation or sampling from scratch, with a dependence on thresholding hyperparameters, which may vary across different tasks and require experiments or a significant amount of tuning to determine.
+
+In this paper, we propose a novel Closed-Loop Diffusion method for Physical systems Control, named as CL-DiffPhyCon. The key idea is to decouple the synchronous denoising within the model horizon, allowing different physical time steps to exhibit different noise levels. In this way, closed-loop generation of control sequences is naturally realized: the asynchronous diffusion model outputs control signals sequentially with increasing levels of noise along physical time steps, which enables utilization of real-time feedback state for control signal sampling in each horizon without waiting for all the following control signals in the same horizon to be denoised completely. Then, the feedback serves as the initial condition for sampling subsequent control signals, ensuring they are generated based on this reliable state. Our method can also be seen as a seamless replanning approach that leverages fresh observations with minimal sampling costs. Therefore, compared to existing diffusion-based control methods (Wei et al., 2024; Zhou et al., 2024), our approach not only realizes closed-loop control but also achieves significant sampling acceleration. These advantages of our method are illustrated in Figure 1.
+
+In summary, we make the following contributions: (1) We propose CL-DiffPhyCon, a novel closed-loop diffusion control method for complex physical systems. The core of this method is an asynchronous diffusion model derived from a theoretical analysis of the target distribution. This model enables parallel denoising across physical time steps, allowing earlier control actions to be sampled sooner, thereby accelerating the sampling process. Additionally, the control process could be further accelerated by incorporating fast sampling techniques, such as DDIM (Song et al., 2020). (2) We evaluate CL-DiffPhyCon on the 1D Burgers' equation control and 2D incompressible fluid control tasks. The results demonstrate that CL-DiffPhyCon achieves notable control performance with significant sampling acceleration.
+
+# 2 RELATED WORK
+
+Classical control methods like PID (Li et al., 2006) and MPC (Schwenzer et al., 2021) are known for their high efficiency, steady performance, and good interpretability, but they face significant
+
+challenges in both performance and efficiency when applied to control high-dimensional complex physical systems. Recently, imitation learning and reinforcement learning has shown good performance on a wide range of physical systems (Pomerleau, 1988; Zhuang et al., 2023), including drag reduction (Rabault et al., 2019; Elhawary, 2020; Feng et al., 2023; Wang et al., 2024), heat transfer (Beintema et al., 2020; Hachem et al., 2021), and fish swimming (Novati et al., 2017; Verma et al., 2018; Feng et al., 2024). Another category of supervised learning (SL) methods (Holl et al., 2020; Hwang et al., 2022) plan control signals by utilizing backpropagation through a neural surrogate model. In contrast, our approach does not depend on surrogate models; instead, it simultaneously learns the dynamics of physical systems and the corresponding control sequences. Additionally, physics-informed neural networks (PINNs) (Willard et al., 2020) have recently been utilized for control (Mowlavi & Nabi, 2023), but they necessitate explicit PDEs. In contrast, our method is data-driven and has broader applicability.
+
+Diffusion models (Ho et al., 2020) excel at learning high-dimensional distributions and have achieved significant success in image and video generation (Dhariwal & Nichol, 2021; Ho et al., 2022), weather forecasting (Price et al., 2023), and inverse design (Wu et al., 2024), to name a few. They have also demonstrated superior capabilities on decision making tasks, such as robot control (Janner et al., 2022b; Ajay et al., 2022) and high-dimensional nonlinear systems control (Wei et al., 2024), compared with widely used reinforcement learning and imitation learning approaches. However, they struggle to balance the conflicting goals of achieving closed-loop control and maintaining efficient sampling for long trajectories. Some previous work has focused on improving the adaptability of diffusion generation (Zhou et al., 2024) on decision-making tasks, but it is not closed-loop and needs extra hyperparameters and computations for the decision of replanning. In contrast, our method is a closed-loop approach with an efficient sampling strategy without extra hyperparameter. Some recent works also assign varying noise levels to different frames within a model horizon (Wu et al., 2023; Ruhe et al., 2024). The key differences between our work and these approaches are twofold: (1) Our method focuses on the closed-loop control task of complex physical systems, whereas their methods are geared towards sequential content generation that does not involve interaction with the external world. (2) The diffusion models we need to learn are derived from the target distribution we aim to sample from (see Section 4.1 for details), while theirs are heuristic.
+
+# 3 BACKGROUND
+
+# 3.1 PROBLEM SETUP
+
+Given an initial state $\mathbf{u}_0$ , a system dynamics $G$ , and a specified control objective $\mathcal{I}$ , We consider the following complex physical systems control problem:
+
+$$
+\min _ {\pi} \mathbb {E} _ {\mathbf {w} _ {\tau + 1} \sim \pi (\mathbf {w} _ {\tau + 1} | \mathbf {u} _ {\tau})} [ \mathcal {J} (\mathbf {u} _ {0}, \mathbf {w} _ {1}, \mathbf {u} _ {1}, \dots , \mathbf {w} _ {N}, \mathbf {u} _ {N}) ] \quad \text {s . t .} \quad \mathbf {u} _ {\tau + 1} = G (\mathbf {u} _ {\tau}, \mathbf {w} _ {\tau + 1}, \xi_ {\tau}). \tag {1}
+$$
+
+Here $\mathbf{u}_{\tau} \in \mathbb{R}^{d_{\mathbf{u}}}$ and $\mathbf{w}_{\tau} \in \mathbb{R}^{d_{\mathbf{w}}}$ are the system state and external control signal at physical time step $\tau$ , respectively. The system dynamics $G$ represents the transition of states over time under external control in the system, typically determined by implicit PDEs. $G$ could be stochastic with nonzero random noise $\xi_{\tau}$ , or deterministic with $\xi_{\tau} = 0$ . The evolution of states can only be observed through state measurement. The control objective $\mathcal{I}$ is defined over a trajectory of length $N$ , representing the performance of the control strategy. For example, $\mathcal{I}$ can be designed to measure the deviation from a target state $\mathbf{u}^*$ , subject to cost constraints: $\mathcal{I} = \| \mathbf{u}_N - \mathbf{u}^* \|^2 + \sum_{\tau=1}^{N} \| \mathbf{w}_{\tau} \|^2$ . In this paper, we focus on closed-loop control, which means that the control signal $\mathbf{w}_{\tau+1}$ in each time step is sampled from a distribution conditioned on the current state $\mathbf{u}_{\tau}$ . Unlike open-loop control, which determines all actions in advance, closed-loop control continuously incorporates real-time feedback to adjust control decisions dynamically, making it particularly effective for complex and evolving systems where evolution of states can only be observed through measurement of the state. To simplify notation, we introduce a variable $\mathbf{z}_{\tau} = [\mathbf{w}_{\tau}, \mathbf{u}_{\tau}]$ to represent the concatenation of $\mathbf{w}_{\tau}$ and $\mathbf{u}_{\tau}$ . The transition probabilities in the training trajectories collected offline are assumed to satisfy the Markov property:
+
+$$
+p \left(\mathbf {z} _ {\tau + 1} \mid \mathbf {u} _ {0}, \mathbf {z} _ {1: \tau}\right) = p \left(\mathbf {z} _ {\tau + 1} \mid \mathbf {u} _ {\tau}\right) = p \left(\mathbf {w} _ {\tau + 1} \mid \mathbf {u} _ {\tau}\right) p \left(\mathbf {u} _ {\tau + 1} \mid \mathbf {u} _ {\tau}, \mathbf {w} _ {\tau + 1}\right). \tag {2}
+$$
+
+
+Initialization $(\tau = 1)$
+
+
+
+
+Closed-loop Control $(\tau \geq 1)$
+System State
+
+
+=zt(t) = [ut(t),w(t)]
+
+
+Sampling process
+
+
+Start sampling
+
+
+End sampling
+Figure 2: CL-DiffPhyCon for closed-loop control. First, it uses the synchronous diffusion model for initialization. Then, it uses the asynchronous diffusion model for iterative control. Sampling of each control signal is based on the latest state feedback from the system dynamics.
+
+
+
+# 3.2 PRELIMINARY: DIFFUSION CONTROL MODELS
+
+DiffPhyCon (Wei et al., 2024) is a recent diffusion generative method to solve the problem Eq. 1 for small $N$ in the open-loop manner. In this section, we briefly review this framework of its light version. Suppose that we have a training set $\mathcal{D}_{\mathrm{train}}$ containing $M$ trajectories $\{\mathbf{u}_0^{(i)}, \mathbf{z}_{1:N}^{(i)}\}_{i=1}^M$ collected offline. We define the following forward diffusion SDE (Song et al., 2021) on the $\mathcal{D}_{\mathrm{train}}$ ,
+
+$$
+\mathrm {d} \mathbf {z} _ {\tau} (t) = f (t) \mathbf {z} _ {\tau} (t) \mathrm {d} t + g (t) \mathrm {d} \omega_ {\tau} (t), \quad \tau \in [ 1: N ], \quad t \in [ 0, T ], \tag {3}
+$$
+
+where $\mathbf{z}_{\tau}(0) = \mathbf{z}_{\tau}$ , $f(t)$ and $g(t)$ are scalar functions, and $\omega_{\tau}(t)$ is Wiener process1. Through Eq. 3, we augment the distribution of $\mathcal{D}_{\mathrm{train}}$ , denoted as $p_{\mathrm{train}}(\mathbf{u}_0, \mathbf{z}_{1:N}) = p_{\mathrm{train}}(\mathbf{u}_0)p_{\mathrm{train}}(\mathbf{z}_{1:N}|\mathbf{u}_0)$ , to the distribution of the diffusion process $p_t(\mathbf{u}_0, \mathbf{z}_{1:N}(t)) = p_{\mathrm{train}}(\mathbf{u}_0)p_t(\mathbf{z}_{1:N}(t)|\mathbf{u}_0)$ . We have two terminal conditions, $p_0(\mathbf{z}_{1:N}(0)|\mathbf{u}_0) = p_{\mathrm{train}}(\mathbf{z}_{1:N}(0)|\mathbf{u}_0)$ and $p_T(\mathbf{z}_{1:N}(T)|\mathbf{u}_0) \approx \mathcal{N}(\mathbf{z}_{1:N}(T)|\mathbf{0}, \sigma_T^2\mathbf{I})$ . The reverse-time SDE (the denoising/sampling process) of Eq. 3 has the following formula:
+
+$$
+\mathrm {d} \mathbf {z} _ {1: N} (t) = [ f (t) \mathbf {z} _ {1: N} (t) - g (t) ^ {2} \nabla_ {\mathbf {z} _ {1: N} (t)} \log p _ {t} (\mathbf {z} _ {1: N} (t) | \mathbf {u} _ {0}) ] \mathrm {d} t + g (t) \mathrm {d} \omega_ {1: N} (t), \quad t \in [ T, 0 ]. \tag {4}
+$$
+
+Once we have learned a diffusion model $\epsilon_{\phi}$ which approximates the score function $\nabla \log p_t(\mathbf{z}_{1:N}(t)|\mathbf{u}_0)$ , we can sample $\mathbf{z}_{1:N}(0) \sim p_{\mathrm{train}}(\mathbf{z}_{1:N}(0)|\mathbf{u}_0)$ through Eq. 4 by subtracting predicted noise from $\mathbf{z}_{1:N}(t)$ gradually from $t = T$ (where $\mathbf{z}_{1:N}(T) \sim \mathcal{N}(\mathbf{0},\mathbf{I})$ ) to $t = 0$ . The control objective $\mathcal{J}(\mathbf{z}_{1:N}(0))$ is optimized by the following denoising process (Song et al., 2021; Chung et al., 2023):
+
+$$
+\begin{array}{l} \mathrm {d} \mathbf {z} _ {1: N} (t) = [ f (t) \mathbf {z} _ {1: N} (t) - \underbrace {g (t) ^ {2} \nabla_ {\mathbf {z} _ {1 : N} (t)} \log p _ {t} (\mathbf {z} _ {1 : N} (t) | \mathbf {u} _ {0})} _ {\text {d e n o i s e b y t h e s c o r e f u n c t i o n}} \\ + \underbrace {g (t) ^ {2} \lambda \cdot \nabla_ {\mathbf {z} _ {1 : N} (t)} \mathcal {I} (\hat {\mathbf {z}} _ {1 : N} (0))} _ {\text {g u i d e d s a m p l i n g b y t h e c o n t r o l o b j e c t i v e}} ] \mathrm {d} t + g (t) \mathrm {d} \omega_ {1: N} (t), \quad t \in [ T, 0 ]. \tag {5} \\ \end{array}
+$$
+
+Here, $\hat{\mathbf{z}}_{1:N}(0)$ is the approximate noise-free $\mathbf{z}_{1:N}(0)$ from $\mathbf{z}_{1:N}(t)$ given by Tweedie's estimate. The implementation is specialized by VP SDE (Song et al., 2021), i.e. DDPM (Ho et al., 2020), and the diffusion model is implemented by a parameterized denoising network $\epsilon_{\phi}$ of horizon $H$ , which equals $N$ . Please refer to Appendices A, B and C.1 for more details.
+
+# 4 METHOD
+
+In this section, we detail our method CL-DiffPhyCon. In Section 4.1, we illustrate our idea and derive the two distributions we need to learn. To sample from them, we present the synchronous
+
+and asynchronous diffusion models in Section 4.2 and Section 4.3, respectively. In Section 4.4, we introduce closed-loop control, which is illustrated in Figure 2. The efficiency of CL-DiffPhyCon is analyzed in Section 4.5. For ease of theoretical analysis, we adopt the SDE formulation of our method. For the DDPM implementation of its sampling process, please refer to Appendix C.
+
+# 4.1 ASYNCHRONOUSLY DENOISING FRAMEWORK
+
+Recall that DiffPhyCon (Wei et al., 2024) requires latent variables, e.g., system state and control signal, during the reverse diffusion process of horizon $H$ (which is typically much shorter than $N$ ) being denoised synchronously. As a result, to sample a control signal, a full denoising process of length $T$ over the whole horizon is performed, introducing a large amount of computation over all the latent variables within this horizon. To address this issue, we propose CL-DiffPhyCon, an asynchronous denoising process scheme such that the latent variables of the early physical time step are denoised in advance of the latter ones. At each physical time step, the sampled control signal is input to the system dynamics and the output state serves as the initial condition for the following denoising process. Thus, the control signal is planned based on the current system state and closed-loop control is achieved. Meanwhile, the computational cost between two successive times steps is significantly reduced due to the parallel denoising nature, compared with synchronous sampling.
+
+Formally, we aim to model the joint distribution $p\big(\mathbf{z}_1(0), \mathbf{z}_2(0), \dots, \mathbf{z}_N(0) | \mathbf{u}_0\big)$ in a Markov complex physical system, where each $\mathbf{z}_{\tau}(0) = [\mathbf{w}_{\tau}, \mathbf{u}_{\tau}]$ is a pair of noise-free control signal and system state, and $\mathbf{u}_0$ is the initial state. Denote $\mathbf{z}_{\tau; \tau + H - 1}(t) = [\mathbf{z}_{\tau}(t), \mathbf{z}_{\tau + 1}(t), \dots, \mathbf{z}_{\tau + H - 1}(t)]$ as the sequence of hidden variables with synchronous noise levels in the horizontal interval $[\tau; \tau + H - 1]$ and $\tilde{\mathbf{z}}_{\tau; \tau + H - 1}(t) = [\mathbf{z}_{\tau}(t), \mathbf{z}_{\tau + 1}(t + \frac{1}{H} T), \dots, \mathbf{z}_{\tau + H - 1}(t + \frac{H - 1}{H} T)]$ as its counterpart with asynchronous noise levels. Let's consider the augmented joint distribution
+
+$$
+p \left(\mathbf {z} _ {1: N} (0), \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \dots , \tilde {\mathbf {z}} _ {N + 1: N + H} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {0}\right). \tag {6}
+$$
+
+Through sampling from this augmented joint distribution, we can obtain the desired control signals and states sequence $\mathbf{z}_{1:N}(0) \sim p_{\mathrm{train}}\big(\mathbf{z}_{1:N}(0)|\mathbf{u}_0\big)$ . By conditioning on previous variables sequentially, we obtain the following decomposition theorem:
+
+Theorem 1. Assume that the joint distribution $p(\mathbf{z}_1(0), \mathbf{z}_2(0), \dots, \mathbf{z}_N(0) | \mathbf{u}_0)$ has Markov property. For any $\tau > 0$ , we assume $\mathbf{z}_{\tau}(T)$ is independently normally distributed with density $\mathcal{N}(\mathbf{z}_{\tau}(T) | \mathbf{0}, \sigma_T^2 \mathbf{I})$ . The augmented joint distribution can be decomposed as:
+
+$$
+\begin{array}{l} p \left(\mathbf {z} _ {1: N} (0), \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \dots , \tilde {\mathbf {z}} _ {N + 1: N + H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \\ = \underbrace {p \left(\tilde {\mathbf {z}} _ {1 : H} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {0}\right)} _ {\text {i n i t i a l i z i n g d i s t r i b u t i o n}} \prod_ {\tau = 1} ^ {N} \underbrace {p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0) , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right)} _ {\text {t r a n s i t i o n d i s t r i b u t i o n}} \mathcal {N} (\mathbf {z} _ {\tau + H} (T); \mathbf {0}, \sigma_ {T} ^ {2} \mathbf {I}). \tag {7} \\ \end{array}
+$$
+
+The proofs of this theorem and the subsequent propositions are provided in the Appendix D. Note that $\tilde{\mathbf{z}}_{1:H}(\frac{1}{H}T)$ serves as a condition for $p\big(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)|\mathbf{u}_{\tau-1}(0), \tilde{\mathbf{z}}_{\tau:\tau+H-1}(\frac{1}{H}T)\big)$ when $\tau = 1$ . This theorem implies that to sample from the augmented joint distribution, we only need to specify two kinds of distributions for ancestral sampling: the initializing distribution $p\big(\tilde{\mathbf{z}}_{1:H}(\frac{1}{H}T)|\mathbf{u}_0\big)$ , and the transition distribution $p\big(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)|\mathbf{u}_{\tau-1}(0), \tilde{\mathbf{z}}_{\tau:\tau+H-1}(\frac{1}{H}T)\big)$ for $\tau > 0$ .
+
+# 4.2 SAMPLING FROM INITIALIZING DISTRIBUTION
+
+To sample from $p\big(\tilde{\mathbf{z}}_{1:H}\big(\frac{1}{H} T\big)|\mathbf{u}_0\big)$ , we train a synchronous diffusion model $\epsilon_{\phi}$ by the following DDPM loss (Ho et al., 2020):
+
+$$
+\mathcal {L} _ {\text {s y n c h}} = \mathbb {E} _ {t, (\mathbf {u} _ {0}, \mathbf {z} _ {1: H}), \epsilon} [ \| \epsilon - \epsilon_ {\phi} (\mathbf {z} _ {1: H} (t), \mathbf {u} _ {0}, t) \| _ {2} ^ {2} ]. \tag {8}
+$$
+
+Here, $\mathbf{z}_{1:H}(t) = s(t)\mathbf{z}_{1:H} + s(t)^2\sigma(t)^2\epsilon$ involves the same level of noise for all $t \in [1:H]$ , and the expectation is about $t \sim U(0,T)$ , $(\mathbf{u}_0,\mathbf{z}_{1:H}) \sim \mathcal{D}_{\mathrm{train}}$ and $\epsilon \sim \mathcal{N}(\mathbf{0},\mathbf{I})$ . Intuitively, this model learns to predict the noise in its input $\mathbf{z}_{1:H}(t)$ . After training, we can compute the score function by $\nabla_{\mathbf{z}_{1:H}(t)}\log p_t\big(\mathbf{z}_{1:H}(t)|\mathbf{u}_0\big) \approx -\epsilon_\phi\big(\mathbf{z}_{1:H}(t),\mathbf{u}_0,t\big)$ . Then we apply Eq. 4 to sample a sequence of $\{\mathbf{z}_{1:H}(t)\}$ , where $t$ goes from $T$ to $\frac{1}{H} T$ , from which we select the diagonal latent variables $\tilde{\mathbf{z}}_{1:H}(\frac{1}{H} T) = [\mathbf{z}_1(\frac{1}{H} T),\dots,\mathbf{z}_H(T)]$ following the desired distribution $p\big(\tilde{\mathbf{z}}_{1:H}(\frac{1}{H} T)|\mathbf{u}_0\big)$ .
+
+# 4.3 SAMPLING FROM TRANSITION DISTRIBUTION
+
+The transition distribution $p\big(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0) \mid \mathbf{u}_{\tau-1}(0), \tilde{\mathbf{z}}_{\tau:\tau+H-1}\left(\frac{1}{H}T\right)\big)$ converts $\tilde{\mathbf{z}}_{\tau:\tau+H-1}\left(\frac{1}{H}T\right)$ to $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ by denoising over $t$ where $t$ goes from $T/H$ to 0, given the state condition $\mathbf{u}_{\tau-1}$ . To learn such denoising process, we first define a component-wise asynchronous forward diffusion SDE, which characterizes the diffusion dynamics of $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)$ with an increasingly higher level of noise as $t$ increases from 0 to $T/H$ :
+
+$$
+\mathrm {d} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) = \tilde {f} _ {\tau : \tau + H - 1} (t) \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \mathrm {d} t + \tilde {g} _ {\tau : \tau + H - 1} (t) \mathrm {d} \omega_ {\tau : \tau + H - 1} (t), \tag {9}
+$$
+
+where $\tilde{f}_{\tau:\tau+H-1}(t) = [f(t), f(t + \frac{1}{H}T), \dots, f(t + \frac{H-1}{H}T)]$ and $\tilde{g}_{\tau:\tau+H-1}(t) = [g(t), g(t + \frac{1}{H}T), \dots, g(t + \frac{H-1}{H}T)]$ are vectors of scalar functions that are component-wisely applied. Similar to Eq. 4, the reverse-time SDE (the denoising/sampling process) of Eq. 9 has the following formula:
+
+$$
+\begin{array}{l} \mathrm {d} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) = [ \tilde {f} _ {\tau : \tau + H - 1} (t) \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \\ - \underbrace {\tilde {g} _ {\tau : \tau + H - 1} (t) ^ {2} \nabla_ {\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t)} \log p _ {t} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \mid \mathbf {u} _ {\tau - 1} (0)\right)} _ {\text {d e n o i s e b y t h e s c o r e f u n c t i o n}} \tag {10} \\ + \tilde {g} _ {\tau : \tau + H - 1} (t) d \omega_ {\tau : \tau + H - 1} (t). \\ \end{array}
+$$
+
+Thus, to sample $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ from the transition distribution via Eq. 10, the key problem is to estimate the score function $\nabla_{\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)} \log p_t(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)|\mathbf{u}_{\tau-1}(0))$ . We introduce a novel asynchronous diffusion model $\epsilon_\theta$ such that $\epsilon_\theta(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t), \mathbf{u}_{\tau-1}(0), t) \approx -\nabla_{\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)} \log p_t(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)|\mathbf{u}_{\tau-1}(0))$ . This $\epsilon_\theta$ could also be interpreted as predicting the noise in each component of its input $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(t)$ . To train $\epsilon_\theta$ , we need training data of the form $\tilde{\mathbf{z}}_{\tau:\tau+H-1}$ . The following proposition presents a way to sample $\tilde{\mathbf{z}}_{\tau:\tau+H-1}$ from the training trajectories given the initial state condition $\mathbf{u}_{\tau-1}(0)$ .
+
+Proposition 1. Assume that the joint distribution $p\big(\mathbf{z}_1(0), \mathbf{z}_2(0), \dots, \mathbf{z}_N(0) | \mathbf{u}_0\big)$ has Markov property. For any $t \in [0, \frac{1}{H} T]$ , we have:
+
+$$
+p _ {t} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) | \mathbf {u} _ {\tau - 1} (0)\right) = \mathbb {E} _ {\mathbf {z} _ {\tau : \tau + H - 1} (0)} \left[ \prod_ {i = 0} ^ {H - 1} p \left(\mathbf {z} _ {\tau + i} \left(t + \frac {i}{H} T\right) | \mathbf {z} _ {\tau + i} (0)\right) \right], \tag {11}
+$$
+
+where the expectation is about $\mathbf{z}_{\tau : \tau + H - 1}(0) \sim p_{\mathrm{train}}\big(\mathbf{z}_{\tau : \tau + H - 1}(0) | \mathbf{u}_{\tau - 1}(0)\big)$ , and each
+
+$$
+p \big (\mathbf {z} _ {\tau + i} (t + \frac {i}{H} T) | \mathbf {z} _ {\tau + i} (0) \big) = \mathcal {N} \big (\mathbf {z} _ {\tau + i} (t + \frac {i}{H} T); s (t + \frac {i}{H} T) \mathbf {z} _ {\tau + i} (0), s (t + \frac {i}{H} T) ^ {2} \sigma (t + \frac {i}{H} T) ^ {2} \mathbf {I} \big).
+$$
+
+From this proposition, to sample $\tilde{\mathbf{z}}_{\tau:\tau+H-1}$ , we first sample a subsequence $\mathbf{z}_{\tau:\tau+H-1}(0)$ of trajectory following the state $\mathbf{u}_{\tau-1}(0)$ , and then independently sample each component $\mathbf{z}_{\tau+i}(t+\frac{i}{H}T)$ of $\tilde{\mathbf{z}}_{\tau:\tau+H-1}$ by adding noise to the corresponding $\mathbf{z}_{\tau+i}(0)$ . Then, we train $\epsilon_{\theta}$ by the following loss:
+
+$$
+\mathcal {L} _ {\text {a s y n c h}} = \mathbb {E} _ {\tau , t, (\mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t)), \epsilon} [ \| \epsilon - \epsilon_ {\theta} (\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t), \mathbf {u} _ {\tau - 1}, t) \| _ {2} ^ {2} ]. \tag {12}
+$$
+
+where the expectation is about $\tau \sim U(1, N - H + 1)$ , $t \sim U(0, \frac{1}{H} T)$ , $(\mathbf{u}_{\tau - 1}(0), \tilde{\mathbf{z}}_{\tau; \tau + H - 1}(t)) \sim p_{\mathrm{train}}(\mathbf{u}_{\tau - 1}(0)) p_t(\tilde{\mathbf{z}}_{\tau; \tau + H - 1}(t) | \mathbf{u}_{\tau - 1}(0)), \epsilon \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$ . After training, we can use Eq. 10, where $t$ goes from $\frac{1}{H} T$ to 0, to sample $\tilde{\mathbf{z}}_{\tau; \tau + H - 1}(0) \sim p(\tilde{\mathbf{z}}_{\tau; \tau + H - 1}(0) | \mathbf{u}_{\tau - 1}(0), \tilde{\mathbf{z}}_{\tau; \tau + H - 1}(\frac{1}{H} T))$ .
+
+To sample $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ that optimizes the control objective $\mathcal{J}(\mathbf{z}_{1:N}(0))$ , the denoising process can be performed with an extra term representing the guidance of the control objective $\mathcal{J}$ :
+
+$$
+\begin{array}{l} \mathrm {d} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) = [ \tilde {f} _ {\tau : \tau + H - 1} (t) \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \\ - \tilde {g} _ {\tau ; \tau + H - 1} (t) ^ {2} \nabla_ {\tilde {\mathbf {z}} _ {\tau ; \tau + H - 1} (t)} \log p _ {t} \left(\tilde {\mathbf {z}} _ {\tau ; \tau + H - 1} (t) | \mathbf {u} _ {\tau - 1} (0)\right) ] d t \\ + \underbrace {\tilde {g} _ {\tau : \tau + H - 1} (t) ^ {2} \lambda \nabla_ {\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t)} \mathcal {J} (\hat {\mathbf {z}} _ {\tau : \tau + H - 1} (0)) ]} _ {\text {g u i d e d s a m p l i n g b y t h e c o n t r o l o b j e c t i v e} \mathcal {J}} \tag {13} \\ + \tilde {g} _ {\tau : \tau + H - 1} (t) d \omega_ {\tau : \tau + H - 1} (t). \\ \end{array}
+$$
+
+Here, $\hat{\mathbf{z}}_{\tau ;\tau +H - 1}(0)\triangleq \mathbb{E}[\mathbf{z}_{\tau ;\tau +H - 1}(0)|\tilde{\mathbf{z}}_{\tau ;\tau +H - 1}(t)]$ is the noise-free approximation of $\mathbf{z}_{\tau ;\tau +H - 1}(0)$ given by an asynchronous Tweedie's estimate (implemented in Eq. 41):
+
+$$
+\hat {\mathbf {z}} _ {\tau + i} (0) = s \left(t + \frac {i}{H} T\right) ^ {- 1} \mathbf {z} _ {\tau + i} \left(t + \frac {i}{H} T\right) + s \left(t + \frac {i}{H} T\right) \sigma \left(t + \frac {i}{H} T\right) ^ {2} \frac {\partial \log p _ {t} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \mid \mathbf {u} _ {\tau - 1} (0)\right)}{\partial \mathbf {z} _ {\tau + i} \left(t + \frac {i}{H} T\right)}. \tag {14}
+$$
+
+Algorithm 1 Closed-loop Control of CL-DiffPhyCon
+1: Require synchronous model $\epsilon_{\phi}$ , asynchronous model $\epsilon_{\theta}$ , control objective $\mathcal{J}(\cdot)$ , initial state $\mathbf{u}_{\mathrm{env},0}$ , episode length $N$ , model horizon $H$ , full denoising steps $T$ , hyperparameters $\lambda$ .
+2: Initialize $\tilde{\mathbf{z}}_{1:H}(\frac{1}{H} T)$ using $\mathbf{u}_{\mathrm{env},0}, \epsilon_{\phi}$ , and $\mathbf{z}_{1:H}(T) \sim \mathcal{N}(\mathbf{0}, \sigma_T^2 \mathbf{I})$ by Eq. 5
+3: for $\tau = 1, \dots, N$ do
+4: for $t = T / H, T / H - 1, \dots, 1$ do
+5: update $\tilde{\mathbf{z}}_{\tau:\tau + H - 1}(t - 1)$ using $\mathbf{u}_{\mathrm{env},\tau - 1}(0), \epsilon_{\theta}$ , and $\tilde{\mathbf{z}}_{\tau:\tau + H - 1}(t)$ by Eq. 13
+6: end for
+7: $[\mathbf{u}_{\tau}(0), \mathbf{w}_{\tau}(0)] = \mathbf{z}_{\tau}(0)$
+8: input $\mathbf{u}_{\mathrm{env},\tau - 1}(0)$ and $\mathbf{w}_{\tau}(0)$ into the system dynamics $G$ , which outputs $\mathbf{u}_{\mathrm{env},\tau} //$ closed-loop feedback
+9: sample $\mathbf{z}_{\tau + H}(T) \sim \mathcal{N}(0, \sigma_T^2 \mathbf{I}) //$ append the end of the horizon with noise
+10: $\tilde{\mathbf{z}}_{\tau + 1:\tau + H}(\frac{1}{H} T) = [\mathbf{z}_{\tau + 1}(\frac{1}{H} T), \dots, \mathbf{z}_{\tau + H}(T)]$
+11: end for
+
+# 4.4 CLOSED-LOOP CONTROL
+
+Based on the two learned diffusion models, we now introduce the closed-loop control procedure, which together realize the distribution $\pi$ in Eq. 1, under the guidance of $\mathcal{J}$ . We first use the synchronous model $\epsilon_{\phi}$ to produce the initial asynchronous variable $\tilde{\mathbf{z}}_{1:H}(\frac{1}{H}T)$ conditioned on the initial state $\mathbf{u}_{\mathrm{env},0}^2$ by applying Eq. 5 in the horizon $[1,H]$ . Then, the control process starts. At each physical time step $\tau \geq 1$ , we sample $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ using $\mathbf{u}_{\mathrm{env},\tau-1}$ and $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(\frac{1}{H}T)$ through Eq. 13. We extract the control signal $\mathbf{w}_{\tau}(0)$ from the sampled $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ , and input the pair $(\mathbf{u}_{\mathrm{env},\tau-1},\mathbf{w}_{\tau}(0))$ to the system dynamics $G$ , which outputs the next state $\mathbf{u}_{\mathrm{env},\tau}$ . Then we sample a noise $\mathbf{z}_{\tau+H}(T) \sim \mathcal{N}(\mathbf{0},\sigma_T^2\mathbf{I})$ , and append it to the last $H-1$ components of $\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)$ to compose $\tilde{\mathbf{z}}_{\tau+1:\tau+H}(\frac{1}{H}T)$ . Now we take $\mathbf{u}_{\mathrm{env},\tau-1}$ , instead of the sampled $\mathbf{u}_{\tau-1}(0)$ , and $\tilde{\mathbf{z}}_{\tau+1:\tau+H}(\frac{1}{H}T)$ to the next loop. The whole procedure is presented in Algorithm 1 and illustrated in Figure 2. The closed-loop property of this inference process is analyzed in Appendix E.
+
+# 4.5 EFFICIENCY OF CL-DIFFPHYCON
+
+It is clear that CL-DiffPhyCon is $H / h$ times faster than DiffPhyCon- $h$ , the control method that conducts a full sampling process of DiffPhyCon with horizon $H$ every $h$ physical time steps, as illustrated in Figure 1. Even compared with the adaptive replanning diffusion method (Zhou et al., 2024), CL-DiffPhyCon is still more efficient because each latent variable is sampled only once and it does not involve extra computation such as likelihood estimation.
+
+Additionally, although some fast sampling methods were proposed recently, such as DDIM Song et al. (2020), to reduce the sampling cost of diffusion models, our CL-DiffPhyCon still has an independent acceleration effect beyond them. The key insight is that CL-DiffPhyCon adopts the same number of sampling steps $T$ in each physical time step compared to DiffPhyCon (Wei et al., 2024), which brings the opportunity to incorporate fast sampling methods. Hence, by applying them to each physical time step separately in both the sampling processes of the synchronous and asynchronous models, the control efficiency of CL-DiffPhyCon could be further enhanced.
+
+# 5 EXPERIMENT
+
+In the experiments, we aim to answer three questions: (1) Can CL-DiffPhyCon outperform the classical and state-of-the-art baselines? (2) Can CL-DiffPhyCon achieve the desired acceleration of inference as we analyzed in Section 4.5, and obtain further acceleration by involving DDIM (Song et al., 2020)? (3) Can CL-DiffPhyCon address the challenges of noise, partial observation, partial/boundary control, and high dimensional indirect control? To answer these questions, we conduct experiments on two control tasks: 1D Burgers' equation control and 2D incompressible fluid control, both of which have important applications in science and engineering.
+
+Table 1: Comparison results on 1D Burgers' equation control. The average control objective $(\mathcal{J})$ and inference time (averaged across all settings) are reported, using a single NVIDIA A100 80GB GPU with 16 CPU cores. Bold font is the best model and the runner-up is underlined.
+
+
noise-free ↓
physical constraint ↓
system noise ↓
measure noise ↓
FOPC ↓
POPC ↓
average time (s) ↓
BC
0.4708
0.4704
0.4138
0.3981
0.1093
0.0987
0.8356
BPPO
0.4686
0.4507
0.4088
0.3979
0.1079
0.0984
0.8231
PID
0.3250
0.3585
0.2323
0.2911
-
0.0827
0.7717
DiffPhyCon-1
0.0210
0.0214
0.0222
0.0232
0.0330
0.0332
49.2347
DiffPhyCon-5
0.0252
0.0257
0.0271
0.0272
0.0482
0.0484
10.8308
DiffPhyCon-15
0.0361
0.0365
0.0382
0.0377
0.1128
0.1132
4.9833
RDM
0.0296
0.0296
0.0310
0.0336
0.1124
0.1121
6.9130
CL-DiffPhyCon (ours)
0.0096
0.0110
0.0095
0.0127
0.0291
0.0295
4.5474
CL-DiffPhyCon (DDIM, ours)
0.0112
0.0123
0.0114
0.0146
0.0311
0.0313
0.8257
+
+# 5.1 BASELINES
+
+The following classical, imitation learning, reinforcement learning, and diffusion control methods are selected as baselines: the classical control algorithm PID (Li et al., 2006); an imitation learning method Behaviour Cloning (BC) (Pomerleau, 1988); a recent reinforcement learning method Behavior Proximal Policy Optimization (BPPO) (Zhuang et al., 2023); two diffusion control methods, including RDM (Zhou et al., 2024), which adaptively decides when to conduct a full sampling process of control sequence, and DiffPhyCon (Wei et al., 2024), whose original version plans the control sequences of the whole trajectories in one sampling process. Since the trajectory length is much longer than the diffusion model horizon $H$ ( $H = 16$ and $H = 15$ in 1D and 2D tasks, respectively), we extend DiffPhyCon to its three variants DiffPhyCon- $h$ ( $h \in \{1, 5, H - 1\}$ ) as our baselines, based on the predefined interval $h$ of physical time steps to conduct a full sampling process. All the diffusion control baselines use the trained synchronous diffusion model of CL-DiffPhyCon for sampling, with steps $T = 900$ and $T = 600$ on the 1D and 2D tasks, respectively. PID is inapplicable to the complex 2D task (Åström & Hägglund, 2000). RDM is reproduced following the official code. However, the default values of two thresholding hyperparameters in RDM do not perform well on our tasks. Therefore, we select a pair of values that perform best (see Appendix K for details). For other baselines, we follow the implementations in DiffPhyCon Wei et al. (2024).
+
+# 5.2 1D BURGERS' EQUATION CONTROL
+
+Experiment settings. The Burgers' equation is a widely used equation to describe a variety of physical systems. We follow the works in Hwang et al. (2022); Mowlavi & Nabi (2023) and consider the 1D Burgers' equation with the Dirichlet boundary condition and external force $w(\tau, x)$ as follows:
+
+$$
+\left\{ \begin{array}{l l} \frac {\partial u}{\partial \tau} = - u \cdot \frac {\partial u}{\partial x} + \nu \frac {\partial^ {2} u}{\partial x ^ {2}} + w (\tau , x) & \text {i n} [ 0, \mathcal {T} ] \times \Omega , \\ u (\tau , x) = 0 & \text {i n} [ 0, \mathcal {T} ] \times \partial \Omega , \\ u (0, x) = u _ {0} (x) & \text {i n} \{\tau = 0 \} \times \Omega , \end{array} \right. \tag {15}
+$$
+
+where $\nu$ is the viscosity, and $u_0(x)$ is the initial condition. Given a target state $u_{d}(\tau ,x)$ defined in range $[0,\mathcal{T}]\times \Omega$ , the control objective $\mathcal{J}$ is to minimize the error between $u(\tau ,x)$ and $u_{d}(\tau ,x)$ :
+
+$$
+\mathcal {J} := \int_ {\mathcal {T}} \int_ {\Omega} | u (\tau , x) - u _ {d} (\tau , x) | ^ {2} \mathrm {d} x \mathrm {d} \tau , \tag {16}
+$$
+
+subject to Eq. 15. We explore four kinds of settings from real-world considerations: (1) noise-free control; (2) control under physical constraint with a limited range of allowance for control actions; (3) control under random system and measurement noise, respectively; (4) partial control (PC) where actuators are limited to control approximately $1/8$ of the full spatial domain, which is further divided to full observation (FOPC) and partial observation (POPC) with sensors in $1/8$ of the full spatial domain. Details of these settings are provided in Appendix F.2.
+
+Results. In Table 1, we present the results of our proposed CL-DiffPhyCon and baselines. Note that the reported metrics in different settings are not directly comparable. It can be seen that CL-DiffPhyCon delivers the best results compared to all baselines in all settings. BC and BPPO perform
+
+Table 2: Comparison results on 2D incompressible fluid control. The average control objective ( $\mathcal{I}$ ) and inference time (averaged across all settings) are reported, using a single NVIDIA A6000 48GB GPU with 16 CPU cores. Bold font is the best model and the runner-up is underlined.
+
+
Large domain control
Boundary control
Average time (s)↓
Fixed map↓
Random map↓
Fixed map↓
Random map↓
BC
0.6722
0.7046
0.8861
0.8871
4.67
BPPO
0.6343
0.6524
0.8830
0.8844
4.65
DiffPhyCon-1
0.5454
0.3754
0.7517
0.7955
1666.50
DiffPhyCon-5
0.5051
0.5458
0.6703
0.7451
357.66
DiffPhyCon-14
0.5823
0.5621
0.6498
0.7221
141.88
RDM
0.4074
0.4356
0.6553
0.7087
238.43
CL-DiffPhyCon (ours)
0.3371
0.3485
0.6169
0.7003
144.04
CL-DiffPhyCon (DDIM, ours)
0.4100
0.4254
0.6671
0.7109
26.01
+
+poorly on this task as they rely heavily on the quality of training control sequences, which are far from optimal solutions (see Appendix F.1). The diffusion control baselines perform better, compared with BC and BPPO, because diffusion models conduct global optimization over each horizon through the conditional generation and excel in sampling from high dimensional space (Wei et al., 2024). Specifically, CL-DiffPhyCon decreases $\mathcal{I}$ by $54.3\%$ and $48.6\%$ compared with the best baselines (DiffPhyCon-1) in the noise-free and physical constraint settings, respectively. Furthermore, when the system or measurement is perturbed by noise, our method achieves improvements comparable to those in the noise-free case, which decreases $\mathcal{I}$ by $48.6\%$ and $57.2\%$ , respectively. Moreover, despite the reduced controllable range in FOPC and POPC settings typically diminishes the effectiveness of diffusion-based control methods, CL-DiffPhyCon maintains superior performance over all baselines with at least $11.8\%$ and $11.1\%$ decreasing on $\mathcal{I}$ . BC, BPPO, and PID demonstrate improved performance because only a small part of actions need to be optimized, making it easier to fit compared to high-dimensional actions, while they still show significantly lower performance compared to diffusion-based methods. Visualizations are presented in Appendix I; they show that CL-DiffPhyCon achieves lower error regarding the target state compared with baselines. In terms of inference time besides the enhanced control performance, CL-DiffPhyCon brings significant acceleration of the sampling process, about $H / h$ times faster than DiffPhyCon- $h$ and two times faster than RDM. Furthermore, by combining with DDIM of 30 sampling steps, CL-DiffPhyCon achieves an additional $5\times$ speedup, demonstrating the independent acceleration effect of CL-DiffPhyCon from existing fast sampling methods of diffusion models. As a result, the reduced time cost of CL-DiffPhyCon is comparable with those non-diffusion control baselines BC, BPPO, and PID, while the performance is much superior.
+
+# 5.3 2D INCOMPRESSIBLE FLUID CONTROL
+
+Experiment settings. Our experimental setup is based on previous studies of Holl et al. (2020); Wei et al. (2024). Given an initial cloud of smoke in a $64 \times 64$ incompressible fluid field, this task aims to minimize the volume of smoke failing to pass through the top middle exit (seven exits in total) over $N = 64$ physical time steps, by applying a sequence of 2D forces outside the outermost obstacles. This task represents a simplified scenario of real-life applications such as indoor air quality control (Nair et al., 2022). We consider two settings from real-world consideration: large domain control, where control signals are applied to all peripheral regions consisting of 1,792 cells outside the outermost obstacles, and boundary control, where control signals are restricted to only the $4 \times 8$ cells inside the four exits. It is very challenging since the control forces can only be exerted indirectly in the peripheral regions, which necessitates the model to plan ahead to prevent the smoke from entering the wrong exits or getting stuck in corners. The boundary control setting is even more challenging due to the significantly reduced range of influence of the controllable cells. During inference, for both settings, we follow Zhou et al. (2024) and add $p = 0.1$ probability of random control in the execution of control signals. Random controls cause unexpected changes in the system state, which may render previously planned control sequences no longer applicable, thus necessitating re-planning and adding additional challenge to the task. For both settings, besides a fixed map (FM) evaluation mode where test samples use the same obstacles' configuration with training trajectories, we also introduce a random map (RM) mode where the obstacles' configuration varies. For details of experimental settings and implementation, please refer to Appendix G.
+
+
+Figure 3: Visual comparisons between CL-DiffPhyCon and best baselines on 2D fluid control under fixed map (top) and random map (bottom) evaluation modes, respectively.
+
+Results. Table 2 shows the control performance of CL-DiffPhyCon and baselines. The results indicate that CL-DiffPhyCon outperforms the baselines in both large domain control and boundary control settings, under both fixed map and random map evaluation modes. This validates that our asynchronous diffusion model could effectively sample appropriate subsequent control sequences by conditioning on the changed system state in a closed-loop manner, showcasing strong generalizability. The results also demonstrate the advantage of diffusion-based control methods over BC and BPPO. In Figure 3, we illustrate randomly selected test samples controlled by CL-DiffPhyCon and the best baselines in the large domain control setting. CL-DiffPhyCon exhibits a stronger capability of adapting to changed fluid and maps. More visualization results are presented in Appendix J. We also present the comparison of average inference time in Table 2. Aligning with our observation on the 1D task, CL-DiffPhyCon achieves approximately $H / h$ times speedup compared to DiffPhyCon. Besides, CL-DiffPhyCon is much more efficient than RDM by avoiding frequent replanning. By adopting DDIM, the inference is further accelerated, over $5 \times$ faster than strong diffusion-based control baseline RDM, with comparable control performance. For a detailed study of the effect of the model horizon $H$ , please refer to Appendix G.3.
+
+# 6 CONCLUSION AND LIMITATION
+
+In this paper, we propose CL-DiffPhyCon, a novel diffusion-based method for closed-loop control of complex physical systems, grounded in a theoretical analysis of the target distribution. Experiments on two physical control tasks demonstrate its superior performance and efficiency. Still, it has several limitations that offer opportunities for future work. First, CL-DiffPhyCon is currently trained offline without interacting with the system dynamics. Incorporating real-time feedback during training could enable dynamic adaptation and the discovery of new strategies. Second, while the two diffusion models in CL-DiffPhyCon are theoretically derived, a formal bound on its optimization performance under guidance sampling remains an open question, providing a promising direction for further theoretical research. Finally, the effectiveness of CL-DiffPhyCon in more domains is worth exploring. Although our method is designed for the control of complex physical systems, it holds promise for broader applications, such as robot control and drone control.
+
+# ACKNOWLEDGMENTS
+
+We gratefully acknowledge the support of Westlake University Research Center for Industries of the Future and Westlake University Center for High-performance Computing. This research is funded by the Outstanding Postdoctoral Program Funding Project of Zhejiang Province. The content is solely the responsibility of the authors and does not necessarily represent the official views of the funding entities.
+
+# REFERENCES
+
+Anurag Ajay, Yilun Du, Abhi Gupta, Joshua B Tenenbaum, Tommi S Jaakkola, and Pulkit Agrawal. Is conditional generative modeling all you need for decision making? In The Eleventh International Conference on Learning Representations, 2022.
+Karl Johan Åström and Tore Hägglund. The future of pid control. In Digital Control – Past, present, and future of PID Control, United States, 2000. Elsevier.
+Gerben Beintema, Alessandro Corbetta, Luca Biferale, and Federico Toschi. Controlling rayleigh-bénard convection via reinforcement learning. Journal of Turbulence, 21(9-10):585-605, 2020.
+Cheng Chi, Siyuan Feng, Yilun Du, Zhenjia Xu, Eric Cousineau, Benjamin Burchfiel, and Shuran Song. Diffusion policy: Visuomotor policy learning via action diffusion. arXiv preprint arXiv:2303.04137, 2023.
+Hyungjin Chung, Jeongsol Kim, Michael Thompson McCann, Marc Louis Klasky, and Jong Chul Ye. Diffusion posterior sampling for general noisy inverse problems. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=OnD9zGAGT0k.
+Jonas Degrave, Federico Felici, Jonas Buchli, Michael Neunert, Brendan Tracey, Francesco Carpanese, Timo Ewalds, Roland Hafner, Abbas Abdelmaleki, Diego de Las Casas, et al. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature, 602(7897):414-419, 2022.
+Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780-8794, 2021.
+MA Elhawary. Deep reinforcement learning for active flow control around a circular cylinder using unsteady-mode plasma actuators. arXiv preprint arXiv:2012.10165, 2020.
+Haodong Feng, Yue Wang, Hui Xiang, Zhiyang Jin, and Dixia Fan. How to control hydrodynamic force on fluidic pinball via deep reinforcement learning. Physics of Fluids, 35(4), 2023.
+Haodong Feng, Dehan Yuan, Jiale Miao, Jie You, Yue Wang, Yi Zhu, and Dixia Fan. Efficient navigation of a robotic fish swimming across the vortical flow field. arXiv preprint arXiv:2405.14251, 2024.
+Elie Hachem, Hassan Ghraieb, Jonathan Viverat, Aurélien Larcher, and P Meliga. Deep reinforcement learning for the control of conjugate heat transfer. Journal of Computational Physics, 436: 110317, 2021.
+Michael Hesse, Julia Timmermann, Eyke Hüllermeier, and Ansgar Trächtler. A reinforcement learning strategy for the swing-up of the double pendulum on a cart. Procedia Manufacturing, 24: 15-20, 2018. ISSN 23519789. doi: 10.1016/j.promfg.2018.06.004.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Jonathan Ho, Tim Salimans, Alexey Gritsenko, William Chan, Mohammad Norouzi, and David J. Fleet. Video diffusion models. Advances in Neural Information Processing Systems, 35:8633-8646, 2022.
+
+Philipp Holl, Vladlen Koltun, and Nils Thuerey. Learning to control pdes with differentiable physics. arXiv preprint arXiv:2001.07457, 2020.
+Rakhoon Hwang, Jae Yong Lee, Jin Young Shin, and Hyung Ju Hwang. Solving PDE-Constrained Control Problems Using Operator Learning. AAAI, 36(4):4504-4512, June 2022. ISSN 2374-3468, 2159-5399. doi: 10.1609/aaai.v36i4.20373. URL https://ojs.aaai.org/index.php/AAAI/article/view/20373.
+Liviu Gr. Ixaru and Guido Vanden Berghe. Runge-Kutta Solvers for Ordinary Differential Equations, pp. 223-304. Springer Netherlands, Dordrecht, 2004. ISBN 978-1-4020-2100-8. doi: 10.1007/978-1-4020-2100-8_6. URL https://doi.org/10.1007/978-1-4020-2100-8_6.
+Michael Janner, Yilun Du, Joshua Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. Proceedings of Machine Learning Research, 162:9902-9915, 17-23 Jul 2022a.
+Michael Janner, Yilun Du, Joshua Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szeptesvari, Gang Niu, and Sivan Sabato (eds.), Proceedings of the 39th International Conference on Machine Learning, volume 162, pp. 9902-9915. PMLR, 17-23 Jul 2022b.
+Leslie Pack Kaelbling and Tomás Lozano-Pérez. Hierarchical task and motion planning in the now. In 2011 IEEE International Conference on Robotics and Automation, pp. 1470-1477. IEEE, 2011.
+Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models. Advances in neural information processing systems, 35:26565-26577, 2022.
+Yun Li, Kiam Heong Ang, and G.C.Y. Chong. Pid control system analysis and design. IEEE Control Systems Magazine, 26(1):32-41, 2006. doi: 10.1109/MCS.2006.1580152.
+Saviz Mowlavi and Saleh Nabi. Optimal control of pdes using physics-informed neural networks. Journal of Computational Physics, 473:111731, 2023.
+Ajith N Nair, Prashant Anand, Abraham George, and Nilabhra Mondal. A review of strategies and their effectiveness in reducing indoor airborne transmission and improving indoor air quality. Environmental Research, 213:113579, 2022.
+Guido Novati, Siddhartha Verma, Dmitry Alexeev, Diego Rossinelli, Wim M Van Rees, and Petros Koumoutsakos. Synchronisation through learning for two self-propelled swimmers. Bioinspiration & biomimetics, 12(3):036001, 2017.
+Dean A Pomerleau. Alvinn: An autonomous land vehicle in a neural network. Advances in neural information processing systems, 1, 1988.
+Ilan Price, Alvaro Sanchez-Gonzalez, Ferran Alet, Timo Ewalds, Andrew El-Kadi, Jacklynn Stott, Shakir Mohamed, Peter Battaglia, Remi Lam, and Matthew Willson. Gencast: Diffusion-based ensemble forecasting for medium-range weather. arXiv preprint arXiv:2312.15796, 2023.
+Jean Rabault, Miroslav Kuchta, Atle Jensen, Ulysse Reglade, and Nicolas Cerardi. Artificial neural networks trained through deep reinforcement learning discover control strategies for active flow control. Journal of fluid mechanics, 865:281-302, 2019.
+Ricardo Reyes Garza, Nikos Kyriakopoulos, Zoran M Cenev, Carlo Rigoni, and Jaakko VI Timonen. Magnetic quincke rollers with tunable single-particle dynamics and collective states. Science Advances, 9(26):eadh2522, 2023.
+Olaf Ronneberger, Philipp Fischer, and Thomas Brox. 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.
+
+David Ruhe, Jonathan Heek, Tim Salimans, and Emiel Hoogeboom. Rolling diffusion models. In *Forty-first International Conference on Machine Learning*, 2024. URL https://openreview.net/forum?id=a9bzTv9SzO.
+Simo Särkkä and Arno Solin. Applied stochastic differential equations, volume 10. Cambridge University Press, 2019.
+Max Schwenzer, Muzaffer Ay, Thomas Bergs, and Dirk Abel. Review on model predictive control: An engineering perspective. The International Journal of Advanced Manufacturing Technology, 117(5-6):1327-1349, 2021.
+Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv:2010.02502, October 2020. URL https://arxiv.org/abs/2010.02502.
+Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=PxTIG12RRHS.
+Siddhartha Verma, Guido Novati, and Petros Koumoutsakos. Efficient collective swimming by harnessing vortices through deep reinforcement learning. Proceedings of the National Academy of Sciences, 115(23):5849-5854, 2018.
+ZP Wang, RJ Lin, ZY Zhao, X Chen, PM Guo, N Yang, ZC Wang, and DX Fan. Learn to flap: foil non-parametric path planning via deep reinforcement learning. Journal of Fluid Mechanics, 984: A9, 2024.
+Long Wei, Peiyan Hu, Ruiqi Feng, Haodong Feng, Yixuan Du, Tao Zhang, Rui Wang, Yue Wang, Zhi-Ming Ma, and Tailin Wu. A generative approach to control complex physical systems. arXiv preprint arXiv:2407.06494, 2024.
+Jared Willard, Xiaowei Jia, Shaoming Xu, Michael Steinbach, and Vipin Kumar. Integrating physics-based modeling with machine learning: A survey. arXiv preprint arXiv:2003.04919, 1(1):1-34, 2020.
+Tailin Wu, Takashi Maruyama, Long Wei, Tao Zhang, Yilun Du, Gianluca Iaccarino, and Jure Leskovec. Compositional generative inverse design. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=wmX0CqFsd7.
+Tong Wu, Zhihao Fan, Xiao Liu, Hai-Tao Zheng, Yeyun Gong, Jian Jiao, Juntao Li, Jian Guo, Nan Duan, Weizhu Chen, et al. Ar-diffusion: Auto-regressive diffusion model for text generation. Advances in Neural Information Processing Systems, 36:39957-39974, 2023.
+Masaki Yamakita, Kenichi Nonaka, and Katsuhisa Furuta. Swing up control of a double pendulum. In 1993 American Control Conference, pp. 2229-2233, San Francisco, CA, USA, June 1993. IEEE. ISBN 978-0-7803-0860-2. doi: 10.23919/ACC.1993.4793279. URL https://ieeexplore.ieee.org/document/4793279/.
+Cagatay Yildiz, Markus Heinonen, and Harri Lähdesmäki. Continuous-time model-based reinforcement learning. In International Conference on Machine Learning, pp. 12009-12018. PMLR, 2021.
+Siyuan Zhou, Yilun Du, Shun Zhang, Mengdi Xu, Yikang Shen, Wei Xiao, Dit-Yan Yeung, and Chuang Gan. Adaptive online replanning with diffusion models. Advances in Neural Information Processing Systems, 36, 2024.
+Zifeng Zhuang, Kun LEI, Jinxin Liu, Donglin Wang, and Yilang Guo. Behavior proximal policy optimization. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=3c13LptpIph.
+
+# A BASIC PROPERTIES OF STOCHASTIC DIFFERENTIAL EQUATION (SDE)
+
+In this work, we use the formulas of stochastic differential equation (SDE) to express diffusion models. Specifically, the SDEs that we use can be written to the following unified form:
+
+$$
+\mathrm {d} \mathbf {x} (t) = f (t) \mathbf {x} (t) \mathrm {d} t + g (t) \mathrm {d} \omega (t). \tag {17}
+$$
+
+The reverse-time SDE of Eq. 17 is:
+
+$$
+\mathrm {d} \mathbf {x} (t) = [ f (t) \mathbf {x} (t) - g (t) ^ {2} \nabla_ {\mathbf {x} (t)} \log p _ {t} (\mathbf {x} (t)) ] \mathrm {d} t + g (t) \mathrm {d} \omega (t). \tag {18}
+$$
+
+In this section, we summarize some basic properties of Eq. 17, which can also be found in existing SDE works Song et al. (2021); Chung et al. (2023); Karras et al. (2022).
+
+First, such a linear SDE has the closed solution Särkkä & Solin (2019)
+
+$$
+\mathbf {x} (t) = \mathbf {x} (0) \exp \left(\int_ {0} ^ {t} f (\eta) \mathrm {d} \eta\right) + \int_ {0} ^ {t} \exp \left(\int_ {\zeta} ^ {t} f (\eta) \mathrm {d} \eta\right) g (\zeta) \mathrm {d} \omega (\zeta), \tag {19}
+$$
+
+where the second term is an Itô integral. And the mean $\mathbf{m}(t)$ and covariance $\mathbf{V}(t)$ satisfies the following ordinary differential equations:
+
+$$
+\frac {\mathrm {d} \mathbf {m} (t)}{\mathrm {d} t} = f (t) \mathbf {m} (t), \tag {20}
+$$
+
+$$
+\frac {\mathrm {d} \mathbf {V} (t)}{\mathrm {d} t} = 2 f (t) \mathbf {V} (t) + g (t) ^ {2} \mathbf {I}.
+$$
+
+Solving these equations, we get:
+
+$$
+\mathbf {m} (t) = s (t) \mathbf {m} (0), \tag {21}
+$$
+
+$$
+\mathbf {V} (t) = s (t) ^ {2} \left(\sigma (t) ^ {2} \mathbf {I} + \mathbf {V} (0)\right),
+$$
+
+where $s(t) = \exp \left( \int_0^t f(\eta) \, \mathrm{d}\eta \right)$ and $\sigma(t) = \sqrt{\int_0^t \frac{g(\eta)^2}{s(\eta)^2} \, \mathrm{d}\eta}$ .
+
+Tweedie's estimate. From Eq. 19 and Eq. 21, we know
+
+$$
+\mathbf {x} (t) | \mathbf {x} (0) \sim \mathcal {N} \left(s (t) \mathbf {x} (0), s (t) ^ {2} \sigma (t) ^ {2} \mathbf {I}\right). \tag {22}
+$$
+
+According to the density function of normal distribution, we have:
+
+$$
+\nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t) | \mathbf {x} (0)) = s (t) ^ {- 2} \sigma (t) ^ {- 2} (s (t) \mathbf {x} (0) - \mathbf {x} (t)). \tag {23}
+$$
+
+Take the expectation over $\mathbf{x}(0)$ conditional on $\mathbf{x}(t)$ on both sides:
+
+$$
+\begin{array}{l} s (t) ^ {- 2} \sigma (t) ^ {- 2} (s (t) \mathbb {E} [ \mathbf {x} (0) | \mathbf {x} (t) ] - \mathbf {x} (t)) \\ = \mathbb {E} _ {\mathbf {x} (0)} [ \nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t) | \mathbf {x} (0)) | \mathbf {x} (t) ] \\ = \int_ {0} \nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t) | \mathbf {x} (0)) p (\mathbf {x} (0) | \mathbf {x} (t)) d \mathbf {x} (0) \tag {24} \\ = \int \nabla_ {\mathbf {x} (t)} p (\mathbf {x} (t), \mathbf {x} (0)) / p (\mathbf {x} (t)) d \mathbf {x} (0) \\ = \nabla_ {\mathbf {x} (t)} p (\mathbf {x} (t)) / p (\mathbf {x} (t)) \\ = \nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t)). \\ \end{array}
+$$
+
+Rearranging the equation, we get Tweedie's estimate:
+
+$$
+\hat {\mathbf {x}} (0) \triangleq \mathbb {E} [ \mathbf {x} (0) | \mathbf {x} (t) ] = s (t) ^ {- 1} \mathbf {x} (t) + s (t) \sigma (t) ^ {2} \nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t)). \tag {25}
+$$
+
+Intuitively, Eq. 25 estimate the noise-free $\mathbf{x}_0$ given $\mathbf{x}_t$ .
+
+Approximate score function by diffusion models. Now we consider the following loss function of DDPM (Ho et al., 2020) to train the diffusion model $\epsilon_{\phi}$ :
+
+$$
+\begin{array}{l} \mathbb {E} _ {t, \mathbf {x} (0), \epsilon} [ \| \epsilon - \epsilon_ {\phi} (s (t) \mathbf {x} (0) + s (t) ^ {2} \sigma (t) ^ {2} \epsilon , t) \| _ {2} ^ {2} ] \\ = \mathbb {E} _ {t, \mathbf {x} (0), \mathbf {x} (t)} [ \| \frac {\mathbf {x} (t) - \mathbf {x} (0) s (t)}{s (t) ^ {2} \sigma (t) ^ {2}} - \epsilon_ {\phi} (\mathbf {x} (t), t) \| _ {2} ^ {2} ]. \tag {26} \\ \end{array}
+$$
+
+The best prediction $\epsilon_{\phi^*}(\cdot, t)$ in this loss is the following conditional expectation:
+
+$$
+\begin{array}{l} \boldsymbol {\epsilon} _ {\phi^ {*}} (\mathbf {x} (t), t) = \mathbb {E} \left[ \frac {\mathbf {x} (t) - \mathbf {x} (0) s (t)}{s (t) ^ {2} \sigma (t) ^ {2}} - \boldsymbol {\epsilon} _ {\phi} (\mathbf {x} (t), t) | \mathbf {x} (t) \right] \tag {27} \\ = \frac {\mathbf {x} (t) - \mathbb {E} [ \mathbf {x} (0) | \mathbf {x} (t) ] s (t)}{s (t) ^ {2} \sigma (t) ^ {2}}. \\ \end{array}
+$$
+
+Plugging Eq. 25 in it, we get the score function:
+
+$$
+\nabla_ {\mathbf {x} (t)} \log p (\mathbf {x} (t)) = - \epsilon_ {\phi^ {*}} (\mathbf {x} (t), t). \tag {28}
+$$
+
+# B VARIANCE PRESERVING (VP) SDE
+
+In the practical training and inference, we use Variance Preserving (VP) SDE Song et al. (2021), which is actually the continuous version of DDPM Ho et al. (2020).
+
+VP SDE specializes Eq. 17 to
+
+$$
+\mathrm {d} \mathbf {x} (t) = - \frac {1}{2} \beta (t) \mathbf {x} (t) \mathrm {d} t + \sqrt {\beta (t)} \mathrm {d} \omega (t), \tag {29}
+$$
+
+where $\beta (t) > 0$ for $t\in [0,T]$ . And its reverse-time SDE is:
+
+$$
+\mathrm {d} \mathbf {x} (t) = \left[ - \frac {1}{2} \beta (t) \mathbf {x} (t) - \beta (t) \nabla_ {\mathbf {x} (t)} \log p _ {t} (\mathbf {x} (t)) \right] \mathrm {d} t + \sqrt {\beta (t)} \mathrm {d} \omega (t), \tag {30}
+$$
+
+In algorithm implementation, we use $K$ time steps $^3$ , $t_i = \frac{i}{K} T$ for $i = 0, \dots, K-1$ , to discretize Eq. 29. Using $\Delta t = \frac{1}{K} T$ , we have:
+
+$$
+\begin{array}{l} \mathbf {x} \left(t _ {i} + \Delta t\right) \approx \mathbf {x} \left(t _ {i}\right) - \frac {1}{2} \beta \left(t _ {i}\right) \Delta t \mathbf {x} \left(t _ {i}\right) + \sqrt {\beta \left(t _ {i}\right) \Delta t} \xi , \tag {31} \\ \approx \sqrt {1 - \beta (t _ {i}) \Delta t} \mathbf {x} (t _ {i}) + \sqrt {\beta (t _ {i}) \Delta t} \xi , \\ \end{array}
+$$
+
+where $\xi \sim \mathcal{N}(\mathbf{0},\mathbf{I})$
+
+Let $\beta_{i} = \beta (t_{i})\Delta t,\mathbf{x}_{i} = \mathbf{x}(t_{i})$ . We get the discrete forward iterative equation, which is exact DDPM:
+
+$$
+\mathbf {x} _ {i + 1} = \sqrt {1 - \beta_ {i}} \mathbf {x} _ {i} + \sqrt {\beta_ {i}} \xi . \tag {32}
+$$
+
+Similarly, Eq. 30 can be discretize to
+
+$$
+\begin{array}{l} \mathbf {x} \left(t _ {i} - \Delta t\right) \approx \mathbf {x} \left(t _ {i}\right) + \frac {1}{2} \beta \left(t _ {i}\right) \Delta t \mathbf {x} \left(t _ {i}\right) + \beta \left(t _ {i}\right) \Delta t \nabla_ {\mathbf {x} \left(t _ {i}\right)} \log p _ {t _ {i}} \left(\mathbf {x} \left(t _ {i}\right)\right) + \sqrt {\beta \left(t _ {i}\right) \Delta t} \xi \\ \approx \frac {1}{\sqrt {1 - \beta (t _ {i}) \Delta t}} \mathbf {x} (t _ {i}) + \beta (t _ {i}) \Delta t \nabla_ {\mathbf {x} (t _ {i})} \log p _ {t _ {i}} (\mathbf {x} (t _ {i})) + \sqrt {\beta (t _ {i}) \Delta t} \xi . \\ \end{array}
+$$
+
+So, we get the discrete backward iterative equation:
+
+$$
+\mathbf {x} _ {i - 1} = \frac {1}{\sqrt {1 - \beta_ {i}}} \mathbf {x} _ {i} + \beta_ {i} \nabla_ {\mathbf {x} _ {i}} \log p (\mathbf {x} _ {i}) + \sqrt {\beta_ {i}} \xi . \tag {34}
+$$
+
+Additionally, we have:
+
+$$
+\begin{array}{l} s \left(t _ {i}\right) ^ {2} = \exp \left(\int_ {t _ {0}} ^ {t _ {i} + \Delta t} - \beta (\eta) \mathrm {d} \eta\right) \\ = \exp \left(\sum_ {j = 0} ^ {i} - \beta \left(t _ {j}\right) \Delta t\right) \\ = \prod_ {j = 0} ^ {i} \exp (- \beta (t _ {j}) \Delta t) \tag {35} \\ \approx \prod_ {j = 0} ^ {i} (1 - \beta (t _ {j}) \Delta t) \\ = \prod_ {j = 0} ^ {i} (1 - \beta_ {j}). \\ \end{array}
+$$
+
+And, we also have:
+
+$$
+\begin{array}{l} s \left(t _ {i}\right) ^ {2} \sigma \left(t _ {i}\right) ^ {2} = \exp \left(\int_ {t _ {0}} ^ {t _ {i} + \Delta t} - \beta (\eta) \mathrm {d} \eta\right) \int_ {t _ {0}} ^ {t _ {i} + \Delta t} \beta (\eta) \exp \left(\int_ {t _ {0}} ^ {\eta} \beta (\zeta) \mathrm {d} \zeta\right) \mathrm {d} \eta \\ = \int_ {t _ {0}} ^ {t _ {i} + \Delta t} \beta (\eta) \exp \left(\int_ {\eta} ^ {t _ {i} + \Delta t} - \beta (\zeta) \mathrm {d} \zeta\right) \mathrm {d} \eta \\ \approx 1 - \exp \left(\int_ {t _ {0}} ^ {t _ {i} + \Delta t} - \beta (\eta) \exp \left(\int_ {\eta} ^ {t _ {i} + \Delta t} - \beta (\zeta) \mathrm {d} \zeta\right) \mathrm {d} \eta\right) \tag {36} \\ \approx 1 - \exp \left(\int_ {t _ {0}} ^ {t _ {i} + \Delta t} - \beta (\eta) \mathrm {d} \eta\right) \\ = 1 - s (t _ {i}) ^ {2} \\ \approx 1 - \prod_ {j = 0} ^ {i} (1 - \beta_ {j}). \\ \end{array}
+$$
+
+We define $\alpha_{i} = 1 - \beta_{i}$ and $\bar{\alpha}_i = \prod_{j = 0}^i\alpha_i$ . Then, we get $s(t_i)^2\approx \bar{\alpha}_i$ , $s(t_i)^2\sigma (t_i)^2\approx 1 - \bar{\alpha}_i$ , and $\mathbf{x}_i|\mathbf{x}_0\sim \mathcal{N}\big(\sqrt{\bar{\alpha}_i}\mathbf{x}_0,(1 - \bar{\alpha}_i)\mathbf{I}\big)$ . Therefore, Tweedie's estimate becomes
+
+$$
+\hat {\mathbf {x}} (0) = \frac {1}{\sqrt {\bar {\alpha} _ {i}}} \left(\mathbf {x} _ {i} + \left(1 - \bar {\alpha} _ {i}\right) \nabla_ {\mathbf {x} _ {i}} \log p \left(\mathbf {x} _ {i}\right)\right). \tag {37}
+$$
+
+According to Eq. 21, the covariance of $\mathbf{x}_i$ is $(1 - \bar{\alpha}_i)\mathbf{I} + \bar{\alpha}_i\mathbf{V}_0$ . Assuming the clear data has covariance $\mathbf{I}$ , we can start from $\mathbf{x}_K \sim \mathcal{N}(\mathbf{0}, \mathbf{I})$ during inference.
+
+# C DDPM IMPLEMENTATION OF CL-DIFFPHYCON
+
+DDPM (Ho et al., 2020) is a widely adopted implementation of diffusion models. Based on the general DDPM derivations in Appendix B and SDE derivations of CL-DiffPhyCon in Section 4, here we also present the DDPM implementation of our CL-DiffPhyCon. By choosing $f(t) = -\frac{1}{2}\beta(t)$ , $g(t) = \sqrt{\beta(t)}$ and following the values of $\alpha_{t}$ 's and $\beta_{t}$ 's specified in Appendix B, we have the following implementations.
+
+# C.1 DDPM SAMPLING FROM THE SYNCHRONOUS DIFFUSION MODEL
+
+By using the approximation $\nabla_{\mathbf{z}_{1:N}(t)}\log p_t\big(\mathbf{z}_{1:N}(t)|\mathbf{u}_0\big)\approx -\epsilon_\phi (\mathbf{z}_{1:N}(t),\mathbf{u}_0,t)$ and Eq. 34, the DDPM version implementation of the sampling process in Eq. 5 (from DiffPhyCon(Wei et al.,
+
+2024)) is
+
+$$
+\begin{array}{l} \mathbf {z} _ {1: N} (t - 1) = \frac {1}{\sqrt {1 - \beta_ {t}}} \mathbf {z} _ {1: N} (t) + \beta_ {t} \nabla_ {\mathbf {z} _ {1: N} (t)} \log p _ {t} \big (\mathbf {z} _ {1: N} (t) | \mathbf {u} _ {0} \big) \\ - \beta_ {t} \lambda \cdot \nabla_ {\mathbf {z} _ {1: N} (t)} \mathcal {J} (\hat {\mathbf {z}} _ {1: N} (0)) + \sqrt {\beta_ {t}} \xi \tag {38} \\ \approx \frac {1}{\sqrt {1 - \beta_ {t}}} \mathbf {z} _ {1: N} (t) - \beta_ {t} \boldsymbol {\epsilon} _ {\phi} (\mathbf {z} _ {1: N} (t), \mathbf {u} _ {0}, t) \\ - \beta_ {t} \boldsymbol {\lambda} \cdot \nabla_ {\mathbf {z} _ {1: N} (t)} \mathcal {J} (\hat {\mathbf {z}} _ {1: N} (0)) + \sqrt {\beta_ {t}} \boldsymbol {\xi}, \\ \end{array}
+$$
+
+where $\hat{\mathbf{z}}_{1:N}(0) \triangleq \mathbb{E}[\mathbf{z}_{1:N}(0)|\mathbf{z}_{1:N}(t)]$ can be computed by the Tweedie's estimate according to Eq. 37 as follows:
+
+$$
+\hat {\mathbf {z}} _ {1: N} (0) = \frac {1}{\sqrt {\bar {\alpha} _ {t}}} \left(\mathbf {z} _ {1: N} (t) - \left(1 - \bar {\alpha} _ {i}\right) \boldsymbol {\epsilon} _ {\phi} \left(\mathbf {z} _ {1: N} (t), \mathbf {u} _ {0}, t\right)\right) \tag {39}
+$$
+
+In implementation, to sample $\tilde{\mathbf{z}}_{1:H}(\frac{1}{H} T)$ as in Line 2 of Algorithm 1, we run Eq. 38 iteratively from $t = T$ to $t = T / H$ and use $H$ to replace $N$ .
+
+# C.2 DDPM SAMPLING FROM THE ASYNCHRONOUS DIFFUSION MODEL
+
+Similarly, the DDPM version implementation of the sampling process in Eq. 13 is
+
+$$
+\begin{array}{l} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t - 1) = \frac {1}{\sqrt {1 - \beta_ {t}}} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) + \beta_ {t} \nabla_ {\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t)} \log p _ {t} (\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) | \mathbf {u} _ {0}) \\ - \beta_ {t} \lambda \cdot \nabla_ {\mathbf {z} _ {\tau : \tau + H - 1} (t)} \mathcal {J} (\hat {\mathbf {z}} _ {\tau : \tau + H - 1} (0)) + \sqrt {\beta_ {t}} \xi \tag {40} \\ \approx \frac {1}{\sqrt {1 - \beta_ {t}}} \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) - \beta_ {t} \boldsymbol {\epsilon} _ {\theta} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t), \mathbf {u} _ {0}, t\right) \\ - \beta_ {t} \lambda \cdot \nabla_ {\mathbf {z} _ {\tau : \tau + H - 1} (t)} \mathcal {J} (\hat {\mathbf {z}} _ {\tau : \tau + H - 1} (0)) + \sqrt {\beta_ {t}} \xi , \\ \end{array}
+$$
+
+where each component $\hat{\mathbf{z}}_i(0)$ of $\hat{\mathbf{z}}_{\tau ;\tau +H - 1}(0)\triangleq \mathbb{E}[\mathbf{z}_{\tau ;\tau +H - 1}(0)|\tilde{\mathbf{z}}_{\tau ;\tau +H - 1}(t)] = [\mathbf{z}_{\tau}(0),\mathbf{z}_{\tau +1}(0),\dots ,\mathbf{z}_{\tau +H - 1}(0)]$ can be computed by the Tweedie's estimate according to Eq. 14 and Eq. 37 as follows:
+
+$$
+\hat {\mathbf {z}} _ {\tau + i} (0) = \frac {1}{\sqrt {\bar {\alpha} _ {t + i \frac {H}{T}}}} \left(\tilde {\mathbf {z}} _ {i} (t) - \left(1 - \bar {\alpha} _ {t + i \frac {H}{T}}\right) \boldsymbol {\epsilon} _ {i}\right) \tag {41}
+$$
+
+for $i = 0,\dots ,H - 1$ . Here $\epsilon_{i}$ denotes the $i$ -th component of the predicted sequence of noises $\pmb{\epsilon}_{\theta}(\tilde{\mathbf{z}}_{\tau :\tau +H - 1}(t),\mathbf{u}_{\tau -1},t) = [\pmb {\epsilon}_0,\dots ,\pmb{\epsilon}_{H - 1}]$ by the asynchronous diffusion model $\pmb{\epsilon}_{\theta}$ . The reason why each component of $\hat{\mathbf{z}}_i(0)$ of $\hat{\mathbf{z}}_{\tau :\tau +H - 1}(0)$ is estimated separately is that different components of $\tilde{\mathbf{z}}_{\tau :\tau +H - 1}(t)$ have different levels of noise, each corresponding to a different scalar coefficient $\bar{\alpha}_{t + i\frac{H}{T}}$ .
+
+# D DERIVATIONS
+
+Proof of Theorem 1. We first conduct the following decomposition:
+
+$$
+\begin{array}{l} p \left(\mathbf {z} _ {1: N} (0), \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \dots , \tilde {\mathbf {z}} _ {N + 1: N + H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \\ = p \left(\tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} \left(\frac {1}{H} T\right), \dots , \mathbf {z} _ {N} (0), \tilde {\mathbf {z}} _ {N + 1: N + H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \\ = p \left(\tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \\ \end{array}
+$$
+
+$$
+\begin{array}{l} \prod_ {\tau = 1} ^ {N} p \big (\mathbf {z} _ {\tau} (0), \tilde {\mathbf {z}} _ {\tau + 1: \tau + H} (\frac {1}{H} T) | \mathbf {u} _ {0}, \tilde {\mathbf {z}} _ {1: H} (\frac {1}{H} T), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} (\frac {1}{H} T), \dots , \mathbf {z} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T) \big) \\ = p \left(\tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \\ \prod_ {\tau = 1} ^ {N} p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0), \mathbf {z} _ {\tau + H} (T) | \mathbf {u} _ {0}, \tilde {\mathbf {z}} _ {1: H} (\frac {1}{H} T), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} (\frac {1}{H} T), \dots , \mathbf {z} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right) \\ = p \left(\tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {0}\right) \prod_ {\tau = 1} ^ {N} \mathcal {N} \left(\mathbf {z} _ {\tau + H} (T) | \mathbf {0}, \sigma_ {T} ^ {2} \mathbf {I}\right) \\ \prod_ {\tau = 1} ^ {N} p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {0}, \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} \left(\frac {1}{H} T\right), \dots , \mathbf {z} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right). \tag {42} \\ \end{array}
+$$
+
+The third equation holds since $[\mathbf{z}_{\tau}(0), \tilde{\mathbf{z}}_{\tau+1:\tau+H}(\frac{1}{H}T)]$ and $[\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0), \mathbf{z}_{\tau+H}(T)]$ are two different arrangements of a same vector $[\mathbf{z}_{\tau}(0), \mathbf{z}_{\tau+1}(\frac{1}{H}T), \dots, \mathbf{z}_{\tau+H-1}(\frac{H-1}{H}T), \mathbf{z}_{\tau+H}(T)]$ . The last equation holds since $\mathbf{z}_{\tau}(T)$ is independently normally distributed with density $\mathcal{N}(\mathbf{z}_{\tau}(T)|\mathbf{0}, \sigma_T^2\mathbf{I})$ for any $\tau$ . Then, we analyze the conditional probability $p(\tilde{\mathbf{z}}_{\tau:\tau+H-1}(0)|\mathbf{u}_0, \tilde{\mathbf{z}}_{1:H}(\frac{1}{H}T), \mathbf{z}_1(0), \tilde{\mathbf{z}}_{2:H+1}(\frac{1}{H}T), \dots, \mathbf{z}_{\tau-1}(0), \tilde{\mathbf{z}}_{\tau:\tau+H-1}(\frac{1}{H}T))$ in detail.
+
+Due to Markov property of physical systems, when $\mathbf{u}_{\tau -1}(0)$ appears, other variables with temporal subscripts less than $\tau$ can not affect those with subscripts greater than or equal to $\tau$ . Therefore, we can remove those variables with subscripts less than $\tau$ , except for $\mathbf{u}_{\tau -1}(0)$ . Thus, we have:
+
+$$
+p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {0}, \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} \left(\frac {1}{H} T\right), \dots , \mathbf {z} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) \tag {43}
+$$
+
+$$
+= p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right),
+$$
+
+where $\mathbf{c}$ denotes the subset of latent variables $[\mathbf{z}_{\tau}(T), \tilde{\mathbf{z}}_{\tau:\tau+1}(\frac{H-1}{H}T), \dots, \tilde{\mathbf{z}}_{\tau:\tau+H-2}(\frac{2}{H}T)]$ extracted from $[\tilde{\mathbf{z}}_{1:H}(\frac{1}{H}T), \dots, \mathbf{z}_{\tau-1}(0), \tilde{\mathbf{z}}_{\tau:\tau+H-1}(\frac{1}{H}T)]$ . Further, by adding new variables $\mathbf{z}_{\tau:\tau+H-1}(0)$ to this probability, we have
+
+$$
+\begin{array}{l} p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) \\ = \int p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) \tag {44} \\ p \big (\mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \big (\frac {1}{H} T \big) \big) \mathrm {d} \mathbf {z} _ {\tau : \tau + H - 1} (0). \\ \end{array}
+$$
+
+The first distribution inside the integral in Eq. 44 can be simplified as follows:
+
+$$
+\begin{array}{l} p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) \\ = \frac {p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) , \mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0)\right)}{p \left(\mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0)\right)} \\ = \frac {p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right)}{p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : T + H - 1} \left(\frac {1}{H} T\right)\right)} \tag {45} \\ = \frac {p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0)\right)}{p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) , \mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0)\right)} \\ = p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right). \\ \end{array}
+$$
+
+In the second equation, we use the Markov property of the diffusion process of $\mathbf{z}_{\tau}(t)$ over $t$ , and skip a step including the following two equations
+
+$$
+p \left(\mathbf {c} \mid \mathbf {u} _ {\tau - 1} (0), \mathbf {z} _ {\tau : \tau + H - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right) = p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right)
+$$
+
+$$
+p \left(\mathbf {c} \mid \mathbf {u} _ {\tau - 1} (0), \mathbf {z} _ {\tau : \tau + H - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right) = p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right)
+$$
+
+in the numerator and denominator respectively of the right side of the second equation. Similarly, we show that we can also simplify the other distribution inside the integral in Eq. 44.
+
+$$
+\begin{array}{l} p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0), \mathbf {c}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (\frac {1}{H} T)\right) \\ = \frac {p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) , \mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0)\right)}{p \left(\mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0)\right)} \\ = \frac {p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0) , \mathbf {z} _ {\tau : \tau + H - 1} (0)\right)}{p \left(\mathbf {c} , \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0)\right)} \\ = \frac {p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0) , \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right)}{p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\mathbf {c} \mid \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right)} \\ = \frac {p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0) , \mathbf {z} _ {\tau : \tau + H - 1} (0)\right)}{p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right) \mid \mathbf {u} _ {\tau - 1} (0)\right)} \\ = p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right). \tag {46} \\ \end{array}
+$$
+
+Combining Eq. 43 to Eq. 46, we get the following result:
+
+$$
+\begin{array}{l} p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {0}, \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \mathbf {z} _ {1} (0), \tilde {\mathbf {z}} _ {2: H + 1} \left(\frac {1}{H} T\right), \dots , \mathbf {z} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) \\ = \int p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) \\ p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) \mathrm {d} \mathbf {z} _ {\tau : \tau + H - 1} (0) \tag {47} \\ = \int p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0), \mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) d \mathbf {z} _ {\tau : \tau + H - 1} (0) \\ = p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0), \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right). \\ \end{array}
+$$
+
+Plugging this to Eq. 42, we prove the conclusion.
+
+Proof of Proposition 1. Adding new variables $\mathbf{z}_{\tau ;\tau +H - 1}(0)$ , we have:
+
+$$
+\begin{array}{l} p _ {t} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) | \mathbf {u} _ {\tau - 1} (0)\right) \\ = \int p \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) \mid \mathbf {u} _ {\tau - 1} (0), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) d \mathbf {z} _ {\tau : \tau + H - 1} (0). \tag {48} \\ \end{array}
+$$
+
+Notice that the distributions of $\{\mathbf{z}_{\tau +i}(t + \frac{i}{H} T)\}_{i = 0}^{H - 1}$ are conditional independent. Therefore, we can reformulate the above equation to:
+
+$$
+\begin{array}{l} p _ {t} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (t) | \mathbf {u} _ {\tau - 1} (0)\right) \\ = \int \prod_ {i = 0} ^ {H - 1} p \left(\mathbf {z} _ {\tau + i} (t + \frac {i}{H} T) | \mathbf {u} _ {\tau - 1} (0), \mathbf {z} _ {\tau : \tau + H - 1} (0)\right) p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) | \mathbf {u} _ {\tau - 1} (0)\right) d \mathbf {z} _ {\tau : \tau + H - 1} (0) \\ = \int \prod_ {i = 0} ^ {H - 1} p \left(\mathbf {z} _ {\tau + i} \left(t + \frac {i}{H} T\right) \mid \mathbf {z} _ {\tau + i} (0)\right) p \left(\mathbf {z} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\tau - 1} (0)\right) d \mathbf {z} _ {\tau : \tau + H - 1} (0) \\ = \mathbb {E} _ {\mathbf {z} _ {\tau : \tau + H - 1} (0)} \left[ \prod_ {i = 0} ^ {H - 1} p \left(\mathbf {z} _ {\tau + i} \left(t + \frac {i}{H} T\right) \mid \mathbf {z} _ {\tau + i} (0)\right) \right]. \tag {49} \\ \end{array}
+$$
+
+Here, the second equation is because $\mathbf{z}_{\tau +i}(t + \frac{i}{H} T)$ only depends on $\mathbf{z}_{\tau +i}(0)$ with the distribution Eq. 22 described in Section A. And we have proved the desired conclusion.
+
+# E CLOSE-LOOP PROPERTY
+
+The joint distribution of $\{\mathbf{w}_{\tau}(0),\mathbf{u}_{\mathrm{env},\tau}\}_{\tau = 1}^{N}$ in Algorithm 1 satisfies the following proposition.
+
+Proposition 2. Using inference described in Algorithm 1, the following holds:
+
+$$
+\begin{array}{l} p \left(\mathbf {w} _ {1} (0), \mathbf {u} _ {\text {e n v}, 1}, \dots , \mathbf {w} _ {N} (0), \mathbf {u} _ {\text {e n v}, N} | \mathbf {u} _ {\text {e n v}, 0}\right) \\ = \int p _ {\mathrm {g d}} \left(\tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right) | \mathbf {u} _ {\text {e n v}, 0}\right) \\ \prod_ {\tau = 1} ^ {N} p _ {\mathrm {g d}} \left(\tilde {\mathbf {z}} _ {\tau : \tau + H - 1} (0) \mid \mathbf {u} _ {\text {e n v}, \tau - 1}, \tilde {\mathbf {z}} _ {\tau : \tau + H - 1} \left(\frac {1}{H} T\right)\right) p _ {\mathrm {G}} \left(\mathbf {u} _ {\text {e n v}, \tau} \mid \mathbf {u} _ {\text {e n v}, \tau - 1}, \mathbf {w} _ {\tau} (0)\right) \tag {50} \\ \mathcal {N} (\mathbf {z} _ {\tau + H} (T); \mathbf {0}, \sigma_ {T} ^ {2} \mathbf {I}) \mathrm {d} \left\{\mathbf {u} _ {0} (0), \tilde {\mathbf {z}} _ {1: H} \left(\frac {1}{H} T\right), \dots , \mathbf {u} _ {N} (0), \tilde {\mathbf {z}} _ {N + 1: N + H} \left(\frac {1}{H} T\right) \right\}, \\ \end{array}
+$$
+
+where $p_{\mathrm{gd}}$ denotes the transition distribution of the guided sampling (Eq. 13), and $p_G$ denotes the transition distribution of the system dynamics $G$ .
+
+According to Eq. 50, for every $\tau$ , the control signal $\mathbf{w}_{\tau}(0)$ is conditional on the states $\mathbf{u}_{\mathrm{env},0:\tau -1}$ instead of the predicted $\mathbf{u}_{0:\tau -1}(0)$ . Therefore, our method achieves closed-loop control.
+
+Proof of Proposition 2. This is a direct conclusion from the process of Algorithm 1. Among variables in the history, only $\mathbf{u}_{\mathrm{env},\tau -H:\tau -1},\{\mathbf{z}_{\tau -H + 1}(\frac{i}{H} T)\}_{i = 0}^{1},\dots ,\{\mathbf{z}_{\tau -1}(\frac{i}{H} T)\}_{i = 0}^{H - 1}$ involve the generation of $\mathbf{w}_{\tau}(0)$ . So, we get the conclusion.
+
+# F DETAILS OF 1D BURGERS' EQUATION CONTROL
+
+# F.1 DATASET
+
+We follow instructions in Wei et al. (2024) to generate a 1D Burgers' equation dataset. Specifically, we use the finite difference method (FDM) to generate trajectories in a domain of space range $x \in [0,1]$ and time range $\tau \in [0,1]$ , with random initial states and control sequences following certain distributions. The space is discretized into 128 cells and time into 10000 steps. We generated 90000 trajectories for the training set and 50 for the testing set. For each training sample, its target state $u_{d}(\tau ,x)$ is randomly selected from other training samples, which means that almost all the
+
+samples in the training set are unsuccessful as they could hardly achieve the target states under random controls. Thus it is challenging to generate control sequences with performance beyond the training dataset.
+
+# F.2 EXPERIMENTAL SETTINGS
+
+Similar to (Wei et al., 2024), we design different settings of 1D Burgers' equation control in Section 5.2:
+
+Noise-free: This is a scenario where all states $u(\tau, x), x \in [0,1]$ for $\tau \in [0,1]$ of the system can be observed. The system, control, and measurement do not have the noise.
+
+Physical constraint: In real-world scenarios, the actuator often has the upper and lower limits due to the physical constraints. We limit the control with bounds $-2$ to 2 in this setting, while unconstrained control ranges from $-5$ to 5.
+
+System noise: For complex engineering systems, the practical physical systems often have noise issues in the system (plant) and actuator (control). We consider such real-world scenarios and perturb the system by Gaussian noise with standard deviation $\sigma = 0.025$ following the work (Yildiz et al., 2021). It can also simulate the control noise setting as the noise added to the external force can be decomposed and considered as the system noise for the 1D Burgers' equation in Eq. 15. Specifically, for a deterministic system: Burgers' equation, $G_0:\frac{\partial u}{\partial\tau} = -u\cdot \frac{\partial u}{\partial x} +\nu \frac{\partial^2u}{\partial x^2} +w(\tau ,x)$ , where $u$ denotes the state variable and $w$ represents the control. To account for system noise, we augment the dynamics with additive Gaussian noise: $G_{1}:\frac{\partial u}{\partial\tau} = -u\cdot \frac{\partial u}{\partial x} +\nu \frac{\partial^{2}u}{\partial x^{2}} +w(\tau ,x) + \xi_{\tau},\xi_{\tau}\sim \mathcal{N}(0,\sigma)$ . During numerical simulation, the perturbed system $(G_{1})$ supersedes the nominal system $(G_0)$ when implementing the control input $w$ . Consequently, the feedback state $u$ is obtained as the solution to the stochastic PDE $(G_{1})$ .
+
+Measurement noise: The measurement noise is also a common phenomenon in practical physical systems. We consider the measurement with Gaussian noise. The feedback state is characterized by the superposition of the nominal solution $u$ to system $(G_0)$ and a Gaussian noise term $\xi_{\tau} \sim \mathcal{N}(0, \sigma)$ ( $\sigma = 0.025$ in the experiments), thereby incorporating measurement noise into the feedback loop while preserving the dynamics of the nominal system.
+
+Partial observations and partial control: In general, the sensors for observation and actuators for control are located in a small part of the spatial domain, unlike the full observation and full control (FOFC) noise-free setting. In this setting, we consider two observation cases: full observation and 16 sensors observation (1/8 of the spatial domain). Both cases are controlled by 16 evenly placed actuators. Although only partial observations are available, the reported results are calculated for an entire spatial domain, including unobservable parts. (As a common single-input single-output (SISO) controller, the PID controller is difficult to directly apply to multiple-input multiple-output (MIMO) systems. Its application to the MIMO system often requires additional decoupling and target planning modules, and the control effect of PID is greatly influenced by decouplers and planners, making it difficult to compare fairly. Therefore, we only apply the PID in 16 sensors for observation and 16 actuators for control.) The placement of sensors and actuators is illustrated in Figure 4.
+
+Half domain: In this setting, we hide some parts of $\mathbf{u}$ and measure the $\mathcal{I}$ of model control as the white area with oblique lines shown in Figure 11. Specifically, $\mathbf{u}(\tau, x)$ , $x \in [\frac{1}{4}, \frac{3}{4}]$ is set to zero in the dataset during training and $\mathbf{u}_0(x)$ , $x \in [\frac{1}{4}, \frac{3}{4}]$ is also set to zero during testing. Only $\Omega = [0, \frac{1}{4}] \cup [\frac{3}{4}, 1]$ is observed, controlled and evaluated.
+
+# F.3 IMPLEMENTATION
+
+We use U-Net (Ronneberger et al., 2015) as architectures for the models $\epsilon_{\phi}$ and $\epsilon_{\theta}$ . Two models are separately trained using the same training dataset. Note that in the partial observation settings, the unobserved data is invisible to the model during both training and testing as introduced in Appendix F.2. We simply pad zero in the corresponding locations of the model input and conditions, and also exclude these locations in the training loss. Therefore, the model only learns the correlation between the observed states and control sequences. We use the MSE loss to train the models. Both models have $T = 900$ diffusion steps. The DDIM (Song et al., 2020) sampling we use only has 30 diffusion steps with the hyperparameter $\eta = 1$ . Hyperparameters of models and training are listed in Table 3.
+
+
+Figure 4: Illustration of partial observation and control. Blue represents the position observed by sensors, and red represents the position that actuators are able to control. The region filled entirely with blue and red indicates that all spatial regions can be observed and controlled, respectively. The vertical line indicates where there are sensors and actuators in that spatial position.
+
+Table 3: Hyperparameters of models and training for 1D Burgers' equation control.
+
+
Hyperparameter name
Value
U-Net εφ(w)
Model horizon H
16
Initial dimension
64
Downsampling/Upsampling layers
4
Convolution kernel size
3
Dimension multiplier
[1, 2, 4, 8]
Attention hidden dimension
32
Attention heads
4
U-Net εθ(u, w)
Model horizon H
16
Initial dimension
64
Downsampling/Upsampling layers
4
Convolution kernel size
3
Dimension multiplier
[1, 2, 4, 8]
Attention hidden dimension
32
Attention heads
4
Training
Training batch size
16
Optimizer
Adam
Learning rate
1e-4
Training steps
190000
Learning rate scheduler
cosine annealing
Inference
Synchronously sampling steps
900
Each asynchronously sampling step
60
+
+# F.4 RESULTS OF HALF DOMAIN
+
+In this subsection, we consider another noise-free setting that only observe, control, and evaluate on half of the spatial domain. From the results in Table 4, our conclusion is consistent with the noise-free scenario, and CL-DiffPhyCon shows significant improvements in both performance and efficiency.
+
+Table 4: The average control objective $\mathcal{I}$ of 1D Burgers' equation control in the half domain, and inference time on a single NVIDIA A100 80GB GPU with 16 CPU cores are reported. Bold font is the best model and the runner-up is underlined.
+
+
J↓
time (s) ↓
BC
0.2558
0.7150
BPPO
0.2033
0.7342
PID
0.2212
0.7236
DiffPhyCon-1
0.0196
39.9720
DiffPhyCon-5
0.0184
8.4481
DiffPhyCon-15
0.0192
3.8935
RDM
0.0196
9.8153
CL-DiffPhyCon (ours)
0.0090
9.7516
CL-DiffPhyCon (DDIM, ours)
0.0104
0.7628
+
+64
+
+Fixed locations of exits and obstacles in both large domain control and boundary control settings
+
+64
+
+Locations of controllable area in the large domain control setting
+
+64
+
+Locations of controllable area in the boundary control setting
+
+Figure 5: Illustration of the 2D incompressible fluid control task settings. In the large domain control setting (middle), control signals are applied to the peripheral green regions surrounding the obstacles. In the boundary control setting (right), control signals are limited to the green cells within the four exits. Two evaluation modes are used: fixed map (top) for in-distribution testing and random map (bottom) for out-of-distribution testing.
+
+Fixed locations of exits and random locations of obstacles in both large domain control and boundary control settings
+
+Fixed map
+(training data and in-distribution test)
+Random map (out-of-distribution test)
+
+Locations of controllable area in the large domain control setting
+
+
+Locations of controllable area in the boundary control setting
+
+Table 5: Hyperparameters of 2D experiments.
+
+
Hyperparameter Name
Value
Number of attention heads
4
Kernel size of conv3d
(3, 3, 3)
Padding of conv3d
(1,1,1)
Stride of conv3d
(1,1,1)
Kernel size of downsampling
(1, 4, 4)
Padding of downsampling
(1, 2, 2)
Stride of downsampling
(0, 1, 1)
Kernel size of upsampling
(1, 4, 4)
Padding of upsampling
(1, 2, 2)
Stride of upsampling
(0, 1, 1)
+
+# G DETAILS OF 2D INCOMPRESSIBLE FLUID CONTROL
+
+# G.1 EXPERIMENTAL SETTING
+
+Dynamics of 2D incompressible fluid follows the Navier-Stokes equations:
+
+$$
+\left\{ \begin{array}{l} \frac {\partial \mathbf {v}}{\partial \tau} + \mathbf {v} \cdot \nabla \mathbf {v} - \nu \nabla^ {2} \mathbf {v} + \nabla p = f, \\ \nabla \cdot \mathbf {v} = 0, \\ \mathbf {v} (0, \mathbf {x}) = \mathbf {v} _ {0} (\mathbf {x}), \end{array} \right. \tag {51}
+$$
+
+where $f$ denotes the external force, $p$ denotes pressure, $\nu$ denotes the viscosity coefficient and $\mathbf{v}$ denotes velocity. $\mathbf{v}_0(\mathbf{x})$ is the initial condition. We follow the setup of the 2D incompressible fluid control task as described in (Wei et al., 2024), using the Phiflow solver Holl et al. (2020) to simulate fluid dynamics. The resolution of the 2D flow field is set to $64 \times 64$ , and the flow field is unbounded. We consider two settings: large domain control and boundary control. In the large domain control setting, control signals are applied to all peripheral regions outside the obstacles, consisting of 1,792 cells, as highlighted in green in the middle subfigures of Figure 5. This setting is consistent with (Wei et al., 2024). In the boundary control setting, control signals are restricted to only the $4 \times 8$ cells inside the four exits, as shown in green in the right subfigures of Figure 5. This setting is newly designed in this paper. Both configurations represent indirect control, as the smoke primarily moves within the gray obstacles. The boundary control setting is more challenging due to the significantly reduced number of controllable cells. We also follow (Wei et al., 2024) to generate the training dataset. For both settings, the obstacle locations (gray cells) are shown in the top row of Figure 5 and are consistent across all training trajectories. Each trajectory contains $N = 64$ physical time steps and includes features such as horizontal and vertical velocities, smoke density, and horizontal and vertical control forces. We generated 40,000 training trajectories for the large domain control setting, and 30,000 for the boundary control setting.
+
+During inference, following RDM (Zhou et al., 2024), we add a small level of control noise to make the task more challenging. Specifically, for a trajectory of length $N = 64$ , the control signal in each physical time step is executed with probability $p = 0.1$ as a random control, where the horizontal and vertical components following the uniform distributions bounded by the minimal and maximal values of horizontal and vertical control signals in the training dataset, respectively. On each setting of large domain control and boundary control, we design two evaluation modes, fixed map (FM) and random map (RM), to test the generalization capability of each method:
+
+Fixed map (FM): In this mode, all 50 test samples use the same obstacle configuration with training trajectories. However, the initial locations of test samples are different. In this mode, the testing and training initial conditions follow the same distribution (in-distribution test).
+
+Random map (RM): In this mode, the 50 test samples use random obstacles' configuration in the fluid field. Specifically, the movement ranges for the five internal obstacles, whose default locations are shown in the top two rows in Figure 5, are as follows:
+
+- The two upper obstacles can move downward, left, or right by no more than 3 grid spaces.
+
+Table 6: Effect of the model horizon $H$ on 2D incompressible fluid control under the large domain control setting and fixed map (FM) evaluation mode. The average control objective $\mathcal{I}$ and inference time on a single NVIDIA A6000 48GB GPU with 16 CPU cores are reported. Bold font is the best model and the runner-up is underlined. The results of $H = 15$ are copied from Table 2 for comparison.
+
+
H=6
H=10
H=15
J↓
time (s) ↓
J↓
time (s) ↓
J↓
time (s) ↓
DiffPhyCon-1
0.8986
1022
0.5140
1216
0.5454
1677
CL-DiffPhyCon (ours)
0.6012
143.32
0.3367
136.81
0.3371
140.83
+
+- The two middle obstacles can move upward, downward, left, or right by no more than 3 grid spaces.
+- The one lower obstacle can move upward, left, or right by no more than 3 grid spaces.
+
+In this mode, the testing and training initial conditions follow different distributions (out-of-distribution test). Note that although the obstacles' configuration varies across different test samples, for each test sample, its obstacles' configuration remains unchanged during the control process.
+
+# G.2 IMPLEMENTATION
+
+We use 3D U-net Ho et al. (2022) as architectures for the models $\epsilon_{\phi}$ and $\epsilon_{\theta}$ . Two models are separately trained using the same training dataset. We use the MSE loss to train the models. Both models have $T = 600$ diffusion steps. The DDIM (Song et al., 2020) sampling we use has 75 diffusion steps with the hyperparameter $\eta = 0.3$ for the large domain control setting and 120 diffusion steps with the hyperparameter $\eta = 0.3$ for the boundary control setting. Hyperparameters of models and training are listed in Table 5.
+
+# G.3 EFFECT OF MODEL HORIZON
+
+The choice of the model horizon $H$ is determined by balancing efficiency and effectiveness. We conducted experiments on the 2D incompressible fluid control task under the fixed map (FM) setting with $H = 6$ and $H = 10$ . The results are shown in Table 6, where we also copy the results of $H = 15$ from 2 together for comparison.
+
+The results indicate that both our CL-DiffPhyCon and DiffPhyCon-1 yield similar performance when $H = 10$ , compared to $H = 15$ as reported in Table 2. However, performance significantly deteriorates when $H$ decreases to 6, which is likely due to the shorter observation window leading to inaccurate future control objective $\mathcal{J}$ estimation and suboptimal guidance sampling (Line 5 in Algorithm 1). On the other hand, increasing $H$ beyond 15 significantly raises GPU memory costs during inference, thus not recommended. Across different values of $H$ (i.e., $H = 6$ , 10, and 15), our method consistently outperforms DiffPhyCon-1. Therefore, for this task, a horizon between 10 and 15 is appropriate. In practical applications, the optimal model horizon can be determined through multiple trials to balance performance and efficiency, similar to the approach used in diffusion policies (Chi et al., 2023) (see Figure 5 (left) in the referenced paper).
+
+# H DOUBLE PENDULUM CONTROL EXPERIMENT
+
+To investigate the performance of our CL-DiffPhyCon in lower-dimensional control problems, we performed experiments on controlling the system of a cart-inverted double pendulum system. The goal is to keep the double pendulum from falling down by exerting a force on the cart.
+
+# H.1 SIMULATION ENVIRONMENT SETUP
+
+The system consists of two point masses fixed on the end of two massless rigid rods, which are mutually connected and connected to a cart with frictionless hinges, as shown in Figure 6. The
+
+
+Figure 6: Illustration of the cart-double pendulum system. The angles are measured with respect to the vertical direction, and the angular velocities are defined as the time derivative of the angles.
+
+cart-double pendulum system is simulated with the 4th order Runge-Kutta method (Ixaru & Vanden Berghe, 2004). In our experiment, the simulation time step interval is set to 5e-3 to ensure the accuracy of the simulation.
+
+The physical quantities (unitless) are as follows: both rods have a length of 0.2, both point masses have a mass of 0.1, the mass of the cart is 1, and the gravitational acceleration is 9.8. The control force is restricted in [-10, 10]. Although the control signal and system states are relatively low-dimensional, we note the control task is non-trivial. Since no torque can be exerted on the hinges, the system can exhibit limited controllability. Besides, the rods deviate from the equilibrium point, and the non-linear or even chaotic dynamics impose significant challenges to its control. This system has been studied in the control research community (Hesse et al., 2018; Yamakita et al., 1993).
+
+We would emphasize that this experiment provides a more easy-to-run verification of our method, as opposed to our 1D Burgers' equation experiment and 2D Navier-Stokes equation control experiments. Our cart-double pendulum environment can run at a refreshing rate of over $300\mathrm{Hz}$ on an Intel Xeon Platinum 8358 CPU, which allows real-time simulation (200 Hz refreshing rate in our setting) without high-end GPUs need.
+
+# H.2 TRAINING AND EVALUATION DETAILS
+
+In this experiment, we focus on an offline learning setting, where a training dataset containing expert action-state sequences is provided. The training dataset consists of 1e5 trajectories generated by an expert policy pretrained with PPO. Our CL-DiffPhyCon and baseline methods are trained with shared hyperparameters. In all diffusion models, VP-SDE training and ODE sampling are adopted (Song et al., 2021). All methods are trained for 2.9e5 steps, and 16-step Midpoint ODE solver (Karras et al., 2022) is used. The backbone is kept to an identically configured Transformer network. Other hyperparameters are also kept the same.
+
+Our control task is defined on finite-length episodes, with a total of 1 second (200 steps) environment time. We use the metric success rate to reflect control performance, which is defined as the ratio of not-falling pendulums when the episode terminates. The not-falling criterion is defined as the upper point height larger than 0.9 maximum height. An ensemble of 100 cart-double pendulum systems is independently randomly initialized and controlled to fairly evaluate the performance of each task. The average and standard deviation are reported for five differently seeded runs to demonstrate the uncertainty of the evaluation.
+
+To mimic realistic systems where the system state may be randomly perturbed, we introduce stochasticity into our cart-double pendulum system. At each step, the environment will perturb the system state (including the angle and angular velocities of two rods, the position, and the velocity of the cart) with probability. Once added, the perturbation will be sampled from a uniform
+
+distribution in the range $[-0.02, 0.02]$ . To make a comprehensive comparison, we report the results with three different rates: 0, 0.1, and 0.3.
+
+
+Figure 7: Pareto plot comparing our CL-DiffPhyCon and baselines. The error bar shows $\pm 1$ standard deviation across 5 seeded runs.
+
+
+
+
+
+# H.3 RESULTS
+
+As shown in Figure 7, CL-DiffPhyCon achieves a remarkable balance between the control algorithm runtime and the control performance. Compared to the baselines of DiffPhyCon-15, DiffPhyCon-12, and DiffPhyCon-8, our CL-DiffPhyCon provides much higher control performance while only requiring similar neural function evaluations (NFE, as in Song et al. (2021); Karras et al. (2022)) per environment step. Although DiffPhyCon-4 and DiffPhyCon-1 show marginal performance improvement over our CL-DiffPhyCon, they are nearly one order of magnitude slower.
+
+For a more intuitive demonstration of the performance comparison, we include a comprehensive visualization where our method is compared with two selected baselines under three different random perturbation settings, as shown in Figure 8. Compared to DiffPhyCon-15, Our CL-DiffPhyCon is able to stabilize the inverted double pendulum for a longer time (subfigure (a)), and the final upper mass state $(\theta_{2},\omega_{2})$ is closer to the equilibrium point $(0,0)$ (subfigure (b)). Additionally, although the performance of our CL-DiffPhyCon is similar to that of DiffPhyCon-1, CL-DiffPhyCon costs about only $1/15$ computation time of it.
+
+# I 1D VISUALIZATION RESULTS
+
+We present the visualization results of our method and baselines under noise-free and half domain settings in Figure 9, 10, 11, and 12, respectively. Under each setting, we present the results of four randomly selected samples from the test set.
+
+# J 2D VISUALIZATION RESULTS
+
+More visualization results of our method and compared baselines are presented. For both fixed map (Figure 13 and Figure 14) and random map (Figure 15 and Figure 16) settings, we present two randomly selected test samples. Our method outperforms baselines on average. Note that the fluid dynamics is very sensitive to the generated control signals. Thus different methods may perform dramatically differently on the same test sample. However, we find that each method performs stably on each test sample through multiple evaluations.
+
+# K BASELINES
+
+For RDM (Zhou et al., 2024), it involves two hyperparameters to determine when to update the previously planned control sequences or replan from scratch. Their default values do not work well on our 1D and 2D tasks. On the 1D task, they are too small, which results in very expensive
+
+
+(a)
+
+
+
+
+
+
+(b)
+Figure 8: Visualization of and instance of the cart-double pendulum under control. The goal is to keep the double pendulum from falling down by exerting a force on the cart over 1 second (200 control steps) sequentially. Three control methods are applied under three different perturbation rates. In each setting, 10 snapshots of the pendulum are shown in subfigure (a), whereas the corresponding trajectories in the phase space are shown in subfigure (b).
+
+
+
+
+
+replanning from scratch almost every physical time, although its performance is still unsatisfactory. On the 2D task, they are too large, leading to few replannings and inferior results. Therefore, we run extensive evaluations to search for their best values. On the 1D task, we find that the best pair of values for the two hyperparameters is (0.06, 0.1) in the noise-free setting. On the 2D task, we find that the best pair of values is (0.0005, 0.002).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 9: Two visualizations results of 1D Burgers' equation control under the noise-free setting. The first line is the target $u_{d}(t,x)$ and the error $u(t,x) - u_{d}(t,x)$ measures the gap between the state under control and target. The horizontal axis is the time coordinate and the vertical axis is the state.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 10: Two visualizations results of 1D Burgers' equation control under the noise-free setting. The first line is the target $u_{d}(t,x)$ and the error $u(t,x) - u_{d}(t,x)$ measures the gap between the state under control and target. The horizontal axis is the time coordinate and the vertical axis is the state.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 11: Two visualizations results of 1D Burgers' equation control under the half domain setting. The first line is the target $u_{d}(t,x)$ and the error $u(t,x) - u_{d}(t,x)$ measures the gap between the state under control and target. The horizontal axis is the time coordinate and the vertical axis is the state. The white area with oblique lines in the middle represents an unobservable area.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 12: Two visualizations results of 1D Burgers' equation control under the half domain setting. The first line is the target $u_{d}(t,x)$ and the error $u(t,x) - u_{d}(t,x)$ measures the gap between the state under control and target. The horizontal axis is the time coordinate and the vertical axis is the state. The white area with oblique lines in the middle represents an unobservable area.
+
+
+Figure 13: Visualizations results of 2D fluid control by our CL-DiffPhyCon method and baselines for a same test sample. This is an example of the fixed map setting. Each row shows six frames of smoke density. The smaller the value of $J$ , the better the performance.
+
+
+Figure 14: Visualizations results of 2D fluid control by our CL-DiffPhyCon method and baselines for the same test sample. This is an example of the fixed map setting. Each row shows six frames of smoke density. The smaller the value of $J$ , the better the performance.
+
+
+Figure 15: Visualizations results of 2D fluid control by our CL-DiffPhyCon method and baselines for the same test sample. This is an example of the random map setting. Each row shows six frames of smoke density. The smaller the value of $J$ , the better the performance.
+
+
+Figure 16: Visualizations results of 2D fluid control by our CL-DiffPhyCon method and baselines for the same test sample. This is an example of the random map setting. Each row shows six frames of smoke density. The smaller the value of $J$ , the better the performance.
\ No newline at end of file
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/images.zip b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..a4aa8ec6e3319902da423cad095d8bc2ee6f6f10
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d61c764de0d024dfd900fa2584b0ed621831300ced14537f8956fbb0d2e52586
+size 3478836
diff --git a/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/layout.json b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..7a3b53f6e2dba0890a2044edf2cb10012af945b2
--- /dev/null
+++ b/ICLR/2025/CL-DiffPhyCon_ Closed-loop Diffusion Control of Complex Physical Systems/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59ed6e4143813ed169a42d6a830459da1133035f65c5426fa707a7c843224e9e
+size 1241459
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_content_list.json b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..5828c0493166993efbd50fb24f297f71068924fd
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8ac5b72d8df8a400aafa30f5aeecc75b8f2da1f10051344d6409e0245522ff62
+size 113556
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_model.json b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2748f9ae3dcccb90ce3b90c340e36f4c8f6442ef
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d7a17f008ceceb9c3cad5c125a4b3402d09f9afa4d58769366ecbd176c2f608
+size 135845
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_origin.pdf b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5155e9fda9e0a71f712dde39ca7dcdcc5263cce7
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/9a7a62be-1d63-4c1e-bb0f-ed8ea8fe98e2_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5f7751bc3dca1e571323425cd20e0f179896690291a4b9b117a2087b069fb194
+size 2950128
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/full.md b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..468141f94f7e4a21a721fa179178fe1a17f51e03
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/full.md
@@ -0,0 +1,409 @@
+# CL-MFAP: A CONTRASTIVE LEARNING-BASED MULTIMODAL FOUNDATION MODEL FOR MOLECULAR PROPERTY PREDICTION AND ANTIBIOTIC SCREENING
+
+Gen Zhou $^{1*}$ , Sugitha Janarthanan $^{1*}$ , Yutong Lu $^{2}$ , Pingzhao Hu $^{1,2\dagger}$
+
+1Western University, London, ON, Canada
+
+$^{2}$ University of Toronto, Toronto, ON, Canada
+
+# ABSTRACT
+
+Due to the rise in antimicrobial resistance, identifying novel compounds with antibiotic potential is crucial for combatting this global health issue. However, traditional drug development methods are costly and inefficient. Recognizing the pressing need for more effective solutions, researchers have turned to machine learning techniques to streamline the prediction and development of novel antibiotic compounds. While foundation models have shown promise in antibiotic discovery, current mainstream efforts still fall short of fully leveraging the potential of multimodal molecular data. Recent studies suggest that contrastive learning frameworks utilizing multimodal data exhibit excellent performance in representation learning across various domains. Building upon this, we introduce CL-MFAP, an unsupervised contrastive learning (CL)-based multimodal foundation (MF) model specifically tailored for discovering small molecules with potential antibiotic properties (AP) using three types of molecular data. This model employs 1.6 million bioactive molecules with drug-like properties from the ChEMBL dataset to jointly pretrain three encoders: (1) a transformer-based encoder with rotary position embedding for processing SMILES strings; (2) another transformer-based encoder, incorporating a novel bi-level routing attention mechanism to handle molecular graph representations; and (3) a Morgan fingerprint encoder using a multilayer perceptron, to achieve the contrastive learning purpose. The CL-MFAP outperforms baseline models in antibiotic property prediction by effectively utilizing different molecular modalities and demonstrates superior domain-specific performance when fine-tuned for antibiotic-related property prediction tasks.
+
+# 1 INTRODUCTION
+
+Bacteria play a pivotal role in a diverse array of diseases within the human body, serving as either the primary cause or a contributing factor. A promising and sometimes sole treatment for these diseases is antibiotics, a specialized class of drugs designed to target pathogenic bacteria. Despite advancements, a lack of antibiotics for many pathogenic bacteria persists, and antibiotic resistance allows bacteria to survive once effective treatments. Consequently, there is a pressing demand for the continual development of antibiotics. However, traditional antibiotic discovery faces two major issues: 1) it is extremely costly and 2) it is very time-consuming. Artificial Intelligence (AI) and Machine Learning (ML) methods can combat these issues and thus, have been employed over the past couple of years to aid in antibiotic discovery for a wide range of conditions. Deep learning (DL) tools including convolutional, recurrent, and graph neural networks have been leveraged to explore high-dimensional data and design compounds with desired antibiotic properties (Cesaro et al., 2023).
+
+Large Language Models (LLMs) have increasingly stood out in recent years due to their exceptional performance, garnering widespread attention. As such, they have been implemented and fine-tuned
+
+to target pathogenic bacteria. For an LLM dedicated to the domain of antibiotic discovery, utilizing an extensive general molecular dataset for model training may not be a computationally cost-effective choice. By employing domain-specific training, the model can be taught to learn the unique characteristics, patterns, and nuances relevant to the field. Gu et al. (2021) support this assertion, arguing that for fields like biomedicine, which have a large amount of unlabeled text, pretraining a model from scratch yields greater benefits than continual pretraining of a general-domain LLM.
+
+Contrastive learning, an effective method for utilizing large amounts of unlabeled data, has made significant progress in the field of ML in recent years. For antibiotic-related property prediction, contrastive learning significantly enhances model performance. Rather than relying on limited labeled molecular property data, this method leverages the vast amount of unlabeled molecular data available, helping identify patterns that contribute to a compound's properties. The resulting molecular representations are thus more robust as they include patterns that may be missed by traditional supervised learning approaches. This leads to more accurate predictions, better generalization to novel chemical spaces, and ultimately increases the success rate of identifying potential antibiotic candidates.
+
+In this study, we introduce a novel approach to streamline antibiotic discovery by leveraging a contrastive learning framework with multimodal data to train a domain-specific LLM. We propose CL-MFAP, an unsupervised contrastive learning (CL)-based multimodal foundation (MF) model specifically tailored for discovering small molecules with potential antibiotic properties (AP). CL-MFAP integrates a transformer-based encoder with rotary position embedding for SMILES strings, a transformer-based encoder using a novel Bi-Level Routing Attention (BRA) mechanism for molecular graphs, and a multilayer perceptron for Morgan fingerprint embeddings. This model is pretrained on 1.6 million bioactive molecules with drug-like properties from the Chemical Database of Bioactive Molecules (ChEMBL) (Gaulton et al., 2011), a smaller, domain-specific dataset. Our comprehensive evaluation demonstrates that CL-MFAP outperforms baseline models trained on large-scale general datasets for antibiotic property prediction, while also exhibiting superior domain-specific performance when fine-tuned on targeted downstream tasks.
+
+# 2 RELATED WORK
+
+Transformers. Among the current mainstream LLMs, the most representative architecture is the transformer. A transformer is a DL architecture consisting of encoder and/or decoder components built around multi-head attention mechanisms. Different models in the transformer family use these components distinctively: Bidirectional Encoder Representations from Transformers (BERT) series based solely on the encoder (Devlin et al., 2018), the Generative Pre-trained Transformer (GPT) series based solely on the decoder (Radford & Narasimhan, 2018), and the Text-to-Text Transfer Transformer (T5) series utilizing both the encoder and decoder (Raffel et al., 2020). The architecture's core features are self-attention computation and positional encoding (Vaswani et al., 2017). The former is used to capture the semantic dependencies between the target word and the context and then determine its importance, while the latter understands the syntax and sequence information of the word by recording its position in the sequence. LLMs based on the transformer architecture have been widely proven to exhibit superior performance in capturing sequence semantics.
+
+LLMs for Molecular Property Prediction. LLMs have recently gained popularity in molecular property prediction due to their enhanced success. MoLFormer is a successful unsupervised transformer-based LLM that accurately captures sufficient chemical and structural information to predict a diverse range of chemical properties (Ross et al., 2022). ChemBERTa is a stack of bidirectional encoders that uses representations from transformers for molecular property prediction (Chithrananda et al., 2020) and is fine-tuned to better predict drug-target interactions (Kang et al., 2022). MolBERT is a self-supervised model, consisting of the bidirectional attention mechanism-based BERT architecture (Fabian et al., 2020). It is one of the most efficient pre-trained models for molecular property prediction that can be easily generalized to different molecular property prediction tasks via fine-tuning. All these examples of successful LLMs take in the structure of compounds in Simplified Molecular Input Line Entry System (SMILES) format for predictions.
+
+Contrastive Learning Models for Molecular Representation Learning. As the field of drug development continues to advance, the integration and utilization of multimodal data have become essential for improving the performance of molecular property prediction LLMs. Contrastive learn
+
+
+Figure 1: Illustration of the proposed approach.
+
+ing can enhance a model's feature extraction capabilities by learning different representations of molecular data in the absence of labeled data. For example, MolCLR employs three distinct molecular graph augmentations to achieve contrastive learning, significantly improving the model's ability to learn molecular representations (Wang et al., 2022). UniCorn combines several pretraining methods: 2D graph masking, 2D-3D contrastive learning, and 3D denoising, to depict molecular views from three different levels, resulting in superior performance compared to traditional models (Feng et al., 2024).
+
+# 3 PROPOSED APPROACH
+
+# 3.1 MODEL DEVELOPMENT
+
+We designed a multimodal contrastive learning model based on molecular SMILES, Morgan fingerprints, and molecular graphs to comprehensively capture different chemical characteristics. The input data is SMILES representations, which describe the linear form of a molecule, including information about its composition, bond types, and functional groups, used to depict the overall connectivity of the molecular structure. From the SMILES representation, Morgan fingerprints and molecular graphs are constructed. Morgan fingerprints provide a quantitative representation of the molecule's features, encoding its structure as a high-dimensional binary vector that captures the presence and distribution of various substructures and functional groups. Specifically, a radius size of 2 was determined through ablation studies detailed in Appendix A.1 (Table A1), and a 2048-bit vector was chosen as it is large enough to minimize hash collisions (where different structural features map to the same bit) while being computationally efficient. The graph representation of a molecule describes its topology through nodes (atoms) and edges (chemical bonds), including details about the atom types, bond characteristics, and overall connectivity. Ablation studies were performed to validate the inclusion of these three modalities, detailed in Appendix A.2 (Table A2). Altogether, the model receives a widespread in-depth representation of each compound, allowing it to learn the specificities and patterns of the compounds that influence their antibiotic-related properties.
+
+Figure 1 illustrates the overall architecture of our model, which learns the three molecular feature modalities mentioned above through different embedding pathways. First, the model employs a transformer-based graph encoder with a novel bidirectional relation aggregation (BRA) mechanism
+
+to learn the molecular graph features. Second, the transformer encoder with rotary positional embedding is used to learn the SMILES features of the molecule. This self-attention-based encoder excels at capturing global information in sequential data and handling complex contextual dependencies. Finally, to encode Morgan fingerprints, we use a multilayer perceptron (MLP), a classical feedforward neural network capable of processing high-dimensional data and extracting complex features.
+
+# 3.1.1 ROTARY POSITIONAL EMBEDDING
+
+Rotary Positional Embedding (RoPE) is an improved positional encoding method used in transformer models (Su et al., 2024). The rotation transformation effectively integrates positional information into each token and helps the model capture dependencies between distant tokens. Together, this preserves the relative position relationships between elements and improves prediction accuracy. This method is particularly suitable for processing molecular data with complex structural dependencies, as it improves the model's ability to understand sequential structural relationships. In the two-dimensional case, the formula for implementing rotary positional encoding through complex multiplication is as follows:
+
+$$
+g \left(x _ {m}, x _ {n}, m - n\right) = \operatorname {R e} \left[ \left(W _ {q} x _ {m}\right) \left(W _ {k} x _ {n}\right) ^ {*} e ^ {i (m - n) \theta} \right] \tag {1}
+$$
+
+where $m$ and $n$ are positions, $q$ is the query, $k$ is the key, $W_{q}$ is the query projection matrix, $W_{k}$ is the key projection matrix, $Re[\cdot]$ is the real part of a complex number, $(W_{q}x_{m})$ represents the complex conjugate, and $(x_{m},x_{n})$ denotes the representation in a two-dimensional coordinate system. Through this rotation formula, a rotational transformation is achieved, generating the rotary positional encoding. The original linear attention formula is expressed as follows, where $\varphi(\cdot)$ and $\phi(\cdot)$ are typically non-negative functions:
+
+$$
+\operatorname {A t t e n t i o n} (Q, K, V) _ {m} = \frac {\sum_ {n = 1} ^ {N} \phi \left(q _ {m}\right) ^ {T} \varphi \left(k _ {n}\right) v _ {n}}{\sum_ {n = 1} ^ {N} \phi \left(q _ {m}\right) ^ {T} \varphi \left(k _ {n}\right)} \tag {2}
+$$
+
+where $v_{n}$ is the value of nth token, $q_{m}$ is the query, and $k_{n}$ is the key.
+
+Combining both equations 1 and 2 gives equation 3. RoPE injects positional information through rotation, which keeps the norm of hidden representations unchanged. Thus, RoPE is combined with linear attention by multiplying the rotation matrix with the outputs of the non-negative function as follows:
+
+$$
+\operatorname {A t t e n t i o n} (Q, K, V) _ {m} = \frac {\sum_ {n = 1} ^ {N} \left(R _ {\Theta , m} ^ {d} \phi \left(q _ {m}\right)\right) ^ {T} \left(R _ {\Theta , n} ^ {d} \varphi \left(k _ {n}\right)\right) v _ {n}}{\sum_ {n = 1} ^ {N} \phi \left(q _ {m}\right) ^ {T} \varphi \left(k _ {n}\right)} \tag {3}
+$$
+
+where $R_{\Theta}^{d}$ is the orthogonal matrix used in RoFormer (Su et al., 2024) that ensures stability during the process of encoding position information.
+
+# 3.1.2 BI-LEVEL ROUTING ATTENTION
+
+The Bi-level Routing Attention (BRA) mechanism is crucial, as it partitions the attention mechanism into two phases: an initial focus on global relationships followed by a more detailed scrutiny of local specifics. In conventional applications within computer vision, the BRA mechanism first identifies critical areas within an image and then focuses on local details. For instance, in an image featuring a dog, the model would initially identify the most prominent features, such as the dog's head, across the entire image, and then subsequently focus on local details such as the eyes and nose within the defined window.
+
+In molecular graphs, diverse structural features are exhibited by different molecules, and these features significantly influence the functional performance of the molecules. For antibiotic molecules, complex cyclic structures represent a typical characteristic, the importance of which often surpasses other local structures in medicinal functionality, making precise understanding by the model crucial. In our model, through the Window-to-Window Attention mechanism of BRA, the model efficiently identifies and focuses on key structures and functional groups within the molecular graph that are central to functionality, such as cyclic structures. Concurrently, for peripheral structures or less likely
+
+node-edge combinations that have minimal impact on molecular functionality, the model minimizes their importance or filters them out through a dynamic adjustment mechanism, thereby achieving a clear prioritization in feature learning.
+
+The BRA mechanism has been proven effective in handling long-range dependencies in images within the field of computer vision, and the same theory applies to molecular graphs (Dong et al., 2023). Compared to the traditional approach of graph transformers which use classical attention, the BRA first filters out irrelevant key-value pairs at a coarse regional level, significantly reducing the number of potential interactions that need to be considered in the subsequent fine-grained token-to-token attention phase. This two-step filtering process ensures that attention is focused on areas most relevant to the query, enhancing the model's ability to manage long-range dependencies without the computational overhead of attending to all token pairs.
+
+Window-to-Window Level Routing. This mechanism efficiently computes attention across regions of a feature map while considering local context. Beginning with a 2D feature map, $X \in \mathbb{R}^{H \times \bar{W} \times C}$ , a linear transformation is applied to create three tensors: $Q$ (query), $K$ (key), and $V$ (value), as shown in Equation 4.
+
+$$
+Q = X W _ {q}, K = X W _ {k}, V = X W _ {v} \tag {4}
+$$
+
+where $W_{q}$ , $W_{k}$ , and $W_{v}$ are the learnable projection weights, each of size $\mathbb{R}^{C\times C}$ .
+
+To perform window-to-window level routing, the feature map is divided into $S \times S$ non-overlapping windows, each containing $\frac{HW}{S^2}$ feature vectors, resulting in reshaped $Q'$ , $K'$ and $V'$ . The window size $S$ is set to 7, based on ablation studies explained in Appendix A.1 (Table A3). Within each window, the $Q'$ , $K'$ , and $V'$ tensors are used to compute the average, resulting in $Q^w$ and $K^w$ , which are the window-level representations for each non-overlapping window. These are then used to calculate the window-to-window score matrix (containing window-to-window attention scores) as shown in Equation 5.
+
+$$
+A ^ {w} = Q ^ {w} \left(K ^ {w}\right) ^ {T} \tag {5}
+$$
+
+In the score matrix, each row contains the indexes of the top- $k$ windows that are most relevant to the corresponding window.
+
+Pixel-to-Pixel Level Attention. For window $I$ , its top- $k$ relevant windows are scattered across the feature map. To gather these windows together, we use the following equation to collect $K^g$ and $V^g$ :
+
+$$
+K ^ {g} = \operatorname {g a t h e r} (K, I ^ {w}), V ^ {g} = \operatorname {g a t h e r} (V, I ^ {w}) \tag {6}
+$$
+
+$K^g$ and $V^g$ represent the collected Key and Value tensors containing features from the top- $k$ windows relevant to the current window $I$ , respectively. For a given pixel $j$ within a window $I$ , the pixel will attend to all pixels in the top- $k$ windows most relevant to window $I$ . This ensures a fine-grained attention mechanism, allowing the model to refine feature representations at the individual pixel level.
+
+# Algorithm 1 Bi-Level Routing Attention
+
+1: #Graph:
+
+2: graphTokenFeature, nodeFeature $\leftarrow$ processSmilesToGraph(smilesString)
+3: graphNodeFeature $\leftarrow$ concatenate(graphTokenFeature, nodeFeature)
+4: nodeFeatureMatrix $\leftarrow$ createNodeFeatureMatrix.graphNodeFeature)
+
+5: #Bi-Level Routing Attention:
+
+6: #Window-to-Window Level Routing:
+7: windows $\leftarrow$ divideIntoWindows(nodeFeatureMatrix)
+8: distances $\leftarrow$ calculateDistancesBetweenWindows.windows)
+9: topKWindows $\leftarrow$ selectTopKWindows窗口ss, distances,k)
+
+10: #Pixel-to-Pixel Level Attention:
+11: attentionEmbedding $\leftarrow$ gatherpixelLevelAttention(topKWindows))
+
+Algorithm 1 presents the basic architecture of the Bi-Level Routing Attention (BRA) algorithm, including the processing of input data and the implementation logic of BRA. To our knowledge, this
+
+is the first time BRA has been introduced into the attention mechanism for processing molecular graphs. We utilize a transformer-based graph encoder, equipped with 8 attention heads and 12 encoder layers, a configuration particularly suited for analyzing and interpreting complex molecular structures (Ying et al., 2024).
+
+# 3.1.3 MULTIMODAL CONTRASTIVE LEARNING
+
+The advantage of a multimodal model lies in its ability to integrate information from different modalities, thus obtaining a more comprehensive understanding of molecular structure that enhances the robustness and generalization of the model. Contrastive learning is an approach that enhances feature learning by pulling similar pairs closer together while pushing dissimilar pairs apart. This approach significantly improves representation quality as it facilitates learning similarities and associations across different modalities. It also aids in the limited data issue commonly associated with antibiotic property discovery by leveraging the unlabeled molecular data available.
+
+Algorithm 2 Multimodal Contrastive Learning
+1: function CONTLEARNINGMODEL(smilesBatch, fpBatch, graphBatch)
+2: smilesOutput $\leftarrow$ SmilesEncoder(smilesBatch)
+3: fpOutput $\leftarrow$ FpEncoder(fpBatch)
+4: if BiGraphormerEncoder with MPNN then
+5: graphOutput $\leftarrow$ MPNNEncoder/graphBatch) + BiGraphormerEncoder.graphBatch)
+6: else if BiGraphormerEncoder without MPNN then
+7: graphOutput $\leftarrow$ BiGraphormerEncoder/graphBatch)
+8: else if BiGraphormerEncoder without Bi-level routing attention then
+9: graphOutput $\leftarrow$ MPNNEncoder/graphBatch) + GraphormerEncoder.graphBatch)
+10: end if
+11: return smilesOutput, fpOutput, graphOutput
+12: end function
+13: function COMPUTELoss(smilesOutput, fpOutput, graphOutput)
+14: //Loss Function (Initial Weight w1, w2, w3)
+15: lossSmilesFP $\leftarrow$ NT-Xent(smilesOutput, fpOutput)
+16: lossSmilesGraph $\leftarrow$ NT-Xent(smilesOutput, graphOutput)
+17: lossFPGraph $\leftarrow$ NT-Xent(fpOutput, graphOutput)
+18: totalLoss $\leftarrow$ $w_{1} \cdot$ lossSmilesFP + $w_{2} \cdot$ lossSmilesGraph + $w_{3} \cdot$ lossFPGraph
+19: return totalLoss
+20: end function
+
+Algorithm 2 illustrates the basic architecture and loss computation of the multimodal contrastive learning model. In our model, SMILES, Morgan fingerprints, and molecular graphs are encoded using dedicated encoders and the representations are then processed through a contrastive learning framework, using Normalized Temperature-Scaled Cross-Entropy (NT-Xent) as the fundamental loss function to compare pairs across modalities (Equation 7)(You et al., 2020). NT-Xent Loss learns well-distributed feature representations by maximizing the similarity of similar samples (positive pairs) and minimizing the similarity of dissimilar samples (negative pairs). The function takes the concatenated vectors of two modalities for two molecules as input and calculates the loss for each pair of modalities. For example, for SMILES and molecular graphs, we first compute the concatenated vector of the SMILES embedding and the graph embedding, then compute a similarity matrix for all pairwise samples for the two modalities, and finally calculate the loss between two modalities. To enable the use of NT-Xent loss with different modalities, we project the representations from different modalities into the same vector space. In each iteration, different modalities of the same molecule are treated as positive pairs, while representations from different molecules are treated as negative pairs. NT-Xent loss is advantageous as it effectively measures the similarity between high-dimensional embeddings from different modalities, emphasizing the alignment of directions rather than absolute values, which is crucial for robust multimodal learning.
+
+$$
+L c = - \log \frac {\exp \left(\frac {\operatorname {s i m} \left(x , x _ {i} ^ {\prime}\right)}{\tau}\right)}{\sum_ {j = 1} ^ {n} \exp \left(\frac {\operatorname {s i m} \left(x , y _ {i}\right)}{\tau}\right)} \tag {7}
+$$
+
+The total loss is defined in Equation 8, where $i$ and $j$ represent two different molecules, and $m$ and $n$ denote different data modalities. For each modality pair, we assign a weight, and the total loss is calculated as the weighted sum of these individual losses.
+
+$$
+L = \sum_ {m n} w _ {m n} \left(\sum \left(L _ {c} \left(x _ {i m} + x _ {i n}, x _ {j m} + x _ {j n}\right) + L _ {c} \left(x _ {i m} + x _ {i n}, x _ {i m} ^ {\prime} + x _ {i n} ^ {\prime}\right)\right)\right) \tag {8}
+$$
+
+# 3.2 PRETRAINING PROCESS
+
+Dataset and Pre-processing. The ChEMBL24 database was downloaded after the removal of salts, charge neutralization, removal of molecules with SMILES strings longer than 100 characters, removal of molecules containing any element other than H, B, C, N, O, F, Si, P, S, Cl, Se, Br, and I, and removal of molecules with a larger ECFP4 similarity than 0.323 compared to a holdout set consisting of 10 marketed drugs (celecoxib, aripiprazole, cobimetinib, osimertinib, troglitazone, ranolazine, thiothixene, albuterol, fexofenadine, mestranol) (Gaulton et al., 2011) (Fiscato et al., 2018). Pre-processing was then applied to the raw molecular data, which included de-duplication, normalization via conversion to canonical SMILES using RDKit (rdk), and removal of entries with over 123 tokens, as these molecules are exceedingly rare in practical applications (Ross et al., 2022). After processing, we obtained 1,591,020 SMILES for model training. The preprocessed data was divided into $80\% - 10\% - 10\%$ for training, validation, and testing, respectively. Given the input data of SMILES strings, CL-MFAP generates Morgan fingerprints and molecular graphs using RDKit (rdk) and all three types of data are subsequently used to train the model. Pretraining CL-MFAP using ChEMBL was validated via ablation studies detailed in Appendix A.1 (Table A4).
+
+Domain-specific. Our target domain contains bioactive molecules with drug-related compounds from ChEMBL, whereas other large-scale databases, such as PubChem, typically include much more widely used, commercially available molecules (Lyubishkin et al., 2022) (Kim et al., 2016).
+
+# 4 EXPERIMENTS
+
+# 4.1 IMPLEMENTATION DETAILS
+
+Environment. All implementations were conducted on the PyTorch platform using an NVIDIA A100 GPU. All models were trained using a learning rate of 1e-4, over 20 epochs, with batch size 8 and 4 worker processes. The Adam optimizer and gradient clipping were also applied during training, limiting the gradient norm to 1.0. For the bi-level routing attention, the window size is 7, the number of top k windows is 4, and there are 16 pixels per window and 8 attention heads.
+
+Pre-trained CL-Models. To analyze the contribution of each component along the molecular graph embedding path—graph transformer encoder (GTE) and the newly introduced BRA—as well as to test whether combining this GTE with a message-passing neural network (MPNN) can further enhance the model's ability to capture global information, we pre-trained five models within the overall framework of multimodal contrastive learning which differ in structural configurations along the graph embedding path. Aside from CL-MFAP, the other four models are labeled as Contrastive Learning Baseline 1-4 (CL-BL1-4). The labels and structures of all the models pre-trained under the multimodal contrastive learning framework are presented in Table 1.
+
+Table 1: Proposed pre-trained models with different graph embedding paths
+
+
Model Name
Structural Configuration
Graph Embedding Description
CL-MFAP
Proposed Model
GTE + BRA
CL-BL1
CL-MFAP w/ MPNN
GTE + BRA + MPNN
CL-BL2
CL-MFAP w/ MPNN w/o BRA
GTE + MPNN
CL-BL3
CL-MFAP w/o BRA
GTE
CL-BL4
CL-MFAP w/ MPNN w/o BRA w/o GTE
MPNN
+
+Model Size. Moreover, we measured the size of our models in terms of Params and FLOPs to further evaluate their performance and cost efficiency. Params refer to the number of trainable parameters in a model. This is directly related to the structure of the model, representing each learnable weight, including weights and biases in different layers. As such, it serves as a measure of the model's complexity and storage requirements (Han et al., 2024). FLOPs refer to the number of floating-point operations performed during a single forward pass of the model. This metric measures the computational complexity and cost of the model, providing insight beyond just the number of parameters. FLOPs are closely related to the model's inference speed and the computational resources required for its operation (Han et al., 2024).
+
+# 4.2 DOWNSTREAM PROPERTY PREDICTIONS
+
+Datasets. Six datasets were used for downstream property prediction: MIC activity against $E.$ coli (E. coli MIC) dataset curated from COADD database (Desselle et al., 2017), MIC activity against $H.$ influenzae (H. influenzae MIC) dataset curated from ChEMBL database (Gaulton et al., 2011), BACE (Wu et al., 2018), Blood-Brain Barrier Penetration (BBBP) (Wu et al., 2018), Parallel Artificial Membrane Permeability Assay (PAMPA) (Siramshetty et al., 2021), and Bioavailability (Ma et al., 2008). All datasets were divided into $80\% - 10\% - 10\%$ for training, testing and validation, respectively. More details can be found in Appendix A.1.
+
+Baseline Models. We selected MoLFormer, ChemBERTa-2, MolBERT, MolCLR, and FP-GNN as baselines to evaluate the performance of CL-MFAP. MoLFormer, a transformer-based model, was trained on 1.1 billion molecules from ZINC and PubChem databases (Ross et al., 2022). ChemBERTa-2, a BERT-based LLM with 12 encoders, was trained on 77 million PubChem compounds (Ahmad et al., 2022). MolBERT, another BERT-based model with 12 encoders, was trained on a smaller dataset of 1.6 million ChEMBL molecules (Fabian et al., 2020). MolCLR employs graph neural networks and contrastive learning with molecular augmentations, trained on 10 million PubChem SMILES (Wang et al., 2022). Finally, FP-GNN is a multimodal framework that combines molecular graphs and fingerprints for property prediction (Cai et al., 2022).
+
+Mean Reciprocal Rank. To more intuitively evaluate the overall performance of each model across all downstream tasks, we employed the mean reciprocal rank (MRR) method, a statistical approach that synthesizes the rankings of all models on various downstream tasks (Wu et al., 2011). This method assigns a corresponding score to each model, with higher scores indicating superior overall performance. We first recorded the rank of each model's ROC-AUC metric in comparison to the other models for each task and then used the ranks to calculate the model's MRR value using the following equation:
+
+$$
+M R R = \frac {1}{| Q |} \sum_ {i = 1} ^ {| Q |} \frac {1}{\operatorname {r a n k} _ {i}} \tag {9}
+$$
+
+where $i$ denotes the task index and $Q$ represents the total number of tasks.
+
+# 4.3 RESULTS
+
+The performance of CL-MFAP on downstream property prediction tasks was compared against all baselines. Using Area under the Receiver Operating Characteristic Curve (ROC-AUC) as the evaluation metric, the experimental results are summarized in Table 2. Notably, CL-MFAP outperforms all other baseline models on the $E$ coli MIC dataset (ROC-AUC: $0.854 \pm 0.037$ ), which is particularly relevant for antibiotic drug discovery as it predicts the antibacterial activity of compounds against $E$ coli. In addition, it performs second best on the $H$ influenzae MIC dataset (ROC-AUC: $0.874 \pm 0.015$ ), with negligible difference from the best performing model, MoLFormer (ROC-AUC: $0.876 \pm 0.017$ ). We noted similar performance for pre-trained chemical language models (CL-MFAP, MoLFormer, MolBERT, and ChemBERTa-2) that outperform models without pretraining (MolCLR and FP-GNN). Together, these results show the ability of CL-MFAP to exceed in antibacterial activity prediction, regardless of sample size. Thus, our model can also predict antibacterial activity for less studied bacterial strains with less data. On the remaining datasets, our model demonstrates consistently strong performance, ranking among the top 2 or 3 models, unlike
+
+other baselines that excel in only 1-2 datasets. This highlights the robustness and generalizability of CL-MFAP across diverse tasks.
+
+When ranked by MRR scores, CL-MFAP significantly outperforms the other models (Figure 2). The elevated MRR scores underscore the model's superior overall performance, reaffirming its effectiveness and broad applicability.
+
+Table 2: ROC-AUC of CL-MFAP vs. baseline models on downstream property prediction datasets
+
+
Model
E. coliMIC
H. influenzaeMIC
BBBP
PAMPA
Bioavail-ability
BACE
CL-MFAP
0.85±0.04
0.87±0.02
0.93±0.01
0.76±0.03
0.60±0.03
0.88±0.01
MoLFormer
0.71±0.01
0.88±0.02
0.93±0.01
0.72±0.03
0.72±0.06
0.87±0.02
MolBERT
0.77±0.00
0.87±0.03
0.97±0.01
0.73±0.05
0.75±0.08
0.89±0.02
ChemBERTa-2
0.74±0.03
0.86±0.02
0.97±0.01
0.67±0.03
0.70±0.07
0.81±0.01
MolCLR
0.71±0.01
0.86±0.02
0.93±0.01
0.76±0.02
0.63±0.16
0.86±0.01
FP-GNN
0.75±0.02
0.87±0.02
0.94±0.01
0.75±0.01
0.75±0.04
0.87±0.01
+
+
+Figure 2: Mean reciprocal rank (MRR) of the average performance for CL-MFAP versus baseline models. CL-MFAP demonstrates superior overall performance.
+
+# 4.4 ABLATION STUDIES
+
+Overall Performance Ranking of CL-based Models. We compared the performance of five pretrained CL models to verify the effectiveness of different components in the graph embedding path. We evaluated the performance of these pre-trained CL models on the downstream tasks using ROC-AUC (Table A5) and then ranked the performance of each model across all tasks based on these findings. As shown in Table 3, CL-MFAP outperforms the model variations in 5 out of 6 downstream tasks. To further assess model performance and cost efficiency, an MRR analysis of the overall model rankings was performed. The model size, represented via Params (Figure 3A) and FLOPs (Figure 3B), was plotted against the MRR score. CL-MFAP's top-left position in Figure 3A highlights its superior performance with fewer parameters.
+
+Ablation study on the BRA. We conducted an ablation analysis on the contribution of BRA by comparing CL-MFAP vs. CL-BL3, and CL-BL1 vs. CL-BL2. The former compares the impact of BRA in the absence of MPNN, while the latter compares the effect of BRA when MPNN and GTE are used together. In both cases, models with BRA consistently outperform their counterparts (Table 3, Figure 3). Therefore, BRA plays a significant role in enhancing model performance.
+
+Ablation study on the MPNN. The value of MPNN was also evaluated. As we initially hypothesized that introducing MPNN could help further capture comprehensive information (Cai et al., 2023), we introduced an MPNN path running parallel to GTE in the graph embedding process.
+
+Table 3: Overall performance ranking on downstream property prediction datasets for all pre-trained CL models
+
+
Model
E. coliMIC
H. influenzaeMIC
BBBP
PAMPA
Bioavailability
BACE
CL-MFAP (GTE, BRA)
1
1
1
1
5
1
CL-BL1 (GTE, BRA, MPNN)
3
4
2
2
2
3
CL-BL2 (GTE, MPNN)
4
2
4
3
1
4
CL-BL3 (GTE)
2
3
3
5
4
2
CL-BL4 (MPNN)
5
5
5
4
3
5
+
+
+Figure 3: Mean reciprocal rank (MRR) of the ROC-AUC rankings for all CL models on downstream property prediction datasets plotted against (3A) Params, and (3B) FLOPs. Models closer to the top left corner demonstrate better performance with fewer parameters (3A) and lower FLOPs (3B).
+
+
+
+However by comparing the results of CL-MFAP vs. CL-BL1 and CL-BL3 vs. CL-BL2, introducing MPNN weakens the performance of the model and thus was not incorporated (Table 3, Figure 3).
+
+Ablation study on the GTE. We also analyzed whether GTE is replaceable. A comparison between CL-BL3 and CL-BL4 shows that replacing GTE with MPNN for molecular graph encoding significantly decreases model performance. Also, when comparing CL-BL2 and CL-BL4, despite MPNN weakening the performance of GTE, the combination of GTE and MPNN still outperforms MPNN alone (Table 3, Figure 3). Thus, GTE is essential for encoding molecular graphs in our model.
+
+In addition, additional ablation analyses (to analyze the effects of window size, data modalities, pretraining CL-MFAP, and Morgan fingerprint radius on model performance), Representation-Property Relationship Analysis (RePRA), and a case study were performed, detailed in Appendix A.1 (Table A1-A4), A.4 (Table A6, Figure A1), and A.5 (Table A7-A8), respectively.
+
+# 5 CONCLUSION
+
+In this work, we present CL-MFAP, a novel multimodal contrastive learning framework. The model combines and compares molecular information from three modalities - SMILES, molecular graphs and fingerprints - to efficiently learn representations of molecules that improve its performance in predicting antibiotic-related properties. We also, for the first time, incorporate the BRA mechanism to enhance the quality of molecular representation learning. Experimental results demonstrate that CL-MFAP achieves outstanding performance in predicting drug molecule properties. In the future, we aim to integrate this model with other cross-domain potential modules and further refine its multimodal contrastive learning algorithm to enhance its generalization capabilities.
+
+All code can be found at https://github.com/CLMFAP/CLMFAP.
+
+# ACKNOWLEDGMENTS
+
+This research was supported in part by the Canadian Institutes of Health Research (PLL185683, PJT 190272), the Canada Research Chairs Tier II Program (CRC-2021-00482), the Natural Sciences and Engineering Research Council of Canada (RGPIN-2021-04072) and the Canada Foundation for Innovation (CFI) John R. Evans Leaders Fund (JELF) program (grant #43481).
+
+A special thanks to Yan Yi Li and Zihao Jing for their help in this work.
+
+# REFERENCES
+
+Rdkit: Open-source cheminformatics. URL https://www.rdkit.org.
+Walid Ahmad, Elana Simon, Seyone Chithrananda, Gabriel Grand, and Bharath Ramsundar. Chemberta-2: Towards chemical foundation models, 2022. URL https://arxiv.org/abs/2209.01712.
+Chen Cai, Truong Son Hy, Rose Yu, and Yusu Wang. On the connection between mpnn and graph transformer. In Proceedings of the 40th International Conference on Machine Learning, ICML'23. JMLR.org, 2023.
+Hanxuan Cai, Huimin Zhang, Duancheng Zhao, Jingxing Wu, and Ling Wang. FP-GNN: a versatile deep learning architecture for enhanced molecular property prediction. Briefings in Bioinformatics, 23(6), 2022. doi: 10.1093/bib/bbac408.
+Angela Cesaro, Mojtaba Bagheri, Marcelo Torres, Fangping Wan, and Cesar De La Fuente-Nunez. Deep learning tools to accelerate antibiotic discovery. Expert Opin Drug Discovery, 18(11): 1245-1257, 2023. doi: 10.1080/17460441.2023.2250721.
+Seyone Chithrananda, Gabriel Grand, and Bharath Ramsundar. Chemberta: Large-scale self-supervised pretraining for molecular property prediction. CoRR, abs/2010.09885, 2020. URL https://arxiv.org/abs/2010.09885.
+Mathilde R. Desselle, Ruth Neale, Karl A. Hansford, Johannes Zuegg, Alysha G. Elliott, Matthew A. Cooper, and Mark A. Blaskovich. Institutional profile: Community for open antimicrobial drug discovery - crowdsourcing new antibiotics and antifungals. *Future Science OA*, 3(2):FSO171, 2017. doi: 10.4155/fsoa-2016-0093.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018. URL http://arxiv.org/abs/1810.04805.
+Kun Dong, Jian Xue, Xing Lan, and Ke Lu. Biunet: Towards more effective unet with bi-level routing attention. In 34th British Machine Vision Conference 2023, BMVC 2023, Aberdeen, UK, November 20-24, 2023. BMVA, 2023.
+Benedek Fabian, Thomas Edlich, Hélène Gaspar, Marwin H. S. Segler, Joshua Meyers, Marco Fiscato, and Mohamed Ahmed. Molecular representation learning with language models and domain-relevant auxiliary tasks. CoRR, abs/2011.13230, 2020. URL https://arxiv.org/abs/2011.13230.
+Shikun Feng, Yuyan Ni, Minghao Li, Yanwen Huang, Zhi-Ming Ma, Wei-Ying Ma, and Yanyan Lan. *Unicorn: A unified contrastive learning approach for multi-view molecular representation learning*, 2024. URL https://arxiv.org/abs/2405.10343.
+Marco Fiscato, Alain C. Vaucher, and Marwin Segler. GuacaMol All SMILES. 11 2018. doi: 10.6084/m9.figshare.7322252.v2. URL https://figshare.com/articles/dataset/ GuacaMol_All_SMILES/7322252.
+Anna Gaulton, Louisa J. Bellis, A. Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, and John P. Overington. Chembl: a large-scale bioactivity database for drug discovery. *Nucleic Acids Research*, 40:D1100-D1107, 2011. doi: 10.1093/nar/gkr777.
+
+Yu Gu, Robert Tinn, Hao Cheng, Michael Lucas, Naoto Usuyama, Xiaodong Liu, Tristan Naumann, Jianfeng Gao, and Hoifung Poon. Domain-specific language model pretraining for biomedical natural language processing. ACM Transactions on Computing for Healthcare (HEALTH), 3(1): 1-23, 2021. doi: 10.1145/3458754.
+Kai Han, Yunhe Wang, Jianyuan Guo, and Enhua Wu. Parameternet: Parameters are all you need for large-scale visual pretraining of mobile networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 15751-15761, June 2024.
+Hyeunseok Kang, Sungwoo Goo, Hyunjung Lee, Jung-woo Chae, Hwi-yeol Yun, and Sangkeun Jung. Fine-tuning of bert model to accurately predict drug-target interactions. Pharmaceutics, 14(8):1710, 2022. doi: 10.3390/pharmaceutics14081710.
+Sunghwan Kim, Paul A. Thiessen, Evan E. Bolton, Jie Chen, Gang Fu, Asta Gindulyte, Lianyi Han, Jane He, Siqian He, Benjamin A. Shoemaker, Jiyao Wang, Bo Yu, Jian Zhang, and Stephen H. Bryant. Pubchem substance and compound databases. *Nucleic Acids Research*, 44(D1):D1202-D1213, 2016. doi: 10.1093/nar/gkv951.
+N. R. Lyubishkin, O. V. Kardashian, O. V. Klenina, and T. I. Chaban. Virtual databases for drug discovery. 2022.
+Chang-Ying Ma, Sheng-Yong Yang, Hui Zhang, Ming-Li Xiang, Qi Huang, and Yu-Quan Wei. Prediction models of human plasma protein binding rate and oral bioavailability derived by using ga-cg-svm method. Journal of Pharmaceutical and Biomedical Analysis, 47(4):677-682, 2008. doi: 10.1016/j.jpba.2008.03.023.
+Alec Radford and Karthik Narasimhan. Improving language understanding by generative pretraining. 2018.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(1), 2020.
+Jerret Ross, Brian Belgodere, Vijil Chenthamarakshan, Inkit Padhi, Youssef Mroueh, and Payel Das. Large-scale chemical language representations capture molecular structure and properties. Nature Machine Intelligence, 4(12):1256-1264, 2022. doi: 10.1038/s42256-022-00580-7.
+Vishal Siramshetty, Jordan Williams, c-Trung Nuyn, Jorge Neyra, Noel Southall, Ewy Mathé, Xin Xu, and Pranav Shah. Validating adme qsr models using marketed drugs. SLAS DISCOVERY: Advancing the Science of Drug Discovery, 26(10):1326-1336, 2021. doi: 10.1177/24725552211017520.
+Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomput., 568(C), March 2024. doi: 10.1016/j.neucom.2023.127063.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS'17, pp. 6000-6010, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.
+Yuyang Wang, Jianren Wang, Zhonglin Cao, and Amir Barati Farimani. Molecular contrastive learning of representations via graph neural networks. Nature Machine Intelligence, 4(3):279-287, 2022. doi: 10.1038/s42256-022-00447-x.
+Yang Wu, Masayuki Mukunoki, Takuya Funatomi, Michihiko Minoh, and Shihong Lao. Optimizing mean reciprocal rank for person re-identification. In 2011 8th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), pp. 408-413, 2011. doi: 10.1109/AVSS.2011.6027363.
+Zhenqin Wu, Bharath Ramsundar, Evan N. Feinberg, Joseph Gomes, Caleb Genisses, Aneesh S. Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chem. Sci., 9(2):513-530, 2018. doi: 10.1039/C7SC02664A.
+
+Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng, Guolin Ke, Di He, Yanming Shen, and Tie-Yan Liu. Do transformers really perform bad for graph representation? In Proceedings of the 35th International Conference on Neural Information Processing Systems, NIPS '21. Curran Associates Inc., 2024.
+Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph contrastive learning with augmentations. In Proceedings of the 34th International Conference on Neural Information Processing Systems, NIPS '20. Curran Associates Inc., 2020.
+
+# A APPENDIX
+
+# A.1 ADDITIONAL ABLATION STUDIES
+
+Ablation study on Morgan Fingerprint Radius. We performed an additional ablation study to investigate the effect of the Morgan fingerprint radius size on CL-MFAP's predictive capabilities. CL-MFAP was tested with five fingerprint radius sizes (0, 1, 2, 3, 4, and 5) $^{1}$ . As shown in Table A1, a radius of size 2 has the best overall performance, achieving the highest results in 5 of the 6 downstream datasets, proving that it is the best radius size for CL-MFAP.
+
+Table A1: ROC-AUC of CL-MFAP models with varying Morgan fingerprint radius sizes on downstream property prediction datasets. Models are named based on their respective fingerprint radius sizes in the format MR_fingerprint radius size.
+
+
Model
Fingerprint Radius Size
E. coliMIC
H. influenzaeMIC
BBBP
PAMPA
Bioavailability
BACE
MR_0
0
0.827
0.846
0.905
0.747
0.535
0.886
MR_1
1
0.843
0.857
0.900
0.721
0.523
0.880
MR_2
2
0.854
0.855
0.928
0.747
0.605
0.882
MR_3
3
0.849
0.853
0.913
0.738
0.546
0.880
MR_4
4
0.852
0.858
0.900
0.719
0.553
0.868
+
+Ablation study on Data Modalities. We removed each of the three data modalities from CL-MFAP individually and assessed its performance on downstream property prediction tasks to determine their individual impact. As shown in Table A2, We observe that removing either the SMILES or the molecular fingerprints results in a certain degree of performance decline. This suggests that both data modalities contribute approximately equally to the overall model performance, with the impact of removing Fingerprints being slightly greater than removing SMILES. However, when we remove the molecular graph modality, the model performance experiences a significant drop. This indicates that the primary contributor to our model's performance is the molecular graph, processed through the GTE integrated with the BRA mechanism, which aligns well with our assumptions.
+
+Table A2: ROC-AUC of CL-MFAP models with varying data modalities on downstream property prediction datasets. Models are named based on their missing modalities in the format M MISSING modality.
+
+
Model
Missing Modality
E. coli MIC
H. influenzae MIC
BBBP
PAMPA
Bioavailability
BACE
M_none
NA
0.875
0.855
0.941
0.784
0.559
0.891
M_noSMI
SMILES
0.834
0.741
0.920
0.720
0.568
0.877
M_noFP
Fingerprint
0.784
0.859
0.903
0.725
0.622
0.878
M_noGraph
Graphs
0.541
0.512
0.656
0.633
0.647
0.625
+
+Ablation study on Window Size. We tested several different window sizes in our CL-MFAP to study their impact and determine the most optimal choice. Six distinct window sizes (2, 3, 5, 7, 9, and 11) were evaluated for CL-MFAP, and their performance on downstream property prediction tasks was assessed. As shown in Table A3, a window size of 7, representing a moderate configuration, achieved the best performance in 4 out of 5 tasks. In contrast, performance tends to decline when the window size is either too large or too small. This was predicted as when the window size is too small, the BRA mechanism is confined to focusing on highly local regions, overly emphasizing
+
+fine-grained details, and, to some extent, losing the ability to capture long-range dependencies. On the other hand, when the window size is too large, the sparsity of the BRA mechanism becomes excessive, leading to the dilution of some critical local information, which partially undermines the effectiveness of routing and aggregation. As a result, we set the default window size to 7.
+
+Table A3: ROC-AUC of CL-MFAP models with varying window sizes on downstream property prediction datasets. Models are named based on their respective window sizes in the format MW_window size.
+
+
Model
Window Size
E. coliMIC
H. influenzaeMIC
BBBP
PAMPA
Bioavailability
BACE
MW_S2
2
0.847
0.840
0.913
0.715
0.557
0.856
MW_S3
3
0.844
0.849
0.909
0.717
0.564
0.851
MW_S5
5
0.831
0.841
0.902
0.754
0.507
0.890
MW_S7
7
0.875
0.855
0.941
0.784
0.559
0.891
MW_S9
9
0.830
0.848
0.914
0.731
0.632
0.872
MW_S11
11
0.837
0.845
0.928
0.715
0.526
0.887
+
+Ablation study on Pretraining CL-MFAP. We performed an ablation study to investigate whether pretraining on the larger ChEMBL dataset improves model performance. CL-MFAP with and without ChEMBL pretraining was trained/finetuned on all downstream property prediction datasets. As shown in Table A4, in 5 of 6 tasks, dropping the pretraining slightly weakens model performance, although not significantly. This indicates that while pretraining enhances model performance and represents the ideal scenario, our algorithm and novel methodology are still able to achieve excellent results even without pretraining. In scenarios where cost-effectiveness is prioritized in training resource consumption, the model can handle the intended use cases to a similar extent without pretraining.
+
+Table A4: ROC-AUC of CL-MFAP with ChEMBL dataset pretraining vs. no pretraining on downstream property prediction datasets
+
+
Dataset
CL-MFAP with ChEMBL pretraining
CL-MFAP without ChEMBL pretraining
E. coliMIC
0.854
0.824
H. influenzaeMIC
0.874
0.850
BBBP
0.933
0.900
PAMPA
0.759
0.728
Bioavailability
0.599
0.549
BACE
0.881
0.882
+
+# A.2 DOWNSTREAM PROPERTY PREDICTION DATASETS
+
+The choice of the downstream property prediction datasets was based on the availability of good quality data and biological relevance to antibiotic properties. The most relevant antibiotic property is antibacterial activity, and thus the $E.$ coli and $H.$ influenzae MIC datasets were curated from COADD (Desselle et al., 2017) ChEMBL (Gaulton et al., 2011), respectively, to analyze CL-MFAP's ability to predict antibacterial activity. The other datasets were obtained from trusted databases (MoleculeNet (Wu et al., 2018) and Therapeutics Data Commons (Huang et al., 2021)) and are commonly used in ML models to benchmark model performance in drug discovery.
+
+E. coli MIC Dataset. This dataset describes compound ability to inhibit Escherichia coli (E. coli). Obtained from COADD (Desselle et al., 2017), each compound has an associated Minimum Inhibitory Concentration (MIC) value, which represents the antibacterial activity against E. coli. The compounds were binarized as active (1) if $\mathrm{MIC} \leq 8\mathrm{ug/mL}$ and inactive (0) if $\mathrm{MIC} > 8\mathrm{ug/mL}$ . Size: $\sim 100,000$ compounds.
+
+H. influenzae MIC Dataset. This dataset describes the ability of compounds to inhibit Haemophilus influenzae (H. influenzae). Obtained from ChEMBL (Gaulton et al., 2011), each compound has an associated MIC value, which represents the antibacterial activity against H. influenzae. The compounds were binarized as active (1) if $\mathrm{MIC} \leq 4\mathrm{ug/mL}$ and inactive (0) if $\mathrm{MIC} > 4\mathrm{ug/mL}$ . Size: 3,341 compounds.
+
+BACE Dataset. This dataset from MoleculeNet (Wu et al., 2018) assesses compounds' binding ability for a set of inhibitors for $\beta$ -secretase 1. The compound is labeled active (1) if it is a potential inhibitor of B-secretase 1, 0 otherwise. Size: 1,512 compounds.
+
+Blood-Brain Barrier Penetration (BBBP) Dataset. This MoleculeNet (Wu et al., 2018) dataset assesses compounds' capacity to traverse the blood-brain barrier. The compound is labeled "p" if it can penetrate the barrier and "np" if it cannot. Size: 2,038 compounds.
+
+Parallel Artificial Membrane Permeability Assay (PAMPA) Dataset. This dataset evaluates compounds' permeability across the cell membrane based on the PAMPA assay. The compound is labeled 1 if it has high permeability, and 0 if it has low permeability. Size: NCATS set - 2,035 compounds; Approved drugs set - 142 drugs (Siramshetty et al., 2021).
+
+Bioavailability. This dataset contains the oral bioavailability of different drugs, defined as "the rate and extent to which the active ingredient or active moiety is absorbed from a drug product and becomes available at the site of action" (Chen et al., 2001). Size: 640 compounds (Ma et al., 2008).
+
+# A.3 EVALUATION OF CL-BASED MODELS ON DOWNSTREAM PROPERTY PREDICTION DATASETS
+
+In Table A5 below are the ROC-AUC values for all pre-trained CL models on the downstream property prediction datasets.
+
+Table A5: ROC-AUC of all pre-trained CL models on downstream property prediction datasets
+
+
Model
E. coliMIC
H. influenzaeMIC
BBBP
Pampa
Bioavailability
BACE
CL-MFAP
0.85±0.04
0.87±0.02
0.93±0.01
0.76±0.03
0.60±0.03
0.88±0.01
CL-BL1
0.80±0.01
0.86±0.02
0.93±0.01
0.75±0.04
0.69±0.05
0.86±0.02
CL-BL2
0.80±0.01
0.87±0.02
0.92±0.00
0.75±0.02
0.72±0.05
0.86±0.01
CL-BL3
0.82±0.04
0.87±0.02
0.93±0.01
0.72±0.03
0.65±0.05
0.87±0.01
CL-BL4
0.78±0.01
0.86±0.02
0.92±0.01
0.73±0.04
0.67±0.06
0.85±0.00
+
+# A.4 REPRA - EVALUATION OF PRE-TRAINED MODELS
+
+We primarily applied the Representation-Property Relationship Analysis (RePRA) method to evaluate CL-MFAP against its model variations and all baselines (MoLFormer, MolBERT, ChemBERTa2, MolCLR, and FP-GNN). RePRA, a novel method introduced by Zhang et al. in 2023, draws inspiration from the concepts of Activity Cliffs (ACs) and Scaffold Hopping (SH) (Zhang et al., 2024). It assesses the quality of molecular representations extracted by pre-trained models and visualizes the relationship between these representations and molecular properties. RePRA generalizes ACs and SH from the structure-activity context to the representation-property context, defining an ideal relationship between molecular representations and their properties as a boundary condition. This condition drives the ACs and SH regions to a borderline state without observed data points, allowing for the calculation of ACs and SH thresholds based on these constraints. By using the detected ACs and SH, RePRA generates a map showing the distances between pairs of representations and molecular properties, thereby evaluating the quality of the representations.
+
+RePRA Map. The RePRA map serves as a visualization tool for assessing the quality of molecular representations produced by a pre-trained model. Its x-axis denotes the similarity between the representations of a pair of target molecules, while the y-axis indicates the difference between the properties of this pair of molecules. Typically, a RePRA map is partitioned into four main regions, with shadowed ACs and SH zones that should ideally be avoided by the data points on the map.
+
+Activity Cliffs. This region is delineated by scenarios in which a pair of molecules showcases markedly different properties beyond the y-axis threshold of ACs, while their representations exhibit a noticeable similarity surpassing the x-axis threshold of ACs. A predominance of data points clustered in this area indicates that the model's representations are too similar to adequately capture the diverse range of molecular properties, thus indicating a limited ability of the pre-trained model to differentiate between molecular properties.
+
+Scaffold Hopping. This region is characterized by instances where a pair of molecules exhibit fairly similar properties beyond the y-axis threshold of SH, yet their representations demonstrate a significant disparity surpassing the x-axis threshold of SH. A prevalence of data points clustered in this zone suggests that the model tends to generate highly various representations that correspond to a narrow range of similar molecular properties, indicative of subpar representation quality from the pre-trained model.
+
+Evaluation Scores. Two evaluation scores, average deviation $(S_{AD})$ and improvement rate $(S_{IR})$ , are derived from the RePRA Map to assess the performance of the models. $S_{AD}$ quantifies the average deviation by considering the ratio of data points situated in ACs and SH, adjusting for noise points in the remaining ideal regions; a lower $S_{AD}$ value indicates better performance. On the other hand, $S_{IR}$ is computed by comparing the numbers of data points in ACs and SH between a standard baseline (ECFP) and the pre-trained model under evaluation. Again, a lower $S_{IR}$ value signifies superior performance.
+
+Visualization of Cosine Similarities. In addition to the RePRA map, a visualization of cosine similarities is also presented to analyze the distribution of similarities using CosineSim as a metric between pairs of molecules. This visualization aids in identifying if there are common substructures shared among most molecular pairs.
+
+Datasets. For the RePRA measurement, we employed the Estimated SOLubility (ESOL) dataset, which includes the measured log solubility $(\mathrm{mol} / \mathrm{L})$ for 902 compounds (Niwa et al., 2009). The "measured log solubility in mols per liter" data from the ESOL dataset was utilized as labels for molecular properties. Initially, the distance between each pair of labels was computed, followed by calculating the distance between each pair of logits. These labels and logits were then collectively inputted into the RePRA algorithm to generate the map.
+
+Results. All models were evaluated using the RePRA test, with the scores presented in Table A6. For the $S_{AD}$ parameter, it can be observed that the CL-MFAP model has the lowest result, indicating fewer noise data points with detected ACs and SH, which suggests a better representation-property relationship. For the $S_{IR}$ parameter, the CL-MFAP model also has the lowest score, demonstrating an improvement in representation quality compared to the traditional ECFP method and indicating that CL-MFAP generates better representations compared to the other models. Since lower $S_{AD}$ and $S_{IR}$ scores jointly indicate superior molecular embedding and representation quality, it is unsurprising that the CL-MFAP model, enhanced by the BRA, excels in this test. Notably, all CL models utilizing GTE outperformed the baseline models, highlighting the inherent advantage of contrastive learning frameworks trained on multimodal data in effectively learning molecular representations. The results of the RePRA map are shown in Figure A1.
+
+Table A6: RePRA scores of all pre-trained CL models and baseline models
+
+
Model
\( S_{AD} \)
\( S_{IR} \)
CL-MFAP
0.008
1.317
CL-BL1
0.013
1.501
CL-BL2
0.011
1.431
CL-BL3
0.010
1.395
CL-BL4
0.019
1.753
MoLFormer
0.017
1.607
MolBERT
0.016
1.758
ChemBERTa-2
0.020
1.904
MolCLR
0.016
1.267
FP-GNN
0.007
1.434
+
+
+Figure A1: RePRA measurement of all pre-trained CL models and baseline models. The shaded areas in the top right and bottom left represent the ACs region and the SH region, respectively.
+
+# A.5 Escherichia coli CASE STUDY
+
+Escherichia coli (E. coli) is a gram-negative bacterium commonly found in the gut microbiome of humans that is usually harmless. However, it can become pathogenic under certain conditions or pathogenic E. coli can be ingested and cause a variety of issues in humans. The issues can range from traveler's diarrhea and pneumonia (Mueller & Tainer, 2024) to playing a part in Inflammatory Bowel Disease (Martinez-Medina & Garcia-Gil, 2014). Although antibiotics exist for $E$ coli, many strains develop antibiotic resistance, thus showcasing the need for new antibiotic compounds effective against $E$ coli.
+
+In this case study, we employ CL-MFAP to identify novel antibiotic compounds that are highly likely to be effective against $E$ coli.
+
+Model Training. CL-MFAP was finetuned on Minimum Inhibitory Concentration (MIC) data against $E$ . coli (Anti- $E$ . coli Activity) described in Appendix A.2. Obtained from the COADD database, each compound has its associated MIC value, which represents the antibacterial activity, against $E$ . coli. The compounds were binarized as active (1) if $\mathrm{MIC} \leq 8 \, \mathrm{ug/mL}$ and inactive (0) if $\mathrm{MIC} > 8 \, \mathrm{ug/mL}$ .
+
+Virtual Screening. Based on the finetuned CL-MFAP model, virtual screening was performed using the ZINC database. ZINC is a free database containing over 230 million commercially available compounds in ready-to-dock, 3D formats (Irwin et al., 2020). Due to its massive size, we used the ZINCK250k dataset (Basu, 2021), a subset of 250,000 compounds from ZINC. From this, 9389 compounds were identified with predicted activity 1 (predicted to be effective at inhibiting $E.$ coli) with $100\%$ probability and were chosen for further property testing.
+
+Pharmacokinetic and ADMET Property Predictions. For the 9389 compounds identified via virtual screening, their pharmacokinetic and ADMET (Absorption, Distribution, Metabolism, Excretion, and Toxicity) properties were predicted using ADMET-SAR (Yang et al., 2018). These properties allow us to identify compounds that have necessary molecular properties and are most likely to perform well as antibiotics. From this, we filtered to only include compounds that follow the Lipinski Rule of 5 (molecular weight $\leq 500$ Da, $\log \mathrm{P} \leq 5$ , number of hydrogen bond acceptors
+
+$\leq 10$ , and number of hydrogen bond donors $\leq 5$ with a maximum of 1 violation. In addition, their topological surface area had to be between $20 - 130\mathring{A}^2$ and their aqueous solubility range had to be between -1 and -5. As a result, 7358 compounds remained. Then, an ADMET score was generated for each remaining compound based on 18 properties related to absorption, toxicity, and metabolism. We followed the ADMET-score method proposed by Guan et al. (2018).
+
+Similarity to existing $E$ coli antibiotic compounds. To validate the compounds with predicted anti- $E$ coli activity and ideal pharmacokinetic and ADMET properties, we compared their similarity to existing FDA-approved $E$ coli antibiotic compounds include Levofloxacin (Drago et al., 2001), and Ciprofloxacin (Jakobsen et al., 2020). We first selected the top 1000 compounds with the highest predicted probabilities and ADMET scores and they were split into 4 groups: level 1 (top 1-250 compounds), level 2 (top 251-500 compounds), level 3 (top 501-750 compounds and level 4 (top 751-1000 compounds). For each group, the number of Bemis-Murcko scaffolds and the number of Bernis-Murcko scaffolds per compound were evaluated. As shown in Table A7, the identified compounds show structural diversity, an essential feature in drug discovery to ensure coverage of broad chemical space. Results also show that molecules ranked higher (those with more favorable ADMET properties) have larger diversity than the molecules ranked lower. We also calculated the Tanimoto similarity (also known as Jaccard Index) based on the MACCs and MAP4C fingerprints between the top 1000 selected compounds and known antibiotics, Levofloxacin and Ciprofloxacin. Among these, two candidates were identified to have high MACCs and low MAP4C similarity with existing $E$ coli antibiotic compounds: C22H22ClNO4 (ZINC ID: ZINC20591249) and C25H25ClN4O2 (ZINCID: ZINC8758881). As shown in Table A8, they have high MACCs similarity scores and low MAP4C similarity scores to the existing antibiotics. MACCS keys are well-suited for functional group-based similarity searching, allowing us to identify compounds that share key pharmacophoric features and common medicinal chemistry substructures. MAP4C captures more detailed structural information, such as atom types and bonding patterns, which is more relevant for identifying structural similarities between compounds. The high MACCs similarity scores with low MAP4C similarity scores confirm that our identified compounds possess functional similarity to the existing antibiotics while maintaining structural novelty. This outcome not only validates our approach but also suggests potential candidates for further investigation in antibiotic development.
+
+Table A7: Bemis-Murcko Scaffolds results of top 1000 compounds predicted to be active against Escherichia coli using CL-MAP
+
+
Level
Compounds Included
+(By Ranking)
Number of
+Bemis-Murcko Scaffolds
Number of Bemis-Murcko Scaffolds per Compound
Level 1
1-250
245
0.980
Level 2
251-500
241
0.964
Level 3
501-750
236
0.944
Level 4
751-1000
236
0.944
+
+Table A8: Fingerprint similarity scores of potential Escherichia coli antibiotic compounds with existing Escherichia coli antibiotics
+
+
Compound
MACCs
MAP4C
Levofloxacin
Ciprofloxacin
Levofloxacin
Ciprofloxacin
C22H22CINO4
0.739
0.696
0.030
0.032
C25H25CIN4O2
0.716
0.623
0.023
0.018
+
+# REFERENCES
+
+Victor Basu. Zinc250k dataset, 2021. URL https://kaggle.com/datasets/basu369victor/zinc250k.
+Mei-Ling Chen, Vinod Shah, Ravi Patnaik, William Adams, Ajaz Hussain, David Conner, Mehul Mehta, Henry Malinowski, James Lazor, and Shiew-Mei Huang. Bioavailability and bioequivalence: an fda regulatory overview. Pharmaceutical Research, 18(12):1645-1650, 2001. doi: 10.1023/a:1013319408893.
+Mathilde R. Desselle, Ruth Neale, Karl A. Hansford, Johannes Zuegg, Alysha G. Elliott, Matthew A. Cooper, and Mark A. Blaskovich. Institutional profile: Community for open antimicrobial drug discovery - crowdsourcing new antibiotics and antifungals. *Future Science OA*, 3(2):FSO171, 2017. doi: 10.4155/fsoa-2016-0093.
+L. Drago, E. De Vecchi, B. Mombelli, L. Nicola, M. Valli, and M. R. Gismondo. Activity of levofloxacin and ciprofloxacin against urinary pathogens. Journal of Antimicrobial Chemotherapy, 48(1):37-45, 2001. doi: 10.1093/jac/48.1.37.
+Anna Gaulton, Louisa J. Bellis, A. Patricia Bento, Jon Chambers, Mark Davies, Anne Hersey, Yvonne Light, Shaun McGlinchey, David Michalovich, Bissan Al-Lazikani, and John P. Overington. Chembl: a large-scale bioactivity database for drug discovery. *Nucleic Acids Research*, 40:D1100-D1107, 2011. doi: 10.1093/nar/gkr777.
+Longfei Guan, Hongbin Yang, Yingchun Cai, Lixia Sun, Peiwen Di, Weihua Li, Guixia Liu, and Yun Tang. ADMET-score - a comprehensive scoring function for evaluation of chemical drug-likeness. MedChemComm, 10(1):148-157, 2018. doi: 10.1039/c8md00472b.
+Kexin Huang, Tianfan Fu, Wenhao Gao, Yue Zhao, Yusuf Roohani, Jure Leskovec, Connor W. Coley, Cao Xiao, Jimeng Sun, and Marinka Zitnik. Therapeutics data commons: Machine learning datasets and tasks for drug discovery and development. Proceedings of Neural Information Processing Systems, NeurIPS Datasets and Benchmarks, 2021.
+John J. Irwin, Ling Tang, Jared Young, Chinzorig Dandarchuluun, Benjamin R. Wong, Munkhzul Khurelbaatar, Yurii S. Moroz, James Mayfield, and Roger A. Sayle. Zinc20—a free ultralarge-scale chemical database for ligand discovery. Journal of Chemical Information and Modeling, 2020. doi: 10.1021/acs.jcim.0c00675.
+Lotte Jakobsen, Carina Vingsbro Lundberg, and Niels Frimodt-Møller. Ciprofloxacin pharmacokinetics/pharmacodynamics against susceptible and low-level resistant escherichia coli isolates in an experimental ascending urinary tract infection model in mice. Antimicrobial Agents and Chemotherapy, 65(1), 2020. doi: 10.1128/aac.01804-20.
+Chang-Ying Ma, Sheng-Yong Yang, Hui Zhang, Ming-Li Xiang, Qi Huang, and Yu-Quan Wei. Prediction models of human plasma protein binding rate and oral bioavailability derived by using ga-cg-svm method. Journal of Pharmaceutical and Biomedical Analysis, 47(4):677-682, 2008. doi: 10.1016/j.jpba.2008.03.023.
+Margarita Martinez-Medina and Librado Jesus Garcia-Gil. Escherichia coli in chronic inflammatory bowel diseases: An update on adherent invasive escherichia coli pathogenicity. *World Journal of Gastrointestinal Pathophysiology*, 5(3):213-227, 2014. doi: 10.4291/wjgp.v5.i3.213.
+Matthew Mueller and Christopher R. Tainer. Escherichia coli Infection. StatPearls Publishing, Treasure Island (FL), 2024.
+Tatsuya Niwa, Bei-Wen Ying, Katsuyo Saito, WenZhen Jin, Shoji Takada, Takuya Ueda, and Hideki Taguchi. Bimodal protein solubility distribution revealed by an aggregation analysis of the entire ensemble of escherichia coli proteins. Proceedings of the National Academy of Sciences, 106(11): 4201-4206, 2009. doi: 10.1073/pnas.0811922106.
+Vishal Siramshetty, Jordan Williams, c-Trung Nguyn, Jorge Neyra, Noel Southall, Ewy Mathe, Xin Xu, and Pranav Shah. Validating adme qsr models using marketed drugs. SLAS DISCOVERY: Advancing the Science of Drug Discovery, 26(10):1326-1336, 2021. doi: 10.1177/24725552211017520.
+
+Zhenqin Wu, Bharath Ramsundar, Evan N. Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S. Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chem. Sci., 9(2):513-530, 2018. doi: 10.1039/C7SC02664A.
+Hongbin Yang, Chaofeng Lou, Lixia Sun, Jie Li, Yingchun Cai, Zhuang Wang, Weihua Li, Guixia Liu, and Yun Tang. admetSAR 2.0: web-service for prediction and optimization of chemical AD-MET properties. Bioinformatics, 35(6):1067-1069, 2018. doi: 10.1093/bioinformatics/bty707.
+Ziqiao Zhang, Yatao Bian, Ailin Xie, Pengju Han, and Shuigeng Zhou. Can pretrained models really learn better molecular representations for AI-aided drug discovery? Journal of Chemical Information and Modeling, 64(7):2921-2930, 2024. doi: 10.1021/acs.jcim.3c01707.
\ No newline at end of file
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/images.zip b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..78bfc275662242ea74759cdf9bc9ebbcc87642d0
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6c83576b4674bbb399b02bc3d5dc46991e9580dcbbfdd069f68e0b7fad38f9e
+size 762169
diff --git a/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/layout.json b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..8a20188a00178e30bb9f8c63e664b9ef11c88cac
--- /dev/null
+++ b/ICLR/2025/CL-MFAP_ A Contrastive Learning-Based Multimodal Foundation Model for Molecular Property Prediction and Antibiotic Screening/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:92d364cc70dea710045abf2cf3462a6e9c4f94661cc7edcb2b2d836249bfe892
+size 516353
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_content_list.json b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..94976bc193088ee37ba0d99d2d8b50e6ee21f126
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:aa955767b658b4f33634d97db6d56385bc80e17dd3bdd6ac64eb88224c33b903
+size 159858
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_model.json b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..f174e2148346d55e03f21733e083f3b7e4b29781
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:63c51ab2efb57e18a16921ae7a7b12f6f3d67d0fa68f7a1c916ea82d3d1a7b64
+size 196521
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_origin.pdf b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..d8de606760f8ef3d938adec589efef6bd0ec62ce
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/8342b2b3-641d-48fe-9a20-731b294031f1_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ffe800d01009e0eb360cae687cfd7d1daaea0907a90dfb052050f394c5eb0b2
+size 9531587
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/full.md b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..64ad29fe09ccba2deae39977f76aaf95ec27fa0d
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/full.md
@@ -0,0 +1,690 @@
+# CLDYB: TOWARDS DYNAMIC BENCHMARKING FOR CONTINUAL LEARNING WITH PRE-TRAINED MODELS
+
+Shengzhuang Chen $^{1}$ , Yikai Liao $^{2}$ , Xiaoxiao Sun $^{2,3}$ , Kede Ma $^{1,*}$ , Ying Wei $^{4,*}$
+
+$^{1}$ City University of Hong Kong $^{2}$ Nanyang Technological University
+
+$^{3}$ Australian National University $^{4}$ Zhejiang University
+
+shengzhuang.chen@my.cityu.edu.hk
+
+kede.ma@cityu.edu.hk
+
+ying.wei@zju.edu.cn
+
+# ABSTRACT
+
+The advent of the foundation model era has sparked significant research interest in leveraging pre-trained representations for continual learning (CL), yielding a series of top-performing CL methods on standard evaluation benchmarks. Nonetheless, there are growing concerns regarding potential data contamination during the pre-training stage. Furthermore, standard evaluation benchmarks, which are typically static, fail to capture the complexities of real-world CL scenarios, resulting in saturated performance. To address these issues, we describe CL on dynamic benchmarks (CLDyB), a general computational framework based on Markov decision processes for evaluating CL methods reliably. CLDyB dynamically identifies inherently difficult and algorithm-dependent tasks for the given CL methods, and determines challenging task orders using Monte Carlo tree search. Leveraging CLDyB, we first conduct a joint evaluation of multiple state-of-the-art CL methods, leading to a set of commonly challenging and generalizable task sequences where existing CL methods tend to perform poorly. We then conduct separate evaluations of individual CL methods using CLDyB, discovering their respective strengths and weaknesses. The source code and generated task sequences are publicly accessible at https://github.com/szc12153/CLDyB.
+
+# 1 INTRODUCTION
+
+The field of machine learning is undergoing a paradigm shift driven by the emergence of foundation models—large-scale neural networks pre-trained on massive datasets—that demonstrate remarkable adaptability across a wide range of downstream tasks. Within this transformative landscape, continual learning (CL), a computational methodology for incrementally updating models while retaining prior knowledge (Ring, 1997), faces both unprecedented opportunities and critical challenges. Opportunities arise from the synergistic relationship between CL and foundation models. On one hand, foundation models stand to gain from CL techniques by continually adapting to evolving data distributions without catastrophic forgetting. On the other hand, CL methods can leverage the general-purpose and robust representations embedded within foundation models as powerful initializations, potentially accelerating convergence and improving performance on sequential tasks. Challenges, however, primarily stem from the inadequacy of conventional CL benchmarks (Rebuffi et al., 2016; Hendrycks et al., 2020) in providing reliable evaluations of CL methods with foundation models due to two critical limitations.
+
+The first is data contamination. The exponential growth in the volume of pre-training data for foundational models elevates the risk of prior exposure to downstream CL tasks. This has precipitated performance saturation in current benchmarks, diminishing their utility of comparing CL methods through marginal performance gains. More fundamentally, this overlap in data distributions calls into question whether recent progress in CL stems from genuine algorithmic developments or merely reflects the exploitation of more advanced foundation models (Janson et al., 2022; Galashov et al., 2023). The second is performance saturation. Current benchmarks are inherently static,
+
+which assume that tasks are randomly sampled from fixed datasets and presented in an unstructured, sequential order. This is a clear oversimplification of real-world CL scenarios, which involve dynamic and evolving task sequences that are significantly more varied and challenging. Consequently, CL methods may overfit these simplified benchmarks while failing to generalize in more complex and practically demanding environments.
+
+In light of the pressing demand for reliable evaluation protocols, we introduce CL on dynamic benchmarks (CLDyB), a computational benchmarking framework designed to accelerate algorithmic progress in CL with foundation models. Specifically, we formulate dynamic benchmarking for CL as an infinite-state Markov decision process (MDP, Puterman, 1994), where the sequential task selection and model adaptation are optimized over a potentially unbounded time horizon. The state at time step $t$ encapsulates the consolidated model parameters after incremental training on all observed tasks up to $t$ . This parameter vector serves as a compact representation of the model's current knowledge retention (i.e., stability) and its adaptability to new tasks (i.e., plasticity). The action corresponds to selecting a task from a combinatorially large pool of candidate tasks, followed by stochastic optimization of model parameters on the selection task. The reward is defined as the immediate, quantitative measure of how challenging the selected task is given the current state.
+
+Due to the infinite state space, the vast action space, and the high computational cost of reward evaluation, finding an exact solution to this MDP (for instance, via dynamic programming) is computationally intractable. To address this, the proposed CLDyB first reduces the action space using greedy task sampling and clustering. This yields a much smaller feasible set of diverse and difficult tasks that are more likely to challenge the original foundation model (as a way of mitigating data contamination) and the continually updated models at each time step. Second, it employs Monte Carlo tree search (MCTS, Coulom, 2006) with a truncated lookahead to identify the (sub)optimal task at each time step.
+
+We instantiate CLDyB for class-incremental learning in visual recognition (Zhou et al., 2024b)—one of the most prominent challenges in CL research. We first apply CLDyB jointly to a group of representative CL methods, generating a standardized set of challenging and generalizable task sequences that yield reliable and indicative evaluation results. We then perform multi-dimensional assessment of individual CL methods using CLDyB, assessing critical dimensions such as classification accuracy, robustness to task sequence variations, and memory efficiency. This allows us to inspect distinct performance characteristics and vulnerabilities of different CL methods.
+
+In summary, our principal contributions include
+
+- CLDyB: A general computational benchmarking framework designed to inform reliable progress in CL, especially with pre-trained models;
+- Standardized CL benchmark: CLDyB establishes a set of challenging and generalizable task sequences for both current and future CL methods;
+- Multi-dimensional assessment: CLDyB enables comprehensive assessment of individual CL methods across multiple dimensions.
+
+# 2 PRELIMINARIES
+
+Class-incremental learning aims to build a generic classifier capable of recognizing an expanding set of classes by incrementally integrating new knowledge while maintaining performance on previously learned tasks (Zhou et al., 2024b). More formally, a CL algorithm $\mathsf{CL}(\cdot)$ incrementally trains a parameterized classifier $f$ on a sequence of $N$ classification tasks, collectively denoted as $\mathcal{T}_{< N+1} := \{\mathcal{T}_1, \mathcal{T}_2, \ldots, \mathcal{T}_N\}$ . Each task $\mathcal{T}_t$ contains $|\mathcal{T}_t|$ (image, label) pairs $\{\pmb{x}_t^{(j)}, y_t^{(j)}\}_{j=1}^{|\mathcal{T}_t|}$ , divided into training, validation, and test subsets. Note that all tasks have disjoint sets of class labels. At time step $t$ , the classifier is updated according to $f_t = \mathsf{CL}(f_{t-1}, \mathcal{T}_t)$ , where $f_0$ denotes the pretrained foundation model. A fundamental constraint in CL is that data from past or future tasks remain inaccessible while training on the current task. This presents a central challenge: Training $f$ to incrementally recognize new classes (i.e., high plasticity), while mitigating the catastrophic forgetting of previously learned classes (i.e., high stability). To quantify the plasticity and forgetting of $f_t$ , we employ two standard metrics: Average learning accuracy (ALA, Riemer et al. 2018) and
+
+the average forgetting measure (AFM, Chaudhry et al., 2018):
+
+$$
+\operatorname {A L A} \left(f _ {t}, \mathcal {T} _ {< t + 1}\right) = \frac {1}{t} \sum_ {k = 1} ^ {t} \operatorname {A c c} \left(f _ {k}, \mathcal {T} _ {k}\right), \tag {1}
+$$
+
+$$
+\operatorname {A F M} \left(f _ {t}, \mathcal {T} _ {< t + 1}\right) = \frac {1}{t - 1} \sum_ {k = 1} ^ {t - 1} \operatorname {A c c} \left(f _ {k}, \mathcal {T} _ {k}\right) - \operatorname {A c c} \left(f _ {t}, \mathcal {T} _ {k}\right). \tag {2}
+$$
+
+$\mathrm{Acc}(f,\mathcal{T})$ represents the empirical classification accuracy of classifier $f$ on the test split of task $\mathcal{T}$ . Assuming there are $M$ CL methods, each associated with its respective parameterized classifier at time step $t$ , denoted as $\{\mathrm{CL}^{(i)}\}_{i = 1}^{M}$ and $\mathcal{F}_t\coloneqq \{f_t^{(i)}\}_{i = 1}^M$ , we compute the ALA and AFM scores by further averaging over these $M$ models, i.e., $\mathrm{ALA}(\mathcal{F}_t,\mathcal{T}_{< t + 1}) = \frac{1}{M}\sum_{i = 1}^{M}\mathrm{ALA}(f_t^{(i)},\mathcal{T}_{< t + 1})$ and $\mathrm{AFM}(\mathcal{F}_t,\mathcal{T}_{< t + 1}) = \frac{1}{M}\sum_{i = 1}^{M}\mathrm{AFM}(f_t^{(i)},\mathcal{T}_{< t + 1})$ .
+
+# 3 PROPOSED FRAMEWORK: CLDYB
+
+In this section, we first give the general problem formulation of dynamic benchmarking for CL, and then introduce the proposed CLDyB as a specific instance.
+
+# 3.1 PROBLEM FORMULATION
+
+Our core idea is to sequentially construct algorithm-dependent task sequences that consistently challenge current CL methods. Mathematically, this sequential task construction can be formulated as an infinite-state MDP $(S, A, R)$ , with a potentially unbounded time horizon (i.e., the task length is unknown or $N \to \infty$ ). At time step $t$ , the observable state comprises the set of $M$ CL models $\mathcal{F}_{t-1} \in S$ , each having been sequentially trained on a common sequence of selected tasks up to time step $t$ . We assume a policy $\mu_t : S \mapsto A$ that maps the current state to an action, which involves selecting a specific task $\mathcal{T}_t$ from a feasible set of tasks (i.e., the action space $\mathcal{A}_t$ ). After that, a probabilistic state transition is induced from $\mathcal{F}_{t-1}$ to $\mathcal{F}_t$ through the stochastic optimization of $\mathcal{F}_{t-1}$ using their respective CL methods on the selected task: $f_t^{(i)} = \mathrm{CL}^{(i)}(f_{t-1}^{(i)}, \mathcal{T}_t)$ , for $i \in \{1, 2, \ldots, M\}$ . This transition incurs an immediate reward:
+
+$$
+R \left(\mathcal {F} _ {t}, \mathcal {T} _ {< t + 1}\right) = \operatorname {A F M} \left(\mathcal {F} _ {t}, \mathcal {T} _ {< t + 1}\right) - \operatorname {A L A} \left(\mathcal {F} _ {t}, \mathcal {T} _ {< t + 1}\right), \tag {3}
+$$
+
+which encourages forgetting while inhibiting plasticity, thereby facilitating the identification of challenging tasks to mitigate data contamination (Yeom et al., 2017). Consequently, our objective translates to finding the optimal policies $\pi^{\star} = \{\mu_t^\star (\mathcal{F}_{t - 1})\}_{t = 1}^N$ , that maximize the cumulative rewards:
+
+$$
+\pi^ {\star} = \underset {\pi} {\arg \max } \underbrace {\lim _ {N \rightarrow \infty} \sum_ {t = 1} ^ {N} \alpha^ {t - 1} R \left(\mathcal {F} _ {t - 1} , \mu_ {t} \left(\mathcal {F} _ {t - 1}\right)\right)} _ {J _ {\pi} \left(\mathcal {F} _ {0}\right)}, \tag {4}
+$$
+
+where $\alpha \in (0,1]$ is a discount factor, $\mathcal{F}_0 = \{f_0^{(i)}\}_{i = 1}^M$ , and $J_{\pi}(\mathcal{F}_0)$ is the initial state value function.
+
+Solving Problem (4) to obtain an exact solution presents two primary computational challenges. First, the solver shall efficiently navigate the vast and discrete set of feasible tasks (i.e., $\mathcal{A}_t$ ) at each time step, which grows combinatorially with problem complexity (e.g., the total number of classes). Second, the solver shall accurately and efficiently evaluate the value function (i.e., $J_{\pi}(\mathcal{F}_0)$ ) to facilitate challenging task identification. Nevertheless, the complexity of this evaluation can vary significantly based on the chosen continual learning (CL) method and task properties, such as the number of classes per task. Moreover, the computation may become intractable due to the infinite state space and potentially unbounded time horizon. In the subsequent subsections, we describe our proposed solution, CLDyB, which effectively addresses these challenges through two key strategies: 1) Greedy task sampling and clustering to construct a much smaller candidate task set, and 2) MCTS to identify the (sub)optimal task. Fig. 1 illustrates the system diagram of CLDyB.
+
+
+Figure 1: System diagram of the proposed CLDyB for dynamically constructing task sequences that challenge current CL methods. At time step $t$ , CLDyB first performs candidate task set construction by greedy task sampling (see Eqn. (5)) and functional task clustering. This results in a reduced and clustered action space $\mathcal{A}_t$ , facilitating task evaluation. It then performs optimal task identification by maximizing the estimated current state value function (see Eqn. (7)) using MCTS, which consists of four steps: 1) Expansion, 2) rollout simulation, 3) backpropagation, and 4) selection. The pseudocode for CLDyB can be found in Algorithm 3 of the Appendix.
+
+# 3.2 CANDIDATE TASK SET CONSTRUCTION
+
+Given a data pool $\mathcal{D}_t$ of $C_t$ classes for class-incremental learning at time step $t$ , we define a task $\tilde{\mathcal{T}}_t$ as a subset of images containing $K$ classes, where $K < C_t$ . Consequently, the number of possible tasks in $\mathcal{A}_t$ is given by the binomial coefficient $\binom{C_t}{K}$ , which grows rapidly as $C_t$ increases. This makes an exhaustive search over $\mathcal{A}_t$ infeasible, as each task evaluation often necessitates a full cycle of continual model training, significantly increasing the overall computational cost.
+
+Greedy task sampling. To construct a more compact candidate task set $\tilde{\mathcal{A}}_t$ , we propose a greedy task sampling strategy that leverages the intuition that task difficulty in multi-class classification is inversely correlated to the separability of class pairs in feature space (He et al., 2020). Specifically, we define the sampling probability over a task $\tilde{\mathcal{T}}_t$ to be proportional to the product of its pairwise class potential functions:
+
+$$
+p \left(\tilde {\mathcal {T}} _ {t}\right) \propto \prod_ {u, v \in \{1, \dots , K \}} \Psi \left(\mathcal {C} _ {u}, \mathcal {C} _ {v}\right), \text {w h e r e} \Psi \left(\mathcal {C} _ {u}, \mathcal {C} _ {v}\right) = \frac {1}{M} \sum_ {i = 1} ^ {M} s \left(\operatorname {C o s S i m} \left(\boldsymbol {u} _ {t} ^ {(i)}, \boldsymbol {v} _ {t} ^ {(i)}\right)\right). \tag {5}
+$$
+
+Here, $\mathcal{C}_u$ and $\mathcal{C}_v$ represent the subsets of images belonging to classes $u$ and $v$ , respectively. The prototypes $\pmb{u}_t^{(i)}$ and $\pmb{v}_t^{(i)}$ are computed by the mean feature representations of these subsets using $f_{t - 1}^{(i)}$ . $\mathrm{CosSim}(\cdot ,\cdot)$ computes the cosine similarity between two feature representations, and $s(\cdot)$ is a linear rescaling function that maps the $M$ similarity scores to the range [0, 1], where the maximum value is set to 1 and the minimum to 0. This additional rescaling ensures that the computed pairwise potentials are well-suited for probability computation (i.e., preventing negative values). By assigning higher sampling probabilities to tasks with larger products of pairwise potentials, we prioritize challenging tasks, for which the classifiers $\mathcal{F}_{t - 1}$ struggle to discriminate between the included classes in their respective feature spaces. This will force $\mathcal{F}_{t - 1}$ to focus on refining their feature
+
+representations for more difficult cases, thereby improving their capacity to handle more complex class relationships.
+
+Drawing inspiration from (Kohli et al., 2013), we introduce a greedy sampler that sequentially selects $K$ classes to form a task $\tilde{\mathcal{T}}_t$ . Initially, to ensure task diversity, the first class is uniformly sampled from all feasible classes in the data pool $\mathcal{D}_t$ . Subsequently, during the $k$ -th iteration, the class $u_k^\star$ is chosen to maximize the product of pairwise potentials with respect to the previously selected $k - 1$ classes in $\mathcal{V}_{k - 1}^\star$ :
+
+$$
+u _ {k} ^ {\star} = \arg \max _ {u} \prod_ {v \in \mathcal {V} _ {k - 1} ^ {\star}} \Psi \left(\mathcal {C} _ {u}, \mathcal {C} _ {v}\right), \text {f o r} k \in \{2, \dots , K \}, \tag {6}
+$$
+
+and we incorporate $u_{k}^{\star}$ into $\mathcal{V}_{k-1}^{\star}$ to form $\mathcal{V}_k^\star$ . This greedy sampling iterates until $K$ distinct classes are identified. The entire procedure is further repeated multiple times to generate the candidate task set $\tilde{\mathcal{A}}_t$ . A detailed description of our sampler is provided in Algorithm 1.
+
+Functional task clustering. The sampled tasks in $\tilde{\mathcal{A}}_t$ are likely to exhibit a skewed distribution with respect to their enabled functional skills of classifiers. This is because the $M$ classifiers naturally form distinct clusters based on their functional skills. Consequently, uniform task sampling from $\tilde{\mathcal{A}}_t$ disproportionately encourages selecting tasks from the cluster characterized by the dominant functional skills, thereby limiting exposure to tasks that would challenge classifiers in diverse ways. To enhance task diversity in functional space and promote more efficient task evaluation, we propose additionally clustering tasks in $\tilde{\mathcal{A}}_t$ based on their induced functional skills, followed by ancestral sampling to populate a further condensed candidate task set $\bar{\mathcal{A}}_t$ .
+
+Specifically, for each task, we compute an $M$ -dimensional feature vector by evaluating the average negative log-likelihood of predictions made by $M$ $k$ -nearest neighbors ( $k$ -NN) classifiers with feature representations from $\mathcal{F}_{t-1}$ . We partition tasks into functionally coherent clusters using the $k$ -means algorithm, operating on the derived task representations. The final condensed candidate task set $\bar{\mathcal{A}}_t$ is populated through ancestral sampling: First uniformly selecting a cluster and then randomly sampling a task from the chosen cluster. A detailed description is provided in Algorithm 2.
+
+# 3.3 OPTIMAL TASK IDENTIFICATION
+
+Despite substantial action space reduction via greedy task sampling and clustering, optimizing the initial state value function defined in Eqn. (4) remains computationally challenging. This difficulty arises from the combinatorial complexity of task ordering and the long-term interdependencies between task selection and model adaptation. To address these, we employ MCTS (Coulom, 2006), a widely adopted approach for online sequential decision-making (Puterman, 1994), particularly well-suited to our CL setup. Specifically, MCTS approximates the current state value $J_{\pi}(\mathcal{F}_t)$ within a search tree, comprising four steps. 1) Rollout simulation: Recursive tree growing via MC simulations until a predefined computational budget is exhausted; 2) Backpropagation: Update values and visit counts for all nodes in the visited path; 3) Selection: Choose the task $\mathcal{T}_t$ that leads to the state with the maximum estimated immediate value; 4) Expansion: Train all classifiers continually on the selected task $\mathcal{T}_t$ and transit from the current state $\mathcal{F}_{t-1}$ to the next state $\mathcal{F}_t$ .
+
+Unfortunately, in open-ended CL environments, MC simulations are resource-intensive due to 1) the necessity of $(N - t)$ -step rollouts to evaluate the value function $J_{\pi}(\mathcal{F}_t)$ , involving continual model training across tasks at all these steps, and 2) the indefinite task length $N$ . We propose approximating the value function using a truncated horizon approach, leading to
+
+$$
+J _ {\pi} \left(\mathrm {C L} \left(\mathcal {F} _ {t - 1}, \mathcal {T} _ {t}\right)\right) \approx \max _ {\tilde {\mathcal {T}} _ {t} \in \mathcal {A} _ {t}} R \left(\mathcal {F} _ {t - 1}, \tilde {\mathcal {T}} _ {t}\right) + \sum_ {k = 0} ^ {L - 1} R \left(\mathrm {C L} \left(\mathcal {F} _ {t - 1 + k}, \tilde {\mathcal {T}} _ {t + k}\right), \tilde {\mathcal {T}} _ {t + k + 1}\right), \tag {7}
+$$
+
+where $\mu_t = \mathcal{T}_t \in \pi$ represents the optimized policy at time step $t$ . The terms $\widetilde{\mathcal{T}}_{t+k}$ , for $k \in \{1, \dots, L\}$ are sampled uniformly from their respective feasible action spaces, and are excluded from the set of optimization variables (i.e., they are not included in the arg max operation). The hyperparameter $L$ controls the trade-off between computational tractability and approximation fidelity. For simplicity, we set $L = 1$ and defer the adoption of advanced value function approximation methods, such as value network learning (Silver et al., 2016), to future research.
+
+# 4 RELATED WORK
+
+Class-incremental learning. Recent advances in CL with foundation models reveal two key advantages: inherent resistance to catastrophic forgetting and strong generalization to downstream tasks (Ostapenko et al., 2022; Zhang et al., 2023), rendering it a rapidly evolving research frontier. A prominent technical direction is to integrate CL methods with parameter-efficient fine-tuning strategies, yielding representative methods like orthogonal projection (Liang & Li, 2024; Qiao et al., 2024), model expansion (Wang et al., 2022; Smith et al., 2022; Wang et al., 2023a), and model ensembling (Gao et al., 2023; Zhou et al., 2024a). Alternatively, representation-based methods focus on maintaining stable feature representations within foundation models. This is often achieved by freezing the backbone after the initial task learning (Zhou et al., 2023a) or employing low learning rates (Zhang et al., 2023). Non-parametric classifiers are then progressively constructed, which can be enhanced by random projections (McDonnell et al., 2023) or the inclusion of intermediate representations (Ahrens et al., 2023). A more detailed discussion of conventional CL methods is deferred to Appendix B.1.
+
+Dynamic benchmarking. The rapid advancement of foundation models, particularly large language models (LLMs), has necessitated a re-evaluation of traditional static benchmarks, often inadequate in providing reliable assessment due to issues like data contamination (Shi et al., 2023; Zhou et al., 2023b) and oversimplification of real-world testing scenarios (Kiela et al., 2021; McIntosh et al., 2024). Dynabench (Kiela et al., 2021) and DynaBoard (Ma et al., 2021) propose to continuously evolve test sets with crowd-sourced human labels to enable more accurate LLM evaluations. Recognizing the substantial costs involved in human labeling, recent efforts have been made to automate the process of dynamic test set generation, leveraging directed acyclic graphs (Zhu et al., 2023) and multiple agents (Wang et al., 2024). Additionally, dynamic programming has been used for test set selection, enhancing the scalability of evaluating a large number of models at ten thousand scales (Prabhu et al., 2024). The proposed CLDyB represents one of the initial endeavors to establish dynamic benchmarking protocols for CL methods, particularly those with foundation models.
+
+# 5 EXPERIMENTS
+
+In this section, we first present the experimental setups, and then evaluate nine state-of-the-art CL methods both jointly and separately using CLDyB, followed by insightful analysis.
+
+# 5.1 EXPERIMENTAL SETUPS
+
+Data pool. To build the playground for CLDyB, we assemble a total of 26 datasets, consisting of 2,505,185 images across 2,403 categories. These datasets are categorized into two main groups: photographic image datasets for the main experiments and AI-generated image datasets for additional analysis. The included classes cover a broad spectrum of domains, levels of granularity, cultural contexts, and time periods. Details are provided in Appendix A.
+
+CL methods. We select a total of nine CL methods for evaluation based on two main criteria: 1) Competitive performance that prioritizes recently published methods, achieving state-of-the-art results on static CL benchmarks, and 2) sufficient representativeness that ensures the selected methods encompass a wide range of design philosophies.
+
+Implementation details. All experiments adhere to the standard class-incremental learning protocols, with results evaluated using three widely adopted metrics: 1) Average accuracy (Acc), 2) average retention $^{1}$ (AR, Chaudhry et al. 2018), and 3) ALA (Riemer et al., 2018). Higher values indicate better CL performance but also suggest that the benchmark presents a lower level of difficulty for CL methods being evaluated. During training, hyper-parameters for each method are selected using the validation sets of the first three tasks, following Chaudhry et al. (2018). Each task in the CLDyB sequences is a 20-category classification problem (i.e., $K = 20$ ) with a sequence length of ten (i.e., $N = 10$ ). All CL methods employ ViT-Base-Sup21K (Dosovitskiy et al., 2021) as the foundation model. All main experiments are repeated across three random runs, and mean results are reported. To ensure a fair comparison of task selection strategies, the first task is randomly chosen
+
+Table 1: Final average accuracy (%) of CL methods on various benchmarks. “‡” indicates results directly copied from the respective papers, while “*” highlights statistically significant results. AFEC and CLSER are excluded from comparison here due to differences in backbone architectures.
+
+
Method
CIFAR-100‡
ImageNet-R‡
CLDyB (Ours)
Held-out
ER (Rolnick et al., 2018)
67.9
55.1
54.8
79.9
DualPrompt (Wang et al., 2022)
86.5
68.1
41.9
70.8
LAE (Gao et al., 2023)
85.6
72.7
48.1
71.1
HiDe-Prompt (Wang et al., 2023a)
92.6
75.1
62.5
84.9
SLCA (Zhang et al., 2023)
91.5
77.0
56.2
80.3
RanPAC (McDonnell et al., 2023)
92.2
78.1
56.9
81.0
PGP (Qiao et al., 2024)
86.9
69.3
44.0
68.7
SRCC (per column & held-out)
0.643
0.643
0.964*
N/A
KRCC (per column & held-out)
0.429
0.429
0.905*
N/A
+
+and fixed, maintaining consistent initial conditions. Additional details on the selected CL methods can be found in Appendix B.2.
+
+# 5.2 MAIN RESULTS
+
+CLDyB identifies commonly challenging task sequences. We first conduct a joint evaluation of five CL methods, i.e., AFEC (Wang et al., 2021), CLSER (Arani et al., 2022), HiDe-Prompt (Wang et al., 2023a), RanPAC (McDonnell et al., 2023), and PGP (Qiao et al., 2024) using CLDyB, while reserving the remaining four CL methods, i.e., ER (Rolnick et al., 2018), DualPrompt (Wang et al., 2022), LAE (Gao et al., 2023), and SLCA (Zhang et al., 2023), for independent testing. The results, presented in Figs. 2 and 8, demonstrate that the CLDyB sequences pose significant challenges not only for the five CL methods subjected to CLDyB but also for the four CL methods that were not exposed to it. Notably, compared to random task sequences drawn from the data pool, performance on the CLDyB sequences results in a $26\%$ reduction in Final Acc and a $9\%$ reduction in Final AR across the evaluated methods, as shown in Fig 6. These cross-validation results underscore the generalizability of the CLDyB sequences, manifesting themselves as a strong CL benchmark.
+
+
+Figure 2: Joint evaluation of the five CL methods (represented by solid lines) using CLDyB with generalization to the other four CL methods (represented by dashed lines).
+
+We present some qualitative visualizations of the CLDyB sequences in Figs. 14 and 18, illustrating that the chosen tasks, originated from various datasets, form sequences in which similar tasks are interspersed with dissimilar ones. We believe this pattern closely resembles real-world CL scenarios with inherent task diversity.
+
+CLDyB sequences produce reliable evaluation results. We compare the performance of CL methods across two static CL benchmarks (Krizhevsky, 2009; Hendrycks et al., 2020), CLDyB sequences, and a held-out set—the latter comprising randomly ordered tasks derived from datasets that are excluded from all prior benchmarks. Spearman's rank correlation coefficient (SRCC) and Kendall's rank correlation coefficient (KRCC) are used to assess alignment between each benchmark and the held-out set. From the results in Table 1, we find that the CLDyB sequences achieve the highest correlations, offering a more accurate performance reflection in unseen CL scenarios compared to static benchmarks. Such strong alignments also highlight that CLDyB holds great promise to bridge algorithmic advancements in CL research to real-world applications.
+
+CLDyB enables multi-dimensional assessment of individual CL methods. By applying CLDyB separately to each CL method, we seek to measure its worst-case performance, as formalized
+
+in Eqn. (4). Accordingly, we define the Robustness of a CL method as the average Final Acc across multiple CLDyB sequences paired with that method. Additionally, we record the Memory Efficiency $^2$ in MB, alongside the three standard metrics introduced in Sec. 5.1.
+
+From the results in Fig. 3, we have several interesting observations. First, methods incorporating replay mechanisms, such as CLSER (Arani et al., 2022), HiDe-Prompt (Wang et al., 2023a), SLCA (Zhang et al., 2023), and RanPAC (McDonnell et al., 2023), generally exhibit greater resistance to forgetting, resulting in higher Final Acc. On the downside, these methods tend to be less memory efficient. Second, exemplar-replay methods, specifically ER (Rolnick et al., 2018) and CLSER, demonstrate significantly better model plasticity, whereas parameter-efficient fine-tuning methods like HiDe-Prompt and LAE (Gao et al., 2023) show limited Final ALA, indicating weaker forward transfer capabilities—an aspect often neglected in current CL research. Third, more advanced methods typically outperform their predecessors in terms of performance, but they are not always more robust (e.g., PGP versus DualPrompt and CLSER versus ER). Last, we highlight that while the simple ER does not achieve satisfactory Final Acc and AR, it remains competitive in terms of Final ALA, Robustness, and Memory Efficiency, making it an overall top-ranked CL method.
+
+
+Figure 3: Multi-dimensional assessment of CL methods using CLDyB, with higher values on the axes representing better performance. The comparison highlights their respective strengths and weaknesses, especially how they handle the trade-offs across different dimensions.
+
+# 5.3 FURTHER ANALYSIS
+
+CLDyB identifies individually challenging task sequences. In Fig. 4, we visualize the CLDyB sequences for each individual CL method by examining: (a) The Acc trajectories on the commonly challenging CLDyB sequences, and (b) the feature similarity between the selected two tasks, i.e., the average cosine similarity between all possible pairs of image features. This similarity is computed for every task pair within each CLDyB sequence, giving rise to a 2D task-to-task similarity matrix. Each matrix is then flattened into a vector, forming rows of the dendrogram in Fig. 4(b). The clustering patterns in the dendrograms indicate common characteristics shared by certain CL methods. For example, both ER and CLSER rely on exemplar replay, while SLCA and HiDe-Prompt use classifier calibration.
+
+A closer inspection of Fig. 4(b) reveals that the individually challenging CLDyB sequences offer crucial insights into the limitations of different CL methods. Specifically, LAE and AFEC show increased sensitivity to task sequences with significant distribution shifts, as CLDyB tends to select dissimilar tasks for both methods. We hypothesize that this vulnerability may stem from the use of moving average weight ensembles in LAE and parameter regularization in AFEC, both of which are less effective in handling large model updates required for certain CL settings. In contrast, CLSER and ER are more susceptible to sequences of similar tasks, which is consistent with prior theoretical findings, indicating a correlation between task similarity and forgetting (Lee et al., 2021).
+
+Data pool of CLDyB is expandable over time with AI-generated image data. The data pool of CLDyB is not intended to remain static. We illustrate this concept by showing how CLDyB can offer valuable feedback for selecting new datasets, enabling the data pool to expand dynamically over time. This continuous evolution helps mitigate the performance saturation issue commonly seen in static benchmarks.
+
+We initially employ CLDyB to evaluate CL methods over three tasks. Based on the analysis of the tree-search history, we observe that tasks related to animals consistently yield higher rewards compared to other tasks with different object categories. This suggests that these animal-related tasks may present particular challenges for the selected CL methods. In response, we employ generative diffusion models, in particular SDXL (Podell et al., 2024), to efficiently expand the data pool,
+
+
+Figure 4: Dendrograms of CL methods. (a) Acc trajectories on the commonly challenging CLDyB sequences. (b) Stack of flattened versions of the 2D task-to-task similarity matrices obtained on individually challenging CLDyB sequences. The task similarity values are normalized by $s(\cdot)$ in Eqn. (5) to the range [0, 1] for improved visualization. Both dendrograms exhibit noticeable consistency in their hierarchical structures, reflecting commonality in CL methods.
+
+
+
+adding generated images of novel animal categories. In Fig. 5, we compare the performance of the CL methods on upcoming tasks selected by CLDyB using both the original and the augmented data pools.
+
+We find that the AI-generated classes are indeed frequently selected, indicating their prominence in the CLDyB sequences (see Fig. 21). This leads to a noticeable drop in Final AA and AR, which verifies the added difficulty of the augmented data pool relative to the original, and confirms that our data pool is readily expandable to resolve performance saturation. Additionally, the tasks depicted in Fig. 21 demonstrate variations in image styles, such as shifts from photographic images to sketches and paintings, pointing out potential difficulty faced by current CL methods in adapting to stylistic changes over time. In particular, rehearsal-free methods like AFEC (Wang et al., 2021) and PGP (Qiao et al., 2024) exhibit more substantial performance degradations when encountering task sequences with style transitions.
+
+
+Figure 5: Performance comparison of CL methods on upcoming tasks selected by CLDyB from the original and the augmented data pools. Additional diffusion-generated images are added to the data pool at time step $t = 2$ (denoted by the dashed line).
+
+# 5.4 ABLATION STUDIES
+
+To isolate the contributions of individual components in CLDyB, we systematically remove each of them, resulting in four degenerates: 1) Sampling tasks randomly (as a performance lower bound), 2) replacing greedy task sampling with uniform sampling from the classes within each dataset in the data pool for candidate task set construction, 3) disabling functional task clustering, and 4) substituting MCTS for selecting the next task with a method that consistently chooses tasks most similar in representation to previous tasks, as suggested in (Bell & Lawrence, 2022).
+
+In Fig. 6, it is evident that the full version of CLDyB outperforms all degenerates in identifying more challenging task sequences, which leads to lower ACC and AR, thus validating the necessity of each component. Furthermore, to assess the effectiveness of CLDyB in handling long task sequences, we
+
+
+Figure 6: Average performance comparison of the nine CL methods on the CLDyB sequences and those generated by four CLDyB degenerates.
+
+conduct experiments on an extended sequence consisting of 40 tasks, with results shown in Fig. 9. It is clear that, on average, CL methods consistently underperform on CLDyB sequences compared to random sequences. Finally, Fig. 10 illustrates that CLDyB remains effective in dynamically identifying commonly challenging sequences to combat data contamination and performance saturation using alternative foundation models (i.e., CLIP-ViT-Base (Radford et al., 2021)).
+
+# 6 CONCLUSION AND DISCUSSION
+
+We have introduced CLDyB, a dynamic computational benchmarking framework that systematically identifies challenging and algorithm-dependent task sequences based on MDPs. To make sequential task generation computationally feasible, CLDyB makes two reasonable approximations: action space reduction via greedy task sampling and clustering, and value function approximation via MCTS. By evaluating nine state-of-the-art CL methods, we demonstrated that CLDyB sequences expose critical weaknesses in existing methods while providing reliable evaluations aligned with real-world generalization. CLDyB represents a paradigm shift in evaluating CL methods. By transitioning from static benchmarks to dynamic and algorithm-dependent evaluation protocols, we pave the way for CL methods that genuinely adapt to open-world complexity. We hope that CLDyB and its generated task sequences provide a foundation for developing next-generation CL methods that strike a better balance between stability and plasticity.
+
+While CLDyB represents a significant step towards reliable and realistic CL benchmarking, several promising directions remain for future research. First, one of our primary motivations for CLDyB is the issue of data contamination. However, quantifying data contamination precisely is challenging due to inaccessible pre-training data and the need to assess its overlap with downstream tasks. While heuristic approaches (e.g., task difficulty metrics) offer approximations, they may conflate contamination with other factors influencing difficulty, limiting their reliability. Although empirical studies show that CL performance becomes inflated when pre-training and CL tasks overlap significantly, defining a threshold of contamination beyond which CL evaluations lose validity remains difficult. Addressing this could refine benchmark design and strengthen evaluation protocols for CL methods. Second, the development of self-evolving data pools through human-AI collaboration and generative models presents an important avenue. Although we demonstrated preliminary success using diffusion-generated image data by further exploiting known failure scenarios, a systematic approach is needed to automatically and dynamically expand tasks in the data pool in terms of quality, difficulty, and diversity. Third, the current MCTS-based method, while effective, offers only a coarse approximation of the value function and incurs high computational costs. Hybrid methods that integrate learned value estimators—without the need for computationally expensive continual model adaptation—alongside tree search could improve scalability. Fourth, although our experiments have thus far focused on image recognition, CLDyB is readily extendable to other domains, including video, text, and embodied AI. Last, establishing a community-driven platform for the collaborative evolution of CLDyB-enabled benchmarks is highly desirable. Inspired by Dynabench (Kiela et al., 2021), a web-based interface could facilitate the submission of new datasets to expand the data pool and accommodate new CL models while ensuring backward compatibility for fair and consistent progress tracking.
+
+# ACKNOWLEDGEMENTS
+
+We would like to thank Xuelin Liu for assistance with the plots and diagrams. This work was supported in part by the Hong Kong RGC General Research Fund (11220224), the CityU Applied Research Grant (9667264), and an Industry Gift Fund (9229111).
+
+# REFERENCES
+
+Hongjoon Ahn, Donggyu Lee, Sungmin Cha, and Taesup Moon. Uncertainty-based continual learning with adaptive regularization. ArXiv, abs/1905.11614, 2019.
+Kyra Ahrens, Hans H. Lehmann, Jae Hee Lee, and Stefan Wermter. Read between the layers: Leveraging intra-layer representations for rehearsal-free continual learning with pre-trained models. ArXiv, abs/2312.08888, 2023.
+Rahaf Aljundi, Min Lin, Baptiste Goujaud, and Yoshua Bengio. Gradient based sample selection for online continual learning. In Conference on Neural Information Processing Systems, 2019.
+Zach Aluza. CNFood-241: Chinese Food Dataset, 2024. URL https://www.kaggle.com/datasets/zachaluza/cnfood-241. Accessed: 2024-09-23.
+Elahe Arani, Fahad Sarfraz, and Bahram Zonooz. Learning fast, learning slow: A general continual learning method based on complementary learning system. In International Conference on Learning Representations, 2022.
+Sourav Banerjee. Indian Food Images Dataset, 2023. URL https://www.kaggle.com/datasets/iamsouravbanerjee/indian-food-images-dataset. Accessed: 2024-09-23.
+Sourav Banerjee. Animal Image Dataset: 90 Different Animals, 2024. URL https://www.kaggle.com/datasets/iamsouravbanerjee/animal-image-dataset-90-different-animals. Accessed: 2024-09-23.
+Samuel J. Bell and Neil D. Lawrence. The effect of task ordering in continual learning. *ArXiv*, abs/2205.13323, 2022.
+Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101—Mining discriminative components with random forests. In European Conference on Computer Vision, pp. 446–461, 2014.
+Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and Simone Calderara. Dark experience for general continual learning: A strong, simple baseline. ArXiv, abs/2004.07211, 2020.
+Hyuntak Cha, Jaeho Lee, and Jinwoo Shin. Co $^2$ L: Contrastive continual learning. In IEEE International Conference on Computer Vision, pp. 9496-9505, 2021.
+Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with A-GEM. ArXiv, abs/1812.00420, 2018.
+Gong Cheng, Junwei Han, and Xiaoqiang Lu. Remote sensing image scene classification: Benchmark and state of the art. Proceedings of the IEEE, 105(10):1865-1883, 2017.
+Rémi Coulom. Efficient selectivity and backup operators in Monte Carlo tree search. In International Conference on Computers and Games, pp. 72-83, 2006.
+Li Deng. The MNIST database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141-142, 2012.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021.
+
+Mehrdad Farajtabar, Navid Azizan, Alexander Mott, and Ang Li. Orthogonal gradient descent for continual learning. *ArXiv*, abs/1910.07104, 2019.
+Alexandre Galashov, Jovana Mitrovic, Dhruva Tirumala, Yee Whye Teh, Timothy Nguyen, Arslan Chaudhry, and Razvan Pascanu. Continually learning representations at scale. In Conference on Lifelong Learning Agents, pp. 534-547, 2023.
+Jhair Gallardo, Tyler L. Hayes, and Christopher Kanan. Self-supervised training enhances online continual learning. ArXiv, 2103.14010, 2021.
+Qiankun Gao, Chen Zhao, Yifan Sun, Teng Xi, Gang Zhang, Bernard Ghanem, and Jing Zhang. A unified continual learning framework with general parameter-efficient tuning. In IEEE International Conference on Computer Vision, pp. 11449-11459, 2023.
+Andrei Grigorev. Clothing Dataset Full, 2024. URL https://www.kaggle.com/datasets/agrigorev/clothing-dataset-full. Accessed: 2024-09-23.
+Gunshi Gupta, Karmesh Yadav, and Liam Paull. La-MAML: Look-ahead meta learning for continual learning. In Conference on Neural Information Processing Systems, pp. 11588-11598, 2020.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9726-9735, 2020.
+Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Introducing EuroSAT: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE International Geoscience and Remote Sensing Symposium, pp. 204-207, 2018.
+Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Lixuan Zhu, Samyak Parajuli, Mike Guo, Dawn Xiaodong Song, Jacob Steinhardt, and Justin Gilmer. The many faces of robustness: A critical analysis of out-of-distribution generalization. In IEEE International Conference on Computer Vision, pp. 8320-8329, 2020.
+Muhammad T. Islam. Jute Pest Dataset, 2024. URL https://www.kaggle.com/dsv/8332009. Accessed: 2024-09-23.
+Paul Janson, Wenxuan Zhang, Rahaf Aljundi, and Mohamed Elhoseiny. A simple baseline that questions the use of pretrained-models in continual learning. In Conference on Neural Information Processing Systems Workshop on Distribution Shifts: Connecting Methods and Applications, 2022.
+Khurram Javed and Martha White. Meta-learning representations for continual learning. In Conference on Neural Information Processing Systems, 2019.
+Kaiska. Apparel Dataset, 2024. URL https://www.kaggle.com/datasets/kaiska/ apparel-dataset. Accessed: 2024-09-23.
+Parneet Kaur, Karan Sikka, Weijun Wang, Serge Belongie, and Ajay Divakaran. FoodX-251: A dataset for fine-grained food classification. arXiv preprint arXiv:1907.06167, 2019.
+Douwe Kiela, Max Bartolo, Yixin Nie, Divyansh Kaushik, Atticus Geiger, Zhengxuan Wu, Bertie Vidgen, Grusha Prasad, Amanpreet Singh, Pratik Ringshia, Zhiyi Ma, Tristan Thrush, Sebastian Riedel, Zeerak Talat, Pontus Stenetorp, Robin Jia, Mohit Bansal, Christopher Potts, and Adina Williams. Dynabench: Rethinking benchmarking in NLP. In *Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies*, pp. 4110-4124, 2021.
+James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. Proceedings of the National Academy of Sciences, 114(13):3521-3526, 2017.
+
+Pushmeet Kohli, Anton Osokin, and Stefanie Jegelka. A principled deep random field model for image segmentation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1971-1978, 2013.
+Alex Krizhevsky. Learning Multiple Layers of Features from Tiny Images. Master's Thesis, University of Toronto, 2009.
+Vencer Lanz. Sea Animals Image Dataset, 2024. URL https://www.kaggle.com/datasets/vencerlanz09/sea-animals-image-dataset. Accessed: 2024-09-23.
+Ya Le and Xuan Yang. Tiny ImageNet Dataset, 2015. URL https://paperswithcode.com/dataset/tiny-imagenet. Accessed: 2024-09-23.
+Sebastian Lee, Sebastian Goldt, and Andrew M. Saxe. Continual learning in the teacher-student setup: Impact of task similarity. In International Conference on Machine Learning, pp. 6109-6119, 2021.
+Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(12):2935-2947, 2016.
+Yan-Shuo Liang and Wu-Jun Li. InfLoRA: Interference-free low-rank adaptation for continual learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23638-23647, 2024.
+Weiduo Liao, Ying Wei, Mingchen Jiang, Qingfu Zhang, and Hisao Ishibuchi. Does continual learning meet compositionality? New benchmarks and an evaluation framework. In Conference on Neural Information Processing Systems, pp. 33499-33513, 2023.
+Zhiqiu Lin, Jia Shi, Deepak Pathak, and Deva Ramanan. The CLEAR benchmark: Continual learning on real-world imagery. In Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2021.
+Vincenzo Lomonaco and Davide Maltoni. CORe50: A new dataset and benchmark for continuous object recognition. In Conference on Robot Learning, pp. 17-26, 2017.
+David Lopez-Paz and Marc'Aurelio Ranzato. Gradient episodic memory for continual learning. In Conference on Neural Information Processing Systems, pp. 6470-6479, 2017.
+Zhiyi Ma, Kawin Ethayarajh, Tristan Thrush, Somya Jain, Ledell Wu, Robin Jia, Christopher Potts, Adina Williams, and Douwe Kiela. Dynaboard: An evaluation-as-a-service platform for holistic next-generation benchmarking. In Conference on Neural Information Processing Systems, pp. 10351-10367, 2021.
+Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013.
+Mark D. McDonnell, Dong Gong, Amin Parvaneh, Ehsan Abbasnejad, and Anton van den Hengel. RanPAC: Random projections and pre-trained models for continual learning. In Conference on Neural Information Processing Systems, pp. 12022-12053, 2023.
+Timothy R. McIntosh, Teo Susnjak, Tong Liu, Paul Watters, and Malka N. Halgamuge. Inadequacies of large language model benchmarks in the era of generative artificial intelligence. *ArXiv*, abs/2402.09880, 2024.
+Sanket Vaibhav Mehta, Darshan Patil, Sarath Chandar, and Emma Strubell. An empirical investigation of the role of pre-training in lifelong learning. ArXiv, 2112.09153, 2023.
+Cuong V. Nguyen, Yingzhen Li, Thang D. Bui, and Richard E. Turner. Variational continual learning. In International Conference on Learning Representations, 2018.
+Oleksiy Ostapenko, Timothee Lesort, Pau Rodríguez, Md Rifat Arefin, Arthur Douillard, Irina Rish, and Laurent Charlin. Continual learning with foundation models: An empirical study of latent replay. In Conference on Lifelong Learning Agents, pp. 60-91, 2022.
+
+James Philbin, Ondrej Chum, Michael Isard, Josef Sivic, and Andrew Zisserman. Object retrieval with large vocabularies and fast spatial matching. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1-8, 2007.
+Greg Piosenko. Balls Image Classification, 2024a. URL https://www.kaggle.com/datasets/gpiosenko/balls-image-classification. Accessed: 2024-09-23.
+Greg Piosenko. Sports Classification, 2024b. URL https://www.kaggle.com/datasets/gpiosenko/sports-classification. Accessed: 2024-09-23.
+Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, and Robin Rombach. SDXL: Improving latent diffusion models for high-resolution image synthesis. In International Conference on Learning Representations, 2024.
+Ameya Prabhu, Vishaal Udandarao, Philip H. S. Torr, Matthias Bethge, Adel Bibi, and Samuel Albanie. Lifelong benchmarks: Efficient model evaluation in an era of rapid progress. ArXiv, abs/2402.19472, 2024.
+Martin L. Puterman. Markov Decision Processes: Discrete Stochastic Dynamic Programming. John Wiley & Sons, Inc., 1994.
+Xiaoman Qi, Panpan Zhu, Yuebin Wang, Liqiang Zhang, Junhuan Peng, Mengfan Wu, Jialong Chen, Xudong Zhao, Ning Zang, and P. Takis Mathiopoulos. MLRSNet: A multi-label high spatial resolution remote sensing dataset for semantic scene understanding. ISPRS Journal of Photogrammetry and Remote Sensing, 169:337-350, 2020.
+Jingyang Qiao, Zhizhong Zhang, Xin Tan, Chengwei Chen, Yanyun Qu, Yong Peng, and Yuan Xie. Prompt gradient projection for continual learning. In International Conference on Learning Representations, 2024.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pp. 8748-8763, 2021.
+Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H. Lampert. iCaRL: Incremental classifier and representation learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5533-5542, 2016.
+Matthew Riemer, Ignacio Cases, Robert Ajemian, Miao Liu, Irina Rish, Yuhai Tu, and Gerald Tesauro. Learning to learn without forgetting by maximizing transfer and minimizing interference. ArXiv, abs/1810.11910, 2018.
+Mark B. Ring. CHILD: A first step towards continual learning. Machine Learning, 28:77-104, 1997.
+David Rolnick, Arun Ahuja, Jonathan Schwarz, Timothy P. Lillicrap, and Greg Wayne. Experience replay for continual learning. In Conference on Neural Information Processing Systems, 2018.
+Gobinda Saha, Isha Garg, and Kaushik Roy. Gradient projection memory for continual learning. In International Conference on Learning Representations, 2021.
+Jonathan Schwarz, Wojciech M. Czarnecki, Jelena Luketina, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. ArXiv, abs/1805.06370, 2018.
+Kritik Seth. Fruit and Vegetable Image Recognition, 2024. URL https://www.kaggle.com/datasets/kritikseth/fruit-and-vegetable-image-recognition. Accessed: 2024-09-23.
+Weijia Shi, Anirudh Ajith, Mengzhou Xia, Yangsibo Huang, Daogao Liu, Terra Blevins, Danqi Chen, and Luke S. Zettlemoyer. Detecting pretraining data from large language models. ArXiv, abs/2310.16789, 2023.
+
+Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative replay. In Conference on Neural Information Processing Systems, 2017.
+David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, L. Sifre, George van den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game of Go with deep neural networks and tree search. Nature, 529(7587):484-489, 2016.
+Aditya Sisodiya. One Piece Anime, 2024. URL https://www.kaggle.com/datasets/aditya2803/one-piece-anime. Accessed: 2024-09-23.
+James Smith, Leonid Karlinsky, Vysshnavi Gutta, Paola Cascante-Bonilla, Donghyun Kim, Assaf Arbelle, Rameswar Panda, Rogério Schmidt Feris, and Zsolt Kira. CODA-Prompt: Continual decomposed attention-based prompting for rehearsal-free continual learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11909-11919, 2022.
+Stealth Technologies. Rock Classification, 2024. URL https://www.kaggle.com/datasets/stealthtechnologies/rock-classification. Accessed: 2024-09-23.
+Phuc Thai. Butterfly Image Classification, 2024. URL https://www.kaggle.com/datasets/phucthaiv02/butterfly-image-classification. Accessed: 2024-09-23.
+Bart Thomee, David A. Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M: The new data in multimedia research. In Communications of the ACM, volume 59, pp. 64-73, 2016.
+Michalis K. Titsias, Jonathan Schwarz, Alexander G. de G. Matthews, Razvan Pascanu, and Yee Whye Teh. Functional regularisation for continual learning with Gaussian processes. In International Conference on Learning Representations, 2020.
+Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, 9(86):2579-2605, 2008.
+Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The Caltech-UCSD Birds-200-2011 Dataset. 2011.
+Liyuan Wang, Mingtian Zhang, Zhongfan Jia, Qian Li, Chenglong Bao, Kaisheng Ma, Jun Zhu, and Yi Zhong. AFEC: Active forgetting of negative transfer in continual learning. In Conference on Neural Information Processing Systems, pp. 22379-22391, 2021.
+Liyuan Wang, Jingyi Xie, Xingxing Zhang, Mingyi Huang, Hang Su, and Jun Zhu. Hierarchical decomposition of prompt-based continual learning: Rethinking obscured sub-optimality. In Conference on Neural Information Processing Systems, pp. 69054–69076, 2023a.
+Liyuan Wang, Xingxing Zhang, Hang Su, and Jun Zhu. A comprehensive survey of continual learning: Theory, method and application. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(8):5362-5383, 2023b.
+Siyuan Wang, Zhuohan Long, Zhihao Fan, Zhongyu Wei, and Xuanjing Huang. Benchmark self-evolving: A multi-agent framework for dynamic LLM evaluation. ArXiv, abs/2402.11443, 2024.
+Zifeng Wang, Zizhao Zhang, Sayna Ebrahimi, Ruoxi Sun, Han Zhang, Chen-Yu Lee, Xiaqi Ren, Guolong Su, Vincent Perot, Jennifer G. Dy, and Tomas Pfister. DualPrompt: Complementary prompting for rehearsal-free continual learning. ArXiv, abs/2204.04799, 2022.
+Jianxiong Xiao, James Hays, Krista A. Ehinger, Aude Oliva, and Antonio Torralba. SUN database: Large-scale scene recognition from abbey to zoo. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 3485-3492, 2010.
+Samuel Yeom, Irene Giacomelli, Matt Fredrikson, and Somesh Jha. Privacy risk in machine learning: Analyzing the connection to overfitting. IEEE Computer Security Foundations Symposium, pp. 268-282, 2017.
+
+Jaehong Yoon, Divyam Madaan, Eunho Yang, and Sung Ju Hwang. Online coreset selection for rehearsal-based continual learning. ArXiv, abs/2106.01085, 2021.
+Gengwei Zhang, Liyuan Wang, Guoliang Kang, Ling Chen, and Yunchao Wei. SLCA: Slow learner with classifier alignment for continual learning on a pre-trained model. In IEEE International Conference on Computer Vision, pp. 19091-19101, 2023.
+Bolei Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(6):1452-1464, 2017.
+Da-Wei Zhou, Han-Jia Ye, De chuan Zhan, and Ziwei Liu. Revisiting class-incremental learning with pre-trained models: Generalizability and adaptivity are all you need. ArXiv, abs/2303.07338, 2023a.
+Da-Wei Zhou, Hai-Long Sun, Han-Jia Ye, and De chuan Zhan. Expandable subspace ensemble for pre-trained model-based class-incremental learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23554-23564, 2024a.
+Da-Wei Zhou, Qi-Wei Wang, Zhi-Hong Qi, Han-Jia Ye, De-Chuan Zhan, and Ziwei Liu. Class incremental learning: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 46(12):9851-9873, 2024b.
+Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. International Journal of Computer Vision, pp. 2337 - 2348, 2021.
+Kun Zhou, Yutao Zhu, Zhipeng Chen, Wentong Chen, Wayne Xin Zhao, Xu Chen, Yankai Lin, Ji-Rong Wen, and Jiawei Han. Don't make your LLM an evaluation benchmark cheater. ArXiv, abs/2311.01964, 2023b.
+Kaijie Zhu, Jiaao Chen, Jindong Wang, Neil Zhenqiang Gong, Diyi Yang, and Xing Xie. DyVal: Dynamic evaluation of large language models for reasoning tasks. In International Conference on Learning Representations, 2023.
+
+# APPENDIX
+
+# A CLDYB DATA POOL
+
+# A.1 CLDYB DATA POOL CONSTRUCTION
+
+Photographic image data. This portion of the CLDyB data pool includes 2,043 classes from 22 publicly available image recognition datasets, and can be categorized into two major domains:
+
+- Natural and biological scenes. This category includes images of fauna, flora, and various natural elements and ecosystems, spanning multiple levels of granularity, from coarse-grained categories (e.g., different animal species in Animal-90 (Banerjee, 2024)) to fine-grained distinctions (e.g., specific butterfly species in Butterfly-70 (Thai, 2024)).
+- Man-made scenes. This category contains images depicting clothing, food, building, and entertainment scenes, capturing a rich diversity of cultural and historical contexts from multiple geographic regions and time periods. For example, it includes Food-101 (Bossard et al., 2014), CNFOOD-241(Aluza, 2024) with Chinese cuisine, and Indian Food Images (Banerjee, 2023), which together represent a variety of regional culinary traditions.
+
+Diffusion-generated image data. In addition to photographic images, our data pool incorporates four AI-generated image datasets by SDXL (Podell et al., 2024) to expand its data distribution and introduce new challenges for CL. These datasets contain 360 classes across three animal categories and one product category, created using the following prompts:
+
+- 'A high-quality image of a kind of animal: {animal name}'
+- 'A high-quality sketch image of a kind of animal: {animal name}'
+- 'A high-quality {image style} image of a kind of animal: {animal name}'
+- 'A high-quality image of a kind of product: {product name}'
+
+Table 2 gives the details of these datasets, which retain the licensing terms of their original sources whenever explicitly stated. In cases where no specific license is provided, the dataset is distributed under the CC BY-NC 4.0 license3, permitting use only for non-commercial purposes.
+
+# A.2 CURRENT CL BENCHMARKS
+
+The standard practice for evaluating class-incremental learning methods, first established in (Rebuffi et al., 2016), involves partitioning the classes of a labeled dataset into sequentially ordered tasks with non-overlapping class labels for training and testing. Commonly used datasets include MNIST (Deng, 2012), CIFAR-100 (Krizhevsky, 2009), CUB-200 (Wah et al., 2011), and various ImageNet derivatives (Le & Yang, 2015; Hendrycks et al., 2020). Additionally, benchmarks like OmniBenchmark and VTAB (Zhou et al., 2023a) aggregate multiple standard classification datasets, each regarded as an individual task. Beyond remixing available datasets, several new datasets have been specifically curated, including Core50 (Lomonaco & Maltoni, 2017), which features diverse objects in varying contexts, and CLEAR (Lin et al., 2021), which captures natural temporal progressions of visual concepts. Furthermore, Liao et al. (2023) introduced CGQA and COBJ benchmarks to assess the compositional generalization abilities of CL methods. However, existing CL benchmarks remain static, and do not explicitly account for assessment of CL methods with strong foundation models.
+
+Table 2: Statistics of the CLDyB data pool. For certain datasets, the number of classes (i.e., # of classes) is smaller than the original, as we have selected only those with fewer than 45 images.
+
+
Type
Dataset
# of classes
# of images
Photographic image data
Fruits-Vegetable (Seth, 2024)
35
3,047
Jute-Pest (Islam, 2024)
17
7,151
Animal-90 (Banerjee, 2024)
90
5,400
Sea-Animal (Lanz, 2024)
23
13,711
Rock (Technologies, 2024)
9
3,687
Butterfly-75 (Thai, 2024)
75
6,499
Clothing-20 (Kaiska, 2024)
17
5,325
Apparel (Grigorev, 2024)
37
16,170
Food101 (Bossard et al., 2014)
101
101,000
FoodX251 (Kaur et al., 2019)
250
118,441
Indian-Food (Banerjee, 2023)
80
4,000
CNFOOD241 (Aluza, 2024)
240
170,835
Oxford5k (Philbin et al., 2007)
17
5,063
SUN397 (Xiao et al., 2010)
339
17,355
Places365 (Zhou et al., 2017)
365
1,803,460
RESISC45 (Cheng et al., 2017)
45
5,100
EuroSAT-RGB (Helber et al., 2018)
10
27,000
MLRSNet (Qi et al., 2020)
46
109,161
FGVC-Aircraft (Maji et al., 2013)
100
10,000
Balls30 (Piosenko, 2024a)
29
3,708
Sports100 (Piosenko, 2024b)
100
13,492
One-Piece-Anime (Sisodiya, 2024)
18
11,737
Diffusion-generated image data
Product-71
71
7,095
Animal-Multi-Style
133
19,962
Animal-Sketch
77
8,494
Animal
79
8,292
CLDyB data pool
Combined
2,403
2,505,185
+
+# B CL METHODS
+
+# B.1 TRADITIONAL CL METHODS
+
+Traditional class-incremental learning methods can be broadly divided into five categories: 1) Replay-based, 2) regularization-based, 3) model-based, 4) optimization-based, and 5) representation-based approaches. Specifically,
+
+- Replay-based methods use a memory buffer to store and replay previous samples when learning new tasks, with recent emphasis on exemplar selection (Aljundi et al., 2019; Yoon et al., 2021), constraint optimization (Lopez-Paz & Ranzato, 2017; Chaudhry et al., 2018), and generative replay (Shin et al., 2017).
+- Regularization-based methods (Kirkpatrick et al., 2017) penalize significant changes in CL methods to preserve acquired knowledge. These include regularization of important parameters, where the importance is measured by the Fisher information matrix (Kirkpatrick et al., 2017), weight uncertainty (Ahn et al., 2019), and variational posterior (Nguyen et al., 2018), as well as functional regularization that leverages Gaussian processes (Titsias et al., 2020), knowledge distillation (Li & Hoiem, 2016; Buzzega et al., 2020), and contrastive learning (Cha et al., 2021).
+- Model-based methods often involve model expansion (Schwarz et al., 2018; Wang et al., 2023a) and parameter isolation (Wang et al., 2022) to manage task-specific knowledge.
+- Optimization-based methods employ techniques like orthogonal gradient projections (Farajtabar et al., 2019; Saha et al., 2021) and meta-learning (Riemer et al., 2018; Gupta et al., 2020) to mitigate negative interference between tasks.
+- Representation-based methods exploit the advantages of meta-learning (Javed & White, 2019), self-supervised learning (Gallardo et al., 2021), and large-scale pre-training (Mehta et al., 2023) to improve feature representations in model initialization and adaptation.
+
+We refer interested readers to (Wang et al., 2023b) for a comprehensive survey.
+
+# B.2 SELECTED CL METHODS FOR CLDYB
+
+We provide a brief description of the selected CL methods for CLDyB. All CL methods work seamlessly with foundation models of varying backbones. Table 3 summarizes the design principles of different CL methods for better comparison.
+
+- ER (Rolnick et al., 2018) is the simplest replay-based method that stores previous exemplars in a fixed memory buffer, and replays them during training to mitigate catastrophic forgetting.
+
+- AFEC (Wang et al., 2021) enhances elastic weight consolidation (Kirkpatrick et al., 2017) by introducing a second Fisher information matrix derived from the current and task-specific finetuned models as regularization. Inspired by biological neural networks, this approach enables selective forgetting of old knowledge conflicting with new experiences, moving beyond rigid retention strategies.
+
+- CLSER (Arani et al., 2022) employs two models: a stable one (for long-term memory) and a plastic one (for short-term memory), updated via distinct exponential moving average (EMA) strategies. During training, it incorporates the mean squared error between the working model and the most confident EMA model as a form of distillation loss.
+
+- DualPrompt (Wang et al., 2022), a prompt-based CL method, improves upon L2P (Zhou et al., 2021) by attaching prompts to multiple attention layers. It also distinguishes task-agnostic and task-specific prompts, enhancing the model's ability to learn both global (cross-task) and local (within-task) knowledge.
+
+- LAE (Gao et al., 2023) maintains an online parameter-efficient module through regular training and updates an offline parameter-efficient module using EMA. During inference, it employs a routing strategy by selecting the more confident prediction from the two modules.
+
+- HiDe-Prompt (Wang et al., 2023a) enhances prior prompt-based methods with several improvements, including a prompt-ensemble strategy, a contrastive feature constraint, and a joint optimization of three tasks: within-task prediction, task-identity prediction, and task-adaptive prediction.
+
+- SLCA (Zhang et al., 2023) employs a dual learning rate strategy: the feature encoder (backbone) is fine-tuned with a smaller learning rate to maintain stable feature extraction, while the classifier is updated with a larger learning rate. Additionally, SLCA mitigates classifier forgetting by modeling and replaying class-wise feature distributions, ensuring robust calibration of the classifier over time.
+
+- PGP (Qiao et al., 2024) demonstrates that orthogonalizing prompt gradients via singular value decomposition prevents forgetting.
+
+- RanPAC (McDonnell et al., 2023) freezes the backbone after initial task training, and applies non-learnable random projections to enhance feature separability. It further decorrelates class prototypes using the inverse of the Gram matrix of the projected features, achieving strong performance without the use of any memory buffer.
+
+
Method
Replay
Training
Regularization
Model
Exemplar Statistic
Full Parameter-efficient
Functional -based
Parameter -based
Orthogonality -based
Isolation or expansion
Ensemble
ER
✓
✓
AFEC
✓
✓
CLSER
✓
✓
✓
✓
DualPrompt
✓
✓
LAE
✓
✓
HiDe-Prompt
✓
✓
✓
✓
SLCA
✓
✓
RanPAC
✓
✓
PGP
✓
✓
✓
+
+Table 3: Summary of design principles of the nine selected CL methods for CLDyB.
+
+# B.3 MEMORY FOOTPRINT CALCULATION
+
+In the calculation of memory footprint, we consider three main sources beyond the ViT backbone: 1) learner parameters including model replicas (e.g., old and EMA-updated models) and parameter-
+
+efficient modules, 2) dataset metadata containing per-task statistics like mean and variance, and 3) image storage retaining raw 8-bit $224 \times 224$ RGB exemplars from previous tasks. All data are stored in 32-bit floats.
+
+# C PSEUDOCODE FOR CLDYB
+
+We present the pseudocode for CLDyB in Algorithms 1, 2, and 3.
+
+Algorithm 1 $\tilde{A}_t = \text{GreedyTaskSampling}(\mathcal{D}_t, \mathcal{F}_{t-1}, \tilde{B}, K)$
+Require: Data pool $\mathcal{D}_t$ , continually learned classifiers $\mathcal{F}_{t - 1} = \left\{f_{t - 1}^{(i)}\right\}_{i = 1}^{M}$ # of candidate tasks to sample $\tilde{B}$ , and # of classes per task $K$
+Return: $\tilde{\mathcal{A}}_t$ Reduced action space
+1: $\Psi (\mathcal{C}_u,\mathcal{C}_v) = \frac{1}{M}\sum_{i = 1}^{M}s\left(\mathrm{CosSim}\left(\boldsymbol {u}_t^{(i)},\boldsymbol {v}_t^{(i)}\right)\right),\forall u,v\in \mathcal{D}_t$ $\triangleright$ Compute pairwise potentials
+2: $\tilde{\mathcal{A}}_t\gets \emptyset$
+3: for $j\in \{1,\ldots ,\tilde{B}\}$ do Sample each task
+4: $\mathcal{V}_0^\star \gets \emptyset$
+5: for $k\in \{1,\dots ,K\}$ do $\triangleright$ Sample each class in the task
+6: if $k = = 1$ then $\triangleright$ Sample the first class uniformly
+7: $u_{k}^{\star}\sim [|\mathcal{D}_{t}|]$
+8: else $\triangleright$ Sample subsequent classes according to Eqn. (6)
+9: $u_{k}^{\star} = \arg \max_{u}\prod_{v\in \mathcal{V}_{k - 1}^{\star}}\Psi (\mathcal{C}_{u},\mathcal{C}_{v})$
+10: end if
+11: $\mathcal{V}_k^\star \gets \mathcal{V}_{k - 1}^\star \bigcup u_k^\star$
+12: end for
+13: $\tilde{\mathcal{A}}_t\gets \tilde{\mathcal{A}}_t\bigcup \mathcal{V}_K^\star$ Add the task to the candidate set
+14: end for
+
+Algorithm 2 $\bar{A}_t =$ FunctionalTaskClustering $(\bar{A}_t, \mathcal{F}_{t-1}, \bar{B}, C)$
+Require: Candidate task set $\tilde{A}_t$ , continually learned classifiers $\mathcal{F}_{t - 1} = \left\{f_{t - 1}^{(i)}\right\}_{i = 1}^{M}$ # of candidate tasks to sample $\bar{B}$ , and # of task clusters $C$
+Return: $\tilde{A}_t$ Condensed action space
+1: $\mathbf{G}\gets \mathbf{0}^{\mid \tilde{A}_t\mid \times M}$ Initialize the task feature matrix
+2: for $i\in \{1,\dots ,|\tilde{A}_t|\}$ do
+3: for $j\in \{1,\ldots ,M\}$ do $\triangleright$ Compute the average negative log-likelihood of sample predictions for task $\tilde{T}_t^{(i)}$ using the $j$ -th $k$ NN classifier $p_{t - 1}^{(j)}$ built from $f_{t - 1}^{(j)}$
+4: $\mathbf{G}[i,j] = -\frac{1}{|\tilde{\tau}_t^{(i)}|}\sum_{(\boldsymbol {x},\boldsymbol {y})\in \tilde{\tau}_t^{(i)}}\log p_{t - 1}^{(j)}(\boldsymbol {y}|\boldsymbol {x})$
+5: end for
+6: end for
+7: $\left\{\bar{\mathcal{T}}_t^{(1)},\bar{\mathcal{T}}_t^{(2)},\dots ,\bar{\mathcal{T}}_t^{(C)}\right\} = \mathrm{KMeans}(\mathbf{G},C)$ Cluster $\tilde{A}_t$ into $C$ task clusters
+8: $\tilde{A}_t\gets \emptyset$
+9: for $i\in \{1,2,\dots ,\bar{B}\}$ do Sample each task without replacement
+10: $j\sim [C]$ Sample one task cluster uniformly
+11: $\tilde{\tau}_t\sim \tilde{\tau}_t^{(j)}$ Sample one task from the cluster uniformly
+12: $\bar{\tau}_t^{(j)}\gets \bar{\tau}_t^{(j)}\backslash \tilde{\tau}_t$ Remove the task from the cluster
+13: $\tilde{A}_t\gets \bar{A}_t\bigcup \tilde{\tau}_t$ Add the task to the candidate set
+14: end for
+
+# Algorithm 3 CLDyB
+
+Require: Data pools $\{\mathcal{D}_t\}_{t=1}^N$ , foundation models $\mathcal{F}_0 = \left\{f_0^{(i)}\right\}_{i=1}^M$ , CL methods $\{\mathrm{CL}^{(i)}\}_{i=1}^M$ , # of candidate tasks $\tilde{B}$ and $\bar{B}$ , # of task clusters $C$ , and # of classes in each task $K$
+
+Return: $\mathcal{T}_{< N + 1}$ CLDyB task sequence
+
+1: $\mathcal{T}_{< 1}\gets \emptyset$
+2: for $t = \{1, \dots, N\}$ do
+3: $\tilde{\mathcal{A}}_t = \text{GreedyTaskSampling}(\mathcal{D}_t, \mathcal{F}_{t-1}, \tilde{B}, K)$ ▷ Algorithm 1
+4: $\bar{A}_t =$ FunctionalTaskClustering $(\tilde{\mathcal{A}}_t,\mathcal{F}_{t - 1},\bar{B},C)$
+5: $\mathcal{T}_t = \mathrm{MCTS}(\mathrm{current~state} = \mathcal{F}_{t - 1}$ , action space $= \bar{A}_t$ , value function $= J_{\mu_t}(\mathcal{F}_{t - 1})$ $\triangleright$ Identify the optimal task according to Eqn. (7)
+6: $\mathcal{F}_t\gets \{f_t^{(i)}\}_{i = 1}^M$ , where $f_{t}^{(i)} = \mathrm{CL}^{(i)}(f_{t - 1}^{(i)},\mathcal{T}_{t})$ $\triangleright$ Train each classifier on the selected task
+7: $\mathcal{T}_{< t + 1}\gets \mathcal{T}_{< t}\bigcup \mathcal{T}_t$ Add the task to the CLDyB sequence
+8: end for
+
+# D ADDITIONAL RESULTS
+
+# D.1 CLDYB SEQUENCES WITH VARYING DIFFICULTY LEVELS
+
+While the main text describes CLDyB as selecting the hardest task at each time step (via greedy maximization of Eqn. (7)), we extend it to generate sequences with varying difficult levels. This can be done by replacing greedy task sampling with task reward-based sampling:
+
+$$
+p \left(\tilde {\mathcal {T}} _ {t}\right) = \frac {\exp \left(J _ {\tilde {\mathcal {T}} _ {t}} \left(\mathcal {F} _ {t - 1}\right) / \tau\right)}{\sum_ {\mathcal {T} _ {t} ^ {\prime} \in \tilde {\mathcal {A}} _ {t}} \exp \left(J _ {\mathcal {T} _ {t} ^ {\prime}} \left(\mathcal {F} _ {t - 1}\right) / \tau\right)}, \tag {8}
+$$
+
+where we slightly abuse the math notation by putting the action (i.e., $\widetilde{\mathcal{T}}_t$ or $\mathcal{T}_t^\prime$ ) in the subscript of the value function $J$ instead of the policy $\mu_t$ to be optimized. The temperature hyperparameter $\tau$ controls the difficulty bias. Lower $\tau$ values ( $\tau \to 0$ ) prioritize high-reward (challenging) tasks, mimicking greedy sampling, while higher $\tau$ values promote diversity by flattening the probability distribution. All other components in CLDyB remain unchanged.
+
+Using reward-based sampling within CLDyB, we generate two additional sets of sequences at the medium and easy difficulty levels, retaining the original as hard sequences. Table 4 presents the results, where we observe two key trends. First, performance improves predictably as difficulty decreases, with the hard sequences providing performance lower bounds. Second, while minor ranking fluctuations occur, results across all CLDyB sequences remain strongly correlated with those on held-out sequences.
+
+Table 4: Final average accuracy (%) of CL methods on CLDyB sequences at the easy, medium, and hard levels.
+
+
Method
Easy
Medium
Hard
Held-out
ER (Rolnick et al., 2018)
76.3
60.5
54.8
79.9
AFEC (Wang et al., 2021)
72.5
51.9
49.5
76.3
CLSER (Arani et al., 2022)
75.4
60.7
57.0
81.1
DualPrompt (Wang et al., 2022)
69.0
53.7
41.9
70.8
LAE (Gao et al., 2023)
70.1
50.9
48.1
71.1
HiDe-Prompt (Wang et al., 2023a)
80.1
67.6
62.5
84.9
SLCA (Zhang et al., 2023)
77.2
59.7
56.2
80.3
RanPAC (McDonnell et al., 2023)
77.0
62.2
56.9
81.0
PGP (Qiao et al., 2024)
69.2
52.0
44.0
68.7
SRCC (per column & held-out)
0.867*
0.833*
0.983*
N/A
KRCC (per column & held-out)
0.722*
0.667*
0.944*
N/A
+
+# D.2 ADDITIONAL FIGURES
+
+Figs 7 to 12 provide additional results under various conditions. Specifically,
+
+- Fig. 7 evaluates CL methods on random sequences.
+- Fig. 8 compares the commonly challenging CLDyB sequences with random sequences.
+- Fig. 9 tests the robustness of CLDyB in long-sequence, commonly challenging scenarios.
+- Fig. 10 validates CLDyB with CLIP-ViT-Base (Radford et al., 2021) in commonly challenging scenario, a stronger foundation model pre-trained on a much larger web-scale dataset, FYCC-100M (Thomee et al., 2016), in comparison to ViT-Base-Sup21K (Dosovitskiy et al., 2021).
+- Fig. 11 assesses CL methods on the commonly challenging CLDyB sequences, when combining ViT-Base-Sup21K (Dosovitskiy et al., 2021) and CLIP-ViT-Base (Radford et al., 2021).
+- Fig. 12 benchmarks CL methods separately using the hybrid configuration from Fig. 11.
+- Fig. 13 compares CL methods on the CLDyB sequences, discovered from the original data pool and its augmented version with AI-generated image data, respectively.
+
+
+Figure 7: Performance comparison of CL methods on random sequences drawn from the CLDyB data pool.
+
+
+
+
+
+# D.3 VISUALIZATION OF CLDYB SEQUENCES
+
+Figs 14 to 17 show t-SNE visualizations (van der Maaten & Hinton, 2008) of tasks in the commonly and individually challenging CLDyB sequences. Figs. 18 to 20 provide sample images from the commonly challenging CLDyB sequences. Additionally, Fig 21 demonstrates the effect of adding AI-generated image data to the CLDyB data pool over time.
+
+
+
+
+(a) ER
+
+
+
+
+
+
+
+
+
+
+
+
+(b) AFEC
+
+
+
+
+
+
+(c) CLSER
+
+
+
+
+Figure 8: Joint evaluation of the five CL methods using CLDyB relative to random sequences. All methods use the ViT-Base backbone (Dosovitskiy et al., 2021), pre-trained on ImageNet-21K.
+
+
+(d) DualPrompt
+(e) LAE
+
+
+
+
+
+
+
+
+
+
+
+
+(f) HiDe-Prompt
+
+
+
+
+
+
+(g) SLCA
+
+
+
+
+Figure 8: Continued. Independent testing of the four CL methods using the same CLDyB sequences as in Figs. 8(a)-(e), relative to random sequences.
+
+
+(h) RanPAC
+(i) PGP
+
+
+
+
+Figure 9: Average performance comparison of CL methods on random and long commonly challenging CLDyB sequences (when $N = 40$ ).
+
+
+
+
+
+
+
+
+Figure 10: Average performance comparison of CL methods on random and CLDyB sequences, with CLIP-ViT-Base (Radford et al., 2021) as the foundation model.
+
+
+
+
+Figure 11: Average performance comparison of CL methods on random and CLDyB sequences, using a mixture of ViT-Base-Sup21K (Dosovitskiy et al., 2021) and CLIP-ViT-Base (Radford et al., 2021).
+
+
+
+
+
+
+
+
+(a) ER
+
+
+
+
+
+
+(b) AFEC
+
+
+
+
+
+
+(c) CLSER
+
+
+
+
+
+
+(d) DualPrompt
+
+
+
+
+Figure 12: Performance comparison of individual CL methods on random and commonly challenging CLDyB sequences.
+
+
+(e) LAE
+
+
+
+
+
+
+
+
+
+
+
+
+(f) HiDe-Prompt
+
+
+
+
+
+
+(g) SLCA
+
+
+
+
+Figure 12: Continued. Performance comparison of individual CL methods on random and commonly challenging CLDyB sequences.
+
+
+(h) RanPAC
+(i) PGP
+
+
+
+
+Figure 13: Performance comparison of CL methods on upcoming tasks selected by CLDyB from the original and the augmented data pools. Additional diffusion-generated images are added to the data pool at time step $t = 2$ (denoted by the dashed line).
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Figure 14: t-SNE visualizations of tasks in the commonly challenging CLDyB sequences.
+
+
+
+
+
+
+
+
+
+
+Figure 15: t-SNE visualizations of tasks in the individually challenging CLDyB sequences for ER.
+
+
+Figure 16: t-SNE visualizations of tasks in the individually challenging CLDyB sequences for LAE.
+
+
+Figure 17: t-SNE visualizations of tasks in the individually challenging CLDyB sequences for RanPAC.
+
+
+Figure 18: Sample images in a commonly challenging CLDyB sequence (seed-0).
+
+
+Figure 19: Sample images in a commonly challenging CLDyB sequence (seed-1).
+
+
+Figure 20: Sample images in a commonly challenging CLDyB sequence (seed-2).
+
+
+Figure 21: Sample images in a commonly challenging CLDyB sequence from the augmented data pool by AI-generated images after time step $t = 2$ . Tasks consisting of AI-generated images are selected at time steps $\{3,4,5,6,7,9\}$ .
\ No newline at end of file
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/images.zip b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..32b01c8d95a063c4a0e4437991225e48c4b4cf4f
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e0ac68eeaae8268cf7dec882cc432402d3bd17f71448cafebf9a94f566b02ed8
+size 2062128
diff --git a/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/layout.json b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..afd8635738b11f2e32520fe3a09f5eb79675387c
--- /dev/null
+++ b/ICLR/2025/CLDyB_ Towards Dynamic Benchmarking for Continual Learning with Pre-trained Models/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d449a92b121f42581195b3806d238f97243c03abdf864c27a4168b048f6d444a
+size 930880
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_content_list.json b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..c4f908acdd235fc0ebd49fd1b98ecfa890ba1d6a
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3361ac7e1c48f56194bc4c619be776b80ebba92e6079b86111178913a4297cba
+size 198187
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_model.json b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..860aed4915f40f99c165f299fa6e199b7978dbf4
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:75b47f2de0a15cd3889e975fec81c07ac86f58def0068891895d7923921ece0c
+size 237299
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_origin.pdf b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..e12a10d0bb7c58fbd4b5269c59cc0117387c9908
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/349b3d69-60ba-49c0-be30-e1edd7423f72_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3f8149d41c22dd822be833ed897c047fb066c19551a07bd4df871a23948b2b45
+size 21575587
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/full.md b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..73927bcf435c6aef47678b186e5579c7f1a976de
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/full.md
@@ -0,0 +1,563 @@
+# CLIBD: BRIDGING VISION AND GENOMICS FOR BIODIVERSITY MONITORING AT SCALE
+
+ZeMing Gong $^{1}$ Austin T. Wang $^{1}$ Xiaoliang Huo $^{1}$ Joakim Bruslund Haurum $^{2}$
+Scott C. Lowe $^{3}$ Graham W. Taylor $^{3,4}$ Angel X. Chang $^{1,5}$
+Simon Fraser University $^{1}$ Aalborg University $^{2}$ Vector Institute $^{3}$
+University of Guelph $^{4}$ Alberta Machine Intelligence Institute (Amii) $^{5}$
+{zmgong, atw7, xiaoliang.huo, angelx}@sfu.ca, {joha}@create.aau.dk,
+{scott.lowe}@vectorinstitute.ai, {gwtaylor}@uoguelph.ca
+https://bioscan-ml.github.io/clibd/
+
+# ABSTRACT
+
+Measuring biodiversity is crucial for understanding ecosystem health. While prior works have developed machine learning models for taxonomic classification of photographic images and DNA separately, in this work, we introduce a multimodal approach combining both, using CLIP-style contrastive learning to align images, barcode DNA, and text-based representations of taxonomic labels in a unified embedding space. This allows for accurate classification of both known and unknown insect species without task-specific fine-tuning, leveraging contrastive learning for the first time to fuse barcode DNA and image data. Our method surpasses previous single-modality approaches in accuracy by over $8\%$ on zero-shot learning tasks, showcasing its effectiveness in biodiversity studies.
+
+# 1 INTRODUCTION
+
+As environmental change and habitat loss accelerate, monitoring biodiversity is crucial to understand and maintain the health of ecosystems. Taxonomic classification of organisms at scale is especially important for understanding regional biodiversity and studying species interactions.
+
+To assist in this, researchers have used computer vision to identify organisms in images [22, 69, 72, 41] for a variety of applications such as ecological monitoring [13]. However, relying solely on images for identifying and classifying organisms fails to consider the rich evolutionary relationship between species and may miss fine-grained differences. To better capture these distinctions, researchers have used DNA sequences for genome understanding and taxonomic classification [31, 79, 45, 8, 2, 54]. In particular, DNA barcodes [26], short sections of DNA from specific genes such as the mitochondrial COI gene [40] in animals and ITS sequences in fungi, have been shown to be particularly useful for species identification [2, 54]. However, collecting DNA requires specialized equipment making it more expensive and less accessible than images. In this work, we investigate whether we can leverage recent advances in multi-modal representation learning [50, 32] to use information from DNA barcodes to guide the learning of image embeddings appropriate for taxonomic classification.
+
+Recently, BioCLIP [61] used CLIP-style contrastive learning [50] to align images with common names and taxonomic descriptions to classify plants, animals, and fungi. While they showed that aligning image representations to text can help improve classification, taxonomic labels, which are not always available to the species level, are needed to obtain text descriptions. In this work, we study whether, by aligning to DNA barcodes (instead of text) during pretraining, we can learn improved representations of images for use in tasks relevant to biodiversity.
+
+We propose CLIBD, which uses contrastive learning to map taxonomic labels, biological images and barcode DNA to the same embedding space. By leveraging DNA barcodes, we eliminate the reliance on manual taxonomic labels (as used for BioCLIP) while still incorporating rich taxonomic information into the representation. This is advantageous since DNA barcodes can be obtained at scale more readily than taxonomic labels, which require manual inspection from a human expert [23, 24, 60]. We also investigate leveraging partial taxonomic annotations, when available,
+
+to build a trimodal latent space that aligns all three modalities for improved representations. We demonstrate the power of using DNA as a signal for aligning image embeddings by conducting experiments for fine-grained taxonomic classification down to the species level. Our experiments show our pretrained embeddings that align modalities can (1) improve on the representational power of image and DNA embeddings alone by obtaining higher taxonomic classification accuracy and (2) provide a bridge from image to DNA to enable image-to-DNA based retrieval.
+
+# 2 RELATED WORK
+
+We review work using images, DNA, and multi-modal models for fine-grained taxonomic classification of species and their application in biology. Prior work has primarily explored building unimodal models for either images or DNA, and largely relied on fine-tuning classifiers on a set of known species or higher-level taxa. This limits those approaches to a closed set of species, whereas we aim to also identify unseen species, for which we have no examples in the training set.
+
+Taxonomic classification of images in biology. Many studies have explored image-based taxonomic classification of organisms [7, 69]. However, visual identification of species remains difficult due to the abundance of fine-grained classes and data imbalance among species. To improve fine-grained taxonomic classification, methods such as coarse and weak supervision [67, 53, 63] and contrastive learning [14, 74] have been developed. Despite these advances, image-based species classification is still limited, so we leverage DNA alongside images to enhance representation learning while maintaining the relative ease of acquiring visual data for new organisms.
+
+Representation learning for DNA. Much work has focused on machine learning for DNA, such as for genome understanding [37, 34, 3, 35]. Recently, self-supervised learning has been used to develop foundation models on DNA, from masked-token prediction with transformers [31, 8, 65, 15, 79, 2], to contrastive learning [80] and next-character prediction with state-space models [47]. While much of this work focuses on human DNA, models have also been trained on large multi-species DNA datasets for taxonomic classification. BERTax [45] pretrained a BERT [18] model for hierarchical taxonomic classification but focused on coarser taxa like superkingdom, phylum, and genus, which are easier than fine-grained species classification. BarcodeBERT [2] showed that models pretrained on DNA barcodes rather than general DNA can be more effective for taxonomic classification. Though some of these works use contrastive learning, they do not align DNA with images. We extend these models by using cross-modal contrastive learning to align DNA and image embeddings, addressing the higher cost of obtaining DNA samples while improving image-based classification and enabling cross-modal queries.
+
+Multimodal models for biology. While most work on taxonomic classification has been limited to single modalities, recent work started developing multimodal models for biological applications [29, 39, 77, 36]. Nguyen et al. [48] introduced Insect-1M, applying contrastive learning across text and image modalities. BioCLIP [61] pretrained multimodal contrastive models on images and text encodings of taxonomic labels in TreeOfLife-10M. However, these models focus only on images and text, limiting their use with new species where taxonomic labels are unavailable. They also miss leveraging the rich taxonomic knowledge from sources like the Barcode of Life Datasystem (BOLD), which at the time of writing has nearly $19\mathrm{M}$ validated DNA barcodes. Although many records include expert-assigned taxonomic labels, only $24\%$ are labeled to the genus level and $9\%$ to the species level in BOLD-derived datasets like BIOSCAN-1M and BIOSCAN-5M [23, 24]. By aligning images to DNA barcodes, we can use precise information in the DNA to align the image representations with the task of taxonomic classification, without requiring taxonomic labels.
+
+One of the few works that uses both images and DNA is the Bayesian zero-shot learning (BZSL) approach by Badirli et al. [4]. This method models priors for image-based species classification by relating unseen species to nearby seen species in the DNA embedding space. Badirli et al. [5] similarly apply Bayesian techniques, with ridge regression to map image embeddings to the DNA space to predict genera for unseen species. However, this approach assumes prior knowledge of all genera and does not use taxonomic labels to learn its mapping, limiting its representational power. In this work, we show that aligning image and DNA modalities using end-to-end contrastive learning produces a more accurate model and useful representation space. By incorporating text during pretraining, we can leverage available taxonomic annotations without relying on their abundance.
+
+
+Figure 1: Overview of CLIBD. (a) Our model consists of three encoders for processing images, DNA barcodes, and text. During training, we use a contrastive loss to align the image, DNA, and text embeddings. (b) At inference, we embed a query image and match it to a database of existing image and DNA embeddings (keys). We use cosine similarity to find the closest key embedding and use its taxonomic label to classify the query.
+
+Some prior work has investigated contrastive learning of image and DNA specifically for genetics and histology [64, 75, 44]. These works extend contrastive learning for aligning images and text—introduced by ConVIRT [78] for medical images and popularized by CLIP [50]—to images and human DNA. Here, we focus on multimodal contrastive learning with DNA barcodes and images for taxonomic classification. DNA barcodes (see Appendix D for background) are much shorter (400–800 base pairs) compared to sequences used in biomedical tasks (tens of thousands of base pairs).
+
+# 3 METHOD
+
+To align representations of images, DNA barcodes, and textual taxonomic labels, we start with a pretrained encoder for each modality and fine-tune them with a multimodal contrastive loss, illustrated in Figure 1. During inference, we use our fine-tuned encoders to extract features for a query image and match them against a database of image and DNA embeddings (keys) with known taxonomic labels. To classify a query image, we take the taxonomic labels associated with the most similar key. Whilst we can also query against the taxonomic text embeddings, this approach does not work well for taxa that were not seen during training. In contrast, our model can match queries against embeddings of labelled images and barcodes acquired after training. Thus, images and DNA barcodes comprise a more robust and comprehensive set of records against which to query.
+
+# 3.1 TRAINING
+
+Contrastive learning. We base our approach on a contrastive learning scheme similar to CLIP [50], which uses large-scale pretraining to learn joint embeddings of images and text. In contrastive learning, embeddings for paired specimens are pulled together while non-paired specimens are pushed apart, thus aligning the semantic spaces for cross-modal retrieval. Following prior work [55], we extend CLIP [50] to three modalities by considering each pair of modalities with the NT-Xent loss [58] between two modalities to align their representations. Let matrices $\mathbf{V}$ , $\mathbf{D}$ , and $\mathbf{T}$ represent the batch of $\ell_2$ -normalized embeddings of the image, DNA, and text modalities. The $i$ -th row of each matrix corresponds to the same physical specimen instance, thus rows $V_{i}$ and $D_{i}$ are image and DNA features from the same specimen, forming a positive pair. Features in different rows $V_{i}$ and $D_{j}$ , $i \neq j$ , come from different specimens and are negative pairs. The contrastive loss for pair $i$ is
+
+$$
+L _ {i} ^ {(V \rightarrow D)} = - \log \frac {\exp (V _ {i} ^ {T} D _ {i} / \tau)}{\sum_ {j = 1} ^ {n} \exp (V _ {i} ^ {T} D _ {j} / \tau)}, L _ {i} ^ {(D \rightarrow V)} = - \log \frac {\exp (D _ {i} ^ {T} V _ {i} / \tau)}{\sum_ {j = 1} ^ {n} \exp (D _ {i} ^ {T} V _ {j} / \tau)},
+$$
+
+where $\tau$ is a trainable temperature initialized to 0.07 following Radford et al. [50]. The total contrastive loss for a pair of modalities is the sum over the loss terms for each pairs of specimens,
+
+$$
+L _ {V D} = \sum_ {i = 1} ^ {n} \left(L _ {i} ^ {(V \rightarrow D)} + L _ {i} ^ {(D \rightarrow V)}\right),
+$$
+
+wherein we apply the loss symmetrically to normalize over the possible paired embeddings for each modality [78, 55]. We repeat this for each pair of modalities and sum them to obtain the final loss, $L = L_{VD} + L_{DT} + L_{VT}$ .
+
+Pretrained encoders. For each modality we use a pretrained model to initialize our encoders. Images: ViT-B1 pretrained on ImageNet-21k and fine-tuned on ImageNet-1k [21]. DNA barcodes:
+
+
+Figure 2: Data partitioning. We split the BIOSCAN-1M data into training, validation, and test partitions. The training set (used for contrastive learning) has records without any species labels as well as a set of seen species that are well-represented (at least 9 records per species). The validation and test sets include seen and unseen (not seen during training) species. These images are further split into subpartitions of queries (darker color) and keys (lighter color) for evaluation. We ensure that the validation and test sets have different unseen species. Since the seen species are common, we have a shared set of records (Key) that we use as keys for seen species and combine all key sets to form a reference database. We show the number of records in each box.
+
+BarcodeBERT [2] with 5-mer tokenization, pretrained using masked language modelling on $893\mathrm{k}$ DNA barcodes [19] a dataset that is similar to but not overlapping with the DNA barcodes in the BIOSCAN-1M dataset, making it ideal for our study. Text: we use the pretrained BERT-Small [68] for taxonomic labels. Besides these pretrained encoders, we also conduct experiments using larger variants (see Appendix B.1.3).
+
+# 3.2 INFERENCE
+
+To use the model to predict taxonomic labels, we calculate the cosine similarity between the embedded input image (query) and reference image or DNA embeddings (keys) sampled from available species. We use the taxonomic label (order, family, genus, species) associated with the closest key as our prediction. This method allows us to evaluate the model in a zero-shot setting on species which were not seen by the model during training, provided we have appropriately labelled specimens to use as keys. The embedding space also provides the flexibility to be used for other downstream tasks, such as a supervised classifier or a Bayesian model [4, 5].
+
+# 4 TASK AND DATA
+
+To evaluate our method, we perform taxonomic classification using different combinations of input and reference modalities. The input may be a biological image or DNA sequence; this is matched against a reference set of labelled DNA barcodes, labelled biological images, or known taxonomic labels. We evaluate predictions at each taxonomic level by averaging accuracy over samples (micro) and taxon groups (macro). Unlike fine-tuning a species classification head, our approach can identify unseen species using labelled reference images or DNA, without needing to know all potential species at training time. We split the BIOSCAN-1M dataset so some species are "unseen" during training and report prediction accuracy for both seen and unseen species to study model generalization. This simulates the case where once a model is deployed, there are new specimens that are catalogued and labelled over time, which were not initially available for training the encoders.
+
+Dataset. The BIOSCAN-1M dataset [23] is a curated collection of over one million insect data records sourced from a biodiversity monitoring workflow. Each record in the dataset includes a high-quality insect image, expert-annotated taxonomic label, and a DNA barcode. However, the dataset has incomplete taxonomic labels, with fewer than $10\%$ of records labelled at the species level. This poses a challenge for conventional supervised methods, which require comprehensive species-level annotations, but our method is able to flexibly leverage partial or missing taxonomic information during contrastive learning. The dataset also possesses a long-tailed class imbalance, typical of real-world biological data. Given the vast biodiversity of insects—for which an estimated $80\%$ is as-yet undescribed [62]—and the necessity to discern subtle visual differences, this dataset offers a significant challenge and opportunity for our model.
+
+Data partitioning. We split BIOSCAN-1M into train/val/test sets to evaluate zero-shot classification and model generalization to unseen species. Records for well-represented species (at least 9 records) are partitioned at $80 / 20$ ratio into seen and unseen, with seen records allocated to each of the splits and unseen records allocated to val and test. All records without species labels are used in
+
+Table 1: Top-1 macro-accuracy (%) on BIOSCAN-1M test set for different combinations of modality alignment (image, DNA, text) during contrastive training. Results using DNA-to-DNA, image-to-image, and image-to-DNA query and key combinations. As a baseline, we also show results for unimodal pretrained models before cross-modal alignment and unimodal training using SimCLR $(\sqrt{}^{*})$ . We report the accuracy for seen and unseen species, and their harmonic mean (H.M.) (bold: highest acc, italic: second highest acc.).
+
+
Taxa
Aligned embeddings
DNA-to-DNA
Image-to-Image
Image-to-DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
✘
78.8
91.8
84.8
54.9
48.0
51.2
7.7
9.6
8.5
✓*
—
—
—
69.5
59.8
64.3
—
—
—
✓
✓
—
—
—
99.6
97.4
98.5
—
—
—
✓
✓
100.0
100.0
100.0
89.5
97.6
93.4
99.7
71.8
83.5
✓
✓
✓
100.0
100.0
100.0
99.7
94.4
97.0
99.4
88.5
93.6
Family
✘
86.2
82.1
84.1
28.1
21.7
24.5
0.5
0.8
0.6
✓*
—
—
—
43.6
30.9
36.2
—
—
—
✓
✓
—
—
—
90.7
76.7
83.1
—
—
—
✓
✓
99.1
97.6
98.3
89.1
81.1
84.9
90.2
44.6
59.7
✓
✓
✓
100.0
98.3
99.1
90.9
81.8
86.1
90.8
50.1
64.6
Genus
✘
82.1
69.4
75.2
14.2
10.3
11.9
0.2
0.0
0.0
✓*
—
—
—
24.7
16.7
19.9
—
—
—
✓
✓
—
—
—
72.1
49.6
58.8
—
—
—
✓
✓
97.7
93.0
95.3
74.1
59.7
66.1
73.4
18.7
29.8
✓
✓
✓
98.2
94.7
96.4
74.6
60.4
66.8
70.6
20.8
32.1
Species
✘
76.4
63.6
69.4
7.2
5.0
5.9
0.1
0.0
0.0
✓*
—
—
—
14.2
8.8
10.9
—
—
—
✓
✓
—
—
—
54.2
33.6
41.5
—
—
—
✓
✓
94.4
86.9
90.5
59.2
45.1
51.2
58.1
7.7
13.6
✓
✓
✓
95.6
90.4
92.9
59.3
45.0
51.2
51.6
8.6
14.7
+
+contrastive pretraining, and species with 2 to 8 records are divided between the unseen splits in the val and test sets. Importantly, we ensure that unseen species are mutually exclusive between the val and test sets and do not overlap with seen species for labelled records. Finally, among each of the seen and unseen sub-splits within the val and test sets, we allocate equal proportions of records as queries, to be used as inputs during evaluation, and keys, to be used as our reference database. Note that keys from seen and unseen species are combined to form the reference database. This procedure ensures we have a distribution of different cases in evaluation: both seen and unseen, and common and uncommon species. See Figure 2 for split statistics and Appendix A for details.
+
+Data preprocessing. During inference, we resize images to $256 \times 256$ and apply a $224 \times 224$ center crop. For the DNA input, following Arias et al. [2], we set a maximum length of 660 for each sequence and tokenize the input into non-overlapping 5-mers. Similar to Stevens et al. [61], we concatenate the taxonomic levels of the insects together as text input. As we did not have the common names of each record, we used the Linnean order, family, genus, and species, up to the most specific available label per specimen. With this approach, we can still provide the model with knowledge of the higher-level taxonomy, even if some records do not have species-level annotations.
+
+# 5 EXPERIMENTS
+
+We evaluate the model's ability to retrieve correct taxonomic labels using images and DNA barcodes from the BIOSCAN-1M dataset [23]. This includes species that were either seen or unseen during contrastive learning. We also experiment on the INSECT dataset [4] for Bayesian zero-shot learning (BZSL) species-level image classification. We report the top-1 accuracy for the seen and unseen splits, as well as their harmonic mean (H.M.). We focus on evaluating the model using various combinations of modalities on the test set. Specifically, we assess the model's performance when using images and DNA barcodes as inputs, matched against their respective image and DNA reference sets, as well as the combination of image inputs matched to DNA references. In addition, we visualize the attention roll-out of the vision transformer we used as our image encoder to explore how the representation changes before and after contrastive learning and how aligning with different modalities affects the focus of the image encoder.
+
+
+Figure 3: Example query-key pairs. Top-3 nearest specimens from the unseen validation-key dataset retrieved based on the cosine-similarity for DNA-to-DNA, image-to-image, and image-to-DNA retrieval. Box color indicates whether the retrieved samples had the same species (green), genus (light-green), family (yellow), or order (orange) as the query or, else not matched (red).
+
+Implementation details. Models were trained on four 80GB A100 GPUs for 50 epochs with batch size 2000, using the Adam optimizer [33] and one-cycle learning rate schedule [57] with learning rate from $1\mathrm{e} - 6$ to $5\mathrm{e} - 5$ . For efficient training, we use automatic mixed precision (AMP). We study the impact of AMP and batch size in Appendix C.
+
+# 5.1 RETRIEVAL BY IMAGE AND DNA
+
+We conducted experiments on BIOSCAN-1M [23] to study whether the accuracy of taxonomic classification improves with contrastive learning, particularly with the inclusion of DNA barcodes as an additional modality. We compare the accuracy of models trained to align different combinations of modalities: image (I), DNA (D), and text (T). We also assess performance by using different modalities as the query (input at inference time) and as the key (the embedding used for matching). As image is more readily available, we primarily focus on querying by image.
+
+Taxonomic classification. In Table 1, we report the top-1 macro-accuracy on our BIOSCAN-1M test set for seen and unseen species (see Table 8 for the top-1 micro-accuracy). We report the performance of the different alignment models at different taxonomic levels (order, family, genus, species). As expected, the performance drops for more specific taxa (e.g., accuracy for order is much higher than for species), due to both the increased number of possible labels and the more fine-grained differences between them. When we consider unseen species, there is a drop in accuracy compared to seen species, suggesting there is a benefit to retraining encoders as more data is collected.
+
+Are multimodal aligned embeddings useful? Our experiments show that by using contrastive learning to align images and DNA barcodes, we can 1) enable cross-modal querying and 2) improve the accuracy of our retrieval-based classifier. Unsurprisingly, we find that DNA-to-DNA retrieval is the most accurate, especially for species-level classification. Note that while direct DNA matching using methods like BLAST are quite effective, they tend to be slow and cannot be easily incorporated into neural networks for other downstream tasks [2]. By using contrastive learning to align different modalities, we enhance the image representation's ability to classify (image-to-image), especially at the genus and species level where the macro H.M. accuracy jumps from $12.5\%$ to $69\%$ (for genus) and $6.27\%$ to $52\%$ (for species) for our best model $(\mathrm{I} + \mathrm{D} + \mathrm{T})$ . Note that with alignment, the DNA-to-DNA retrieval performance also improves. To verify that the improvements in unimodal performance come from the flow of information between modalities, we also use unimodal contrastive loss following SimCLR [11] to fine-tune the image encoder on BIOSCAN-1M. Results (Table 1, second row) show that while the performance is better than the unaligned model, it is far from the gain we see in the I+D model (see Appendix B.1 for details).
+
+Do DNA barcodes provide a strong alignment target? Table 1 also shows that on BIOSCAN-1M, using DNA provides a better alignment target than using taxonomic labels. Comparing the model that aligns image and text (I+T, row 3) vs. the one that aligns image and DNA (I+D, row 4), we see that the I+D model consistently gives higher accuracy than the I+T model. At the species level, the I+D can even outperform the I+D+T model. This is likely because the I+D+T model, despite using
+
+Table 2: Species-level top-1 macro-accuracy (%) of BioCLIP and our CLIBD model on the test set, matching image embeddings (queries) against embeddings of different modalities for retrieval (image, DNA, and text keys). Note: the BioCLIP model [61] was trained on data that included BIOSCAN-1M but used different species splits, so it may have seen most of the unseen species during its training.
+
+
Model
Aligned embeddings
Image-to-Image
Image-to-DNA
Image-to-Text
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
BioCLIP
✓
✓
20.4
14.8
17.1
—
—
—
4.2
3.1
3.6
CLIBD
✓
✓
54.2
33.6
41.5
—
—
—
57.6
4.6
8.5
CLIBD
✓
✓
✓
59.3
45.0
51.2
51.6
8.6
14.7
56.0
4.8
8.9
+
+all known labels for each sample, only has access to species labels for $3.36\%$ of the pretraining data. While comprehensive species labels could yield a comparable model for taxonomic classification, the money and time cost for hiring expert scientific annotators makes it impractical to scale.
+
+Cross-modal retrieval. Next we consider cross-modal retrieval performance from image to DNA. Without any alignment, image-to-DNA performance is effectively at chance accuracy, scoring extremely low for levels more fine-grained than order. By using contrastive learning to align image to DNA, we improve performance at all taxonomic ranks. While the cross-modal performance is still low compared to within-modal retrieval, we see that it is feasible to perform image-to-DNA retrieval, which unlocks the ability to classify taxa for which no images exist in reference databases.
+
+Retrieval examples. Figure 3 shows examples of intra-modality image and DNA retrieval as well as image-to-DNA retrieval from our full model (aligning $\mathrm{I} + \mathrm{D} + \mathrm{T}$ ), for which the retrieval is successful if the taxonomy of the retrieved key matches the image's. These examples show significant similarity between query and retrieved images across taxa, suggesting effective DNA and image embedding alignment despite differences in insect orientation and placement.
+
+# 5.2 COMPARISON WITH BIOCLIP
+
+Next we compare our aligned embedding space with that of BioCLIP [61] and investigate how well using taxonomic labels as keys would perform. We run experiments on BIOSCAN-1M by adapting the BioCLIP zero-shot learning demo script to perform species-level image classification. We use the BioCLIP pretrained model on the BIOSCAN-1M test set, with image query and either image or text embeddings as keys. For the text input for BioCLIP, we combined the four concatenated taxonomic levels with their provided openaitemplates as text input, while for CLIBD, we used the concatenated labels only.
+
+In Table 2, we report the species-level macro-accuracy. Results on other taxonomic levels (Table 13) follow a similar trend. We see CLIBD consistently outperforms BioCLIP, regardless of whether images or text is used as the key, and even for CLIBD trained only on images and text. Since BioCLIP was trained on a much broader dataset, including but not limited to BIOSCAN-1M, it may perform worse on insects as it was also trained on non-insect domains. CLIBD can also leverage DNA features during inference, while BioCLIP is limited to image and text modalities.
+
+Does matching images to taxonomic labels work better than matching to image or DNA embeddings? The performance when using text as keys is much lower than using image or DNA keys. This shows that it is more useful to labeled samples with images (most preferred) or DNA. Nevertheless, if no such samples are available, it is possible to directly use text labels as matching keys.
+
+# 5.3 ANALYSIS
+
+How does class size influence performance? Since we use retrieval for taxonomic classification, it is expected that performance is linked to the number of records in the key set. Figure 4 confirms this. In general, accuracy is higher for seen species compared to unseen species in cross-modal retrieval, but this difference is less noticeable in within-modality retrieval. This suggests that contrastive training has better aligned the data it has been trained on, but it is less effective for unseen species. The DNA-DNA retrieval performance remains high, regardless of number of records in the key set.
+
+Attention visualization. To investigate how the contrastive training changed the model, we visualize the attention roll-out of the vision transformer for the image encoder [1] in Figure 5. We reference the implementation method mentioned in Dosovitskiy et al. [21] by registering forward
+
+
+Figure 4: Average top-1 per-species accuracy, binned by count of species records in the key set, for different query and key combinations. We show seen in blue and unseen in orange, with size and color intensity indicating number of binned species. In all cases, the accuracy for seen species increases with the number of records. While the trend is similar for unseen species with intra-modal retrieval $(a)$ and $d)$ , cross-modal retrieval $(b)$ and $c)$ achieve much lower performance, underscoring the challenge of cross-modal alignment.
+
+
+Figure 5: We visualize the attention for queries from seen and unseen species. The "Before" and "After" columns indicate if the prediction (at the species-level) was correct before (initial unaligned model) and after alignment $(\mathrm{I} + \mathrm{D} + \mathrm{T}$ model). Predicted genera $^+$ species are indicated in green for correct, red for incorrect. Only a few samples were predicted correctly before alignment and incorrect after (38 for seen and 69 for unseen).
+
+hooks in the ViT's attention blocks to capture attention outputs and using the Rollout method to calculate attention accumulation. We then apply the processed mask to the original image to generate an attention map of the image area. Inspired by Darcet et al. [16], we inspect the mask of each attention block and remove attention maps containing artifacts. Ultimately, we select the forward outputs of the second to sixth attention blocks to generate the attention map.
+
+We show examples for both seen and unseen species. For examples where the aligned models are able to predict correctly, we see that the attention is more clearly focused on the insect. Furthermore, we see that only the $\mathrm{I + D + T}$ model activates highly on the full insect, compared to $\mathrm{I + T}$ and $\mathrm{I + D}$ . Thus, while quantitatively the models may perform comparably, the $\mathrm{I + D + T}$ yields the most visually interpretable predictions. This is ideal for biodiversity, as interpretability is important for practical adoption. We also visualize the embedding space before and after alignment (see Appendix B.3) and show more examples of attention visualization (see Appendix B.4).
+
+# 5.4 IMPROVING CROSS-MODAL CLASSIFICATION
+
+We now more closely investigate how we can improve cross-modal ZS classification, where during inference time we have an image of an insect as a query, and we have a database of seen species (with images and DNA), and unseen species (with just DNA). Badirli et al. [4] proposed a hierarchical Bayesian model to classify images, using training images to learn the distribution priors and DNA embeddings to build surrogate priors for unseen classes. Here, we consider a similar zero-shot (ZS)
+
+
+Figure 6: When we have DNA barcodes but not images of unseen species, we can use a combination of image and DNA as key sets. We adapt CLIBD for using images as keys for seen species and DNA for unseen species (i.e. the $\mathrm{IS + DU}$ strategy) to predict the species. We first classify the input image query $q$ against seen species, using either: (a) an 1-NN approach thresholding the cosine similarity score $s = \max_k f_{ik} \cdot f_q$ ; or (b) a supervised classifier predicting over all seen species and thresholding the maximum softmax probability $s = \max y_k$ by threshold $t$ . If $s < t$ , we subsequently query with the image feature $f_q$ using 1-NN with the DNA keys $f_{lk}$ of the unseen species and predict the unseen species of the closest DNA feature. *During supervised classifier training, the image encoder is finetuned only for use in the supervised pipeline.
+
+Table 3: Top-1 accuracy $(\%)$ on our BIOSCAN-1M test set using the Image+DNA+Text model with image query. We compare nearest neighbour using only DNA keys (NN DNA), vs. our two strategies to use Image key for seen and DNA key for Unseen, either NN or a supervised linear classifier. We also compare against BZSL [4] with our embeddings.
+
+
Taxa
Method
Strategy
Micro top-1 acc
Macro top-1 acc
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Genus
NN
DNA
87.6
54.9
67.5
70.6
20.8
32.1
NN
IS+DU
85.7
55.0
67.0
66.8
20.8
31.7
Linear
IS+DU
83.6
55.6
66.8
61.4
21.1
31.5
BZSL
IS+DU
86.8
46.5
60.6
75.7
14.4
24.2
Species
NN
DNA
74.2
27.8
40.4
51.6
8.6
14.7
NN
IS+DU
76.1
26.2
39.0
54.8
8.5
14.8
Linear
IS+DU
72.6
25.5
37.7
41.6
9.4
15.3
BZSL
IS+DU
76.1
17.6
28.5
62.6
7.2
12.9
+
+setting using our embeddings from our pretrained model for Bayesian zero-shot learning (BZSL), demonstrating its utility for unseen species classification.
+
+We also consider a simpler strategy using the image embeddings for seen species, and DNA embeddings for unseen species. A two-stage approach first determines if a new image query represents a seen or unseen species (see Figure 6). For seen, image-to-image matching determines the species, while for unseen, image-to-DNA matching (assuming a reference set of labeled DNA samples for unseen species) determines the species. This is denoted by "IS-DU" (image seen - DNA unseen).
+
+Determining seen vs. unseen. We frame the problem as an open-set recognition task [70] by using a classifier to determine whether an image query corresponds to a seen or an unseen species. This is useful for novel species detection as in practice we may not have a reference set of labeled samples or even set of species labels for unseen species. We compare using a 1-nearest neighbor (NN) classifier, and a linear supervised classifier with a fine-tuned image encoder (see Figure 6 left). See Appendix B.2 for details. We show that without access to any unseen samples at inference time, our learned embeddings can be used to distinguish between seen and unseen in Table 15. Using the image-to-image NN classifier, we obtain $83\%$ accuracy on seen, $77\%$ on unseen and a harmonic mean of $80\%$ . For our linear classifier, we obtain lower accuracy on seen ( $73\%$ ), but higher on unseen ( $85\%$ ), with harmonic mean of $79\%$ .
+
+Evaluation on BIOSCAN-1M. Next we conduct experiments on BIOSCAN-1M to compare our $\mathrm{IS + DU}$ strategy vs. incorporating our learned embeddings in BZSL. We also compare against querying the seen and unseen DNA keys using 1-NN directly. Table 3 reports the top-1 micro and macro accuracy of at the genus and species level (see Table 16 for order and family level classification). We find that at the genus and species level, BZSL obtains good performance for seen species but that our simple NN-based approach actually outperforms BZSL on unseen species. Using our IS-DU strategy with the supervised linear classifier, we obtain the best macro top-1 accuracy on unseen species, demonstrating that the complexity of BZSL may not be necessary.
+
+Table 4: Macro-accuracy $(\%)$ for species classification in a Bayesian zero-shot learning task on the INSECT dataset. We compare our CLIBD-D with several DNA encoders: CNN encoder [4], DNABERT-2 [79], Bar codeBERT [2]. The baseline image encoder ResNet-101 used in Badirli et al. [4] is compared against our image encoder before (ViT-B) and after (CLIBD-I) pretraining on BIOSCAN-1M (BS-1M). We indicate the pretraining set for DNA (Pre-DNA) as the multi-species (M.S.) set from Zhou et al. [79], anthropoids from Arias et al. [2], or BS-1M. We compare models both with and without supervised fine-tuning (FT) for each encoder, except for CLIBD-D, where the comparison is with or without contrastive learning for fine-tuning on the INSECT dataset. We highlight the baseline from Badirli et al. [4] and the variant with our fine-tuned encoders in gray.
+
+
DNA enc.
Image enc.
Data sources
Species-level acc (%)
Pre-DNA
FT-DNA
FT-Img
Seen
Unseen
H.M.
CNN encoder
RN-101
-
INSECT
-
38.3
20.8
27.0
DNABERT-2
RN-101
M.S.
-
-
36.2
10.4
16.2
DNABERT-2
RN-101
M.S.
INSECT
-
30.8
8.6
13.4
BarcodeBERT
RN-101
Arthro
-
-
38.4
16.5
23.1
BarcodeBERT
RN-101
Arthro
INSECT
-
37.3
20.8
26.7
BarcodeBERT
ViT-B
Arthro
INSECT
-
42.4
23.5
30.2
BarcodeBERT
ViT-B
Arthro
INSECT
INSECT
54.1
20.1
29.3
CNN encoder
CLIBD-I
-
INSECT
-
37.7
16.0
22.5
BarcodeBERT
CLIBD-I
Arthro
INSECT
-
52.0
21.6
30.6
BarcodeBERT
CLIBD-I
Arthro
INSECT
INSECT
48.5
23.0
31.2
CLIBD-D
RN-101
BS-1M
-
-
34.7
21.3
26.4
CLIBD-D
RN-101
BS-1M
INSECT
-
32.8
25.0
28.4
CLIBD-D
CLIBD-I
BS-1M
-
-
34.2
22.1
26.9
CLIBD-D
CLIBD-I
BS-1M
INSECT
INSECT
57.9
25.1
35.0
+
+Evaluation on INSECT dataset with BZSL. In this experiment, we study whether our image and DNA embeddings can improve performance when incorporated into BZSL. We evaluate on the INSECT dataset [4], which contains 21,212 pairs of insect images and DNA barcodes from 1,213 species. We record the performance of different combinations of encoders. We start with the original CNN-based DNA encoder and ResNet-101 image encoder pretrained on ImageNet-1K from Badirli et al. [4]. We also consider ViT-B [21], pretrained on ImageNet-21k and fine-tuned on ImageNet-1k. For DNA encoders, we compare against BarcodeBERT [2] (which was used to initialize our CLIBD model), and DNABERT-2 [79], a BERT-based model trained on multi-species DNA.
+
+Table 4 shows that incorporating CLIBD improves BZSL accuracy. With the baseline image encoder (RN-101), CLIBD-D performs the best of the DNA encoders (both with and without DNA fine-tuning). With BarcodeBERT, our CLIBD-I outperforms both RN-101 and ViT-B. CLIBD-I together with CLIBD-D gives the best performance with accuracy after fine-tuning of $57.9\%$ for seen and $25.1\%$ for unseen. This shows the benefits of using CLIBD to learn a shared embedding space relating image and DNA data, both in performance and flexibility of applying to downstream tasks.
+
+# 6 CONCLUSION
+
+We introduced CLIBD, an approach for integrating biological images with DNA barcodes and taxonomic labels to improve taxonomic classification. It uses contrastive learning to align embeddings in a shared latent space. Our experiments show that, using barcode DNA as an alignment target for image representations, CLIBD outperforms models that only align images and text. Pretraining with text-encoded taxonomic labels, even when scarce at fine-grained levels, further improves performance. We further demonstrate the effectiveness of our aligned embeddings in zero-shot image-to-DNA retrieval. Our BIOSCAN-1M and INSECT dataset experiments showcase the value of using barcode DNA as an alignment target. However, the availability of barcode DNA is limited (see Appendix D for discussion) compared to human-curated image datasets with taxonomic labels such as TreeOfLife-10M [61] and BioTrove [76]. It would be interesting to couple the rich information found in DNA with these datasets that include natural images, and go beyond insects. It is also possible to investigate other multi-modal learning schemes beyond CLIP. Overall, we believe that using DNA barcodes for improved representation of organism images is a promising avenue for future research. We hope that our work can stimulate the application of multimodal machine learning with barcode DNA to help build improved automated tools for biodiversity monitoring.
+
+# ACKNOWLEDGEMENT
+
+We acknowledge the support of the Government of Canada's New Frontiers in Research Fund (NFRF) [NFRFT-2020-00073]. AXC and GWT are also supported by Canada CIFAR AI Chair grants. JBH is supported by the Pioneer Centre for AI (DNRF grant number P1). This research was enabled in part by support provided by the Digital Research Alliance of Canada (alliancecan.ca). We also thank Mrinal Goshalia and Kian Hosseinkhani for testing the code, Han-Hung Lee and Yiming Zhang for helpful discussions, and Manolis Savva for proofreading and feedback.
+
+# REFERENCES
+
+[1] Samira Abnar and Willem Zuidema. Quantifying attention flow in transformers. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (ACL), 2020. doi:10.18653/v1/2020.acl-main.385.
+[2] Pablo Millan Arias, Niousha Sadjadi, Monireh Safari, ZeMing Gong, Austin T. Wang, Scott C. Lowe, Joakim Bruslund Haurum, Iuliia Zarubieva, Dirk Steinke, Lila Kari, Angel X. Chang, and Graham W. Taylor. BarcodeBERT: Transformers for biodiversity analysis. arXiv preprint arXiv:2311.02401, 2023. doi:10.48550/arxiv.2311.02401.
+[3] Žiga Avsec, Vikram Agarwal, Daniel Visentin, Joseph R Ledsam, Agnieszka Grabska-Barwinska, Kyle R Taylor, Yannis Assael, John Jumper, Pushmeet Kohli, and David R Kelley. Effective gene expression prediction from sequence by integrating long-range interactions. Nature methods, 18(10):1196-1203, Oct 2021. ISSN 1548-7105. doi:10.1038/s41592-021-01252-x.
+[4] Sarkhan Badirli, Zeynep Akata, George Mohler, Christine Picard, and Mehmet M Dundar. Fine-grained zero-shot learning with DNA as side information. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, volume 34, pp. 19352-19362. Curran Associates, Inc., 2021. URL https://proceedings.neurips.cc/paper_files/paper/2021/file/a18630ab1c3b9f14454cf70dc7114834-Paper.pdf.
+[5] Sarkhan Badirli, Christine Johanna Picard, George Mohler, Frannie Richert, Zeynep Akata, and Murat Dundar. Classifying the unknown: Insect identification with deep hierarchical Bayesian learning. Methods in Ecology and Evolution, 14(6):1515-1530, 2023. doi:10.1111/2041-210X.14104.
+[6] Dennis A Benson, Mark Cavanaugh, Karen Clark, Ilene Karsch-Mizrachi, David J Lipman, James Ostell, and Eric W Sayers. Genbank. Nucleic acids research, 41(D1):D36-D42, 2012. doi:10.1093/nar/gkab1135.
+[7] Thomas Berg, Jiongxin Liu, Seung Woo Lee, Michelle L Alexander, David W Jacobs, and Peter N Belhumeur. Birdsnap: Large-scale fine-grained visual categorization of birds. In IEEE Conference on Computer Vision and Pattern Recognition, pp. 2019-2026, 2014. doi:10.1109/CVPR.2014.259.
+[8] Samuel Cahyawijaya, Tiezheng Yu, Zihan Liu, Xiaopu Zhou, Tze Wing Tiffany Mak, Yuk Yu Nancy Ip, and Pascale Fung. SNP2Vec: Scalable self-supervised pre-training for genome-wide association study. In Dina Demner-Fushman, Kevin Bretonnel Cohen, Sophia Ananiadou, and Junichi Tsujii (eds.), Proceedings of the 21st Workshop on Biomedical Language Processing, pp. 140-154, Dublin, Ireland, May 2022. Association for Computational Linguistics. doi:10.18653/v1/2022.bionlp-1.14.
+[9] Xiaowei Cao, Jie Liu, Jian Chen, Guo Zheng, Matjaz Kuntner, and Ingi Agnarsson. Rapid dissemination of taxonomic discoveries based on DNA barcoding and morphology. *Scientific Reports*, 6(1):37066, 2016. doi:10.1038/srep37066.
+[10] Shilin Chen, Xianmei Yin, Jianping Han, Wei Sun, Hui Yao, Jingyuan Song, and Xiwen Li. DNA barcoding in herbal medicine: Retrospective and prospective. Journal of Pharmaceutical Analysis, 13(5): 431-441, 2023. doi:10.1016/j.jpha.2023.03.008.
+[11] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pp. 1597-1607. PMLR, 2020. URL https://proceedings.mlr.press/v119/chen20j/chen20j.pdf.
+[12] Zhentao Cheng, Qiang Li, Jun Deng, Qian Liu, and Xiaolei Huang. The devil is in the details: Problems in DNA barcoding practices indicated by systematic evaluation of insect barcodes. Frontiers in Ecology and Evolution, 11:1149839, 2023. doi:10.3389/fevo.2023.1149839.
+
+[13] Sylvain Christin, Éric Hervet, and Nicolas Lecomte. Applications for deep learning in ecology. Methods in Ecology and Evolution, 10(10):1632-1644, 2019. doi:10.1111/2041-210X.13256.
+[14] Elijah Cole, Xuan Yang, Kimberly Wilber, Oisin Mac Aodha, and Serge Belongie. When does contrastive visual representation learning work? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14755-14764, 2022. doi:10.1109/CVPR52688.2022.01434.
+[15] Hugo Dalla-Torre, Liam Gonzalez, Javier Mendoza-Revilla, Nicolas Lopez Carranza, Adam Henryk Grzywaczewski, Francesco Oteri, Christian Dallago, Evan Trop, Bernardo P de Almeida, Hassan Sirelkhatim, et al. The nucleotide transformer: Building and evaluating robust foundation models for human genomics. bioRxiv, pp. 2023–01, 2023. doi:10.1101/2023.01.11.523679.
+[16] Timothee Darcet, Maxime Oquab, Julien Mairal, and Piotr Bojanowski. Vision transformers need registers. In International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=2dnO3LLiJ1.
+[17] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In IEEE conference on computer vision and pattern recognition, pp. 248–255. IEEE, 2009. doi:10.1109/CVPR.2009.5206848.
+[18] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171–4186, Minneapolis, Minnesota, Jun 2019. Association for Computational Linguistics. doi:10.18653/v1/N19-1423.
+[19] Jeremy R DeWaard, Sujeevan Ratnasingham, Evgeny V Zakharov, Alex V Borisenko, Dirk Steinke, Angela C Telfer, Kate HJ Perez, Jayme E Sones, Monica R Young, Valerie Levesque-Beaudin, et al. A reference library for Canadian invertebrates with 1.5 million barcodes, voucher specimens, and DNA samples. Scientific data, 6(1):308, 2019. doi:10.1038/s41597-019-0320-2.
+[20] Angela Di Pinto, Pietro Di Pinto, Valentina Terio, Giancarlo Bozzo, Elisabetta Bonerba, Edmondo Ceci, and Giuseppina Tantillo. DNA barcoding for detecting market substitution in salted cod fillets and battered cod chunks. Food chemistry, 141(3):1757-1762, 2013. doi:10.1016/j.foodchem.2013.05.093.
+[21] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=YicbFdNTTy.
+[22] Camille Garcin, Alexis Joly, Pierre Bonnet, Antoine Affouard, Jean-Christophe Lombardo, Mathias Chouet, Maximilien Servajean, Titouan Lorieul, and Joseph Salmon. Pl@ntNet300K: a plant image dataset with high label ambiguity and a long-tailed distribution. In J. Vanschoeren and S. Yeung (eds.), Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, volume 1. Curran Associates, Inc., 2021. URL https://datasets-benchmarks-proceedings.neurips.cc/paper_files/paper/2021/file/7e7757b1e12abcb736ab9a754ffb617a-Paper-round2.pdf.
+[23] Zahra Gharaee, ZeMing Gong, Nicholas Pellegrino, Iuliia Zarubieva, Joakim Bruslund Haurum, Scott Lowe, Jaclyn McKeown, Chris Ho, Joschka McLeod, Yi-Yun Wei, Jireh Agda, Sujeevan Ratnasingham, Dirk Steinke, Angel Chang, Graham W Taylor, and Paul Fieguth. A step towards worldwide biodiversity assessment: The BIOSCAN-1M insect dataset. In A. Oh, T. Neumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 43593-43619. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/87dbbbdc3a685a97ad28489a1d57c45c1-Paper-Datasets_and_Benchmarks.pdf.
+[24] Zahra Gharaee, Scott C. Lowe, ZeMing Gong, Pablo Millan Arias, Nicholas Pellegrino, Austin T. Wang, Joakim Bruslund Haurum, Iuliia Zarubieva, Lila Kari, Dirk Steinke, Graham W. Taylor, Paul Fieguth, and Angel X. Chang. BIOSCAN-5M: A multimodal dataset for insect biodiversity. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 36285–36313. Curran Associates, Inc., 2024. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/3fdbbb472813041c9ecef04c20c2b1e5a-Paper-Datasets_and_Benchmarks_Track.pdf.
+
+[25] Rohit Girdhar, Alaaeldin El-Nouby, Zhuang Liu, Mannat Singh, Kalyan Vasudev Alwala, Armand Joulin, and Ishan Misra. ImageBind: One embedding space to bind them all. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 15180-15190, Jun 2023. URL https://openaccess.thecvf.com/content/CVPR2023/html/Girdhar_ImageBind-One_Embedding_Space_To_Bind_Them_All_CVPR_2023_paper.html.
+[26] Paul D. N. Hebert, Alina Cywinska, Shelley L. Ball, and Jeremy R. deWaard. Biological identifications through DNA barcodes. Proceedings of the Royal Society of London. Series B: Biological Sciences, 270 (1512):313-321, 2003. doi:10.1098/rspb.2002.2218.
+[27] Rosalee S Hellberg, Brenda C Hernandez, and Eduardo L Hernandez. Identification of meat and poultry species in food products using DNA barcoding. Food Control, 80:23-28, 2017. doi:doi.org/10.1016/j.foodcont.2017.04.025.
+[28] Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=nZeVKeeFYf9.
+[29] Wisdom Ikezogwo, Saygin Seyfioglu, Fatemeh Ghezloo, Dylan Geva, Fatwir Sheikh Mohammed, Pavan Kumar Anand, Ranjay Krishna, and Linda Shapiro. *Quilt-1M: One million image-text pairs for histopathology*. In A. Oh, T. Neumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), *Advances in Neural Information Processing Systems*, volume 36, pp. 37995–38017. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/775ec578876fa6812c062644964b9870-Paper-Datasets_and_Benchmarks.pdf.
+[30] Gabriel Ilharco, Mitchell Wortsman, Ross Wightman, Cade Gordon, Nicholas Carlini, Rohan Taori, Achal Dave, Vaishaal Shankar, Hongseok Namkoong, John Miller, Hannaneh Hajishirzi, Ali Farhadi, and Ludwig Schmidt. Openclip, Jul 2021. URL https://doi.org/10.5281/zenodo.5143773.
+[31] Yanrong Ji, Zhihan Zhou, Han Liu, and Ramana V Davuluri. DNABERT: pre-trained bidirectional encoder representations from transformers model for DNA-language in genome. Bioinformatics, 37(15): 2112-2120, Feb 2021. ISSN 1367-4803. doi:10.1093/bioinformatics/btab083.
+[32] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In Proceedings of the 38th International Conference on Machine Learning, volume 139, pp. 4904-4916. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.org/press/v139/jia21b.html.
+[33] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. doi:10.48550/arXiv.1412.6980.
+[34] Nguyen Quoc Khanh Le, Quang-Thai Ho, Van-Nui Nguyen, and Jung-Su Chang. BERT-Promoter: An improved sequence-based predictor of DNA promoter using BERT pre-trained model and SHAP feature selection. Computational Biology and Chemistry, 99:107732, 2022. ISSN 1476-9271. doi:10.1016/j.compbiolchem.2022.107732.
+[35] Dohoon Lee, Jeewon Yang, and Sun Kim. Learning the histone codes with large genomic windows and three-dimensional chromatin interactions using transformer. Nature Communications, 13(1):6678, Nov 2022. ISSN 2041-1723. doi:10.1038/s41467-022-34152-5.
+[36] Yuanheng Li, Christian Devenish, Marie I Tosa, Mingjie Luo, David M Bell, Damon B Lesmeister, Paul Greenfield, Maximilian Pichler, Taal Levi, and Douglas W Yu. Combining environmental DNA and remote sensing for efficient, fine-scale mapping of arthropod biodiversity. Philosophical Transactions of the Royal Society B, 379(1904):20230123, 2024. doi:10.1098/rstb.2023.0123.
+[37] Zhongxiao Li, Elva Gao, Juexiao Zhou, Wenkai Han, Xiaopeng Xu, and Xin Gao. Applications of deep learning in understanding gene regulation. Cell Reports Methods, 3(1):100384, 2023. ISSN 2667-2375. doi:10.1016/j.crmeth.2022.100384.
+[38] Carlos Lopez-Vaamonde, Natalia Kirichenko, Alain Cama, Camiel Doorenweerd, H Charles J Godfray, Antoine Guiguet, Stanislav Gomboc, Peter Huemer, Jean-François Landry, Ales Lašúvka, et al. Evaluating DNA barcoding for species identification and discovery in european gracillariid moths. Frontiers in Ecology and Evolution, 9:626752, 2021. doi:10.3389/fevo.2021.626752.
+[39] Ming Y Lu, Bowen Chen, Drew FK Williamson, Richard J Chen, Ivy Liang, Tong Ding, Guillaume Jaume, Igor Odintsov, Andrew Zhang, Long Phi Le, et al. Towards a visual-language foundation model for computational pathology. arXiv preprint arXiv:2307.12914, 2023. doi:10.48550/arxiv.2307.12914.
+
+[40] D. H. Lunt, D.-X. Zhang, J. M. Szymura, and O. M. Hewltt. The insect cytochrome oxidase I gene: evolutionary patterns and conserved primers for phylogenetic studies. Insect Molecular Biology, 5(3): 153-165, 1996. doi:10.1111/j.1365-2583.1996.tb00049.x.
+[41] Chloé Martineau, Donatello Conte, Romain Raveaux, Ingrid Arnault, Damien Munier, and Gilles Venturini. A survey on image-based insect classification. Pattern Recognition, 65:273-284, 2017. ISSN 0031-3203. doi:10.1016/j.patcog.2016.12.020.
+[42] Leland McInnes, John Healy, and James Melville. UMAP: Uniform manifold approximation and projection for dimension reduction. arXiv preprint arXiv:1802.03426, 2018. doi:10.48550/arXiv.1802.03426.
+[43] Christopher P. Meyer and Gustav Paulay. DNA barcodes perform best with well-characterized taxa. PLOS Biology, 3:435, 2005. doi:10.1371/journal.pbio.0030435.
+[44] Wenwen Min, Zhiceng Shi, Jun Zhang, Jun Wan, and Changmiao Wang. Multimodal contrastive learning for spatial gene expression prediction using histology images. arXiv preprint arXiv:2407.08216, 2024. doi:10.48550/arXiv.2407.08216.
+[45] Florian Mock, Fleming Kretschmer, Anton Kriese, Sebastian Böcker, and Manja Marz. Taxonomic classification of DNA sequences beyond sequence similarity using deep neural networks. Proceedings of the National Academy of Sciences, 119(35):e2122636119, 2022. doi:10.1073/pnas.2122636119.
+[46] Marko Mutanen, Lauri Kaila, and Jukka Tabell. Wide-ranging barcoding aids discovery of one-third increase of species richness in presumably well-investigated moths. Scientific Reports, 3(1):2901, 2013. doi:10.1038/srep02901.
+[47] Eric Nguyen, Michael Poli, Marjan Faizi, Armin Thomas, Michael Wornow, Callum Birch-Sykes, Stefano Massaroli, Aman Patel, Clayton Rabideau, Yoshua Bengio, Stefano Ermon, Christopher Ré, and Stephen Baccus. HyenaDNA: Long-range genomic sequence modeling at single nucleotide resolution. In A. Oh, T. Neumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 43177-43201. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/86ab6927ee4ae9bde4247793c46797c7-Paper-Conference.pdf.
+[48] Hoang-Quan Nguyen, Thanh-Dat Truong, Xuan Bac Nguyen, Ashley Dowling, Xin Li, and Khoa Luu. Insect-Foundation: A foundation model and large-scale IM dataset for visual insect understanding. arXiv preprint arXiv:2311.15206, 2023. doi:10.48550/arxiv.2311.15206.
+[49] Francois Pompanon, Bruce E Deagle, William OC Symondson, David S Brown, Simon N Jarman, and Pierre Taberlet. Who is eating what: diet assessment using next generation sequencing. Molecular ecology, 21(8):1931-1950, 2012. doi:10.1111/j.1365-294X.2011.05403.x.
+[50] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Marina Meila and Tong Zhang (eds.), Proceedings of the International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8748-8763. PMLR, 18-24 Jul 2021. URL https://proceedings.mlr.press/v139/radford21a.html.
+[51] Sujeevan Ratnasingham and Paul DN Hebert. BOLD: The barcode of life data system. Molecular ecology notes, 7(3):355-364, 2007. doi:10.1111/j.1471-8286.2007.01678.x.
+[52] Sujeevan Ratnasingham and Paul DN Hebert. A DNA-based registry for all animal species: the barcode index number (BIN) system. PloS one, 8(7):e66213, 2013. doi:10.1371/journal.pone.0066213.
+[53] Marko Ristin, Juergen Gall, Matthieu Guillaumin, and Luc Van Gool. From categories to subcategories: large-scale image classification with partial class label refinement. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 231-239, Jun 2015. doi:10.1109/CVPR.2015.7298619.
+[54] Luuk Romeijn, Andrius Bernatavicius, and Duong Vu. MycoAI: Fast and accurate taxonomic classification for fungal ITS sequences. Molecular Ecology Resources, pp. e14006, 2024. doi:10.1111/1755-0998.14006.
+[55] Yue Ruan, Han-Hung Lee, Yiming Zhang, Ke Zhang, and Angel X Chang. TriCoLo: Trimodal contrastive loss for text to shape retrieval. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 5815-5825, 2024. doi:10.1109/WACV57701.2024.00571.
+
+[56] Krista M. Ruppert, Richard J. Kline, and Md Saydur Rahman. Past, present, and future perspectives of environmental DNA (eDNA) metabarcoding: A systematic review in methods, monitoring, and applications of global eDNA. Global Ecology and Conservation, 17:e00547, 2019. ISSN 2351-9894. doi:10.1016/j.gecco.2019.e00547.
+[57] Leslie N. Smith. A disciplined approach to neural network hyper-parameters: Part 1 - learning rate, batch size, momentum, and weight decay. arXiv preprint arXiv:1803.09820, 2018. doi:10.48550/arXiv.1803.09820.
+[58] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper_files/paper/2016/file/6b180037abbebea991d8b1232f8a8ca9-Paper.pdf.
+[59] Eeva M Soininen, Alice Valentini, Eric Coissac, Christian Miquel, Ludovic Gielly, Christian Brochmann, Anne K Brysting, Jørn H Snstebø, Rolf A Ims, Nigel G Yoccoz, et al. Analysing diet of small herbivores: the efficiency of DNA barcoding coupled with high-throughput pyrosequencing for deciphering the composition of complex plant mixtures. Frontiers in zoology, 6:1-9, 2009. doi:10.1186/1742-9994-6-16.
+[60] Dirk Steinke, Sujeevan Ratnasingham, Jireh Agda, Hamzah Ait Boutou, Isaiah C. H. Box, Mary Boyle, Dean Chan, Corey Feng, Scott C. Lowe, Jaclyn T. A. McKeown, Joschka McLeod, Alan Sanchez, Ian Smith, Spencer Walker, Catherine Y.-Y. Wei, and Paul D. N. Hebert. Towards a taxonomy machine: A training set of 5.6 million arthropod images. Data, 9(11), 2024. ISSN 2306-5729. doi:10.3390/data9110122.
+[61] S. Stevens, J. Wu, M. J. Thompson, E. G. Campolongo, C. Song, D. Carlyn, L. Dong, W. M. Dahdul, C. Stewart, T. Berger-Wolf, W. Chao, and Y. Su. BioCLIP: A vision foundation model for the tree of life. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 19412-19424, Los Alamitos, CA, USA, Jun 2024. IEEE Computer Society. doi:10.1109/CVPR52733.2024.01836.
+[62] Nigel E Stork. How many species of insects and other terrestrial arthropods are there on Earth? Annual review of entomology, 63(1):31-45, 2018. doi:10.1146/annurev-ento-020117-043348. PMID: 28938083.
+[63] Fariborz Taherkhani, Hadi Kazemi, Ali Dabouei, Jeremy Dawson, and Nasser M. Nasrabadi. A weakly supervised fine label classifier enhanced by coarse supervision. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pp. 6459-6468, Oct 2019. doi:10.1109/ICCV.2019.00656.
+[64] Aiham Taleb, Matthias Kirchler, Remo Monti, and Christoph Lippert. ContIG: Self-supervised multimodal contrastive learning for medical imaging with genetics. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 20908-20921, 2022. doi:10.1109/CVPR52688.2022.02024.
+[65] Christina V. Theodoris, Ling Xiao, Anant Chopra, Mark D. Chaffin, Zeina R. Al Sayed, Matthew C. Hill, Helene Mantineo, Elizabeth M. Brydon, Zexian Zeng, X. Shirley Liu, and Patrick T. Ellinor. Transfer learning enables predictions in network biology. Nature, 618(7965):616-624, Jun 2023. ISSN 1476-4687. doi:10.1038/s41586-023-06139-9.
+[66] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. YFCC100M: The new data in multimedia research. Communications of the ACM, 59(2):64-73, 2016. ISSN 0001-0782. doi:10.1145/2812802.
+[67] Hugo Touvron, Alexandre Sablayrolles, Matthijs Douze, Matthieu Cord, and Hervé Jégou. Graft: Learning fine-grained image representations with coarse labels. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 874-884, Oct 2021. doi:10.1109/ICCV48922.2021.00091.
+[68] Iulia Turc, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Well-read students learn better: On the importance of pre-training compact models. arXiv preprint arXiv:1908.08962, 2019. doi:10.48550/axiv.1908.08962.
+[69] Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The iNaturalist species classification and detection dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 8769-8778, 2018. doi:10.1109/CVPR.2018.00914.
+[70] Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: a good closed-set classifier is all you need? In 10th International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=5hLP5JY9S2d.
+
+[71] Yunhao Wang, Yue Zhao, Audrey Bollas, Yuru Wang, and Kin Fai Au. Nanopore sequencing technology, bioinformatics and applications. Nature biotechnology, 39(11):1348-1365, 2021. doi:10.1038/s41587-021-01108-x.
+[72] Xiu-Shen Wei, Yi-Zhe Song, Oisin Mac Aodha, Jianxin Wu, Yuxin Peng, Jinhui Tang, Jian Yang, and Serge Belongie. Fine-grained image analysis with deep learning: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(12):8927-8948, 2022. doi:10.1109/TPAMI.2021.3126648.
+[73] Ross Wightman. Pytorch image models. https://github.com/rwrightman/pytorch-image-models, 2019.
+[74] Tete Xiao, Xiaolong Wang, Alexei A Efros, and Trevor Darrell. What should not be contrastive in contrastive learning. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=CZ8Y3NzuVzO.
+[75] Ronald Xie, Kuan Pang, Sai Chung, Catia Perciani, Sonya MacParland, Bo Wang, and Gary Bader. Spatially resolved gene expression prediction from histology images via bi-modal contrastive learning. In A. Oh, T. Naumann, A. Globerson, K. Saenko, M. Hardt, and S. Levine (eds.), Advances in Neural Information Processing Systems, volume 36, pp. 70626-70637. Curran Associates, Inc., 2023. URL https://proceedings.neurips.cc/paper_files/paper/2023/file/df656d6ed77b565e8dcdfbf568aead0a-Paper-Conference.pdf.
+[76] Chih-Hsuan Yang, Benjamin Feuer, Talukder "Zaki" Jubery, Zi Deng, Andre Nakkab, Md Zahid Hasan, Shivani Chiranjeevi, Kelly Marshall, Nirmal Baishnab, Asheesh Singh, ARTI SINGH, Soumik Sarkar, Nirav Merchant, Chinmay Hegde, and Baskar Ganapathysubramanian. BioTrove: A large curated image dataset enabling AI for biodiversity. In A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (eds.), Advances in Neural Information Processing Systems, volume 37, pp. 102101-102120. Curran Associates, Inc., 2024. URL https://proceedings.neurips.cc/paper_files/paper/2024/file/b92854f80ba4feefb973959b259dbc2c-Paper-Datasets_and_Benchmarks_Track.pdf.
+[77] Sheng Zhang, Yanbo Xu, Naoto Usuyama, Hanwen Xu, Jaspreet Bagga, Robert Tinn, Sam Preston, Rajesh Rao, Mu Wei, Naveen Valluri, Cliff Wong, Andrea Tupini, Yu Wang, Matt Mazzola, Swadheen Shukla, Lars Liden, Jianfeng Gao, Matthew P. Lungren, Tristan Naumann, Sheng Wang, and Hoifung Poon. BiomedCLIP: a multimodal biomedical foundation model pretrained from fifteen million scientific image-text pairs. arXiv preprint arXiv:2303.00915, 2024. doi:10.48550/axiv.2303.00915.
+[78] Yuhao Zhang, Hang Jiang, Yasuhide Miura, Christopher D. Manning, and Curtis P. Langlotz. Contrastive learning of medical visual representations from paired images and text. In Zachary Lipton, Rajesh Ranganath, Mark Sendak, Michael Sjoding, and Serena Yeung (eds.), Proceedings of the 7th Machine Learning for Healthcare Conference, volume 182 of Proceedings of Machine Learning Research, pp. 2-25. PMLR, 05-06 Aug 2022. URL https://proceedings.mlr.press/v182/zhang22a.html.
+[79] Zhihan Zhou, Yanrong Ji, Weijian Li, Pratik Dutta, Ramana V Davuluri, and Han Liu. DNABERT-2: Efficient foundation model and benchmark for multi-species genomes. In International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=oMLQB4EZE1.
+[80] Zhihan Zhou, Weimin Wu, Harrison Ho, Jiayi Wang, Lizhen Shi, Ramana V Davuluri, Zhong Wang, and Han Liu. DNABERT-S: Learning species-aware DNA embedding with genome foundation models. arXiv preprint arXiv:2402.08777, 2024. doi:10.48550/axiv.2402.08777.
+[81] Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In IEEE International Conference on Computer Vision (ICCV), pp. 19-27, Los Alamitos, CA, USA, Dec 2015. IEEE Computer Society. doi:10.1109/ICCV.2015.11.
+
+# APPENDICES
+
+We provide additional details on how we obtain our data split (Appendix A), additional results (Appendix B) on the validation set, using different image and text encoders, additional details about the cross-modal experiments, and visualize the embedding space. We also include experiments with hyperparameter settings such as the use of automatic mixed precision and batch size (Appendix C). In Appendix D, we provide additional information on the utility and cost of DNA barcodes.
+
+# A ADDITIONAL DATA DETAILS
+
+
+Figure 7: Data partitioning strategy. We first partition species among the splits based on the presence of a species label and the number of records per species, and then each species is designated as seen or unseen. Records from each species are then partitioned among train (blue), validation (orange), and test (green). For the validation and test sets, some records are used as queries, and the rest are used as keys for the reference database for retrieval.
+
+Data partitioning process. We use a multi-stage process to establish our split of BIOSCAN-1M [23] for our experiments (see Figure 7). Firstly, we separate records with and without species labels. Any record without a species label is allocated for pretraining, as we cannot easily use them during evaluation. Of the remaining records with labelled species, we partition species based on their number of samples. Species with at least 9 records are allocated 80/20 to seen and unseen, with unseen records split evenly between validation and test. Species with 2 to 8 records are used only as unseen species, with a partition of 50/50 between validation and test. This allows us to simulate real-world scenarios, in which most of our unseen species are represented only by a few records, ensuring a realistic distribution of species sets. Species with only one record are excluded, as we need at least one record each to act the query and the key, respectively.
+
+Finally, we allocate the records within each species into designated partitions. For the seen species, we subdivide the records at a 70/10/10/10 ratio into train/val/test/key, where the keys for the seen species are shared across all splits. The unseen species for each of validation and test are split evenly between queries and keys. The allocation of queries and keys ensures that we have clearly designated samples as inputs and target references for inference. We note that some samples in our data may have the exact same barcode even though the image may differ.
+
+Data statistics. As a result of this process, we obtain a seen split with 916 species, and unseen val and test splits with 1771 and and 1772 species respectively (see Figure 2 in the main paper). We present the number of species and the distribution of records across species (Figure 8) and the average number of records per taxa level (Table 5). In Figure 8, we show the number of records for
+
+
+Figure 8: Distribution of number of records per species for our BIOSCAN-1M train, query and key splits. We show the seen and unseen species in blue and orange, with the intensity of the color indicating the number of records for that species. Note that the seen species are shared across train, val, test while the val and test unseen species are distinct from each other. From the distribution, we see that most of the species in the unseen splits have fewer than 10 records (light orange).
+
+Table 5: Data statistics. Average number of records per taxa level. Note that the seen and unseen species are distinct, but there is overlap at other levels of the taxa (order, family, genus) between seen and unseen species.
+
+
Train
Species seen
Species unseen
Key
Val Query
Test Query
Val Key
Val Query
Test Key
Test Query
order
60007.72
634.80
487.60
487.60
545.71
496.29
593.58
537.33
family
2305.88
41.75
33.74
33.74
38.99
36.34
34.89
31.25
genus
85.63
6.10
5.17
5.17
4.98
4.73
4.56
4.36
species
21.79
2.06
1.99
1.99
1.92
1.92
1.70
1.69
+
+each species by color intensity, with lighter hues for species with fewer records and darker hues for species with more records. Due to the long-tailed distribution of species, there are just a few species with a large number of records, and most species with just a few records. This is especially true for the unseen split, where $90\%$ of species have 4 or less records. Similarly, we see from Table 5 that each species has an average of only 1 to 2 samples in the query set or the key set.
+
+In Table 6, we present the number of classes at different taxonomy levels. Specifically, we show the overlap of classes between the seen and unseen sets at various levels. We separate the statistics for records that do not have any species labels (which go into the pretrain split), and the those that are used to establish the train/val/test splits. Note that in the pretrain split, the statistics are lower bounds at the genus and species level as records are missing the species label and potential genus label as well. Due to our data division method, there is no overlap at the species level. However, for higher taxonomic levels there are overlaps. As the taxonomy level increases from genus to order, the proportion of overlapping classes gradually increases, representing a larger percentage of the total number of classes at each level.
+
+Task difficulty. To understand the difficulty of classification at different levels of the taxonomy, we consider the performance of a simple majority baseline classifier. In Table 7, we present the micro
+
+Table 6: Taxa overlap between seen and unseen species. Overlap at different levels of the taxa (order, family, genus) between seen and unseen species. We separately report the statistics for records without species labels (which form the pretrain set), and those that we used to build our train/val/test set. Note that for the pretrain split, the number of classes at the genus and species level are lower bounds, as some labels are missing. Gray highlight indicate number of classes at each taxonomy level for either seen or unseen. Cyan highlight indicate the number of classes that overlap at that level across seen / unseen.
+
+
total
Pretrain (no species)
Train/val/test
seen
unseen
overlap
seen
unseen
overlap
order
19
10
13
10
10
14
10
family
479
129
219
112
132
239
113
genus
2731
351
686
234
521
1400
279
species
4459
0
0
0
916
3543
0
+
+Table 7: Chance performance. Performance for most frequent class baseline for micro-accuracy and chance performance (random class) for macro-accuracy $(\%)$ .
+
+
Micro
Macro
Seen val/test
Unseen val
test
H.M.
Seen val/test
Unseen val
test
H.M. val
test
Order
76.32
58.46
57.27
66.21
65.44
10.00
7.14
8.33
9.09
7.69
Family
15.33
24.64
19.12
18.90
17.02
0.76
0.58
0.55
0.63
0.56
Genus
7.46
24.17
18.55
11.40
10.64
0.19
0.12
0.12
0.14
0.12
Species
5.21
19.52
12.14
8.22
7.29
0.11
0.06
0.06
0.07
0.06
+
+and macro accuracy when the most frequent class at each taxonomy level is chosen for prediction. The macro accuracy is the same as chance performance of selecting a class at random, while the micro accuracy depends on the fraction of records with the most frequent class. The significant difference between micro and macro accuracy indicates the large class imbalance in our dataset. This imbalance reflects the phenomenon that some categories are more common than others in nature as well as the sampling bias present in data collection efforts.
+
+# B ADDITIONAL EXPERIMENTS
+
+In this section, we include additional experimental results and visualizations. We provide additional results on BIOSCAN-1M (Appendix B.1) and image to DNA retrieval results (Appendix B.2). We also visualize the aligned embedding space (Appendix B.3) to show the model's capability in integrating and representing diverse biological data, and more attention visualizations (Appendix B.4).
+
+# B.1 ADDITIONAL CLASSIFICATION RESULTS ON BIOSCAN-1M
+
+Table 8: Top-1 micro accuracy (%) on our test set for BIOSCAN-1M and different combinations of aligned embeddings (image, DNA, text) during contrastive training. We show results for using image-to-image, DNA-to-DNA, and image-to-DNA query and key combinations. As a baseline, we show the results prior to contrastive learning (uni-modal pretrained models without cross-modal alignment). We report the accuracy for seen and unseen species, and the harmonic mean (H.M.) between these (bold: highest acc, italic: second highest acc.). We also compare against unimodal training using SimCLR ( $2^{\text{nd}}$ row in each taxa, indicated with $\sqrt{*}$ ).
+
+
Taxa
Aligned embeddings
DNA-to-DNA
Image-to-Image
Image-to-DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
99.1
98.5
98.8
88.8
90.8
89.8
10.5
11.0
10.7
✓*
—
—
—
94.4
94.1
94.3
—
—
—
✓
✓
—
—
—
99.7
99.6
99.6
—
—
—
✓
✓
100.0
100.0
100.0
99.6
99.7
99.6
99.7
98.9
99.3
✓
✓
✓
100.0
100.0
100.0
99.7
99.6
99.6
99.7
99.3
99.5
Family
96.2
93.8
95.0
52.9
60.0
56.2
1.0
1.1
1.0
✓*
—
—
—
67.5
69.7
68.6
—
—
—
✓
✓
—
—
—
95.7
92.2
93.9
—
—
—
✓
✓
99.8
99.2
99.5
95.9
93.1
94.5
95.8
84.6
89.9
✓
✓
✓
100.0
99.5
99.7
96.2
93.7
94.9
96.5
87.1
91.6
Genus
93.4
89.0
91.1
30.1
38.7
33.9
0.2
0.1
0.1
✓*
—
—
—
43.2
48.9
45.9
—
—
—
✓
✓
—
—
—
87.2
77.1
81.8
—
—
—
✓
✓
99.2
96.9
98.0
88.6
82.1
85.2
87.8
51.3
64.8
✓
✓
✓
99.5
97.9
98.7
89.3
82.3
85.7
87.6
54.9
67.5
Species
90.4
84.6
87.4
18.1
26.8
21.6
0.1
0.1
0.1
✓*
—
—
—
28.5
36.2
31.9
—
—
—
✓
✓
—
—
—
76.2
61.9
68.3
—
—
—
✓
✓
97.9
94.8
96.3
79.2
70.0
74.3
75.1
25.2
37.7
✓
✓
✓
98.4
96.3
97.3
79.6
69.7
74.3
74.2
27.8
40.4
+
+Table 9: Top-1 macro accuracy (%) on our val set for BIOSCAN-1M and different combinations of aligned embeddings (image, DNA, text) during contrastive training. We show results for using image-to-image, DNA-to-DNA, and image-to-DNA query and key combinations. As a baseline, we show the results prior to contrastive learning (uni-modal pretrained models without cross-modal alignment), and unimodal training using SimCLR $(\checkmark^{*})$ . We report the accuracy for seen and unseen species, and the harmonic mean (H.M.) between these (bold: highest acc, italic: second highest acc.).
+
+
Taxa
Aligned embeddings
DNA-to-DNA
Image-to-Image
Image-to-DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
98.6
81.5
89.2
54.5
39.7
45.9
8.4
6.0
7.0
✓*
—
—
—
59.6
55.4
57.4
—
—
—
✓
✓
—
—
—
89.2
85.9
87.5
—
—
—
✓
✓
100.0
100.0
100.0
99.5
94.1
96.7
99.5
72.0
83.5
✓
✓
✓
100.0
100.0
100.0
98.6
96.1
97.3
99.2
76.0
86.1
Family
87.0
75.8
81.0
29.3
23.4
26.0
0.5
0.5
0.5
✓*
—
—
—
39.9
31.0
34.9
—
—
—
✓
✓
—
—
—
90.1
74.7
81.7
—
—
—
✓
✓
99.9
96.4
98.1
89.6
78.6
83.7
92.2
48.5
63.6
✓
✓
✓
100.0
97.9
98.9
92.9
79.7
85.8
88.6
54.5
67.5
Genus
81.2
67.4
73.7
13.8
11.4
12.5
0.1
0.0
0.0
✓*
—
—
—
23.3
17.3
19.9
—
✓
✓
—
—
—
69.7
53.1
60.3
—
—
—
✓
✓
98.1
93.1
95.5
75.4
61.7
67.9
73.2
23.3
35.3
✓
✓
✓
99.0
95.7
97.3
76.0
63.1
69.0
68.6
25.5
37.2
Species
76.4
62.2
68.6
7.8
5.3
6.3
0.0
0.0
0.0
✓*
—
—
—
13.7
9.5
11.2
—
—
—
✓
✓
—
—
—
52.4
36.9
43.3
—
—
—
✓
✓
95.8
87.3
91.4
61.9
46.0
52.8
59.3
9.6
16.5
✓
✓
✓
97.1
90.2
93.5
60.2
46.5
52.5
52.1
10.3
17.2
+
+Table 10: Top-1 micro accuracy (%) on our val set for BIOSCAN-1M and different combinations of aligned embeddings (image, DNA, text) during contrastive training.
+
+
Taxa
Aligned embeddings
DNA-to-DNA
Image-to-Image
Image-to-DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
✘
99.2
98.4
98.8
89.3
90.7
90.0
32.2
29.8
31.0
✓*
—
—
—
94.2
94.3
94.2
—
—
—
✓
✓
—
—
—
99.7
99.6
99.6
—
—
—
✓
✓
100.0
100.0
100.0
99.7
99.6
99.6
99.6
98.9
99.2
✓
✓
✓
100.0
100.0
100.0
99.7
99.5
99.6
99.7
99.0
99.3
Family
✘
96.4
94.2
95.3
54.6
61.7
57.9
2.9
3.7
3.3
✓*
—
—
—
67.6
71.9
69.7
—
—
—
✓
✓
—
—
—
95.9
92.9
94.4
—
—
—
✓
✓
99.8
99.4
99.6
95.9
93.3
94.6
95.9
85.7
90.5
✓
✓
✓
100.0
99.7
99.8
96.5
94.3
95.4
96.5
86.8
91.4
Genus
✘
92.9
89.0
90.9
30.3
41.4
35.0
0.4
0.3
0.3
✓*
—
—
—
42.9
51.4
46.8
—
—
—
✓
✓
—
—
—
87.1
79.3
83.0
—
—
—
✓
✓
99.2
97.2
98.2
88.9
83.6
86.2
87.2
58.2
69.8
✓
✓
✓
99.5
98.2
98.8
89.6
84.5
87.0
86.4
59.8
70.7
Species
✘
89.5
84.8
87.1
18.1
31.6
23.0
0.1
0.1
0.1
✓*
—
—
—
28.4
41.1
33.6
—
—
—
✓
✓
—
—
—
76.1
68.0
71.8
—
—
—
✓
✓
98.1
95.2
96.6
79.7
74.0
76.7
75.4
38.8
51.2
✓
✓
✓
98.8
96.5
97.6
80.0
74.3
77.0
73.3
39.6
51.4
+
+Results for top-1 micro-accuracy and validation set. For completeness, we provide the top 1 micro-accuracy on the test set (Table 8), and results on the validation set (see Table 9 for macro accuracy, and Table 10 for micro accuracy).
+
+Overall, we see a similar trend in results as for macro accuracy on the test set (see Table 1 in the main paper), with the trimodal model that aligns image (I), DNA (D), and text (T) performing the best, and the I+D model outperforming the I+T model. We also observe that the micro averages (over individual samples) are much higher than the macro averages (over classes). This is expected as the rare classes are more challenging and pulls down the macro-average.
+
+We further examine the reproducibility of our results across training runs. In Figure 9, we plot the mean and standard deviation of the micro and macro accuracy evaluated on our BIOSCAN-1M validation set after training with four different random seeds. The results indicate that although there is some fluctuation, the results are mostly stable across training runs. As expected, we observe higher variation for macro accuracy as there are many classes with only a few query records (see Figure 8). There is also more variation for image-to-DNA, where the embeddings are less aligned.
+
+
+Figure 9: Performance across four training runs for our $\mathrm{I + D + T}$ model that aligns all three embeddings during contrastive training. We plot the mean with the shaded regions for standard error for top-1 macro and micro accuracy (\%) on our val set for BIOSCAN-1M. These plots clearly show that accuracy drops as we go from order to species, and that DNA-to-DNA retrieval is the most accurate with image-to-image second. Overall, the standard error is within $0.5\%$ for the micro accuracy, with higher variation in the image-to-DNA setting.
+
+
+
+Unimodal contrastive loss. To check whether the improved unimodal performance is a result of cross-modal contrastive learning between DNA and image, or just an artifact of training on the domain-specific data, we conduct experiments comparing our results with fine-tuning the image encoder with unimodal contrastive learning. We use SimCLR-style [11] training on the image encoder with normalized temperature scaled cross-entropy loss (NT-XEnt), and form positive pairs by using data augmentation. For data augmentation, we used the same set of augmentations as [11] by following SimCLR's code, which focused on enhancing image variability. The augmentation process begins with randomly cropping the image to a size of 224, and includes random horizontal flips and random applications of color jitter with an $80\%$ probability. Additionally, images are converted to grayscale $20\%$ of the time, and Gaussian blur is applied with a kernel size equal to $10\%$ of the image size, which is 22 in our case.
+
+We see from the results (denoted by $\checkmark^{*}$ in Tables 1, 8, 9, and 10), that while SimCLR training improves performance for image-to-image accuracy, it greatly underperforms our CLIBD multimodal model that aligns image to DNA. This shows that while training on the BIOSCAN-1M dataset helps to improve the otherwise generic image encoder, the signal from other modalities has the greatest benefit to performance.
+
+# B.1.1 DIFFERENT TRAINING STRATEGIES
+
+CLIBD with SimCLR pretraining. We investigate whether starting with an image encoder that is already pretrained on BIOSCAN-1M images can improve the performance of our CLIBD model. In Table 11, we show that starting with a image encoder that is fine-tuned on BIOSCAN-1M using SimCLR, and then performing full CLIBD training (by aligning image, DNA, and taxonomic labels), we achieve improved image-to-image performance, and image-to-DNA performance at finer taxonomic levels.
+
+ImageBind-style alignment. To determine whether it is necessary to align all the modalities to each other, or whether it would be better use a ImageBind-style [25] training where we freeze the image and text encoders and align the DNA encoder. For these experiments, we use BioCLIP's image and text encoder (which are pre-aligned) and BarcodeBERT as DNA encoder.
+
+Table 11: Top-1 macro accuracy $(\%)$ on the test set of BIOSCAN-1M comparing starting with pre-trained image encoder that was fine-tuned using SimCLR (✓) or not $(\%)$ . We do full CLIBD training that align all three modalities (the I+D+T model).
+
+
Taxa
SimCLR
DNA-to-DNA
Image-to-Image
Image-to-DNA
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
✘
100.0
100.0
100.0
99.7
94.4
97.0
99.4
88.5
93.6
✓
100.0
100.0
100.0
99.7
98.9
99.3
99.6
75.3
84.8
Family
✘
100.0
98.3
99.1
90.9
81.8
86.1
90.8
50.1
64.6
✓
100.0
99.5
99.7
92.2
85.8
88.9
92.6
52.1
66.7
Genus
✘
98.2
94.7
96.4
74.6
60.4
66.8
70.6
20.8
32.1
✓
98.5
94.5
96.4
77.2
63.5
69.6
73.5
23.4
35.5
Species
✘
95.6
90.4
92.9
59.3
45.0
51.2
51.6
8.6
14.7
✓
95.7
89.8
92.7
62.2
47.9
54.1
56.5
9.7
16.5
+
+Table 12: Top-1 macro accuracy (%) on the test set of BIOSCAN-1M, binding DNA to frozen (*) image and text encoders. We compare binding only to the image (following ImageBind [25]) or aligning to both image and text. Here, we utilized BioCLIP's image and text encoders, with BarcodeBERT for DNA encoding.
+
+
Taxa
Bind to
Frozen
DNA-to-DNA
Image-to-Image
Image-to-DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
Image
*
*
100.0
100.0
100.0
88.5
86.0
87.2
87.8
64.8
74.6
Image & Text
*
*
100.0
100.0
100.0
88.5
86.0
87.2
88.7
71.9
79.4
Family
Image
*
*
100.0
97.6
98.8
84.3
68.4
75.5
79.6
43.1
55.9
Image & Text
*
*
100.0
97.2
98.6
84.3
68.4
75.5
78.1
45.4
57.5
Genus
Image
*
*
98.2
92.9
95.5
62.6
47.1
53.7
56.0
17.9
27.1
Image & Text
*
*
98.9
93.2
96.0
62.6
47.1
53.7
56.5
19.7
29.2
Species
Image
*
*
95.1
87.9
91.3
44.1
32.4
37.4
39.5
7.4
12.5
Image & Text
*
*
95.9
88.6
92.1
44.1
32.4
37.4
38.0
8.5
13.9
+
+The first approach follows the ImageBind paradigm, where the DNA encoder (BarcodeBERT) is aligned only to BioCLIP's image encoder. The second approach follows our CLIBD protocol and allows the unfrozen DNA encoder to align simultaneously with BioCLIP's image encoder and text encoder. The results show that allowing the DNA encoder to align to both the image and text encoders vs. just binding to the image encoder results in slightly higher performance. Compared to the results in Table 11, it is evident that these approaches underperform compared to our proposed method CLIBD across all query and key combinations. Note that since we start with BioCLIP's pretrained models, and since BioCLIP's training data includes BIOSCAN-1M, it is not guaranteed that unseen species labels are actually unseen during training.
+
+# B.1.2 COMPARISON WITH BIOCLIP
+
+Full taxonomic comparison with BioCLIP. In Table 13, we compare the performance of BioCLIP vs. CLIBD on classification for all four different taxonomic levels. We see that our CLIBD with I+T is able to outperform BioCLIP at every taxonomic level. From Table 1, we see that the I+D model can already outperform our I+T model. By incorporating DNA barcodes (I+D+T), we are able to achieve the best performance.
+
+# B.1.3 USING LARGER MODELS
+
+Experiments with OpenCLIP. We conduct experiments using OpenCLIP as our text and image encoder, as well as larger ViT and BERT models. We train our full trimodal model (with image, DNA, text alignment), and report the species-level top-1 macro accuracy on our validation set for BIOSCAN-1M in Table 14.
+
+Table 13: Comparison of top-1 macro-accuracy (\%) of BioCLIP and our CLIBD model on the test set, matching image embeddings (queries) against embeddings of different modalities for retrieval (image, DNA, and text keys). Note: the BioCLIP model [61] was trained on data that included BIOSCAN-1M but used different species splits, so it may have seen most of the unseen species during its training.
+
+
Taxon. level
Model
Aligned embeddings
Image-to-Image
Image-to-DNA
Image-to-Text
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
BioCLIP
✓
✓
73.3
69.2
71.2
—
—
—
38.6
35.5
37.0
CLIBD
✓
✓
99.6
97.4
98.5
—
—
—
99.6
77.4
87.1
CLIBD
✓
✓
✓
99.7
94.4
97.0
99.4
88.5
93.6
99.2
74.7
85.2
Family
BioCLIP
✓
✓
56.9
42.2
48.5
—
—
—
18.9
14.6
16.4
CLIBD
✓
✓
90.7
76.7
83.1
—
—
—
94.9
49.9
65.4
CLIBD
✓
✓
✓
90.9
81.8
86.1
90.8
50.1
64.6
95.8
50.9
66.5
Genus
BioCLIP
✓
✓
33.8
24.3
28.3
—
—
—
9.5
5.9
7.3
CLIBD
✓
✓
72.1
49.6
58.8
—
—
—
81.9
81.9
29.7
CLIBD
✓
✓
✓
74.6
60.4
66.8
70.6
20.8
32.1
83.0
21.6
34.3
Species
BioCLIP
✓
✓
20.4
14.8
17.1
—
—
—
4.2
3.1
3.6
CLIBD
✓
✓
54.2
33.6
41.5
—
—
—
57.6
4.6
8.5
CLIBD
✓
✓
✓
59.3
45.0
51.2
51.6
8.6
14.7
56.0
4.8
8.9
+
+Table 14: Species-level top-1 macro accuracy (\%) on our val set for BIOSCAN-1M with CLIBD using different image and text encoders. Results use image embedding to match against different embeddings for retrieval (Image, DNA, and Text). We compare using the OpenCLIP (OC) pretrained model with other models. For these experiments, we used OpenCLIP ViT-L/14 [30] which is pre-trained on OpenAI's dataset that combines multiple pre-existing image datasets such as YFCC100M [66]. For timm ViT-B/16 (vit_basePatch16_224) and timm ViT-L/16 (vit_largePatch16_224) [73] both are trained on ImageNet [17]. We also used bert-base-uncased as our text encoder, which was pretrained on BookCorpus [81]. For the DNA encoder, we use BarcodeBERT (except for the first row, where we do not align the DNA embeddings). We highlight in gray the setting that uses the same vision and text encoder that we used in our other experiments.
+
+
OC
Batch size
Epoch
Training time (per epoch)
Memory CUDA
Aligned embeddings
Image-to-Image
Image-to-DNA
Image-to-Text
Image
DNA
Text
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
✓
200
15
1.3 hour
70.1GB
OpenCLIP(L/14)
✓
OpenCLIP
54.4
36.7
43.8
—
—
—
53.9
7.1
12.6
✓
200
15
1.4 hour
84.1GB
OpenCLIP(L/14)
✓
OpenCLIP
56.8
41.1
47.7
36.4
9.0
14.4
51.2
7.5
13.0
X
200
15
1.5 hour
37.4GB
timm(B/16)
✓
BERT(small)
52.7
37.7
44.0
32.1
7.0
11.5
44.7
5.2
9.4
X
500
38
0.6 hour
82.1GB
timm(B/16)
✓
BERT(small)
57.8
40.2
47.5
44.5
9.8
16.0
51.4
6.1
10.9
X
200
15
1.5 hour
72.5GB
timm(L/16)
✓
BERT(base-uncased)
55.9
40.1
46.7
34.5
8.1
13.1
41.1
6.3
10.9
+
+We select OpenCLIP ViT-L/14 [30] as a representative of a pretrained vision-language model that is trained with contrastive loss. As the OpenCLIP model requires a large amount of memory, we use a batch size of 200. From Table 14, we see that using OpenCLIP (first two rows), we do achieve better performance (especially for image to text) compared to our choice of Timm VIT B/16 and BERT-small for the image and text encoder at batch size of 200 (row 3). To disentangle whether the better performance is from the prealigned image and text embeddings or from the larger model size, we compare with training with a larger batch size (with similar CUDA memory usage, row 4) and larger unaligned image and text encoder, e.g. Timm ViT-L/16 and Bert-Base (row 5). Using a larger batch size brings the image-to-image performance close to that of the model with OpenCLIP (row 2), and can be improved even further with larger batch size (see Table 20). However, the image-to-text performance is still lower, indicating that the pretrained aligned image-to-text model is helpful despite the domain gap between the taxonomic labels and the text that makes up most of the pretraining data for OpenCLIP.
+
+# B.2 ADDITIONAL CROSS-MODAL RETRIEVAL RESULTS
+
+Details about the seen/unseen classifier for the IS-DU strategy. For the NN classifier, we compute the cosine similarity of the image query features with the image features of the seen species. If the most similar image key has a similarity higher than threshold $t_1$ , it is considered seen. In the supervised fine-tuning approach, we add a linear classifier after the image encoder and fine-tune the encoder and classifier to predict the species out of the set of seen species. If the softmax probability exceeds $t_2$ , the image is classified as seen.
+
+We tuned $t_1$ and $t_2$ on the validation set using a uniform search over 1000 values between 0 and 1, maximizing the harmonic mean of the accuracy for seen and unseen species. We report the binary
+
+Table 15: Accuracy $(\%)$ of our I+D+T model in predicting whether an image query corresponds to a seen or unseen species, as a binary classification problem (evaluated on our BIOSCAN-1M test set). For the "DNA" strategy with nearest neighbour (NN), we use the nearest DNA feature to classify into seen or unseen. It serves as a form of "oracle" as it has access to the samples from unseen species. For the "IS+DU" strategy and NN, we threshold the highest cosine similarity score against image keys. For the supervised linear classifier (Linear), we threshold the confidence score of the prediction over seen species. We report accuracy for seen and unseen species, and their harmonic mean (H.M).
+
+
Method
Strategy
Seen
Unseen
H.M.
NN (oracle)
DNA
82.16
76.21
79.07
NN
IS+DU
83.29
76.83
79.93
Linear
IS+DU
73.27
85.14
78.76
+
+Table 16: Top-1 accuracy (%) on our BIOSCAN-1M test set using the Image+DNA+Text model with image query. We compare nearest neighbour (NN) using only DNA keys, vs. our two strategies to use Image key for seen and DNA key for Unseen, either NN or a supervised linear classifier. We also compare against BZSL [4] with our embeddings.
+
+
Taxa
Method
Strategy
Micro top-1 acc
Macro top-1 acc
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
NN
DNA
99.7
99.3
99.5
99.4
88.5
93.6
NN
IS+DU
99.4
99.2
99.3
99.3
89.3
94.1
Linear
IS+DU
99.5
99.2
99.3
99.3
88.3
93.5
BZSL
IS+DU
99.4
98.2
98.8
98.9
59.6
74.4
Family
NN
DNA
96.5
87.1
91.6
90.8
50.1
64.6
NN
IS+DU
94.6
87.1
90.7
83.0
52.6
64.4
Linear
IS+DU
94.7
87.0
90.7
82.8
51.2
63.3
BZSL
IS+DU
95.6
80.3
87.3
88.0
32.5
47.5
+
+classification results on our BIOSCAN-1M test set in Table 15. In these experiments, we use the $\mathrm{I + D + T}$ model with images as the queries.
+
+BSZL details In BZSL [4], the authors used a two-layer Bayesian model with features extracted from pretrained image and DNA encoders. The model relies on hyperparameters, which shape the size and scaling of the posterior distribution used in Bayesian inference and thus significantly affect its performance. Tuning the hyperparameters on the validation split of the INSECT dataset allows for a practitioner to tradeoff between accuracy for seen vs. unseen classes. In our experiments, we use the same search space as in the original paper for our hyperparameter tuning, which takes about 4 hours. We find that the resulting accuracy is volatile and that expanding the search space can lead to an impractical search time.
+
+Order and family results for BIOSCAN-1M. In Table 16, we report the performance of the direct image-to-DNA matching (NN with DNA), as well as our IS+DU strategy (with the NN and linear classifiers), as well as BZSL with embeddings from our CLIBD. In the IS-DU strategy, for both the NN and linear classifier, if a image is classified as seen, we will use image-to-image matching to identify the most similar key, and classify the species using that key. Otherwise, we match the image query features with the DNA key features for unseen species.
+
+Results show that at the order and family-level, direct image-to-DNA matching and NN with IS-DU gives the highest performance, with BZSL being the worst performing.
+
+# B.3 EMBEDDING SPACE VISUALIZATION
+
+To better understand the alignment of features in the embedding space, we visualize a mapping of the image, DNA, and text embeddings in Figure 10. We use UMAP [42] with a cosine similarity metric applied to the seen validation set to map the embeddings down to 2D space, and we mark points in the space based on their order classification. We show the embedding space before alignment (a),
+
+
+(a) No alignment
+
+
+(b) Align image and text
+
+
+(c) Align image and DNA
+
+
+(d) Align all three modalities
+Figure 10: Embedding visualization for order level. We visualize the embedding space with no alignment (a), image and text aligned (b), image and DNA aligned (c), and all three modalities aligned (d) over the seen validation set generated using UMAP on the image, DNA, and text embeddings, using a cosine similarity distance metric. Marker hue: order taxon. Marker lightness: data modality.
+
+Diptera-image
+Diptera-dna
+Diptera-text
+Psocodea-image
+Psocodea-dna
+Psocodea-text
+
+Lepidoptera-image
+Lepidoptera-dna
+Lepidoptera-text
+Thysanoptera-image
+Thysanoptera-dna
+Thysanoptera-text
+
+Hymenoptera-image
+Hymenoptera-dna
+Hymenoptera-text
+Trichoptera-image
+Trichoptera-dna
+Trichoptera-text
+
+Hemiptera-image
+Hemiptera-dna
+Hemiptera-text
+Plecoptera-image
+Plecoptera-dna
+Plecoptera-text
+
+$\bullet$ Coleoptera-image
+$\bullet$ Coleoptera-dna
+Coleoptera-text
+Neuroptera-image
+Neuroptera-dna
+Neuroptera-text
+
+with image and text (b), image and DNA (c), and all three modalities. We see that after aligning the modalities, samples for the same order (indicated by hue), from different modalities (indicated by lightness) tend to overlap each other. We observe that, for some orders, there are numerous outlier clusters spread out in the space. However, overall the orders demonstrate some degree of clustering together, with image and DNA features close to one another within their respective clusters. Furthermore, we note the text embeddings tend to lie within the Image or (more often) DNA clusters, suggesting a good alignment between text and other modalities.
+
+# B.4 ATTENTION MAP VISUALIZATION
+
+We provide more attention map visualization samples in Figure 11, Figure 12 and Figure 13, including both success cases and failure cases. Beneath each attention map, we show the closest retrieval for that model. From the figure, we see that the retrieved images are all highly similar to the query image. This illustrates the challenges of using image alone to perform taxonomic classification.
+
+# C IMPLEMENTATION DETAILS AND HYPERPARAMETER SELECTION
+
+In this section, we provide experiments to validate the choice of hyperparameter settings and design choices we made for efficient training of our model.
+
+
+Figure 11: We visualize the attention and the nearest retrievals for queries from seen and unseen species. Predicted genera + species are indicated green text for correct, red for incorrect. Here, we present the cases where only the $\mathrm{I} + \mathrm{D} + \mathrm{T}$ (Image+DNA+Text) model gives the correct results. In these cases, the attention map of the $\mathrm{I} + \mathrm{D} + \mathrm{T}$ model's image encoder activates well on the model's prediction results, while the other models largely do not attend visually to the entire insect.
+
+# C.1 TRAINABLE VS FIXED TEMPERATURE
+
+We compare using a fixed temperature for the contrastive loss vs using trainable temperature (Table 17). We find that using the trainable temperature helps improve the performance, provided the model is trained for enough epochs.
+
+# C.2 AUTOMATIC MIXED PRECISION
+
+For efficient training with large batch sizes, we use automatic mixed precision (AMP) with the bfloat16 data type. The bfloat16 data type gives a similar dynamic range as float32 at reduced precision, and provides stable training with reduced memory usage.
+
+
+Figure 12: We visualize the attention and the nearest retrievals for queries from seen and unseen species for which multiple cross-modally aligned models correctly predicted the species (top three are examples with I+D correct, bottom three are examples with I+T correct). Predicted genera + species are indicated green text for correct, red for incorrect. For correct predictions, the attention map more often signals on the whole insect, and the nearest retrievals found by the correct models are more reasonable than the incorrect ones. Interestingly, we see that the strong activation correlate with incorrect predictions sometimes (5th, 6th examples for incorrect I+T prediction, and last two examples for poor I+D prediction).
+
+
+Figure 13: Failure cases. We visualize the attention and the nearest retrievals for queries from seen and unseen species for incorrect predictions by all four models (no align, I+T, I+D, I+D+T). Predicted genera + species are indicated in green text for correct, red for incorrect. Despite strong signalling on the insect, the model identifies alternative samples as the nearest, though the retrieved examples still exhibit high-level visual similarities.
+
+Table 17: Trainable temperature. Top-1 accuracy on the validation set for models contrastively trained with either a fixed or trainable temperature. We consider the performance when training for different durations (1 and 15 epochs).
+
+
Temperature
Epochs
Micro Top-1 Accuracy (%)
Macro Top-1 Accuracy (%)
DNA-to-DNA
Image-to-Image
Image-to-DNA
DNA-to-DNA
Image-to-Image
Image-to-DNA
Fixed
1
97.2
62.6
27.4
93.1
41.6
11.0
Trainable
1
96.8
63.5
24.2
92.0
42.8
10.4
Fixed
15
98.0
74.2
57.8
94.7
52.2
32.4
Trainable
15
98.4
76.9
56.5
94.1
57.8
35.7
+
+We compare training with and without AMP in Table 18. By applying AMP, we achieve comparable performance while using less memory. With AMP, the CUDA memory usage is reduced by about $15\mathrm{GB}(\sim 20\%)$ and the training time by 3 hour per epoch $(\sim 75\%)$ . Although using full-precision (no AMP) yields slightly better accuracies, the lower memory usage and faster training time of AMP allows for more efficient experiments. Additionally, the lower memory usage with AMP enables us to use larger batch sizes and is more effective for our experiments.
+
+# C.3 LORA VS FULL FINE-TUNING
+
+For efficient training, we also investigate the performance of using LoRA [28] vs full fine-tuning. As shown in Table 19, we find that while LoRA does reduce the memory usage and training time, the performance is also notably worse, and thus we use full fine-tuning for the rest of our experiments.
+
+Table 18: Automatic mixed precision. Top-1 micro and macro accuracy on the validation set with models contrastively trained either with or without automatic mixed precision (AMP). We compare accuracies across different embedding alignments (image-to-image, DNA-to-DNA, and image-to-DNA). Both experiments have otherwise identical training conditions, including a batch size of 300 and 15 training epochs.
+
+
Micro Top-1 Accuracy (%)
Macro Top-1 Accuracy (%)
Memory
Training Time
DNA-to-DNA
Image-to-Image
Image-to-DNA
DNA-to-DNA
Image-to-Image
Image-to-DNA
CUDA (GB) ↓
per epoch↓
-AMP
98.07
74.97
57.38
95.18
54.47
32.22
75.54
4.03 hour
+AMP
97.85
74.31
56.23
97.85
53.65
30.99
60.64
1.15 hour
+
+Table 19: Low-rank adaptation. Top-1 micro/macro accuracy on the validation set for models contrastively trained with either with full fine-tuning or Low-Rank Adaptation (LoRA). We compare micro and macro Top-1 accuracies across different embedding alignments (image-to-image, DNA-to-DNA, and image-to-DNA). Both strategies use a batch size of 300 and are trained for a total of 15 epochs, allowing us to evaluate the impact of fine-tuning techniques on model performance and CUDA memory usage.
+
+
Fine-tuning Method
Micro Top-1 Accuracy (%)
Macro Top-1 Accuracy (%)
Memory
Training Time
DNA-DNA
Image-Image
Image-DNA
DNA-DNA
Image-Image
Image-DNA
CUDA (GB) ↓
per epoch↓
Full Fine-Tuning
98.1
74.3
58.0
95.5
54.0
32.4
78.5GB
4.03 hour
LoRA
96.2
64.9
37.6
91.3
45.4
17.1
53.4GB
2.98 hour
+
+Table 20: Batch size. Top-1 accuracy on the validation set for models contrastively trained with different batch sizes. Training at larger batch sizes helps improve accuracy at more fine-grained taxonomic levels such as genus and species.
+
+
Taxa
Batch size
Alignment
Micro top-1 accuracy
Macro top-1 accuracy
DNA to DNA
Image to Image
Image to DNA
DNA to DNA
Image to Image
Image to DNA
Img
DNA
Txt
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Seen
Unseen
H.M.
Order
500
✓
✓
✓
100.0
100.0
100.0
99.6
99.6
99.6
99.6
99.2
99.4
100.0
92.9
96.3
99.6
98.5
99.0
99.1
75.8
85.9
1000
✓
✓
✓
100.0
100.0
100.0
99.7
99.6
99.6
99.7
99.2
99.4
100.0
100.0
100.0
99.0
93.7
96.3
99.1
75.3
85.6
1500
✓
✓
✓
100.0
100.0
100.0
99.7
99.6
99.7
99.7
99.2
99.4
100.0
92.8
96.3
99.5
94.3
96.8
99.6
73.6
84.6
2000
✓
✓
✓
100.0
100.0
100.0
99.7
99.7
99.7
99.7
99.2
99.4
100.0
100.0
100.0
99.1
95.9
97.5
99.2
73.9
84.7
Family
500
✓
✓
✓
99.9
99.6
99.8
95.6
93.9
94.7
94.8
86.2
90.3
100.0
97.6
98.7
88.8
79.3
83.8
83.5
52.5
64.5
1000
✓
✓
✓
100.0
99.7
99.8
96.3
94.2
95.2
96.0
86.9
91.2
99.9
98.0
99.0
90.2
80.5
85.1
87.9
56.1
68.5
1500
✓
✓
✓
100.0
99.6
99.8
96.5
94.3
95.4
96.7
87.3
91.8
100.0
97.3
98.6
92.0
81.3
86.3
91.7
53.9
67.9
2000
✓
✓
✓
100.0
99.7
99.9
96.6
94.5
95.5
96.6
87.4
91.8
100.0
98.6
99.3
92.0
81.2
86.3
90.0
56.2
69.2
Genus
500
✓
✓
✓
99.2
98.3
98.8
87.5
83.6
85.5
77.3
55.9
64.9
98.4
95.5
97.0
71.2
61.6
66.1
54.0
21.4
30.7
1000
✓
✓
✓
99.4
97.9
98.6
88.7
84.5
86.6
82.4
58.2
68.2
98.4
94.9
96.6
74.4
63.9
68.8
61.2
24.3
34.8
1500
✓
✓
✓
99.3
98.2
98.8
89.6
84.8
87.1
83.8
59.7
69.7
98.0
95.2
96.6
75.8
63.7
69.2
64.9
23.6
34.6
2000
✓
✓
✓
99.4
98.4
98.9
89.6
84.9
87.2
84.8
60.1
70.3
98.9
96.5
97.7
76.1
64.2
69.6
64.9
24.0
35.0
Species
500
✓
✓
✓
97.9
96.5
97.2
76.8
73.7
75.2
58.8
35.8
44.5
95.5
90.7
93.0
56.4
45.9
50.6
36.5
8.7
14.0
1000
✓
✓
✓
98.2
96.0
97.1
78.8
74.8
76.7
67.2
37.7
48.3
95.8
89.4
92.5
59.8
47.3
52.8
44.3
9.2
15.3
1500
✓
✓
✓
98.0
96.2
97.1
80.5
74.7
77.5
69.8
39.9
50.8
95.1
89.4
92.2
61.8
47.9
54.0
47.7
10.1
16.6
2000
✓
✓
✓
98.5
96.5
97.5
80.0
74.9
77.3
70.5
41.3
52.1
96.9
90.9
93.8
61.3
48.0
53.9
47.7
9.9
16.4
+
+# C.4 BATCH SIZE EXPERIMENTS
+
+We conducted additional experiments to investigate the impact of training batch size (from 500 to 2000) on model performance. The choice of batch size ordinarily does not have a major impact on performance when using supervised learning, but can have larger impact when training using contrastive learning since each positive pair is normalized against the pool of negative pairs appearing in the same training batch.
+
+Our results, shown in Table 20, confirm that the classification accuracy improves as the batch size increases. The effect on is more pronounced for the harder, more fine-grained, taxonomic levels. Due to resource limitations, we were only able to train up to a batch size of 2000. We anticipate that using larger batch sizes would further enhance the classification accuracy of CLIBD, especially on more fine-grained taxonomic levels.
+
+
+Taxonomic labels
+Human designed Aids in human-understanding
+
+
+Label intensive Expert labelers (biologists) Disagreement
+
+
+DNA barcodes
+Automated (<\$1 per barcode) Expensive machines Time-consuming process
+Targeted and species-level precision
+Predict taxonomic labels
+
+
+>>
+
+
+Images
+Easier to acquire Field-deployable
+Variation within species Similarities across species
+
+Figure 14: Overview of modalities. (a) Taxonomic labels rely on expert biologists for annotation, providing valuable insights for human understanding. However, they may be difficult to determine at the species level, especially given bias or expert disagreement. (b) DNA barcodes are effective for species identification but require specialized equipment. (c) Images are the easiest to acquire, but visual differences between species can be hard to identify. Despite this, they are useful for analyzing similarities and differences between species. We attempt to leverage the benefits of all three modalities to learn a representation space for taxonomic classification and other downstream tasks.
+
+# D DISCUSSION OF UTILITY AND COST OF DNA BARCODES
+
+In this work, we focus on experiments on BIOSCAN-1M that showcase the value of using DNA barcodes as an alignment target. Here we discuss some limitations of using DNA barcodes as well as their advantages. We also provide details on the acquisition cost, as well as the computational and storage cost of using DNA barcodes.
+
+# D.1 WHEN ARE DNA BARCODES USEFUL?
+
+While DNA barcodes are a promising alignment target, there are also challenges with using them. For one, repositories [52, 6] and datasets [23, 24] that include DNA barcodes are relatively limited. In contrast, there are far more datasets, at larger scale, that consists only of images and taxonomic labels. For instance, Tree-Of-Life10M [61] has more than 10M images of over 454k species and BioTrove [76] has more than 162M images of over 367k species, which is much larger than the recently introduced BIOSCAN-1M and BIOSCAN-5M. In addition, the BIOSCAN datasets are limited to images collected in a lab setting and thus models trained on such data may not readily transfer to images captured in the wild. DNA barcodes are also not perfect indicators of species, especially in cases of complex inheritance (e.g. hybridization). There may also be potential errors during the data collection and barcoding process (e.g. errors during sequencing, potential contamination from other specimens, etc). Thus, relying solely on DNA barcodes for species identification, especially those based purely on fixed thresholds of genetic distances, may lead to errors [43].
+
+Nevertheless, we believe that DNA barcodes can be a useful signal, as validated by our experiments. Since their introduction [26], they have become widely used in large-scale biodiversity monitoring programs as they allow for relatively fast and reliable identification. The use of DNA barcodes for fine-grained species identification is highly accurate, with most errors coming from human errors [12]. With the use of metabarcoding [56], it is also possible to identify multiple species from samples from the environment, allowing for the discovery of new species and monitoring of changes in biodiversity. There are ongoing efforts to scale up the collection of DNA barcoding, as well as developments in technology, such as nanopore sequencing [71], that allows for real-time barcoding of organisms in the field. With these technological advances, we foresee that there will be increasing amount of DNA barcode data in the coming years. These will make DNA barcodes an important modality to leverage for building machine learning models for biodiversity monitoring and species discovery [46, 9, 38]. Outside of biodiversity monitoring, the use of DNA barcodes for identification can be used for dietary analyses (fecal sampling to determine gut content) [59, 49], food authentication (e.g. whether fish is marketed under a different name, use of horse meat, etc.) [20, 27], herbal medicine ingredient identification [10], whether there is illegal transfer of animal remains across borders, and many others.
+
+DNA barcodes can also be especially useful for distinguishing between cryptic species, which are morphologically similar but genetically distinct, and understanding undiscovered species. For specimens that are not yet well established in the standard Linnaean taxonomy, clustering by DNA barcodes can serve as an way to identify a potential related group of organisms, called an Operational Taxonomic Unit. This is standardized through the use of Barcode Index Numbers (BINs) [52].
+
+In our experiments, we attempted to simulate evaluation on unseen species by splitting the data so that there are records with a species label that were not seen during pretraining. However, our simulation does not necessarily match the real-world distribution of truly undiscovered species.
+
+To truly investigate the usefulness of CLIBD, it is necessary to work with experts in biomonitoring in live-deployment, which is currently outside the scope of this work.
+
+# D.2 WORKFLOW FOR SPECIES IDENTIFICATION
+
+The use of DNA barcodes for fine-grained identification is highly accurate. However, no automated method is perfect and thus it is coupled with human verification of morphological features and inspection of the specimen. In a typical workflow, a machine learning algorithm is used to assign family and order to a new specimen, and barcodes are used to propose fine-grained BINs for the specimen. If there are inconsistencies between initial order identification and the proposed BIN, then human experts inspect the specimen and attempt to provide the correct taxonomic label. However,
+
+not all specimens have a well-established species that can be clearly associated with it, in which case the BIN serves as a placeholder until biologists come to a consensus on whether a new species is warranted or whether the specimen (or group of specimen with the same BIN) does indeed belong to a existing species. In BOLD [51], one of the largest repositories of DNA barcodes, and the source of the BIOSCAN-1M and BIOSCAN-5M datasets, there are 1.2M BINs but only 259k named species.
+
+We hope that CLIBD can provide a multimodal model that can eventually be integrated into such a workflow, to provide potentially accurate classification, or tools for biologists to retrieve similar samples via either image or DNA. However, the study of how to integrate our model into the workflow is beyond the scope of this work.
+
+# D.3 ACQUISITION COST
+
+Compared to acquiring taxonomic labels, DNA barcoding is an automated process that provides an identifying DNA sequence (e.g. the DNA barcode) per specimen. The Centre for Biodiversity Genomics (CBG), which contributed the BIOSCAN data, has been developing protocols that allow for barcode analysis for under $1. They are continuing to develop cheaper, less invasive DNA barcoding technology, with the goal of driving costs down to below$ 0.01 per specimen. Metabarcoding (the barcoding of multiple specimens at once) is even more promising from a cost perspective. CBG is now targeting Oxford Nanopore Technology flow cell-based protocols that will lower the sequencing cost for barcode acquisition from $0.05 to $0.001.
+
+On the other hand, obtaining taxonomic labels is currently a human driven process which can cost an average of at least $25 per sample. Depending on whether the species is known, the detail in the image, and potential dissection involved, a taxonomic specialist may require a few minutes to often a couple hours to identify a sample. There are many specimens that are visually similar, and most specimens are not labelled to fine-grained taxa like genus or species because of ambiguities, expert disagreement, or lack of established labels.
+
+# D.4 COMPUTATIONAL AND STORAGE COSTS
+
+In addition to annotation costs, it is important to consider computational and storage costs. These costs are directly related to the length of the DNA sequence. In this work, we use DNA barcodes from the mitochondrial COI gene, which have a length of 660 base pairs (bp).
+
+Token length. For the tokenization methods we use (5-mer non-overlapping tokens for DNA bar-codes and WordPiece for taxonomic labels), we obtain approximately 133 tokens for DNA and 20 for taxonomic labels.
+
+Computational cost. Validating on a batch of 500 samples, we find that the number of FLOPS for BarcodeBERT (87.4M parameters) is 5.90T, compared to 0.13T FLOPS for LoRA-BERT (29.2M parameters) for taxonomic labels. Despite the difference in FLOPS, we find that the runtime per batch is nearly equivalent for both models at 15 ms per batch.
+
+Storage cost. Without compression, we find that the BIOSCAN-1M samples with species labels (84,450) require 53 MB of storage for DNA barcodes vs. 12 MB for taxonomic labels. Given that DNA consists primarily of four nucleotides (A, T, C, and G), a simple compression of 2 bits per nucleotide yields a size of 13.3 MB for the DNA barcodes.
\ No newline at end of file
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/images.zip b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..43ea6c041f6819edca738ddca3e7a88e47873e78
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e581382b96e11359f1f4bd16d399a460ecb91b7a2398130178b2e0d3f68cccf0
+size 2255648
diff --git a/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/layout.json b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..2959ba07f01346ba32dc296e85e1d093e28b8ea8
--- /dev/null
+++ b/ICLR/2025/CLIBD_ Bridging Vision and Genomics for Biodiversity Monitoring at Scale/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:634b534612b672c6087129d3aa1368de386884b6a6e601a811811fa8f9a42094
+size 771175
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_content_list.json b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..89bafb3e14ba84816ab7b4acef604550f90ab846
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:432164c6595f2a34c63e4c8454c2ee02f7566ef8ba30e6a2730e5602e64bbddb
+size 95564
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_model.json b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..8980714a19aaed07ea13ab93136ea4b0899f9d57
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f36473a005e48c167f63ccb689d2d6d57d0bf8c5f4223c26d15638ccf91d5576
+size 121090
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_origin.pdf b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..2b2fb2505492c7e098dfa95301783d51714bee73
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/6eb14dcb-8216-4091-bf6c-0dbbde07e1a9_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2ee37183e9478a62b4ddaa47c0df87aa7d4b20adb8aec9d502988e9a8321ee7a
+size 18306089
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/full.md b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..b69bff0b86ba08244812ad8bb056d58cab3f7d23
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/full.md
@@ -0,0 +1,411 @@
+# CLIPDRAG: COMBINING TEXT-BASED AND DRAG-BASED INSTRUCTIONS FOR IMAGE EDITING
+
+Ziqi Jiang, Zhen Wang, Long Chen†
+
+The Hong Kong University of Science and Technology
+
+{zjiangbl, zwangjr}@connect.ust.hk, longchen@ust.hk
+
+
+Figure 1: Three different kinds of image editing methods. (a): Drag-based Editing. Users need to click handle points (red) and target points (blue). (b): Text-based Editing. Only the edit prompt is needed to perform the edit. (c): Text-Drag Editing. both drag points and edit prompts are required.
+
+# ABSTRACT
+
+Precise and flexible image editing remains a fundamental challenge in computer vision. Based on the modified areas, most editing methods can be divided into two main types: global editing and local editing. In this paper, we discussed two representative approaches of each type (i.e., text-based editing and drag-based editing. Specifically, we argue that both two directions have their inherent drawbacks: Text-based methods often fail to describe the desired modifications precisely, while drag-based methods suffer from ambiguity. To address these issues, we proposed CLIPDrag, a novel image editing method that is the first try to combine text and drag signals for precise and ambiguity-free manipulations on diffusion models. To fully leverage these two signals, we treat text signals as global guidance and drag points as local information. Then we introduce a novel global-local motion supervision method to integrate text signals into existing dragbased methods (Shi et al., 2024b) by adapting a pre-trained language-vision model like CLIP (Radford et al., 2021). Furthermore, we also address the problem of slow convergence in CLIPDrag by presenting a fast point-tracking method that enforces drag points moving toward correct directions. Extensive experiments demonstrate that CLIPDrag outperforms existing single drag-based methods or text-based methods.
+
+# 1 INTRODUCTION
+
+Recently, notable breakthroughs in diffusion models (Ho et al., 2020; Song et al., 2020a;b), have led to many impressive applications (Meng et al., 2021; Dong et al., 2023; Kumari et al., 2023). Among
+
+them, image editing is recognized as a significant area of innovation and has gained enormous attention (Kim et al., 2022; Nichol et al., 2021; Sheynin et al., 2024; Valevski et al., 2023). Generally, the goal of this task is to edit realistic images based on various editing instructions. Mainstream methods for image editing can be coarsely categorized into two groups: 1) Global Editing, edits given images by a text prompt (Li et al., 2023; Kawar et al., 2023) or an extra image (Zhang et al., 2023a; Epstein et al., 2023) containing global information of the desired modification. Most of them involve finetuning a pre-trained diffusion model. 2) Local Editing, mainly consists of drag-based methods (Pan et al., 2023). This framework requires users to click several handle points (handles) and target points (targets) on an image, then perform the semantic editing to move the content of handles to corresponding targets. Typical methods (Mou et al., 2023; Shi et al., 2024b) usually contain a motion supervision phase that progressively transfers the features of handles to targets by updating the DDIM inversion latent, and a point tracking phase to track the position of handles by performing a nearest search on neighbor candidate points.
+
+Although the aforementioned methods have gained significant prominence, two drawbacks of them cannot be overlooked. 1) Imprecise Description in Global Editing. Global editing such as text-based image methods (Kawar et al., 2023) is unambiguous but is hard to provide detailed edit instructions. For example, in Figure 1(b), the prompt (i.e. "The sculpture is smiling") tells the model how to edit the image, but it is difficult to provide fine-grained editing information, like the extent of the smile. 2) Ambiguity Issues in Local Editing. Although local editing like drag-based editing methods can perform precise pixel-level spatial control, they suffer from ambiguity because the same handles and targets can correspond to multiple potential edited results. For example, in Figure 1(a), there exist two edited results meeting the drag requirements: one enlarging the face, the other making the woman smile. A natural approach to solving the ambiguity problem is to add more point pairs, but it does not work in real practice. This is because the diffusion network is a Markov chain and related errors accumulate as the update continues. Thus when adding more points, it usually means more update iterations, which will result in the degradation in image fidelity. In conclusion, local editing is precise but ambiguous while global editing is exactly the opposite.
+
+Since these two kinds of editing are complementary, it is natural to ask: can we combine these two control signals to guide the image editing process? In this way, text signals can serve as global information to reduce ambiguity. Meanwhile, drag signals can act as local control signals, providing more detailed control. However, combining these two signals presents two challenges: 1) How to integrate two different kinds of signals efficiently? This is difficult because text-based and drag-based methods have completely different training strategies. Specifically, most text-based methods (Kim et al., 2022) require finetuning a pre-trained diffusion model to gradually inject the prompt information. But drag-based methods (Shi et al., 2024b) typically involve freezing the diffusion model and only optimizing the DDIM inversion latent of the given image. Besides, the update in text-based editing often involves the whole denoising timesteps while drag-based approaches only focus on a specific timestep. 2) How to solve the optimization problem and maintain the image quality? Previous drag-based methods are very slow in some situations. Sometimes the handles will stuck at one position for many iterations. In worse situations, they even move in the opposite direction of targets. This phenomenon becomes more serious when adding text signals because combining two different signals usually requires more optimization steps. Thus we need a better approach to optimize the update process while maintaining fidelity as much as possible.
+
+To address these problems, we propose CLIPDrag, the first method to combine text-based and drag-based approaches to achieve precise and flexible image editing (For brevity, we denote this kind of editing as text-drag edit). This approach was built based on the general drag-based diffusion editing framework, which optimizes the DDIM inversion latent of the original image at one specific timestep. Specifically, we propose two modules to solve the aforementioned problems after a typical identity finetuning process. 1) Global-Local Motion Supervision (GLMS). The key of GLMS is to utilize the gradient from text and drag signals together for ambiguity-elimination. Specifically, for text information, we obtain the global gradient by backward of the global CLIP loss for the latent. Similarly, for drag points, the local gradient is calculated using a similar paradigm in DragDiffusion (Shi et al., 2024b). Because CLIP guidance methods cannot operate at a single fixed step, simply adding these two gradients is ineffective. Specifically, in GLMS, We disentangle the global gradient into two components: Identity Component perpendicular to the local gradient to maintain the image's global structure information, and Edit Component parallel to the local gradient, which will be combined with the local gradient from drag signals to edit the image. By comparing their
+
+direction, we choose different gradient fusion strategies to either perform the edit or maintain the image identity. 2) Fast Point Tracking (FPT). As we mentioned before, combining drag and text signals will result in slow convergence in the latent optimization. Thus we propose a faster tracking method to accelerate the optimization process. FPT is introduced to update the position of handles after each GLMS operation. Specifically, when performing the nearest neighbor search algorithm, FPT masks all candidates that are far away from current targets. Consequently, handles will become closer to targets after each update, and FPT also ensures that the moving trajectory of handles will not be repetitive. It is observed that FPT significantly accelerates the image editing process and improves the image quality to some extent.
+
+Combining these good practices, CLIPDrag achieves high-quality results for text-drag editing. Extensive experiments demonstrate the effectiveness of CLIPDrag, outperforming the state-of-the-art approaches both quantitatively and qualitatively. To summarize, our contributions are as follows:
+
+- We have pointed out that previous drag-based and text-based image editing methods have the problems of ambiguity and inaccuracy, respectively.
+- We propose CLIPDrag, a solution that incorporates text signals into drag-based methods by using text signals as global information.
+- Extensive experiments demonstrate the superiority and stability of CLIPDrag in text-drag image editing, marking a significant advancement in the field of flexible and precise image editing.
+
+# 2 RELATED WORK
+
+Diffusion Models. Diffusion models are a class of generative models that progressively degrade data by adding noise and then learn the reverse denoising process to generate realistic data. The Denoising Diffusion Probabilistic Model (DDPM) (Ho et al., 2020) was the first to demonstrate that diffusion models could achieve results comparable to state-of-the-art GANs (Goodfellow et al., 2020) for unconditional image generation. Subsequent works, such as DDIM (Song et al., 2020a) and ScoreSDE (Song et al., 2020b), refined the theoretical framework and improved performance. Classifier-guided (Dhariwal & Nichol, 2021) and classifier-free guidance (Ho & Salimans, 2022) methods further explored the potential of diffusion models for conditional generation. Inspired by the impact of large language models, the computer vision community has also trained diffusion models on large datasets to achieve commercial-grade performance, leading to the development of models such as GLIDE (Nichol et al., 2021), EMU (Sheynin et al., 2024), and Imagic (Kawar et al., 2023). Among these, Stable Diffusion (SD) (Rombach et al., 2022) has become particularly popular due to its efficiency. Unlike previous methods, SD projects images into a lower-dimensional latent space before adding noise, significantly reducing memory and computational requirements. Building on SD, numerous downstream applications have been proposed, including personalization (Ruiz et al., 2023), style transfer (Zhang et al., 2023b), and inpainting (Lugmayr et al., 2022).
+
+Text-based Image Editing. Unlike text-to-image generation which involves creating an image from scratch (Ho et al., 2022; Dhariwal & Nichol, 2021; Sahara et al., 2022; Gu et al., 2022), text-based image editing is about altering certain areas of a given image. DiffCLIP (Kim et al., 2022) leverages contrastive language-image pertaining (CLIP) (Radford et al., 2021) to fine-tune the diffusion process, enhancing diffusion models for high-quality zero-shot image editing. SINE (Zhang et al., 2023c) improves editing performance on single images by utilizing a large-scale pre-trained text-to-image model. Paint by Example (Yang et al., 2023) is the first approach to employ self-supervised training for more precise control through exemplar guidance. FlexiEdit (Koo et al., 2024) enhances non-rigid editing by reducing the high-frequency components in the target areas. Prompt-to-Prompt (Hertz et al., 2022) refines text-based editing by manipulating cross-attention maps during diffusion, enabling more effective modifications. Similarly, MasaCtrl (Cao et al., 2023) achieves complex non-rigid image editing by converting self-attention into mutual attention. InstructPix2Pix (Brooks et al., 2023) integrates a pre-trained large language model with a text-to-image model to generate training data for a conditional diffusion model, facilitating direct image editing from textual prompts. Null-text inversion (Mokady et al., 2023), on the other hand, enhances editing by optimizing default null-text embeddings to achieve desired transformations. While these text-based methods empower users to edit images using natural language, they often lack the precision and explicit control offered by drag-based editing techniques.
+
+
+Figure 2: Illustration of our scheme for an intermediate single-step optimization. $z^t$ means the optimized latent code at $t^{th}$ update. The local gradient and global gradient are calculated by backward- ing the motion supervision loss and CLIP guidance loss with respect to the latent code respectively. Then the Global-Local Gradient Fusion method is introduced to combine these two information to update the latent code. The new handles are inferred through our fast point tracking method.
+
+Drag-based Image Editing. Recently, DragGAN (Pan et al., 2023) introduced a novel method for achieving precise spatial control over specific regions of an image based on user-provided drag instructions. Building on it, DragDiffusion (Shi et al., 2024b) applied the approach to diffusion models, achieving superior performance and establishing a benchmark for future work. FreeDrag (Ling et al., 2023) reduces the burden of point tracking by introducing two key components: adaptive updates of template features and a line search with the backtracking mechanism. StableDrag (Cui et al., 2024) proposes a discriminative point-tracking method to construct a stable drag-based editing framework. SDE-Drag (Meng et al., 2021) offers a straightforward yet powerful approach for point-based content manipulation based on the stochastic differential equation (SDE) framework. LightningDrag (Shi et al., 2024a) enables high-quality image editing by eliminating the need for time-consuming latent optimization. Similarly, InstantDrag (Shin et al., 2024) achieves a fast editing framework by incorporating two optical flow generators. A concurrent work, RegionDrag (Lu et al., 2024), addresses ambiguity issues by transforming the problem into region-based editing through a gradient-free copy-paste operation. Unlike our method, RegionDrag employs a simpler transfer mechanism for achieving edits. Another line of drag-based methods includes DragonDiffusion (Mou et al., 2023) and DiffEditor (Mou et al., 2024), which reformulate the image editing task into a gradient-based process by defining an energy function that aligns with the desired edit results.
+
+# 3 APPROACH
+
+Problem Formulation. Given an image $I$ and two text prompts $P_{o}$ and $P_{e}$ , where $P_{o}$ describes the original image and $P_{e}$ depicts the edited image. After choosing $n$ handles $\{h_1, h_2, \ldots, h_n\}$ and corresponding targets $\{g_1, g_2, \ldots, g_n\}$ , a qualified text-drag editing method has to satisfy the following two requirements: 1) Move the feature of point $h_i$ to $g_i$ , while preserving the irrelevant content of the original image. 2) The edited image must align with the edit prompt $P_{e}$ .
+
+General Framework: As shown in Figure 21, our method CLIPDrag, consists of three steps:
+
+1) Identity-Preserving Finetuning (Sec 3.1): Given the input image $I$ and its description $P_{o}^{1}$ , We first finetune a pre-trained latent diffusion model $\epsilon_{\theta}$ using the technique of low-rank adpation (LoRA (Hu et al., 2021)). After the finetuning, we encode the image into the latent space and obtain the latent $z_{t}$ at a specific timestep $t$ through DDIM inversion. $z_{t}$ will be optimized for many iterations to achieve the desired edit, and each iteration consists of two following phases.
+2) Global-Local Motion Supervision (Sec 3.2): We denote the latent at $t$ -th step and handle point $p_i$ during the $k$ -th iteration as $z_t^k$ and $p_i^k$ respectively. At $k$ -th iteration, we can calculate global and local gradient vectors for $z_t^k$ . These two gradients will be combined by our Global-Local Gradient Fusion method, and the final result is used to update $z_t^k$ to $z_t^{k+1}$ .
+3) Fast Point Tracking (Sec 3.3): After GLMS, we can update the position of handles with the nearest neighbor search. To accelerate the editing speed while preserving the image fidelity, we propose FPT to ensure that new handles are closer to their corresponding targets by filtering all candidates that are far away from the targets.
+
+# 3.1 IDENTITY-PRESERVING FINETUING
+
+As analyzed in previous work (Shi et al., 2024b), directly optimizing the latent $z_{t}$ in diffusion-based methods will cause the problem of image fidelity. So finetuning on a pre-trained diffusion model is necessary to encode the features of the image into the U-Net. Specifically, the image and its description prompt $P_{o}$ are used to finetune the diffusion model $\epsilon_{\theta}$ through the LoRA method:
+
+$$
+\mathcal {L} _ {f t} (z, \Delta \theta) = \mathbb {E} _ {\epsilon , t} [ \| \epsilon - \epsilon_ {\theta + \Delta \theta} (\alpha_ {t} z + \sigma_ {t} \epsilon) \| _ {2} ^ {2} ] \tag {1}
+$$
+
+where $z$ is the latent space feature map concerning image $I$ . $\theta$ and $\Delta \theta$ represent the U-Net (Ronneberger et al., 2015) and LoRA parameters, $\alpha_{t}$ and $\sigma_{t}$ are constants pre-defined in the diffusion schedule, $\epsilon$ is random noise sampled from distribution $\mathcal{N}(0,I)$ . After the finetuning, we choose a specific timestep $t$ and obtain the DDIM inversion latent (Song et al., 2020a) as follows:
+
+$$
+z _ {t + 1} = \sqrt {\alpha_ {t + 1}} \left(\frac {z _ {t} - \sqrt {1 - \alpha_ {t}} \cdot \epsilon_ {\theta} (z _ {t})}{\sqrt {\alpha_ {t}}}\right) + \sqrt {1 - \alpha_ {t + 1}} \cdot \epsilon_ {\theta} (z _ {t}) \tag {2}
+$$
+
+the latent will be optimized in the subsequent process while keeping all other parameters frozen.
+
+# 3.2 GLOBAL-LOCAL MOTION SUPERVISION
+
+This step aims to combine text and drag signals, as shown in Figure 3. We will introduce how to process each control information, and then show how to combine them.
+
+CLIP-guidance Gradient. We extract knowledge from text signal using a local direction CLIP loss (Kim et al., 2022), which aligns the direction between the source image $I$ and generates image $\hat{I}$ with the direction between original prompt $P_{o}$ and edit prompt $P_{e}$ :
+
+$$
+\mathcal {L} _ {\text {d i r e c t i o n}} (I, \hat {I}, P _ {o}, P _ {e}) := 1 - \frac {< \Delta I , \Delta T >}{\| \Delta I \| \| \Delta T \|} \tag {3}
+$$
+
+where $\Delta I = E_I(\hat{I}(z_t^k)) - E_I(I)$ , $\Delta T = E_T(P_e) - E_T(P_o)$ . Here $E_T$ , $E_I$ represents text and image encoder from a pre-trained CLIP model. However, the identity component of $P_e$ is canceled out during the calculation of $\Delta T$ , making it difficult to maintain the image identity. Besides, sometimes it is impossible to calculate the direction loss because $P_o$ is not pro
+
+
+(a)
+
+
+(b)
+
+
+(c)
+
+
+Figure 3: (a) $G_{g}$ is consistent with $G_{l}$ . (b) $G_{g}$ contradicts with $G_{l}$ . (c) Fast Point Tracking.
+
+vided (Zhang et al., 2024). Consequently, we choose the global target loss to extract more information from edit prompt $P_{e}$ as follows:
+
+$$
+\mathcal {L} _ {\text {g l o b a l}} (\hat {I}, P _ {e}) := 1 - \frac {< E _ {I} \left(\hat {I} \left(z _ {t} ^ {k}\right)\right) , E _ {T} \left(P _ {e}\right) >}{\| E _ {I} \left( \right.\hat {I} \left(z _ {t} ^ {k}\right) \| \| E _ {T} \left(P _ {e}\right) \|} \tag {4}
+$$
+
+Then we can obtain the global gradient $(G_{g})$ from the text signal: $G_{g} = \partial \mathcal{L}_{global} / \partial z_{t}^{k}$ . Later we will explain how to use $G_{g}$ to maintain the image identity and guide the edit.
+
+Drag-guidance Gradient. We denote the U-Net output feature maps obtained by $k$ -th updated latent $z_{t}^{k}$ as $F(z_{t}^{k})$ . And the gradient from drag signals is obtained by the motion supervision loss $L_{ms}$ , which is the difference between the features of corresponding targets and handles:
+
+$$
+\mathcal {L} _ {m s} \left(z _ {t} ^ {k}\right) = \sum_ {i = 1} ^ {n} \sum_ {q \in \Omega \left(p _ {i}, r 1\right)} \| F _ {q + d _ {i}} \left(z _ {t} ^ {k}\right) - s g \left(F _ {q} \left(z _ {t} ^ {0}\right)\right) \| _ {1} + \| \left(z _ {t} ^ {k} - s g \left(z _ {t} ^ {0}\right)\right) \odot (\mathbb {1} - M) \| _ {1} \tag {5}
+$$
+
+Where $\Omega(p_i, r1) = \{(x,y) : \| x - x_i \| \leq r_1, \| y - y_i \| \leq r_1\}$ , $M$ is an optional mask, and $r_1$ represents the patch radius. $sg(\cdot)$ represents the stop gradient operation (van, 2017), $di = (g_i - h_i^k) / \| g_i - h_i^k \|$ , is an unit vector from $h_i^k$ to $g_i$ . Thus the local gradient $(G_l)$ can be calculated by: $G_l = \partial \mathcal{L}_{ms} / \partial z_t^k$ .
+
+Global-Local Gradient Fusion. Now we explain how to incorporate the two gradients in detail. The key motivation of this method is to decompose the process of text-based editing process into two parts: the edit component and the identity component. Specifically, as shown in Figure 3, when the direction of the edit component from $G_{g}$ is consistent with $G_{l}$ (Figure 3(a)), it means both signals agree with how to update the latent. Thus we use $G_{l}$ to guide the edit while preserving the structure of the image by the identity component of $G_{g}$ . When the two edit directions are contradictory (Figure 3(b)), we choose to correct the drag direction using the editing component, inspired by (Zhu et al., 2023). This approach can be formalized as follows:
+
+$$
+G _ {f i n a l} = \left\{ \begin{array}{l l} G _ {l} + \lambda \sin \langle G _ {g}, G _ {l} \rangle \cdot G _ {g}, & \cos \langle G _ {g}, G _ {l} \rangle > 0, \\ G _ {l} - \lambda \cos \langle G _ {g}, G _ {l} \rangle \cdot G _ {g}, & \cos \langle G _ {g}, G _ {l} \rangle < 0, \end{array} \right. \tag {6}
+$$
+
+where $G_{final}$ means the final gradient to update the latent code and $\lambda$ is a hyper-parameter.
+
+# 3.3 FAST POINT TRACKING
+
+Although CLIP guidance can relieve the ambiguity problem, it makes the optimization of GLMS more difficult. In drag-based methods, a similar optimization issue arises when more point pairs are added. In the previous point tracking strategy, handles sometimes get stuck in one position or move far away from their corresponding targets. This significantly slows down the editing process. To remedy this issue, we add a simple constraint on the point tracking process: when updating the handles through the nearest neighbor search algorithm, only consider the candidate points that are closer to the targets, as shown in Figure 3(c). Our FPT method can be formulated as follows:
+
+$$
+h _ {i} ^ {k + 1} = \operatorname * {a r g m i n} _ {a \in \Omega \left(h _ {i} ^ {k}, r 2\right) \& d i s \left(a, g _ {i}\right) < d i s \left(h _ {i} ^ {k}, g _ {i}\right)} \left\| F _ {q} \left(z _ {t} ^ {k + 1}\right) - F _ {h _ {i} ^ {k}} \left(z _ {t} ^ {0}\right) \right\| \tag {7}
+$$
+
+where $dis(a, g_i)$ represents the distance between point $a$ and target $g_i$ , $r_2$ is the search radius.
+
+# 4 EXPERIMENTS
+
+# 4.1 IMPLEMENTATION DETAILS
+
+We used Stable Diffusion 1.5 (Rombach et al., 2022) and CLIP-ViT-B/16 (Dosovitskiy et al., 2020) as the base model. For the LoRA finetuning stage, we set the training steps as 80, and the rank as 16 with a small learning rate of 0.0005. In the DDIM inversion, we set the inversion strength to 0.7 and the total denoising steps to 50. In the Motion supervision, we had a large maximum optimization step of 2000, ensuring handles could reach the targets. The features were extracted from the last layer of the U-Net. The radius for motion supervision $(r_1)$ and point tracking $(r_2)$ were set to 4 and 12, respectively. The weight $\lambda$ in the Global-Local Gradient Fusion process was 0.7.
+
+
+Figure 4: Comparisons with Drag-based methods (DragDiff, FreeDrag) and Text-based methods (DiffCLIP). $P_{e}$ is the edited prompts, which are required by CLIPDrag and DiffCLIP.
+
+# 4.2 TEXT-DRAG EDITING RESULTS
+
+Settings. To show the performance of CLIPDrag we compared both drag-based methods (DragDiffusion, FreeDrag, RegionDrag, StableDrag, InstantDrag, LightningDrag), and text-based method (DiffCLIP) on text-drag image editing tasks. Specifically, drag-based methods require drag points as edit instructions while text-based methods need an edit prompt to perform the modification. For CLIPDrag, both editing prompts and drag points are required to perform the edit. All input images are from the DRAGBENCH datasets (Shi et al., 2024b).
+
+Results. As illustrated in Figure 4, our method shows better performance over the two different editing frameworks. Due to the limited space, the results of RegionDrag, StableDrag, InstantDrag, and LightningDrag are shown in Appendix A. Compared with text-based methods (DiffCLIP), CLIP-Drag can perform more precise editing control on the pixel level. Compared with drag-based methods (DragDiffusion, FreeDrag), CLIPDrag successfully alleviates the ambiguity problem, as shown in Figure 4(b)(d)(e). This is because former drag-based methods intend to perform structural editing like moving or reshaping, instead of semantic editing such as emotional expression modification. It is reasonable because moving an object is much easier than changing its morphological characteristics. Consequently, these models prefer to choose the shortcut to realize feature alignment in motion supervision, resulting in the ambiguity problem. Our proposed method effectively solves the issue, by introducing CLIP guidance as the global information to point out a correct optimization path.
+
+Besides, former drag-based approaches cannot guarantee edited image quality when multiple drag point pairs exist. So we also give some examples with multiple point pairs to compare the stability of these methods. As shown in Figure 4(a)(c), these results validate the effectiveness of the two techniques in our method: identity component's guidance to preserve the image quality, and fast point tracking to achieve better drag performance.
+
+More results of CLIPDrag are shown in Figure 5. The leftmost three examples verify the effectiveness of our method: by combining the information of drag points and edit prompts $(P_e)$ , CLIPDrag achieves an edit with high image fidelity and no ambiguity. The middle three examples show the
+
+
+Figure 5: Some examples of CLIPDrag. For each input, both an edit prompt and drag points are required. $P_{e}$ and $P_{o}$ represent the edit prompts and original prompts respectively.
+
+
+Figure 6: (a): Examples of CLIPDrag and DragDiff on drag-based edit. Since no text information is needed in the editing process of DragDiff, we use the finetuning prompt $(P_o)$ as the editing prompt $(P_e)$ in CLIPDrag for fairness. (b): The quantitative experiment on the DRAGBENCH dataset.
+
+
+
+situations when users do not want to consider the ambiguity or find it difficult to describe the desired edit. And we found CLIP also works well when the edit prompt is replaced with the original prompt $(P_{o})$ . The rightmost three examples show the results when adding a mask.
+
+# 4.3 DRAG-BASED EDITING RESULTS
+
+Settings. Since our method is based on general drag-based frameworks, we also explored the performance of CLIPDrag in pure drag-based editing tasks. Specifically, we replaced the editing prompt $(P_e)$ with the corresponding original prompt $(P_o)$ . This ensures that no extra text information will be introduced. We compared our CLIPDrag with DragDiffusion, FastDrag, and StableDrag on the DRAGBENCH benchmark with five different max iteration step settings. To evaluate the image fidelity, we reported the average 1-LIPIS score (IF). Besides, Mean distance (MD) was calculated to show the distance between the final handles and targets (Lower MD represents better drag performance). Due to the limited space, the visual results of StableDrag and FastDrag are included in Appendix E.
+
+
+Input
+
+
+Gradient Adding
+
+
+ProGrad
+(a) Ablation on gradient fusion
+
+
+Our
+
+
+(i)
+User Input
+(b) Ablation on text signal
+
+
+(ii)
+"A photo of
+a sculpture."
+
+
+(iii)
+"The sculpture is raising his head."
+
+
+(a)
+
+
+(b)
+
+
+(c)
+
+
+X-axis (d)
+Figure 8: Ablation study on two kinds of point tracking strategies: original point tracking in DragDiff (PT) and our fast point tracking (FPT). for the same drag instruction (a), (b)(c) are the results of PT and FPT, respectively. (d)(e) are the corresponding trajectories of the handle point.
+
+
+Figure 7: (a): Ablation study on different gradient fusion strategies. "Gradient Adding" represents simply adding the global and local gradient, and "ProGrad" is the method proposed in (Zhu et al., 2023). The difference between ProGrad and ours is that we utilize the identity component to maintain image fidelity. (b): Ablation on text signals. for the same drag instruction (e.g.(ii)), different results are obtained with different edit prompts ((ii) & (iii)).
+X-axis (e)
+
+Results. Quantitative results are shown in Figure 6(b). In this figure, the $x$ -axis represents the max iteration steps and the $y$ -axis represents the IF and MD metrics respectively. As can be seen, CLIPDrag has better performance than DragDiff, FastDrag, and StableDrag. Specifically, on most max iteration steps settings, CLIPDrag has higher IF and lower MD. This means handle points are closer to the targets in CLIPDrag, in the meanwhile, the edited image quality is preserved or even improved (Figure 6(a)).
+
+# 4.4 ABLATION STUDY
+
+Ablation on Text Signals. We performed ablation studies to clarify the effect of text signals in CLIPDrag by using different edit prompts and keeping the drag points unchanged.
+
+Results. As illustrated in Figure 7(b), the ambiguity can be alleviated in CLIPDrag. For example, the drag instruction (i) corresponds to at least two different edit directions: one moving up the sculpture (ii), the other raising his head (iii). By giving different text signals we can choose different edit paths. We also observed that when no extra text information is given, CLIPDrag tends to align handle and target features by simple position translation (ii), instead of semantic edit (iii).
+
+Ablation on the Global-Local Gradient Fusion. We studied the effect of different methods to combine text and drag signals. We ran this ablation experiment with three different strategies global-local gradient fusion: adding two gradients together, ProGrad, and our method.
+
+Results. As shown in Figure 7(a), adding two gradients cannot alleviate the ambiguity problem because the CLIP guidance does not take effect on the single effect, as illustrated in DiffCLIP. The ProGrad method can relieve the ambiguity problem but performs badly in maintaining the quality
+
+
+
+
+
+
+(a) Input
+
+
+(b) 10-th Step
+
+
+
+
+(c) 20-th Step
+Figure 9: Further analysis on Point Tracking strategies. For the same input, intermediate edit results are visualized at multiple optimization steps.
+
+
+
+
+(d) 30-th Step
+
+
+
+
+(e) 40-th Step
+
+of edited images. This is because it ignores the identity component in text signals, which contains information about the image's structure. By contrast, our proposed method can effectively fuse the two signals, not only relieving the ambiguity but also maintaining the image fidelity to some degree.
+
+Ablation on Different Point Tracking Strategies. Finally, We showed the effect of different point tracking strategies. We based this experiment on our CLIPDrag method while replacing the fast point tracking with the normal one in DragDiff (Shi et al., 2024b). Besides, to make the result more convincing, we tried to make edited images from these two methods similar by adjusting the random seed and learning rate, while keeping other parameters like patch radius unchanged.
+
+Results. As shown in Figure 8, when achieving similar editing results, FPT effectively reduces the optimization iterations consumed. From the moving trajectory in Figure 8(d), we found that handles could get stuck at one point or move in circles in previous methods. Instead, handles move closer and closer to the targets in our FPT strategy, thus speeding up the editing process. Figure 8(c) shows that the FPT method does not harm the image quality. To further show the effect of FPT, we give another example and their intermediate results, shown in Figure 9(c). At the 20th iteration, the FPT strategy began to perform semantic editing, while the PT method was still in the stage of identity-preserving.
+
+# 5 CONCLUSION
+
+In this work, we tackled the ongoing challenge of achieving precise and flexible image editing within the field of computer vision. We observed that existing text-based methods often lack the precision for specific modifications, while drag-based techniques are prone to ambiguity. To overcome these challenges, we introduced CLIPDrag, a pioneering method that uniquely integrates text and drag signals to enable accurate and unambiguous manipulations. We enhanced existing drag-based methods by treating text features as global guidance and drag points as local cues. Our novel global-local gradient fusion method further optimized the editing process during motion supervision. Additionally, to address the issue of slow convergence in CLIPDrag, we developed an FPT method that efficiently guides handle points toward their target positions. Extensive experiments clearly demonstrated that CLIPDrag significantly outperforms existing methods that rely solely on drag or text-based inputs.
+
+# ACKNOWLEDGMENT
+
+This work was supported by RGC Early Career Scheme (26208924), National Natural Science Foundation of China Young Scholar Fund (62402408), Huawei Gift Fund, and HKUST Sports Science and Technology Research Grant (SSTRG24EG04).
+
+# REFERENCES
+
+Neural discrete representation learning. In Advances in neural information processing systems, volume 30, 2017.
+Tim Brooks, Aleksander Holynski, and Alexei A Efros. Instructpix2pix: Learning to follow image editing instructions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18392-18402, 2023.
+Mingdeng Cao, Xintao Wang, Zhongang Qi, Ying Shan, Xiaohu Qie, and Yinqiang Zheng. Mas-actr: 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.
+Yutao Cui, Xiaotong Zhao, Guozhen Zhang, Shengming Cao, Kai Ma, and Limin Wang. Stabledrag: Stable dragging for point-based image editing. arXiv preprint arXiv:2403.04437, 2024.
+Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. In Advances in neural information processing systems, volume 34, pp. 8780-8794, 2021.
+Wenkai Dong, Song Xue, Xiaoyue Duan, and Shumin Han. Prompt tuning inversion for text-driven image editing using diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 7430-7440, 2023.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
+Dave Epstein, Allan Jabri, Ben Poole, Alexei Efros, and Aleksander Holynski. Diffusion self-guidance for controllable image generation. Advances in Neural Information Processing Systems, 36:16222-16239, 2023.
+Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. pp. 139-144, 2020.
+Shuyang Gu, Dong Chen, Jianmin Bao, Fang Wen, Bo Zhang, Dongdong Chen, Lu Yuan, and Baining Guo. Vector quantized diffusion model for text-to-image synthesis. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10696-10706, 2022.
+Amir Hertz, Ron Mokady, Jay Tenenbaum, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Prompt-to-prompt image editing with cross attention control. arXiv preprint arXiv:2208.01626, 2022.
+Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598, 2022.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In Advances in neural information processing systems, volume 33, pp. 6840-6851, 2020.
+Jonathan Ho, Chitwan Sahara, William Chan, David J Fleet, Mohammad Norouzi, and Tim Salimans. Cascaded diffusion models for high fidelity image generation. Journal of Machine Learning Research, 23(47):1-33, 2022.
+Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.
+Bahjat Kawar, Shiran Zada, Oran Lang, Omer Tov, Huiwen Chang, Tali Dekel, Inbar Mosseri, and Michal Irani. Imag: Text-based real image editing with diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6007-6017, 2023.
+Gwanghyun Kim, Taesung Kwon, and Jong Chul Ye. Diffusionclip: Text-guided diffusion models for robust image manipulation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2426-2435, 2022.
+
+Gwanhyeong Koo, Sunjae Yoon, Ji Woo Hong, and Chang D Yoo. Flexiedit: Frequency-aware latent refinement for enhanced non-rigid editing. arXiv preprint arXiv:2407.17850, 2024.
+Nupur Kumari, Bingliang Zhang, Richard Zhang, Eli Shechtman, and Jun-Yan Zhu. 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.
+Senmao Li, Joost van de Weijer, Taihang Hu, Fahad Shahbaz Khan, Qibin Hou, Yaxing Wang, and Jian Yang. *Stylediffusion: Prompt-embedding inversion for text-based editing*. arXiv preprint arXiv:2303.15649, 2023.
+Pengyang Ling, Lin Chen, Pan Zhang, Huaian Chen, and Yi Jin. Freedrag: Point tracking is not you need for interactive point-based image editing. arXiv preprint arXiv:2307.04684, 2023.
+Jingyi Lu, Xinghui Li, and Kai Han. Regiondrag: Fast region-based image editing with diffusion models. arXiv preprint arXiv:2407.18247, 2024.
+Andreas Lugmayr, Martin Danelljan, Andres Romero, Fisher Yu, Radu Timofte, and Luc Van Gool. Repaint: Inpainting using denoising diffusion probabilistic models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11461-11471, 2022.
+Chenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, and Stefano Ermon. Sdedit: Guided image synthesis and editing with stochastic differential equations. arXiv preprint arXiv:2108.01073, 2021.
+Ron Mokady, Amir Hertz, Kfir Aberman, Yael Pritch, and Daniel Cohen-Or. Null-text inversion for editing real images using guided diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6038-6047, 2023.
+Chong Mou, Xintao Wang, Jiechong Song, Ying Shan, and Jian Zhang. Dragondiffusion: Enabling drag-style manipulation on diffusion models. arXiv preprint arXiv:2307.02421, 2023.
+Chong Mou, Xintao Wang, Jiechong Song, Ying Shan, and Jian Zhang. Diffeditor: Boosting accuracy and flexibility on diffusion-based image editing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8488-8497, 2024.
+Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021.
+Xingang Pan, Ayush Tewari, Thomas Leimkühler, Lingjie Liu, Abhinitra Meka, and Christian Theobalt. Drag your gan: Interactive point-based manipulation on the generative image manifold. In ACM SIGGRAPH 2023 Conference Proceedings, pp. 1-11, 2023.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684-10695, 2022.
+Olaf Ronneberger, Philipp Fischer, and Thomas Brox. 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.
+Nataniel Ruiz, Yanzhen Li, Varun Jampani, Yael Pritch, Michael Rubinstein, and Kfir Aberman. 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.
+
+Chitwan Sahara, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding, 2022.
+Shelly Sheynin, Adam Polyak, Uriel Singer, Yuval Kirstain, Amit Zohar, Oron Ashual, Devi Parikh, and Yaniv Taigman. Emu edit: Precise image editing via recognition and generation tasks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8871-8879, 2024.
+Yujun Shi, Jun Hao Liew, Hanshu Yan, Vincent Y. F. Tan, and Jiashi Feng. Lightningdrag: Lightning fast and accurate drag-based image editing emerging from videos, 2024a.
+Yujun Shi, Chuhui Xue, Jun Hao Liew, Jiachun Pan, Hanshu Yan, Wenqing Zhang, Vincent YF Tan, and Song Bai. Dragdiffusion: Harnessing diffusion models for interactive point-based image editing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 8839-8849, 2024b.
+Joonghyuk Shin, Daehyeon Choi, and Jaesik Park. InstantDrag: Improving Interactivity in Drag-based Image Editing. In ACM SIGGRAPH Asia 2024 Conference Proceedings, pp. 1-10, 2024.
+Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. arXiv preprint arXiv:2010.02502, 2020a.
+Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020b.
+Dani Valevski, Matan Kalman, Eyal Molad, Eyal Segalis, Yossi Matias, and Yaniv Leviathan. Unitune: Text-driven image editing by fine tuning a diffusion model on a single image. ACM Transactions on Graphics (TOG), pp. 1-10, 2023.
+Binxin Yang, Shuyang Gu, Bo Zhang, Ting Zhang, Xuejin Chen, Xiaoyan Sun, Dong Chen, and Fang Wen. Paint by example: Exemplar-based image editing with diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18381-18391, 2023.
+Lvmin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 3836-3847, 2023a.
+Yuxin Zhang, Nisha Huang, Fan Tang, Haibin Huang, Chongyang Ma, Weiming Dong, and Changsheng Xu. Inversion-based style transfer with diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10146-10156, 2023b.
+Zewei Zhang, Huan Liu, Jun Chen, and Xiangyu Xu. Gooddrag: Towards good practices for drag editing with diffusion models. arXiv preprint arXiv:2404.07206, 2024.
+Zhixing Zhang, Ligong Han, Arnab Ghosh, Dimitris N Metaxas, and Jian Ren. Sine: Single image editing with text-to-image diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6027-6037, 2023c.
+Beier Zhu, Yulei Niu, Yucheng Han, Yue Wu, and Hanwang Zhang. Prompt-aligned gradient for prompt tuning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15659-15669, 2023.
+
+# APPENDIX
+
+The appendix is organized as follows:
+
+1. In Sec. A, we show comparisons with more drag-based methods on text-drag edit.
+2. In Sec. B, we show four more examples in the Figure 1.
+
+3. In Sec. C, we show results when we apply text and drag guidance sequentially
+4. In Sec. D, we show examples when text and drag signals conflict.
+5. In Sec. E, we show examples of StableDrag, FreeDrag on drag-based edit.
+6. In Sec. F, we show the inference time comparisons.
+
+# A MORE RESULTS OF TEXT-DRAG EDIT.
+
+
+(a)
+(b)
+Figure 10: Results of four drag-based methods, including InstantDrag, LightningDrag, RegionDrag, StableDrag.
+
+To better show the superiority of CLIPDrag compared to traditional drag-based methods, we show the results of four other drag-based methods(StableDrag, LightningDrag, RegionDrag, InstantDrag), as shown in Figure 10.
+
+Compared with these methods, CLIPDrag successfully alleviates the ambiguity problem and better maintains the identity , as shown in Figure 10. This is because former drag-based methods intend to perform structural editing like moving or reshaping, instead of semantic editing such as emotional expression modification. It is reasonable because moving an object is much easier than changing its morphological characteristics. Consequently, these models prefer to choose the shortcut to realize feature alignment in motion supervision, resulting in the ambiguity problem. Our proposed method effectively solves the issue, by introducing CLIP guidance as the global information to point out a correct optimization path.
+
+# B EXPLAINATION OF MOTIVATION
+
+To demonstrate our motivation more clearly, we added four results for the second example in Figure 1. Specifically, we provide examples with and without drag edit the following examples. "The sculpture is smiling and not showing his teeth." and "The sculpture is smiling and not raising his head", as shown in Figure 11.
+
+
+Figure 11: Results of two text prompts with and without drag edit.
+
+
+Figure 12: Results when the text guidance and drag guidance are applied sequentially.
+
+# C APPLY GUIDANCE SEQUENTIALLY
+
+As shown in Figure 12, we demonstrate why applying the two types of guidance sequentially is not considered in our paper. Actually, if we were to apply drag-based editing first, the optimization direction of the latent could be incorrect, meaning that the ambiguity problem would occur before the text guidance is applied. Additionally, if text-based editing were applied after the drag operation, the position of the target points would be altered. As a result, after the text-based edit, the final positions of the handles would no longer align with the targets, which contradicts the core principle of drag-based methods. Instead, when text-based editing is applied first, the position of the handle points is altered. This alteration can mislead the subsequent drag operation.
+
+# D CONFLICTING INSTRUCTIONS
+
+
+"Make the heel of the shoes higher"
+
+
+$\lambda = 0.05$
+
+
+$\lambda = 5$
+Figure 13: Results when the text signals contradict with drag points. $\lambda$ is a hyper-parameter in Equation (6) to control the strength of text guidance.
+
+
+$\lambda = 50$
+
+While our primary motivation is to use the text prompt to complement the local drag edit—ensuring that these two signals are consistent in most cases—we also explored scenarios where these guidance signals conflict. Based on our experiments shown in Figure 13, we observed two types of potential editing outcomes:
+
+Ambiguity or Neutralization at Moderate Text Strength ( $\lambda \leq 10$ ). When the strength of the text signal is moderate, ambiguity can arise if the text guidance fails to provide accurate information. In other cases, the text signal may counteract the drag operation, effectively neutralizing its effect. For instance, the drag instruction combined with the prompt "Make the heel of the shoes higher" might yield a result akin to "Make the heel not so high."
+
+Implausible Results at High Text Strength $(\lambda = 100)$ . When the text guidance is excessively strong, it overwhelms the denoising process, making it difficult to handle the perturbation. This can result in implausible or unrealistic edits.
+
+# E MORE RESULTS OF DRAG-BASED EDIT.
+
+Settings. Since our method is based on general drag-based frameworks, we explored the performance of CLIPDrag in pure drag-based editing tasks. Specifically, we replaced the editing prompt $(P_e)$ with the corresponding original prompt $(P_o)$ . This ensures that no extra text information will be introduced. We compared our CLIPDrag with DragDiffusion, FastDrag and StableDrag on the DRAGBENCH benchmark with five different max iteration step settings. To evaluate the image fidelity, we reported the average 1-LIPIS score (IF). Besides, Mean distance (MD) was calculated to show the distance between the final handles and targets (Lower MD represents better drag performance).
+
+Results. As can be seen in Table (1)(2), CLIPDrag has better performance than DragDiff, FastDrag and StableDrag (the number (10,20,40,80,160) means the maximum iterations). Specifically, on most max iteration steps settings, CLIPDrag has higher IF and lower MD. This means handle points are closer to the targets in CLIPDrag, in the meanwhile, the edited image quality is preserved or even improved, as shown in Figure 14.
+
+
Method
10
20
40
80
160
Ours
49.5
45.1
39.2
35.8
32.3
DragDiff
51.3
50.6
42.9
38.8
35.1
StableDrag
50.8
48.8
42.3
39.0
34.8
FastDrag
52.1
51.1
44.4
41.9
36.9
+
+Table 1: Mean Distance results.
+
+
+
+
+User Input
+
+
+
+
+StableDrag
+
+
+
+
+FastDrag
+
+
+
+
+Ours(CLIPDrag)
+Figure 14: Results of Stable and FastDrag on pure drag-based edit.
+
+
Method
10
20
40
80
160
Ours
0.95
0.94
0.93
0.90
0.88
DragDiff
0.95
0.93
0.90
0.87
0.85
StableDrag
0.95
0.90
0.88
0.84
0.81
FastDrag
0.95
0.93
0.93
0.89
0.83
+
+Table 2: Image Fedlity results.
+
+
Method
DragDiff
FreeDrag
FastDrag
SDE-Drag
StableDrag
CLIPDrag(Ours)
Time
80.3s
69.4s
75.5s
70.0s
72.3s
47.8s
+
+Table 3: Comparisons of inference time.
+
+# F INFERENCE TIME COMPARISONS
+
+In this section, we report the average inference time of CLIPDrag, DragDiff, SDE-Drag and FreeDrag(the result is calculated on a single 3090 GPU by averaging over 100 examples sampled from the DragBench. As shown in the Table 3, our method is significantly faster than previous works. This is because the inference time is directly correlated with the number of optimization iterations. In CLIPDrag, the text guidance helps to indicate the correct optimization direction, while our FPT strategy prevents handles from moving in the wrong direction or forming loops. Both of these factors reduce the number of iterations required to move the handle points to their target positions, resulting in faster editing speeds.
\ No newline at end of file
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/images.zip b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..3bffd27fd59758f8a29434018160e3f41df286fc
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:87e5a192d04ed3feffedff364f251fa58f502a1a9482e545ae5be621fb17cc5c
+size 1095702
diff --git a/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/layout.json b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..d5932d30fa65aa1911341161700e5f2c1a776e8f
--- /dev/null
+++ b/ICLR/2025/CLIPDrag_ Combining Text-based and Drag-based Instructions for Image Editing/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e5692a8b2b69e95ca4c5f731cfceaef3cd343fc7f1e1168b06f58cbaa5e482c1
+size 540896
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_content_list.json b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..82f4c840bcb4cbf6e708d6c7191027c47788b77b
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:01dd4d6135efebca6ad9d4c1129b8e3c1da2e05f44775f2d58d5a65f392e9b31
+size 161753
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_model.json b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..4ba20e5ba353337ecf5053dbb2d84cd8702108b3
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9a83f09b0b0b6de0132586f6f0337a91bcc57d59ead4074129ad3693a5da9ede
+size 192644
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_origin.pdf b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7008c3cf812ed91b62ab848f1dd40150c2d4ebc5
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/0cacad9d-ea08-4f4d-a261-abf803601903_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b3687cab0c50dff28c30303bcd5600fe5f300be314a689c34c5b8c2617576d46
+size 3485468
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/full.md b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..194f0b779c8a4e7aa82b058fcd2786820609c38d
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/full.md
@@ -0,0 +1,628 @@
+# CLIPURE: PURIFICATION IN LATENT SPACE VIA CLIP FOR ADVERSARIALLY ROBUST ZERO-SHOT CLASSIFICATION
+
+Mingkun Zhang $^{1,3}$ , Keping Bi $^{2,3,*}$ , Wei Chen $^{1,3,*}$ , Jiafeng Guo $^{2,3}$ , Xueqi Cheng $^{1,3}$
+
+$^{1}$ State Key Lab of AI Safety, CAS Key Lab of AI Safety,
+
+Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
+
+$^{2}$ CAS Key Laboratory of Network Data Science and Technology,
+
+Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China
+
+3University of Chinese Academy of Sciences, Beijing, China
+
+{zhangmingkun20z, bikeping, chenwei2022, guojiafeng, cxq}@ict.ac.cn
+
+# ABSTRACT
+
+In this paper, we aim to build an adversarially robust zero-shot image classifier. We ground our work on CLIP, a vision-language pre-trained encoder model that can perform zero-shot classification by matching an image with text prompts "a photo of a ". Purification is the path we choose since it does not require adversarial training on specific attack types and thus can cope with any foreseen attacks. We then formulate purification risk as the KL divergence between the joint distributions of the purification process of denoising the adversarial samples and the attack process of adding perturbations to benign samples, through bidirectional Stochastic Differential Equations (SDEs). The final derived results inspire us to explore purification in the multi-modal latent space of CLIP. We propose two variants for our CLIPure approach: CLIPure-Diff which models the likelihood of images' latent vectors with the DiffusionPrior module in DaLLE-2 (modeling the generation process of CLIP's latent vectors), and CLIPure-Cos which models the likelihood with the cosine similarity between the embeddings of an image and "a photo of a". As far as we know, CLIPure is the first purification method in multi-modal latent space and CLIPure-Cos is the first purification method that is not based on generative models, which substantially improves defense efficiency. We conducted extensive experiments on CIFAR-10, ImageNet, and 13 datasets that previous CLIP-based defense methods used for evaluating zero-shot classification robustness. Results show that CLIPure boosts the SOTA robustness by a large margin, e.g., from $71.7\%$ to $91.1\%$ on CIFAR10, from $59.6\%$ to $72.6\%$ on ImageNet, and $108\%$ relative improvements of average robustness on the 13 datasets over previous SOTA. The code is available at https://github.com/TMLResearchGroup-CAS/CLIPure.
+
+# 1 INTRODUCTION
+
+Image classifiers are usually trained in a supervised manner with training data and evaluated on the corresponding test data until recently several vision-language models have emerged as zero-shot classifiers (Li et al., 2023; Radford et al., 2021; Li et al., 2022). Among them, CLIP (Radford et al., 2021) is an example that is popular, effective, and efficient. CLIP performs zero-shot classification by forming text prompts "a photo of a ." of all the candidate categories, and selecting the class with the highest similarity with the image embedding. Despite its efficacy, when facing adversarial attacks, its accuracy can drop to zero, similarly vulnerable to other neural classifiers.
+
+Existing methods to enhance adversarial robustness follow two primary paths: adversarial training and purification. Adversarial Training (AT) (Madry et al., 2017; Rebuffi et al., 2021; Wang et al., 2023) incorporates adversarial examples into model training to boost robustness. It often achieves
+
+advanced performance in defending against the same attacks while failing to defend against unseen attacks (Chen et al., 2023). FARE (Schlarmann et al., 2024) and TeCoA (Mao et al., 2022) are two AT approaches integrated with CLIP, which enhance CLIP's zero-shot classification robustness while harming clean accuracy significantly and do not generalize to other types of attacks. Adversarial purification (Song et al., 2017) seeks to eliminate adversarial perturbations by optimizing samples to align them with the distribution of benign samples. Instead of adversarial samples, this approach often requires a generative model that can model the probability of benign samples. It can handle unfore-
+
+seen attacks but often performs worse than AT methods on seen attacks and has lower inference efficiency. In this paper, we aim to produce an adversarially robust zero-shot classifier, so we opt for integrating purification with CLIP. To explore a better purification method,
+
+we formalize the purification risk and theoretically
+
+analyze what may affect purification performance. Concretely, inspired by Song et al. (2020) that models the diffusion process with bidirectional Stochastic Differential Equations (SDEs) (Anderson (1982)), we model the process of attack (i.e., adding perturbations to benign examples) with a forward SDE and purification (i.e., denoising adversarial examples) with a reverse SDE. Within this framework, we evaluate the risk of purification methods by measuring the KL divergence between the joint distributions of the purification and attack steps. After some derivation, we find that purification risk is related to 1) the negative KL divergence of the probability distributions of adversarial and benign examples (i.e., $-\mathrm{KL}(p(\boldsymbol{x}_{\mathrm{adv}})||p(\boldsymbol{x}_{\mathrm{ben}}))$ ), and 2) the $\ell_2$ norm of the gradients of adversarial samples' probability distribution (i.e., $\nabla \log p(\boldsymbol{x}_{\mathrm{adv}})$ ). This indicates that purification risk can be affected by: 1) the differences between $p(\boldsymbol{x}_{\mathrm{adv}})$ and $p(\boldsymbol{x}_{\mathrm{ben}})$ ; 2) the smoothness of $p(\boldsymbol{x}_{\mathrm{adv}})$ and possibly its dimension.
+
+To the best of our knowledge, existing adversarial purification methods are all conducted in pixel space. Given the above factors that can affect purification risk, it is natural to ask: are there purification approaches better than in pixel space? As we know, pixel space is high-dimensional and sparse while latent embedding space is denser and smoother. Moreover, multi-modal latent representations are theoretically proven to have better quality than uni-modal (Huang et al., 2021). CLIP, as a vision-language-aligned encoder model, has shown the superiority of its multi-modal embeddings on many tasks (Radford et al., 2021). Accordingly, we propose to conduct purification in CLIP's latent space for adversarially robust zero-shot classification.
+
+Our method - CLIPure has two variants that model the likelihood of images' latent vectors with CLIP differently: 1) CLIPure-Diff: a generative version that employs the DiffusionPrior module of DaLLE-2 (Ramesh et al., 2022) to model the likelihood of an image embedding with a diffusion model; 2) CLIPure-Cos: a discriminative version that models the likelihood with the cosine similarity between the image embedding and text embedding of a blank template "a photo of a ". Compared to likelihood modeling in pixel space and uni-modal latent space, we find that both our methods have several orders of magnitude larger KL divergence between the distributions of adversarial and benign samples than the former, and significantly higher than the latter (shown in Figure 2). Remarkably, CLIPure-Cos becomes the first purification method that does not rely on generative models and thus boosts defense efficiency by two or three orders of magnitude (See Table 3).
+
+Since CLIP aligns image and text embeddings by their cosine similarities (Radford et al., 2021), vector lengths are not important to reflect the vector relationship in CLIP's latent space. Hence, during likelihood maximization in CLIPure, we normalize the latent vectors to unit vectors to diminish the effect of vector length. This is critical to our approach, as our experiments indicate that the purification process could be obstructed by vector magnitude and ultimately fail.
+
+We compare the robustness of CLIPure and SOTA methods against the strongest adaptive attacks, AutoAttack(Croce & Hein, 2020), with different $\ell_2$ or $\ell_{\infty}$ bounds on various image classification tasks, including the popular CIFAR10, ImageNet, and 13 other datasets (e.g., CIFAR100, ImagetNet-R) that evaluate zero-shot classification robustness in FARE (Schlarmann et al., 2024)
+
+
+Figure 1: Adversarial robustness of two CLIPure versions versus adversarially trained CLIP models, evaluated against AutoAttack with $\ell_{\infty} = 4 / 255$ across 13 zero-shot classification datasets.
+
+
+
+and TeCoA (Mao et al., 2022). Note that CLIPure always conducts zero-shot classification and defense without the need for any dataset-specific training while the baselines can be any methods that are current SOTA. We are delighted to see that CLIPure boosts the SOTA robustness on all the datasets by a large margin, e.g., from $71.7\%$ to $91.1\%$ on CIFAR10 when $\ell_{\infty} = 8/255$ , from $59.6\%$ to $72.6\%$ on ImageNet when $\ell_{\infty} = 4/255$ . CLIPure achieves $45.9\%$ and $108\%$ relative improvements over previous SOTA - FARE(Schlarmann et al., 2024) regarding average robustness across the 13 zero-shot test datasets facing AutoAttack with $\ell_{\infty} = 2/255$ and $4/255$ , depicted in Figure 1. Our work shows that purification in multi-modal latent space is promising for zero-shot adversarial robustness, shedding light on future research including but not limited to image classification.
+
+# 2 RELATED WORK
+
+Zero-Shot Image Classification. Unlike traditional models that are limited to predefined categories, vision-language models (VLMs) are trained on open-vocabulary data and align the embeddings of images and their captions into a common semantic space. This enables them to perform as zero-shot classifiers by matching the semantics of images to textual categories, offering superior generality and flexibility. CLIP (Radford et al., 2021), trained on extensive internet image-text pairs, achieves advanced results in zero-shot classification tasks. Additionally, other VLMs including Stable Diffusion (Rombach et al., 2022),Imagen (Saharia et al., 2022), and DaLLE-2 (Ramesh et al., 2022) also possess zero-shot classification capabilities (Li et al., 2023; Clark & Jaini, 2024).
+
+Adversarial Purification in Pixel Space. A prevalent paradigm of adversarial purification aims to maximize the log-likelihood of samples to remove perturbations in pixel space. Since purification has no assumption of the attack type, enabling it to defend against unseen attacks using pre-trained generative models such as PixelCNN (Song et al., 2017), GANs (Samangouei, 2018), VAEs (Li & Ji, 2020), Energy-based models (Hill et al., 2020; Yoon et al., 2021), and Diffusion Models (Nie et al., 2022; Chen et al., 2023; Zhang et al., 2025). Owing to the capability of diffusion models, diffusion-based adversarial purification achieves state-of-the-art robustness among these techniques.
+
+CLIP-based Defense. While CLIP achieves impressive accuracy in zero-shot classification, it remains vulnerable to imperceptible perturbations (Fort, 2021; Mao et al., 2022). Adversarially training the CLIP model on ImageNet / Tiny-ImageNet (Schlarmann et al., 2024; Mao et al., 2022; Wang et al., 2024) enhances its robustness but undermines its zero-shot capabilities and struggles against unseen attacks. Choi et al. (2025) suggests smoothing techniques for certification. Li et al. (2024a) advocates using robust prompts for image classification, but the defensive effectiveness is limited. Additionally, other research focuses on the out-of-distribution (OOD) robustness of the CLIP model (Tu et al., 2024; Galindo & Faria), which is orthogonal to our adversarial defense objectives.
+
+# 3 PRELIMINARY: CLIP AS A ZERO-SHOT CLASSIFIER
+
+In this section, we introduce how CLIP is trained and how CLIP acts as a zero-shot classifier. CLIP (Contrastive Language Image Pre-training) (Radford et al., 2021), consists of an image encoder $\mathsf{Enc}^i$ and a text encoder $\mathsf{Enc}^t$ . It is trained on 400 million image-text pairs from the internet, aiming to align image embeddings with their corresponding text captions through contrastive learning:
+
+$$
+\mathcal {L} _ {\mathrm {C L I P}} = - \frac {1}{2 N} \sum_ {n = 1} ^ {N} \left[ \log \frac {\exp (\cos (\boldsymbol {z} _ {n} ^ {i} , \boldsymbol {z} _ {n} ^ {t}) / \tau)}{\sum_ {m = 1} ^ {N} \exp (\cos (\boldsymbol {z} _ {n} ^ {i} , \boldsymbol {z} _ {m} ^ {t}) / \tau)} + \log \frac {\exp (\cos (\boldsymbol {z} _ {n} ^ {i} , \boldsymbol {z} _ {n} ^ {t}) / \tau)}{\sum_ {m = 1} ^ {N} \exp (\cos (\boldsymbol {z} _ {m} ^ {i} , \boldsymbol {z} _ {n} ^ {t}) / \tau)} \right], \tag {1}
+$$
+
+where $N$ represents the number of image-caption pairs, $\pmb{z}_n^i = \mathrm{Enc}^i (\mathrm{image}_n)$ and $\pmb{z}_n^t = \mathrm{Enc}^t (\mathrm{text}_n)$ are the embeddings of the $n$ -th image and text respectively, $\tau$ is a temperature parameter, and $\cos (\cdot ,\cdot)$ denotes the cosine similarity function.
+
+This alignment enables CLIP to perform zero-shot classification by matching image embeddings with text embeddings of a template "a photo of a ," where iterates all the possible classes of a dataset. Without loss of generality, given an image, let $z^i$ denote its CLIP-encoded image embedding, and $z_c^t$ be the text embedding of a possible class description, i.e., $z_c^t = \mathrm{Enc}^t (\text{"a photo of a class } c.)$ . The predicted class $\hat{y}$ is determined by:
+
+$$
+\hat {y} = \arg \max _ {c} \cos (\boldsymbol {z} ^ {i}, \boldsymbol {z} _ {c} ^ {t}). \tag {2}
+$$
+
+For enhanced classification stability, as in Radford et al. (2021), we use 80 templates of diverse descriptions in combination with class names, such as "a good photo of ". In our experiments, each class $c$ 's embedding, $z_{c}^{t}$ in Eq. 2 is the average text embedding of $c$ paired with all the templates.
+
+# 4 CLIPURE: ADVERSARIAL PURIFICATION IN LATENT SPACE VIA CLIP
+
+In this section, we outline the methodology of our CLIPure, focusing on adversarial purification within CLIP's latent space. We first define purification risk through a Stochastic Differential Equation (SDE) perspective and derive its lower bound in Section 4.1. Section 4.2 introduces the rationale for CLIPure to potentially achieve a smaller purification risk and two variants of modeling sample likelihood. In Section 4.3, we propose normalizing latent vectors to diminish the effect of vector length during purification to align with CLIP's latent space modeled using cosine similarity.
+
+# 4.1 ADVERSARIAL PURIFICATION RISK
+
+Considering that adversarial attacks progressively add perturbations to an image while purification gradually removing noise to restore the original image, we formulate both the attack and purification processes through the lens of Stochastic Differential Equations (SDEs). This framework allows us to propose a measure of purification risk based on the divergence between the attack and purification processes, providing insights into what affects purification effectiveness.
+
+We formulate the attack process as a transformation from the benign distribution $p_{\mathrm{ben}}(\pmb{x})$ to an adversarial example distribution $p_{\mathrm{adv}}(\pmb{x})$ by an attack algorithm. Note that for simplicity we use $p(\pmb{x})$ to represent $p_{\mathrm{ben}}(\pmb{x})$ in this paper. Take untargeted PGD-attack (Madry et al., 2017) for instance, the adversarial attack behavior on a benign sample $x_0$ can be described as:
+
+$$
+\mathrm {d} \boldsymbol {x} = \alpha \operatorname {s i g n} \left(\nabla_ {\boldsymbol {x}} \mathcal {L} \left(\theta ; \boldsymbol {x} _ {t}, y _ {\text {t r u e}}\right)\right) \mathrm {d} t + \sigma \mathrm {d} \boldsymbol {w} _ {t}, \quad \boldsymbol {x} _ {0} \sim p (\boldsymbol {x}), \quad \text {s . t .}, \quad \| \boldsymbol {x} _ {T} - \boldsymbol {x} _ {0} \| _ {\rho} \leq \epsilon , \tag {3}
+$$
+
+where $\alpha$ represents the attack step size, $p(\boldsymbol{x})$ denotes the distribution of benign samples, $\mathcal{L}(\theta; \boldsymbol{x}_t, y_{\mathrm{true}})$ denotes the loss of $\boldsymbol{x}_t$ classified by the model with parameters $\theta$ as the ground truth category $y_{\mathrm{true}}$ at attack step $t$ (where $t \in [0, T]$ ), $\mathrm{d}\boldsymbol{w}_t$ denotes the Wiener process (Brownian motion). The constant $\sigma$ serves as a scaling factor for the noise component and the adversarial example $\boldsymbol{x}_T$ is bounded by $\epsilon$ in $\ell_{\rho}$ norm.
+
+The corresponding reverse-time SDE (Anderson, 1982) of Eq. 3 describes the process from the adversarial example distribution $p_{\mathrm{adv}}$ to the purified sample distribution $p_{\mathrm{pure}}$ , and is expressed as:
+
+$$
+d \boldsymbol {x} = [ \alpha \operatorname {s i g n} (\underbrace {\nabla_ {\boldsymbol {x}} \mathcal {L} (\theta ; \boldsymbol {x} _ {t} , y _ {\text {t r u e}})} _ {\text {c l a s s i f i e r g u i d a n c e}}) - \sigma^ {2} \underbrace {\nabla \log p (\boldsymbol {x} _ {t})} _ {\text {p u r f i c a t i o n}} ] \mathrm {d} t + \sigma \mathrm {d} \tilde {\boldsymbol {w}} _ {t}, \quad \boldsymbol {x} _ {T} \sim p _ {\text {a d v}} (\boldsymbol {x}), \tag {4}
+$$
+
+where $\log p(\pmb{x}_t)$ represents the log-likelihood of $\pmb{x}_t$ concerning the distribution of clean samples, analogous to the score function described in Score SDE (Song et al., 2020), $\mathrm{d}\tilde{w}_t$ represents the reverse-time Wiener process. A detailed discussion on the form of the reverse-time SDE can be found in Appendix A.
+
+Note that in the reverse-time SDE, $t$ progresses from $T$ to 0, implying that $\mathrm{d}t$ is negative. According to Eq. 4, the reverse SDE aims to increase the sample's log-likelihood while simultaneously decreasing the loss of classifying $x$ to $y_{\mathrm{true}}$ . In Eq. 4, the purification term is related to the common objective of adversarial purification $x_{\mathrm{pure}} = \arg \max_x \log p(x)$ . The classifier guidance term has been employed to enhance purification (Zhang et al., 2024), and their objective aligns well with Eq. 4. We will incorporate this guidance term with CLIPure in Appendix D.3 and see its impact.
+
+Then, we define the joint distribution of the attack process described by the forward SDE in Eq. 3 as $\mathcal{P}_{0:T} = p(\pmb{x}_0 = \pmb{x}_{\mathrm{ben}}, \pmb{x}_1, \dots, \pmb{x}_T = \pmb{x}_{\mathrm{adv}}) \in \mathbb{R}^{(T+1) \times d}$ , where each $\pmb{x}_t \in \mathbb{R}^d$ . For the purification process defined by the reverse-time SDE in Eq. 4, we denote the joint distribution as $\mathcal{Q}_{0:T} = p(\pmb{x}_0 = \pmb{x}_{\mathrm{pure}}, \pmb{x}_1, \dots, \pmb{x}_T = \pmb{x}_{\mathrm{adv}})$ . Here, $\pmb{x}_{\mathrm{ben}}$ , $\pmb{x}_{\mathrm{adv}}$ , and $\pmb{x}_{\mathrm{pure}}$ denotes the benign sample, adversarial example, and purified sample respectively. We define the purification risk $\mathcal{R}(\mathcal{Q})$ by the KL divergence between the reverse SDE (corresponding to the purification process) and the joint distribution of forward SDE (representing the attack process):
+
+$$
+\begin{array}{l} \begin{array}{l} \mathcal {R} (\mathcal {Q}) := \mathrm {K L} \left(\mathcal {Q} _ {0: T} \| \mathcal {P} _ {0: T}\right) = \mathrm {K L} \left(\mathcal {Q} _ {0, T} \| \mathcal {P} _ {0, T}\right) + \mathbb {E} _ {\mathcal {Q} _ {0, T}} \left[ \mathrm {K L} \left(\mathcal {Q} _ {1: T - 1 | 0, T} \| \mathcal {P} _ {1: T - 1 | 0, T}\right) \right] \\ \vdots \quad \dots \quad \mathrm {K L} \left(\mathcal {Q} _ {0: T} \| \mathcal {P} _ {0: T}\right) \end{array} \tag {5} \\ \geq \operatorname {K L} \left(\mathcal {Q} _ {0, T} \| \mathcal {P} _ {0, T}\right). \\ \end{array}
+$$
+
+
+(a) Pixel Space
+
+
+(b) Vision Latent Space
+Figure 2: Negative log-likelihood estimated by diffusion models on (a) pixel space via EDM, (b) uni-modal latent space via VQVAE, (c) multi-modal latent space via DiffusionPrior, and (d) multi-modal latent space via CLIP (using cosine similarity for log-likelihood estimation). KL represents the value of $\mathrm{KL}(p(\boldsymbol{x}_{\mathrm{adv}})\| p(\boldsymbol{x}_{\mathrm{ben}}))$ discussed in Section 4.2 indicating the difference between clean and adversarial example distribution.
+
+
+(c) Multi-modal(Diff)
+
+
+(d) Multi-modal(Cos)
+
+Then, we focus solely on the purified example, i.e., $\mathrm{KL}(\mathcal{Q}_{0,T}||\mathcal{P}_{0,T})$ rather than the entire purification trajectory. The forward SDE in Eq. 3 describes the transformation from $p(\boldsymbol{x}_{\mathrm{ben}})$ to $p(\boldsymbol{x}_{\mathrm{adv}})$ , enabling us to obtain the conditional probability $p(\boldsymbol{x}_{\mathrm{adv}}|\boldsymbol{x}_{\mathrm{ben}})$ . Simultaneously, the reverse SDE in Eq. 4 supports the transformation from $p(\boldsymbol{x}_{\mathrm{adv}})$ back to $p(\boldsymbol{x}_{\mathrm{pure}})$ , helping us to quantify $p(\boldsymbol{x}_{\mathrm{pure}}|\boldsymbol{x}_{\mathrm{adv}})$ . Then we can derive that:
+
+$$
+\begin{array}{l} \mathcal {R} (\mathcal {Q}) \geq \mathrm {K L} \left(\mathcal {Q} _ {0, T} \| \mathcal {P} _ {0, T}\right) = \mathrm {K L} \left(p \left(\boldsymbol {x} _ {\text {p u r e}}, \boldsymbol {x} _ {\text {a d v}}\right) \| p \left(\boldsymbol {x} _ {\text {b e n}}, \boldsymbol {x} _ {\text {a d v}}\right)\right) \\ = \frac {1}{2} \mathbb {E} _ {\boldsymbol {x} _ {\mathrm {a d v}}} \left[ \nabla \log p \left(\boldsymbol {x} _ {\mathrm {a d v}}\right) ^ {T} \nabla \log p \left(\boldsymbol {x} _ {\mathrm {a d v}}\right) \sigma^ {2} \Delta t \right] - \operatorname {K L} \left(p \left(\boldsymbol {x} _ {\mathrm {a d v}}\right) \| p \left(\boldsymbol {x} _ {\mathrm {b e n}}\right)\right), \tag {6} \\ \end{array}
+$$
+
+where $\Delta t$ denotes a small time interval for attack and purification, related to the perturbation magnitude. A detailed proof of the result is provided in Appendix B.
+
+The result in Eq. 6 highlights that the lower bound of the purification risk is influenced by two factors: 1) the smoothness of the log-likelihood function at adversarial examples and possibly the sample dimension, as indicated by the $\ell_2$ norm of $\nabla \log p(\pmb{x}_{\mathrm{adv}})$ , 2) the differences between the likelihood of clean and adversarial samples in the benign example space.
+
+# 4.2 ADVERSARIAL PURIFICATION IN CLIP'S LATENT SPACE
+
+In this section, we further explore how to achieve a smaller purification risk $\mathcal{R}(\mathcal{Q})$ . Considering $\mathbb{E}_{\boldsymbol{x}_{\mathrm{adv}}}\left[\nabla \log p(\boldsymbol{x}_{\mathrm{adv}})^T\nabla \log p(\boldsymbol{x}_{\mathrm{adv}})\sigma^2\Delta t\right]$ within $\mathcal{R}(\mathcal{Q})$ in Eq. 6, standard pixel space purification may lead to higher purification risks due to its sparsity and possibly peaked gradient distribution in high dimensionality. Thus, we are curious to investigate purification in latent space where the distribution of sample densities is more uniform and smoother.
+
+$\mathrm{KL}(p(\boldsymbol{x}_{\mathrm{adv}}) \| p(\boldsymbol{x}_{\mathrm{ben}}))$ in Eq. 6 implies representations that excel at detecting out-of-distribution adversarial examples are likely to carry a lower risk of purification errors. Huang et al. (2021) suggest that multi-modal latent spaces offer superior quality compared to uni-modal counterparts. Inspired by this observation, CLIP's well-aligned multi-modal latent space, where image embeddings are guided by the semantics of finer-grained words in an open vocabulary, may provide a foundation for purification with a lower risk.
+
+To validate the efficacy of different spaces in modeling sample likelihood for adversarial purification, we focus on the term $\mathrm{KL}(p(\boldsymbol{x}_{\mathrm{adv}}) \| p(\boldsymbol{x}_{\mathrm{ben}}))$ in the lower bound of the purification risk $\mathcal{R}(\mathcal{Q})$ . As illustrated in Figure 2, we extract 512 samples from ImageNet (Deng et al., 2009) and generate adversarial examples by AutoAttack (Croce & Hein, 2020) on the CLIP (Radford et al., 2021) classifier. We explore four types of likelihood modeling approaches:
+
+In Pixel Space: Sample likelihood of the joint distribution of image pixels is estimated by a generative model (we use an advanced diffusion model - EDM(Karras et al., 2022)). Figure 2a indicates that even EDM struggles to distinguish between clean and adversarial sample distributions at the pixel level. We use the Evidence Lower Bound (ELBO) to estimate log-likelihood, expressed as $\log p_{\theta}(\pmb{x}) \geq -\mathbb{E}_{\epsilon,t}[\|\epsilon_{\theta}(\pmb{x}_t,t) - \pmb{\epsilon}\|_2^2] + C$ , where $\epsilon \sim \mathcal{N}(0,I)$ , and $C$ is typically negligible (Ho et al., 2020; Song et al., 2020).
+
+Algorithm 1 CLIPure: Adversarial Purification in Latent Space via CLIP
+
+Required: An off-the-shelf CLIP model including an image encoder $\mathsf{Enc}^i$ and a text encoder $\mathsf{Enc}^t$ , textual embedding $\bar{z}^t$ of the blank templates (without class names, e.g., 'a photo of a.'), purification step $N$ , step size $\eta$ , and a DiffusionPrior model $\epsilon_{\theta}$ from DaLLE-2 (for generative version).
+
+Input: Latent embedding of input example $z^i$
+
+Output: label $y$
+
+for $i = 1$ to $N$ , do
+
+step1: Obtain latent embedding in polar coordinates
+
+direction $\pmb {u} = \pmb{z}^i /\| \pmb{z}^i\| _2^2$ , magnitude $r = z^i /u$
+
+step2: Estimate log-likelihood
+
+CLIPure-Diff via DiffusionPrior $\epsilon_{\theta}$
+
+$$
+\text {s a m p l e} \epsilon \sim \mathcal {N} (\mathbf {0}, \mathbf {1})
+$$
+
+$$
+\log p (\boldsymbol {z} ^ {i}) \leftarrow - \| \epsilon_ {\theta} \left(\boldsymbol {z} _ {t} ^ {i}, t, \bar {\boldsymbol {z}} ^ {t}\right) - \boldsymbol {\epsilon} \| _ {2} ^ {2}
+$$
+
+CLIPure-Cos via CLIP
+
+$$
+\log p (\boldsymbol {z} ^ {i}) \leftarrow \cos (\boldsymbol {z} ^ {i}, \bar {\boldsymbol {z}} ^ {t})
+$$
+
+step3: Update latent variable
+
+$$
+\boldsymbol {u} \leftarrow \boldsymbol {u} + \eta \frac {\partial \log p (\boldsymbol {z} ^ {i})}{\partial \boldsymbol {z} ^ {i}} \cdot \frac {\partial \boldsymbol {z} ^ {i}}{\partial \boldsymbol {u}}, \boldsymbol {z} ^ {i} \leftarrow r \cdot \boldsymbol {u}
+$$
+
+step4: Classification based on purified embedding
+
+predict label $y$ across candidate categories according to Eq. 2
+
+end for
+
+return predicted label $y$
+
+In Vision Latent Space: The likelihood of the joint distribution of an image embedding in a uni-modal space is estimated with the VQVAE component of the Stable Diffusion (SD) model (Rombach et al., 2022). Note that although SD is multi-modal, its VQVAE component is trained solely on image data and keeps frozen while training the other parameters, making it a vision-only generative model of latent vectors. Compared to Figure 2a, Figure 2b demonstrates improved capability in distinguishing clean and adversarial sample distributions.
+
+In Vision-Language Latent Space: For CLIP's latent space, we present two approaches to estimate the log-likelihood of image embeddings, i.e., $\log p(z^i)$ :
+
+(1) Diffusion-based Likelihood Estimation (corresponds to CLIPure-Diff): The DiffusionPrior module in DaLLE-2 (based on CLIP) (Ramesh et al., 2022) models the generative process of image embeddings conditioned on text embeddings. Employing DiffusionPrior, we estimate the log-likelihood $\log p_{\theta}(\boldsymbol{z}^i)$ by conditioning on a blank template "a photo of a":
+
+$$
+\log p _ {\theta} \left(\boldsymbol {z} ^ {i}\right) \approx \log p _ {\theta} \left(\boldsymbol {z} ^ {i} \mid \bar {\boldsymbol {z}} ^ {t}\right) = - \mathbb {E} _ {\epsilon , t} \left[ \left| \epsilon_ {\theta} \left(\boldsymbol {z} _ {t} ^ {i}, t, \bar {\boldsymbol {z}} ^ {t}\right) - \epsilon \right| _ {2} ^ {2} \right] + C, \tag {7}
+$$
+
+where $\epsilon_{\theta}(z^i,t,z^t)$ is the UNet (Ronneberger et al., 2015) in DiffusionPrior (Ramesh et al., 2022), parameterized by $\theta$ , with the noised image embedding $z_{t}^{i}$ at timestep $t$ under the condition of text embedding $z^t$ , and $C$ is a constant typically considered negligible (Ho et al., 2020).
+
+(2) Cosine Similarity-based Likelihood Estimation (corresponds to CLIPure-Cos): We estimate $\log p_{\theta}(z^i)$ by computing the cosine similarity between image embedding $z^i$ and the blank template's text embedding:
+
+$$
+\log p _ {\theta} \left(\boldsymbol {z} ^ {i}\right) \propto \cos \left(\boldsymbol {z} ^ {i}, \bar {\boldsymbol {z}} ^ {t}\right). \tag {8}
+$$
+
+Note that by modeling likelihood without using generative models, the defense efficiency can be significantly boosted. The inference time of CLIPure-Cos is only 1.14 times of the vanilla CLIP for zero-shot classification, shown in Table 3.
+
+Figure 2c and Figure 2d show that CLIPure-Diff and CLIPure-Cos have several orders larger magnitude KL divergence between clean and adversarial samples than modeling likelihood in pixel space. Modeling likelihood in uni-modal latent space also leads to larger KL divergence than pixel space but is smaller than multi-modal space. It indicates that purification in CLIP's latent space is promising to have lower purification risk and enhance adversarial robustness.
+
+# 4.3 ADVERSARIAL PURIFICATION BASED ON NORMALIZED UNIT VECTORS
+
+Typically, purification in pixel space is conducted through gradient ascent on the sample $\pmb{x}$ by using the derivative of the log-likelihood $\log p(\pmb{x})$ : $\pmb{x} \gets \pmb{x} + \alpha \nabla \log p(\pmb{x})$ , where $\alpha$ denotes the step size
+
+for updates. However, given that the cosine similarities between vectors in CLIP's latent space are the criterion for alignment where vector lengths do not take effect, it is inappropriate to directly apply the typical purification update manner to this space. Thus, we normalize the image vectors to unit vectors at each purification step to diminish the effect of vector length. Specifically, we first normalize the vector $z^i = \mathrm{Enc}^i(\boldsymbol{x})$ , obtained from the CLIP model image encoder for an input sample $\boldsymbol{x}$ (potentially an adversarial sample), to a unit vector $\boldsymbol{u} = z^i / \|z^i\|_2^2$ . Then we calculate the sample's log-likelihood $\log p(z^i)$ and compute the gradient $g_u$ by the chain rule:
+
+$$
+\boldsymbol {g} _ {\boldsymbol {u}} = \frac {\partial \log p (\boldsymbol {z} ^ {i})}{\partial \boldsymbol {u}} = \frac {\partial \log p (\boldsymbol {z} ^ {i})}{\partial \boldsymbol {z} ^ {i}} \cdot \frac {\partial \boldsymbol {z} ^ {i}}{\partial \boldsymbol {u}}. \tag {9}
+$$
+
+This gradient $g_{u}$ is then used to update the direction $z^{i}$ for adversarial purification, detailed in Algorithm 1. Note that CLIPure is based on the original CLIP and does not need any extra training.
+
+We also attempted adversarial purification by directly optimizing vectors instead of the normalized version. We experimented extensively with various steps, parameters, and momentum-based methods, but found it challenging to achieve robustness over $10\%$ on ImageNet, indicating that it is difficult to find an effective purification path with vector lengths taking effect.
+
+# 5 EXPERIMENTS
+
+# 5.1 EXPERIMENTAL SETTINGS
+
+Datasets. Following the RobustBench (Croce & Hein, 2020) settings, we assess robustness on CIFAR-10 and ImageNet. To compare against CLIP-based zero-shot classifiers with adversarial training (Schlarmann et al., 2024; Mao et al., 2022), we conduct additional tests across 13 image classification datasets (detailed in Appendix C.2). In line with Schlarmann et al. (2024), we randomly sampled 1000 examples from the test set for our evaluations.
+
+Baselines. We evaluate the performance of pixel space purification strategies employing generative models, including Purify-EBM (Hill et al., 2020) and ADP (Yoon et al., 2021) based on Energy-Based Models; DiffPure based on Score SDE (Nie et al., 2022) and DiffPure-DaLLE2.Decoder based on Decoder of DaLLE2 (Ramesh et al., 2022); GDMP based on DDPM (Ho et al., 2020); and likelihood maximization approaches such as LM-EDM (Chen et al., 2023) based on the EDM model (Karras et al., 2022) and LM-DaLLE2.Decoder which adapts LM to the Decoder of DaLLE2. Furthermore, we perform an ablation study adapting LM to the latent diffusion model to achieve uni-modal latent space purification using the Stable Diffusion Model (Rombach et al., 2022), denoted as LM-StableDiffusion. Furthermore, we also compare with the state-of-the-art adversarial training methods such as AT-ConvNeXt-L (Singh et al., 2024) and AT-Swin-L (Liu et al., 2024), along with innovative training approaches such as MixedNUTS (Bai et al., 2024) and MeanSquare (Amini et al., 2024), and methods that utilize DDPM and EDM to generate adversarial samples for training dataset expansion: AT-DDPM (Rebuffi et al., 2021) and AT-EDM (Wang et al., 2023). Moreover, we also compare CLIPure with adversarily trained CLIP model according to TeCoA (Mao et al., 2022) and FARE (Schlarmann et al., 2024). Additionally, we also evaluate the performance of classifiers without defense strategies, including CLIP, WideResNet (WRN), and Stable Diffusion. Due to space constraints, we list the details of baselines in Section C.4 in Appendix C.
+
+Adversarial Attack. Following the setup used by FARE (Schlarmann et al., 2024), we employ AutoAttack's (Croce & Hein, 2020) strongest white-box APGD for both targeted and untargeted attacks across 100 iterations, focusing on an $\ell_{\infty}$ threat model (typically $\epsilon = 4 / 255$ or $\epsilon = 8 / 255$ ) as well as $\ell_{2}$ threat model (typically $\epsilon = 0.5$ ) for evaluation. We also evaluate CLIPure against the BPDA (short for Backward Pass Differentiable Approximation) with EOT (Expectation Over Transformation) (Hill et al., 2020) and latent-based attack (Rombach et al., 2022) detailed in Appendix C.3.
+
+# 5.2 MAIN RESULTS
+
+In this section, we compare CLIPure-Diff and CLIPure-Cos with SOTA methods and examine the model robustness from various perspectives.
+
+Table 1: Comparison of performance against AutoAttack under $\ell_{\infty}$ ( $\epsilon = 8/255$ ) and $\ell_{2}$ ( $\epsilon = 0.5$ ) threat model on CIFAR-10 dataset, showcasing various defense methods including adversarial training and purification mechanisms. We highlight defenses that operate in pixel or latent space ("defense space"), and indicates the modal information used in defense strategies with "V" for Vision and "V-L" for Vision-Language multimodal representations. We use underlining to highlight the best robustness for baselines, and bold font to denote the state-of-the-art (SOTA) across all methods.
+
+
Method
Defense Space
Latent Modality
Clean Acc (%)
Robust Acc (%)
\( \ell_{\infty}=8/255 \)
\( \ell_2=0.5 \)
w/o Defense
WRN-28-10 (Zagoruyko, 2016)
-
V
94.8
0.0
0.0
StableDiffusion (Li et al., 2023)
-
V
87.8
0.0
38.8
CLIP (Radford et al., 2021)
-
V-L
95.2
0.0
0.0
Adv. Train
AT-DDPM-\( \ell_2 \) (Rebuffi et al., 2021)
Pixel
V
93.2
49.4
81.1
AT-DDPM-\( \ell_{\infty} \) (Rebuffi et al., 2021)
Pixel
V
88.8
63.3
64.7
AT-EDM-\( \ell_2 \) (Wang et al., 2023)
Pixel
V
95.9
53.3
84.8
AT-EDM-\( \ell_{\infty} \) (Wang et al., 2023)
Pixel
V
93.4
70.9
69.7
Other
TETRA (Blau et al., 2023)
Pixel
V
88.2
72.0
75.9
RDC (Chen et al., 2023)
Pixel
V
89.9
75.7
82.0
Purify
LM - StableDiffusion
Latent
V
37.9
6.9
8.6
DiffPure (Nie et al., 2022)
Pixel
V
90.1
71.3
80.6
LM - EDM (Chen et al., 2023)
Pixel
V
87.9
71.7
75.0
Our CLIPure - Diff
Latent
V-L
95.2
88.0
91.3
Our CLIPure - Cos
Latent
V-L
95.6
91.1
91.9
+
+Discussion of CLIPure-Diff and CLIPure-Cos. We compare the performance of CLIPure-Diff and CLIPure-Cos against AutoAttack across CIFAR-10, ImageNet, and 13 datasets in Tables 1, 2, and 7 respectively, as well as defense against BPDA+EOT and latent-based attack in Table 4 and 5 in Appendix D. Results indicate that both models have achieved new SOTA performance on all the datasets and CLIPure-Cos uniformly outperforms CLIPure-Diff in clean accuracy and robustness. It is probably because the DiffusionPrior component used in CLIPure-Diff models the generation process by adding noise to the original image embeddings encoded by CLIP without diminishing the effect of vector magnitude. Specifically, the noise is added as $z_{t}^{i} = \sqrt{\bar{\alpha}} z_{0}^{i} + \sqrt{1 - \bar{\alpha}}\epsilon$ , $\epsilon \sim \mathcal{N}(0,I)$ . We expect that the performance will be boosted if the generation process also eliminates the effect of vector length. In contrast, CLIPure-Cos has no such issue and it models the likelihood with cosine similarities that are consistent with CLIP.
+
+Comparisons with Purification in Pixel Space. Compared to the SOTA purification methods, DiffPure (Nie et al., 2022) and LM-EDM (Chen et al., 2023) (the likelihood maximization approach based on the advanced diffusion model EDM (Karras et al., 2022)), our CLIPure achieves better adversarial robustness (shown in Table 1 and 2) as well as superior inference efficiency (shown in Table 3). Table 1 shows that on CIFAR10 under the $\ell_{\infty}$ and $\ell_2$ threat models, our CLIPure-Cos showed improvements of $27.1\%$ and $22.5\%$ over LM-EDM and improvements of $27.8\%$ and $14.0\%$ over DiffPure. On the ImageNet dataset, shown in Table 2, CLIPure-Cos achieves a relative increment of $288.2\%$ over LM-EDM and $63.5\%$ over DiffPure. Additionally, the inference efficiency of our CLIPure is multiple orders of magnitude higher than DiffPure and LM-EDM (see Table 3).
+
+Moreover, in Table 2, we also compared the pixel space purification based on the Decoder component of DaLLE-2 (Ramesh et al., 2022) (LM-DaLLE2.Decoder). Results show that the LM-DaLLE2.Decoder suffers from a drop in accuracy, possibly because the diffusion architecture ADM (Dhariwal & Nichol, 2021) it employs is slightly inferior to EDM in terms of generation quality.
+
+Comparisons with Purification in Uni-modal Latent Space. We evaluate latent space purification using Stable Diffusion (Rombach et al., 2022) (i.e., LM-StableDiffusion) on the CIFAR-10 dataset, with results detailed in Table 1. As discussed in Section 4.2, Stable Diffusion (SD) models an uni-modal image latent space through its VQVAE (Rombach et al., 2022). Direct comparisons are challenging due to SD and CLIP utilizing different training data and fundamentally distinct backbones (diffusion model versus discriminative model). As noted in Li et al. (2023), SD, as
+
+Table 2: Performance comparison of defense methods on ImageNet against AutoAttack with $\ell_{\infty}$ threat model ( $\epsilon = 4/255$ ). Indicates whether the methods use ImageNet training set for training as zero-shot. "V" stands for Vision, and "V-L" for Vision-Language multimodal representations.
+
+
Method
Defense Space
Latent Modality
Zero -Shot
Clean Acc (%)
Robust Acc (%)
w/o Defense
WideResNet-50 (Zagoruyko, 2016)
-
V
✘
76.5
0.0
CLIP (Radford et al., 2021)
-
V-L
✓
74.9
0.0
Adv. Train
FARE (Schlarmann et al., 2024)
Latent
V-L
✘
70.4
33.3
TeCoA (Mao et al., 2022)
Latent
V-L
✘
75.2
44.3
AT-ConvNeXt-L (Singh et al., 2024)
Pixel
V
✘
77.0
57.7
AT-Swin-L (Liu et al., 2024)
Pixel
V
✘
78.9
59.6
Others
MixedNUTS (Bai et al., 2024)
Pixel
V
✘
81.5
58.6
MeanSparse (Amini et al., 2024)
Pixel
V
✘
78.0
59.6
Purify
LM - DaLLE2.Decoder
Pixel
V-L
✓
36.9
9.2
DiffPure - DaLLE2.Decoder
Pixel
V-L
✓
31.2
9.0
LM - EDM (Chen et al., 2023)
Pixel
V
✘
69.7
18.7
DiffPure (Nie et al., 2022)
Pixel
V
✘
71.2
44.4
Our CLIPure - Diff
Latent
V-L
✓
73.1
65.0
Our CLIPure - Cos
Latent
V-L
✓
76.3
72.6
+
+an generative model, is designed for generation rather than classification tasks, so its zero-shot classification performance is not good enough, which limits its potential for robustness.
+
+Comparisons with CLIP-based Baselines. Figure 1 and Table 7 show the zero-shot adversarial robustness on 13 datasets, compared to CLIP-based baselines enhanced with adversarial training, i.e., FARE (Schlarmann et al., 2024) and TeCoA (Mao et al., 2022), CLIPure-Diff and CLIPure-Cos surpass their best-reported average robustness by significant margins, $39.4\%$ and $45.9\%$ when $\ell_{\infty} = 2/255$ , $95.4\%$ and $108\%$ when the attacks are stronger with $\ell_{\infty} = 4/255$ . FARE and TeCoA often have much lower clean accuracy than vanilla CLIP due to their adversarial training on ImageNet, which harms zero-shot performance on other datasets. Additionally, Table 2 shows that even on ImageNet against the attacks they have been trained with, CLIPure still outperforms them by a huge margin ( $65\%$ and $72.6\%$ versus $33.3\%$ and $44.3\%$ ). The robustness of CLIPure against unseen attacks is much better than their performance on seen attacks, showing that we are on the right path of leveraging the power of pre-trained vision-language models.
+
+More Experiments and Analysis. Due to space constraints, in the Appendix, we include a detailed case study, showcasing the visualization of image embeddings during the purification process using a diffusion model in Figure 6 in Appendix D.1. Figure 11a in Appendix D.3 illustrates the effects of combining our approach with adversarial training and pixel space purification methods, while Figure 11b displays the outcomes of integrating classifier guidance. Additionally, we employ T-SNE to visualize the distribution of image and text embeddings in CLIP's latent space in Figure 12a and analyze the impact of step size on performance in Figure 12b.
+
+# 5.3 INFERENCE EFFICIENCY
+
+We evaluate the inference efficiency of our CLIPure and baseline models by measuring the inference time of an averaged over 100 examples from the CIFAR-10 dataset on a single 4090 GPU. The results are displayed in Table 3. Our CLIPure-Cos innovatively uses a discriminative approach for adversarial sample purification, achieving inference times comparable to those of discriminative models. Traditional purification methods typically leverage a generative model like diffusion and significantly involve complex inference procedures. Such complexity limits their applicability in efficiency-sensitive tasks, such as autonomous driving.
+
+# 5.4 CLIP VARIANTS
+
+To investigate the influence of backbone models and their scale, we evaluate the performance of CLIPure-Cos across various versions of CLIP (Radford et al., 2021) and its variants, including
+
+Table 3: Comparison of different methods in terms of average inference time over 100 samples on CIFAR10. "Relative Time" expresses each method's inference time as a multiple of the CLIP model's time for classification. Dis. denotes purification with a discriminative model, and Gen. denotes that with a generative model.
+
+
Method
CLIPure-Cos
CLIPure-Diff
DiffPure
LM-EDM
CLIP
Gen. or Dis.
Dis.
Gen.
Gen.
Gen.
Dis.
Inference Time (s)
4.1 x 10-4
0.01
2.22
0.25
3.6 x 10-4
Relative Time
1.14x
27.78x
6166.67x
694.44x
1x
+
+
+Figure 3: Accuracy and robustness (detailed in Table 6) of CLIPure-Cos for (Left) various versions of CLIP and (Right) different backbone models. The bubble size represents the number of parameters, which is also indicated alongside each bubble. The left figure presents CLIPure-Cos based on ResNet-based models (including RN50, RN101, RN50x64, marked in red) and ViT-based models (ViT-B-16, ViT-B-32, ViT-L-14, ViT-H-14, and ViT-bigG-14, marked in blue). The right figure depicts CLIPure-Cos based on CLIP (including ViT-B-16, ViT-L-14, ViT-H-14, ViT-bigG-14, marked in blue), EVA2-CLIP (including ViT-B-16 and ViT-L-14, marked in green), CLIPA (including ViT-L-14 and ViT-H-14, marked in red), and CoCa (ViT-B-32, marked in yellow). The blue dashed line represents the point where robust accuracy equals clean accuracy, serving as the upper bound of robustness, since successful defense against adversarial attacks hinges on accurate classification.
+
+
+
+EVA2-CLIP (Sun et al., 2023), CLIPA (Li et al., 2024b), and CoCa (Yu et al.). The results in Table 6 and Figure 3 indicate: 1) Larger models generally exhibit stronger capabilities (i.e., clean accuracy), which in turn enhances the robustness of CLIPure. Notably, the CLIPure-Cos with CLIPA with ViT-H-14 achieves the best performance, with robustness reaching $79.3\%$ on ImageNet—a truly remarkable achievement. 2) CLIPA-based CLIPure-Cos outperforms other CLIP models of comparable size in both accuracy and robustness. 3) ViT-based CLIPure-Cos models show better results than those based on ResNet.
+
+# 6 CONCLUSION
+
+We develop CLIPure, a novel adversarial purification method that operates within the CLIP model's latent space to enhance adversarial robustness on zero-shot classification without additional training. CLIPure consists of two variants: CLIPure-Diff and CLIPure-Cos, both achieving state-of-the-art performance across diverse datasets including CIFAR-10 and ImageNet. CLIPure-Cos, notably, does not rely on generative models, significantly enhancing defense efficiency. Our findings reveal that purification in a multi-modal latent space holds substantial promise for adversially robust zero-shot classification, pointing the way for future research that extends beyond image classification.
+
+# ACKNOWLEDGMENTS
+
+This work is supported by the Strategic Priority Research Program of the Chinese Academy of Sciences, Grant No. XDB0680101, CAS Project for Young Scientists in Basic Research under Grant No. YSBR-034, the National Key Research and Development Program of China under Grants No. 2023YFA1011602, the National Natural Science Foundation of China (NSFC) under Grants No. 62302486, the Innovation Project of ICT CAS under Grants No. E361140, the CAS Special Research Assistant Funding Project, the project under Grants No. JCKY2022130C039, the Strategic Priority Research Program of the CAS under Grants No. XDB0680102, and the NSFC Grant No. 62441229.
+
+# REFERENCES
+
+Dosovitskiy Alexey. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv: 2010.11929, 2020.
+Sajjad Amini, Mohammadreza Teymoorianfard, Shiqing Ma, and Amir Houmansadr. Meansparse: Post-training robustness enhancement through mean-centered feature sparsification. arXiv preprint arXiv:2406.05927, 2024.
+Brian DO Anderson. Reverse-time diffusion equation models. Stochastic Processes and their Applications, 12(3):313-326, 1982.
+Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International conference on machine learning, pp. 274-283. PMLR, 2018.
+Yatong Bai, Mo Zhou, Vishal M Patel, and Somayeh Sojoudi. Mixednuts: Training-free accuracy-robustness balance via nonlinearly mixed classifiers. arXiv preprint arXiv:2402.02263, 2024.
+Tsachi Blau, Roy Ganz, Chaim Baskin, Michael Elad, and Alex Bronstein. Classifier robustness enhancement via test-time transformation. arXiv preprint arXiv:2303.15409, 2023.
+Huanran Chen, Yinpeng Dong, Zhengyi Wang, Xiao Yang, Chengqi Duan, Hang Su, and Jun Zhu. Robust classification via a single diffusion model. arXiv preprint arXiv:2305.15241, 2023.
+Daewon Choi, Jongheon Jeong, Huiwon Jang, and Jinwoo Shin. Adversarial robustification via text-to-image diffusion models. In European Conference on Computer Vision, pp. 158-177. Springer, 2025.
+Kenneth Ward Church. Word2vec. Natural Language Engineering, 23(1):155-162, 2017.
+Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3606-3613, 2014.
+Kevin Clark and Priyank Jaini. Text-to-image diffusion models are zero shot classifiers. Advances in Neural Information Processing Systems, 36, 2024.
+Adam Coates, Andrew Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 215-223. JMLR Workshop and Conference Proceedings, 2011.
+Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In International conference on machine learning, pp. 2206-2216. PMLR, 2020.
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. IEEE, 2009.
+Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780-8794, 2021.
+
+Stanislav Fort. Adversarial examples for the openai clip in its zero-shot classification regime and their semantic generalization, Jan 2021. URL https://stanislavfort.github.io/2021/01/12/OpenAI_CLAMP_adversarial/examples.html.
+Yuri Galindo and Fabio A Faria. Understanding clip robustness. Understanding clip robustness.
+Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
+Gregory Griffin, Alex Holub, Pietro Perona, et al. Caltech-256 object category dataset. Technical report, Technical Report 7694, California Institute of Technology Pasadena, 2007.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
+Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. 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.
+Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, 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, 2021.
+Mitch Hill, Jonathan Mitchell, and Song-Chun Zhu. Stochastic security: Adversarial defense using long-run dynamics of energy-based models. arXiv preprint arXiv:2005.13525, 2020.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Yu Huang, Chenzhuang Du, Zihui Xue, Xuanyao Chen, Hang Zhao, and Longbo Huang. What makes multi-modal learning better than single (provably). Advances in Neural Information Processing Systems, 34:10944-10956, 2021.
+Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models. Advances in neural information processing systems, 35:26565-26577, 2022.
+Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In Proceedings of the IEEE international conference on computer vision workshops, pp. 554-561, 2013.
+Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
+Christian Léonard. Some properties of path measures. Séminaire de Probabilités XLVI, pp. 207-230, 2014.
+Alexander C Li, Mihir Prabhuesai, Shivam Duggal, Ellis Brown, and Deepak Pathak. Your diffusion model is secretly a zero-shot classifier. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 2206-2217, 2023.
+Lin Li, Haoyan Guan, Jianing Qiu, and Michael Spratling. One prompt word is enough to boost adversarial robustness for pre-trained vision-language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24408-24419, 2024a.
+Lianian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Liujuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10965-10975, 2022.
+
+Xiang Li and Shihao Ji. Defense-vae: A fast and accurate defense against adversarial attacks. In Machine Learning and Knowledge Discovery in Databases: International Workshops of ECML PKDD 2019, Würzburg, Germany, September 16–20, 2019, Proceedings, Part II, pp. 191–207. Springer, 2020.
+Xianhang Li, Zeyu Wang, and Cihang Xie. An inverse scaling law for clip training. Advances in Neural Information Processing Systems, 36, 2024b.
+Chang Liu, Yinpeng Dong, Wenzhao Xiang, Xiao Yang, Hang Su, Jun Zhu, Yuefeng Chen, Yuan He, Hui Xue, and Shibao Zheng. A comprehensive study on robustness of image classification models: Benchmarking and rethinking. International Journal of Computer Vision, pp. 1-23, 2024.
+Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. stat, 1050(9), 2017.
+Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013.
+Chengzhi Mao, Scott Geng, Junfeng Yang, Xin Wang, and Carl Vondrick. Understanding zero-shot adversarial robustness for large-scale models. arXiv preprint arXiv:2212.07016, 2022.
+Weili Nie, Brandon Guo, Yujia Huang, Chaowei Xiao, Arash Vahdat, and Anima Anandkumar. Diffusion models for adversarial purification. arXiv preprint arXiv:2205.07460, 2022.
+Maria-Elena Nilsback and Andrew Zisserman. 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.
+Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pp. 3498-3505. IEEE, 2012.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
+Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022.
+Sylvestre-Alvise Rebuffi, Sven Gowal, Dan A Calian, Florian Stimberg, Olivia Wiles, and Timothy Mann. Fixing data augmentation to improve adversarial robustness. arXiv preprint arXiv:2103.01946, 2021.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684-10695, 2022.
+Olaf Ronneberger, Philipp Fischer, and Thomas Brox. 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.
+Chitwan Sahara, William Chan, Huiwen Chang, Chris Lee, Jonathan Ho, Tim Salimans, David Fleet, and Mohammad Norouzi. Palette: Image-to-image diffusion models. In ACM SIGGRAPH 2022 conference proceedings, pp. 1-10, 2022.
+P Samangouei. Defense-gan: protecting classifiers against adversarial attacks using generative models. arXiv preprint arXiv:1805.06605, 2018.
+Christian Schlarmann, Naman Deep Singh, Francesco Croce, and Matthias Hein. Robust clip: Unsupervised adversarial fine-tuning of vision embeddings for robust large vision-language models. arXiv preprint arXiv:2402.12336, 2024.
+
+Erwin Schrödinger. Sur la théorie relativiste de l'électron et l'interprétation de la mécanique quantique. In Annales de l'institut Henri Poincaré, volume 2, pp. 269-310, 1932.
+Nitish Shukla and Sudipta Banerjee. Generating adversarial attacks in the latent space. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 730-739, 2023.
+Naman Deep Singh, Francesco Croce, and Matthias Hein. Revisiting adversarial training for imageNet: Architectures, training and generalization across threat models. Advances in Neural Information Processing Systems, 36, 2024.
+Yang Song, Taesup Kim, Sebastian Nowozin, Stefano Ermon, and Nate Kushman. Pixeldefend: Leveraging generative models to understand and defend against adversarial examples. arXiv preprint arXiv:1710.10766, 2017.
+Yang Song, Jascha Sohl-Dickstein, Diederik P Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. arXiv preprint arXiv:2011.13456, 2020.
+Quan Sun, Yuxin Fang, Ledell Wu, Xinlong Wang, and Yue Cao. Eva-clip: Improved training techniques for clip at scale. arXiv preprint arXiv:2303.15389, 2023.
+Zhicong Tang, Tiankai Hang, Shuyang Gu, Dong Chen, and Baining Guo. Simplified diffusion schr\” odinger bridge. arXiv preprint arXiv:2403.14623, 2024.
+Weijie Tu, Weijian Deng, and Tom Gedeon. A closer look at the robustness of contrastive language-image pre-training (clip). Advances in Neural Information Processing Systems, 36, 2024.
+Bastiaan S Veeling, Jasper Linmans, Jim Winkens, Taco Cohen, and Max Welling. Rotation equivariant cnns for digital pathology. In Medical Image Computing and Computer Assisted Intervention-MICCAI 2018: 21st International Conference, Granada, Spain, September 16-20, 2018, Proceedings, Part II 11, pp. 210-218. Springer, 2018.
+Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. Advances in Neural Information Processing Systems, 32, 2019.
+Jinyi Wang, Zhaoyang Lyu, Dahua Lin, Bo Dai, and Hongfei Fu. Guided diffusion model for adversarial purification. arXiv preprint arXiv:2205.14969, 2022.
+Sibo Wang, Jie Zhang, Zheng Yuan, and Shiguang Shan. Pre-trained model guided fine-tuning for zero-shot adversarial robustness. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 24502-24511, 2024.
+Zekai Wang, Tianyu Pang, Chao Du, Min Lin, Weiwei Liu, and Shuicheng Yan. Better diffusion models further improve adversarial training. In International Conference on Machine Learning, pp. 36246-36263. PMLR, 2023.
+Jongmin Yoon, Sung Ju Hwang, and Juho Lee. Adversarial purification with score-based generative models. In International Conference on Machine Learning, pp. 12062-12072. PMLR, 2021.
+Jiahui Yu, Zirui Wang, Vijay Vasudevan, Legg Yeung, Mojtaba Seyedhosseini, and Yonghui Wu. Coca: Contrastive captioners are image-text foundation models. arxiv 2022. arXiv preprint arXiv:2205.01917, 2.
+Sergey Zagoruyko. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016.
+Boya Zhang, Weijian Luo, and Zhihua Zhang. Enhancing adversarial robustness via score-based optimization. Advances in Neural Information Processing Systems, 36:51810-51829, 2023.
+Mingkun Zhang, Jianing Li, Wei Chen, Jiafeng Guo, and Xueqi Cheng. Classifier guidance enhances diffusion-based adversarial purification by preserving predictive information. arXiv preprint arXiv:2408.05900, 2024.
+Mingkun Zhang, Keping Bi, Wei Chen, Quanrun Chen, Jiafeng Guo, and Xueqi Cheng. Causaldiff: Causality-inspired disentanglement via diffusion model for adversarial defense. Advances in Neural Information Processing Systems, 37:124791-124819, 2025.
+
+
+
+
+Figure 4: Comparison of the Schrödinger Bridge (Schrödinger, 1932) framework with our adversarial attack and purification process
+
+# A DISCUSSION OF THE REVERSE-TIME SDE
+
+Motivated by the Schrödinger Bridge theory (Schrödinger, 1932; Tang et al., 2024) which models the transition between two arbitrary distributions, we utilize this theoretical framework to model the transformation between benign and adversarial sample distributions.
+
+Within the Schrödinger Bridge framework, the forward Stochastic Differential Equation (SDE) describes a pre-defined transition from a data distribution $p_{\mathrm{data}}$ to a prior distribution $p_{\mathrm{prior}}$ , noted as a reference density $p_{\mathrm{ref}} \in \mathcal{P}_{T+1}$ , the space of joint distributions on $\mathbb{R}^{(T+1)\times d}$ , where $T$ represents the timesteps and $d$ denotes the data dimension. Consequently, we have $p_{\mathrm{ref};0} = p_{\mathrm{data}}$ and $p_{\mathrm{ref};T} = p_{\mathrm{prior}}$ . Both $p_{\mathrm{data}}$ and $p_{\mathrm{prior}}$ are defined over the data space $\mathbb{R}^d$ . The optimal solution $\pi^*$ , starting from $p_{\mathrm{prior}}$ and transferring to $p_{\mathrm{data}}$ , is termed the Schrödinger Bridge, described by the reverse SDE.
+
+Specifically, the forward SDE is expressed as:
+
+$$
+\mathrm {d} \boldsymbol {x} = \left[ f \left(\boldsymbol {x} _ {t}, t\right) + g ^ {2} (t) \nabla \log \Psi \left(\boldsymbol {x} _ {t}, t\right) \right] \mathrm {d} t + g (t) \mathrm {d} \boldsymbol {w} _ {t}, \quad x _ {0} \sim p _ {\text {d a t a}}, \tag {10}
+$$
+
+where $f(\boldsymbol{x}_t, t)$ is the drift function and $g(t)$ is the diffusion term. $\boldsymbol{w}_t$ is the standard Wiener process, and $\Psi$ and $\tilde{\Psi}$ are time-varying energy potentials constrained by the following Partial Differential Equations (PDEs):
+
+$$
+\frac {\partial \Psi}{\partial t} = - \nabla_ {\boldsymbol {x}} \Psi^ {T} f - \frac {1}{2} \operatorname {T r} \left(g ^ {2} \nabla_ {\boldsymbol {x}} ^ {2} \Psi\right) \tag {11}
+$$
+
+$$
+\frac {\partial \tilde {\Psi}}{\partial t} = - \nabla_ {\pmb {x}} \tilde {\Psi} ^ {T} f - \frac {1}{2} \mathrm {T r} (g ^ {2} \nabla_ {\pmb {x}} ^ {2} \tilde {\Psi}),
+$$
+
+such that $\Psi (\pmb {x},0)\tilde{\Psi} (\pmb {x},0) = p_{\mathrm{data}},\Psi (\pmb {x},T)\tilde{\Psi} (\pmb {x},T) = p_{\mathrm{prior}}$
+
+Similarly, we define the mutual transformation between clean and adversarial sample distributions using coupled SDEs. The forward SDE describes the transformation process from benign to adversarial example distributions corresponding to an attacker's process. For an untargeted PGD attack, this is represented as:
+
+$$
+\mathrm {d} \boldsymbol {x} = \alpha \operatorname {s i g n} \left(\nabla_ {\boldsymbol {x}} \mathcal {L} \left(\theta ; \boldsymbol {x} _ {t}, y _ {\text {t r u e}}\right)\right) \mathrm {d} t + \sigma \mathrm {d} \boldsymbol {w} _ {t}, \quad \boldsymbol {x} _ {0} \sim p _ {\text {b e n}}, \tag {12}
+$$
+
+where $\alpha$ represents the attack step size, $\mathcal{L}(\theta; \boldsymbol{x}_t, y_{\mathrm{true}})$ denotes the loss when the adversarial example $\boldsymbol{x}_t$ is classified by the model with parameters $\theta$ as the ground truth category $y_{\mathrm{true}}$ at attack step $t$ (where $t \in [0, T]$ ), $\mathrm{d}\boldsymbol{w}_t$ denotes the Wiener process (Brownian motion) to express more general cases, and $\sigma$ is a constant. The adversarial example $\boldsymbol{x}_T$ is bound by $\epsilon$ in $l_p$ norm, i.e., $\| \boldsymbol{x}_T - \boldsymbol{x}_0 \|_p \leq \epsilon$ .
+
+According to Eq. 12, we obtain formulation of the drift function and diffusion term is
+
+$$
+f \left(\boldsymbol {x} _ {t}, t\right) = \alpha \operatorname {s i g n} \left(\nabla_ {\boldsymbol {x}} \mathcal {L} \left(\theta ; \boldsymbol {x} _ {t}, y _ {\text {t r u e}}\right)\right) \tag {13}
+$$
+
+$$
+g (t) = \sigma
+$$
+
+According to (Anderson, 1982; Song et al., 2020), the corresponding reverse-time SDE is:
+
+$$
+\mathrm {d} \boldsymbol {x} = \left[ f (\boldsymbol {x} _ {t}, t) - g ^ {2} (t) \nabla_ {\boldsymbol {x}} \log p (\boldsymbol {x}) \right] \mathrm {d} t + \sigma \mathrm {d} \tilde {\boldsymbol {w}} _ {t}. \tag {14}
+$$
+
+Thus, we can derive the corresponding reverse SDE of Eq. 12 as
+
+$$
+d x = \left[ \alpha \operatorname {s i g n} \left(\nabla_ {\boldsymbol {x}} \mathcal {L} (\theta ; \boldsymbol {x} _ {t}, y _ {\text {t r u e}})\right) - \sigma^ {2} \nabla \log p \left(\boldsymbol {x} _ {t}\right) \right] d t + \sigma d \tilde {w} _ {t}, \quad \boldsymbol {x} _ {T} \sim p _ {\text {a d v}}, \tag {15}
+$$
+
+where $\log p(x)$ is the log-likelihood of the marginal distribution of benign samples, also known as the score function in Score SDE (Song et al., 2020). $\mathrm{d}\tilde{w}_t$ denotes the reverse-time Wiener process as time flows from $t = T$ to $t = 0$ .
+
+Note that the coupled SDEs described in Eq. 12 and Eq. 15 are special cases of Eq. 11 when $\nabla \log \Psi(\boldsymbol{x}_t, t) = 0$ and $\nabla \log \tilde{\Psi}(\boldsymbol{x}_t, t) = \nabla \log p(\boldsymbol{x}_t)$ .
+
+Without loss of generality, other adversarial attack methods can typically be described using the forward SDE. Therefore, our proposed approach of modeling adversarial attacks and purification processes using coupled SDEs is universally applicable.
+
+# B DETAILED PROOF OF PURIFICATION RISK FUNCTION
+
+We first define the joint distribution of the attack process described by the forward SDE in Eq. 3 as $\mathcal{P}_{T + 1}$ , which spans $\mathbb{R}^{(T + 1)\times d}$ . Thus we have $\mathcal{P}_0 = p_{\mathrm{ben}}$ and $\mathcal{P}_T = p_{\mathrm{adv}}$ . For the purification process, we designate the joint distribution as $\mathcal{Q}_{T + 1}$ , also defined over $\mathbb{R}^{(T + 1)\times d}$ , with $\mathcal{Q}_0 = p_{\mathrm{adv}}$ and $\mathcal{Q}_T = p_{\mathrm{pure}}$ . $T$ represents the timestep, $p_{\mathrm{ben}}$ , $p_{\mathrm{adv}}$ and $p_{\mathrm{pure}}$ denote the distribution of benign, adversarial, and purified samples.
+
+According to the results of Léonard (2014), we have
+
+$$
+\mathrm {K L} \left(\mathcal {Q} _ {0: T} \mid \mathcal {P} _ {0: T}\right) = \mathrm {K L} \left(\mathcal {Q} _ {0, T} \mid \mathcal {P} _ {0, T}\right) + \mathbb {E} _ {\mathcal {Q} _ {0, T}} \left[ \mathrm {K L} \left(\mathcal {Q} _ {1: T - 1 | 0, T} \mid \mathcal {P} _ {1: T - 1 | 0, T}\right) \right]. \tag {16}
+$$
+
+Since we focus on the differences between the purified and benign examples rather than the entire purification path, we concentrate on $\mathrm{KL}(\mathcal{Q}_{0,T}\| \mathcal{P}_{0,T})$ . Thus, we continue to derive:
+
+$$
+\begin{array}{l} \mathrm {K L} \left(\mathcal {Q} _ {0, T} \| \mathcal {P} _ {0, T}\right) \\ = \operatorname {K L} \left(p \left(\boldsymbol {x} _ {\text {a d v}}, \boldsymbol {x} _ {\text {p u r e}}\right) \mid p _ {\text {a t t a c k}} \left(\boldsymbol {x} _ {\text {b e n}}, \boldsymbol {x} _ {\text {a d v}}\right)\right) \\ = \iint p (\boldsymbol {x} _ {\mathrm {a d v}}) p (\boldsymbol {x} _ {\mathrm {p u r e}} | \boldsymbol {x} _ {\mathrm {a d v}}) \log \frac {p (\boldsymbol {x} _ {\mathrm {a d v}}) p (\boldsymbol {x} _ {\mathrm {p u r e}} | \boldsymbol {x} _ {\mathrm {a d v}})}{p (\boldsymbol {x} _ {\mathrm {b e n}}) p (\boldsymbol {x} _ {\mathrm {a d v}} | \boldsymbol {x} _ {\mathrm {b e n}})} d \boldsymbol {x} _ {\mathrm {p u r e}} d \boldsymbol {x} _ {\mathrm {a d v}} \\ = \int p (\boldsymbol {x} _ {\mathrm {a d v}}) \left(\int p (\boldsymbol {x} _ {\mathrm {p u r e}} | \boldsymbol {x} _ {\mathrm {a d v}}) \log \frac {p (\boldsymbol {x} _ {\mathrm {p u r e}} | \boldsymbol {x} _ {\mathrm {a d v}})}{p (\boldsymbol {x} _ {\mathrm {a d v}} | \boldsymbol {x} _ {\mathrm {b e n}})} d \boldsymbol {x} _ {\mathrm {p u r e}}\right) d \boldsymbol {x} _ {\mathrm {a d v}} - \int p (\boldsymbol {x} _ {\mathrm {a d v}}) \log \frac {p (\boldsymbol {x} _ {\mathrm {a d v}})}{p (\boldsymbol {x} _ {\mathrm {b e n}})} d \boldsymbol {x} _ {\mathrm {a d v}} \\ = \mathbb {E} _ {\boldsymbol {x} _ {\mathrm {a d v}}} \left[ \mathrm {K L} \left(p \left(\boldsymbol {x} _ {\text {p u r e}} \mid \boldsymbol {x} _ {\mathrm {a d v}}\right) \| p \left(\boldsymbol {x} _ {\mathrm {a d v}} \mid \boldsymbol {x} _ {\mathrm {b e n}}\right)\right) \right] - \mathrm {K L} \left(p \left(\boldsymbol {x} _ {\mathrm {a d v}}\right) \| p \left(\boldsymbol {x} _ {\mathrm {b e n}}\right)\right), \tag {17} \\ \end{array}
+$$
+
+where $p(\pmb{x}_{\mathrm{adv}}|\pmb{x}_{\mathrm{ben}})$ represents the conditional probability transitioning from $\pmb{x}_{\mathrm{ben}}$ to $\pmb{x}_{\mathrm{adv}}$ as described by the forward SDE, and $q(\pmb{x}_{\mathrm{pure}}|\pmb{x}_{\mathrm{adv}})$ represents the conditional probability transitioning from $\pmb{x}_{\mathrm{adv}}$ to $\pmb{x}_{\mathrm{pure}}$ as described by the reverse SDE. This formulation underscores the effectiveness of the purification process by measuring how well the adversarial transformations are reversed.
+
+Given that the perturbations added by attackers are typically imperceptible, over a small time interval $\Delta t$ , the solution of the forward SDE described by Eq. 3 approximates a normal distribution:
+
+$$
+p \left(\boldsymbol {x} _ {\mathrm {a d v}} \mid \boldsymbol {x} _ {\mathrm {b e n}}\right) \sim \mathcal {N} \left(\boldsymbol {x} _ {\mathrm {b e n}} + \alpha \operatorname {s i g n} \left(\nabla_ {x} \mathcal {L}\right) \Delta t, \sigma^ {2} \Delta t\right). \tag {18}
+$$
+
+Similarly, the reverse SDE process described by Eq. 4 approximates a normal distribution:
+
+$$
+p \left(\boldsymbol {x} _ {\text {p u r e}} \mid \boldsymbol {x} _ {\text {a d v}}\right) \sim \mathcal {N} \left(\boldsymbol {x} _ {\text {a d v}} - \left(\alpha \operatorname {s i g n} \left(\nabla_ {\boldsymbol {x} _ {\text {a d v}}} \mathcal {L} \left(\theta ; \boldsymbol {x} _ {\text {a d v}}, \mathrm {y} _ {\text {t r u e}}\right)\right)\right) - \sigma^ {2} \nabla \log p \left(\boldsymbol {x} _ {\text {a d v}}\right)\right) \Delta t, \sigma^ {2} \Delta t). \tag {19}
+$$
+
+
+Figure 5: Illustration of the process of CLIPure including the purification in latent space and zero-shot classification, detailed in Algorithm 1.
+
+The KL divergence formula for two normal distributions is:
+
+$$
+K L \left(\mathcal {N} \left(\mu_ {0}, \Sigma_ {0}\right) \| \mathcal {N} \left(\mu_ {1}, \Sigma_ {1}\right)\right) = \frac {1}{2} \left(\operatorname {t r} \left(\Sigma_ {1} ^ {- 1} \Sigma_ {0}\right) + \left(\mu_ {1} - \mu_ {0}\right) ^ {T} \Sigma_ {1} ^ {- 1} \left(\mu_ {1} - \mu_ {0}\right) - k + \log \frac {\det \Sigma_ {1}}{\det \Sigma_ {0}}\right). \tag {20}
+$$
+
+When $\Sigma_0 = \Sigma_1 = \sigma^2\Delta t$ , the KL divergence reduced as
+
+$$
+K L \left(\mathcal {N} \left(\mu_ {0}, \Sigma_ {0}\right) \| \mathcal {N} \left(\mu_ {1}, \Sigma_ {1}\right)\right) = \frac {1}{2 \sigma^ {2} \Delta t} \| \mu_ {1} - \mu_ {0} \| ^ {2}. \tag {21}
+$$
+
+Thus we have
+
+$$
+\begin{array}{l} \mathbb {E} _ {\boldsymbol {x} _ {\mathrm {a d v}}} \left[ \operatorname {K L} \left(p (\boldsymbol {x} _ {\mathrm {p u r e}} | \boldsymbol {x} _ {\mathrm {a d v}}) \| p (\boldsymbol {x} _ {\mathrm {a d v}} | \boldsymbol {x})\right) \right] \\ = \mathbb {E} _ {\boldsymbol {x} _ {\mathrm {a d v}}} \left[ \nabla \log p \left(\boldsymbol {x} _ {\mathrm {b e n}}\right) ^ {T} \nabla \log p \left(\boldsymbol {x} _ {\mathrm {b e n}}\right) \sigma^ {2} \Delta t \right]. \tag {22} \\ \end{array}
+$$
+
+Thus we have proved the result in Eq. 6 that
+
+$$
+\begin{array}{l} \mathrm {K L} \left(\mathcal {Q} _ {0, T} | \mathcal {P} _ {0, T}\right) = \mathrm {K L} \left(p \left(\boldsymbol {x} _ {\text {a d v}}, \boldsymbol {x} _ {\text {p u r e}}\right) | p (\boldsymbol {x}, \boldsymbol {x} _ {\text {a d v}})\right) \\ = \mathbb {E} _ {\boldsymbol {x} _ {\text {a d v}}} \left[ \mathrm {K L} \left(q \left(\boldsymbol {x} _ {\text {p u r e}} \mid \boldsymbol {x} _ {\text {a d v}}\right) \| p \left(\boldsymbol {x} _ {\text {a d v}} \mid \boldsymbol {x} _ {\text {b e n}}\right)\right) - \mathrm {K L} \left(p \left(\boldsymbol {x} _ {\text {a d v}}\right) \| p (\boldsymbol {x})\right) \right. \tag {23} \\ = \frac {1}{2} \mathbb {E} _ {\boldsymbol {x} _ {\mathrm {a d v}}} \left[ \nabla \log p (\boldsymbol {x} _ {\mathrm {a d v}}) ^ {T} \nabla \log p (\boldsymbol {x} _ {\mathrm {a d v}}) \sigma^ {2} \Delta t \right] - \operatorname {K L} (p (\boldsymbol {x} _ {\mathrm {a d v}}) \| p (\boldsymbol {x} _ {\mathrm {b e n}})). \\ \end{array}
+$$
+
+# C EXPERIMENTAL SETUP
+
+# C.1 IMPLEMENTATION DETAIL
+
+Following the implementation of pixel space purification (including Chen et al. (2023) with code and Zhang et al. (2023) with code), CLIPure employs gradient ascent to maximize the log-likelihood of samples, which is formulated through: (1) cosine similarity (CLIPure-Cos) and (2) mean squared error (CLIPure-Diff). We conduct 10 purification steps on image embeddings obtained from CLIP's image encoder, with a step size of 30 for both CLIPure-Cos and CLIPure-Diff, to update directly on the vector direction of image embeddings. For CLIPure-Diff, we use the off-the-shelf DiffusionPrior model from DaLLE 2 (Ramesh et al., 2022). Experiments indicate that timesteps in the range of 900 to 1000 yield better defense outcomes when estimating likelihood via DaLLE2.Diffusion, hence we select this range for estimation.
+
+For the blank template used in purification, we employ 80 diverse description templates combined with class names, such as "a good photo of " to enhance stability, following zero-shot classification strategies. Consistently, each class $c$ 's text embedding, $z_{c}^{t}$ , as referred to in Eq. 2, is computed as the average text embedding combined with all templates.
+
+Table 4: Performance comparison of defense methods on CIFAR-10 against BPDA with EOT-20 under $\ell_{\infty}$ ( $\epsilon = 8/255$ ) norm bound. We use underlining to highlight the best robustness for baselines, and bold font to denote the state-of-the-art (SOTA) across all methods.
+
+
Method
Clean Acc (%)
Robust Acc (%)
FARE (Schlarmann et al., 2024)
77.7
8.5
TeCoA (Mao et al., 2022)
79.6
10.0
Purify - EBM (Hill et al., 2020)
84.1
54.9
LM - EDM (Chen et al., 2023)
83.2
69.7
ADP (Yoon et al., 2021)
86.1
70.0
RDC (Chen et al., 2023)
89.9
75.7
GDMP (Wang et al., 2022)
93.5
76.2
DiffPure (Nie et al., 2022)
90.1
81.4
Our CLIPure - Diff
95.2
94.6
Our CLIPure - Cos
95.6
93.5
+
+# C.2 DATASETS FOR ZERO-SHOT PERFORMANCE
+
+In order to evaluate the zero-shot performance of our CLIPure and adversarially trained CLIP model including FARE (Schlarmann et al., 2024) and TeCoA (Mao et al., 2022), we follow the settings and evaluation metrics used by FARE and outlined in the CLIP-benchmark1. We evaluate the clean accuracy and adversarial robustness across 13 datasets against an $\ell_{\infty}$ threat model with $\epsilon = 4/255$ and $\epsilon = 2/255$ . The datasets for zero-shot performance evaluation include CalTech101 (Griffin et al., 2007), StanfordCars (Krause et al., 2013), CIFAR10, CIFAR100 (Krizhevsky et al., 2009), DTD (Cimpoi et al., 2014), EuroSAT (Helber et al., 2019), FGVC Aircrafts (Maji et al., 2013), Flowers (Nilsback & Zisserman, 2008), ImageNet-R (Hendrycks et al., 2021), ImageNet-S (Wang et al., 2019), PCAM (Veeling et al., 2018), OxfordPets (Parkhi et al., 2012), and STL10 (Coates et al., 2011).
+
+# C.3 ADVERSARIAL ATTAKS
+
+BPDA with EOT. To compare our approach with purification methods that do not support gradient propagation, we conducted evaluations using the BPDA (Backward Pass Differentiable Approximation) (Athalye et al., 2018) attack method, augmented with $\mathrm{EOT} = 20$ (Expectation over Transformation) to mitigate potential variability due to randomness. As depicted in Table 4, our CLIPure-Cos model significantly outperforms traditional pixel-space purification methods based on generative models such as EBM (Hill et al., 2020), DDPM (Chen et al., 2023), and Score SDE (Nie et al., 2022), despite being a discriminative model. Notably, our CLIPure demonstrates higher robust accuracy compared to the AutoAttack method under BPDA+EOT-20 attack. This is attributed to the fact that adaptive white-box attacks are precisely engineered to target the model, leading to a higher attack success rate.
+
+Latent-based Attack. Shukla & Banerjee (2023) introduced a latent-based attack method, utilizing generative models such as GANs (Goodfellow et al., 2014) to modify the latent space representations and generate adversarial samples. We applied this approach to the CIFAR-10 dataset's test set, and the results, displayed in Table 5, reveal that unbounded attacks achieve a higher success rate than bounded attacks. Despite these aggressive attacks, our CLIPure method retains an advantage over baseline approaches. This is attributed to CLIPure leveraging the inherently rich and well-trained latent space of the CLIP model, which was trained on diverse and sufficient datasets, allowing it to effectively defend against unseen attacks without the need for additional training.
+
+Table 5: Performance comparison of defense methods on CIFAR-10 against unbounded latent-based attack (Shukla & Banerjee, 2023) using a generative adversarial network (GAN) (Goodfellow et al., 2014).
+
+
Method
Clean Acc (%)
Robust Acc (%)
ResNet-18
80.2
12.4
FARE (Schlarmann et al., 2024)
77.7
61.7
TeCoA (Mao et al., 2022)
79.6
63.7
Our CLIPure - Diff
95.2
69.2
Our CLIPure - Cos
95.6
70.8
+
+# C.4 BASELINES
+
+In this section, we discuss the detailed experimental settings of the baselines mentioned in Section 5.1. For the CIFAR-10 dataset results shown in Table 1, we use the off-the-shelf Stable Diffusion model as provided by Li et al. (2023), employing it as a zero-shot classifier. Our LM-StableDiffusion method adapts this model to a likelihood maximization approach. Other methods were applied directly according to the model in the original papers for CIFAR-10 without additional training.
+
+For the ImageNet dataset experiments detailed in Table 2, FARE (Schlarmann et al., 2024) and TeCoA (Mao et al., 2022) involve testing checkpoints that were adversarially trained on the ImageNet dataset specifically for an $\ell_{\infty}$ threat model with $\epsilon = 4 / 255$ . The LM-DaLLE2.Decoder method utilizes the Decoder module from the ViT-L-14 model of DaLLE2 (Ramesh et al., 2022) provided by OpenAI, adapted to the likelihood maximization method. DiffPure-DaLLE2.Decoder adapts the same Decoder module to the DiffPure (Nie et al., 2022) purification method. Other methods use models as provided and trained in the original papers.
+
+Regarding the zero-shot performance across 13 datasets shown in Table 7, we opt for the adversarially trained models of TeCoA (Mao et al., 2022) and FARE (Schlarmann et al., 2024) with an $\ell_{\infty}$ threat model at $\epsilon = 4 / 255$ as they exhibited superior performance compared to those trained with $\epsilon = 2 / 255$ .
+
+In the results presented in Table 4 and Table 5, we conduct an adversarial evaluation using models as specified in the literature without any additional fine-tuning.
+
+# D MORE EXPERIMENTAL RESULTS
+
+# D.1 CASE STUDY
+
+To visualize the purification path of CLIPure, we employ the Decoder of DaLLE2 (Ramesh et al., 2022), which models the generation process from image embeddings to images through a diffusion model. As shown in Figure 6, starting from an adversarial example initially classified as a 'stupa,' CLIPure modifies the semantic properties of the image embedding. By the second step, the image is purified to 'mountain,' closely aligning with the semantics of the original image, which also contains mountainous features. Subsequently, after multiple purification steps, the image embedding is accurately classified as the 'valley' category.
+
+In Figure 10, we analyze the distribution of cosine similarity between the embeddings of clean images and adversarial examples with words to understand the semantics of image embeddings. In Figure 8, we also highlight the specific top-ranked categories for the benign and adversarial examples. We observe that the cosine similarity distribution for words close to the clean image is stable and resembles the prior distribution shown in Figure 9a. In contrast, the distribution of cosine similarity for the adversarial examples shows anomalies, with the top-ranked adversarial labels displaying abnormally high cosine similarities. This could potentially offer new insights into adversarial sample detection and defense strategies.
+
+Table 6: Performance of CLIPure-Cos based on various versions of CLIP (Radford et al., 2021), EVA2-CLIP (Sun et al., 2023), CLIPA (Li et al., 2024b), and CoCa (Yu et al.) under the $\ell_{\infty}$ threat model ( $\epsilon = 4/255$ ) on the ImageNet dataset. "Param" denotes the number of parameters. The prefix "RN" refers to ResNet-based (He et al., 2016) methods, while "ViT" indicates Vision Transformer-based (Alexey, 2020) approaches.
+
+
Model
Version
Param (M)
w/o Defense
CLIPure
Acc (%)
Rob (%)
Acc (%)
Rob (%)
CLIP (Radford et al., 2021)
RN50
102
59.7
0.0
60.0
52.9
RN101
119
61.6
0.0
61.9
55.5
RN50x64
623
72.0
0.0
72.3
69.5
ViT-B-16
149
68.1
0.0
68.2
63.0
ViT-B-32
151
62.0
0.0
62.0
58.1
ViT-L-14
427
74.9
0.0
76.3
72.6
ViT-H-14
986
77.2
0.0
77.4
74.4
ViT-bigG-14
2539
80.4
0.0
80.4
77.6
EVA2-CLIP (Sun et al., 2023)
ViT-B-16
149
74.6
0.0
74.7
71.7
ViT-L-14
427
81.0
0.0
80.7
78.7
CLIPA (Li et al., 2024b)
ViT-L-14
414
79.0
0.0
79.0
77.2
ViT-H-14
968
81.8
0.0
81.5
79.3
CoCa (Yu et al.)
ViT-B-32
253
64.2
0.0
63.8
59.8
+
+
+Figure 6: Purification process of our CLIPure model for an image of a 'valley' adversarially perturbed to be classified as 'stupa'. Using the DaLLE2 Decoder (Ramesh et al., 2022), we visualize the stages of image embedding purification. The text below each picture annotates the classification results corresponding to each timestep in the purification process.
+
+Additionally, we illustrate the purification path using T-SNE. As depicted in Figure 7, an image sampled from CIFAR-10 originally categorized as 'airplane' was adversarially manipulated to resemble a 'truck,' making it an outlier. Through our CLIPure method, the image is purified towards a high-density area and ultimately reclassified accurately as the 'airplane' category.
+
+# D.2 ANALYSIS FROM TEXTUAL PERSPECTIVE
+
+In this section, we provide additional analysis from a textual perspective as a supplement to the analysis. In Figure 8, we take advantage of the text modality of the CLIP model to understand the semantics of clean and adversarial examples by matching them with closely related words. We
+
+Table 7: Zero-shot performance on 13 datasets against AutoAttack under $\ell_{\infty}$ threat model with $\epsilon = 2/255$ and $\epsilon = 4/255$ . FARE (Schlarmann et al., 2024) and TeCoA (Mao et al., 2022) are trained on $\ell_{\infty}$ threat model with $\epsilon = 4/255$ for its generally better performance than $\epsilon = 4/255$ . Underlined results indicate the best robustness among baselines, while bold text denotes state-of-the-art (SOTA) performance across all methods. The term increase represents the percentage improvement in robustness compared to the best baseline method.
+
+
Eval.
Method
CalTech
Cars
CIFAR10
CIFAR100
DTD
EuroSAT
FGVC
Flowers
ImageNet-R
ImageNet-S
PCAM
OxfordPnts
STL-10
Average Zero-shot
clean
CLIP
83.3
77.9
95.2
71.1
55.2
62.6
31.8
79.2
87.9
59.6
52.0
93.2
99.3
73.1
TeCoA
78.4
37.9
79.6
50.3
38.0
22.5
11.8
38.4
74.3
54.2
50.0
76.1
93.4
54.2
FARE
84.7
63.8
77.7
56.5
43.8
18.3
22.0
58.1
80.2
56.7
50.0
87.1
96.0
61.1
CLIPure-Diff
79.9
75.5
94.9
63.8
55.2
58.2
29.3
75.0
87.5
55.9
56.8
90.4
98.4
70.8
CLIPure-Cos
82.9
78.6
95.6
73.0
55.4
63.3
33.2
79.3
87.7
58.3
52.0
92.5
99.6
73.2
\( \ell_{\infty} = 2/255 \)
CLIP
0.0
0.0
0.0
0.0
0.0
0.1
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
TeCoA
69.7
17.9
59.7
33.7
26.5
8.0
5.0
24.1
59.2
43.0
48.8
68.0
86.7
42.3
FARE
76.7
30.0
57.3
36.5
28.3
12.8
8.2
31.6
61.6
41.6
48.4
72.4
89.6
45.9
CLIPure-Diff
75.1
65.9
92.5
52.6
45.9
41.5
20.8
65.8
86.5
49.8
51.4
86.2
97.9
64.0 ↑39.4%
CLIPure-Cos
80.8
73.9
93.0
65.0
50.7
49.1
28.2
75.3
85.4
54.3
49.1
91.2
99.5
68.8 ↑45.9%
\( \ell_{\infty} = 4/255 \)
CLIP
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
TeCoA
60.9
8.4
37.1
21.5
16.4
6.6
2.1
12.4
41.9
34.2
44.0
55.2
74.3
31.9
FARE
64.1
12.7
34.6
20.2
17.3
11.1
2.6
12.5
40.6
30.9
48.3
50.7
74.4
32.4
CLIPure-Diff
74.1
66.3
90.6
51.6
45.2
42.9
18.8
65.8
83.8
48.8
52.0
85.7
97.2
63.3 ↑95.4%
CLIPure-Cos
80.1
72.2
91.1
59.1
50.1
48.4
26.1
74.8
84.6
52.4
48.9
91.0
99.4
67.4 ↑108.0%
+
+
+Figure 7: Purification process of the adversarial example attacked from ground truth label 'airplane' to adversarial label 'truck' and purified by our CLIPure-Diff visualized by T-SNE. The image is randomly sampled from the CIFAR-10 dataset.
+
+selected words from ImageNet's categories and supplemented this with an additional 10,000 randomly drawn words from natural language vocabulary for a comprehensive list. We observe that the meanings of the category words ranking high are relatively similar. For clean samples, the distribution of cosine similarity across ranks is relatively stable, whereas the adversarial samples exhibit abnormally high cosine similarity for adversarial categories at top ranks. Figure 9a displays the distribution of cosine similarities between the word embeddings and an image embedding generated from pure noise, across various ranks. We aim to use these similarities to represent the prior probabilities of the words. The results indicate that most samples cluster around a cosine similarity
+
+
+(a) clean sample
+
+
+(b) adversarial example
+
+
+Figure 8: Cosine similarity between word and image embeddings of (a) clean and (b) adversarial examples in Figure 6 across different ranks. Blue dots denote 10,000 words sampled from Word2Vec vocabulary (Church, 2017), and red dots denote words from the 1,000 ImageNet categories.
+(a) prior probability
+
+
+(b) highlight top-ranked words
+Figure 9: (a) Cosine similarity between words and the image embeddings of a noisy example to illustrate the prior probability of the words. (b) Highlights the top-ranked words within the 1,000 ImageNet categories, emphasizing the most semantically similar words to the noisy image.
+
+of approximately 0.15, with only a few extreme values either much higher or lower, suggesting a normal distribution pattern. This indicates that a majority of the samples have moderate prior probabilities, contrasting with the long-tail distribution often observed in textual data. In Figure 9b, we highlight the top-ranked words in the vocabulary that are closest to the noisy image embedding. Words like "television", which appear frequently in image data, rank high, aligning with our expectations. This abnormal phenomenon in adversarial samples could potentially inspire adversarial detection and more robust adversarial defense methods.
+
+# D.3 COMBINING CLIPURE WITH OTHER STRATEGIES
+
+In this section, we conduct experiments that combine orthogonal strategies, including adversarial training (Schlarmann et al., 2024) and pixel space purification (Chen et al., 2023), as well as incorporating classifier confidence guidance. We carry out evaluations using a sample of 256 images from the ImageNet test set. The experimental setup in this section is aligned with the same configuration as presented in Table 2, detailed in Section 5.1.
+
+Combination with Adversarial Training (CLIPure+AT). Orthogonal adversarial training (AT) methods like FARE (Schlarmann et al., 2024) has fintuned CLIP on ImageNet. We combine CLIPure and FARE by purifying image embedding in FARE's latent space and classification via FARE. The experimental results, depicted in Fig. 11a, indicate that the CLIPure-Diff+AT method enhances adversarial robustness in CLIPure-Diff. This improvement could be attributed to FARE providing more accurate likelihood estimates, as it is specifically trained on adversarial examples. When combined with CLIPure-Cos, the outcomes were comparable, likely because the inherent robustness of CLIPure-Cos is already high, leaving limited scope for further enhancement.
+
+Combination with Pixel Space Purification (CLIPure+LM). Purification in latent space and pixel space occurs at different stages of processing. Pixel space purification acts directly on the input samples, while latent space purification operates on the latent vectors encoded from the input picture.
+
+
+(a) clean sample
+
+
+(b) adversarial example
+
+
+(a) Combination methods
+
+
+Figure 10: Cosine similarity between words and the image embedding of (a) clean sample and (b) adversarial example of the case shown in Figure 6 to illustrate the top-ranked words.
+(b) Impact of guidance weight
+Figure 11: (a) Accuracy and robustness against AutoAttack with $\ell_{\infty} = 4 / 255$ on ImageNet of CLIPure, CLIPure combined with Adversarial Training (AT), and CLIPure combined with pixel space Likelihood Maximization (LM). (b) Performance on ImageNet against AutoAttack with $\ell_{\infty} = 4 / 255$ incorporating with classifier confidence guidance.
+
+By combining both methods, we first purify the input samples in pixel space, then pass the purified samples through an encoder to obtain latent vectors, which are further purified in latent space. We mark this combination as CLIPure+LM. For the Likelihood Maximization (LM) method, we chose LM-EDM (Chen et al., 2023) due to its strong performance across pixel space purification methods.
+
+Experimental results, as shown in Fig. 11a, indicate that combining with LM leads to a decrease in both clean accuracy and robustness. This decline may be associated with the challenges of information loss inherent to pixel space purification. Since LM operates directly on the pixels of the image, it is highly sensitive to the degree of purification. However, the adversarial perturbation varies across samples, potentially leading to over-purification thus a decrease in performance. In contrast, purification in latent space with polar coordinates simply involves changing vector directions—altering semantics without reducing semantic information. Thus, it avoids the problem of semantic information loss.
+
+Combination with Classifier Guidance. In Eq. 4, we note that the reverse-time SDE associated with the attack method includes not only a likelihood maximization purification term but also a classifier guidance term, represented as $\nabla_{\boldsymbol{x}}\mathcal{L}(\theta ;\boldsymbol{x}_t,\boldsymbol{y}_{\mathrm{true}})$ . This approach aligns with the classifier confidence guidance proposed by Zhang et al. (2024). We incorporate this classifier guidance term in two versions of CLIPure (CLIPure-Diff and CLIPure-Cos) as described in Algorithm 1. Since the ground truth label $y_{\mathrm{true}}$ is unknown, we employ the predicted label by the CLIP model as a proxy for $y_{\mathrm{true}}$ . To address potential inaccuracies in early estimations, classifier guidance was only applied in the final 5 steps of the 10-step purification process.
+
+We evaluate the performance varied with the weight of the guidance term, as depicted in Fig. 11b. It shows that a guidance weight of $10^{-4}$ led to the largest improvement in robustness: CLIPure-
+
+
+(a) Embeddings in CLIP's latent space
+
+
+(b) Impact of step size
+Figure 12: (a) Visualization of image and text embeddings reduced via PCA and plotted in polar coordinates using t-SNE. $z^i$ and $z^t$ represent the image and text embeddings obtained through CLIP, respectively. Since vector direction signifies semantics, we depict the samples in polar coordinates to emphasize directional properties. (b) Impact of step size during a 10-step purification process using CLIPure-Cos on 1000 ImageNet samples against AutoAttack with $\ell_{\infty}$ threat model $(\epsilon = 4/255)$ .
+
+Diff achieved a robustness of $67.2\%$ (an increase of $+2.2\%$ over scenarios without guidance), and CLIPure-Cos attained a robustness of $73.1\%$ (an improvement of $+0.5\%$ over no guidance).
+
+# D.4 T-SNE VISUALIZATION
+
+In Figure 12a, we display the distribution of image embeddings $z^i$ for both benign samples and adversarial examples from a subset of 30 samples on the CIFAR-10 dataset, after dimensionality reduction using t-SNE. The figure also includes embeddings for 10 category-associated texts (e.g., "a photo of a dog.") $z^t$ , as well as the text embedding for a blank template "a photo of a."
+
+We observe distinct clustering of text vectors, clean image embeddings, and adversarial image embeddings in the space. The blank template, which is used for purification, is positioned at the center of the category text clusters, representing a general textual representation. This arrangement demonstrates that clean and adversarial sample distributions occupy distinct regions in the embedding space, providing a foundational basis for the effectiveness of adversarial sample purification.
+
+# D.5 HYPERPARAMETERS
+
+# D.5.1 IMPACT OF STEP SIZE
+
+We conducted experiments to assess the impact of different step sizes on the effectiveness of purification. Figure 12b shows how the clean accuracy and robustness against AutoAttack $(\ell_{\infty} = 4 / 255)$ of our CLIPure-Cos method vary with changes in step size. These experiments were carried out on 1,000 samples from the ImageNet test set with 10-step purification. The results indicate that the performance of the method is relatively stable across different step sizes, consistently demonstrating strong effectiveness.
+
+Limited to the computational complexity of CLIPure-Diff, we opt not to conduct a parameter search for this model. Instead, we directly apply the optimal parameters found for CLIPure-Cos.
+
+# D.5.2 IMPACT OF PURIFICATION STEP
+
+As illustrated in Figure 13 (Left), we assess the performance of various purification steps in CLIPure-Cos and CLIPure-Diff. The results indicate that insufficient purification while maintaining acceptable clean accuracy, results in low robustness. As the number of purification steps increases, robustness gradually improves. Continuing to increase the purification steps stabilizes both accuracy and robustness, demonstrating a balance between the two metrics as the process evolves.
+
+
+Figure 13: Clean accuracy (marked as "Acc") and robust accuracy (marked as "Rob") across different (Left) purification steps and (Right) attack budgets. "Diff" indicates CLIPure-Diff while "Cos" represents CLIPure-Cos.
+
+
+
+# D.6 PERFORMANCE ACROSS ATTACK BUDGET
+
+To further explore the adversarial defense capabilities of CLIPure, we evaluate the robustness of CLIPure-Diff and CLIPure-Cos against various attack budgets, following the settings used in Table 2. As shown in Figure 13 (Right), CLIPure-Diff demonstrates superior clean accuracy (at $\epsilon = 0$ ); however, its robustness decreases as the intensity of the attacks increases. In contrast, CLIPure-Cos exhibits a stronger ability to withstand adversarial perturbations.
\ No newline at end of file
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/images.zip b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..b06ceb34fd308e3e3ce55ff9d199bc56723aa6a8
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:17461cf3ffde5f85c91bd85a00960c6d65e8d00dfff8c96b6524b3eb0c7025cc
+size 1324729
diff --git a/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/layout.json b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..6b08fa58a07335ad0c064c70211d48d53b10a96b
--- /dev/null
+++ b/ICLR/2025/CLIPure_ Purification in Latent Space via CLIP for Adversarially Robust Zero-Shot Classification/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ac44dabd285a432549eef6159838f4851d9f4e35aacd28fa4f87214146eff4e1
+size 832300
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_content_list.json b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..4406468e707d746ec6e931b97f8e4d7be86b6bdd
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fe183c153a2cbf06cca15ae59eeb25c3a4495edc56dc783d160068ff4c49ddb2
+size 79122
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_model.json b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..bad76d1b375836ea434b4d67e69fa3fc75181bec
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:af26d36609ccf32da0175deecb860033dd4b5a29c22e71fc5843300d190875a5
+size 98293
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_origin.pdf b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..432a69f9d8ca7b4fab29fc9d2c5e7570403aa2df
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/a8045d26-ce6f-461f-a325-fcd6b457fd3c_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5ea934fa0c67702ed2dfb22038aa4a67955b8ebeb143617c1dbf33487fbd0ad0
+size 3664243
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/full.md b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..7c31a0e7a416198a0fe6f343a3118e60602d0fc8
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/full.md
@@ -0,0 +1,247 @@
+# CO-MOT: BOOSTING END-TO-END TRANSFORMER-BASED MULTI-OBJECT TRACKING VIA COOPETITION LABEL ASSIGNMENT AND SHADOW SETS
+
+Feng Yan* Weixin Luo* Yujie Zhong, Yiyang Gan, Lin Ma†
+
+Meituan Inc., China.
+
+{yanfeng05,luoweixin,zhongyujie,ganyiyang}@meituan.com
+
+forest.linma@gmail.com
+
+# ABSTRACT
+
+Existing end-to-end Multi-Object Tracking (e2e-MOT) methods have not surpassed non-end-to-end tracking-by-detection methods. One possible reason lies in the training label assignment strategy that consistently binds the tracked objects with tracking queries and assigns few newborns to detection queries. Such an assignment, with one-to-one bipartite matching, yields an unbalanced training, i.e., scarce positive samples for detection queries, especially for an enclosed scenew with the majority of the newborns at the beginning of videos. As such, e2e-MOT will incline to generate a tracking terminal without renewal or re-initialization, compared to other tracking-by-detection methods. To alleviate this problem, we propose Co-MOT, a simple yet effective method to facilitate e2e-MOT by a novel copetition label assignment with a shadow concept. Specifically, we add tracked objects to the matching targets for detection queries when performing the label assignment for training the intermediate decoders. For query initialization, we expand each query by a set of shadow counterparts with limited disturbance to itself. With extensive ablation studies, Co-MOT achieves superior performances without extra costs, e.g., $69.4\%$ HOTA on DanceTrack and $52.8\%$ TETA on BDD100K. Impressively, Co-MOT only requires $38\%$ FLOPs of MOTRv2 with comparable performances, resulting in the $1.4 \times$ faster inference speed. Source code is publicly available at https://github.com/BingfengYan/CO-MOT.
+
+# 1 INTRODUCTION
+
+Multi-Object Tracking (MOT) is traditionally tackled by a series of tasks, e.g., object detection (Zhao et al., 2024; Zou et al., 2023), appearance Re-ID (Zheng et al., 2016; Li et al., 2018; Bertinetto et al., 2016; Ye et al., 2024), motion prediction (Lefevre et al., 2014; Welch et al., 1995), and temporal association (Kuhn, 1955). The sparkling advantage of this paradigm is task decomposition, leading to an optimal solution for each task. However, it lacks global optimization for the whole pipeline.
+
+Recently, there has been a rise in end-to-end Multi-Object Tracking (e2e-MOT) models using transformers. These models input consecutive video frames and directly output bounding boxes and association information, eliminating the need for pre- or post-processing steps such as separate detectors, Re-ID feature extraction, or IoU matching. Notable contributions in this field include MOTR (Zeng et al., 2022) and TrackFormer (Meinhardt et al., 2022), which perform detection and tracking simultaneously in unified transformer decoders. Specifically, tracking queries achieve identity tracking through recurrent attention over time. Meanwhile, detection queries discover newborns in each newly arriving frame, excluding previously tracked objects, due to a Tracking Aware Label Assignment (TALA) during training. However, the TALA matching mechanism often leads to an imbalance between detection queries and tracking queries. This mechanism first matches the tracking queries and then assigns the remaining ground truth objects (newborns) to the detection queries. In many scenarios, especially in closed environments, there are very few newborn objects in the video
+
+frames after the initial frame. To illustrate this, we conduct an analysis on the DanceTrack dataset and found that the ratio of newborn objects to tracked targets is 213:25483. Moreover, we observe that e2e-MOT tends to underperform due to suboptimal detection capabilities. In Figure1 e2e-MOT consistently results in tracking termination. MOTRv2 (Zhang et al., 2023) supports this observation and addresses it by leveraging a pre-trained YOLOX detector to boost the performances. However, introducing an additional detector introduces extra overhead during deployment and undermines the advantages of the e2e-MOT approach.
+
+In this paper, we present a novel perspective for addressing the above limitations of e2e-MOT: detection queries are exclusive but also beneficial to tracking queries. To this end, we develop a COpetition Label Assignment (COLA) for training tracking and detection queries. Except for the last Transformer decoder remaining the competition strategy to avoid trajectory redundancy, we allow the previously tracked objects to be reassigned to the detection queries in the intermediate decoders. Due to the self-attention mechanism among all queries, detection queries will be complementary to tracking queries with the same identity, resulting in feature augmentation for tracking objects with significant appearance variance. Thus, the tracking terminal problem will be alleviated.
+
+Besides TALA, another drawback in transformer-based detection and tracking is one-to-one bipartite matching used, which cannot produce sufficient positive samples, as stated by Co-DETR (Zong et al., 2023) and HDETR (Jia et al., 2023) that introduce one-to-many assignment to overcome this limitation. Different from these remedies with one-to-many auxiliary training, we develop a one-to-set matching strategy with a novel shadow concept, where each individual query is augmented with multiple shadow queries by adding limited disturbance to itself, so as to ease the one-to-set optimization. The set of shadow queries endows CO-MOT with discriminative training by optimizing the most challenging query in the set with the maximal cost, which can thereby enhance the generalization ability.
+
+We evaluate our proposed method on the public MOT benchmarks, including DanceTrack (Sun et al., 2022), BDD100K (Yu et al., 2020) and MOT17 (Milan et al., 2016), and achieve superior performances. The contributions of this work lie in threefold. i) We introduce a copetition label assignment for training tracking and detection queries for e2e-MOT with high efficiency. ii) We develop a one-to-set matching strategy with a novel shadow concept to address the hunger for positive training samples and enhance generalization ability. iii) Our approach achieves superior performances on public benchmarks, while functioning as an efficient tool to boost the performance of end-to-end transformer-based MOT.
+
+# 2 METHOD
+
+# 2.1 MOTIVATION
+
+To explore the shortcomings of current end-to-end methods in tracking, we conduct an in-depth study of the effectiveness on DanceTrack validation and MOT17 test dataset by analyzing MOTR, which is one of representative e2e-MOT methods. In Figure $\boxed{[}$ we show the tracking results of MOTR in some video frames, e.g., DanceTrack0073 and MOT17-09. In the left three columns of the first row, the 3rd person (in the yellow box) is tracked normally in frame #237. However, in frame #238, due to an inaccurate detection, the bounding box is not accurately placed around that person (the box is too large to include a person on the left side). In frame #239, the tracking is completely wrong and associated with the 2nd person instead. In the right three columns of the first row, the 2nd person (in the yellow box) is successfully detected and tracked in frame #302. However, in frame #312, this person is occluded by other people. When the person appears again in frame #322, she is not successfully tracked or even detected. To determine whether the tracking failure is caused by the detection or association of MOTR, we visualized MOTR's detection results in the second row. We remove the tracking queries during inference, and the visualization shows that all persons are accurately detected. This demonstrates that the detection will deteriorate due to the nearby tracked objects, though TALA used in training ensures that the detection with the same identity of tracked objects will be suppressed.
+
+We further provide quantitative results of how the queries affect each other in Table 1. All the decoded boxes of both tracking and detection queries are treated as detection boxes, allowing evaluation by the mAP metric commonly used for object detection. We can see from the table that the
+
+
+Figure 1: Visualization of tracking results in DanceTrack0073 and MOT17-09 videos. The first row displays the tracking results from MOTR, where all individuals are correctly initialized at the beginning (#237 and #302). However, heavy occlusion appears in the middle frames (#238 and #312), resulting in inaccurate detection (indicated by the yellow boxes). The tracking of the yellow targets finally terminates in frames #239 and #322. The second row shows MOTR's detection results, where tracking queries are removed during the inference process. Targets in different frames are accurately detected without interference from tracking queries.
+
+Table 1: Detection performance (mAP) of MOTR (v2) on DanceTrack validation dataset. $\checkmark$ means whether the tracking queries are used in the training or inference phase. All decoded boxes of both tracking if applicable and detection queries are treated as detection boxes for evaluation on mAP. We separately evaluate the detection performance for six decoders. For analysis, please refer to the motivation section.
+
+
model
Training
Inference
1
2
3
4
5
6
(a)
MOTR
✓
✓
41.4
42.4
42.5
42.5
42.5
42.5
(b)
MOTR
✓
56.8
60.1
60.5
60.5
60.6
60.6
(c)
MOTR
57.3
62.2
62.9
63.0
63.0
63.0
(d)
MOTRv2
✓
✓
67.9
70.2
70.6
70.7
70.7
70.7
(e)
MOTRv2
✓
71.9
72.1
72.1
72.1
72.1
72.1
(f)
CO-MOT(ours)
✓
✓
-
-
-
-
-
69.1
+
+vanilla MOTR (a) has a low mAP of $42.5\%$ , but it increases by $18.1\%$ ( $42.5\%$ vs $60.6\%$ ) when removing tracking queries during inference (b). Then we retrain MOTR as a sole detection task by removing tracking queries (c), and the mAP further increases to $66.1\%$ ( $+5.5\%$ ). This means the DETR-style MOT model has a sparking capability of detection but still struggles with the temporal association of varied appearances, which is the crucial factor of MOT.
+
+We also observe excellent detection performance (70.7%) for MOTRv2, which introduces a pretrained YOLOX detector. Removing tracking queries during inference brings a slight improvement (1.4%) in mAP, which means MOTRv2 has almost addressed the poor detection issue with high-quality detection priors from YOLOX. However, the introduction of YOLOX brings extra computational burden, unfriendly for deployment. In contrast, we aim to endow the end-to-end MOT model with its own powerful detection capability, rather than introducing any extra pretrained detector.
+
+# 2.2 TRACKING AWARE LABEL ASSIGNMENT
+
+Here we revisit the Tracking Aware Label Assignment (TALA) used to train end-to-end Transformers such as MOTR and TrackFormer for MOT. At time $t - 1$ , $N$ queries are categorized into two types: $N_{T}$ tracking queries $Q_{t} = \{q_{t}^{1},\dots,q_{t}^{N_{T}}\}$ and $N_{D}$ detection queries $Q_{d} = \{q_{d}^{1},\dots,q_{d}^{N_{D}}\}$ , where $N = N_{T} + N_{D}$ . All the queries will self-attend each other and then cross-attend the image feature tokens via $L$ decoders, and the output embeddings of the $l$ -th decoder are denoted as $E^{l} = \{e_{1}^{l},\dots,e_{N_{T}}^{l}\}$ and $F^{l} = \{f_{1}^{l},\dots,f_{N_{D}}^{l}\}$ . At time $t$ , there are $M_{G}$ ground truth boxes. Among them, $M_{T}$ are previously tracked objects, denoted as $\hat{E} = \{\hat{e}_{1},\dots,\hat{e}_{M_{T}}\}$ , which are assigned to $N_{T}$ tracking queries, where $M_{T} \leq N_{T}$ as some objects disappear. Formally, $j$ -th tracking em
+
+
+Figure 2: The CO-MOT framework includes a CNN-based backbone network for extracting image features, a deformable encoder for encoding image features, and a deformable decoder that uses self-attention and cross-attention mechanisms to generate output embeddings with bounding box and class information. The queries in the framework use set queries as units, with each set containing multiple shadows that jointly predict the same target. Detection queries and tracking queries are used for detecting new targets and tracking existing ones, respectively. To train CO-MOT, S-COLA and S-TALA are proposed for training only.
+
+bedding $e_j^l$ will be assigned to the same identity as in the previous timestamp if still alive at this moment; otherwise, it will be set to zero (disappearing). Besides, $M_D$ newborn objects, denoted as $\hat{F} = \{\hat{f}_1, \dots, \hat{f}_{M_D}\}$ , are assigned to $N_D$ detection queries. Specifically, the Hungarian matching algorithm is used to find the optimal pairing between $F^i$ and $\hat{F}$ for each decoder, using a cost function $(L_m = L_f(c) + L_1(b) + L_g(b) \in \mathbb{R}^{N_D \times M_G})$ that takes into account the class scores and box overlapping. Where $L_f(c)$ represents the focal loss for classification, $L_1(b)$ represents the $L_1$ cost of the bounding box, and $L_g(b)$ represents the Generalized Intersection over Union cost.
+
+# 2.3 OVERALL ARCHITECTURE
+
+The entire CO-MOT framework is illustrated in Figure. During the forward process, the features of an image in a video are extracted by the backbone and fed into the deformable encoder to aggregate information. Finally, together with the detection and tracking queries, they are used as the inputs of the $L$ layer decoders ( $L = 6$ in this paper by default) to detect new targets or track the already tracked targets. It is worth noting that queries contain $(N_T + N_D) \times N_S$ positions $(\mathbb{P} \in \mathbb{R}^4)$ and embeddings $(\mathbb{E} \in \mathbb{R}^{256})$ as we use deformable attention. Here $N_S$ is the number of shadow queries for each set, and we will introduce the shadow set concept in the following section. All the queries predict $(N_T + N_D) \times N_S$ target boxes, where $N_S$ queries in a set jointly predict the same target. To train CO-MOT, we employ the COLA and TALA on the different decoders, along with the one-to-set label assignment strategy.
+
+# 2.4 COOPETITION LABEL ASSIGNMENT
+
+Unlike TALA, which only assigns newborn objects to detection queries, we propose a novel COpetition Label Assignment (COLA). Specifically, we assign $M_T$ tracked objects to detection queries in the intermediate decoders, i.e., $l < L$ , as illustrated in Figure 2. As shown in the output of the first decoder, the track queries continue to track the 3rd and 4th person. The detection queries not only detect the 1st and 2nd newborns but also detect the 3rd and 4th people. Note that we remain the competition assignment for the $L$ -th decoder to avoid trajectory redundancy during inference. Thanks to the self-attention mechanism used between tracking and detection queries, detection queries with the same identity can enhance the representation of the corresponding tracking queries (e.g., grey 3rd helps blue 3rd).
+
+# 2.5 SHADOW SET
+
+In densely crowded scenes, objects can be lost or mistakenly tracked to other objects due to minor bounding box fluctuations. We conjecture that one query for one object is sensitive to prediction
+
+noise. Inspired by previous works such as Group-DETR and H-DETR, we propose the one-to-set label assignment strategy for multi-object tracking, which is significantly different from the one-to-many manner. During tracking, an object is no longer tracked by a single query but by a set of queries, where each member of the set acts as a shadow of each other. Tracking queries are rewritten as $Q_{T} = \{\{q_{T}^{1,j}\}_{j=1}^{N_{S}}, \dots, \{q_{T}^{N_{T},j}\}_{j=1}^{N_{S}}\}$ , and detection queries are rewritten as $Q_{D} = \{\{q_{D}^{1,j}\}_{j=1}^{N_{S}}, \dots, \{q_{D}^{N_{D},j}\}_{j=1}^{N_{S}}\}$ . The total number of queries is $N \times N_{S}$ . When a particular query in the set tracks the object incorrectly, the other shadows in the same set help it continue tracking the object. In experiments, this strategy prove effective in improving tracking accuracy and reducing tracking failures in dense and complex scenes.
+
+Initialization. $P^{i,j} \in \mathbb{R}^4$ and $X^{i,j} \in \mathbb{R}^{256}$ , which represent the position and embedding of the $j$ -th shadow query in the $i$ -th set, are initialized, significantly affecting convergence and final performance. In this paper, we explore three initialization approaches: i) $I_{rand}$ : random initialization; ii) $I_{copy}$ : initializing all shadows in the same set with one learnable vector, i.e., $P^{i,j} = P^i$ and $X^{i,j} = X^i$ , where $P^i$ and $X^i$ are learnable embeddings with random initialization; iii) $I_{noise}$ : adding Gaussian noise $\mathcal{N}(0,\sigma_p)$ and $\mathcal{N}(0,\sigma_x)$ to $P^{i,j}$ and $X^{i,j}$ , respectively, in the previous approach. In the experiment, we set $\sigma_p$ and $\sigma_x$ to 1e-6. Although the variance between each shadow in the same set is subtle after initialization, it expands to 1e-2 at the end of training. The last approach provides similarity for helping optimization and diversity to improve tracking performance.
+
+Training. We propose a shadow-based label assignment method (S-COLA or S-TALA) to ensure that all queries within a set are matched to the same ground truth object. Take S-COLA as an example: we treat the set as a whole and select one query as a representative based on certain criteria to participate in subsequent matching. Specifically, for tracking queries $Q_{t}$ , the tracked target in the previous frame is selected to match with the whole set; For detection queries $Q_{d}$ , we first calculate the cost function $(L_{sm} \in \mathbb{R}^{N_{D} \times N_{S} \times M_{G}})$ of all detection queries with respect to all ground truth. We then select the representative query using a strategy $\lambda$ (e.g., Mean, Min, and Max) for each set, resulting in $L_{m} = \lambda (L_{sm}) \in \mathbb{R}^{N_{D} \times M_{G}}$ . $L_{m}$ is then used as an input for Hungarian matching to obtain the matching results between the sets and newborns. Finally, the other shadows within the same set share the representative's matching result.
+
+Inference. We determine whether the $i$ -th shadow set tracks an object by the confidence score of the selected representative. Here we adopt a different strategy $\phi$ (e.g., Mean, Min, and Max) for representative sampling. When the score of the representative is higher than a certain threshold $\tau$ , we select the box and score predictions of the shadow with the highest score as the tracking outputs and feed the entire set to the next frame for subsequent tracking. Sets that do not capture any object will be discarded.
+
+# 3 EXPERIMENT
+
+# 3.1 DATASETS AND METRICS
+
+Datasets. We validate the effectiveness of our approach on different datasets, including DanceTrack, MOT17, and BDD100K.
+
+The DanceTrack dataset is used for multi-object tracking of dancers and provides high-quality annotations of dancer motion trajectories. This dataset is known for its significant challenges, such as fast object motion and similar object appearances.
+
+The BDD100K dataset is a large-scale autonomous driving scene recognition dataset used for scene understanding in autonomous driving systems. This dataset provides multiple object categories, such as cars, pedestrians, etc. It can be used to evaluate our model's performance in multi-object tracking across different object categories. The challenges of this dataset include rapidly changing traffic and road conditions, diverse weather conditions, and lighting changes.
+
+The MOT17 dataset is a commonly used multi-object tracking dataset, with each video containing a large number of objects. The challenges of this dataset include high object density, long occlusions, varied object sizes, dynamic camera poses, and so on. Additionally, this dataset provides various scenes, such as indoor, outdoor, and city centers.
+
+Metrics. To evaluate our method, we use the Higher Order Tracking Accuracy (HOTA) metric (et al., 2020), which is a higher-order metric for multi-object tracking. Meantime We analyze the contributions of Detection Accuracy (DetA), Association Accuracy (AssA), Multiple-Object Tracking Accuracy (MOTA), Identity Switches (IDS), and Identity F1 Score (IDF1). For BDD100K, to better evaluate the performance of multi-class and multi-object tracking, we use the Tracking Every Thing Accuracy (TETA) (Li et al., 2022b), Localization Accuracy (LocA), Association Accuracy (AssocA), and Classification Accuracy(ClsA) metrics. The best results of end-to-end methods are marked in bold. Please pay more attention to the metrics with blue.
+
+Table 2: Comparison to existing methods on the DanceTrack test set. $* *$ and ${}^{* + }{}^{ * }$ respectively represent the use of DAB-Deformable backbone and joint training with CrowdHuman. For static images in CrowdHuman dataset, we apply random shifts as in CenterTrack to generate video vlips with pseudo tracks.
+
+
Source
HOTA
DetA
AssA
MOTA
IDF1
Non-End-to-end
CenterTrack (Zhou et al., 2020)
ECCV'20
41.8
78.1
22.6
86.8
35.7
TransTrack (Sun et al., 2020)
arXiv'20
45.5
75.9
27.5
88.4
45.2
FairMOT (Zhang et al., 2021)
IJCV'21
39.7
66.7
23.8
82.2
40.8
QDTrack (Fischer et al., 2022)
CVPR'21
54.2
80.1
36.8
87.7
50.4
TraDeS (Wu et al., 2021)
CVPR'21
43.3
74.5
25.4
86.2
41.2
ByteTrack (Zhang et al., 2022b)
ECCV'22
47.7
71.0
32.1
89.6
53.9
GTR (Zhou et al., 2022)
CVPR'22
48.0
72.5
31.9
84.7
50.3
MT-IoT+(Yan et al., 2022)
arXiv'22
66.7
84.1
53.0
94.0
70.6
OC-SORT (Cao et al., 2023)
CVPR'23
55.1
80.3
38.3
92.0
54.6
C-BIoU (Yang et al., 2023)
WACV'23
60.6
81.3
45.4
91.6
61.6
MOTRv2+(Zhang et al., 2023)
CVPR'23
69.9
83.0
59.0
91.9
71.7
FineTrack (Ren et al., 2023)
CVPR'23
52.7
72.4
38.5
89.9
59.8
GHOST (Seidenschwarz et al., 2023)
CVPR'23
56.7
81.1
39.8
91.3
57.7
Walker (Segu et al., 2024)
ECCV'24
52.4
36.1
76.5
89.7
55.7
GeneralTrack (Qin et al., 2024)
CVPR'24
59.2
82.0
42.8
91.8
59.7
MotionTrack (Xiao et al., 2024b)
arXiv'24
58.2
81.4
41.7
91.3
58.6
ConfTrack (Jung et al., 2024)
WACV'24
56.1
-
-
89.6
56.2
MambaTrack (Xiao et al., 2024a)
arXiv'24
56.8
80.1
39.8
90.1
57.8
Hybrid-SORT (Yang et al., 2024)
AAAI'24
62.2
-
-
91.6
63.0
UCMCTrack (Yi et al., 2024)
AAAI'24
63.6
-
51.3
88.8
65.0
DiffusionTrack (Luo et al., 2024)
AAAI'24
52.4
82.2
33.5
89.3
47.5
End-to-end
MOTR (Zeng et al., 2022)
ECCV'22
54.2
73.5
40.2
79.7
51.5
DNMOT (Fu et al., 2023)
arXiv'23
53.5
-
-
89.1
49.7
MeMOTR (Gao & Wang, 2023)
ICCV'23
63.4
77.0
52.3
85.4
65.5
MeMOTR* (Gao & Wang, 2023)
ICCV'23
68.5
80.5
58.4
89.9
71.2
MOTRv3+(Yu et al., 2023)
arXiv'23
68.3
-
-
91.7
70.1
SUSHI (Cetintas et al., 2023)
CVPR'23
63.3
80.1
50.1
88.7
63.4
MambaTrack+ (Huang et al., 2024)
arXiv'24
56.1
80.8
39.0
90.3
54.9
OuTR (Liu et al., 2024)
arXiv'24
54.5
-
-
88.3
55.7
DiffMOT (Lv et al., 2024)
CVPR'24
62.3
82.5
47.2
92.8
63.0
ByteSSM (Hu et al., 2024)
arXiv'24
57.7
81.5
41.0
92.2
57.5
CO-MOT
-
65.3
80.1
53.5
89.3
66.5
CO-MOT+
-
69.4
82.1
58.9
91.2
71.9
+
+# 3.2 IMPLEMENTATION DETAILS
+
+Our proposed label assignment and shadow concept can be applied to any e2e-MOT method. For simplicity, we conduct all experiments on MOTR. It uses ResNet50 as the backbone to extract image features and employs a Deformable encoder and Deformable decoder to aggregate features and predict object boxes and categories. We also use the data augmentation methods employed in MOTR, including randomly clipping and temporally flipping video segments. To sample a video segment for training, we use a fixed sampling length of 5 frames and a sampling interval of 10
+
+frames. The dropout ratio in attention is set to zero. We train all experiments on 8 V100-16G GPUs, with a batch size of 1 per GPU. For DanceTrack and BDD100K, we train the model for 20 epochs with an initial learning rate of 2e-4, reducing the learning rate by a factor of 10 every eight epochs. We use 60 initial queries for a fair comparison with previous work. For MOT17, we train the model for 200 epochs, with the learning rate reduced by a factor of 10 every 80 epochs. We use 300 initial queries due to the large number of targets to be tracked.
+
+# 3.3 COMPARISON WITH STATE-OF-THE-ART METHODS
+
+DanceTrack. Our method presents promising results on the DanceTrack test set, as evidenced by Table 2 Without bells and whistles, our method achieves an impressive HOTA score of $65.3\%$ . Compared to other e2e-MOT methods with the ResNet50 backbone, CO-MOT achieves remarkable performance improvements (e.g., $11.1\%$ improvement on HOTA compared to MOTR, $11.8\%$ compared to DNMOT, and $1.9\%$ compared to MeMOTR). Although it falls short of MeMOTR*, it is worth noting that MeMOTR* utilizes the more powerful DAB-Deformable-DETR. In comparison with Non-e2e-MOT methods, our approach demonstrates significant improvements across various tracking metrics. For instance, when compared to the state-of-the-art UCMCTrack, CO-MOT achieves a $1.7\%$ improvement in HOTA and $1.5\%$ improvement in AssA. Our approach can avoid tedious parameter adjustments and ad hoc fusion of two independent detection and tracking modules. It realizes automatic learning of data distribution and global optimization objectives.
+
+With joint training on CrowdHuman dataset, our method CO-MOT $^{+}$ achieves even higher performance with $69.4\%$ HOTA. This is $1.1\%$ improvement over MOTRv3 $^{+}$ with the ResNet50 backbone. Compared to CO-MOT(65.3% vs 69.4% HOTA), we can conclude that increasing the dataset size can lead to further improvements in tracking performance. Additionally, it performs on par with the state-of-the-art Non-e2e-MOT method MOTRv2 $^{+}$ , which incorporates an additional pre-trainedYOLOX detector into MOTR.
+
+As shown in Table CO-MOT achieved the mAP of 69.1, significantly higher than MOTR's 42.5, and slightly lower than MOTRv2's 70.7. As research in this field continues, models like CO-MOT will likely play a crucial role in advancing the state-of-the-art in multiple-object tracking, offering more reliable and efficient solutions for a variety of applications.
+
+Table 3: Comparison to existing methods on various datasets.
+
+
(a) MOT17 Test Dataset
HOTA
AssA
MOTA
IDF1
Non-End-to-end
CenterTrack
52.2
51.0
67.8
64.7
TransTrack
54.1
47.9
74.5
63.9
FairMOT
59.3
58.0
73.7
72.3
QDTrack
63.5
64.5
77.5
78.7
ByteTrack
63.1
62.0
80.3
77.3
OC-SORT
63.2
63.2
78.0
77.5
DiffusionTrack
60.8
58.8
77.9
73.8
MOTRv2
62.0
60.6
78.6
75.0
End-to-end
TrackFormer
-
-
65.0
63.9
MOTR
57.8
55.7
73.4
68.6
MeMOT
56.9
55.2
72.5
69.0
MeMOTR
58.8
58.4
72.8
71.5
DNMOT
58.0
-
75.6
68.1
CO-MOT
60.1
60.6
72.6
72.7
+
+
(b) BDD100K Validation Set
TETA
LocA
AssocA
ClsA
Non-End-to-end
DeepSORT
48.0
46.4
46.7
51.0
QDTrack
47.8
45.8
48.5
49.2
TETer
50.8
47.2
52.9
52.4
MOTRv2
54.9
49.5
51.9
63.1
End-to-end
MOTR
50.7
35.8
51.0
-
CO-MOT
52.8
38.7
56.2
63.6
(c) MOT20 Test Dataset
HOTA
AssA
MOTA
IDF1
End-to-end
MeMOT
54.1
55.0
63.7
66.1
TrackFormer
54.7
-
68.6
65.7
CO-MOT
57.5
65.7
60.1
70.5
+
+BDD100K. Table 3b shows the results of different tracking methods on the BDD100K validation set. To better evaluate the multi-category tracking performance, we adopt TETA, which combines multiple factors such as localization, association, and classification. Compared with other methods, although the LocA was considerably lower, we achieve superior performance on TETA with an
+
+improvement of $2\%$ ( $52.8\%$ vs $50.8\%$ ), which is benefited from the strong tracking association performance revealed by the AssocA ( $56.2\%$ vs $52.9\%$ ). Compared with MOTRv2, CO-MOT slightly falls behind on TETA, but its AssocA is much better than MOTRv2.
+
+MOT17. Table 3a shows the results of the MOT17 test set. Due to the overemphasis on detection performance in MOT17, Non-e2e-MOT methods, starting from ByteTrack, excel at leveraging powerful detectors like YOLOX, achieving excellent detection performance (up to $64.5\%$ DetA) along with other impressive metrics. In this regard, Transformer-based methods, especially e2e-MOT, still have a significant gap in detection performance due to the excessive predictions of dense and small objects in MOT17. On the other hand, e2e-MOT suffers from severe overfitting issues because the MOT17 training set is very small, consisting of only about 5K frames. "Transformers lack some of the inductive biases inherent to CNNs, such as translation equivariance and locality, and therefore do not generalize well when trained on insufficient amounts of data," as mentioned in the ViT paper. MOT17 provides insufficient data to train a Transformer model. Additionally, in MOT17 and DanceTrack, bounding boxes that are less than 0.005 of the image area account for $60.26\%$ and $1.17\%$ , respectively, while bounding boxes that are greater than 0.02 of the image area account for $12.94\%$ and $54.97\%$ , respectively. This highlights that MOT17 primarily comprises smaller targets, which poses a significant challenge for enhancing detection performance with Transformer-based models.
+
+However, despite these challenges, we still achieved a considerable improvement compared to other e2e-MOT methods, reaching a HOTA score of $60.1\%$ . Specifically, we improved the performance of object association, which can be reflected by the AssA and IDF1 metrics. These experimental results further validate the effectiveness of our approach.
+
+MOT20. As the End-to-End solution has just emerged in the past year, there are not many methods evaluated on MOT20 that we could find. Here are the ones in Table 3c. Notably, our approach achieves $57.5\%$ HOTA, which is the state-of-the-art in End-to-end tracking methods.
+
+# 3.4 ABLATION STUDY
+
+Table 4: Ablation study on individual CO-MOT components on the DanceTrack Validation Set and MOT17 Test Set. As components are added, the tracking performance improves gradually.
+
+
COLA
Shadow
DanceTack Validation
MOT17 Test
HOTA
DetA
AssA
MOTA
IDF1
HOTA
DetA
AssA
MOTA
IDF1
(a)
×
×
56.4
71.8
44.6
79.8
57.5
57.8
60.3
55.7
73.4
68.6
(b)
✓
×
60.2
73.2
49.7
81.8
62.4
58.5
58.0
59.2
70.3
70.7
(c)
×
✓
59.0
72.6
48.2
80.9
59.6
-
-
-
-
-
(d)
✓
✓
61.8
73.5
52.2
81.7
63.3
60.1
59.5
60.6
72.6
72.7
+
+Component Evaluation of CO-MOT. Based on the results shown in Table 4, we examine the impact of different components of the CO-MOT framework on tracking performance. Through experimental analysis by combining various components on the DanceTrack (Sun et al., 2022) validation set, we achieve significant improvements over the baseline (61.8% vs 56.4%). By introducing the COLA strategy to the baseline (a), we observe an improvement of 3.8% on HOTA and 5.1% on AssA without any additional computational cost. By incorporating the concept of shadow into the baseline (a), HOTA is improved by 2.6% and AssA is improved by 3.6%. Also, to further illustrate the effectiveness of each component of our method, we also conducte ablation experiments on the MOT17 test dataset, as shown in the Table 4. As components are added, the tracking performance improves gradually.
+
+COLA. It is also evident from Table 4 that both COLA and Shadow have minimal impact on DetA (71.8% vs 73.5%), which is detection-related. However, they have a significant impact on AssA (44.6% vs 52.2%) and HOTA (56.4% vs 61.8%), which are more strongly related to tracking. On the surface, our method seems to help detection as it introduces more matching objects for detection, but it actually helps tracking.
+
+To answer this question, we demonstrate the attention weights between detection and tracking queries in Figure 3. The horizontal and vertical axes denote the attention weights after self-attention
+
+
+Figure 3: The attention weights between different types of queries on different decoders.
+
+
+Figure 4: Efficiency comparison for CO-MOT and other end-to-end methods.
+
+between different types of queries on different decoder layers. These weights roughly indicate the contribution of one query to another. In our model, there are a total of 6 decoder layers. T2T represents the contribution of a tracking query to itself. D2T represents the contribution of a detection query predicting the same object to a tracking query. Two bounding boxes with an IOU greater than 0.7 are treated as the same object. MD2T represents the average contribution of all detection queries to a specific tracking query, which serves as a reference metric. D2T(MOTR) and T2T(MOTR) refer to D2T and T2T in the MOTR model. Note that normalized attention weights are with sum of 1.
+
+From Figure 3 it is evident that detection queries make a significant contribution (more than $15\%$ ) to their corresponding tracking queries in decoder layers where $L > 2$ , even greater than the T2T for #4 and #6 decoders and much higher than the MD2T for all the decoders. This indicates that detection queries pass on the rich semantic information they represent to their corresponding tracking queries, which in turn can be utilized by the tracking queries to improve their tracking accuracy. Compared to CO-MOT, there is almost less information transfer ( $3.74\%$ vs $30.74\%$ ) between detection queries and tracking queries within MOTR. Because in MOTR, detection and tracking queries target different objects, resulting in minimal information exchange, which is straightforward to understand.
+
+Table 5: Performance metrics of COLA inserting different numbers of decoder layers on the DanceTrack validation set.
+
+
l
HOTA
DetA
AssA
MOTA
IDF1
l = 0
59.0
72.9
48.1
81.2
59.8
l = 3
59.6
74.3
48.0
82.8
60.5
l = 5
59.9
73.2
49.3
81.3
60.9
+
+Table 6: Effect of initialization methods for Shadow queries ${I}_{m}$ on the DanceTrack validation set.
+
+
Im
HOTA
DetA
AssA
Im = Icopy
60.6
73.9
50.0
Im = Inoise
61.5
73.1
51.9
Im = Irand
59.6
73.2
48.9
+
+Furthermore, Table 5 studies the performance impact of COLA inserting different decoder layers on the DanceTrack Validation Set for 5 epochs without Shadow Set. $l = 0$ or $l = 3$ mean that the first layer of the 6-layer decoder or the first three layers use COLA, and the other layers use TALA. It can be seen that deploying COLA in more decoder layers leads to better HOTA.
+
+Table 7: Effect of different $\lambda$ and $\phi$ combinations on the DanceTrack validation set.
+
+
λ
max
mean
min
φ
min
mean
max
min
mean
max
min
mean
max
HOTA
57.6
56.4
55.1
56.7
55.2
52.0
57.5
55.9
51.5
DetA
70.7
69.3
65.4
70.6
66.5
59.0
70.8
66.4
59.3
AssA
47.3
46.1
46.7
45.9
46.1
46.1
46.8
47.2
45.0
+
+Table 8: Effect of initialization methods for number of Shadows $N_{S}$ on the DanceTrack validation set.
+
+
N_S
HOTA
DetA
AssA
N_S = 2
61.5
73.1
51.9
N_S = 3
61.8
73.5
52.2
N_S = 3
60.8
73.8
50.3
+
+
+(a)
+
+
+(b)
+Figure 5: Failed cases are often due to the failure to detect the target.
+
+**Shadow Set.** Tables 67 and 8 list ablation experiments related to three hyperparameters of shadow, which are the number of shadows, initialization method of shadows, and representative sampling strategies $\lambda$ and $\phi$ . To choose the appropriate option for $\lambda$ and $\phi$ , we first set $N_S$ to 5 and train the model only on the DanceTrack training set for 5 epochs using $I_{rand}$ without COLA. Then we try different combinations of $\lambda$ and $\phi$ . It can be seen from Table 7 that the combination of $\lambda = max$ and $\phi = min$ yields the best results. That means we use the most challenging query in the set to train the model, leading to discriminative representation learning. To determine the initialization method, we also fix $N_S = 2$ with COLA and find that the best results are achieved using $I_{noise}$ . For $I_{rand}$ , there is a considerable variation between different shadows within the same set due to random initialization, making convergence difficult and resulting in inferior results. Finally, we try different values of $N_S$ and find that the best results are achieved when $N_S = 3$ . When $N_S$ is too large, we observe that convergence becomes more difficult, and the results deteriorate.
+
+# 3.5 EFFICIENCY COMPARISON
+
+In Figure 4 efficiency comparisons on DanceTrack test dataset are made between CO-MOT and MOTR(v2). The horizontal axis represents FLOPs (G) and the vertical axis represents the HOTA metric. The size of the circles represents the number of parameters (M). It can be observed that our model achieves comparable HOTA (69.4% vs 69.9%) with MOTRv2 while maintaining similar FLOPs (173G) and number of parameters(40M) with MOTR. The runtime speed of CO-MOT is much faster (1.4×) than MOTRv2's. Thus, our approach is effective and efficient, which is friendly for deployment as it does not need an extra detector.
+
+# 3.6 LIMITATIONS
+
+Despite the introduction of COLA and Shadow, which improve the tracking effect of MOTR, the inherent data-hungry nature of the Transformer model means that there is not a significant improvement in smaller datasets like MOT17. As shown in Figure 5a, a prominently visible target has not been detected, but this issue has only been observed in the small MOT17 dataset. And due to the scale problem, the detection and tracking performance is poor for small and difficult targets in Figure 5b. In order to further improve the effect, it is necessary to increase the amount of training data or use a more powerful baseline such as DINO.
+
+# 4 CONCLUSION
+
+This paper proposes a method called CO-MOT to boost the performance of end-to-end Transformer-based MOT. We investigate the issues in the existing end-to-end MOT using Transformer and find that the label assignment can not fully explore the detection queries as detection and tracking queries are exclusive to each other. Thus, we introduce a cooptetition alternative for training the intermediate decoders. Also, we develop a shadow set as units to augment the queries, mitigating the unbalanced training caused by the one-to-one matching strategy. Experimental results show that CO-MOT achieves significant performance gains on multiple datasets in an efficient manner. We believe that our method as a plugin significantly facilitates the research of end-to-end MOT using Transformer.
+
+# REFERENCES
+
+Luca Bertinetto, Jack Valmadre, Joao F Henriques, Andrea Vedaldi, and Philip HS Torr. Fully convolutional siamese networks for object tracking. In ECCV, pp. 850-865. Springer, 2016.
+Alex Bewley, Zongyuan Ge, Lionel Ott, Fabio Ramos, and Ben Upcroft. Simple online and realtime tracking. In ICIP. IEEE, 2016.
+Jinkun Cao, Jiangmiao Pang, Xinshuo Weng, Rawal Khirodkar, and Kris Kitani. Observation-centric sort: Rethinking sort for robust multi-object tracking. In CVPR, pp. 9686-9696, 2023.
+Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, and Alexander Kirillov. End-to-end object detection with transformers. In ECCV, pp. 213-229. Springer, 2020.
+Orcun Cetintas, Guillem Brasó, and Laura Leal-Taixe. Unifying short and long-term tracking with graph hierarchies. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22877-22887, 2023.
+Qiang Chen, Xiaokang Chen, Jian Wang, Shan Zhang, et al. Group detr: Fast detr training with group-wise one-to-many assignment. In ICCV, 2023.
+Yunhao Du, Zhicheng Zhao, Yang Song, Yanyun Zhao, Fei Su, Tao Gong, and Hongying Meng.
+Strongsort: Make deepsort great again. TMM, 2023.
+Luiten et al. Hota: A higher order metric for evaluating multi-object tracking. *IJCV*, 129(2): 548-578, 2020.
+Tobias Fischer, Jiangmiao Pang, Thomas E Huang, Linlu Qiu, Haofeng Chen, Trevor Darrell, and Fisher Yu. Qdtrack: Quasi-dense similarity learning for appearance-only multiple object tracking. arXiv preprint arXiv:2210.06984, 2022.
+Teng Fu, Xiaocong Wang, Haiyang Yu, Ke Niu, Bin Li, and Xiangyang Xue. Denoising-mot: Towards multiple object tracking with severe occlusions. In MM, pp. 2734-2743, 2023.
+Ruopeng Gao and Limin Wang. Memotr: Long-term memory-augmented transformer for multi-object tracking. In ICCV, pp. 9901-9910, 2023.
+Zheng Ge, Songtao Liu, Feng Wang, Zeming Li, and Jian Sun. Yolox: Exceeding yolo series in 2021. arXiv preprint arXiv:2107.08430, 2021.
+Bin Hu, Run Luo, Zelin Liu, Cheng Wang, and Wenyu Liu. Trackssm: A general motion predictor by state-space model. arXiv preprint arXiv:2409.00487, 2024.
+Hsiang-Wei Huang, Cheng-Yen Yang, Wenhao Chai, Zhongyu Jiang, and Jenq-Neng Hwang. Exploring learning-based motion models in multi-object tracking. arXiv preprint arXiv:2403.10826, 2024.
+Ding Jia, Yuhui Yuan, Haodi He, Xiaopei Wu, Haojun Yu, Weihong Lin, Lei Sun, Chao Zhang, and Han Hu. Detrs with hybrid matching. arXiv preprint arXiv:2207.13080, 2023.
+Hyeonchul Jung, Seokjun Kang, Takgen Kim, and HyeongKi Kim. Contrack: Kalman filter-based multi-person tracking by utilizing confidence score of detection box. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 6583-6592, 2024.
+Harold W Kuhn. The hungarian method for the assignment problem. NRL, 2(1-2):83-97, 1955.
+Stéphanie Lefèvre, Dizan Vasquez, and Christian Laugier. A survey on motion prediction and risk assessment for intelligent vehicles. ROBOMECH Journal, 1(1):1-14, 2014.
+Feng Li, Hao Zhang, Shilong Liu, Jian Guo, Lionel M. Ni, and Lei Zhang. Dn-detr: Accelerate detr training by introducing query denoising. arXiv preprint arXiv:2203.01305, 2022a.
+Siyuan Li, Martin Danelljan, Henghui Ding, Thomas E Huang, and Fisher Yu. Tracking every thing in the wild. In ECCV, pp. 498-515. Springer, 2022b.
+
+Wei Li, Xiatian Zhu, and Shaogang Gong. Harmonious attention network for person re-identification. In CVPR, pp. 2285-2294, 2018.
+Chongwei Liu, Haojie Li, Zhihui Wang, and Rui Xu. Putr: A pure transformer for decoupled and online multi-object tracking. arXiv preprint arXiv:2405.14119, 2024.
+Shilong Liu, Feng Li, Hao Zhang, Xiao Yang, Xianbiao Qi, Hang Su, Jun Zhu, and Lei Zhang. DAB-DETR: Dynamic anchor boxes are better queries for DETR. In ICLR, 2022.
+Run Luo, Zikai Song, Lintao Ma, Jinlin Wei, Wei Yang, and Min Yang. Diffusiontrack: Diffusion model for multi-object tracking. In Proceedings of the AAAI Conference on Artificial Intelligence, 38(5), pp. 3991-3999, 2024.
+Weiyi Lv, Yuhang Huang, Ning Zhang, Ruei-Sung Lin, Mei Han, and Dan Zeng. Diffmot: A real-time diffusion-based multiple object tracker with non-linear prediction. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19321-19330, 2024.
+Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer. Trackformer: Multi-object tracking with transformers. In CVPR, June 2022.
+Anton Milan, Laura Leal-Taixe, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016.
+Zheng Qin, Le Wang, Sanping Zhou, Panpan Fu, Gang Hua, and Wei Tang. Towards generalizable multi-object tracking. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18995-19004, 2024.
+Hao Ren, Shoudong Han, Huilin Ding, Ziwen Zhang, Hongwei Wang, and Faquan Wang. Focus on details: Online multi-object tracking with diverse fine-grained representation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 11289-11298, 2023.
+Mattia Segu, Luigi Piccinelli, Siyuan Li, Luc Van Gool, Fisher Yu, and Bernt Schiele. Walker: Self-supervised multiple object tracking by walking on temporal appearance graphs. arXiv preprint arXiv:2409.17221, 2024.
+Jenny Seidenschwarz, Guillem Brasó, Victor Castro Serrano, Ismail Elezi, and Laura Leal-Taixe. Simple cues lead to a strong multi-object tracker. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 13813-13823, 2023.
+Peize Sun, Jinkun Cao, Yi Jiang, Rufeng Zhang, Enze Xie, Zehuan Yuan, Changhu Wang, and Ping Luo. Transtrack: Multiple object tracking with transformer. arXiv preprint arXiv:2012.15460, 2020.
+Peize Sun, Jinkun Cao, Yi Jiang, Zehuan Yuan, Song Bai, Kris Kitani, and Ping Luo. Dancetrack: Multi-object tracking in uniform appearance and diverse motion. In CVPR, pp. 20993-21002, 2022.
+Zhongdao Wang, Liang Zheng, Yixuan Liu, Yali Li, and Shengjin Wang. Towards real-time multi-object tracking. In ECCV, 2020.
+Greg Welch, Gary Bishop, et al. An introduction to the kalman filter. *Chapel Hill, NC, USA*, 1995.
+Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. In ICIP, 2017.
+Jialian Wu, Jiale Cao, Liangchen Song, Yu Wang, Ming Yang, and Junsong Yuan. Track to detect and segment: An online multi-object tracker. In CVPR, pp. 12352-12361, 2021.
+Changcheng Xiao, Qiong Cao, Zhigang Luo, and Long Lan. Mambatrack: a simple baseline for multiple object tracking with state space model. In Proceedings of the 32nd ACM International Conference on Multimedia, pp. 4082-4091, 2024a.
+Changcheng Xiao, Qiong Cao, Yujie Zhong, Long Lan, Xiang Zhang, Zhigang Luo, and Dacheng Tao. Motiontrack: Learning motion predictor for multiple object tracking, 2024b. URL https://arxiv.org/abs/2306.02585
+
+Feng Yan, Zhiheng Li, Weixin Luo, Fan Liang, Xiaolin Wei, and Lin Ma. Multiple object tracking challenge technical report for team mt_iot. arXiv preprint arXiv:2212.03586, 2022.
+Fan Yang, Shigeyuki Odashima, Shoichi Masui, and Shan Jiang. Hard to track objects with irregular motions and similar appearances? make it easier by buffering the matching space. In WACV, pp. 4799-4808, 2023.
+Mingzhan Yang, Guangxin Han, Bin Yan, Wenhua Zhang, Jinqing Qi, Huchuan Lu, and Dong Wang. Hybrid-sort: Weak cues matter for online multi-object tracking. In Proceedings of the AAAI Conference on Artificial Intelligence, 38(7), pp. 6504-6512, 2024.
+Mang Ye, Shuoyi Chen, Chenyue Li, Wei-Shi Zheng, David Crandall, and Bo Du. Transformer for object re-identification: A survey. arXiv preprint arXiv:2401.06960, 2024.
+Kefu Yi, Kai Luo, Xiaolei Luo, Jiangui Huang, Hao Wu, Rongdong Hu, and Wei Hao. Ucmctrack: Multi-object tracking with uniform camera motion compensation. In Proceedings of the AAAI Conference on Artificial Intelligence, 38(7), pp. 6702-6710, 2024.
+En Yu, Tiancai Wang, Zhuoling Li, Yuang Zhang, Xiangyu Zhang, and Wenbing Tao. Motrv3: Releasefetch supervision for end-to-end multi-object tracking. arXiv preprint arXiv:2305.14298, 2023.
+Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, et al. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, pp. 2636-2645, 2020.
+Fangao Zeng, Bin Dong, Yuang Zhang, Tiancai Wang, Xiangyu Zhang, and Yichen Wei. Motr: End-to-end multiple-object tracking with transformer. In ECCV, 2022.
+Hao Zhang, Feng Li, Shilong Liu, and Lei Zhang. Dino: Detr with improved denoising anchor boxes for end-to-end object detection. arXiv preprint arXiv:2203.03605, 2022a.
+Yifu Zhang, Chunyu Wang, Xinggang Wang, Wenjun Zeng, and Wenyu Liu. Fairmot: On the fairness of detection and re-identification in multiple object tracking. IJCV, 129(11):3069-3087, 2021. ISSN 1573-1405.
+Yifu Zhang, Peize Sun, Yi Jiang, Dongdong Yu, et al. Bytetrack: Multi-object tracking by associating every detection box. arXiv preprint arXiv:2110.06864, 2022b.
+Yuang Zhang, Tiancai Wang, and Xiangyu Zhang. Motrv2: Bootstrapping end-to-end multi-object tracking by pretrained object detectors. In CVPR, 2023.
+Yian Zhao, Wenyu Lv, Shangliang Xu, Jinman Wei, Guanzhong Wang, Qingqing Dang, Yi Liu, and Jie Chen. Detrs beat yolos on real-time object detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16965-16974, 2024.
+Liang Zheng, Yi Yang, and Alexander G Hauptmann. Person re-identification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016.
+Xingyi Zhou, Vladlen Koltun, and Philipp Krahenbuhl. Tracking objects as points. ECCV, 2020.
+Xingyi Zhou, Tianwei Yin, Vladlen Koltun, and Philipp Krahenbuhl. Global tracking transformers. In CVPR, pp. 8771-8780, 2022.
+Zhuofan Zong, Guanglu Song, and Yu Liu. Detrs with collaborative hybrid assignments training. arXiv preprint arXiv:2211.12860, 2023.
+Zhengxia Zou, Keyan Chen, Zhenwei Shi, Yuhong Guo, and Jieping Ye. Object detection in 20 years: A survey. Proc. IEEE, 2023.
\ No newline at end of file
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/images.zip b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..66bf2620260cc80d3e0800826526abfca78d8fe2
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d9f48252ca4f4c406706361486bc975db72d364ddd1ee3b2e9f3ab40a309f90
+size 772898
diff --git a/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/layout.json b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..5690d026142aa499a0ce466c11d72dacda754613
--- /dev/null
+++ b/ICLR/2025/CO-MOT_ Boosting End-to-end Transformer-based Multi-Object Tracking via Coopetition Label Assignment and Shadow Sets/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:489419b70ad646a3db70a30139a068e9e48b1f341354f46b07d80d6700aaf646
+size 411550
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_content_list.json b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0beb4b91b2c25cc25d4bb3a34496d14a1dbff94e
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fa359c5f2a6ac40e89a2f5ad73989599b3af4bb732aa11afff0ae5b403cdeb8a
+size 138394
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_model.json b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..b1e51040e55e51b7b35d53d3aeee6505637ea56d
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85beadf1d244ea36eb8c3ccbf99919fb4d308cba9be7a31e5717099d2d4889f1
+size 170061
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_origin.pdf b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..c8254e1cd4ff6b2230b49c393f4f5858a96c5402
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/61ca420d-52bb-4ee9-bebf-a65c6fddd38e_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6b6ceb8dc923981a567ded92c565e928c354b3f68b923ce04c1f4298c7def0ff
+size 6287412
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/full.md b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..c70c76022561b273c1ab4a3bf1f8a30904d139c2
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/full.md
@@ -0,0 +1,564 @@
+# COAT: COMPRESSING OPTIMIZER STATES AND ACTIVATION FOR MEMORY-EFFICIENT FP8 TRAINING
+
+Haocheng Xi $^{1*}$ , Han Cai $^{2}$ , Ligeng Zhu $^{2}$ , Yao Lu $^{2}$ , Kurt Keutzer $^{1}$ , Jianfei Chen $^{4}$ , Song Han $^{2,3\dagger}$
+
+1 University of California, Berkeley 2 NVIDIA 3 MIT 4 Tsinghua University https://github.com/NVlabs/COAT & https://nvlabs.github.io/COAT/
+
+# ABSTRACT
+
+FP8 training has emerged as a promising method for improving training efficiency. Existing frameworks accelerate training by applying FP8 computation to linear layers while leaving optimizer states and activations in higher precision, which fails to fully optimize memory usage. This paper introduces COAT (Compressing Optimizer States and Activations for FP8 Training), a novel FP8 training framework designed to significantly reduce memory footprint when training large models. COAT addresses current limitations through two key innovations: (1) Dynamic Range Expansion, which aligns optimizer state distributions more closely with the FP8 representation range, thereby reducing quantization error, and (2) Mixed-Granularity Activation Quantization, which optimizes activation memory using a combination of per-tensor and per-group quantization strategies. Experiments demonstrate that COAT effectively reduces end-to-end training memory footprint by $1.54 \times$ compared to BF16 while achieving nearly lossless performance across various tasks, such as Large Language Model pretraining and fine-tuning and Vision Language Model training. COAT also achieves a $1.43 \times$ end-to-end training speedup compared to BF16, performing on par with or surpassing TransformerEngine's speedup. COAT enables efficient full-parameter training of large models on fewer GPUs, and facilitates doubling the batch size in distributed training settings, providing a practical solution for scaling large-scale model training. The code is available at https://github.com/NVlabs/COAT.
+
+
+Figure 1: (a,b) Comparing the quantization flow of Transformer Engine and COAT. Both the optimizer states and activations are quantized to FP8 in COAT. (c) End-to-end per-GPU memory comparison when training Llama-2-13B on $8 \times 80\mathrm{G}$ H100 using FSDP.
+
+# 1 INTRODUCTION
+
+Foundation Models (FMs), such as Large Language Models (LLM) and Vision Language Models (VLM), have made significant breakthroughs in various tasks such as reasoning, understanding, and summarization (Dubey et al., 2024; Adler et al., 2024; Team et al., 2024; Lin et al., 2024). However, the training of such models, which often comprise billions of parameters, demands substantial computational resources and memory. This presents substantial challenges, making the training of these foundation models very challenging (Smith et al., 2022; Hoffmann et al., 2022).
+
+Low-precision training has emerged as a promising approach to make FMs training more efficient (Micikevicius et al., 2017; Wang et al., 2018; Zhu et al., 2020; Xi et al., 2023; Wortsman et al., 2023; Xi et al., 2024). By quantizing tensors used in deep neural networks into lower precision, low-precision training effectively speed up the training process and reduce the memory footprint. Currently, BF16 training (Kalamkar et al., 2019; Micikevicius et al., 2017) is the most prevalent low-precision method, and is widely adopted in large-scale training frameworks like DeepSpeed (Rasley et al., 2020) and Megatron-LM (Shoeybi et al., 2019).
+
+With the advent of Nvidia's H100 GPU (NVIDIA, 2024a), FP8 training Micikevicius et al. (2022) is emerging as the next-generation low-precision technique. Compared to BF16, FP8 training has the potential to (1) double the speed and (2) halve the memory footprint. To achieve practical speedup, Transformer Engine (NVIDIA, 2024b) performs matrix multiplications in FP8 precision, leading to faster training. Transformer Engine's memory footprint can be further improved by reducing optimizer states, gradients, weights, and activations to lower precision. As illustrated in Figure 1, FP8-LM (Peng et al., 2023) advances this by further quantizing the gradients, weight master copy, and first-order momentum into FP8. This reduces memory and communication overhead, partially improving memory efficiency. However, they do not tackle the memory consumption of activations and still leave the optimizer's second-order momentum in higher precision. The memory problem of activations becomes even more critical when optimizer, gradient, and weights are sharded across multiple GPUs using ZeRO or FSDP. Besides, second-order momentum is more sensitive to quantization than first-order momentum (Fishman et al., 2024), and activations' large spikes also make them hard to quantize to FP8 (Yang et al., 2024). This potential accuracy degradation makes them missing a crucial opportunity to optimize memory further.
+
+In this work, we propose COAT: Compressing Optimizer states and Activations for memory-efficient FP8 Training to address the aforementioned issue. COAT significantly reduces the overall memory footprint by quantizing optimizer states and activations into FP8. For optimizer states, we observe that FP8 format's representation range is under-utilized when quantizing them, as illustrated in Figure 2(a). To address this, we introduce a novel Dynamic Range Expansion method which adjusts the distribution of optimizer states to better fit within the FP8 range, thereby minimizing quantization error. For activations, we propose Mixed-Granularity Activation Quantization to achieve efficient and accurate quantization. We apply fine-grained quantization to non-linear layers and apply per-tensor quantization to linear layers. Per-tensor quantization for matrix multiplications is more efficient and better suited for TensorCores, while fine-grained quantization helps maintain accuracy. These two approaches tackle high memory consumption while ensuring minimal performance degradation. We provide an overview of COAT in Figure 1(b) for demonstration.
+
+We demonstrate the accurate performance of COAT on a wide range of tasks, including LLM pretraining, LLM fine-tuning, and VLM training. COAT achieves nearly lossless performance on all of these tasks. For efficiency results, COAT achieves $1.54 \times$ end-to-end memory reduction compared with BF16, and $1.43 \times$ end-to-end training speed up on Llama 7B, 13B, and 30B models compared to BF16. COAT also doubles the batch size in all realistic distributed training settings, which is crucial for higher speedup and support for longer context length, leading to a more efficient training process for large-scale models.
+
+# 2 RELATED WORK
+
+Low-precision Training Low precision training (Wang et al., 2018; Chen et al., 2020; Lin et al., 2022; Wortsman et al., 2023; Xi et al., 2024) has become a prominent technique in modern deep learning, offering reductions in both computational costs and memory requirements. FP16 (half-precision) training (Micikevicius et al., 2017) is the most prevalent low-precision method nowadays.
+
+It introduces loss scaling to address FP16's narrower representation range problem. BF16 training (Kalamkar et al., 2019) refines this approach, as BF16 has a larger representation range and is more stable for large-scale training. In these approaches, forward and backward passes are computed in FP16 or BF16 precision, while master weights, gradients, and optimizers are stored in FP32.
+
+FP8 training (Fishman et al., 2024; Micikevicius et al., 2022) aims to push these efficiency gains further. With the introduction of Nvidia's Hopper GPU architecture, FP8 is emerging as a practical datatype for next-generation low-precision training. Nvidia's Transformer Engine (TE) (NVIDIA, 2024b) is the first framework designed for FP8 mixed-precision training that employs FP8 Tensor-core for linear layer calculation. FP8-LM (Peng et al., 2023) extends FP8 quantization to gradients and optimizer states, further improving the training throughput. However, they fail to reduce the memory usage of activations stored for the backward pass using FP8, and leave second-order momentum in FP16, limiting the full potential of FP8's memory advantages.
+
+Memory Efficient Optimizers While 32-bit optimizer (Kingma, 2014; Loshchilov, 2017) states are widely adopted, several research efforts have been made to reduce the memory footprint of optimizer states through quantization. The 8-bit Adam (Dettmers et al., 2021) introduces a novel data format called dynamic exponent (DE) for quantization, but the adoption of this new data format limits its flexibility. 4-bit Optimizer (Li et al., 2024) further pushes the limit of optimizer quantization to 4-bit by addressing the zero-point problem, but is restricted to fine-tuning tasks. FP8-LM (Peng et al., 2023) quantizes the first-order momentum to FP8 while leaving second-order momentum in FP16, which limits the overall memory savings. (Fishman et al., 2024) finds that second-order momentum is more sensitive to quantization, and proposes to quantize it using E5M2 format.
+
+In addition to quantization, there are other approaches that aim to reduce the memory footprint of the optimizer states (Shazeer & Stern, 2018; Anil et al., 2019; Chen et al., 2024; Zhao et al., 2024), such as low-rank decomposition and optimizer simplification that only store the first-order momentum. These methods are orthogonal to our approach.
+
+# 3 PRELIMINARIES
+
+FP8 Quantization Quantization compresses a high-precision tensor to low-precision to achieve speedup and save memory footprint, at the cost of lower precision and lower representation range. FP8 format consists of two encodings - E4M3 and E5M2 (Open Compute Project, 2023). E4M3 has higher precision, while E5M2 has a larger representation range. We define E4M3's min and max values as $\Delta_{\mathrm{min}}^{\mathrm{E4M3}} = 2^{-9}$ and $\Delta_{\mathrm{max}}^{\mathrm{E4M3}} = 448$ , while E5M2's min and max values are $\Delta_{\mathrm{min}}^{\mathrm{E5M2}} = 2^{-16}$ and $\Delta_{\mathrm{min}}^{\mathrm{E5M2}} = 57344$ . To quantize an FP32 tensor $X$ into E4M3 precision, we use a quantizer $Q(\cdot)$ to map the tensor into FP8's representation range. This process can be formulated as
+
+$$
+X _ {\mathrm {F P 8}}, S _ {X} = Q \left(X _ {\mathrm {F P 3 2}}\right), \text {w h e r e} X _ {\mathrm {F P 8}} = \left\lceil \frac {X _ {\mathrm {F P 3 2}}}{S _ {X}} \left. \right\rfloor , S _ {X} = \frac {\operatorname* {m a x} \left(\left| X _ {\mathrm {F P 3 2}} \right|\right)}{\Delta_ {\max } ^ {\mathrm {E 4 M 3}}},
+$$
+
+where $S_{X}$ is the scaling factor, $\lceil \cdot \rceil$ refers to round-to-nearest. Quantize into E5M2 follows a similar procedure, where we only replace $\Delta_{\mathrm{max}}^{\mathrm{E4M3}}$ with $\Delta_{\mathrm{max}}^{\mathrm{E5M2}}$ . To map the quantized tensor back to FP32 precision, the dequantize operation $DQ(\cdot)$ can be formulated as $X_{\mathrm{FP32}} = DQ(X_{\mathrm{FP8}},S_X) = S_XX_{\mathrm{FP8}}$ .
+
+Optimizer Update Rule Optimizers are widely used in deep learning to update parameters. The most common gradient-based optimizer is Adam/AdamW (Kingma, 2014; Loshchilov, 2017), which uses first-order $m$ and second-order momentum $v$ to achieve better convergence. The update rule of AdamW at time step $t$ can be formulated as:
+
+$$
+m _ {t} = \beta_ {1} m _ {t - 1} + (1 - \beta_ {1}) g _ {t - 1} \quad v _ {t} = \beta_ {2} v _ {t - 1} + (1 - \beta_ {2}) g _ {t - 1} ^ {2}
+$$
+
+$$
+\hat {m} _ {t} = \frac {m _ {t}}{1 - \beta_ {1} ^ {t}} \qquad \qquad \hat {v} _ {t} = \frac {v _ {t}}{1 - \beta_ {2} ^ {t}}
+$$
+
+$$
+w _ {t + 1} = w _ {t} - \eta \left(\frac {\hat {m} _ {t}}{\sqrt {\hat {v} _ {t}} + \epsilon} + \lambda w _ {t}\right) \tag {1}
+$$
+
+where $m_{t}$ is the first-order momentum, $v_{t}$ is the second-order momentum, $g_{t}$ is the gradient, $\beta_{1}$ and $\beta_{2}$ are betas of AdamW, $\eta$ is learning rate, $\lambda$ is weight decay, and $\epsilon$ is used to prevent NaN or Inf.
+
+
+Figure 2: (a) Visualization of optimizer states' dynamic range under per-group quantization. FP8 E4M3's representation range is under-utilized in this case. (b) After dynamic range expansion, FP8's representation range is well utilized. (c) Distribution of $k$ for optimizer states. The second order's $k$ is larger than the first order's $k$ , since the second-order momentum's dynamic range is smaller.
+
+
+
+
+
+To perform optimizer state quantization, we adopt per-group quantization for both first-order and second-order momentum, following previous works (Dettmers et al., 2021; Li et al., 2024). Every consecutive $G$ element forms a group ( $G$ is defined as the group size), and each group is quantized independently with its own statistics. Optimizer states are stored in FP8 precision, while its scaling factor is stored in BF16. In FSDP or ZeRO-3, the statistics related to optimizer states (e.g. scaling factor) are not synchronized across GPUs, since each GPU maintains its own shard of optimizer states. More details can be found in Appendix A.
+
+# 4 DYNAMIC RANGE EXPANSION FOR ACCURATE OPTIMIZER QUANTIZATION
+
+In subsequent sections, we explain how COAT utilizes FP8 quantization to achieve memory-efficient FP8 training without compromising accuracy. Section 4 focuses on optimizer states quantization, while Section 5 discusses activation quantization.
+
+# 4.1 UNDERSTANDING THE ISSUE OF CURRENT OPTIMIZER STATES QUANTIZATION METHOD
+
+Under per-group quantization, we find that one significant drawback of current quantization methods is that, they can not fully utilize the representation range of FP8 and therefore lead to a large quantization error. Take the E4M3 data format as an example, the ratio between E4M3's maximum representable value and minimum representable value is $\Delta_{\mathrm{max}}^{\mathrm{E4M3}} / \Delta_{\mathrm{min}}^{\mathrm{E4M3}} = 448 \div \frac{1}{512} = 229376 \approx 2 \times 10^{5}$ . Therefore, for a quantization group $X$ , if we want to fully utilize the 256 representable value1 of FP8, we hope the dynamic range of the quantization group $X$ should cover the entire span between $\Delta_{\mathrm{min}}^{\mathrm{E4M3}}$ and $\Delta_{\mathrm{max}}^{\mathrm{E4M3}}$ .
+
+To make it more formally, we define dynamic range as the ratio between the maximum absolute value and the minimum absolute value within a quantization group $X$ :
+
+Definition 1 (dynamic range) Given a set that consists of $G$ real numbers $X = \{x_{1}, x_{2}, \ldots, x_{G}\}$ , the dynamic range $\mathcal{R}$ is defined as
+
+$$
+\mathcal {R} _ {X} = \frac {\operatorname* {m a x} (| x _ {1} | , | x _ {2} | , \ldots , | x _ {G} |)}{\operatorname* {m i n} (| x _ {1} | , | x _ {2} | , \ldots , | x _ {G} |)},
+$$
+
+where $|\cdot |$ denotes the absolute value.
+
+That is to say, E4M3's dynamic range is $\mathcal{R}_{\mathrm{E4M3}} = 448 \times 512 = 229376 \approx 2 \times 10^5$ . However, in practice, many quantization groups within the optimizer states fail to effectively map values across this wide range. We observe that optimizer states are highly sparse, with fewer than $1\%$ of values having large magnitudes, while the majority are relatively small and closely clustered. Most groups exhibit low dynamic ranges since large values are so few. As visualized in Figure 2(a), the dynamic range for first-order momentum is typically less than 1e4, and for second-order momentum, it is
+
+Table 1: Quantization error of $\frac{m}{\sqrt{v}}$ under different quantization settings. +Expand means applying our Dynamic Range Expansion method.
+
+
MSE of m/√v
Second Order
First Order
E4M3
E4M3+Expand
E5M2
E5M2+Expand
E4M3
20.10
18.08
25.65
18.16
E4M3+Expand
15.13
12.31
21.96
12.43
E5M2
37.02
35.96
40.30
36.00
E5M2+Expand
17.79
15.48
23.84
15.57
+
+
+Figure 3: Dynamic Range Expansion can better utilize E4M3 representation range.
+
+
+
+usually less than 1e1—both far below the available range of FP8. As a result, a substantial portion of FP8's representational capacity is wasted, leading to a large quantization error.
+
+# 4.2 DYNAMIC RANGE EXPANSION
+
+To address this problem, we introduce a expand function $f(\cdot)$ before quantization to expand the dynamic range of the quantization group and align it with E4M3, which can be formalized as $X_{\mathrm{FP8}}$ , $S_{X} = Q(f(X_{\mathrm{FP32}}))$ . The expand function we use is defined as
+
+$$
+f (x) = \operatorname {s i g n} (x) | x | ^ {k},
+$$
+
+where $k$ is used to control the strength of the expansion. In Appendix, F we prove that it is optimal.
+
+For a quantization group $X$ , after applying the expand function $f$ to $X$ , the dynamic range becomes
+
+$$
+\mathcal {R} _ {f (X)} = \frac {\max (| f (X) |)}{\min (| f (X) |)} = \frac {\max (| \operatorname {s i g n} (X) X ^ {k} |)}{\min (| \operatorname {s i g n} (X) X ^ {k} |)} = \left(\frac {\max (| X |)}{\min (| X |)}\right) ^ {k} = (\mathcal {R} _ {X}) ^ {k}.
+$$
+
+Therefore, when $k > 1$ , $\mathcal{R}_X$ will be enlarged and become closer to the ideal $\mathcal{R}_{\mathrm{E4M3}}$ . The optimal $k$ satisfy that $(\mathcal{R}_X)^k = \mathcal{R}_{\mathrm{E4M3}}$ , which means that $k = \log_{\mathcal{R}_X}(\mathcal{R}_{\mathrm{E4M3}})$ . With this optimal $k$ , $f(X)$ can fully utilize the representation range of E4M3, while the original $X$ can only utilize a small portion of it. As shown in Figure 2(c), the second-order momentum typically has a larger $k$ value $(5 \sim 15)$ compared to the first-order momentum's $k$ $(1 \sim 3)$ . This corresponds to our previous observation, that second-order momentum usually has a smaller dynamic range compared with first-order momentum, so it requires a larger $k$ to align well with E4M3's dynamic range.
+
+We calculate $k$ on-the-fly for every optimizer step and for every quantization group for accuracy consideration. When dequantize, we apply the inverse of expand function $f^{-1}(x) = x^{\frac{1}{k}}$ after de-quantization to recover its original value, which can be expressed as $X^{\mathrm{FP32}} = f^{-1}(DQ(X_{\mathrm{FP8}},S_X))$ .
+
+We apply regular quantizer and our dynamic range expansion method to both the first-order momentum $m$ and second-order momentum $v$ . As visualized in Figure 3(b), the distribution after expansion can fully utilize the FP8 (E4M3) representation range, which proves the effectiveness of our method. We further quantify the effectiveness of our method in Table 1. In AdamW optimizer step, as stated in Eq. 1, $\frac{m}{\sqrt{v} + \epsilon}$ is the actual effective term for weight update, so we report the MSE of $\frac{m}{\sqrt{v} + \epsilon}$ to quantify the performance of a quantization method. We find that E4M3 is more suitable for first-order momentum than E5M2. For second order momentum, although E4M3 better than E5M2, their quantization error is nearly the same after applying our expand function. Our Dynamic Range Expansion can effectively reduce the MSE by $1.63 \times$ . Appendix A provide more results.
+
+# 5 MIXED-GRANULARITY ACTIVATION QUANTIZATION
+
+# 5.1 DECOMPOSE THE ACTIVATION MEMORY FOOTPRINT
+
+In the forward pass of neural networks, activations must be preserved for the backward pass to calculate gradients. As illustrated in Table 2, non-linear layers such as LayerNorm/RMSNorm (Ba, 2016; Zhang & Sennrich, 2019) and Activation Functions (Hendrycks & Gimpel, 2016; Shazeer, 2020)
+
+Table 2: Activation memory footprint of different operators. U is a unit to measure memory usage, where $1\mathrm{U} =$ Batch Size $\times$ Sequence Length $\times$ Hidden Size $\times 2$ bytes (for BF16). For Llama-style model, Act Func refers to SiLU & Multiply, and Linear refers to the summation of QKV/Attn/Up/Gate/Down projection. RMSNorm is upcast to float32 in transformers implementation, so the memory usage of LayerNorm in BF16 is 4U. Our method reduces activation memory by quantizing them to FP8. More details about FlashAttention in Appendix D.
+
+
Non-Linear
Attention
Linear
Total
Reduction Ratio
RMSNorm
Act Func
RoPE
FlashAttn
Ideal
Achieved
Llama-style
BF16
4U
8U
2U
3U
5.66U
22.66U
1.00×
1.00×
TE
2U
8U
2U
3U
3.33U
18.33U
1.23×
1.20×
COAT
1U
4U
2U
3U
3.33U
13.33U
1.69×
1.65×
+
+typically account for approximately $50\%$ of the memory footprint in the Llama model series Touvron et al. (2023). In contrast, linear layers contribute less than $25\%$ . Therefore, it is essential to optimize both linear and non-linear layers to reduce activation memory footprint. $^{2}$
+
+One straightforward approach to achieve this is to quantize the activations to FP8 format prior to each non-linear and linear layer and only save the quantized tensors for backward. However, this introduces significant overhead due to the additional quantization step. Furthermore, non-linear layers can be sensitive to quantization. For example, GLU activation will amplify the spike in activations, resulting in significant quantization errors if not carefully handled (Yang et al., 2024; Fishman et al., 2024). This necessitates us to develop efficient and accurate quantization techniques.
+
+# 5.2 MIXED GRANULARITY FP8 PRECISION FLOW
+
+To address the inefficiency and inaccurate problem, we propose to use mixed granularity FP8 precision flow to improve the accuracy without introducing too much overhead. FP8 precision flow requires the input and output of all linear and non-linear layers in FP8. By directly saving the input tensor in FP8 format for the backward pass, we eliminate the need for an extra quantization operation, which reduces the associated overhead. However, this method still suffers from accuracy degradation and necessitates further refinement.
+
+We propose to vary the quantization granularity across different layers to balance precision and efficiency in a mixed-granularity manner. For non-linear layers, VS-Quant (Dai et al., 2021) or PerBlock Quant (Xi et al., 2024) methods are well-suited due to their fine-grained and precise nature. For linear layers, we apply per-tensor quantization to maximize the performance of Tensor Cores. $^3$
+
+We observe that quantizing the input of layernorm across multiple token axes is detrimental to accuracy. As illustrated in Figure 4(a), when the number of elements that share a scaling factor is fixed, the quantization error increases significantly when quantization is performed across the token axis. Therefore instead of using per-block quantization with block size $B \times B$ as proposed in (Xi et al., 2024), we propose to use per-group quantization with group size $1 \times G$ , where $G = B^2$ to keep the granularity the same. This approach enhances the accuracy of non-linear layers while maintaining efficiency. Our precise FP8 precision flow is visualized in Figure 1(a), where we display the full precision flow for a Llama-style decoder layer, both forward and backward pass.
+
+We also propose Group Scaling, an efficient per-tensor scaling method that balances the performance and precision. To perform per-tensor quantization, the maximum absolute value of the tensor needs to be calculated through max reduction, adding a lot of overhead.
+
+In our Group Scaling, we address these problems by splitting the max reduction into two stages: (1) performing max reduction on each $1 \times G$ element and storing the results as intermediate values; (2) applying max reduction on the intermediate tensor to obtain the per-tensor max value. The first stage can be seamlessly fused with the previous operation, adding minimal overhead, while the second stage is more efficient than doing max reduction on the entire tensor, as the intermediate result is $G \times$ smaller than the original tensor. As illustrated in Figure 4(b), Group Scaling successfully reduces the max reduction overhead compared with just-in-time scaling.
+
+
+(a) $4 \times 4$ quantization of LayerNorm's input leads to large quantization error. The error becomes larger in deeper layers.
+(b) Time usage to calculate per-tensor max value. Our Group Scaling greatly reduce the reduction overhead, while it doesn't suffer from Delayed Scaling's instability issue.
+Figure 4: (a) Quantization Error in forward pass. (b) Time comparison of various scaling methods.
+
+
Tensor Size
Just-in-Time Scaling
Group Scaling (Ours)
11008×16384
1.37 ms
14×
0.10 ms
11008×8192
0.89 ms
11×
0.08 ms
4096×16384
0.55 ms
8×
0.07 ms
4096×8192
0.32 ms
5×
0.06 ms
+
+In comparison, TransformerEngine proposes delayed scaling to avoid the on-the-fly max reduction required for per-tensor quantization, and can also fuse the division process into the previous operator to optimize memory accesses. However, we find that using the current tensor's statistics to compute the scaling factor is no worse, and could be even better in precision, than using the delayed scaling heuristic. Therefore, we advocate for Group Scaling as a simpler and more flexible alternative that can potentially offer improved numerical stability and precision while not being significantly slower than Delayed Scaling.
+
+# 6 EXPERIMENTS
+
+# 6.1 ACCURACY EXPERIMENTS
+
+**Setup** We compare COAT with BF16 training and TransformerEngine (NVIDIA, 2024b) baselines. For all experiments, we adopt the default hyperparameters in the official training recipe. We validate the effectiveness of our method on multiple tasks, including Large Language Model (LLM) pretraining and fine-tuning, and Vision Language model (VLM) training. For LLM pertaining, we report the perplexity on Wikitext 103 (Merit et al., 2016), C4 (Raffel et al., 2020), and Pile (Gao et al., 2020), and the accuracy on COPA (Gordon et al., 2012), ARC (Clark et al., 2018), SciQ (Welbl et al., 2017), and HellaSwag (Zellers et al., 2019). For LLM fine-tuning, we conduct experiments in math corpus, and evaluate on Mathematicas (Davies et al., 2021), SVAMP (Patel et al., 2021), NumGLUE (Mishra et al., 2022), and GSM8K (Cobbe et al., 2021). For VLM training, we report the score on VideoMME (Fu et al., 2024), POPE (Li et al., 2023b), VizWiz (Gurari et al., 2018), GQA (Hudson & Manning, 2019), VQAv2 (Goyal et al., 2017), TextVQA (Singh et al., 2019), SEED (Li et al., 2023a), and MMMU Validation Set (Yue et al., 2024). We use $1 \times 128$ per-group quantization for optimizer states and $1 \times 16$ per-group quantization for non-linear layer activations.
+
+# 6.1.1 LLM PRETRAINING
+
+To evaluate our method when pretraining LLMs, We train OLMo-1B (Groeneveld et al., 2024) and OLMo-7B on Dolma (Soldaini et al., 2024). Following the official report, we use a global batch size of 4M tokens (2048 macro batch size, with a sequence length of 2048 tokens). We use PyTorch FSDP in our experiments.
+
+For OLMo-1B, we conduct pretraining for 300B tokens, which corresponds to 75k training steps. We report the training curve in Figure 5, and report the perplexity and accuracy result in Table 3. The training curve and downstream task performance were consistent with BF16 training baseline, validating the effectiveness of COAT. For OLMo-7B experiment, we pretrain for 250B tokens, which corresponds to 40k training steps. we report the training curve in Figure 6 and downstream task performance in Table 4, where COAT also aligns well with the baseline and is nearly lossless.
+
+# 6.1.2 LLM FINE-TUNING
+
+We further evaluate our method on LLM fine-tuning task. We focus on math corpus and fine-tune a Llama-2-7B model on the MAmmoTH (Yue et al., 2023) dataset. We train for 3 epochs, and report the downstream tasks performance in 5. After fine-tuning, COAT still performs consistently with the baselines on the downstream task performance, proving the accurateness of our method.
+
+Table 3: OLMo-1B pretraining performance on downstream tasks. We report the performance after training for 300B tokens.
+
+
Train Loss
WikiText
C4
Pile
Avg ppl
BF16
2.551
15.234
15.538
10.563
10.083
COAT
2.568
15.384
15.695
10.672
10.176
COPA
ARC(Easy)
SciQ
HellaSwag
Avg Acc
BF16
77.0 %
57.3 %
84.0 %
54.5 %
68.2 %
COAT
75.0 %
58.1 %
83.9 %
54.3 %
67.8 %
+
+Table 4: OLMo-7B pretraining performance on downstream tasks. We report the performance after training for 250B tokens.
+
+
Train Loss
WikiText
C4
Pile
Avg ppl
BF16
2.366
12.053
12.874
8.596
11.174
COAT
2.379
12.166
12.988
8.684
11.279
COPA
ARC(Easy)
SciQ
HellaSwag
Avg Acc
BF16
83.0%
65.7%
87.5%
56.9%
73.2 %
COAT
81.0%
61.9%
87.2%
60.6%
72.7 %
+
+
+Figure 5: OLMo-1B training loss curve.
+
+
+Figure 6: OLMo-7B training loss curve.
+
+# 6.1.3 VLM TRAINING
+
+We also evaluate COAT on vision language models. We conduct experiments on VILA (Lin et al., 2024) and perform stage-3 SFT of VILA1.5-7B using the same SFT data mixture employed by VILA's original paper (Chen et al., 2023; Xu et al., 2024) and set the global batch size to 1024. We pad the sequence length to a multiple of 4 for efficiency consideration. The training loss curve is visualized in Figure 7. We report the downstream task performance and their average in Table 6. We find that COAT performs on par with BF16 training and is better than the TransformerEngine baseline, which demonstrates the accurateness of our method. We further visualize the VLM captioning experiment in Appendix B to prove the effectiveness of COAT on generation tasks.
+
+# 6.2 MEMORY SAVING AND SPEEDUP
+
+We test the memory saving and speedup result of COAT in two settings: The results on a single transformer layer help to accurately analyze the capabilities for memory saving and speedup, while the end-to-end results reflect the practical benefits of our method in real-world applications.
+
+# 6.2.1 MEMORY SAVING AND SPEEDDUP FOR A SINGLE TRANSFORMER LAYER
+
+Table 7 highlights the speedup and memory reduction achieved for a single transformer layer. We conducted experiments with a batch size of 4, varying the hidden sizes between 2048 and 4096, and sequence lengths of 2048 and 4096.
+
+COAT demonstrates better speedup compared with TE, and significantly better memory reduction ability compared with BF16 and TE. Our approach achieves up to $1.57 \times$ speedup over BF16 and achieves a consistent $1.65 \times$ memory reduction compared to BF16, which is very close to the theoretically $1.69 \times$ reported in Table 2. The speedup ratio becomes larger with larger hidden sizes and longer sequence lengths.
+
+# 6.2.2 SPEEDUP AND MEMORY SAVING FOR END-TO-END TRAINING
+
+Table 8 presents a detailed comparison of end-to-end memory reduction and speedup results across different configurations for transformer models, specifically Llama-2-7B, Llama-2-13B, and Llama-30B, with variations in the number of GPUs used (1, 2, 4, and 8). It highlights COAT's effectiveness
+
+Table 5: Evaluation result of fine-tuning Llama-2-7B on math corpus. Llama-2-7B refers to the evaluation metric before fine-tuning. TE refers to TransformerEngine.
+
+
Mathematicas
SVAMP
NumGLUE
GSM8k
Avg
Llama-2-7B
6.0
14.6
34.5
29.9
21.3
BF16
46.3
64.2
54.8
57.7
55.7
TE
45.3
66.1
53.5
57.7
55.6
COAT
47.8
64.4
53.3
56.6
55.5
+
+Table 6: VILA1.5-7B Stage-3 SFT performance on downstream tasks. * means it has seen the training data.
+
+
Stage 3
VideoMME
POPE
VizWiz
GQA*
VQAv2*
BF16
42.96
86.90
61.42
64.55
81.47
TE
43.19
87.64
57.61
64.53
81.34
COAT
44.56
87.43
61.36
64.44
81.20
SEED
Stage 3
TextVQA
Image
Video
MMMU Val
Average
BF16
65.60
73.40
45.65
38.56
62.80
TE
64.70
73.51
43.12
35.89
61.88
COAT
64.65
73.36
43.76
37.22
62.51
+
+
+Figure 7: VILA1.5-7B Stage-3 SFT loss curve.
+
+Table 7: Memory Saving and Speedup for a single Transformer Layer. Memory refers to Activation Memory. Our method achieves better speedup than TransformerEngine and significantly reduces the activation memory footprint by $1.65 \times$ .
+
+
Hidden Size = 2048, Batch Size = 4
Sequence Length = 2048
Sequence Length = 4096
Forward
Backward
Total
Ratio
Memory
Ratio
Forward
Backward
Total
Ratio
Memory
BF16
3.36
8.47
11.83
1.00×
1457 MB
1.00×
6.88
17.24
24.12
1.00×
2914 MB
TE
2.96
5.32
8.28
1.42×
1210 MB
1.20×
5.94
11.29
17.23
1.39×
2420 MB
COAT
2.88
5.16
8.04
1.47×
883 MB
1.65×
5.89
10.82
16.71
1.44×
1766 MB
Hidden Size = 4096, Batch Size = 4
Sequence Length = 2048
Sequence Length = 4096
Forward
Backward
Total
Ratio
Memory
Ratio
Forward
Backward
Total
Ratio
Memory
BF16
7.77
18.78
26.55
1.00×
2914 MB
1.00×
16.37
38.43
54.80
1.00×
5828 MB
TE
6.19
11.79
17.98
1.47×
2420 MB
1.20×
12.66
24.58
37.24
1.47×
4840 MB
COAT
5.89
10.96
16.85
1.57×
1766 MB
1.65×
12.16
23.44
35.6
1.53×
3533 MB
+
+in reducing end-to-end memory footprint and the speedup compared to standard BF16 and TransformerEngine (TE) setups under varying conditions of batch size and context length.
+
+COAT allows full-parameter training of Llama-2-7B on a single GPU, where BF16 and TE both out of memory (OOM). Similarly, for the Llama-2-13B and Llama-30B models, our method enables 2-GPU training for Llama-2-13B and 8-GPU training for Llama-30B when Batch Size = 1.
+
+In all multi-GPU training setting, COAT can double the micro-batch size and therefore lead to even higher speedup. For example, our method can achieve $2.25 \times$ speedup when training Llama-2-13B on 4-GPUs since we can effectively increase the batch size to 2.
+
+Overall, COAT significantly reduces end-to-end memory usage by up to $1.55 \times$ and speeds up the end-to-end training by nearly $1.44 \times$ . This facilitates full-parameter training on fewer GPUs, which is particularly beneficial for larger language models.
+
+Table 8: End-to-end memory reduction and speedup results. BS refers to batch size. CL refers to context length. We report token/s per GPU for speed results. $\ddagger$ means $\mathrm{CL} = 1024$ .
+
+
Llama-2-7B
Context Length = 2048
Maximum Batch Size, Context Length = 2048
Optimizer
Activations
Peak
Ratio
Max BS
Speed
Ratio
1 GPUBS=1
BF16
-
-
OOM
-
-
OOM
-
TE
-
-
OOM
-
-
OOM
-
COAT
13.1 GB
8.1 GB
79.3 GB
✓
1
5906 token/s
✓
2 GPUBS=2
BF16
-
-
OOM
-
1
6130 token/s
1.00×
TE
-
-
OOM
-
1
6842 token/s
1.11×
COAT
6.5GB
16.9 GB
52.8 GB
✓
4
11351 token/s
1.85×
4 GPUBS=2
BF16
13.1 GB
25.8 GB
55.1 GB
1.00×
2
7730 token/s
1.00×
TE
13.1 GB
21.9 GB
51.1 GB
1.08×
2
9577 token/s
1.24×
COAT
3.2 GB
16.9 GB
35.6 GB
1.54×
4
11257 token/s
1.45×
8 GPUBS=2
BF16
6.5 GB
25.8 GB
41.2 GB
1.00×
4
8238 token/s
1.00×
TE
6.5 GB
21.9 GB
37.2 GB
1.11×
4
11704 token/s
1.42×
COAT
1.6 GB
16.9 GB
27.0 GB
1.52×
8
11241 token/s
1.36×
Llama-2-13B
Context Length = 2048
Maximum Batch Size, Context Length = 2048
Optimizer
Activations
Peak
Ratio
Max BS
Speed
Ratio
2 GPUBS=1
BF16
-
-
OOM
-
-
OOM
-
TE
-
-
OOM
-
-
OOM
-
COAT
12.6 GB
10.1 GB
73.2 GB
✓
1
2137 token/s
✓
4 GPUBS=1
BF16
25.1 GB
20.1 GB
76.1 GB
1.00×
1
2345 token/s
1.00×
TE
25.1 GB
17.2 GB
73.0 GB
1.04×
1
2851 token/s
1.21×
COAT
6.3 GB
13.2 GB
49.1 GB
1.55×
2
5295 token/s
2.25×
8 GPUBS=1
BF16
12.6 GB
20.1 GB
49.4 GB
1.00×
2
3907 token/s
1.00×
TE
12.6 GB
17.2 GB
46.5 GB
1.06×
2
5604 token/s
1.43×
COAT
3.1 GB
13.2 GB
32.5 GB
1.52×
4
5650 token/s
1.44×
Llama-30B
Context Length = 2048
Maximum Batch Size, Context Length = 2048
Optimizer
Activations
Peak
Ratio
Max BS
Speed
Ratio
8 GPUBS=1
BF16
-
-
OOM
-
-
OOM
-
TE
-
-
OOM
-
-
OOM
-
COAT
7.8 GB
24.2 GB
70.5 GB
✓
1
1363 token/s
✓
+
+Table 9: Dynamic Range Expansion is compatible with DE8 (8-bit dynamic quantization).
+
+
First Order
Second Order
E4M3
E4M3 + Expand
E5M2
E5M2 + Expand
DE8
DE8 + Expand
E4M3 + Expand
15.13
12.31
21.96
12.43
14.01
18.84
DE8
12.11
8.27
20.02
8.43
10.54
16.25
DE8 + Expand
11.57
7.47
19.69
7.65
9.91
15.81
+
+# 6.3 ABLATION STUDIES
+
+# 6.3.1 DYNAMIC RANGE EXPANSION'S COMPATIBILITY WITH OTHER DATA FORMATS
+
+Dynamic Exponent Quantization (DE) was proposed in (Dettmers et al., 2021) to quantize the optimizer states since its representation range has a range of 7 orders of magnitude and is very suitable for optimizer states quantization. Therefore, they proposed to quantize both first-order and second-order momentum with 8-bit DE.
+
+We report the quantization error of $\frac{m}{\sqrt{v}}$ in Table 9, and find that applying our dynamic range expansion method to 8-bit DE can further reduce the quantization error by $1.41 \times$ . Specifically, the lowest quantization error is achieved when first-order momentum $m$ is quantized with 8-bit DE + Dynamic Range Expansion, and second-order momentum $v$ is quantized with E4M3/E5M2 + Dynamic Range Expansion. This proves the effectiveness of our method.
+
+# 7 CONCLUSION
+
+In this work, we present COAT, a memory-efficient FP8 training framework for foundation models by quantizing both optimizer states and activations into FP8 format. We observe that the FP8 for-
+
+mat's representation range is not fully utilized when quantizing optimizer states, prompting us to propose Dynamic Range Expansion to align their dynamic range. We then identify the importance of quantizing non-linear layers, and propose mixed-granularity FP8 precision flow to quantize the activations accurately without introducing too much overhead.
+
+Extensive experiments on LLM and VLM training and fine-tuning demonstrate that COAT can achieve nearly lossless performance. In end-to-end training, COAT achieves a 1.54 memory reduction and 1.43 speedup compared to BF16, and is comparable or even faster to TransformerEngine's training speed. Our method also enables full-parameter training of billion-scale models on fewer GPUs and is able to double the batch size in realistic settings. These results highlight COAT's capability to enable memory-efficient, large-scale model training without sacrificing accuracy, providing a highly effective solution for memory-constrained environments. Future work could further explore combining our proposed approach with other low-precision gradient compression methods to reduce communication overhead.
+
+# REFERENCES
+
+Bo Adler, Niket Agarwal, Ashwath Aithal, Dong H Anh, Pallab Bhattacharya, Annika Brundyn, Jared Casper, Bryan Catanzaro, Sharon Clay, Jonathan Cohen, et al. Nemotron-4 340b technical report. arXiv preprint arXiv:2406.11704, 2024.
+Rohan Anil, Vineet Gupta, Tomer Koren, and Yoram Singer. Memory efficient adaptive optimization. Advances in Neural Information Processing Systems, 32, 2019.
+Jimmy Lei Ba. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
+Han Cai, Chuang Gan, Ligeng Zhu, and Song Han. Tinytl: Reduce activations, not trainable parameters for efficient on-device learning. arXiv preprint arXiv:2007.11622, 2020.
+Jianfei Chen, Yu Gai, Zhewei Yao, Michael W Mahoney, and Joseph E Gonzalez. A statistical framework for low-bitwidth training of deep neural networks. Advances in neural information processing systems, 33:883-894, 2020.
+Jianfei Chen, Lianmin Zheng, Zhewei Yao, Dequan Wang, Ion Stoica, Michael Mahoney, and Joseph Gonzalez. Actnn: Reducing training memory footprint via 2-bit activation compressed training. In International Conference on Machine Learning, pp. 1803-1813. PMLR, 2021.
+Lin Chen, Jisong Li, Xiaoyi Dong, Pan Zhang, Conghui He, Jiaqi Wang, Feng Zhao, and Dahua Lin. Sharegpt4v: Improving large multi-modal models with better captions. arXiv preprint arXiv:2311.12793, 2023.
+Xiangning Chen, Chen Liang, Da Huang, Esteban Real, Kaiyuan Wang, Hieu Pham, Xuanyi Dong, Thang Luong, Cho-Jui Hsieh, Yifeng Lu, et al. Symbolic discovery of optimization algorithms. Advances in neural information processing systems, 36, 2024.
+Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. arXiv preprint arXiv:1803.05457, 2018.
+Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.
+Steve Dai, Rangha Venkatesan, Mark Ren, Brian Zimmer, William Dally, and Brucek Khailany. Vs-quant: Per-vector scaled quantization for accurate low-precision neural network inference. Proceedings of Machine Learning and Systems, 3:873-884, 2021.
+Alex Davies, Petar Velicković, Lars Buesing, Sam Blackwell, Daniel Zheng, Nenad Tomasev, Richard Tanburn, Peter Battaglia, Charles Blundell, András Juhász, et al. Advancing mathematics by guiding human intuition with ai. Nature, 600(7887):70-74, 2021.
+Tim Dettmers, Mike Lewis, Sam Shleifer, and Luke Zettlemoyer. 8-bit optimizers via block-wise quantization. arXiv preprint arXiv:2110.02861, 2021.
+Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
+Maxim Fishman, Brian Chmiel, Ron Banner, and Daniel Soudry. Scaling fp8 training to trillion-token llms. arXiv preprint arXiv:2409.12517, 2024.
+Chaoyou Fu, Yuhan Dai, Yondong Luo, Lei Li, Shuhuai Ren, Renrui Zhang, Zihan Wang, Chenyu Zhou, Yunhang Shen, Mengdan Zhang, et al. Video-mme: The first-ever comprehensive evaluation benchmark of multi-modal llms in video analysis. arXiv preprint arXiv:2405.21075, 2024.
+Leo Gao, Stella Biderman, Sid Black, Laurence Golding, Travis Hoppe, Charles Foster, Jason Phang, Horace He, Anish Thite, Noa Nabeshima, et al. The pile: An 800gb dataset of diverse text for language modeling. arXiv preprint arXiv:2101.00027, 2020.
+
+Andrew Gordon, Zornitsa Kozareva, and Melissa Roemmele. SemEval-2012 task 7: Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In Eneko Agirre, Johan Bos, Mona Diab, Suresh Manandhar, Yuval Marton, and Deniz Yuret (eds.), *SEM 2012: The First Joint Conference on Lexical and Computational Semantics – Volume 1: Proceedings of the main conference and the shared task, and Volume 2: Proceedings of the Sixth International Workshop on Semantic Evaluation (SemEval 2012), pp. 394–398, Montréal, Canada, 7-8 June 2012. Association for Computational Linguistics. URL https://aclanthology.org/S12-1052.
+Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6904-6913, 2017.
+Dirk Groeneveld, Iz Beltagy, Pete Walsh, Akshitabhagia, Rodney Kinney, Oyvind Tafjord, Ananya Harsh Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, et al. Olmo: Accelerating the science of language models. arXiv preprint arXiv:2402.00838, 2024.
+Danna Gurari, Qing Li, Abigale J Stangl, Anhong Guo, Chi Lin, Kristen Grauman, Jiebo Luo, and Jeffrey P Bigham. Vizwiz grand challenge: Answering visual questions from blind people. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3608-3617, 2018.
+Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (gelus). arXiv preprint arXiv:1606.08415, 2016.
+Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556, 2022.
+Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6700-6709, 2019.
+Dhiraj Kalamkar, Dheevatsa Mudigere, Naveen Mellempudi, Dipankar Das, Kunal Banerjee, Sasikanth Avancha, Dharma Teja Vooturi, Nataraj Jammalamadaka, Jianyu Huang, Hector Yuen, et al. A study of bfloat16 for deep learning training. arXiv preprint arXiv:1905.12322, 2019.
+Diederik P Kingma. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
+Bingrui Li, Jianfei Chen, and Jun Zhu. Memory efficient optimizers with 4-bit states. Advances in Neural Information Processing Systems, 36, 2024.
+Bohao Li, Rui Wang, Guangzhi Wang, Yuying Ge, Yixiao Ge, and Ying Shan. Seed-bench: Benchmarking multimodal llms with generative comprehension. arXiv preprint arXiv:2307.16125, 2023a.
+Yifan Li, Yifan Du, Kun Zhou, Jinpeng Wang, Wayne Xin Zhao, and Ji-Rong Wen. Evaluating object hallucination in large vision-language models. arXiv preprint arXiv:2305.10355, 2023b.
+Ji Lin, Ligeng Zhu, Wei-Ming Chen, Wei-Chen Wang, Chuang Gan, and Song Han. On-device training under 256kb memory. Advances in Neural Information Processing Systems, 35:22941-22954, 2022.
+Ji Lin, Hongxu Yin, Wei Ping, Pavlo Molchanov, Mohammad Shoeybi, and Song Han. Vila: On pretraining for visual language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 26689-26699, 2024.
+Xiaoxuan Liu, Lianmin Zheng, Dequan Wang, Yukuo Cen, Weize Chen, Xu Han, Jianfei Chen, Zhiyuan Liu, Jie Tang, Joey Gonzalez, et al. Gact: Activation compressed training for generic network architectures. In International Conference on Machine Learning, pp. 14139-14152. PMLR, 2022a.
+
+Zechun Liu, Kwang-Ting Cheng, Dong Huang, Eric P Xing, and Zhiqiang Shen. Nonuniform-to-uniform quantization: Towards accurate quantization via generalized straight-through estimation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4942-4952, 2022b.
+I Loshchilov. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
+Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017.
+Paulius Micikevicius, Dusan Stosic, Neil Burgess, Marius Cornea, Pradeep Dubey, Richard Grisenthwaite, Sangwon Ha, Alexander Heinecke, Patrick Judd, John Kamalu, et al. Fp8 formats for deep learning. arXiv preprint arXiv:2209.05433, 2022.
+Swaroop Mishra, Arindam Mitra, Neeraj Varshney, Bhavdeep Sachdeva, Peter Clark, Chitta Baral, and Ashwin Kalyan. Numglue: A suite of fundamental yet challenging mathematical reasoning tasks. arXiv preprint arXiv:2204.05660, 2022.
+Georgii Sergeevich Novikov, Daniel Bershatsky, Julia Gusak, Alex Shonenkov, Denis Valerievich Dimitrov, and Ivan Oseledets. Few-bit backward: Quantized gradients of activation functions for memory footprint reduction. In International Conference on Machine Learning, pp. 26363-26381. PMLR, 2023.
+NVIDIA. Nvidia h100 tensor core gpu, 2024a. URL https://www.nvidia.com/en-us/data-center/h100/. Accessed: 2024-09-19.
+NVIDIA. Transformerengine: An efficient library for training transformer models, 2024b. URL https://github.com/NVIDIA/TransformerEngine. Accessed: 2024-09-19.
+Open Compute Project. Ocp 8-bit floating point specification (ofp8), revision 1.0, December 2023. URL https://www.opencompute.org/documents/ ocp-8-bit-floating-point-specification-ofp8-revision-1-0-2023-12-01-pdf-1. Accessed: 2024-10-09.
+Arkil Patel, Satwik Bhattachamishra, and Navin Goyal. Are nlp models really able to solve simple math word problems? arXiv preprint arXiv:2103.07191, 2021.
+Houwen Peng, Kan Wu, Yixuan Wei, Guoshuai Zhao, Yuxiang Yang, Ze Liu, Yifan Xiong, Ziyue Yang, Bolin Ni, Jingcheng Hu, et al. Fp8-lm: Training fp8 large language models. arXiv preprint arXiv:2310.18313, 2023.
+Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of machine learning research, 21(140):1-67, 2020.
+Jeff Rasley, Samyam Rajbhandari, Olatunji Ruwase, and Yuxiong He. Deepspeed: System optimizations enable training deep learning models with over 100 billion parameters. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 3505-3506, 2020.
+Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. Flashattention-3: Fast and accurate attention with asynchrony and low-precision. arXiv preprint arXiv:2407.08608, 2024.
+Noam Shazeer. Glu variants improve transformer. arXiv preprint arXiv:2002.05202, 2020.
+Noam Shazeer and Mitchell Stern. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pp. 4596-4604. PMLR, 2018.
+
+Mohammad Shoeybi, Mostofa Patwary, Raul Puri, Patrick LeGresley, Jared Casper, and Bryan Catanzaro. Megatron-lm: Training multi-billion parameter language models using model parallelism. arXiv preprint arXiv:1909.08053, 2019.
+Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. Towards vqa models that can read. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 8317-8326, 2019.
+Shaden Smith, Mostofa Patwary, Brandon Norick, Patrick LeGresley, Samyam Rajbhandari, Jared Casper, Zhun Liu, Shrimai Prabhumoye, George Zerveas, Vijay Korthikanti, et al. Using deep-speed and megatron to train megatron-turing nlg 530b, a large-scale generative language model. arXiv preprint arXiv:2201.11990, 2022.
+Luca Soldaini, Rodney Kinney, Akshita Bhagia, Dustin Schwenk, David Atkinson, Russell Authur, Ben Bogin, Khyathi Chandu, Jennifer Dumas, Yanai Elazar, et al. Dolma: An open corpus of three trillion tokens for language model pretraining research. arXiv preprint arXiv:2402.00159, 2024.
+Gemma Team, Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, et al. Gemma: Open models based on gemini research and technology. arXiv preprint arXiv:2403.08295, 2024.
+Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
+Jue Wang, Binhang Yuan, Luka Rimanic, Yongjun He, Tri Dao, Beidi Chen, Christopher Re, and Ce Zhang. Fine-tuning language models over slow networks using activation compression with guarantees. arXiv preprint arXiv:2206.01299, 2022.
+Naigang Wang, Jungwook Choi, Daniel Brand, Chia-Yu Chen, and Kailash Gopalakrishnan. Training deep neural networks with 8-bit floating point numbers. Advances in neural information processing systems, 31, 2018.
+Shuai Wang and Yi Kang. Gradient distribution-aware int8 training for neural networks. Neurocomputing, 541:126269, 2023.
+Johannes Welbl, Nelson F Liu, and Matt Gardner. Crowdsourcing multiple choice science questions. arXiv preprint arXiv:1707.06209, 2017.
+Mitchell Wortsman, Tim Dettmers, Luke Zettlemoyer, Ari Morcos, Ali Farhadi, and Ludwig Schmidt. Stable and low-precision training for large-scale vision-language models. Advances in Neural Information Processing Systems, 36:10271-10298, 2023.
+Haocheng Xi, Changhao Li, Jianfei Chen, and Jun Zhu. Training transformers with 4-bit integers. Advances in Neural Information Processing Systems, 36:49146-49168, 2023.
+Haocheng Xi, Yuxiang Chen, Kang Zhao, Kaijun Zheng, Jianfei Chen, and Jun Zhu. Jetfire: Efficient and accurate transformer pretraining with int8 data flow and per-block quantization. arXiv preprint arXiv:2403.12422, 2024.
+Haocheng Xi, Shuo Yang, Yilong Zhao, Chenfeng Xu, Muyang Li, Xiuyu Li, Yujun Lin, Han Cai, Jintao Zhang, Dacheng Li, et al. Sparse videogen: Accelerating video diffusion transformers with spatial-temporal sparsity. arXiv preprint arXiv:2502.01776, 2025.
+Zhiyang Xu, Chao Feng, Rulin Shao, Trevor Ashby, Ying Shen, Di Jin, Yu Cheng, Qifan Wang, and Lifu Huang. Vision-flan: Scaling human-labeled tasks in visual instruction tuning. arXiv preprint arXiv:2402.11690, 2024.
+Jaewoo Yang, Hayun Kim, and Younghoon Kim. Mitigating quantization errors due to activation spikes in glu-based llms. arXiv preprint arXiv:2405.14428, 2024.
+
+Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. Mammoth: Building math generalist models through hybrid instruction tuning. arXiv preprint arXiv:2309.05653, 2023.
+Xiang Yue, Yuansheng Ni, Kai Zhang, Tianyu Zheng, Ruoqi Liu, Ge Zhang, Samuel Stevens, Dongfu Jiang, Weiming Ren, Yuxuan Sun, et al. Mmmu: A massive multi-discipline multimodal understanding and reasoning benchmark for expert agi. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9556-9567, 2024.
+Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830, 2019.
+Biao Zhang and Rico Senrrich. Root mean square layer normalization. Advances in Neural Information Processing Systems, 32, 2019.
+Jintao Zhang, Haofeng Huang, Pangle Zhang, Jia Wei, Jun Zhu, and Jianfei Chen. Sageattention2: Efficient attention with thorough outlier smoothing and per-thread int4 quantization, 2024. URL https://arxiv.org/abs/2411.10958.
+Jintao Zhang, Jia Wei, Pangle Zhang, Jun Zhu, and Jianfei Chen. Sageattention: Accurate 8-bit attention for plug-and-play inference acceleration. In International Conference on Learning Representations (ICLR), 2025a.
+Jintao Zhang, Chengdong Xiang, Haofeng Huang, Haocheng Xi, Jia Wei, Jun Zhu, and Jianfei Chen. Spargeattn: Accurate sparse attention accelerating any model inference, 2025b.
+Jiawei Zhao, Zhenyu Zhang, Beidi Chen, Zhangyang Wang, Anima Anandkumar, and Yuandong Tian. Galore: Memory-efficient llm training by gradient low-rank projection. arXiv preprint arXiv:2403.03507, 2024.
+Shu-Chang Zhou, Yu-Zhi Wang, He Wen, Qin-Yao He, and Yu-Heng Zou. Balanced quantization: An effective and efficient approach to quantized neural networks. Journal of Computer Science and Technology, 32:667-682, 2017.
+Feng Zhu, Ruihao Gong, Fengwei Yu, Xianglong Liu, Yanfei Wang, Zhelong Li, Xiuqi Yang, and Junjie Yan. Towards unified int8 training for convolutional neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 1969-1979, 2020.
+
+# A DETAILS ABOUT OPTIMIZER STATES QUANTIZATION
+
+When performing optimizer step(), We first dequantize the optimizer states into FP32, then update the optimizer states and weights in FP32 precision. In the end, we quantize the updated optimizer states back to FP8 and store it in GPU memory. This can be formulated as:
+
+$$
+m _ {t - 1} = D Q \left(m _ {t - 1} ^ {q}, S _ {m _ {t - 1}}\right) \quad \text {(D e q u a n t i z e t o F P 3 2)}
+$$
+
+$$
+v _ {t - 1} = D Q \left(v _ {t - 1} ^ {q}, S _ {v _ {t - 1}}\right) \quad (\text {D e q u a n t i z e t o F P 3 2})
+$$
+
+$$
+m _ {t} = \beta_ {1} * m _ {t - 1} + (1 - \beta_ {1}) * g _ {t}
+$$
+
+$$
+v _ {t} = \beta_ {2} * v _ {t - 1} + (1 - \beta_ {2}) * g _ {t} ^ {2}
+$$
+
+$$
+\hat {m} _ {t} = \frac {m _ {t}}{1 - \beta_ {1} ^ {t}}
+$$
+
+$$
+\hat {v} _ {t} = \frac {v _ {t}}{1 - \beta_ {2} ^ {t}}
+$$
+
+$$
+w _ {t + 1} = w _ {t} - \eta \left(\frac {\hat {m} _ {t}}{\sqrt {\hat {v} _ {t}} + \epsilon} + \lambda w _ {t}\right)
+$$
+
+$$
+m _ {t} ^ {q}, S _ {m _ {t}} = Q \left(m _ {t}\right) \quad \text {(Q u a n t i z e t o F P 8)}
+$$
+
+$$
+v _ {t} ^ {q}, S _ {v _ {t}} = Q \left(v _ {t}\right) \quad (\text {Q u a n t i z e t o F P 8})
+$$
+
+In the FSDP setting, dynamic range synchronization across GPUs is unnecessary due to the unique distributed training architecture. The approach leverages sharding strategies that eliminate the need for cross-GPU synchronization. Each GPU independently handles its own optimizer state shards. Since dynamic range is calculated based on local device statistics and optimizer states remain locally computed and updated, we do not need to synchronize the dynamic range across GPUs.
+
+# B QUALITATIVE EXAMPLE - VISION LANGUAGE MODEL CAPTIONING
+
+# C VISUALIZATION OF EXPAND FUCTION
+
+We further visualize Figure 3 by flattening it. This helps to understand the effectiveness of our method since floating point numbers can be more easily understood in a binary manner.
+
+# D DETAILED EXPLANATION FOR TABLE 2
+
+We mainly explain why the reduction ratio of linear layers is not exactly $50\%$ here. 5.66U comes from: QKV Projection - 1U, Attention Projection - 1U, Up&Gate Projection - 1U, Down Projection - 2.66U. Among them, the attention projection's input is exactly the output of FlashAttention. However, FlashAttention will save its input (QKV) and its output itself, so FlashAttention and Attention Projection actually share the same tensor when saving it. In Python, this tensor will only be saved for 1 time. So we should not further store an FP8 version of the Attention Projection's input (Zhang et al., 2025a; 2024), since this will even increase the memory usage by 0.5U if we do not change the code of FlashAttention. Although we need to quantize the input to FP8 again in backward pass, we can store the scaling factor to reduce this additional overhead.
+
+Therefore, after FP8 quantization, the memory usage of linear layers comes from: QKV Projection - 0.5U, Attention Projection - 1U, Up&Gate Projection - 0.5U, Down Projection - 1.33U. They sum up to 3.33U.
+
+# E DETAILED EXPLANATION FOR FIGURE 1(C)
+
+We mainly discuss FP8-LM in this section. FP8-LM reduces the gradient communication precision from FP32 to FP8 and therefore greatly reduces the communication overhead. It also reduces the
+
+
+
+# Instruction: Briefly describe this figure.
+
+BF16: The image depicts a fantastical scene set in a mountainous landscape. Dominating the center of the image is a large tree, its twisted and gnarled form standing on a rocky outcropping. The tree is surrounded by a serene lake, its calm waters reflecting the vibrant colors of the sky above. The sky is a spectacle in itself, painted with hues of orange and red as the sun sets behind the mountains, casting a warm glow over the entire scene. The mountains in the background add a sense of depth and grandeur to the image, their peaks reaching up towards the sky. The overall composition of the image suggests a tranquil yet powerful natural setting, possibly inspired by mythology or fantasy.
+
+COAT: The image presents a captivating scene of a solitary tree standing on a rocky outcropping. The tree, with its twisted and gnarled form, is a vibrant green, contrasting with the surrounding landscape. The rocky outcropping on which it stands is rugged and uneven, adding to the overall wildness of the scene. The background is a breathtaking view of a mountainous landscape under a sky ablaze with hues of orange and red, possibly indicating a sunrise or sunset. The sun is partially obscured by the clouds, casting a warm glow that illuminates the scene. The image is rendered in a digital art style, which adds a sense of realism and depth to the scene. The artist has skillfully used color and lighting to create a sense of tranquility and solitude, with the tree standing as a solitary figure against the vastness of the landscape. The overall composition of the image is balanced and harmonious, with each element complementing the others to create a cohesive whole.
+
+# Question: Why People love this?
+
+BF16: People love this because it is a visually appealing and appetizing image of a delicious burger. The burger is presented on a paper bag, which adds a rustic touch to the presentation. The combination of a juicy burger with a red pepper and a fiery background creates an enticing and mouth-watering scene. The image captures the essence of a classic American favorite, the burger, and the excitement of a freshly cooked meal. The vibrant colors and the dramatic backdrop of the fire make the image even more captivating, which is why it is likely to be appreciated by many people.
+
+
+
+COAT: People love this image of a burger on a bun with various toppings, such as onions, tomatoes, and lettuce, because it represents a delicious and visually appealing meal. The burger is placed on a piece of paper, which adds an interesting and casual touch to the presentation. The fiery background, with a fire or a flame, creates a dramatic and exciting atmosphere, which can evoke a sense of excitement and anticipation for the meal. The combination of the mouth-watering burger and the striking background can make the image appealing and appetizing to many people, especially those who enjoy burgers and similar dishes.
+
+
+Figure 8: Comparison of BF16 and COAT on VLM captioning. COAT can accurately summarize the figure and identify the key points in the figure.
+
+
+Figure 9: Axis is of base 2.
+
+master weight's precision from FP32 to FP16/BF16, and reduces the optimizer states precision from FP32 to BF16/FP8. For optimizer states and master weights, the memory footprint reduction result is consistent with our bar. However, for gradient, although FP8-LM can quantize the gradient into FP8, it still needs to preserve the main gradient in FP32 for gradient accumulation. Therefore it can not reduce the memory footprint of the weight gradient.
+
+# F PROOF THE EXPAND FUNCTION IS OPTIMAL
+
+We prove that the choice of $f(x) = x^{k}$ is optimal given certain basic assumptions for the expansion function $f(x)$ .
+
+1. $f(x)$ is an odd function, where $f(x) + f(-x) = 0$ , since the representation range of FP8 is symmetric. Therefore, in the following discussion, we only consider the case when $x \geq 0$ .
+2. $f(x)$ is continuously differentiable.
+3. $f(x)$ is monotonically increasing. This is because we want to keep the relative order before and after quantization or expansion.
+
+4. $f(0) = 0$ and $f(1) = 1$ . $f(0) = 0$ since $f(x)$ is odd. $f(1) = 1$ since we can always consider $g(x) = \frac{f(x)}{f(1)}$ without changing its expansion ability.
+5. For any $x > y > 0, r > 0$ , $\frac{f(x)}{f(y)} = \frac{f(rx)}{f(ry)}$ . This is used to make sure the function is scale-invariant. For example, if you multiply the unquantized value $X$ by 10, the value after expansion and quantization is the same as if you do not multiply the value by 10.
+
+We prove that based on these assumptions, the only function that meets these assumptions is $f(x) = \operatorname{sign}(x)|x|^k$ .
+
+Proof: We only consider the case when $x > 0$ . We denote $f(2) = m > 1$ . From assumption 5, we have for any $p > r > s > q$ , if $pq = rs$ , then $f(p)f(q) = f(r)f(s)$ , since
+
+$$
+\frac {f (p)}{f (r)} = \frac {f \left(p \cdot (s / p)\right)}{f \left(r \cdot (s / p)\right)} = \frac {f (s)}{f (q)}.
+$$
+
+And for any $p = rs$
+
+$$
+f (p) = f (p) f (1) = f (r) f (s).
+$$
+
+Therefore, for any $x = 2^t$ , $t \in \mathbb{N}$
+
+$$
+f (x) = f \left(2 ^ {t}\right) = f (2) ^ {t} = m ^ {t}.
+$$
+
+It is also true that for any $x = 2^{-t}, t \in \mathbb{N}$ ,
+
+$$
+f (x) = \frac {f (1)}{f (\frac {1}{x})} = \frac {f (1)}{f (2 ^ {t})} = \frac {1}{m ^ {t}} = m ^ {- t}, \text {s o} f (x) = m ^ {- t}.
+$$
+
+Therefore, for any $N\in \mathbb{N}$ $x = 2^{t}$ $t = \sum_{i = -N}^{N}c_{i}\cdot 2^{i},c_{i}\in \{0,1\}$
+
+$$
+f (x) = f \left(\prod_ {i = - N} ^ {N} 2 ^ {c _ {i} \cdot 2 ^ {i}}\right) = \prod_ {i = - N} ^ {N} f \left(c _ {i} \cdot 2 ^ {i}\right) = \prod_ {i = - N} ^ {N} m ^ {c _ {i} \cdot 2 ^ {i}} = m ^ {\sum_ {i = - N} ^ {N} c _ {i} \cdot 2 ^ {i}} = m ^ {t}.
+$$
+
+For $\forall x > 0$ , it can be written in the form of $x = 2^t$ , $t \in \mathbb{R}$ . Consider the binary representation of $t$ , denoted by $t = \sum_{i=-\infty}^{\infty} c_i \cdot 2^i$ , where $c_i \in \{0,1\}$ . For any integer $N > 0$ , there exists two series $\{a_i\}_{-N}^N$ and $\{b_i\}_{-N}^N$ that satisfies $a_{-N} = 0$ , $b_{-N} = 1$ , and $a_i = b_i$ for $-N + 1 \leq i \leq N$ ,
+
+$$
+t _ {a} \leq t < t _ {b},
+$$
+
+where $t_a = \sum_{i=-N}^{N} a_i \cdot 2^i$ and $t_b = \sum_{i=-N}^{N} b_i \cdot 2^i$ . Since $f(x)$ is continuous, the values of $f(x)$ at $x_a = 2^{t_a}$ and $x_b = 2^{t_b}$ can be used to approximate $f(x) = f(2^t)$ , and by taking the limit as $N \to \infty$ , the equality holds:
+
+$$
+f (x) = \lim _ {N \rightarrow \infty} f (x _ {a}) = \lim _ {N \rightarrow \infty} f (x _ {b}).
+$$
+
+Therefore for $\forall t \in \mathbb{R}$ , $f(2^t) = m^t$ for some $m > 0$ . Therefore $\forall x > 0$ , $f(x) = m^{\log_2(x)}$ . Using the exponential and logarithmic identity $m^{\log_2(x)} = x^{\log_2(m)}$ , this simplifies to:
+
+$$
+f (x) = x ^ {\log_ {2} (m)},
+$$
+
+where $\log_2(m)$ is a constant determined by $f(2) = m$ . If we denote $\log_2(m) = k$ , then $f(x) = x^k$ .
+
+# G IMPLEMENTATION DETAILS OF COAT
+
+This section highlights the key differences and details of the implementation of the COAT LLaMA model. The primary focus is on the techniques used to handle quantization and optimization efficiently.
+
+# G.1 MODEL ARCHITECTURE
+
+The COAT LLaMA implementation introduces three new modules, which are not present in the Hugging Face implementation, specifically designed to optimize for FP8 precision flow:
+
+1. BeforeAttention module (inherit from torch.autograd.Function) calculates the LayerNorm and QKV Projection before RoPE and correctly handles how quantized inputs interact with the residual connection. If Attention is quantized (Zhang et al., 2025a; 2024; Shah et al., 2024; Zhang et al., 2025b; Xi et al., 2025), then the output of this module should also be quantized to accommodate the input of Attention.
+2. AfterAttention (inherit from torch.autograd.Function) calculate the attention projection layer and ensures quantized outputs are correctly scaled and summed up with residual connection.
+3. MLPResidual (inherit from torch.autograd.Function) handles quantization within the feedforward network (FFN) efficiently. It also incorporates residual connections in this module to handle it efficiently.
+
+These modules ensure that the computation flow after quantization is correct. We fuse the group scaling method into the add operator in residual connection, therefore we need to manually control how the gradient flows in the network.
+
+# G.2 TRITON-BASED FP8 KERNELS FOR LINEAR LAYERS
+
+The linear layers utilize Triton to implement custom FP8 matrix multiplication kernels. This implementation introduces the following optimizations:
+
+1. Block Size Tuning: The block sizes for dimensions $M$ , $N$ , and $K$ are autotuned, with options chosen from {128, 256}. This dynamic tuning optimizes performance for the specific hardware environment.
+2. Group Scaling Technique: The output of linear layer should be BF16 or FP8 per-group quantized tensor. If it should be per-group quantized, to implement it efficiently in Triton, we reshape the output (BLOCK_M, BLOCK_N) to (BLOCK_M, BLOCK_N//G, G), where G is the group size. We then calculate the maximum value along the last dimension to get the scaling factor.
+
+# G.3 TRITON-BASED FP8 Kernels FOR NON-LINEAR LAYERS
+
+1. Transposed FP8 Output: Besides generating the quantized FP8 output, these layers also produce a transposed FP8 output. This is critical for backward computations, where column-major inputs are required to calculate weight gradients.
+2. Block Size Tuning: Block sizes for dimensions $M$ and $N$ are autotuned, with options chosen from {32, 64}.
+
+# G.4 OPTIMIZER STATES
+
+We implement a fused kernel for optimizer states update in CUDA. Since optimizer states use $1 \times 128$ quantization group size, every CUDA block calculates the result of a quantization group and contains 128 threads, each thread corresponds to one element. We uses warp shuffle functions for reduction to get the maximum absolute value and minimum absolute value within a quantization group to perform dynamic range expansion. We
+
+Direct computation of $X_{\mathrm{min}}^k$ can result in underflow and numerical instability since its magnitude is usually about $10^{-12}$ and $k > 3$ . To mitigate this issue, we introduce an additional FP32 value $C_X$ , defined as $C_X = \sqrt{X_{\mathrm{min}} \cdot X_{\mathrm{max}}}$ , to ensure numerical stability. By normalizing $X$ with $C_X$ , the values $\frac{X_{\mathrm{min}}}{C_X}$ and $\frac{X_{\mathrm{max}}}{C_X}$ are computed, which are reciprocals of each other and closer to 1 compared to the original $X_{\mathrm{min}}^k$ . This normalization enhances numerical robustness and reduces the risk of instability.
+
+# G.5 OTHERS
+
+1. Backward Gradient Handling: Backward gradients are computed in BF16 precision and are not quantized. This ensures that the gradient computations remain stable and accurate, avoiding numerical issues that can arise with quantization. Therefore for the backward kernels, the activation stored from forward is in FP8, while the input gradient and the output gradient are both in BF16 precision.
+2. Gradient Accumulation Optimization: During the first gradient accumulation step, the scaling factors of weight matrices are stored. This avoids the need to recompute scaling factors in subsequent steps, reducing computational overhead. The FP8 weights are not stored to prevent additional memory usage, which is critical for large-scale models.
+
+# H GROUP SIZE ANALYSIS
+
+For activation, we calculate the quantization error of the output of last layer in forward pass, and the gradient before the first layer in backward pass, comparing with BF16. Based on Table below, we find that group size $= 16$ achieves a good balance for memory efficiency and quantization error.
+
+
MSE
Only Quantize Linear
Also Quantize Activation
1 × 128 Group
Per Tensor
4
8
16
32
64
Memory Overhead
-
-
50%
25%
12.5%
6.5%
3.2%
Forward
372
438
464
480
492
512
520
Backward
285
286
319
334
363
361
371
+
+Table 10: Quantization overhead, forward, and backward MSE for different configurations and group sizes.
+
+We also find that applying per-group quantization to linear layers is harmful for speed, while not improving the accuracy by too much. Even with system optimizations, this finer-grained method reduces the speed of linear layers by about $40\%$ (when group size $= 128$ , speed is reduced from 1300 TFlops to about 900 TFlops), greatly reducing the benefit of FP8. On the other hand, the accuracy gain is only marginal. Therefore we do apply per-tensor quantization for linear layers.
+
+# I EFFICIENCY BREAKDOWN FOR OPTIMIZER AND ACTIVATION
+
+We break down the improvement of each component and present the result in this table. Quantizing the optimizer states to FP8 is helpful in reducing the memory footprint, and can potentially increase the batch size to fully utilize the GPU. Quantizing the activation to FP8 can accelerate the training, and this number can be further improved by increasing the maximum batch size.
+
+Table 11: Llama-2-7B Training Memory and Throughput Analysis
+
+
Configuration
Optimizer
Activation
Peak
Max BS
Throughput
Speedup
Llama-2-7B on 2 GPU
BF16
26.2 GB
25.8 GB
OOM
1
6130 tokens/s
1.00x
FP8 Optimizer
6.4 GB
25.8 GB
61.9 GB
2
7258 tokens/s
1.18x
FP8 Optimizer + FP8 Activation
6.4 GB
16.9 GB
35.6 GB
4
11351 tokens/s
1.85x
Llama-2-7B on 4 GPU
BF16
13.1 GB
25.8 GB
55.1 GB
2
7730 tokens/s
1.00x
FP8 Optimizer
3.2 GB
16.9 GB
44.7 GB
4
8384 tokens/s
1.08x
FP8 Optimizer + FP8
3.2 GB
16.9 GB
35.6 GB
4
11257 tokens/s
1.45x
Llama-2-7B on 8 GPU
BF16
6.5 GB
25.8 GB
41.2 GB
4
8238 tokens/s
1.00x
FP8 Optimizer
1.6 GB
16.9 GB
36.1 GB
4
8444 tokens/s
1.02x
FP8 Optimizer + FP8 Activation
1.6 GB
16.9 GB
27.0 GB
8
11241 tokens/s
1.36x
+
+# J OVERHEAD INTRODUCED BY GROUP SCALING
+
+We show that the max reduction on each $1 \times G$ "can be seamlessly fused with the previous operation, adding minimal overhead". Take RMSNorm as an example, the speed of the RMSNorm kernel only increases by less than $5\%$ when quantization is fused with it. Therefore, this adds only minimal overhead to the kernel.
+
+Table 12: Performance Comparison: With and Without Quantization
+
+
Matrix Size
With Quantize
Without Quantize
(4096, 1024)
10.1 ms
8.7 ms
(4096, 2048)
29.6 ms
28.7 ms
(4096, 4096)
55.6 ms
53.2 ms
(4096, 8192)
122.6 ms
117.5 ms
+
+# K UNDERSTAND HOW EACH COMPONENT INFLUENCES THE MODEL PERFORMANCE
+
+We separately quantize the optimizer and activations to better understand how each component influences the model performance. We find that quantizing activation incurs almost no degradation due to our well-designed quantization flow, and the main degradation comes from optimizer quantization. We choose to quantize both to maximize memory saving.
+
+
Train PPL
COPA
ARC (Easy)
SciQ
HellaSwag
Average
BF16
2.995
60.0
45.6
67.3
33.7
51.6
FP8 O + A
3.008
61.0
44.2
67.6
33.7
51.5
FP8 O
2.998 (+0.003)
60.0 (+0.0)
44.5
66.0
34.1
51.1
FP8 A
2.999 (+0.004)
63.0 (+3.0)
44.0
68.4
34.1
52.3
+
+Table 13: Performance comparison across different metrics and configurations.
+
+# L MORE RELATED WORKS
+
+Due to page limit, some related works are presented in Appendix.
+
+Table 14: Compared with DeepSeek-V3
+
+
Non-Linear
Attention
Linear
Total
Reduction Ratio
RMSNorm
Act Func
RoPE
FlashAttn
Ideal
Achieved
Llama-style
BF16
4U
8U
2U
3U
5.66U
22.66U
1.00×
1.00×
TE
2U
8U
2U
3U
3.33U
18.33U
1.23×
1.20×
DeepSeek-V3
2U
4U
2U
3U
3.08U
14.08U
1.61×
-
COAT
1U
4U
2U
3U
3.33U
13.33U
1.69×
1.65×
+
+Activation Quantization Recent research has focused on reducing memory footprint Cai et al. (2020) during neural network training through activation quantization. ActNN (Chen et al., 2021) introduced a 2-bit activation compressed training framework using random quantization, achieving $12\mathrm{x}$ reduction in activation memory footprint1. GACT (Liu et al., 2022a) extended this concept to support various machine learning tasks and architectures, providing up to $8.1\mathrm{x}$ reduction in activation memory for CNNs, transformers, and GNNs. However, these methods mostly focus on convolutional networks and are not applicable to LLMs. AQ-SGD (Wang et al., 2022) proposed compressing activation changes rather than direct values for pipeline-parallel training to reduce the communication overhead in the pipeline-parallel setting. Few-Bit Backward(Novikov et al., 2023) quantizes the non-linear activation functions using optimal piecewise-constant approximations to reduce the memory footprint while maintaining convergence. Jetfire (Xi et al., 2024) proposes INT8 data flow to quantize the activation of both linear and non-linear layers to reduce memory footprint and is applicable to language model pretraining.
+
+Bit-Width Under-Utilization Balance Quantization Zhou et al. (2017) recursively partitions the parameters by percentiles to reduce quantization error. DDSQ Wang & Kang (2023) dynamically changes the quantization parameters according to different gradient distributions. N2UQ Liu et al. (2022b) improves the quantization precision via learning input thresholds and nonuniform mapping. These approaches are aware of the dynamic range problem in quantization and propose more adaptive, distribution-aware techniques that can preserve the nuanced information contained in full precision. They share a fundamental goal of expanding the effective dynamic range of low-precision neural network representations. These methods adopt a learnable non-uniform quantization lookup table, while our work relies on the natural FP8 data format.
\ No newline at end of file
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/images.zip b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..e8e90f73cb564a38bddc298fe03ac57262b63539
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d9ab1d3ff3647f53b2877f6582a557fc8491036261135dbde4a6b1a3a6ff1ff5
+size 954144
diff --git a/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/layout.json b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..185716b9808e8dc0709a98113e72ed41da10df03
--- /dev/null
+++ b/ICLR/2025/COAT_ Compressing Optimizer states and Activations for Memory-Efficient FP8 Training/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6ac88e6d8c5175a0a5dbfbb5744a2669d3b5a50cc519f404c45afc6fe82a672d
+size 720691
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_content_list.json b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..d24acf7eb77d355a8d6b2955de39258c9cdc4f2a
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:63dfe8882a0d29e09e8660f298e5402795c7c1752c4f6fdfa2fecdf49a68d461
+size 97510
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_model.json b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..b9af87978dec32558c120c10690503c63470d3d8
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:52b8d93fd8c16c27671dbd575e3f460515c7d1f75918d372ec08816ce0c2e162
+size 116506
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_origin.pdf b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..714ed57a1f99d557aa0121ccbd08fa2f2e7cbdaa
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/349c400c-e9cf-4f7a-8dc5-ae7f16ae65fe_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e0ebb1d9d92e0cb67be5e0734dc01e990a0bda009f5ad75f06ccc00824d676ab
+size 832888
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/full.md b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..179ae44132521704203dde6636cab4ec5ae2d079
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/full.md
@@ -0,0 +1,385 @@
+# COFLOWNET: CONSERVATIVE CONSTRAINTS ON FLOWS ENABLE HIGH-QUALITY CANDIDATE GENERATION
+
+Yudong Zhang $^{1}$ , Xuan Yu $^{1}$ , Xu Wang $^{1,2,*}$ , Zhaoyang Sun $^{1}$ , Chen Zhang $^{1}$ , Pengkun Wang $^{1,2}$ , Yang Wang $^{1,2,3}$
+
+1. University of Science and Technology of China (USTC), Hefei, China
+2. Suzhou Institute for Advanced Research, USTC, Suzhou, China
+3. State Key Laboratory of Precision and Intelligent Chemistry, USTC, Hefei, China
+
+{zyd2020@mail.,yx2024@mail.,wx309@}ustc.edu.cn
+
+{sunzhaoyang@mail., zhangchenzc@mail., pengkun@, angyan@}ustc.edu.cn
+
+# ABSTRACT
+
+Generative flow networks (GFlowNet) have been considered as powerful tools for generating candidates with desired properties. Given that evaluating the property of candidates can be complex and time-consuming, existing GFlowNets train proxy models for efficient online evaluation. However, the performance of proxy models is heavily dependent on the amount of data and is of considerable uncertainty. Therefore, it is of great interest that how to develop an offline GFlowNet that does not rely on online evaluation. Under the offline setting, the limited data results in an insufficient exploration of state space. The insufficient exploration means that offline GFlowNets can hardly generate satisfying candidates out of the distribution of training data. Therefore, it is critical to restrict the offline model to act in the distribution of training data. The distinctive training goal of GFlowNets poses a unique challenge for making such restrictions. Tackling the challenge, we propose Conservative Offline GFlowNet (COFlowNet) in this paper. We define unsupported flow, edges containing unseen states in training data. Models can learn extremely little knowledge about unsupported flow from training data. By constraining the model from exploring unsupported flows, we restrict COFlowNet to explore as optimal trajectories on the training set as possible, thus generating better candidates. In order to improve the diversity of candidates, we further introduce a quantile version of unsupported flow restriction. Experimental results on several widely-used datasets validate the effectiveness of COFlowNet in generating high-scored and diverse candidates. All implementations are available at https://github.com/yuxuan9982/COflownet.
+
+# 1 INTRODUCTION
+
+Reinforcement learning (RL) is typically about finding an optimal solution to a given target (Mnih et al., 2015; Sutton, 2018). RL models are required to generate the single highest-reward sequence of actions. However, it has become increasingly apparent that the ability to produce a variety of candidate solutions, not just the optimal one, is highly valuable for numerous real-world applications, including molecule design (Huang et al., 2016; Zhang et al., 2021; Bengio et al., 2021) and exploration in RL (Hazan et al., 2019). For example, in the scenario of molecule design, rather than generating a high-scoring molecule that cannot be synthesized, the model should generate a series of molecules with suboptimal scores, so that chemists can pick molecules that are easier to synthesize.
+
+Generative Flow Networks (GFlowNets) (Bengio et al., 2021; Jain et al., 2022; Bengio et al., 2023; Gao et al., 2022) have emerged as a potent tool for generating diverse candidates. The key insight of GFlowNets is to ensure that the probability of generating a candidate is proportional to the positive reward associated with that candidate. Therefore, GFlowNets is able to sample a series of possible
+
+candidates with the reward distribution. Taking advantage of such ability, GFlowNets have expressed promising potential in many object generation application areas. Jain et al. (2022) embeds GFlowNet into an active learning framework for biological sequence design, which iteratively generates diverse candidates and screens the candidates to enhance the training of GFlowNet. Deleu et al. (2022); Nishikawa-Toomey et al. (2022) leverage GFlowNets as a general framework for generative modeling of discrete and composite objects, which approximates the posterior distribution over the structure of Bayesian networks. Liu et al. (2023a) leverages GFlowNets for sampling structured sub-network modules, thereby enhancing predictive robustness. Zhang et al. (2023a;c) apply GFlowNets to address combinatorial optimization challenges. Additionally, Zhou et al. (2023) explores the use of GFlowNets for phylogenetic inference, demonstrating the model's versatility in diverse applications.
+
+In many scenarios, evaluating generated candidates could be expensive and time-consuming, making it impractical to calculate the accurate score of candidates. For example, in the realm of drug design, evaluating a potential molecule often requires conducting biological experiments or performing complex chemical calculations. Given that these assessment procedures can span from several minutes to multiple days, they are impractical to integrate directly into the training phase of an RL model. To this point, existing GFlowNets follow the method proposed in Angermueller et al. (2019), which suggests training a proxy model based on evaluated candidates to approximate the accurate scores (rewards) of candidates. Specifically, we have a set of candidates $X = \{x_{i}\}$ and a set of corresponding scores $Y = \{y_{i}|y_{i} = \text{oracal}(x_{i})\}$ , where oracal denotes the expensive but accurate evaluation of candidates. Based on the dataset $(X,Y)$ , a proxy model $f: x \to y$ can be trained to approximate oracal. The proxy model is then employed to calculate the rewards of online sampled candidates, with which the GFlowNets can be trained.
+
+While GFlowNets have achieved notable success across various domains of object generation, their effectiveness is significantly contingent upon the quality of the proxy models they rely on. Typically, GFlowNets are trained to align with the candidate-reward distribution as estimated by a proxy model. However, the scarcity of data can introduce considerable variability in the proxy model's accuracy. If the proxy model fails to accurately mirror the true quality of the candidates, the resulting performance of the GFlowNets will be suboptimal. Given that proxy model training requires a comprehensive dataset of candidates along with their actual scores, an alternative approach involves the development of offline reinforcement learning methods. These methods could potentially sidestep the pitfalls associated with proxy model dependency, offering a more reliable framework for GFlowNets training.
+
+Unlike conventional RL models, GFlowNets are trained with the specific objective of generating candidates with probabilities that are directly proportional to the positive rewards linked to those candidates. This distinctive training goal presents unique challenges for the development of offline GFlowNets, making existing offline RL techniques can not be directly applied. Specifically, the policy in GFlowNet frameworks is determined by inflows and outflows of states, which complicates the application of actor-critic methods (Nair et al., 2020; Tarasov et al., 2024). In Q-learning frameworks (Kostrikov et al., 2021), Q-values are maximized iteratively by the Bellman operation, which is actually against the flow match constraint in GFlowNet. Policy constraint or matching methods (Wang et al., 2023) may assimilate less desirable state space, such as some low-reward areas, making them unsuitable for offline GFlowNets. In essence, the distinctive training goal of GFlowNets calls for the development of new offline techniques not found in traditional RL approaches.
+
+In this paper, we propose a novel offline training strategy for GFlowNets to make full utilization of collected data, called Conservative Offline GFlowNet (COFlowNet). To avoid the generation of highly uncertain candidates, we define unsupported flows and propose to regularize the unsupported flows, so that the model can learn informative knowledge from training data. To enhance the diversity of generated candidates, we introduce a quantile matching algorithm, and modify the regularization of unsupported flows into quantile style. We evaluate the proposed offline training strategy following the experimental setting of Bengio et al. (2021). By applying the proposed training objective, the offline version of GFlowNet shows great potential for generating diverse and high-score candidates.
+
+The main contributions of this paper are as follows:
+
+- Our research endeavors to adapt GFlowNets for offline scenarios. A pioneering offline training strategy named Conservative Offline GFlowNet (COFlowNet) is introduced. Central to our approach is the concept of unsupported flows. By regularizing unsupported flows, the model learns informative knowledge from training data and generates high-score candidates.
+
+- To enhance the diversity of generated candidates, we introduce a quantile matching algorithm. By modifying the regularization of unsupported flows into quantile style, we achieve the final training objective of COFlowNet, termed conservative quantile matching (CQM).
+- We evaluate the proposed offline training strategy in alignment with the experimental setting in Bengio et al. (2021). The proposed COFlowNet, equipped with the novel offline training objective, exhibits significant promise in producing a spectrum of diverse and high-performing candidates.
+
+# 2 RELATED WORK
+
+GFlowNet. Since the introduction of GFlowNets by Bengio et al. (2021), there has been a surge of research in this domain, covering various aspects of the technology. Malkin et al. (2022); Zimmermann et al. (2022) have explored the relationship with variational methods, demonstrating that GFlowNets surpass variational inference when utilizing off-policy training data. Pan et al. (2022; 2023b) has established frameworks to enhance credit assignment efficiency by incorporating intermediate signals within GFlowNets. Jain et al. (2022) has delved into multi-objective generation capabilities, while Pan et al. (2023c) integrated world modeling. An unsupervised learning approach for GFlowNets was suggested by Pan et al. (2023a), and Ma et al. (2024) examined the use of isomorphism tests to mitigate flow bias in training. From a probabilistic modeling perspective, Zhang et al. (2022b) has concurrently trained an energy-based model alongside a GFlowNet, validating its effectiveness on discrete data modeling tasks and proposing a bidirectional proposal mechanism later adopted by Kim et al. (2023) for local search algorithms. Zhang et al. (2022a); Lahlou et al. (2023); Zhang et al. (2023b) provided a theoretical analysis and bridged the gap between diffusion modeling and GFlowNets. GFlowNets have also shown promise in numerous object generation applications, including biological sequence design by Jain et al. (2022) and causal structure learning by Deleu et al. (2022). Considering the complexity and time intensity associated with candidate property evaluation, current GFlowNets utilize proxy models to facilitate efficient online assessments. Yet, these proxy models' effectiveness is highly contingent upon data volume, introducing a significant margin of uncertainty. Hence, there is considerable interest in developing an offline GFlowNet that is independent of real-time evaluation mechanisms. However, GFlowNets train to generate candidates with probabilities proportional to their rewards, presenting challenges for offline adaptation that don't align with standard offline RL techniques. In the following, we analyze why existing offline RL methods are not applicable.
+
+Offline RL. Most existing offline RL methods are based on an actor-critic framework or Q-learning framework. In a flow-based framework, a policy $\pi$ is directly given by $\pi(a|s) = F(s,a) / F(s)$ , where $s$ denotes a state with actions $a \in \mathcal{A}(s)$ and $F(s,a)$ denotes the flow of state $s$ taking action $a$ . The policy is too fixed, making it difficult to apply techniques of actors from actor-critic-based methods of offline reinforcement learning, such as AWAC (Nair et al., 2020) and ReBRAC (Tarasov et al., 2024). However, Q-learning-based frameworks are also not applicable. The concept of flows is analogous to Q-values in Q-learning and the critic in the actor-critic method. However, there are still some significant differences between them. Q-values are iterated by the Bellman operation, estimating how good an action is. But they focus on the maximum value, while the values of flows denote the total sum of rewards passing the state, making it impractical to apply methods such as Kostrikov et al. (2021) to our flow matching objective. For the flow matching objective to learn the behavior policy of offline datasets better, an intuitive way is to use policy constraint methods (Wang et al., 2023). Policy constraint methods will force the behavior strategy to learn the bad parts of the dataset, such as some low-reward areas, thus it is not ideal for offline GFlowNets. Our proposed method avoids this problem by not directly forcing trained policy to stay close to behavior policy.
+
+# 3 METHOD
+
+# 3.1 PROBLEM FORMULATION
+
+We describe the problem of interest here. We aim at training a policy to generate candidate objects $x \in \mathcal{X}$ with probability proportional to a reward function $R(x): x \to \mathbb{R}^{+}$ . We generate a candidate object $x$ from an initial state $s_0$ , and make a series of actions to transfer the state finally into $x$ . The procedure can be described by a trajectory of state transformation, denoted as $\tau = (s_0, s_1, s_2, \dots, s_n = x)$ .
+
+We denote the set of states as $S$ , and the set of actions as $\mathcal{A} = \{(s \to s') | s, s' \in S\}$ . Note that we here assume the relationship between action and future state is a one-to-one correspondence, i.e., there is only one action $(s \to s')$ that transfers $s$ to $s'$ . We say $s$ is a parent of $s'$ and $s'$ is a child of $s$ when we have $(s \to s') \in \mathcal{A}$ . Specially, we have $\mathcal{A}(s)$ denoting the set of actions between $s$ and all its children, and we thus have $\mathcal{A}(x) = \emptyset$ for any terminal states $x$ .
+
+Generative Flow Networks (Bengio et al., 2021) (GFlowNets) are developed for the target that generates candidate objects $x$ with probability proportional to $R(x)$ . Such an objective is achieved in GFlowNets by casting the set of action trajectories as a flow and converting the flow consistency equations into a learning objective.
+
+As in Fig. 1, the state transformation can be illustrated as a directed acyclic graph (DAG). In the flow network, each node represents a state, and each edge represents a flow (action and its corresponding probability). The source (or root) node only generates outflows. Interior nodes have both inflows and outflows, with inflows equal to outflows. Leaf nodes (or terminal states) only receive inflows and store them as sinks. At
+
+a specific state $s_i$ , we have several input flows from its prior states and output flows to its successive states. The flow consistency equations require the inflow and outflow of an interior state (node) to be matched, and the inflow of a terminal state is the reward of the state. We define $F(s, s') : (s, s') \to \mathbb{R}^+$ as flow between state $s$ and $s'$ . By setting $R(s) = 0$ for interior states and $\mathcal{A}(s) = \varnothing$ for terminal states, the flow match constraint of state $s$ is given as,
+
+
+Figure 1: Illustration of the flow network. The triangle means initial state, the circles denote interior states, and the squares denote the terminal states. At each interior state, we have its inflow and outflow matched. For a terminal state, the inflow of it is equal to the reward at it.
+
+$$
+\mathcal {L} _ {F M} (s) = \sum_ {s: (s \rightarrow s ^ {\prime}) \in \mathcal {A}} F (s, s ^ {\prime}) - R (s ^ {\prime}) - \sum_ {s ^ {\prime \prime}: (s ^ {\prime} \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} F \left(s ^ {\prime}, s ^ {\prime \prime}\right) \tag {1}
+$$
+
+The above equation constrains that the inflows of a state are equal to the outflows of the state plus the reward of the state. Considering a whole trajectory $\tau$ , we have,
+
+$$
+\mathcal {L} _ {F M} (\tau) = \sum_ {s \in \tau \neq s _ {0}} \mathcal {L} _ {F M} ^ {2} (s) \tag {2}
+$$
+
+Note that we square $\mathcal{L}_{FM}(s)$ to ensure the value is positive. The training objective of GFlowNets is to learn $F(s,s^{\prime})$ to minimize $\mathcal{L}_{FM}(\tau)$ . Bengio et al. (2021) proves that a global optimum of the expected loss provides the correct flows. And the training objective can be achieved by setting the probability of action $(s\rightarrow s^{\prime})$ as,
+
+$$
+P \left(\left(s \rightarrow s ^ {\prime}\right) \mid s\right) = \frac {F \left(s , s ^ {\prime}\right)}{\sum_ {s ^ {\prime \prime} : \left(s \rightarrow s ^ {\prime \prime}\right) \in \mathcal {A} (s)} F \left(s , s ^ {\prime \prime}\right)} \tag {3}
+$$
+
+This equation suggests that the probability of taking action $(s \to s')$ is the ratio of the flow of this action to the outflow of $s$ .
+
+# 3.2 CONSERVATIVE GFLOWNET FOR OFFLINE RL
+
+Due to the innovative design of GFlowNets, i.e., the flow matching, existing offline RL frameworks are not applicable. To this end, this paper proposes a conservative offline GFlowNet (COFlowNet), which learns informative knowledge from training data and shows the ability to generate diverse candidates.
+
+In the offline setting, the model is constrained from extensively exploring the state space and must rely solely on the provided training data. This limitation can lead to inadequate coverage of the state space within the data. Consequently, the performance of candidates whose trajectories include many states not present in the training data may be highly uncertain, as limited clues of their performance can be learned from training data.
+
+To avoid the generation of highly uncertain candidates, COFlowNet makes constraints on the flows. The offline dataset $\mathcal{D}$ we used is composed by a list of transitions $(s_t, a_t, s_{t+1}, r_t, d_t)_i$ , where $i$ indexes a transition sampled from a trajectory $\tau$ . Specifically, we call a flow $(s \to s')$ supported if there exists a trajectory $(s_0 \to s_1 \to s_2 \to \dots \to s_n)$ in the dataset $\mathcal{D}$ such that $s_t = s$ and $s_{t+1} = s'$ . Otherwise, it is unsupported. These supported flows compose our action set $\mathcal{A}_{\mathcal{D}}$ of training data and serve as the basis for imposing node-specific constraints within the proposed COFlowNet framework.
+
+For inflows in state $s$ , we constrain the unsupported inflows in the dataset by adding a regularization term
+
+to constrain them into small values. The unseen actions are thus constrained to help COFlowNet better learn the behavior policy of training data. The regularization term of unsupported inflows of state $s$ can be formulated as,
+
+$$
+\mathcal {R} _ {i n} (s) = \sum_ {s ^ {\prime}: \left(s ^ {\prime} \rightarrow s\right) \in \mathcal {A}} F \left(s ^ {\prime}, s\right) - \sum_ {s _ {\mathcal {D}} ^ {\prime}: \left(s _ {\mathcal {D}} ^ {\prime} \rightarrow s\right) \in \mathcal {A} _ {\mathcal {D}}} F \left(s _ {\mathcal {D}} ^ {\prime}, s\right) \tag {4}
+$$
+
+For outflows in node $s \in S$ , our strategy is similar, and the regularization term of outflows is defined as,
+
+$$
+\mathcal {R} _ {\text {o u t}} (s) = \sum_ {s ^ {\prime \prime}: (s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} F \left(s, s ^ {\prime \prime}\right) - \sum_ {s _ {\mathcal {D}} ^ {\prime \prime}: (s \rightarrow s _ {\mathcal {D}} ^ {\prime \prime}) \in \mathcal {A} _ {\mathcal {D}}} F \left(s, s _ {\mathcal {D}} ^ {\prime \prime}\right) \tag {5}
+$$
+
+Let us define two trade-off factors $\alpha_{1} \geq 0$ and $\alpha_{2} \geq 0$ for $\mathcal{R}_{in}(s)$ and $\mathcal{R}_{out}(s)$ . We can turn our Equation into our constrained flow matching (CFM) objective for interior and terminal states to optimize the parameter $\theta$ .
+
+$$
+\mathcal {L} _ {C F M} (s) = \mathcal {L} _ {F M} ^ {2} (s) + \alpha_ {1} \mathcal {R} _ {i n} ^ {2} (s) + \alpha_ {2} \mathcal {R} _ {o u t} ^ {2} (s) \tag {6}
+$$
+
+We here square $\mathcal{R}_{in}$ and $\mathcal{R}_{out}$ for the same reason as Eq. 2. We next prove that applying the regularization will exactly decrease the unsupported flow and will not hurt the supported flow.
+
+Theorem 1. Given two flow estimation function, $\hat{F}$ trained with regularization and $F$ trained without regularization, we have $\hat{F}(s,s') \leq F(s,s')$ obtains for unsupported flow $(s,s')$ , i.e., $(s,s') \in \mathcal{A}$ and $(s,s') \notin \mathcal{A}_{\mathcal{D}}$ .
+
+Proof. With trainable parameters in $F$ denoted as $\theta$ , the derivative of constrained flow matching objective to $\theta$ is,
+
+$$
+\begin{array}{l} \frac {\partial \hat {\mathcal {L}} _ {C F M} (s)}{\partial \theta} = 2 \mathcal {L} _ {F M} (s) \cdot \left(\sum_ {s ^ {\prime}: (s ^ {\prime} \rightarrow s) \in \mathcal {A}} \frac {\partial \hat {F} (s ^ {\prime} , s)}{\partial \theta} - \sum_ {s ^ {\prime \prime}: (s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \frac {\partial \hat {F} (s , s ^ {\prime \prime})}{\partial \theta}\right) \\ + 2 \alpha_ {1} \mathcal {R} _ {i n} (s) \cdot \left(\sum_ {s ^ {\prime}: (s ^ {\prime} \rightarrow s) \in \mathcal {A}} \frac {\partial \hat {F} \left(s ^ {\prime} , s\right)}{\partial \theta} - \sum_ {s _ {\mathcal {D}}: (s _ {\mathcal {D}} \rightarrow s) \in \mathcal {A} _ {\mathcal {D}}} \frac {\partial \hat {F} \left(s _ {\mathcal {D}} , s\right)}{\partial \theta}\right) \tag {7} \\ + 2 \alpha_ {2} \mathcal {R} _ {\text {o u t}} (s) \cdot \left(\sum_ {s ^ {\prime \prime}: (s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \frac {\partial \hat {F} (s , s ^ {\prime \prime})}{\partial \theta} - \sum_ {s _ {\mathcal {D}} ^ {\prime \prime}: (s \rightarrow s _ {\mathcal {D}} ^ {\prime \prime}) \in \mathcal {A} _ {\mathcal {D}}} \frac {\partial \hat {F} (s , s _ {\mathcal {D}} ^ {\prime \prime})}{\partial \theta}\right) \\ \end{array}
+$$
+
+And we have the derivative of flow matching objective without regularization as,
+
+$$
+\frac {\partial \mathcal {L} _ {F M} (s)}{\partial \theta} = 2 \mathcal {L} _ {F M} (s) \cdot \left(\sum_ {s ^ {\prime}: \left(s ^ {\prime} \rightarrow s\right) \in \mathcal {A}} \frac {\partial F \left(s ^ {\prime} , s\right)}{\partial \theta} - \sum_ {s ^ {\prime \prime}: \left(s \rightarrow s ^ {\prime \prime}\right) \in \mathcal {A}} \frac {\partial F \left(s , s ^ {\prime \prime}\right)}{\partial \theta}\right) \tag {8}
+$$
+
+The second and third terms of the derivative in Eq. 7 only minimize flows not appear in the offline dataset. We get $F(\hat{s}, s') = F(s, s')$ only when $\alpha_{1} = 0$ and $\alpha_{2} = 0$ .
+
+Theorem 2. Given any state, minimizing its inflow from unsupported states will enlarge the inflow from supported states.
+
+Proof. For any state $s$ , for example, $s_4$ in Figure 3, we have that the total inflows equal the total outflows:
+
+$$
+F \left(s _ {1}, s _ {4}\right) + F \left(s _ {2}, s _ {4}\right) + F \left(s _ {3}, s _ {4}\right) = F \left(s _ {4}, S _ {c}\right)
+$$
+
+where $S_{c}$ denotes all the children of $s_4$ and $F(s_4, S_c)$ is the sum of outflows from $s_4$ to its children. The total reward (flow) in the training data is determined, as all terminal states are given by the data, and the reward can only be obtained at terminal states. Therefore, the outflow $F(s_4, S_c)$ is constant and denoted as $F_o$ . Furthermore, the inflow from supported states $F(s_1, s_4) + F(s_2, s_4)$ is equal to $F_o - F(s_3, s_4)$ . Since $F_o$ is constant, minimizing the inflow from unsupported states $F(s_3, s_4)$ will lead to an increase in the inflow from supported states $F(s_1, s_4) + F(s_2, s_4)$ . This reasoning process
+
+can be easily extended to general conditions (with more supported and unsupported states).
+
+Directly using Eq. 6 will result in large flow at states near to $s_0$ . To solve the numerical issue, we proposed the log sum exp form of our objective similar to Bengio et al. (2021),
+
+$$
+\begin{array}{l} \mathcal {L} _ {C F M} (s) = (\log [ \epsilon + \sum_ {s ^ {\prime}: (s ^ {\prime} \rightarrow s) \in \mathcal {A}} \exp (F _ {\theta} ^ {\log} (s ^ {\prime}, s)) ] - \log [ \epsilon + R (s) + \sum_ {s ^ {\prime \prime}: (s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \exp (F _ {\theta} ^ {\log} (s, s ^ {\prime \prime})) ]) ^ {2} \\ + \alpha_ {1} (\log [ \epsilon + \sum_ {s ^ {\prime}: (s ^ {\prime} \to s) \in \mathcal {A}} \exp (F _ {\theta} ^ {\log} (s ^ {\prime}, s)) ] - \log [ \epsilon + \sum_ {s _ {\mathcal {D}} ^ {\prime}: (s _ {\mathcal {D}} ^ {\prime} \to s) \in \mathcal {A} _ {\mathcal {D}}} \exp (F _ {\theta} ^ {\log} (s _ {\mathcal {D}} ^ {\prime}, s)) ]) ^ {2} \\ + \alpha_ {2} (\log [ \epsilon + \sum_ {s ^ {\prime \prime}: (s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \exp \left(F _ {\theta} ^ {\log} \left(s, s ^ {\prime \prime}\right)\right) ] - \log [ \epsilon + \sum_ {s _ {\mathcal {D}} ^ {\prime \prime}: (s \rightarrow s _ {\mathcal {D}} ^ {\prime \prime}) \in \mathcal {A} _ {\mathcal {D}}} \exp \left(F _ {\theta} ^ {\log} \left(s, s _ {\mathcal {D}} ^ {\prime \prime}\right)\right) ]) ^ {2} \tag {9} \\ \end{array}
+$$
+
+# 3.3 BETTER DIVERSITY WITH QUANTILE MATCHING FLOWS
+
+We here introduce and modify the quantile matching algorithm to consider the uncertainty of reward and thus enhance the diversity of generated candidates of our framework. Quantile matching algorithm is originally used to handle situations where the reward function is stochastic and outperforms deterministic flow matching algorithms even on deterministic datasets (Zhang et al., 2023d).
+
+Follow the definition in Zhang et al. (2023d), we use $Z_{\beta}(s, s')$ to represent the quantile flow between $s$ and $s'$ . And the equality of inflows and outflows is expanded to the distribution between two random variables, i.e., the quantile flow,
+
+$$
+\delta^ {\beta , \hat {\beta}} (s) = \log \sum_ {(s ^ {\prime} \rightarrow s) \in \mathcal {A}} \exp \left(Z _ {\beta} ^ {\log} \left(s ^ {\prime}, s\right)\right) - \log \sum_ {(s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \exp \left(Z _ {\hat {\beta}} ^ {\log} \left(s, s ^ {\prime \prime}\right)\right) \tag {10}
+$$
+
+We thus have the regularization term of unsupported inflows in Eq. 4 as,
+
+$$
+\delta_ {i n} ^ {\beta} (s) = \log \sum_ {(s ^ {\prime} \rightarrow s) \in \mathcal {A}} \exp Z _ {\beta} ^ {\log} \left(s ^ {\prime}, s\right) - \log \sum_ {\left(s _ {\mathcal {D}} ^ {\prime} \rightarrow s\right) \in \mathcal {A} _ {\mathcal {D}}} \exp Z _ {\beta} ^ {\log} \left(s _ {\mathcal {D}} ^ {\prime}, s\right) \tag {11}
+$$
+
+Similarly, the regularization term of unsupported outflows of $s$ is formed as this,
+
+$$
+\delta_ {o u t} ^ {\hat {\beta}} (s) = \log \sum_ {(s \rightarrow s ^ {\prime \prime}) \in \mathcal {A}} \exp Z _ {\hat {\beta}} ^ {\log} (s, s ^ {\prime \prime}) - \log \sum_ {(s \rightarrow s _ {\mathcal {D}} ^ {\prime \prime}) \in \mathcal {A} _ {\mathcal {D}}} \exp Z _ {\hat {\beta}} ^ {\log} (s, s _ {\mathcal {D}} ^ {\prime \prime}) \tag {12}
+$$
+
+We deploy the pinball error $\rho_{\beta}(\delta) = |\beta - \mathbf{1}\{\delta < 0\}|\ell_1(\delta)$ to both $\delta_{in}^{\beta}$ and $\delta_{out}^{\hat{\beta}}$ , where $\ell_1(\cdot)$ is a smooth $\ell_1$ loss:
+
+$$
+\ell_ {1} (\delta) = \left\{ \begin{array}{l l} \frac {1}{2} \delta^ {2} & \text {i f} | \delta | < 1 \\ | \delta | - \frac {1}{2} & \text {o t h e r w i s e} \end{array} \right. \tag {13}
+$$
+
+
+Figure 3: Illustration of Theorem 2. Due to the balance of inflows and outflows, reducing the flow between $s_3$ and $s_4$ will increase the other two inflows.
+
+Finally, we propose the conservative quantile matching (CQM) objective for COFlowNet,
+
+$$
+\mathcal {L} _ {C Q M} (s) = \frac {1}{\hat {N}} \sum_ {i = 1} ^ {N} \sum_ {j = 1} ^ {\hat {N}} \rho_ {\beta_ {i}} \left(\delta^ {\beta_ {i}, \hat {\beta} _ {j}} (s)\right) + \alpha_ {1} \frac {1}{N} \left(\sum_ {i = 1} ^ {N} \rho_ {\beta_ {i}} \left(\delta_ {i n} ^ {\beta_ {i}} (s)\right)\right) + \alpha_ {2} \frac {1}{\hat {N}} \left(\sum_ {i = 1} ^ {\hat {N}} \rho_ {\hat {\beta} _ {i}} \left(\delta_ {o u t} ^ {\hat {\beta} _ {i}} (s)\right)\right) \tag {14}
+$$
+
+# 4 EXPERIMENT
+
+In this section, we evaluate the proposed COFlowNet on two tasks, Hypergrid and molecule design. During the evaluation, we mainly focus on two research questions: 1) How is the performance of candidates generated by COFlowNet? 2) How is the diversity of the generated candidates? To facilitate a more comprehensive evaluation, we select various metrics tailored to different tasks. These metrics are chosen to better evaluate the performance and diversity. Besides the two questions, we will also investigate the impact of different components of COFlowNet. Additionally, we deploy the proposed COFlowNet to additional tasks in B. All the experiments are conducted on an NVIDIA Tesla A100 80GB. The offline dataset is formatted as $\mathcal{D} = \{s,s',r|(s,s')\in \mathcal{A}_{\mathcal{D}},r = R(s')\}$ . When training the model, we sample batched data from $\mathcal{D}$ and calculate the loss function. We can thus align the samples used for training in our offline model with states visited in online models for fair comparison. We detail the experimental settings and results on specific tasks in the following.
+
+# 4.1 HYPERGRID
+
+# 4.1.1 TASK DEFINITION
+
+We first evaluate the proposed COFlowNet on the hypergrid task from Bengio et al. (2021). The state space is a $D$ -dimensional hypercube grid of size $H^D$ , where $H$ represents the dimension of the grid. The agent is tasked with formulating long-term plans and learning from sparse reward signals. It begins at the origin of the grid, i.e., at coordinate $(0, 0, \dots, 0)$ , and must navigate by incrementing one of the coordinates by 1 with each move. Additionally, the agent has the option to execute a special termination action from any state. Upon deciding to stop, the agent is awarded a reward as specified by the following reward function,
+
+$$
+R (x) = R _ {0} + R _ {1} \prod_ {d = 1} ^ {D} \mathbb {I} \left(\left| \frac {x _ {d}}{H - 1} - 0. 5 \right| \in (0. 2 5, 0. 5 ]\right)) + R _ {2} \prod_ {d = 1} ^ {D} \mathbb {I} \left(\left| \frac {x _ {d}}{H - 1} - 0. 5 \right| \in (0. 3, 0. 4 ]\right)) \tag {15}
+$$
+
+Where $\mathbb{I}$ is the indicator function, which returns 1 when the input condition is true otherwise 0, we set $R_0 = 0.00001$ , $R_{1} = 0.5$ , $R_{2} = 2$ , $H = 8$ and $D = 4$ . The formula reveals that there are $2^{D} = 16$ distinct modes for this task, where a mode is defined as a local region (potentially encompassing one or more states) that yields the highest reward value.
+
+# 4.1.2 OFFLINE DATA CONSTRUCTION
+
+Three strategies are applied to construct the offline dataset for training COFlowNet on Hypergrid: 1) Expert: employ an online GFlowNet to generate an offline dataset with $2 \times 10^{4}$ trajectories. 2) Random: randomly generate an offline dataset with $2 \times 10^{4}$ trajectories. 3) Mixed: take $10^{4}$ trajectories from Expert and $10^{4}$ trajectories from Random.
+
+# 4.1.3 RESULT
+
+We report two metrics of COFlowNet, number of modes and $\ell_1$ error. Number of modes denotes how many modes the model finds, which reflects the diversity of the model. As mentioned, the goal of GFlowNets is to generate candidates with probabilities proportional to their rewards. In this case, we can enumerate all states and accurately give the ground truth the probability that a candidate is generated as $p(x) = R(x) / \sum_{x\in \mathcal{X}}R(x)$ . And we can approximate the probability of generating $x$ , denoted as $\pi (x)$ , by repeated sampling and counting frequencies for $x$ . $\ell_1$ error is defined as $\mathbb{E}[\| p(x) - \pi (x)\|]$ , which estimates whether the model generates candidates with probabilities proportional to their rewards.
+
+This task is rather simple, we employ vanilla GFlowNet (Bengio et al., 2021) for comparison. Since the optimal diversity of candidates is rather small, we apply CFM loss in Eq. 9 on this task rather
+
+
+(a) $\ell_1$ error
+
+
+(b) number of modes
+Figure 4: Experimental result on Hypergrid. Expert, Random and Mixed correspond to different settings of constructing offline datasets as described in Sec. 4.1.2. w/o means removing the regularization term from the training loss.
+
+than CQM loss in Eq. 14. The result on Hypergrid is reported in Fig. 4, where $w / o$ means removing regularization term from the training loss, i.e., using only flow matching loss and setting $\alpha_{i}$ to 0.
+
+As reported in Fig. 4b, most models find all of the 16 modes within 40000 times state visiting. When trained on Mixed data, COFlowNet can generate all the modes with the least visit of states. Applying the proposed regularization method will reduce the number of state visits by $10\%$ . It is worth noting that the model performs badly on the Random dataset no matter regularization is applied or not. Such a result indicates that the performance of offline models relies on the quality of training data.
+
+Fig. 4a reports the $\ell_1$ error of different models. We can find that vanilla GFlowNet achieves the goal of generating candidates with probabilities proportional to their rewards with the least times of state visiting. It can be found that when trained on Expert and Mixed, COFlowNet can also get close to the goal of GFlowNets, but takes more times of state visiting. Actually, due to the limited coverage of state space of training data, COFlowNet can hardly really achieve the goal. It is also worth noting that the $\ell_1$ error is high when the regularization is removed. The reason can be found in Eq. 7. When the regularization is removed, the model can not find any clue to reduce the unsupported flow, resulting in randomly exploring those flows, which is against the goal. For example, suppose that we have a supported flow $(s_1, x)$ and an unsupported flow $(s_2, x)$ flow into the same terminal state $x$ . Then, the reward of $x$ is divided randomly into the two flows (only related to the initialization of $F$ ). Without the regularization, the model will never know whether the flow should be divided into $(s_2, x)$ . Worse still, the model even needs to allocate inflow for the state $s_2$ to balance the inflow and outflow of $s_2$ .
+
+Overall, through the result of this simple task, we find the potential of COFlowNet and the effectiveness of the proposed conservative regularization strategy. Next, we introduce a more complex and realistic task: molecule design.
+
+# 4.2 MOLECULE DESIGN
+
+# 4.2.1 TASK DEFINITION
+
+In recent years, artificial intelligence methods have flourished in the field of chemistry, especially for molecular-related tasks (Du et al., 2024; Li et al., 2024; Zhang et al., 2023e). Among those tasks, molecule design is a typical application scenario for GFlowNets, where both the diversity and quality of candidates are required. In this task, the objective is to design a variety of molecules that exhibit specific chemical properties. The emphasis on diversity in this task is crucial, as it allows chemists to discover molecules that are not only characterized by their desired chemical properties but are also easy to synthesize. In this section, we are interested in designing molecules with large binding energy to a particular protein target.
+
+In this task, we have states as molecule graphs or SMILES $^{1}$ , and actions as adding new components to a molecule. Therefore, the molecule design task becomes a decision process. We have a vocabulary
+
+
Models
Data scarcity
Fully trained
avg top 10
avg top 100
avg top 1000
avg top 10
avg top 100
avg top 1000
MARS
/
/
/
8.0778
7.833
7.5992
PPO
/
/
/
8.4249
8.3387
8.2555
GFlowNet
8.4381
8.2909
8.0580
8.5283
8.3539
8.1440
QM-GFlowNet
8.4979
8.3272
8.1014
8.5552
8.4019
8.1886
COFlowNet w/o
8.3400
8.2046
8.0996
8.4859
8.3278
8.1083
COFlowNet
8.4638
8.3034
8.1088
8.5029
8.3730
8.1693
+
+Table 1: The average reward of the top $k$ candidates. Darker blue denotes the best result and lighter blue denotes the second best.
+
+of building blocks specified by junction tree modeling (Jin et al., 2018), which we inherit from vanilla GFlowNet (Bengio et al., 2021). At each step, the action space is determined by two factors: selecting an atom to which a building block will be attached, and deciding which block to attach. In our case, the size of the vocabulary of building blocks is 105. Given a molecule, a building block can be added to the molecule at different positions. And the number of applicable actions of a state is greater than 105, leading to a larger state space.
+
+# 4.2.2 DATASET
+
+As computing binding energy is computationally expensive, existing online RL models train proxy models to approximate it. Interestingly, the proxy models are also employed to evaluate their molecule models for computational convenience. If the target of an RL model is to fit the distribution of reward function, there is nothing wrong with evaluating the model with proxy, in which case the model is to fit the proxy. But for molecule design, we should not ignore the gap between the proxy model and oracle, i.e., the expensive computation. To this end, we propose two kinds of evaluation. Specifically, we first construct a dataset $\mathcal{D}_L$ with $300k$ molecules as in Bengio et al. (2021). A proxy model $\mathcal{P}_D$ is trained on $\mathcal{D}_L$ to serve as oracle, since we are unable to access the real oracle due to the expensive computation. We design two settings for evaluation: 1) Fully trained: In this case, we have $\mathcal{D}_L$ as an offline dataset and train our model on it. Online models are trained with $\mathcal{P}_D$ . $\mathcal{P}_D$ is also employed to evaluate all molecule design models. 2) Data scarcity: In this case, a small dataset $\mathcal{D}_S$ containing about $14k$ molecules is generated by a well-trained generative model. COFlowNet is trained on the small dataset $\mathcal{D}_S$ . Also, we have a weak proxy model $\mathcal{P}_W$ trained on $\mathcal{D}_S$ , and online models are trained with $\mathcal{P}_W$ . Similarly, $\mathcal{P}_D$ is employed to evaluate all molecule design models.
+
+
+(a) number of modes with reward $>7.5$
+
+
+(b) number of modes with reward $>8$
+Figure 5: Experimental result on Molecule Design with a large dataset.
+
+# 4.2.3 RESULT
+
+We compare COFlowNet with two popular flow-based baselines, vanilla GFlowNet (Bengio et al., 2021) and QM-GFlowNet (Zhang et al., 2023d). Two more baselines, MARS (Xie et al., 2021) and PPO (Schulman et al., 2017), are involved here to compare COFlowNet with non-flow-based methods.
+
+Noting that MARS and PPO require a fully-trained proxy model to provide accurate reward, we only report their performance under the setting of Fully trained. Additionally, we introduce COFlowNet w/o as an offline baseline, which removes the proposed conservative regularization term and is employed to substantiate our assertion that the regularization term enhances our model's performance. For the effectiveness comparison, we consider the average reward of the top $k = \{10, 100, 1000\}$ candidates. Such a metric indicates the ability of models to generate high-score candidates.
+
+As reported in Table. 1, MARS performs significantly worse than flow-based models, including our COFlowNet. While PPO generates candidates with scores comparable to those of flow-based models, its performance in terms of diversity is markedly inferior, which will be shown in the following. The performance gap between COFlowNet and COFlowNet w/o validates the effectiveness of the proposed conservative regularization term on unsupported flows. QM-GFlowNet achieves the best performance in generating high-score candidates. Online models, QM-GFlowNet and GFlowNet, possess better exploration capabilities through interaction with proxy models, while Offline models can solely learn from collected data, where the state space is limited. Consequently, given a good proxy model, offline models can hardly outperform online models. The performance gap between GFlowNet and COFlowNet w/o also supports the analysis. Surprisingly, COFlowNet can beat vanilla GFlowNet on most of the metrics, especially when data is scarce to train a strong proxy model. Considering the above analysis between online and offline models, such results further validate the effectiveness of the proposed method. Meanwhile, as demonstrated in Table. 1, when the proxy model is suboptimal, with limited available data, the performance of QM-GFlowNet deteriorates more rapidly compared to COFlowNet.
+
+
+(a) number of modes with reward $>7.5$
+
+
+(b) number of modes with reward $>8$
+Figure 6: Experimental result on Molecule Design with a small dataset.
+
+We further compare the diversity of candidates generated by different models. Considering that we introduce quantile matching loss for improving diversity, we here replace COFlowNet w/o with FM-COFlowNet, which utilizes flow matching loss rather than quantile matching loss. As shown in Fig. 5 and Fig. 6, COFlowNet achieves the best diversity. MARS and PPO show poor diversity performance. Notably, COFlowNet generates nearly 20 times as many candidate modes as MARS, demonstrating its superior ability to explore diverse candidates. The inferior diversity performance of MARS and PPO denotes that they are generating similar candidates and overfit the proxy model. The diversity gaps between FM-COFlowNet and COFlowNet, GFlowNet and QM-GFlowNet indicate the effectiveness of quantile matching loss in improving the diversity of candidates. Specifically, applying quantile matching loss leads to $10\%$ to $20\%$ improvement in diversity.
+
+# 5 CONCLUSION
+
+This paper extends GFlowNets to offline scenarios, especially for applications where evaluating a candidate is quite expensive and historical data has been collected. To take full utilization of the offline data, we define unsupported flows. By regularizing the unsupported flows, we prevent the model from making uncertain exploration of state space, thus generating candidates with higher scores. Additionally, to improve the character of GFlowNet in generating diverse candidates, we introduce a quantile matching algorithm. By modifying the regularization of unsupported flows into a quantile version, we finally propose the conservative offline GFlowNet, called COFlowNet.
+
+# 6 ACKNOWLEDGEMENT
+
+This paper is partially supported by the National Natural Science Foundation of China (No.12227901), the Natural Science Foundation of China Youth Project (No.62402472), and the Natural Science Foundation of Jiangsu Province of China Youth Project (No.BK20240461, No.BK20240460).
+
+# REFERENCES
+
+Christof Angermueller, David Dohan, David Belanger, Ramya Deshpande, Kevin Murphy, and Lucy Colwell. Model-based reinforcement learning for biological sequence design. In International conference on learning representations, 2019.
+Emmanuel Bengio, Moksh Jain, Maksym Korablyov, Doina Precup, and Yoshua Bengio. Flow network based generative models for non-iterative diverse candidate generation. Advances in Neural Information Processing Systems, 34:27381-27394, 2021.
+Yoshua Bengio, Salem Lahlou, Tristan Deleu, Edward J Hu, Mo Tiwari, and Emmanuel Bengio. Gflownet foundations. The Journal of Machine Learning Research, 24(1):10006-10060, 2023.
+Tristan Deleu, António Góis, Chris Emezue, Mansi Rankawat, Simon Lacoste-Julien, Stefan Bauer, and Yoshua Bengio. Bayesian structure learning with generative flow networks. In Uncertainty in Artificial Intelligence, pp. 518-528. PMLR, 2022.
+Wenjie Du, Shuai Zhang, Jun Xia Di Wu, Ziyuan Zhao, Junfeng Fang, and Yang Wang. Mmgnn: A molecular merged graph neural network for explainable solvation free energy prediction. In Proceedings of the Thirty-Third International Joint Conference on Artificial Intelligence, pp. 5808-5816, 2024.
+Wenhao Gao, Tianfan Fu, Jimeng Sun, and Connor Coley. Sample efficiency matters: A benchmark for practical molecular optimization. In S. Koyejo, S. Mohamed, A. Agarwal, D. Belgrave, K. Cho, and A. Oh (eds.), Advances in Neural Information Processing Systems, volume 35, pp. 21342-21357. Curran Associates, Inc., 2022. URL https://proceedings.neurips.cc/paper_files/paper/2022/file/8644353f7d307baaf29bc1e56fe8e0ec-Paper-Datasets_and_Benchmarks.pdf.
+Elad Hazan, Sham Kakade, Karan Singh, and Abby Van Soest. Provably efficient maximum entropy exploration. In International Conference on Machine Learning, pp. 2681-2691. PMLR, 2019.
+Po-Ssu Huang, Scott E Boyken, and David Baker. The coming of age of de novo protein design. Nature, 537(7620):320-327, 2016.
+Moksh Jain, Emmanuel Bengio, Alex Hernandez-Garcia, Jarrid Rector-Brooks, Bonaventure FP Dossou, Chanakya Ajit Ekbote, Jie Fu, Tianyu Zhang, Michael Kilgour, Dinghuai Zhang, et al. Biological sequence design with gflownets. In International Conference on Machine Learning, pp. 9786-9801. PMLR, 2022.
+Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International conference on machine learning, pp. 2323-2332. PMLR, 2018.
+Minsu Kim, Taeyoung Yun, Emmanuel Bengio, Dinghuai Zhang, Yoshua Bengio, Sungsoo Ahn, and Jinkyoo Park. Local search gflownets. arXiv preprint arXiv:2310.02710, 2023.
+Ilya Kostrikov, Ashvin Nair, and Sergey Levine. Offline reinforcement learning with implicit q-learning. arXiv preprint arXiv:2110.06169, 2021.
+Salem Lahlou, Tristan Deleu, Pablo Lemos, Dinghuai Zhang, Alexandra Volokhova, Alex Hernández-García, Léna Néhale Ezzine, Yoshua Bengio, and Nikolay Malkin. A theory of continuous generative flow networks. In International Conference on Machine Learning, pp. 18269-18300. PMLR, 2023.
+
+Jiahe Li, Wenjie Du, and Yang Wang. Molclw: Molecular contrastive learning with learnable weighted substructures. In 2024 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 828-831. IEEE, 2024.
+Dianbo Liu, Moksh Jain, Bonaventure FP Dossou, Qianli Shen, Salem Lahlou, Anirudh Goyal, Nikolay Malkin, Chris Chinenye Emezue, Dinghuai Zhang, Nadhir Hassen, et al. Gflowout: Dropout with generative flow networks. In International Conference on Machine Learning, pp. 21715-21729. PMLR, 2023a.
+Shuchang Liu, Qingpeng Cai, Zhankui He, Bowen Sun, Julian McAuley, Dong Zheng, Peng Jiang, and Kun Gai. Generative flow network for listwise recommendation. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1524-1534, 2023b.
+George Ma, Emmanuel Bengio, Yoshua Bengio, and Dinghuai Zhang. Baking symmetry into gflownets. arXiv preprint arXiv:2406.05426, 2024.
+Nikolay Malkin, Moksh Jain, Emmanuel Bengio, Chen Sun, and Yoshua Bengio. Trajectory balance: Improved credit assignment in gflows. Advances in Neural Information Processing Systems, 35: 5955-5967, 2022.
+Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540):529-533, 2015.
+Ashvin Nair, Abhishek Gupta, Murtaza Dalal, and Sergey Levine. Awac: Accelerating online reinforcement learning with offline datasets. arXiv preprint arXiv:2006.09359, 2020.
+Mizu Nishikawa-Toomey, Tristan Deleu, Jithendarraa Subramanian, Yoshua Bengio, and Laurent Charlin. Bayesian learning of causal structure and mechanisms with gflownets and variational bayes. arXiv preprint arXiv:2211.02763, 2022.
+Ling Pan, Dinghuai Zhang, Aaron Courville, Longbo Huang, and Yoshua Bengio. Generative augmented flow networks. arXiv preprint arXiv:2210.03308, 2022.
+Ling Pan, Moksh Jain, Kanika Madan, and Yoshua Bengio. Pre-training and fine-tuning generative flow networks. arXiv preprint arXiv:2310.03419, 2023a.
+Ling Pan, Nikolay Malkin, Dinghuai Zhang, and Yoshua Bengio. Better training of gflownets with local credit and incomplete trajectories. In International Conference on Machine Learning, pp. 26878-26890. PMLR, 2023b.
+Ling Pan, Dinghuai Zhang, Moksh Jain, Longbo Huang, and Yoshua Bengio. Stochastic generative flow networks. In Uncertainty in Artificial Intelligence, pp. 1628-1638. PMLR, 2023c.
+Malak Pirtskhalava, Anthony A Amstrong, Maia Grigolava, Mindia Chubinidze, Evgenia Alimbarashvili, Boris Vishnepolsky, Andrei Gabrielian, Alex Rosenthal, Darrell E Hurt, and Michael Tartakovsky. Dbaasp v3: database of antimicrobial/cytotoxic activity and structure of peptides as a resource for development of new therapeutics. *Nucleic acids research*, 49(D1):D288–D297, 2021.
+John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
+Richard S Sutton. Reinforcement learning: An introduction. A Bradford Book, 2018.
+Denis Tarasov, Vladislav Kurenkov, Alexander Nikulin, and Sergey Kolesnikov. Revisiting the minimalist approach to offline reinforcement learning. Advances in Neural Information Processing Systems, 36, 2024.
+Haozhi Wang, HAO Jianye, Yinchuan Li, et al. Regularized offline gflownets. 2023.
+Yutong Xie, Chence Shi, Hao Zhou, Yuwei Yang, Weinan Zhang, Yong Yu, and Lei Li. Mars: Markov molecular sampling for multi-objective drug discovery. arXiv preprint arXiv:2103.10432, 2021.
+David W Zhang, Corrado Rainone, Markus Peschl, and Roberto Bondesan. Robust scheduling with gflownets. arXiv preprint arXiv:2302.05446, 2023a.
+
+Dinghuai Zhang, Jie Fu, Yoshua Bengio, and Aaron Courville. Unifying likelihood-free inference with black-box optimization and beyond. arXiv preprint arXiv:2110.03372, 2021.
+Dinghuai Zhang, Ricky TQ Chen, Nikolay Malkin, and Yoshua Bengio. Unifying generative models with gflows and beyond. arXiv preprint arXiv:2209.02606, 2022a.
+Dinghuai Zhang, Nikolay Malkin, Zhen Liu, Alexandra Volokhova, Aaron Courville, and Yoshua Bengio. Generative flow networks for discrete probabilistic modeling. In International Conference on Machine Learning, pp. 26412-26428. PMLR, 2022b.
+Dinghuai Zhang, Ricky Tian Qi Chen, Cheng-Hao Liu, Aaron Courville, and Yoshua Bengio. Diffusion generative flow samplers: Improving learning signals through partial trajectory optimization. arXiv preprint arXiv:2310.02679, 2023b.
+Dinghuai Zhang, Hanjun Dai, Nikolay Malkin, Aaron C Courville, Yoshua Bengio, and Ling Pan. Let the flows tell: Solving graph combinatorial problems with gflows. Advances in neural information processing systems, 36:11952-11969, 2023c.
+Dinghuai Zhang, Ling Pan, Ricky TQ Chen, Aaron Courville, and Yoshua Bengio. Distributional gflownets with quantile flows. arXiv preprint arXiv:2302.05793, 2023d.
+Jiahui Zhang, Wenjie Du, Di Wu, Jiahe Li, Shuai Zhang, and Yang Wang. Improving efficiency in rationale discovery for out-of-distribution molecular representations. In 2023 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), pp. 401-407. IEEE, 2023e.
+Mingyang Zhou, Zichao Yan, Elliot Layne, Nikolay Malkin, Dinghuai Zhang, Moksh Jain, Mathieu Blanchette, and Yoshua Bengio. Phylogfn: Phylogenetic inference with generative flow networks. arXiv preprint arXiv:2310.08774, 2023.
+Heiko Zimmermann, Fredrik Lindsten, Jan-Willem van de Meent, and Christian A Naesseth. A variational perspective on generative flow networks. arXiv preprint arXiv:2210.07992, 2022.
+
+# A TIME CONSUMPTION
+
+In this part, we compare the training cost between the proposed method with online baselines. Compared to online models, COFlowNet is sampling-free during training, resulting in a reduction in training time. In Table. 2, we report the average training time per epoch for both COFlowNet and the baseline models. Since online models sample batches during training while offline models are trained on batched states, we report the time of online and offline models training on the same number of states ( i.e., the number of states in the offline dataset), which we term as an epoch. The reported times reflect the average duration for 100 epochs. It is worth noting that we exclude the online evaluation time consumption of the online model (called oracle or proxy model) and the time consumption of training proxy models. As shown in Table. 2, the offline version of vanilla GFlowNet, i.e., FM-COFlowNet, takes approximately $1/3$ less time to train than GFlowNet. Even with a more complex matching method, COFlowNet remains faster than GFlowNet and is approximately twice as fast as QM-GFlowNet. This demonstrates that COFlowNet offers significant efficiency advantages in terms of time cost.
+
+
Model
GFlowNet
QM-GFlowNet
FM-COFlowNet
COFlowNet
Training time (s/epoch)
1.594
2.904
1.055
1.521
+
+Table 2: Comparison of training time consumption. Darker blue denotes the best result and lighter blue denotes the second best.
+
+# B EXPERIMENTS ON MORE TASKS
+
+In Sec. 4, we have evaluated COFlowNet on two distinct tasks: the Hypergrid task and the Molecule Design task. Furthermore, our method is inherently generalizable to any domain where GFlowNets are applicable. To further validate the efficiency of COFlowNet beyond these tasks, we have extended our experiments to other tasks.
+
+# B.1 ANTI-MICROBIAL PEPTIDE DESIGN
+
+To further validate the efficiency of COFlowNet beyond these tasks, we have extended our experiments to include the Anti-Microbial Peptide Design task (Pirtskhalava et al., 2021). In this task, the objective is to generate peptides (short protein sequences) with anti-microbial properties, where actions involve selecting amino acids from a predefined set with 20 elements and the longest sequence is with 50 elements. For a given model, we have $D$ denoting the set of generated candidates with top 100 scores, and evaluate the methods using the following three metrics,
+
+Performance: The average score/reward of the top 100 generated candidates.
+
+$$
+\operatorname {P e r f o r m a n c e} (D) = \frac {\sum_ {x \in D} \operatorname {r e w a r d} (x)}{| D |} \tag {16}
+$$
+
+Diversity: The average pairwise distance among the top 100 candidates.
+
+$$
+\operatorname {D i v e r s i t y} (D) = \frac {\sum_ {x _ {i} , x _ {j} \in D} \mathrm {d} \left(x _ {i} , x _ {j}\right)}{| D | (| D | - 1)} \tag {17}
+$$
+
+where $\mathrm{d}(\cdot, \cdot)$ is the Levenshtein distance between two sequences.
+
+Novelty: The average distance between the top 100 candidates and known peptides, indicating the ability to generate new peptides.
+
+$$
+\operatorname {N o v e l t y} (D) = \frac {\sum_ {x _ {i} \in D} \min _ {s _ {j} \in D _ {0}} \mathrm {d} \left(x _ {i} , s _ {j}\right)}{| D |} \tag {18}
+$$
+
+where $D_0$ is the dataset used for training the proxy model.
+
+
Model
Performance
Novelty
Diversity
QM-GFlowNet
0.895
29.12
12.14
GFlowNet
0.868
15.72
11.32
COFlowNet w/o
0.788
25.68
10.43
FM-COFlowNet
0.853
28.53
13.44
COFlowNet
0.878
28.88
12.45
+
+Table 3: The average reward of the top $k$ candidates. Darker blue denotes the best result and lighter blue denotes the second best.
+
+The experimental results are summarized in Table. 3, showing that COFlowNet achieves superior performance across all three metrics, comparable to advanced online models despite being trained offline. These results further substantiate COFlowNet's capability to generate high-quality and diverse candidates across various tasks.
+
+In summary, our COFlowNet demonstrates consistent and significant improvements over other methods across a diverse range of tasks, highlighting its broad applicability and efficiency.
+
+# B.2 ITEM RECOMMENDATION
+
+To further demonstrate the effectiveness of COFlowNet in diverse domains, we have extended our experiments to another classic and practical task in the domain of online businesses, item recommendation, inspired by the literature Liu et al. (2023b). In this task, for a given user $u$ , models are required to sample trajectories, where each state corresponds to an item. Notably, instead of calculating rewards on the terminal states, we calculate rewards based on the whole trajectories in this task, which correspond to lists of items. This task aims to provide diverse recommendations with high quality, which is exactly a good application of the problem studied in this paper.
+
+Experimental setting. The experiment is conducted on ML1M dataset, a subset of the MovieLens dataset2. We report three key metrics for evaluation: average reward (Avg.R), max reward (Max.R), and Coverage. We employ the online user environment proposed in Liu et al. (2023b) to calculate
+
+the preference of users to items, denoted as $s(u, a)$ , which returns the user $u$ 's response score of item $a$ . Given a list of items $A$ and a user $u$ , the reward of $A$ is calculated as
+
+$$
+R (u, A) = \frac {1}{| A |} \sum_ {a \in A} s (u, a).
+$$
+
+In order to evaluate the diversity of candidates generated by the model, we employ the Coverage metric, which describes the number of distinct items exposed in a batch of generated lists of items.
+
+Experimental results and analysis. The results are summarized in Table 4. According to the results, COFlowNet achieves similar performance to QM-GFlowNet in generating high-score candidates. Considering the inherent distinctions between online and offline models, the small performance gap between COFlowNet and QM-GFlowNet is predictable and acceptable. However, COFlowNet is able to generate candidates with more diversity than QM-GFlowNet, as evidenced by the Coverage metric. The Avg.R and Max.R gaps between COFlowNet w/o and COFlowNet further demonstrate the effectiveness of the proposed conservative constraint. The poor performance of COFlowNet w/o indicates that it is difficult to develop an effective offline model. Our proposed conservative constraint enables effective offline training. Additionally, COFlowNet, equipped with the quantile matching mechanism, outperforms FM-COFlowNet across all three metrics, validating the effectiveness of the proposed conservative quantile matching (CQM) objective introduced in Eq. 15.
+
+
Model
Avg.R
Max.R
Coverage
GFlowNet
1.996
2.832
47.95
QM-GFlowNet
2.016
2.865
65.61
COFlowNet w/o
1.280
2.692
115.1
FM-COFlowNet
1.664
2.800
62.15
COFlowNet
1.998
2.850
109.35
+
+Table 4: Experimental results of item recommendation task.
+
+Therefore, these results collectively demonstrate that COFlowNet exhibits excellent offline learning capabilities and consistent effectiveness across various tasks, and contributes to the research community in diverse valuable and practical domains.
\ No newline at end of file
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/images.zip b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..f177e3d4ca8751cac1c21e08888e1c74f5eb34d0
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:00d38a1776b79563641c5462d90c0f31a5af83afd118ea06610c567cc83d58b2
+size 483199
diff --git a/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/layout.json b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..8bf8b9f097c78b326e629de81ed3222011ef0e1b
--- /dev/null
+++ b/ICLR/2025/COFlowNet_ Conservative Constraints on Flows Enable High-Quality Candidate Generation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ffd56c15fb371788e4d223317136ad61176bfd92b88118939ab3e8241d4a1ff6
+size 515241
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_content_list.json b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..ec0528acb7c683bb2114523125bd3c89ddc8eb0e
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:beccf973900cf5f230f97b268041a6d1dd5071afbacf8ab68c1ec7b5d58fabbf
+size 122312
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_model.json b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..0e0174e57072f2507fc8d02c43d87ca3f77846cc
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:50a6c8e817b13a094f83722d4fa57369e43b1f21a2c67d30c4695ca43ff06d10
+size 152491
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_origin.pdf b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..72e95e9a8c1f924822bbe3bdb2d831752e104bec
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/dd4cc08a-240d-4716-892a-466a085f0c3b_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ff83eaec14e1f5b793801855efe20ee38777fa9d31bfd796ec92320499fb7fb1
+size 4352135
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/full.md b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a687b8a777f93d3d79899f3ee1bf17c7f504bb47
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/full.md
@@ -0,0 +1,503 @@
+# COMBO: COMPOSITIONAL WORLD MODELS FOR EMBodied MULTI-AGENT COOPERATION
+
+Hongxin Zhang $^{1*}$ , Zeyuan Wang $^{2*}$ , Qiushi Lyu $^{3*}$ , Zheyuan Zhang $^{1}$ , Sunli Chen $^{1}$ , Tianmin Shu $^{4}$ , Behzad Dariush $^{5}$ , Kwonjoon Lee $^{5}$ , Yilun Du $^{6}$ , Chuang Gan $^{1}$
+
+1 University of Massachusetts Amherst 2 IIIS, Tsinghua University 3 Peking University
+
+4 Johns Hopkins University 5 Honda Research Institute USA 6 MIT
+
+# ABSTRACT
+
+In this paper, we investigate the problem of embodied multi-agent cooperation, where decentralized agents must cooperate given only egocentric views of the world. To effectively plan in this setting, in contrast to learning world dynamics in a single-agent scenario, we must simulate world dynamics conditioned on an arbitrary number of agents' actions given only partial egocentric visual observations of the world. To address this issue of partial observability, we first train generative models to estimate the overall world state given partial egocentric observations. To enable accurate simulation of multiple sets of actions on this world state, we then propose to learn a compositional world model for multi-agent cooperation by factorizing the naturally composable joint actions of multiple agents and compositionally generating the video conditioned on the world state. By leveraging this compositional world model, in combination with Vision Language Models to infer the actions of other agents, we can use a tree search procedure to integrate these modules and facilitate online cooperative planning. We evaluate our methods on three challenging benchmarks with 2-4 agents. The results show our compositional world model is effective and the framework enables the embodied agents to cooperate efficiently with different agents across various tasks and an arbitrary number of agents, showing the promising future of our proposed methods. More videos can be found at https://umass-embodied-agi.github.io/COMBO/.
+
+# 1 INTRODUCTION
+
+Building cooperative embodied agents that can engage in and help humans in tasks requiring visual planning is a valuable yet challenging endeavor. To cooperatively plan in a multi-agent scenario, in contrast to learning world dynamics in a single-agent scenario, there are additional challenges to simulate world dynamics conditioned on joint actions and partial observations of the world.
+
+Large generative models have brought remarkable advances to various domains, including language understanding and generation (OpenAI, 2023), image understanding and generation (Liu et al., 2023a; Ho et al., 2020), and video generation (Blattmann et al., 2023a). Many have explored how to leverage these powerful foundation models for embodied AI, Ahn et al. (2022); Wang et al. (2023a) leverage Large Language Models for decision-making, Zhang et al. (2023) incorporates LLMs to build modular embodied agents for cooperation and communication, Driess et al. (2023) uses Vision Language Models to build capable vision agents, Du et al. (2023b); Yang et al. (2024) use Video Models to generate visual plans for robots and explore modeling world dynamics with video models to improve single-agent planning. However, how to leverage Vision Language Models and Video Models to build embodied agents capable of planning under a visual cooperation task is under-explored where it's important to accurately simulate the world dynamics conditioned on an arbitrary number of agents' actions given only partial egocentric observations at each step for efficient cooperation.
+
+We propose to learn a compositional world model for multi-agent cooperation by leveraging the natural compositionality of joint actions to generate future frames conditioned on the current world state
+
+
+Figure 1: (a) Two challenging embodied multi-agent visual cooperation benchmarks TDW-Cook and TDW-Game, where 2-4 agents cooperate to finish dishes according to the recipe or finish puzzles according to the visual clue. (b) The agent needs to infer other agents' intents, propose possible actions, and accurately simulate how the world may be affected by multiple sets of actions to make efficient cooperation in the long run.
+
+compositionally, which enables accurate simulation of multiple sets of actions on the world state. To address the partial observability issue, we leverage a learned generative model to estimate the overall world state given partial egocentric observations. By leveraging the compositional world model, in combination with Vision Language Models, we propose COMBO, a novel Compositional World Model-based emBOdied multi-agent planning framework to facilitate online cooperative planning. COMBO first estimates the overall world state from partial egocentric observations, then utilizes Vision Language Models to act as an Action Proposer to propose possible actions, an Intent Tracker to infer other agents' intents, and an Outcome Evaluator to evaluate the different possible outcomes. In combination with the compositional world model to simulate the effect of joint actions on the world state, COMBO uses a tree search procedure to integrate these modules and empowers embodied agents to imagine how different actions may affect the world with other agents in the long run and plan more cooperatively.
+
+We instantiate the challenging embodied multi-agent visual cooperation task in ThreeDWorld (Gan et al., 2021), and build TDW-Game and TDW-Cook where 2-4 decentralized agents must cooperate to finish several puzzles according to the visual clue or dishes according to the recipe given only partial egocentric views of the world as shown in Figure 1, requiring extensive visual cooperation. The agents need to estimate the overall world state given partial egocentric observations, infer other agents' intents, and accurately simulate how the world state may be affected by multiple sets of actions to make efficient cooperation in the long run. Our extensive experiments on these two challenging benchmarks and another adapted cooperation task show our learned compositional world model delivers accurate video synthesis, conditioned on multiple sets of actions from an arbitrary number of agents and COMBO enables the embodied agents to cooperate efficiently with different agents across various tasks and an arbitrary number of agents. In sum, our contribution includes:
+
+- We propose to learn a compositional world model for multi-agent cooperation by factorizing joint actions of an arbitrary number of agents and compositionally generating the video to enable accurate simulation of multiple sets of actions on the world state.
+- We introduce COMBO, a Compositional World Model-based emBOdied multi-agent planning framework to empower the agents to imagine how different actions may affect the world with other agents in the long run and plan more cooperatively.
+- We evaluate our methods on three challenging benchmarks and conduct ablation studies, the results show our framework enables the embodied agents to cooperate efficiently with different agents across various tasks and an arbitrary number of agents.
+
+# 2 RELATED WORK
+
+# 2.1 MULTI-AGENT PLANNING
+
+Multi-agent planning has a long-standing history (Stone & Veloso, 2000), with various tasks and methods have been introduced (Lowe et al., 2017; Samvelyan et al., 2019; Carroll et al., 2019; Suarez et al., 2019; Jaderberg et al., 2019; Amato et al., 2019; Baker et al., 2020; Bard et al., 2020; Jain et al., 2020; Wen et al., 2022; Szot et al., 2023). For embodied intelligence, Puig et al. (2021) explored the social perception of the agents during household tasks, Zhang et al. (2023) studied the communication and cooperation of two agents in a multi-room house. However, these works didn't dig into the explicit challenge of modeling the world dynamics conditioned on an arbitrary number of agents' actions given partial egocentric observations of the world, which is essential for the agents to cooperate efficiently in long-horizon cooperation-extensive visual tasks. In contrast, we learn a compositional world model for multi-agent cooperation and propose a compositional world model-based embodied multi-agent planning framework to empower the embodied agents to imagine and plan more cooperatively with only partial egocentric observations.
+
+# 2.2 LARGE GENERATIVE MODELS FOR EMBodied AI
+
+With the recent advance of large generative models (Bubeck et al., 2023; Liu et al., 2023a; Driess et al., 2023; Blattmann et al., 2023b), numerous works have explored how they can help build better agents (Wang et al., 2023b; Xi et al., 2023; Sumers et al., 2023), especially in embodied environments (Zhou et al., 2024a; Li et al., 2023; Padmakumar et al., 2022; Kolve et al., 2017; Misra et al., 2018; Xia et al., 2018; Xiang et al., 2020). Specifically, Wang et al. (2023c); Ahn et al. (2022); Sharma et al. (2021); Wang et al. (2023a); Park et al. (2023) leverage Large Language Models to help decision-making. Brohan et al. (2023); Jiang et al. (2023); Wang et al. (2023d) use vision language models to facilitate embodied agents to plan end-to-end in visual worlds. Hong et al. (2024); Black et al. (2024) use diffusion models for decision-making. Xiang et al. (2024); Du et al. (2024); Finn et al. (2016) use video models to help the robot make visual plans. There are two closely related works. VLP (Du et al., 2023b) enables a single agent to perform complex long-horizon manipulation tasks by synergizing vision-language models and text-to-video models with tree search, but they neglect the challenge of learning world dynamics conditioned on multiple sets of actions of an arbitrary number of agents. RoboDreamer (Zhou et al., 2024b) decomposes language instructions into sets of lower-level primitives and compositionally synthesizes video plans on unseen goals for robot manipulation tasks, however, they only focus on the low-level trajectory control, and assume the observation is static and non-partial. In contrast, we learn a compositional world model for multi-agent cooperation to enable accurate simulation of multiple sets of actions on the world and leverage a learned generative model to estimate the overall world state given partial egocentric observations to address the partial observability issue.
+
+# 3 PRELIMINARIES
+
+# 3.1 PROBLEM STATEMENT
+
+Embodied multi-agent cooperation problem can be formalized as a decentralized partially observable Markov decision process (DEC-POMDP) (Oliehoek et al., 2016; Bernstein et al., 2002; Spanan et al., 2006), defined by $(n, S, \{A_i\}, \{O_i\}, T, G, h)$ , where:
+
+- $n$ denotes the number of agents;
+- $S$ is a finite set of states;
+- $A_{i}$ is the action set for agent $i$ ;
+- $O_{i}$ is the observation set for agent $i$ , including partial egocentric visual observation the agent receives through its sensors;
+- $T(s, a, s') = p(s'|s, a)$ is the joint transition model which defines the probability that after taking joint action $a \in A = A_1 \times \dots \times A_n$ in $s \in S$ , the new state $s' \in S$ is achieved;
+- $G$ is the final goal state;
+- $h$ is the planning horizon.
+
+Starting from an initial state $S_0 \in S$ , $n$ decentralized agents need to act $a_i \in A_i$ given egocentric RGBD observations $o_i \in O_i$ each step to achieve the goal state $G$ using a minimal number of steps.
+
+# 3.2VIDEO DIFFUSION MODELS
+
+Given an initial image $x_0$ and a text prompt $txt$ as the condition, a video diffusion model learns to model the distribution of possible future frames $x_{1\dots T}$ , denote as $P_{\theta}(x_{1\dots T}|x_0,txt)$ . A denoising function $\epsilon_{\theta}$ is trained to predict the noise applied to $x_{1\dots T}$ at diffusion time step $t$ given the noisy frames by optimizing the objective of
+
+$$
+L _ {M S E} = \left\| \epsilon_ {\theta} \left(x _ {1.. T}, t \mid x _ {0}, t x t\right) - \epsilon \right\| ^ {2} \tag {1}
+$$
+
+where $\epsilon$ is sampled from a standard Gaussian distribution, and $t$ is a randomly sampled diffusion time step, following Ko et al. (2023).
+
+# 3.3 COMPOSABLE DIFFUSION MODELS
+
+Liu et al. (2022); Du et al. (2023a) shows that diffusion models are functionally similar to Energy-Based Models, and can be composed to generate images conditioned on a set of concepts $\{c_1, c_2, \dots, c_n\}$ by training diffusion models to learn a set of score functions $\epsilon_{\theta}(x_t, t|c_i)$ , and composing them as
+
+$$
+\hat {\epsilon} \left(x _ {t}, t \mid c _ {1}, c _ {2}, \dots , c _ {n}\right) = \epsilon_ {\theta} \left(x _ {t}, t\right) + \sum_ {i = 1} ^ {n} \epsilon_ {\theta} \left(x _ {t}, t \mid c _ {i}\right) - \epsilon_ {\theta} \left(x _ {t}, t\right) \tag {2}
+$$
+
+Which corresponds to the production of the probability densities
+
+$$
+P _ {\theta} \left(x \mid c _ {1}, c _ {2}, \dots , c _ {n}\right) \propto P _ {\theta} (x) \prod_ {i = 1} ^ {n} \frac {P _ {\theta} \left(x \mid c _ {i}\right)}{P _ {\theta} (x)} \tag {3}
+$$
+
+Then the sampling process changes to $x_{t - 1}\sim \mathcal{N}(x_t - \hat{\epsilon} (x_t,t|c_1,c_2,\dots ,c_n),\sigma_t^2 I)$
+
+# 4 COMPOSITIONAL WORLD MODEL
+
+To cooperatively plan in a multi-agent scenario, in contrast to learning world dynamics in a single-agent scenario, there is an additional challenge to simulate world dynamics conditioned on the actions of an arbitrary number of agents. We propose to learn a compositional world model for multiagent cooperation as shown in Figure 2 by factorizing the naturally composable joint actions of an arbitrary number of agents as a set of text prompts and predicting the future state by compositionally generating the future frames with a video diffusion model to enable accurate simulation of multiple sets of actions on the world state. Our compositional world model aims to model $P(s'|s,a)$ , where $s$ represents the current world state, $a$ represents the joint action of $n$ agents, and $s'$ is the future world states. We first discuss how we learn the composable video diffusion model to act as a compositional world model in 4.1, then introduce the Agent-Dependent Loss Scaling we designed for the challenging situation where we need to accurately model multiple agents' manipulating multiple objects to improve the video synthesis performance in 4.2.
+
+# 4.1 COMPOSABLEVIDEODIFFUSIONMODELS
+
+Our compositional world model can be learned as a video diffusion model by treating the current world state $s$ as the initial frame $x_0$ , and the joint actions $a$ as the text prompt, then modeling the distribution of future frames $X$ is learning the world dynamics and predicting future states $s'$ . The text prompt with multiple agents interacting with multiple objects is challenging to be handled accurately. Observing that the joint action $a$ can be naturally factorized into $n$ components $a_1, \dots, a_n$ corresponding to the action of each agent, we leverage the composable diffusion models introduced in section 3.3 to learn the compositional world model as a composition of video diffusion models conditioned on the initial frame $x_0$ and each text component $a_i$
+
+
+Figure 2: Compositional World Model. Given the current world state $x_0$ and joint action of multiple agents $a$ , the compositional world model predicts the future states by first factorizing $a$ into several components $a_i$ corresponding to each agent, then generating multiple scores conditioned on the current world state and the text components, finally composing them to generate the video.
+
+$$
+P (s ^ {\prime} | s, a) = P _ {\theta} (X | x _ {0}, a) = P _ {\theta} (X | x _ {0}, a _ {1}, \dots , a _ {n}) \propto P _ {\theta} (X) \prod_ {i = 1} ^ {n} \frac {P _ {\theta} (X | x _ {0} , a _ {i})}{P _ {\theta} (X)} \tag {4}
+$$
+
+Using Equation 2, the video diffusion models learn a set of score functions $\epsilon_{\theta}(X_t,t|x_0,a_i)$ and composes the joint score as
+
+$$
+\hat {\epsilon} \left(X _ {t}, t \mid x _ {0}, a\right) = \epsilon_ {\theta} \left(X _ {t}, t\right) + \sum_ {i = 1} ^ {n} \epsilon_ {\theta} \left(X _ {t}, t \mid x _ {0}, a _ {i}\right) - \epsilon_ {\theta} \left(X _ {t}, t\right) \tag {5}
+$$
+
+We train this composable video diffusion model with two stages. In stage one, we learn to model the distribution of $P_{\theta}(X|x_0,a_i)$ by training with text component corresponding to a single agent action only using the standard denoising diffusion training objective introduced in section 3.2.
+
+Then in stage two, we fine-tune the model to specifically learn compositional generation to model $P_{\theta}(X|x_0,a)$ by training with conditions containing joint actions of multiple agents using the composed score function loss
+
+$$
+L _ {\text {C o m p o s e d}} = \left\| \bar {\epsilon} \left(X _ {t}, t \mid x _ {0}, a\right) - \epsilon \right\| ^ {2} = \left\| \frac {1}{n} \sum_ {i = 1} ^ {n} \epsilon_ {\theta} \left(X _ {t}, t \mid x _ {0}, a _ {i}\right) - \epsilon \right\| ^ {2} \tag {6}
+$$
+
+After the two-stage training, we can sample from the composed distribution with the composed score function at inference time given current world state $x_0$ and joint action $a = (a_{1},\dots ,a_{n})$ as
+
+$$
+\hat {\epsilon} \left(X _ {t}, t \mid x _ {0}, a\right) = \epsilon_ {\theta} \left(X _ {t}, t\right) + \sum_ {i = 1} ^ {n} \omega \left(\epsilon_ {\theta} \left(X _ {t}, t \mid x _ {0}, a _ {i}\right) - \epsilon_ {\theta} \left(X _ {t}, t\right)\right) \tag {7}
+$$
+
+where $\omega$ is the guidance weight controlling the temperature scaling on the conditions.
+
+# 4.2 AGENT-DEPENDENT LOSS SCALING
+
+A well-trained stage one model is vital to the final compositional generation performance since the accurate modeling of $P_{\theta}(X|x_0,a_i)$ is the basis for modeling $P_{\theta}(X|x_0,a)$ . We have employed a technique named Agent-Dependent Loss Scaling to assist in stage one training.
+
+
+(a)
+(b)
+Figure 3: Method Overview. (a) Given partial egocentric RGBD observations, COMBO first reconstructs and inpaints the top-down orthographic image as the overall world state estimation. (b) COMBO then leverage the planning sub-modules built with Vision Language Models to propose actions, infer other agents' intents, and evaluate the outcomes simulated with the compositional world model to plan online with a tree search procedure to cooperate in the long run.
+
+Formally, we define an agent-dependent loss coefficient matrix $C \in \mathbb{R}^{n \times H \times W}$ for $n$ agents and images of $H \times W$ pixel, and change the Equation 1 to
+
+$$
+L _ {M S E} = \sum_ {i = 1} ^ {n} C _ {i} \cdot \left\| \epsilon_ {\theta} \left(X, t \mid x _ {0}, a _ {i}\right) - \epsilon \right\| ^ {2} \tag {8}
+$$
+
+We simply set the loss coefficient matrix based on each agent's reachable region in the image to supervise the model to focus more on the related pixels. It's observed that even this straightforward loss coefficient approach brings a significant improvement to the modeling accuracy of $P_{\theta}(X|x_0,a_i)$ .
+
+# 5 COMPOSITIONAL WORLD MODEL FOR MULTI-AGENT PLANNING
+
+To plan efficiently in the embodied multi-agent visual cooperation problem, we still need to address the challenge of partial egocentric observation and model complex world dynamics in the long run. We propose COMBO, a novel Compositional wOrld Model-based emBOdied multi-agent planning framework, shown in Figure 3. After receiving the egocentric observations, COMBO first estimates the overall world state to plan on, as discussed in 5.1. COMBO then utilizes Vision Language Models to act as an Action Proposer to propose possible actions, an Intent Tracker to infer other agents' intents, and an Outcome Evaluator to evaluate the different possible outcomes, as detailed in 5.2. In combination with the compositional world model to simulate the effect of joint actions on the world state $s_{i+1} = CWM(s_i, a)$ introduced in 4, we discuss the tree search procedure to integrate these planning sub-modules in 5.3. COMBO empowers embodied agents to imagine how different plans may affect the world with other agents in the long run and plan cooperatively.
+
+# 5.1 WORLD STATE ESTIMATION WITH PARTIAL EGOCENTRIC VIEWS
+
+Directly planning based on partial egocentric views presents a considerable challenge. To address this, we initially reconstruct partial point clouds from multiple egocentric RGBD views $o_i$ captured from different perspectives. These point clouds are then transformed into a unified top-down orthographic image representation, serving as the world state. This representation is constructed by overlaying the views in chronological order. It is important to note that our world is inherently dynamic, with other agents actively interacting, resulting in a top-down orthographic image representation that is both noisy and incomplete, as depicted in 3 (a). To refine this representation, we employ a diffusion model to inpaint the partial and noisy orthographic image, thereby enhancing
+
+the estimation of the world state $s_i$ for subsequent planning. This approach allows us to effectively represent and rectify the world state, enabling more accurate planning in multi-agent environments.
+
+# 5.2 PLANNING SUB-MODULES WITH VISION LANGUAGE MODELS
+
+Action Proposer Given the estimated world state $s_i$ and the long horizon goal $G$ , the Action Proposer first searches over the potential action spaces $A_i$ , and then proposes multiple possible actions $a_{i,1\dots p} = AP(s_i,G)$ to explore on. We implement this module by querying a VLM to generate the possible actions in the text given the task goal and encoded image world state as context. We finetune LLaVA on randomly collected rollouts with possible actions labeled to construct this module.
+
+Intent Tracker Inferring what other agents may do given observation history is important for effective multi-agent cooperation. We implement this module $a_{-i} = IT(s_i, G)$ by keeping the estimated world state from the last $k$ steps and then feed into the VLM together with the task goal to query for the possible actions of other agents $a_{-i}$ . We construct this module by finetuning LLaVA on collected short rollouts with other agents' actions labeled.
+
+Outcome Evaluator It's vital to have a way to assess the value of the achieved state from different plans so the search can be effectively deepened utilizing pruning. We implement an Outcome Evaluator to fulfill this functionality $v = OE(s, G)$ by generating a heuristic score $v$ for each image state $s$ given the task goal $G$ . To construct this module, we finetune LLaVA to describe the state of each object in the image and the corresponding heuristic score representing steps left to achieve the task goal considering all objects.
+
+Algorithm 1 COMBO Planning Procedure for Agent $i$ .
+1: Input: Estimated world state $s_0$ from $o_i$ , task goal $G$
+2: Sub-modules: Action Proposer $AP(s,G)$ , Intent Tracker $IT(s,G)$ , Compositional World Model $CWM(s,a)$ , Outcome Evaluator $OE(s,G)$
+3: Parameters: Action Proposes $P$ , Planning Beams $B$ , Rollout Depths $D$
+4: plans $\leftarrow [[s_0]]$
+5: newplans $\leftarrow [[s_0]]$
+6: for $d = 1\dots D$ do
+7: plans $\leftarrow$ newplans[1...B] # Keeps Only B Plan Beams with Best Scores
+8: newplans $\leftarrow []$
+9: for plan in plans do
+10: $s \leftarrow$ plan[-1] # Get the Last Image State in the Plan Beam
+11: $a_{i,1:P} \leftarrow AP(s,G)$ # Generate $P$ Different Action Proposals
+12: $a_{-i} \leftarrow IT(s,G)$ # Infer Other Agents' Possible Actions
+13: for $p = 1\dots P$ do
+14: $a \leftarrow (a_{i,p},a_{-i})$
+15: $s_{\text{next}} \leftarrow CWM(s,a)$ # Simulate Next State Conditioned on Joint Actions
+16: newplans.append(XE(s,G)) # Sort Plans by the Score of the Final State
+17: end for
+18: end for
+19: newplans $\leftarrow$ sorted(newplans, $OE(s,G)$ ) # Sort Plans by the Score of the Final State
+20: end for
+21: plan $\leftarrow$ newplans[1] # Return the Plan with the Best Score
+
+# 5.3 PLANNING PROCEDURE WITH TREE SEARCH
+
+With powerful generative sub-modules implemented so far, we can use an effective tree search algorithm to integrate them into achieving the best planning performance. Formally, we need to search for a sequence of actions that compose the plan to achieve the task goal with a minimal number of steps. To sample the long-horizon plans, we can chain the sub-modules to expand future states from current state $s_i$ with $s_{i+1} = CWM(s_i, AP(s_i, G), IT(s_i, G))$ . By recursively deploying these chained modules we can expand the plans until achieving the goal state. However this is impractical due to the large search space, we implement a limited tree search procedure instead by always keeping the $B$ best-scored plan beams and exploring $P$ action proposals at each plan step for a maximum of $D$ rollout steps. We show the complete COMBO planning procedure in Algorithm 1.
+
+Due to the uncertainty of other agents, COMBO replans at every step to reflect the changing world state. As similarly observed in (Du et al., 2023b), when searching for the best plan, the Outcome Evaluator may leverage the irregular artifacts of the Compositional World Model to get artificially
+
+
TDW-Game
TDW-Cook
Cooperator 1
Cooperator 2
Cooperator 1
Cooperator 2
Recurrent World Models
0.00 / -
0.00 / -
0.00 / -
0.00 / -
MAPPO
0.00 / -
0.00 / -
0.00 / -
0.00 / -
CoELA *
0.90 / 18.4
0.60 / 27.6
0.15 / 37.8
0.05 / 29.5
LLaVA
0.55 / 28.4
0.60 / 29.2
0.35 / 33.0
0.50 / 35.0
COMBO (w/o IT)
0.65 / 16.2
0.60 / 17.0
0.80 / 24.8
0.80 / 23.8
COMBO (Ours)
1.00 / 17.5
1.00 / 17.4
0.90 / 22.8
1.00 / 22.9
Shared Belief Cooperator*
1.00 / 15.3
1.00 / 15.9
0.95 / 24.0
1.00 / 21.4
+
+Table 1: Main results on TDW-Game and TDW-Cook. We report the mean success rate over a horizon of 30 and the average steps of the successful episodes over 20 episodes here. COMBO (w/o IT) denotes COMBO without the Intent Tracker module. Shared Belief Cooperator has access to the Oracle state of the world and other agents' policies. * denotes Oracle vision perception.
+
+
2D-FetchQ.*
BC-single
BC-GAIL
Co-GAIL
COMBO (Ours)
Success Rate
21.1
27.2
53.3
81.3
+
+Table 2: Results on 2D-FetchQ. We report the success rate on replay evaluation over 60 episodes.
+
+high scores, such as where key objects are teleported to desired positions. To mitigate this artificial exploitation issue, the Outcome Evaluator will use the default score from the last state if the new state generated from the Compositional World Model suspiciously increases the score above a threshold.
+
+# 6 EXPERIMENTS
+
+# 6.1 EXPERIMENTAL SETUP
+
+We instantiate the challenging embodied multi-agent visual cooperation task in ThreeDWorld and build two challenging benchmarks: TDW-Game and TDW-Cook where 2-4 decentralized agents must cooperate to finish several puzzles according to the visual clue or dishes according to the recipe given only egocentric views of the world as shown in Figure 1, requiring extensive visual cooperation. All the agents have an observation space of egocentric $336 \times 336$ RGBD images and the corresponding camera matrix. We also adapt the 2D-FetchQ challenge from Wang et al. (2022) with a visual observation space and high-level action space to evaluate our method. In this challenge, two agents must coordinate their strategy to hold buttons to unlock rooms and fetch treasures from the unlocked room. More details on the tasks can be found in Appendix A. We also verify our method in a real-world human-robot cooperation task in Appendix D.
+
+Metrics We evaluate the agent's cooperation ability by task success rate and average steps of the successful episodes when cooperating with different agents across 20 episodes. An episode is done when the goal state is reached and considered successful, or the maximum planning horizon $h$ is reached and deemed failed. Specifically, we implement two different agent policies as cooperators on both tasks to reliably evaluate the agents, which are elaborated in Appendix A.1.1.
+
+Baselines We compare our methods to several multi-agent planning methods:
+
+- Recurrent World Models (Ha & Schmidhuber, 2018), using VAE to encode the visual observations and a generative recurrent neural network to learn the world model. An evolution-trained simple policy is used as a controller.
+- MAPPO (Yu et al., 2022), a MARL baseline where agents with shared weight Actor and Critic are trained jointly with PPO.
+- CoELA (Zhang et al., 2023), an LLM agent with access to the Oracle vision perception, implemented due to the lack of ground truth segmentation needed to train the Perception Module.
+- LLaVA (Liu et al., 2023a), an end-to-end VLM (LLaVA v1.5 7B) agent fine-tuned with the same collected rollouts to train the Action Proposer in our method.
+- Shared Belief Cooperator, a planner that shares the same policy as the cooperators and has access to the Oracle state of the environment and other agents' policies, acting as a strong baseline.
+
+Implementation details The video diffusion model of the compositional world model is built upon AVDC (Ko et al., 2023) codebase, with the architectural modification of introducing a cross attention layer to the text condition in the ResNet block and replacing the Perceiver with an MLP to enhance the text conditioning. More details are in Appendix B.
+
+
+Figure 4: Compositional World Model learns world dynamics better. Our compositional world model can simulate world dynamics conditioned on the joint action of multiple agents accurately while AVDC struggles with simulating which agents should act, and COMBO w.o ADLS may simulate actions incorrectly.
+
+
TDW-Game
TDW-Cook
Single
Multiple
Plan
Single
Multiple
Plan
AVDC
65%
20%
29.7(80%)
85%
25%
34.5(90%)
COMBO w.o ADLS
70%
55%
26.9(100%)
85%
70%
28.3(100%)
COMBO
95%
75%
17.5(100%)
100%
100%
21.5(100%)
+
+Table 3: Human evaluation of generated videos from different World Models and the corresponding plan performance. Single denotes the accuracy of synthesized videos conditioned on a single agent's action among 20 samples. Multiple denotes the accuracy of synthesized videos conditioned on multiple agents' actions among 20 samples. Plan denotes the average steps (success rate) across cooperating with two different cooperators over 10 episodes. Best performances are in bold.
+
+# 6.2 RESULTS
+
+COMBO can cooperate efficiently with different cooperators. As shown in Table 1, both cooperators of different policies achieve the best performance when cooperating with COMBO on TDW-Game and TDW-Cook, finishing all the tasks within the limited horizon with the least steps. Both Recurrent World Models and MAPPO perform poorly due to the difficulty of the multi-agent long-horizon task with only egocentric observations. Compared to LLM Agent CoELA and VLM Agent LLaVA, COMBO with a compositional world model to explicitly model the world dynamics and plan accordingly achieves more efficient cooperation. On adapted 2D-FetchQ, COMBO surpasses other behavior cloning or Co-Gail baselines in a more challenging setting as shown in Table 2, demonstrating the efficacy and adaptability of our proposed method.
+
+Intent Tracker contributes to efficient cooperation Comparing the results of COMBO (w.o IT) and COMBO in Table 1, we can see the Intent Tracker is important to empower the agent to infer other agents' intents and consider them during planning for better cooperation in the long run. A qualitative case demonstrating the adaptability of the Intent Tracker Module is shown in Appendix C.1.
+
+Compositional World Model is crucial to make cooperative plans We compared the generated video quality with AVDC (Ko et al., 2023), a video diffusion model designed for robotics tasks, and ablate on the effect of the Agent-Dependent Scaling Loss (COMBO w.o. ADSL) in Table 3 and Figure 4. Compared to AVDC, our CWM can accurately simulate which agents are acting and what interactions are described in the text condition, leading to a large performance gain in the
+
+
Action
+Proposals
Rollout
+P
Depth D
Plan
+Beam B
Success
+Rate
Average
+Steps
3
1
1
50%
27.8
2
2
2
70%
18.1
3
3
3
100%
17.5
+
+Table 4: Plan performance improves with more compute budgets. We report the mean success rate and average steps of the successful episodes cooperating with two different cooperators over 5 episodes on TDW-Game here.
+
+
4-agent
3-agent
2-agent
LLaVA
0.58 / 28.7
0.65 / 27.4
0.80 / 20.7
COMBO
1.00 / 17.5
1.00 / 15.0
1.00 / 10.5
Shared Belief*
1.00 / 15.9
1.00 / 13.5
1.00 / 8.7
+
+Table 5: Results on TDW-Game with different number of agents. We report the mean success rate over a horizon of 30 and average steps cooperating with two different cooperators over 10 episodes here.
+
+
+3 Action Proposals, 1 Rollout Depth, 1 Plan Beams
+
+
+3 Action Proposals, 3 Rollout Depth, 3 Plan Beams
+Figure 5: More Computation budgets leads to better plan. With more computation budgets (second row), COMBO can search for a better plan where Alice first clears the common region with David so that he can pass the next puzzle piece to her instead of having to wait, leading to a better state after same number of steps.
+
+accuracy of modeling agent actions on the world state. Removing the Agent-Dependent Scaling Loss leads to considerable accuracy degradation, showing the effectiveness of the introduced technique. Moreover, with the compositional world model, the overall plan performance boosts to 17.5 steps for TDW-Game compared to 29.7 steps with AVDC. See C.3 for additional failure case analysis.
+
+More computation budgets lead to better Plan We study the effect of computation budgets on the long-horizon plan quality in Table 4, where we can see more computation budgets with more action proposals, larger plan beams, and deeper rollout depth leads to higher success rate and less average steps. A qualitative example of generated plans with different computation budgets is shown in Figure 5, where more searches can obtain better plans in the long run.
+
+COMBO can generalize to an arbitrary number of agents COMBO trained with only data of four agents playing TDW-Game can surprisingly generalize to three and two agents version well as shown in Table 5, showing the strong generalization and promising future of the compositional world model-based modularized planning framework for multi-agent cooperation.
+
+# 7 CONCLUSION
+
+In this work, we learn a compositional world model for embodied multi-agent cooperation by factorizing the naturally composable joint actions of an arbitrary number of agents and compositionally generating the video to enable accurate simulation of multi-agent world dynamics. We then propose COMBO, a novel Compositional World Model-based embodied multi-agent planning framework to empower the agents to infer other agents' intents and imagine different plan outcomes in the long run. Our experiments on three challenging embodied multi-agent cooperation tasks show COMBO can enable the embodied agents to cooperate efficiently with different agents across various tasks and an arbitrary number of agents.
+
+Future Work Our method leverages tree search combined with Large Generative Models to devise long-horizon plans. The necessity for multiple inferences using large models leads to a relatively slow inference speed, restricting the applicability of our method in scenarios demanding rapid response. Exploring the development of more efficient models could potentially mitigate this drawback and enhance the practicality of our approach in time-sensitive environments.
+
+# ACKNOWLEDGMENTS
+
+We thank Jeremy Schwartz and Esther Alter for setting up the ThreeDWorld environments, and Chunru Lin for the help with real-world experiments. This project is supported by the Honda Research Institute.
+
+# REFERENCES
+
+Michael Ahn, Anthony Brohan, Noah Brown, Yevgen Chebotar, Omar Cortes, Byron David, Chelsea Finn, Keerthana Gopalakrishnan, Karol Hausman, Alex Herzog, et al. Do as i can, not as i say: Grounding language in robotic affordances. arXiv preprint arXiv:2204.01691, 2022. 1, 3
+Christopher Amato, George Konidaris, Leslie P Kaelbling, and Jonathan P How. Modeling and planning with macro-actions in decentralized pomdps. Journal of Artificial Intelligence Research, 64:817-859, 2019. 3
+Bowen Baker, Ingmar Kanitscheider, Todor Markov, Yi Wu, Glenn Powell, Bob McGrew, and Igor Mordatch. Emergent tool use from multi-agent autocurricula. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum?id=SkxpxJBKwS.3
+Nolan Bard, Jakob N Foerster, Sarath Chandar, Neil Burch, Marc Lanctot, H Francis Song, Emilio Parisotto, Vincent Dumoulin, Subhodeep Moitra, Edward Hughes, et al. The hanabi challenge: A new frontier for ai research. Artificial Intelligence, 280:103216, 2020. 3
+Daniel S Bernstein, Robert Givan, Neil Immerman, and Shlomo Zilberstein. The complexity of decentralized control of markov decision processes. Mathematics of operations research, 27(4): 819-840, 2002. 3
+Kevin Black, Mitsuhiko Nakamoto, Pranav Atreya, Homer Rich Walke, Chelsea Finn, Aviral Kumar, and Sergey Levine. Zero-shot robotic manipulation with pre-trained image-editing diffusion models. In The Twelfth International Conference on Learning Representations, 2024. URL: https://openreview.net/forum?id=c0chJTSbci.3
+Andreas Blattmann, Tim Dockhorn, Sumith Kulal, Daniel Mendelevitch, Maciej Kilian, Dominik Lorenz, Yam Levi, Zion English, Vikram Voleti, Adam Letts, et al. Stable video diffusion: Scaling latent video diffusion models to large datasets. arXiv preprint arXiv:2311.15127, 2023a. 1
+Andreas Blattmann, Robin Rombach, Huan Ling, Tim Dockhorn, Seung Wook Kim, Sanja Fidler, and Karsten Kreis. Align your latents: High-resolution video synthesis with latent diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22563-22575, 2023b. 3
+Anthony Brohan, Noah Brown, Justice Carbajal, Yevgen Chebotar, Xi Chen, Krzysztof Choromanski, Tianli Ding, Danny Driess, Avinava Dubey, Chelsea Finn, et al. Rt-2: Vision-language-action models transfer web knowledge to robotic control. arXiv preprint arXiv:2307.15818, 2023. 3
+Sebastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, Harsha Nori, Hamid Palangi, Marco Tulio Ribeiro, and Yi Zhang. Sparks of artificial general intelligence: Early experiments with gpt-4, 2023. 3
+Micah Carroll, Rohin Shah, Mark K Ho, Tom Griffiths, Sanjit Seshia, Pieter Abbeel, and Anca Dragan. On the utility of learning about humans for human-ai coordination. Advances in neural information processing systems, 32, 2019. 3
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171-4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https://aclanthology.org/N19-1423.18
+Danny Driess, Fei Xia, Mehdi S. M. Sajjadi, Corey Lynch, Aakanksha Chowdhery, Brian Ichter, Ayzaan Wahid, Jonathan Tompson, Quan Vuong, Tianhe Yu, Wenlong Huang, Yevgen Chebotar, Pierre Sermanet, Daniel Duckworth, Sergey Levine, Vincent Vanhoucke, Karol Hausman, Marc Toussaint, Klaus Greff, Andy Zeng, Igor Mordatch, and Pete Florence. Palm-e: An embodied multimodal language model. In arXiv preprint arXiv:2303.03378, 2023. 1, 3
+
+Yilun Du, Conor Durkan, Robin Strudel, Joshua B Tenenbaum, Sander Dieleman, Rob Fergus, Jascha Sohl-Dickstein, Arnaud Doucet, and Will Sussman Grathwohl. Reduce, reuse, recycle: Compositional generation with energy-based diffusion models and mcmc. In International conference on machine learning, pp. 8489-8510. PMLR, 2023a. 4
+Yilun Du, Mengjiao Yang, Pete Florence, Fei Xia, Ayzaan Wahid, Brian Ichter, Pierre Sermanet, Tianhe Yu, Pieter Abbeel, Joshua B Tenenbaum, et al. Video language planning. arXiv preprint arXiv:2310.10625, 2023b. 1, 3, 7
+Yilun Du, Sherry Yang, Bo Dai, Hanjun Dai, Ofir Nachum, Josh Tenenbaum, Dale Schuurmans, and Pieter Abbeel. Learning universal policies via text-guided video generation. Advances in Neural Information Processing Systems, 36, 2024. 3
+Chelsea Finn, Ian Goodfellow, and Sergey Levine. Unsupervised learning for physical interaction through video prediction. Advances in neural information processing systems, 29, 2016. 3
+Chuang Gan, Jeremy Schwartz, Seth Alter, Damian Mrowca, Martin Schrimpf, James Traer, Julian De Freitas, Jonas Kubilius, Abhishek Bhandwaldar, Nick Haber, Megumi Sano, Kuno Kim, Elias Wang, Michael Lingelbach, Aidan Curtis, Kevin Tyler Feigelis, Daniel Bear, Dan Gutfreund, David Daniel Cox, Antonio Torralba, James J. DiCarlo, Joshua B. Tenenbaum, Josh Mcdermott, and Daniel LK Yamins. ThreeDWorld: A platform for interactive multi-modal physical simulation. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 1), 2021. URL https://openreview.net/forum?id=db1InWAwW2T.2.17
+David Ha and Jürgen Schmidhuber. Recurrent world models facilitate policy evolution. Advances in neural information processing systems, 31, 2018. 8, 18
+Nikolaus Hansen. The cma evolution strategy: A tutorial. arXiv preprint arXiv:1604.00772, 2016. 18
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020. 1
+Mineui Hong, Minjae Kang, and Songhwai Oh. Diffused task-agnostic milestone planner. Advances in Neural Information Processing Systems, 36, 2024. 3
+Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021. 20
+Max Jaderberg, Wojciech M Czarnecki, Iain Dunning, Luke Marris, Guy Lever, Antonio Garcia Castaneda, Charles Beattie, Neil C Rabinowitz, Ari S Morcos, Avraham Ruderman, et al. Human-level performance in 3d multiplayer games with population-based reinforcement learning. Science, 364(6443):859-865, 2019. 3, 21
+Unnat Jain, Luca Weihs, Eric Kolve, Ali Farhadi, Svetlana Lazebnik, Aniruddha Kembhavi, and Alexander Schwing. A cordial sync: Going beyond marginal policies for multi-agent embodied tasks. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part V 16, pp. 471-490. Springer, 2020. 3
+Yunfan Jiang, Agrim Gupta, Zichen Zhang, Guanzhi Wang, Yongqiang Dou, Yanjun Chen, Li Fei-Fei, Anima Anandkumar, Yuke Zhu, and Linxi Fan. Vima: General robot manipulation with multimodal prompts. In Fortieth International Conference on Machine Learning, 2023. 3
+Po-Chen Ko, Jiayuan Mao, Yilun Du, Shao-Hua Sun, and Joshua B. Tenenbaum. Learning to act from actionless videos through dense correspondences, 2023. 4, 8, 9
+Eric Kolve, Roozbeh Mottaghi, Winson Han, Eli VanderBilt, Luca Weihs, Alvaro Herrasti, Matt Deitke, Kiana Ehsani, Daniel Gordon, Yuke Zhu, et al. Ai2-thor: An interactive 3d environment for visual ai. arXiv preprint arXiv:1712.05474, 2017. 3
+
+Chengshu Li, Ruohan Zhang, Josiah Wong, Cem Gokmen, Sanjana Srivastava, Roberto Martin-Martin, Chen Wang, Gabrael Levine, Michael Lingelbach, Jiankai Sun, et al. Behavior-1k: A benchmark for embodied ai with 1,000 everyday activities and realistic simulation. In Conference on Robot Learning, pp. 80–93. PMLR, 2023. 3
+Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. arXiv preprint arXiv:2304.08485, 2023a. 1, 3, 8, 20
+Nan Liu, Shuang Li, Yilun Du, Antonio Torralba, and Joshua B Tenenbaum. Compositional visual generation with composable diffusion models. In European Conference on Computer Vision, pp. 423-439. Springer, 2022. 4
+Shaowei Liu, Zhongzheng Ren, Saurabh Gupta, and Shenlong Wang. Physgen: Rigid-body physics-grounded image-to-video generation. In European Conference on Computer Vision (ECCV), 2024. 22
+Shilong Liu, Zhaoyang Zeng, Tianhe Ren, Feng Li, Hao Zhang, Jie Yang, Qing Jiang, Chunyuan Li, Jianwei Yang, Hang Su, et al. Grounding dino: Marrying dino with grounded pre-training for open-set object detection. arXiv preprint arXiv:2303.05499, 2023b. 20
+Ryan Lowe, Aviv Tamar, Jean Harb, OpenAI Pieter Abbeel, and Igor Mordatch. Multi-agent actor-critic for mixed cooperative-competitive environments. Advances in neural information processing systems, 30, 2017. 3
+Dipendra Misra, Andrew Bennett, Valts Blukis, Eyvind Niklasson, Max Shatkhin, and Yoav Artzi. Mapping instructions to actions in 3d environments with visual goal prediction. arXiv preprint arXiv:1809.00786, 2018.3
+Frans A Oliehoek, Christopher Amato, et al. A concise introduction to decentralized POMDPs, volume 1. Springer, 2016. 3
+OpenAI. Gpt-4 technical report, 2023. 1
+Aishwarya Padmakumar, Jesse Thomason, Ayush Shrivastava, Patrick Lange, Anjali Narayan-Chen, Spandana Gella, Robinson Piramuthu, Gokhan Tur, and Dilek Hakkani-Tur. Teach: Task-driven embodied agents that chat. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 2017-2025, 2022. 3
+Joon Sung Park, Joseph C O'Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442, 2023. 3
+Xavier Puig, Tianmin Shu, Shuang Li, Zilin Wang, Yuan-Hong Liao, Joshua B Tenenbaum, Sanja Fidler, and Antonio Torralba. Watch-and-help: A challenge for social perception and human-ai collaboration. In International Conference on Learning Representations, 2021. 3
+Nikhila Ravi, Valentin Gabeur, Yuan-Ting Hu, Ronghang Hu, Chaitanya Ryali, Tengyu Ma, Haitham Khedr, Roman Rädle, Chloe Rolland, Laura Gustafson, Eric Mintun, Junting Pan, Kalyan Vasudev Alwala, Nicolas Carion, Chao-Yuan Wu, Ross Girshick, Piotr Dollár, and Christoph Feichtenhofer. Sam 2: Segment anything in images and videos, 2024. URL https://arxiv.org/abs/2408.00714.20
+Mikayel Samvelyan, Tabish Rashid, Christian Schroeder de Witt, Gregory Farquhar, Nantas Nardelli, Tim GJ Rudner, Chia-Man Hung, Philip HS Torr, Jakob Foerster, and Shimon White-son. The starcraft multi-agent challenge. In Proceedings of the 18th International Conference on Autonomous Agents and MultiAgent Systems, pp. 2186-2188, 2019. 3
+Pratyusha Sharma, Antonio Torralba, and Jacob Andreas. Skill induction and planning with latent language. arXiv preprint arXiv:2110.01517, 2021. 3
+Matthijs TJ Spaan, Geoffrey J Gordon, and Nikos Vlassis. Decentralized planning under uncertainty for teams of communicating agents. In Proceedings of the fifth international joint conference on Autonomous agents and multiagent systems, pp. 249-256, 2006. 3
+
+Peter Stone and Manuela Veloso. Multiagent systems: A survey from a machine learning perspective. Autonomous Robots, 8:345-383, 2000. 3
+Joseph Suarez, Yilun Du, Phillip Isola, and Igor Mordatch. Neural mmo: A massively multiagent game environment for training and evaluating intelligent agents. arXiv preprint arXiv:1903.00784, 2019. 3
+Theodore Sumers, Shunyu Yao, Karthik Narasimhan, and Thomas L Griffiths. Cognitive architectures for language agents. arXiv preprint arXiv:2309.02427, 2023. 3
+Andrew Szot, Unnat Jain, Dhruv Batra, Zsolt Kira, Ruta Desai, and Akshara Rai. Adaptive coordination in social embodied rearrangement. In International Conference on Machine Learning, pp. 33365-33380. PMLR, 2023. 3, 21
+Chen Wang, Claudia Pérez-D'Arpino, Danfei Xu, Li Fei-Fei, Karen Liu, and Silvio Savarese. Cogail: Learning diverse strategies for human-robot collaboration. In Conference on Robot Learning, pp. 1279–1290. PMLR, 2022. 8, 18
+Guanzhi Wang, Yuqi Xie, Yunfan Jiang, Ajay Mandlekar, Chaowei Xiao, Yuke Zhu, Linxi Fan, and Anima Anandkumar. Voyager: An open-ended embodied agent with large language models. arXiv preprint arXiv:2305.16291, 2023a. 1, 3
+Lei Wang, Chen Ma, Xueyang Feng, Zeyu Zhang, Hao Yang, Jingsen Zhang, Zhiyuan Chen, Jiakai Tang, Xu Chen, Yankai Lin, et al. A survey on large language model based autonomous agents. arXiv preprint arXiv:2308.11432, 2023b. 3
+Zihao Wang, Shaofei Cai, Guanzhou Chen, Anji Liu, Xiaojian Ma, and Yitao Liang. Describe, explain, plan and select: interactive planning with llms enables open-world multi-task agents. In Thirty-seventh Conference on Neural Information Processing Systems, 2023c. 3
+Zihao Wang, Shaofei Cai, Anji Liu, Xiaojian Ma, and Yitao Liang. JARVIS-1: Open-world multitask agents with memory-augmented multimodal language models. In Second Agent Learning in Open-Endedness Workshop, 2023d. URL https://openreview.net/forum?id=xzPkZyHLOW.3
+Muning Wen, Jakub Kuba, Runji Lin, Weinan Zhang, Ying Wen, Jun Wang, and Yaodong Yang. Multi-agent reinforcement learning is a sequence modeling problem. Advances in Neural Information Processing Systems, 35:16509-16521, 2022. 3
+Sarah A Wu, Rose E Wang, James A Evans, Joshua B Tenenbaum, David C Parkes, and Max Kleiman-Weiner. Too many cooks: Bayesian inference for coordinating multi-agent collaboration. Topics in Cognitive Science, 13(2):414-432, 2021. 21
+Zhiheng Xi, Wenxiang Chen, Xin Guo, Wei He, Yiwen Ding, Boyang Hong, Ming Zhang, Junzhe Wang, Senjie Jin, Enyu Zhou, et al. The rise and potential of large language model based agents: A survey. arXiv preprint arXiv:2309.07864, 2023. 3
+Fei Xia, Amir R Zamir, Zhiyang He, Alexander Sax, Jitendra Malik, and Silvio Savarese. Gibson env: Real-world perception for embodied agents. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 9068-9079, 2018. 3
+Fanbo Xiang, Yuzhe Qin, Kaichun Mo, Yikuan Xia, Hao Zhu, Fangchen Liu, Minghua Liu, Hanxiao Jiang, Yifu Yuan, He Wang, et al. Sapien: A simulated part-based interactive environment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11097-11107, 2020. 3
+Jiannan Xiang, Guangyi Liu, Yi Gu, Qiyue Gao, Yuting Ning, Yuheng Zha, Zeyu Feng, Tianhua Tao, Shibo Hao, Yemin Shi, et al. Pandora: Towards general world model with natural language actions and video states. arXiv preprint arXiv:2406.09455, 2024. 3
+Sherry Yang, Yilun Du, Seyed Kamyar Seyed Ghasemipour, Jonathan Tompson, Leslie Pack Kaelbling, Dale Schuurmans, and Pieter Abbeel. Learning interactive real-world simulators. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=sFyTZEqmUY.1
+
+Chao Yu, Akash Velu, Eugene Vinitsky, Jiaxuan Gao, Yu Wang, Alexandre Bayen, and Yi Wu. The surprising effectiveness of ppo in cooperative multi-agent games. Advances in Neural Information Processing Systems, 35:24611-24624, 2022. 8, 17
+Hongxin Zhang, Weihua Du, Jiaming Shan, Qinhong Zhou, Yilun Du, Joshua B. Tenenbaum, Tian-min Shu, and Chuang Gan. Building cooperative embodied agents modularly with large language models, 2023. 1, 3, 8
+Tianyuan Zhang, Hong-Xing Yu, Rundi Wu, Brandon Y. Feng, Changxi Zheng, Noah Snavely, Jiajun Wu, and William T. Freeman. PhysDreamer: Physics-based interaction with 3d objects via video generation. In European Conference on Computer Vision. Springer, 2024. 22
+Qinhong Zhou, Sunli Chen, Yisong Wang, Haozhe Xu, Weihua Du, Hongxin Zhang, Yilun Du, Joshua B. Tenenbaum, and Chuang Gan. Hazard challenge: Embodied decision making in dynamically changing environments, 2024a. 3
+Siyuan Zhou, Yilun Du, Jiaben Chen, YANDONG LI, Dit-Yan Yeung, and Chuang Gan. Robodreamer: Learning compositional world models for robot imagination. In *Forty-first International Conference on Machine Learning*, 2024b. URL https://openreview.net/forum?id=khjOmaUfVe.3
+
+# A ADDITIONAL EXPERIMENT DETAILS
+
+# A.1 TDWTASKS
+
+
+Figure 6: Objects of TDW-Cook and TDW-Game. Left: 13 food items that may occur on the table while 10 of them (except for the third row) may occur in the recipe. Right: 4 puzzles containing 3 to 4 pieces each with different colors and shapes.
+
+We instantiate the challenging embodied multi-agent visual cooperation task in ThreeDWorld (Gan et al., 2021), and build two challenging benchmarks: TDW-Game and TDW-Cook where 2-4 decentralized agents must cooperate to finish several puzzles according to the visual clue or dishes according to the recipe given only partial egocentric views of the world.
+
+In TDW-Game, 3-4 agents cooperate to pass and place 6-8 puzzle pieces scattered randomly on the table into the correct puzzle box according to visual clues such as the shape. The location of the puzzle box and pieces are randomly initialized across different episodes. The action space includes wait, pick up [obj], place [obj] onto [loc].
+
+In TDW-Cook, 2 agents cooperate to pass, cut, and place 6-8 out of 10 possible food items randomly scattered on the table to make some dishes according to the recipe. The location of the food items and the recipe are randomly initialized across different episodes. Specifically, there is only one cutting board where agents can pass or cut objects, making cooperation vital for efficient plans. The action space is the same as TDW-Game with an addition of cut [obj].
+
+The object assets of the two tasks are illustrated in Figure 6.
+
+# A.1.1 COOPERATOR POLICIES
+
+In TDW-Game, Cooperator 1 takes the policy of always passing the unwanted puzzle pieces in a clockwise manner, while Cooperator 2 takes the policy of always passing the unwanted puzzle pieces in a counter-clockwise manner.
+
+In TDW-Cook, Cooperator 1 takes a "selfish" policy of always operating objects in its own recipe first, while Cooperator 2 takes an "altruistic" policy of always prioritizing operating objects in the cooperator's recipe.
+
+# A.1.2 BASELINES
+
+MAPPO Our task is multi-agent reinforcement learning with decentralized observation and control, as different agents have disjoint observations to produce their actions. We followed the training procedure in Yu et al. (2022). Each agent is an actor-critic network where the actor and critic share
+
+
+Action
+
+
+
+
+Generated Frame
+pick up the lettuce
+Figure 7: Recurrent world models failed to model world dynamics conditioned on single actions accurately.
+
+
+pick up the green-brown piece
+
+a common convolutional backbone. We pre-define a set of all possible actions for each environment and let the PPO agent choose among them. We design rewards to reflect the steps left to finish the episode in a similar spirit to the Outcome Evaluator's heuristics score design.
+
+However, in our setting, the embodied multi-agent simulation samples are relatively slow, creating a higher demand for sample efficiency of the method. We conducted a grid search on hyper-parameters of learning rate in $\{1\mathrm{e} - 6,5\mathrm{e} - 5,1\mathrm{e} - 3\}$ , batch size in $\{2,64\}$ . However, the results are poor and the behavior either falls to near-random or collapses to a single action, which verifies the challenge of cooperative planning on ego-centric RGBD observations.
+
+Recurrent World Models We followed the training procedure in Ha & Schmidhuber (2018), firstly training a variational autoencoder (VAE) on the same data collected for training COMBO to encode the egocentric observations in the TDW-Game and TDW-Cook environments into a 32-dimensional latent vector $z \in \mathbb{R}^{32}$ . Then, we train a mixture density network combined with a recurrent neural network (MDN-RNN) for predicting the future latent vector given a textual action which is encoded by BERT (Devlin et al., 2019), the current egocentric observation and the current hidden state of the RNN, which is modeling $P(z_{t + 1}|a_t,z_t,h_t)$ . Finally, we train two simple controllers using the covariance-matrix adaptation evolution strategy (CMA-ES) (Hansen, 2016) to maximize the expected cumulative reward of a rollout by interacting with the actual environments.
+
+The recurrent world model failed to model world dynamics accurately conditioned on a single action, as shown in Figure 7. Specifically, we predict the latent code $z_{t+1}$ from MDN-RNN and use the decoder of the VAE to generate the image of the next time step. Additionally, the simple controller doesn't work well on a task that requires complex planning as it keeps collapsing to single actions in our experiments.
+
+# A.2 2D-FETCHQ TASK
+
+As shown in Figure 8, the 2D-FetchQ environment from Wang et al. (2022) was originally inspired by the Fetch-Quest collaborative game in SuperMario Party where two agents must coordinate their strategy to hold buttons to unlock rooms and fetch treasures from the unlocked room. At the beginning of the game, two treasures are locked in the rooms located in two corners of the map. For each agent, the only way to fetch a treasure is to let its collaborator press the button beside the room to hold the door. After the collaborator presses the button, the agent can enter the room and get the treasure. To win the game, both agents should get a treasure and reach the closest destination.
+
+
+Figure 8: 2D-FetchQ Task. Two agents coordinate their strategy to hold buttons to unlock rooms and fetch treasures from the unlocked room.
+
+Therefore, the agent who has already gotten the treasure will help the other agent to fetch its treasure. We adapted this environment with a visual observation space and high-level action space to evaluate our method.
+
+Observation Space $128 \times 128$ RGB image.
+
+Action space move up, move down, move left, move right, wait.
+
+Baselines BC-single refers to directly applying behavior cloning to learn robot trajectories. BC-GAIL involves using behavior cloning to learn human trajectories first, followed by interactive learning of robot trajectories through GAIL (Generative Adversarial Imitation Learning) with the human policy. Co-GAIL leverages data of human-human collaboration demonstrations as guidance to concurrently generate simulated interactive behaviors and train a human-robot collaborative policy.
+
+Evaluation We evaluated COMBO using replay evaluation, where COMBO collaborates with human demonstration trajectories collected through replay and determines whether the task succeeds.
+
+# B ADDITIONAL IMPLEMENTATION DETAILS
+
+# B.1 COMPOSITIONAL WORLD MODELS
+
+Implementation Details We use the base resolution $128 \times 128$ for the video diffusion model and train a super-resolution diffusion model to get the final $336 \times 336$ images. We use the T5-XXL encoder to pre-process all the text conditions for a better contextual representation. All vision language models used in the main experiments are LLaVA-v1.5-7B. The planning parameters are set to Action Proposes $P = 3$ , Planning Beams $B = 3$ , and Rollout Depths $D = 3$ unless other specified.
+
+Dataset Collection We collect random rollouts with a scripted planner and generated 107k videos of TDW-Game and 50k videos of TDW-Cook.
+
+Model Parameters The parameters of our inpainting diffusion model, super-resolution diffusion model, and video diffusion model are shown in Table 6.
+
+
Inpainting
Super-Resolution
Video Diffusion Model
num_parameters
84M
38M
198M
input_resolution
336 × 336
128 × 128
128 × 128
output_resolution
336 × 336
336 × 336
128 × 128
base_channels
64
64
128
num_res_block
2
2
2
attention resolutions
(16,)
(16,)
(8, 16)
channel或多
(1, 2, 4, 6, 8)
(1, 2, 3, 4, 5)
(1, 2, 3, 4, 5)
+
+Table 6: Model Parameters.
+
+Agent-dependent Loss Scale We use a simple method to set the loss scale. If agent $i$ is located in the upper half of the image, then we set $C_{i,1:H/2,1:W} = 2$ and others are 1. Similarly, the same approach is applied to other situations or conditions.
+
+We utilize the agents' reachable regions to define the coefficient matrix here, but it's not the only approach. The key idea of this technique is to encourage the model to focus more on the pixels related to the action prompt. There are also other possible ways to leverage this technique when such information of reachability is not available. One promising way is to use advanced object detection and segmentation models like GroundingDINO (Liu et al., 2023b) and SAM2 (Ravi et al., 2024) to identify the relevant regions in an image (e.g., "the lettuce" in the action prompt "Bob pick up the lettuce") and adjust the loss scale for those regions. Another promising approach is to discover reachability during exploration, such as bootstrapping from zero-shot vision-language models (VLMs), where an agent could learn reachability by interacting with the environment.
+
+Compute We train the world model for 50k steps in the first stage with a batch size of 384 on 192 V-100 GPUs in 1 day. Then, we fine-tune the model for 25k steps in the second stage with 120 batch size on 120 V-100 GPUs in 1 day. Both the inpainting model and the super-resolution model are trained for 60k steps with a batch size of 288 on 24 V-100 GPUs in 1 day.
+
+Samping We use DDIM sampling across the experiments with guidance weight 5 for the text-guided video diffusion model.
+
+# B.2 PLANNING SUB-MODULES
+
+Training Data Collection We generated 4k training environments by randomly sampling a recipe in TDW-Cook and a puzzle box in TDW-Game for each agent. All objects were initialized at random positions on the table. Scripted planners with randomness were then used to play out the episodes and collect the state and action histories. We finetune LLaVA-1.5-7B (Liu et al., 2023a) with LoRA (Hu et al., 2021) for one epoch to obtain one shared model for each submodule across all tasks and cooperators.
+
+For the Intent Tracker, we collected 40k short rollouts consisting of three images of consecutive observations and a textual description of the next actions of all the agents, converted by a template given the action history.
+
+For the Outcome Evaluator, we collected 138k data consisting of one image of the observation and a textual description of the state of each object in the image and the heuristic score, converted by a template given each object's location.
+
+Compute For each planning sub-module, we finetune LLaVA-1.5-7B with LoRA for one epoch with a batch size of 144 on 18 V-100 GPUs in about 3 hours.
+
+# C ADDITIONAL RESULTS AND DISCUSSIONS
+
+# C.1 INTENT TRACKER CAN ADAPT THE PREDICTIONS
+
+The intent tracker module should generalize to unseen cooperators and adapt its predictions dynamically based on historical observations. Our approach employs a shared intent tracker module across all tasks and cooperators. The test-time cooperator's policy is agnostic to our agent during training, meaning the intent tracker must rely on observation history to adapt its predictions and track the intents of diverse cooperators effectively. As shown in Figure 9, given the same current state, the intent tracker accurately predicts the next action of Agent Bob by leveraging its observation history, which reveals a preference for preparing his recipe first or helping Agent Alice first. With accurate intent tracking, it becomes possible for Agent Alice to select the best action to take.
+
+While the intent tracker module is trained on a limited set of scripted planners (e.g., the 4-agent TDW-Game setting), it generalizes reasonably well to new behaviors due to its reliance on cooperator-independent observation patterns. As demonstrated in Table 5, the same intent tracker was applied without retraining in 3-agent and 2-agent versions of TDW-Game, where cooperators followed policies unseen during the training phase. The tracker demonstrated adaptability, achieving correct intent prediction rates of $75.8\%$ in the 2-agent cooperation scenario and $64.6\%$ in the 3-agent cooperation scenario. Among the wrong predictions, $20\%$ attributes to the intent prediction of "wait" while it shouldn't be. This adaptation showcases the model's ability to adapt dynamically and predict intents effectively without over-reliance on memorization.
+
+Generalizing to more diverse and complex cooperator behaviors remains a challenging yet promising direction for future work. Enhancements such as Population-Based Training (Jaderberg et al., 2019) and Behavior Diversity Play (Szot et al., 2023) could expand the variety of cooperators encountered during training, thereby increasing the robustness of the intent tracker. Furthermore, integrating advanced modeling approaches, such as the Bayesian Theory of Mind (Wu et al., 2021), could facilitate more nuanced inference and adaptability in multi-agent collaboration scenarios.
+
+
+Figure 9: The Intent Tracker Module dynamically adapts its predictions based on historical observations. When collaborating with agents exhibiting either selfish or altruistic policies, the Intent Tracker accurately predicts the cooperator's next action by considering their historical behavior. This enables the agent to determine its appropriate next action based on the predicted intent, even when faced with the same current state but different historical contexts.
+
+
LLaVA-1.5-7B
Simpler Supervised Model
Action Proposer
98.3
90.3
Intent Tracker
79.4
73.2
Outcome Evaluator
99.7
62.7
+
+Table 7: Comparison of LLaVA-1.5-7B and the Simpler Supervised Model across different components. The accuracy of the model prediction on the test set.
+
+# C.2 OTHER IMPLEMENTATION ALTERNATIVES
+
+These planning sub-modules could also be implemented with other methods. Additionally, we implemented a simpler supervised model to serve as the planning sub-modules and trained it using the same dataset we employed for fine-tuning the VLM. This model encodes the input image using a VIT-B/16 CLIP encoder and the textual task description using the BERT-base-uncased encoder. The encoded outputs are concatenated and passed through a two-layer fully connected network with a hidden dimension of 256.
+
+- For the Action Proposer, the output is a multi-hot vector of 157 dimensions, representing all possible actions.
+- For the Intent Tracker, the output is a vector of $4 \times 157$ dimensions, capturing intents across agents.
+- For the Outcome Evaluator, the output is a scalar representing the heuristic score.
+
+Compute For each component, we preprocess the images and the textual prompts to extract the features on 8 V100 GPUs in about 30 minutes. We then train the supervised model for 10 epochs with a batch size of 64 on 1 V100 GPU in about 20 minutes.
+
+For each component, we selected the best result across 10 training epochs. The results shown in Table 7 indicate that VLMs not only offer better generalizability but also achieve superior performance compared to this supervised model. This can be attributed to the common-sense knowledge embedded in the VLM during its pretraining on large-scale internet data, as well as its superior ability to integrate the two modalities effectively.
+
+# C.3 FAILURE CASE ANALYSIS
+
+As shown in Table 3, the compositional world model still fails $25\%$ of the time for predicting the next state conditioned on four agents' actions. We attribute the errors to two primary factors:
+
+- Image Quality: This is the most critical issue, accounting for $80\%$ of the errors. We believe this problem arises from the use of CFG (Classifier-Free Guidance) based on multiple textual action conditions. Since CFG strongly guides the diffusion model to fulfill textual action conditions, it often results in contradictory behaviors, such as an agent simultaneously placing a block on both the left and right sides (see Figure 10) or attempting to pick up a block but failing to do so.
+- Misunderstanding: This error type involves the agent failing to act according to the textual action conditions (see Figure 11). Compared to image quality issues, misunderstanding errors are less frequent, likely due to the influence of CFG. These errors may stem from data imbalance, insufficient training data, or inadequate model generalization capabilities.
+
+Incorporating hidden physical parameters, such as object mass, is an essential direction for making the task closer to real-world scenarios. Extending our framework to include physics-aware video generation approaches (Liu et al., 2024; Zhang et al., 2024), is a promising avenue for future work and could further improve the capability of world models to handle hidden variables effectively.
+
+
+Figure 10: An example of the image quality error. The agent at the bottom places the green-black piece on both sides.
+
+
+Figure 11: An example of the misunderstanding error. The textual action condition for the agent on the right is to "place the blue-brown piece onto the right border of the reachable region", but the agent places the piece on the left side.
+
+
+(a)
+
+
+
+
+Figure 12: (a) Real-world task set up. The reachable region of the human and the robot is shown in blue and yellow respectively. Their shared region is shown in green, and the puzzle box is shown in red. They need to cooperate closely to pass and finish the puzzles. (b) An example plan execution. The robot passes the pieces the human needs first and then finishes its own puzzle.
+
+
+
+
+(b)
+
+
+
+
+
+# D REAL-WORLD TASK: HUMAN-ROBOT COLLABORATION
+
+Task Setup: We instantiate the TDW-Game environment in the real world with two agents. As shown in Figure 12(a), a human and an XArm sit on the upper and right sides of the table, each can only reach the objects on his side of the table, so there is only one shared region to exchange objects, which is located at the upper-right corner of the table. They must cooperate to pass and place 3-5 puzzle pieces scattered randomly on the table into the correct puzzle box according to visual clues such as the shape. In each step, the human or the robot can only pick or place one object within his reachable region.
+
+Results: We fine-tune the Compositional World Model with collected real-world data and use the same VLMs without fine-tuning for other sub-modules. We conducted 5 trials of experiments and reported the number of successful trials and the average steps in Table 8. An example plan execution is shown in Figure 12(b), where the robot first helps pass the puzzle pieces the human needs, and finally picks and places its last piece of the puzzle to finish the task. We also show two sampled video generations of the compositional world model from the same current state and conditioned on two different joint actions in figure 13. The result demonstrates our method is capable in real-world scenarios involving low-level control and non-trivial generalization.
+
+
+Figure 13: Two sampled video generations of the compositional world model conditioned on the same current state but different joint actions.
+
+
Success
Average Steps
COMBO
4/5
8.4
+
+Table 8: Real-world experiment results. We report the number of successful trials / total trials and the average steps of the successful trials over 5 trials here.
\ No newline at end of file
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/images.zip b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..57f0e255fc6cd0d3fcf5ad282874f745756d4b24
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:49c18cf33ed3865bc3a4c0dd78a21e78b7d3c7ee47596bbd317e2d5f97f15c0f
+size 1026628
diff --git a/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/layout.json b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..34a82216e31c93ee8e5622fcff894ce511fe86d0
--- /dev/null
+++ b/ICLR/2025/COMBO_ Compositional World Models for Embodied Multi-Agent Cooperation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8ad963a58b6408ab72293cd24dd5c2f42acf1305b248004764153c3e38910827
+size 634494
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_content_list.json b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..1494c46744fbf93858062f59825a114dcc8fd40e
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c8c63ec0ece9824c14a8e6174c612d1d14e812c999331c47953cd7c9c8125d0c
+size 192206
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_model.json b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..2844005c558dfadb4c4e84ab84502f920dadb527
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c444429d17731981c7a63737c111a77ba300e83d43a993e2a9218bb6126e3096
+size 222522
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_origin.pdf b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..cc1e72991aed1ddb6dfaf6f670fd06f8b71442f4
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/2c7053c5-aef1-468a-a3cc-e0a043436cf7_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:77bc1786adf0b2956f1740cf99ff3216884775eeaada22217936cc149f77fe11
+size 19076443
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/full.md b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..1aee7ec2bf7596db9129dc8ecd22aac7f08220b6
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/full.md
@@ -0,0 +1,689 @@
+# COME: TEST-TIME ADAPTION BY CONSERVATIVELY MINIMIZING ENTROPY
+
+Qingyang Zhang $^{1*}$ , Yatao Bian $^{2\dagger}$ , Xinke Kong $^{1}$ , Peilin Zhao $^{2}$ and Changqing Zhang $^{1\dagger}$
+
+College of Intelligence and Computing, Tianjin University1
+
+Tencent AI Lab
+
+# ABSTRACT
+
+Machine learning models must continuously self-adjust themselves for novel data distribution in the open world. As the predominant principle, entropy minimization (EM) has been proven to be a simple yet effective cornerstone in existing test-time adaption (TTA) methods. While unfortunately its fatal limitation (i.e., overconfidence) tends to result in model collapse. For this issue, we propose to Conservatively Minimize the Entropy (COME), which is a simple drop-in replacement of traditional EM to elegantly address the limitation. In essence, COME explicitly models the uncertainty by characterizing a Dirichlet prior distribution over model predictions during TTA. By doing so, COME naturally regularizes the model to favor conservative confidence on unreliable samples. Theoretically, we provide a preliminary analysis to reveal the ability of COME in enhancing the optimization stability by introducing a data-adaptive lower bound on the entropy. Empirically, our method achieves state-of-the-art performance on commonly used benchmarks, showing significant improvements in terms of classification accuracy and uncertainty estimation under various settings including standard, life-long and open-world TTA, i.e., up to $34.5\%$ improvement on accuracy and $15.1\%$ on false positive rate. Our code is available at: https://github.com/BlueWhaleLab/COME.
+
+# 1 INTRODUCTION
+
+Endowing machine learning models with self-adjust ability is essential for their deployment in the open world, such as autonomous vehicle control and embodied AI systems. To this end, test-time adaption (TTA) emerges as a promising strategy to enhance the performance in the open world which often encounters unexpected noise or corruption (e.g., data from rainy or snowy weather). Unsupervised losses play a crucial role in model adaptation, which can improve the accuracy of a model on novel distributional test data without the need for additional labeled training data. The representative strategy entropy minimization (EM) adapts classifiers by iteratively increasing the probabilities assigned to the most likely classes, and is an integral part in the state-of-the-art TTA methods (Press et al., 2024; Wang et al., 2021; Zhang et al., 2022; Niu et al., 2022; Wang et al., 2022b; Iwasawa & Matsuo, 2021; Niu et al., 2023; Yang et al., 2024). The initial intuition behind using entropy minimization, given by (Wang et al., 2021) is based on the observation that models tend to be more accurate on samples for which they make predictions with higher confidence. The natural extension of this observation is to encourage models to bolster the confidence on test samples.
+
+However, this intuition may not always be true since there always exists irreducible uncertainty which arises from the natural complexity of the data or abnormal outliers. Naturally, one might expect a machine learning model to adapt itself to test data and favor higher confidence on right prediction, but of course not absolute certainty for the erroneous. This contradiction challenges the suitability of EM in TTA tasks, which greedily pursues low-entropy on all test samples. A notable example in recent research concerns that EM can be highly unstable and frequently lead to model collapse when the models encounter unreliable samples in the wild (Niu et al., 2023). In this work, we hypothesize
+
+that due to the nature of EM, previous TTA methods tend to be highly overconfident ignoring the reliability of various test samples, which further results in the unsatisfactory performance.
+
+For the above issues, we propose a simple yet effective model-agnostic learning principle, termed Conservatively Minimizing Entropy (COME) to stabilize TTA. We first consider the model output as opinion which explicitly models the uncertainty of each sample from a Theory of Evidence perspective. Then, we encourage the model to favor definitive opinions for TTA and meanwhile take the uncertainty information into consideration. This offers two-fold advantages compared to EM learning principle. First, our COME leverages subjective logic (Jsang, 2018), which is an off-the-shelf uncertainty tool in Bayesian toolbox to effectively perceive the uncertainty raised upon varying test samples without altering the original model architecture or training strategy. Second, when encountering unreliable outliers, the model is regularized to favor conservative confidence and be able to explicitly express "I do not know", i.e., reject to classify them to any known classes, which meets our expectation on model trustworthiness. Theoretically, our COME takes inspiration from Bayesian framework, and can be proved to correspond with a data-adaptive upper bound on the model confidence, which is a desirable property for TTA where the reliability of test samples are often varying from time. The contributions of this work are summarized as follows:
+
+- As a principled alternative beyond entropy minimization, we propose a simple yet effective driven strategy for test-time adaption called Conservatively Minimizing Entropy (COME) which improves previous methods by exploring and exploiting the uncertainty.
+- We provide theoretical analysis with insight in contrast to EM, the model confidence of our COME is provably upper bounded in a data-adaptive manner, which enables TTA methods to focus on reliable samples and conservatively handle abnormal test samples.
+- We perform extensive experiments under various settings, including standard, open-world and lifelong TTA, where the proposed COME achieves excellent performance in terms of both classification accuracy and uncertainty quantification.
+
+# 2 RELATED WORK
+
+Test-time adaption aims to bridge the gaps between source and target domains during test-time without accessing the training-time source data. Entropy minimization performs an important role in test-time adaption, which has been integrated as a part of numerous TTA methods (Press et al., 2024; Wang et al., 2021; Niu et al., 2022; Wang et al., 2022b; Iwasawa & Matsuo, 2021; Yang et al., 2024; Chen et al., 2022). However, it has been observed that the performance of EM can be highly sub-optimal and unstable when encounter unreliable environments. To this end, previous works incorporate many strategies including i) Samples selection, which selectively filter out the high-entropy unreliable samples by manually setting an entropy threshold (Iwasawa & Matsuo, 2021; Niu et al., 2023). ii) Constrained optimization, which heuristically enforces that the updated parameters do not diverge too much during adaption. iii) Model recovery, which lively monitor the state of the adapting model and frequently reset it when detecting performance collapse (Niu et al., 2023; Wang et al., 2022b). Although these strategies have shown promising performance, the underlying issues of the EM are still largely unexplored. In contrast, this work aims to handle the inherent issues of EM learning objective and validate the necessity and effectiveness in TTA settings.
+
+Uncertainty quantification is one key aspect of the model reliability. With accurate uncertainty estimation ability, further processing can be taken to improve the performance of machine learning systems (e.g., human assistance) when the predictive uncertainty is high. This is especially useful in high-stake scenarios such as medical diagnosis (Wang et al., 2023). To obtain the uncertainty, Bayesian neural networks (BNNs) (Denker & LeCun, 1990; Mackay, 1992) have been proposed to replace the deterministic weight parameters of model with distribution. Unlike BNNs, ensemble-based methods obtain the uncertainty by training multiple models and ensembling them (Rahaman et al., 2021; Abe et al., 2022). In this paper, we focus on estimating and exploiting uncertainty under the theory of subjective logic (SL, (Jyang, 2018)). Unlike BNNs or ensemble, SL explicitly models the uncertainty in a single forward pass without modifying the training strategy or model architecture, which meets our expectation of computational effectiveness for TTA tasks.
+
+# 3 MOTIVATION
+
+We consider the fully test-time adaption setting in $K$ -classification task where $\mathcal{X}$ is the input space and $\mathcal{Y} = \{1,2,\dots,K\}$ denotes the target space. Given a classifier $f:\mathcal{X}\to \mathbb{R}^{K}$ parameterized by $\theta$ which has been pretrained on training distribution $P^{\mathrm{train}}$ , our goal is to boost $f$ by updating its parameters $\theta$ online on each batch of test data drawn from test distribution $P^{\mathrm{test}}$ . Note that in fully TTA setting, the training data $P^{\mathrm{train}}$ is unavailable and one can only tune $\theta$ on unlabeled test data. This is derived from realistic concerns of privacy, bandwidth or profit. Compared to other closely related setting, i.e., Source-Free Domain Adaptation (SFDA), TTA focuses on online adjusting during the testing while SFDA generally perform offline. That is, TTA method aims on (unsupervised) adaption online and the inference latency matters. Entropy minimization (EM) algorithm iteratively optimizes the model to minimize the predictive entropy on test sample $x$
+
+$$
+H (p (y | x)) = - \sum_ {k = 1} ^ {K} p (y = k | x) \log p (y = k | x), \tag {1}
+$$
+
+where $p(y|x)$ is the class distribution calculated by normalizing the output logits $f(x)$ with softmax function, i.e., $p(y = k|x) = \frac{\exp f_k(x)}{\sum\exp f(x)}$ . $H$ is the Shannon's entropy.
+
+Other learning objectives. Besides EM, there also exists several TTA methods which explore other unsupervised learning objectives. Notable examples include 1) Pseudo label (PL): $\mathcal{L}_{\mathrm{PL}} = -\mathbb{E}\log p(y = \hat{y} |x)$ which encourages the adapted model to fit the pseudo label $\hat{y}$ predicted by the pretrained model, 2) Module adjustment (T3A) which adjusts the parameters in the last fully connected layer, and can be viewed as an implicit way to minimize entropy (Iwasawa & Matsuo, 2021), 3) Energy minimization: $\mathcal{L}_{\mathrm{TEA}} = -\mathbb{E}\log \sum_{k=1}^{K}\exp f(x)$ which aims to minimize the free energy during adaption, and takes inspiration from energy model (Yige et al., 2024), 4) Contrastive learning objective: $\mathcal{L}_{\mathrm{infoNCE}} = -\log \frac{\exp\text{query·key}^+}{\sum\exp\text{query·key}}$ which strives to minimize the cosine distance between the query and positive samples ( $\text{key}^+$ ) while maximizing the cosine distances between query and negative samples (Chen et al., 2022), 5) The recent advanced FOA (Niu et al., 2024) which uses evolution strategy to minimize the test-training statistic discrepancy and model prediction entropy.
+
+The overconfident issue of EM. We begin by testing EM in standard TTA setting, and put forward the following observations to detail its unsatisfying performance.
+
+Figure 1: Empirical observations of Entropy Minimization when equipped to two representative TTA methods, i.e., the seminal Tent (Wang et al., 2021) and recent advanced SAR (Niu et al., 2023). Along the TTA process, the uncertainty of models tuned with EM quickly drops, and the false positive rate decreases temporarily for a very short time horizon before quickly increasing. Along the same adaption trajectory, the model accuracy also improves for a short time compared to the initial model and then quickly decreases, after which the model collapses to a trivial solution. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate. Besides, the model confidence of our COME is much more conservative, which implies fewer risks of overconfidence and a more accurate uncertainty awareness.
+
+No Adapt Tent SAR Tent+COME SAR+COME
+
+
+
+
+
+As shown in Figure 1, EM tends to overconfident prediction and assign extremely high probability to one certain class. The absolutely high confidence on all test samples is obviously a rather undesired characteristic. We test on ImageNet-C under snow corruption of severity level 5 as a typical showcase, and refer interested readers to Appendix C.11 for more similar results.
+
+# 4 METHODOLOGY
+
+We propose to conservatively minimize the entropy under uncertainty modeling, a simple alternative to EM algorithm. The key idea of COME is to quantify and then regularize the uncertainty during TTA without altering the model architecture or training strategy, which avoids the overconfident nature of EM at minimal cost. We first introduce uncertainty quantification by the subjective logic and then present how to regularize the uncertainty during TTA.
+
+# 4.1 MODELING UNCERTAINTY BY THE SUBJECTIVE LOGIC
+
+Given a well trained classifier $f: \mathcal{X} \to \mathcal{Y}$ , the most simple way to quantify the uncertainty of each sample is using the softmax probability as confidence in prediction. A few pioneer works propose to filter out the test samples with high-entropy predicted softmax probability for stable TTA (Niu et al., 2023; 2022). However, it has been shown that softmax probability often leads to overconfident predictions, even when the predictions are wrong or the inputs are abnormal outliers (Moon et al., 2020; Van Amersfoort et al., 2020). Thus this simple strategy may not be satisfied enough and highlights the necessity of better uncertainty modeling. To this end, we propose to obtain the uncertainty through subjective logic, which defines a framework for obtaining the probabilities (belief masses) of different classes and the overall uncertainty (uncertainty mass) based on the evidence1 collected from data. Specifically, in $K$ classification task, SL formalizes the belief assignments over a frame of discernment as a Dirichlet distribution. In contrast to softmax function that directly normalizes the logits $f(x)$ to model the class distribution $p(y|x)$ , SL considers the model output as evidence (denoted as $e$ ) to model a Dirichlet distribution which represents the density of all possible probability assignment $\mu = [p(y = 1|x), p(y = 2|x), \dots, p(y = K|x)]$ . That is, the predicted categoricals $\mu$ is also a random variable itself, which yields a Dirichlet distribution as follow
+
+$$
+p (\boldsymbol {\mu} | x) = \operatorname {D i r} (\boldsymbol {\mu} | \boldsymbol {\alpha}) = \frac {1}{B (\boldsymbol {\alpha})} \prod_ {k = 1} ^ {K} \mu_ {k} ^ {\alpha_ {k} - 1}, \boldsymbol {\alpha} = \boldsymbol {e} + 1, \tag {2}
+$$
+
+where $\mathrm{Dir}(\pmb{\mu}|\pmb{\alpha})$ is the Dirichlet distribution characterized by parameters $\pmb{\alpha}$ . The summation of all $\alpha_{k}\in \pmb{\alpha}$ is so called the strength $S$ of the Dirichlet distribution, i.e., $S = \sum_{k}\alpha_{k} = \sum_{k}e_{k} + 1$ . Then SL tries to assign a belief mass $b_{k}$ to each class label $k$ and an overall uncertainty mass $u$ to the whole frame based on the collected evidence as follow
+
+$$
+b _ {k} = \frac {e _ {k}}{S} = \frac {\alpha_ {k} - 1}{S} \text {a n d} u = \frac {K}{S}, \text {s u b j e c t t o} u + \sum_ {k = 1} ^ {K} b _ {k} = 1, \tag {3}
+$$
+
+where $S$ is the Dirichlet strength which denotes the total evidence we collected and $K$ is the total classes number. Eq. 3 actually describes the phenomenon where the more evidence observed for the $k$ -th category, the greater the belief mass assigned to the $k$ -th class. Correspondingly, the less total evidence $S$ observed, the greater the total uncertainty $u$ . Such assignment is so called the subjective opinion
+
+$$
+\mathcal {M} (x) = \left[ b _ {1}, b _ {2}, \dots , b _ {k}, u \right], \tag {4}
+$$
+
+which not only describes the belief of assigning $x$ to each class $k$ but also explicitly models the uncertainty due to lack-of-evidence. To ensure that $\alpha \geq 1$ which meets the requirements of valid parameters of a Dirichlet, we first deploy ReLU function on the logits and then use exponential output function for obtaining the parameters of Dirichlet distribution from the model output $f(x)$ (i.e., logits), where $\alpha = \exp(\mathrm{ReLU}(f(x)))$ and $e = \alpha - 1$ .
+
+Design choices of transformation function. By definitions, the parameters of a Dirichlet distribution $\alpha$ must be greater than 1 and the evidence $e$ should be non-negative. This can be achieved by applying ReLU activation function or exponential function to the output logits as suggested in
+
+previous works (Han et al., 2022; Malinin & Gales, 2018). Alternatively, we can get the evidence by $e = \mathrm{ReLU}(f(x))$ or $e = \exp f(x) - 1$ . In this paper, exponential function is chosen since we assume the model is pretrained with standard cross-entropy loss. Thus using exponential function to get the evidence can keep the training strategy unchanged. We refer interested readers to (Malinin & Gales, 2018) and Gal's PhD Thesis (Gal et al., 2016) for more detailed implementation instructions and math deviations.
+
+Benefits of modeling uncertainty based on subjective opinion for TTA. It has been widely recognized that using the softmax output as confidence often leads to overconfidence phenomenon (Guo et al., 2017; Hendrycks & Gimpel, 2017; Liu et al., 2020). Other advanced uncertainty measurement methods such as MC dropout (Gal & Ghahramani, 2016), Bayesian neural networks (Huang et al., 2022), deep ensemble (Lakshminarayanan et al., 2017; Rahaman et al., 2021), calibration (Guo et al., 2017; Han et al., 2024) usually require additional computations during inference or a separate validation set, which are not applicable in an unsupervised TTA task. By contrast, the introduced SL directly deduces an additional uncertainty mass through one single forward pass, which is model-agnostic, light-weight, and can be seamlessly integrated in standard pretrained classifier. We defer empirical comparisons between the proposed method and other Bayesian methods or learning objectives that originate from the adaption of the unsupervised domain to Table 10 in the Appendix.
+
+# 4.2 MODEL ADPTION BY SHARPENING THE OPINION
+
+Vanilla EM minimizes the softmax entropy of the predicted class distribution $p(y|x)$ , which inevitably results in assigning rather high probability to one certain class. In contrast, we propose the learning principle to minimize the entropy of opinion
+
+$$
+\underset {\theta} {\operatorname {m i n i m i z e}} H (\mathcal {M} (x)) = - \sum_ {k = 1} ^ {K} b _ {k} \log b _ {k} - u \log u. \tag {5}
+$$
+
+Compared to entropy minimization on softmax probability, which ultimately assigns all the probability to one certain class, the above learning principle offers the model with an additional option, i.e., express high overall uncertainty and reject to adapt when the observed total evidence is insufficient. In other words, by assigning all belief masses (probability) to uncertainty $u$ , the model can now express "I do not know" as its predicted opinion. Alternatively, an additional hyperparameter $\lambda$ can be introduced to weight the last term as $-\sum_{k=1}^{K} b_k \log b_k - \lambda u \log u$ . The magnitude reflects our confidence in whether the test sample should be adapted by the model or not. We validate the effectiveness of this generalization to Table 12 in the Appendix.
+
+# 4.3 REGULARIZING UNCERTAINTY IN AN UNSUPERVISED MANNER
+
+While subjective logic offers an opportunity to model uncertainty and reject to classify unreliable samples, naively minimizing the entropy of opinion for TTA may still be problematic. As shown in previous works, the model pretrained with softmax output function frequently suffers from overconfidence issue (Guo et al., 2017; Nguyen et al., 2015; Hendrycks et al., 2019). Therefore, the belief mass assigned to the one certain class $k$ by the pretrained model is usually much larger than the uncertainty mass $u$ . This results in the model tendency of increasing the belief mass during the entropy minimization process, while neglecting the uncertainty function $u$ . Motivated by the above analysis, our next goal is to devise an effective regularization strategy for the uncertainty mass. In supervised learning tasks, previous works leverage labeled training data to constrain the uncertainty mass (Sensoy et al., 2018; Malinin & Gales, 2018). However, these strategies is not applicable due to the unsupervised nature of TTA task where the training data is unavailable. This motivates us to explore the uncertainty information lies in the pretrained model itself for regularization without additional supervision. As one of the simplest yet effective design choices, we propose to constrain the uncertainty mass predicted by the adapted model not to diverge too far from the pretrained model. This results in the following constrained optimization objective
+
+$$
+\underset {\theta} {\text {m i n i m i z e}} H (\mathcal {M} (x)) \text {s u b j e c t t o} | u _ {\theta} (x) - u _ {\theta_ {0}} (x) | \leq \delta , \tag {6}
+$$
+
+where $\theta, \theta_0$ denote the adapted and pretrained model respectively, and $u$ is the uncertainty estimated by Eq. 3 and $\delta$ is a threshold to prevent overly extreme model uncertainty. The magnitude of $\delta$ represents our tolerance for uncertainty divergence.
+
+Rethink why we constrain on $|u(x) - u_0(x)| \leq \delta$ . The uncertainty estimated by pretrained model may not be ideal. However, since in fully TTA task, we can only access unlabeled test data coming online, and the inference efficiency matters. Thus traditional methods devised for handling overconfidence like calibration, assembling, and other Bayesian methods are not applicable. The only practically available choice is to explore the uncertainty information contained within the model itself. As shown in previous works (Sensoy et al., 2018; Malinin & Gales, 2018), while the softmax probability of pretrained model tend to be overconfident, subjective logic is much more reliable, which can support the proposed regularization. The most straightforward way to realize the aforementioned constraint is to storage the model before and after adaption and explicitly compare the uncertainty mass. However, this may violate the efficiency requirements of TTA. Thus considering the difficulty of constrained optimization in modern neural networks, our next target is to find a way to convert Eq. 6 into an unconstrained form. To this end, we introduce the following Lemma.
+
+Lemma 1. For any $x\in \mathcal{X}$ , we have
+
+$$
+\frac {K}{\left| \left| f (x) \right| \right| _ {p} + \log K} \leq u \leq \frac {K ^ {1 + 1 / p}}{\left| \left| f (x) \right| \right| _ {p}}, \tag {7}
+$$
+
+where $f(x)$ is the model output logits, $K$ is the total class number and $||\cdot||_p$ denotes the $p$ -norm.
+
+Lemma 1 shows that the uncertainty mass of subjective opinion is bounded by the norm of the total evidence collected from the model output. Thus instead of directly constraining on $u(x)$ , we can alternatively constrain on the $p$ -norm of model output logits, which is more flexible. Taking inspiration from previous work in supervised learning literature (Wei et al., 2022), this can be achieved by factorize $f(x)$ into $f(x) / \| f(x)\|_p \cdot \| f(x)\|_p$ and then enforcing the gradient on the second term to be equal to zero during optimization. Specifically, the final minimizing objective of COME is
+
+$$
+\underset {\theta} {\operatorname {m i n i m i z e}} H (\mathcal {M} (x)) \text {w h e r e} f (x) = \frac {f (x)}{\left\| f (x) \right\| _ {p}} \cdot \left\| f (x) \right\| _ {p} ^ {\text {n o} _ {-} \text {g r a d}} \cdot \tau , \tag {8}
+$$
+
+and $||f(x)||_p^{\mathrm{no\_grad}}$ is the $p$ -norm of $f(x)$ with zero gradient. This can be achieved by applying the detach operation which is a common used function in modern deep learning toolbox like PyTorch and TensorFlow. By doing so, minimizing the entropy of opinion would not influence $||f(x)||_p$ . $\tau$ is a hyper-parameter which controls the magnitude of recovered logits. Our COME can be implemented by modifying only a few lines of code in the original EM algorithm (shown as Algorithm 1).
+
+How to set $\tau$ and $p$ in practice? Noted that the tightness for the upper and lower bounds in Lemma 1 is determined by the choice of $p$ . The ratio between the upper and lower bound is minimized by $p = \infty$ . The strictness of such constraint should be selected per need by the user via trial and error: if users are extremely cautious about unreliable TTA, $p$ should be tuned up; otherwise, if a better performance is required. In our experiments, we choose $p = 2$ and $\tau = 1$ in accordance with Occam's Razor. Experiments on different hyperparameters can be found in Table 13 in the Appendix.
+
+Algorithm 1: Pseudo code of COME in a PyTorch-like style.
+```python
+# x: the output logits, model: the test model
+def entropy_of_opinion(x):
+ belief = exp(x) - 1 / sum(exp(x)) # belief mass
+ uncertainty = K / sum(exp(x)) # uncertainty mass
+ opinion = cat([belief, uncertainty]) # subjective opinion
+ return -sum(opinion * log(opinion)) # entropy of opinion
+for data in testloader: # load a minibatch data
+ x = model(data) # forward
+ x = x / norm(x, p=2) * norm(x, p=2).detach() # constraint in Eq.9
+ loss = entropy_of_opinion(x) # calculate loss
+ ... [backwards and update the parameters]
+```
+
+Stability of COME. We provide preliminary theoretical understanding of the superiority of COME. As we mentioned before, one notable limitation of EM is that it enforces low entropy for all test samples while ignores the instinct complexity of wild test data. Thus at the end of TTA progress, EM ultimately produces model that yields overconfident prediction. Our COME resolves this issue and
+
+introduces an upper bound for each test sample $x$ according to its trustworthiness. This property is formalized as follows
+
+Theorem 1 (Model confidence upper bound). For any $x \in \mathcal{X}$ , if $|u(x) - u_0(x)| \leq \delta$ holds, then we have
+
+$$
+\max _ {k} p (y = k | x) \leq \frac {1}{1 + (K - 1) \exp \left(- \frac {K}{u _ {0} - \delta}\right)}, \tag {9}
+$$
+
+where $\max_k p(y = k|x)$ is the model confidence (class probability assigned to the most likely class) and $K$ is the total class number. $u_0$ is the shorthand of $u_{\theta_0}(x)$ .
+
+From Theorem 1, we find that the model confidence in COME has a sample-wise upper bound according to $u_0(x)$ . In particular, it implies that the model confidence upper bound of the most likely class decreases according to $u_0(x)$ . For this reason, one can suspect that if the test model is uncertain about some sample $x$ (with a rather large $u_0$ ), it will be difficult to further increase the model confidence on such $x$ , which is a desirable property for TTA in the wild.
+
+# 5 EXPERIMENTS
+
+We conduct experiments on multiple datasets with distributional shift to answer the following questions. Q1. In the standard TTA setting, does the proposed method outperform other algorithms? Q2. How does COME perform in more realistic TTA settings, such as open-world TTA or lifelong TTA? Q3. Uncertainty quantification is both the motivation behind COME and the reason for its effectiveness, does our method achieve more reliable uncertainty estimation during TTA? Q4. Ablation study - what is the key factor of performance improvement in our method? Q5. Hyperparameters - how is the performance of our method under different parameters?
+
+# 5.1 SETUP
+
+Datasets. Following the common practice (Niu et al., 2022; 2023), we conduct experiments on standard covariate-shifted distribution datasets ImageNet-C (a large-scale benchmark with 15 types of diverse corruption), ImageNet-R and ImageNet-S. Besides, we also consider open-world test-time adaption setting, where the test data distribution $P^{\text{test}}$ is a mixture of both normal covariate-shifted data $P^{\text{Cov}}$ and abnormal outliers $P^{\text{Outlier}}$ of which the true labels do not belong to any known classes in $P^{\text{train}}$ . Following previous work in open-set OOD generalization literature (Lee et al., 2023; Bai et al., 2023; Baek et al., 2024), $P^{\text{Outlier}}$ is a suit of diverse datasets introduced by (Yang et al., 2022), including iNaturalist, Open-Image, NINCO and SSB-Hard. Compared methods. We compare our COME with a board line of test-time adaption methods, including both EM-based and non-EM based TTA methods. $\circ$ EM-based methods choose entropy minimization as their learning objective, including Tent (Wang et al., 2021), EATA (Niu et al., 2022), CoTTA (Wang et al., 2022b), MEMO (Zhang et al., 2022) and recent advanced SAR (Niu et al., 2023). $\circ$ Non-EM methods employ other learning objectives including Pseudo Label (PL), module adjustment (Iwasawa & Matsuo, 2021) (T3A) and energy minimization (Yige et al., 2024) (TEA). Following (Niu et al., 2023), we use the ViT-base architecture as our backbone and defer the results on ResNet50 to Table 17 in the Appendix. The test batch size is 64. When equipped to previous EM-based TTA baselines, we only replace the learning objective with our COME and keep all the other configures consistent to the official implementation. Tasks and Metrics. For classification performance comparison, we report the accuracy (Acc) on covariate-shifted data. Besides, for open-world TTA, we report the false positive rate (FPR). The mis-classified samples and outliers are considered as positive samples which should be of higher uncertainty compared to correct classification that is considered as negative. For all experiments, we run multiple times and report the average. Full results with standard deviation are deferred to the Appendix.
+
+# 5.2 EXPERIMENTAL RESULTS
+
+Performance comparison in standard TTA settings (Q1). As shown in Table 1, our COME establishes strong overall performance in terms of both classification accuracy. We highlight a few essential observations. Compared to EM learning principle, our COME consistently outperforms it when equipped to the same baseline methods, including Tent (Wang et al., 2021), EATA (Niu
+
+et al., 2022), CoTTA (Wang et al., 2022b) and SAR (Niu et al., 2023). As an example of our method's improved performance, when equipped to the recent SAR, our method yields an accuracy of $64.2\%$ , which outperforms the original implementation based on EM of $10.1\%$ . Besides, we also compare to Non-EM TTA methods, including TEA, T3A and PL. These methods do not rely on EM learning objective, yet are less effective than EM in terms of classification performance. For a more comprehensive evaluation, we conduct additional experiments on ImageNet-R and ImageNet-S, the results can be found in Table 2.
+
+Table 1: Classification accuracy comparison on ImageNet-C (level 5). Substantial $(\geq 0.5)$ improvement and degradation compared to the baseline are highlighted in blue or brown respectively. The detailed results with standard deviation are defer to Table 8 in Appendix C.1.
+
+
Methods
COME
Noise
Blur
Weather
Digital
Gauss.
Shot
Impul.
Defoc
Glass
Motion
Zoom
Snow
Frost
Fog
Brit.
Contr.
Elast.
Pixel
JPEG
No Adapt
X
35.1
32.2
35.9
31.4
25.3
39.4
31.6
24.5
30.1
54.7
64.5
49.0
34.2
53.2
56.5
PL
X
49.9
48.8
50.9
48.5
41.2
52.7
42.7
24.6
42.5
63.6
73.1
65.3
44.1
63.9
62.6
T3A
X
34.6
31.5
35.5
32.7
27.5
40.7
33.5
25.6
30.8
56.5
64.9
50.8
38.0
54.3
58.4
TEA
X
44.5
39.3
45.8
37.6
35.4
46.4
31.4
8.9
46.4
60.1
72.5
59.5
45.7
62.3
58.9
LAME
X
34.8
31.9
35.5
30.9
24.4
38.9
30.7
23.4
29.5
53.3
64.2
41.0
32.7
52.8
56.0
FOA
X
46.6
43.9
48.3
47.1
40.7
49.3
43.7
53.8
52.8
64.2
76.2
63.8
48.5
62.1
64.0
Tent
X
52.5
52.1
53.4
52.8
47.4
56.7
47.4
10.5
26.4
67.2
74.3
67.3
50.4
66.5
64.6
✓
53.9
53.9
55.2
55.8
51.8
59.8
52.6
58.4
61.3
71.3
78.2
68.8
57.9
70.5
68.2
Improve
△1.4
△1.9
△1.8
△2.9
△4.4
△3.2
△5.2
△47.9
△34.9
△4.1
△3.9
△1.5
△7.6
△4.0
△3.6
EATA
X
56.0
56.1
57.1
54.5
54.8
59.6
58.7
61.8
60.1
71.4
75.3
68.5
62.7
69.0
66.5
✓
56.1
56.5
57.2
58.0
57.9
62.6
59.3
65.6
63.5
72.6
78.0
69.5
66.6
72.5
70.5
Improve
△0.1
△0.3
△0.1
△3.4
△3.1
△3.1
△0.6
△3.9
△3.4
△1.3
△2.7
△1.0
△3.9
△3.5
△4.0
SAR
X
51.9
51.7
52.8
51.5
48.9
55.5
49.5
22.2
46.9
66.2
72.9
65.8
50.9
64.0
62.8
✓
56.4
56.6
57.4
58.3
56.9
62.9
58.3
65.3
64.5
72.7
78.5
69.6
64.0
71.9
69.7
Improve
△4.5
△4.9
△4.6
△6.8
△8.1
△7.4
△8.8
△43.1
△17.5
△6.5
△5.5
△3.8
△13.2
△7.9
△6.9
CoTTA
X
40.3
37.6
41.7
34.3
28.3
44.0
35.6
38.0
43.0
58.8
70.3
58.4
39.8
58.1
59.9
✓
43.5
40.9
45.5
36.9
29.7
48.1
37.8
40.7
42.0
62.3
73.6
58.9
42.8
63.5
63.8
Improve
△3.1
△3.4
△3.8
△2.6
△1.4
△4.0
△2.2
△2.7
△1.0
△3.5
△3.3
△0.5
△3.0
△5.4
△3.9
MEMO
X
39.7
36.5
39.8
32.4
25.8
40.3
34.7
27.5
32.8
53.5
66.2
56.0
35.7
55.9
58.2
✓
40.6
37.5
40.6
33.4
26.7
41.2
35.4
28.7
33.7
54.7
67.1
55.9
36.6
57.2
59.3
Improve
△0.8
△1.0
△0.8
△1.0
△0.9
△1.0
△0.7
△1.2
△0.9
△1.2
△0.8
△0.1
△0.9
△1.3
△1.1
+
+Table 2: Additional results on ImageNet-R and ImageNet-S.
+
+
Dataset
COME
Tent
EATA
SAR
COTTA
ImageNet-R
X
37.73 ± 0.03
36.11 ± 0.12
51.90 ± 0.35
36.04 ± 0.06
✓
39.05 ± 0.05
38.22 ± 0.23
56.40 ± 0.18
37.39 ± 0.08
ImageNet-S
X
31.63 ± 0.07
36.11 ± 0.19
33.92 ± 0.69
30.84 ± 0.35
✓
39.22 ± 0.04
39.22 ± 0.32
43.52 ± 0.52
33.82 ± 0.73
+
+Performance comparison in open-world and lifelong TTA settings (Q2). In Table 3 and 4, we present the results under open-world and lifelong TTA settings respectively. In open-world TTA, the test data distribution is a mixture of both normal covariate-shifted data and abnormal outliers. The mixture ratio of $P^{\mathrm{Cov}}$ and $P^{\mathrm{Outlier}}$ is 0.5 following previous work (Bai et al., 2023), i.e., $P^{\mathrm{test}} = 0.5P^{\mathrm{Cov}} + 0.5P^{\mathrm{Outlier}}$ . Such outliers arise from unknown classes that are not present in training data, which should not be of high uncertainty for model trustworthiness. According to the experimental results, it is observed that our COME can consistently improve the performance of existing TTA methods.
+
+Reliability of uncertainty estimation (Q3). We visualize the distribution of model confidence, i.e., the maximum predicted class probability $^2$ in open-world TTA setting, where the covariate-shifted samples is ImageNet-C (Gaussian noise level 3), and outliers are NINCO. As shown in Figure 2, the model confidence of our COME can effectively perceive incorrect predictions, which establishes an distinguishable margin. In contrast to the model confidence of EM which is almost identical and nearly $100\%$ for all test samples, the model confidence of our method can provide more meaningful information with which to differentiate correct and wrong predictions.
+
+Table 3: Classification and uncertainty estimation comparisons under open-world TTA settings, where $P^{\text{test}}$ is a mixture of both covariate-shifted samples (Gaussian noise of severity level 3) and a suit of diverse abnormal outliers. Additional results with standard deviation are in Appendix C.2.
+
+
None
NINCO
iNaturist
SSB-Hard
Texture
Places
Method
COME
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
No Adapt
X
64.4
63.7
64.5
69.9
64.4
69.5
64.4
72.5
64.8
65.6
64.3
56.8
PL
X
69.1
62.8
65.6
71.6
68.8
69.5
68.4
75.9
66.1
66.0
66.6
59.7
T3A
X
64.4
71.2
64.3
70.0
64.2
75.0
63.7
80.7
64.4
69.0
63.8
69.5
TEA
X
63.9
63.8
60.5
72.5
62.3
74.6
63.3
79.4
61.0
67.8
61.9
64.5
LAME
X
64.1
64.4
64.1
72.3
64.1
72.4
64.2
74.0
64.7
68.8
64.0
61.3
FOA
X
67.8
61.2
66.4
70.5
67.4
66.1
67.1
75.6
65.8
61.4
66.6
54.1
Tent
X
70.8
63.2
66.2
71.9
69.9
70.7
69.8
77.4
66.4
66.5
68.3
59.9
✓
72.6
64.7
68.9
64.3
72.5
63.7
72.7
70.7
68.4
60.4
70.7
45.9
Improve
△1.7
△1.6
△2.7
△7.6
△2.6
△7.0
△2.9
△6.7
△2.1
△6.1
△2.4
△14.0
EATA
X
70.3
63.7
66.4
68.6
70.3
71.5
70.0
77.4
67.3
67.1
68.8
61.9
✓
73.4
62.7
70.1
60.5
73.2
63.3
73.0
70.5
70.5
55.8
72.3
45.6
Improve
△3.1
△1.0
△3.7
△8.2
△2.9
△8.2
△3.0
△6.9
△3.2
△11.3
△3.6
△16.3
SAR
X
69.7
62.3
64.9
71.4
66.9
70.9
67.7
78.1
64.4
64.5
66.1
58.6
✓
73.1
62.9
69.8
66.3
73.2
65.2
73.5
71.8
69.5
59.4
72.3
49.8
Improve
△3.5
△0.6
△4.9
△5.1
△6.3
△5.6
△5.9
△6.3
△5.1
△5.1
△6.3
△8.8
CoTTA
X
67.6
63.4
65.3
69.7
70.4
69.5
70.3
76.0
65.8
66.2
66.6
59.2
✓
70.5
62.5
66.2
68.8
72.4
73.5
72.2
78.7
66.5
64.7
68.9
55.0
Improve
△2.9
△0.9
△0.9
△0.9
△2.0
△4.0
△2.0
△2.7
△0.7
△1.5
△2.3
△4.2
MEMO
X
64.8
69.8
64.8
77.5
64.7
71.9
64.8
77.3
65.0
79.3
64.6
71.5
✓
65.2
67.8
65.9
76.4
65.2
70.8
65.3
75.0
65.4
76.7
65.3
67.6
Improve
△0.5
△1.9
△1.1
△1.1
△0.5
△1.1
△0.5
△2.3
△0.4
△2.6
△0.7
△3.9
+
+Table 4: Classification and uncertainty estimation comparisons under lifelong TTA settings. The model is online adapted and the parameters will never be reset, yet the test input distribution might exhibit a continual shift over time.
+
+
Methods
COME
Noise
Blur
Weather
Digital
Gauss.
Shot
Impul.
Defoc
Glass
Motion
Zoom
Snow
Frost
Fog
Brit.
Contr.
Elast.
Pixel
JPEG
No Adapt
X
35.1
32.2
35.9
31.4
25.3
39.4
31.6
24.5
30.1
54.7
64.5
49.0
34.2
53.2
56.5
PL
X
49.9
53.4
56.7
46.7
46.1
56.6
51.4
52.6
60.2
68.1
77.7
64.5
51.0
69.0
68.8
FOA
X
46.5
47.0
51.1
44.8
45.5
52.3
48.1
49.7
57.9
68.0
76.4
63.6
51.7
62.2
65.3
Tent
X
52.4
56.2
58.7
50.9
51.1
57.7
52.7
54.7
60.5
68.4
77.3
64.6
53.8
69.3
68.6
✓
54.7
59.0
60.3
51.2
53.7
60.6
57.4
64.1
65.8
71.0
78.6
66.9
62.7
71.8
70.5
Improve
△2.3
△2.8
△1.6
△0.4
△2.6
△2.9
△4.7
△9.5
△5.3
△2.6
△1.3
△2.3
△9.0
△2.5
△1.9
EATA
X
55.9
59.5
60.9
56.2
59.2
63.0
61.6
65.7
67.5
72.5
78.6
66.8
67.1
72.2
71.7
✓
57.9
60.6
61.5
57.0
59.8
63.7
62.3
67.2
68.3
73.7
78.8
69.7
68.6
73.1
71.8
Improve
△2.0
△1.0
△0.6
△0.8
△0.6
△0.8
△0.7
△1.5
△0.8
△1.2
△0.3
△2.9
△1.4
△0.9
△0.1
SAR
X
52.0
54.8
56.2
50.2
52.3
56.1
52.8
50.8
26.5
0.1
3.1
0.1
0.1
0.1
0.3
✓
56.0
60.0
61.1
56.4
58.1
62.9
60.4
66.1
67.4
72.2
78.7
68.0
66.0
72.6
70.9
Improve
△4.0
△5.3
△4.9
△6.2
△5.8
△6.8
△7.6
△15.3
△41.0
△72.1
△75.6
△67.9
△65.9
△72.5
△70.6
CoTTA
X
40.3
49.2
57.1
39.8
50.4
55.6
48.3
53.1
61.3
63.9
73.3
62.0
56.5
67.5
66.7
✓
49.7
61.7
64.2
45.7
57.0
59.0
51.1
58.2
63.1
66.0
73.4
62.9
58.0
68.9
68.2
Improve
△9.4
△12.4
△7.1
△5.9
△6.6
△3.4
△2.8
△5.1
△1.8
△2.1
△0.1
△1.0
△1.5
△1.3
△1.5
+
+Ablation study (Q4). We conduct the ablation study on different components in our COME, i.e., with and without the uncertainty constraint in Eq. 6. The experimental results are shown in Table 5, where SL indicates minimizing entropy of the subjective logic opinion and UC means the uncertainty constraint described by Eq. 6. Compared with non-constrained optimization, naively minimizing the entropy of subjective opinion can only slightly improve uncertainty estimation performance. Combining with the uncertainty constraint, the average and worst-case accuracy can be both substantially improved, which indicates the optimal design of our COME.
+
+Influence of different hyper-parameters (Q5). We conduct additional experiments to investigate the influence of different hyperparameters. The results are in Table 12 and Table 13. Our COME generally outperforms EM with moderate hyperparameters. For $\tau$ , as we mentioned before, it actually controls the magnitude of uncertainty mass. If we have some prior knowledge that most test samples
+
+
+Figure 2: Distribution of model confidence.
+
+
SL
UC
Acc↑
FPR↓
Mean
Worst
Mean
Worst
X
X
52.8
10.6
70.2
95.3
✓
X
52.7
10.4
70.0
94.9
X
✓
60.9
25.5
68.0
93.0
✓
✓
61.2
51.7
67.3
71.4
+
+Table 5: Ablation study.
+
+should be rejected to adapt during TTA, we should choose a relatively small $\tau$ and making the model confidence more conservative in this circumstance. As for $\delta$ (or $p$ ) which represents the tolerance of uncertainty divergence, it should be selected per need by the user via trial and error: if users are extremely cautious about unreliable TTA, $\delta$ should be tuned down and $p$ should be tuned up; otherwise, if a better performance is required. Besides, we introduce an additional hyperparameter $\lambda$ to the learning objective. The experiments results in Table 12 shows that an additional performance improvement can be observed when $\lambda \in [1,100]$ .
+
+Table 6: Additional results with different $\lambda$ . We report the accuracy when our COME is equipped to Tent on ImageNet-C Gaussian noise level 5 with different $\lambda$ . The accuracy of the original Tent using entropy minimization is 52.6.
+
+
λ
0.10
1.00
10.0
30.0
50.0
80.0
100
150
Acc.
53.7±0.1
53.9±0.0
54.6±0.1
55.3±0.1
55.8±0.1
56.2±0.1
56.1±0.1
10.6±0.3
+
+Table 7: Additional results with different hyperparameters. We report the accuracy on ImageNet-C Gaussian noise level 5 with different hyperparameters. We implement our COME with Tent. The accuracy of the original Tent using entropy minimization is 52.6.
+
+
p=1
p=2
p=3
p=∞
τ=0.5
37.8±0.0
38.5±0.0
39.1±0.0
41.1±0.0
τ=1.0
53.5±0.0
53.8±0.1
53.2±0.0
47.2±0.1
τ=1.2
54.7±0.0
54.7±0.1
54.0±0.1
48.9±0.0
τ=1.5
54.2±0.2
54.2±0.1
53.2±0.1
49.1±0.1
+
+# 6 CONCLUSION
+
+In this paper, we propose a novel learning principle called COME to improve existing TTA methods. COME explicitly models the uncertainty raising upon unreliable test samples using the theory of evidence, and then regularizes the model to favor of conservative prediction confidence during inference time. Our method takes inspiration from Bayesian framework, and consistently outperforms previous EM-based TTA methods on commonly-used benchmarks. The simplicity of the uncertainty regularization used in our implementation is both an advantage and a limitation. On the one hand, constraining the uncertainty mass close to the pretrain model is easy-to-deployed and meets the efficiency requirement of TTA. On the other hand, this regularization may be less effective when the pretrained model is also overconfident. We identify this as a limitation of our work. Exploring more effective regularization techniques for better trade-off between the practical requirements of TTA and accurate uncertainty estimation can be a promising future direction. Besides, vision foundation models such as DINOv2 are more promising to fill domain gaps. The representation learned by these foundation models are naturally expected to be much more robust than ImageNet pretrained ResNet and ViT models we used in this manuscript. Investigating TTA techniques for more advanced vision foundation models are also a promising research direction.
+
+# 7 ACKNOWLEDGMENT
+
+This work was supported by the National Natural Science Foundation of China (62376193 and 61925602). The authors thank ICLR anonymous peer reviewers for their helpful suggestions.
+
+# REFERENCES
+
+Taiga Abe, Estefany Kelly Buchanan, Geoff Pleiss, Richard Zemel, and John P Cunningham. Deep ensembles work, but are they necessary? Advances in Neural Information Processing Systems, 35: 33646-33660, 2022.
+Eunsu Baek, Keondo Park, Jiyoon Kim, and Hyung-Sin Kim. Unexplored faces of robustness and out-of-distribution: Covariate shifts in environment and sensor domains. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22294-22303, 2024.
+Haoyue Bai, Gregory Canal, Xuefeng Du, Jeongyeol Kwon, Robert D Nowak, and Yixuan Li. Feed two birds with one scone: Exploiting wild data for both out-of-distribution generalization and detection. In International Conference on Machine Learning, 2023.
+Julian Bitterwolf, Maximilian Mueller, and Matthias Hein. In or out? fixing imagenet out-of-distribution detection evaluation. In International Conference on Machine Learning, 2023.
+Malik Boudiaf, Romain Mueller, Ismail Ben Ayed, and Luca Bertinetto. Parameter-free online test-time adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 8344-8353, June 2022.
+Dian Chen, Dequan Wang, Trevor Darrell, and Sayna Ebrahimi. Contrastive test-time adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 295-305, 2022.
+Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2014.
+John Denker and Yann LeCun. Transforming neural-net output levels to probability distributions. Advances in neural information processing systems, 3, 1990.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. ICLR, 2021.
+Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050-1059. PMLR, 2016.
+Yarin Gal et al. Uncertainty in deep learning. 2016.
+Zhengqing Gao, Xu-Yao Zhang, and Cheng-Lin Liu. Unified entropy optimization for open-set test-time adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 23975-23984, 2024.
+Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International conference on machine learning, pp. 1321-1330. PMLR, 2017.
+Zongbo Han, Changqing Zhang, Huazhu Fu, and Joey Tianyi Zhou. Trusted multi-view classification with dynamic evidential fusion. IEEE transactions on pattern analysis and machine intelligence, 45(2):2551-2566, 2022.
+Zongbo Han, Yifeng Yang, Changqing Zhang, Linjun Zhang, Joey Tianyi Zhou, Qinghua Hu, and Huaxiu Yao. Selective learning: Towards robust calibration with dynamic regularization. arXiv preprint arXiv:2402.08384, 2024.
+
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2016.
+Dan Hendrycks and Thomas G Dietterich. Benchmarking neural network robustness to common corruptions and surface variations. International Conference on Learning Representations, 2019.
+Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. International Conference on Learning Representations, 2017.
+Dan Hendrycks, Mantas Mazeika, and Thomas Dietterich. Deep anomaly detection with outlier exposure. International Conference on Learning Representations, 2019.
+Dan Hendrycks, Norman Mu, Ekin D. Cubuk, Barret Zoph, Justin Gilmer, and Balaji Lakshminarayanan. AugMix: A simple data processing method to improve robustness and uncertainty. Proceedings of the International Conference on Learning Representations (ICLR), 2020.
+Hengguan Huang, Xiangming Gu, Hao Wang, Chang Xiao, Hongfu Liu, and Ye Wang. Extrapolative continuous-time bayesian neural network for fast training-free test-time adaptation. Advances in Neural Information Processing Systems, 35:36000-36013, 2022.
+Yusuke Iwasawa and Yutaka Matsuo. Test-time classifier adjustment module for model-agnostic domain generalization. Advances in Neural Information Processing Systems, 34:2427-2440, 2021.
+Audun Tsang. Subjective Logic: A formalism for reasoning under uncertainty. Springer Publishing Company, Incorporated, 2018.
+Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems, 30, 2017.
+Jungsoo Lee, Debasmit Das, Jaegul Choo, and Sungha Choi. Towards open-set test-time adaptation utilizing the wisdom of crowds in entropy minimization. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 16380-16389, 2023.
+Jian Liang, Lijun Sheng, Zhengbo Wang, Ran He, and Tieniu Tan. Realistic unsupervised clip finetuning with universal entropy optimization. In *Forty-first International Conference on Machine Learning*.
+Jian Liang, Dapeng Hu, and Jiashi Feng. Do we really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. In International conference on machine learning, pp. 6028-6039. PMLR, 2020.
+Weitang Liu, Xiaoyun Wang, John Owens, and Yixuan Li. Energy-based out-of-distribution detection. Advances in neural information processing systems, 2020.
+David John Cameron Mackay. Bayesian methods for adaptive models. California Institute of Technology, 1992.
+Andrey Malinin and Mark Gales. Predictive uncertainty estimation via prior networks. Advances in neural information processing systems, 31, 2018.
+Jooyoung Moon, Jihyo Kim, Younghak Shin, and Sangheum Hwang. Confidence-aware learning for deep neural networks. In international conference on machine learning, pp. 7034-7044. PMLR, 2020.
+Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2015.
+Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In International conference on machine learning, pp. 16888-16905. PMLR, 2022.
+
+Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Zhiquan Wen, Yaofo Chen, Peilin Zhao, and Mingkui Tan. Towards stable test-time adaptation in dynamic wild world. arXiv preprint arXiv:2302.12400, 2023.
+Shuaicheng Niu, Chunyan Miao, Guohao Chen, Pengcheng Wu, and Peilin Zhao. Test-time model adaptation with only forward passes. International conference on machine learning, 2024.
+Ori Press, Ravid Shwartz-Ziv, Yann LeCun, and Matthias Bethge. The entropy enigma: Success and failure of entropy minimization. arXiv preprint arXiv:2405.05012, 2024.
+Rahul Rahaman et al. Uncertainty quantification and deep ensembles. Advances in neural information processing systems, 34:20063-20075, 2021.
+Murat Sensoy, Lance Kaplan, and Melih Kandemir. Evidential deep learning to quantify classification uncertainty. Advances in neural information processing systems, 31, 2018.
+Joost Van Amersfoort, Lewis Smith, Yee Whye Teh, and Yarin Gal. Uncertainty estimation using a single deep deterministic neural network. In International conference on machine learning, pp. 9690-9700. PMLR, 2020.
+Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongie. The inaturalist species classification and detection dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2018.
+Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need? International Conference on Learning Representations, 2022.
+Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. International Conference on Learning Representations, 2021.
+Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang. Vim: Out-of-distribution with virtual-logit matching. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4921-4930, 2022a.
+Meng Wang, Tian Lin, Lianyu Wang, Aidi Lin, Ke Zou, Xinxing Xu, Yi Zhou, Yuanyuan Peng, Qingquan Meng, Yiming Qian, et al. Uncertainty-inspired open set learning for retinal anomaly identification. Nature Communications, 14(1):6757, 2023.
+Qin Wang, Olga Fink, Luc Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 7201-7211, 2022b.
+Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In International conference on machine learning, pp. 23631-23644. PMLR, 2022.
+Jingkang Yang, Pengyun Wang, Dejian Zou, Zitang Zhou, Kunyuan Ding, Wenxuan Peng, Haoqi Wang, Guangyao Chen, Bo Li, Yiyou Sun, et al. Openood: Benchmarking generalized out-of-distribution detection. Advances in Neural Information Processing Systems, 35:32598-32611, 2022.
+Mouxing Yang, Yunfan Li, Changqing Zhang, Peng Hu, and Xi Peng. Test-time adaptation against multi-modal reliability bias. In The Twelfth International Conference on Learning Representations, 2024.
+Yuan Yige, Xu Bingbing, Hou Liang, Sun Fei, Shen Huawei, and Cheng Xueqi. Tea: Test-time energy adaptation. In IEEE/CVF Computer Vision and Pattern Recognition Conference, 2024.
+Jingyang Zhang, Jingkang Yang, Pengyun Wang, Haoqi Wang, Yueqian Lin, Haoran Zhang, Yiyou Sun, Xuefeng Du, Kaiyang Zhou, Wayne Zhang, Yixuan Li, Ziwei Liu, Yiran Chen, and Hai Li. Openood v1.5: Enhanced benchmark for out-of-distribution detection. arXiv preprint arXiv:2306.09301, 2023.
+
+Marvin Zhang, Sergey Levine, and Chelsea Finn. Memo: Test time robustness via adaptation and augmentation. Advances in neural information processing systems, 35:38629-38642, 2022.
+Aurick Zhou and Sergey Levine. Bayesian adaptation for covariate shift. Advances in neural information processing systems, 34:914-927, 2021.
+
+# APPENDICES
+
+A Proofs 15
+
+B Experimental details 17
+
+B.1 Datasets 17
+B.2 Implementation details 17
+
+C Additional results 18
+
+C.1 Full results of accuracy with standard deviation (supplementary to Table 1) 18
+C.2 Full results of open-world TTA (supplementary to Table 3) 19
+C.3 Comparison with source-free domain adaption 19
+C.4 Comparison with other other Bayesian methods 20
+C.5 Influence of different hyperparameters 20
+C.6 Comparison on ImageNet-R and ImageNet-S 20
+C.7 In-Distribution performance 21
+C.8 Comparison on ResNet-50 21
+C.9 Time-consuming comparison 21
+C.10 Mixed distributional shifts performance. 21
+C.11 More visualization results (supplementary to Figure 1) 21
+
+D Discussion 27
+
+D.1 Alternative Design Choice 27
+D.2 Limitations and Future work 30
+
+# A PROOFS
+
+To proof Lemma 1 and Theorem 1, we need the following lemma firstly.
+
+Lemma 2. Let $p, q$ be two real numbers. Assuming that $p \leq q$ , then the $p$ -norm (also called $\ell^p$ -norm) and $q$ -norm of vector $x = (x_1, \dots, x_n)$ satisfied
+
+$$
+\left\| x \right\| _ {p} \leq n ^ {\left(1 / q - 1 / p\right)} \| x \| _ {q}. \tag {10}
+$$
+
+where $n$ is the length of the vector.
+
+Proof. Recall Hölder's inequality
+
+$$
+\sum_ {i = 1} ^ {n} \left| a _ {i} \right| \left| b _ {i} \right| \leq \left(\sum_ {i = 1} ^ {n} \left| a _ {i} \right| ^ {r}\right) ^ {1 / r} \left(\sum_ {i = 1} ^ {n} \left| b _ {i} \right| ^ {\frac {r}{r - 1}}\right) ^ {1 - \frac {1}{r}}. \tag {11}
+$$
+
+Apply this inequality to the case that $|a_i| = |x_i|^p$ , $|b_i| = 1$ and $r = q / p \geq 1$ , we can derive to
+
+$$
+\sum_ {i = 1} ^ {n} \left| a _ {i} \right| \left| b _ {i} \right| \leq \left(\sum_ {i = 1} ^ {n} \left(\left(x _ {i}\right) ^ {p}\right) ^ {\frac {q}{p}}\right) ^ {\frac {p}{q}} \left(\sum_ {i = 1} ^ {n} 1 ^ {\frac {q}{q - p}}\right) ^ {1 - \frac {p}{q}} = \left(\sum_ {i = 1} ^ {n} \left| x _ {i} \right| ^ {q}\right) ^ {\frac {p}{q}} n ^ {1 - \frac {p}{q}}. \tag {12}
+$$
+
+Then we have
+
+$$
+\begin{array}{l} | | x | | _ {p} = \left(\sum_ {i = 1} ^ {n} | x _ {i} | _ {p}\right) ^ {1 / p} \\ \leq \left(\left(\sum_ {i = 1} ^ {n} \left| x _ {i} \right| ^ {q}\right) ^ {\frac {p}{q}} n ^ {1 - \frac {p}{q}}\right) ^ {1 / p} \tag {13} \\ = \left(\sum_ {i = 1} ^ {n} | x _ {i} | ^ {q}\right) ^ {\frac {1}{q}} n ^ {\frac {1}{p} - \frac {1}{q}} \\ = n ^ {1 / p - 1 / q} | | x | | _ {q} \\ \end{array}
+$$
+
+
+
+Now we proceed to proof our main results.
+
+Proof. Proof of Lemma 1. Let $f_{\max} = \max_i f_i(x)$ , then we have
+
+$$
+\exp \left(f _ {\max }\right) \leq \sum_ {i = 1} ^ {K} \exp \left(f _ {i}\right) \leq K \exp \left(f _ {\max }\right), \tag {14}
+$$
+
+Applying the logarithm to the inequality, then
+
+$$
+f _ {\max } \leq \operatorname {L S E} (f) \leq f _ {\max } + \log K, \tag {15}
+$$
+
+where LSE is the shorthand of LogSumExp function, i.e., $\mathrm{LSE}(x) \coloneqq \log \sum_{i=1}^{K} \exp x_i$ .
+
+Since we assume that all the elements in logits $x$ are all positive, then $f_{\max} = ||f||_{\infty}$ . Thus combining with Lemma 1 we can derive that
+
+$$
+K ^ {- 1 / p} \| f \| _ {p} \leq \operatorname {L S E} (x) \leq \| f \| _ {p} + \log K, \tag {16}
+$$
+
+Noted that $u = K / \mathrm{LSE}(f)$ , then we have
+
+$$
+\frac {K}{\left| \left| f \right| \right| _ {p} + \log K} \leq u \leq \frac {K ^ {1 + 1 / p}}{\left| \left| f \right| \right| _ {p}}. \tag {17}
+$$
+
+
+
+Proof. Proof of Theorem 1. Assuming that the uncertainty mass $u$ is constrained as
+
+$$
+u _ {0} - \delta \leq u \leq u _ {0} + \delta , \tag {18}
+$$
+
+then the LSE function of model output is also bounded by
+
+$$
+\frac {K}{u _ {0} + \delta} \leq \operatorname {L S E} (f (x)) \leq \frac {K}{u _ {0} - \delta}. \tag {19}
+$$
+
+Noted that
+
+$$
+\max f (x) \leq \operatorname {L S E} (f (x)), \tag {20}
+$$
+
+and thus
+
+$$
+\max f (x) \leq \frac {K}{u _ {0} - \delta}. \tag {21}
+$$
+
+According to Eq. 5, the model confidence is calculated by
+
+$$
+\max _ {k} \mu_ {k} (x) = \frac {\alpha_ {k}}{S} = \frac {\exp f _ {\operatorname* {m a x}}}{\sum_ {i = 1} ^ {K} \exp f _ {i}}, \tag {22}
+$$
+
+where $\alpha_{i} = \exp f_{i}(x)$
+
+Assuming the $f_{j}$ is the largest element in $f(x)$ , then
+
+$$
+\begin{array}{l} \max _ {k} \mu_ {k} (x) = \frac {1}{1 + \sum_ {i = 1 , i \neq j} ^ {K} \exp \left(f _ {i} - f _ {\max }\right)} \\ \leq \frac {1}{1 + (K - 1) \exp \left(f _ {\min } - f _ {\max }\right)} \tag {23} \\ \leq \frac {1}{1 + (K - 1) \exp \left(- \frac {K}{u _ {0} - \delta}\right)} \\ \end{array}
+$$
+
+
+
+# B EXPERIMENTAL DETAILS
+
+# B.1 DATASETS
+
+Covariate-shifted OOD generalization datasets. We conduct experiments on ImageNet-C (Hendrycks & Dietterich, 2019), which consists of 15 types of algorithmically generated corruptions from noise, blur, weather, and digital categories. Each type of corruption has 5 levels of severity, resulting in 75 distinct corruptions. Besides, we conduct additional experiments on ImageNet-R and ImageNet-S.
+
+Abnormal outliers for open-world TTA experiments. We follow the settings of (Zhang et al., 2023), where OpenImage-O (Wang et al., 2022a), SSB-hard (Vaze et al., 2022), Textures (Cimpoi et al., 2014), iNaturalist (Van Horn et al., 2018) and NINCO (Bitterwolf et al., 2023) are selected as outliers for ImageNet. $\circ$ OpenImage-O contains 17632 manually filtered images and is $7.8\times$ larger than the ImageNet dataset. $\circ$ SSB-hard is selected from ImageNet-21K. It consists of 49K images and 980 categories. $\circ$ Textures (Describable Textures Dataset, DTD) consists of 5,640 images depicting natural textures. $\circ$ iNaturalist consists of 859000 images from over 5000 different species of plants and animals. $\circ$ NINCO consists with a total of 5879 samples of 64 classes which are non-overlapped with ImageNet-C. These datasets are also used in previous open-set OOD generalization works (Gao et al., 2024; Bai et al., 2023; Liang et al.; Lee et al., 2023).
+
+# B.2 IMPLEMENTATION DETAILS
+
+Pretrained models. The pretrained ViT model is ViT-Base (Dosovitskiy et al., 2021). The model is trained on the source ImageNet-1K training set and the model weights3 are directly obtained from timm repository. Specifically, the pretrained ResNet model in C.8 is ResNet-50-BN (He et al., 2016). The model is trained on the source ImageNet-1K training set and the model weights4 are directly obtained from torchvision library.
+
+TEA $^{5}$ (Yige et al., 2024) We follow all hyperparameters that are set in TEA unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.
+
+$\mathbf{T3A^6}$ (Iwasawa & Matsuo, 2021) We follow all hyperparameters that are set in T3A unless it does not provide. Specifically, the batch size is set to 64. The number of supports to restore M is set to 20 for all experiments.
+
+LAME $^7$ (Boudiaf et al., 2022) We follow all hyperparameters that are set in LAME unless it does not provide. For fair comparison, we maintain a consistent batch size of 64 for LAME, aligning it with the same batch size used by other methods in our evaluation. We use the kNN affinity matrix with the value of $k = 5$ .
+
+FOA $^{8}$ (Niu et al., 2024) We follow all hyperparameters that are set in FOA unless it does not provide. Specifically, the batch size is set to 64. The number of supports to restore M is set to 20 for all experiments.
+
+Tent9 (Wang et al., 2021) We follow all hyperparameters that are set in Tent unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.
+
+EATA $^{10}$ (Niu et al., 2022) We follow all hyperparameters that are set in EATA. Specifically, the entropy constant $E_0$ (for reliable sample identification) is set to $0.4 \times \ln 1000$ , where 1000 is the number of task classes. The $\epsilon$ for redundant sample identification is set to 0.05. The trade-off parameter $\beta$ for entropy loss and regularization loss is set to 2,000. The number of pre-collected in-distribution test samples for Fisher importance calculation is 2,000. We use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.
+
+$\mathbf{SAR^{11}}$ (Niu et al., 2023) We follow all hyperparameters that are set in SAR. Specifically, the entropy threshold $E_0$ is set to $0.4 \times \ln 1000$ , where 1000 is the number of task classes. We use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. For model recovery, we follow all strategy that are set in SAR(except for the experiments of life-long). The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.
+
+CoTTA $^{12}$ (Wang et al., 2022b) We follow all hyperparameters that are set in CoTTA unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.01 for ViT/ResNet models. The augmentation threshold $p_{th}$ is set to 0.1. For images below threshold, we conduct 32 augmentations including color jitter, random affine, Gaussian blur, random horizontal flip, and Gaussian noise. The restoration probability of is set to 0.01 and the EMA factor $\alpha$ for teacher update is set to 0.999. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.
+
+$\mathbf{M E M O}^{13}$ (Zhang et al., 2022) We follow all hyperparameters that are set in MEMO. Specifically, we use the AugMix14 (Hendrycks et al., 2020) as a set of data augmentations and the augmentation size is set to 32. We use SGD as the optimizer, with learning rate 0.00025 and no weight decay. The trainable parameters are the entire model.
+
+Source of standard deviation. For all the experiments, we run multiple times and report the average performance and standard deviation. The source of the standard deviation consists 1) the order in which the test mini-batches coming online and 2) the randomness of the stochastic optimization methods, e.g., SGD, Adam. Since in TTA setting, the model is initialized from the publicly available pretrained model weights (i.e., via-base-patch16-224 from timm and resnet50 from PyTorch), there is no randomness introduced by model initialization.
+
+# C ADDITIONAL RESULTS
+
+# C.1 FULL RESULTS OF ACCURACY WITH STANDARD DEVIATION (SUPPLEMENTARY TO TABLE 1)
+
+We provide the full results with standard deviation as supplementary to Table 1 in Table 8. The results demonstrate that our COME method consistently achieves better performance than its counterparts.
+
+Table 8: Classification accuracy comparison with standard deviation on ImageNet-C (level 5). Substantial $(\geq 0.5)$ improvement and degradation compared to the baseline are highlighted in blue or brown respectively.
+
+
Methods
COME
Noise
Blur
Weather
Digital
Gauss.
Shot
Impul.
Defoc
Glass
Motion
Zoom
Snow
Frost
Fog
Brit.
Contr.
Elast.
Pixel
JPEG
No Adapt
X
35.1±0.0
32.2±0.0
35.9±0.0
31.4±0.0
25.3±0.0
39.4±0.0
31.6±0.0
24.5±0.0
30.1±0.0
54.7±0.0
64.5±0.0
49.0±0.0
34.2±0.0
53.2±0.0
56.5±0.0
PL
X
49.9±0.2
48.8±0.2
50.9±0.1
48.5±0.4
41.2±0.3
52.7±0.2
42.7±0.5
24.6±1.9
42.5±1.9
63.6±0.5
73.1±0.1
65.3±0.2
44.1±0.6
63.9±0.1
62.6±0.1
T3A
X
34.6±0.0
31.5±0.0
35.5±0.1
32.7±0.0
27.5±0.0
40.7±0.1
33.5±0.1
25.6±0.0
30.8±0.2
56.5±0.1
64.9±0.0
50.8±0.1
38.0±0.0
54.3±0.0
58.4±0.0
TEA
X
44.5±0.1
39.3±0.1
45.8±0.2
37.6±0.4
35.4±0.7
46.4±0.2
31.4±9.7
8.9±0.3
46.4±0.3
60.1±0.2
72.5±0.1
59.5±0.8
45.7±0.3
62.3±0.1
58.9±0.2
LAME
X
34.8±0.0
31.9±0.0
35.5±0.0
30.9±0.0
24.4±0.0
38.9±0.1
30.7±0.0
23.4±0.0
29.5±0.0
53.3±0.0
64.2±0.0
41.0±0.1
32.7±0.0
52.8±0.0
56.0±0.0
FOA
X
46.6±0.7
43.9±0.9
48.3±0.1
47.1±0.4
40.7±0.6
49.3±0.3
43.7±1.0
53.8±0.5
52.8±0.3
64.2±1.2
76.2±0.4
63.8±0.4
48.5±0.6
62.1±0.7
64.0±0.0
Tent
X
52.5±0.1
52.1±0.1
53.4±0.1
52.8±0.1
47.4±0.5
56.7±0.0
47.4±0.1
10.5±1.2
26.4±2.1
67.2±0.1
74.3±0.1
67.3±0.0
50.4±0.3
66.5±0.1
64.6±0.0
✓
53.9±0.0
53.9±0.0
55.2±0.1
55.8±0.1
51.8±0.1
59.8±0.0
52.6±0.0
58.4±0.5
61.3±0.1
71.3±0.1
78.2±0.0
68.8±0.1
57.9±0.4
70.5±0.1
68.2±0.1
Improve
△1.4
△1.9
△1.8
△2.9
△4.4
△3.2
△5.2
△47.9
△34.9
△4.1
△3.9
△1.5
△7.6
△4.0
△3.6
EATA
X
56.0±0.2
56.1±0.3
57.1±0.1
54.5±1.9
54.8±1.7
59.6±1.6
58.7±0.1
61.8±0.3
60.1±0.1
71.4±0.2
75.3±0.0
68.5±0.1
62.7±0.2
69.0±0.3
66.5±0.2
✓
56.1±0.1
56.5±0.1
57.2±0.0
58.0±1.9
57.9±0.2
62.6±0.1
59.3±0.2
65.6±0.2
63.5±0.1
72.6±0.1
78.0±0.1
69.5±0.1
66.6±0.3
72.5±0.2
70.5±0.1
Improve
△0.1
△0.3
△0.1
△3.4
△3.1
△3.1
△0.6
△3.9
△3.4
△1.3
△2.7
△1.0
△3.9
△3.5
△4.0
SAR
X
51.9±0.1
51.7±0.1
52.8±0.1
51.5±0.5
48.9±0.2
55.5±0.1
49.5±0.2
22.2±0.8
46.9±2.2
66.2±0.4
72.9±0.1
65.8±0.1
50.9±0.5
64.0±0.0
62.8±0.2
✓
56.4±0.1
56.6±0.1
57.4±0.1
58.3±0.2
56.9±0.1
62.9±0.1
58.3±0.2
65.3±0.1
64.5±0.1
72.7±0.1
78.5±0.0
69.6±0.0
64.0±0.2
71.9±0.1
69.7±0.1
Improve
△4.5
△4.9
△4.6
△6.8
△8.1
△7.4
△8.8
△43.1
△17.5
△6.5
△5.5
△3.8
△13.2
△7.9
△6.9
COTTA
X
40.3±0.2
37.6±0.1
41.7±0.1
34.3±0.4
28.3±0.7
44.0±0.1
35.6±0.2
38.0±0.1
43.0±0.2
58.8±0.3
70.3±0.3
58.4±0.5
39.8±0.2
58.1±0.2
59.9±0.1
✓
43.5±0.0
40.9±0.3
45.5±0.4
36.9±0.2
29.7±0.2
48.1±1.2
37.8±0.3
40.7±1.4
42.0±0.4
62.3±0.6
73.0±0.2
58.9±2.4
42.8±0.3
63.5±0.2
63.8±0.1
Improve
△3.1
△3.4
△3.8
△2.6
△1.4
△4.0
△2.2
△2.7
△1.0
△3.5
△3.3
△0.5
△3.0
△5.4
△3.9
+
+# C.2 FULL RESULTS OF OPEN-WORLD TTA (SUPPLEMENTARY TO TABLE 3)
+
+We provide the full results with standard deviation as supplementary to Table 3 in Tablei $^{\ddagger}$ d9. The results demonstrate that our COME method consistently achieves better performance than its counterparts.
+
+Table 9: Classification and uncertainty estimation comparisons with standard deviation under open-world TTA settings, where $P^{\mathrm{test}}$ is a mixture of both covariate-shifted samples (Gaussian noise of severity level 3).
+
+
None
NINCO
iNaturist
SSB-Hard
Texture
Places
Method
COME
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
No Adapt
X
64.4±0.0
63.7±0.0
64.6±0.3
70.3±1.0
64.4±0.0
69.5±0.0
64.4±0.0
72.5±0.1
64.7±0.2
65.0±0.4
64.5±0.3
57.4±0.6
PL
X
69.1±0.1
63.0±0.3
65.6±0.0
70.9±1.7
68.8±0.1
69.3±0.2
68.3±0.0
76.2±0.3
66.1±0.1
65.7±0.3
67.1±0.3
59.1±0.6
T3A
X
64.4±0.0
71.0±0.3
64.3±0.2
71.4±1.6
64.1±0.1
74.1±0.6
63.7±0.0
80.1±0.4
64.4±0.2
67.4±1.4
64.0±0.3
69.6±0.1
TEA
X
64.1±0.3
63.3±0.5
60.2±0.6
72.9±0.3
62.4±0.1
74.5±0.2
63.5±0.1
79.3±0.2
60.6±0.4
69.0±0.9
62.0±0.2
65.8±1.0
LAME
X
64.1±0.0
64.1±0.3
64.2±0.3
72.3±0.1
64.1±0.0
72.2±0.2
64.1±0.0
73.9±0.1
64.6±0.2
68.5±0.3
64.3±0.3
61.4±0.3
FOA
X
67.8±0.0
62.0±0.6
65.9±0.3
69.2±0.9
67.6±0.2
66.8±0.5
67.5±0.2
76.0±0.3
65.8±0.0
60.6±0.5
66.7±0.1
52.8±0.9
Tent
X
70.9±0.1
63.6±0.5
66.4±0.3
71.5±0.3
70.0±0.1
70.8±0.4
69.8±0.0
77.4±0.1
66.7±0.4
67.3±0.7
68.0±0.4
60.8±0.8
✓
72.6±0.0
64.9±0.1
69.0±0.1
63.9±0.3
72.6±0.1
63.6±0.1
72.7±0.0
70.6±0.0
68.5±0.0
60.5±0.0
70.7±0.0
46.3±0.2
Improve
△1.7
△1.3
△2.6
△7.6
△2.6
△7.2
△2.8
△6.8
△1.8
△6.8
△2.6
△14.5
EATA
X
70.2±0.1
63.5±0.1
66.2±0.1
68.8±0.2
70.2±0.1
71.5±0.1
69.9±0.1
77.5±0.1
67.6±0.5
66.5±0.5
68.6±0.2
62.0±0.2
✓
73.3±0.0
63.1±0.3
70.1±0.0
60.5±0.0
73.2±0.0
63.2±0.1
73.0±0.0
70.6±0.1
70.3±0.2
56.8±0.7
72.5±0.0
45.8±0.2
Improve
△3.1
△0.4
△3.9
△8.2
△3.0
△8.3
△3.1
△6.9
△2.7
△9.7
△3.7
△16.2
SAR
X
69.6±0.1
62.3±0.1
65.5±0.5
70.3±0.9
67.1±0.1
70.7±0.2
67.6±0.1
77.9±0.2
65.5±0.8
65.8±1.0
66.2±0.1
59.8±1.0
✓
73.1±0.0
62.3±0.4
70.0±0.2
65.9±0.2
73.3±0.1
65.3±0.0
73.5±0.0
71.5±0.3
69.4±0.0
59.3±0.0
72.0±0.2
48.5±0.9
Improve
△3.5
△0.1
△4.5
△4.3
△6.2
△5.4
△6.0
△6.5
△3.9
△6.5
△5.8
△11.3
COTTA
X
67.7±0.1
63.4±0.1
65.3±0.4
70.4±0.8
70.4±0.2
69.5±0.1
70.1±0.1
75.8±0.4
65.7±0.2
65.0±0.9
67.0±0.3
58.8±0.3
✓
70.4±0.1
62.8±0.2
66.5±0.3
68.0±0.6
72.4±0.0
72.9±0.5
72.1±0.1
78.5±0.2
66.4±0.2
63.8±0.7
68.9±0.4
54.5±0.5
Improve
△2.8
△0.6
△1.2
△2.4
△2.0
△3.5
△2.0
△2.7
△0.7
△1.2
△1.9
△4.4
+
+# C.3 COMPARISON WITH SOURCE-FREE DOMAIN ADAPTION
+
+There is a strong connection between Source-Free Domain Adaptation (SFDA) and Test-Time Adaptation (TTA). The primary difference is that TTA focuses on online adjusting during the testing. On the other hand, SFDA approaches generally perform offline. That is, the inference is deferred until the optimization is done. In contrast, our TTA method can achieve adaptation and inference at the same time.
+
+To further validate the applicability of our method, we report the classification accuracy on ImageNet-C Gaussian noise level 5 under source-free domain adpation settings. The results are in Table 10. The baselines we considered include pseudo label (PL), mutual information maximization (IM), and entropy minimization (EM) following (Liang et al., 2020). " -" means the model accuracy collapses to random guess level.
+
+Table 10: Classification accuracy comparison on ImageNet-C Gaussian noise (level 5) under source-free domain adaption settings. “-” means the classification accuracy collapses to random guess level. The accuracy of the original pretrained model is 35.1.
+
+
EPOCH COME
PL ✘
EM ✘
IM ✘
TENT ✓
EATA ✓
SAR ✓
1
34.2±3.2
-
60.7±0.0
66.5±0.0
66.4±0.3
68.5±0.1
2
-
-
63.8±0.1
68.4±0.0
67.2±0.2
69.7±0.1
3
-
-
65.1±0.1
69.2±0.0
67.8±0.2
70.2±0.1
+
+# C.4 COMPARISON WITH OTHER OTHER BAYESIAN METHODS
+
+There exists a few Beysian inspired TTA methods closely related to our method. (Zhou & Levine, 2021) explores Bayesian model ensembling Zhou & Levine (2021) for TTA, which introduces noticeable inference latency. Since (Zhou & Levine, 2021) has not made their source code publicly available. For a fair comparison, we implement the proposed COME using the same backbone (ResNet50-v2) and dataset (ImageNet-C) as in (Zhou & Levine, 2021) and report the average accuracy of all corruptions and levels. The results of (Zhou & Levine, 2021) are directly copied from the original paper. The results are in Table 11.
+
+Table 11: Classification accuracy comparison with other bayesian-inspired TTA methods on ImageNet-C under TTA settings averaged over all corruption types and levels. The result of BACS is copied from the original paper.
+
+
COME
No Adapt ✘
BN ✘
BACS ✘
TENT ✘
TENT √
EATA √
47.3±0.0
47.3±0.0
56.1
48.9±0.0
51.1±0.0
58.1±0.0
+
+# C.5 INFLUENCE OF DIFFERENT HYPERPARAMETERS
+
+We conduct additional experiments to investigate the influence of different hyperparameters. The results are in Table 12 and Table 13. Our COME generally outperforms EM with moderate hyperparameters. For $\tau$ , as we mentioned before, it actually controls the magnitude of uncertainty mass. If we have some prior knowledge that most test samples should be rejected to adapt during TTA, we should choose a relatively small $\tau$ and making the model confidence more conservative in this circumstance. As for $\delta$ (or $p$ ) which represents the tolerance of uncertainty divergence, it should be selected per need by the user via trial and error: if users are extremely cautious about unreliable TTA, $\delta$ should be tuned down and $p$ should be tuned up; otherwise, if a better performance is required. Besides, we introduce an additional hyperparameter $\lambda$ to the learning objective. The experiments results in Table 12 shows that an additional performance improvement can be observed when $\lambda \in [1, 100]$ .
+
+Table 12: Additional results with different $\lambda$ . We report the accuracy when our COME is equipped to Tent on ImageNet-C Gaussian noise level 5 with different $\lambda$ . The accuracy of the original Tent using entropy minimization is 52.6.
+
+
λ
0.10
1.00
10.0
30.0
50.0
80.0
100
150
Acc.
53.7±0.1
53.9±0.0
54.6±0.1
55.3±0.1
55.8±0.1
56.2±0.1
56.1±0.1
10.6±0.3
+
+# C.6 COMPARISON ON IMAGENET-R AND IMAGENET-S
+
+We introduce two more additional datasets, i.e., ImageNet-R and ImageNet-S, to further evaluate the proposed method on commonly used OOD generalization benchmarks. The results are in Table 14 and Table 15.
+
+Table 13: Additional results with different hyperparameters. We report the accuracy on ImageNet-C Gaussian noise level 5 with different hyperparameters. We implement our COME with Tent. The accuracy of the original Tent using entropy minimization is 52.6.
+
+
p=1
p=2
p=3
p=∞
τ=0.5
37.8±0.0
38.5±0.0
39.1±0.0
41.1±0.0
τ=1.0
53.5±0.0
53.8±0.1
53.2±0.0
47.2±0.1
τ=1.2
54.7±0.0
54.7±0.1
54.0±0.1
48.9±0.0
τ=1.5
54.2±0.2
54.2±0.1
53.2±0.1
49.1±0.1
+
+Table 14: Additional results on ImageNet-R
+
+
Tent
EATA
SAR
COTTA
EM
37.73 ± 0.03
36.11 ± 0.12
51.90 ± 0.35
36.04 ± 0.06
COME
39.05 ± 0.05
38.22 ± 0.23
56.40 ± 0.18
37.39 ± 0.08
+
+# C.7 IN-DISTRIBUTION PERFORMANCE
+
+We compare the in-distribution performance of proposed COME to EM-based methods. As shown in Table 16, our method consistently outperforms entropy minimization.
+
+# C.8 COMPARISON ON RESNET-50
+
+As shown in previous work (Niu et al., 2023), the TTA performance can be influenced by different model architectures, especially the type of normalization layers, i.e., batch normalization, group normalization, layer normalization, and instance normalization. To further evaluate the proposed method, we conduct additional experiments on ResNet-50 with batch normalization layers under open-world TTA settings. The experimental results in Table 17 show that our COME still achieves superior performance compared to entropy minimization learning principle when equipped to Tent.
+
+# C.9 TIME-CONSUMING COMPARISON
+
+We compare the time-cost of proposed COME to EM-based methods and Non-EM based methods in Table 18. We run all the experiments on one single NVIDIA 4090 GPU. Our COME does not introduce noticeably extra cost of computation.
+
+# C.10 MIXED DISTRIBUTIONAL SHIFTS PERFORMANCE.
+
+We evaluate the proposed COME in two additional settings introduced by (Niu et al., 2023). These scenarios include 1) online imbalanced label distribution shifts, where the test data are sorted by class, and 2) mixed domain shifts, where the test data stream includes several randomly mixed domains with different distribution shifts. As shown in Table 19 and Table 20, our COME consistently outperforms entropy minimization with an exception of a slightly suboptimal uncertainty estimation performance compared to CoTTA.
+
+# C.11 MORE VISUALIZATION RESULTS (SUPPLEMENTARY TO FIGURE 1)
+
+We provide more visualization results on two representative TTA methods, i.e., the seminal Tent (Wang et al., 2021) and recent SOTA SAR (Niu et al., 2023). We observe that our COME enjoys a more stable TTA progress with less risk of model collapse and overconfidence across various types of corruption. We test on ImageNet-C level 5.
+
+
+Figure 3: Comparison on two representative TTA methods on ImageNet-C under Gaussian Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 4: Comparison on two representative TTA methods on ImageNet-C under Shot Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 5: Comparison on two representative TTA methods on ImageNet-C under Impulse Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 6: Comparison on two representative TTA methods on ImageNet-C under Defocus Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 7: Comparison on two representative TTA methods on ImageNet-C under Glass Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 8: Comparison on two representative TTA methods on ImageNet-C under Motion Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 9: Comparison on two representative TTA methods on ImageNet-C under Zoom Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 10: Comparison on two representative TTA methods on ImageNet-C under Frost corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate. Although the SAR method can recover the model when it collapses to a trivial solution, its performance remains poor. Our COME method addresses the issue of overconfidence that leads to model collapse.
+
+
+
+
+
+
+Figure 11: Comparison on two representative TTA methods on ImageNet-C under Fog corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 12: Comparison on two representative TTA methods on ImageNet-C under Brightness corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 13: Comparison on two representative TTA methods on ImageNet-C under Contrast corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+Figure 14: Comparison on two representative TTA methods on ImageNet-C under Elastic Transform corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+
+
+
+
+No Adapt
+
+
+-
+
+
+Figure 15: Comparison on two representative TTA methods on ImageNet-C under Pixelate corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+-
+
+
+
+
+SAR+COME
+
+
+No Adapt
+
+
+-
+
+
+Figure 16: Comparison on two representative TTA methods on ImageNet-C under Jpeg Compression corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
+
+
+-
+
+
+一
+
+
+FPR per batch
+SAR+COME
+
+Table 15: Additional results on ImageNet-S.
+
+
Tent
EATA
SAR
COTTA
EM
31.63 ± 0.07
36.11 ± 0.19
33.92 ± 0.69
30.84 ± 0.35
COME
39.22 ± 0.04
39.22 ± 0.32
43.52 ± 0.52
33.82 ± 0.73
+
+Table 16: Comparison w.r.t. in-distribution performance, i.e., on clean/original ImageNet validation set, with ViT as the base model. Substantial $(\geq 0.5)$ improvement and degradation compared to the baseline are highlighted in blue or red respectively.
+
+
TENT
SAR
EATA
CoTTA
MEMO
Avg.
COME
Acc↑
Acc↑
Acc ↑
Acc ↑
Acc↑
Acc↑
X
81.4
80.7
81.3
82.1
80.3
81.2
✓
83.1
83.1
83.1
82.8
80.6
82.6
Improve
△1.7
△2.5
△1.8
△0.7
-
△1.4
+
+# D DISCUSSION
+
+# D.1 ALTERNATIVE DESIGN CHOICE
+
+Choices of transformation function to obtain the opinion. By definitions, the parameters of a Dirichlet distribution $\alpha$ must be greater than 1 and the evidence $e$ should be non-negative. This can be achieved by applying ReLU activation function or exponential function to the output logits as suggested in previous works (Han et al., 2022; Malinin & Gales, 2018). That is, we can get the evidence by
+
+$$
+\boldsymbol {e} = \operatorname {R e L U} (f (x)) \tag {24}
+$$
+
+or
+
+$$
+\boldsymbol {e} = \exp f (x) - 1. \tag {25}
+$$
+
+In this paper, we choose the exponential function. Since we assume the pretrain model is trained with standard cross-entropy loss, using exponential function to get the evidence can keep the training strategy unchanged. Besides, based on our early empirical findings, using exponential function can achieve better classification performance compared to ReLU.
+
+We refer interested readers to (Malinin & Gales, 2018) and Gal's PhD Thesis (Gal et al., 2016) for more detailed implementation instructions and math deviations.
+
+Choices of uncertainty constraint. In Lemma 1, we prove that by constraining on the model output logits, we can control the uncertainty mass $u$ not to diverge too far from the pretrained model. Previous work (Wei et al., 2022) proposes to mitigate the overconfidence issue by normalizing the logits during pretrain progress in supervised learning tasks. Following their implementation, we propose to optimize on the direction vector of $f(x)$ , i.e., $f(x) / ||f(x)||_p$ , and thus we can expect that the optimization progress is not related to the magnitude of $f(x)$ , i.e., its norm. Different from Wei et al. (2022), we recover the magnitude by multiplying the direction vector with its norm (detached), rather than a constant to avoid an additional hyperparameter. However, the uncertainty estimated by pretrain model may not be ideal. However, please kindly remind that in fully TTA task, we can only access unlabeled test data coming online and the inference efficiency matters. Thus traditional methods devised for handling overconfidence like calibration (Guo et al., 2017), assembling (Zhou & Levine, 2021), BNNs (Huang et al., 2022) and other Bayesian methods like dropout (Gal & Ghahramani, 2016) are not applicable. The only practically available choice is to explore the uncertainty information contained within the model itself. As shown in previous works, while the softmax probability of pretrained model tend to be overconfident, subjective logic is much more reliable (Sensoy et al., 2018; Malinin & Gales, 2018), which can support the proposed regularization. Exploring more effective and efficient regularization is an interesting future research direction.
+
+Choices of $p$ -norm. The tightness for the upper and lower bounds in Lemma 1 is determined by the choice of $p$ . By considering the simple model where $f(x)$ outputs the same logits for all classes, the ratio between the upper and lower bound is minimized by $p = \infty$ . A larger $p$ can lead to a more strict constraint on $|u - u_{-}0| \leq \delta$ . We conduct additional experiments on varying $p$ . When using
+
+Table 17: Classification and uncertainty estimation comparisons under open-world TTA settings with ResNet-50-BN, where $P^{\mathrm{test}} = 0.5P^{\mathrm{Cov}} + 0.5P^{\mathrm{Sem}}$ (Gaussian noise of severity level 3) and a suit of diverse abnormal outliers as same with Table 3. Substantial ( $\geq 0.5$ ) improvement and degradation compared to the baseline are highlighted in blue or red respectively.
+
+
None
NINCO
iNaturist
SSB-Hard
Texture
Places
Avg.
Method
COME
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
No Adapt
✘
3.0
81.6
3.0
91.2
3.0
89.4
3.0
90.2
3.0
88.3
2.8
90.7
3.0
88.6
PL
✘
26.9
71.2
16.1
84.3
12.9
88.4
15.9
87.8
18.1
86.1
16.9
82.9
17.8
83.5
TEA
✘
28.5
73.5
17.6
84.0
9.6
84.5
11.8
88.3
19.9
84.2
16.8
82.9
17.4
82.9
Tent
✘
52.5
67.5
43.7
79.6
52.1
78.3
51.9
82.1
44.4
78.6
48.7
73.2
48.9
76.6
✓
55.0
67.6
46.3
75.5
54.3
75.1
54.4
81.9
45.8
75.6
50.8
64.0
51.1
73.3
Improve
△2.6
-
△2.6
△4.2
△2.2
△3.2
△2.5
-
△1.4
△3.1
△2.2
△9.2
△2.2
△3.3
EATA
✘
55.9
68.2
47.8
80.8
53.1
78.4
52.2
82.0
48.7
75.3
49.3
74.5
51.2
76.5
✓
58.0
66.2
52.9
74.8
57.6
73.2
57.4
81.3
52.5
70.7
55.4
62.9
55.6
71.5
Improve
△2.0
△2.0
△5.1
△6.0
△4.5
△5.1
△5.2
△0.7
△3.9
△4.6
△6.0
△11.6
△4.5
△5.0
SAR
✘
51.8
64.6
42.4
78.3
47.6
81.3
48.1
84.4
42.7
79.1
46.0
76.7
46.4
77.4
✓
56.3
64.0
46.7
77.9
55.3
77.1
55.1
81.6
46.4
77.5
52.5
68.1
52.0
74.4
Improve
△4.5
△0.6
△4.3
△0.3
△7.7
△4.2
△6.9
△2.8
△3.7
△1.6
△6.5
△8.6
△5.6
△3.0
COTTA
✘
22.6
70.7
14.4
87.4
21.1
78.6
19.7
84.1
15.5
87.3
15.8
82.0
18.2
81.7
✓
24.5
69.4
14.7
86.1
21.4
81.6
19.4
86.1
16.0
85.7
16.4
82.6
18.7
81.9
Improve
△1.8
△1.3
-
△1.3
-
△2.9
-
△2.0
△0.5
△1.6
△0.6
△0.7
△0.5
-
MEMO
✘
8.0
83.6
7.5
89.0
7.9
87.9
7.9
89.8
7.8
88.6
7.7
88.4
7.8
87.9
✓
9.1
77.9
8.7
90.2
9.0
87.3
9.1
89.2
9.1
87.4
8.7
88.8
9.0
86.8
Improve
△1.1
△5.7
△1.2
△1.2
△1.2
△0.7
△1.2
△0.6
△1.3
△1.2
△1.1
-
△1.2
△1.1
+
+Table 18: Comparisons w.r.t. computation complexity. Accuracy (\%) and FPR (\%) are average results on ImageNet-C (level 5) with ViT-Base. The Wall-Clock Time (seconds) and Memory Usage (MB) are measured for processing 50,000 images of ImageNet-C on a single RTX 4090 GPU.
+
+
Method
COME
Acc ↑
FPR ↓
Memory
Run Time
No Adapt
✘
39.8
67.5
853
59
LAME
✘
38.7
69.7
853
62
T3A
✘
41.0
67.7
984
179
PL
✘
51.3
69.1
6393
128
FOA
✘
53.7
63.6
869
1687
TEA
✘
46.9
68.3
17266
2865
Tent
✘
52.8
70.1
6393
129
✓
61.2
66.5
6393
130
Improve
△8.4
△3.6
-
-
EATA
✘
62.1
65.1
6394
135
✓
64.5
63.8
6394
134
Improve
△2.4
△1.3
-
-
SAR
✘
54.2
66.7
6393
253
✓
64.2
63.8
6393
254
Improve
△10.1
△2.9
-
-
COTTA
✘
46.1
67.9
19612
738
✓
49.1
67.5
19611
739
Improve
△3.0
△0.3
-
-
MEMO
✘
42.3
72.1
5392
20576
✓
43.2
70.8
5392
20530
Improve
△0.9
△1.3
-
-
+
+Table 19: Comparison w.r.t. imbalanced label shifts performance. Results obtained on ViT and ImageNet-C (level 5) under imbalanced label shifts TTA setting, where the imbalance ratio is $\infty$ . Substantial ( $\geq 0.5$ ) improvement and degradation compared to the baseline are highlighted in blue or red respectively.
+
+
Methods
COME
Noise
Blur
Weather
Digital
Avg.
Gauss.
Shot
Impul.
Defoc
Glass
Motion
Zoom
Snow
Frost
Fog
Brit.
Contr.
Elast.
Pixel
JPEG
Acc↑
No Adapt
X
35.1
32.2
35.9
31.4
25.3
39.4
31.6
24.5
30.1
54.7
64.5
49.0
34.2
53.2
56.5
39.8
PL
X
49.7
48.6
50.9
49.8
41.5
53.0
41.9
26.6
49.0
64.3
73.6
65.6
45.2
63.9
63.0
52.4
T3A
X
33.4
30.3
34.2
31.3
26.8
38.7
32.1
25.1
29.3
54.5
62.8
48.8
37.4
51.9
56.2
39.5
TEA
X
44.9
40.3
46.3
39.8
35.2
46.0
12.1
14.3
46.9
60.3
72.7
60.2
48.6
62.7
58.8
45.9
LAME
X
47.0
43.3
48.2
39.8
31.8
50.3
39.4
30.5
37.1
66.0
75.4
63.5
42.0
65.1
68.1
49.8
FOA
X
41.5
39.2
43.6
42.5
33.7
45.5
41.0
44.9
44.5
60.1
67.7
58.8
45.7
57.3
62.7
48.6
Tent
X
52.4
51.9
53.3
53.8
48.1
57.0
46.2
10.3
53.5
67.9
74.2
67.1
52.3
66.5
64.9
54.6
✓
55.0
55.0
56.2
57.1
54.6
61.6
49.3
62.9
64.0
72.3
78.1
69.3
62.7
71.3
69.0
62.6
Improve
△2.5
△3.2
△2.9
△3.4
△6.5
△4.6
△3.1
△52.6
△10.6
△4.4
△4.0
△2.2
△10.4
△4.9
△4.1
△7.9
SAR
X
51.8
51.7
52.7
51.9
48.2
55.6
47.8
20.3
52.9
66.8
73.2
66.0
52.2
64.1
62.8
54.5
✓
56.0
56.0
57.2
58.0
56.3
62.3
54.1
64.0
64.3
72.4
78.3
69.6
64.0
71.5
69.1
63.5
Improve
△4.2
△4.4
△4.5
△6.2
△8.1
△6.6
△6.3
△43.8
△11.4
△5.7
△5.1
△3.6
△11.8
△7.4
△6.2
△9.0
EATA
X
52.0
53.6
53.9
49.3
49.5
54.4
55.6
58.1
56.9
69.6
74.9
63.6
61.1
68.0
64.2
59.0
✓
54.9
56.4
54.7
56.5
56.3
62.1
59.0
67.0
65.4
73.4
78.4
68.0
68.0
73.0
70.4
64.2
Improve
△2.8
△2.8
△0.8
△7.3
△6.8
△7.7
△3.4
△8.9
△8.5
△3.9
△3.5
△4.4
△6.8
△5.0
△6.1
△5.3
COTTA
X
42.9
40.0
44.6
36.0
29.7
44.8
37.2
42.3
46.4
60.7
72.9
65.0
45.4
61.6
62.9
48.8
✓
51.6
49.0
52.9
41.7
37.0
51.6
43.8
46.7
53.2
65.9
74.4
65.6
52.8
66.7
65.9
54.6
Improve
△8.6
△9.0
△8.3
△5.7
△7.4
△6.8
△6.6
△4.4
△6.9
△5.2
△1.5
△0.5
△7.4
△5.1
△3.0
△5.8
MEMO
X
39.7
36.5
39.8
32.4
25.8
40.3
34.7
27.5
32.8
53.5
66.2
56.0
35.7
55.9
58.2
42.3
✓
40.6
37.5
40.6
33.4
26.7
41.2
35.4
28.7
33.7
54.7
67.1
55.9
36.6
57.2
59.2
43.2
Improve
△0.8
△1.0
△0.8
△1.0
△0.9
△1.0
△0.7
△1.2
△0.9
△1.2
△0.8
-
△0.9
△1.3
△1.1
△0.9
+
+Table 20: Comparison w.r.t. mixed shifts performance. Results obtained on ViT and ImageNet-C (level 5) under mixed shifts TTA setting, the performance is evaluated on a single data stream consisting of 15 mixed corruptions. Substantial ( $\geq 0.5$ ) improvement and degradation compared to the baseline are highlighted in blue or red respectively.
+
+
TENT
SAR
EATA
CoTTA
Avg.
COME
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
Acc↑
FPR↓
X
58.0
72.3
53.6
68.2
58.8
71.3
62.0
69.7
58.1
70.4
✓
61.2
67.9
62.3
66.9
61.8
67.0
65.1
70.7
62.6
68.1
Improve
△3.2
△4.4
△8.6
△1.3
△3.0
△4.3
△3.1
△0.9
△4.5
△2.3
+
+infinity norm, a suboptimal classification accuracy is observed. We suppose this is because an overly strict constraint can be harmful to TTA. Since on reliable test samples, we still expect to reduce the uncertainty (in a conservative manner).
+
+# D.2 LIMITATIONS AND FUTURE WORK
+
+Many state-of-the-art TTA methods are equipped with entropy minimization learning principle; but the potential pitfalls lie in this optimization objective is not well understood. In this paper, we provide empirical analysis towards understanding the failure mode. These findings motivate us to further explore the connection between uncertainty learning and reliable TTA progress, which further implies a principle to design novel learning principle as an alternative to entropy minimization. Finally, we perform extensive experiments on multiple benchmarks to support our findings. In the work, a simple yet effective regularization on the uncertainty mass is devised, and other regularization techniques could be explored. Another interesting direction is further explore the relationship between overconfidence issue and model collapse theoretically.
\ No newline at end of file
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/images.zip b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..6ea3f5c6c9160ceeaf5df5ba1fa082a10791d078
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:883883e7143151228893b05d1cc5465a35d19c7408972b87aa4526c628e7c3bb
+size 2369833
diff --git a/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/layout.json b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..417ad1e881ab306d6f08393c86523315a0a61bd6
--- /dev/null
+++ b/ICLR/2025/COME_ Test-time Adaption by Conservatively Minimizing Entropy/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a2078c7b648d1f31214994d9dd737220bf885bfa43a4728c8875310a59910d1d
+size 889578
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_content_list.json b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0d414d78a5602e44ac21a7dd5ac140698b69359d
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1703b05f2d75aad2b9611784ecce70accca3a601ec74ecb43af60c862f0a1ef8
+size 175624
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_model.json b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..dea5cf6be90f8b9c03162df41d0c8fa0ae49a448
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1749e911c35a97457c5edc6809dcd2cdaf274f3d93ed09460196fe6368cd8e08
+size 212457
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_origin.pdf b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a7d795dcd5bb65d1ce90010b3a0821339e99f1a3
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/34104ea5-3f46-4b51-8659-7f2af5f1779d_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:49dd97959e6e656e364a4f90b42c74be1ae50acd4fba5de6e5f1cbda7adeca4e
+size 3808902
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/full.md b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..d87b64e51eb6838fa7313f3e3adc328f07edac32
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/full.md
@@ -0,0 +1,639 @@
+# CONDA: ADAPTIVE CONCEPT BOTTLENECK FOR FOUNDATION MODELS UNDER DISTRIBUTION SHIFTS
+
+Jihye Choi, Jayaram Raghuram, Yixuan Li & Somesh Jha
+
+Department of Computer Sciences, University of Wisconsin - Madison
+
+{jiihye, jayaramr, sharonli, jha}@cs.wisc.edu
+
+# ABSTRACT
+
+Advancements in foundation models (FMs) have led to a paradigm shift in machine learning. The rich, expressive feature representations from these pre-trained, large-scale FMs are leveraged for multiple downstream tasks, usually via lightweight fine-tuning of a shallow fully-connected network following the representation. However, the non-interpretable, black-box nature of this prediction pipeline can be a challenge, especially in critical domains, such as healthcare, finance, and security. In this paper, we explore the potential of Concept Bottleneck Models (CBMs) for transforming complex, non-interpretable foundation models into interpretable decision-making pipelines using high-level concept vectors. Specifically, we focus on the test-time deployment of such an interpretable CBM pipeline "in the wild", where the distribution of inputs often shifts from the original training distribution. We first identify the potential failure modes of such pipelines under different types of distribution shifts. Then we propose an adaptive concept bottleneck framework to address these failure modes, that dynamically adapts the concept-vector bank and the prediction layer based solely on unlabeled data from the target domain, without access to the source dataset. Empirical evaluations with various real-world distribution shifts show our framework produces concept-based interpretations better aligned with the test data and boosts post-deployment accuracy by up to $28\%$ , aligning CBM performance with that of non-interpretable classification1.
+
+# 1 INTRODUCTION
+
+Foundation Models (FMs), trained on vast data, are powerful feature extractors applicable across diverse distributions and downstream tasks (Bommasani et al., 2021; Rombach et al., 2022). They can be applied to classification tasks off-the-shelf via zero-shot prediction, or via linear probing using task-specific fine-tuning data (Kumar et al., 2022; Radford et al., 2021). Despite these strong advantages, foundation model-based systems often operate as inscrutable black-boxes, presenting a barrier to user trust and wider deployment in safety-critical settings. Another challenge faced in the standard deployment of FM-based deep classifiers is their vulnerability to distribution shifts at test time caused e.g., due to environmental changes, which can cause a drop in performance (Bommasani et al., 2021). This is particularly challenging in high-stakes domains such as healthcare (AlBadawy et al., 2018; Eslami et al., 2023), autonomous driving (Yu et al., 2020), and finance (Wu et al., 2023a).
+
+In this work, we address these challenges by developing an interpretable classification framework that enjoys the rich, expressive feature representations of FMs, while also having enhanced robustness towards distribution shifts at test time. To tackle interpretability, we utilize Concept Bottleneck Models (CBMs) (Koh et al., 2020), transforming FM-based classifiers into interpretable, concept-based prediction pipelines. With the rapid advancements in FMs, there is strong opportunity to utilize them as powerful backbones, providing robust feature representations from which high-quality concepts can be extracted. Unlike early CBM approaches that required expensive concept annotations, recent advances show potential for constructing concept bottlenecks without any annotations by leveraging vision-language models (Oikarinen et al., 2023; Wu et al., 2023b), and achieving performance on par with non-interpretable models. Concept-based predictions provide not only interpretability, but are
+
+
+Figure 1: Concept-based predictions are not inherently more robust to distribution shifts than feature-based predictions, necessitating dynamic adaptation after deployment. We observe significant drops in the averaged group accuracy (AVG) and worst-group accuracy (WG) from the source to the target (test) domain under two types of distribution shifts: (1) low-level shift (left), where inputs are perturbed without modifying class-level semantics (e.g., Gaussian noise); and (2) concept-level shift (right), where some high-level semantics change. On the left, predictions made through high-level concepts (e.g., by PCBM (Yuksekgonul et al., 2023) here) are not necessarily more robust to low-level input perturbations. On the right, the performance of concept-based predictions suffers an even more drastic drop, failing to leverage the expressiveness of the foundation model's high-level features, and falling behind direct feature-based predictions (here zero-shot and linear-probing based classification). However, with CONDA, we can boost the performance of the deployed concept-based predictor to be on par with, or even better than, its non-interpretable counterparts.
+
+
+
+also beneficial for robustness; a central premise of CBMs is that as complex feature embeddings go through the concept bottleneck, the resulting predictions should, in theory, become more invariant to inconsequential input changes (Kim et al., 2018; Adebayo et al., 2020).
+
+However, we observe that CBMs directly deployed under distribution shifts often do not produce more robust predictions compared to FM-based classifiers (either in zero-shot or fine-tuned configurations). For instance, as illustrated in Figure 1, even when a concept-based prediction pipeline matches or outperforms a feature-based prediction pipeline in the training (source) domain, its test-time (deployment) performance can drop significantly under distribution shifts. This highlights that a naive adoption of CBMs is insufficient for fully leveraging the robustness and expressiveness of FM features under test-time shifts, necessitating a dynamic approach for adapting concept-based predictions in real-world deployments.
+
+The problem of test-time (or source-free domain) adaptation (TTA) has recently been explored extensively (Wang et al., 2021; Jung et al., 2023; Liang et al., 2023). The goal of TTA is to adapt a deep classifier, trained on source domain data, to a test-time deployment setting where there could be distribution shifts (e.g., corruptions, environment changes), and given access to only unlabeled test data and the source domain classifier. While the main focus of TTA methods has been on non-interpretable, deep classifier networks, we present the first approach (to our knowledge) for TTA of concept bottlenecks with a foundation model backbone. Our key contributions are summarized as follows: given unlabeled test data, a frozen FM, and a pre-constructed concept bottleneck, we
+
+1. formally categorize the types of distribution shifts expected during deployment, identifying possible failure modes of the concept bottleneck pipeline under these shifts (Section 2);
+2. propose a novel framework CONDA (CONcept-based Dynamic Adaptation), where each component of the framework is adapted based on the identified failure modes, without requiring access to the source dataset or any labels for the test data (Section 3);
+3. empirically demonstrate the robustness and interpretability of CONDA across various FM backbones (e.g., CLIP:ViT-L/14) and concept bottleneck construction methods (e.g., posthoc CBM), showing that CONDA improves the test-time accuracy by up to $28\%$ , and provides concept-based interpretations better tailored towards the test inputs (Section 4).
+
+Related Work. Distribution shifts occur when the data distribution during deployment differs from that during training, leading to degraded model performance (Quinonero-Candela et al., 2022). To address this issue, TTA methods adapt the model parameters using only unlabeled test data; via
+
+entropy minimization (Wang et al., 2021; Zhang et al., 2022), self-supervised learning at test time (Sun et al., 2020), class-aware feature alignment (Jung et al., 2023), and updating batch normalization statistics using test data (Nado et al., 2020). These methods enable models to adapt on-the-fly without requiring access to the labeled training data. In the era of foundation models, recent efforts have been made to enhance their zero-shot inference robustness under distribution shifts without modifying their internal parameters (Chuang et al., 2023; Adila et al., 2024). However, improving the robustness of the foundation model itself is not the focus of our work. Instead, given any foundation model, regardless of its inherent robustness, we aim to construct an interpretable framework without sacrificing the utility, striving for performance that matches or exceeds that of the foundation model's feature-based predictions. Refer to Appendix A for extended related work.
+
+# 2 CONCEPT BOTTLENECK MODEL UNDER DISTRIBUTION SHIFTS
+
+# 2.1 BACKGROUND: FOUNDATION MODELS WITH A CONCEPT BOTTLENECK
+
+Consider a foundation model $\phi : \mathcal{X} \mapsto \mathbb{R}^d$ , which is any pre-trained backbone model or feature extractor (Eslami et al., 2023; Jia et al., 2021; Girdhar et al., 2023) that maps the input $\mathbf{x}$ to an intermediate feature embedding $\phi(\mathbf{x}) \in \mathbb{R}^d$ . $\phi(\mathbf{x})$ is pre-trained on a large-scale, broad mixture of data for general purposes, i.e., not restricted to a specific domain. For a specific downstream classification task, the general practice is to either apply zero-shot prediction on $\phi(\mathbf{x})$ , or to train a shallow label predictor $\mathbf{g}_s: \mathbb{R}^d \mapsto \mathbb{R}^L$ , that maps $\phi(\mathbf{x})$ to the un-normalized class predictions $\mathbf{g}_s(\phi(\mathbf{x}))$ , using a supervised loss (e.g., cross-entropy).
+
+A CBM (Koh et al., 2020) first projects the high-dimensional feature embedding to a lower $m$ -dimensional ( $m \ll d$ ) concept-score space (acting like a bottleneck), and follows it with a label predictor, which is a simple affine or fully-connected layer that maps the concept scores into class predictions. The concept bottleneck is represented by a matrix of $m$ unit-norm concept vectors $\mathbf{C}_s = [\mathbf{c}_{s1} / \| \mathbf{c}_{s1}\| _2\cdots \mathbf{c}_{sm} / \| \mathbf{c}_{sm}\| _2]^\top \in \mathbb{R}^{m\times d}$ , where each $\mathbf{c}_{si} \in \mathbb{R}^d$ represents a high-level concept (e.g., "stripes", "fin", "dots"). The $m$ concept scores are obtained via a linear projection $\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}) = \mathbf{C}_s\phi (\mathbf{x})$ , which is followed by a fully-connected layer to obtain the CBM model as
+
+$$
+\mathbf {f} _ {s} ^ {\left(\mathrm {c h m}\right)} (\mathbf {x}) := \mathbf {W} _ {s} \mathbf {v} _ {\mathbf {C} _ {s}} (\mathbf {x}) + \mathbf {b} _ {s} = \mathbf {W} _ {s} \mathbf {C} _ {s} \phi (\mathbf {x}) + \mathbf {b} _ {s} = \mathbf {g} _ {s} (\phi (\mathbf {x})) \tag {1}
+$$
+
+The label predictor $\mathbf{g}_s(\mathbf{z})$ is defined by the parameters $\mathbf{W}_s\in \mathbb{R}^{L\times m}$ , $\mathbf{b}_s\in \mathbb{R}^L$ , and $\mathbf{C}_s$ . A key advantage of the CBM is that its predictions are an affine combination of the high-level concept scores, which allows for better interpretability of the model. Since the label predictor of a CBM is chosen to be simple, its performance is strongly dependent on the construction of the concept bank. Additional details on the preparation of concept vectors can be found in Appendix A.
+
+# 2.2 DISTRIBUTION SHIFTS IN THE WILD
+
+We define the source domain $D_{s}$ and the target domain $D_{t}$ . Let $\mathcal{H}$ be a concept hypothesis class, defined as the space of measurable concept mappings $\mathbf{h}:\mathbb{R}^d\to \mathbb{R}^m$ from the feature representation $\phi (\mathbf{x})$ to concept scores. We also define the concept set $\mathcal{C} := \{c_1,c_2,\dots ,c_m\}$ , where each $c_{i}:\mathbb{R}^{d}\mapsto \mathbb{R}$ represents a high-level concept mapping (e.g., stripe pattern, grass, beach, etc.). For a domain $D_{j}$ , $j\in \{s,t\}$ , we define the concept score distribution as $\mathbb{P}_{\mathrm{con}}(D_j,\phi ,\mathbf{h}) = (\mathbf{h}\circ \phi)_*\mathbb{P}_j$ where $(\mathbf{h}\circ \phi)_* \mathbb{P}_j$ is the push-forward measure (Le Gall, 2022) of $\mathbb{P}_j$ under $\mathbf{h}\circ \phi$ . Note that $\mathbf{h}$ is determined by $\mathcal{C}$ such that $\mathbf{h}(\phi (\mathbf{x})) = [c_1(\phi (\mathbf{x})),\dots ,c_m(\phi (\mathbf{x}))]^T$ .
+
+Let $\mathcal{G}$ be a classification hypothesis class, defined as a set of measurable classifiers $\mathbf{g}:\mathbb{R}^m\to \mathbb{R}^L$ mapping the concept scores to prediction logits. Finally, we define the distribution of predictions as the push-forward measure of $\mathbb{P}_{\mathrm{con}}(D_j,\phi ,\mathbf{h})$ under $\mathbf{g}$ : $\mathbb{P}_{\mathrm{pred}}(D_j,\phi ,\mathbf{h},\mathbf{g}) = \mathbf{g}_*\mathbb{P}_{\mathrm{con}}(D_j,\phi ,\mathbf{h})$ .
+
+Given $\mathbf{h} \in \mathcal{H}$ and $\mathbf{g} \in \mathcal{G}$ , we categorize the distribution shifts in the target domain, $\{\mu_t(\mathbf{t}_i) > 0 \mid \mathbf{t}_i \in \mathcal{T}\}$ , into one of the following broad categories:
+
+1. Low-level shift: This type of transformation does not change the concept score distribution across the domains. Examples include additive Gaussian noise, blurring, and pixelization, which employ
+
+low-level changes to the input (e.g., CIFAR10-C (Hendrycks & Dietterich, 2019)):
+
+$$
+\mathbb {P} _ {\text {c o n}} \left(D _ {t}, \phi , \mathbf {h}\right) = \mathbb {P} _ {\text {c o n}} \left(D _ {s}, \phi , \mathbf {h}\right) \tag {2}
+$$
+
+Naturally, the resulting distribution of predictions based on the concept scores also remains the same across the domains, i.e., $\mathbb{P}_{\mathrm{pred}}(D_s,\phi ,\mathbf{h},\mathbf{g}) = \mathbb{P}_{\mathrm{pred}}(D_t,\phi ,\mathbf{h},\mathbf{g})$
+
+2. Concept-level shift: This type of transformation alters the concept score distribution, but not the prediction distribution across the domains. Examples include replacing water background with a land background in images (e.g., Waterbirds, Metashift (Sagawa et al., 2019; Liang & Zou, 2021)):
+
+$$
+\mathbb {P} _ {\mathrm {c o n}} (D _ {t}, \phi , \mathbf {h}) \neq \mathbb {P} _ {\mathrm {c o n}} (D _ {s}, \phi , \mathbf {h})
+$$
+
+$$
+\mathbb {P} _ {\text {p r e d}} \left(D _ {t}, \phi , \mathbf {h}, \mathbf {g}\right) = \mathbb {P} _ {\text {p r e d}} \left(D _ {s}, \phi , \mathbf {h}, \mathbf {g}\right) \tag {3}
+$$
+
+Definition 1 The concept set $\mathcal{C} = \{c_1, c_2, \ldots, c_m\}$ is complete if there exists a classifier $\mathbf{g} \in \mathcal{G}$ such that, for both low-level and concept-level shifts, the prediction distributions conditioned on the concepts are identical for source and target domains:
+
+$$
+\mathbb {P} _ {\text {p r e d}} \left(D _ {s}, \phi , \mathbf {h}, \mathbf {g}\right) = \mathbb {P} _ {\text {p r e d}} \left(D _ {t}, \phi , \mathbf {h}, \mathbf {g}\right). \tag {4}
+$$
+
+This implies that there exists a mapping from concept scores to labels encompassing both the source and target domains.
+
+# 2.3 FAILURE MODES OF CONCEPT BOTTLENECK FOR FOUNDATION MODELS
+
+Based on the definitions above, we categorize the possible failure modes of the decision-making pipeline of a foundation model equipped with a CBM, defined by a given $D_{s},D_{t},\phi ,\mathbf{h}\circ \phi = [c_{1}\circ \phi ,\dots ,c_{m}\circ \phi ]$ , and $\mathbf{g}$ as follows.
+
+1. Non-robust concept bottleneck under low-level shift: the concept mapping $\mathbf{h}$ is not robust to low-level shifts, causing discrepancies in the concept-level predictions:
+
+$$
+\mathbb {P} _ {\mathrm {c o n}} (D _ {t}, \phi , \mathbf {h}) \neq \mathbb {P} _ {\mathrm {c o n}} (D _ {s}, \phi , \mathbf {h}),
+$$
+
+violating the requirement for a low-level shift in Eqn. 2. Such discrepancies in the concept predictions can lead to degraded performance in $D_{t}$ , resulting from mismatched prediction distributions, i.e., $\mathbb{P}_{\mathrm{pred}}(D_t,\phi ,\mathbf{h},\mathbf{g})\neq \mathbb{P}_{\mathrm{pred}}(D_s,\phi ,\mathbf{h},\mathbf{g})$
+
+2. Non-robust classifier under concept-level shift: Given that the concept score distributions differ due to a concept-level shift as in Eqn. 3, the given classifier $\mathbf{g}$ fails to produce consistent prediction distributions across the domains, violating Eqn 3:
+
+$$
+\mathbb {P} _ {\text {p r e d}} \left(D _ {t}, \phi , \mathbf {h}, \mathbf {g}\right) \neq \mathbb {P} _ {\text {p r e d}} \left(D _ {s}, \phi , \mathbf {h}, \mathbf {g}\right)
+$$
+
+3. Incomplete concept set: The concept set $\{c_1, c_2, \ldots, c_m\}$ is not complete, and there does not exist any $\mathbf{g} \in \mathcal{G}$ such that $\mathbb{P}_{\mathrm{pred}}(D_s, \phi, \mathbf{h}, \mathbf{g}) = \mathbb{P}_{\mathrm{pred}}(D_t, \phi, \mathbf{h}, \mathbf{g})$ . Intuitively, it fails to capture all the necessary information for consistent predictions across domains, and Definition 1 is not achievable in the first place.
+
+# 3 CONDA: CONCEPT-BASED DYNAMIC ADAPTATION
+
+To address the failure modes of a CBM identified in the previous section, here we propose a dynamic approach for adaptation of a CBM based only on unlabeled test data. We follow the setting of test-time adaptation, where the foundation model $\phi (\mathbf{x})$ and CBM, consisting of the concept bank $\mathbf{C}_s$ and label predictor $(\mathbf{W}_s,\mathbf{b}_s)$ , trained on the source domain are given (see Eqn 1), but the source (training) dataset is not available. Let $\mathcal{D}_t = \{\mathbf{x}_{tn}\}_{n = 1}^{N_t}$ be the unlabeled test set from the target distribution. To address the three potential failure modes in a CBM pipeline identified in Section 2.3, we propose the following three-step adaptation procedure, with each step designed to tackle a specific failure mode:
+
+1. **Concept-Score Alignment (CSA):** The goal of this step is to perform a feature alignment of the concept scores of test inputs $\mathbf{v}_{\mathbf{C}}(\mathbf{x}_t) \in \mathbb{R}^m$ such that their class-conditional distributions are close to that of the concept scores in the source dataset. By adapting the concept vectors $\mathbf{C}$ , this will ensure that the label predictor continues to "see" very similar class-conditional input distributions at test time, thereby maintaining accurate predictions.
+
+
+Figure 2: Overview of CONDA, our proposed adaptation framework. The foundation model and CBM pipeline trained on the source domain is shown at the top, while the adapted CBM, consisting of a main branch and residual branch, is shown at the bottom. The components that are adapted during each stage of the proposed method (i.e., CSA, LPA, and RCB) are shown in different colors.
+
+2. Linear Probing Adaptation (LPA): To further address any discrepancy or mismatch in the feature alignment CSA step (e.g., due to distribution assumptions), here we adapt the label predictor $(\mathbf{W},\mathbf{b})$ of the CBM, with the concept vectors fixed at their updated values from the CSA step.
+3. Residual Concept Bottleneck (RCB): As discussed in Section 2.3, the concept bank from the source domain could be incomplete, and new concepts may be required to bridge the distribution gap between the domains. In this step, we introduce a residual CBM with additional concept vectors and a linear predictor, which are jointly optimized (with the parameters of the main CBM fixed) to improve the test accuracy.
+
+Target Domain CBM. Figure 2 shows the overall architecture of CONDA. The residual concept bottleneck is shown as a separate branch, where we introduce $r$ additional concept vectors $\widetilde{\mathbf{C}} = [\widetilde{\mathbf{c}}_1 / \| \widetilde{\mathbf{c}}_1\|_2 \cdots \widetilde{\mathbf{c}}_r / \| \widetilde{\mathbf{c}}_r\|_2]^\top \in \mathbb{R}^{r \times d}$ . The concept scores are obtained by projecting the feature representation $\phi(\mathbf{x})$ on these residual concept vectors, and the scores are passed to another linear predictor $(\widetilde{\mathbf{W}}, \widetilde{\mathbf{b}})$ to obtain the un-normalized class predictions (logits) of the residual CBM: $\widetilde{\mathbf{W}}\widetilde{\mathbf{C}}\phi(\mathbf{x}) + \widetilde{\mathbf{b}}$ . The un-normalized predictions of the target domain CBM are obtained by adding that of the main and the residual branch CBMs, giving
+
+$$
+\begin{array}{l} \mathbf {f} _ {t} ^ {\left(\mathrm {c b m}\right)} (\mathbf {x}) = \mathbf {W C} \phi (\mathbf {x}) + \mathbf {b} + \widetilde {\mathbf {W}} \widetilde {\mathbf {C}} \phi (\mathbf {x}) + \widetilde {\mathbf {b}} \\ = \left(\mathbf {W} \mathbf {C} + \widetilde {\mathbf {W}} \widetilde {\mathbf {C}}\right) \phi (\mathbf {x}) + \mathbf {b} + \widetilde {\mathbf {b}} = \mathbf {W} _ {\text {c o n}} \mathbf {C} _ {\text {c o n}} \phi (\mathbf {x}) + \mathbf {b} _ {\text {c o n}}, \tag {5} \\ \end{array}
+$$
+
+where $\widetilde{\mathbf{W}}\in \mathbb{R}^{L\times r}$ and $\widetilde{\mathbf{b}}\in \mathbb{R}^L$ . For comparison with the source domain CBM (Eqn. 1), we have defined the combined parameters from the main and residual branch CBMs as $\mathbf{W}_{\mathrm{con}} = [\mathbf{W}\widetilde{\mathbf{W}} ]\in$ $\mathbb{R}^{L\times (m + r)}$ , $\mathbf{C}_{\mathrm{con}} = [\mathbf{C};\widetilde{\mathbf{C}} ]\in \mathbb{R}^{(m + r)\times d}$ , and $\mathbf{b}_{\mathrm{con}} = \mathbf{b} + \widetilde{\mathbf{b}}\in \mathbb{R}^L$ . That is, adding the residual CBM is equivalent to introducing $r$ additional rows (columns) in the concept (weight) matrix. For adaptation, the parameters of the main CBM $\{\mathbf{C},\mathbf{W},\mathbf{b}\}$ are initialized to their corresponding values from the source domain, while the parameters of the residual CBM $\{\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}}\}$ are initialized randomly.
+
+Pseudo-labeling. Since the test samples are unlabeled, it becomes challenging to design adaptation objectives that can minimize a smooth proxy of the classification error rate on the target distribution. We utilize the idea of pseudo-labeling to address this, as commonly done in the TTA and semi-supervised learning literature (Chen et al., 2022; Lee et al., 2013; Sohn et al., 2020). We leverage the fact that the feature extraction backbone $\phi(\mathbf{x})$ is a foundation model that is pre-trained on diverse data distributions, and as a result is likely to be relatively robust to distribution shifts. We take an ensemble of the commonly used zero-shot predictor (as done e.g., in Radford et al. (2021)) and a linear probing predictor (trained on the source dataset on top of the foundation model) to get the pseudo-labels for test samples. We combine the two by taking the class predicted with higher confidence across
+
+both predictors. We note that more advanced pseudo-labeling methods e.g., involving weak- and strong-augmentations, and soft nearest-neighbor voting (Chen et al., 2022) can be used to potentially improve our method (see Appendix D for further exploration).
+
+Following the convention in the TTA literature (Wang et al., 2021; Chen et al., 2022), we randomly split the test data into fixed-size batches $\mathcal{D}_t = \bigcup_{b=1}^B \mathcal{D}_t^b$ , and perform adaptation sequentially on each batch $b$ , obtaining the adapted model's predictions on the same batch, before moving to the next one. Also, the CBM parameters (main and residual) are adapted in an online fashion (not episodically) (Wang et al., 2021), i.e., the adapted parameters learned from a batch are used to initialize the next batch and so on4. For convenience, we define the test dataset with paired pseudolabels as $\widehat{\mathcal{D}}_t = \{(\mathbf{x}_{tn}, \widehat{y}_{tn})\}_{n=1}^{N_t}$ , and the corresponding pseudo-labeled test batches as $\widehat{\mathcal{D}}_t^b$ , $b \in [B]$ . We next expand on each stage of the CBM adaptation outlined earlier, and provide a complete algorithm for the same in Algorithm 1 in the Appendix.
+
+# 3.1 CONCEPT SCORE ALIGNMENT
+
+From Figure 2 (top half) and Eqn. 1, the concept scores $\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}) \in \mathbb{R}^m$ are input to the linear label predictor $\mathbf{W}_s\mathbf{v} + \mathbf{b}_s$ . Let $\{\mathbb{P}(\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}_s) | y_s = y), y \in \mathcal{V}\}$ be the class-conditional distributions of these concept scores on the source domain. At test time, if the distribution of the input changes such that $\mathbf{x}_t \sim p_t(\mathbf{x})$ , then there is a corresponding change in the class-conditional distributions of concept scores $\{\mathbb{P}(\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}_t) | y_t = y) = \mathbb{P}(\mathbf{C}_s\phi(\mathbf{x}_t) | y_t = y), y \in \mathcal{V}\}$ . The goal of concept-score alignment (CSA) is to adapt the source domain concept bank $\mathbf{C}_s$ to a target domain-specific one $\mathbf{C}_t$ such that the class-conditional distributions after adaptation are close to that of the source domain under some distributional distance (e.g., Kullback-Leibler or Total-variation). Informally, we wish to find an adapted concept bank $\mathbf{C}_t$ , starting from $\mathbf{C}_s$ , such that
+
+$$
+\mathbb {P} \left(\mathbf {C} _ {t} \phi (\mathbf {x} _ {t}) \mid y _ {t} = y\right) \approx \mathbb {P} \left(\mathbf {C} _ {s} \phi (\mathbf {x} _ {s}) \mid y _ {s} = y\right), \forall y \in \mathcal {Y}.
+$$
+
+If the class priors $\{\mathbb{P}(y_t = y),\forall y\}$ do not change significantly, this can ensure that the label predictor of the main CBM continues to receive concept scores from a similar distribution as the source domain.
+
+We model the class-conditional distributions of the concept scores in the source domain as multivariate Gaussians: $\mathbb{P}(\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}_s) | y_s = y) = \mathcal{N}(\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}_s); \boldsymbol{\mu}_y, \boldsymbol{\Sigma}_y), \forall y \in \mathcal{Y}$ . Given a labeled source-domain dataset, it is straightforward to estimate $\boldsymbol{\mu}_y$ and $\boldsymbol{\Sigma}_y$ using the sample mean and sample covariance of $\mathbf{v}_{\mathbf{C}_s}(\mathbf{x}_s)$ on the data subset from class $y$ (max-likelihood estimate). Although we cannot access the source domain dataset during adaptation, we assume to have access to these distribution statistics $\{(\boldsymbol{\mu}_y, \boldsymbol{\Sigma}_y)\}_{y \in \mathcal{Y}}$ . At test time, changes to the distribution of the concept scores can be captured by a concept matrix $\mathbf{C}$ (to be adapted). For a test input $\mathbf{x}_t$ , the distance of its concept scores $\mathbf{v}_{\mathbf{C}}(\mathbf{x}_t)$ from the Gaussian distribution of class $y$ is given by the Mahalanobis metric $D_{\mathrm{mah}}(\mathbf{x}_t; \boldsymbol{\mu}_y, \boldsymbol{\Sigma}_y) = (\mathbf{v}_{\mathbf{C}}(\mathbf{x}_t) - \boldsymbol{\mu}_y)^{\top} \boldsymbol{\Sigma}_y^{-1} (\mathbf{v}_{\mathbf{C}}(\mathbf{x}_t)) - \boldsymbol{\mu}_y$ .
+
+Intra-class and Inter-class Distances. Taking the pseudo-label $\widehat{y}_t$ as a proxy for the true label of $\mathbf{x}_t$ , the intra-class (or within-class) distance measures the closeness of $\mathbf{x}_t$ to samples from its own class, while the inter-class (or between-class) distance measures the separation of $\mathbf{x}_t$ to samples from the other classes. They are defined as follows:
+
+$$
+D _ {\text {i n t r a}} \left(\mathbf {x} _ {t}, \hat {y} _ {t}\right) = D _ {\text {m a h}} \left(\mathbf {x} _ {t}; \boldsymbol {\mu} _ {\hat {y} _ {t}}, \boldsymbol {\Sigma} _ {\hat {y} _ {t}}\right) \quad \text {a n d} \tag {6}
+$$
+
+$$
+D _ {\text {i n t e r}} \left(\mathbf {x} _ {t}, \widehat {y} _ {t}\right) = \frac {1}{L - 1} \sum_ {\ell = 1: \ell \neq \widehat {y} _ {t}} ^ {L} D _ {\text {m a h}} \left(\mathbf {x} _ {t}; \boldsymbol {\mu} _ {\ell}, \boldsymbol {\Sigma} _ {\ell}\right). \tag {7}
+$$
+
+Motivated by class-aware feature alignment CAFA (Jung et al., 2023), we explore an adaptation loss $\ell_{ada}$ that is specifically designed to achieve concept-score alignment on a per-class level. This loss is based on the idea that for discriminative feature alignment, the intra-class distances should be small and the inter-class distances should be large on the test samples (Ye et al., 2021; Ming et al., 2023).
+
+$$
+\ell_ {a d a} \left(\mathbf {v} _ {\mathbf {C}} \left(\mathbf {x} _ {t}\right), \widehat {y} _ {t}\right) = \log \frac {D _ {\text {i n t r a}} \left(\mathbf {x} _ {t} , \widehat {y} _ {t}\right)}{D _ {\text {i n t e r}} \left(\mathbf {x} _ {t} , \widehat {y} _ {t}\right)}. \tag {8}
+$$
+
+With this setup, we propose the adaptation objective for CSA to minimize on a test batch:
+
+$$
+L _ {\mathrm {C S A}} (\mathbf {C}) = \frac {1}{\left| \widehat {\mathcal {D}} _ {t} ^ {b} \right|} \sum_ {\left(\mathbf {x} _ {t}, \widehat {y} _ {t}\right) \in \widehat {\mathcal {D}} _ {t} ^ {b}} \ell_ {a d a} \left(\mathbf {v} _ {\mathbf {C}} \left(\mathbf {x} _ {t}\right), \widehat {y} _ {t}\right) + \lambda_ {\text {f r o b}} \| \mathbf {C} - \mathbf {C} _ {s} \| _ {F} ^ {2}. \tag {9}
+$$
+
+The second term is a regularization on how much the concept vectors can deviate from their source domain values in terms of the Frobenius norm.
+
+# 3.2 LINEAR PROBING ADAPTATION
+
+In this step, we focus on improving the test accuracy of the label predictor of the main CBM branch $(\mathbf{W},\mathbf{b})$ , with the concept vectors $\mathbf{C}$ fixed at their updated values from the CSA step (the residual CBM parameters are also frozen). For this, we use the cross-entropy loss between the predictions of the target domain CBM (Eqn. 5) and the pseudo-labels of a test batch $\widehat{\mathcal{D}}_t^b$ . In order to enhance the interpretability of the label predictor, we impose sparsity and grouping effect in its weights via an Elastic-net penalty term (Zou & Hastie, 2005; Yuksekgonul et al., 2023) given by
+
+$$
+L _ {\text {s p a r s e}} (\mathbf {W}) = \frac {1}{m L} \sum_ {\ell = 1} ^ {L} \left(\alpha \| \mathbf {w} _ {\ell} \| _ {1} + (1 - \alpha) \| \mathbf {w} _ {\ell} \| _ {2} ^ {2}\right), \tag {10}
+$$
+
+where $\mathbf{w}_{\ell} \in \mathbb{R}^{m}$ is the $\ell$ -th row of $\mathbf{W}$ , and $\alpha = 0.99$ . The adaptation objective for LPA is given by
+
+$$
+L _ {\mathrm {L P A}} (\mathbf {W}, \mathbf {b}) = - \frac {1}{\left| \widehat {\mathcal {D}} _ {t} ^ {b} \right|} \sum_ {\left(\mathbf {x} _ {t}, \widehat {y} _ {t}\right) \in \widehat {\mathcal {D}} _ {t} ^ {b}} \log \sigma_ {\widehat {y} _ {t}} \left(\mathbf {f} _ {t} ^ {\left(\mathrm {c b m}\right)} \left(\mathbf {x} _ {t}\right)\right) + \lambda_ {\text {s p a r s e}} L _ {\text {s p a r s e}} (\mathbf {W}), \tag {11}
+$$
+
+where $\sigma_{k}(\mathbf{r})$ is the Softmax probability for class $k$ given the logits $\mathbf{r}$ , and $\lambda_{\mathrm{sparse}} \geq 0$ is a sparsity regularization hyper-parameter. Using this objective, the label predictor is adapted such that the CBM's predictions on a test batch are consistent with their pseudo-labels.
+
+# 3.3 RESIDUAL CONCEPT BOTTLENECK
+
+We next discuss adaptation of the residual branch of the CBM whose parameters are $\{\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}}\}$ . The $r$ additional concept vectors in $\widetilde{\mathbf{C}}$ are expected to capture new concepts in the target data and compensate for the potentially incomplete coverage of the main CBM (see Section 2.3). By increasing the expressiveness of the concept subspace, we expect to improve the accuracy on the target dataset beyond the CSA and LPA steps. Therefore, we first have a cross-entropy loss term in this adaptation objective (as in Eqn. 11). We also introduce a cosine similarity based regularization in the objective to encourage the new concept vectors in $\widetilde{\mathbf{C}}$ to be less redundant with each other, and to have less overlap with the existing concept vectors $\mathbf{C}$ (obtained from the CSA step).
+
+$$
+L _ {\text {s i m}} (\widetilde {\mathbf {C}}) = \frac {1}{m r} \sum_ {i \in [ m ]} \sum_ {j \in [ r ]} \cos \left(\mathbf {c} _ {i}, \widetilde {\mathbf {c}} _ {j}\right) + \frac {2}{r (r - 1)} \sum_ {\substack {(i, j) \in [ r ] ^ {2}: \\ j > i}} \cos \left(\widetilde {\mathbf {c}} _ {i}, \widetilde {\mathbf {c}} _ {j}\right). \tag{12}
+$$
+
+Finally, we include a coherency regularization term in the objective (modified from Yeh et al. (2020)) to improve the interpretability of the learned residual concepts, given by
+
+$$
+L _ {\mathrm {c o h}} (\widetilde {\mathbf {C}}) = \frac {1}{r k} \sum_ {i \in [ r ]} \sum_ {\mathbf {x} _ {t} \in T _ {\widetilde {\mathbf {c}} _ {i}}} \frac {\left\langle \widetilde {\mathbf {c}} _ {i} , \phi (\mathbf {x} _ {t}) \right\rangle}{\| \widetilde {\mathbf {c}} _ {i} \| _ {2}}, \tag {13}
+$$
+
+where $T_{\widetilde{\mathbf{c}}_i}$ is the subset of the current target batch $\mathcal{D}_t^b$ that has the $k$ -largest concept scores for residual concept vector $\widetilde{\mathbf{c}}_i$ (i.e., the top- $k$ nearest neighbors of $\widetilde{\mathbf{c}}_i$ among the feature representations from $\mathcal{D}_t^b$ ). The objective to be minimized for adapting the residual concept bottleneck (with the parameters of the main CBM branch frozen) is given by:
+
+$$
+L _ {\mathrm {R C B}} (\widetilde {\mathbf {C}}, \widetilde {\mathbf {W}}, \widetilde {\mathbf {b}}) = - \frac {1}{\left| \widehat {\mathcal {D}} _ {t} ^ {b} \right|} \sum_ {(\mathbf {x} _ {t}, \widehat {y} _ {t}) \in \widehat {\mathcal {D}} _ {t} ^ {b}} \log \sigma_ {\widehat {y} _ {t}} \left(\mathbf {f} _ {t} ^ {\left(\mathrm {c b m}\right)} \left(\mathbf {x} _ {t}\right)\right) + \lambda_ {\mathrm {s i m}} L _ {\mathrm {s i m}} (\widetilde {\mathbf {C}}) - \lambda_ {\mathrm {c o h}} L _ {\mathrm {c o h}} (\widetilde {\mathbf {C}}). \tag {14}
+$$
+
+The constants $\lambda_{\mathrm{sim}} \geq 0$ and $\lambda_{\mathrm{coh}} \geq 0$ are hyper-parameters that control the strength of the regularization terms. Note that for the residual CBM, we jointly adapt $\widetilde{\mathbf{C}}$ and $\widetilde{\mathbf{W}}$ , $\widetilde{\mathbf{b}}$ , because we have a common objective of increasing the test accuracy, whereas for the main CBM, adaptation is done in two stages (CSA and LPA), with CSA focusing on distribution alignment of the concept scores based on the intra-class and inter-class distances. Additional details on our method are given in Appendix B. This includes 1) complexity analysis and evaluation of running times of CONDA; and 2) automatic annotation (captioning) of the adapted and residual concept vectors for interpretability analysis.
+
+# 4 EXPERIMENTS
+
+In this section, we conduct experiments to answer the following three research questions:
+
+RQ1: How effective is CONDA in improving the test-time performance of deployed classification pipelines that use a foundation models with a concept bottleneck predictor?
+RQ2: How does each component of CONDA specifically address and remedy the failures caused by different types of distribution shifts?
+RQ3: How do the concept-based explanations change before and after test-time adaptation?
+
+# 4.1 SETUP
+
+Datasets. We evaluate the performance of concept bottlenecks for FMs and the proposed adaptation on five real-world datasets with distribution shifts, following the setup in Lee et al. (2023): (1) CIFAR10 to CIFAR10-C and CIFAR100 to CIFAR100-C for low-level shift, (2) Waterbirds and Metashift for concept-level shift, and (3) Camelyon17 for natural shift.
+
+Backbone Foundation Models. For the CIFAR datasets, we use CLIP:ViT-L/14 (FARE $^2$ ) (Schlarmann et al., 2024), which is adversarially fine-tuned to be more robust to (adversarial) low-level perturbations than standard CLIP variants. We employ CLIP:ViT-L/14 (Radford et al., 2021) for Waterbirds and Metashift. For Camelyon17, we utilize BioMedCLIP (Zhang et al., 2023), which is pre-trained on diverse medical domains to understand medical images and text jointly, making it suitable for zero-shot tasks in the medical domain.
+
+Preparing the Concept Bottleneck. We evaluate CONDA using three popular approaches for constructing the concept bottleneck: (1) using a general-purpose concept bank where natural language concept descriptions and modern vision-language models (e.g., Stable Diffusion (Rombach et al., 2022)) are leveraged to automatically generate concept examples for finding concept vectors (Yuksekgonul et al., 2023; Wu et al., 2023b); (2) unsupervised learned concepts where concept vectors are learned via optimization to maximize the concept-based prediction accuracy (Yeh et al., 2020); and (3) employing GPT-3 with appropriate filtering to discover a tailored set of concepts for the bottleneck (Oikarinen et al., 2023). More details can be found in Appendix A and Appendix C.2.
+
+Metrics. We report the performance in terms of two metrics: averaged group accuracy (AVG) and worst-group accuracy (WG). AVG is the average (per-class) accuracy across the classes, and WG is the minimum (per-class) accuracy across the classes.
+
+# 4.2 RQ1: EFFECTIVENESS OF CONDA UNDER REAL-WORLD DISTRIBUTION SHIFTS
+
+Table 1 presents our main results evaluating the effectiveness of CONDA on different real-world distribution shifts, when combined with different CBM baselines. First of all, we observe that leveraging the expressive power of the FM feature representations can enhance the performance of CBMs. For example, using the method from Oikarinen et al. (2023), their reported accuracies on CIFAR10 and CIFAR100 are $86.40\%$ and $65.13\%$ respectively when using the CLIP-RN50 backbone. In our experiments, by employing the adversarially fine-tuned CLIP-ViT-L/14, we achieve higher accuracies of $95.24\%$ and $68.36\%$ respectively (source domain). This demonstrates the potential for improved utility in concept-based interpretable pipelines as foundation models continue to improve.
+
+However, this improved performance in the source domain often does not translate to robustness after deployment. Under low-level shifts, the performance of CBMs may be comparable to that of
+
+
Dataset
ZS
LP
Yuksekgonul et al. (2023)
Yeh et al. (2020)
Oikarinen et al. (2023)
Unadapted
w/ CONDA
Unadapted
w/ CONDA
Unadapted
w/ CONDA
CIFAR10
Source
AVG
91.18
93.26 ± 0.02
92.55 ± 0.05
-
96.26 ± 0.11
-
95.24 ± 0.08
-
WG
71.1
88.23 ± 0.08
85.64 ± 0.55
-
90.89 ± 0.97
-
90.11 ± 0.76
-
Target
AVG
66.68 ± 15.88
84.11 ± 1.54
82.61 ± 1.65
84.38 ± 1.52
89.76 ± 1.10
85.14 ± 1.29
81.22 ± 2.77
84.56 ± 3.11
WG
55.04 ± 2.05
71.37 ± 3.33
68.62 ± 2.93
72.69 ± 2.49
78.28 ± 2.43
76.09 ± 1.66
69.03 ± 2.47
72.88 ± 2.01
CIFAR100
Source
AVG
62.73
66.67 ± 0.29
65.98 ± 0.10
-
83.87 ± 0.04
-
68.36 ± 0.09
-
WG
5.12
4.28 ± 0.51
9.5 ± 1.14
-
51.0 ± 1.40
-
12.09 ± 1.23
-
Target
AVG
51.90 ± 1.76
55.30 ± 1.63
51.53 ± 0.13
53.88 ± 0.23
72.33 ± 0.15
70.82 ± 0.20
52.16 ± 0.14
54.79 ± 1.17
WG
1.73 ± 0.4
2.47 ± 0.49
2.80 ± 0.71
2.56 ± 0.27
30.60 ± 1.42
28.44 ± 0.95
6.32 ± 0.38
6.01 ± 0.22
Waterbirds
Source
AVG
82.61
97.43 ± 0.05
97.78 ± 0.16
-
98.80 ± 0.04
-
98.80 ± 0.17
-
WG
67.45
95.08 ± 0.11
96.31 ± 0.38
-
98.21 ± 0.08
-
97.03 ± 0.26
-
Target
AVG
61.06
54.10 ± 0.55
32.03 ± 0.58
60.69 ± 0.23
45.03 ± 0.34
61.11 ± 0.09
46.18 ± 0.42
62.71 ± 0.33
WG
42.52
44.70 ± 0.70
27.80 ± 1.24
43.01 ± 0.46
38.74 ± 0.68
41.86 ± 0.25
35.29 ± 1.52
44.01 ± 0.60
Metashift
Source
AVG
95.72
97.27 ± 0.28
97.94 ± 0.10
-
97.18 ± 0.01
-
98.02 ± 0.10
-
WG
93.44
96.62 ± 0.39
96.94 ± 0.30
-
96.0 ± 0.01
-
97.25 ± 0.10
-
Target
AVG
94.65
80.39 ± 0.42
84.45 ± 1.39
93.69 ± 0.20
90.53 ± 0.09
93.81 ± 0.13
83.72 ± 2.21
93.90 ± 0.13
WG
92.81
65.33 ± 0.61
73.89 ± 3.21
92.02 ± 0.12
84.84 ± 0.20
91.41 ± 0.26
75.41 ± 1.68
91.77 ± 0.12
Camelyon17
Source
AVG
77.71
92.14 ± 0.01
89.07 ± 0.60
-
97.01 ± 0.05
-
94.19 ± 0.11
-
WG
69.73
88.89 ± 0.02
84.34 ± 1.39
-
96.31 ± 0.24
-
91.23 ± 0.12
-
Target
AVG
84.55
93.69 ± 0.01
89.71 ± 0.65
91.20 ± 0.06
95.01 ± 0.07
92.54 ± 0.16
91.75 ± 0.08
93.16 ± 0.05
WG
76.08
89.49 ± 0.02
85.96 ± 0.88
88.96 ± 0.16
93.07 ± 0.37
91.07 ± 0.32
87.24 ± 0.09
89.00 ± 0.07
+
+Table 1: Performance of CONDA on different distribution shifts when combined with different CBMs. Zero-shot (ZS) and Linear probing (LP) are the non-interpretable FM baselines. Low-level shifts are covered by the CIFAR datasets, concept-level shifts by Waterbirds and Metashift, and natural shifts by the Camelyon17 benchmark. CONDA significantly improves the AVG and WG accuracy on the target domain in many scenarios.
+
+
+Figure 3: Effectiveness of individual components of CONDA for the CBM method of Yuksekgonul et al. (2023). We report the relative AVG and WG, which is the (acc. after adaptation) - (acc. before adaptation).
+
+
+
+the non-interpretable counterparts (ZS and LP), but they are not inherently more robust to low-level shifts. The performance drop is particularly severe under concept-level shifts when the CBM is not adapted. But with adaptation using CONDA, the test-time accuracy under different distribution shifts increases significantly in most cases. The performance is on par with or even surpasses that of the non-interpretable methods, notably in terms of the WG accuracy.
+
+# 4.3 RQ2: EFFECTIVENESS OF INDIVIDUAL COMPONENTS OF CONDA
+
+We next analyze the individual contributions of the components in CONDA, viz. CSA, LPA, and RCB. Figure 3 illustrates the relative AVG and WG (\%) when adapting the CBM of Yeh et al. (2020). Under low-level shifts, CSA plays a crucial role in performance improvement by encouraging the high-level concept scores to remain similar. Interestingly, using CSA alone even surpasses the performance achieved when all components are combined. This trend is also observed with the Camelyon17 dataset, which resembles a low-level shift due to lighting differences across hospitals. On the other hand, under concept-level shifts, LPA and RCB become the key components of adaptation. These components allow the model to adjust concept reliance to the target domain and address the incompleteness of the deployed concept set, tailoring it to the target data. In this context, CSA has minimal impact, while using only LPA leads to performance gains comparable to, or even exceeding that achieved when all components are included.
+
+This phenomenon aligns with the findings of Lee et al. (2023) that fine-tuning only a subset of layers can be more effective than fine-tuning all layers, depending on the type of distribution shift. In our case, the concept-based prediction pipeline can be considered a special instance of their framework with a two-layer classifier. The concept bottleneck layer corresponds to the first layer, which is
+
+
+(a) Before adaptation (source)
+
+
+(b) After adaptation (target)
+Figure 4: CONDA adapts the concept weights to be tailored to the target data. We visualize the positive weights in the linear probing layer (width of each mapping) before vs. after applying CONDA to the PCBM baseline (Yuksekgonul et al., 2023) on the Waterbirds dataset.
+
+particularly important for addressing input-level shifts (following their definition), while the linear probing layer corresponds to the second layer, which is more important for handling output-level shifts (see Section 3 of their paper). These empirical observations confirm our design motivation for CONDA, i.e., different components play key roles in adapting to different types of distribution shifts.
+
+Additional results, including ablation experiments to understand the effect of hyper-parameters, improved pseudo-labeling methods, and the choice of backbone foundation model are given in Appendix D. They provide additional support for the strong empirical performance of CONDA.
+
+# 4.4 RQ3: INTERPRETABILITY OF CONDA
+
+We investigate how the concept-based explanations change through adaptation by CONDA on the Waterbirds dataset. In Figure 4a, we present the top five most prominent concepts contributing to the predictions for each class. As expected, in the source domain, land-related concepts are most important for predicting "landbird", and do not positively contribute to "waterbird"; and vice versa for water-related concepts. After adapting to the target domain (test dataset), we observe adjustments in the concept-to-class mappings. Notably, land-related concepts begin to positively contribute to the prediction of "waterbird". This shift indicates that CONDA successfully adapts the concept-based explanations to reflect the new correlations observed in the target domain. Moreover, in the original concept bottleneck constructed following Wu et al. (2023b), there were no bird-related concepts that could help make robust predictions independent of spurious background correlations. By employing RCB with five residual concepts, we identified that three of them correspond to bird-related concepts: feathers, wings, and beak5. This demonstrates that CONDA adapts in a manner aligned with human intuition, just like a human intervening in a CBM to correct its predictions would. More importantly, RCB captures concepts that may have been missed during the initial construction of the concept bottleneck, enhancing both the interpretability and robustness. Additional results and analysis of the interpretability of CONDA can be found in Appendix E.
+
+# 5 CONCLUSIONS AND FUTURE WORK
+
+In this work, we made a first effort at exploring the test-time (post-deployment) performance of CBMs combined with foundation models. We formalized potential failure modes under low-level and concept-level distribution shifts and proposed a novel test-time adaptation framework. Each component of our framework is designed to address specific failure modes, effectively improving the test-time performance of a deployed CBM. Limitations and future work are discussed in Appendix F.
+
+# ACKNOWLEDGMENTS
+
+Jihye Choi, Jayaram Raghuram and Somesh Jha are partially supported by DARPA under agreement number 885000, NSF CCF-FMiTF-1836978 and ONR N00014-21-1-2492. Yixuan Li is supported by the AFOSR Young Investigator Program under award number FA9550-23-1-0184, NSF IIS-2237037, NSF IIS-2331669, and Office of Naval Research under grant number N00014-23-1-2643.
+
+# REFERENCES
+
+Abubakar Abid, Mert Yuksekgonul, and James Zou. Meaningfully debugging model mistakes using conceptual counterfactual explanations. In International Conference on Machine Learning, pp. 66-88. PMLR, 2022.
+Julius Adebayo, Michael Muelly, Ilaria Liccardi, and Been Kim. Debugging tests for model explanations. In Proceedings of the 34th International Conference on Neural Information Processing Systems, pp. 700-712, 2020.
+Dyah Adila, Changho Shin, Linrong Cai, and Frederic Sala. Zero-shot robustification of zero-shot models. In The Twelfth International Conference on Learning Representations, 2024.
+Ehab A AlBadawy, Ashirbani Saha, and Maciej A Mazurowski. Deep learning for segmentation of brain tumors: Impact of cross-institutional training and testing. Medical physics, 45(3):1150-1158, 2018.
+David Bau, Bolei Zhou, Aditya Khosla, Aude Oliva, and Antonio Torralba. Network dissection: Quantifying interpretability of deep visual representations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 6541-6549, 2017.
+Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. CoRR, abs/2108.07258, 2021.
+Dian Chen, Dequan Wang, Trevor Darrell, and Sayna Ebrahimi. Contrastive test-time adaptation. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 295-305. IEEE, 2022. doi: 10.1109/CVPR52688.2022.00039.
+Jihye Choi, Jayaram Raghuram, Ryan Feng, Jiefeng Chen, Somesh Jha, and Atul Prakash. Concept-based explanations for out-of-distribution detectors. In International Conference on Machine Learning, pp. 5817-5837. PMLR, 2023.
+Ching-Yao Chuang, Varun Jampani, Yuanzhen Li, Antonio Torralba, and Stefanie Jegelka. Debiasing vision-language models via biased prompts. arXiv preprint arXiv:2302.00070, 2023.
+Sedigheh Eslami, Christoph Meinel, and Gerard De Melo. PubMedCLIP: How much does CLIP benefit visual question answering in the medical domain? In Findings of the Association for Computational Linguistics: EACL 2023, pp. 1151-1163, 2023.
+Rohit Girdhar, Alaaeldin El-Nouby, Zhuang Liu, Mannat Singh, Kalyan Vasudev Alwala, Armand Joulin, and Ishan Misra. Imagebind: One embedding space to bind them all. In CVPR, 2023.
+Marton Havasi, Sonali Parbhoo, and Finale Doshi-Velez. Addressing leakage in concept bottleneck models. Advances in Neural Information Processing Systems, 35:23386-23397, 2022.
+Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. Proceedings of the International Conference on Learning Representations, 2019.
+Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In International conference on machine learning, pp. 4904-4916. PMLR, 2021.
+Sanghun Jung, Jungsoo Lee, Nanhee Kim, Amirreza Shaban, Byron Boots, and Jaegul Choo. CAFA: Class-aware feature alignment for test-time adaptation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 19060-19071, 2023.
+Been Kim, Martin Wattenberg, Justin Gilmer, Carrie Cai, James Wexler, Fernanda Viegas, et al. Interpretability beyond feature attribution: Quantitative testing with concept activation vectors (TCAV). In International conference on machine learning, pp. 2668-2677. PMLR, 2018.
+
+Pang Wei Koh, Thao Nguyen, Yew Siang Tang, Stephen Mussmann, Emma Pierson, Been Kim, and Percy Liang. Concept bottleneck models. In Hal Daumé III and Aarti Singh (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 5338-5348. PMLR, 13-18 Jul 2020.
+Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang. Fine-tuning can distort pretrained features and underperform out-of-distribution. In International Conference on Learning Representations, 2022.
+Jean-François Le Gall. Measure theory, Probability, and Stochastic Processes. Springer, 2022.
+Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on challenges in representation learning, ICML, volume 3, pp. 896. Atlanta, 2013.
+Yoonho Lee, Annie S. Chen, Fahim Tajwar, Ananya Kumar, Huaxiu Yao, Percy Liang, and Chelsea Finn. Surgical fine-tuning improves adaptation to distribution shifts. In The Eleventh International Conference on Learning Representations, ICLR. OpenReview.net, 2023.
+Jian Liang, Ran He, and Tieniu Tan. A comprehensive survey on test-time adaptation under distribution shifts. CoRR, abs/2303.15361, 2023. doi: 10.48550/ARXIV.2303.15361.
+Weixin Liang and James Zou. Metashift: A dataset of datasets for evaluating contextual distribution shifts and training conflicts. In International Conference on Learning Representations, 2021.
+Yifei Ming, Yiyou Sun, Ousmane Dia, and Yixuan Li. How to exploit hyperspherical embeddings for out-of-distribution detection? In The Eleventh International Conference on Learning Representations (ICLR). OpenReview.net, 2023.
+Mazda Moayeri, Keivan Rezaei, Maziar Sanjabi, and Soheil Feizi. Text-to-concept (and back) via cross-model alignment. In International Conference on Machine Learning, pp. 25037-25060. PMLR, 2023.
+Zachary Nado, Shreyas Padhy, D Sculley, Alexander D'Amour, Balaji Lakshminarayanan, and Jasper Snoek. Evaluating prediction-time batch normalization for robustness under covariate shift. arXiv preprint arXiv:2006.10963, 2020.
+Tuomas Oikarinen and Tsui-Wei Weng. CLIP-Dissect: Automatic description of neuron representations in deep vision networks. In The Eleventh International Conference on Learning Representations, 2023.
+Tuomas Oikarinen, Subhro Das, Lam M. Nguyen, and Tsui-Wei Weng. Label-free concept bottleneck models. In The Eleventh International Conference on Learning Representations, 2023.
+Joaquin Quinonero-Candela, Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. Dataset shift in machine learning. Mit Press, 2022.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748-8763. PMLR, 2021.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684-10695, 2022.
+Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks. In International Conference on Learning Representations, 2019.
+Christian Schlarmann, Naman Deep Singh, Francesco Croce, and Matthias Hein. Robust CLIP: Unsupervised adversarial fine-tuning of vision embeddings for robust large vision-language models. In *Forty-first International Conference on Machine Learning (ICML)*. OpenReview.net, 2024.
+Chenming Shang, Shiji Zhou, Hengyuan Zhang, Xinzhe Ni, Yujiu Yang, and Yuwang Wang. Incremental residual concept bottleneck models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11030-11040, 2024.
+Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. FixMatch: Simplifying semi-supervised learning with consistency and confidence. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems (NeurIPS), 2020.
+
+Robyn Speer, Joshua Chin, and Catherine Havasi. Conceptnet 5.5: An open multilingual graph of general knowledge. In Proceedings of the AAAI conference on artificial intelligence, volume 31, 2017.
+Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. Test-time training with self-supervision for generalization under distribution shifts. In International conference on machine learning, pp. 9229-9248. PMLR, 2020.
+Bowen Wang, Liangzhi Li, Yuta Nakashima, and Hajime Nagahara. Learning bottleneck concepts in image classification. In Proceedings of the IEEE/cvf conference on computer vision and pattern recognition, pp. 10962-10971, 2023.
+Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations, 2021.
+Zifeng Wang, Zhenbang Wu, Dinesh Agarwal, and Jimeng Sun. Medclip: Contrastive learning from unpaired medical images and text. arXiv preprint arXiv:2210.10163, 2022.
+Shijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhanjan Kambadur, David Rosenberg, and Gideon Mann. Bloomberggpt: A large language model for finance. arXiv preprint arXiv:2303.17564, 2023a.
+Shirley Wu, Mert Yuksekgonul, Linjun Zhang, and James Zou. Discover and cure: Concept-aware mitigation of spurious correlation. arXiv preprint arXiv:2305.00650, 2023b.
+Haotian Ye, Chuanlong Xie, Tianle Cai, Ruichen Li, Zhenguo Li, and Liwei Wang. Towards a theoretical framework of out-of-distribution generalization. Advances in Neural Information Processing Systems, 34: 23519-23531, 2021.
+Chih-Kuan Yeh, Been Kim, Sercan Arik, Chun-Liang Li, Tomas Pfister, and Pradeep Ravikumar. On completeness-aware concept-based explanations in deep neural networks. Advances in neural information processing systems, 33:20554-20565, 2020.
+Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 2636-2645, 2020.
+Mert Yuksekgonul, Maggie Wang, and James Zou. Post-hoc concept bottleneck models. In The Eleventh International Conference on Learning Representations, 2023.
+Marvin Zhang, Sergey Levine, and Chelsea Finn. MEMO: Test time robustness via adaptation and augmentation. Advances in neural information processing systems, 35:38629-38642, 2022.
+Sheng Zhang, Yanbo Xu, Naoto Usuyama, Hanwen Xu, Jaspreet Bagga, Robert Tinn, Sam Preston, Rajesh Rao, Mu Wei, Naveen Valluri, et al. Biomedclip: a multimodal biomedical foundation model pretrained from fifteen million scientific image-text pairs. arXiv preprint arXiv:2303.00915, 2023.
+Hui Zou and Trevor Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society Series B: Statistical Methodology, 67(2):301-320, 2005.
+
+APPENDICES
+
+
Symbol
Description
d
Dimension of the feature representation from the foundation model
L
Number of classes or size of the label set
m
Number of concepts in the main CBM
r
Number of concepts in the residual CBM
xs,ys
Input and corresponding label in the source domain
xt,yt
Input and corresponding pseudo-label in the target domain
φ(x)
Foundation model or the backbone feature extractor
Dsand Dt
Source and target domain
h: Rd→Rm with h ∈ H
Concept mapping and concept hypothesis class
g: Rm→RL with g ∈ G
Classifier and classification hypothesis class
Pcon(Dj,φ,h)
Concept score distribution for domain Dj, j ∈ {s,t}
Ppred(Dj,φ,h,g)
Prediction distribution for domain Dj, j ∈ {s,t}
C
Matrix of concept vectors adapted for the target domain of size m × d.
Subscripts 's' and 't' refer to the source and target domain respectively.
C
Matrix of residual concept vectors adapted for the target domain of size r × d
W,b
Main CBM linear predictor parameters. W has size L × m and b has length L
W,b
Residual CBM linear predictor parameters. W has size L × r and b has length L
fs(cbm)(x)
CBM predictor in the source domain. See Eqn. (1)
ft(cbm)(x)
CBM predictor in the target domain. See Eqn. (5)
Dt
Unlabeled test dataset
Dtand Dt
Test data batch. First one is unlabeled, while the second one includes the pseudo-labels.
μy,Σy
Class-specific mean and covariance matrix of the concept scores from the source dataset
vC(x)
Concept scores obtained from the concept vectors in C via the projection Cφ(x)
Dmah(x;μy,Σy)
Mahalanobis distance in the concept-score space
σk(r)
Softmax probability for class k given the logits r
lada(·)
Adaptation loss used for feature alignment. See Eqn. (8)
LCSA
Adaptation objective for CSA. See Eqn. (9)
Lsparse
Elastic-net penalty regularization used in LPA. See Eqn. (10)
LLPA
Adaptation objective for LPA. See Eqn. (11)
Lsim
Cosine similarity based regularization used in RCB. See Eqn. (12)
LCoh
Coherency regularization used in RCB. See Eqn. (13)
LRCB
Adaptation objective for RCB. See Eqn. (14)
ngrad
Number of gradient steps for each of the CSA, LPA, and RCB adaptations.
nbatch = |Db|
Batch size of adaptation
+
+Table 2: Symbols and notations used in the paper.
+
+Algorithm 1 CONDA: CONCEPT-BASED DYNAMIC ADAPTATION
+```txt
+Inputs: Foundation model $\phi (\mathbf{x})$ . Source domain CBM: $\mathbf{C}_s$ , $\mathbf{W}_s$ , $\mathbf{b}_s$ . Concept scores distribution statistics: $\{(\pmb {\mu}_y,\pmb {\Sigma}_y)\}_{y\in \mathcal{Y}}$ . Unlabeled test dataset $\mathcal{D}_t$
+```
+
+1: Set constants and hyper-parameters:
+# batches $B$ , # gradient steps $n_{\mathrm{grad}}$ , # residual concepts $r$
+Regularization constants: $\lambda_{\mathrm{frob}},\lambda_{\mathrm{sparse}},\lambda_{\mathrm{sim}},\lambda_{\mathrm{coh}}$
+2: Initialize the main CBM branch using source domain parameters: $\mathbf{C} = \mathbf{C}_s$ , $\mathbf{W} = \mathbf{W}_s$ , $\mathbf{b} = \mathbf{b}_s$ .
+3: Initialize the residual CBM branch parameters $\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}}$ randomly.
+4: Split the test dataset randomly into $B$ fixed-size batches $\{\mathcal{D}_t^b\}_{b = 1}^B$
+5: for batch $b = 1,2,\dots ,B$ do
+6: Pseudo-labeling: Using the foundation model, take an ensemble of the zero-shot predictor and the linear-probing predictor to obtain pseudo-labels for the test batch. More advanced methods can be used here, e.g., the soft nearest-neighbor voting of Chen et al. (2022).
+7: CSA Step: Adapt C with the remaining parameters fixed at their current values.
+8: for step $i = 1,2,\dots ,n_{\mathrm{grad}}$ do
+9: Compute the intra-class and inter-class Mahalanobis distances for the pseudo-labeled test batch $\widehat{\mathcal{D}}_t^b$ (Eqns. 6 and 7).
+10: Compute the CSA adaptation objective $L_{\mathrm{CSA}}(\mathbf{C})$ (Eqns. 8 and 9).
+11: Perform a gradient descent step to update $\mathbf{C}$
+12: end for
+13: LPA Step: Adapt $(\mathbf{W},\mathbf{b})$ with the remaining parameters fixed at their current values.
+14: for step $i = 1,2,\dots ,n_{\mathrm{grad}}$ do
+15: Compute the Elastic-net regularization term $L_{\mathrm{sparse}}(\mathbf{W})$ (Eqn. 10).
+16: Compute the LPA adaptation objective $L_{\mathrm{LPA}}(\mathbf{W},\mathbf{b})$ (Eqn. 11).
+17: Perform a gradient descent step to update $\mathbf{W}$ , b.
+18: end for
+19: RCB Step: Adapt $(\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}})$ with the remaining parameters fixed at their current values.
+20: for step $i = 1,2,\dots ,n_{\mathrm{grad}}$ do
+21: Compute the cosine similarity regularization term $L_{\mathrm{sim}}(\widetilde{\mathbf{C}})$ (Eqn. 12).
+22: Compute the coherency regularization term $L_{\mathrm{coh}}(\widetilde{\mathbf{C}})$ (Eqn. 13).
+23: Compute the RCB adaptation objective $L_{\mathrm{RCB}}(\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}})$ (Eqn. 14).
+24: Perform a gradient descent step to update $\tilde{\mathbf{C}},\tilde{\mathbf{W}},\tilde{\mathbf{b}}$
+25: end for
+26: Using the adapted parameters, obtain the target domain CBM predictions $\mathbf{f}_t^{(\mathrm{cbm})}(\mathbf{x})$ for the current batch (Eqn. 5).
+27: Initialize parameters for the next batch using the adapted parameters from the current batch.
+28: end for
+Outputs: Predictions of the target domain CBM on the test dataset. Final adapted parameters of the target domain CBM: $\mathbf{C}_t, \mathbf{W}_t, \mathbf{b}_t, \widetilde{\mathbf{C}}_t, \widetilde{\mathbf{W}}_t, \widetilde{\mathbf{b}}_t$ .
+
+# A EXPANDED RELATED WORK
+
+Concept Bottleneck Models (CBMs), introduced by Koh et al. (2020), are interpretable neural networks that map input data to a set of human-understandable concepts (the "bottleneck") before making predictions. This architecture enhances the interpretability by revealing which concepts influence the predictions and allows users to intervene by adjusting mis-predicted concepts.
+
+Definition of Concept Bottleneck. Despite the above benefits, early variants (e.g., (Havasi et al., 2022)) required extensive concept annotations during training, which can be costly and impractical. This reliance on predefined, annotated concepts limits their scalability and applicability to diverse domains and tasks. To address this, recent methods aim to construct CBMs without requiring explicit concept labels, and they can be placed into three main categories: (a) unsupervised learning-based concept discovery, (b) general-purpose concept bank agnostic to tasks, and (c) leveraging multi-modal foundation models. They are further discussed below.
+
+(a) Unsupervised learning-based concept discovery: Yeh et al. (2020) formulates the concept discovery as an optimization process with the objective of concept completeness, ensuring that the extracted concepts comprehensively represent the data while maintaining interpretability. This approach is further advanced in Wang et al. (2023), where they optimize task-specific concepts via self-supervision techniques such as contrastive loss to improve the quality of the learned concepts.
+(b) General-purpose concept bank agnostic to tasks: Yuksekgonul et al. (2023) and Wu et al. (2023b) utilize a predefined concept bank where each concept vector is derived from the parameters of a Support Vector Machine (SVM) trained to distinguish between positive and negative instances in image embeddings obtained from a backbone model. Here the dataset used to learn the SVMs does not have to be the same as the data for the given task.
+(c) Leveraging multi-modal foundation models: Another approach leverages the rapid advancements in multi-modal foundation models like CLIP to align visual and textual representations, enabling the mapping of each concept to a human-readable description (Moayeri et al., 2023). Yuksekgonul et al. (2023) also suggests defining each concept vector with the text embeddings from the backbone, where the text serves as human-understandable concept descriptions (refer to Figure 2 in Shang et al. (2024) for a descriptive illustration of the method). Oikarinen et al. (2023) relies on a pre-trained backbone like CLIP which maps images and textual descriptions into a shared embedding space. They define each concept vector as the mapping of an image embedding to its corresponding text embedding.
+
+In our paper, we consider the most representative method from each category of concept bottleneck constructions: Yeh et al. (2020) for (a), Yuksekgonul et al. (2023) for (b), and Oikarinen et al. (2023) for (c) (refer to Appendix C.2 for further details on their implementations). By applying our adaptation framework to various definitions of a concept bottleneck, we demonstrate that it can effectively and flexibly enhance the post-deployment robustness of various CBM types under real-world distribution shift scenarios.
+
+Concept-based explanations and distribution shifts. There has been growing interest in the utility of concept-based explanations under distribution shifts. The initial work by (Kim et al., 2018) hinted at the potential of high-level concepts as diagnostic units against low-level perturbations, such as adversarial examples. Following this, Adebayo et al. (2020) suggested that concept-based explanations could be more robust tools for debugging and analyzing model behaviors under spurious correlations. More recently, Abid et al. (2022) and Wu et al. (2023b) have studied the utility of concept-based explanations in the context of data drift. However, these works rely on a predefined concept bank that remains static after model deployment. Our work emphasizes the need for a dynamic approach to concept bottlenecks for the optimal utility of concept-based predictions in the deployment phase where test data can have distribution shifts. To the best of our knowledge, this is the first work to present a comprehensive view of the post-deployment performance of concept-based prediction pipelines, and to address their test-time adaptation under distribution shifts with a dynamic concept bank.
+
+# B ADDITIONAL METHOD DETAILS
+
+We describe the comprehensive algorithm of CONDA in Algorithm 1.
+
+# B.1 COMPLEXITY ANALYSIS OF CONDA
+
+Referring to Algorithm 1, we evaluate the computational complexity of the CSA, LPA, RCB, and pseudo-labeling steps for a single test batch $\mathcal{D}_t^b$ . We recall some of the terms used in our notation.
+
+- $m$ : number of concepts in the main CBM.
+- $r$ : number of concepts in the residual CBM branch.
+- $d$ : dimension of the feature representation $\phi(\mathbf{x})$ .
+- $L$ : number of classes.
+- $n_{\mathrm{grad}}$ : number of gradient steps for each of the CSA, LPA, and RCB adaptations.
+- $n_{\mathrm{batch}} = |\mathcal{D}_t^b|$ : batch size
+
+CSA step optimizes the concept matrix of the main CBM branch C, which has $md$ parameters. Below we breakdown the computations involved in the CSA adaptation objective and its gradient updates. We assume that the mean and inverse-covariance matrices of the class-conditional concept score distributions are pre-computed from the source dataset.
+
+Concept score projection for a single test sample: $2md$
+
+Intra-class and inter-class Mahalanobis distances for a single test sample: $L(2m^2 + 3m) + L = Lm(2m + 3) + L$ .
+
+Frobenius norm regularization term: $3md$
+
+Cost of stochastic gradient update step for the batch: $2md$
+
+The cost of optimizing the CSA objective (Eqn. 9) for $n_{\mathrm{grad}}$ gradient update steps can be expressed as:
+
+$$
+\operatorname {C o s t} _ {\mathrm {C S A}} = n _ {\text {g r a d}} \left(n _ {\text {b a t c h}} (2 m d + L m (2 m + 3) + L) + 5 m d\right). \tag {15}
+$$
+
+LPA step optimizes the linear predictor in the main CBM branch, whose parameters are $(\mathbf{W},\mathbf{b})$ . The number of parameters optimized in this step is $L(m + 1)$ . Below we breakdown the computations involved in the LPA adaptation objective and its gradient updates.
+
+Elastic-Net regularization term: $3Lm$
+
+Cross-entropy loss term in the LPA adaptation objective (Eqn. 11) for a single test sample: $2md + 2Lm + L + 2rd + 2Lr + L + 3L = 2(m + r)(d + L) + 5L$ .
+
+Cost of stochastic gradient update step for the batch: $2L(m + 1)$ .
+
+The cost of optimizing the LPA objective for $n_{\mathrm{grad}}$ gradient update steps can be expressed as:
+
+$$
+\operatorname {C o s t} _ {\mathrm {L P A}} = n _ {\text {g r a d}} \left(n _ {\text {b a t c h}} (2 (m + r) (d + L) + 5 L) + 5 L m + 2 L\right). \tag {16}
+$$
+
+RCB step optimizes the concept matrix and linear predictor in the residual CBM branch, whose parameters are $(\widetilde{\mathbf{C}},\widetilde{\mathbf{W}},\widetilde{\mathbf{b}})$ . The number of parameters optimized in this step is $r d + L(r + 1)$ . Below we breakdown the computations involved in the RCB adaptation objective and its gradient updates.
+
+Cosine similarity regularization term: $6dr(m + (r - 1) / 2)$ .
+
+Coherency regularization term: $r\left(4n_{\mathrm{batch}}d + n_{\mathrm{batch}}\log (n_{\mathrm{batch}}) + k\right)$ .
+
+Cross-entropy loss term in the RCB adaptation objective (Eqn. 14) for a single test sample: $2md + 2Lm + L + 2rd + 2Lr + L + 3L = 2(m + r)(d + L) + 5L$ .
+
+Cost of stochastic gradient update step for the batch: $2r d + 2L(r + 1)$
+
+The cost of optimizing the RCB objective for $n_{\mathrm{grad}}$ gradient update steps can be expressed as:
+
+$$
+\begin{array}{l} \operatorname {C o s t} _ {\mathrm {R C B}} = n _ {\text {g r a d}} \left(n _ {\text {b a t c h}} (2 (m + r) (d + L) + 5 L) + 6 d r (m + (r - 1) / 2) \right. \\ \left. + 4 n _ {\text {b a t c h}} r d + r n _ {\text {b a t c h}} \log \left(n _ {\text {b a t c h}}\right) + k r + 2 r d + 2 L (r + 1)\right) \tag {17} \\ \end{array}
+$$
+
+Pseudo-labeling. For the pseudo-labeling method based on the ensemble of the zero-shot predictor and linear-probing predictor with the foundation model backbone, the computational complexity will be dominated by the architecture and number of parameters $p$ in the foundation model. We denote the inference cost on a test batch by $C_{\phi}(p, n_{\mathrm{batch}})$ . The computation involved in the zero-shot and linear probing predictions will be negligible compared to this.
+
+The overall computational cost for a single test batch is the sum of the costs of the CSA, LPA, RCB, and pseudo-labeling steps described above. From this, we select the terms that dominate the computational cost and ignore terms that depend on smaller quantities like $r$ and $k$ . This leads us an overall complexity of $\mathcal{O}\left(n_{\mathrm{grad}}n_{\mathrm{batch}}m^2L + n_{\mathrm{grad}}n_{\mathrm{batch}}md + n_{\mathrm{grad}}dr(m + r)\right)$ . The number of concepts $m$ is usually on the order of hundreds and $r$ is much smaller than that. The embedding dimension $d$ is on the order of few hundreds to thousands, depending on the foundation model.
+
+To quantify the computational complexity of our method, in Table 3, we report the average (per-batch) wall-clock running times of CONDA when combined with post-hoc CBM (Yuksekgonul et al., 2023). We observe that adaptation using CONDA is quite fast, taking only a few seconds per batch, with the main time-consuming component being the pseudo-labeling since it involves inference on the foundation model.
+
+
Backbone
Embedding size
Target Dataset
Dataset size
PL
+CSA
+LPA
+RCB
All
CLIP:ViT-L-14 (FARE2)
768
CIFAR10-C
10000
4.113
0.116
0.021
0.038
4.288
CLIP:ViT-L-14 (FARE2)
768
CIFAR100-C
10000
16.203
0.692
0.023
0.041
16.959
CLIP:ViT-L-14
768
Waterbirds
2897
0.064
0.043
0.028
0.051
0.186
CLIP:ViT-L-14
768
Metashift
541
0.077
0.051
0.022
0.039
0.188
BiomedCLIP
512
Camelyon17
85054
0.387
0.089
0.042
0.078
0.596
+
+Table 3: Runtime of CONDA. All inputs are reshaped to the dimension of (224, 224, 3). In column PL, we report the time it takes to obtain our proposed pseudo-labeling per batch (averaged across all incoming batches). We run 20 adaptation steps for each of CSA, LPA, and RCB with five residual concepts, and report runtime (in seconds) averaged across all batches at the test time.
+
+# B.2 AUTOMATICALLY ANNOTATING CONCEPTS
+
+We adopt and modify CLIP-DISSECT (Oikarinen & Weng, 2023) for automatically annotating the concepts as follows.
+
+Suppose $S$ is the set of possible concept annotations. We use ConceptNet (Speer et al., 2017) to obtain texts that are relevant to the classes. ConceptNet is an open knowledge graph, where we can find concepts that have particular relationships to a query text. For instance, for a class "cat", one can find relations of the form "A Cat has {whiskers, four legs, sharp claws, ...}" Similarly, we can find "parts" of a given class (e.g., "bumper", "roof" for "truck" class), or the superclass of a given class (e.g., "animal", "canine" for "dog"). Following the setup in Yuksekgonul et al. (2023), we restrict ourselves to five sets of relations for each class: the hasA, isA, partOf, HasProperty, and MadeOf relations in ConceptNet. We collect all the concepts that have these relations with the classes in each classification task to build the concept annotation set. However, for the Waterbirds dataset, since the classes of {"waterbird", "landbird"} are too specific in their terminology and we cannot find relevant nodes in ConceptNet, we instead use {"bird", "water", "land"} as the query set. When we have the concept annotations for the main concept bottleneck from before-deployment (e.g., (Yuksekgonul et al., 2023; Oikarinen et al., 2023; Wu et al., 2023b), we set $S$ as the union set of those pre-defined concepts and those identified by ConceptNet.
+
+Let $\mathcal{D}_t$ be the target domain (test) dataset. Let $\phi_{\mathrm{CLIP}}^I$ and $\phi_{\mathrm{CLIP}}^T$ be the image encoder and text encoder (respectively) of CLIP:ViT-B/16. Recall that $\phi$ is the backbone foundation model used in
+
+our framework. To determine the annotation for a concept vector $\mathbf{c}_a\in \mathbf{C}_t$ , our goal is to assign to it the most relevant caption $t_b\in S$ as follows:
+
+1. Compute the normalized text embedding of the concepts in $S$ using $\phi_{\mathrm{CLIP}}^T$ ; let $\mathbf{T}_j$ be the normalized text embedding of the $j$ -th concept in $S$ . Also, compute the image embedding of all images in $\mathcal{D}_t$ using $\phi_{\mathrm{CLIP}}^I$ ; let $\mathbf{I}_i$ be the image embedding of the $i$ -th image in $\mathcal{D}_t$ . We then compute the inner product of the all pairs of image-text embeddings via the image-text matrix $\mathbf{P} = \mathbf{I}\mathbf{T}^\top \in \mathbb{R}^{|\mathcal{D}_t| \times |\mathcal{S}|}$ where $\mathbf{I} \in \mathbb{R}^{|\mathcal{D}_t| \times d}$ and $\mathbf{T} \in \mathbb{R}^{|\mathcal{S}| \times d}$ and $d$ is the dimension of the CLIP embeddings. That is, $P_{ij}$ is the inner product of the normalized embeddings of the $i$ -th target image and the $j$ -th candidate annotation.
+2. For all images in the target dataset, we compute and collect their concept scores as $\mathbf{v}_{\mathbf{c}_a} = [\langle \phi (\mathbf{x}_1),\mathbf{c}_a\rangle ,\dots ,\langle \phi (\mathbf{x}_{|\mathcal{D}_t|}),\mathbf{c}_a\rangle ]^\top \in \mathbb{R}^{|\mathcal{D}_t|}$ .
+3. The annotation for $\mathbf{c}_a$ is determined by calculating the most similar concept label in $S$ based on its concept scores $\mathbf{v}_{\mathbf{c}_a}$ . The similarity with respect to a concept $t_\ell \in S$ is defined as
+
+$$
+\operatorname {s i m} \left(t _ {\ell}, \mathbf {v} _ {\mathbf {c} _ {a}}; \mathbf {P}\right) = \frac {\left\langle \mathbf {v} _ {\mathbf {c} _ {a}} , \mathbf {P} _ {: , \ell} \right\rangle}{\left\| \mathbf {v} _ {\mathbf {c} _ {a}} \right\| \left\| \mathbf {P} _ {: , \ell} \right\|}, \tag {18}
+$$
+
+which is the cosine similarity between the concept scores and the corresponding column $\ell$ of the image-text matrix $\mathbf{P}_{:, \ell}$ . Then, the annotation for $\mathbf{c}_a$ becomes the concept in $S$ with the maximum similarity, given by $t_b$ where $b = \arg \max_{\ell} \operatorname{sim}(t_\ell, \mathbf{v}_{\mathbf{c}_a}; \mathbf{P})$ . To reduce noise in the annotations, we only accept $t_b$ as the annotation for $\mathbf{c}_a$ only when $\operatorname{sim}(t_b, \mathbf{v}_{\mathbf{c}_a}; \mathbf{P}) > 0.8$ .
+
+To annotate the concepts in the residual concept bottleneck $\hat{\mathbf{C}}$ , we repeat the same process.
+
+# C EXPERIMENTAL DETAILS
+
+All the experiments are run on a server with thirty-two AMD EPYC 7313P 883 16-core processors, 528 GB of memory, and four 884 Nvidia A100 GPUs. Each GPU has 80 GB of 885 memory. For each setup, we repeated each experiment for 10 trials (using seed 40-49 for the random number generation) and report the mean and standard error.
+
+# C.1 DATASETS
+
+CIFAR10. It consists of 60k RGB images of size $32 \times 32$ (50k images for the train set, and 10k images for the test set), equally balanced over 10 different classes (e.g., airplane, car, dog, cat, etc.). We follow the given train/test split to report the performance in the source domain.
+
+CIFAR100. It is similar to CIFAR10, but in a larger-scale; there are 100 classes, and each class has 500 32x32 RGB training images and 100 test images, making the classification more challenging.
+
+CIFAR10-C and CIFAR100-C. To report the accuracies, we take the average over 15 different types of corruptions with the severity level of two (out of the scale from one to five); Gaussian Noise, Shot Noise, Impulse Noise, Defocus Blur, Frosted Glass Blur, Motion Blur, Zoom Blur, Snow, Frost, Fog, Brightness, Contrast, Elastic, Pixelate, JPEG Compression. Conventionally, studies in out-of-distribution generalization literature, severity level five is used, but we observe that it severely hurts the performance of the foundation model, making it impossible to be used as a decent oracle for the pseudo labeling. Hence, we chose the severity level two that still causes the performance drop due to the distribution shift, but against which, the backbone model still presents decent performance compared to the CBMs.
+
+Waterbirds. Waterbirds dataset is for a two-class classification task ("landbird" vs. "waterbird"). In the source domain, landbird (waterbird) images are always associated with the land (water) background, while in the target domain, the correlation with the background is flipped, i.e., landbird (waterbird) images are always on the water (land) background.
+
+Metashift. Metashift has two classes of "cat" and "dog", and it simulates the disparate correlation to the backgrounds in a similar way. Source cat images are always correlated with a sofa or bed in the background, while dog images are always correlated with a bench or bike in the background. For
+
+evaluation, we randomly split 90:10 equally across the correlation types, i.e., $10\%$ of dog images with sofa, $10\%$ of dog images with bed, $10\%$ of cat images with bench, and $10\%$ of cat images with bike. In the target domain, both cat and dog images are always on the shelf background.
+
+Camelyon17. This dataset is a collection of histopathology whole-slide images used for the detection of metastases in lymph nodes; classifying the given slide into benign tissue vs cancerous tissue. It includes images from five medical centers, each with different staining protocols, equipment, and imaging settings. These differences simulate natural real-world distribution shifts. We use the train set (hospital 1-3) for source, and the test set (hospital 5) for the target.
+
+For zero-shot prediction, we use a basic text template: "A photo of {class-name}" for CIFAR10, CIFAR100, Waterbirds, and Metashift datasets. For the Camelyon17 dataset, we use the ensemble of prompts: for class benign, {"A histopathology image of normal lymph node tissue stained with hematoxylin and eosin.", "An H&E stained slide showing healthy lymph node without cancer cells.", "Microscopic image of non-cancerous lymph node tissue.", "A pathology image of benign lymph node with normal histology.", "Hematoxylin and eosin stained section of normal lymph node.""}; for class malicious, {"A histopathology image of lymph node with metastatic breast cancer stained with hematoxylin and eosin.", "An H&E stained slide showing lymph node tissue infiltrated by cancer cells.", "Microscopic image of lymph node containing metastatic carcinoma.", "A pathology image of malignant lymph node with cancer metastasis.", "Hematoxylin and eosin stained section of lymph node with breast cancer metastases."}.
+
+# C.2 PREPARING THE CONCEPT BOTTLENECK
+
+There are various ways of defining the concept vectors $\{\mathbf{c}_{si}\}_{i=1}^{m}$ in the concept prediction layer $\mathbf{v}_{\mathbf{C}_s}(\mathbf{x})$ . Early works on CBM required the training dataset to have concept annotations from domain experts in addition to the class labels for training the concept predictor (Koh et al., 2020). Subsequent works have also explored learning the concept vectors in an unsupervised manner (without any concept annotations) (Yeh et al., 2020; Choi et al., 2023). More recently, natural language concept descriptions and modern vision-language models (e.g., Stable Diffusion (Rombach et al., 2022)) are being leveraged to automatically generate concept examples (Yuksekgonul et al., 2023; Wu et al., 2023b) for finding the Concept Activation Vectors (CAVs) (Kim et al., 2018) (each CAV corresponds to a $\mathbf{c}_{si}$ ), or to directly guide the construction of concept bank $\mathbf{C}_s$ (Oikarinen et al., 2023). We highlight that in all prior works (to our knowledge) the concept bank remains static, i.e., once the set of concept vectors is defined and the CBM is deployed, its predictions are made based on these predefined concepts, regardless of any distribution shift at test time.
+
+Yuksekgonul et al. (2023). For CIFAR10 and CIFAR100, we use the BRODEN visual concepts datasets Bau et al. (2017) to learn concept activation vectors, which are used to initialize the weights and bias parameters of the concept bottleneck layer, as described in Yuksekgonul et al. (2023). For Waterbirds and Metashift, we use the images belonging to the concept categories as follows; nature, color, and textures for Waterbirds, and nature, color, texture, city, household, and others for Metashift. For Camelyon17, we use color and textures categories, following the setting in Wu et al. (2023b).
+
+Yeh et al. (2020). For a fair comparison, we set the number of the concepts to be the same as the size of concept bottleneck by Yuksekgonul et al. (2023) except with Metashift where we use 100 concepts instead, since with over 100 concepts, we found there are much unnecessary redundancy between them.
+
+Oikarinen et al. (2023). Following their instructions, we create the initial concept set using GPT-3, followed by concept filtering. For the sparsity of the linear probing layer, we set $\lambda = 0.001$ and $\alpha = 0.5$ .
+
+Table 4 shows a summary of the major hyper-parameters used in our experiments. As for the hyper-parameter $k$ in Equation 13, we set $k$ equal to batch size / (2 × number of classes), which is a heuristic that works well in practice.
+
+
+
+Table 4: Summary of the hyper-parameters used in our experiments.
+
+
+
+
+
+
+
+
+(a) $\lambda_{\mathrm{frob}}$ in CSA, CIFAR10-C
+(d) $r$ in RCB
+Figure 5: Ablations on the hyper-parameters in CONDA. We ablate on the individual hyperparameters in CONDA for each type of distribution shift: (1) CIFAR10-C (impulse noise) simulating low-level shift, and (2) Waterbirds simulating concept-level shift.
+
+
+(b) $\lambda_{\mathrm{frob}}$ in CSA, Waterbirds
+(e) $\lambda_{\mathrm{sim}}$ in RCB
+
+
+(c) $\lambda_{\mathrm{sparse}}$ in LPA
+(f) $\lambda_{\mathrm{coh}}$ in RCB
+
+# D ABLATION EXPERIMENTS
+
+# Ablation Study on Hyperparameters.
+
+In Figure 5, we present a comprehensive ablation study illustrating how different hyperparameter choices affect the performance of our proposed method.
+
+Most notably, in Figures 5a and 5b, we observe that $\lambda_{\mathrm{frob}}$ influences the adaptation performance differently depending on the type of distribution shift (i.e., CIFAR10-C for low-level shifts and Waterbirds for concept-level shifts). Recall that $\lambda_{\mathrm{frob}}$ controls how much the concept vectors are allowed to deviate from their original construction during adaptation. When $\lambda_{\mathrm{frob}}$ is very low (e.g., 0.001), the weights in the concept bottleneck layer deviate excessively, leading to instability.
+
+In the case of low-level shifts, as shown in Figure 5a, over-regularizing the Frobenius norm term (e.g., setting $\lambda_{\mathrm{frob}}$ as high as 10) prevents the method from addressing the non-robustness of the concept bottleneck under such shifts (i.e., the first failure mode in Section 2.3). Selecting a suitable moderate value such as $\lambda_{\mathrm{frob}} = 0.1$ leads to optimal performance.
+
+In contrast, under concept-level shifts depicted in Figure 5b, allowing deviation of the concept vectors harms performance. By strongly regularizing with a high $\lambda_{\mathrm{frob}}$ value (e.g., $\lambda_{\mathrm{frob}} = 10$ ), we can nearly preserve the original pre-adaptation performance (note that WG drops to almost zero when $\lambda_{\mathrm{frob}} < 1$ ). This occurs because failures of CBMs under concept shifts need to be addressed by adapting the linear probing layer rather than the concept bottleneck layer (the second failure mode in Section 2.3).
+
+However, when all components of CONDA are activated, the adaptation performance becomes quite insensitive to the choice of $\lambda_{\mathrm{frob}}$ , regardless of the type of distribution shift, since all the components collaboratively combine to handle all possible failure modes.
+
+Regarding the hyperparameters for the other regularization terms – namely, $\lambda_{\mathrm{sparse}}$ , $\lambda_{\mathrm{sim}}$ , and $\lambda_{\mathrm{coh}}$ (Figures 5c, 5e, and 5f) – we find that the performance is relatively insensitive to their values unless they are set too high, which could override the main optimization objectives.
+
+As for the number of residual concepts $r$ , shown in Figure 5d, we observe that increasing $r$ helps improve the performance up to a certain point (specifically, $r = 5$ ), after which the performance saturates and additional concepts become redundant. We recommend that a criterion like this be used to select $r$ in practice. Choose a high cosine similarity threshold (e.g., 0.9), and stop adding new residual concepts once a new concept vector starts to have maximum cosine similarity (with the existing set of residual concept vectors) larger than the set threshold.
+
+Pseudo-labeling variants. We acknowledge that the performance of CONDA relies on the quality of pseudo-labels. In Section 3, we introduced a simple yet effective approach that ensembles the foundation model's zero-shot predictions and linear probing predictions, with a focus on matching the CBMs' post-deployment performance with that of the feature-based predictions. However, more advanced pseudo-labeling techniques could further improve our method's performance.
+
+Importantly, the pseudo-labeling technique should operate on a batch basis to run alongside CONDA, which performs adaptation with an incoming batch of test data in an online fashion. For this, we employ a recent method from the TTA literature Chen et al. (2022). They employ an online pseudo-labeling refinement scheme that generates significantly more accurate pseudo-labels by using soft $k$ -nearest neighbors voting in the target domain's feature space for each target sample. The neighboring samples are generated by applying weak augmentation to each incoming target sample. The core intuition of their method is that the model should make consistent predictions for these nearest neighbors. We apply this method to the feature-based linear-probing predictions ("Refined LP") and ensemble it with ZS predictions.
+
+Table 5 compares the performance of CONDA with Post-hoc CBM (Yuksekgonul et al., 2023) when using i) our simple pseudo-labeling approach, ii) pseudo-label refinement by Chen et al. (2022), and iii) perfect pseudo labeling (using the ground-truth labels of the target dataset to provide an empirical upper bound on the performance). We observe that the refined pseudo-labeling of Chen et al. (2022) helps further improve the adaptation performance of CONDA. It is particularly effective with low-level shifts (CIFAR10-C and CIFAR100-C), as the method by Chen et al. (2022) enforces consistent predictions among weakly-augmented instances, which correspond to low-level shifts (e.g., cropping, color jittering, flipping, etc.). However, compared to the performance with perfect pseudo-labeling, there remains a significant performance gap (especially CIFAR-100). Reducing this gap with more advanced pseudo-labeling that can handle both distribution shift types is an important direction for future work.
+
+
Dataset
Metric
{ZS, LP}
{ZS, Refined LP}
Perfect PL
CIFAR10-C
AVG
84.38 ± 1.52
90.06 ± 1.94
96.37 ± 0.37
WG
72.69 ± 2.49
76.31 ± 3.01
92.65 ± 0.56
CIFAR100-C
AVG
53.88 ± 0.23
61.25 ± 0.29
97.31 ± 0.35
WG
2.56 ± 0.27
10.28 ± 0.27
79.13 ± 1.73
Waterbirds
AVG
60.69 ± 0.23
62.77 ± 0.16
95.39 ± 0.21
WG
43.01 ± 0.46
44.30 ± 0.11
92.02 ± 0.42
Metashift
AVG
93.69 ± 0.20
94.07 ± 0.11
100.0
WG
92.02 ± 0.12
93.56 ± 0.13
100.0
Camelyon17
AVG
91.20 ± 0.06
93.19 ± 0.10
94.82 ± 0.08
WG
88.96 ± 0.16
90.88 ± 0.15
93.50 ± 0.17
+
+Table 5: Performance of CONDA with different pseudo-labeling techniques. Here, ZS and LP refer to zero-shot and linear probing methods used for prediction based on the foundation model. Refined LP refers to the pseudo-labeling method of Chen et al. (2022).
+
+Choice of foundation model. Another factor that inherently affects the performance of CONDA is the choice of the backbone foundation model. While foundation models are usually designed for general-purpose tasks (e.g., BiomedCLIP (Zhang et al., 2023), pretrained on diverse medical domains), they are sometimes fine-tuned for specific domains (e.g., MedCLIP (Wang et al., 2022), specifically pretrained on chest X-rays).
+
+In Table 6, we compare the performance of our proposed adaptation with different CBM baselines on the Camelyon17 dataset, while varying the backbone foundation model. Intuitively, MedCLIP may not be well-suited for pathology data such as Camelyon17, and we observe significant drops in zero-shot (ZS) and linear probing (LP) accuracies in both source and target domains. Consequently, the performance of the CBM based on its embeddings is much worse when a mis-matched foundation model is used. On the other hand, with BioMedCLIP as the foundation model, the source domain performance as well as the adaptation performance of CONDA on the target domain are much better. This confirms that selecting an appropriate backbone leads to better representative embeddings and higher-quality pseudo labels, which in-turn leads to more accurate test-time adaptation.
+
+This suggests another avenue for further improving the adaptation performance beyond advanced pseudo-labeling techniques – for example, zero-shot robustification of the foundation model embeddings (Adila et al., 2024). Such approaches could be employed when the chosen foundation model is not specifically tailored to the given task. We leave this as an important direction for future work.
+
+
Backbone
ZS
LP
Yuksekgonul et al. (2023)
Yeh et al. (2020)
Oikarinen et al. (2023)
Unadapted
w/ CONDA
Unadapted
w/ CONDA
Unadapted
w/ CONDA
BiomedCLIP
Source
AVG
77.71
92.14 ± 0.01
89.07 ± 0.60
-
97.01 ± 0.05
-
94.19 ± 0.11
-
WG
69.73
88.89 ± 0.02
84.34 ± 1.39
-
96.31 ± 0.24
-
91.23 ± 0.12
-
Target
AVG
84.55
93.69 ± 0.01
89.71 ± 0.65
91.20 ± 0.06
95.01 ± 0.07
92.54 ± 0.16
91.75 ± 0.08
93.16 ± 0.05
WG
76.08
89.49 ± 0.02
85.96 ± 0.88
88.96 ± 0.16
93.07 ± 0.37
91.07 ± 0.32
87.24 ± 0.09
89.00 ± 0.07
MedCLIP
Source
AVG
53.09
79.89 ± 0.05
76.92 ± 0.06
-
94.58 ± 0.10
-
79.15 ± 0.08
-
WG
11.75
79.28 ± 0.01
76.21 ± 0.16
-
92.20 ± 0.44
-
78.01 ± 0.15
-
Target
AVG
48.87
68.37 ± 0.07
67.35 ± 0.12
67.56 ± 0.11
88.72 ± 0.28
86.04 ± 0.19
66.29 ± 0.18
67.05 ± 0.08
WG
14.66
68.32 ± 0.05
62.15 ± 0.19
65.36 ± 0.14
81.42 ± 1.15
81.01 ± 1.65
59.35 ± 0.21
65.17 ± 0.14
+
+Table 6: Performance of CONDA varying backbone foundation model. The dataset is Camelyon17, simulating a natural shift between the source and target domains.
+
+# E ADDITIONAL INTERPRETABILITY ANALYSIS
+
+In this section, we include additional experiments and analysis to better understand the interpretability of CONDA as well as the utility of the RCB component.
+
+# E.1 RESIDUAL CONCEPT BOTTLENECK COMPENSATES FOR PREDICTION ERRORS
+
+Here we aim to understand how including the RCB component in CONDA impacts the predictions of the adapted classifier. We conduct an analysis similar to the one in Appendix B of Yuksekgonul et al. (2023), where they evaluate the impact of the residual predictor PCBM-h and when it alters the predictions of the main predictor PCBM. In Figure 6, we compare the predictions made by (i) PCBM + CSA + LPA (i.e., excluding RCB) with that of (ii) PCBM + CSA + LPA + RCB (i.e., including RCB) on the CIFAR10-C (with Gaussian Noise, Shot Noise, and Impulse Noise) and Metashift datasets. The x-axis shows the confidence of predictions, which are binned into 5 intervals; and y-axis shows both the accuracy of (i) within each confidence bin (blue curve), and the consistency of predictions between (i) and (ii) within each confidence bin (red curve). Consistency is defined as the fraction of samples where the predictions of two models are the same.
+
+Figures 6a and 6b show the accuracy/consistency plots for the CIFAR10-C and Metashift datasets respectively. We observe that in both cases, when the confidence is high, the accuracy and consistency are high. As the confidence of predictions decreases, the accuracy and consistency within the confidence bins also decrease sharply. From this, we can infer that the residual component (RCB) modifies the predictions of PCBM + CSA + LPA mostly when they are incorrect and have low confidence. This is readily apparent in the case of Metashift which addresses binary classification, since all the inconsistent predictions where PCBM + CSA + LPA is incorrect have to be correct when RCB is included. Thus, we hypothesize that RCB has the effect of intervening to compensate mainly when the prior adaptation components (CSA + LPA) have prediction errors or low confidence.
+
+We also summarize the test accuracies of the CONDA variants (i) and (ii) on Metashift and CIFAR10-C in Table 7. We observe that including RCB (variant ii) leads to a small increase in both the AVG and WG accuracies.
+
+
+(a) CIFAR10-C
+
+
+(b) Metashift
+Figure 6: RCB intervenes and compensates for mis-classifications of $\mathrm{PCBM} + \mathrm{CSA} + \mathrm{LPA}$ , particularly in the lower confidence prediction bands. For Metashift, with two classes, a mis-classification and inconsistent prediction imply that RCB corrects the prediction.
+
+
Dataset
CONDA variant
Accuracy (AVG)
Accuracy (WG)
Metashift
PCBM + CSA + LPA
93.96
91.61
PCBM + CSA + LPA + RCB
94.57
93.25
CIFAR10-C
PCBM + CSA + LPA
81.89
64.63
PCBM + CSA + LPA + RCB
82.27
66.54
+
+Table 7: Accuracy comparison of the CONDA variants where (i) RCB is excluded and (ii) RCB is included on Metashift and CIFAR10-C (with Gaussian Noise, Shot Noise, and Impulse Noise).
+
+# E.2 ACCURACY-INTERPRETABILITY TRADEOFF IN RESIDUAL CONCEPT BOTTLENECK
+
+In this sub-section, we aim to answer to the following question: while the residual concept bottleneck improves the adaptability of CONDA, does it potentially affect the interpretability by introducing additional model complexity? An analysis of the trade-off between model complexity and interpretability, particularly as new residual concepts are added, would be valuable for practitioners seeking interpretable yet robust models.
+
+Here we apply our adaptation to PCBM (CLIP), where each concept vector is constructed using CLIP text embeddings of concept captions, deployed to the Waterbirds dataset. As discussed in Appendix B.2, for concept annotation, we leveraged the ConceptNet hierarchy following the setup in Yuksekgonul et al. (2023). We searched ConceptNet for the words "Bird", "Water", "Land" and obtained concepts that have the following relationship with the query concept: hasA, isA, partOf, HasProperty, and MadeOf.
+
+We compare the two CONDA variants (i) $\mathrm{PCBM} + \mathrm{CSA} + \mathrm{LPA}$ and (ii) $\mathrm{PCBM} + \mathrm{CSA} + \mathrm{LPA} + \mathrm{RCB}$ by varying the number of residual concepts $(r)$ and evaluating the following metrics:
+
+- Relative accuracy of method (ii) minus (i), both for AVG and WG.
+- Similarity score output in Eqn. 18 from the automatic concept annotation method described in Appendix B.2.
+
+The similarity score is used as a quantitative metric to measure the interpretability of RCB. To be more specific, the score in Eqn. 18 tells us how aligned the assigned concept caption is with each residual concept vector. A low score implies that the assigned caption is not a good description for the concept.
+
+Figure 7 shows the relative accuracy and similarity score as a function of the number of residual concepts (as they are added incrementally). We observe that choosing $r = 5$ would result in the best relative accuracy, but it leads to a drop in the similarity score which peaks at $r = 4$ (implying a drop in interpretability of the residual concept). A practitioner can choose a suitable stopping point for the residual concepts by monitoring these two criteria as shown in the figure.
+
+
+Figure 7: Accuracy vs. Interpretability of the Residual Concept Bottleneck with PCBM (CLIP) deployed on the Waterbirds dataset (target domain).
+
+
+(a) Before adaptation (source)
+
+
+(b) After adaptation (target)
+Figure 8: CONDA adapts the concept weights to be tailored to the target data. We visualize the linear probing layer weights (width of each mapping) before vs after applying CONDA to PCBM (Yuksekgonul et al., 2023) on the Metashift dataset. We only show the mappings with positive weights.
+
+# E.3 ADDITIONAL INTERPRETABILITY RESULTS
+
+In Figure 8, we present another example demonstrating how CONDA adapts interpretations on the MetaShift dataset, similar to Figure 4. In the source domain, cat images are exclusively correlated with sofa or bed objects, whereas dog images are always associated with bench or bike objects. In the target domain, however, both cat and dog images appear with a shelf background.
+
+Without any adaptation, the deployed CBM indicates that the most contributing concepts to the "cat" class are mainly household-related objects (see Figure 8a), and these concepts do not positively contribute to the "dog" class at all. After applying our adaptation (Figure 8b), the influence of the bed-related concepts is diminished, while shelf-related concepts (highlighted in bright green) begin to contribute to the prediction of both the "cat" and "dog" classes.
+
+# F LIMITATIONS AND FUTURE WORK
+
+This work was motivated by our observation that recent CBM variants atop a backbone foundation model may close the performance gap with feature-based predictions in the source domain, but they
+
+are often unable to do so under distribution shifts at test time (after deployment). Hence, for an interpretable and robust decision-making pipeline under distribution shifts, while fully leveraging the representative power of foundation models, an adaptive test-time approach is required. To the best of our knowledge, we have proposed the first effort to tackle this problem setting for CBMs. We formalized potential failure modes under low-level and concept-level distribution shifts and proposed a novel test-time adaptation framework, named CONDA. Each component of CONDA is designed to address specific failure modes, effectively improving the test-time performance of a deployed CBM using only unlabeled test data.
+
+We acknowledge that the effectiveness of our framework is limited by the inherent robustness of the backbone foundation model, especially due to its reliance on pseudo-labeling. Specifically, when the backbone foundation model remains robust (e.g., against low-level shifts with lower severity level or concept-level shifts), concept-based predictions can be adjusted to be more robust than feature-based predictions through adaptation (e.g., see Metashift results in Table 1). However, when the backbone foundation model is not robust (e.g., against low-level shifts with higher severity level), the CBM adaptation, which relies on the pseudo-labels of the foundation model (feature representations), cannot be guided to a successful solution and could lead to reduced performance; see results in Table 8. Moreover, in Table 1, we note that there are instances where our adaptation did not yield
+
+
Dataset
ZS
LP
Yuksekgonul et al. (2023)
Yeh et al. (2020)
w/o adaptation
+ CSA
+ LPA
+ CSA + LPA
w/o adaptation
+ CSA
+ LPA
+ CSA + LPA
Metashift
Source
AVG
0.957
0.972
0.979 ± 0.001
-
-
-
0.972 ± 0.001
-
-
-
WG
0.934
0.960
0.969 ± 0.003
-
-
-
0.960 ± 0.001
-
-
-
Target
AVG
0.705
0.835
0.890 ± 0.006
0.620 ± 0.049
0.713 ± 0.005
0.676 ± 0.009
0.840 ± 0.009
0.834 ± 0.009
0.749 ± 0.008
0.690 ± 0.005
WG
0.460
0.720
0.850 ± 0.013
0.279 ± 0.110
0.476 ± 0.017
0.398 ± 0.018
0.712 ± 0.018
0.700 ± 0.020
0.512 ± 0.016
0.400 ± 0.010
+
+Table 8: Negative results of our test-time adaptation. In the target domain, the model faces Metashift images with random Gaussian noise (severity level five), following the implementation of Hendrycks & Dietterich (2019). When the performance of zero-shot and linear-probing inference is poor on the target domain, the pseudo-labels cannot serve as a reliable reference for the test-time adaptation. Therefore, the performance of CONDA with different components on the target domain is worse than that of the model without any adaptation.
+
+improvements with the CBM method of Yeh et al. (2020). In cases such as the CIFAR datasets and Camelyon17, the unadapted CBM already outperforms ZS or LP in the target domain, and adaptation using pseudo-labels produced by these methods can negatively impact the performance. This is likely because the concept learning algorithm in Yeh et al. (2020) is designed to optimize accuracy, with the concept bottleneck layer serving as an additional layer that can be optimized along with the subsequent LP layer. However, a caveat of this approach is that the interpretability of the concept bottleneck is not guaranteed, whereas methods such as Yuksekgonul et al. (2023) and Oikarinen et al. (2023) provide clear textual annotations for concepts, enhancing the interpretability.
+
+Despite these limitations, we believe our work is an important first step toward leveraging off-the-shelf foundation models in an interpretable decision-making process, while preserving the post-deployment utility. We highlight that our framework can continue to benefit from ongoing improvements in the robustness of foundation models and the development of more advanced pseudo-labeling techniques (as hinted in Appendix D), both of which represent promising avenues for future work. Another promising direction for future research is to develop a deeper theoretical understanding of concept bottlenecks under distribution shifts. For instance, it would be valuable to i) characterize the sufficiency of a given concept set from training (source domain) for robust test-time accuracy under different distribution shifts; and ii) to quantify or bound the extent to which test-time adaptation can bridge the accuracy gap between the source and target distributions. Such theoretical insights would complement the algorithmic and empirical advancements, guiding both the design of more effective residual concept bottleneck and the development of improved adaptation strategies.
\ No newline at end of file
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/images.zip b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..83e222ec60100c87161f8f6846cbcb534871ae18
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9aa9ae01ce1b5473f7d822bb7583a40457595a413a908a5f609f795df5cbbc7
+size 1106491
diff --git a/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/layout.json b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..aae0f385804ba59894ebd7d0c9f9c336217d3d72
--- /dev/null
+++ b/ICLR/2025/CONDA_ Adaptive Concept Bottleneck for Foundation Models Under Distribution Shifts/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9427215101ea6c82a9ee1236b942a4695a95668dd35370a87e11963e2bf3a79f
+size 908561
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_content_list.json b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0848a12198655664ac74ba8ea96e2637032da827
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c751f8ad4109e34a7fc231b1967d41036d5832fe8158c923e8203428424cda06
+size 219908
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_model.json b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..1af787181bf9aff51f7c6e65fc6751733b42325b
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:995c51305286a37d49147835b458494add5a0403a86e2e889cc3266b7e6c4048
+size 254809
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_origin.pdf b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..0517cbf00be55083ddfbe5b36591408951bef6db
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/338b9735-9c10-48bd-8380-bce55e690edf_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ae3ae793bca2c487feb4d171efd2ff4c0600c777a58e167859b98018ca2eed89
+size 2249705
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/full.md b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..98a03e0d5c51a2407c97472fb8299a682ba13784
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/full.md
@@ -0,0 +1,949 @@
+# CONGO: COMPRESSIVE ONLINE GRADIENT OPTIMIZATION
+
+Jeremy Carleton $^{1*}$ Prathik Vijaykumar $^{1}$ Divyanshu Saxena $^{2}$ Dheeraj Narasimha $^{3}$
+
+Srinivas Shakkottai1 Aditya Akella2
+
+$^{1}$ Texas A&M University, $^{2}$ The University of Texas at Austin, $^{3}$ Inria
+
+# ABSTRACT
+
+We address the challenge of zeroth-order online convex optimization where the objective function's gradient exhibits sparsity, indicating that only a small number of dimensions possess non-zero gradients. Our aim is to leverage this sparsity to obtain useful estimates of the objective function's gradient even when the only information available is a limited number of function samples. Our motivation stems from the optimization of large-scale queueing networks that process time-sensitive jobs. Here, a job must be processed by potentially many queues in sequence to produce an output, and the service time at any queue is a function of the resources allocated to that queue. Since resources are costly, the end-to-end latency for jobs must be balanced with the overall cost of the resources used. While the number of queues is substantial, the latency function primarily reacts to resource changes in only a few, rendering the gradient sparse. We tackle this problem by introducing the Compressive Online Gradient Optimization framework which allows compressive sensing methods previously applied to stochastic optimization to achieve regret bounds with an optimal dependence on the time horizon without the full problem dimension appearing in the bound. For specific algorithms, we reduce the samples required per gradient estimate to scale with the gradient's sparsity factor rather than its full dimensionality. Numerical simulations and real-world microservices benchmarks demonstrate CONGO's superiority over gradient descent approaches that do not account for sparsity.
+
+# 1 INTRODUCTION
+
+Online convex optimization (OCO) plays an important role in managing distributed applications like web caching, advertisement placement, portfolio selection, and recommendation systems. These applications involve an unknown, time-varying convex system cost function $f_{t}(\boldsymbol{x}_{t})$ , dependent on a $d$ -dimensional control $\boldsymbol{x}_{t}$ , which the user selects in an online manner. Of particular interest are systems with the following key characteristics: (i) $f_{t}(\cdot)$ and its gradient are unknown, and obtaining measurements for any control $\boldsymbol{x}_{t}$ is costly; (ii) the gradient of $f_{t}(\cdot)$ is sparse, where only a few dimensions of $\boldsymbol{x}_{t}$ significantly affect $f_{t}(\cdot)$ ; and (iii) $f_{t}(\cdot)$ evolves slowly, allowing for multiple measurements between updates to $\boldsymbol{x}_{t}$ . These features arise in many real-world settings, such as in queueing systems in communication, manufacturing, and distributed computing, where only a few bottlenecks exist at any given time and they must be identified through only a few measurements. Our goal is to develop efficient online gradient descent algorithms tailored to such scenarios.
+
+A core challenge in OCO is that both the objective function and its gradient are usually unavailable in closed form. Thus, we must perform zeroth-order OCO, where gradients are estimated from objective function observations at specific points close to the current input. We will show that when gradients exhibit sparsity (see Definition 1), efficient gradient estimation is possible by combining simultaneous perturbation stochastic approximation (SPSA; Spall (1992)) and compressive sensing, achieving dimension-independent sub-linear regret scaling in OCO problems.
+
+Related Work on Compressive Sensing for Stochastic Optimization: Introduced by Candes and Tao (2006), compressive sensing is widely used in signal processing for sparse signal recovery (Eldar and Kutyniok, 2012). Its value lies in requiring only logarithmic measurements relative to the vector's dimension $d$ to approximate an $s$ -sparse vector; see Foucart and Rauhut (2013) for details.
+
+To apply compressive sensing techniques, gradient measurements must be taken at randomly perturbed points, similar to SPSA. This idea was explored in (Borkar et al., 2018) in the context of stochastic optimization for a single unchanging objective function. Here, the gradient is measured as $\mathbf{A}\nabla f(\mathbf{x}) + e$ , with $\mathbf{A}$ being a Gaussian matrix and $e$ an error term due to interference from other dimensions and high order terms in the Taylor approximation to the perturbed function value. Two function evaluations suffice per measurement, though the error requires averaging over multiple perturbations to ensure an acceptable level of accuracy of the gradient estimate.
+
+Other significant work that leverages compressive sensing for stochastic optimization of a given objective function is (Cai et al., 2022), which introduces the Zeroth-Order Regularized Optimization (ZORO) algorithm. ZORO uses a Bernoulli measurement matrix and applies only one row of the matrix at a time. This method reduces the noise in gradient estimation, enabling accurate gradient estimates with fewer function evaluations.
+
+More details of related work are presented in Appendix A.
+
+Our Contributions - CONGO: We introduce the Compressive Online Gradient Optimization (CONGO) framework, applying compressive sensing methods to OCO for estimating gradients using a limited number of function evaluations at each online optimization step. Our goals for CONGO in the sparse OCO problem are: (i) develop a sample-efficient gradient estimation approach, (ii) analyze its regret over finite time, and (iii) empirically validate it in a general setting, and specifically for a real-world use case in a containerized microservice application.
+
+We propose three CONGO variants: CONGO-B (leveraging ideas from Borkar et al. (2018)), CONGO-Z (leveraging ideas from the ZORO approach of Cai et al. (2022)), and a more effective sampling approach using a Gaussian measurement matrix, which we name CONGO-E. One of our key analytical results is to allow for a bound on the expected regret to be proven in spite of the chance for compressive sensing to fail to recover the gradient with low error. We prove that CONGO-Z and CONGO-E have a better sample complexity than CONGO-B for generating gradient estimates, and we derive a dimension-independent $O(\sqrt{T})$ regret bound over $T$ time steps for these algorithms. For CONGO-Z and CONGO-E, the $\mathcal{O}(s\log \left(\frac{d}{s}\right))$ samples per gradient estimate greatly improves upon the $d + 1$ samples required for algorithms that do not consider sparse gradients (Agarwal et al., 2010).
+
+We validate CONGO in three settings: (i) a fully stochastic setting where a new high-dimensional random objective function is sampled after each gradient descent step (Section 6); (ii) a queueing system (under the Jackson network model), where resource allocations are chosen to balance processing time and resource cost (Section 7.1); and (iii) a real-world microservice autoscaler, where CPU resources are allocated to containers of a benchmark application (Gan et al., 2019) (Section 7.2). In setting (i), CONGO-E and CONGO-Z perform similar to gradient descent with full gradient information, thus matching our expectations from the theoretical results. In settings (ii) and (iii), CONGO-E outperforms standard SPSA in most cases even in low-dimensional settings, with its performance improving as sparsity increases. In the microservice setting, CONGO-E approaches the performance of an optimal reinforcement learning (RL) baseline even under variable loads. We conclude that CONGO enables algorithms which effectively exploit sparsity.
+
+# 2 PROBLEM FORMULATION
+
+System model and sequence of events: We consider an online learning problem over $T$ rounds indexed from 1 to $T$ . At the start of each round $t$ , the controller must choose a $d$ -dimensional control $\boldsymbol{x}_t \in \mathcal{K}$ where $\mathcal{K} \subset \mathbb{R}^d$ is known. We are specifically interested in the high dimensional regime such that $d$ is a large value. Next, an adversary chooses a differentiable convex function $f_t : \mathbb{R}^d \to \mathbb{R}$ and the controller incurs the cost $f_t(\boldsymbol{x}_t)$ . The controller is unaware of the function $f_t$ , however, we may acquire samples of $f_t$ in a local vicinity of $f_t(\boldsymbol{x}_t)$ . It is assumed that these samples are costly to obtain, or that there is a limit to how many can be taken, such that we desire an algorithm to be as sample-efficient as possible. Note that in our constrained optimization setting, we permit the samples
+
+used for gathering information on $\overline{\nabla} f_t(\pmb{x}_t)$ to lie outside of $\mathcal{K}$ so long as they remain close to $\pmb{x}_t$ in expectation.
+
+Control strategy: In this work, we will examine an online projected gradient descent algorithm where the samples retrieved are used to estimate a noisy gradient. In particular, at the end of round $t$ , we use the samples taken to compute an estimate $\tilde{\nabla} f_t(\boldsymbol{x}_t)$ . The online gradient descent algorithm dictates that we should use
+
+$$
+\boldsymbol {x} _ {t + 1} = \underset {\boldsymbol {x} \in \mathcal {K}} {\operatorname {a r g m i n}} | | \boldsymbol {x} - \left(\boldsymbol {x} _ {t} - \eta_ {t} \tilde {\nabla} f _ {t} \left(\boldsymbol {x} _ {t}\right)\right) | | _ {2} \tag {1}
+$$
+
+as the control for our next time step. Here $\eta_t$ is a predetermined step-size chosen by the controller.
+
+Assumptions: Our setting uses two key assumptions on the constraint set $\mathcal{K}$ and the observed functions.
+
+Assumption 1 (Constraint Set Properties). The set $\mathcal{K} \subset \mathbb{R}^d$ satisfies the properties: (i) $\mathcal{K}$ is compact and convex; and (ii) $\sup_{\boldsymbol{x} \in \mathcal{K}} ||\boldsymbol{x}||_2 \leq R$ .
+
+An important way in which our setting differs from standard online convex optimization is that we make an assumption about the sparsity of $\nabla f_t$ . We define sparsity as follows:
+
+Definition 1 (Sparsity). The support of a vector $\pmb{x} \in \mathbb{R}^d$ is:
+
+$$
+\operatorname {s u p p} (\boldsymbol {x}) := \{j \in \{1, 2, \dots d \}: \boldsymbol {x} _ {j} \neq 0 \}. \tag {2}
+$$
+
+We call a vector $\mathbf{x}$ s-sparse if $|\operatorname{supp}(\mathbf{x})| \leq s$ .
+
+Our overall constraints on the set of functions the adversary can choose from are summarized below:
+
+Assumption 2 (Function Properties). Let $\mathcal{F}$ denote the set of all functions $f$ which satisfy the properties: (i) $f$ is convex, $L_{f}$ -Lipschitz, and $L$ -smooth; and (ii) $\nabla f(\pmb{x})$ is s-sparse $\forall \pmb{x} \in \mathcal{K}$ . For each time $t \in [1,T]$ , we assume our functions $f_{t}$ are chosen such that $f_{t} \in \mathcal{F}$ .
+
+As mentioned in Section 1, the significance of the sparsity assumption is that an algorithm may be able to exploit this sparsity such that the number of samples it requires and the overall regret has little or no dependence on $d$ . The challenge, of course, is that we do not know a priori which dimensions of $\nabla f_{t}$ are nonzero at our current control point, and this can change at every round.
+
+Performance Metric: Our performance metric of interest is the adversarial regret at the end of $T$ rounds, which measures the difference in the cost accumulated over the $T$ rounds with that of the best fixed control point $x^{*}$ in hindsight. In what follows we shall formally define the adversarial regret.
+
+Definition 2 (Adversarial Regret). Given a sequence of convex functions $\{f_t\}_{t=1}^T$ satisfying Assumption 2, our objective is to minimize the following quantity which we call the regret:
+
+$$
+R (T) := \max _ {f _ {\tau} \in \mathcal {F}, \tau = 1, 2, \dots T} \left(\sum_ {t = 1} ^ {T} f _ {t} \left(\boldsymbol {x} _ {t}\right) - \min _ {\boldsymbol {x} ^ {*}} \sum_ {t = 1} ^ {T} f _ {t} \left(\boldsymbol {x} ^ {*}\right)\right) \tag {3}
+$$
+
+# 3 MOTIVATING EXAMPLE
+
+The Jackson network control problem is one possible application of CONGO and relates to the real-world problem of autoscaling microservices. In a Jackson network (Srikant and Ying, 2014), jobs enter a set of interconnected queues. When de-queued, jobs are processed by a server and then may re-enter the queue, jump to another, or exit the system. The (end-to-end) latency is the delay between job arrival and completion and is affected by the service rates of the servers. Our goal is to minimize the average latency while balancing resource costs, which grow linearly with increased resource allocation. The average service time in a Jackson network is a convex, non-increasing function of allocated resources; meanwhile, the workload changes over time, making this an OCO problem.
+
+Let $L(\pmb{\lambda}_t, \pmb{x}_t)$ denote the expected end-to-end latency for a given workload $\pmb{\lambda}_t$ and allocation $\pmb{x}_t$ . The objective function (total cost) that we wish to minimize is:
+
+$$
+f _ {t} \left(\boldsymbol {x} _ {t}\right) = L \left(\boldsymbol {\lambda} _ {t}, \boldsymbol {x} _ {t}\right) + w \sum_ {i = 1} ^ {d} \left[ \boldsymbol {x} _ {t} \right] _ {i}, \tag {4}
+$$
+
+where $w$ is the price per unit of allocated resources (assumed uniform across queues). Note that each element of the gradient of $L(\lambda_t, \cdot)$ corresponds to a different queue. We can only sample latencies
+
+for a finite number of jobs to limit measurement overhead, and these samples are used to estimate the gradient. The service cost is known, so only the gradient of $L(\lambda_t,\cdot)$ needs to be estimated. If the system is bottlenecked only at a few queues, the problem will be sparse, with only a few large gradients, which we must identify using a limited number of measurements.
+
+Such sparsity is observed in large-scale heterogeneous microservices applications. Similar to the Jackson network model, requests in microservice applications queue at multiple microservices before completion (Gan et al., 2019). Resource allocation to microservices, e.g. CPU resources, must be carefully managed to achieve tight latency targets. Appendix A includes a review of microservice literature and the challenges of resource allocation, particularly the curse of dimensionality arising from numerous services and flows (production microservice graphs may have up to 100s of microservices (Huye et al., 2023)). Typically, only a few microservices are bottlenecks, and adjusting resources for any microservice which is not a bottleneck will not significantly impact $L(\boldsymbol{\lambda}_t, \boldsymbol{x}_t)$ (Qiu et al., 2020), leading to an approximately sparse gradient as per Definition 1, which we have confirmed experimentally (see Fig. 1). This sparse bottleneck phenomenon has been observed in other offline-trained autoscalers (Qiu et al., 2020; Sachidananda and Sivaraman, 2024; Wang et al., 2024) that identify specific microservice instances that are bottlenecks and adjust their allocations. We also observe that $L$ is convex in both its arguments (Fig. 1). Thus, a scheme like CONGO can be expected to perform well at online resource management for microservice applications.
+
+
+Figure 1: Left: Convexity of latency vs. CPU allocated to thenginx-thrift container in the SocialNetwork benchmark. Center: Convexity of latency vs. arrival rate for compose-post requests. Right: Sparsity of average relative gradients of end-to-end latency for 26 containers under different offered workloads. Only a few show large (negative) gradients for each workload, making them good targets for increased CPU allocation.
+
+
+
+
+
+# 4 CONGO FRAMEWORK AND ALGORITHMS
+
+The CONGO framework characterizes a class of online convex optimization algorithms that consist of four steps: (i) a measurement matrix generation step, (ii) a step where measurements are collected, (iii) a constrained gradient recovery step, and (iv) a gradient descent update step. CONGO algorithms can be broken into an inner loop that estimates the gradient (steps (i)-(iii)) and an outer loop that performs gradient descent (step (iv)). Since no existing OCO approach utilizes compressive sensing, we make decisions for each of the above steps, leveraging insights from work on stochastic optimization with a fixed objective. As we do so, we present variants CONGO-B and CONGO-Z, which are motivated by Borkar et al. (2018) and Cai et al. (2022), along with a more efficient variant, CONGO-E. Some of the design choices we made for the OCO setting are explained in greater detail in Appendix D.
+
+(i) Measurement Matrix Generation Method: To obtain the gradient approximation $\tilde{\nabla} f(\pmb{x})$ , we first obtain "compressed" measurements of the form $\pmb{y} = \mathbf{A}\nabla f(\pmb{x}) + \pmb{e}$ (where the range space of $\mathbf{A}$ is of lower dimension than the domain space). We apply the theory of compressive sensing to guide our choice for the matrix $\mathbf{A}$ used in the simultaneous perturbation step (step (ii)). The recovery guarantees we use require $\mathbf{A}$ to satisfy the $2s^{\mathrm{th}}$ or $4s^{\mathrm{th}}$ restricted isometry property (RIP) as defined in Appendix A. This property approximately preserves the notion of distance in the domain and range of the transformation represented by the matrix $\mathbf{A}$ for sufficiently sparse vectors. Since we will eventually create $\tilde{\nabla} f(\pmb{x})$ from the measurements (step iii), we need $\mathbf{A}$ to be such that the information in $\nabla f(\pmb{x})$ can be recovered from $\mathbf{A}\nabla f(\pmb{x})$ .
+
+It is known (Foucart and Rauhut, 2013) that matrices drawn from dense random distributions like Gaussian matrices (with $\mathcal{N}(0,1)$ entries) and Bernoulli matrices (with Rademacher entries) give the best guarantees for satisfying the RIP, so those matrices are used in the CONGO-style algorithms we consider. Since these matrices may fail to satisfy the RIP (with a small probability), CONGO-style algorithms resample the measurement matrix at each iteration to ensure that compressive sensing failures are limited to single iterations.
+
+(ii) Measurement Procedure: The measurements of the form $\mathbf{A}\nabla f(\pmb{x}) + e$ are obtained using variants of the simultaneous perturbation stochastic approximation (SPSA). The original idea for SPSA is credited to Spall (1992). We introduce it here with more details in Appendix A. First, generate a sequence of $d$ i.i.d. Rademacher random variables, $\{\Delta_j\}_{j=1}^d$ . Next, generate, a perturbation vector $\pmb{\Delta} := \sum_{j=1}^{d}\pmb{u}_i\Delta_j$ where $\pmb{u}_i$ is the unit vector along the $i$ th dimension. Then we compute gradient estimates along each dimension:
+
+$$
+\frac {f (\boldsymbol {x} + \delta \boldsymbol {\Delta}) - f (\boldsymbol {x})}{\delta \Delta_ {j}} \approx \frac {\partial f (\boldsymbol {x})}{\partial x _ {i}} + \sum_ {i \neq j} \frac {\partial f (\boldsymbol {x})}{\partial x _ {i}} \frac {\Delta_ {i}}{\Delta_ {j}}. \tag {5}
+$$
+
+These $d$ measurements combine to give an estimate of $\nabla f(\pmb{x})$ . When applying compressive sensing, we seek measurements which form a vector approximately equal to $\mathbf{A}\nabla f(\pmb{x})$ where $\mathbf{A} \in \mathbb{R}^{m \times d}$ with $m << d$ . This requires us to form perturbations using the rows of $\mathbf{A}$ , either by replacing $\pmb{\Delta}$ with a row $\mathbf{a}_i$ and repeating $m$ times or by replacing $\pmb{\Delta}$ with $\mathbf{A}^T\pmb{\Delta}$ to form a linear combination. While the latter method only requires two function evaluations, it introduces a noise term due to interference between measurements for different rows; this was observed previously by Borkar et al. (2018).
+
+To see how these methods give us an approximation of $\mathbf{A}\nabla f(\pmb{x})$ , note that since $f$ is differentiable, the Taylor approximation for $f(\pmb{x} + \delta \pmb{\Delta})$ with $\pmb{x}$ as the reference point is as shown in equation 6 after cancelling out terms:
+
+$$
+f (\boldsymbol {x} + \delta \boldsymbol {\Delta}) = f (\boldsymbol {x}) + \langle \nabla f (\boldsymbol {x}), \delta \boldsymbol {\Delta} \rangle + \xi \tag {6}
+$$
+
+where $\xi$ represents the Lagrange remainder of the first-order Taylor approximation. In particular, we have the bound
+
+$$
+\xi \leq \frac {1}{2} | | \nabla^ {2} f | | _ {2} | | \delta \Delta | | _ {2} ^ {2} \tag {7}
+$$
+
+Thus, $(f(\pmb{x} + \delta \pmb{\Delta}) - f(\pmb{x})) / \delta = \langle \nabla f(\pmb{x}), \pmb{\Delta} \rangle + \mathcal{O}(\delta)$ .
+
+Composition of $y$ from measurements: If $\Delta = \mathbf{a}_i$ , then the first term is exactly want we want for $y_i$ . However, if $\Delta = \mathbf{A}^T \Delta$ , then we can divide by $\Delta_i$ to isolate $\langle \nabla f(\boldsymbol{x}), \mathbf{a}_i \rangle$ , but there will be other terms of the form $\Delta_i^{-1} \langle \nabla f(\boldsymbol{x}), \Delta_j \mathbf{a}_j \rangle$ left (if the elements of $\Delta$ are Rademacher random variables, then these terms will have zero mean). Since any difference between $y_i$ and $\langle \nabla f(\boldsymbol{x}), \mathbf{a}_i \rangle$ adds to the error in the final estimate of $\nabla f(\boldsymbol{x})$ , algorithms using the second method may need to repeat the process several times with different random draws of $\Delta$ and average over the measurements to control this interference between measurements. In either case, the CONGO framework also requires replacing $\delta$ by $\delta ||\Delta||_2^{-2}$ to cancel out the factor of $\Delta$ in the Lagrange remainder. This is important because if a factor of $||\Delta||_2^2$ is left in the error term, its expectation will be present in the regret bound, and hence the regret bound will no longer be dimension-independent.
+
+The difference between the two measurement schemes is made clear in the following lemma, which bounds the overall measurement error (prior to any potential averaging):
+
+Lemma 1. Given a matrix $\mathbf{A} \in \mathbb{R}^{m \times d}$ , $\delta > 0$ , and a function $f$ which is convex, $L_{f}$ -Lipschitz, and $L$ -smooth, if a vector of measurements $\mathbf{y}$ is constructed as
+
+$$
+y _ {i} = \left(f (\pmb {x} + \frac {\delta}{\| \mathbf {a} _ {i} \| _ {2} ^ {2}} \mathbf {a} _ {i}) - f (\pmb {x})\right) \frac {| | \mathbf {a} _ {i} | | _ {2} ^ {2}}{\delta} \forall i \in [ m ],
+$$
+
+then
+
+$$
+\boldsymbol {y} = \mathbf {A} \nabla f (\boldsymbol {x}) + \boldsymbol {e}
+$$
+
+where $||\pmb {e}||_2\leq \frac{1}{2}\delta ||\nabla^2 f||_2\sqrt{m}\leq \frac{L}{2}\delta \sqrt{m}.$
+
+If instead, $y$ is constructed as
+
+$$
+y _ {i} = \left(f (\boldsymbol {x} + \frac {\delta}{\| \mathbf {A} ^ {T} \Delta \| _ {2} ^ {2}} \mathbf {A} ^ {T} \Delta) - f (\boldsymbol {x})\right) \frac {\| \mathbf {A} ^ {T} \Delta \| _ {2} ^ {2}}{\delta \Delta_ {i}} \forall i \in [ m ],
+$$
+
+where $\Delta \in \mathbb{R}^m$ is a vector of Rademacher random variables independent from the entries of $\mathbf{A}$ , then
+
+$$
+\boldsymbol {y} = \mathbf {A} \nabla f (\boldsymbol {x}) + \boldsymbol {e} _ {1} + \boldsymbol {e} _ {2}
+$$
+
+with $||\pmb{e}_2||_2 \leq \frac{1}{2}\delta ||\nabla^2 f||_2\sqrt{m} \leq \frac{L}{2}\delta \sqrt{m}$ and
+
+$$
+[ \boldsymbol {e} _ {1} ] _ {i} = \sum_ {j \neq i} \frac {\Delta_ {j} ^ {l} \langle \nabla f (\boldsymbol {x}) , \mathbf {a} _ {j} \rangle}{\Delta_ {i} ^ {l}}
+$$
+
+(iii) Constrained Gradient Recovery: Many recovery methods are available that estimate a sparse vector $\pmb{v}$ given measurements of the form $\mathbf{A}v + e$ under suitable conditions on $\mathbf{A}$ . Two of these already have well-studied guarantees: (i) Basis Pursuit (Chen et al., 1998) and (ii) Compressive Sampling Matching Pursuit (CoSaMP) (Needell and Tropp, 2008). See Appendix A for an introduction. Note that the recovery guarantees we use in Section 5 require us to scale $\mathbf{A}$ and $\pmb{y}$ by $\frac{1}{\sqrt{m}}$ where $m$ is the number of rows of $\mathbf{A}$ before performing the recovery. Regardless of which method is used, the CONGO framework requires that $\|\tilde{\nabla}f_t(\pmb{x}_t)\|_2^2$ be explicitly bounded over all rounds, and to ensure this we either introduce an explicit constraint (in the case of basis pursuit) or perform post-processing. If the recovery procedure fails to return a vector satisfying the expected bound, we replace it with the zero vector. Although the choice of the zero vector is not critical to the regret bound, it makes some practical sense since it avoids the risk of unexpectedly moving to a much worse control point.
+
+(iv) Gradient Descent Update Step In this paper, we consider constrained OCO (see Assumption 1). Thus, our gradient descent update takes the form of equation 1.
+
+# 4.1 CONSTRUCTION OF CONGO VARIANTS
+
+We construct three variants of CONGO based on some of the choices that one can make for each step.
+
+CONGO-B uses a Gaussian measurement matrix and a combination of the rows of the measurement matrix for each perturbation. Averaging is applied to mitigate the effect of interference between measurements. Basis pursuit is applied to obtain the gradient estimate. The pseudocode for this algorithm is presented in Appendix B.
+
+CONGO-Z uses a Bernoulli measurement matrix and single-row perturbations resulting in exactly $m + 1$ function evaluations per gradient estimate (since no averaging is applied). CoSaMP is used to obtain the gradient estimate. Due to the similarity between CONGO-Z and CONGO-E, we do not include the pseudocode for CONGO-Z here.
+
+CONGO-E modifies CONGO-Z by using a Gaussian measurement matrix, which we find leads to performance improvements across all of our experiments. We chose to stick with single-row perturbations to avoid the interference between measurements, since our analytical results show that this is necessary in order to obtain the desired regret bound with an efficient number of samples. We maintain CoSaMP as the recovery method for practical reasons; see Appendix E. The pseudocode for CONGO-E is provided in Algorithm 1.
+
+Remark 1. As alluded to above, the gradient estimation procedure used for CONGO-B introduces additional error due to interference since the measurements for every row of $\mathbf{A}$ are being compressed into a single sample. We have found that this leads to weaker theoretical results and worse empirical performance (even with averaging) than CONGO-Z/E. Our intention with CONGO-B is to illustrate the importance of certain design choices by comparing it to CONGO-Z/E.
+
+# 5 THEORETICAL RESULTS
+
+In this section, we first present the general theorem used to prove CONGO regret bounds. Then, we state the bounds achieved by CONGO-B, CONGO-Z and CONGO-E. We establish that all three algorithms achieve the optimal regret scaling of $\mathcal{O}(\sqrt{T})$ without a dependence on the dimension. For CONGO-Z and CONGO-E in particular, this only requires $\mathcal{O}(s\left(\log \left(\frac{d}{s}\right) + \log (2T)\right))$ samples per round. In the non-sparse case it has been shown (Agarwal et al., 2010) that this can be achieved using $d + 1$ samples per round, but by taking advantage of the sparsity we are able to do so using a number of samples that depends only logarithmically on $d$ . All proofs are postponed to Appendix C.
+
+The following is the key theorem for the CONGO framework:
+
+Theorem 1. Let assumptions 1 and 2 hold, and further assume that $\forall t\in [T]$
+
+- $||\tilde{\nabla} f_{t}(\boldsymbol{x}_{t}) - \nabla f_{t}(\boldsymbol{x}_{t})||_{2} \leq M\delta$ with probability at least $1 - \frac{1}{T}$
+$\left|\left|\tilde{\nabla} f_t(\boldsymbol{x}_t)\right|\right|_2 \leq M\delta + L_f$
+
+Algorithm 1 CONGO-E: Compressive Online Gradient Optimization - Efficient Version
+Require: Constraint set $\kappa$ , Horizon $T$ sparsity $s$ Lipschitz constant $L_{f}$ Smoothness parameter $L$ Parameters $(\eta_t)^T_{t = 1},\delta ,m$ , Initialization point $\pmb{x}_{1}$
+for $t = 1,2,\dots ,T$ do
+ $\mathbf{A}^t\gets$ randomly drawn $m\times d$ matrix with $\mathcal{N}(0,1)$ entries Generate measurement matrix
+Query $f_{t}(\pmb {x}_{t})$
+for $i = 1,2,\dots ,m$ do
+ $\Delta \leftarrow \frac{\delta}{||\mathbf{a}_i^t||_2^2}\mathbf{a}_i^t$
+Query $f_{t}(\pmb {x}_{t} + \Delta)$ $y_{i}\gets (f_{t}(\pmb {x}_{t} + \Delta) - f_{t}(\pmb {x}_{t}))\frac{||\mathbf{a}_{i}^{t}||_{2}^{2}}{\delta}$ Construct y from measurements
+end for
+ $\tilde{\nabla} f_{t}(\pmb {x}_{t})\gets \mathrm{CoSaMP}(\frac{1}{\sqrt{m}}\mathbf{A}^{t},\frac{1}{\sqrt{m}}\pmb {y},s)$ Constrained gradient recovery
+if $||\tilde{\nabla} f_{t}(\pmb {x}_{t})||_{2} > L_{f} + \frac{7.21}{2} L\delta$ then
+ $\tilde{\nabla} f_{t}(\pmb {x}_{t})\gets 0$
+end if
+ $\pmb{x}_{t + 1}\gets \underset {\pmb{x}\in \mathcal{K}}{\mathrm{argmin}}||\pmb {x} - (\pmb {x}_t - \eta_t\tilde{\nabla} f_t(\pmb {x}_t))||_2$ Gradient descent update
+end for
+Incur regret $\sum_{t = 1}^{T}f_{t}(\pmb {x}_{t}) - f_{t}(\pmb{x}^{*})$
+
+where $M \geq 0$ is independent of $T$ . Then with $\eta_t = \frac{1}{L_f \sqrt{T}} \forall t$ and $\delta = \frac{1}{MT}$ , the regret of an algorithm running projected gradient descent using the estimated gradient $\tilde{\nabla} f_t(\boldsymbol{x}_t)$ after $T$ rounds scales as $\mathcal{O}((D + \frac{R}{2} + \frac{4R}{L_f}) L_f \sqrt{T})$ where $R$ is as in Assumption 1 and $D = \sup_{\boldsymbol{x}, \boldsymbol{y} \in \mathcal{K}} \frac{1}{2} ||\boldsymbol{x} - \boldsymbol{y}||_2^2$ (see proof for the full expression).
+
+The following lemma uses known guarantees on the restricted isometry constants (RICs) for Gaussian and Bernoulli random matrices to establish recovery guarantees. In turn, this will be used to show conditions under which our CONGO-style algorithms satisfy the assumptions of Theorem 1.
+
+Lemma 2. On any round $t$ , Given a Gaussian or Bernoulli random matrix $\mathbf{A}^t$ and measurements $\mathbf{y} = \mathbf{A}^t\nabla f_t(\mathbf{x}_t) + \mathbf{e}$ , if $\mathbf{A}^t$ and $\mathbf{y}$ are first rescaled by $\frac{1}{m}$ , then under Assumption 1, the gradient estimate $\tilde{\nabla} f_t(\mathbf{x}_t)$ returned by CoSaMP or basis pursuit satisfies
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq C \left| \left| \boldsymbol {e} \right| \right| _ {2}
+$$
+
+with probability at least $1 - \epsilon$ so long as
+
+$$
+m \geq C ^ {\prime} \left(\kappa s \log \left(\frac {e d}{\kappa s}\right) + \log (2 \epsilon^ {- 1})\right),
+$$
+
+where $C, C'$ , and $\kappa$ are constants depending on the type of measurement matrix used and the recovery algorithm (but not on $d$ or $s$ ). In particular, one can use $C = 3$ and $\kappa = 2$ for basis pursuit and $C = 7.21$ and $\kappa = 4$ for CoSaMP; see Remark 2 for a note on the value of $C'$ .
+
+Based on Lemma 2 and Theorem 1, $m$ must depend logarithmically on $T$ to ensure the guarantee. While this dependence is weak, adjusting the number of samples as the problem horizon increases is undesirable. Fortunately, in all our experiments, we could omit the $T$ -dependent term in $m$ and still achieve strong performance.
+
+We now give the theoretical result for CONGO-B (Algorithm 2), and then show how it is improved upon by CONGO-Z and CONGO-E in terms of the number of function evaluations per round.
+
+Theorem 2. Let assumptions 1 and 2 hold. Then CONGO-B with $\eta = \frac{1}{L_f\sqrt{T}}$ , $\delta = \frac{1}{3LT}$ , $m = \left[C(2s\log \left(\frac{ed}{2s}\right) + \log (4T))\right]$ (for a constant $C$ independent of $s, d, \text{and} T$ ) has an expected regret, which, after $T$ rounds, scales as $\mathcal{O}((D + \frac{R}{2} + \frac{4R}{L_f})L_f\sqrt{T})$ . Furthermore, the average number of samples which the algorithm must take on a round to achieve this is no greater than $36d(m - 1)^2 L_f^2\log (2m)T\log (2mT) + 2$ .
+
+
+Figure 2: Comparison of accumulated costs, where GD represents gradient descent with full gradient information. Left: Noiseless function evaluations with $d = 50$ . Center: Noisy evaluations with $d = 50$ . Right: Noisy evaluations with $d = 100$ . $\sigma$ represents the noise standard deviation. Even with noise, CONGO-Z and CONGO-E perform closely to the GD baseline.
+
+Clearly, the number of samples which CONGO-B demands for this guarantee is not realistic for practical scenarios. However, it should be noted that due to the loose upper bounds used to obtain this value, the situation appears much worse than it actually is. Indeed, in the numerical experiments of Section 6 we find that when the number of samples taken is only $cm$ for a small constant $c$ , the performance from CONGO-B is still significantly better than the SPSA algorithm that does not account for sparsity. Nonetheless, we would like to have an algorithm which can give the desired regret bound with a reasonable number of samples which is significantly less than $d$ . The following result shows that CONGO-Z and CONGO-E, which only require $m + 1$ samples, suit this purpose.
+
+Theorem 3. Let assumptions 1 and 2 hold. Then CONGO-Z and CONGO-E with $\eta = \frac{1}{L_f\sqrt{T}}$ , $\delta = \frac{2}{7.2LT}$ , $m = \left[C\left(4s\log \left(\frac{ed}{4s}\right) + \log (2T)\right)\right]$ (for a constant $C$ independent of $s, d, \text{and} T$ ) have an expected regret which after $T$ rounds scales as $\mathcal{O}\left((D + \frac{R}{2} + \frac{4R}{L_f})L_f\sqrt{T}\right)$ .
+
+# 6 BENEFITS OF COMPRESSIVE SENSING
+
+In what follows, we empirically demonstrate the superiority of the compressive sensing approach to standard SPSA (GDSP denotes the algorithm which performs gradient descent using standard SPSA) in the online setting. We also include projected gradient descent with full gradient information (denoted GD) as an optimal baseline. In the numerical results presented in this section, we restrict the class of functions which the adversary can choose from to quadratic functions of the form
+
+$$
+f (\boldsymbol {x}) = \boldsymbol {x} ^ {T} \boldsymbol {D} \boldsymbol {x} + \boldsymbol {b} ^ {T} \boldsymbol {x} + c \tag {8}
+$$
+
+where $D$ is a diagonal matrix. Importantly, the vectors $\mathrm{diag}(D)$ and $b$ are both $s$ -sparse with identical support. This ensures that the gradient $\nabla f(\boldsymbol{x}) = 2D\boldsymbol{x} + b$ is $s$ -sparse. The nonzero entries of $b$ are sampled from a Gaussian distribution with a mean of -1 and a standard deviation of 1, and the nonzero entries of $D$ are sampled from the same distribution with the absolute value taken to ensure that $D$ is positive semidefinite. The value of $c$ is sampled from a folded normal distribution so that $c \geq 0$ . The constraint set is a Euclidean ball centered on the origin with radius $R$ . In the experiments for Fig. 2, we set $R = 100$ .
+
+Fig. 2 shows the results for three experiments with a moderately high level of sparsity. These plots are averaged over 50 random seeds, and the standard deviations are indicated with the shaded areas. CONGO-Z, CONGO-E, and GDSP all use $m + 1$ samples per gradient estimate, but CONGO-B uses $3m$ and $6m$ for $d = 50$ and $d = 100$ , respectively. We first considered the case where function evaluations are noiseless, and set $\delta = 1\mathrm{e}^{-5}$ . As expected, the CONGO-Z and CONGO-E algorithms achieved almost the same performance as exact gradient descent, while CONGO-B did worse since the amount of averaging was not enough to counteract the interference between dimensions. All of the CONGO-style algorithms outperformed GDSP. In the second and third experiments, we considered the case where noise from a $\mathcal{N}(0,0.001)$ distribution was added to the function evaluations and found that CONGO-Z and CONGO-E still did not perform much worse than exact gradient descent. For CONGO-B, we had to increase the number of samples it averaged over for it to maintain a similar performance. We performed several additional experiments in this setting to investigate robustness; the results can be found in Appendix F. More details on the parameters used in the numerical simulations are given in Appendix G.
+
+
+Figure 3: Jackson network simulations while varying the number of queues, workload, job types and arrival rates. The CONGO algorithms, especially CONGO-E, reduce cost faster than the baselines.
+
+# 7 AUTOSCALING OF CONTAINERIZED MICROSERVICES
+
+We now discuss the application of CONGO to the use-cases introduced in Section 3. In Section 7.1, we simulate Jackson networks under job distributions with unique routes, showing that the benefits of compressive sensing can be reaped in many scenarios. Then, in Section 7.2, we deploy our CONGO algorithms on a real-world microservice benchmark and demonstrate their practical benefits.
+
+# 7.1 JACKSON NETWORK SIMULATION
+
+Methodology: In the following experiments, we simulate the Jackson Network model introduced in Section 3. In the simulation, the service time experienced by jobs at a queue is inversely related to the allocation for that queue: given an allocation $x$ the service time at the $i$ th queue is $\frac{1}{x_i + 0.1}$ . For simplicity, we set $w = 1$ in equation 4. We consider two different Jackson network layouts – one with 15 and one with 50 microservices. Details can be found in Appendix G. We conduct experiments for the two Jackson network layouts with three types of workloads: (i) fixed workload, (ii) fixed arrival rate with variable job distribution, and (iii) variable arrival rate with fixed job distribution.
+
+Baselines: We compare the three CONGO-style algorithms with each other and two gradient-descent baselines to concretize the benefits of compressive sensing observed for this application. The first, Naive Stochastic Gradient Descent (NSGD), takes the naive approach of estimating the partial gradient along each dimension in isolation (thus requiring $d + 1$ samples per round). The second is the GDSP algorithm mentioned in Section 6 (now denoted SGDSP since it is applied to stochastic gradient descent). See Appendix G for the implementation details of the algorithms, including hyperparameters. The results for each of these algorithms are averaged over five random seeds.
+
+Results: The results are shown in Fig. 3. First, we note that NSGD, despite using more samples on each round than the other algorithms, shows poor performance in every scenario; this is evidence for the effectiveness of simultaneous perturbation. We also note that while SGDSP eventually reaches a cost on par with that of CONGO-E in each scenario, it consistently takes much longer to reach that cost, leading to a significantly higher regret. In general, CONGO-E's advantage from quickly lowering its cost in the early rounds is amplified when there are more queues. We see that CONGO-B performs well in the limited-sparsity regime with only 15 queues, while in the high-dimensional regime it fails to outperform SGDSP (likely owing to greater interference). CONGO-Z performs poorly in many scenarios, which we believe is due to the Bernoulli random matrix being less effective for sparse recovery than the Gaussian random matrix for the same number of measurements.
+
+# 7.2 REAL-WORLD MICROSERVICE BENCHMARK DEPLOYMENT
+
+Methodology: We test the ability of CONGO-style algorithms to converge to an efficient resource allocation when autoscaling on a real-world benchmark. We utilize the SocialNetwork application from the DeathStarBench suite (Gan et al., 2019) which represents a small-scale social media platform with various request types such as 'compose-post', 'read-user-timeline', and 'read-home-timeline'.
+
+
+Figure 4: Overall costs in a microservice benchmark application under different workload patterns. CONGO-E consistently outperforms the baselines and overall performs better than CONGO-B and CONGO-Z, and it approaches the performance of a policy pre-trained for each scenario via PPO.
+
+As with the experiments in Section 7.1, three scenarios are considered: (i) fixed workload, (ii) fixed arrival rate with variable job types, and (iii) variable arrival rate with fixed job types. As before, we use a combination of the end-to-end latency and a cost associated with CPU allocations as the overall cost function. If $\bar{L} (\cdot ,\cdot)$ denotes the sample mean of the end-to-end latency, the cost is calculated as:
+
+$$
+f _ {t} (\boldsymbol {x} _ {t}) = \psi \bar {L} (\boldsymbol {\lambda} _ {t}, \boldsymbol {x} _ {t}) + w \sum_ {i = 1} ^ {d} [ x _ {t} ] _ {i}
+$$
+
+Note that for the purposes of minimizing the cost function, the introduction of the latency weight $\psi$ has the same effect on the optimal solution as rescaling $w$ by its inverse. In these experiments, we set $\psi = 0.001$ and $w = 0.1$ . Unlike in Section 7.1, we plot wall-clock time on the x-axis since everything happens in real-time but the time elapsed per round is not consistent across all algorithms.
+
+Baselines: These experiments compare CONGO B, Z, and E against the same NSGD and SGDSP baselines used in Section 7.1 along with PPO as a representative pretrained RL method. We include PPO to test whether our algorithm can compete with a pretrained model since most intelligent autoscaling methods rely on pretraining (see Appendix A). Results are averaged over four runs.
+
+Results: As seen in Fig. 4, CONGO-E always performs better than the gradient descent baselines, and it is able to make progress towards the optimal cost given by PPO, reducing its cost by close to $45\%$ on average for the fixed workload and variable job type cases and $20\%$ for the variable arrival rate case in a matter of just over two hours. Furthermore, CONGO-E reaches a lower cost faster than CONGO-Z for the FW and VAR cases, demonstrating the superiority of the Gaussian distribution for measurement matrices. On the other hand, CONGO-B shows poorer performance though it still maintains a lower cost than the gradient descent baselines at most times; we attribute this to the extra noise which the algorithm suffers from as explained in Section 4.
+
+# 8 CONCLUSION AND LIMITATIONS
+
+In this paper, we introduced a framework that brings the benefits from compressive sensing into the OCO setting. We proved that in the sparse gradient setting, a number of samples only logarithmic in $d$ is sufficient to guarantee $\mathcal{O}(\sqrt{T})$ regret. Furthermore, we showed that these benefits extend to practical applications. Overall, we found that CONGO-Z allows for strong theoretical guarantees with relatively few samples while CONGO-B offers poor theoretical guarantees but performs better in scenarios where observations are highly noisy, and CONGO-E provides the best of both worlds.
+
+Limitations: The assumption of exactly sparse gradients in our theoretical analysis may not hold in complex systems, but our experiments in Section 7 show that near-sparsity suffices for the benefits of compressive sensing to be seen. As noted in Section 5, our algorithm assumes that bounds on several quantities are known; however, it is acceptable for the bounds on $L_{f}$ and $L$ to be quite loose if we are mainly concerned about the scaling of $T$ and $d$ . Our treatment of the Jackson network optimization problem (and hence the microservice autoscaling problem) as an OCO problem depends upon the assumption of stability (i.e., job arrival rates do not exceed service rates for prolonged periods), and in our experiments we took measures to ensure that stability was not violated in a way that prevented the algorithms from recovering. Measures to ensure stability are detailed in Appendix G.
+
+# ACKNOWLEDGEMENTS
+
+Research was funded in part by NSF grants CNS 2312978 and CISE Expeditions in Computing CCF-2326576. All opinions expressed are those of the authors, and need not represent those of the sponsoring agencies.
+
+# REFERENCES
+
+Alekh Agarwal, Ofer Dekel, and Lin Xiao. Optimal algorithms for online convex optimization with multi-point bandit feedback. In Annual Conference Computational Learning Theory, 2010. URL https://apisemantic scholar.org/CorpusID:118314530.
+Krishnakumar Balasubramanian and Saeed Ghadimi. Zeroth-order nonconvex stochastic optimization: Handling constraints, high dimensionality, and saddle points. Foundations of Computational Mathematics, 22:35 - 76, 2018. URL https://api-semanticscholar.org/CorpusID:58004708.
+S.. Bhatnagar, HL Prasad, and LA Prashanth. Stochastic Recursive Algorithms for Optimization: Simultaneous Perturbation Methods. Springer, 2013.
+Vivek S. Borkar, Vikranth R. Dwaracherla, and Neeraja Sahasrabudhe. Gradient estimation with simultaneous perturbation and compressive sensing. Journal of Machine Learning Research, 18(161):1-27, 2018. URL http://jmlr.org/papers/v18/15-592.html.
+Sebastien Bubeck, Ofer Dekel, and Tomer Koren. Bandit convex optimization: $\sqrt{\{T\}}$ regret in one dimension. In Annual Conference Computational Learning Theory, 2015. URL https://api-semanticscholar.org/CorpusID:14672274.
+HanQin Cai, Daniel McKenzie, Wotao Yin, and Zhenliang Zhang. Zeroth-order regularized optimization (zoro): Approximately sparse gradients and adaptive sampling. SIAM Journal on Optimization, 32(2):687-714, April 2022. ISSN 1095-7189. doi: 10.1137/21m1392966. URL http://dx.doi.org/10.1137/21m1392966.
+Emmanuel J Candes and Terence Tao. Near-optimal signal recovery from random projections: Universal encoding strategies? IEEE transactions on information theory, 52(12):5406-5425, 2006.
+Emmanuel J. Candès. The restricted isometry property and its implications for compressed sensing. Comptes Rendus Mathematique, 346(9):589-592, 2008. ISSN 1631-073X. doi: https://doi.org/10.1016/j.crna.2008.03.014. URL https://www.sciencedirect.com/science/article/pii/S1631073X08000964.
+Scott Shaobing Chen, David L. Donoho, and Michael A. Saunders. Atomic decomposition by basis pursuit. SIAM Journal on Scientific Computing, 20(1):33-61, 1998. doi: 10.1137/S1064827596304010. URL https://doi.org/10.1137/S1064827596304010.
+Varsha Dani, Sham M Kakade, and Thomas Hayes. The price of bandit information for online optimization. In J. Platt, D. Koller, Y. Singer, and S. Roweis, editors, Advances in Neural Information Processing Systems, volume 20. Curran Associates, Inc., 2007. URL https://proceedings.neurips.cc/paper_files/paper/2007/file/bf62768ca46b6c3b5bea9515d1a1fc45-Paper.pdf.
+Yonina C Eldar and Gitta Kutyniok. Compressed sensing: theory and applications. Cambridge university press, 2012.
+Abraham D. Flaxman, Adam Tauman Kalai, and H. B. McMahan. Online convex optimization in the bandit setting: gradient descent without a gradient. ArXiv, cs.LG/0408007, 2004. URL https://api-semanticscholar.org/CorpusID:3264230.
+Simon Foucart and Holger Rauhut. A Mathematical Introduction to Compressive Sensing. Birkhäuser New York, NY, 2013. doi: 10.1007/978-0-8176-4948-7.
+Yu Gan, Yanqi Zhang, Dailun Cheng, Ankitha Shetty, Priyal Rathi, Nayan Katarki, Ariana Bruno, Justin Hu, Brian Ritchken, Brendon Jackson, Kelvin Hu, Meghna Pancholi, Yuan He, Brett Clancy, Chris Colen, Fukang Wen, Catherine Leung, Siyuan Wang, Leon Zaruvinsky, Mateo Espinosa, Rick Lin, Zhongling Liu, Jake Padilla, and Christina Delimitrou. An open-source benchmark suite for microservices and their hardware-software implications for cloud & edge systems. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '19, page 3-18, New York, NY, USA, 2019. Association for Computing Machinery. ISBN 9781450362405. doi: 10.1145/3297858.3304013. URL https://doi.org/10.1145/3297858.3304013.
+
+Elad Hazan et al. Introduction to online convex optimization. Foundations and Trends® in Optimization, 2(3-4): 157-325, 2016.
+Sherif Hosny, M. Watheq El-Kharashi, and Amr T. Abdel-Hamid. Survey on compressed sensing over the past two decades. *Memories - Materials, Devices, Circuits and Systems*, 4:100060, 2023. ISSN 2773-0646. doi: https://doi.org/10.1016/j.memori.2023.100060. URL https://www.sciencedirect.com/science/article/pii/S2773064623000373.
+Xiaowei Hu, Prashanth L. A., András György, and Csaba Szepesvári. (bandit) convex optimization with biased noisy gradient oracles, 2020.
+Darby Huye, Yuri Shkuro, and Raja R. Sambasivan. Lifting the veil on Meta's microservice architecture: Analyses of topology and request workflows. In 2023 USENIX Annual Technical Conference (USENIX ATC 23), pages 419-432, Boston, MA, July 2023. USENIX Association. ISBN 978-1-939133-35-9. URL https://www.usenix.org/conference/atc23/presentation/huye.
+Shinji Ito. An optimal algorithm for bandit convex optimization with strongly-convex and smooth loss. In International Conference on Artificial Intelligence and Statistics, 2020. URL https://api.sementicscholar.org/CorpusID:220095529.
+Daniel Jordan. Queueing-tool: a queueing network simulator, June 2023. URL https://github.com/djordon/queueing-tool. License: MIT.
+Tor Lattimore. Improved regret for zeroth-order adversarial bandit convex optimisation. ArXiv, abs/2006.00475, 2020. URL https://api-semanticscholar.org/CorpusID:219177218.
+Tor Lattimore and András György. A second-order method for stochastic bandit convex optimisation. In Annual Conference Computational Learning Theory, 2023. URL https://api-semanticscholar.org/CorpusID:256808773.
+Shutian Luo, Huanle Xu, Kejiang Ye, Guoyao Xu, Liping Zhang, Jian He, Guodong Yang, and Chengzhong Xu. Erms: Efficient resource management for shared microservices with sla guarantees. ASPLOS 2023, page 62-77, New York, NY, USA, 2022. Association for Computing Machinery. ISBN 9781450399159. doi: 10.1145/3567955.3567964. URL https://doi.org/10.1145/3567955.3567964.
+D. Needell and J. A. Tropp. Cosamp: Iterative signal recovery from incomplete and inaccurate samples, 2008. URL https://arxiv.org/abs/0803.2392.
+Arkadi Nemirovski, Anatoli Juditsky, Guanghui Lan, and Alexander Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM Journal on Optimization, 19(4):1574-1609, 2009. doi: 10.1137/070704277.
+Haoran Qiu, Subho S. Banerjee, Saurabh Jha, Zbigniew T. Kalbarczyk, and Ravishankar K. Iyer. FIRM: An intelligent fine-grained resource management framework for SLO-Oriented microservices. In 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20), pages 805-825. USENIX Association, November 2020. ISBN 978-1-939133-19-9. URL https://www.usenix.org/conference/osdi20/presentation/qiu.
+Vighnesh Sachidananda and Anirudh Sivaraman. Erlang: Application-aware autoscaling for cloud microservices. In Proceedings of the Nineteenth European Conference on Computer Systems, EuroSys '24, page 888-923, New York, NY, USA, 2024. Association for Computing Machinery. ISBN 9798400704376. doi: 10.1145/3627703.3650084. URL https://doi.org/10.1145/3627703.3650084.
+Ankan Saha and Ambuj Tewari. Improved regret guarantees for online smooth convex optimization with bandit feedback. In Geoffrey Gordon, David Dunson, and Miroslav Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, volume 15 of Proceedings of Machine Learning Research, pages 636-642, Fort Lauderdale, FL, USA, 11-13 Apr 2011. PMLR. URL https://proceedings.mlr.press/v15/saha11a.html.
+James C. Spall. Multivariate stochastic approximation using a simultaneous perturbation gradient approximation. IEEE Transactions on Automatic Control, 37(3):332-341, 1992. doi: 10.1109/9.119632.
+Rayadurgam Srikant and Lei Ying. Communication Networks: An Optimization, Control and Stochastic Networks Perspective. Cambridge University Press, USA, 2014. ISBN 1107036054.
+Yining Wang, Simon Du, Sivaraman Balakrishnan, and Aarti Singh. Stochastic zeroth-order optimization in high dimensions. In Amos Storkey and Fernando Perez-Cruz, editors, Proceedings of the Twenty-First International Conference on Artificial Intelligence and Statistics, volume 84 of Proceedings of Machine Learning Research, pages 1356-1365. PMLR, 09-11 Apr 2018. URL https://proceedings.mlr.org/press/v84/wang18e.html.
+
+Zibo Wang, Pinghe Li, Chieh-Jan Mike Liang, Feng Wu, and Francis Y. Yan. Autothrottle: A practical Bi-Level approach to resource management for SLO-Targeted microservices. In 21st USENIX Symposium on Networked Systems Design and Implementation (NSDI 24), pages 149-165, Santa Clara, CA, April 2024. USENIX Association. ISBN 978-1-939133-39-7. URL https://www.usenix.org/conference/nsdi24/presentation/wang-zibo.
+Yanqi Zhang, Weizhe Hua, Zhuangzhuang Zhou, G. Edward Suh, and Christina Delimitrou. Sinan: MI-based and qos-aware resource management for cloud microservices. In Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS '21, page 167-181, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450383172. doi: 10.1145/3445814.3446693. URL https://doi.org/10.1145/3445814.3446693.
+Yun-Bin Zhao and Zhi-Quan Luo. Improved rip-based bounds for guaranteed performance of two compressed sensing algorithms, 2020. URL https://arxiv.org/abs/2007.01451.
+
+# A RELATED WORKS
+
+Related Work: Zeroth-Order Online Convex Optimization: Online Convex Optimization (OCO) is a game in which an online player iteratively makes decisions drawn from a convex set. Upon committing to a decision, the player incurs a loss, which is a possibly adversarially chosen convex function of the possible decisions and is unknown beforehand. The performance metric for this problem is typically the static regret based on the best action in hindsight, see Hazan et al. (2016) for a good introduction to the topic. In this setting, there are different levels of information that a learning algorithm may have access to. The first is full information, where the full objective function chosen by the adversary is revealed after the corresponding cost is incurred. If the objective function is also smooth, then regret which scales as $\sqrt{T}$ is achievable by simply running a gradient descent algorithm on the gradients of the revealed functions. Another level of information is bandit information (Dani et al., 2007; Saha and Tewari, 2011), where only the loss is revealed; in this case it is common to rely on zeroth-order methods for gradient estimation. Several works have not only been able to characterize information theoretic minimax regret bounds under bandit feedback (see for example Lattimore (2020); Bubeck et al. (2015)) but have also provided algorithms that can achieve these bounds (Flaxman et al. (2004); Balasubramanian and Ghadimi (2018); Ito (2020); Saha and Tewari (2011); Lattimore and György (2023) to name a few). An intermediate setting between these two extremes allows the algorithm to collect a limited number of samples from the objective function after incurring the loss, which opens up more options for zeroth-order gradient estimation procedures. Our work belongs to this setting. A general oracle framework for zeroth-order gradient estimation procedures using one or more samples in the OCO context is developed in (Hu et al., 2020).
+
+Simultaneous Perturbation Stochastic Approximation: The most basic form of SPSA, due to (Spall, 1992), is a method for computing an estimate of $\nabla f(\pmb{x})$ using only zeroth-order information with only two evaluations of the objective function regardless of the dimension of $\pmb{x}$ . Naively, one may compute an approximate measurement of the gradient at $\pmb{x}$ along one dimension using the finite difference:
+
+$$
+\frac {\partial f (\boldsymbol {x})}{\partial x _ {i}} \approx \frac {f (\boldsymbol {x} + \delta \boldsymbol {e} _ {i}) - f (\boldsymbol {x})}{\delta}. \tag {9}
+$$
+
+Where $e_i$ is the unit vector in direction $i$ , and $\delta$ is the smoothing parameter which controls the bias. However, for a high-dimensional problem this requires at least $d$ measurements in addition to $f(\boldsymbol{x})$ to estimate the full gradient which might be infeasible due to the time or effort required to take a measurement. The alternative provided by SPSA is as follows: First, generate a sequence of $d$ i.i.d. Rademacher random variables, $\{\Delta_j\}_{j=1}^d$ . Next, generate a perturbation vector $\Delta := \sum_{j=1}^d e_j \Delta_j$ . Finally, we may compute our gradient estimate as follows:
+
+$$
+\frac {f (\boldsymbol {x} + \delta \Delta) - f (\boldsymbol {x})}{\delta \Delta_ {j}} \approx \frac {\partial f (\boldsymbol {x})}{\partial x _ {i}} + \sum_ {i \neq j} \frac {\partial f (\boldsymbol {x})}{\partial x _ {i}} \frac {\Delta_ {i}}{\Delta_ {j}}
+$$
+
+When the expectation is taken over the randomness in $\Delta$ , the terms in the summation are eliminated and hence this method gives an approximately unbiased estimate of $\nabla f(\pmb{x})$ for appropriately small $\delta$ . The variance in the estimate can be reduced by repeating the process for different random draws of $\Delta$ and averaging over the results. The SPSA method provides a way to handle high-dimensional problems when the number of available measurements is limited, but it does not directly exploit the
+
+sparsity of $\nabla f(\pmb{x})$ . For further details about the qualities of the SPSA method, see Bhatnagar et al. (2013).
+
+Compressive Sensing: Results in compressive sensing (Foucart and Rauhut, 2013; Candès, 2008) state that given measurements of the form $\pmb{y} = \mathbf{A}\pmb{x} + \pmb{e}$ where $\pmb{x}$ is a sparse vector, $\mathbf{A}$ is an $m \times d$ matrix (called the measurement matrix) satisfying the restricted isometry property (RIP) appropriate to the sparsity of $\pmb{x}$ , and $\pmb{e}$ is bounded measurement noise, an approximation $\hat{\pmb{x}}$ can be obtained through various recovery methods such that $||\hat{\pmb{x}} - \pmb{x}||_2$ is bounded by a quantity proportional to $||\pmb{e}||_2$ . In this context, $m$ is called the number of measurements; in most practical situations one wants $m$ to be as small as possible. The recovery step can be formulated as the nonconvex optimization problem
+
+$$
+\min _ {\boldsymbol {x}} \left\| \boldsymbol {x} \right\| _ {0} \text {s u b j .} \text {t o} \left\| \mathbf {A} \boldsymbol {x} - \boldsymbol {y} \right\| _ {2} \leq \| e \| _ {2} \tag {10}
+$$
+
+which must be relaxed or approximated in practice.
+
+For a measurement matrix $\mathbf{A}$ and integer $s$ one may define the $k^{\mathrm{th}}$ restricted isometry constant (RIC) $\delta_k(\mathbf{A})$ that preserves the RIP property for any $k$ -sparse vector. Concretely, for any $k$ -sparse vector $\pmb{x}$ , we need to ensure
+
+$$
+(1 - \delta_ {k}) \| \boldsymbol {x} \| _ {2} ^ {2} \leq \| \mathbf {A} \boldsymbol {x} \| _ {2} ^ {2} \leq (1 + \delta_ {k}) \| \boldsymbol {x} \| _ {2} ^ {2}
+$$
+
+Loosely speaking, we say that $\mathbf{A}$ satisfies the RIP for a given $k$ if $\delta_{k}$ is small (how small we need it depends on the use case). It turns out that a measurement matrix with a sufficiently small $cs^{\mathrm{th}}$ RIC with $c$ being a small scalar (dependent upon the recovery method) will allow the recovery of any $s$ -sparse vector. Furthermore, it is known that increasing $m$ increases the likelihood with which $\mathbf{A}$ will satisfy the RIP for a given RIC. However, current guarantees for deterministic measurement matrices require $m$ to scale as $\mathcal{O}(s^2)$ while for random matrices a superior $\mathcal{O}(s\log\left(\frac{ed}{s}\right))$ scaling is achievable (though there will necessarily be a probability of failure) (Foucart and Rauhut, 2013). The available recovery methods can be broadly grouped into those based on greedy algorithms and those based on convex relaxations of equation 10 (Hosny et al., 2023). One example of a greedy algorithm is Compressive Sampling Matching Pursuit (CoSaMP) from Needell and Tropp (2008), and one example of a convex relaxation is basis pursuit (first introduced by Chen et al. (1998)). The general approach of CoSaMP is to iteratively construct a sparse vector which is as close as possible to the target vector; the goodness of the estimate on each iteration is estimated using least squares. Basis pursuit, on the other hand, replaces the 0-norm in equation 10 with the 1-norm which is convex. Solutions to the convex optimization problem can then be approximated using various possible solvers.
+
+Regularized Gradient Estimation: In the zeroth-order stochastic optimization setting, where noisy samples from a static convex objective function are used to iteratively approach the function's minimum value, prior works have considered gradient estimation techniques which exploit sparsity in the objective function gradient. Among these is Wang et al. (2018) which uses the Lasso method to recover the gradient from a set of measurements taken in the same fashion as in SPSA. An important distinction between this technique and other gradient estimators which take multiple samples is that the value of the objective function at the current control is not used by the estimator, but rather it is estimated from the data. Lemma 1 in that paper indicates that the sample complexity required to achieve a bound on the gradient estimation error is on the order of $s^2$ , while the compressive sensing schemes underlying CONGO-Z and CONGO-E only require a number of samples linear in $s$ . This suggests that the Lasso method is less sample efficient (at least in the noiseless case which is more commonly analyzed in the OCO setting). We have not seen any work up to this point which has attempted to apply the same technique to the OCO setting.
+
+Microservice Autoscaling: Prior approaches have tried to use several variants of learned models as controllers for the task of allocating resources to microservices. At a high-level, all prior works either rely on heavy complex training regimes, which can be infeasible in practice or make simplifying assumptions as they do not exploit the sparsity in gradients. We briefly summarize several such approaches here.
+
+Many prior works (Qiu et al., 2020; Zhang et al., 2021; Luo et al., 2022) rely on complex and heavy offline training mechanisms. This is especially challenging in the microservice setting where frequent re-training might be necessary because applications are regularly updated leading to changes in microservice behavior and even application graphs (Huye et al., 2023).
+
+FIRM (Qiu et al., 2020) first uses an SVM model to identify the critical bottlenecked service, and then uses an offline-trained DDPG-based model to change the resources for the critical service. A
+
+key drawback of this technique is that training FIRM requires anomalies to be injected by artificially inducing resource bottlenecks in the system - which can be either impossible or too expensive in many cases. Injecting resource constraints might be infeasible if the application is run on a third-party cloud provider. On the other hand, it can be expensive if the application undergoes frequent changes/updates.
+
+Sinan (Zhang et al., 2021) predicts if a given resource allocation set for a microservice application can lead to latency violations. Using the predictions, it then relies on a heuristic to choose the next control action. Sinan has two drawbacks. First, training the latency violation predictor requires extensive data on various resource allocation and workload combinations, which is again impractical. Second, the heuristic to change resource allocations might not be general enough for all applications.
+
+Erms (Luo et al., 2022) approximates the latency-throughput curve for each microservice as a piecewise linear function and employs techniques to prioritize latency-critical services at shared microservices. The assumption of piecewise linear function can be too simplistic for most microservices. Especially, at the inflection points, when a small change in the request rate causes high changes in the latencies, even small error in the piecewise linear estimation can lead to drastically bad performance.
+
+Autothrottle (Wang et al., 2024) uses an online RL mechanism using contextual bandits and thus, alleviates the problem of offline training to a great extent. However, because Autothrottle does not exploit the sparsity in gradients of microservices, it is forced to make a simplifying assumption by clustering all services into just two clusters, leading to the same action for all services in the same class. This would imply that even if one microservice is the bottleneck, in expectation, it could lead to more resources being allocated for roughly half of all the services!
+
+Erlang (Sachidananda and Sivaraman, 2024) is another such online RL-based system for microservice autoscaling, that uses a multi-armed bandit algorithm to choose the right resource allocation, given a congested microservice. However, Erlang relies on a simple heuristic to choose the congested microservice in the first place. The heuristic is to just use the service which has the highest change in CPU utilization. This heuristic may not hold in many cases, for example, when the CPU utilization of a microservice may be high because it is continuously polling on a downstream microservice (Gan et al., 2019).
+
+# B DESCRIPTION OF CONGO-B ALGORITHM
+
+In this section we give details for the CONGO-B algorithm, including the pseudocode in Algorithm 2. CONGO-B takes inspiration from Algorithm 1 in Borkar et al. (2018). The functional differences between that algorithm and the gradient estimation procedure used in CONGO-B are summarized below:
+
+We scale the perturbation by $||\mathbf{A}^{tT}\Delta ||_2^{-2}$
+- We rescale $\mathbf{A}^t$ and $\pmb{y}$ by $\frac{1}{\sqrt{m}}$ right before the recovery step
+- We introduce an additional constraint to the basis pursuit $l1$ -minimization problem to ensure a specific bound on the gradient estimates used for gradient descent steps
+
+We emphasize that the inclusion of the additional constraint does not affect the applicability of the recovery result used in the proof of Lemma 2. To see this, note that under any outcome where the solution to the $l1$ -minimization problem without the second constraint satisfies $\| \tilde{\nabla} f(\pmb{x}) - \nabla f(\pmb{x}) \|_2 \leq 3L\delta$ , we also have $\| \tilde{\nabla} f_t(\pmb{x}_t) \|_2 \leq 3L\delta + \| \nabla f_t(\pmb{x}_t) \|_2 \leq 3L\delta + L_f$ by the triangle inequality, and hence the second constraint is immediately satisfied.
+
+Algorithm 2 CONGO-B: Compressive Online Gradient Optimization Borkar Version
+Require: Constraint set $\mathcal{K}$ , Horizon $T$ Lipschitz constant $L_{f}$ Smoothness parameter $L$ Parameters $(\eta_{t})_{t = 1}^{T},\delta ,m$ , Initialization point $x_{1}$
+for $t = 1,2,\dots ,T$ do
+ $\mathbf{A}^t\gets$ randomly drawn $m\times d$ matrix with $\mathcal{N}(0,1)$ entries Generate measurement matrix
+Query $f_{t}(\pmb{x}_{t})$
+for $l = 1,2,\dots ,k$ do
+ $\Delta^l\gets$ random m-dimensional vector of Rademacher random variables
+Query at point $\pmb {x}_t + \delta ||\mathbf{A}^t ||_2^{-2}\mathbf{A}^{T}\Delta^l$ to get $f_{t}(\pmb {x}_{t} + \delta ||\mathbf{A}^{t}||_{2}^{-2}\mathbf{A}^{T}\Delta^{l})$ $\beta^l\gets f_t(\pmb {x}_t + \delta ||\mathbf{A}^t ||_2^{-2}\mathbf{A}^{T}\Delta^l) - f_t(\pmb {x}_t)$
+for $i = 1,2,\dots ,m$ do
+ $y_i^l\gets \frac{\beta^l}{\delta||\mathbf{A}^t||_2^{-2}\Delta_i^l}$ Construct y from measurements
+end for
+end for
+ $\pmb {y}\gets \left(\frac{1}{k}\sum_{l = 1}^{k_t}y_1^l,\dots ,\frac{1}{k}\sum_{l = 1}^{k_t}y_m^l\right)$ Average over observations
+Rescale $\mathbf{A}^t$ and $\pmb{y}$ by $\frac{1}{\sqrt{m}}$
+if There exists a feasible solution $z^{*}$ for Constrained gradient recovery min $||z||_{1}$ subj. to $||\mathbf{A}^t\mathbf{z} - \mathbf{y}||_2\leq 3L\delta$ and $||z||_2\leq L_f + 3L\delta$ then
+ $\tilde{\nabla} f_{t}(\pmb{x}_{t})\gets z^{*}$
+else
+ $\tilde{\nabla} f_{t}(\pmb{x}_{t})\gets 0$
+end if
+ $x_{t + 1}\gets \underset {\boldsymbol {x}\in \mathcal{K}}{\mathrm{argmin}}||\boldsymbol {x} - (\boldsymbol {x}_t - \eta_t\tilde{\nabla} f_t(\boldsymbol {x}_t))||_2$ Gradient descent update
+end for
+Incur regret $\sum_{t = 1}^{T}f_{t}(\pmb{x}_{t}) - f_{t}(\pmb{x}^{*})$
+
+# C PROOFS
+
+# C.1 PROOF OF LEMMA 1
+
+Proof. We begin with the case where
+
+$$
+y _ {i} = \left(f (\boldsymbol {x} + \frac {\delta}{\| \mathbf {a} _ {i} \| _ {2} ^ {2}} \mathbf {a} _ {i}) - f (\boldsymbol {x})\right) \frac {\| \mathbf {a} _ {i} \| _ {2} ^ {2}}{\delta} \forall i \in [ m ]
+$$
+
+Applying the Taylor approximation given in equation 6 and the bound given in equation 7, the expression simplifies as follows:
+
+$$
+\begin{array}{l} y _ {i} = \left\langle \nabla f (\boldsymbol {x}), \frac {\delta}{\| \mathbf {a} _ {i} \| _ {2} ^ {2}} \mathbf {a} _ {i} \right\rangle \frac {\| \mathbf {a} _ {i} \| _ {2} ^ {2}}{\delta} + \xi \frac {\| \mathbf {a} _ {i} \| _ {2} ^ {2}}{\delta} \\ \leq \langle \nabla f (\boldsymbol {x}), \mathbf {a} _ {i} \rangle + \frac {1}{2} \left(\frac {\delta}{\| \mathbf {a} _ {i} \| _ {2} ^ {2}}\right) ^ {2} \| \mathbf {a} _ {i} \| _ {2} ^ {2} \| \nabla^ {2} f \| _ {2} \frac {\| \mathbf {a} _ {i} \| _ {2} ^ {2}}{\delta} \\ \leq \left\langle \nabla f (\boldsymbol {x}), \mathbf {a} _ {i} \right\rangle + \frac {L}{2} \delta \\ \end{array}
+$$
+
+It follows that $\pmb{y} = \mathbf{A}\nabla f(\pmb{x}) + \pmb{e}$ where each element of $\mathbf{e}$ is bounded by $\frac{L}{2}\delta$ . Since $\mathbf{e} \in \mathbb{R}^m$ , we have $||\mathbf{e}||_2 \leq \frac{L}{2}\delta\sqrt{m}$ .
+
+Now we turn to the case where
+
+$$
+y _ {i} = \left(f (\pmb {x} + \frac {\delta}{| | \pmb {A} ^ {T} \Delta | | _ {2} ^ {2}} \pmb {A} ^ {T} \Delta) - f (\pmb {x})\right) \frac {| | \pmb {A} ^ {T} \Delta | | _ {2} ^ {2}}{\delta \Delta_ {i}} \forall i \in [ m ]
+$$
+
+Simplifying as before gives:
+
+$$
+\begin{array}{l} y _ {i} = \left\langle \nabla f (\boldsymbol {x}), \frac {\delta}{\| \mathbf {A} ^ {T} \Delta \| _ {2} ^ {2}} \mathbf {A} ^ {T} \Delta \right\rangle \frac {\| \mathbf {A} ^ {T} \Delta \| _ {2} ^ {2}}{\delta \Delta_ {i}} + \xi \frac {\| \mathbf {A} ^ {T} \Delta \| _ {2} ^ {2}}{\delta \Delta_ {i}} \\ \leq \sum_ {j = 1} ^ {\bar {m}} \frac {1}{\Delta_ {i}} \langle \nabla f (\boldsymbol {x}), \mathbf {a} _ {j} \Delta_ {j} \rangle + \left(\frac {\delta}{| | \mathbf {A} ^ {T} \Delta | | _ {2} ^ {2}}\right) ^ {2} | | \mathbf {A} ^ {T} \Delta | | _ {2} ^ {2} \frac {L}{2} \frac {| | \mathbf {A} ^ {T} \Delta | | _ {2} ^ {2}}{\delta} \\ = \langle \nabla f (\boldsymbol {x}), \mathbf {a} _ {i} \rangle + \sum_ {j \neq i} \frac {\Delta_ {j}}{\Delta_ {i}} \langle \nabla f (\boldsymbol {x}), \mathbf {a} _ {j} \rangle + \frac {L}{2} \delta \\ \end{array}
+$$
+
+If we let $[\mathbf{e}_1]_i = \sum_{j\neq i}\frac{\Delta_j\langle\nabla f(\boldsymbol{x}),\mathbf{a}_j\rangle}{\Delta_i}$ and $[\mathbf{e}_2]_i = \xi \frac{||\mathbf{A}^T\Delta||_2^2}{\delta\Delta_i}$ , we have $\pmb {y} = \mathbf{A}\nabla f(\pmb {x}) + \mathbf{e}_1 + \mathbf{e}_2$ as desired, and as before we have $||\mathbf{e}_2||_2\leq \frac{L}{2}\delta \sqrt{m}$ .
+
+# C.2 PROOF OF THEOREM 1
+
+# C.2.1 ADDITIONAL LEMMA FOR THE PROOF OF THEOREM 1
+
+The proof of Theorem 1 requires the following lemma from (Nemirovski et al., 2009) expressed in our notation below.
+
+Lemma 3 (Lemma 2.1 of (Nemirovski et al., 2009)). Let $V_{\omega}(\cdot, \cdot)$ be the Bregman Distance w.r.t. the $\alpha$ -strongly convex distance generating function $\omega$ , and let $P_x(\cdot)$ be the proximal mapping associated with $\omega$ . Then for every $u \in \mathcal{K}$ , $x \in \mathcal{K}^o$ , and $y \in \mathbb{R}^d$ , one has
+
+$$
+V _ {\omega} \left(P _ {x} (y), u\right) \leq V _ {\omega} (x, u) + \langle y, u - x \rangle + \frac {| | y | | _ {*} ^ {2}}{2 \alpha}
+$$
+
+Using $x = x_{t}$ and $y = \eta_t\tilde{\nabla} f_t(\pmb {x}_t)$ , we get
+
+$$
+\eta_ {t} \big < x _ {t} - u, \tilde {\nabla} f _ {t} (\pmb {x} _ {t}) \big > \leq V _ {\omega} (x _ {t}, u) - V _ {\omega} (x _ {t + 1}, u) + \frac {\eta_ {t} ^ {2}}{2 \alpha} | | \tilde {\nabla} f _ {t} (\pmb {x} _ {t}) | | _ {*} ^ {2}
+$$
+
+This result applies generally to mirror descent algorithms, but since projected gradient descent can be viewed as a special case of this in the Euclidean setting, we simplify it to equation 11 (This form appears in equation 2.6 of (Nemirovski et al., 2009), where the expectation is taken over all of the terms).
+
+$$
+\langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - u \rangle \leq \frac {1}{\eta_ {t}} \left(\frac {1}{2} | | u - x _ {t} | | _ {2} ^ {2} - \frac {1}{2} | | u - x _ {t + 1} | | _ {2} ^ {2}\right) + \frac {\eta_ {t}}{2} | | \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) | | _ {2} ^ {2} \tag {11}
+$$
+
+# C.2.2 ASSUMPTIONS
+
+The following must hold for all $t \in [T]$ :
+
+- $||\tilde{\nabla} f_t(\pmb{x}_t) - \nabla f_t(\pmb{x}_t)||_2 \leq M\delta$ with probability at least $1 - \frac{1}{T}$ for some $M$ independent of $T$
+$\left|\left|\bar{\nabla} f_t(\boldsymbol{x}_t)\right|\right|_2 \leq M\delta + L_f$
+
+# C.2.3 PROOF OF THEOREM 1
+
+Proof. First, we apply the law of total expectation and the above assumptions to derive a bound on $\mathbb{E}\left[\left\| \tilde{\nabla} f_t(\boldsymbol{x}_t) - \nabla f_t(\boldsymbol{x}_t)\right\|_2\right]$ . The second assumption implies that with probability 1,
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq M \delta + L _ {f} + \left| \left| \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq M \delta + 2 L _ {f}
+$$
+
+Let $E$ denote the event $\| \tilde{\nabla} f_t(\pmb{x}_t) - \nabla f_t(\pmb{x}_t)\|_2 \leq M\delta$ and $E^c$ its complement. By the law of total expectation,
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \left\| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right\| _ {2} \right] = \mathbb {E} \left[ \left\| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right\| _ {2} \mid E \right] \mathbb {P} (E) \\ + \mathbb {E} \left[ \left\| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right\| _ {2} \mid E ^ {c} \right] \mathbb {P} (E ^ {c}) \\ \leq M \delta + (M \delta + 2 L _ {f}) \frac {1}{T} \\ \end{array}
+$$
+
+where we use the bound $\mathbb{P}(E) \leq 1$ .
+
+Now, informed by the approach in Section 7.2 of (Hu et al., 2020), we seek to show that on each round the regret of our algorithm compared to any arbitrary point, which includes $\min_{\boldsymbol{x}^*}\sum_{t=0}^{T-1}f_t(\boldsymbol{x}^*)$ , is sufficiently small. We begin by applying the convexity of $f_t$ :
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} f _ {t} (x _ {t}) - \sum_ {t = 1} ^ {T} f _ {t} (x) \right] \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \nabla f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] \\ = \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle + \sum_ {t = 1} ^ {T} \langle \nabla f _ {t} (\boldsymbol {x} _ {t}) - \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] \\ \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] + \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \left| \left| \nabla f _ {t} (\boldsymbol {x} _ {t}) - \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} | | x _ {t} - x | | _ {2} \right] \\ \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] + \sum_ {t = 1} ^ {T} \mathbb {E} \left[ 2 R \left\| \nabla f _ {t} (\boldsymbol {x} _ {t}) - \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) \right\| _ {2} \right] \\ \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] + 2 R T \left(M \delta + (M \delta + 2 L _ {f}) \frac {1}{T}\right) \\ \end{array}
+$$
+
+Focusing on the remaining term, we apply Lemma 3 in the form given by equation 11, where we let $u = x$ . Thus, by telescoping,
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] \leq \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \frac {1}{\eta_ {t}} \left(\frac {1}{2} | | x - x _ {t} | | _ {2} ^ {2} - \frac {1}{2} | | x - x _ {t + 1} | | _ {2} ^ {2}\right) + \eta_ {t} \mathbb {E} \left[ \frac {| | \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) | | _ {2} ^ {2}}{2} \right] \right] \\ \leq \frac {D}{\eta_ {T - 1}} + \mathbb {E} \left[ \sum_ {t = 1} ^ {T} \eta_ {t} \frac {\left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) \right| | _ {2} ^ {2}}{2} \right] \\ \end{array}
+$$
+
+where $D = \sup_{x,y\in \mathcal{K}}\frac{1}{2} ||x - y||_2^2$ . Now, we are assuming that $||\tilde{\nabla} f_t(\pmb {x}_t)||_2\leq M\delta +L_f$ , and hence
+
+$$
+\mathbb {E} \left[ \sum_ {t = 1} ^ {T} \langle \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}), x _ {t} - x \rangle \right] \leq \frac {D}{\eta_ {n - 1}} + \sum_ {t = 1} ^ {T} \eta_ {t} \frac {R (M \delta + L _ {f}) ^ {2}}{2}
+$$
+
+Putting things together, we have
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} f _ {t} \left(x _ {t}\right) \right] - \sum_ {t = 1} ^ {T} f _ {t} (x) \leq \frac {D}{\eta_ {n - 1}} + \sum_ {t = 1} ^ {T} \eta_ {t} \frac {R \left(M \delta + L _ {f}\right) ^ {2}}{2} \tag {12} \\ + 2 R T \left(M \delta + \left(M \delta + 2 L _ {f}\right) \frac {1}{T}\right) \\ \end{array}
+$$
+
+Plugging in $\eta_{t} = \frac{1}{L_{f}\sqrt{T}}$ and choosing $\delta = \frac{1}{MT}$ gives us
+
+$$
+\begin{array}{l} \mathbb {E} \left[ \sum_ {t = 1} ^ {T} f _ {t} \left(x s _ {t}\right) \right] - \sum_ {t = 1} ^ {T} f _ {t} (x) \leq D L _ {f} \sqrt {T} + \sqrt {T} \frac {R \left(\frac {1}{T} + L _ {f}\right) ^ {2}}{2 L _ {f}} + 2 R + \frac {2 R}{T} + 4 R L _ {f} \\ = D L _ {f} \sqrt {T} + \frac {R}{2 L _ {f} T ^ {\frac {3}{2}}} + \frac {R}{\sqrt {T}} + \frac {R L _ {f} \sqrt {T}}{2} + 2 R + \frac {2 R}{T} + 4 R L _ {f} \\ \end{array}
+$$
+
+For large $T$ , the terms which dominate are those which scale as $\sqrt{T}$ . Isolating those terms gives us the asymptotic regret of $\mathcal{O}\left(\left(D + \frac{R}{2}\right)L_f\sqrt{T}\right)$ .
+
+# C.3 PROOFS OF THEOREM 2 AND THEOREM 3
+
+# C.3.1 PROOF OF LEMMA 2
+
+Proof. All of the existing results used in this proof come from Foucart and Rauhut (2013). We use several of their results to determine how large $m$ must be to guarantee recovery with sufficiently
+
+high probability. In this context, for the measurement matrix $\mathbf{A}$ and integer $k$ one may define the $k^{\mathrm{th}}$ restricted isometry constant $\delta_k(\mathbf{A})$ as the smallest such value for which $\mathbf{A}$ satisfies the RIP property. Concretely, for any $k$ -sparse vector $\pmb{x}$ , we need to ensure
+
+$$
+\left(1 - \delta_ {k}\right) \| x \| _ {2} ^ {2} \leq \| A x \| _ {2} ^ {2} \leq \left(1 + \delta_ {k}\right) \| x \| _ {2} ^ {2}
+$$
+
+Indeed, Corollary 9.3, which applies to both Gaussian and Bernoulli random matrices, gives a lower bound on the probability with which the matrix will satisfy the $\delta_{k}$ -RIP for some integer $k$ :
+
+$$
+\mathbb {P} \left(\delta_ {k} < \delta\right) \geq 1 - \epsilon \text {i f} m \geq C ^ {\prime} \delta^ {- 2} \left(k \log \left(\frac {e d}{k}\right) + \log \left(2 \epsilon^ {- 1}\right)\right)
+$$
+
+Note that the values of $k$ and $\delta$ required by different recovery methods differ. We will be interested in $k = 2s$ for basis pursuit and $k = 4s$ for CoSaMP. Theorem 6.12 states that it is sufficient to have $\delta_{2s} < 0.6246$ when basis pursuit is used, while Theorem 6.27 states that it is sufficient to have $\delta_{4s} < 0.4782$ when CoSaMP is used. (This requirement has been improved upon more recently (Zhao and Luo, 2020), but we do not focus on optimizing constants here). In the case of basis pursuit, when the RIP holds we get the following bound on the recovery error:
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq \frac {C _ {1} ^ {\mathrm {B P}}}{\sqrt {s}} \left| \left| \nabla f _ {t} (\boldsymbol {x} _ {t}) _ {\bar {S}} \right| \right| _ {1} + C _ {2} ^ {\mathrm {B P}} \frac {1}{\sqrt {m}} \left| \left| \boldsymbol {e} \right| \right| _ {2}
+$$
+
+where $\boldsymbol{e} = \boldsymbol{y} - \mathbf{A}^t \nabla f_t(\boldsymbol{x}_t)$ is the measurement error before rescaling by $\frac{1}{\sqrt{m}}$ , and $C_1^{\mathrm{BP}}$ and $C_2^{\mathrm{BP}}$ are constants depending only on $\delta_{2s}$ . In the case of CoSaMP, we instead get the following bound:
+
+$$
+| | \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) | | _ {2} \leq \rho^ {n} | | \boldsymbol {x} _ {0} - \nabla f _ {t} (\boldsymbol {x} _ {t}) _ {S} | | _ {2} + C ^ {\mathrm {C o S a M P}} \frac {1}{\sqrt {m}} | | \mathbf {A} ^ {t} \nabla f _ {t} (\boldsymbol {x} _ {t}) _ {\bar {S}} + \boldsymbol {e} | | _ {2}
+$$
+
+where $\rho < 1$ , $n$ is the number of iterations of the CoSaMP algorithm, and $C^{\mathrm{CoSaMP}}$ is a constant depending only on $\delta_{4s}$ .
+
+Under the assumption that $\nabla f_{t}(\pmb{x}_{t})$ is $s$ -sparse, $\nabla f_{t}(\pmb{x}_{t})_{S} = \nabla f_{t}(\pmb{x}_{t})$ and $\nabla f_{t}(\pmb{x}_{t})_{\bar{S}} = 0$ so the bound for basis pursuit becomes
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq C _ {2} ^ {\mathrm {B P}} \frac {1}{\sqrt {m}} \| \boldsymbol {e} \| _ {2}
+$$
+
+Furthermore, if we assume $n$ is sufficiently large that the $\rho^n ||\nabla f_t(\pmb{x}_t)||_2$ term vanishes on every round, then the bound for CoSaMP becomes
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq C ^ {\mathrm {C o S a M P}} \frac {1}{\sqrt {m}} \| \boldsymbol {e} \| _ {2}
+$$
+
+Thus in this specific case, both basis pursuit and CoSaMP give a recovery error proportional to $||e||_2$ . For CONGO-Z and CONGO-E to be implementable in practice, it is necessary to give bounds on $C_2^{\mathrm{BP}}$ and $C_2^{\mathrm{CoSaMP}}$ . From the proofs of Theorems 4.22 and 6.13 we can deduce that
+
+$$
+C _ {2} ^ {\mathrm {B P}} \leq 4 \frac {\left(\sqrt {1 - \delta_ {2 s} ^ {2}} - \frac {\delta_ {2 s}}{4}\right) \sqrt {1 + \delta_ {2 s}}}{\left(4 \sqrt {1 - \delta_ {2 s} ^ {2}} - \frac {\delta_ {2 s}}{4} - \delta_ {2 s}\right) \left(\sqrt {1 - \delta_ {2 s}} - \frac {\delta_ {2 s}}{4}\right)}
+$$
+
+One can easily verify that $\delta_{2s} < 0.6246$ implies $C_2^{\mathrm{BP}} < 3$ . For CoSaMP, from the proof of Theorem 6.27 we find that
+
+$$
+C ^ {\mathrm {C o S a M P}} = \sqrt {\frac {2 (1 + 3 \delta_ {4 s} ^ {2})}{1 - \delta_ {4 s}}} + \frac {2 \sqrt {1 + \delta_ {4 s}}}{1 - \delta_ {4 s}}
+$$
+
+and one can easily verify that $\delta_{4s} < 0.4782$ implies $C^{\mathrm{CoSaMP}} < 7.21$ .
+
+
+
+Remark 2. According to Section 9.3 of Foucart and Rauhut (2013), for Gaussian matrices the best known lower bound for $C'$ that allows these results to hold generally is around 80; but when $\frac{d}{s}$ is sufficiently large this can be improved considerably. Much like Cai et al. (2022), we ignored this large theoretical constant in our experiments and still achieved good performance.
+
+# C.3.2 PROOF OF THEOREM 2
+
+Proof. We first find $M$ such that the assumptions for Theorem 1 hold for CONGO-B. Our analysis begins in a similar fashion to the proof of Theorem 4 in Borkar et al. (2018), but due to our modifications to the gradient estimation procedure and the recovery guarantee from compressive
+
+sensing used we are able to obtain a different bound that is suitable for our purposes. By Lemma 1, the vector $\mathbf{y}$ of measurements collected on round $t$ satisfies
+
+$$
+\boldsymbol {y} = \left\langle \nabla f _ {t} (\boldsymbol {x} _ {t}), \mathbf {a} _ {i} ^ {t} \right\rangle + \frac {1}{k _ {t}} \sum_ {l = 1} ^ {k _ {t}} \left(\mathbf {e} _ {1} ^ {l} + \mathbf {e} _ {2} ^ {l}\right)
+$$
+
+where $[\mathbf{e}_1^l ]_i = \sum_{j\neq i}\frac{\Delta_j^l\langle\nabla f_t(\boldsymbol{x}_t),\mathbf{a}_j\rangle}{\Delta_i^l}$ and $||\mathbf{e}_2^l ||_2\leq \frac{L}{2}\delta \sqrt{m}\forall l\in [k_t]$ . To bound the overall error, we will use the averaging over $k_{t}$ to control the magnitude of $\mathbf{e}_1$ and ignore the averaging on $\mathbf{e}_2$ since we can use $\delta$ to control its magnitude instead. Define $\gamma \coloneqq \frac{L}{2}\delta \sqrt{m}$ . We wish to set $k_{t}$ such that
+
+$$
+\mathbb {P} \left(\left| \frac {1}{k _ {t}} \sum_ {l = 1} ^ {k _ {t}} \left(\sum_ {j \neq i} \frac {\Delta_ {j} ^ {l} \langle \nabla f _ {t} (\boldsymbol {x} _ {t}) , \mathbf {a} _ {j} ^ {t} \rangle}{\Delta_ {i} ^ {l}}\right) \right| > \frac {\gamma}{\sqrt {m}}\right) \leq \frac {1}{2 m T} \tag {13}
+$$
+
+which, via a union bound, will ensure that $||\mathbf{e}_1 + \mathbf{e}_2||_2 \leq 2\gamma$ with probability at least $1 - \frac{1}{2T}$ . We apply Hoeffding's inequality, noting that $\mathbb{E}\left[\frac{\Delta_j^l\langle\nabla f_t(\boldsymbol{x}_t),\mathbf{a}_j^t\rangle}{\Delta_i^l}\right] = 0$ and $\left|\sum_{j\neq i}\frac{\Delta_j^l\langle\nabla f_t(\boldsymbol{x}_t),\mathbf{a}_j^t\rangle}{\Delta_i^l}\right| \leq (m - 1)\max_i\langle \nabla f_t(\boldsymbol{x}_t),\mathbf{a}_i^t\rangle \leq (m - 1)L_fG$ , where we introduce the notation $G = \max_i||\mathbf{a}_i^t||_2$ . This gives us the following:
+
+$$
+\mathbb {P} \left(\left| \frac {1}{k _ {t}} \sum_ {l = 1} ^ {k _ {t}} \left(\sum_ {j \neq i} \frac {\Delta_ {j} ^ {l} \langle \nabla f _ {t} (\boldsymbol {x} _ {t}) , \mathbf {a} _ {j} ^ {t} \rangle}{\Delta_ {i} ^ {l}}\right) \right| > \frac {\gamma}{\sqrt {m}}\right) \leq \exp \left(\frac {- 2 k _ {t} \gamma^ {2}}{m (m - 1) ^ {2} (L _ {f}) ^ {2} G ^ {2}}\right)
+$$
+
+Thus we must solve the following to find the desired value for $k_{t}$ :
+
+$$
+\exp \left(\frac {- 2 k _ {t} \gamma^ {2}}{m (m - 1) ^ {2} (L _ {f}) ^ {2} G ^ {2}}\right) \leq \frac {1}{2 m T}
+$$
+
+The solution is
+
+$$
+\begin{array}{l} k _ {t} \geq \frac {m (m - 1) ^ {2} \left(L _ {f}\right) ^ {2} G ^ {2}}{2 \gamma^ {2}} \log (2 m T) \tag {14} \\ = \frac {4 (m - 1) ^ {2} \left(L _ {f}\right) ^ {2} G ^ {2}}{L ^ {2} \delta^ {2}} \log (2 m T) \\ \end{array}
+$$
+
+We round up this value to ensure $k_{t}$ is an integer. We can now apply Lemma 2, which gives us the following guarantee:
+
+$$
+\left| \left| \tilde {\nabla} f _ {t} (\boldsymbol {x} _ {t}) - \nabla f _ {t} (\boldsymbol {x} _ {t}) \right| \right| _ {2} \leq 6 \gamma = 3 L \delta
+$$
+
+which holds with probability at least $1 - \left(\frac{1}{2T} +\epsilon\right)$ as long as
+
+$$
+m \geq C ^ {\prime} (0. 6 2 4 6) ^ {- 2} \left(s \log \left(\frac {e d}{s}\right) + \log (2 \epsilon^ {- 1})\right)
+$$
+
+Setting $\epsilon = \frac{1}{2T}$ ensures that assumption 1 of Theorem 1 is satisfied. Assumption 2 is also satisfied because we replace $\tilde{\nabla} f_t(\pmb{x}_t)$ with the zero vector when it exceeds $3L\delta + L_f$ . The desired bound on the expected regret follows from Theorem 1 with $M = 3L$ .
+
+As a requirement of Theorem 1, we must set $\delta = \frac{1}{MT} = \frac{1}{3LT}$ . Note that $G$ found in the expression for $k_{t}$ is a random variable which is only known once $\mathbf{A}^t$ is drawn, hence the reason why the number of samples to average over varies for different rounds. We finish by bounding the expected value of $k_{t}$ (which is the same on every round since $\mathbf{A}^t$ is drawn the same way on every round). To do so, we
+
+must bound $\mathbb{E}\left[G^2\right] = \mathbb{E}\left[\max_i||\mathbf{a}_i^t ||_2^2\right]$ . Let $Y = \max_{i}||\mathbf{a}_{i}^{t}||_{2}^{2}$ , and observe that
+
+$$
+\begin{array}{l} \exp \left(t \mathbb {E} \left[ Y \right]\right) \leq \mathbb {E} \left[ \exp \left(t Y\right) \right] \\ \leq \mathbb {E} \left[ \exp \left(t \sum_ {i = 1} ^ {m} | | \mathbf {a} _ {i} ^ {t} | | _ {2} ^ {2}\right) \right] \\ \leq \mathbb {E} \left[ \sum_ {i = 1} ^ {m} \exp \left(t | | \mathbf {a} _ {i} ^ {t} | | _ {2} ^ {2}\right) \right] \\ = \sum_ {i = 1} ^ {m} \mathbb {E} \left[ \exp \left(t | | \mathbf {a} _ {i} ^ {t} | | _ {2} ^ {2}\right) \right] \\ = m (1 - 2 t) ^ {- \frac {d}{2}} \forall t \in (0, 0. 5) \\ \end{array}
+$$
+
+Where we apply the moment generating function of a $\chi^2 (d)$ distribution. Taking the logarithm of both sides and dividing by $t$ gives us
+
+$$
+\mathbb {E} \left[ Y \right] \leq \frac {d}{2 t} \log \left(\frac {m}{1 - 2 t}\right)
+$$
+
+Choosing $t = \frac{1}{4}$ yields
+
+$$
+\mathbb {E} \left[ G ^ {2} \right] = \mathbb {E} [ Y ] \leq 2 d \log (2 m)
+$$
+
+Plugging these values into the expected value of $k_{t}$ as
+
+$$
+\mathbb {E} \left[ k _ {t} \right] \leq 3 6 d (m - 1) ^ {2} L _ {f} ^ {2} \log (2 m) T \log (2 m T)
+$$
+
+
+
+# C.3.3 PROOF OF THEOREM 3
+
+Proof. As in the proof of Theorem 2, we first find $M$ such that the assumptions for Theorem 1 hold. Lemma 1 tells us that the error we must account for in the recovery process is bounded by $e \leq \frac{L}{2} \delta \sqrt{m}$ , which after rescaling becomes $\frac{L}{2} \delta$ . Lemma 2 tells us that $M = \frac{7.21}{2} L$ is sufficient if we have
+
+$$
+m \geq C ^ {\prime} (0. 4 7 8 2) ^ {- 2} \left(s \log \left(\frac {e d}{s}\right) + \log (2 \epsilon^ {- 1})\right)
+$$
+
+Note that the value of $C'$ is different for CONGO-Z and CONGO-E due to the different measurement matrices (this is in fact the only difference in the proofs for these algorithms). We set $\epsilon = \frac{1}{T}$ to satisfy Assumption 1. Assumption 2 is also satisfied because we replace $\tilde{\nabla} f_t(\boldsymbol{x}_t)$ with the zero vector when it exceeds $\frac{7.21}{2} L\delta + L_f$ (respectively $\frac{3}{2} L\delta + L_f$ in the case of basis pursuit). Applying Theorem 1 finishes the proof.
+
+# D MOVING FROM STOCHASTIC OPTIMIZATION TO ONLINE CONVEX OPTIMIZATION
+
+Here we further discuss the rationale behind some elements of the CONGO framework. We mention in Section 4 that it is necessary to enforce a limit on the magnitude of any gradient estimate that is applied as a gradient descent step. This requirement arises from the use of Lemma 3 when we bound the cumulative regret in Theorem 1, which introduces a term involving $||\tilde{\nabla} f_t(\boldsymbol{x}_t)||_2^2$ . Without a bound on the magnitude of the gradient estimates that holds with probability one, it becomes difficult to deal with this term in the regret bound. Note that an analysis like the one for stochastic optimization setting in Cai et al. (2022) which yields a high probability bound by conditioning on the measurement matrix being "good" does not have to worry about issues like this because it can rely on a recovery guarantee holding. Now, if we know a bound $L_{f}$ on the norm of the true gradient, then it makes sense to enforce a bound on the estimated gradient equal to $L_{f}$ plus the maximum error we are willing to tolerate, since we know that any estimate which does not satisfy this bound is not useful to us. Since
+
+this is a rare event (as proven in Lemma 2), we can afford to skip the gradient descent step to avoid making a very large step which may be in a bad direction. An example of this in practice is given in Fig. 7. Note that as a consequence, it is necessary to know a bound on $L_{f}$ in order for the theoretical guarantee to hold.
+
+As also mentioned at the end of Section 4, under the CONGO framework we sample a new measurement matrix on each round. In the ZORO algorithm, a single measurement matrix is sampled at the start and reused for every gradient estimate. This makes sense when the goal is to obtain a high-probability sample complexity bound since one only needs to bound the probability of a single event rather than a separate event for each round. However, when the goal is to prove a bound on the expected regret as in our case, it becomes irrelevant whether the matrix is drawn once overall or on each round. This is because applying the law of total expectation on the entire cumulative regret leads to the same result as applying it to the gradient estimation error does. We choose to re-sample the measurement matrix on each round to eliminate the possibility of a single "bad" measurement matrix ruining all of the rounds, and hence we apply the law of total expectation to the gradient estimation error alone. The fact that we are pursuing a bound on the regret in expectation also influences how we choose $m$ . After applying the law of total expectation, it remains necessary to bound the gradient error when compressive sensing recovery fails which necessarily introduces a term that does not scale with $\delta$ ; to compensate for this we need the probability of failure to decrease as $T$ increases. This is why our choice of $m$ for the theoretical results depends logarithmically on $T$ while in Cai et al. (2022) it does not. On the other hand, if one simply wants a bound on the regret which holds with a high probability independent of $T$ , then the method of sampling a single measurement matrix at the start could be adopted, in which case $\epsilon$ could be set to the desired probability instead of $\frac{1}{T}$ since the magnitude of regret when the high probability event does not occur no longer matters.
+
+# E PRACTICAL IMPLEMENTATION OF RECOVERY METHODS
+
+Here we justify our choice of the CoSaMP algorithm for CONGO-E based on practical considerations. Basis pursuit is in theory a good candidate for a recovery algorithm because it allows for fewer measurements to be used than methods like CoSaMP and Iterative Hard Thresholding (this can be seen by comparing the requirements on the restricted isometry constant for each algorithm; see Chapter 6 of Foucart and Rauhut (2013)). However, the practical implementations of basis pursuit have poor runtime guarantees compared to greedy methods like CoSaMP (Hosny et al., 2023). Empirically, we have observed that for the same tolerance level and limit on the number of iterations, the implementation of basis pursuit using Chambolle and Pock's primal-dual algorithm (see Section 15.2 of Foucart and Rauhut (2013) for the pseudocode) is indeed slower than CoSaMP. Fig. 5 compares the CDF of the execution time for the two methods; observe that the curve for the primal-dual algorithm stays to the right of the curve for CoSaMP. Furthermore, using basis pursuit for robust recovery requires one to have a bound on $||\mathbf{e}||_2$ which will hold with high probability whereas CoSaMP only requires an estimate of the sparsity level (Needell and Tropp, 2008). Based on these considerations, we rely on the CoSaMP algorithm for the implementations of CONGO-Z and CONGO-E used in our experiments. For CONGO-B, we use basis pursuit to remain faithful to the method proposed by Borkar et al. (2018). Note that both CoSaMP and basis pursuit have additional hyperparameters which determine the tolerance and maximum number of iterations to run; the exact values used are given in Appendix G.
+
+# F ADDITIONAL NUMERICAL SIMULATION RESULTS
+
+# F.1 ANALYSIS OF THE IMPACT OF DIFFERENT CHOICES FOR $m$
+
+In our numerical simulation environment, we ran experiments to test how the quality of the gradient estimate from CONGO-E with CoSaMP changes as $m$ varies, and to see if the value of $2s\log \left(\frac{d}{s}\right)$ prescribed in the theoretical results (ignoring the $\log (T)$ term) is in fact a good choice in practice. First, we set $d = 50$ , $s = 5$ and $R = 50$ and ran CONGO-E for each of the values of $m$ in the range [6,24] on the same environment with the same 50 random seeds. We computed $||\tilde{\nabla} f_t(\boldsymbol{x}_t) - \nabla f_t(\boldsymbol{x}_t)||_2$ on each round for each algorithm and averaged over all the measurements at the end. Fig. 6 shows a bar graph of the average errors for the different values of $m$ . Note how the error rapidly drops after $m = 15$ ; in this case, $2s\log \left(\frac{d}{s}\right) = 23.026$ so $m$ would be 24 after rounding up. This is clearly in the
+
+
+Figure 5: Comparison of the CDFs for execution time of basis pursuit and CoSaMP over 1000 executions.
+
+
+Figure 6: Bar graph showing how error in the gradient estimate changes as more samples are used.
+
+
+Figure 7: Comparison of the the cumulative cost with and without enforcing a limit on the gradients used for online gradient descent in the case where $m$ is insufficiently large
+
+region where the gradient error is very small and so there is no need to increase $m$ further. Note that we also ran the GDSP algorithm under the same conditions with a total of 26 samples per gradient estimate (including the sample for $f_{t}(x_{t})$ ) and found that the average norm of the gradient error was 31.64, far higher than CONGO with even just 16 samples per gradient estimate. Surprisingly, however, we observe a very sharp spike in gradient error for $m = 13$ , 14, and 15. This is accompanied by abnormally large values in the gradient estimates. Further investigation found that this was not simply caused by a poorly conditioned measurement matrix, since the maximum and minimum eigenvalues of $\mathbf{A}^t$ were not outside the ordinary range when these highly erroneous gradient estimates were made. The anomaly occurs both for basis pursuit and CoSaMP. While we do not know the exact cause of this behavior, the implication is that allowing $m$ to be significantly smaller than the prescribed value runs the risk of very poor performance. Of course, due to the constraint on the magnitude of the gradient estimate, when this anomaly occurs its contribution to the cumulative regret will be limited. To illustrate this, we compared the cumulative regret for certain value of $m$ with and without enforcing the gradient limit (see Fig. 7) and observed that for $m = 14$ a significant amount of regret could be avoided.
+
+# F.2 ANALYSIS OF ROBUSTNESS TO SPARSITY LEVEL
+
+To demonstrate that CONGO-style algorithms (particularly CONGO-Z and CONGO-E) can still be useful in scenarios where (i) $s$ is not significantly smaller than $d$ , (ii) the gradient is not exactly $s$ -sparse but $s$ dimensions are much larger than the rest, or (iii) the true value of $s$ is unknown and must be guessed with some level of error, we ran additional numerical simulations for each of these cases using a setup similar to the experiments of Section 6.
+
+In the left plot of Fig. 8, we consider the noiseless case where $d = 50$ and test on $s \in \{5,10,15,20\}$ . We also set $c = 4$ in equation 8 to ensure that the cumulative costs come out positive. In this experiment, we allow CONGO-B to use three times as many samples per round as the other algorithms. We plot the excess cost that each algorithm accumulates over $T = 100$ rounds compared to exact gradient descent. We find that while GDSP and CONGO-B do progressively worse compared to
+
+
+Figure 8: Left: Cumulative costs incurred beyond that of exact gradient descent over 100 rounds when $s$ increases while $d$ is fixed. The performance of CONGO-Z and CONGO-E is not significantly different from that of exact gradient descent even in low-sparsity situations. Right: Cumulative cost trajectories in a scenario where gradients are only approximately sparse. The CONGO-style algorithms continue to perform much better than GDSP.
+
+
+
+
+Figure 9: Cumulative costs incurred beyond that of exact gradient descent over 100 rounds when the value of $s$ assumed by the algorithm differs from the true value. CONGO-Z and CONGO-E achieve low excess cost compared to exact gradient descent even when the assumed value of $s$ is less than the true value of 10.
+
+exact gradient descent as $s$ increases, CONGO-Z and CONGO-E remain relatively stable when using the prescribed number of samples.
+
+In the right plot of Fig. 8, we set $d = 100$ and $s = 5$ but in this case, the elements of $\mathbf{b}$ and the main diagonal of $D$ in equation 8 outside of the $s$ "significant" dimensions are scaled by $\frac{1}{d}$ rather than being set to zero. Thus the objective function on each round is only approximately sparse. Here we set $c = 2$ and allow CONGO-B to use $3m$ samples per round as before. One can see that although the performance of CONGO-Z and CONGO-E does not match that of exact gradient descent (as it does in the first experiment of Section 6), it is not too much worse. The results support our claim that the assumption of exact gradient sparsity is not required for CONGO-style algorithms to outperform algorithms which do not exploit sparsity.
+
+In Fig. 9, we consider the case where $d = 100$ and $s = 10$ but the value of $s$ which the algorithm uses varies. In this experiment we set $c = 2$ and allow CONGO-B to use $3m$ samples per round (where $m$ is calculated based on the value of $s$ available to the algorithm). Furthermore, we allow GDSP to use $m = 57$ samples per round, which corresponds to $s = 15$ , across all comparisons. We plot the excess cost that each algorithm accumulates over $T = 100$ rounds compared to exact gradient descent. We find that although the performance of CONGO-Z and CONGO-E is poor when the given $s$ is less than half the true $s$ , their performance quickly approaches that of the baseline and does not deviate significantly as the given value of $s$ continues to increase. Thus we see that under the appropriate sampling strategy, the approach is robust to an inaccurate estimate of the sparsity. For CONGO-B,
+
+
+Figure 10: Cumulative costs incurred over 100 rounds for different values of $d$ with $s$ fixed at 5 and $m$ fixed at 24. Note how the cumulative cost of CONGO-E closely follows the cumulative cost of exact gradient descent, which represents the best we can hope to do.
+
+the performance degrades more significantly as the given value of $s$ increases beyond the true value because a larger value of $m$ actually introduces greater noise into the gradient estimates which the greater averaging is not able to compensate for.
+
+While there may not be much of a cost in performance for overestimating the value of $s$ , there is still a cost in algorithm runtime due to taking more samples per round than is really needed. However, there is a potential for one to adaptively choose the number of measurements such that a desired level of accuracy in the gradient estimate is maintained without using many more samples than necessary. Cai et al. (2022) describes a method for adapting to the sparsity level designed for the stochastic optimization setting where the gradient in a previous round can provide useful information about the current gradient. This is not true in the online convex optimization setting, but a similar adaptive strategy could still be applied by starting with an optimistic estimate of $s$ and then adding on measurements if the error is believed to be large. Furthermore, the adaptation method relies on a proxy for the true gradient error, specifically $\frac{||\mathbf{A}^t\tilde{\nabla}f_t(\boldsymbol{x}_t) - \boldsymbol{y}||_2}{||\boldsymbol{y}||_2}$ , which will not necessarily be minimized by the true gradient since $\boldsymbol{y} = \mathbf{A}^t\nabla f_t(\boldsymbol{x}_t) + \frac{\delta}{2}\boldsymbol{x}_t^T\nabla^2 f_t\boldsymbol{x}_t$ . However, by making $\delta$ suitably small we can mitigate that issue. This suggests that the adaptive method would remain useful in the OCO setting and reduce the difficulty of choosing the $s$ parameter for both CONGO-Z and CONGO-E (the sampling method used by CONGO-B is not compatible with this method). We leave the full analysis of this method in the OCO setting for future work.
+
+# F.3 IMPACT OF LARGE PROBLEM DIMENSION UNDER A CONSTRAINED NUMBER OF SAMPLES
+
+Although compressive sensing allows us to reduce the sample complexity for gradient estimation to merely a logarithmic dependence on $d$ , for extremely high-dimensional problems it may remain problematic to continuously scale up the number of samples as $d$ increases. Here, we test whether $d$ can be increased without increasing $m$ for CONGO-E without seriously degrading the performance. We fix $m = 24$ which is the standard value we have used for $d = 50$ and $s = 5$ , but let $d$ increase up to 5000. If we were to scale $m$ with $d$ , this would require $m$ to increase up to 70. The results in Fig. 10 suggest that little is lost in terms of the empirical performance of CONGO-E relative to exact gradient descent when $d$ increases. Note however that this depends on $s$ remaining constant. We also show GDSP with the same number of samples for reference.
+
+# G DETAILS OF EXPERIMENTAL SETUP
+
+# G.1 ALGORITHM IMPLEMENTATION DETAILS
+
+In this section, we provide implementation details for both the CONGO-style algorithms and the baselines used in our experiments. Note that for the baselines, we distinguish between the instances
+
+used for stochastic gradient descent on a latency function (Section 7) from those used for gradient descent on the quadratic functions (Section 6) since in the SGD case we opt to normalize gradients before taking the gradient descent step to improve stability. In the case of the CONGO-style algorithms, we use the same name for both to avoid confusion although this difference is present in their implementations as well. Finally, note that there are additional hyperparameters for each of the algorithms used on the real system, which are defined in Table 6. The code used to implement the algorithms can be found in the supplementary materials (or, in the case of CONGO-Z and CoSaMP, in the Github repository at https://github.com/caesarcai/ZORO).
+
+Gradient Descent: Since we have a closed form for the true gradient of the quadratic functions considered in Section 6, we implement a standard projected gradient descent algorithm as an optimal baseline.
+
+Naive Stochastic Gradient Descent: This zeroth-order algorithm applies a perturbation to each dimension of $\boldsymbol{x}_t$ one at a time and uses the finite difference approximation (as in equation 9) to estimate the gradient on a per-dimension basis. This means that the number of samples for this algorithm is always $d + 1$ .
+
+Gradient Descent/Stochastic Gradient Descent with Simultaneous Perturbations: This is an implementation of Spall's SPSA (see Appendix A for details). Since this algorithm is able to estimate the full gradient after just two function evaluations, we average over several estimates so that the total number of samples matches that of the CONGO-style algorithms for a fair comparison.
+
+RL Agent Using Proximal Policy Optimization: Proximal Policy Optimization (PPO) is a trust region based policy gradient algorithm that maximizes the following objective function
+
+$$
+L (s, a, \theta_ {k}, \theta) = \min \left(\frac {\pi_ {\theta} (a \mid s)}{\pi_ {\theta_ {k}} (a \mid s)} A ^ {\pi_ {\theta_ {k}} (s, a)}, \operatorname {c l i p} \left(\frac {\pi_ {\theta} (a \mid s)}{\pi_ {\theta_ {k}} (a \mid s)}, 1 - \epsilon , 1 + \epsilon\right) A ^ {\pi_ {\theta_ {k}}} (s, a)\right) \tag {15}
+$$
+
+This objective function ensures that the policy updates are not too drastic. Specifically, the gradient of the objective goes to zero if the ratio of the new policy probability to the old policy probability for any given state-action pair deviates more than $\epsilon$ away from 1. The PPO agent is trained on the DeathStarBenchmark Social Media environment (we do not use it in the Jackson network simulations) for 30 iterations to learn the impact of different CPU allocations on system performance. It is then tested for an additional 30 iterations to evaluate its effectiveness, which is what we compare to the other algorithms. PPO was chosen as a baseline to demonstrate the performance of an algorithm with prior system knowledge, unlike gradient descent approaches.
+
+CONGO-B: In the numerical experiments for Section 6, we set $k_{t} = 3m$ of $k_{t} = 6m$ depending on the value of $d$ to ensure sufficient averaging. In the experiments for Section 7, we fix $k_{t} = m$ such that CONGO-B uses the same number of samples as CONGO-Z/E and GDSP/SGDSP. To implement the basis pursuit recovery method, we use Chambolle and Pock's primal-dual algorithm (see (Foucart and Rauhut, 2013), Section 15.2) for the Numerical and Jackson network experiments and the Sequential Least Squares Quadratic Programming (SLSQP) solver from the scipy optimize Python package for tests on the DeathStarBenchmark.
+
+CONGO-Z: The code used to implement CONGO-Z comes directly from the code base for the paper which introduced ZORO (Cai et al., 2022). The only file that we needed to modify was optimizers.py, but the files Cosamp.py and base.py are also required.
+
+CONGO-E: We provided our own implementation of CONGO-E, although it uses the same code for the CoSaMP algorithm as CONGO-Z does. The implementation is based on the pseudocode for Algorithm 1.
+
+# G.2 NUMERICAL EXPERIMENTS FOR ONLINE OPTIMIZATION OF QUADRATIC FUNCTIONS
+
+For all of the numerical simulation experiments, we used $T = 100$ . Where applicable, the algorithms used the same hyperparameters. The value of $s$ provided to the algorithms was the exact value of $s$ . These hyperparameters are listed in Table 1.
+
+Table 1: Hyperparameters for Numerical Experiments
+
+
Name
Description
Value
lr
learning rate
0.1
δ
smoothing parameter
{1e-5, σ=0
+0.05, σ=0.001}
m
# rows in A^t
[2s log(d/s)]
Recovery tolerance
Used for basis pursuit and CoSaMP
0.005
Recovery max iterations
Used for basis pursuit and CoSaMP
50
+
+Since the CONGO-style algorithms require bounds on $L_{F} \geq ||\nabla f_{t}||_{2}$ and $L \geq ||\nabla^{2}f_{t}||_{2}$ , we compute then for a given quadratic function as follows:
+
+$$
+L _ {f} = R \sqrt {2 \log (s)} + 2 \sqrt {s}
+$$
+
+$$
+L = \sqrt {2 \log (s)}
+$$
+
+These are bounds in expectation; The value of $L_{f}$ comes from bounding $||D\pmb{x}||_{2} + ||\pmb{b}||_{2}$ , where recall that $R$ is the radius of the constraint set (in this case centered on 0) and hence the maximum value that any entry of $\pmb{x}$ can take. The value of $L$ comes from bounding the maximum of $s$ standard normal random variables in expectation since the eigenvalues of a diagonal matrix correspond to the diagonal entries.
+
+For performing computations, the main Python package we use is Numpy (a full list of the packages required is available with the code). The seeds we used to obtain our results are 0-49. When creating our plots, we plot the average over the trajectories from the different seeds and also plot a shaded area representing $\pm$ one standard deviation away from the mean. The computation of the mean and standard deviation is done using functions provided by Numpy. The pyproximal package is also required by the code used for CONGO-Z.
+
+# G.2.1 SPECIFICATIONS OF MACHINE USED
+
+The numerical simulations were run on a machine with an Intel core i7 processor and an NVIDIA GeForce RTX 3050 Ti Laptop GPU. We found that each overall experiment with $d = 50$ did not take longer than two minutes to run.
+
+# G.3 SIMULATION EXPERIMENTS FOR ONLINE OPTIMIZATION OF JACKSON NETWORKS
+
+The following information concerns Section 7.1. We first provide a description of the layout of the Jackson networks and briefly explain how they are implemented, then describe the simulated workloads used, and finally provide the hyperparameter settings for the algorithm. Any additional information needed to setup and reproduce the experiments is provided with the code.
+
+# G.3.1 JACKSON NETWORK LAYOUT
+
+To simulate Jackson networks, we use the Python package queueing-tool (Jordon, 2023). Our simulation experiments use two different layouts, one which we call the complex environment and one which we call the large-scale environment. The first contains 15 queues and the second contains 50. For each layout we define a set of jobs, each of which is defined by an ordered sequence of queues which that job must be processed by. The length of this sequence varies from 1 to 7. All jobs share a single entry point which we label as "A". While the queueing-tool package comes with all the functionality needed to simulate a generic Jackson network, we found the need to implement a subclass of the Agent class to implement jobs with paths randomly chosen from a fixed set. However, this did not involve modifying the source code of the package.
+
+A visual representation of the complex environment is given in 11. This environment has eight possible job types, named Job1 through Job8. The sequence of microservices that each type must visit is specified in the .yaml configuration files corresponding to the complex environment. The large-scale environment has a simpler structure; there are 10 job types, and after being processed by
+
+
+Figure 11: Visual representation of the connections between microservices for the 15-microservice environment. The labeled boxes correspond to microservices, the black arrows correspond to the entry point and the connections between microservices, and the blue arrows correspond to exit points. Each of the 8 possible jobs uses a different exit point.
+
+the entry-point microservice each job moves through a unique sequence of four or five microservices before exiting the system. Hence, in the large-scale environment the job paths only overlap at the entry point.
+
+In the queueing-tool framework, each microservice is represented as a pair of nodes with a queue edge inbetween. When a job leaves a microservice's queue, it instantaneously moves from the exit node of that microservice to the entry node of the next and is enqueued on the next microservice's queue. Using the functionality provided by the queueing-tool package, we generate arrivals according to a Poisson process. Each time a job arrival occurs, the new job has a job type assigned to it according to the workload distribution. The service times, and hence the measured latencies, are based on the Jackson network's simulation time. We advance the simulation time only when the algorithm incurs its cost for the round or takes one of its samples (thus nothing changes in the simulation while the algorithm is performing computations). When the average latency is measured, we first advance the simulation for 30 seconds to bring it to a steady state and then advance it for another 10 seconds while measuring the end-to-end latencies experienced by all jobs which leave the system during that period. At the end of a round, we use the clear() function provided by queueing-tool to reset the Jackson network to its initial state. We found this necessary because otherwise the Python object simulating the network would accumulate too much logged data which would make obtaining latency for newly processed jobs prohibitively slow. Running the simulation so that it reaches steady state before taking any measurements compensates for this, since the network is allowed to reach approximately the same state that it would have had under the new allocation without the reset.
+
+# G.3.2 PROTECTING AGAINST INSTABILITY
+
+To ensure that any algorithm has valid latency measurements to use when forming a gradient estimate, we monitor whether or not any jobs leave the system during a measurement period and if none do, we assume that the stability of the Jackson network has been violated. Regardless of which algorithm is in use, when this occurs we increase the allocation to every microservice by a small amount called the correction factor and proceed to the next round. This ensures that the algorithm is able to eventually recover from the instability even if it cannot form a gradient estimate. The choice of correction factor depends on the scenario; for the complex environment with fixed workload it is 1, for the complex environment with variable job type or arrival rate it is 0.5, and for all large-scale environment scenarios it is 0.1.
+
+Besides the workload, there are a few other parameters which determine the environment that the algorithms operate in. These are the initial allocations for the microservices, the range of allowable allocations, and the resource weight (referred to as $w$ in the paper). For all experiments, the resource weight is set to 1 and the range of allowable allocations is the set [1, 60]. The initial allocations vary based on the experiment since in cases where the workload will change, we want the algorithms to have a chance to converge before the change becomes significant, forcing them to adjust. For simplicity, we keep this value uniform for all but the entry microservice (which requires a higher initial allocation to ensure stability in some cases).
+
+Table 2: Initial Allocation by Configuration
+
+
Configuration
For Entry Microservice
For Others
Complex, Fixed Workload
10
10
Complex, Variable Arrival Rate
10
10
Complex, Variable Job Type
10
7
Large-Scale, Fixed Workload
7
7
Large-Scale, Variable Arrival Rate
7
7
Large-Scale, Variable Job Type
10
4
+
+# G.3.3 DESCRIPTION OF WORKLOADS
+
+The three workload types tested mimic the different workload types used in our experiments on the DeathStarBench Social Network Application. The first type is the fixed workload where both the average arrival rate and the job distribution remain constant for all rounds. The second type is variable arrival rate where the average arrival rate changes periodically while the job distribution remains constant. This forces the algorithm to adapt its allocation over time without directly changing the set of queues which process jobs. The third type is variable job type where the job distribution incrementally switches between two fixed distributions over a certain number of rounds; outside of those rounds, the job distribution is constant. This forces the algorithm to adapt to a change in which microservices require resources and involves a change in the sparsity during the transition period. In the following tables, we specify the parameters defining the workload used in each plot of 3.
+
+Table 3: Parameters for Fixed Workloads
+
+
Environment
Arrival Rate
Job Distribution
Complex
5/s
Jobs 1,3,4,6,7,8: 2%
+Jobs 2,5: 44%
Large-scale
5/s
Job6: 100%
+
+# G.3.4 HYPERPARAMETERS
+
+Learning Rate Schedules Since our goal is to show that CONGO-E produces better gradient estimates than other algorithms under sparse conditions, we ensure that all algorithms use the same learning rate schedule so that no algorithm has a clear advantage in that respect. For both environment types we use the same initial learning rate of 1 for fixed workload and variable arrival rate scenarios, while for variable job type scenarios the initial learning rate is 0.7. For the the complex environment we decay the learning rate on every 25 rounds (with a factor of 0.7 for the fixed workload and variable arrival rate scenarios, and a factor of 0.5 for the variable job type scenario).
+
+Other Hyperparameters For all algorithms we set $\delta = 0.5$ since making it too much smaller would cause noise to overwhelm the measurements; this applies equally for both the baselines and the CONGO-style algorithms since they all depend on measuring the difference in the function's value at two points, and if the noise in the function evaluations is larger than that difference then gradient estimation becomes ineffective. For the SGDSP and CONGO-B algorithms which only require two function evaluations to get a gradient estimate but average over many to reduce noise, we set the sample size for the average to the value of $m$ used by the CONGO-stype algorithms since this ensures
+
+Table 4: Parameters for Variable Arrival Rate Workloads
+
+
Environment
Arrival Rate
Job Distribution
Complex
Rounds 1-25: 5/s
Job6: 100%
Rounds 26-50: 5.5/s
Rounds 51-75: 6/s
Rounds 76-100: 5.5/s
Large-scale
Rounds 1-10: 4.5/s
Job2: 100%
Rounds 11-20: 4.75/s
Rounds 21-30: 5/s
Rounds 31-40: 5.25/s
Rounds 41-50: 5.5/s
Rounds 51-60: 5.25/s
Rounds 61-70: 5/s
Rounds 71-80: 4.75/s
Rounds 81-90: 4.5/s
Rounds 91-100: 4.75/s
+
+Table 5: Parameters for Variable Job Type Workloads
+
+
Environment
Arrival Rate
Initial Distribution
Final Distribution
Transition Rounds
Complex
5/s
Job 2: 50%
Job 2: 10%
40-90
Job 5: 50%
Job 3: 30%
Job 6: 60%
Large-scale
4/s
Job 1: 50%
Job1: 30%
40-90
Job 3: 50%
Job3: 30%
Job6: 20%
Job8: 20%
+
+that they use the same number of samples as CONGO-Z and CONGO-E on each round. For the complex environment we use $s = 6$ and $m = 8$ , while for the large-scale environment we use $s = 10$ and $m = 17$ . For the primal-dual algorithm which implements basis pursuit as well as the CoSaMP algorithm, we set the tolerance to 0.005 and the maximum number of iterations to 50.
+
+# G.3.5 SPECIFICATIONS OF MACHINE USED
+
+Note that these simulations did not require the use of GPUs.
+
+- Operating System: Ubuntu 22.04.3 LTS (Jammy)
+- Kernel Version: 6.5.0-28-generic
+- CPU: AMD Ryzen Threadripper 3960X 24-Core Processor
+
+- Architecture: x86_64
+- Cores: 12
+- Threads: 24
+- Max Frequency: 3.8 GHz
+
+- Memory:
+
+- Total Memory: 96 GiB
+- Swap: 31 GiB
+
+# G.4 DEATHSTARBENCH SOCIAL NETWORK APPLICATION
+
+# OVERVIEW
+
+The DeathStarBench suite includes a social network application designed to evaluate microservices' performance. This application simulates real-world social network activities, providing a robust environment for benchmarking.
+
+# TESTING METHODOLOGY
+
+The wrk2 tool is utilized to generate workloads for the microservice application. This application consists of multiple containers, each hosting a different microservice. Integrated within these containers are Jaeger clients, which continuously record service-level metrics, specifically latency, in the background. These metrics are periodically sent to the Jaeger Collector.
+
+The collected metrics serve as key performance indicators (KPIs) to assess the system's performance. The KPIs are then used to calculate the gradient, which informs the adjustments needed for CPU allocations. These adjustments are applied to the system's containers through Docker commands.
+
+The specific methods for calculating the gradient and implementing CPU allocation modifications are algorithm-dependent. This adaptive approach ensures optimal resource allocation, thereby enhancing the overall efficiency and performance of the microservice application. 12 illustrates how algorithms interact with the social network application in our experiments.
+
+
+Figure 12: A visual representation of the application of algorithms within a microservice architecture, demonstrating how CPU allocations are adjusted to achieve optimal performance thresholds.
+
+Workloads: We used the WRK2 tool to generate workloads for our experiments. We run the workload for a duration of 2 hours, with 4 client connections. We executed the benchmark against the following workloads:
+
+- Fixed Workload with fixed job types:
+
+- Request per second = Fixed 2000 req/sec
+- Job type = compose-post
+
+- Fixed Workload with variable job types:
+
+- Request per second = Fixed 2000 req/sec
+- Job type = composition of compose-post, read-hometimeline, read-usertimeline requests
+
+- Variable Arrival Rate with fixed job types:
+
+- Request per second = follows this pattern [2000, 1900, 1500, 1600, 1800]
+- Job type = compose-post
+
+# G.4.1 HYPERPARAMETERS
+
+Each algorithm was tested with a specific set of hyperparameters to assess their performance under different conditions. Table 6 presents the glossary of the hyperparameters used for the various algorithms and Tables 7, 8, 9, 10, 11, 11 provide the exact hyperparameters used for NSGD, SGDSP, PPO, CONGO-B, CONGO-Z and CONGO-E respectively.
+
+Table 6: Glossary of Hyperparameters for Deathstar Bench Trials
+
+
Hyperparameter
Definition
cpu period
Parameter for Docker to change CPU allocation (100000 for all)
max iterations
Maximum number of iterations for the algorithm (20 for all)
CPU_COST-factor
Cost factor for CPU usage
latency_weight
Weight assigned to latency in the cost function
δ
Small value for CPU allocation adjustments
initial learning rate
Starting rate for updating CPU allocation
learning rate decay factor
Multiplier to reduce learning rate each iteration
update step limit
Max step size for CPU allocation updates
current cpu bounds
Range for allowable CPU usage
significance threshold for change
Min threshold for significant CPU allocation changes
learning rate decay schedule
Formula to decrease learning rate over time
number of calls (BO)
Iterations for Bayesian Optimization
acquisition function (BO)
Function to select next hyperparameters in BO
latency threshold
Maximum allowable latency for operations
momentum
Parameter to accelerate gradient vectors
exploration factor
Balance between exploring and exploiting strategies
n_steps
Number of steps per environment update in PPO
γPPO
Discount factor in PPO
learning_rate
Learning rate in PPO
GAE Lambda (gae_lambda)
Controls bias-variance trade-off in advantage estimation (PPO)
Entropy Coefficient (ent coef)
Encourages exploration by penalizing deterministic policies (PPO)
Value Function Coefficient (vfcoef)
Weight for the value function's error during training (PPO)
Max Gradient Norm (max_grad_norm)
Threshold for gradient clipping to prevent explosion (PPO)
γ
l1-minimization error constraint (CONGO)
scale (sigmoid adjustment)
Scaling factor for sigmoid function to adjust CPU allocations (CONGO)
+
+# G.4.2 SPECIFICATIONS OF MACHINE USED
+
+- Operating System: Ubuntu 22.04.3 LTS (Jammy)
+- Kernel Version: 6.5.0-28-generic
+- CPU: Intel(R) Core(TM) i9-9940X CPU @ 3.30GHz
+
+- Architecture: x86_64
+- Cores: 14
+- Threads: 28
+- Max Frequency: 4.5 GHz
+
+- Memory:
+
+- Total Memory: 62 GiB
+- Swap: 31 GiB
+
+- GPU:
+
+- 2 x NVIDIA GeForce RTX 2080 Ti
+
+Table 10: CONGO - B Hyperparameters for Deathstar Bench Trial
+
+
Hyperparameter
Value
number of measurements (m)
12
δ
0.2 / max perturbation value
γ
0.2 / (1 + iteration * 0.05)
learning_rate
0.6 / (1 + iteration * 0.5)
scale (sigmoid adjustment)
5
CPU_COST_FACTOR
10.0
latency_weight
1.0
+
+Table 11: CONGO - Z Hyperparameters for Deathstar Bench Trial
+
+
Hyperparameter
Value
δ (perturbation size)
0.1
learning rate
0.15
sparsity (s)
6
number of measurements (m)
10
latency weight
1.0
CPU allocation weight
10.0
+
+Table 12: CONGO - E Hyperparameters for Deathstar Bench Trial
+
+
Hyperparameter
Value
δ (perturbation size)
0.1
learning rate
starts at 0.1, decreases as 0.1/(1 + iteration × 0.1)
sparsity (s)
6
number of measurements (m)
10
initial CPU allocation
0.35
latency weight
1.0
CPU allocation weight
10.0
\ No newline at end of file
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/images.zip b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..456b1d9fcab680861a3181870dc06df21cdb209a
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8d909a61ab89b211afc46059de766d7e7dc9e8cc8379e0f079a8e2f5871f1afe
+size 1352227
diff --git a/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/layout.json b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..779122012e0d14683ea7a290dd7e06a1a5114f70
--- /dev/null
+++ b/ICLR/2025/CONGO_ Compressive Online Gradient Optimization/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e41b8d66e84726dbc5e65212df0b4b01b9bc73842e2ee80c02867860300a03b
+size 1298971
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_content_list.json b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0e1b6e525e10f751060e885aaaede72af0e68bfd
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:43d125965089e88d7257333d6fda77cc8f8e789938724225bd730e4622af3ff2
+size 138619
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_model.json b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..cf70d0be3e10563cbea6e2f37f76a717882f1b9a
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d1f28aa5751421eb6463dc0536916c50094e468b083694d22265c015f6b94e80
+size 163461
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_origin.pdf b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..5548b64bc10bd27c6915394b97f4811e79472f7a
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/4cbd00df-819e-4c98-8dda-3ebfcddb43f0_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:151559217a306b350e9855b3d8f0c9af95317d43d3c56a1ee95256b0be2efece
+size 9293887
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/full.md b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..f960ea3b123c86c606add50382711513ad8b4813
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/full.md
@@ -0,0 +1,677 @@
+# CONTRA: CONFORMAL PREDICTION REGION VIA NORMALIZING FLOW TRANSFORMATION
+
+Zhenhan Fang, Aixin Tan
+
+Department of Statistics and Actuarial Science
+
+The University of Iowa
+
+Iowa City, IA 52242, USA
+
+{zhenhan-fang, aixin-tan}@uiowa.edu
+
+Jian Huang
+
+Department of Applied Mathematics
+
+The Hong Kong Polytechnic University
+
+Hongkong, China
+
+j.huang@polyu.edu.hk
+
+# ABSTRACT
+
+Density estimation and reliable prediction regions for outputs are crucial in supervised and unsupervised learning. While conformal prediction effectively generates coverage-guaranteed regions, it struggles with multi-dimensional outputs due to reliance on one-dimensional nonconformity scores. To address this, we introduce CONTRA: CONformal prediction region via normalizing flow TRAnformation. CONTRA utilizes the latent spaces of normalizing flows to define nonconformity scores based on distances from the center. This allows for the mapping of high-density regions in latent space to sharp prediction regions in the output space, surpassing traditional hyperrectangular or elliptical conformal regions. Further, for scenarios where other predictive models are favored over flow-based models, we extend CONTRA to enhance any such model with a reliable prediction region by training a simple normalizing flow on the residuals. We demonstrate that both CONTRA and its extension maintain guaranteed coverage probability and outperform existing methods in generating accurate prediction regions across various datasets. We conclude that CONTRA is an effective tool for (conditional) density estimation, addressing the under-explored challenge of delivering multi-dimensional prediction regions.
+
+# 1 INTRODUCTION
+
+In unsupervised and supervised learning, density and conditional density estimation are frequently used to communicate the inherent variability in the potential outcome and assess the reliability of estimations and predictions (Hall & Yao, 2005; Guhaniyogi et al., 2014; Dalmasso et al., 2020). These methods can report regions that aim to capture the true outcome with a specified probability, such as $90\%$ , based on the estimated density. However, the actual coverage rate depends on the underlying model assumptions and does not come with any inherent guarantees.
+
+Conformal prediction is a way to produce regions with guaranteed coverage rate of future outcomes non-asymptotically and free of model assumptions (Papadopoulos et al., 2002; Vovk et al., 2005; Lei et al., 2018; Romano et al., 2019; Lei et al., 2015; Izbicki et al., 2020; Chernozhukov et al., 2021). Briefly, the most popular split conformal approach partitions the whole dataset into a proper training set and a calibration set. A predictive model is trained using the former, and non-conformity scores are calculated on the latter that measure the deviation of the predictions from the actual outputs. Quantiles of the non-conformity scores are used to set threshold values, producing prediction regions that capture future outcome with desired probabilities. More accurate predictive models usually yield tighter conformal prediction regions.
+
+The conformal prediction literature has primarily focused on one-dimensional output settings, partly because the conformal idea depends on quantiles. Among the relatively few multi-targeting methods in the literature, most restrict region shapes to be boxes or ellipsoids. For complex conditional distributions of the output, such as those with multi-modes or unequal-tails in different directions, boxes or ellipsoids encompass low-density areas to ensure validity, and become inflated. Two recent approaches that allow flexible shape for multi-dimensional conformal regions are the spherically transformed directional quantile regression (ST-DQR) (Feldman et al., 2023) and the probabilistic
+
+conformal prediction (PCP) (Wang et al., 2022). But their prediction regions are composed of numerous balls, which often lead to highly irregular boundaries and more disconnected regions than desirable, hindering interpretability.
+
+We propose CONTRA, a new method that produces prediction regions for multi-dimensional outputs. CONTRA stands for CONformal prediction region via normalizing flow TRansformation. Here, normalizing flows (NF) (Dinh et al., 2016; Huang et al., 2018; Chen et al., 2019; Kingma & Dhariwal, 2018; Papamakarios et al., 2021) and conditional normalizing flows (CNF) (Winkler et al., 2019) are generative methods that provide samples, hence density estimates, for the output.
+
+An example is shown in Figure 1 for the prediction region of dropout locations of Taxi $(\mathbf{y})$ given an arbitrary pickup point $(\mathbf{x},$ shown as blue pin) in New York city. This is a situation where the conditional density of the outcome is multimodal. Ten different conformal predictions were displayed. The five methods with restricted shapes in (e) and (f) yield large and unnatural prediction regions. The CONTRA region in (b), a variation of CONTRA in (c), and the PCP and ST-DQR methods based on either NF or diffusion models in (d), (g) and (h) produced comparable areas with similar sizes. But both CONTRA prediction regions in (b) and (c) are much more connected than that of PCP and ST-DQR, providing the most effective and interpretable results that maintained theoretical rigor.
+
+
+(a) KDE (unsafe)
+
+
+(b)CONTRA
+
+
+(c) ResCONTRA
+
+
+(d) $\mathrm{NF} + \mathrm{PCP}$
+
+
+(e) Ellipses
+
+
+(f) Rectangles
+
+
+(g) DM + PCP
+Figure 1: NYC Taxi data. Prediction regions of drop-off location given a pickup coordinate (blue pin). (a) shows a $90\%$ high-density region estimated via kernel density estimates (KDE) based on dropout locations from the 200 nearest pickups to the blue pin. While there is no guarantee of coverage, the shape of this region offers an informal visual reference to help users assess conformal regions. (b)-(f) show various conformal predictions based on NF, trained on 3600 samples and calibrated on 1200. The methods include our proposed CONTRA and ResCONTRA; PCP and ST-DQR (the latter result is not shown due to its similarity to the PCP); NLE and RCP that always lead to elliptical regions; and MCQR, Dist-Split, and $\mathrm{CQR}_{\mathrm{bon}}$ that always lead to rectangular regions; (g) and (h) show the PCP and ST-DQR conformal regions based on a diffusion model, in particular, a Denoising Diffusion Probabilistic Model (Ho et al., 2020) trained with 800 timesteps, learning rate 0.001 and 300 epochs.
+
+
+(h) DM + ST-DQR
+
+We briefly explain here how CONTRA works. Given an input, CNF learns a bijection that maps a latent variable from a simple base distribution, like a standard multivariate Gaussian, to the outcome variable (details in Section 2). After training a CNF on the proper training set, CONTRA maps high-density regions (HDRs) of the base distribution to the outcome, while the split-conformal approach adjusts these regions in the latent space by comparing latent representations of the calibration set to the expected base distribution. Consequently, CONTRA's prediction region is a bijection of a single high-density area, naturally aligning with the output's conditional distribution, circumventing the need to union many regions, as seen in PCP and ST-DQR.
+
+While flow-based models excel in many contexts, there are times when other predictive approaches are preferable. For these situations we invent a variation of CONTRA called ResCONTRA, which enhance any predictive model with a reliable prediction region by training a simple NF on the residuals. The ResCONTRA approach builds on Colombo (2024), where one-dimensional residuals were
+
+transformed to follow base distributions like Uniform or Gaussian using relatively simple bijections. ResCONTRA extends this idea to multi-dimensional outputs and introduces the concept of a symmetric base distribution in $\mathbb{R}^q$ en route to define an ideal non-conformity score. In describing ResCONTRA in section 3.4, we also highlight the need for a three-step calibration procedure to ensure exchangeability that leads to coverage guarantee. Compared to CONTRA, which trains a single model, ResCONTRA seems less efficient as it trains two models on smaller data sets. But ResCONTRA has the potential to excel in situations, say, when $\mathbb{E}(\mathbf{y}|\mathbf{x})$ is highly intricate and can be better learned with techniques like XGBoost rather than an underlying bijection. Some empirical comparisons of the two proposed methods can be found in Section 5 and Appendix G.
+
+We provide details of CONTRA and ResCONTRA in Section 3, review existing multi-output conformal predictions in Section 4. We demonstrate that CONTRA and ResCONTRA achieve the desired coverage probability (e.g., $90\%$ ) with high accuracy in Section 5. They outperform shape-restricted methods by providing smaller regions that better reflect the true density. And they have smoother boundaries and improved interpretability compared to the flexible regions of PCP and ST-DQR.
+
+# 2 CONDITIONAL NORMALIZING FLOW
+
+Let $(\mathbf{X},\mathbf{Y})$ denote a random vector with unknown probability density (or mass) function $p_{\mathbf{XY}}(\mathbf{x},\mathbf{y})$ , supported on $\mathcal{S}\subset \mathbb{R}^{(p + q)}$ . For each $\mathbf{x}\in \mathcal{X}\subset \mathbb{R}^p$ , the support of $\mathbf{Y}$ is denoted by $\mathcal{V}_{\mathbf{x}}\subset \mathbb{R}^q$ . Suppose a data set $D = \{(\mathbf{x}_i,\mathbf{y}_i)\}_{i = 1}^n$ has been drawn from $p_{\mathbf{XY}}(\mathbf{x},\mathbf{y})$ . The objective of a conditional density estimation method is to find an estimate $\hat{p}_{\mathbf{Y}|\mathbf{X}}(\cdot |\mathbf{x})$ of the true conditional density $p_{\mathbf{Y}|\mathbf{X}}(\cdot |\mathbf{x})$ for all $\mathbf{x}\in \mathcal{X}$ based on $D$ . In a parametric approach, where candidate models are $\mathcal{P} = \{p_{\mathbf{Y}|\mathbf{X},\theta};\theta \in \Theta \}$ , the maximum likelihood principle leads to $\hat{p}_{\mathbf{Y}|\mathbf{X}}(\cdot |\mathbf{x}) = p_{\mathbf{Y}|\mathbf{X},\hat{\theta}}(\cdot |\mathbf{x})$ , where $\hat{\theta}$ is given by:
+
+$$
+\hat {\theta} = \arg \max _ {\theta} \prod_ {i = 1} ^ {n} p _ {\mathbf {Y} | \mathbf {X}, \theta} (\mathbf {y} _ {i} | \mathbf {x} _ {i}) = \arg \max _ {\theta} \sum_ {i = 1} ^ {n} \log p _ {\mathbf {Y} | \mathbf {X}, \theta} (\mathbf {y} _ {i} | \mathbf {x} _ {i}). \tag {1}
+$$
+
+The CNF approach specifies $\mathcal{P}$ to be such that, each $p_{\mathbf{Y}|\mathbf{X},\theta}(\cdot |\mathbf{x})$ is a density of a $q$ -dimensional random vector $\mathbf{Y}$ that can be transformed via a differentiable bijection to a simple random vector $\mathbf{Z} \in \mathcal{Z}$ , such as a $q$ -dimensional Gaussian1. We denote this transformation by
+
+$$
+\mathbf {y} = t _ {\theta} (\mathbf {z}, \mathbf {x})
+$$
+
+such that for any $\mathbf{x} \in \mathcal{X}$ , $t(\cdot, \mathbf{x})$ is a differentiable bijection from $\mathcal{Z}$ to $\mathcal{Y}_{\mathbf{x}}$ , with inverse function $t^{-1}(\cdot, \mathbf{x})$ . Let $\operatorname{det}$ denote the determinant function. The change-of-variable technique implies:
+
+$$
+p _ {\mathbf {Y} | \mathbf {X}, \theta} (\mathbf {y} | \mathbf {x}) = p _ {\mathbf {Z}} (t _ {\theta} ^ {- 1} (\mathbf {y}, \mathbf {x})) \left| \det \frac {\partial t _ {\theta} ^ {- 1} (\mathbf {y} , \mathbf {x})}{\partial \mathbf {y}} \right|.
+$$
+
+It can be extremely challenging to directly constructing an expressive enough collection of transformations, $\{t_{\theta},\theta \in \Theta \}$ , to capture the true conditional density, $p_{\mathbf{Y}|\mathbf{X}}(\mathbf{y}|\mathbf{x})$ . Fortunately, the compositional nature of bijective functions allows complex transformations to be built from simpler ones: $t_\theta (\cdot ,\mathbf{x}) = t_{m,\theta}\circ t_{m - 1,\theta}\circ \ldots \circ t_{1,\theta}(\cdot ,\mathbf{x})$ . Accordingly,
+
+$$
+\log p _ {\mathbf {Y} | \mathbf {X}, \theta} (\mathbf {y} | \mathbf {x}) = \log p _ {\mathbf {Z}} (\mathbf {z}) - \sum_ {l = 1} ^ {m} \log \left| \det \frac {\partial t _ {l , \theta}}{\partial \mathbf {z} ^ {(l - 1)}} \right|,
+$$
+
+where $\mathbf{z}_0 = \mathbf{z},\mathbf{z}_l = t_{l,\theta}(\mathbf{z}_{l - 1},\mathbf{x})$ for $l = 1,\dots ,m$ , and $\mathbf{z}_m = t_\theta (\mathbf{z},\mathbf{x}) = \mathbf{y}$ . And equation 1 can be rewritten as:
+
+$$
+\hat {\theta} = \arg \max _ {\theta} \sum_ {i = 1} ^ {n} \left[ \log p _ {\mathbf {Z}} \left(\mathbf {z} _ {i}\right) - \sum_ {l = 1} ^ {m} \log \left| \det \frac {\partial t _ {l , \theta}}{\partial \mathbf {z} _ {i} ^ {(l - 1)}} \right| \right]. \tag {2}
+$$
+
+From equation 2, it's essential to specify transformations $t_l$ that are easy to evaluate Jacobian determinants for. Several structured approaches, including autoregressive flows (Huang et al., 2018), linear flows (Kingma & Dhariwal, 2018), and residual flows (Chen et al., 2019), facilitate such tractability. In this paper, we employ an affine transformation model known as realNVP (Dinh et al., 2016), which leverages coupling layers (Dinh et al., 2014) to improve computational efficiency. Further details on realNVP are included in Appendix C.
+
+# 3 CONTRA: CONFORMAL REGION VIA NORMALIZING FLOW TRANSFORMATION
+
+Having trained a CNF model, $t_{\hat{\theta}}$ , it is tempting to perform naive conditional density estimation as follows. Given any $\mathbf{x}_{n + 1}$ of interest, define the naive $(1 - \alpha)$ prediction region to be
+
+$$
+\tilde {C} _ {1 - \alpha} (\mathbf {x} _ {n + 1}) = \left\{\mathbf {y}: \mathbf {y} = t _ {\hat {\theta}} (\mathbf {z}, \mathbf {x} _ {n + 1}), \mathbf {z} \in B _ {1 - \alpha} \right\},
+$$
+
+where $B_{1 - \alpha}$ is the q-dimensional ball that is the highest probability region of size $(1 - \alpha)$ in the latent space for the standard Gaussian. However, the actual coverage rate of this region can vary greatly depending on the quality of $\mathbf{y} = t_{\hat{\theta}}(\mathbf{z},\mathbf{x}_{n + 1}),\mathbf{Z}\sim \mathrm{N}_q(\mathbf{0},\mathbf{I})$ as an approximate sampler for $p_{\mathbf{Y}|\mathbf{X} = \mathbf{x}_{n + 1}}$ . Approximation errors can be high for $\mathbf{x}_{n + 1}$ values not well represented in training. Given $\mathbf{x}_{n + 1}$ , we would like methods to construct $\hat{C} (\mathbf{x}_{n + 1})\subset \mathbb{R}^q$ that satisfies the marginal coverage guarantee:
+
+$$
+\mathbb {P} \left[ \mathbf {y} _ {n + 1} \in \hat {C} \left(\mathbf {x} _ {n + 1}\right) \right] \geq 1 - \alpha . \tag {3}
+$$
+
+# 3.1 CONFORMAL REGIONS: FROM THE LATENT SPACE TO THE OUTPUT SPACE
+
+Two general ideas to achieve equation 3 are full conformal prediction (Vovk et al., 2005) and split conformal prediction (Papadopoulos et al., 2002; Lei et al., 2018; 2015; Angelopoulos & Bates, 2021). Full conformal prediction requires recalculating non-conformity scores across the entire dataset for each new instance. Split conformal prediction partitions the whole dataset into two disjoint sets: the proper training set, $D_{1} = \{(\mathbf{x}_{i},\mathbf{y}_{i}):i\in I_{1}\}$ of size $n_1$ ; and the calibration set, $D_{2} = \{(\mathbf{x}_{i},\mathbf{y}_{i}):i\in I_{2}\}$ of size $n_2 = n - n_1$ . We choose the split approach for its computational efficiency in developing CONTRA.
+
+Recall $t_{\hat{\theta}}(\cdot, \cdot): S \to \mathbb{R}^q$ stands for the CNF model with a standard Gaussian base trained from $D_1$ . Given any $(\mathbf{x}, \mathbf{y})$ , there is a latent representation of the output, which we denote by $\hat{\mathbf{z}} = t_{\hat{\theta}}^{-1}(\mathbf{y}, \mathbf{x})$ . Denote the collection of latent representations for $D_2$ by
+
+$$
+\mathcal {Z} _ {\mathrm {c a l}} = \left\{\hat {\mathbf {z}} _ {i} \in \mathbb {R} ^ {q}: \hat {\mathbf {z}} _ {i} = t _ {\hat {\theta}} ^ {- 1} \left(\mathbf {y} _ {i}, \mathbf {x} _ {i}\right), i \in I _ {2} \right\}. \tag {4}
+$$
+
+Let $r_{1 - \alpha}$ denote the $\lceil (1 - \alpha)(n_2 + 1)\rceil$ -th smallest member of $\{\| \hat{\mathbf{z}}_i\| _2,i\in I_2\}$ , where $\| \cdot \| _2$ is the Euclidean norm. We define the conformal ball of size $(1 - \alpha)$ to be
+
+$$
+\hat {E} = \left\{\mathbf {z} \in \mathbb {R} ^ {q}: \| \mathbf {z} \| \leq r _ {1 - \alpha} \right\}. \tag {5}
+$$
+
+Then $\hat{E}$ contains at least $(1 - \alpha)100\%$ of the points in $\mathcal{Z}_{\mathrm{cal}}$ . By the inflation of quantiles lemma (Romano et al., 2019), assuming the points in $D_{2}$ and the point to predict, $(\mathbf{x}_{n + 1},\mathbf{y}_{n + 1})$ , are exchangeable, we have
+
+$$
+\mathbb {P} \left(\hat {\mathbf {z}} _ {n + 1} \in \hat {E}\right) = \mathbb {P} \left(\| \hat {\mathbf {z}} _ {n + 1} \| \leq r _ {1 - \alpha}\right) \geq 1 - \alpha .
+$$
+
+The CONTRA prediction region is defined to be the mapping of $\hat{E}$ in the output space:
+
+$$
+\hat {C} (\mathbf {x} _ {n + 1}) = t _ {\hat {\theta}} (\hat {E}, \mathbf {x} _ {n + 1}).
+$$
+
+The algorithm for producing CONTRA prediction region is summarized as Algorithm 1. Its coverage guarantee is stated in Proposition 2 in Appendix A.1.
+
+# Algorithm 1 Conformal Region via Normalizing Flow Transformation (CONTRA)
+
+# Input :
+
+1: Data $\{(\mathbf{x}_i,\mathbf{y}_i)\}_{i = 1}^n\in \mathbb{R}^p\times \mathbb{R}^q$
+2: Miscoverage level $\alpha \in [0,1]$
+3: A CNF algorithm $\mathcal{A}$ with a standard Gaussian base distribution.
+4: A point $\mathbf{x}_{n + 1}$ that needs a prediction region for its output, $\mathbf{y}_{n + 1}$ .
+
+# Procedure :
+
+1: Randomly split $\{(\mathbf{x}_i,\mathbf{y}_i)\}_{i = 1}^n$ into two disjoint sets $D_{1}$ and $D_{2}$ .
+2: Fit $t_{\hat{\theta}}$ by $\mathcal{A}(D_1)$
+3: Obtain $\mathcal{Z}_{\mathrm{cal}}$ as in equation 4.
+4: Compute $r_{1 - \alpha}$ and define $\hat{E}$ as in equation 5.
+5: Compute $\hat{C} (\mathbf{x}_{n + 1}) = t_{\hat{\theta}}(\hat{E},\mathbf{x}_{n + 1})$
+
+# Output :
+
+A prediction region for $\mathbf{y}_{n + 1}$ is given by $\hat{C} (\mathbf{x}_{n + 1})$
+
+# 3.2 PRACTICAL ASPECTS OF PRESENTING CONTRA OUTPUTS
+
+There is flexibility in implementing steps 4 and 5 of Algorithm 1 and in displaying the prediction region. One way is to get samples inside $\hat{E}$ and map them to the output space. Samples can be random or deterministic, using methods like Monte Carlo, grid points, or Quasi Monte Carlo. Another less costly way is to only sample from the boundary of $\hat{E}$ , which will map to of $\hat{C}$ in the output space. The validity of this approach hinges on Proposition 3 in Appendix A.2, which states that boundaries of sets are preserved under homomorphisms, including the CNF transformation.
+
+# 3.3 CONNECTEDNESS AND VOLUME OF CONTRA
+
+There is no universal criteria for comparing different prediction regions, provided they have guaranteed coverage. However, smooth boundaries and smaller volumes are generally considered desirable characteristics.
+
+Connectedness. Fewer disconnected sets and smoother boundaries for a prediction region means predictions close to each other are more likely to be classified the same way, either inside or outside of the prediction region. These properties contribute to robust and interpretable inferences in practice. The prediction region $\hat{C}$ of CONTRA is indeed closed and connected due to the following.
+
+Proposition 1. (James, 2000, Chap.3) Suppose $E \subset \mathcal{Z}$ is closed and connected, and $t$ is a homeomorphism. Then $t(E) \subset \mathcal{Y}$ is also closed and connected.
+
+Volume calculation. Assessing, calibrating, and comparing different prediction regions necessitates a tool to calculate the volume of the regions, which can be challenging for irregular multi-dimensional shapes. We propose an approximation method for the volume of $\hat{C}(\mathbf{x}_{n+1})$ , using by-products from the training process of CNF. Note that
+
+$$
+\operatorname {V o l} \left(\hat {C} (\mathbf {x} _ {n + 1})\right) = \int_ {\hat {E}} \left| \det (J _ {t _ {\hat {\theta}}} (\mathbf {z})) \right| d \mathbf {z} = \operatorname {V o l} (\hat {E}) \int_ {\hat {E}} \left| \det (J _ {t _ {\hat {\theta}}} (\mathbf {z})) \right| \frac {1}{\operatorname {V o l} (\hat {E})} d \mathbf {z}.
+$$
+
+The above integral can be approximated using a Monte Carlo estimator based on a random sample, $\{\mathbf{z}_b\}_{b = 1}^B$ , drawn uniformly from $\hat{E}$ , with density $1 / \mathrm{Vol}(\hat{E})$ :
+
+$$
+\widehat {\operatorname {V o l}} \left(\hat {C} (\mathbf {x} _ {n + 1})\right) = \operatorname {V o l} (\hat {E}) \frac {1}{B} \sum_ {b = 1} ^ {B} \left| \det \left(J _ {t _ {\hat {\theta}}} (\mathbf {z} _ {b})\right) \right|.
+$$
+
+# 3.4 EXTENSION TO WORK WITH OTHER PREDICTION MODELS: RESCONTRA
+
+The CONTRA method proposed so far restricts the fitted model to be a NF. We now present a variation, ResCONTRA, to enable conformal prediction for any user-chose prediction methods. As explained in the introduction, this is inspired by an idea in Colombo (2024). We split the whole dataset into $D_{1}$ , $D_{2}$ and $D_{3}$ . Here, $D_{1}$ is used to train the user-chosen point estimator, $\hat{f}$ . Residuals, $\mathbf{r}_i = \mathbf{y}_i - \hat{f}(\mathbf{x}_i)$ , for points in the latter two sets are calculated. Then the standard CONTRA is applied to $D_{2}^{*} = \{(\mathbf{x}_{i},\mathbf{r}_{i})\}_{i\in I_{2}}$ and $D_{3}^{*} = \{(\mathbf{x}_{i},\mathbf{r}_{i})\}_{i\in I_{3}}$ , which serve as the proper training and the calibration set respectively in the split conformal framework. Denote the NF that transforms the residuals in $D_{2}^{*}$ to latent $\mathbf{z}$ by $t^{-*}$ , and the conformal ball $\hat{E}^{*}$ is calibrated with $D_{3}^{*}$ . Finally, the prediction region for a new data point is given by
+
+$$
+\hat {C} ^ {*} (\mathbf {x} _ {n + 1}) = \hat {f} (\mathbf {x} _ {n + 1}) + t ^ {*} (\hat {E} ^ {*}, \mathbf {x} _ {n + 1}).
+$$
+
+It's straightforward to see that marginal coverage is guaranteed, as
+
+$$
+\mathbb {P} \big (\mathbf {y} _ {n + 1} \in \hat {C} ^ {*} (\mathbf {x} _ {n + 1}) \big) = \mathbb {P} \big (\mathbf {r} _ {n + 1} \in t ^ {*} (\hat {E} ^ {*}, \mathbf {x} _ {n + 1}) \big) \geq 1 - \alpha .
+$$
+
+Remark: If the distribution of $\mathbf{z}$ were perfectly independent of $\mathbf{x}$ , Corollary 2.6 of Colombo (2024) suggests that conditional coverage probability of $\mathbf{y}_{n+1}$ given any $\mathbf{x}$ can be achieved. However, since perfect independence is not achievable in practice with finite data, they also derived in Theorem 2.7 a theoretical bound for the potential reduction in conditional coverage probabilities. This bound
+
+depends on the deviation between the learned distribution of $\mathbf{z}$ and the ideal base distribution that is independent of $\mathbf{x}$ . Since both CONTRA and ResCONTRA aim to transform $\mathbf{z}$ to have symmetrical distributions free of $\mathbf{x}$ , both methods are expected to approximately achieve the desired conditional coverage similar to those shown in Colombo (2024). It is an on-going work to analyze the conditional coverage probabilities of CONTRA and ResCONTRA both theoretically and empirically, with the challenging but important goal of deriving practically useful bounds.
+
+# 4 RELATED WORK
+
+In contrast to CONTRA, traditional conformal prediction methods construct prediction regions directly in the output space. We review some of them below.
+
+# 4.1 CONFORMAL APPROACHES THAT TARGET MULTI-DIMENSIONAL OUTPUTS
+
+Limited conformal methods in the literature target multi-dimensional outputs directly. An example is the robust conformal prediction (RCP) (Johnstone & Cox, 2021), which employs the global covariance matrix to produce an ellipsoid region. The normalized locally ellipsoid (NLE) (Messoudi et al., 2022) extends RCP by incorporating local covariance matrices, making the region adaptive to $\mathbf{x}$ .
+
+Two recent methods, PCP and ST-DQR, are closer to CONTRA as they don't restrict shape of the prediction regions. First, the PCP method was proposed by Wang et al. (2022). Given a generative model for estimating the conditional density, PCP defines the non-conformity score of a data point $(\mathbf{x}_i,\mathbf{y}_i)$ as
+
+$$
+s _ {i} = \min _ {1 \leq k \leq K} \| \mathbf {y} _ {i} - \hat {\mathbf {y}} _ {i} ^ {k} \|,
+$$
+
+where $\{\hat{\mathbf{y}}_i\}_{k=1}^K$ is a sample of the output generated from the estimated conditional density. Then the prediction region at $\mathbf{x}_{n+1}$ is obtained by generating a sample $\{\hat{\mathbf{y}}_{n+1}^k\}_{k=1}^K$ and form
+
+$$
+\hat {C} ^ {\mathrm {P C P}} \left(\mathbf {x} _ {n + 1}\right) = \bigcup_ {k = 1} ^ {K} \left\{\mathbf {y}: \| \mathbf {y} - \hat {\mathbf {y}} _ {n + 1} ^ {k} \| _ {2} \leq s _ {1 - \alpha} \right\},
+$$
+
+where $s_{1 - \alpha}$ is the $\lceil (1 - \alpha)(n_2 + 1) \rceil$ -th smallest member of $\{s_i, i \in I_2\}$ . Note that each PCP prediction region is the union of $K$ balls. They have flexible, but often irregular, disconnected shapes, and are sensitive to the choice of $K$ and $\alpha$ . This brings challenge to interpreting the regions.
+
+Next, the ST-DQR method was proposed by Feldman et al. (2023). It learns an r-dimensional latent representation of the output, e.g., using the conditional variational auto-encoder (CVAE). The latent variable is encouraged to follow a unimodal distribution, so that methods like the directional quantile regression (DQR) are applicable to form convex probability regions for it. Samples are generated in the output space corresponding to points in the latent region. Calibration and the final prediction region are created similarly to the PCP.
+
+ST-DQR and our CONTRA are similar in that they both depend on latent representations, but differ substantially in the latent representation. CONTRA uses bijection and are often able to learn the latent variable to follow the Gaussian reference distribution rather closely. In contrast, the latent variable in ST-DQR is typically of lower dimension than the output, and its distribution is only coarsely similar to a reference. And this is why additional steps like DQR are needed to form latent probability regions in ST-DQR, but our CONTRA can directly use HDR of the reference Gaussian. When calibrating the regions, ST-DQR (and PCP) had to introduce yet another step: union balls around generated samples, and calibrate the common radius of the balls. Whereas CONTRA directly calibrate radius of the Gaussian HDR. Afterall, these methods have their strengths and weaknesses, but each is a valuable addition to the user's toolkit.
+
+# 4.2 ONE-DIMENSIONAL CONFORMAL APPROACHES AND UPGRAISING THEM TO CAPTURE MULTI-DIMENSIONAL OUTPUTS
+
+The literature of conformal predictions for one-dimensional output is rather rich and we list a few state-of-the-art methods. Locally adaptive split conformal prediction (Lei et al., 2018) enhances
+
+reliability by adapting to local data variability, while Dist-split (Izbicki et al., 2020) constructs intervals based on the estimated cumulative density function. However, both methods tend to provide broader intervals when the underlying conditional density is not symmetric. Conformalized quantile regression (CQR) (Romano et al., 2019) offers asymmetric intervals using two conditional quantile estimators, but it remains inefficient for multi-modal distributions. This limitation can be addressed by CD-split (Izbicki et al., 2022), which can generate discontinuous prediction intervals, but may encounter stability issues.
+
+Although these methods are designed for handling one-dimensional output, they can be building blocks for valid prediction regions for multi-dimensional outputs. Bonforonni method (Bonferroni, 1936; Dunn, 1961) is a simple but conservative way to do so. Alternatively, we provide in section 4.2.1 a new method called multi-target conformalized quantile regression (MCQR) that lifts traditional one-dimensional CQR to work for multi-dimensional outputs.
+
+# 4.2.1 MCQR: MULTI-TARGET CONFORMALIZED QUANTILE REGRESSION
+
+As in CQR, we train on $D_{1}$ a pair of lower and upper quantile estimators, $\hat{Q}_j^l$ and $\hat{Q}_j^u$ , for each dimension of the output $\mathbf{y} = (y_1,\dots ,y_q)$ . Given a weight vector $\mathbf{w} = (w_{11},w_{12},\dots ,w_{q1},w_{q2})$ , the choice of which to be discussed later, we define non-conformity of a point $(\mathbf{x},\mathbf{y})$ as:
+
+$$
+s = \max _ {j = 1, \ldots , q} \left\{w _ {j 1} (\hat {Q} _ {j} ^ {l} ({\bf x}) - y _ {j}), w _ {j 2} (y _ {j} - \hat {Q} _ {j} ^ {u} ({\bf x})) \right\},
+$$
+
+Then we set the prediction region to be
+
+$$
+\widehat {C} ^ {\mathrm {M C Q R}} (\mathbf {x} _ {n + 1}) = \left\{\mathbf {y}: \hat {Q} _ {j} ^ {l} (\mathbf {x} _ {n + 1}) - \frac {s _ {1 - \alpha}}{w _ {j 1}} \leq y _ {j} \leq \hat {Q} _ {j} ^ {u} (\mathbf {x} _ {n + 1}) + \frac {s _ {1 - \alpha}}{w _ {j 2}}, j = 1, \ldots , q \right\}.
+$$
+
+For any choice of the weight vector $\mathbf{w} = (w_{11}, w_{12}, \dots, w_{q1}, w_{q2})$ , the MCQR satisfies the marginal coverage guarantee defined in equation 3, which we prove in Appendix A.3.
+
+Finally, since $\widehat{C}^{\mathrm{MCQR}}(\mathbf{x}_{n + 1})$ is a box, its volume is simply
+
+$$
+\operatorname {V o l} \left(\widehat {C} ^ {\mathrm {M C Q R}} \left(\mathbf {x} _ {n + 1}\right)\right) = \prod_ {j = 1} ^ {q} \left[ \hat {Q} _ {j} ^ {u} \left(\mathbf {x} _ {n + 1}\right) - \hat {Q} _ {j} ^ {l} \left(\mathbf {x} _ {n + 1}\right) + \frac {s _ {1 - \alpha}}{w _ {j 2}} + \frac {s _ {1 - \alpha}}{w _ {j 1}} \right].
+$$
+
+Coming back to the problem of how to specify the weight vector $\mathbf{w}$ , one solution is to minimize the average volume of prediction regions in the calibration set, that is
+
+$$
+\hat {\mathbf {w}} = \arg \min _ {\mathbf {w}} \frac {1}{n _ {2}} \sum_ {i \in I _ {2}} \operatorname {V o l} \left(\widehat {C} ^ {\mathrm {M C Q R}} (\mathbf {x} _ {i})\right).
+$$
+
+# 5 EXPERIMENTS
+
+In this section, we systematically compare the performance of the proposed CONTRA and ResCONTRA to that of other conformal prediction methods reviewed in section 4, including PCP, NLE, RCP, MCQR, Dist-split and CQR. The last two were designed for one-dimensional outputs. We employ the Bonferroni approach to produce valid multi-dimensional regions, labeled as $\mathrm{Dist - split}_{\mathrm{bon}}$ and $\mathrm{CQR}_{\mathrm{bon}}$ respectively. Throughout the experiments, the miscoverage rate is set at $\alpha = 0.1$ for each prediction region, hence a nominal coverage rate of $90\%$ .
+
+Experiments are conducted on four synthetic and six real datasets. For each real dataset, input variables $\mathbf{x}$ were standardized before model training. There are many ways to implement CNF, all of which would be compatible with our CONTRA method. Here, we applied RealNVP due to its simplicity and computational efficiency. Specifically, we used 6 to 10 coupling layers for each CNF. Each coupling layer (details in Appendix C) involves two neural networks, each including 2 hidden layers with 512 hidden units and ReLU activation function. Optimization is done with the Adam gradient descent method (Kingma & Ba, 2014) with a learning rate of $1 \times 10^{-3}$ for most of cases. Training epochs are mostly set to be 200. To implement ResCONTRA, we selected support vector regression as the predictive model.
+
+We also studied the impact of underfitting and overfitting on CONTRA regions, as well as the impact of data sizes. Practical guidelines are provided for interesting readers in Appendices E and F.
+
+All models were trained on an A30 GPU with 32 GB of memory. The training time for each CNF varied from 1 to 3 minutes, depending on the datasets and RealNVP structures used.
+
+# 5.1 SYNTHETIC DATA ANALYSIS
+
+We experimented with four setups where $\mathbf{Y}|\mathbf{X} = \mathbf{x}$ are mixture-Gaussian, spiral, moon and ring-shaped, respectively. We present results for the first two cases below while leave the latter two in the Appendix D due to limited space. Data generation details can be found in Appendix B. The sample sizes of the training, calibration and testing sets of the mixture Gaussian and spiral examples are 3375, 1125, and 500, respectively. We further split the training set for ResCONTRA into $60\%$ for a support vector regression model and $40\%$ for the first calibration to train a normalizing flow. For additional simulation studies, see Appendix D.
+
+Table 1 shows the empirical coverage probabilities of each method, averaged over 20 replications, with standard errors in the brackets. Each replication is a different split between the proper training set and the calibration set, while the test set is fixed. All conformal methods achieved the nominal level of 0.9. In both setups, CONTRA and PCP are based on the same CNF and generated the smallest two prediction regions. ResCONTRA delivered comparable results, with discrepancies largely because the "user-chosen". The other methods produced significantly larger regions.
+
+Table 1: Coverage and volume for 2-dimensional $90\%$ conformal regions in two synthetic datasets. Each table entry is the average of results over 20 random splits, with standard error in the parentheses. The method that achieved the smallest volume is in boldface.
+
+
Metric
CONTRA
ResCONTRA
PCP
NLE
RCP
MCQR
Dist-splitbon
CQRbon
Mixt.
Coverage Volume
0.91(0.003)
0.90(0.003)
0.91(0.003)
0.89(0.003)
0.90(0.002)
0.89(0.003)
0.90(0.002)
0.90(0.002)
64.92(1.015)
90.94(1.727)
71.32(0.845)
129.88(10.299)
135.12(12.378)
109.51(0.412)
112.38(0.575)
112.30(0.563)
Spiral
Coverage Volume
0.91(0.003)
0.90(0.003)
0.91(0.002)
0.91(0.003)
0.91(0.002)
0.91(0.003)
0.91(0.003)
0.91(0.002)
23.70(1.622)
41.73(2.275)
23.22(1.154)
68.97(0.917)
68.16(0.943)
64.69(0.199)
65.82(0.157)
65.42(0.202)
+
+
+
+
+
+
+
+
+
+
+
+
+(a)CONTRA
+
+
+(b) ResCONTRA
+
+
+(c) PCP
+Figure 2: Prediction regions of a two-dimensional outcome given a specific $\mathbf{x}$ value from the test set. Colored lines show the boundary of various prediction regions. In the case of PCP, $K = 3000$ disks are shown. Orange points show a random sample of size 2000 from the true conditional distribution of $\mathbf{y}$ given $\mathbf{x}$ .
+
+
+(d) Ellipses
+
+
+(e) Rectangles
+
+Beyond numerical metrics, we visualize and compare these conformal regions. Figure 2 shows the prediction regions at an arbitrarily chosen $\mathbf{x}$ value from the test set. CONTRA, ResCONTRA and PCP construct prediction regions that align well with the true HDRs. The remaining four methods are limited to generating elliptical or rectangular regions, hence contain extensive areas of lower density. Among the top three performers, PCP constructs regions from a union of $K$ circles. While increasing $K$ improves the approximation to the true underlying distribution, it also raises computational
+
+costs and creates more complex boundaries. After all, the synthetic data experiments suggest that the proposed CONTRA and ResCONTRA methods outperforms others. They consistently achieve nominal coverage, capture true conditional density with flexible shapes, and maintain smooth, connected regions for robust inference.
+
+# 5.2 REAL DATA ANALYSIS
+
+We next applied CONTRA, ResCONTRA and competing methods to form prediction regions for six datasets from the public-domain. Each dataset was partitioned into $60\%$ training, $20\%$ calibration, and $20\%$ testing. For ResCONTRA, the $60\%$ training portion was further split into $60\%$ for training and $40\%$ for the first calibration. Summaries of their dimensions and sizes are given in Table 2. The first example has a one-dimensional output, and we check if methods for multi-dimensional output work effectively in this special case. Then, we took on examples with two-dimensional output with various input dimensions and training/calibration set sizes. Finally, we tackled a challenging task of density estimation for a four-dimensional output, a significant hurdle for traditional approaches.
+
+Table 2: Summary of dataset structures in real data experiments.
+
+
Dataset
dim(x)
dim(y)
n1(training)
n2(calibration)
n3(test)
Bio
9
1
3000
1000
1000
Taxi
2
2
3600
1200
1200
Energy
8
2
460
154
154
2D RF
20
2
5403
1801
1801
SCM20D
61
2
3000
1000
1000
4D RF
20
4
5403
1801
1801
+
+Briefly, Bio focuses on the physicochemical properties of protein tertiary structures, derived from CASP 5-9 experiment (Rana, 2013). It includes nine predictors that provide information on the structural and geometric properties of molecules, with the aim of predicting the size of the residue. Taxi contains longitude and latitude details for pick-up and drop-off location in New York for the year 2016. The goal is to predict the (conditional) distribution of the drop-off location given any pick-up location. This is also the example featured in Figure 1. Energy is used to train a predictive model for heating and cooling loads given eight building-related predictors like relative compactness, roof area, surface area and so on (Tsanas & Xifara, 2012). 2D RF and 4D RF are based on the same river flow dataset, which comprises more than one year of hourly flow observations from eight sites within the Mississippi River network (Spyromitros-Xioufis et al., 2016). Twenty observations of river network flows at various sites and past time points are used to predict the flows 48 hours into the future at 2 and 4 sites, respectively. SCM20D contains 5000 records from the 2010 Trading Agent Competition in Supply Chain Management (Spyromitros-Xioufis et al., 2016). The goal is to predict the mean price 20-days into the future.
+
+Table 3: Coverage and volume for multi-dimensional $90\%$ conformal regions in seven real datasets. Each table entry is the average of results over 20 random splits, with standard error in the parentheses. The method that achieved the smallest volume is in boldface.
+
+
Metric
CONTRA
ResCONTRA
PCP
NLE
RCP
MCQR
Dist-splitbon
CQRbon
Bio
Coverage
0.90(0.002)
0.90(0.002)
0.90(0.003)
\
\
\
0.89(0.004)
0.90(0.002)
Volume
13.23(0.383)
12.64(0.178)
12.54(0.072)
\
\
\
13.49(0.132)
12.55(0.076)
Taxi
Coverage
0.89(0.002)
0.89(0.002)
0.89(0.002)
0.90(0.001)
0.90(0.002)
0.89(0.002)
0.90(0.002)
0.91(0.002)
Volume(\( \times 10^{-3} \))
8.71(0.290)
9.06(0.281)
8.95(0.132)
10.77(0.188)
12.21(0.262)
10.86(0.283)
14.65(0.378)
12.41(0.266)
Energy
Coverage
0.87(0.006)
0.87(0.009)
0.88(0.006)
0.86(0.006)
0.85(0.008)
0.84(0.007)
0.84(0.010)
0.87(0.008)
Volume
18.24(1.269)
22.76(4.238)
16.40(0.901)
19.14(1.982)
26.04(2.888)
25.39(2.238)
32.12(2.383)
27.73(2.343)
2D RF
Coverage
0.91(0.002)
0.90(0.002)
0.91(0.002)
0.91(0.002)
0.90(0.002)
0.91(0.001)
0.92(0.001)
0.92(0.002)
Volume
5.29(0.074)
10.34(0.207)
7.19(0.164)
15.50(0.307)
23.85(0.644)
11.92(0.185)
12.14(0.187)
12.30(0.190)
SCM20D
Coverage
0.89(0.001)
0.89(0.003)
0.89(0.002)
0.90(0.002)
0.89(0.002)
0.89(0.002)
0.90(0.003)
0.91(0.002)
Volume(\( \times 10^{4} \))
6.30(0.120)
8.91(0.207)
6.97(0.154)
10.37(0.599)
6.52(0.153)
7.10(0.165)
8.82(0.231)
8.50(0.206)
4D RF
Coverage
0.90(0.003)
0.89(0.002)
0.89(0.003)
0.89(0.002)
0.90(0.002)
0.89(0.002)
0.91(0.001)
0.92(0.002)
Volume(\( \times 10^{2} \))
0.59(0.043)
1.54(0.098)
1.13(0.057)
26.10(4.020)
52.93(11.403)
10.92(0.597)
20.40(1.219)
12.68(0.665)
+
+Table 3 reports the empirical coverage probability and volume of various prediction regions. The coverage rates are generally very accurate around the nominal level 0.9. Slightly lower coverage
+
+rates that range from 0.84 to 0.88 are observed across the different methods for the energy dataset. This is not surprising given the marginal coverage guarantee established for these conformal methods are meant to deliver the nominal coverage when averaged over all possible training and calibration sets. Hence, smaller training and calibration sizes led to a bigger chance of seeing large deviation from the nominal level and relatively low empirical coverage rate out of 20 replications. In addition, for $\mathrm{Dist - split}_{\mathrm{bon}}$ , a reduction in coverage is observed when the dimension of $\mathbf{x}$ is high. For Bio, we see that CONTRA, ResCONTRA and PCP are as good as state-of-the-art methods designed for one-dimensional problems. In multi-dimensional experiments, CONTRA, ResCONTRA and PCP constructed considerably more compact prediction regions than their competitors, with CONTRA keeping the smallest volume with most cases. Overall, the CONTRA-type methods excel in these numerical metrics and offer smoother regions than other top performers, providing a significant advantage.
+
+# 6 SUMMARY AND DISCUSSION
+
+The main contribution of our work is the proposal of a new multi-dimensional conformal prediction method, CONTRA, that allows reliable conditional density estimation. We demonstrated with various examples that CONTRA surpasses other methods in offering compact prediction regions with flexible shapes and smooth boundaries for easy interpretation.
+
+Alongside CONTRA, we introduce two new methods, ResCONTRA and MCQR, catering to users with their own preferred methods. ResCONTRA extends any user-selected point predictors with valid prediction regions. MCQR extends CQR, a popular one-dimensional conformal prediction method, to create prediction boxes that aim for optimal compactness among box-shaped conformal regions.
+
+Note that most conformal prediction methods are intrinsically one-dimensional: points in the calibration set are projected into a line via a properly defined one-dimensional conformal score. An empirical quantile of these scores serves as the threshold on the line, and is projected back to the output space to form prediction regions. Any choice of the projection will lead to marginal coverage guarantee under the exchangeability condition. Quality projections are key to generating desirable prediction regions, which exhibit properties like small volume, minimal disconnected sets, and smooth boundaries that allow robust and interpretable conclusions in real-world applications. CONTRA is an intuitive and effective approach for defining such projections. It leverages NF and CNF that possess latent representations of the output, and project points to a line based on the density of their latent representation with respect to the standard Gaussian. This reduces to using the distance of the latent representation to the origin in the $q$ -dimensional space as the non-conformity score.
+
+One challenge of CONTRA is it requires training a bijection that transforms $q$ -dimensional output to its latent representation. Better trained bijection leads to more compact CONTRA regions. In theory, the ground truth bijection always exists (Bogachev et al., 2005). But in practice, more complex distributions with higher $q$ require more data points and increasingly complicated structures in an NF (or CNF) to learn the true bijection well (Durkan et al., 2019). In the case where data size is small and NF (or CNF) is hard to train, one possible solution is to inspect the latent representations of the training and the calibration points and check their distribution against the standard multivariate Gaussian. Patterns of the deviation such as bias in certain directions, correlation among different directions, asymmetry/skewness, kurtosis and so on could potentially be modeled and utilized to adjust the shape of $\hat{E}$ to maintain 90% empirical coverage and be transformed back to obtain adjusted prediction regions in the output space, all while retaining the coverage guarantee.
+
+The current version of CONTRA uses a Gaussian base distribution for the latent representation. This limits its application to model continuous outcomes. Given the wide application of supervised learning with multi-dimensional discrete or mixed-type outcomes, there is an urgent need to perform uncertainty quantification in these settings by developing effective conformal prediction methods. Since there is a wealth of literature on multi-dimensional classification models as well as one-dimensional conformal methods for discrete outcomes, their confluence has the potential to drive rapid advancements in this direction.
+
+# REFERENCES
+
+Anastasios N, Angelopoulos and Stephen Bates. A gentle introduction to conformal prediction and distribution-free uncertainty quantification. arXiv preprint arXiv:2107.07511, 2021.
+Vladimir Igorevich Bogachev, Aleksandr Viktorovich Kolesnikov, and Kirill Vladimirovich Medvedev. Triangular transformations of measures. Sbornik: Mathematics, 196(3):309, 2005.
+Carlo Bonferroni. Teoria statistica delle classi e calcolo delle probabilita. *Pubblicazioni del R Istituto Superiore di Scienze Economiche e Commerciali di Firenze*, 8:3-62, 1936.
+Ricky TQ Chen, Jens Behrmann, David K Duvenaud, and Jorn-Henrik Jacobsen. Residual flows for invertible generative modeling. Advances in Neural Information Processing Systems, 32, 2019.
+Victor Chernozhukov, Kaspar Wuthrich, and Yinchu Zhu. Distributional conformal prediction. Proceedings of the National Academy of Sciences, 118(48):e2107794118, 2021.
+Nicolo Colombo. Normalizing flows for conformal regression, 2024. URL https://arxiv.org/abs/2406.03346.
+N. Dalmasso, T. Pospisil, A.B. Lee, R. Izbicki, P.E. Freeman, and A.I. Malz. Conditional density estimation tools in python and r with applications to photometric redshifts and likelihood-free cosmological inference. *Astronomy and Computing*, 30:100362, January 2020. ISSN 2213-1337. doi: 10.1016/j.ascom.2019.100362. URL http://dx.doi.org/10.1016/j.ascom.2019.100362.
+Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
+Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. arXiv preprint arXiv:1605.08803, 2016.
+Olive Jean Dunn. Multiple comparisons among means. Journal of the American statistical association, 56(293):52-64, 1961.
+Conor Durkan, Artur Bekasov, Iain Murray, and George Papamakarios. Neural spline flows. Advances in neural information processing systems, 32, 2019.
+Shai Feldman, Stephen Bates, and Yaniv Romano. Calibrated multiple-output quantile regression with representation learning. Journal of Machine Learning Research, 24(24):1-48, 2023.
+Rajarshi Guhaniyogi, Shaan Qamar, and David B Dunson. Bayesian conditional density filtering. arXiv preprint arXiv:1401.3632, 2014.
+Peter Hall and Qiwei Yao. Approximating conditional distribution functions using dimension reduction. The Annals of Statistics, 33(3), June 2005. ISSN 0090-5364. doi: 10.1214/009053604000001282. URL http://dx.doi.org/10.1214/009053604000001282.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Chin-Wei Huang, David Krueger, Alexandre Lacoste, and Aaron Courville. Neural autoregressive flows. In International Conference on Machine Learning, pp. 2078-2087. PMLR, 2018.
+Rafael Izbicki, Gilson Shimizu, and Rafael Stern. Flexible distribution-free conditional predictive bands using density estimators. In Silvia Chiappa and Roberto Calandra (eds.), Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics, volume 108 of Proceedings of Machine Learning Research, pp. 3068-3077. PMLR, 26-28 Aug 2020. URL https://proceedings.mlr.press/v108/izbicki20a.html.
+Rafael Izbicki, Gilson Shimizu, and Rafael B Stern. Cd-split and hpd-split: Efficient conformal regions in high dimensions. Journal of Machine Learning Research, 23(87):1-32, 2022.
+R Munkres James. Topology. Prentic Hall of India Private Limited, New delhi, 2000.
+
+Chancellor Johnstone and Bruce Cox. Conformal uncertainty sets for robust optimization. In *Conformal and Probabilistic Prediction and Applications*, pp. 72-90. PMLR, 2021.
+Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL https://api(semanticscholar.org/CorpusID: 6628106.
+Durk P Kingma and Prafulla Dhariwal. Glow: Generative flow with invertible $1 \times 1$ convolutions. Advances in neural information processing systems, 31, 2018.
+Jing Lei, Alessandro Rinaldo, and Larry Wasserman. A conformal prediction approach to explore functional data. Annals of Mathematics and Artificial Intelligence, 74:29-43, 2015.
+Jing Lei, Max G'Sell, Alessandro Rinaldo, Ryan J Tibshirani, and Larry Wasserman. Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523): 1094-1111, 2018.
+Soundouss Messoudi, Sébastien Destercke, and Sylvain Rousseau. Ellipsoidal conformal inference for multi-target regression. In Conformal and Probabilistic Prediction with Applications, pp. 294-306. PMLR, 2022.
+Harris Papadopoulos, Kostas Proedrou, Volodya Vovk, and Alex Gammerman. 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.
+George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57):1-64, 2021. URL http://jmlr.org/papers/v22/19-1028.html.
+Prashant Rana. Physicochemical Properties of Protein Tertiary Structure. UCI Machine Learning Repository, 2013. DOI: https://doi.org/10.24432/C5QW3H.
+Yaniv Romano, Evan Patterson, and Emmanuel Candes. Conformalized quantile regression. Advances in neural information processing systems, 32, 2019.
+Eleftherios Spyromitros-Xioufis, Grigorios Tsoumakas, William Groves, and Ioannis Vlahavas. Multi-target regression via input space expansion: treating targets as inputs. Machine Learning, 104(1):55-98, February 2016. ISSN 1573-0565. doi: 10.1007/s10994-016-5546-z. URL http://dx.doi.org/10.1007/s10994-016-5546-z.
+Athanasios Tsanas and Angeliki Xifara. Accurate quantitative estimation of energy performance of residential buildings using statistical machine learning tools. Energy and Buildings, 49:560-567, 2012. ISSN 0378-7788. doi: https://doi.org/10.1016/j.enbuild.2012.03.003. URL https://www.sciencedirect.com/science/article/pii/S037877881200151X.
+Vladimir Vovk, Alexander Gammerman, and Glenn Shafer. Algorithmic learning in a random world, volume 29. Springer, 2005.
+Zhendong Wang, Ruijiang Gao, Mingzhang Yin, Mingyuan Zhou, and David M Blei. Probabilistic conformal prediction using conditional random samples. arXiv preprint arXiv:2206.06584, 2022.
+Christina Winkler, Daniel E. Worrall, Emiel Hoogeboom, and Max Welling. Learning likelihoods with conditional normalizing flows. ArXiv, abs/1912.00042, 2019. URL https://api.sementicscholar.org/CorpusID:208527755.
+
+# A PROOF
+
+# A.1 MARGINAL COVERAGE GUARANTEE OF CONTRA
+
+Proposition 2. (A simple Corollary to the marginal coverage theorem of split conformal methods) Suppose the sample points in $D_{2}$ and $(\mathbf{x}_{n + 1},\mathbf{y}_{n + 1})$ are exchangeable. Then for any CNF model $t_{\hat{\theta}}$ , the corresponding conformal ball $\hat{E}$ based on $D_{2}$ satisfies
+
+$$
+\mathbb {P} \left(\mathbf {y} _ {n + 1} \in t _ {\hat {\theta}} (\hat {E}, \mathbf {x} _ {n + 1})\right) \geq 1 - \alpha .
+$$
+
+Further, if $\hat{\mathbf{z}}_i\in \mathcal{Z}_{cal}$ and $\hat{\mathbf{z}}_{n + 1}$ are almost surely distinct, the above probability is bounded above by $1 - \alpha +\frac{1}{n_2 + 1}$ .
+
+Proof. Since $t_{\hat{\theta}}$ is trained by CNF, it is a differentiable bijection. Hence
+
+$$
+\begin{array}{l} \hat {\mathbf {z}} _ {n + 1} \in \hat {E} \Longleftrightarrow t _ {\hat {\theta}} (\hat {\mathbf {z}} _ {n + 1}, \mathbf {x} _ {n + 1}) \in t _ {\hat {\theta}} (\hat {E}, \mathbf {x} _ {n + 1}) \\ \Longleftrightarrow \mathbf {y} _ {n + 1} \in t _ {\hat {\theta}} (\hat {E}, \mathbf {x} _ {n + 1}). \\ \end{array}
+$$
+
+Therefore
+
+$$
+\mathbb {P} [ \mathbf {y} _ {n + 1} \in t _ {\hat {\theta}} (\hat {E}, \mathbf {x} _ {n + 1}) ] = \mathbb {P} [ \hat {\mathbf {z}} _ {n + 1} \in \hat {E} ] \geq 1 - \alpha
+$$
+
+
+
+# A.2 SET BOUNDARIES REMAIN BOUNDARIES UNDER HOMOMORPHISM
+
+The following result is well-known, but we provide a proof to be self-contained. Many background materials can be found in (James, 2000). Let $\mathcal{U}$ and $\mathcal{V}$ be two topological spaces. (They will be played by $\mathcal{Z}$ and $\mathcal{V}$ respectively in CNF.)
+
+Definition 1. A function $t: \mathcal{U} \to \mathcal{V}$ is called a homomorphism if $t$ is bijective and continuous, and $t^{-1}$ is continuous.
+
+Proposition 3. If $t: \mathcal{U} \to \mathcal{V}$ is a homomorphism and $E \subset \mathcal{U}$ , then $t(\partial E) = \partial t(E)$ , where $\partial E$ is the boundary of $E$ .
+
+Proof. The boundary of $E$ in $\mathcal{U}$ can be expressed by $\partial E = \overline{E} \cap \overline{E^c}$ , where $\overline{E}$ denotes the closure of $E$ and $E^c$ denotes the complement of $E$ .
+
+Since $t$ is a homomorphism, we have
+
+$$
+t (\overline {{E}}) = \overline {{t (E)}}, t (E ^ {c}) = (t (E)) ^ {c}.
+$$
+
+Therefore,
+
+$$
+t (\overline {{E ^ {c}}}) = \overline {{t (E ^ {c})}} = \overline {{(t (E)) ^ {c}}}.
+$$
+
+Applying $t$ to the boundary of $E$ , we can obtain
+
+$$
+t (\partial E) = t (\overline {{E}} \cap \overline {{E ^ {c}}}) = t (\overline {{E}}) \cap t (\overline {{E ^ {c}}}) = \overline {{t (E)}} \cap \overline {{(t (E)) ^ {c}}} = \partial t (E).
+$$
+
+Hence, $t(\partial E) = \partial t(E)$ .
+
+# A.3 GUARANTEED COVERAGE PROOF OF MCQR
+
+Proposition 4. Suppose $(\mathbf{x}_i,\mathbf{y}_i)$ , $i = 1,\dots ,n + 1$ , are exchangeable, then the prediction region $\widehat{C}^{MCQR}(\mathbf{x}_{n + 1})$ constructed by the MCQR algorithm satisfies
+
+$$
+\mathbb {P} \left[ \mathbf {y} _ {n + 1} \in \widehat {C} ^ {M C Q R} \left(\mathbf {x} _ {n + 1}\right) \mid \left(\mathbf {x} _ {i}, \mathbf {y} _ {i}\right), i \in I _ {1} \right] \geq 1 - \alpha . \tag {6}
+$$
+
+If the non-conformity scores, $s_i, i = 1, \dots, n + 1$ , are almost surely distinct, then the probability in the left hand side of equation 6 is also bounded above by $1 - \alpha + \frac{1}{n_2 + 1}$ .
+
+Proof. First, we show that $\mathbf{y} \in \widehat{C}^{\mathrm{MCQR}}(\mathbf{x})$ is equivalent to $s \leq s_{1 - \alpha}$ .
+
+$$
+\begin{array}{l} s \leq s _ {1 - \alpha} \\ \Longleftrightarrow \max _ {j = 1, \dots , q} \left\{w _ {j 1} \left(\hat {Q} _ {j} ^ {l} (\mathbf {x}) - y _ {j}\right), w _ {j 2} \left(y _ {j} - \hat {Q} _ {j} ^ {u} (\mathbf {x})\right) \right\} \leq s _ {1 - \alpha} \\ \Longleftrightarrow \left\{\left(\hat {Q} _ {j} ^ {l} (\mathbf {x}) - y _ {j}\right) \leq \frac {s _ {1 - \alpha}}{w _ {j 1}} \wedge \left(y _ {j} - \hat {Q} _ {j} ^ {u} (\mathbf {x})\right) \leq \frac {s _ {1 - \alpha}}{w _ {j 2}} \text {f o r} j = 1, \dots , q \right\} \\ \Longleftrightarrow \left\{\hat {Q} _ {j} ^ {l} (\mathbf {x}) - \frac {s _ {1 - \alpha}}{w _ {j 1}} \leq y _ {j} \leq \hat {Q} _ {j} ^ {u} (\mathbf {x}) + \frac {s _ {1 - \alpha}}{w _ {j 2}} \text {f o r} j = 1, \dots , q \right\}. \\ \end{array}
+$$
+
+Since non-conformity scores $s_i, i \in I_2$ and $s_{n+1}$ are exchangeable. Applying Lemma 1,
+
+$$
+\mathbb {P} \left(s _ {n + 1} \leq s _ {1 - \alpha} \mid \left(\mathbf {x} _ {i}, \mathbf {y} _ {i}\right): i \in I _ {1}\right) \geq 1 - \alpha .
+$$
+
+If calibration residuals $s_i$ and $s_{n+1}$ are almost surely distinct,
+
+$$
+\mathbb {P} \left(s _ {n + 1} \leq s _ {1 - \alpha} \mid \left(\mathbf {x} _ {i}, \mathbf {y} _ {i}\right): i \in I _ {1}\right) \leq 1 - \alpha + \frac {1}{n _ {2} + 1}.
+$$
+
+Taking expectation over $D_{1}$ , the marginal coverage is guaranteed.
+
+
+
+Lemma 1 (Inflation of quantiles, Romano et al. (2019)). Suppose $\mathbf{Z}_1,\ldots ,\mathbf{Z}_{n + 1}$ are exchangeable random variables. For $\alpha \in (0,1)$ ,
+
+$$
+\mathbb {P} \left\{\mathbf {Z} _ {n + 1} \leq \mathbf {Z} _ {(\lceil \alpha (n + 1) \rceil , n)} \right\} \geq \alpha ,
+$$
+
+Where $\mathbf{Z}_{([\alpha(n+1)]',n)}$ is $[\alpha(n+1)]$ smallest value in $\mathbf{Z}_1, \ldots, \mathbf{Z}_n$ , or $\alpha$ -th empirical quantile of $\mathbf{Z}_1, \ldots, \mathbf{Z}_n$ . Moreover, if the random variables $\mathbf{Z}_1, \ldots, \mathbf{Z}_{n+1}$ are almost surely distinct, then also
+
+$$
+\mathbb {P} \left\{\mathbf {Z} _ {n + 1} \leq \mathbf {Z} _ {\left(\lceil \alpha (n + 1) \rceil , n\right)} \right\} \leq \alpha + \frac {1}{n}.
+$$
+
+# B SYNTHETIC DATA STRUCTURE
+
+1. A model with a mixture Gaussian error term.
+
+$$
+\left\{ \begin{array}{l} Y _ {1} = 3 X _ {1} ^ {3} X _ {2} - 5 X _ {2} ^ {2} + 4 X _ {1} X _ {2} - 6 X _ {2} + 7 + \varepsilon_ {1} \\ Y _ {2} = X _ {1} X _ {2} - X _ {2} ^ {3} + 3 X _ {1} X _ {2} ^ {2} + 8 + \varepsilon_ {2} \end{array} \right.,
+$$
+
+where $\mathbf{Y} = [Y_1, Y_2]^T$ , $\mathbf{X} = [X_1, X_2]^T \sim N(\pmb{\mu}, \mathbf{I}_2)$ , $\pmb{\mu} = [-2.0, -1.5]^T$ , and $\pmb{\varepsilon} = [\varepsilon_1, \varepsilon_2]^T \sim 0.3N([0,0]^T, 0.5(\mathbf{I}_2 + \mathbf{J}_2)) + 0.4N([5,5]^T, 1.5(\mathbf{I}_2 - \mathbf{J}_2)) + 0.3N([10,0]^T, \mathbf{I}_2)$ , $\mathbf{J}_2$ is a 2 by 2 matrix with all elements equal to one.
+
+2. A model with a spiral curve error term.
+
+$$
+\left\{ \begin{array}{l} Y _ {1} = 2 X _ {1} ^ {3} - 3 X _ {2} ^ {2} + 5 X _ {2} + X _ {1} X _ {2} + \varepsilon_ {1} \\ Y _ {2} = X _ {1} ^ {2} X _ {2} - 4 X _ {2} ^ {2} + 3 X _ {1} ^ {2} X _ {2} + 7 + \varepsilon_ {2} \end{array} \right.,
+$$
+
+where $\mathbf{X}$ has the same structure as in Model 1; $\varepsilon_{1} \sim N(\theta \cos(\theta), 0.2^{2}), \varepsilon_{2} \sim N(\theta \sin(\theta), 0.1^{2})$ , where $\theta \in (0, 2\pi)$ .
+
+3. A model with a moon curve error term. The specification of $\mathbf{Y}$ and $\mathbf{X}$ are the same as the previous setup. And the error term follows a moon-shaped distribution, $\varepsilon_{1} \sim N(cos(\theta), 0.1^{2}), \varepsilon_{2} \sim N(sin(\theta), 0.1^{2}), \theta \in (0, \pi)$ .
+4. A model with a ring error term. The specification of $\mathbf{Y}$ and $\mathbf{X}$ are the same as the previous setup, $\varepsilon_{1} = r\cos (\theta)$ , $\varepsilon_{2} = r\sin (\theta)$ , where $r^2\sim U(r_{\mathrm{inner}}^2,r_{\mathrm{out}}^2)$ , $\theta \sim U(0,2\pi)$ .
+
+# C COUPLING LAYER
+
+For a vector $\mathbf{y} \in \mathbb{R}^q$ , partition $\mathbf{y}$ into two subspaces: $(\mathbf{y}_{I_1}, \mathbf{y}_{I_2}) \in \mathbb{R}^{q_1} \times \mathbb{R}^{q - q_1}$ and a bijection function $g(\cdot): \mathbb{R}^{q - q_1} \to \mathbb{R}^{q - q_1}$ . Define
+
+$$
+\left\{ \begin{array}{l} \mathbf {z} _ {I _ {1}} = \mathbf {y} _ {I _ {1}} \\ \mathbf {z} _ {I _ {2}} = g (\mathbf {y} _ {I _ {2}}; m (\mathbf {y} _ {I _ {1}}, \mathbf {x})) \end{array} \right.,
+$$
+
+In particular, let $g(\mathbf{y}_{I_2}; m(\mathbf{y}_{I_1}, \mathbf{x})) = \mathbf{y}_{I_2} \odot \exp(u(\mathbf{y}_{I_1}, \mathbf{x})) + v(\mathbf{y}_{I_1}, \mathbf{x})$ (Winkler et al., 2019), then the determinant of Jacobian is $\exp\left(\sum_{j=1}^{q-q_1} u(\mathbf{y}_{I_1}, \mathbf{x})_j\right)$ .
+
+The transformation $t$ is composed by multiple coupling layers. To prevent the composition of two consecutive coupling layers from reducing to the identity function, we can switch the roles of the two subsets (Dinh et al., 2016). For instance, consider a scenario where we aim to transform $\mathbf{y}$ into $\mathbf{z}$ via $\mathbf{w}$ . In this case, we have:
+
+① $\left\{ \begin{array}{l} \mathbf{w}_{I_1} = \mathbf{y}_{I_1} \\ \mathbf{w}_{I_2} = g^{(1)}(\mathbf{y}_{I_2}; m(\mathbf{y}_{I_1}, \mathbf{x})) \end{array} \right.$
+
+② $\left\{ \begin{array}{l} \mathbf{z}_{I_1} = g^{(2)}(\mathbf{w}_{I_1}; m(\mathbf{w}_{I_2}, \mathbf{x})) \\ \mathbf{z}_{I_2} = \mathbf{w}_{I_2} \end{array} \right.$
+
+# D ADDITIONAL SIMULATION STUDIES
+
+Table 4: Coverage and volume for 2-dimensional $90\%$ conformal regions in two synthetic datasets. Each table entry is the average of results over 20 random splits, with standard error in the parentheses. The method that achieved the smallest volume is in boldface.
+
+
Metric
CONTRA
ResCONTRA
PCP
NLE
RCP
MCQR
Dist-splitbon
CQRbon
Moon
Coverage
0.91(0.002)
0.90(0.003)
0.91(0.003)
0.91(0.003)
0.91(0.003)
0.90(0.003)
0.91(0.003)
0.91(0.003)
Volume
1.56(0.020)
2.65(0.062)
1.66(0.015)
3.32(0.040)
3.28(0.037)
2.50(0.014)
2.63(0.012)
2.62(0.013)
Ring
Coverage
0.90(0.004)
0.91(0.002)
0.90(0.002)
0.91(0.003)
0.91(0.003)
0.89(0.004)
0.89(0.003)
0.89(0.003)
Volume (×102)
3.00(0.217)
4.57(0.405)
1.97(0.030)
5.53(0.875)
6.14(1.537)
5.17(0.009)
5.19(0.010)
5.19(0.009)
+
+
+
+
+
+
+
+
+
+
+
+
+(a)CONTRA
+
+
+(b) ResCONTRA
+
+
+(c) PCP
+Figure 3: Prediction regions of a two-dimensional outcome given a specific $\mathbf{x}$ value from the test set. Colored lines show the boundary of various prediction regions. In the case of PCP, $K = 3000$ disks are shown. Orange points show a random sample of size 2000 from the true conditional distribution of $\mathbf{y}$ given $\mathbf{x}$ .
+
+
+(d) Ellipse
+
+
+(e) Rectangle
+
+# E THE IMPACT OF UNDERFITTING AND OVERFITTING ON CONTRA
+
+Using a Normalizing Flow model that is either too complex or too simple can result in conformal regions that are overly sensitive or excessively large. A straightforward guideline to mitigate these overfitting and underfitting issues is to evaluate how closely the latent variables $\mathbf{z}$ from the calibration
+
+
+(a) Over-dispersed
+
+
+(b) Under-dispersed
+
+
+(c) Nearly Gaussian
+
+
+(d) Underfitting
+
+
+(e) Overfitting
+Figure 4: CONTRA prediction regions and latent $\mathbf{z}$ for the calibration set under three different NF models, for drop-off location given a specific pickup coordinate (blue pin) for the NYC taxi data. Data size equals 4800, with a $75\% -25\%$ training-calibration split. (a) and (d): An underfitting NF with 2 coupling layers and 16 hidden units per layer, trained for 50 epochs in 4 seconds. (b) and (e): An overfitting NF with 16 coupling layers and 1024 hidden units, trained for 500 epochs in 205 seconds. (c) and (f): A regular fitting NF with 6 coupling layers and 256 hidden units, trained for 200 epochs in 17 seconds.
+
+
+(f) Regular fitting
+
+set resemble a random sample from the standard Gaussian. The top row of Figure 4 provides a visual check for bias, overdispersion, or underdispersion, from which users can tell that the trained model corresponding to the rightmost picture had the best out-of-sample performance among the three, and would be the best choice for constructing CONTRA regions. This is confirmed in the bottom row of Figure 4. In addition to the visual check, classical metrics can be used to quantify the deviation between the z sample and the standard Gaussian, aiding in model tuning.
+
+# F IMPACT OF DATA SIZE ON CONTRA AND ITS MAIN COMPETITOR
+
+
+
+
+(a) $(n_{1},n_{2}) = (225,75)$
+Figure 5: The impact of data size on prediction regions of drop-off location given a specific pickup coordinate (blue pin) for the NYC taxi data. The top row shows results of our proposed CONTRA method; the bottom row shows results of ST-DQR based on a diffusion model. Data sizes used for each column are 300, 1200, and 4800, respectively, with a $75\% - 25\%$ training-calibration split.
+
+
+
+
+(b) $(n_{1}, n_{2}) = (900, 300)$
+
+
+
+
+(c) $(n_{1},n_{2}) = (3600,1200)$
+
+We examined the performance of CONTRA and the ST-DQR based on the diffusion model across various sample sizes, with a particular focus on smaller sample sizes that pose challenges for both NF and diffusion model training. The resulting prediction regions for both methods were consistent with
+
+expectations and appeared reasonable. As the sample size increased from very small to moderate, uncertainty decreased, leading to smaller prediction regions. However, as the sample size continued to grow, the prediction region stabilized, remaining approximately the same size, which correctly reflects the inherent uncertainty in predicting outcomes for new subjects.
+
+# G A COMPARISON BETWEEN CONTRA AND RESCONTRA
+
+This section compares the two proposed methods, CONTRA and ResCONTRA. We use empirical examples to confirm the following heuristics: When NF is effective at learning $\mathbf{y}|\mathbf{x}$ , the one-step CONTRA method generally outperforms the two-step ResCONTRA due to its larger training set. Whereas when the relationship between $\mathbf{y}$ and $\mathbf{x}$ , such as $\mathbb{E}(\mathbf{y}|\mathbf{x}) = f(\mathbf{x})$ , is highly complex but the residual $\mathbf{y} - f(\mathbf{x})$ follows a relatively simple distribution, ResCONTRA tends to provide better prediction regions. This is because ResCONTRA divides the original training data into two subsets. One subset is used to train an estimator for $f(\mathbf{x})$ , using any preferred method that specializes for this task of point estimation. The second subset is then used to model the distribution of the residual using a relatively simple NF.
+
+Above, we provided a general guideline for choosing between CONTRA and ResCONTRA. In practice, users don't need to decide in advance. They can try both methods and use the method that lead to the prediction region that better suits their needs.
+
+
+
+
+(a)CONTRA
+
+
+
+
+(b) Res-SVR-10
+
+
+
+
+(c) Res-SVR-6
+Figure 6: Comparing CONTRA to ResCONTRA in terms of the latent variable, $\mathbf{z}$ , of the calibration set on two different datasets. Plots of $\mathbf{z}$ that closely resemble the standard bivariate Gaussian distribution result in smaller calibrated radii, $r.9$ , and better conformal prediction regions. Five conformal prediction methods are implemented: (a) CONTRA with a 10-layer NF; (b) and (c) ResCONTRA with SVR followed by 10- and 6-layer NFs, respectively; (d) and (e) ResCONTRA with XGBoost followed by 10- and 6-layer NFs, respectively. For CONTRA, the sizes for training, calibration, and testing are (3375, 1125, 500). For ResCONTRA, the training set was further split into $60\%$ to train a point estimator and $40\%$ to train a NF.
+
+
+
+
+(d) Res-XGB-10
+
+
+
+
+(e) Res-XGB-6
+
+
CONTRA
SVR-10
SVR-6
XGB-10
XGB-6
Mixture-Gaussian (%)
0.71
2.67
1.69
2.67
3.38
Multiplicative Gaussian (%)
1.24
0.27
0.09
0.00
0.00
+
+Table 5: The percentage of points out of the $[-7.5, 7.5] \times [-7.5, 7.5]$ range.
+
+For illustration, we apply CONTRA and four different implementations of ResCONTRA to two examples. The first example is the same mixture-Gaussian example in Section 5.1. And the second example specifies a more complex relationship between $\mathbf{y}$ and $\mathbf{x}$ , described in equation 7. For each method that learns the conditional distribution of $\mathbf{y}$ given $\mathbf{x}$ , we examine values of the latent variable, $\mathbf{z}$ , of the calibration set. Remembrance of the distribution of $\mathbf{z}$ to the bivariate standard normal indicates good out-of-sample learning of the distribution of $\mathbf{y}|\mathbf{x}$ . Figure 6 displays the values of $\mathbf{z}$ for the two examples in the top and bottom rows, respectively. All 10 plots show the $[-7.5, 7.5] \times [-7.5, 7.5]$ region of the latent space, while Table 5 shows the proportions of $\mathbf{z}$ falling outside the shown range. Overlaying on each plot is the theoretical $90\%$ highest density region of the bivariate standard Gaussian
+
+(in green) and the smallest circle centered at the origin that contains $90\%$ of the $\hat{\mathbf{z}}$ of the calibration set, with radius denoted by $r$ . From the first row of Figure 6 and Table 5, we can see that CONTRA (a) is the best performer for the example with relatively simple model and more complicated error; and from the second row, we can see that ResCONTRA methods, especially (c) and (e) that combine tools specialized for point estimation and relatively simple NF for the residuals, are the best performers to capture the complex relationship between $\mathbf{y}$ and $\mathbf{x}$ while providing small $r$ that leads to small conformal regions.
+
+# Details of the relatively complex dataset.
+
+This is the dataset that corresponds to the results in the bottom row of Figure 6 and Table 5.
+
+$$
+\left\{ \begin{array}{l} Y _ {1} = 2 X _ {1} ^ {2} e _ {1} e _ {2} - 3 X _ {2} + 0. 5 X _ {3} ^ {3} + X _ {4} X _ {5} e _ {2} - 1. 5 X _ {6} ^ {2} + 0. 7 X _ {7} X _ {8} ^ {2} - 0. 3 X _ {9} e _ {1} + \sin (X _ {1 0}) + 5 \\ Y _ {2} = - X _ {1} ^ {3} + 4 X _ {2} ^ {2} - X _ {3} X _ {4} e _ {2} + 0. 8 X _ {5} ^ {2} - 2 X _ {6} X _ {7} e _ {1} e _ {2} + 0. 6 X _ {8} - 1. 2 X _ {9} ^ {3} e _ {1} ^ {2} + \cos (X _ {1 0}) + 7 \end{array} \right., \tag {7}
+$$
+
+where $\mathbf{Y} = [Y_1, Y_2]^T$ , $\mathbf{X} \sim N(\pmb{\mu}, \mathbf{I}_{10})$ , $\pmb{\mu}$ is a 10-dimensional mean vector with each component independently drawn from the Uniform[-10, 10] distribution, and $\pmb{\varepsilon} = [\varepsilon_1, \varepsilon_2]^T \sim N(\mathbf{0}, \mathbf{I}_2)$ .
+
+# H AGREEMENT BETWEEN CONTRA PREDICTION REGIONS AND HPDS
+
+
+(a) Mixt. Gaussian
+
+
+(b) Moon
+
+
+(c) Gamma
+Figure 7: CONTRA conformal regions of the output variable $\mathbf{y}$ given some fixed $\mathbf{x}$ value for five setups with coverage levels $50\%$ , $70\%$ and $90\%$ , respectively. The orange points are random samples of size 2000 from each of the true conditional distribution of $\mathbf{y}$ given $\mathbf{x}$ . We can see the CONTRA regions of various levels properly capture the high-density regions in each case.
+
+
+(d) Ring
+
+
+(e) Spiral
\ No newline at end of file
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/images.zip b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..09ff9bbe8a3a2adbb4860be83c44b6fd24f48edc
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2a7fd7170f8c02aea0837904b62337e6a41b40c44ae7353acd891a74a31e1332
+size 959508
diff --git a/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/layout.json b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..747f3a2879a1a24d6afe38230e9992cde1a16120
--- /dev/null
+++ b/ICLR/2025/CONTRA_ Conformal Prediction Region via Normalizing Flow Transformation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85d9724a0c0cac108f69d7f89bed92c7ea608c9b99acbda138b03ea40d92a1f9
+size 858831
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_content_list.json b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..e195d49caaf9069e43f772b624eef5d84db4a1a7
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e1f336e515faee008a13093b13042a5c703781090a7f9fde02f14c85477edce0
+size 117465
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_model.json b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..fd52442667c4065e95401efdc54f7a87180a3744
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0adf318e68a71b53b15e303a19a2cc34bd5079f0fa3674256f3ff5a745f82bec
+size 143226
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_origin.pdf b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..6efc329a637786f509cde458f0f96535d226df7d
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/7165a0ba-0d32-48fc-a68a-603caaf8e9a0_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3d3c1e591bb9b0e14174af8b49eae3819d40cb3a2ccf6c092616bc66ab0114a3
+size 19279424
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/full.md b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..75924c77a4bd7308590fbe0338f30afbbe61ec65
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/full.md
@@ -0,0 +1,497 @@
+# CPSAMPLE: CLASSIFIER PROTECTED SAMPLING FOR GUARDING TRAINING DATA DURING DIFFUSION
+
+Joshua Kazdan $^{1}$ , Hao Sun $^{2}$ , Jiaqi Han $^{2}$ , Felix Petersen $^{2}$ , Frederick Vu $^{3}$ , Stefano Ermon $^{2}$
+
+$^{1}$ Department of Statistics, Stanford University
+$^{2}$ Department of Computer Science, Stanford University
+$^{3}$ Department of Mathematics, UCLA
+
+# ABSTRACT
+
+Diffusion models have a tendency to exactly replicate their training data, especially when trained on small datasets. Most prior work has sought to mitigate this problem by imposing differential privacy constraints or masking parts of the training data, resulting in a notable substantial decrease in image quality. We present CPSample, a method that modifies the sampling process to prevent training data replication while preserving image quality. CPSample utilizes a classifier that is trained to overfit on random binary labels attached to the training data. CPSample then uses classifier guidance to steer the generation process away from the set of points that can be classified with high certainty, a set that includes the training data. CPSample achieves FID scores of 4.97 and 2.97 on CIFAR-10 and CelebA-64, respectively, without producing exact replicates of the training data. Unlike prior methods intended to guard the training images, CPSample only requires training a classifier rather than retraining a diffusion model, which is computationally cheaper. Moreover, our technique provides diffusion models with greater robustness against membership inference attacks, wherein an adversary attempts to discern which images were in the model's training dataset. We show that CPSample behaves like a built-in rejection sampler, and we demonstrate its capabilities to prevent mode collapse in Stable Diffusion.
+
+# 1 INTRODUCTION
+
+Diffusion models are an emerging method of image generation that have surpassed GANs on many common benchmarks (Dhariwal & Nichol, 2021), achieving state-of-the-art FID scores on CIFAR-10 (Krizhevsky, 2009), CelebA (Liu et al., 2015), ImageNet (Deng et al., 2009), and other touchstone datasets. Although their capabilities are impressive, diffusion models still suffer from the tendency to exactly replicate images found in their training sets (Carlini et al., 2021; Jagielski et al., 2023; Somepalli et al., 2023a). This problem is especially pronounced when the training set contains duplicates (Webster et al., 2023). Given that diffusion models are sometimes trained on sensitive content, such as patient data (Kazerouni et al., 2023; Pinaya et al., 2022) or copyrighted data (Dhariwal & Nichol, 2021), this behavior is generally unacceptable. Indeed, Google, Midjourney, and Stability AI are already facing lawsuits for using copyrighted data to train image generation models (Brittain, 2023; 2024), some of which exactly replicate images from their training data during inference (Marcus & Southen, 2024).
+
+The strongest formal guarantee against replicating or revealing training data is differential privacy (DP) (Dwork & Roth, 2014). Unfortunately, differential privacy is at odds with generation quality. Although differentially private training has been implemented for GANs (DP-GAN) (Xie et al., 2018), diffusion models (DPDM, DP-Diffusion) (Dockhorn et al., 2023; Ghalebikesabi et al., 2023), and latent diffusion models (DP-LDM) (Lyu et al., 2024), it typically results in significant degradation of image quality. Moreover, one cannot easily make a pretrained model differentially private, implying that to achieve differential privacy, one must retrain from scratch. This makes negotiating the trade-off between privacy and quality challenging, as trying different levels of privacy requires retraining. Due to the difficulty of achieving differential privacy while simultaneously maintaining quality, some researchers have pursued more attainable model characteristics that have
+
+the same flavor as differential privacy. A frequent benchmark for privacy is robustness to membership inference attacks (Hu & Pang, 2023), whereby the attacker aims to infer whether a given image was used to train the model. Although researchers have devised a multitude of loss and likelihood-based membership inference attacks, so far, there are few existing methods that explicitly aim to defend against these attacks besides differential privacy and data augmentation (Matsumoto et al., 2023b; Pang et al., 2023). A second privacy benchmark measures the cosine similarity in a feature space of a generated image to its nearest neighbor in the training data (Daras et al., 2024; Douze et al., 2024). Ambient diffusion (Daras et al., 2024) is one method to prevent excessive similarity to the training data without enforcing differential privacy; however, ambient diffusion still has notable negative effects on FID scores.
+
+Until recently, preventing image replication by diffusion models has involved various forms of data corruption during training, either by adding noise to gradients (Abadi et al., 2016), diversifying images and captions (Somepalli et al., 2023b), or corrupting the images themselves (Daras et al., 2024). Hyperparameter tuning for these methods requires retraining, making it difficult to calibrate them to the necessary level of privacy. Simple alternatives, like rejection sampling, are effective because they can guarantee that the training images will not be exactly replicated. However, standard rejection sampling has major drawbacks, too. For instance, rejection sampling redistributes probability mass in an inefficient way and requires resampling, which can decrease speed. In extreme cases of mode collapse such as those uncovered by Webster (2023), Stable Diffusion must be queried dozens or even hundreds of times before producing an original image, making rejection sampling impractical. Rejection sampling is also prone to membership inference attacks and privacy leakages (Awan & Rao, 2023).
+
+
+
+
+
+
+
+
+Figure 1: Generated image and most similar training image pairs for DDIM sampling (left) and CPSample with $\alpha = 0.001$ , $s = 1000$ (right). We sample 100 images and display the four with the highest similarity to their nearest neighbors in the training data.
+
+
+
+
+
+
+
+
+
+We present classifier-protected sampling (CPSample), a diffusion-specific data protection technique that, while not strictly differentially private, fortifies against some membership inference attacks and greatly reduces excessive similarity between the training and generated data. CPSample is computationally more efficient than existing training-based methods of improving privacy for diffusion models. The basic idea is to overfit a classifier on random binary labels assigned to the training data and use this classifier during sampling to guide the images away from the training data. We show that our method has an effect similar to rejection sampling while removing or reducing the need to resample. Unlike rejection sampling, CPSample offers protection against some membership inference attacks during the generation process rather than only protecting the end product. CPSample achieves SOTA image quality, improving over previous data protection methods, such as ambient diffusion, DPDMs, and PAC Privacy Preserving Diffusion Models (Xu et al., 2023) for similar levels of "privacy." Unlike most other methods designed to shield the training data, one can simply adjust the level of protection provided by CPSample without retraining the classifier used for guidance. CPSample is applicable to existing image models without any expensive retraining of the diffusion models. We summarize the primary contributions of our work as follows:
+
+- In Section 3.1, we introduce CPSample, a novel method of classifier-guidance for privacy protection in diffusion models that can be applied to existing models without retraining.
+- We show theoretically in Section 3.2 and empirically in Section 4.1 that CPSample prevents training data replication in unguided diffusion. We also provide evidence in Section 4.2 that CPSample can protect text-based image generation models, like Stable Diffusion.
+
+- We give empirical evidence that CPSample can foil some membership inference attacks in Section 4.3.
+- We demonstrate in Section 4.4 that CPSample attains better FID scores than existing methods of privacy protection while still eliminating replication of the training data.
+
+# 2 BACKGROUND AND RELATED WORK
+
+# 2.1 DIFFUSION MODELS
+
+We begin with a review of diffusion models. Denoising diffusion probabilistic models (DDPMs) (Sohl-Dickstein et al., 2015; Ho et al., 2020) gradually add Gaussian noise to image data during the "forward" process. Meanwhile, one trains a "denoiser" to predict the original image from the corrupted samples in a so-called "backward" process. During the forward process, one assigns
+
+$$
+x _ {t} = \sqrt {\alpha_ {t}} x _ {0} + \sqrt {1 - \alpha_ {t}} \epsilon \tag {2.1}
+$$
+
+where $\epsilon \sim \mathcal{N}(0, I)$ , $x_0$ is the original image, and $\alpha_t$ indicates the noise schedule. The variable $t \in \{0, \dots, T\}$ specifies the step of the forward process, where $x_0$ represents an image in the training data. When $\alpha_T$ is set sufficiently close to 0, $x_T$ is approximately drawn from a standard normal distribution. During intermediate steps, the distribution of $x_t$ is
+
+$$
+q \left(x _ {t} \mid x _ {0}\right) = \mathcal {N} \left(x _ {t}; \sqrt {\alpha_ {t}} x _ {0}, (1 - \alpha_ {t}) I\right). \tag {2.2}
+$$
+
+During training, one performs gradient descent on $\theta$ to minimize the score-matching loss, given by
+
+$$
+\mathbb {E} _ {\epsilon \sim \mathcal {N} (0, 1), x _ {0} \sim \mathcal {D}} \left[ \sum_ {t = 1} ^ {T} \frac {1}{2 \sigma_ {t} ^ {2}} \| \epsilon - \epsilon_ {\theta} \left(\sqrt {\bar {\alpha} _ {t}} x _ {0} + \sqrt {1 - \bar {\alpha} _ {t}} \epsilon , t\right) \| ^ {2} \right]. \tag {2.3}
+$$
+
+Here, $\mathcal{D}$ is the target distribution, which is approximated by sampling from the training data. Finally, to generate a new image, one samples standard Gaussian noise $x_{T} \sim \mathcal{N}(0, I)$ . Then, one gradually denoises $x_{T}$ by letting
+
+$$
+x _ {t - 1} = \frac {1}{\sqrt {\alpha_ {t}}} \left(x _ {t} - \frac {1 - \alpha_ {t}}{\sqrt {1 - \bar {\alpha} _ {t}}} \epsilon_ {\theta} (x _ {t}, t)\right) + \sigma_ {t} z _ {t}, \tag {2.4}
+$$
+
+where in each step, one has $z_{t} \sim \mathcal{N}(0, I)$ , and $\sigma_{t}$ and $\alpha_{t}$ are scalar functions determined by the noise schedule that govern the rate of the backward diffusion process.
+
+Despite the superior image quality afforded by DDPMs, the sampling process sometimes involves 1000 or more steps, which has led to a variety of sampling schemes and distillation methods for speeding up inference (Song et al., 2021; Kim et al., 2024; Song et al., 2023; Gu et al., 2023). One of the most commonly used modifications to the sampling process is denoising diffusion implicit models (DDIMs), which enable skipping steps in the backward process.
+
+Currently, the state-of-the-art for guided generation is achieved by models with classifier-free guidance (Ho & Salimans, 2022). However, since CPSample employs a classifier to prevent replication of its training data, it is more useful for us to review its predecessor, classifier-guided diffusion (Lim et al., 2023; Dhariwal & Nichol, 2021). In classifier guided diffusion, a pretrained classifier $p_{\phi}(y \mid x_t, t)$ assigns a probability to the event that $x_t = \sqrt{\alpha_t} x_0 + \sqrt{1 - \alpha_t} \epsilon$ for some $x_0$ with label $y$ . The sampling process for classifier-guided DDIM is modified by
+
+$$
+\hat {\epsilon} _ {t} = \epsilon_ {\theta} (x _ {t}) - \sqrt {1 - \bar {\alpha} _ {t}} \nabla_ {x _ {t}} \log p _ {\phi} (y \mid x _ {t}, t) \tag {2.5}
+$$
+
+$$
+x _ {t - 1} = \sqrt {\overline {{\alpha}} _ {t - 1}} \left(\frac {x _ {t} - \sqrt {1 - \overline {{\alpha}} _ {t}} \hat {\epsilon} _ {t}}{\sqrt {\overline {{\alpha}} _ {t}}}\right) + \sqrt {1 - \overline {{\alpha}} _ {t}} \hat {\epsilon} _ {t}. \tag {2.6}
+$$
+
+Such a modification of the sampling procedure corresponds to sampling $x_{t}$ from the joint distribution:
+
+$$
+p _ {\theta , \phi} \left(x _ {t}, y \mid x _ {t + 1}, t\right) = Z p _ {\theta} \left(x _ {t} \mid x _ {t + 1}, t\right) p _ {\phi} (y \mid x _ {t}, t) \tag {2.7}
+$$
+
+where $Z$ is a normalization constant. This formulation can be adapted for continuous-time models, but for discrete-time models, additional care must be taken to ensure accuracy (see Appendix A for additional details).
+
+# 2.2 PRIVACY IN DIFFUSION MODELS
+
+Differential privacy (DP) is generally considered to be the gold standard for protecting sensitive data. The formal definition of $(\varepsilon -\delta)$ differential privacy is as follows (Dwork et al., 2006; Dwork & Roth, 2014):
+
+Definition 2.1 $((\varepsilon - \delta)$ -Differential privacy). Let $\mathcal{A}$ be a randomized algorithm that takes a dataset as input and has its output in $\mathcal{X}$ . If $D_{1}$ and $D_{2}$ are datasets with symmetric difference 1, then $\mathcal{A}$ is $\varepsilon$ - $\delta$ differentially private if for all $S \subset \mathcal{X}$ ,
+
+$$
+\mathbb {P} \left(\mathcal {A} \left(D _ {1}\right) \in S\right) \leq \mathbb {P} \left(\mathcal {A} \left(D _ {2}\right) \in S\right) e ^ {\varepsilon} + \delta . \tag {2.8}
+$$
+
+DP ensures that the removal or addition of a single data point to the dataset does not significantly affect the outcome of the algorithm, thus protecting the identity of individuals within the dataset. Existing DP diffusion models (Dockhorn et al., 2023; Ghalebikesabi et al., 2023; Lyu et al., 2024) achieve DP through DP stochastic gradient descent (DP-SGD) (Abadi et al., 2016), in which Gaussian noise is added to the gradients during training.
+
+Though DP offers a formal guarantee that one's data is secure, imposing a DP constraint in practice severely compromises the quality of the synthetic images. Therefore, researchers have largely resorted to demonstrating that models exhibit various relaxations of strict DP (Vyas et al., 2023), such as Probably Approximately Correct DP (PAC-DP) (Xiao & Devadas, 2023) or other empirical metrics of privacy.
+
+One common approach is to measure the similarity between a generated image and its nearest neighbors in the training dataset with the aim of minimizing the number of highly similar neighbors (Daras et al., 2022; 2024). Typically, similarity is quantified using either Euclidean distance or cosine similarity, which is given by
+
+$$
+\frac {x ^ {T} \cdot \mathrm {C} (x)}{\| x \| \cdot \| \mathrm {C} (x) \|}, \tag {2.9}
+$$
+
+with $\mathrm{C}(x)$ denoting the nearest neighbor of $x$ among the training data, and which is typically computed in a feature space rather than the raw pixel space (Nguyen & Bai, 2011; Xia et al., 2015). Tools have been developed to help compute nearest neighbors efficiently, since naive pairwise comparisons are too computationally expensive. In 2023, MetaAI developed the FAISS library for efficient similarity search using neural networks (Douze et al., 2024), making this type of privacy metric possible to compute approximately in a reasonable amount of time. Empirically, for CIFAR-10, we observed that images with similarity scores above 0.97 were nearly identical, whereas for CelebA, the threshold was approximately 0.95, and for LSUN Church, images with similarity above 0.90 were sometimes, though not always, nearly identical.
+
+Ambient diffusion reduces similarity to the nearest neighbor by masking pixels during training and only scoring the model based on the visible pixels. In this way, the model never has access to a full, uncorrupted image and is therefore less likely to replicate full images (Daras et al., 2024). The downside is that masking pixels, even at the relatively modest rate of $20\%$ , leads to notable image quality degradation as measured via the FID score. Moreover, ambient diffusion shifts the entire distribution of similarity scores towards lower similarity, whereas we should ideally prevent the generation of images with high similarity to the training data while leaving the rest of the distribution untouched.
+
+Until recently, all attempts at enforcing privacy for diffusion models occurred during training. In 2023, Xu et al. (2023) developed a method of classifier-guided sampling (PACPD) that has PAC privacy advantages over standard denoising. For text-guided models, Somepalli et al. (2023b) developed a method of randomly changing influential input tokens to avoid exact memorization, and Wen et al. (2024) protected training data using a regularization technique on the classifier-free guidance network during training. Golatkar et al. (2024) used a mixture of public and private images to prevent copyright infringement, and Golatkar et al. (2023) developed "compositional diffusion models" to customize data access across different groups. Recently, Chen et al. (2024) devised a guidance method (AMG) which calculates similarity metrics at each step in the denoising schedule in order to guide the sampling process away from similar data points in the training corpus. By utilizing similarity metrics directly, they were able to effectively eliminate memorization in both text-conditional and unconditional diffusion models. Though theoretically valuable, the need to have access to the training data or at least to embeddings of the training data points- and to compute similarity measures at runtime is impractical for use outside of a research environment.
+
+# 2.3 MEMBERSHIP INFERENCE ATTACKS
+
+A third privacy measurement comes from membership inference attacks (Dubinski et al., 2024; Pang & Wang, 2023; Duan et al., 2023; Wu et al., 2022), whereby one tries to discern whether a given data point was a member of the training set for the model. Robustness to membership inference attacks is implied by differential privacy. Membership inference attacks against diffusion models usually hinge on observed differences in reconstruction loss or likelihood that come from overfitting. In this paper, we will use a slight modification of the membership inference attack from Matsumoto et al. (2023a) as described in Algorithm 1 in Appendix E.
+
+# 3 PROTECTING PRIVACY DURING SAMPLING
+
+In this section, we address the problem of training data replication in diffusion models, which poses significant privacy risks. One common solution to this problem is rejection sampling, whereby samples that closely resemble training data are discarded. However, rejection sampling has several shortcomings: it is computationally expensive and inefficient, and it only provides protection in the final output, not during the sampling process itself. Moreover, in extreme cases of mode collapse, one may need to generate dozens of images before generating original content when using rejection sampling.
+
+To overcome these limitations, we introduce CPSample, a method that reproduces some of the benefits of rejection sampling without the need for resampling. CPSample integrates classifier guidance into the sampling process to steer the generation away from the training data. We overfit a classifier on random binary labels assigned to the training data and use this classifier during sampling to adjust the generated images, thereby reducing the likelihood of replicating training data while preserving image quality.
+
+# 3.1 SAMPLING METHOD
+
+The first step in CPSample is to train a network that can provide information about how likely a sample $x_{t}$ is to turn into a member of the training data at the end of the denoising process. For this task, we use a classifier trained to memorize random binary labels assigned to the training data. It was shown in Zhang et al. (2017) that this can be achieved with a network with a number of parameters that is linearly proportional to the size of the dataset, with a small constant of proportionality. Additionally, the training time required to memorize random labels is only a small constant factor more compared to the time it takes to memorize real, non-random labels.
+
+To address duplicated data in the training corpus, after the classifier has been sufficiently trained, items for which the classifier still shows significant loss can be reassigned a common label. Further training then ensures the classifier memorizes these items.
+
+During the denoising process, whenever the classifier predicts a label $y \in \{0,1\}$ for $x_{t}$ with probability greater than $1 - \alpha$ , we perturb $x_{t-1}$ towards the opposite label using classifier guidance. For example, if the classifier predicts the label 1 with high probability, we employ classifier guidance to adjust the sampling process to draw from the conditional distribution $p_{\theta,\phi}(x_{t-1} \mid x_t, t, y = 0)$ , reducing the likelihood of the generated sample being close to the training data.
+
+To state our procedure more precisely, let $\epsilon_{\theta}(\cdot ,\cdot)$ be the denoiser. Note that the classifier is trained only once on the training data and not during each sample generation. The sampling process is then modified in the following steps:
+
+1. Randomly assign Bernoulli(0.5) labels to each member of the training data, and let $B \in \{0, 1\}^n$ index these random labels. Train a classifier $p_{\phi}(y \mid x_t, t)$ to predict these labels. Here, $x_t$ is generated by corrupting the training data $x_0$ with noise: $x_t = \sqrt{\alpha_t} x_0 + \sqrt{1 - \alpha_t} \epsilon$ for $\epsilon \sim \mathcal{N}(0, I)$ and $t \in \{0, \dots, T\}$ .
+2. Set a tolerance threshold $0 < \alpha < 0.5$ and a scale parameter $s$ . Let $p_{\phi}(y \mid x_t, t)$ be the probability assigned to the label $y$ by the classifier $p_{\phi}(y \mid x_t, t)$ . Sample $x_T \sim \mathcal{N}(0, I)$ . For $t \in \{T, \dots, 1\}$ , if $p_{\phi}(y = 0 \mid x_t, t) < \alpha$ , replace $\epsilon_{\theta}(x_t, t)$ with
+
+$$
+\hat {\epsilon} _ {\theta , \phi} (x _ {t}, t) = \epsilon_ {\theta} (x _ {t}, t) - s \sqrt {1 - \overline {{\alpha}} _ {t}} \cdot \nabla \log (p _ {\phi} (y = 0 \mid x _ {t}, t)).
+$$
+
+If $p_{\phi}(y = 1 \mid x_t, t) < \alpha$ , replace $\epsilon_{\theta}$ with
+
+$$
+\hat {\epsilon} _ {\theta , \phi} \left(x _ {t}, t\right) = \epsilon_ {\theta} \left(x _ {t}, t\right) - s \sqrt {1 - \bar {\alpha} _ {t}} \cdot \nabla \log \left(p _ {\phi} \left(y = 1 \mid x _ {t}, t\right)\right).
+$$
+
+Otherwise, we leave the sampling process unchanged.
+
+Though the choice of random labels for the classifier initially may seem counter-intuitive, it has several advantages over other approaches. If we used labels corresponding to real attributes of the data, the classifier would influence the content of the generated images in ways that could compromise their authenticity and diversity. This is because the guidance would push the generated images towards or away from specific attributes, altering the intended distribution. The perturbation applied by the gradient of the log probability in CPSample moves the generated images away from regions where they can be easily classified as similar to the training data. This method is more effective than adding random noise, which would require a significant amount of noise to achieve the same effect, thus degrading image quality.
+
+Unlike past training-based methods of privacy protection such as ambient diffusion and DPDM, once we have trained the classifier, we can adjust the level of protection by tuning the hyperparameters $s$ and $\alpha$ without necessitating retraining of the classifier or denoiser. Our method also does not require access to the training data or excessive additional computation during sampling as the inferred-based method AMG does.
+
+# 3.2 THEORY
+
+In this section, we show that CPSample functions similarly to rejection sampling when preventing exact replication of the training images. We work under the following assumptions:
+
+Assumption 1. Suppose that the classifier $p_{\phi}(y \mid x, t)$ has Lipschitz constant $L$ in the argument $x$ with respect to a metric $d(\cdot, \cdot): \chi \times \chi \to \mathbb{R}_{\geq 0}$ , where $\chi$ denotes the image space.
+
+Assumption 2. Let $y_{i}$ be the random label assigned to $x_{i} \in D$ , where $D$ is the training data. Let $\kappa < \frac{1}{2}$ be such that for all $x_{i} \in D$ , we have
+
+$$
+p _ {\phi} \left(y _ {i} \mid x _ {i}, 0\right) \in (1 - \kappa , 1 ]. \tag {3.1}
+$$
+
+Assumption 3. Suppose that CPSample generates data $\tilde{x}$ such that $\lambda < p_{\phi}(y \mid \tilde{x},0) < 1 - \lambda$ with probability greater than $1 - \nu$ , where we are able to govern $\nu$ and $\lambda$ by adjusting $s$ and $\alpha$ in Section 3.1.
+
+In Assumption 1 the constant $L$ can be difficult to evaluate, but the assumption holds for neural network classifiers. Methods exist that can bound the local Lipschitz constant around the training data (Huang et al., 2021), which one can use to strengthen the guarantees of Lemma 1. Assumption 3 holds well empirically, and in Assumption 2, one can typically exert strong control over the size of $\kappa$ without incurring too much additional computational overhead Zhang et al. (2017). Concretely, we were able to train our classifier to have a cross-entropy loss below 0.05 in the experiments from Sections 4.1 and 4.2. Moreover, during sampling, we observed that CPSample had control over the quantity $p_{\phi}(y \mid x_t, t)$ . An example is given in Figure 7.
+
+Given these assumptions, we can demonstrate the following simple lemma, which links the behavior of CPSample to that of a rejection sampler without requiring expensive comparisons to the training dataset. A proof can be found in Appendix A. We note that the assumptions are admittedly relatively strong, as Lemma 1 is designed primarily to give theoretical intuition for how CPSample works rather than practical guarantees on how well it protects the data. We refer to reader to our empirical results (See Section 4) for practical demonstrations of the method's efficacy.
+
+Lemma 1. Under the above assumptions, choose $\varepsilon >0$ and $0 < \delta < \frac{1}{2} -\kappa}{L}$ . Setting $\nu = \varepsilon$ and $\lambda = \kappa +L\delta$ , when drawing a single sample, with probability greater than $1 - \varepsilon$ , CPSample generates an image that lies outside of $S = \bigcup_{x\in D}B_{\delta}(x)$ in the metric space defined by $d$ .
+
+Note that the ability to control $\mathbb{P}\left(\tilde{x} \in \bigcup_{x \in D} B_{\delta}(x)\right)$ gives the same guarantee offered by rejection sampling. However, in extreme instances of mode collapse such as those exhibited by Stable Diffusion in Section 4.2, one might have to resample hundreds of times to generate original images, making standard rejection sampling highly inefficient. CPSample is able to produce original images without this high level of inefficiency.
+
+
+Figure 2: Cosine similarity in feature space between generated images and their nearest neighbor in the fine-tuning dataset for standard DDIM sampling (red) and CPSample (blue) with $\alpha = 0.001$ , $s = 1$ on CIFAR-10 (left) and with $\alpha = 0.001$ , $s = 1000$ on CelebA-64 (right). Similarity scores were computed for 21 000 generated samples for CIFAR-10 and 8 000 images for CelebA. Note that standard DDIM exhibits many more samples with similarity scores exceeding the thresholds from Table 1.
+
+
+
+# 4 EMPIRICAL RESULTS
+
+We run three distinct sets of experiments to demonstrate the ways in which CPSample protects the privacy of the training data. First, we statistically test the ability of CPSample to reduce similarity between generated data and the training set for unguided diffusion. We then demonstrate that CPSample can prevent Stable Diffusion from generating memorized images. Finally, we measure robustness against membership inference attacks. Hyperparameters, in all empirical tests, are chosen to maximize image quality while eliminating exact matches. In our tests of image quality, we find that CPSample far outperforms existing methods of protecting the training data.
+
+# 4.1 SIMILARITY REDUCTION
+
+We generate images using DDIM with CPSample and 1000 denoising steps. The nearest neighbor to each generated image is found using Meta's FAISS model (Douze et al., 2024). Similarity between two images is measured by cosine similarity in a feature space defined by FAISS. We empirically find that a similarity score exceeding 0.97 often indicates nearly-identical images for CIFAR-10. For CelebA and LSUN Church, the thresholds lie around 0.95 (Daras et al., 2024) and 0.90, respectively. Note that a cosine similarity score above the thresholds given is a necessary but not sufficient condition for images to look very alike. To ensure that we can observe a larger number of images with similarities exceeding our thresholds, we fine-tune the models using DDIM (Song et al., 2021) on a subset of the data that consisted of 1000 images, as was done in Daras et al. (2024). This modification allows us to statistically test the efficacy of CPSample without the large number of samples required to do hypothesis testing on rare exact replication events. After fine-tuning, up to $12.5\%$ of the images produced by unprotected DDIM are nearly exact replicates of the fine-tuning data. One can see from Table 1 that CPSample significantly reduces the fraction of generated images that have high cosine similarity to members of the fine-tuning set. One can see histograms of the similarity score distribution with and without CPSample in Figures 2 and 10. Figures 1 and 3 show the most similar pairs of samples and fine-tuning data points. Uncurated images generated from CPSample can be found in Appendix F. While CPSample effectively reduces the similarity between generated images and the training data, our results in Table 4 indicate that CPSample achieves minimal degradation in quality compared to previous methods.
+
+# 4.2 STABLE DIFFUSION
+
+As a second demonstration of CPSample, we present evidence that CPSample can prevent well-known examples of mode collapse in near-verbatim attacks against Stable Diffusion (Webster, 2023; Wen et al., 2024). We curate a small dataset of commonly reproduced images (Somepalli et al., 2023b) and include other images from the LAION dataset depicting the same subjects, while ensuring that this dataset contains no duplicates. In this more targeted application, CPSample can prevent exact replication when used with the right hyperparameters. See Figure 6 and Table 2 for more details.
+
+
+Figure 3: Generated images and their most similar training image pairs for DDIM sampling and CPSample with $\alpha = 0.001$ , $s = 1$ on CIFAR-10 (left) and $\alpha = 0.1$ , $s = 10$ on LSUN Church (right). For each pair, the image on the left is the generated sample, and the one on the right is its nearest neighbor in the training set. These are the four examples out of 21 000 images on CIFAR-10 and two out of 1700 images on LSUN Church with the highest similarity scores with their nearest neighbor.
+
+
+
+
+
+Table 1: Reduction in cosine similarity between generated images and nearest neighbor in fine-tuning data. ${}^{1}p$ -values were computed using a ${\chi }^{2}$ test for the null hypothesis ${H}_{0}$ : "CPSample did not reduce the fraction of images with similarity score exceeding the threshold."
+
+
Dataset
FT Steps
α
Scale
Threshold
DDIM
CPSample
p-value1
CIFAR-10
150k
0.001
1
0.97
6.25%
0.00 %
<0.0001
CelebA
650k
0.001
1000
0.95
12.5%
0.10%
<0.0001
LSUN Church
455k
0.1
10
0.90
0.73%
0.04%
0.013
+
+Although CPSample does not provide as robust protection in this setting compared to Somepalli et al. (2023b); Wen et al. (2024), these results highlight its potential for data protection in text-guided diffusion models. Moreover, the methods developed in Somepalli et al. (2023b); Wen et al. (2024) do not apply to unguided diffusion models. This application also highlights how CPSample can protect only a private subset of the training data, for which it does not require access to the entire training dataset.
+
+Table 2: Details of generation on Stable Diffusion.
+
+
Image
Original caption
Modified caption
α
scale
guidance
A
“Rambo 5 and Rocky Spin-Off - Sylvester Stallone gibt Updates”
“Rocky and Rambo Spin-Off - Sylvester Stallone gibt Updates”
0.5
2000
1.5
B
“Classic cars for sale”
“Classic car for sale”
0.3
100
1.5
C
“Red Exotic Fractal Pattern Abstract Art On Canvas-7 Panels”
“Red Exotic Fractal Pattern Abstract Art On Canvas-7 Panels”
0.5
2000
1.5
+
+# 4.3 MEMBERSHIP INFERENCE ATTACKS
+
+We also assess CPSample's ability to protect against membership inference attacks. Following Algorithm 1, we compute the mean reconstruction error for the training and test datasets and determine whether there is a statistically significant difference. To evaluate resistance to inference attacks, we use a model trained on the entire set of 50 000 CIFAR-10 training images. We compare the reconstruction loss on these 50 000 training images to the reconstruction loss on the 10 000 withheld test samples included in the CIFAR-10 dataset. We compare the difference in reconstruction loss between these two datasets both for CPSample, using a classifier trained on the entirety of the CIFAR-10 training data with random labels, and for standard DDIM sampling. We demonstrate CPSample's resistance to inference attacks for $\alpha \in \{0.5, 0.25, 0.001\}$ over approximately 8000
+
+images from each of the training and test datasets. The $p$ -values in this experiment are based on a two-sample, single-tailed $Z$ -score that tests the null hypothesis "the average training reconstruction loss is less than or equal to the average test reconstruction loss." Precisely, let $n$ denote the number of training data points and $m$ denote the number of sampled test data points. The test statistic is then given by
+
+$$
+\frac {\mu_ {\text {t e s t}} - \mu_ {\text {t r a i n}}}{\sqrt {V _ {\text {t e s t}} / m + V _ {\text {t r a i n}} / n}}.
+$$
+
+Here, the symbol $V$ indicates the variance and $\mu$ indicates the mean. In this context, failure to reject the null hypothesis indicates a success for CPSample.
+
+We observe that in our experiments, a very low value of $\alpha$ leads to a higher $p$ -value, which is counterintuitive on first glance. However, we believe that this occurs due to the fact that a small value of $\alpha$ results in a more targeted application of CPSample, driving the loss up exclusively around the training data points. As shown in Table 3 for values of $\alpha$ between 0 and 0.5, a conclusive membership inference attack against CPSample is not possible. We provide a second black-box membership inference attack based on permutation testing in Appendix E.
+
+
+Figure 4: Uncurated samples from DP-LDM (Lyu et al., 2024) on CelebA (Top) and Ambient Diffusion (Daras et al., 2024) with corruption 0.2 (Bottom). These samples are of noticeably lower quality than the uncurated samples from CPSample, found in Appendix F.
+
+
+Figure 5: The generated and real images with the highest similarity for CIFAR-10 (left) and CelebA (right) out of 50 000 samples used to compute FID score.
+
+# 4.4 QUALITY COMPARISON
+
+As mentioned in the introduction and Section 4.1, other methods of privacy protection suffer from severe degradation of quality as measured by FID score. Here, we provide an FID score comparison between the CPSample model fine-tuned on curated subsets of CIFAR-10 and CelebA and existing methods of privacy protection. FID scores for unconditional generation of CIFAR-10 and CelebA are presented in Table 4. The images with the highest similarity to the training set, determined using FAISS, are shown in Figure 5. The particular values of $\alpha$ and $s$ were set in an attempt to find the least aggressive settings that still completely prevent exact replication of the training data. FID scores over a grid search on the hyperparameters $\alpha$ and $s$ are displayed in Table 7. We include images from DP-LDM (Lyu et al., 2024) and Ambient Diffusion (Daras et al., 2024) in Figure 4 to emphasize the gains in quality.
+
+A
+
+
+Figure 6: Selected examples for Stable Diffusion: original image (left), image generated from a similar caption by Stable Diffusion v1.4 (center), image generated with CPSample (right).
+
+Table 3: Difference in mean reconstruction error between train and test data for CIFAR-10.
+
+
Method
Test statistic
p-value
DDIM
138
≈ 0
Ambient (Corruption 0.2)
0.141
0.44
Ambient (Corruption 0.8)
-0.024
0.51
CPSample (α = 0.5)
0.59
0.28
CPSample (α = 0.25)
0.23
0.41
CPSample (α = 0.001)
-0.86
0.81
+
+Table 4: FID score comparison on the CIFAR10 and CelebA datasets.
+
+
Method
CIFAR-10
CelebA
DDIM
3.17
1.27
Ambient (Corruption 0.2)
11.70
25.95
DPDM (ε = 10)
97.7
78.3
DP-Diffusion (ε = 10)
9.8
-
DP-LDM (ε = 10)
8.4
16.2
CPSample (α = 0.001, 0.05)
4.97
2.97
+
+# 5 LIMITATIONS
+
+As mentioned in Section 3.1, the difference in training time required to get a classifier to memorize random labels versus real labels has been shown to be only a small constant factor Zhang et al. (2017). Compared to other leading methods of protecting training data, such as ambient diffusion, DPDM, and AMG, our method is significantly easier to employ in terms of computational resources. However, as we lack the resources to provide further empirical evidence beyond what has already been demonstrated in the literature, we leave this remark as a flag for a potential practical limitation of our method.
+
+Of slight theoretical concern is the difficulty in providing practical upper bounds on the Lipschitz constant of the classifier, for which a lower value would provide stronger formal guarantees of privacy. Further research into employing Lipschitz regularizations may both improve the performance of our method and provide stronger guarantees. In practice, we observe stronger protections than the formal guarantees provide. Thus, we include the formal guarantees primarily as a source of intuition.
+
+# 6 CONCLUSION
+
+We have presented a new approach to prevent memorized images from appearing during inference time. Our method is applicable to both guided and unguided diffusion models. Unlike previous methods intended to protect privacy of unguided diffusion models, CPSample does not necessitate retraining the denoiser. Moreover, the presence of duplicated data in the training corpus does not affect on our approach, and after training the classifier, one can adjust the level of protection enforced by CPSample without further training. We have shown theoretically that our method behaves similarly to rejection sampling without necessitating resampling. Finally, we have provided empirical evidence with rigorous statistical testing that our method is effective in unguided settings. We have also given examples in which CPSample was able to prevent extreme instances of mode collapse in Stable Diffusion. Despite its efficacy at preventing replication of training images, CPSample has little negative impact on image quality.
+
+# REPRODUCIBILITY STATEMENT
+
+We provide source code, scripts, and configuration details for experiments in the supplementary material for those seeking to reproduce this study. Proofs of original claims are given in the appendix, along with details for the implementation and training of the model. Statistical measures of significance are included to ensure the robustness of our results.
+
+# ETHICS STATEMENT
+
+This paper addresses privacy concerns in generative AI models. Our method is designed to mitigate these risks by safe guarding against membership inference attacks and data replication. We caution users that although our method prevents exact replication of training data, the theoretical assumptions are relaxed in practice, so it does not guarantee complete protection. We encourage others to act responsibly in the application of this work and to further research methods to prevent exact replication of trainign data.
+
+# REFERENCES
+
+Martin Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS '16, pp. 308-318, New York, NY, USA, 2016. Association for Computing Machinery. ISBN 9781450341394. doi: 10.1145/2976749.2978318. URL https://doi.org/10.1145/2976749.2978318.
+Jordan Awan and Vinayak Rao. Privacy-aware rejection sampling. Journal of machine learning research, 24(74):1-32, 2023.
+Blake Brittain. Artists take new shot at stability, midjourney in updated copyright lawsuit. Reuters, 2023. URL https://www.reuters.com/legal/litigation/google-sued-by-us-artists-over-ai-image-generator-2024-04-29/.
+Blake Brittain. Google sued by us artists over ai image generator. Reuters, 2024. URL https://www.reuters.com/legal/litigation/google-sued-by-us-artists-over-ai-image-generator-2024-04-29/.
+Nicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ülfar Erlingsson, Alina Oprea, and Colin Raffel. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pp. 2633-2650. USENIX Association, August 2021. ISBN 978-1-939133-24-3. URL https://www.usenix.org/conference/usenixsecurity21/presentation/carlini-extracting.
+Mathilde Caron, Hugo Touvron, Ishan Misra, Herve Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers, 2021.
+Chen Chen, Daochang Liu, and Chang Xu. Towards memorization-free diffusion models, 2024. URL: https://arxiv.org/abs/2404.00922.
+Giannis Daras, Maurizio Delbracio, Hossein Talebi, Alexandros G. Dimakis, and Peyman Milanfar. Soft diffusion: Score matching for general corruptions, 2022.
+Giannis Daras, Kulin Shah, Yuval Dagan, Aravind Gollakota, Alex Dimakis, and Adam Klivans. Ambient diffusion: Learning clean distributions from corrupted data. Advances in Neural Information Processing Systems, 36, 2024.
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 248-255, 2009. URL http://www(image-net.org/papers/imagenet(cvpr09.pdf.
+Prafulla Dhariwal and Alexander Nichol. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780-8794, 2021.
+Tim Dockhorn, Tianshi Cao, Arash Vahdat, and Karsten Kreis. Differentially private diffusion models. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=ZPpQk7FJXF.
+Matthijs Douze, Alexandr Guzhva, Chengqi Deng, Jeff Johnson, Gergely Szilvasy, Pierre-Emmanuel Mazaré, Maria Lomeli, Lucas Hosseini, and Hervé Jégou. The faiss library, 2024.
+Jinhao Duan, Fei Kong, Shiqi Wang, Xiaoshuang Shi, and Kaidi Xu. Are diffusion models vulnerable to membership inference attacks?, 2023.
+Jan Dubiński, Antoni Kowalczuk, Stanisław Pawlak, Przemyslaw Rokita, Tomasz Trzeciński, and Paweł Morawiecki. Towards more realistic membership inference attacks on large diffusion models. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), 01 2024.
+Cynthia Dwork and Aaron Roth. The Algorithmic Foundations of Differential Privacy. Foundations and Trends in Theoretical Computer Science, 2014.
+
+Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. volume Vol. 3876, pp. 265-284, 01 2006. ISBN 978-3-540-32731-8. doi: 10.1007/11681878_14.
+Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning, 2017.
+Sahra Ghalebikesabi, Leonard Berrada, Sven Gowal, Sofia Ira Ktena, Robert Stanforth, Jamie Hayes, Soham De, Samuel Smith, Olivia Wiles, and Borja Balle. Differentially private diffusion models generate useful synthetic images, 02 2023.
+Aditya Golatkar, Alessandro Achille, Ashwin Swaminathan, and Stefano Soatto. Training data protection with compositional diffusion models. CoRR, abs/2308.01937, 2023. URL https://doi.org/10.48550/arXiv.2308.01937.
+Aditya Golatkar, Alessandro Achille, Luca Zancato, Yu-Xiang Wang, Ashwin Swaminathan, and Stefano Soatto. CPR: retrieval augmented generation for copyright protection. CoRR, abs/2403.18920, 2024. URL https://arxiv.org/abs/2403.18920.
+Jiatao Gu, Shuangfei Zhai, Yizhe Zhang, Lingjie Liu, and Josh Susskind. Boot: Data-free distillation of denoising diffusion models with bootstrapping, 2023.
+Jonathan Ho and Tim Salimans. Classifier-free diffusion guidance, 2022.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Hailong Hu and Jun Pang. Membership inference of diffusion models, 2023.
+Yujia Huang, Huan Zhang, Yuanyuan Shi, J Zico Kolter, and Anima Anandkumar. Training certifiably robust neural networks with efficient local lipschitz bounds. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan (eds.), Advances in Neural Information Processing Systems, 2021. URL https://openreview.net/forum?id=FTt28RYj5Pc.
+Matthew Jagielski, Om Thakkar, Florian Tramer, Daphne Ippolito, Katherine Lee, Nicholas Carlini, Eric Wallace, Shuang Song, Abhradeep Guha Thakurta, Nicolas Papernot, and Chiyuan Zhang. Measuring forgetting of memorized training examples. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=7bJizxLKrR.
+Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine. Elucidating the design space of diffusion-based generative models, 2022.
+Amirhossein Kazerouni, Ehsan Khodapanah Aghdam, Moein Heidari, Reza Azad, Mohsen Fayyaz, Ilker Hacihaliloglu, and Dorit Merhof. Diffusion models for medical image analysis: A comprehensive survey, 2023.
+Dongjun Kim, Chieh-Hsin Lai, Wei-Hsiang Liao, Naoki Murata, Yuhta Takida, Toshimitsu Uesaka, Yutong He, Yuki Mitsufuji, and Stefano Ermon. Consistency trajectory models: Learning probability flow ODE trajectory of diffusion. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=ymjI8feDTD.
+Alex Krizhevsky. Learning Multiple Layers of Features from Tiny Images. Technical report, University of Toronto, 2009. URL https://www.cs.toronto.edu/~kriz/cifar.html.
+Sungbin Lim, Eunbi Yoon, Taehyun Byun, Taewon Kang, Seungwoo Kim, Kyungjae Lee, and Sungjoon Choi. Score-based generative modeling through stochastic evolution equations in hilbert spaces. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=GrElRvXnEj.
+Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. Proceedings of International Conference on Computer Vision (ICCV), 2015.
+
+Saiyue Lyu, Michael F. Liu, Margarita Vinaroz, and Mijung Park. Differentially private latent diffusion models, 2024.
+Gary Marcus and Reid Southen. Generative ai has a visual plagiarism problem, 2024. URL https://spectrum.ieee.org/midjourney-copyright.
+Tomoya Matsumoto, Takayuki Miura, and Naoto Yanai. Membership inference attacks against diffusion models, 2023a.
+Tomoya Matsumoto, Takayuki Miura, and Naoto Yanai. Membership inference attacks against diffusion models. pp. 77-83, 05 2023b. doi: 10.1109/SPW59333.2023.00013.
+Hieu V. Nguyen and Li Bai. Cosine similarity metric learning for face verification. In Ron Kimmel, Reinhard Klette, and Akihiro Sugimoto (eds.), Computer Vision - ACCV 2010, pp. 709-720, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. ISBN 978-3-642-19309-5.
+Yan Pang and Tianhao Wang. Black-box membership inference attacks against fine-tuned diffusion models, 2023.
+Yan Pang, Tianhao Wang, Xuhui Kang, Mengdi Huai, and Yang Zhang. White-box membership inference attacks against diffusion models, 2023.
+Walter H. L. Pinaya, Petru-Daniel Tudosiu, Jessica Dafflon, Pedro F da Costa, Virginia Fernandez, Parashkev Nachev, Sebastien Ourselin, and M. Jorge Cardoso. Brain imaging generation with latent diffusion models, 2022.
+Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation, 2015.
+Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. In International conference on machine learning, pp. 2256-2265. PMLR, 2015.
+Gowthami Somepalli, Vasu Singla, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Diffusion art or digital forgery? investigating data replication in diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 6048-6058, 2023a.
+Growthami Somepalli, Vasu Singla, Micah Goldblum, Jonas Geiping, and Tom Goldstein. Understanding and mitigating copying in diffusion models. Advances in Neural Information Processing Systems, 36:47783-47803, 2023b.
+Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=St1giarCHLP.
+Yang Song, Prafulla Dhariwal, Mark Chen, and Ilya Sutskever. Consistency models, 2023.
+Nikhil Vyas, Sham M. Kakade, and Boaz Barak. On provable copyright protection for generative models. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 35277-35299. PMLR, 23-29 Jul 2023. URL https://proceedings.mlr.press/v202/vyas23b.html.
+Ryan Webster. A reproducible extraction of training images from diffusion models, 2023.
+Ryan Webster, Julien Rabin, Loic Simon, and Frederic Jurie. On the de-duplication of laion-2b. 03 2023.
+Yuxin Wen, Yuchen Liu, Chen Chen, and Lingjuan Lyu. Detecting, explaining, and mitigating memorization in diffusion models. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=84n3UwkH7b.
+Yixin Wu, Ning Yu, Zheng Li, Michael Backes, and Yang Zhang. Membership inference attacks against text-to-image generation models, 2022.
+
+Peipei Xia, Li Zhang, and Fanzhang Li. Learning similarity with cosine similarity ensemble. Information Sciences, 307:39-52, 2015. ISSN 0020-0255. doi: https://doi.org/10.1016/j.ins.2015.02.024. URL https://www.sciencedirect.com/science/article/pii/S0020025515001243.
+Hanshen Xiao and Srinivas Devadas. Pac privacy: Automatic privacy measurement and control of data processing. In Annual International Cryptology Conference, pp. 611-644. Springer, 2023.
+Liyang Xie, Kaixiang Lin, Shu Wang, Fei Wang, and Jiayu Zhou. Differentially private generative adversarial network, 2018.
+Qipan Xu, Youlong Ding, Jie Gao, and Hao Wang. Pac privacy preserving diffusion models, 2023.
+Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. URL https://openreview.net/forum?id=Sy8gdB9xx.
+
+# A PROOFS
+
+Details of classifier guidance For completeness, we include a derivation of the classifier-guidance introduced in (Dhariwal & Nichol, 2021).
+
+During the conditional denoising process, one should sample $x_{t - 1}$ from the conditional distribution
+
+$$
+\mathbb {P} \left(x _ {t - 1} \mid x _ {t}, y\right) = \frac {\mathbb {P} \left(x _ {t - 1} , x _ {t} , y\right)}{\mathbb {P} \left(x _ {t} , y\right)} = \frac {\mathbb {P} \left(x _ {t - 1} \mid x _ {t}\right) \mathbb {P} \left(y \mid x _ {t} , x _ {t - 1}\right)}{\mathbb {P} \left(y \mid x _ {t}\right)}. \tag {A.1}
+$$
+
+One can show that $\mathbb{P}(y\mid x_t,x_{t - 1}) = \mathbb{P}(y\mid x_{t - 1})$ (see Dhariwal & Nichol (2021) for details). The denominator $\mathbb{P}(y\mid x_t)$ does not depend on $x_{t - 1}$ . Therefore, we write this term as $Z$ . To get an estimate of the probability $\mathbb{P}(y\mid x_{t - 1})$ , we train a classifier of the form $p_{\phi}(y\mid x_{t - 1})$ . Thus, we should estimate the conditional probability $\mathbb{P}(x_{t - 1}\mid x_t,y)$ via
+
+$$
+p _ {\theta , \phi} \left(x _ {t - 1}, x _ {t}, y\right) = Z p _ {\theta} \left(x _ {t - 1} \mid x _ {t}\right) p _ {\phi} \left(y \mid x _ {t - 1}\right). \tag {A.2}
+$$
+
+In continuous time, we can write $p(x_{t},y) = p(x_{t})p(y\mid x_{t})$ , and the score function is:
+
+$$
+\nabla_ {x _ {t}} \log \left(p _ {\theta} \left(x _ {t}\right) p _ {\phi} (y \mid x _ {t})\right) = \nabla_ {x _ {t}} \log p _ {\theta} \left(x _ {t}\right) + \nabla_ {x _ {t}} \log p _ {\phi} (y \mid x _ {t}). \tag {A.3}
+$$
+
+The network $\epsilon_{\theta}(x_t,t)$ predicts the noise added to a sample, which can be used to derive the score function
+
+$$
+\nabla_ {x _ {t}} \log p _ {\theta} (x _ {t}, t) = - \frac {1}{\sqrt {1 - \overline {{\alpha}} _ {t}}} \epsilon_ {\theta} (x _ {t}, t).
+$$
+
+Substituting this into equation A.3, we get
+
+$$
+- \frac {1}{\sqrt {1 - \bar {\alpha} _ {t}}} \epsilon_ {\theta} \left(x _ {t}\right) + \nabla_ {x _ {t}} \log p _ {\phi} (y \mid x _ {t}). \tag {A.4}
+$$
+
+This leads to a new prediction for
+
+$$
+\hat {\epsilon} _ {\theta} (x _ {t}) = \epsilon_ {\theta} (x _ {t}) - \sqrt {1 - \overline {{\alpha}} _ {t}} \nabla_ {x _ {t}} \log p _ {\phi} (y \mid x _ {t}).
+$$
+
+The conditional sampling then follows in the same manner as standard DDIM with $\epsilon_{\theta}$ replaced by $\hat{\epsilon}_{\theta}$ .
+
+# Proof of Lemma 1
+
+Proof. Let $x' \in B_{\delta}(x_0)$ , where $x_0 \in D$ is assigned the random label $y$ . By Lipschitz continuity, we have that
+
+$$
+\left| p _ {\phi} (y \mid x _ {0}, t) - p _ {\phi} (y \mid x ^ {\prime}, t) \right| < L d \left(x _ {0}, x ^ {\prime}\right).
+$$
+
+By Assumption 2, we have $p_{\phi}(y \mid x_0, 0) > 1 - \kappa$ , it follows that
+
+$$
+\begin{array}{l} p _ {\phi} (y \mid x ^ {\prime}, 0) = p _ {\phi} (y \mid x _ {0}, 0) - p _ {\phi} (y \mid x _ {0}, 0) + p _ {\phi} (y \mid x ^ {\prime}, 0) \\ = p _ {\phi} (y \mid x _ {0}, 0) - \left(p _ {\phi} (y \mid x _ {0}, 0) - p _ {\phi} (y \mid x ^ {\prime}, 0)\right) \\ \geq p _ {\phi} (y \mid x _ {0}, 0) - \left| p _ {\phi} (y \mid x _ {0}, 0) - p _ {\phi} (y \mid x ^ {\prime}, 0) \right| \\ \geq p _ {\phi} (y \mid x _ {0}, 0) - L d \left(x _ {0}, x ^ {\prime}\right) \\ \geq p _ {\phi} (y \mid x _ {0}, 0) - L \delta \\ \geq 1 - \kappa - L \delta \\ = 1 - \lambda . \\ \end{array}
+$$
+
+Therefore, for all points $x' \in S$ , we have $p_{\phi}(y \mid x', 0) \in [0, \lambda] \cup [1 - \lambda, 1]$ . By Assumption 3, CPSample generates samples $\tilde{x}$ with $p_{\phi}(y \mid \tilde{x}) \in [\lambda, 1 - \lambda]$ with probability at least $1 - \varepsilon$ . Thus, we have that CPSample generates samples outside of $S$ with probability at least $1 - \varepsilon$ .
+
+
+Figure 7: CPSample is able to generate images with $p_{\phi}(y \mid \tilde{x}, 0) \in (\lambda, 1 - \lambda)$ . This example shows the probability $p_{\phi}(y = 1 \mid x_t, t)$ during the generation process with Stable Diffusion guided by the caption "Rambo 5 and Rocky Spin-Off - Sylvester Stallone gibt Updates." Note that a higher step indicates a later point in the denoising process. In this example, Stable diffusion exactly replicated the memorized image of Stallone, whereas CPSample ( $\alpha = 0.5, s = 2000$ ) produced an original image.
+
+# B CLASS GUIDED DIFFUSION
+
+As a final experiment, we implement CPSample alongside classifier-free guidance for CIFAR-10 to ensure that CPSample does not cause frequent out-of-category samples. The models used for guided diffusion were smaller, so the image quality is naturally lower.
+
+
+Figure 8: Uncurated samples using classifier-free guidance on CIFAR-10. The image in the position second row, third column from the top left is a near-exact replica of a member of the training data.
+
+
+Figure 9: Uncurated samples using CPSample $(\epsilon = 0.1, s = 10)$ along with classifier-free guidance on CIFAR-10. Note that although CPSample slightly reduces image quality, it does not cause out-of-category samples.
+
+# C TRAINING DETAILS
+
+Training classifiers. For training the classifier, we randomly selected subsets of 1000 images each from the CIFAR-10, CelebA, and LSUN Church datasets, on which we trained the classifier from scratch. The architecture of our classifier is a modified version of the U-Net model. We retained key components of the U-Net (Ronneberger et al., 2015) model structure, including the timestep embedding, multiple convolutional layers for downsampling, and middle blocks. The output from the middle blocks underwent processing through Group Normalization, SiLU (Elfwing et al., 2017) activation layers, and pooling layers before being fed into a single convolutional layer, yielding the classifier's output. Parameters for layers identical to the standard U-Net were consistent with those used to pretrain the DDIM model on these datasets. Additionally, akin to the pretraining of DDIM, we incorporated Exponential Moving Average during training to stabilize the training process. The training of each classifier model was conducted using 4 NVIDIA A4000 GPUs with 16GB of memory. For subsets of 1000 images, the classifier took only hours to train. For larger datasets consisting of $60000 - 160000$ data points, the classifier took up to 1 week to train. By comparison, retraining a diffusion model to be differentially private or using the method presented in (Daras et al., 2024) can take weeks or months depending on the dataset.
+
+Fine-tuning pretrained denoiser model on subsets. For fine-tuning the pretrained denoiser model on subsets, we commenced with the 500 000-step pretrained checkpoints available for the denoiser DDIM model. Fine-tuning was performed on subsets of 1000 images each from the CIFAR-10, CelebA, and LSUN Church datasets until the model began generating data highly resembling the respective subsets. The number of training steps varied across different models, and specific details regarding the fine-tuning process can be found in Table 5. Throughout the fine-tuning process, hyperparameters remained consistent with those used during the pretraining phase. We employed 2 NVIDIA A5000 GPUs with 24GB of memory for fine-tuning each model on the subsets.
+
+# D EVALUATION DETAILS
+
+Numerical stability For the purposes of numerical stability, we slightly modified the sampling process described in Section 3.1. We noticed in earlier iterations of our method that very small numbers of images were becoming discolored or black because in float16, the classifier was predicting
+
+Table 5: Training Parameters & Steps
+
+
Batch Size
LR
Optimizer
EMA Rate
Classifier Steps
Fine-tune Steps
CIFAR-10
256
2e-4
Adam
0.9999
560 000
110 000
CelebA
128
2e-4
Adam
0.9999
610 000
150 000
LSUN Church
8
2e-5
Adam
0.999
1 250 000
880 000
+
+probabilities of 0.0000 or 1.0000 for the random label 1, causing the logarithm to blow up. To fix this in practice, we do the following. Sample $x_{T} \sim \mathcal{N}(0, I)$ . For $t \in \{T, \dots, 1\}$ , if $p_{\phi}(y = 0 | x_{t}, t) < \alpha$ , replace $\epsilon_{\theta}(x_{t}, t)$ with
+
+$$
+\hat {\epsilon} _ {\theta , \phi} (x _ {t}, t) = \epsilon_ {\theta} (x _ {t}, t) - s \sqrt {1 - \overline {{\alpha}} _ {t}} \cdot \nabla \log (\tau + p _ {\phi} (y = 0 | x _ {t}, t)).
+$$
+
+If $p_{\phi}(y = 1|x_t,t) < \alpha$ , replace $\epsilon_{\theta}$ with
+
+$$
+\hat {\epsilon} _ {\theta , \phi} (x _ {t}, t) = \epsilon_ {\theta} (x _ {t}, t) - s \sqrt {1 - \bar {\alpha} _ {t}} \cdot \nabla \log (\tau + p _ {\phi} (y = 1 | x _ {t}, t)).
+$$
+
+Otherwise, leave the sampling process unchanged.
+
+By setting $\tau$ equal to 0.001, we were able to prevent the undesirable behavior.
+
+Similarity Reduction Evaluation. We employ the fine-tuned denoiser model to generate 3000 image samples for each of the aforementioned datasets. Additionally, we utilize the Classifier-guided method to generate another set of 3000 images. Subsequently, we employ DINO (Caron et al., 2021) to find nearest neighbors in the subset using a methodology akin to ambient diffusion. From the perspectives of both DINO's similarity scores and human evaluation, we observe that images generated through the classifier-guided approach exhibit significantly lower similarity to the original images in the subset compared to those generated without guidance.
+
+FID Evaluation. For each dataset, we utilize the denoiser model fine-tuned on the subset to generate 30 000 images under the guidance of the classifier. Subsequently, we employ the FID score implementation from the EDM (Karras et al., 2022) paper to compute the FID score.
+
+Inference Speed Although speed was not a goal of our method, we provide some context for how fast it is compared to standard diffusion. We do our comparison using a batch size of 1 to generate 10 images with 50 denoising steps. CPSample with $\alpha = 0.5$ (i.e. computing gradients of the classifier at every step) had an average per-image generation time of $26.1 \pm 0.029s$ . By contrast, standard stable diffusion had an average generation time of $23.92 \pm 0.055s$ . Therefore, when the classifier is small compared to the size of the diffusion model, the added time cost is insignificant.
+
+# E MEMBERSHIP INFERENCE ATTACKS
+
+Algorithm 1 Test statistic for membership inference attack against diffusion models (Matsumoto et al., 2023a)
+```latex
+Input: Target samples $x_{1},\ldots ,x_{m}$ CPSample denoiser $\hat{\epsilon}_{\theta ,\phi}$ noise schedule $\overline{\alpha}_t = \prod_{s = 1}^t (1 - \beta_s)$ total_error $\leftarrow 0$
+for $x$ in $\{x_1,\dots,x_m\}$ do
+ total_error $\leftarrow$ total_error + $\| \epsilon -\hat{\epsilon}_{\theta ,\phi}(\sqrt{\bar{\alpha}_t} x + \sqrt{1 - \bar{\alpha}_t}\epsilon ,t)\|^2$
+end for
+mean_error $\leftarrow$ total_error/m.
+```
+
+In keeping with our goal of preventing membership inference attacks that are based on high similarity to a single member of the training set, we also perform a permutation test to ensure that we are not producing images that are anomalously close to the training data. Explicitly, we test the null hypothesis: generating images from CPSample produces images that are no more similar to the training data than they are to arbitrary points drawn from the data distribution. Our tests are performed in the same setting used in Section 4.1. Let $S = \{x_{1},\ldots ,x_{k}\}$ be the data used for fine-tuning. Let
+
+$T = \{x_{1},\dots,x_{k},x_{k + 1},\dots,x_{n}\}$ be the entire training set. Finally, let $P = \{\tilde{x}_1,\dots,\tilde{x}_m\}$ be samples from CPSample. Then our permutation test is as follows:
+
+1. Sample $\tilde{x}_1, \dots, \tilde{x}_k$ from $P$ without replacement. For each $\tilde{x}_i$ , compute the quantity in 2.9 where the nearest neighbor is chosen among $S$ . Let the similarity score of the most similar pair be $a$ .
+2. Repeat the following process $\ell$ times: sample $S^i\subset T$ without replacement from $T$ so that $|S^i | = k$ . Sample $P^i$ without replacement from $P$ so that $|P^i | = k$ . Compute the most similar image in $S^i$ for each member of $P^i$ . Call the similarity of the most similar pair $a_{i}$
+3. For a pre-specified level $\alpha$ , reject the null hypothesis if $\frac{1}{\ell} \sum_{i=1}^{\ell} \mathbf{1}\{a_0 > a_i\} > \alpha$ .
+
+The results can be found in Table 6. Note that the test fails to reject on CIFAR-10 and LSUN Church, but succeeds on CelebA. This is likely because we fine-tuned the CelebA model more extensively than the other two.
+
+Table 6: Reduction in cosine similarity between generated images and nearest neighbor in fine-tuning data.
+
+
Dataset
FT Steps
α
Scale
DDIM
CPSample
CIFAR-10
150k
0.001
1
0.92
0.47
CelebA
650k
0.001
1000
0.99
0.99
LSUN Church
455k
0.1
10
0.99
0.60
+
+${}^{1}p$ -values were computed using a ${\chi }^{2}$ test for ${H}_{0}$ : CPSample did not reduce the fraction of images with similarity score exceeding the threshold.
+
+# F ADDITIONAL EMPIRICAL RESULTS
+
+Table 7: FID score w.r.t. $\alpha$ and Scale on CIFAR-10.
+
+
α = 0.001
α = 0.01
α = 0.1
α = 0.25
α = 0.49
Scale = 1
4.14275
4.15467
4.19058
4.19208
4.21859
Scale = 5
4.15772
4.20731
4.36005
4.58839
4.9566
Scale = 10
4.18083
4.26594
5.05858
6.17326
7.88949
Scale = 100
4.96727
16.7173
74.7247
113.199
139.626
+
+
+Similarity Scores with Nearest Neighbor for LSUN Church
+Figure 10: Similarity scores with nearest neighbor for standard DDIM and CPSample $(\alpha = 0.1$ scale $= 10$ ) on LSUN Church. In both cases, the network was fine-tuned for $455\mathrm{k}$ gradient steps on a subset of 1000 images.
+
+
+Figure 11: Uncurated samples using standard DDIM fine-tuned for $455\mathrm{k}$ gradient steps on a subset of 1000 images from LSUN Church.
+
+
+Figure 12: Uncurated samples using CPSample ( $\alpha = 0.1$ , scale= 10) applied to a network fine-tuned for $455\mathrm{k}$ gradient steps on a subset of 1000 images from LSUN Church. Note that there is no visual discrepancy in quality between these and the images from standard DDIM.
+
+
+Figure 13: Uncurated samples using standard DDIM fine-tuned for $580\mathrm{k}$ gradient steps on a subset of 1000 images from CelebA.
+
+
+Figure 14: Uncurated samples using CPSample ( $\alpha = 0.001$ , scale= 1000) applied to a network fine-tuned for 580k gradient steps on a subset of 1000 images from CelebA. Note that there is little visual discrepancy in quality between these and the images from standard DDIM.
+
+
+Figure 15: Uncurated samples using standard DDIM fine-tuned for $150\mathrm{k}$ gradient steps on a subset of 1000 images from CIFAR-10.
+
+
+Figure 16: Uncurated samples using CPSample ( $\alpha = 0.001$ , scale= 1) applied to a network finetuned for approximately 150k gradient steps on a subset of 1000 images from CelebA. Note that there is little visual discrepancy in quality between these and the images from standard DDIM.
\ No newline at end of file
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/images.zip b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..712a74ec5000225033dce61a47a3b602edc17620
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e4caeefa64dd587d691174bc2c2bbfd5b5fc3e573179b722919212a71f8685be
+size 1364900
diff --git a/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/layout.json b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..3339b15613b020f00ab1fb220a031ee2e8c2db77
--- /dev/null
+++ b/ICLR/2025/CPSample_ Classifier Protected Sampling for Guarding Training Data During Diffusion/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a184fa6a52882e6caaef3a4d92d9744700f0bc58bfaf85ce9e90a0f9c8d39139
+size 669046
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_content_list.json b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..cb6e35b343eb6a2c9987890813f23a2b26d43434
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:47e103a433eda8c95e2814c70549747cb32b00fb4adc74c436247ba7a7502cec
+size 106325
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_model.json b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..6a082ab923ac114d12909ab82b393c287dd34828
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7ad339cb43a8777ebc7acc73a6a3a17a583944369a9f295e09be167a18b7c855
+size 130252
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_origin.pdf b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..b7e587641ef773ddfeaa09ed22498f10b086fc85
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/9ec02a28-119d-44c9-832e-b00c585bc580_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b85dfc9c028af5f7d960e3cdad9725ad9717bc236e48dc73e4d8d1ade5fd703
+size 658140
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/full.md b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a7d8a1cd239c9f4013c2c62a0fe514ac3059073b
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/full.md
@@ -0,0 +1,362 @@
+# CR-CTC: CONSISTENCY REGULARIZATION ON CTC FOR IMPROVED SPEECH RECOGNITION
+
+Zengwei Yao, Wei Kang, Xiaoyu Yang, Fangjun Kuang, Liyong Guo, Han Zhu, Zengrui Jin, Zhaoqing Li, Long Lin, Daniel Povey
+
+Xiaomi Corp., Beijing, China
+
+dpovey@xiaomi.com
+
+# ABSTRACT
+
+Connectionist Temporal Classification (CTC) is a widely used method for automatic speech recognition (ASR), renowned for its simplicity and computational efficiency. However, it often falls short in recognition performance. In this work, we propose the Consistency-Regularized CTC (CR-CTC), which enforces consistency between two CTC distributions obtained from different augmented views of the input speech mel-spectrogram. We provide in-depth insights into its essential behaviors from three perspectives: 1) it conducts self-distillation between random pairs of sub-models that process different augmented views; 2) it learns contextual representation through masked prediction for positions within timemarked regions, especially when we increase the amount of time masking; 3) it suppresses the extremely peaky CTC distributions, thereby reducing overfitting and improving the generalization ability. Extensive experiments on LibriSpeech, Aishell-1, and GigaSpeech datasets demonstrate the effectiveness of our CR-CTC. It significantly improves the CTC performance, achieving state-of-the-art results comparable to those attained by transducer or systems combining CTC and attention-based encoder-decoder (CTC/AED). We release our code at https://github.com/k2-fsa/icefall.
+
+# 1 INTRODUCTION
+
+End-to-end approaches (Graves et al., 2006; Graves, 2012; Chan et al., 2015), which eliminate the need of pre-aligned speech-text data, have replaced traditional hybrid systems (Bourlard & Morgan, 2012; Hinton et al., 2012) and become dominant methods in automatic speech recognition (ASR). Prominent examples include Connectionist Temporal Classification (CTC) (Graves et al., 2006), Transducer (Graves, 2012) (also known as RNN-T), and the method that combines CTC and attention-based encoder-decoder (AED) (Chan et al., 2015), referred to as CTC/AED (Watanabe et al., 2017). To handle the alignment between speech and token sequences, CTC (Graves et al., 2006) introduces a blank token and makes independent predictions at each frame, training the model to maximize the total probability over all valid alignments. Transducer (Graves, 2012) extends CTC by introducing a prediction network and a joint network, explicitly modeling the interdependencies on output labels. CTC/AED (Watanabe et al., 2017) integrates CTC into AED (Chan et al., 2015) for jointly training, while the CTC and AED scores are fused during the decoding process. Among these three methods, CTC is the simplest and most computationally efficient due to its frame-independent assumption, making it a strong candidate for real-world deployment. However, it significantly lags behind transducer and CTC/AED in terms of recognition performance, which limits its applicability.
+
+To improve the CTC performance, in this work we propose the Consistency-Regularized CTC (CR-CTC), which takes two different augmented views of the same speech mel-spectrogram as input, and enforces consistency between the resulting CTC distributions. We analyze its internal behaviors from three following perspectives. First, it performs self-distillation between sub-models randomly sampled by drop-based techniques (Srivastava et al., 2014; Huang et al., 2016). Second, for positions within time-masked regions, the model is required to predict the target token distributions, forcing it to learn contextual representation based on unmasked context, akin to self-supervised learning methods (Devlin et al., 2019; Baevski et al., 2020; Hsu et al., 2021). Therefore, we especially increase the amount of time masking in CR-CTC to enhance this masked prediction behavior. Third, the consistency regularization suppresses extremely peaky CTC distributions, which mitigates over
+
+fitting and improves the model's generalization ability. Inspired by this, we additionally propose an simple method specifically designed to learn smoother CTC distributions (Appendix Section A.1), which is experimentally validated to be effective.
+
+We conduct experiments on LibriSpeech, Aishell-1, and GigaSpeech datasets using Zipformer (Yao et al., 2024) as speech encoder. The results demonstrate the superiority of CR-CTC, which significantly outperforms vanilla CTC and achieves results comparable to, or even slightly better than, those of transducer and CTC/AED. In addition, CR-CTC can further improve the performance of transducer and CTC/AED when employed for jointly training. We perform detailed ablation studies on LibriSpeech dataset to investigate the effect of each functional component in CR-CTC and to validate our explanations.
+
+# 2 RELATED WORK
+
+Self-distillation. Unlike traditional knowledge distillation (Bucilua et al., 2006; Hinton et al., 2015), which transfers knowledge from a larger and high-capacity teacher model to a smaller student model, self-distillation (Furlanello et al., 2018; Zhu et al., 2018; Mobahi et al., 2020; Allen-Zhu & Li, 2020) involves learning from a same-architecture model that processes the same training data. This approach enables the model to extract more refined representations and achieve improved performance. For example, BANs (Furlanello et al., 2018) introduces a re-training procedure in which a newly initialized student model is trained to match a pre-trained teacher model, subsequently serving as the teacher in the next iteration. Some works also explore constructing the teacher and student models from a shared network, distilling knowledge from deeper layers to shallower layers (Zhang et al., 2019; Kim et al., 2024), or between pairs of sub-models randomly initialized through drop-based techniques (Srivastava et al., 2014; Huang et al., 2016), such as R-Drop (Wu et al., 2021) and cosub (Touvron et al., 2023). Our CR-CTC fundamentally conducts self-distillation between random sub-models, sharing similar idea to R-Drop and cosub, while our approach further use different augmented input views, which enriches the diversity of predictions from these sub-models.
+
+Masked prediction. Masked prediction has proven highly effective in self-supervised learning (Devlin et al., 2019; Baevski et al., 2019; Joshi et al., 2020; Baevski et al., 2020; Hsu et al., 2021; He et al., 2022; Baevski et al., 2023). In this approach, the model is tasked with predicting masked positions based on the surrounding unmasked context, which encourages the learning of robust contextual representations. Notable methods for speech representation learning include wav2vec 2.0 (Baevski et al., 2020), HuBERT (Hsu et al., 2021), and data2vec 2.0 (Baevski et al., 2023), which primarily differ in their prediction targets. Specifically, wav2vec 2.0 (Baevski et al., 2020) jointly trains a representation quantizer and learns to distinguish the true quantized target from distractors (Oord et al., 2018). HuBERT generates target labels through offline clustering, while data2vec 2.0 uses contextualized representations from a teacher model as its targets. Our CR-CTC essentially performs masked prediction for positions within time-masked regions, where the target labels are frame-level token distributions generated based on another augmented view of input.
+
+Peaky CTC distributions. CTC models are known for predicting extremely peaky distributions (Graves et al., 2006; Sak et al., 2015), which can be harmful in certain scenarios, such as forced alignment (Huang et al., 2024) and knowledge distillation (Ding et al., 2020). These peaky distributions lead to inaccurate alignments as the model assigns excessive blanks to non-silence frames. To address this, label priors are employed to suppress the peaky distributions, thereby improving the accuracy of forced alignment (Huang et al., 2024). As position mismatches of CTC spikes can hinder knowledge distillation performance, some approaches propose to encourage consistent alignments between the teacher and student (Ding et al., 2020) or to utilize sequence-level distillation (Takashima et al., 2019). Unlike previous works, we demonstrate that peak suppression in CR-CTC can improve the generalization ability of the CTC models.
+
+Consistency regularization. The technique of consistency regularization has demonstrated effectiveness in learning generalizable image representations across various learning paradigms, including self-supervised (Chen et al., 2020; Grill et al., 2020; He et al., 2020; Chen & He, 2021), semi-supervised (Sajjadi et al., 2016; Laine & Aila, 2016; Sohn et al., 2020), and supervised (Wu et al., 2021; Touvron et al., 2023; Heo et al., 2023) learning tasks. Self-supervised methods, such as SimCLR (Chen et al., 2020), BYOL (Grill et al., 2020), MoCo (He et al., 2020) and SimSiam (Chen & He, 2021), aim to align hidden representations of unlabeled image data from different model branches or different augmented views. They address the training issue of feature collapsing into a
+
+constant vector (Chen & He, 2021) through contrastive learning (Chen et al., 2020; He et al., 2020), momentum encoder (Grill et al., 2020; He et al., 2020), and stop-gradient operation (Chen & He, 2021). In semi-supervised learning, a prominent example leveraging consistency regularization is FixMatch (Sohn et al., 2020). It generates pseudo-labels based on high-confidence predictions from weakly augmented images, then trains the model to predict these pseudo-labels using the strongly augmented versions of the same images. Additionally, in supervised learning, methods such as R-Drop (Wu et al., 2021) and cosub (Touvron et al., 2023) encourage consistency between predictions of randomly sampled sub-models using drop-based techniques.
+
+When employing consistency regularization as unsupervised objective to train transformer encoders on unlabeled speech data, a new training issue arises in the form of the shortcut learning problem (Geirhos et al., 2020), which is tackled using reconstruction loss in Speech SimCLR (Jiang et al., 2020) and temporal augmentation in C-Siam (Khorram et al., 2022). Some studies explore leveraging consistency regularization to enhance model robustness during predicting the pseudo-labels of untranscribed data, which are generated based on different augmentations (Masumura et al., 2020; Weninger et al., 2020; Chen et al., 2021b; Higuchi et al., 2021; Sapru, 2022) or through speech chain reconstruction (Qi et al., 2022). In contrast to these self/semi-supervised ASR works, our work focuses on a fully supervised setting, where we introduce consistency loss as a regularization term to improve performance of CTC model trained on labeled data. As the consistency regularization is enforced on CTC distributions, which are stably supervised by the main CTC loss, it inherently avoids the training issues associated with the unsupervised objectives as observed in Speech SimCLR (Jiang et al., 2020) and C-Siam (Khorram et al., 2022).
+
+The idea of R-Drop (Wu et al., 2021) has also been extended to supervised ASR (Gao et al., 2022; Yoon et al., 2024). For example, to improve the CTC/AED system, (Gao et al., 2022) specially designs the spatial-temporal dropout to construct the sub-models, with consistency regularization enforced exclusively on the CTC spike frames. Cons-KD (Yoon et al., 2024) integrates consistency regularization into a knowledge distillation system, enabling the student model to be more robust to inconsistency induced by dropout. In this work, we focus on improving the performance of pure CTC systems and are the first to enable CTC models to match the performance of transducer and CTC/AED systems by a simple yet effective approach. Moreover, we introduce peak suppression as a novel explanatory perspective, demonstrating for the first time that it can mitigate overfitting and enhance the generalization ability of CTC models.
+
+# 3 METHOD
+
+We first introduce the standard CTC algorithm in Section 3.1. Then we present the detailed implementation of our proposed Consistency-Regularized CTC (CR-CTC) in Section 3.2, followed by in-depth explanations from different perspectives in Section 3.3.
+
+# 3.1 PRELIMINARY: CONNECTIONIST TEMPORAL CLASSIFICATION
+
+The ASR task is to convert a sequence of speech frames $\mathbf{x} = \{x_{t}\}_{1}^{T}$ of length $T$ to a sequence of transcript tokens $\mathbf{y} = \{y_{u}\in \mathcal{V}\}_{1}^{U}$ of length $U$ , where $\mathcal{V}$ is the vocabulary and typically $T\geq U$ . CTC (Graves et al., 2006) extends the vocabulary $\mathcal{V}$ to $\mathcal{V}' = \mathcal{V}\cup \{\epsilon \}$ with a blank token $\epsilon$ , and aims to maximize the total posterior probability of all valid alignments $\pi = \{\pi_t\in \mathcal{V}'\}_{1}^{T}$ between $\mathbf{x}$ and $\mathbf{y}$ . Let $\mathcal{B}(\pi)$ denote the many-to-one map that merges repeating tokens and removes all blanks in $\pi$ , and $p(\pi |\mathbf{x})$ denote the posterior probability of alignment $\pi$ , the CTC loss function is formulated as:
+
+$$
+\mathcal {L} _ {\mathrm {C T C}} (\mathbf {x}, \mathbf {y}) = - \log \sum_ {\boldsymbol {\pi} \in \mathcal {B} ^ {- 1} (\mathbf {y})} p (\boldsymbol {\pi} | \mathbf {x}). \tag {1}
+$$
+
+Specifically, given the input $\mathbf{x}$ , it employs an encoder $f$ to estimate the $|\mathcal{V}'|$ -dimensional probability distributions $\mathbf{z} = \{z_t\}_1^T$ : $\mathbf{z} = f(\mathbf{x})^1$ , where $f$ is modeled by a speech encoder network such as Zipformer (Yao et al., 2024) followed by a linear projection layer and a softmax function. Note that we now start to use $\mathcal{L}_{\mathrm{CTC}}(\mathbf{z},\mathbf{y})$ instead of $\mathcal{L}_{\mathrm{CTC}}(\mathbf{x},\mathbf{y})$ for ease of description in the following sections. Under the frame-independent assumption (Graves et al., 2006), $p(\pi |\mathbf{x})$ is computed as:
+
+$$
+p (\boldsymbol {\pi} | \mathbf {x}) = \prod_ {t = 1} ^ {T} z _ {t, \pi_ {t}}, \tag {2}
+$$
+
+
+Figure 1: Overall architecture of CR-CTC.
+
+where $z_{t,\pi_t}$ is the probability of emitting token $\pi_t$ at frame $t$ .
+
+# 3.2 OUR APPROACH: CONSISTENCY-REGULARIZED CTC
+
+Figure 1 illustrates the overall architecture of our proposed CR-CTC. It takes as input two different augmented views, $\mathbf{x}^{(a)}$ and $\mathbf{x}^{(b)}$ , both derived from the input speech mel-spectrogram $\mathbf{x}$ . The two input views are then passed through a shared speech encoder $f$ , which estimates the per-frame distributions: $\mathbf{z}^{(a)} = f(\mathbf{x}^{(a)})$ , $\mathbf{z}^{(b)} = f(\mathbf{x}^{(b)})$ . In addition to computing the CTC losses on both branches: $\mathcal{L}_{\mathrm{CTC}}(\mathbf{z}^{(a)}, \mathbf{y})$ and $\mathcal{L}_{\mathrm{CTC}}(\mathbf{z}^{(b)}, \mathbf{y})$ , we introduce an auxiliary loss (defined in Equation 4) to enforce consistency between $\mathbf{z}^{(a)}$ and $\mathbf{z}^{(b)}$ : $\mathcal{L}_{\mathrm{CR}}(\mathbf{z}^{(a)}, \mathbf{z}^{(b)})$ . The overall loss of the whole model is formulated as:
+
+$$
+\mathcal {L} = \frac {1}{2} \left(\mathcal {L} _ {\mathrm {C T C}} \left(\mathbf {z} ^ {(a)}, \mathbf {y}\right) + \mathcal {L} _ {\mathrm {C T C}} \left(\mathbf {z} ^ {(b)}, \mathbf {y}\right)\right) + \alpha \mathcal {L} _ {\mathrm {C R}} \left(\mathbf {z} ^ {(a)}, \mathbf {z} ^ {(b)}\right), \tag {3}
+$$
+
+where $\alpha$ is a hyper-parameter that controls the consistency regularization.
+
+Different augmented views. The two different augmented views, $\mathbf{x}^{(a)}$ and $\mathbf{x}^{(b)}$ , are generated by independently applying SpecAugment (Park et al., 2019) to two copies of the input mel-spectrogram $\mathbf{x}$ . SpecAugment involves warping along time axis, masking blocks of frequency channels, and masking blocks of time steps. Since time warping alters feature timing and thus shifts output timestamps, we apply it first before creating the copies to prevent significant timestamp mismatches between the outputs of two branches. Subsequently, random frequency masking and time masking are both applied to the two copies, resulting in $\mathbf{x}^{(a)}$ and $\mathbf{x}^{(b)}$ . Note that we also increase the amount of time masking by a factor of 2.5 compared to regular systems. The reason behind this adjustment is explained in Section 3.3, with implementation details provided in Section 4.1.
+
+Consistency regularization loss. The consistency regularization is applied on each frame $t$ , by minimizing the bidirectional Kullback-Leibler divergence (denoted as $D_{\mathrm{KL}}$ ) between each pair of distributions $z_{t}^{(a)}$ and $z_{t}^{(b)}$ : $D_{\mathrm{KL}}(sg(z_{t}^{(b)}) \| z_{t}^{(a)})$ and $D_{\mathrm{KL}}(sg(z_{t}^{(a)}) \| z_{t}^{(b)})$ , where $sg$ denotes the operation stopping gradient on the target distributions. The regularization loss $\mathcal{L}_{\mathrm{CR}}(\mathbf{z}^{(a)}, \mathbf{z}^{(b)})$ is formulated as:
+
+$$
+\mathcal {L} _ {\mathrm {C R}} (\mathbf {z} ^ {(a)}, \mathbf {z} ^ {(b)}) = \frac {1}{2} \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} (s g (z _ {t} ^ {(b)}) \| z _ {t} ^ {(a)}) + D _ {\mathrm {K L}} (s g (z _ {t} ^ {(a)}) \| z _ {t} ^ {(b)}). \tag {4}
+$$
+
+# 3.3 EXPLANATION
+
+We now explain the essential behaviors of our proposed CR-CTC from three different perspectives: 1) it performs self-distillation between pairs of sub-models with different input views; 2) it conducts contextual representation learning by predicting the token distributions at masked positions based on unmasked context; 3) it suppresses extremely peaky CTC distributions, mitigating overfitting and enhancing generalization ability. We conduct an empirical investigation through ablation studies in Section 4.3, and the experimental results validate our explanations.
+
+Self-distillation. When using model regularization techniques such as dropout (Srivastava et al., 2014) and stochastic depth (Huang et al., 2016), which randomly drop parts of the model (neurons or layers), it can be viewed as implicitly training randomly sampled sub-models that are ultimately combined into an ensemble during inference. Similar to R-Drop (Wu et al., 2021) and cosub (Touvron et al., 2023), in CR-CTC, enforcing consistency regularization between the two branches enables to perform self-distillation between pairs of randomly sampled sub-models derived from the shared model $f$ , with each sub-model receiving supervision signals in the form of per-frame predictions from the other. In addition, feeding different augmented views (with larger amount of time masking) exposes these sub-models to varied aspects of the input data, enhancing their prediction diversity and facilitating richer knowledge transfer as well as complementary representation learning.
+
+Masked prediction. In CR-CTC, consistency regularization requires frames within the time-masked regions in each branch to predict the corresponding token distributions, which are generated by the other branch on the fly. Similar to masked-based self-supervised models (Devlin et al., 2019; Baevski et al., 2020; Hsu et al., 2021), this behavior encourages the model to capture acoustic information on the unmasked context and exploit its implicit language modeling capability. Independently applying random time masking to the two branches reduces the occurrence of positions masked by both branches, thereby improve the quality of the provided target distributions for these masked positions. Furthermore, increasing the amount of time masking in CR-CTC enhances contextual representation learning through the masked prediction behavior.
+
+Peak suppression. In line with previous works (Graves et al., 2006; Sak et al., 2015), we also observe that CTC tends to learn extremely peaky distributions. As shown in Figure 2 (left), almost all non-blank tokens occupy only one frame, while the remaining frames are dominated by the blank token, with both types of emissions occurring with extremely high probabilities. This phenomenon suggests potential overfitting to training data, which limits generalization ability to unseen data.
+
+Enforcing prediction consistency between the two branches in CR-CTC guides the model to learn the average of their predictions, ultimately resulting in smoother distributions. The peak suppression behavior reduces overconfidence on training data, thereby improving the model's generalization ability. As presented in Figure 2 (right), CR-CTC exhibits reduced token emitting probabilities and an increased occurrence of repeating non-blank tokens. A comparison of concrete statistics on the distribution peakedness between CTC and CR-CTC is provided in Table 6.
+
+Inspired by this, we also propose a simple method, called Smooth-Regularized CTC (SR-CTC), which incorporates an auxiliary loss into regular CTC, specifically encouraging the model to learn smoother CTC distributions. Appendix Section A.1 presents the details of SR-CTC.
+
+# 4 EXPERIMENTS
+
+# 4.1 EXPERIMENTAL SETUP
+
+Datasets. To evaluate the effectiveness of our proposed CR-CTC, we conduct experiments on three publicly available ASR datasets: 1) LibriSpeech (Panayotov et al., 2015), which contains 1000 hours of English speech; 2) Aishell-1 (Bu et al., 2017), which consists of 170 hours of Mandarin speech; 3) GigaSpeech (Chen et al., 2021a), comprising 10000 hours of English speech.
+
+Implementation details. Our experiments are performed using the icefall framework $^{2}$ , with Lhotse toolkit (Zelasko et al., 2021) for data preparation. For regular ASR recipes in icefall, default parameter settings of SpecAugment (Park et al., 2019) include a time warping factor of 80, 2 frequency
+
+
+(a) Sample 1 in CTC
+
+
+(b) Sample 1 in CR-CTC
+
+
+
+
+
+
+(c) Sample 2 in CTC
+
+
+(d) Sample 2 in CR-CTC
+
+
+(e) Sample 3 in CTC
+(g) Sample 4 in CTC
+Figure 2: Visualization of token emitting probabilities for vanilla CTC (left) and our CR-CTC (right) on four randomly selected samples from LibriSpeech test set. The gray dashed lines indicate the blank token. Compared to vanilla CTC, the token distributions in CR-CTC are smoother with lower emitting probabilities and more repeating non-blank tokens.
+
+
+(f) Sample 3 in CR-CTC
+(h) Sample 4 in CR-CTC
+
+masking regions with a maximum width of 27, and 10 time masking regions with a maximum width of 100, along with a maximum masking fraction of $15\%$ specifically for time masking. In our CR-CTC systems, we utilize larger amount of time masking through increasing both the number of time masking regions and the maximum masking fraction by a factor of 2.5. Speed perturbation (Ko et al., 2015) with factors 0.9, 1.0 and 1.1 is applied to LibriSpeech (Panayotov et al., 2015) and Aishell-1 (Bu et al., 2017) datasets. The input features are 80-dimensional mel-spectrograms extracted using 25-ms windows with a 10-ms shift. For LibriSpeech and GigaSpeech datasets, we employ 500-class Byte Pair Encoding (BPE) (Sennrich et al., 2016) word pieces as modeling units, while for Aishell-1 dataset, we use 4336-class characters. By default, we set $\alpha$ in Equation 3 to 0.2. Zipformer (Yao et al., 2024), which uses dropout (Srivastava et al., 2014) and stochastic depth (Huang et al., 2016), is used as our speech encoder due to its speed and high performance. It takes input features at frame rate of $100\mathrm{Hz}$ , processes the sequence through 6 stacks with frame rates of $50\mathrm{Hz}$ , $25\mathrm{Hz}$ , $12.5\mathrm{Hz}$ , $6.25\mathrm{Hz}$ , $12.5\mathrm{Hz}$ , and $25\mathrm{Hz}$ , and finally produces the encoder output at frame rate of $25\mathrm{Hz}$ . Following (Yao et al., 2024), pruned transducer (Kuang et al., 2022), a highly optimized and memory-efficient version of transducer, is employed for comparison. Word-error-rate (WER) and character-error-rate (CER) are employed as ASR metrics for English and Mandarin datasets, respectively. As CR-CTC requires two forward pass during training, we train CR-CTC models with half the batch size and half the number of epochs compared to CTC models, ensuring a fair com
+
+parison in terms of training cost. Training configuration in terms of number of GPUs and training epochs are provided in Appendix Section A.2. For CTC and CR-CTC systems, we use prefix search decoding (Graves et al., 2006) with a beam size of 4 for comparisons against other state-of-the-art models, and employ greedy search decoding for ablation studies. Results comparison between these two decoding methods are provided in Appendix Section A.3. For pruned transducer models, we use beam search decoding with beam size of 4 (Kang et al., 2023). For CTC/AED systems, we use joint decoding that combines CTC scores and AED scores (Watanabe et al., 2017).
+
+# 4.2 COMPARISON WITH STATE-OF-THE-ART MODELS
+
+In this section, we compare our CR-CTC with other state-of-the-art models. For LibriSpeech and GigaSpeech datasets, we also use CR-CTC as an auxiliary loss in CTC/AED and pruned transducer systems for joint training (denoted as CR-CTC/AED and pruned transducer w/ CR-CTC), to further validate the representation learning capability of CR-CTC. Note that for the models that combine CR-CTC and pruned transducer, we only utilize the transducer head for decoding, without incorporating the CTC scores. For the larger GigaSpeech dataset, we additionally use a even larger scale of Zipformer (Zipformer-XL). Model configuration of different scales of Zipformer are provided in Table 15. For Aishell-1 dataset, which is considerably smaller, we conduct experiments on Zipformer-S and Zipformer-M to ensure comparable parameter counts with other models reported in the literature.
+
+Table 1: WER(%) performance of our method on LibriSpeech dataset compared to the best results reported in the literature without using an external language model.
+
+
Model
Params (M)
WER (%)
test-clean
test-other
CTC/AED, E-Branchformer-B (Kim et al., 2023)
41.1
2.49
5.61
CTC/AED, Branchformer (Peng et al., 2022)
116.2
2.4
5.5
CTC/AED, E-Branchformer-L (Kim et al., 2023)
148.9
2.14
4.55
Transducer, ContextNet-S (Han et al., 2020)
10.8
2.9
7.0
Transducer, ContextNet-M (Han et al., 2020)
31.4
2.4
5.4
Transducer, ContextNet-L (Han et al., 2020)
112.7
2.1
4.6
Transducer, Conformer-S (Gulati et al., 2020)
10.3
2.7
6.3
Transducer, Conformer-M (Gulati et al., 2020)
30.7
2.3
5.0
Transducer, Conformer-L (Gulati et al., 2020)
118.8
2.1
4.3
Transducer, MH-SSM 32L (Fathullah et al., 2023)
140.3
2.01
4.61
Transducer, Stateformer 25L (Fathullah et al., 2023)
139.8
1.91
4.36
CTC/AED, Zipformer-S (Yao et al., 2024)
46.3
2.46
6.04
CTC/AED, Zipformer-M (Yao et al., 2024)
90.0
2.22
4.97
CTC/AED, Zipformer-L (Yao et al., 2024)
174.3
2.09
4.59
Pruned transducer, Zipformer-S (Yao et al., 2024)
23.3
2.42
5.73
Pruned transducer, Zipformer-M (Yao et al., 2024)
65.6
2.21
4.79
Pruned transducer, Zipformer-L (Yao et al., 2024)
148.4
2.00
4.38
CTC, Zipformer-S
22.1
2.85
6.89
CTC, Zipformer-M
64.3
2.52
6.02
CTC, Zipformer-L
147.0
2.5
5.72
CR-CTC, Zipformer-S (ours)
22.1
2.52
5.85
CR-CTC, Zipformer-M (ours)
64.3
2.1
4.61
CR-CTC, Zipformer-L (ours)
147.0
2.02
4.35
CR-CTC/AED, Zipformer-L (ours)
174.3
1.96
4.08
Pruned transducer w/ CR-CTC, Zipformer-L (ours)
148.8
1.88
3.95
+
+LibriSpeech dataset. Table 1 presents the results on LibriSpeech dataset for CR-CTC and other state-of-the-art models. Our CR-CTC significantly outperforms the CTC baselines on all three scales of Zipformer encoder. When comparing to CTC/AED models, our CR-CTC achieves lowerWER on Zipformer-M/L, while yielding comparable result on Zipformer-S. Similarly, our CR-CTC surpasses pruned transducer on Zipformer-M, and performs comparably on Zipformer-L. It also demonstrates that CR-CTC can further enhance the performance of CTC/AED and pruned transducer models when used for jointly training. A notable result is that pruned transducer combined with CR-CTC
+
+using Zipformer-L achieves a new state-of-the-art result of $1.88\% / 3.95\%$ on test-clean/test-other, outperforming both the transducer models with Conformer-L (Gulati et al., 2020) and Stateformer 25L (Fathullah et al., 2023).
+
+Table 2: $\mathrm{{WER}}\left( \% \right)$ performance of our method on Aishell-1 dataset compared to the best results reported in the literature without using an external language model.
+
+
Model
Params (M)
WER (%) dev
test
CTC/AED, Conformer in ESPnet (Watanabe et al., 2018)
46.2
4.5
4.9
CTC/AED, Conformer in WeNet (Yao et al., 2021)
46.3
-
4.61
CTC/AED, E-Branchformer in ESPnet (Watanabe et al., 2018)
37.9
4.2
4.5
CTC/AED, Branchformer (Peng et al., 2022)
45.4
4.19
4.43
Pruned transducer, Zipformer-S (Yao et al., 2024)
30.2
4.4
4.67
Pruned transducer, Zipformer-M (Yao et al., 2024)
73.4
4.13
4.4
CTC, Zipformer-S
23.1
4.89
5.26
CTC, Zipformer-M
66.2
4.47
4.8
CTC/AED, Zipformer-S
39.3
4.47
4.8
CTC/AED, Zipformer-M
83.2
4.0
4.32
CR-CTC, Zipformer-S (ours)
23.1
3.9
4.12
CR-CTC, Zipformer-M (ours)
66.2
3.72
4.02
+
+Aishell-1 dataset. Table 2 presents the results on Aishell-1 dataset. Our CR-CTC models not only significantly outperform vanilla CTC by a substantial margin but also achieve better results than all other CTC/AED and pruned transducer models. For example, CR-CTC with Zipformer-S surpasses CTC/AED with Zipformer-M while using much fewer parameters.
+
+Table 3: WER(%) performance of our method on GigaSpeech dataset compared to the best results reported in the literature without using an external language model.
+
+
Model
Params (M)
WER (%)
dev
test
CTC/AED, Transformer (Chen et al., 2021a)
87
12.30
12.30
CTC/AED, Conformer in Wenet (Zhang et al., 2022)
113.2
10.7
10.6
CTC/AED, Conformer in ESPnet (Chen et al., 2021a)
113.2
10.9
10.8
CTC/AED, E-Branchformer in ESPnet (Watanabe et al., 2018)
148.9
10.6
10.5
CTC, Zipformer-S
22.1
12.08
11.95
CTC, Zipformer-M
64.3
11.23
11.27
CTC, Zipformer-L
147.0
11.16
11.16
CTC, Zipformer-XL
286.6
10.8
10.87
CTC/AED, Zipformer-S
46.3
11.4
11.39
CTC/AED, Zipformer-M
90.0
10.57
10.61
CTC/AED, Zipformer-L
174.3
10.26
10.38
CTC/AED, Zipformer-XL
315.5
10.22
10.33
Pruned transducer, Zipformer-S
23.3
10.98
10.94
Pruned transducer, Zipformer-M
65.6
10.37
10.42
Pruned transducer, Zipformer-L
148.4
10.23
10.28
Pruned transducer, Zipformer-XL
288.2
10.09
10.2
CR-CTC, Zipformer-S (ours)
22.1
11.68
11.58
CR-CTC, Zipformer-M (ours)
64.3
10.62
10.72
CR-CTC, Zipformer-L (ours)
147.0
10.31
10.41
CR-CTC, Zipformer-XL (ours)
286.6
10.15
10.28
CR-CTC/AED, Zipformer-XL (ours)
315.5
9.92
10.07
Pruned transducer w/ CR-CTC, Zipformer-XL (ours)
286.6
9.95
10.03
+
+GigaSpeech dataset. Table 3 shows the results on GigaSpeech dataset. Our CR-CTC consistently achieves a significantly lower WER than vanilla CTC across all scales of Zipformer. In comparisons with CTC/AED or pruned transducer models, our CR-CTC demonstrates comparable performance
+
+on Zipformer L/XL. Additionally, the results indicate that employing CR-CTC for joint training can further improve the performance of both CTC/AED and pruned transducer models.
+
+# 4.3 ABLATION STUDIES
+
+We now perform ablation studies on LibriSpeech dataset using Zipformer-M encoder to investigate the effect of each component in CR-CTC (Section 3.2), and to validate our explanations of its behaviors (Section 3.3). Results of tuning $\alpha$ in Equation 3 and the ratio used to increase the amount of time masking are presented in Table 16.
+
+Table 4: Ablation studies for self-distillation in CR-CTC on LibriSpeech dataset using Zipformer-M encoder and greedy search decoding.
+
+
Method
WER (%)
test-clean
test-other
CTC baseline
2.51
6.02
EMA-distilled CTC
2.31
5.25
CR-CTC (final)
2.12
4.62
No larger time masking
2.19
4.98
No larger time masking, no different augmented views
2.27
5.11
Use hard-label CE-based LCR
2.14
4.84
Remove sg in LCR
2.24
4.97
+
+Self-distillation. One self-distillation method in self-supervised learning is to construct a teacher model by tracking the model weights using exponential moving average (EMA) (Grill et al., 2020; He et al., 2020; Baevski et al., 2023). For comparison, we include this approach, referred to as EMA-distilled CTC, which incorporates an auxiliary loss to learn from the CTC distribution of the EMA teacher model. Its details are provided in Appendix Section A.6. As presented in Table 4, CR-CTC significantly outperforms EMA-distilled CTC, demonstrating its superiority in self-distillation. For CR-CTC, both the lack of increased time masking and the absence of different augmented views lead to WER degradation, indicating the effectiveness of enhancing the input diversity between sub-models during self-distillation. Replacing $D_{\mathrm{KL}}$ with hard label-based cross-entropy (CE) function in $\mathcal{L}_{\mathrm{CR}}$ (Equation 4) results in a WER degradation of $0.02\% / 0.22\%$ on test-clean/test-other. This suggests the advantage of using $D_{\mathrm{KL}}$ which enables a finer-grained self-distillation as it distills over the full CTC lattice, whereas the hard label CE-based method only distills the best alignment. When removing the sg operation in $\mathcal{L}_{\mathrm{CR}}$ , the WER increase by $0.12\% / 0.35\%$ , which implies that the model might have a tendency towards a degenerated solution (Chen & He, 2021) that is insensitive to the pattern of input masking and model dropout.
+
+Table 5: Ablation studies for masked prediction in CR-CTC on LibriSpeech dataset using Zipformer-M encoder and greedy search decoding.
+
+
Method
WER (%)
test-clean
test-other
CTC baseline
2.51
6.02
Use larger time masking
2.68
6.28
CR-CTC (final)
2.12
4.62
No larger time masking
2.19
4.98
No larger time masking, no different augmented views
2.27
5.11
No larger time masking, use larger frequency masking
2.26
4.98
Exclude self-masked frames in LCR
2.32
5.26
Exclude self-unmasked frames in LCR
2.32
5.02
+
+Masked prediction. As reported in Table 5, without increasing the amount of time masking, the WER of CR-CTC increases by $0.07\% / 0.36\%$ on test-clean/test-other, suggesting the effectiveness of enhancing the masked prediction behavior for contextual representation learning. Additionally, without using different augmented views, the WER increases further by $0.12\% / 0.13\%$ . This indicates the advantage of independently applying random time masking, which improves the quality
+
+of the provided target distributions for the masked positions. However, using larger amount of frequency masking leads to a WER degradation of $0.07\%$ on test-clean, implying that the performance gain from increasing the amount of time masking is primarily due to the masked prediction behavior, rather than merely increasing the input diversity for the two branches. Furthermore, applying larger amount of time masking does not benefit the CTC baseline, as it increases the WER by $0.17\% / 0.26\%$ . In the final CR-CTC system, excluding frames with time-masked regions in the current branch (self-masked) from $\mathcal{L}_{\mathrm{CR}}$ (Equation 4) leads to a larger WER degradation compared to excluding the remaining unmasked frames (self-unmasked). This highlights the importance of the masked prediction behavior in the overall performance of CR-CTC.
+
+Table 6: Ablation studies for peak suppression in CR-CTC on LibriSpeech dataset using Zipformer-M encoder and greedy search decoding. We include the averaged duration of all non-blank tokens, as well as the averaged emitting probabilities of the blank token and all non-blank tokens on the best alignments.
+
+
Method
Non-blank duration (frames)
Emit probability (%)
WER (%)
blank
non-blank
test-clean
test-other
CTC baseline
1.04
99.64
98.50
2.51
6.02
SR-CTC
4.25
95.44
90.04
2.32
5.22
CR-CTC
1.28
94.19
89.42
2.12
4.62
+
+Peak suppression. To measure the peakedness of the learned CTC distributions, we compute the averaged duration over all non-blank tokens, as well as the averaged emitting probabilities for the blank token and all non-blank tokens, based on the best alignment obtained through greedy search decoding on the test sets. We also include the method SR-CTC (described in Appendix Section A.1) for comparison. As presented in Table 6, compared to the CTC baseline, CR-CTC learns smoother distributions and significantly improves the recognition performance. Note that SR-CTC also surpasses the CTC baseline by $0.19\% / 0.8\%$ on test-clean/test-other, while exhibiting a notably larger average duration of non-blank tokens. This manifests the effectiveness of peak suppression in reducing overfitting and improving generalization performance.
+
+Table 7: Comparison between CR-CTC and methods using an auxiliary head for jointly training on LibriSpeech dataset using Zipformer-M encoder and greedy search decoding.
+
+
Method
Params (M)
WER (%)
test-clean
test-other
CTC baseline
64.3
2.51
6.02
CTC w/ AED head
90.0
2.46
5.57
CTC w/ pruned transducer head
65.8
2.42
5.4
CR-CTC
64.3
2.12
4.62
+
+Compared to using auxiliary head for jointly training. The straightforward approach to improve the CTC performance is using an auxiliary head of AED (Chan et al., 2015; Hentschel et al., 2024) or pruned transducer (Kuang et al., 2022) for jointly training, while retaining only the CTC head for inference. As reported in Table 7, CR-CTC significantly outperforms these two methods with less model parameters, suggesting the advantage of our method.
+
+# 5 CONCLUSION
+
+In this work, we introduce the CR-CTC to enhance CTC performance. Specifically, it takes as input two different augmented views of the same speech mel-spectrogram, and enforce consistency between the two obtained CTC distributions. We explain our method from three different perspectives: 1) self-distillation between randomly sampled sub-models; 2) masked prediction for positions within time-masked regions, facilitating the learning of contextual representation; 3) peak suppression, which reduces overfitting and improves the model's generalization ability. Extensive experiments on LibriSpeech, Aishell-1, and GigaSpeech datasets demonstrate the effectiveness of CR-CTC. Additionally, detailed ablation studies validate our explanations.
+
+# REFERENCES
+
+Zeyuan Allen-Zhu and Yuanzhi Li. Towards understanding ensemble, knowledge distillation and self-distillation in deep learning. arXiv preprint arXiv:2012.09816, 2020.
+Alexei Baevski, Steffen Schneider, and Michael Auli. vq-wav2vec: Self-supervised learning of discrete speech representations. arXiv preprint arXiv:1910.05453, 2019.
+Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. wav2vec 2.0: A framework for self-supervised learning of speech representations. Advances in neural information processing systems, 33:12449-12460, 2020.
+Alexei Baevski, Arun Babu, Wei-Ning Hsu, and Michael Auli. Efficient self-supervised learning with contextualized target representations for vision, speech and language. In International Conference on Machine Learning, pp. 1416-1429. PMLR, 2023.
+Herve A Bourlard and Nelson Morgan. Connectionist speech recognition: a hybrid approach, volume 247. Springer Science & Business Media, 2012.
+Hui Bu, Jiayu Du, Xingyu Na, Bengu Wu, and Hao Zheng. Aishell-1: An open-source mandarin speech corpus and a speech recognition baseline. In 20th conference of the oriental chapter of the international coordinating committee on speech databases and speech I/O systems and assessment (O-COCOSDA), pp. 1-5, 2017.
+Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535-541, 2006.
+William Chan, Navdeep Jaitly, Quoc V Le, and Oriol Vinyals. Listen, attend and spell. arXiv preprint arXiv:1508.01211, 2015.
+Guoguo Chen, Shuzhou Chai, Guanbo Wang, Jiayu Du, Wei-Qiang Zhang, Chao Weng, Dan Su, Daniel Povey, Jan Trmal, Junbo Zhang, et al. Gigaspeech: An evolving, multi-domain asr corpus with 10,000 hours of transcribed audio. arXiv preprint arXiv:2106.06909, 2021a.
+Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International conference on machine learning, pp. 1597-1607. PMLR, 2020.
+Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 15750-15758, 2021.
+Zhehuai Chen, Andrew Rosenberg, Yu Zhang, Heiga Zen, Mohammadreza Ghodsi, Yinghui Huang, Jesse Emond, Gary Wang, Bhuvana Ramabhadran, and Pedro J Moreno. Semi-supervision in asr: Sequential mismatch and factorized tts-based augmentation. In Interspeech, pp. 736-740, 2021b.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp. 4171-4186, 2019.
+Haisong Ding, Kai Chen, and Qiang Huo. Improving knowledge distillation of ctc-trained acoustic models with alignment-consistent ensemble and target delay. IEEE/ACM transactions on audio, speech, and language processing, 28:2561-2571, 2020.
+Yassir Fathullah, Chunyang Wu, Yuan Shangguan, Junteng Jia, Wenhan Xiong, Jay Mahadeokar, Chunxi Liu, Yangyang Shi, Ozlem Kalinli, Mike Seltzer, et al. Multi-head state space model for speech recognition. arXiv preprint arXiv:2305.12498, 2023.
+Tommaso Furlanello, Zachary Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. In International conference on machine learning, pp. 1607-1616. PMLR, 2018.
+
+Yingying Gao, Junlan Feng, Tianrui Wang, Chao Deng, and Shilei Zhang. A ctc triggered siamese network with spatial-temporal dropout for speech recognition. arXiv preprint arXiv:2206.08031, 2022.
+Robert Geirhos, Jorn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11):665-673, 2020.
+Alex Graves. Sequence transduction with recurrent neural networks. arXiv preprint arXiv:1211.3711, 2012.
+Alex Graves, Santiago Fernández, Faustino Gomez, and Jürgen Schmidhuber. Connectionist temporal classification: labelling unsegmented sequence data with recurrent neural networks. In Proceedings of the 23rd international conference on Machine learning, pp. 369-376, 2006.
+Jean-Bastien Grill, Florian Strub, Florent Alché, Coretin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach to self-supervised learning. Advances in neural information processing systems, 33:21271-21284, 2020.
+Anmol Gulati, James Qin, Chung-Cheng Chiu, Niki Parmar, Yu Zhang, Jiahui Yu, Wei Han, Shibo Wang, Zhengdong Zhang, Yonghui Wu, and Ruoming Pang. Conformer: Convolution-augmented Transformer for Speech Recognition. In Proc. Interspeech 2020, pp. 5036-5040, 2020.
+Wei Han, Zhengdong Zhang, Yu Zhang, Jiahui Yu, Chung-Cheng Chiu, James Qin, Anmol Gulati, Ruoming Pang, and Yonghui Wu. Contextnet: Improving convolutional neural networks for automatic speech recognition with global context. In Interspeech 2020, pp. 3610-3614, 2020.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 9729-9738, 2020.
+Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dólár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 16000-16009, 2022.
+Michael Hentschel, Yuta Nishikawa, Tatsuya Komatsu, and Yusuke Fujita. Keep decoding parallel with effective knowledge distillation from language models to end-to-end speech recognisers. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 10876-10880. IEEE, 2024.
+Byeongho Heo, Taekyung Kim, Sangdoo Yun, and Dongyoon Han. Masking augmentation for supervised learning. arXiv preprint arXiv:2306.11339, 2023.
+Yosuke Higuchi, Niko Moritz, Jonathan Le Roux, and Takaaki Hori. Momentum pseudo-labeling for semi-supervised speech recognition. arXiv preprint arXiv:2106.08922, 2021.
+Geoffrey Hinton, Li Deng, Dong Yu, George E Dahl, Abdel-rahman Mohamed, Navdeep Jaitly, Andrew Senior, Vincent Vanhoucke, Patrick Nguyen, Tara N Sainath, et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal processing magazine, 29(6):82-97, 2012.
+Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. ArXiv, abs/1503.02531, 2015.
+Wei-Ning Hsu, Benjamin Bolte, Yao-Hung Hubert Tsai, Kushal Lakhotia, Ruslan Salakhutdinov, and Abdelrahman Mohamed. Hubert: Self-supervised speech representation learning by masked prediction of hidden units. IEEE/ACM transactions on audio, speech, and language processing, 29:3451-3460, 2021.
+Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q Weinberger. Deep networks with stochastic depth. In Computer Vision-ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV 14, pp. 646-661, 2016.
+
+Ruizhe Huang, Xiaohui Zhang, Zhaoheng Ni, Li Sun, Moto Hira, Jeff Hwang, Vimal Manohar, Vineel Pratap, Matthew Wiesner, Shinji Watanabe, et al. Less peaky and more accurate ctc forced alignment by label priors. In ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 11831-11835. IEEE, 2024.
+Dongwei Jiang, Wubo Li, Miao Cao, Wei Zou, and Xiangang Li. Speech simCLR: Combining contrastive and reconstruction objective for self-supervised speech representation learning. arXiv preprint arXiv:2010.13991, 2020.
+Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S Weld, Luke Zettlemoyer, and Omer Levy. Spanbert: Improving pre-training by representing and predicting spans. Transactions of the association for computational linguistics, 8:64-77, 2020.
+Wei Kang, Liyong Guo, Fangjun Kuang, Long Lin, Mingshuang Luo, Zengwei Yao, Xiaoyu Yang, Piotr Želasko, and Daniel Povey. Fast and parallel decoding for transducer. In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1-5. IEEE, 2023.
+Soheil Khorram, Jaeyoung Kim, Anshuman Tripathi, Han Lu, Qian Zhang, and Hasim Sak. Contrastive siamese network for semi-supervised speech recognition. In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 7207-7211. IEEE, 2022.
+Eungbeom Kim, Hantae Kim, and Kyogu Lee. Guiding frame-level ctc alignments using self-knowledge distillation. arXiv preprint arXiv:2406.07909, 2024.
+Kwangyoun Kim, Felix Wu, Yifan Peng, Jing Pan, Prashant Sridhar, Kyu J Han, and Shinji Watanabe. E-branchformer: Branchformer with enhanced merging for speech recognition. In 2022 IEEE Spoken Language Technology Workshop (SLT), pp. 84–91. IEEE, 2023.
+Tom Ko, Vijayaditya Peddinti, Daniel Povey, and Sanjeev Khudanpur. Audio augmentation for speech recognition. In Sixteenth annual conference of the international speech communication association, 2015.
+Fangjun Kuang, Liyong Guo, Wei Kang, Long Lin, Mingshuang Luo, Zengwei Yao, and Daniel Povey. Pruned rnnt for fast, memory-efficient asr training. arXiv preprint arXiv:2206.13236, 2022.
+Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016.
+Ryo Masumura, Mana Ihori, Akihiko Takashima, Takafumi Moriya, Atsushi Ando, and Yusuke Shinohara. Sequence-level consistency training for semi-supervised end-to-end automatic speech recognition. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 7054-7058. IEEE, 2020.
+Hossein Mobahi, Mehrdad Farajtabar, and Peter Bartlett. Self-distillation amplifies regularization in hilbert space. Advances in Neural Information Processing Systems, 33:3351-3361, 2020.
+Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
+Vassil Panayotov, Guoguo Chen, Daniel Povey, and Sanjeev Khudanpur. Librispeech: an asr corpus based on public domain audio books. In IEEE international conference on acoustics, speech and signal processing (ICASSP), pp. 5206-5210, 2015.
+Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779, 2019.
+Yifan Peng, Siddharth Dalmia, Ian Lane, and Shinji Watanabe. Branchformer: Parallel mlp-attention architectures to capture local and global context for speech recognition and understanding. In International Conference on Machine Learning, pp. 17627-17643. PMLR, 2022.
+
+Heli Qi, Sashi Novitasari, Sakriani Sakti, and Satoshi Nakamura. Improved consistency training for semi-supervised sequence-to-sequence asr via speech chain reconstruction and self-transcribing. arXiv preprint arXiv:2205.06963, 2022.
+Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. Advances in neural information processing systems, 29, 2016.
+Hasim Sak, Andrew Senior, Kanishka Rao, Ozan Irsoy, Alex Graves, Françoise Beaufays, and Johan Schalkwyk. Learning acoustic frame labeling for speech recognition with recurrent neural networks. In 2015 IEEE international conference on acoustics, speech and signal processing (ICASSP), pp. 4280-4284, 2015.
+Ashtosh Sapru. Using data augmentation and consistency regularization to improve semi-supervised speech recognition. 2022.
+Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, pp. 1715-1725, 2016.
+Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin A Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. Advances in neural information processing systems, 33:596-608, 2020.
+Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929-1958, 2014.
+Ryoichi Takashima, Li Sheng, and Hisashi Kawai. Investigation of sequence-level knowledge distillation methods for ctc acoustic models. In ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 6156-6160. IEEE, 2019.
+Hugo Touvron, Matthieu Cord, Maxime Oquab, Piotr Bojanowski, Jakob Verbeek, and Hervé Jégou. Co-training 21 submodels for visual recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11701-11710, 2023.
+Shinji Watanabe, Takaaki Hori, Suyoun Kim, John R Hershey, and Tomoki Hayashi. Hybrid ctc/attention architecture for end-to-end speech recognition. IEEE Journal of Selected Topics in Signal Processing, 11(8):1240-1253, 2017.
+Shinji Watanabe, Takaaki Hori, Shigeki Karita, Tomoki Hayashi, Jiro Nishitoba, Yuya Unno, Nelson Enrique Yalta Soplin, Jahn Heymann, Matthew Wiesner, Nanxin Chen, Adithya Renduchintala, and Tsubasa Ochiai. ESPnet: End-to-end speech processing toolkit. In Proceedings of Interspeech, pp. 2207-2211, 2018.
+Felix Weninger, Franco Mana, Roberto Gemello, Jesús Andres-Ferrer, and Puming Zhan. Semi-supervised learning with data augmentation for end-to-end asr. arXiv preprint arXiv:2007.13876, 2020.
+Lijun Wu, Juntao Li, Yue Wang, Qi Meng, Tao Qin, Wei Chen, Min Zhang, Tie-Yan Liu, et al. R-drop: Regularized dropout for neural networks. Advances in Neural Information Processing Systems, 34:10890-10905, 2021.
+Zengwei Yao, Liyong Guo, Xiaoyu Yang, Wei Kang, Fangjun Kuang, Yifan Yang, Zengrui Jin, Long Lin, and Daniel Povey. Zipformer: A faster and better encoder for automatic speech recognition. In The Twelfth International Conference on Learning Representations, 2024.
+Zhuoyuan Yao, Di Wu, Xiong Wang, Binbin Zhang, Fan Yu, Chao Yang, Zhendong Peng, Xiaoyu Chen, Lei Xie, and Xin Lei. WeNet: Production Oriented Streaming and Non-Streaming End-to-end Speech Recognition Toolkit. In Proc. Interspeech, pp. 4054–4058, 2021.
+Ji Won Yoon, Hyeonseung Lee, Ju Yeon Kang, and Nam Soo Kim. Cons-kd: Dropout-robust knowledge distillation for ctc-based automatic speech recognition. IEEE Access, 2024.
+
+Piotr Želasko, Daniel Povey, Jan Trmal, Sanjeev Khudanpur, et al. Lhotse: a speech data representation library for the modern deep learning ecosystem. arXiv preprint arXiv:2110.12561, 2021.
+Binbin Zhang, Di Wu, Zhendong Peng, Xingchen Song, Zhuoyuan Yao, Hang Lv, Lei Xie, Chao Yang, Fuping Pan, and Jianwei Niu. Wenet 2.0: More productive end-to-end speech recognition toolkit. arXiv preprint arXiv:2203.15455, 2022.
+Linfeng Zhang, Jiebo Song, Anni Gao, Jingwei Chen, Chenglong Bao, and Kaisheng Ma. Be your own teacher: Improve the performance of convolutional neural networks via self distillation. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 3713-3722, 2019.
+Xiatian Zhu, Shaogang Gong, et al. Knowledge distillation by on-the-fly native ensemble. Advances in neural information processing systems, 31, 2018.
+
+# A APPENDIX
+
+# A.1 SMOOTH-REGULARIZED CTC
+
+Smooth-regularized CTC (SR-CTC) discourages peaky distributions by adding an smooth regularization loss (denoted as $\mathcal{L}_{\mathrm{SR}}$ ) to regular CTC model. Specifically, we first apply a smooth kernel $K$ of size 3 to the model prediction $\mathbf{z}$ , smoothing it along the time dimension: $\mathbf{z}^{(s)} = \text{smooth}(\mathbf{z}, K)$ . The smoothing operation is done by using a 1-D depth-wise convolution layer. Then we minimize the $D_{\mathrm{KL}}$ between $\mathbf{z}$ and $\mathbf{z}^{(s)}$ , similar to the consistency loss in CR-CTC (Equation 4):
+
+$$
+\mathcal {L} _ {\mathrm {S R}} \left(\mathbf {z}, \mathbf {z} ^ {(s)}\right) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(s g \left(z _ {t} ^ {(s)}\right) \| z _ {t}\right). \tag {5}
+$$
+
+The overall loss of $SR-CTC$ is formulated as:
+
+$$
+\mathcal {L} ^ {\prime} = \mathcal {L} _ {\mathrm {C T C}} (\mathbf {z}, \mathbf {y}) + \beta \mathcal {L} _ {\mathrm {S R}} (\mathbf {z}, \mathbf {z} ^ {(s)}), \tag {6}
+$$
+
+where $\beta$ is a hyper-parameter. In this work, we use $K = (0.25, 0.5, 0.25)$ and $\beta = 0.2$ .
+
+We validate its effectiveness in Section 4.3. Table 6 presents the experimental result.
+
+# A.2 TRAINING CONFIGURATION
+
+Training configuration, including the number of GPUs and training epochs, on LibriSpeech, Aishell-1 and GigaSpeech datasets are presented in Table 8, Table 9, and Table 10, respectively.
+
+Table 8: Training configuration on LibriSpeech dataset.
+
+
Model
GPUs(80G NVIDIA Tesla A100)
Epochs
CTC, Zipformer-S
1
100
CTC, Zipformer-M
2
100
CTC, Zipformer-L
2
100
CR-CTC, Zipformer-S
1
50
CR-CTC, Zipformer-M
2
50
CR-CTC, Zipformer-L
2
50
CR-CTC/AED, Zipformer-L
2
50
Pruned transducer w/ CR-CTC, Zipformer-L
2
50
+
+Table 9: Training configuration on Aishell-1 dataset.
+
+
Model
GPUs(80G NVIDIA Tesla A100)
Epochs
CTC, Zipformer-S
1
120
CTC, Zipformer-M
1
120
CTC/AED, Zipformer-S
1
60
CTC/AED, Zipformer-M
1
60
CR-CTC, Zipformer-S
1
60
CR-CTC, Zipformer-M
1
60
+
+# A.3 RESULTS OF DIFFERENT DECODING METHODS
+
+Results comparison between greedy search decoding and prefix search decoding for CTC and CR-CTC on LibriSpeech, Aishell-1 and GigaSpeech datasets are presented in Table 11, Table 12, and Table 13, respectively. In addition, Table 14 presents the results of different beam sizes for prefix search decoding on LibriSpeech dataset with Zipformer-M encoder.
+
+Table 10: Training configuration on GigaSpeech dataset.
+
+
Model
GPUs(80G NVIDIA Tesla A100)
Epochs
CTC, Zipformer-S
2
60
CTC, Zipformer-M
2
60
CTC, Zipformer-L
2
60
CTC, Zipformer-XL
4
60
CTC/AED, Zipformer-S
2
30
CTC/AED, Zipformer-M
2
30
CTC/AED, Zipformer-L
2
30
CTC/AED, Zipformer-XL
4
30
Pruned transducer, Zipformer-S
2
30
Pruned transducer, Zipformer-M
2
30
Pruned transducer, Zipformer-L
2
30
Pruned transducer, Zipformer-XL
4
30
CR-CTC, Zipformer-S
2
30
CR-CTC, Zipformer-M
2
30
CR-CTC, Zipformer-L
2
30
CR-CTC, Zipformer-XL
4
30
CR-CTC/AED, Zipformer-XL
4
30
Pruned transducer w/ CR-CTC, Zipformer-XL
4
30
+
+Table 11:WER $(\%)$ results of different decoding methods on LibriSpeech dataset.
+
+
Model
Greedy search decoding
Prefix search decoding
test-clean
test-other
test-clean
test-other
CTC, Zipformer-S
2.85
6.91
2.85
6.89
CTC, Zipformer-M
2.51
6.02
2.52
6.02
CTC, Zipformer-L
2.49
5.7
2.5
5.72
CR-CTC, Zipformer-S
2.57
5.95
2.52
5.85
CR-CTC, Zipformer-M
2.12
4.62
2.1
4.61
CR-CTC, Zipformer-L
2.03
4.37
2.02
4.35
+
+Table 12:WER $(\%)$ results of different decoding methods on Aishell-1 dataset.
+
+
Model
Greedy search decoding
Prefix search decoding
dev
test
dev
test
CTC, Zipformer-S
4.88
5.26
4.89
5.26
CTC, Zipformer-M
4.46
4.8
4.47
4.8
CR-CTC, Zipformer-S
3.9
4.12
3.9
4.12
CR-CTC, Zipformer-M
3.73
4.02
3.72
4.02
+
+Table 13:WER $(\%)$ results of different decoding methods on GigaSpeech dataset.
+
+
Model
Greedy search decoding
Prefix search decoding
dev
test
dev
test
CTC, Zipformer-S
12.15
12.03
12.08
11.95
CTC, Zipformer-M
11.3
11.31
11.23
11.27
CTC, Zipformer-L
11.21
11.19
11.16
11.16
CTC, Zipformer-XL
10.85
10.91
10.8
10.87
CR-CTC, Zipformer-S
11.85
11.8
11.68
11.58
CR-CTC, Zipformer-M
10.78
10.88
10.62
10.72
CR-CTC, Zipformer-L
10.42
10.56
10.31
10.41
CR-CTC, Zipformer-XL
10.28
10.41
10.15
10.28
+
+Table 14: WER (%) results of different beam sizes for prefix search decoding on LibriSpeech dataset using Zipformer-M encoder.
+
+
Method
Beam size
test-clean
test-other
CTC
1
2.52
6.02
2
2.52
6.02
4
2.52
6.02
8
2.52
6.02
CR-CTC
1
2.1
4.61
2
2.1
4.61
4
2.1
4.61
8
2.1
4.61
+
+# A.4 MODEL CONFIGURATION OF DIFFERENT SCALES OF ZIPFORMER
+
+Table 15 presents model configuration of different scales of Zipformer.
+
+Table 15: Model configuration of Zipformer at four different scales.
+
+
Scale
layer-numbers
embedding-dimensions
feed-forward-dimensions
S
{2,2,2,2,2,2}
{192,256,256,256,256,256}
{512,768,768,768,768,768}
M
{2,2,3,4,3,2}
{192,256,384,512,384,256}
{512,768,1024,1536,1024,768}
L
{2,2,4,5,4,2}
{192,256,512,768,512,256}
{512,768,1536,2048,1536,768}
XL
{2,2,4,5,4,2}
{192,384,768,1024,768,384}
{512,1024,2048,3072,2048,1024}
+
+# A.5 ABLATION STUDIES ON HYPER-PARAMETER TUNING
+
+Table 16 presents results of tuning hyper-parameters, including $\alpha$ in Equation 3 and the ratio used to increase the amount of time masking for CR-CTC.
+
+Table 16: Results of tuning $\alpha$ that controls $\mathcal{L}_{\mathrm{CR}}$ (Equation 3) and the ratio used to increase the amount of time-masking for CR-CTC on LibriSpeech dataset using Zipformer-M encoder and greedy search decoding.
+
+
Hyper-parameter
WER (%)
test-clean
test-other
α = 0.1
2.19
4.8
α = 0.2 (final)
2.12
4.62
α = 0.3
2.23
4.84
1.0× time masking
2.19
4.98
1.5× time masking
2.19
4.73
2.0× time masking
2.17
4.71
2.5× time masking (final)
2.12
4.62
3.0× time masking
2.17
4.81
+
+# A.6 EMA-DISTILLED CTC
+
+In EMA-distilled CTC, the teacher model $f^{(e)}$ is dynamically constructed for self-distillation. Its weights $\theta^{(e)}$ are updated using the exponential moving average of the current model's weights $\theta$ : $\theta^{(e)} \gets \tau \theta^{(e)} + (1 - \tau) \theta$ , where $\tau = \min(0.9999, 1 - 10 / \max(20, \text{step}))$ . The teacher model $f^{(e)}$ processes the unmasked input $\mathbf{x}^{(e)}$ , and produces the CTC distribution $\mathbf{z}^{(e)} = f^{(e)}(\mathbf{x}^{(e)})$ which serves as distillation target for the current model $f$ . Similar to $\mathcal{L}_{\mathrm{CR}}$ in CR-CTC (Equation 4), the
+
+distillation loss $\mathcal{L}_{\mathrm{EMA}}$ is defined as:
+
+$$
+\mathcal {L} _ {\mathrm {E M A}} \left(\mathbf {z}, \mathbf {z} ^ {(e)}\right) = \sum_ {t = 1} ^ {T} D _ {\mathrm {K L}} \left(s g \left(z _ {t} ^ {(e)}\right) \| z _ {t}\right). \tag {7}
+$$
+
+The overall loss of EMA-distilled CTC is formulated as:
+
+$$
+\mathcal {L} ^ {\prime \prime} = \mathcal {L} _ {\mathrm {C T C}} (\mathbf {z}, \mathbf {y}) + \gamma \mathcal {L} _ {\mathrm {E M A}} (\mathbf {z}, \mathbf {z} ^ {(e)}), \tag {8}
+$$
+
+where $\gamma$ is a hyper-parameter. In this work, we use $\gamma = 0.2$ . Table 4 presents the experimental result.
+
+# A.7 RESULTS USING CONFORMER ENCODER
+
+To validate the effectiveness and generalization ability of our proposed CR-CTC, we conduct experiments on LibriSpeech dataset using a Conformer (Gulati et al., 2020) encoder, comparing different methods including CTC (Graves et al., 2006), CTC/AED (Watanabe et al., 2017), pruned transducer (Kuang et al., 2022) and CR-CTC. Specifically, we use a 12-layer Conformer, with an embedding dimension of 512, a convolution kernel size of 31, and a feedforward hidden dimension of 2048. For the CTC/AED model, the AED decoder is modeled by a 6-layer Transformer, where each layer has an attention dimension of 512 and a feedforward hidden dimension of 2048. The vanilla CTC model is trained for 100 epochs, while the other three models are trained for 50 epochs. Table 17 presents the experimental results. CR-CTC substantially outperforms the vanilla CTC and achieves marginally better results compared to the pruned transducer and CTC/AED.
+
+Table 17: $\mathrm{{WER}}\left( \% \right)$ performance of difference methods on LibriSpeech dataset using a 12-layer Conformer encoder.
+
+
Method
Params (M)
WER (%)
test-clean
test-other
CTC
77.4
2.92
7.15
CTC/AED
103.1
2.5
5.94
Pruned transducer
78.6
2.49
5.87
CR-CTC (ours)
77.4
2.43
5.78
\ No newline at end of file
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/images.zip b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..0bc1efeee5a305654d2ceaf8d287c0d241d74b49
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0a47021da08f9a6615b0eb95e88434f31d8c1a1e2df73a7cfc29ad5e42f250ab
+size 996963
diff --git a/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/layout.json b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..cfb2e0453e3bfc2aa131db9990ebdd47f11be7f7
--- /dev/null
+++ b/ICLR/2025/CR-CTC_ Consistency regularization on CTC for improved speech recognition/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:687d8d47dd0dd356f6600c8171360b00ced08108ba6433133d78289bd3b99632
+size 505384
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_content_list.json b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..183a4ff739adf9af788be9f02bba0a03a63b8785
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:32186cc60c6f84de1789f854e82a4e7592db0697e05e51a7a9706de96a12a313
+size 98798
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_model.json b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..aeca1b403a19859893010103d542aaa546e0d282
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9e1148d631a888dc18b6d5e08e4b884daebc6be46cb5f63cfa3800c2110d66ee
+size 118862
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_origin.pdf b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..7a570420f6036c9cb040ed899b976ffaa71a84e9
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/87300580-15c5-4fba-8309-cef18bd6c7ba_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d718d7579c21b3a523549961a616b0af184a00661704b3e26fe28e29e74133b
+size 862342
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/full.md b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..a178c05c8cb0c802724ee52352d81ab5270dfd75
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/full.md
@@ -0,0 +1,332 @@
+# CR2PQ: CONTINUOUS RELATIVE ROTARY POSITIONAL QUERY FOR DENSE VISUAL REPRESENTATION LEARNING
+
+Shaofeng Zhang $^{1}$ , Qiang Zhou $^{2}$ , Sitong Wu $^{3}$ , Haoru Tan $^{4}$ , Zhibin Wang $^{2}$ , Jina Huang $^{5}$ , Junchi Yan $^{1*}$
+
+1Sch. of Computer Science & Sch. of Aitificial Intelligence, Shanghai Jiao Tong University
+
+$^{2}$ INF Tech Co., Ltd., $^{3}$ CUHK, $^{4}$ HKU, $^{5}$ Peking University.
+
+{sherrylone, yanjunchi}@sjtu.edu.cn
+
+Code: https://github.com/Sherrylone/PQRoPE
+
+# ABSTRACT
+
+Dense visual representation learning (DRL) shows promise for learning localized information in dense prediction tasks, but struggles with establishing pixel/patch correspondence across different views (cross-contrasting). Existing methods primarily rely on self-contrasting the same view with variations, limiting input variance and hindering downstream performance. This paper delves into the mechanisms of self-contrasting and cross-contrasting, identifying the crux of the issue: transforming discrete positional embeddings to continuous representations. To address the correspondence problem, we propose a Continuous Relative Rotary Positional Query (CR2PQ), enabling patch-level representation learning. Our extensive experiments on standard datasets demonstrate state-of-the-art (SOTA) results. Compared to the previous SOTA method (PQCL), our approach achieves significant improvements on COCO: with 300 epochs of pretraining, CR2PQ obtains $3.4\%$ $\mathrm{mAP}^{bb}$ and $2.1\%$ $\mathrm{mAP}^{mk}$ improvements for detection and segmentation tasks, respectively. Furthermore, CR2PQ exhibits faster convergence, achieving $10.4\%$ $\mathrm{mAP}^{bb}$ and $7.9\%$ $\mathrm{mAP}^{mk}$ improvements over SOTA with just 40 epochs of pretraining.
+
+# 1 INTRODUCTION
+
+Self-supervised representation learning (SSL) has been attracting increasing attention in deep learning, whereby the prediction problem is often formulated as a pretext task with pre-training on unlabeled data. SSL methods can mainly be divided into three categories: 1) generative-based methods (Goodfellow et al., 2014; Donahue & Simonyan, 2019), learning to generate samples in the input space; However, generation can be computationally expensive and may not be necessary for representation learning. 2) contextual-based methods (Gidaris et al., 2018), designing pretext tasks (e.g., denoising auto-encoders (Vincent et al., 2008), context autoencoders (Zhang et al., 2016), etc) to pretrain the backbone; 3) contrastive-based methods (Chen et al., 2020a; He et al., 2020; Chen et al., 2020b; 2021), taking augmented views of the same image as positive pairs and others as negative pairs. Contrastive-based methods have shown great promise in downstream tasks, e.g., image classification/detection (He et al., 2017; Cai & Vasconcelos, 2018) and video classification (Han et al., 2020).
+
+Contrastive learning is a family of instance discrimination-based methods (Chen et al., 2020a; He et al., 2020; Chen et al., 2020b; 2021), which trains the network by distinguishing positive image-level samples from their negative counterparts given query anchors from mini-batches during the learning process. These general (instance-level) contrastive learning (Tian et al., 2020a; Oord et al., 2018) and its many variants (Caron et al., 2021; Zhou et al., 2022; Song & Ermon, 2020) are one of the most popular directions that achieved great success in the past few years and dominate other methods (generative-based and contextual-based) in the field of SSL, especially for linear and finetuning classification tasks.
+
+However, these methods (Caron et al., 2021; Chen et al., 2020a; Grill et al., 2020) are still less competitive on dense predictive tasks (Wang et al., 2021; Xie et al., 2021c), e.g., detection (He et al., 2017) and segmentation (Xiao et al., 2018). The main reason is that instance-level contrastive methods aim to learn global-discriminative information, but lack spatial-sensitive information. To address this issue, some dense contrastive learning (DCL) methods with pixel-wise (Xie et al., 2021c; Wang et al., 2021) and patch-wise (Yun et al., 2022) contrastive objectives and frameworks are proposed. However, these methods still have other limitations: One main shortcoming of these dense contrastive learning methods is establishing the correspondence among pixels/patches usually requires bilinear interpolation, which is complex and heavily sensitive to random crop augmentation (in an extreme case, if two views have no intersection parts, there are no correspondence relation). One simple way to avoid mining the correspondence is inputting the same view (masked and unmasked versions) twice (Zhou et al., 2022). However, the variance of the inputs (masked and unmasked views) is much lower than inputting two different views, where the variance of two views has been proven to be the key to success in contrastive learning (Wang et al., 2022a; Tian et al., 2020b).
+
+To address the correspondence problem, we propose a continuous rotary positional-query-based paradigm. Specifically, we first randomly crop two views from the image, and use the relative coordinate system and rotary positional embedding to represent the relative positions between the two views. Then, we take the rotary relative positional embedding as a query and reconstruct the latent representations (or RGB value) of one view from the other view. Through the relative coordinate system rotary positional query, our CR2PQ significantly simplifies the previous DCL paradigm (usually using GCN or other sub-network to learn the correspondence information), making the dense contrastive learning correspondence-free. Our main contributions are:
+
+i) Correspondence-free DCL via relative coordinate system and continuous rotary positional embedding. Instead of simply employing RoPE to the vision domain (1D to 2D), we further transform the discrete positional embedding to continuous, taking the relative coordinates as input, which makes our CR2PQ correspondence-free. Besides, due to the simplicity of CR2PQ, our methods can be integrated into several popular representation learning paradigms, e.g., MIM-based, CL-based, and Distillation-based methods (See Table 4).
+
+ii) Positional-aware query module. Instead of directly using the vanilla self attention (Vaswani et al., 2017) (which would hurt the downstream performance and bring more computational cost due to the extra query tokens, as the downstream task only inputs the raw tokens), we propose positional-aware cross attention module in the final block between query tokens and patches embeddings to learn semantic information of query tokens, and the cross attention only incurs a few extra parameters.
+
+iii) New SOTA performance. We conduct exhaustive experiments on classification, detection, and segmentation tasks, where our CR2PQ achieves new SOTA results. In particular, CR2PQ outperforms previous DCL methods with a large range, especially on dense prediction tasks. Specifically, it outperforms previous SOTA by $3.4\%$ , and $2.1\%$ points for detection and segmentation on the MSCOCO dataset. CR2PQ surpasses previous SOTA PQCL $1.9\%$ points on ADE20K semantic segmentation. We further conduct experiments to show its convergence speed, and we surprisingly find with few epochs (e.g., 40) pretraining, CR2PQ outperforms previous SOTA DCL methods (Zhang et al., 2023a) $10.4\%$ and $7.9\%$ scores on detection and segmentation on the MSCOCO dataset.
+
+# 2 RELATED WORKS
+
+Instance contrastive learning. Instance self-supervised learning aims to extract informative image representations by leveraging unlabeled data. It achieves this by applying contrastive objectives, which essentially bring similar representations closer while pushing dissimilar ones further apart. A key challenge in contrastive learning is handling negative examples, which are data points used to differentiate the representation of the target image. Memory-based methods like MoCo (He et al., 2020; Chen et al., 2020b) store negative examples in a memory bank for comparisons. SimCLR (Chen et al., 2020a), on the other hand, treats all other data points within the same batch as negative examples. To avoid the need for explicit negative examples, BYOL (Grill et al., 2020) and SimSiam (Chen & He, 2021) employ separate encoder and predictor networks with a stop-gradient mechanism. Barlow Twins (Zbontar et al., 2021), ZeroCL (Zhang et al., 2021), and VICReg (Bardes et al., 2022) achieve similar results by focusing on decorrelating features at different levels. Building upon ZeroCL (Zhang et al., 2021), ARB (Zhang et al., 2022) proposes aligning representations with an orthogonal base for computational efficiency. Inspired by the success of Vision Transformers (ViTs), recent work
+
+like MoCo v3 (He et al., 2020) and DINO (Caron et al., 2021) are replacing convolutional neural networks (CNNs) with ViT backbones.
+
+Dense contrastive self-supervised learning. In contrast to general contrastive learning, dense contrastive learning (Wang et al., 2021; Yang et al., 2021; Ziegler & Asano, 2022; Ge et al., 2021) methods aim to learn spatial-sensitive information to provide a pretrained model to dense predictive tasks (e.g., object detection, instance segmentation and semantic segmentation). DenseCL (Wang et al., 2021) exploits the correspondence by sorting the similarities of pixels in the deep feature map, while PixPro (Xie et al., 2021c) utilizes the augmentation wrapper to get the spatial correspondence of the pixel intersection between two views. Furthermore, Detco (Xie et al., 2021a) tries to improve the performance of general contrastive learning approaches by augmenting multiple global and local views simultaneously. Inspired by PixPro, Resim (Xiao et al., 2021) uses RoI Pooling (Jiang et al., 2018) to extract a feature vector from the associated feature map region for both views. On the basis of DenseCL, SetSim (Wang et al., 2022b) employs a threshold selection to filter out noisy backgrounds. With the development of ViT in SSL (Dosovitskiy et al., 2020), SelfPatch (Yun et al., 2022) treats the spatial neighbors of the patch as positive examples for learning more semantically meaningful relations among patches. On the basis of DINO (Caron et al., 2021), ADCLR (Zhang et al., 2023b) proposes patch-level contrasting via unmasked query tokens and cross-attention mechanism to avoid mining spatial correspondence. To further increase the variance of patch-level contrasting, PQCL (Zhang et al., 2023a) proposes to replace the unmasked query tokens with the relative positional embeddings, which further increase the difficulty of DCL, resulting in better performance in dense predictive tasks.
+
+Masked Image Modeling (MIM). Masked Image Modeling (MIM) is a self-supervised learning technique where the model reconstructs masked portions of an image to learn meaningful representations. MIM methods can be categorized based on the information they reconstruct: (a) raw pixel values, (b) auxiliary features, and (c) masked patch embeddings. SimMIM (Xie et al., 2022) and MAE (He et al., 2021) (a) reconstruct the raw pixel values from masked or partially observed patches. MaskFeat (Wei et al., 2021) (b) incorporates HOG features as supervisory signals for richer semantics. CIM (Fang et al., 2022) (a) enhances robustness by adding perturbations to raw images. iBOT (Zhou et al., 2022) (c) is the first to predict token embeddings, but using the same view might influence downstream tasks. SIM (Tao et al., 2022) (c) addresses this by predicting masked patch embeddings from a different view, but introduces higher computational cost. MIM research offers a promising approach for learning powerful image representations for various computer vision tasks.
+
+RoPE in vision domain. Relative Positional Encoding (RoPE) (Su et al., 2024) has emerged as a promising technique to improve vision transformers. Pioneering studies introduced RoPE to ViT-based architectures, with the Hybrid X-former (Jeevan & Sethi, 2022) applying 1D RoPE. While this approach demonstrates the potential of RoPE, its limitations in capturing spatial relationships hinder performance on complex vision tasks like classification, detection, and segmentation. Additionally, evaluations using small datasets might not accurately reflect the effectiveness of RoPE on larger and more intricate datasets. Recent studies exploring 2D RoPE, such as EVA-02 (Fang et al., 2023) and Unified-IO 2 (Lu et al., 2023), focused on language-related tasks or new model architectures. This work aims to bridge this gap by investigating the effectiveness of 2D RoPE in improving the performance of basic architectures on challenging vision tasks.
+
+# 3 METHODOLOGY
+
+# 3.1 PRELIMINARIES
+
+APE and Vision Transformers. Denote an image by $\mathbf{x} \in \mathbb{R}^{C \times H \times W}$ , where $H \times W$ is the resolution of the image and $C$ is the number of channels. Plain ViT (Dosovitskiy et al., 2020) treats the image $\mathbf{x}$ as a sequence composed of non-overlapping patches $\{\mathbf{x}^{(i)} \in \mathbb{R}^{CP^2}\}_{i=1}^N$ , where each patch has a fixed $P \times P$ resolution. Then, the patches are linearly transformed to $D$ -dimensional patch embeddings $\mathbf{z}^{(i)} = \mathbf{E} \mathbf{x}^{(i)} + \mathbf{P}_{pos}^i \in \mathbb{R}^D$ , where $\mathbf{E} \in \mathbb{R}^{D \times CP^2}$ is the linear projection and $\mathbf{P}_{pos}^i \in \mathbb{R}^D$ is the positional embedding for the $i$ -th patch. A [CLS] token $\mathbf{z}^{([CLS])} \in \mathbb{R}^D$ is subsequently prepended to the patch sequence to extract global information, so the resulting input sequence is represented as $\mathbf{z} = [\mathbf{z}^{([CLS])}, \mathbf{z}^{(1)}, \mathbf{z}^{(2)}, \dots, \mathbf{z}^{(N)}]$ . Then, ViT uses a Transformer encoder (Vaswani et al., 2017) to generate both image-level ([CLS] token) and patch-level (other tokens). In line with SelfPatch (Yun
+
+
+Figure 1: framework of the proposed CR2PQ. We first crop the image twice along with augmentations to generate view $A$ and view $B$ . Then, we compute the continuous relative position of the two views (illustrated in the right figure). For view $A$ and view $B$ , we feed them into the transformer encoder and the pre-trained teacher network, respectively. Then, we use the pre-calculated rotary positional embedding to extract patch-level embeddings of view $B$ through the rotary cross-attention block. Finally, the patch-level and global alignment objectives are added to learn dense representations.
+
+et al., 2022), we use $f_{\theta}$ to denote the whole process of a ViT parameterized by $\theta$ :
+
+$$
+f _ {\theta} (\mathbf {x}) = f _ {\theta} \left(\left[ \mathbf {z} ^ {[ C L S ]}), \mathbf {z} ^ {(1)}, \mathbf {z} ^ {(2)}, \dots , \mathbf {z} ^ {(N)} \right]\right) = \left[ \mathbf {o} ^ {[ C L S ]}), \mathbf {o} ^ {(1)}, \mathbf {o} ^ {(2)}, \dots , \mathbf {o} ^ {(N)} \right] \tag {1}
+$$
+
+where $\mathbf{o}^{[CLS]}$ and $\mathbf{o}^{(i)}$ are the representations of the whole image and $i$ -th patch, respectively.
+
+Rotary positional embedding in 1-D. In Transformer models, self-attention plays a crucial role in capturing relationships between words in a sentence. However, self-attention mechanisms lack inherent knowledge of word order. Positional encoding techniques address this by injecting positional information into the model. Traditional discrete relative positional encoding (RPE) methods (take the discrete patch index as input, and return the positional embeddings), like relative positional bias (RPB), are often limited by the interaction with attention weights, which causes limited utilization of relative position. Thus, RoFormer (Su et al., 2024) proposes a novel relative position embedding method: Rotary Position Embedding (RoPE). RoPE directly incorporates relative position information into the attention computation by applying trigonometric functions (sine and cosine) to key and query vectors. This allows RoPE to interact effectively with attention weights, leading to a comprehensive understanding of word order within the self-attention process. Specifically, RoPE introduces the multiplication of Euler's formula $(e^{i\theta})$ to key and query vectors as relative position embedding, i.e., when $n$ , $m$ -th query and keys in $\mathbf{q}_n$ , $\mathbf{k}_m \in \mathbb{R}^{1 \times D_{head}}$ , RoPE is applied as follows:
+
+$$
+\mathbf {q} _ {n} ^ {\prime} = \mathbf {q} _ {n} e ^ {i n \theta}, \quad \mathbf {k} _ {m} ^ {\prime} = \mathbf {k} _ {m} e ^ {i m \theta}, \quad A t t n _ {n, m} = R e [ \mathbf {q} _ {n} ^ {\prime} \mathbf {k} _ {m} ^ {\prime *} ] = R e [ \mathbf {q} _ {n} \mathbf {k} _ {m} ^ {*} e ^ {i (n - m) \theta} ] \tag {2}
+$$
+
+where $Re[\cdot]$ denotes real part of complex number and $*$ means complex conjugates.
+
+# 3.2 THE PROPOSED CR2PQ
+
+View Generation. Given the image $\mathbf{x} \in \mathbb{R}^{H \times W \times 3}$ in training set, we first randomly crop the image twice to generate two views $\mathbf{x}_A$ and $\mathbf{x}_B$ . Then, we resize the two views to $H \times W \times 3$ . Note that we randomly crop two views, therefore, the positional relationship of the two views might be either containing, overlapping, or non-overlapping. We record the absolute position $\mathbf{p}_A$ of $\mathbf{x}_A$ and $\mathbf{p}_B$ of $\mathbf{x}_B$ , respectively. Specifically, $\mathbf{p}_A$ and $\mathbf{p}_B$ are composed of $\mathbf{p}_A = \{p_{Ai}, p_{Aj}, p_{Ah}, p_{Aw}\}$ (top location, left location, height and width) and $\mathbf{p}_B = \{p_{Bi}, p_{Bj}, p_{Bh}, p_{Bw}\}$ , respectively.
+
+Computing Relative Positional Coordinates. The core idea of our CR2PQ is to use the relative coordinate system and continuous rotary positional embeddings to represent the positional relationship between the two views. For simplicity, we use view $A$ to reconstruct view $B$ as an example. Specifically, Suppose the grid size of the feature map of the view $A$ is $K_{A}$ . Then, the patch index matrix of view $A$ can be written as:
+
+$$
+\mathbf {r p} _ {A} = \left( \begin{array}{c c c c c} (0, 0) & (0, 1) & (0, 2) & \dots & (0, K _ {A} ^ {W} - 1) \\ (1, 0) & (1, 1) & (1, 2) & \dots & (1, K _ {A} ^ {W} - 1) \\ (2, 0) & (2, 1) & (2, 2) & \dots & (2, K _ {A} ^ {W} - 1) \\ \dots & \dots & \dots & \dots & \dots \\ (K _ {A} ^ {H} - 1, 0) & (K _ {A} ^ {H} - 1, 1) & (K _ {A} ^ {H} - 1, 2) & \dots & (K _ {A} ^ {H} - 1, K _ {A} ^ {W} - 1) \end{array} \right) \tag {3}
+$$
+
+
+Figure 2: Illustration of three different scenarios (overlapping, containing, and non-overlapping). The proposed relative coordinate system can easily represent the relative coordinate matrix $\mathbf{r}\mathbf{p}_B$ in both three scenarios. We always use the top-left corner of the view $A$ as the origin point and set the interval of the feature map of view $A$ as 1.
+
+
+
+
+
+where $K_A^H = H / ps_A$ , and $K_A^W = W / ps_A$ , and $ps_A$ is the patch size when inputting the view $A$ to the model. Observed through Eq. 3, we can recognize the patch index matrix $\mathbf{r}\mathbf{p}_A$ as a 2-D coordinates system, where the top-left element is the origin point and the scale of the coordinates system is 1. The detailed illustration can be found in Fig. 2. Since we set each grid size of the feature map of the anchor view as 1, then the relative positional indices (relative coordinates) of the patches of the view $B$ can be written as:
+
+$$
+\begin{array}{l} \mathbf {r p} _ {B} ^ {m, n} (p s _ {A}, p s _ {B}) = \left( \right.\underbrace {\frac {K _ {A} ^ {H} \cdot \left(p _ {B i} - p _ {A i}\right)}{p _ {A h}} + \frac {p _ {b h} \cdot K _ {A} ^ {H} \cdot (m - 1)}{K _ {B} ^ {H} \cdot p _ {A h}}} _ {\text {R o w}}, \\ \underbrace {\frac {K _ {A} ^ {W} \cdot \left(p _ {B j} - p _ {A j}\right)}{p _ {A w}} + \frac {p _ {B w} \cdot K _ {A} ^ {W} \cdot (n - 1)}{K _ {B} ^ {W} \cdot p _ {A w}}} _ {\text {C o l u m n}}) \tag {4} \\ \end{array}
+$$
+
+where $(\mathbf{rp}_B^m, \mathbf{rp}_B^n)$ is the $m$ -th row $n$ -th column element in the coordinate matrix $\mathbf{rp}_B$ . $ps_B$ is the patch size when inputting the view $B$ to the model, and $K_B^H = H / ps_B$ , $K_B^W = W / ps_B$ . Note that $ps_A$ and $ps_B$ are dependent on the patch size of the predefined backbone and teacher networks.
+
+Continuous Relative Rotary Positional Embeddings. Given the coordinate indices matrix $\mathbf{rp}_A$ of view $A$ , suppose the hidden dimensions of each head of the backbone is $D_{head}$ , then we first convert query and key to $\mathbb{C}^{1\times (D_{head} / 4)}$ by considering the $2t$ -th dim as real part and $2t + 1$ -th dim as imaginary part. For each channel, following RoPE (Su et al., 2024), we utilize multiple frequencies $\theta_t$ in the key and query, i.e., $\theta_t = 10000^{-t / (D_{head} / 2)}$ , where $t\in \{0,1,\dots ,D_{head} / 4\}$ . Then, for the $m$ -th row and $n$ -th column location in the positional matrix in Eq. 3 of view $A$ , the rotation matrix $\mathbf{R}_{rot}\in \mathbb{C}^{(K_A^H K_A^W)\times D_{head} / 4}$ can be written as:
+
+$$
+\mathbf {R} _ {\text {r o t}} ^ {(m, n, 2 t)} = e ^ {i \theta_ {t} m}, \quad \mathbf {R} _ {\text {r o t}} ^ {(m, n, 2 t + 1)} = e ^ {i \theta_ {t} m}, \quad 0 \leq t < D _ {\text {h e a d}} / 2 \tag {5}
+$$
+
+$$
+\mathbf {R} _ {r o t} ^ {(m, n, 2 t)} = e ^ {i \theta_ {t} n}, \quad \mathbf {R} _ {r o t} ^ {(m, n, 2 t + 1)} = e ^ {i \theta_ {t} n}, \quad D _ {h e a d} / 2 \leq t < D _ {h e a d}
+$$
+
+Then, for view $B$ , we can replace the $m, n$ in Eq. 5 with $\frac{K_A^H \cdot (p_{Bi} - p_{Ai})}{p_{Ah}} + \frac{p_{bh} \cdot K_A^H \cdot (m-1)}{K_B^H \cdot p_{Ah}}$ and $\frac{K_A^W \cdot (p_{Bj} - p_{Aj})}{p_{Aw}} + \frac{p_{Bw} \cdot K_A^W \cdot (n-1)}{K_B^W \cdot p_{Aw}}$ , respectively. Then, the relative rotary matrix becomes to:
+
+$$
+\mathbf {R} _ {r e l a} ^ {(m, n)} = \left\{ \begin{array}{l} i \theta_ {t} \left[ \frac {K _ {A} ^ {H} \cdot \left(p _ {B i} - p _ {A i}\right)}{p _ {A h}} + \frac {p _ {b h} \cdot K _ {A} ^ {H} \cdot (m - 1)}{K _ {B} ^ {H} \cdot p _ {A h}} \right], \\ e ^ {i \theta_ {t} \left[ \frac {K _ {A} ^ {W} \cdot \left(p _ {B j} - p _ {A j}\right)}{p _ {A w}} + \frac {p _ {B w} \cdot K _ {A} ^ {W} \cdot (n - 1)}{K _ {B} ^ {W} \cdot p _ {A w}} \right]}, \end{array} \quad 0 \leq t < D _ {\text {h e a d}} / 2 \right. \tag {6}
+$$
+
+where $2t$ -th dims are the real part and $2t + 1$ -th dims are the imaginary part.
+
+Framework and Objectives. Given the cropped views $\mathbf{x}_A$ , $\mathbf{x}_B$ , we first calculate the relative positions $\mathbf{rp}_A$ and $\mathbf{rp}_B$ . Then, we calculate the rotary matrix $\mathbf{R}_{rot}$ and relative rotary $\mathbf{R}_{rela}$ via Eq. 5 and Eq. 6, respectively. Then, we feed the $\mathbf{x}_A$ to the encoder network, which is composed of a
+
+patchify layer and several transformer blocks. For each block, we replace the self-attention with:
+
+$$
+\operatorname {A t t n} (\mathbf {Q}, \mathbf {K}, \mathbf {V}) ^ {(m, n)} = \sum_ {h = 0} ^ {K _ {A} ^ {H - 1}} \sum_ {w = 0} ^ {K _ {A} ^ {W - 1}} \frac {\exp \left(\left(\mathbf {R} _ {\text {r o t}} ^ {(m , n)} \mathbf {q} ^ {(m , n)}\right) ^ {\top} \left(\mathbf {R} _ {\text {r o t}} ^ {(h , w)} \mathbf {k} ^ {(h , w)}\right) \cdot\right) \mathbf {v} ^ {(h , w)}}{\sum_ {h = 0} ^ {K _ {A} ^ {H - 1}} \sum_ {w = 0} ^ {K _ {A} ^ {W - 1}} \exp \left(\left(\mathbf {R} _ {\text {r o t}} ^ {(m , n)} \mathbf {q} ^ {(m , n)}\right) ^ {\top} \left(\mathbf {R} _ {\text {r o t}} ^ {(h , w)} \mathbf {k} ^ {(h , w)}\right)\right)} \tag {7}
+$$
+
+where $\mathbf{q}^{(m,n)} = \mathbf{h}^{(m,n)}\mathbf{W}_Q$ , $\mathbf{k}^{(m,n)} = \mathbf{h}^{(m,n)}\mathbf{W}_K$ , and $\mathbf{v}^{(m,n)} = \mathbf{h}^{(m,n)}\mathbf{W}_V$ , where $\mathbf{h}^{(m,n)}$ is the hidden representation of the patch located in $m$ -th row and $n$ -th column. $\mathbf{W}_Q$ , $\mathbf{W}_K$ , $\mathbf{W}_V$ are learnable parameters. Given the parameterized backbone by $f_{\theta}$ , we can calculate the representation of the view $A$ by $\mathbf{h}_A = f_{\theta}(\mathbf{x}_A, \mathbf{R}_{rot})$ . Then, the position-aware cross attention becomes:
+
+$$
+\mathbf {h} ^ {\mathbf {r p} _ {B} ^ {m, n}} = \sum_ {h = 0} ^ {K _ {A} ^ {H - 1}} \sum_ {w = 0} ^ {K _ {A} ^ {W - 1}} \frac {\exp \left((\mathbf {R} _ {r e l a} ^ {(m , n)} \Phi (\mathbf {r p} _ {B} ^ {(m , n)})) ^ {\top} (\mathbf {R} _ {r o t} ^ {(h , w)} \mathbf {k} ^ {(h , w)}) \cdot\right) \mathbf {v} ^ {(h , w)}}{\sum_ {h = 0} ^ {K _ {A} ^ {H - 1}} \sum_ {w = 0} ^ {K _ {A} ^ {W - 1}} \exp \left((\mathbf {R} _ {r e l a} ^ {(m , n)} \Phi (\mathbf {r p} _ {B} ^ {(m , n)})) ^ {\top} (\mathbf {R} _ {r o t} ^ {(h , w)} \mathbf {k} ^ {(h , w)})\right)} \tag {8}
+$$
+
+where $\mathbf{R}_{rela}^{(m,n)}$ is given by Eq. 6, and $\mathbf{rp}_B^{(m,n)}$ is the $m$ -th row $n$ -th column elements of the relative coordinate matrix $\mathbf{rp}_B$ , as derived by Eq. 4. $\Phi (\mathbf{rp}_B^{(m,n)}) = (\mathbf{q}^{(m,n)} + \mathbf{h}_{mask})\mathbf{W}_Q$ , where $\mathbf{h}_{mask}$ is the learnable masked placeholder, which is also commonly used in other methods (Zhou et al., 2022; Xie et al., 2022), and $\mathbf{W}_Q$ is the learnable parameters. After obtaining the $\mathbf{h}^{\mathbf{rp}_B}$ , we feed the $\mathbf{h}^{\mathbf{rp}_B}$ to the light-weight decoder $g_{\gamma}$ to obtain $\mathbf{z}_B$ , and predict the embedding or RGB pixel values of the view $B$ . Specifically, for distillation methods, we adopt a pretrained encoder $f_{\theta}'(\cdot)$ , and extract the hidden representations by $\mathbf{z}_B' = f_{\theta}'(\mathbf{x}_B)$ , where $\mathbf{z} \in \mathbb{R}^{K_B^H \times K_B^H \times D_{tea}}$ , where $D_{tea}$ is the output dimension of the teacher model. Finally, we compute the patch-level objective by:
+
+$$
+\mathcal {L} _ {\text {P a t c h}} = \frac {1}{K _ {B} ^ {H} K _ {B} ^ {W}} \sum_ {h = 1} ^ {K _ {B} ^ {H}} \sum_ {w = 1} ^ {K _ {B} ^ {W}} \left\| \mathbf {z} _ {B} ^ {(h, w)} - \mathbf {z} _ {B} ^ {\prime (h, w)} \right\| _ {p} ^ {p}, \tag {9}
+$$
+
+Meanwhile, we add another global objective term to learn global-discriminative information by:
+
+$$
+\mathcal {L} _ {G l o b a l} = \left\| g _ {\gamma} ^ {\prime} \left(\frac {1}{K _ {B} ^ {H} K _ {B} ^ {W}} \sum_ {h = 1} ^ {K _ {B} ^ {H}} \sum_ {w = 1} ^ {K _ {B} ^ {W}} \mathbf {h} _ {T} ^ {(h, w)}\right) - \frac {1}{K _ {B} ^ {H} K _ {B} ^ {W}} \sum_ {h = 1} ^ {K _ {B} ^ {H}} \sum_ {w = 1} ^ {K _ {B} ^ {W}} \mathbf {z} _ {T} ^ {\prime (h, w)} \right\| _ {p} ^ {p}, \tag {10}
+$$
+
+where $g_{\gamma}^{\prime}$ is the global projector composed of two linear layers and an activation function. Finally, we adopt a hyper-parameter to balance the global and local objectives $\mathcal{L}_{CR2PQ} = \mathcal{L}_{Patch} + \lambda \cdot \mathcal{L}_{Global}$ .
+
+# 4 EXPERIMENTS
+
+Datasets. We conduct self-supervised pre-training on the ImageNet-1K (Deng et al., 2009) training set with 1,000 classes, as used in SSL for both MIM (He et al., 2021) and contrastive learning (Chen et al., 2020a). We also transfer the encoder pre-trained by CR2PQ on MS-COCO (Lin et al., 2014) and ADE20K (Zhou et al., 2017) datasets.
+
+Pre-training hyper-parameters. In line with CAE (Chen et al., 2022), we train with Adamw (Loshchilov & Hutter, 2018) and a batch size of 2048, distributed over 32 GPUs using ViT-S/16 (batch size per GPU is 64). For ViT-B, the learning rate is linearly ramped up during the first 40 epochs to its base value determined with the following linear scaling rule (Chen et al., 2020a): $blr = 1.5e - 4$ , $BatchSize = 2048$ , and $lr = blr * BatchSize / 256$ . For ViT-S, we set $blr$ as $1.75e - 4$ . After warmup, we decay the learning rate with a cosine schedule (Loshchilov & Hutter, 2016). We follow the data augmentations of BYOL (Grill et al., 2020) (color jittering, Gaussian blur, and solarization) with a bicubic interpolation to adapt the position embeddings to the scales.
+
+Platform. The experiments are performed on a workstation with 32 V100 GPUs by default (if not otherwise specified).
+
+# 4.1 MAIN RESULTS
+
+COCO object detection and segmentation. Setups. We evaluate pre-trained models on the COCO object detection and instance segmentation tasks (Lin et al., 2014). We evaluate our model under two
+
+Table 1: Accuracy on MS-COCO. Mask R-CNN (He et al., 2017) and Cascade R-CNN (Cai & Vasconcelos, 2018) are adopted and trained with the 1x schedule. All the results are obtained by using our same finetune protocol for fair comparisons. Epoch refers to the number of pretraining.
+
+
Method
Backbone
Framwork
#Epochs
#Param.
#Views.
Object Detection
Instance
Segmentation
APbb
APbb50
APbb75
APmk
APmk50
APmk75
Moco-V2 (Chen et al., 2020b)
ResNet-50
200
23M
2 × 2242
38.9
59.2
42.4
35.5
56.2
37.8
SwAV (Caron et al., 2020)
ResNet-50
200
23M
2 × 2242
38.5
60.4
41.4
35.4
57.0
37.7
DenseCL (Wang et al., 2021)
ResNet-50
200
23M
2 × 2242
40.3
59.9
44.3
36.4
57.0
39.2
ReSim (Xiao et al., 2021)
ResNet-50
200
23M
2 × 2242
40.3
60.6
44.2
36.4
57.5
38.9
DetCo (Xie et al., 2021a)
ResNet-50
200
23M
2 × 2242
40.1
61.0
43.9
36.4
58.0
38.9
Moco V3 (Chen et al., 2021)
ViT-S/16
Mask RCNN
300
23M
2 × 2242
39.8
62.6
43.1
37.1
59.6
39.2
MoBY (Xie et al., 2021b)
ViT-S/16
300
22M
2 × 2242
41.1
63.7
44.8
37.3
60.3
39.8
DINO (Caron et al., 2021)
ViT-S/16
300
22M
2 × 2242
40.8
63.4
44.2
37.3
59.9
39.5
SelfPatch (Yun et al., 2022)
ViT-S/16
200
22M
2 × 2242
42.1
64.9
46.1
38.5
61.3
40.8
iBOT (Zhou et al., 2022)
ViT-S/16
200
22M
2 × 2242
42.6
65.7
47.0
39.0
61.7
41.3
PQCL (Zhang et al., 2023a)
ViT-S/16
200
22M
2 × 2242
43.1
66.0
47.4
39.3
62.2
41.6
PQCL (Zhang et al., 2023a)
ViT-S/16
300
22M
2 × 2242
44.0
66.7
48.1
39.7
63.1
42.2
CR2PQ (Ours)
ViT-S/16
200
22M
2 × 2242
45.0
67.4
49.0
39.9
63.4
42.7
CR2PQ (Ours)
ViT-S/16
300
22M
2 × 2242
47.4
69.3
52.0
41.8
65.9
44.7
DINO (Caron et al., 2021)
ViT-S/16
300
22M
2 × 2242
45.2
64.9
47.8
38.9
61.2
41.7
SelfPatch (Yun et al., 2022)
ViT-S/16
300
22M
2 × 2242
46.6
65.7
48.8
39.5
62.0
42.6
DINO (Caron et al., 2021)
ViT-S/16
800
22M
2 × 2242 + 10 × 962
46.8
66.7
50.3
40.6
63.7
43.2
iBOT (Zhou et al., 2022)
ViT-S/16
Cascade RCNN
300
22M
2 × 2242
45.4
65.1
49.0
39.6
62.1
41.7
iBOT (Zhou et al., 2022)
ViT-S/16
800
22M
2 × 2242 + 10 × 962
49.4
68.7
53.3
42.6
65.6
45.8
PQCL (Zhang et al., 2023a)
ViT-S/16
200
22M
2 × 2242
46.2
65.5
49.8
39.9
62.3
42.6
PQCL (Zhang et al., 2023a)
ViT-S/16
300
22M
2 × 2242
47.7
67.0
51.3
41.1
64.0
44.2
RoPE (Su et al., 2024) ( Scratch)
ViT-S/16
0
22M
2 × 2242
31.0
47.1
33.4
27.7
44.9
29.2
CR2PQ (Ours)
ViT-S/16
100
22M
2 × 2242
49.4
68.1
53.5
42.7
65.4
46.1
CR2PQ (Ours)
ViT-S/16
200
22M
2 × 2242
50.3
69.2
54.4
43.2
66.5
46.5
CR2PQ (Ours)
ViT-S/16
300
22M
2 × 2242
50.5
69.5
54.7
43.4
66.7
46.8
+
+popular frameworks Mask-RCNN (He et al., 2017) and Cascade R-CNN (Cai & Vasconcelos, 2018) with the standard 1x schedule (12 epochs). In line with previous methods (Zhou et al., 2022; Zhang et al., 2023a), we adopt AdamW (Loshchilov & Hutter, 2018) optimizer and set the learning rate as 3e-4 with weight decay 0.05. Evaluation. MS COCO (Lin et al., 2014) is a large-scale object detection, segmentation, and captioning dataset: in particular, train 2017 and val 2017 splits contain $118K$ and $5K$ images, respectively. We follow the basic configuration of mmdetection (Chen et al., 2019) for fine-tuning Mask R-CNN (He et al., 2017) with FPN (Lin et al., 2017) under the standard 1x schedule. Results. Table 1 shows the proposed CR2PQ can consistently outperform previous SOTA (Zhang et al., 2023a) in both object detection and instance segmentation tasks. We evaluate CR2PQ with both 200 and 300 epochs pretraining. When applying the pre-trained model to Cascaded-RCNN, for 200 epochs pretraining without local views (Caron et al., 2020) and query views (Zhang et al., 2023a), CR2PQ surpasses PQCL (Zhang et al., 2023a) with 100 epochs pretraining and one extra query view pretraining $1.7\%$ point $\mathrm{mAP}^{bb}$ and $1.6\%$ point $\mathrm{mAP}^{mk}$ , respectively. Besides, our CR2PQ with 300 epochs pretraining can outperform iBOT (800 epochs pretraining with 10 extra local views) by $1.1\%$ point $\mathrm{mAP}^{bb}$ and $0.8\%$ point $\mathrm{mAP}^{mk}$ . When adopting the Mask-RCNN framework, under 200 epochs pretraining, our model CR2PQ outperforms PQCL by $1.9\%$ point $\mathrm{mAP}^{bb}$ and $0.6\%$ point $\mathrm{mAP}^{mk}$ , respectively. With 300 epochs pretraining, compared with previous SOTA PQCL (Zhang et al., 2023a), our CR2PQ achieves $3.4\%$ $\mathrm{mAP}^{bb}$ and $2.1\%$ $\mathrm{mAP}^{mk}$ improvements on detection and segmentation tasks, respectively. We also evaluate the detection and segmentation performance without pretraining, i.e., directly using 2D RoPE (Su et al., 2024), where the 2D RoPE obtains much worse results than CR2PQ.
+
+ADE20K semantic segmentation. Setup. We evaluate semantic segmentation performances of pre-trained models on ADE20K (Zhou et al., 2017), which contains 150 fine-grained semantic categories and $25K$ training data. We finetune the pre-trained models on Semantic FPN (Lin et al., 2017) and UperNet (Xiao et al., 2018) with $40K$ and $160K$ iteration, respectively. Following the previous methods SelfPatch (Yun et al., 2022) and PQCL (Zhang et al., 2023a), we report three metrics: (a) mean intersection of union (mIoU) averaged over all semantic categories, (b) all pixel accuracy (aAcc), and (c) mean class accuracy (mAcc). Evaluation. ADE20K (Zhou et al., 2017) is a semantic segmentation benchmark containing 150 fine-grained semantic categories and $25K$ images. We follow all the configurations of mmsegmentation (Contributors, 2020) for fine-tuning Semantic FPN (Lin et al., 2017) with $40K$ iterations and an input resolution of $512\times512$ . We also perform large-scale fine-tuning experiments using UPerNet (Xiao et al., 2018) with $160K$ iterations and an input resolution of $512\times512$ . Results. As shown in Table 2, CR2PQ can outperform previous all methods under the same setting. Besides, we further evaluate DINO (Caron et al., 2021) with 10 local views and 800 epochs pretraining (checkpoint is downloaded in their official repository), where CR2PQ gets $2.6\%$ point improvements with only 200 epochs pretraining and only two global views. We guess the big improvements are because CR2PQ is a patch-level distillation method, which makes our method more spatial-sensitive, resulting the higher performance in dense prediction tasks.
+
+Table 2: ADE20K semantic segmentation performances of the recent self-supervised approaches pre-trained on ImageNet. The metrics mIoU, aAcc, and mAcc denote the mean intersection of union, all pixel accuracy, and mean class accuracy, respectively.
+
+
Method
Arch
Backbone
#Iter
#Epochs
#Params
#Views
mIoU
aAcc
mAcc
MoCo-v2 (Chen et al., 2020b)
FPN
ResNet50
40k
200
23M
2 × 2242
35.8
77.6
45.1
SwAV (Caron et al., 2020)
FPN
ResNet50
40k
200
23M
2 × 2242
35.4
77.5
44.9
DenseCL (Wang et al., 2021)
FPN
ResNet50
40k
200
23M
2 × 2242
37.2
78.5
47.1
MocoV3 (Chen et al., 2021)
FPN
ViT-S/16
40k
300
23M
2 × 2242
35.3
78.9
45.9
MoBY (Xie et al., 2021b)
FPN
ViT-S/16
40k
300
23M
2 × 2242
39.5
79.9
50.5
DINO (Caron et al., 2021)
FPN
ViT-S/16
40k
300
23M
2 × 2242
38.3
79.0
49.4
DINO (Caron et al., 2021)
UperNet
ViT-S/16
160k
300
23M
2 × 2242
42.3
80.4
52.7
SelfPatch (Yun et al., 2022)
FPN
ViT-S/16
40k
200
23M
2 × 2242
41.2
80.7
52.1
SelfPatch (Yun et al., 2022)
UperNet
ViT-S/16
160k
200
23M
2 × 2242
43.2
81.5
53.9
DINO (Caron et al., 2021)
UperNet
ViT-S/16
160k
800
23M
2 × 2242 + 10 × 962
44.4
81.7
55.5
iBOT (Zhou et al., 2022)
UperNet
ViT-S/16
160k
200
23M
2 × 2242
44.1
81.4
55.3
ADCLR (Zhang et al., 2023b)
UperNet
ViT-S/16
160k
200
23M
2 × 2242
44.3
81.9
55.1
PQCL (Zhang et al., 2023a)
UperNet
ViT-S/16
160k
200
23M
2 × 2242
45.1
82.0
56.1
CR2PQ (Ours)
UperNet
ViT-S/16
160k
200
23M
2 × 2242
47.0
83.1
57.4
+
+Table 3: Finetune top-1 and top-5 classification accuracies on ImageNet-1K with ViT-S and ViT-B. "PT Eps" and "FT Eps" mean the number of epochs for pretraining and fine-tuning, respectively.
+
+
Method
Backbone
#Params
PT Eps
FT Eps
Top-1
Top-5
Backbone
#Params
PT Eps
FT Eps
Top-1
Top-5
DeiT (Touvron et al., 2021)
ViT-S
22M
300
200
79.9
~
ViT-B
86M
300
100
81.2
~
MAE (He et al., 2021)
ViT-S
22M
1600
200
80.6
~
ViT-B
86M
300
100
83.2
~
Moco V3 (He et al., 2021)
ViT-S
22M
1600
200
81.4
~
ViT-B
86M
800
100
83.2
~
DINO (He et al., 2021)
ViT-S
22M
1600
200
81.5
~
ViT-B
86M
800
100
82.8
~
iBOT (Zhou et al., 2022)
ViT-S
22M
800
200
81.8
~
ViT-B
86M
300
100
83.2
~
TinyMIM (Ozbulak et al., 2023)
ViT-S
22M
300
100
81.5
85.8
ViT-B
86M
300
100
83.4
96.3
CR2PQ (Ours)
ViT-S
22M
300
200
82.2
86.1
ViT-B
86M
300
100
83.7
96.5
+
+# 4.2 ABLATION STUDIES
+
+Fine-tuning classification. Most of the previous dense contrastive learning methods (Yun et al., 2022; Xie et al., 2021c) show worse performance compared with global instance-level contrastive methods (Zhou et al., 2022; Caron et al., 2021), which is because the patch-level loss could inhibit the model from learning global-discriminative information. However, different from previous DCL methods, we find CR2PQ could achieve comparable results on fine-tuning classification with the instance-level SSL methods. We guess that's because we add the global objective in Eq. 10, which helps CR2PQ learn global-discriminative information. Table 3 shows the fine-tuning accuracies with different backbones (ViT-S and ViT-B). With ViT-S, CR2PQ achieves 82.2 top-1 accuracy with only 300 epochs pretraining, which outperforms previous SOTA iBOT (Zhou et al., 2022) with 800 epochs pretraining by 0.4 point. With ViT-B, our methods achieve 83.7 top-1 accuracies with only 300 epochs pretraining, which outperforms under the same epochs pretraining.
+
+Table 4: Comparisons with different teachers on the COCO datasets (detection and segmentation).
+
+
Student
Teacher
Epoch
\( \mathrm{mAP}^{bb} \)
\( \mathrm{mAP}^{mk} \)
ViT-S
EMA update (Contrastive)
300
44.1
39.8
Pixel (Masked Image Modeling)
45.2
40.8 (+1.0)
DINO (Caron et al., 2021) (Res-50)
47.4
41.8 (+2.0)
DINO (Caron et al., 2021) (ViT-B)
47.0
41.1 (+1.3)
SimCLR (Chen et al., 2020a) (Res-50)
47.1
41.6 (+1.8)
MAE (He et al., 2021) (ViT-B)
46.5
40.7 (+0.9)
MAE (He et al., 2021) (ViT-L)
47.0
41.4 (+1.6)
iBOT (Zhou et al., 2022) (ViT-B)
46.2
41.0 (+1.2)
iBOT (Zhou et al., 2022) (ViT-L)
46.8
41.5 (+1.7)
+
+Teacher models and architectures. To explore the effect of the teacher model, we test our CR2PQ with different teacher models. We also evaluate our CR2PQ without teacher models (See EMA update and Pixel) in Table 4. Specifically, we adopt ViT-S (Dosovitskiy et al., 2020) as the student model and use ViT-B, ResNets (He et al., 2016), and ViT-L as the teacher models. As the output dimensions of
+
+different teacher models could be variant (e.g., $14 \times 14 \times 768$ for ViT-B/16, $7 \times 7 \times 2048$ for ResNets), we change the grid size $K_{B}^{H}$ and $K_{B}^{W}$ of the relative positional index. More concretely, for ResNet-50 and ResNet-101, we set the grid size of the positional embeddings to $224 / 7 = 32$ . For ViT-B/16, we set the grid size of the positional embeddings to $224 / 14 = 16$ . We mainly choose the teacher model pre-trained by some profound methods, including MAE (He et al., 2021), iBOT (Zhou et al., 2022), and DINO (Caron et al., 2021). We keep the batch size as 2048 and use ViT-S/16 as the student network to train CR2PQ with 300 epochs. Table 4 shows the results with different teacher models. We find using contrastive-based teacher model (Caron et al., 2021; Chen et al., 2020a), our CR2PQ could obtain more gains than using MIM-based (He et al., 2021; Zhou et al., 2022) teacher models. We guess that's because contrastive-based methods usually learn global-discriminative information, but lose local information. When using these contrastive-based methods, our CR2PQ could enhance the ability to capture the local information. In contrast, MIM-based
+
+Table 5: Ablation on projector head. We pre-train all the models with 400 epochs and 2048 batch size on ImageNet-1K. We compare different architectures of heads. "Share weights" means the global and local projectors share the same weights. "Trans" means multi-head self-attention decoder.
+
+
Architecture
Share weights
Global projector
Local projector
Top-1
Top-5
Framework
mAPbb
mAPmk
ViT-B/16
✓
2-layer MLP
2-layer MLP
83.3
96.2
Cascade-RCNN
52.0
45.1
✓
3-layer MLP
3-layer MLP
83.2
96.1
52.4
45.3
X
2-layer MLP
2-layer MLP
83.4
96.2
52.0
45.1
X
3-layer MLP
2-layer MLP
83.2
96.1
52.1
45.0
X
2-layer MLP
3-layer MLP
83.5
96.4
52.5
45.1
X
2-layer MLP
2-layer Trans
83.7
96.5
53.0
45.6
+
+
+Figure 3: Finetuning classification on ImageNet-1K (left), object detection (middle) and instance segmentation (right) performance on COCO with different global and local objective weights $\lambda$ . All the experimental settings keep the same for fair comparisons.
+
+
+
+
+
+methods usually add the patch-level objective, and the pre-trained models are more spatial-sensitive but less global-discriminative. Therefore, when using MIM-based methods as the teacher model, our CR2PQ may lose some global-discriminative information, leading to fewer improvements than using contrastive-based teacher models. Besides, It's noteworthy that our CR2PQ w/o pretrained teacher (using pixels as the teacher) can still outperform previous SOTA method (Zhang et al., 2023a) with a large range, which further demonstrates the effectiveness of the continuous coordinate-based task.
+
+Loss weight of global semantic learning. As CR2PQ mainly focuses on dense prediction tasks, we set the weight of the global objective $\lambda = 0.5$ as the default. To better balance the global-discriminative and spatial-sensitive information, we further conduct a set of experiments by switching $\lambda$ from $0\sim 1$ . Specifically, we pre-train ViT-S/16 300 epochs with 2048 batch size. Then, for detection and segmentation, we finetune the pretrained model on COCO dataset with Mask RCNN framework. Fig. 3 illustrate the funetuning classification accuracy on ImageNet, mAPbb and mapmk results on COCO with different global loss weight $\lambda$ . We find with larger $\lambda$ , CR2PQ obtains higher fine-tune accuracy on ImageNet-1K. However, correspondingly, large $\lambda$ makes CR2PQ learn less spatial information, resulting mAP score drops on the COCO dataset. We also find when setting $\lambda = 0$ , the detection score is also lower than $\lambda = 0.5$ , we guess that's because too small $\lambda$ makes CR2PQ fail to learn global-discriminative information, where detection tasks also require the discriminative information to help classify the object in classification head layer.
+
+Projector head of global semantic learning. To further study the effect of the local and global projector head, we try different combinations of the two modules. Following SimSiam (Chen & He, 2021) and Barlow Twins (Zbontar et al., 2021), we mainly attempt to use 2-layer and 3-layer MLP and 2-layer transformer blocks as projector heads. Since the global projector inputs one global token, we only add the transformer block on the local projector module. Table 5 shows fine-tuned classification, detection and instance segmentation results on ImageNet-1K and COCO datasets with different architectures. Different from previous contrastive methods (Chen & He, 2021; Zbontar et al., 2021), we find that lightweight global projectors can bring better classification accuracy than complex architectures, while employing two-layer transformer layer as local projector can bring more gains than simply using two-layer and three-layer MLP.
+
+Pretraining Strategy. To show the effectiveness of our continuous rotary positional embedding, we conduct a set of experiments, including three types of positional embeddings, i.e., continuous sin-cos embedding, discrete rotary positional embedding (RoPE), learnable relative positional embeddings and discrete sin-cos embeddings. More concretely, for sin-cos embedding, we first calculate the relative positional index proposed in Eq. 4. Then, for each index, we calculate the sin-cos embedding (He
+
+
+Figure 4: Finetuning Cascade-RCNN and Mask-RCNN (right) on detection (left) and segmentation (middle) on COCO dataset. We report the $\mathrm{mAP}^{bb}$ and $\mathrm{mAP}^{mk}$ performance for each 40 epochs.
+
+
+
+
+
+et al., 2021) through the given relative indices of each patch. For discrete positional embeddings, we perform pretraining in MAE, since the discrete position can not represent the relative positions of two views. Therefore, for each image, we randomly mask the given image with $75\%$ masking ratio. Then, we use the remain part to reconstruct the masked part. For learnable positional embedding, we first calculate the relative positional index proposed in Eq. 4. Then, we use a two-layer MLP to map the tuple $(h,w)$ to $D_{model}$ dimension as the positional embedding. For discrete sin-cos, we also adopt the MAE pretraining and the model degenerates to MAE (He et al., 2021) (replace the RGB supervision with teacher embeddings). Table 6 shows the classification and detection results on ImageNet and COCO, where our CR2PQ significantly outperforms peer methods.
+
+Convergence and training efficiency. To explore the convergence of the proposed CR2PQ, we conduct a group of experiments with different pretraining epochs. Fig. 4 shows the detection and segmentation results on the COCO dataset with different pretraining epochs using Cascade-RCNN and Mask-RCNN frameworks. We surprisingly find with Cascade-RCNN, our CR2PQ can achieve $47.2\mathrm{mAP}^{bb}$
+
+Table 6: Ablation on different pretraining strategy. We pre-train ViT-S/16 with 300 epochs on ImageNet-1K and fine-tune on other datasets.
+
+
Student
Positional embedding
Epoch
Acc
\( \mathrm{mAP}^{bb} \)
Continuous 2D RoPE
82.2
50.5
ViT-S/16
Discrete RoPE
300
81.5
48.2 (-2.3)
Continuous Sin-cos
81.9
47.8 (-2.7)
Learnable
81.3
46.9 (-3.6)
Discrete Sin-cos
81.1
45.9 (-4.6)
+
+and $41.1\mathrm{mAP}^{mk}$ score with only 40 epochs pretraining, which obtains 10.4 improvements on $\mathrm{mAP}^{bb}$ and 7.9 improvements $\mathrm{mAP}^{mk}$ scores on detection and segmentation tasks, respectively. Besides, we also find with local loss, PQCL converges slower than without using the local loss (when 40 epochs pretraining, PQCL (w/o local gets better results than w/ local)). However, with 200 epochs pretraining, PQCL (w/ local) outperforms PQCL (w/o local) by $0.7\mathrm{mAP}^{bb}$ and $1.7\mathrm{mAP}^{mk}$ scores. We guess that's because the patch-level loss could impede the model from learning global-discriminative information, which slows down the convergence rate. However, the patch-level loss also makes the model learn spatial-sensitive information, resulting in better performance on detection and segmentation under long epochs pretraining. In contrast, CR2PQ enjoys fast convergence, and it outperforms previous SOTA by a large range with only40 epochs pretraining.
+
+# 5 CONCLUSION
+
+In this paper, we propose CR2PQ to learn dense representations through continuous relative rotary positional embedding. Different from prior 2D RoPE works, we extend the discrete RoPE to continuous and demonstrate its effectiveness in learning dense representations from comprehensive experiments. Then, we conduct exhaustive ablation studies to demonstrate the robustness of the proposed CR2PQ, where our method achieves new SOTA results on detection and segmentation tasks, outperforming previous dense contrastive learning SOTA with a large range. Besides, our CR2PQ also achieves comparable results on classification with previous methods. Finally, we demonstrate the effectiveness of the proposed continuous RoPE through different positional embedding types.
+
+Limitations. While CR2PQ achieves state-of-the-art results, there are limitations to consider for future exploration: Sensitivity to Background-heavy Views: The current method relies on randomly cropped views for contrastive learning (or distillation). In some cases, these views might contain mostly background with little foreground content. This can lead the model to learn irrelevant information that hinders performance on various downstream tasks focused on the foreground objects.
+
+# REFERENCES
+
+Adrien Bardes, Jean Ponce, and Yann LeCun. Vicreg: Variance-invariance-covariance regularization for self-supervised learning. In ICLR, 2022.
+Zhaowei Cai and Nuno Vasconcelos. Cascade r-cnn: Delving into high quality object detection. In CVPR, 2018.
+Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. NeurIPS, 2020.
+Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In ICCV, 2021.
+Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open mmlab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019.
+Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020a.
+Xiaokang Chen, Mingyu Ding, Xiaodi Wang, Ying Xin, Shentong Mo, Yunhao Wang, Shumin Han, Ping Luo, Gang Zeng, and Jingdong Wang. Context autoencoder for self-supervised representation learning. arXiv preprint arXiv:2202.03026, 2022.
+Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In CVPR, 2021.
+Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. arXiv preprint arXiv:2003.04297, 2020b.
+Xinlei Chen, Saining Xie, and Kaiming He. An empirical study of training self-supervised vision transformers. In ICCV, 2021.
+MMSegmentation Contributors. MMSegmentation: Openmmlab semantic segmentation toolbox and benchmark. https://github.com/open-mmlab/mmsegmentation, 2020.
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
+Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. NeurIPS, 2019.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020.
+Yuxin Fang, Li Dong, Hangbo Bao, Xinggang Wang, and Furu Wei. Corrupted image modeling for self-supervised visual pre-training. arXiv preprint arXiv:2202.03382, 2022.
+Yuxin Fang, Quan Sun, Xinggang Wang, Tiejun Huang, Xinlong Wang, and Yue Cao. Eva-02: A visual representation for neon genesis. arXiv preprint arXiv:2303.11331, 2023.
+Chongjian Ge, Youwei Liang, Yibing Song, Jianbo Jiao, Jue Wang, and Ping Luo. Revitalizing cnn attention via transformers in self-supervised visual representation learning. NeurIPS, 2021.
+Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018.
+Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. NeurIPS, 27, 2014.
+Jean-Bastien Grill, Florian Strub, Florent Altché, Coretin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent-a new approach to self-supervised learning. NeurIPS, 2020.
+
+Tengda Han, Weidi Xie, and Andrew Zisserman. Self-supervised co-training for video representation learning. NeurIPS, 2020.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
+Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017.
+Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
+Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dólár, and Ross Girshick. Masked autoencoders are scalable vision learners. arXiv preprint arXiv:2111.06377, 2021.
+Pranav Jeevan and Amit Sethi. Resource-efficient hybrid x-formers for vision. In WACV, 2022.
+Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yuning Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, 2018.
+Yanghao Li, Hanzi Mao, Ross Girshick, and Kaiming He. Exploring plain vision transformer backbones for object detection. In ECCV, 2022.
+Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dóllár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014.
+Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017.
+Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016.
+Ilya Loshchilov and Frank Hutter. Fixing weight decay regularization in adam. 2018.
+Jiasen Lu, Christopher Clark, Sangho Lee, Zichen Zhang, Savya Khosla, Ryan Marten, Derek Hoiem, and Aniruddha Kembhavi. Unified-io 2: Scaling autoregressive multimodal models with vision, language, audio, and action. arXiv preprint arXiv:2312.17172, 2023.
+Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. 2018.
+Utku Ozbulak, Hyun Jung Lee, Beril Boga, Esla Timothy Anzaku, Ho-min Park, Arnout Van Messem, Wesley De Neve, and Joris Vankerschaver. Know your self-supervised learning: A survey on image-based generative and discriminative training. TMLR, 2023.
+Jiaming Song and Stefano Ermon. Multi-label contrastive predictive coding. NeurIPS, 2020.
+Jianlin Su, Murtadha Ahmed, Yu Lu, Shengfeng Pan, Wen Bo, and Yunfeng Liu. Roformer: Enhanced transformer with rotary position embedding. Neurocomputing, 2024.
+Chenxin Tao, Xizhou Zhu, Weijie Su, Gao Huang, Bin Li, Jie Zhou, Yu Qiao, Xiaogang Wang, and Jifeng Dai. Siamese image modeling for self-supervised vision representation learning, 2022.
+Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In ECCV, 2020a.
+Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning? NeurIPS, 2020b.
+Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. In ICML, 2021.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. NeurIPS, 2017.
+Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In ICML, 2008.
+
+Xiao Wang, Haoqi Fan, Yuandong Tian, Daisuke Kihara, and Xinlei Chen. On the importance of asymmetry for siamese representation learning. In CVPR, 2022a.
+Xinlong Wang, Rufeng Zhang, Chunhua Shen, Tao Kong, and Lei Li. Dense contrastive learning for self-supervised visual pre-training. In CVPR, 2021.
+Zhaoqing Wang, Qiang Li, Guoxin Zhang, Pengfei Wan, Wen Zheng, Nannan Wang, Mingming Gong, and Tongliang Liu. Exploring set similarity for dense self-supervised representation learning. In CVPR, 2022b.
+Chen Wei, Haoqi Fan, Saining Xie, Chao-Yuan Wu, Alan Yuille, and Christoph Feichtenhofer. Masked feature prediction for self-supervised visual pre-training. arXiv preprint arXiv:2112.09133, 2021.
+Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018.
+Tete Xiao, Colorado J Reed, Xiaolong Wang, Kurt Keutzer, and Trevor Darrell. Region similarity representation learning. In ICCV, 2021.
+Enze Xie, Jian Ding, Wenhai Wang, Xiaohang Zhan, Hang Xu, Peize Sun, Zhenguo Li, and Ping Luo. Detco: Unsupervised contrastive learning for object detection. In ICCV, 2021a.
+Zhenda Xie, Yutong Lin, Zhuliang Yao, Zheng Zhang, Qi Dai, Yue Cao, and Han Hu. Self-supervised learning with swim transformers. arXiv preprint arXiv:2105.04553, 2021b.
+Zhenda Xie, Yutong Lin, Zheng Zhang, Yue Cao, Stephen Lin, and Han Hu. Propagate yourself: Exploring pixel-level consistency for unsupervised visual representation learning. In CVPR, 2021c.
+Zhenda Xie, Zheng Zhang, Yue Cao, Yutong Lin, Jianmin Bao, Zhuliang Yao, Qi Dai, and Han Hu. Simmim: A simple framework for masked image modeling. CVPR, 2022.
+Ceyuan Yang, Zhirong Wu, Bolei Zhou, and Stephen Lin. Instance localization for self-supervised detection pretraining. In CVPR, 2021.
+Sukmin Yun, Hankook Lee, Jaehyung Kim, and Jinwoo Shin. Patch-level representation learning for self-supervised vision transformers. In CVPR, 2022.
+Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self-supervised learning via redundancy reduction. In ICML, 2021.
+Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016.
+Shaofeng Zhang, Feng Zhu, Junchi Yan, Rui Zhao, and Xiaokang Yang. Zero-cl: Instance and feature decorrelation for negative-free symmetric contrastive learning. In ICLR, 2021.
+Shaofeng Zhang, Lyn Qiu, Feng Zhu, Junchi Yan, Hengrui Zhang, Rui Zhao, Hongyang Li, and Xiaokang Yang. Align representations with base: A new approach to self-supervised learning. In CVPR, 2022.
+Shaofeng Zhang, Qiang Zhou, Zhibin Wang, Fan Wang, and Junchi Yan. Patch-level contrastive learning via positional query for visual pretraining. In ICML, 2023a.
+Shaofeng Zhang, Feng Zhu, Rui Zhao, and Junchi Yan. Patch-level contrasting without patch correspondence for accurate and dense contrastive representation learning. In ICLR, 2023b.
+Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In CVPR, 2017.
+Jinghao Zhou, Chen Wei, Huiyu Wang, Wei Shen, Cihang Xie, Alan Yuille, and Tao Kong. Image BERT pre-training with online tokenizer. In ICLR, 2022.
+Adrian Ziegler and Yuki M Asano. Self-supervised learning of object parts for semantic segmentation. In CVPR, 2022.
+
+# A IMPLEMENTATION AND EXPERIMENT SETUPS
+
+Baselines. We consider recent advanced self-supervised methods based on the ResNets (He et al., 2016) and ViTs (Dosovitskiy et al., 2020) architectures: (a) self-supervised ResNets: SimCLR (Chen et al., 2020a), MoCo-v2 (Chen et al., 2020b), SwAV (Caron et al., 2020), Barlow Twins (Zbontar et al., 2021), ZeroCL (Zhang et al., 2021), ARB (Zhang et al., 2022), DenseCL (Wang et al., 2021), ReSim (Xiao et al., 2021), and DetCo (Xie et al., 2021a); and (b) self-supervised ViTs: DINO (Caron et al., 2021), MoCo-v3 (Chen et al., 2021), MoBY (Xie et al., 2021b), iBOT (Zhou et al., 2022), SelfPatch (Yun et al., 2022), TinyMIM (Ozbulak et al., 2023).
+
+Code of computing relative coordinates. Code 1 shows the implementation of how to compute relative coordinates matrix of $\mathbf{rp}_B$ .
+
+Listing 1: Computing Relative Coordinates
+```python
+def factorial(p_A, p_B, K_A, K_B):
+ # p_A and p_B are given in line 199 of this paper.
+ # K_A, K_B are given in Eq.3 in this paper.
+ # width
+ w_per_grid_A = p_A[3] / K_A
+ w_grid.bias = (p_B[1] - p_A[1]) / w_per_grid_A
+ w_per_grid_B = p_B[3] / K_B
+ w_grid_scale = w_per_grid_B / w_per_grid_A
+ # height
+ h_per_grid_A = p_A[2] / K_A
+ h_grid.bias = (p_B[0] - p_A[0]) / h_per_grid_A
+ h_per_grid_B = p_B[2] / K_B
+ h_grid_scale = h_per_grid_B / h_per_grid_A
+ # compute coordinate matrix
+ h_start, h_end = h_grid.bias + K_B * h_grid_scale
+ w_start, w_end = w_grid.bias + K_B * w_grid_scale
+ grid_h = torch.arange(start=h_start, end=h_end, step=h_grid_scale)
+ grid_w = torch.arange(start=w_start, end=w_end, step=w_grid_scale)
+ grid = torchmeshgrid(grid_w, grid_h)
+ return grid
+```
+
+# B EXPERIMENT ON LARGE-SCALE MODEL
+
+To explore the scalability of the proposed CR2PQ, we conduct experiments with ViT-L, and evaluate the pretrained ViT-Base on ViTDet (Li et al., 2022) detector. Specifically, we pre-train the ViT-Large with 800 epochs with batch size 2048, distributed on 16 A100 GPUs with the base learning rate 1.5e-4. Table B shows the results on ImageNet-1K using ViT-L backbone, where our CR2PQ can consistently outperform previous baselines on both 400 and 800 epochs pretraining. Table B shows the results of the COCO dataset when using ViT-B as the backbone and ViTDet as the detector head.
+
+
Method
Architecture
Epoch
Acc@1
DINO (Caron et al., 2021)
ResNet-50
400
77.4
Moco V3 (Chen et al., 2021)
ViT-L/16
600
84.1
MAE (He et al., 2021)
ViT-L/16
400
84.3
CR2PQ (Teacher ResNet-50 DINO)
ViT-L/16
400
84.6
MAE (He et al., 2021)
ViT-L/16
800
84.6
iBOT (Zhou et al., 2022)
ViT-L/16
1000
84.8
CR2PQ (Teacher ResNet-50 DINO)
ViT-L/16
800
85.3
+
+Table 7: Finetuning classification results on ImageNet-1K dataset using ViT-L.
+
+
Method
\( \mathrm{mAP}^{bb} \)
\( \mathrm{mAP}^{mk} \)
Scratch
48.1
42.6
MAE (He et al., 2021)
51.1
45.6
DINO (Caron et al., 2021)
49.0
43.4
CR2PQ (Ours)
52.2
46.5
+
+Table 8: Object detection and instance segmentation results on COCO datasets using ViT-Base and ViTDet.
\ No newline at end of file
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/images.zip b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..427d5dac8475241d82294f796b4cd4fe362624ac
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7fcd56040d651072884735f0a2e94aa1c55ff9388ca3f936db3a2516c4b3f758
+size 724265
diff --git a/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/layout.json b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..f7140f3921354e245e30886b7b60dfb912a3a6c9
--- /dev/null
+++ b/ICLR/2025/CR2PQ_ Continuous Relative Rotary Positional Query for Dense Visual Representation Learning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4ea0c19779ca27a26d4da496e1d353bed7effb421f8c29690f7a6c1965cb53a9
+size 522448
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_content_list.json b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..8a5b5501a6e4239fbe5508b47c50ac136a8b0183
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:481d08898da2cdb5783d2b1e13cce9bd06c94ff3731d6617a832486f445310f7
+size 180756
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_model.json b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..bd18a40d88220377360b48287637cc06ed12c3cd
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a37e70aedbb04839813437b7efb8ec0f5a36a80c91793f60b7e69b00eb9a1009
+size 206985
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_origin.pdf b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..0e842bec0d54e70d091f0ce37967268dac05bb5f
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/368892d9-8768-4778-af57-86f8c3be6f18_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7a32448a16ec4a08da74cf50f9891af2bafe0f5eaacc0b520d79f1e28967ba3d
+size 5401773
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/full.md b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..8bfb691af49bd2307a6cf2e5b30d3dde5c5db89b
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/full.md
@@ -0,0 +1,649 @@
+# CREAM: CONSISTENCY REGULARIZED SELF-REWARDING LANGUAGE MODELS
+
+Zhaoyang Wang1 Weilei He2 Zhiyuan Liang3 Xuchao Zhang4
+
+Chetan Bansal $^{4}$ Ying Wei $^{2}$ Weitong Zhang $^{1}$ Huaxiu Yao $^{1}$
+
+1University of North Carolina at Chapel Hill 2Nanyang Technological University
+
+$^{3}$ National University of Singapore $^{4}$ Microsoft Research
+
+{zhaoyang,huaxiu}@cs.unc.edu weitongz@unc.edu
+
+# ABSTRACT
+
+Recent self-rewarding large language models (LLM) have successfully applied LLM-as-a-Judge to iteratively improve the alignment performance without the need of human annotations for preference data. These methods commonly utilize the same LLM to act as both the policy model (which generates responses) and the reward model (which scores and ranks those responses). The ranked responses are then used as preference pairs to train the LLM via direct alignment technologies (e.g. DPO). However, it is noteworthy that throughout this process, there is no guarantee of accuracy in the rewarding and ranking, which is critical for ensuring accurate rewards and high-quality preference data. Empirical results from relatively small LLMs (e.g., 7B parameters) also indicate that improvements from self-rewarding may diminish after several iterations in certain situations, which we hypothesize is due to accumulated bias in the reward system. This bias can lead to unreliable preference data for training the LLM. To address this issue, we first formulate and analyze the generalized iterative preference fine-tuning framework for self-rewarding language model. We then introduce the regularization to this generalized framework to mitigate the overconfident preference labeling in the self-rewarding process. Based on this theoretical insight, we propose a Consistency Regularized sElf-rewarding lLanguage Model (CREAM) that leverages the consistency of rewards across different iterations to regularize the self-rewarding training, helping the model to learn from more reliable preference data. With this explicit regularization, our empirical results demonstrate the superiority of CREAM in improving both reward consistency and alignment performance. The code is publicly available at https://github.com/Raibows/CREAM.
+
+# 1 INTRODUCTION
+
+Large language models (LLMs) have shown impressive capabilities across various tasks, including natural language understanding and generation (Radford et al., 2019). At the same time, LLMs also face alignment challenges such as generating hallucinations and harmful outputs (Ji et al., 2023). To address these issues, a series of research works has explored preference learning methods such as Reinforcement Learning from Human Feedback (RLHF) (Christiano et al., 2017) and direct alignment techniques such as Direct Preference Optimization (DPO) (Rafailov et al., 2023) to align the LLMs with human values and preferences. These alignment methods often require a large number of preference pairs which are indispensable in both RLHF and direct alignment training. However, collecting human-annotated preference pairs is time-consuming and labor-intensive, which seriously limits the scalability and efficiency of these alignment methods.
+
+Recent advancements in self-rewarding language models (SRLMs) (Yuan et al., 2024) have attracted increasing attention in the field of LLM alignment, which can efficiently synthesize preference data for iterative preference training. In this method, a single LLM is required to act as two roles, the policy model and the reward model. Given unlabeled prompt data, the LLM first acts as the policy model generating several response candidates. Then, the same LLM acts as the reward model, scoring and ranking these responses. These ranked responses are used as preference pairs to train the LLM with DPO, significantly reducing the reliance on human-annotated data. The above steps can
+
+be iteratively repeated to further enhance the performance. However, SRLMs still face challenges in generating reliable and accurate rewards for annotating the preference pairs, which is critical for ensuring both the quality of preference data and the alignment performance of LLMs.
+
+To address these challenges, we first formulate a generalized iterative preference fine-tuning framework to analyze the self-rewarding training, where this framework can also be adapted to other iterative preference tuning methods. Through this theoretical framework, we find that the rewarding bias issue in SRLMs arises from the overconfident preference labeling, which enforces the model to distinguish between responses of similar quality. For example, both responses in Figure 1 have high quality judgments from the human. The SRLM enforces the reward model to make a preference judgment, resulting in noisy and unreliable preference labeling. This can lead to negative impacts on preference tuning the model. Additionally, the iterative training manner can also accumulate the rewarding bias, further diminishing the benefits of self-improvement.
+
+From the insights of theoretical analysis, we propose Consistency Regularized sEIfrewarding lLanguage Model (CREAM) to mitigate the rewarding bias issue in SRLMs, particularly for broadly accessible 7B-size LLMs. The core idea behind CREAM is that we should not force the model to be overly confident in distinguishing between responses of similar quality. But how to tell the preference labeling is reliable or not? Out of the self-rewarding scenario, we may employ a pool of external reward models to assist in ranking preferences. When two responses are of similar quality, these external models often produce inconsistent rankings.
+
+
+Figure 1: An example of both two responses are of high quality, which is hard for human to distinguish the preference. While the same model from different iterations have inconsistent rewarding.
+
+This inconsistency serves as a signal to indicate the level of confidence in the preference labeling. In self-rewarding scenarios, however, integrating such external reward models is not feasible. Fortunately, due to the iterative nature of self-rewarding training, we can use the reward model from the previous iteration to rank preferences and then compare these rankings with those produced by the current model. This comparison provides an estimate of such consistency rate. With this consistency rate, we can regularize the preference training to prevent the model from learning unreliable preference data, thereby mitigating the rewarding bias issue in SRLMs.
+
+In summary, we first formulate a generalized iterative preference fine-tuning framework to analyze the rewarding bias issue in SRLMs. From the insights of theoretical analysis, we propose CREAM as the primary contribution of this paper. CREAM leverages the consistency of rewarding across different iterations for regularized preference training, which can effectively mitigate the rewarding bias issue in SRLMs. Empirical results on a series of natural language benchmarks validate the effectiveness of CREAM in mitigating the rewarding bias issue and enhancing the alignment performance of LLMs.
+
+Notations. Vectors are denoted by lowercase boldface letters, such as $\mathbf{x}$ , and matrices by uppercase boldface letters, such as $\mathbf{A}$ . For any positive integer $k$ , the set $1, 2, \ldots, k$ is denoted by $[k]$ . Other general sets are denoted by calligraphic uppercase letters, such as $\mathcal{D}$ , with the cardinality of the set represented as $|\mathcal{D}|$ . Without ambiguity, we denote $\pi_{\theta}$ as the language model parameterized by $\theta$ , $\mathbf{x}$ as the input prompt, and $\mathbf{y}$ as the output response from the language model. All other notations are defined prior to their first usage. We denote $\mathbb{1}[\cdot]$ as the indicator function.
+
+# 2 RELATED WORKS
+
+LLM Alignment. Alignment lies at the core of LLM research and applications, aiming to ensure that LLMs adhere to human values and preferences. RLHF establishes the foundational alignment training paradigm (Leike et al., 2018; Ziegler et al., 2019; Ouyang et al., 2022a), where it leverages human preference feedback to train a reward model, and then uses this reward model to guide the LLM via reinforcement learning algorithms (Schulman et al., 2017). Recent efforts have focuses on developing direct alignment methods (Rafailov et al., 2023; Dong et al., 2023; Azar et al., 2023; Ethayarajh et al., 2024; Meng et al., 2024; Hong et al., 2024), in order to reduce the costs and
+
+complexity of RLHF and make it more efficient and accessible. DPO (Rafailov et al., 2023), as a representative direct alignment method, optimizes the LLM with annotated preference pairs, eliminating the need for training an additional reward model. However, most RLHF and direct alignment methods heavily rely on human-annotated preference data, where the data collection commonly involves human distinguishing the "good" responses from the "bad" ones, which is time-consuming and labor-intensive (Ouyang et al., 2022a; Bai et al., 2022). Thus, synthesizing preference data with minimal human effort has become a valuable research direction.
+
+Self-Rewarding Language Model. SRLM (Yuan et al., 2024) has emerged as a promising approach to address the challenge of preference data synthesis in a self-improvement manner. This method leverages the LLM itself to act as both the policy model and the reward model. The policy model can generate response candidates for unlabeled prompts, while the reward model uses LLM-as-A-Judge (Zheng et al., 2023; Bai et al., 2023; Dubois et al., 2024) prompting to reward and rank these responses based on their quality. The ranked responses are then used as preference pairs to train the LLM via DPO (Rafailov et al., 2023). And this process can be iteratively repeated to improve the alignment performance without human intervention. However, having the same LLM serve as both the policy and the reward model, without any regularization, presents challenges in guaranteeing accurate rewards. This can lead to bias accumulation and noisy preference data, which ultimately harms the training. Other similar self-improvement methods (Huang et al., 2022; Zelikman et al., 2022; Chen et al., 2024; Guo et al., 2024b; Zhou et al., 2024) often either use the ground truth response to avoid annotation bias, or introduce an additional reward model to reduce the noise in annotations. In contrast, our work neither requires labeled data nor relies on external LLMs. Instead, we propose to use the consistency of rewarding to mitigate the rewarding bias in SRLMs.
+
+Reward Hacking. In both RLHF and SRLM scenarios, the reward model plays a crucial role in training LLMs (Ouyang et al., 2022b; Anwar et al., 2024; Yuan et al., 2024; Fisch et al., 2024). For RLHF, reward hacking is a phenomenon where models exploit flaws or biases in reward models to maximize scores without aligning with the intended goals (Anwar et al., 2024). To mitigate this issue, various ensemble rewarding methods (Coste et al., 2023; Eisenstein et al., 2023; Ramé et al., 2024; Zhang et al., 2024) such as ensemble-based conservative optimization (Coste et al., 2023) and averaging rewards in the weight space (Ramé et al., 2024) have been proposed to improve reliability and robustness. However, these works mainly focused on estimating the rewards, while CREAM in the self-rewarding scenario only uses rewards for comparing the responses to annotate preference pairs instead of maximizing the rewards. Besides, CREAM uses regularization instead of conservative value estimation to mitigate the rewarding bias issue. Though applying ensemble rewarding methods such as robust preference optimization (Fisch et al., 2024) which proposes reward distillation and pessimistic ensemble is feasible, CREAM does not rely on ensemble rewarding which reduces the computational cost in SRLMs. Additionally, CREAM leverages the iterative nature of SRLM to estimate the consistency between iterations to regularize the preference pair, which is more suitable for iterative preference fine-tuning. Further discussion is in Appendix C.4.
+
+# 3 METHODOLOGY
+
+In this section, we first formulate the generalized iterative preference fine-tuning framework for self-rewarding, RL with AI feedback, and other iterative preference tuning methods. Next, we introduce the motivation behind the proposed consistency regularized self-rewarding method. Finally, we present the practical implementation algorithm of CREAM in detail.
+
+# 3.1 GENERALIZED ITERATIVE PREFERENCE FINE-TUNING FRAMEWORK
+
+We assume that we can access to the dataset with response $\mathcal{D}_{\mathrm{S}}$ and the prompt dataset without response $\mathcal{D}_{\mathrm{U}}$ . The objective is to iteratively minimize the following loss with respect to the neural network parameter $\theta$ and a label function $z$ as
+
+$$
+\mathcal {L} (\boldsymbol {\theta}, z) = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} _ {\mathrm {U}}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} [ \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) ]. \tag {3.1}
+$$
+
+where the first term $\mathcal{L}_{\mathrm{SFT}}(\pmb {\theta};\mathcal{D}_{\mathrm{S}})$ aligns the model $\pi_{\theta}$ to the SFT data. We note here that any potential SFT methods (Ouyang et al., 2022b; Yuan et al., 2023; Dong et al., 2023; Chen et al., 2024), or the methods without SFT data $(\mathcal{L}_{\mathrm{SFT}} = 0)$ can be adapted in this framework. The second term $\mathbb{E}[\mathcal{L}_{\mathrm{DPO}}]$ corresponds to learning from the preference data pair $\{\mathbf{y},\mathbf{y}^{\prime}\}$ generated by the current model $\pmb{\theta}_t$ The labeling function $z(\mathbf{y},\mathbf{y}^{\prime},\mathbf{x})\in \{0,1\}$ provides the preference judgment between $\mathbf{y}$ and $\mathbf{y}'$ for
+
+the DPO loss, where $z(\mathbf{y},\mathbf{y}',\mathbf{x}) = 1$ means $\mathbf{y} \succ \mathbf{y}'$ and $z(\mathbf{y},\mathbf{y}',\mathbf{x}) = 0$ means $\mathbf{y} \prec \mathbf{y}'$ . The DPO loss $\mathcal{L}_{\mathrm{DPO}}$ is defined as follows:
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) = - z (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right)\right) \\ \left. - \left(1 - z \left(\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}\right)\right) \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} \left(\mathbf {y} ^ {\prime} \mid \mathbf {x}\right)}{\pi_ {\mathrm {r e f}} \left(\mathbf {y} ^ {\prime} \mid \mathbf {x}\right)}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} \left(\mathbf {y} \mid \mathbf {x}\right)}{\pi_ {\mathrm {r e f}} \left(\mathbf {y} \mid \mathbf {x}\right)}\right)\right), \right. \tag {3.2} \\ \end{array}
+$$
+
+where $\pi_{\mathrm{ref}}$ is the reference model for KL divergence regularization, and $\sigma (\cdot)$ is the sigmoid function. The proposed loss $\mathcal{L}(\theta ,z)$ in Eq. (3.1) represents all iterative preference fine-tuning algorithms. For the reinforcement learning (RL) with human feedback (Ouyang et al., 2022b), $z$ is the human preference comparing y and $\mathbf{y}'$ . For the RL with AI feedback, $z$ is the oracle reward model like GPT-4 (Achiam et al., 2023). For the self-rewarding language model (Chen et al., 2024), $z$ is given by comparing the reward score generated from the language model itself, often with LLM-as-a-Judge prompting. However, as aforementioned, we note that such prompt rewarding method may only be feasible for larger and advanced LLMs such as Llama-70B (Touvron et al., 2023). For smaller models such as Llama-7B that do not have complex instruction following and reasoning abilities, we instead propose to leverage the intrinsic reward model (Rafailov et al., 2023)
+
+$$
+r _ {\boldsymbol {\theta}} (\mathbf {x}, \mathbf {y}) \propto [ \log \pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x}) - \log \pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x}) ]
+$$
+
+to reward and rank the responses for annotating preference pairs. Therefore, the choice of preference labeling function $z$ is closely connected with the language model parameter $\theta$ . Then, we introduce the following two-step optimization algorithm to solve Eq. (3.1).
+
+Step 1. (Preference-labeling step) Keep $\theta = \theta_{t}$ fixed, select function $z$ to minimize $\mathcal{L}_{\mathrm{DPO}}$ . In particular, letting $\theta = \theta_{t}$ in Eq. (3.2), solution for $z(\mathbf{y},\mathbf{y}',\mathbf{x}) = \arg \min_{z}\mathcal{L}_{\mathrm{DPO}}(\theta_{t};\mathbf{y},\mathbf{y}',\mathbf{x},z)$ is
+
+$$
+z _ {t + 1} (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) = \mathbb {1} \left[ \log \pi_ {\boldsymbol {\theta} _ {t}} (\mathbf {y} | \mathbf {x}) - \log \pi_ {\text {r e f}} (\mathbf {y} | \mathbf {x}) \geq \log \pi_ {\boldsymbol {\theta} _ {t}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right) - \log \pi_ {\text {r e f}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right) \right]. \tag {3.3}
+$$
+
+Step 2. (Learning step) Keep $z$ as of Eq. (3.3), minimize loss function $\mathcal{L}(\pmb{\theta}, z_{t+1})$ with respect to $\pmb{\theta}$ and get $\pmb{\theta}_{t+1} = \arg \min_{\pmb{\theta}} \mathcal{L}(\pmb{\theta}, z_{t+1})$ .
+
+Different from existing methods, the proposed two-step optimization method directly uses the intrinsic reward model to generate the preference data. This approach is particularly feasible for small LLMs, which lack the capacity to effectively use LLM-as-a-Judge prompts (Zheng et al., 2023) for rewarding and ranking. We note that the proposed two-step method is similar to the Expectation-Maximization algorithm and self-training paradigm (Zou et al., 2019). This similarity is supported by the following theorem, which suggests the convergence of the proposed two-step algorithm.
+
+Theorem 3.1. Suppose the optimization $\theta_{t + 1} = \arg \min_{\pmb{\theta}}\mathcal{L}(\pmb {\theta},z_{t + 1})$ is solvable and the SFT loss $\mathcal{L}_{\mathrm{SFT}}(\pmb {\theta};\mathcal{D}_S)\geq 0$ for all $\pmb{\theta}$ and $\mathcal{D}_{\mathrm{S}}$ , the proposed two-step optimization method converges.
+
+# 3.2 CONSISTENCY REGULARIZED SELF-REWARDING
+
+The generalized framework presented in Eq. (3.1) assumes the human feedback or GPT-4 are all reliable so that the preference labeling function $z$ is trustworthy. However, for SRLMs, the accuracy of preference labeling is not always guaranteed. Therefore, treating all selected preference labels as "ground truth" by encoding them as hard labels can lead to overconfident mistakes, potentially propagating biases and inaccuracies from the LLMs. Taking Figure 1 as an example, both the two responses $\mathbf{y}$ and $\mathbf{y}'$ are judged by humans to be of high quality. Forcing the model to be overly confident in distinguishing between these two responses $\{\mathbf{y},\mathbf{y}'\}$ of similar quality can negatively impact the performance of SRLMs during training.
+
+This rewarding bias issue motivates us to mitigate such ambiguity by introducing a consistency-regularized self-rewarding language model, CREAM. Specifically, for a pair of responses with very similar quality, their oracle reward scores should ideally be very close to each other. Particularly, when multiple reward models are available, it is likely that some models will rank one response as superior, while others may rank the opposite response as better, resulting in high ranking inconsistency (i.e., low ranking consistency) among these models. Based on this, CREAM aims to prevent the model from learning from preference pairs with low consistency. Instead, it focuses
+
+
+Figure 2: The flow of CREAM. In the response sampling stage, the policy model $\pi_{\theta_t}$ generates $N$ responses. After that, CREAM uses the reward model $R_{\theta_{t-1}}$ from the previous iteration to reward and rank these responses. Then, the rankings are compared with those generated by current reward model $R_{\theta_t}$ to estimate the consistency rate. Finally, the policy model $\pi_{\theta_t}$ is fine-tuned with consistency regularized preference training objective, resulting in the model $\pi_{\theta_{t+1}}$ for next iteration.
+
+solely on preference pairs with high consistency across different reward models, thereby mitigating the rewarding bias issue and stabilize the learning process to some extent. From the theoretical perspective, we can introduce a regularization term to Eq. (3.1) as
+
+$$
+\mathcal {L} (\boldsymbol {\theta}, z) = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} _ {\mathrm {U}}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} [ \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) + \lambda \mathcal {L} _ {\mathrm {R e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) ], \tag {3.4}
+$$
+
+where the regularization term $\mathcal{L}_{\mathrm{Reg}}(\theta; \mathbf{y}, \mathbf{y}', \mathbf{x})$ prevents the model $\pi_{\theta}$ from overconfidence in distinguishing the preference of $\{\mathbf{y}, \mathbf{y}'\}$ of similar quality, which is quantified in the following lemma.
+
+Lemma 3.2. Let the random variable $z = z(\mathbf{y},\mathbf{y}^{\prime},\mathbf{x})$ be defined as $z(\mathbf{y},\mathbf{y}^{\prime},\mathbf{x}) = \mathbb{1}[\mathbf{y}\succ \mathbf{y}^{\prime}|\mathbf{x}]$ . The Bradley-Terry model (Bradley & Terry, 1952) for the probability of $z$ under parameter $\theta$ is given by
+
+$$
+P _ {\boldsymbol {\theta}} (z) = P _ {\boldsymbol {\theta}} \left(\mathbb {1} \left[ \mathbf {y} \succ \mathbf {y} ^ {\prime} | \mathbf {x} \right]\right) = \sigma \left(\log \left(\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x}) / \pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})\right) - \log \left(\pi_ {\boldsymbol {\theta}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right) / \pi_ {\mathrm {r e f}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right)\right)\right),
+$$
+
+Letting the regularization $\mathcal{L}_{\mathrm{Reg}}$ be defined by
+
+$$
+\begin{array}{l} \mathcal {L} _ {\mathrm {R e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) = - \log \sigma \left(\log \left(\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x}) / \pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})\right) - \log \left(\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x}) / \pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})\right)\right) \\ - \log \sigma \left(\left(\log \pi_ {\boldsymbol {\theta}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right) / \pi_ {\mathrm {r e f}} \left(\mathbf {y} ^ {\prime} | \mathbf {x}\right)\right) - \left(\log \pi_ {\boldsymbol {\theta}} \left(\mathbf {y} | \mathbf {x}\right) / \pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})\right)\right). \tag {3.5} \\ \end{array}
+$$
+
+Then the expected regularized loss under the model $\theta_{t}$ is given by:
+
+$$
+\mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} \mathcal {L} _ {\text {r e g}} \left(\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}\right) = 2 \mathbb {K L} (u (\cdot) \| P _ {\boldsymbol {\theta}} (\cdot)), \tag {3.6}
+$$
+
+where $u(z)$ is the uniform binary distribution, i.e., $u(z = 0) = u(z = 1) = 0.5$ .
+
+As Lemma 3.2 suggests, the $\mathcal{L}_{\mathrm{Reg}}$ will regularize the preference between $\{\mathbf{y},\mathbf{y}^{\prime}\}$ that has similar quality to a uniform distribution. Then the following theorem suggests that using $\mathcal{L}_{\mathrm{DPO}} + \lambda \mathcal{L}_{\mathrm{Reg}}$ corresponds to the soft-labeled DPO which we implemented in CREAM.
+
+Theorem 3.3. For all $\mathbf{y},\mathbf{y}^{\prime},\mathbf{x},z$ , minimizing
+
+$$
+\mathcal {L} (\boldsymbol {\theta}, z) = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S F T}}) + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} _ {\mathrm {U}}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} [ \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) + \lambda \mathcal {L} _ {\mathrm {R e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) ]
+$$
+
+is equivalent with minimizing
+
+$$
+\begin{array}{l} \mathcal {L} (\boldsymbol {\theta}, z) = \frac {1}{1 + 2 \lambda} \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) \\ + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} _ {U}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} \left[ \mathcal {C} _ {\lambda} \mathcal {L} _ {\mathrm {D P O}} \left(\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z\right) + (1 - \mathcal {C} _ {\lambda}) \mathcal {L} _ {\mathrm {D P O}} \left(\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, 1 - z\right) \right], \tag {3.7} \\ \end{array}
+$$
+
+where the $1 - z$ reverses the preference order of $z(\mathbf{y},\mathbf{y}^{\prime},\mathbf{x})$ and $\mathcal{C}_{\lambda} = (1 + \lambda) / (1 + 2\lambda)$ . We choose to reverse the preference order if there is evidence that the annotated preference data is reversed. And the final form can also be viewed as the label smoothing. Details are in Appendix C.2.
+
+Theorem 3.3 suggests that instead of calculating the regularization term $\mathcal{L}_{\mathrm{Reg}}$ , we can use the soft-labeled DPO to train Eq. (3.7). In particular, when $\lambda = 0$ , $\mathcal{C}_{\lambda} = 0$ and Eq. (3.7) degenerates to Eq. (3.1). This represents the case where the preference label $z$ is trustworthy from human or
+
+Algorithm 1 Consistency-Regularized Self-Rewarding Language Model
+Input: seed SFT dataset $\mathcal{D}_{\mathrm{S}}$ ; unlabeled prompt dataset $\mathcal{D}_{\mathrm{U}}$ ; initial model parameter $\theta_0$
+Input: number of iterations $T$ ; learning rate $\eta$
+1: /\* SFT training \*/
+2: Obtain $\pmb{\theta}_{1}$ by taking the gradient steps over loss $L_{1}(\pmb {\theta}) = \sum_{(\mathbf{x},\mathbf{y})\in \mathcal{D}_{\mathrm{S}}}\log \pi_{\pmb{\theta}}(\mathbf{y}|\mathbf{x})$ from $\pmb{\theta}_0$
+3:/\* Iterative Preference Training training \*/
+4: for $t = 1$ to $T$ do
+5: Sample $\{\mathbf{y}_{ij}\}_{i = 1}^{N}\sim \pi_{\pmb{\theta}_t}(\cdot |\mathbf{x}_j)$ for all ${\bf x}_j\in \mathcal{D}_{\mathrm{U}}$ // Response Sampling
+6: Compute reward $r_{ij} = \log \pi_{\pmb{\theta}_t}(\mathbf{y}_{ij}|\mathbf{x}_i) - \log \pi_{\pmb{\theta}_0}(\mathbf{y}_{ij}|\mathbf{x}_i)$ for all $i\in [N],j\in [|\mathcal{D}_{\mathrm{U}}|]$
+7:Obtain rank $J_{ij}$ for all $y_{ij}$ using reward $r_{ij}$ // Rank on model $\pmb{\theta}_{t}$
+8: Compute reward $r_{ij}' = \log \pi_{\pmb{\theta}_{t - 1}}(\mathbf{y}_{ij}|\mathbf{x}_i) - \log \pi_{\pmb{\theta}_0}(\mathbf{y}_{ij}|\mathbf{x}_i)$ for all $i\in [N],j\in [|\mathcal{D}_{\mathrm{U}}|]$
+9:Obtain rank $K_{ij}$ for all $y_{ij}$ using reward $r_{ij}'$ // Rank on model $\pmb{\theta}_{t - 1}$
+10:Compute $\tau_j = \tau (\{J_{ij}\} _i,\{K_{ij}\} _i)$ according to Eq. (3.10) for all $j\in [|\mathcal{D}_{\mathrm{U}}|]$
+11:Compute consistency rate $\mathcal{C} = |\mathcal{D}_{\mathrm{U}}|^{-1}\sum_{j}(\tau_{j} + 1) / 2$ // Adaptive consistency regularization
+12:Compose preference dataset $\mathcal{D}_{\mathrm{DPO}}$ using pairs $\{\mathbf{x}_j,\mathbf{y}_j^+, \mathbf{y}_j^-\} _j$ according to Eq. (3.11)
+13:Compose preference dataset $\mathcal{D}_{\mathrm{RDPO}}$ using pairs $\{\mathbf{x}_j,\mathbf{y}_j^-, \mathbf{y}_j^+\} _j$ according to Eq. (3.12)
+14:Update $\pmb{\theta}_{t + 1}$ by minimizing loss $\mathcal{L}(\pmb {\theta}) = \mathcal{CL}_{\mathrm{DPO}}(\pi_{\pmb{\theta}_t},\mathcal{D}_{\mathrm{DPO}}) + (1 - \mathcal{C})\mathcal{L}_{\mathrm{DPO}}(\pi_{\pmb{\theta}_t},\mathcal{D}_{\mathrm{RDPO}})$
+15: end for
+Output: aligned policy model $\pi_{\pmb{\theta}_T}$
+
+some oracle reward models (e.g., GPT-4). In other words, $\lambda$ represents the confidence of the label function $z$ . Specially, since in our two-step optimization paradigm, the label function $z$ is directly derived from the previous model $\pi_{\theta_t}$ , we can measure the performance of $\pi_{\theta_t}$ using the consistency between model $\theta_t$ and the baseline model (e.g., external reward model) $\theta_t'$ , defined by
+
+$$
+\lambda (\mathbf {x}) = 2 \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} \mathbb {1} [ \mathbf {y} \succ \mathbf {y} ^ {\prime} | \mathbf {x}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} \succ \mathbf {y} ^ {\prime} | \mathbf {x}, \boldsymbol {\theta} _ {t} ^ {\prime} ], \tag {3.8}
+$$
+
+and when $\lambda \to 0$ , $\mathcal{C}_{\lambda} \approx 1 - \lambda$ representing the consistency of model $\theta_{t}$ and $\pmb{\theta}_{t}^{\prime}$ . $\mathbb{1}[\mathbf{y} \succ \mathbf{y}^{\prime}|\mathbf{x}, \pmb{\theta}_{t}]$ means the response $\mathbf{y}$ is better than $\mathbf{y}^{\prime}$ given the prompt $\mathbf{x}$ and language model parameter $\pmb{\theta}_{t}$ , i.e.,
+
+$$
+\mathbb {1} \left[ \log (\pi_ {\pmb {\theta} _ {t}} (\mathbf {y} | \mathbf {x}) / \pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})) - \log (\pi_ {\pmb {\theta} _ {t}} (\mathbf {y} ^ {\prime} | \mathbf {x}) / \pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})) \right],
+$$
+
+and similar definition applies to $\mathbb{1}[\mathbf{y}\succ \mathbf{y}'|\mathbf{x},\pmb{\theta}_t']$
+
+# 3.3 PROPOSED ALGORITHM
+
+Equipped with the above two-stage optimization and the consistency-regularized self-rewarding, we are ready to present the implementation of CREAM in Algorithm 1. The whole framework of CREAM is also illustrated in Figure 2. The algorithm starts from the SFT training to obtain the first model parameter $\theta_{1}$ in Line 2. A similar approach is applied in Yuan et al. (2024) for avoid calculating the $\mathcal{L}_{\mathrm{SFT}}$ in the future optimization steps. Then for each $\mathbf{x}_j$ in the unlabeled prompt set $\mathcal{D}_{\mathrm{U}}, N$ response candidates $\{\mathbf{y}_i\}_{i=1}^N$ are sampled in Line 5. Then reward scores of these $N$ candidates can be calculated according to Rafailov et al. (2023) by
+
+$$
+r _ {i j} = \beta \left[ \log \pi_ {\boldsymbol {\theta} _ {t}} \left(\mathbf {y} _ {i j} \mid \mathbf {x} _ {j}\right) - \log \pi_ {\boldsymbol {\theta} _ {0}} \left(\mathbf {y} _ {i j} \mid \mathbf {x} _ {j}\right) \right] + \beta \log Z (\mathbf {x} _ {j}), \tag {3.9}
+$$
+
+where we use the initial model parameter $\theta_0$ as the reference policy $\pi_{\mathrm{ref}}$ . Since $\beta \geq 0$ and $\log Z(\mathbf{x}_j)$ is a constant across different response $\mathbf{y}_i$ for the same input prompt $\mathbf{x}_j$ , we can drop these factors and calculate rewards in Line 6. Specially, when $t = 1$ , the rank $K_{ij}$ is calculated based on the reference policy $\theta_0$ itself. Thus we instead use the likelihood $r_{ij} = \log \pi_{\theta_0}(\mathbf{y}_{ij}|\mathbf{x}_j)$ as the reward for this edge case. The rank for these $N$ candidates are therefore obtained in Line 7, where $J_{ij}$ means response $\mathbf{y}_{ij}$ is in the $J_{ij}$ -th best in the preference list of $\mathbf{x}_j$ .
+
+Consistency-Regularized Self-Rewarding. As discussed in Eq. (3.8), a baseline model is required to measure the consistency. In the self-rewarding scenario, it is infeasible to add an external reward model as the baseline model. Fortunately, we can employ the model before last update $\theta_{t-1}$ as the baseline model $\theta_t'$ (i.e., last iteration's model) for evaluating the consistency of the model $\theta$ , thanks to chances provided by iterative training manner. Such a procedure helps mitigate the training error introduced in $t-1$ -th step before obtaining $\theta_t$ . Considering a pair of tied preference pairs $\mathbf{y}, \mathbf{y}'$ both performing well, as demonstrated in Figure 1. $P[\mathbf{y} \succ \mathbf{y}'|\mathbf{x}, \theta_t]$ will be oscillating around
+
+0.5 when $t$ grows due to the random noise. Otherwise $P[\mathbf{y} \succ \mathbf{y}'|\mathbf{x},\boldsymbol{\theta}_t]$ might consistently converge to 0 or 1. Due to this oscillation, the consistency between $\boldsymbol{\theta}_{t - 1}$ and $\boldsymbol{\theta}_t$ on this specific preference pair would be low, and the algorithm will learn less from this noninformative preference pair thus stabilize this oscillation.
+
+Specifically, we calculate the rank of these $N$ candidates using $\theta_{t-1}$ in Line 9 and then use the Kendall's Tau coefficient (Kendall, 1938) denoted by
+
+$$
+\tau_ {j} = \frac {2}{N (N - 1)} \sum_ {1 \leq i < i ^ {\prime} \leq N} [ \mathbb {1} \left[ \left(J _ {i j} - J _ {i ^ {\prime} j}\right) \left(K _ {i j} - K _ {i ^ {\prime} j}\right) > 0 \right] - \mathbb {1} \left[ \left(J _ {i j} - J _ {i ^ {\prime} j}\right) \left(K _ {i j} - K _ {i ^ {\prime} j}\right) < 0 \right] ]. \tag {3.10}
+$$
+
+Kendall's Tau coefficient is a widely used coefficient (McLeod, 2005; Abdi, 2007) to measure the consistency of two ranking sequences. Basically, when two sequences perfectly aligns, $\tau_{j} = 1$ and when two sequences never aligns, $\tau_{j} = -1$ . The following lemma draws the further connection between the Kendall's Tau and the regularization parameter $\lambda$ proposed in Section 3.2.
+
+Lemma 3.4. Suppose the $N$ response candidate $\{\mathbf{y}_{ij}\}_{i}$ is i.i.d. given the prompt $\mathbf{x}_j$ , then
+
+$$
+\mathbb {E} [ \tau_ {j} ] = 1 - 4 \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} \mathbb {1} [ \mathbf {y} \succ \mathbf {y} ^ {\prime} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} \prec \mathbf {y} ^ {\prime} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] = 1 - 2 \lambda ,
+$$
+
+where the expectation is taken over the randomness of sampling the $N$ candidate set.
+
+Given Lemma 3.4, we can recover $\mathcal{C}_{\lambda} \approx 1 - \lambda = (1 + \tau_{j}) / 2$ and we average all $\tau_{j}$ for all $\mathbf{x}_j \in \mathcal{D}_{\mathrm{U}}$ in Line 11. Finally, in Line 12, we compose the preference dataset by selecting the best response $\mathbf{y}_j^+ = \mathbf{y}_{i+j}$ and the worst response $\mathbf{y}_j^- = \mathbf{y}_{i-j}$ which is similar with (Yuan et al., 2024).
+
+$$
+\mathcal {D} _ {\mathrm {D P O}} = \left\{\left(\mathbf {x} _ {j}, \mathbf {y} _ {i + j}, \mathbf {y} _ {i - j}\right) \mid \mathbf {x} _ {j} \in \mathcal {D} _ {\mathrm {U}}, i ^ {+} = \underset {i} {\arg \min } J _ {i j}, i ^ {-} = \underset {i} {\arg \max } J _ {i j} \right\} \tag {3.11}
+$$
+
+Following Theorem 3.3, we also prepare the reverse DPO dataset by switching the best response and the worst response by
+
+$$
+\mathcal {D} _ {\mathrm {R D P O}} = \left\{\left(\mathbf {x} _ {j}, \mathbf {y} _ {i ^ {-} j}, \mathbf {y} _ {i + j}\right) \mid \mathbf {x} _ {j} \in \mathcal {D} _ {\mathrm {U}}, i ^ {+} = \underset {i} {\arg \min } J _ {i j}, i ^ {-} = \underset {i} {\arg \max } J _ {i j} \right\} \tag {3.12}
+$$
+
+and update $\theta_{t + 1}$ by minimizing the empirical loss of Eq. (3.7) in Line 14. The detailed proof of theorems and lemmas are provided in the Appendix B.
+
+# 4 EXPERIMENT
+
+# 4.1 EXPERIMENTAL SETUP
+
+Data. In our experiments, we use Open Assistant dataset (Köpf et al., 2024) and only reserve about $3.4\mathrm{K}$ human-annotated examples as the seed SFT data $\mathcal{D}_{\mathrm{S}}$ . To construct the unlabeled prompt dataset $\mathcal{D}_{\mathrm{U}}$ , we mix prompts of $\mathcal{D}_{\mathrm{S}}$ with the train split of each downstream task (only reserve the prompts) including (1) ARC-Easy/Challenge (Clark et al., 2018), (2) OpenBookQA (Mihaylov et al., 2018), (3) SIQA (Sap et al., 2019), and (4) GSM8K (Cobbe et al., 2021). Finally, this process results in a total of $21\mathrm{K}$ prompts in $\mathcal{D}_{\mathrm{U}}$ , which we distribute equally across iterative self-rewarding trainings.
+
+Models. Due to limited computational resources, we mainly conduct experiments with two LLMs with about 7B parameters, including Llama-3 (Dubey et al., 2024) and Llama-2 (Touvron et al., 2023), both of which are widely used. Note that the proposed framework is designed for LLMs of any size, while validating our findings on other LLMs will be our future work.
+
+Baseline Methods. We mainly compare our method with SRLM (Yuan et al., 2024) which uses the same LLM to serve as both the policy and reward model to generate preference data for iterative training. Additionally, we introduce a variant of RL with AI feedback (Guo et al., 2024a), referred to as "Oracle". In this variant, the reward model in SRLM is replaced with an external reward model to demonstrate the upper bound performance of SRLM. Specifically, we use InternLM2 (Cai et al., 2024), a specialized trained reward model, to provide the reward scores for the generated responses. We further enhance Oracle's rewarding by leveraging the labels from downstream tasks to improve the rewarding accuracy. To compare the regularization method, we introduce "SRLM + KL" variant which adds a simple regularization term $\lambda [\frac{\pi_{\theta}(y|x)}{\pi_{\mathrm{ref}}(y|x)} -\frac{\pi_{\theta}(y'|x)}{\pi_{\mathrm{ref}}(y'|x)}]^2$ to the original DPO
+
+Table 1: Main results of each method on test sets of downstream tasks. The exact match accuracies are reported. The “↑” and “↓” indicate the performance improvement and degradation compared to the method's last iteration (e.g., M1 → M2 and M2 → M3), respectively. The best performance among methods using self-rewarding is highlighted in bold.
+
+
Model
Method
Reward
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM&K
Average
Llama-3
Initial
-
M0
86.29
80.37
86.00
68.58
78.01
79.85
SFT
-
M1
86.78
80.14
86.40
69.50
78.39
80.24
Oracle
External
M2
89.60 ↑
82.17 ↑
90.00 ↑
72.88 ↑
80.82 ↑
83.09 ↑
M3
89.31 ↓
81.31 ↓
90.20 ↑
73.75 ↑
76.04 ↓
82.12 ↓
SRLM
M2
87.79 ↑
80.38 ↑
87.80 ↑
70.95 ↑
78.01 ↓
80.99 ↑
M3
87.17 ↓
81.23 ↑
87.30 ↓
70.37 ↓
77.48 ↓
80.71 ↓
SRLM + KL
Self
M2
87.92 ↑
79.78 ↓
86.60 ↑
71.49 ↑
79.38 ↑
81.03 ↑
M3
88.38 ↑
80.97 ↑
88.20 ↑
71.19 ↓
80.29 ↑
81.81 ↑
CREAM w/o RC
M2
88.26 ↑
79.86 ↓
86.80 ↑
69.55 ↑
79.98 ↑
80.89 ↑
M3
88.09 ↓
80.55 ↑
87.20 ↑
71.39 ↑
79.23 ↓
81.29 ↑
CREAM
M2
88.89 ↑
80.89 ↑
88.00 ↑
69.79 ↑
81.04 ↑
81.72 ↑
M3
89.52 ↑
83.36 ↑
90.20 ↑
72.06 ↑
81.73 ↑
83.37 ↑
Llama-2
Initial
-
M0
61.07
48.98
62.20
50.36
23.65
49.25
SFT
-
M1
60.44
48.46
63.20
50.77
23.88
49.35
Oracle
External
M2
70.20 ↑
55.03 ↑
75.40 ↑
63.66 ↑
30.02 ↑
58.86 ↑
M3
71.72 ↑
55.80 ↑
77.20 ↑
62.44 ↓
29.57 ↓
59.35 ↑
SRLM
M2
58.67 ↓
46.67 ↓
59.80 ↑
49.69 ↓
25.17 ↑
48.00 ↓
M3
46.55 ↓
34.47 ↓
49.20 ↓
48.06 ↓
22.14 ↓
40.08 ↓
SRLM + KL
Self
M2
57.45 ↓
46.93 ↓
62.40 ↓
51.02 ↑
24.18 ↑
48.40 ↓
M3
57.20 ↓
46.42 ↓
61.60 ↓
49.08 ↓
26.08 ↑
48.08 ↓
CREAM w/o RC
M2
58.25 ↓
45.56 ↓
61.60 ↓
51.13 ↑
24.56 ↑
48.22 ↓
M3
60.06 ↑
49.23 ↑
65.40 ↑
49.44 ↓
25.62 ↑
49.95 ↑
CREAM
M2
58.97 ↓
47.53 ↓
62.80 ↓
50.43 ↓
24.41 ↑
48.83 ↓
M3
62.08 ↑
48.81 ↑
64.60 ↑
51.22 ↑
25.85 ↑
50.51 ↑
+
+loss, where $\lambda \in [0.1, 0.2, \dots, 1.0]$ is a hyperparameter. In order to validate the contribution of our automatically determined consistency rate via ranking correlation, we also introduce a variant "CREAM w/o RC" which replaces the ranking correlation (RC) with a manually set value as the consistency rate, where this value is searched in the range of $[0.1, 0.3, \dots, 0.9]$ .
+
+Implementation Details. In our experiments, we fine-tune the initial model (M0) on the seed SFT data for 3 epochs with a learning rate of $1e - 6$ , resulting in model M1. Following SRLM approach, we then iteratively fine-tune the model using the preference learning objective two additional iterations, producing models M2 and M3. In the preference training of each iteration, we set $\beta = 0.1$ of DPO, and fine-tune the model for 1 epoch with a learning rate of $1e - 6$ . All training processes use AdamW optimizer (Loshchilov & Hutter, 2019) with a warmup ratio of 0.1. For the response sampling stage of all SRLM methods, we use a decoding temperature of 0.8 and generate $N = 5$ responses per prompt. For evaluating downstream tasks, we use greedy decoding to generate answers.
+
+# 4.2 MAIN RESULTS
+
+The main results are shown in Table 1. From these
+
+(1) The Standard SRLM fails to achieve satisfactory performance, particularly with Llama-2 which has weaker foundation performance, which indicates its limitations for 7B-level LLMs. (2) Compared to SRLM, CREAM achieves a significant improvement, showing the advantage of introducing the proposed regularization. (3) SRLM equipped with an oracle reward model (Oracle) achieves the best performance overall. This highlights a critical challenge for all methods with unreliable rewarding. Notably, for Llama-3, CREAM even outperforms Oracle except on SIQA dataset. This superiority underlines the success of the proposed method in mitigating the rewarding bias issue. (4) The consistent improvements of CREAM across iterations show the effectiveness of the proposed regularization method in miti
+
+gating the rewarding bias issue. Results of later iterations (up to M6) in Appendix C.1 also demon
+
+results, we have the following findings:
+
+
+Figure 3: Arena of CREAM v.s. SRLM and Oracle, judged by GPT-4o.
+
+strates that adding such regularization can help prevent the model from degeneration in the long term. (5) Though SRLM + KL method improves performance of SRLM via regularization, its overall performance across iterations is still inferior to CREAM, indicating CREAM performs better than directly restricting the KL divergence. (6) CREAM consistently outperforms "CREAM w/o RC" which manually set the consistency rate. And using the dynamically calculated consistency rate can eliminate the costs of hyperparameter search.
+
+Alignment Arena. To more directly compare the alignment performance of CREAM, we further show the Arena win-rate of our method in Figure 3. We can find that CREAM can beat baseline methods with the same iteration, which confirms the superiority of the proposed regularized self-reewarding. Also, the win and tie rates of CREAM increase with the iteration against stronger model, i.e., Oracle, indicating the consistent performance improvements across iterations.
+
+# 4.3 ANALYSIS
+
+# 4.3.1 ANALYSIS OF REWARDING
+
+Rewarding Consistency. We first examine the consistency of rewarding of different methods using their corresponding models from the last iteration in Table 2. Here, we use the proposed Consistency Rate $\mathcal{C}$ , Kendall correlation coefficient $\tau$ , Spearman correlation coefficient, and TopOrder metrics to measure the consistency, where this metric evaluates whether the final paired preference data remains the same, calculated by: $\mathrm{TopOrder}_j = \mathbb{1}[\arg \min J_j = \arg \min K_j] \cdot \mathbb{1}[\arg \max J_j = \arg \max K_j]$ , where $J_{j}$ and $K_{j}$ are the rankings provided by current model and the last iteration's model, respectively. This metric assesses whether both the least preferred and most preferred responses are consistently ranked across iterations. The results confirm that SRLMs exhibit a rewarding consistency issue, indicating that the generated preference data contains noise. In contrast, CREAM keeps the ranking consistency across iterations thanks to the regularized training.
+
+Prompt Rewarding v.s. DPO Rewarding. As aforementioned, 7B level LLMs struggle with generating accurate rewards when using LLM-as-a-Judge prompting due to their limited capability. Both Figure 5 and Figure 4 clearly show that prompt rewarding is not effective for SRLM with small LLMs, as the performance starts to decrease at the first iteration $(\mathrm{M}1\to \mathrm{M}2)$ when
+
+trained on the self-rewarded preference data. In contrast, the adopted DPO rewarding method can be more suitable, since it is intrinsically aligned with the model's learning objective.
+
+Table 2: Ranking consistency of CREAM and SRLM across iterations using Llama-3.
+
+
Iterations
Method
Consistency C↑
Kendall τ ↑
Spearman ↑
TopOrder ↑
M2 vs M1
SRLM
0.39 ± 0.21
-0.22 ± 0.41
0.36 ± 0.24
0.03 ± 0.18
CREAM
0.73 ± 0.18
0.46 ± 0.35
0.77 ± 0.19
0.19 ± 0.39
M3 vs M2
SRLM
0.46 ± 0.19
-0.08 ± 0.38
0.50 ± 0.22
0.12 ± 0.33
CREAM
0.92 ± 0.09
0.84 ± 0.19
0.95 ± 0.07
0.59 ± 0.49
+
+Ranking Accuracy. The ranking accuracy is crucial for self-rewarding methods, as it directly affects the quality of the self-generated preference data for training. Figure 4 provides an intuitive comparison of the rewarding performance. The results include the ranking accuracy on self-generated preference data and the RewardBench (Lambert et al., 2024), both of which is formulated to predict the preferred one between two responses. We use the preference data obtained by self-rewarding with ground truth ranking labels, for testing the model's in-domain ranking performance. RewardBench is used to assess models' generalization beyond the training domain. CREAM consistently achieves higher ranking accuracy than baseline methods, which promises more reliable data for training. Even though the overall ranking accuracy $(\leq 70\%)$ is not satisfying, the introduced consistency regularization can help mitigate the negative impacts of potentially noisy ranking annotations.
+
+
+Figure 4: Pairwise ranking accuracy on Reward-Bench and a curated Preference Data. P-SRLM is SRLM with prompt rewarding (LLM-as-a-Judge).
+
+
+Figure 5: Average performance of SRLM, P-SRLM, and CREAM. The detailed performance is shown in Table 1 and Table 13.
+
+# 4.3.2 RELIABILITY OF SELF-CONSISTENCY
+
+The most straightforward way to enhance the rewarding and ranking accuracy is by incorporating external reward models, such as the SRLM variant "Oracle" used in our experiments. The theoretical analysis in Eq. (3.8) suggests that we can mitigate the rewarding bias issue by calculating the ranking consistency between current model and other available baseline reward models (BRMs). However, it is not always feasible to have access to such external reward models in practice, such as
+
+the self-rewarding scenario. Thus, we instead propose to use the last iteration's model as the BRM to measure the consistency of rewarding.
+
+Table 3: Comparison of CREAM using oracle reward model and last iteration's model. BRM denotes the choice of baseline reward model.
+
+
Method
BRM
Arc-E
Arc-C
OBQA
SIQA
GSM8K
Llama-3 M1
-
86.78
80.14
86.40
69.50
78.39
CREAM M2
M0
88.89
80.89
88.00
69.79
81.04
CREAM M2
Oracle
88.51
81.06
86.20
72.21
79.91
Llama-2 M1
-
60.44
48.46
63.20
50.77
23.88
CREAM M2
M0
58.97
47.53
62.80
50.43
24.41
CREAM M2
Oracle
62.42
48.72
66.00
51.13
22.52
+
+Choice of Baseline Reward Model. To measure the impacts on CREAM of using different BRMs, we fine-tune the M1 model using CREAM with two different BRMs: the rewarding function of Oracle and the model from the last iteration (M0). As shown in Table 3, using a strong reward model as the BRM can bring better regularization effect, especially for Llama-2. However, we find that the last iteration's model also provides a reasonably reliable consistency signal for Llama-3. We attribute this to Llama-3's inherently stronger foundational alignment and better internal consistency, which allows it to effectively utilize itself without needing an external reward model.
+
+# 4.3.3 CONSISTENCY MEASUREMENT
+
+Besides the adopted Kendall $\tau$ coefficient, other metrics can also be used to measure the consistency between two preference ranking lists, such as Spearman coefficient (Spearman, 1904) and the aforementioned TopOrder method. We conduct a comparison experiments of using different consistency measurement methods in Table 4. We can observe that: (1) All these measurements are effective with CREAM, indicating the generalization and applica
+
+Table 4: Performance of CREAM using different consistency measurements with Llama-3.
+
+
Iteration
Method
Arc-E
Arc-C
OBQA
SIQA
GSM8K
M1
-
86.78
80.14
86.40
69.50
78.39
M2
Spearman
86.95
82.00
85.40
70.05
78.77
TopOrder
87.25
80.12
86.88
70.83
79.75
Kendall (Ours)
88.89
80.89
88.00
69.79
81.04
M3
Spearman
88.76
81.83
90.00
70.98
79.15
TopOrder
88.51
80.37
87.40
71.03
79.76
Kendall (Ours)
89.52
83.36
90.20
72.06
81.73
+
+ability of our regularized training approach. (2) Kendall correlation coefficient generally yields higher scores across various datasets compared to Spearman and TopOrder methods. (3) The differences in performance highlight the sensitivity of these consistency measurements. Specifically, the Spearman coefficient appears slightly less robust than Kendall's $\tau$ , as analyzed in Croux & Dehon (2010). Meanwhile, TopOrder focuses only on top-1 and bottom-1 rankings, limiting its evaluation scope.
+
+# 5 CONCLUSION
+
+In this paper, we first formulate a generalized iterative preference fine-tuning framework for self-rewarding language models (SRLMs), which can also be applied to other iterative preference training methods. Then, we highlight the rewarding bias that arises from overconfident preference labeling, which is particularly problematic for small LLMs, such as those with 7B parameters. This rewarding bias results in the accumulation of noisy and unreliable preference data, harming the preference training and hindering alignment performance of LLMs. To address this issue, we proposed the Consistency Regularized sElf-Rewarding lLanguage Model (CREAM), which leverages the consistency of rewarding across different iterations as a regularization signal. This approach allows the model to learn more selectively, emphasizing reliable preference data and avoiding overconfidence in preference labeling. Extensive experimental results and analysis on various natural language benchmark datasets demonstrate the effectiveness of the proposed method in mitigating the rewarding bias issue and improving the alignment performance of SRLMs. We believe that these findings can provide valuable insights for future research on self-improvement methods of LLM alignment.
+
+# REFERENCES
+
+Hervé Abdi. The Kendall rank correlation coefficient. Encyclopedia of measurement and statistics, 2:508-510, 2007.
+Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
+Usman Anwar, Abdulhair Saporov, Javier Rando, Daniel Paleka, Miles Turpin, Peter Hase, Ekdeep Singh Lubana, Erik Jenner, Stephen Casper, Oliver Sourbut, et al. Foundational challenges in assuring alignment and safety of large language models. arXiv preprint arXiv:2404.09932, 2024.
+Mohammad Gheshlaghi Azar, Mark Rowland, Bilal Piot, Daniel Guo, Daniele Calandriello, Michal Valko, and Rémi Munos. A general theoretical paradigm to understand learning from human preferences, 2023.
+Yuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862, 2022.
+Yushi Bai, Jiahao Ying, Yixin Cao, Xin Lv, Yuze He, Xiaozhi Wang, Jifan Yu, Kaisheng Zeng, Yijia Xiao, Haozhe Lyu, Jiayin Zhang, Juanzi Li, and Lei Hou. Benchmarking foundation models with language-model-as-an-examiner. In Thirty-seventh Conference on Neural Information Processing Systems Datasets and Benchmarks Track, 2023.
+Ralph Allan Bradley and Milton E Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324-345, 1952.
+Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535-541, 2006.
+Zheng Cai, Maosong Cao, Haojiong Chen, Kai Chen, Keyu Chen, Xin Chen, Xun Chen, Zehui Chen, Zhi Chen, Pei Chu, Xiaoyi Dong, Haodong Duan, Qi Fan, Zhaoye Fei, Yang Gao, Jiaye Ge, Chenya Gu, Yuzhe Gu, Tao Gui, Aijia Guo, Qipeng Guo, Conghui He, Yingfan Hu, Ting Huang, Tao Jiang, Penglong Jiao, and et al. Internl m2 technical report, 2024.
+Zixiang Chen, Yihe Deng, Huizhuo Yuan, Kaixuan Ji, and Quanquan Gu. Self-play fine-tuning converts weak language models to strong language models. arXiv preprint arXiv:2401.01335, 2024.
+Paul F. Christiano, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pp. 4299-4307, 2017.
+Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the AI2 reasoning challenge. CoRR, abs/1803.05457, 2018.
+Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. CoRR, abs/2110.14168, 2021.
+Thomas Coste, Usman Anwar, Robert Kirk, and David Krueger. Reward model ensembles help mitigate overoptimization. arXiv preprint arXiv:2310.02743, 2023.
+Christophe Croux and Catherine Dehon. Influence functions of the spearman and kendall correlation measures. Statistical methods & applications, 19:497-515, 2010.
+
+Hanze Dong, Wei Xiong, Deepanshu Goyal, Rui Pan, Shizhe Diao, Jipeng Zhang, Kashun Shum, and Tong Zhang. Raft: Reward ranked finetuning for generative foundation model alignment. ArXiv preprint, abs/2304.06767, 2023.
+Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, and et al. The llama 3 herd of models, 2024.
+Yann Dubois, Chen Xuechen Li, Rohan Taori, Tianyi Zhang, Ishaan Gulrajani, Jimmy Ba, Carlos Guestrin, Percy S Liang, and Tatsunori B Hashimoto. Alpacafarm: A simulation framework for methods that learn from human feedback. Advances in Neural Information Processing Systems, 36, 2024.
+Jacob Eisenstein, Chirag Nagpal, Alekh Agarwal, Ahmad Beirami, Alex D'Amour, DJ Dvijotham, Adam Fisch, Katherine Heller, Stephen Pfohl, Deepak Ramachandran, et al. Helping or herding? reward model ensembles mitigate but do not eliminate reward hacking. arXiv preprint arXiv:2312.09244, 2023.
+Kawin Ethayarajh, Winnie Xu, Niklas Muennighoff, Dan Jurafsky, and Douwe Kiela. Kto: Model alignment as prospect theoretic optimization, 2024.
+Adam Fisch, Jacob Eisenstein, Vicky Zayats, Alekh Agarwal, Ahmad Beirami, Chirag Nagpal, Pete Shaw, and Jonathan Berant. Robust preference optimization through reward model distillation. arXiv preprint arXiv:2405.19316, 2024.
+Shangmin Guo, Biao Zhang, Tianlin Liu, Tianqi Liu, Misha Khalman, Felipe Llinares, Alexandre Rame, Thomas Mesnard, Yao Zhao, Bilal Piot, Johan Ferret, and Mathieu Blondel. Direct language model alignment from online AI feedback. CoRR, abs/2402.04792, 2024a.
+Shangmin Guo, Biao Zhang, Tianlin Liu, Tianqi Liu, Misha Khalman, Felipe Llinares, Alexandre Rame, Thomas Mesnard, Yao Zhao, Bilal Piot, et al. Direct language model alignment from online ai feedback. arXiv preprint arXiv:2402.04792, 2024b.
+Geoffrey Hinton. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
+Jiwoo Hong, Noah Lee, and James Thorne. Orpo: Monolithic preference optimization without reference model. arXiv preprint arXiv:2403.07691, 2(4):5, 2024.
+Jiaxin Huang, Shixiang Shane Gu, Le Hou, Yuexin Wu, Xuezhi Wang, Hongkun Yu, and Jiawei Han. Large language models can self-improve. arXiv preprint arXiv:2210.11610, 2022.
+Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Yejin Bang, Andrea Madotto, and Pascale Fung. Survey of hallucination in natural language generation. ACM Comput. Surv., 55:248:1-248:38, 2023.
+Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1-2):81-93, 1938.
+Andreas Köpf, Yannic Kilcher, Dimitri von Rütte, Sotiris Anagnostidis, Zhi Rui Tam, Keith Stevens, Abdullah Barhoum, Duc Nguyen, Oliver Stanley, Richard Nagyfi, et al. Openassistant conversationalist, and open assistant conversations-democratizing large language model alignment. Advances in Neural Information Processing Systems, 36, 2024.
+Nathan Lambert, Valentina Pyatkin, Jacob Morrison, LJ Miranda, Bill Yuchen Lin, Khyathi Raghavi Chandu, Nouha Dziri, Sachin Kumar, Tom Zick, Yejin Choi, Noah A. Smith, and Hannaneh Hajishirzi. Rewardbench: Evaluating reward models for language modeling. CoRR, abs/2403.13787, 2024.
+Jan Leike, David Krueger, Tom Everitt, Miljan Martic, Vishal Maini, and Shane Legg. Scalable agent alignment via reward modeling: a research direction. arXiv preprint arXiv:1811.07871, 2018.
+
+Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=Bkg6RiCqY7.
+A Ian McLeod. Kendall rank correlation and mann-kendall trend test. R package Kendall, 602:1-10, 2005.
+Yu Meng, Mengzhou Xia, and Danqi Chen. Simpo: Simple preference optimization with a reference-free reward. arXiv preprint arXiv:2405.14734, 2024.
+Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. In EMNLP, 2018.
+Seyed Iman Mirzadeh, Mehrdad Farajtabar, Ang Li, Nir Levine, Akihiro Matsukawa, and Hassan Ghasemzadeh. Improved knowledge distillation via teacher assistant. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 5191-5198, 2020.
+Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in neural information processing systems, 35: 27730-27744, 2022a.
+Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul F. Christiano, Jan Leike, and Ryan Lowe. Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems 35: Annual Conference on Neural Information Processing Systems 2022, NeurIPS 2022, New Orleans, LA, USA, November 28 - December 9, 2022, 2022b.
+Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1:9, 2019.
+Rafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. In Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023, 2023.
+Alexandre Ramé, Nino Vieillard, Léonard Hussenot, Robert Dadashi, Geoffrey Cideron, Olivier Bachem, and Johan Ferret. Warm: On the benefits of weight averaged reward models. arXiv preprint arXiv:2401.12187, 2024.
+Maarten Sap, Hannah Rashkin, Derek Chen, Ronan Le Bras, and Yejin Choi. Socialiaq: Common-sense reasoning about social interactions. CoRR, abs/1904.09728, 2019.
+John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. ArXiv preprint, abs/1707.06347, 2017.
+C Spearman. The proof and measurement of association between two things. The American Journal of Psychology, 15(1):72-101, 1904.
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, and et al. Llama 2: Open foundation and fine-tuned chat models. CoRR, abs/2307.09288, 2023.
+Weizhe Yuan, Richard Yuanzhe Pang, Kyunghyun Cho, Xian Li, Sainbayar Sukhbaatar, Jing Xu, and Jason Weston. Self-rewarding language models. In *Forty-first International Conference on Machine Learning*, ICML 2024, Vienna, Austria, July 21-27, 2024. OpenReview.net, 2024.
+Zheng Yuan, Hongyi Yuan, Chuanqi Tan, Wei Wang, Songfang Huang, and Fei Huang. Rrhf: Rank responses to align language models with human feedback without tears. arXiv preprint arXiv:2304.05302, 2023.
+
+Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah Goodman. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476-15488, 2022.
+Shun Zhang, Zhenfang Chen, Sunli Chen, Yikang Shen, Zhiqing Sun, and Chuang Gan. Improving reinforcement learning from human feedback with efficient reward model ensemble, 2024. URL https://arxiv.org/abs/2401.16635.
+Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36:46595-46623, 2023.
+Yiyang Zhou, Zhiyuan Fan, Dongjie Cheng, Sihan Yang, Zhaorun Chen, Chenhang Cui, Xiyao Wang, Yun Li, Linjun Zhang, and Huaxiu Yao. Calibrated self-rewarding vision language models. arXiv preprint arXiv:2405.14622, 2024.
+Daniel M Ziegler, Nisan Stiennon, Jeffrey Wu, Tom B Brown, Alec Radford, Dario Amodei, Paul Christiano, and Geoffrey Irving. Fine-tuning language models from human preferences. arXiv preprint arXiv:1909.08593, 2019.
+Yang Zou, Zhiding Yu, Xiaofeng Liu, BVK Kumar, and Jinsong Wang. Confidence regularized self-training. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 5982-5991, 2019.
+
+# A LIMITATIONS
+
+In this section, we discuss the limitations of our work and propose potential solutions for future research. First, our method requires full fine-tuning of the model over multiple iterations, which is both time-consuming and computationally intensive. For future research, we plan to explore Parameter-Efficient Fine-Tuning (PEFT) methods to reduce training costs. Second, our approach primarily focuses on small (7B level) language models, which may limit its applicability. However, the proposed method is designed to be general and can be applied to models of any size. Third, it is worth investigating more complex consistency-regularized self-rewarding scenarios, such as how to assign different weights to various models during the self-rewarding process based on their importance, and enable these models to collaborate to improve the rewarding accuracy.
+
+# B PROOF OF THE THEOREMS AND LEMMAS
+
+# B.1 PROOF OF THEOREM 3.1
+
+Proof of Theorem 3.1. We denote iteration of the two-step algorithm as $t$ . The algorithm starts from $(\pmb{\theta}_t, z_t)$ , and obtains $z_{t+1} = z_{\pmb{\theta}_t}$ according to Eq. (3.3) in the preference-labeling step and then obtains $\pmb{\theta}_{t+1}$ through the learning step. Since $z_{t+1} = \arg \min_z \mathcal{L}_{\mathrm{DPO}}(\pmb{\theta}_t; \mathbf{y}, \mathbf{y}', \mathbf{x}, z)$ for any $\mathbf{y}, \mathbf{y}', \mathbf{x}$ according to Eq. (3.3), we have that
+
+$$
+\mathcal {L} \left(\boldsymbol {\theta} _ {t}, z _ {t + 1}\right) \leq \mathcal {L} \left(\boldsymbol {\theta} _ {t}, z _ {t}\right). \tag {B.1}
+$$
+
+And the learning step suggests that $\pmb{\theta}_{t + 1} = \arg \min_{\pmb{\theta}}\mathcal{L}(\pmb {\theta},z_{t + 1})$ , yielding that
+
+$$
+\mathcal {L} \left(\boldsymbol {\theta} _ {t + 1}, z _ {t + 1}\right) \leq \mathcal {L} \left(\boldsymbol {\theta} _ {t}, z _ {t + 1}\right). \tag {B.2}
+$$
+
+Connecting Eq. (B.1) with Eq. (B.2) yields that the loss function $\mathcal{L}(\pmb{\theta}, z)$ is monotonically decreasing, i.e.
+
+$$
+\dots \leq \mathcal {L} \left(\boldsymbol {\theta} _ {t + 1}, z _ {t + 1}\right) \leq \mathcal {L} \left(\boldsymbol {\theta} _ {t}, z _ {t + 1}\right) \leq \mathcal {L} \left(\boldsymbol {\theta} _ {t}, z _ {t}\right) \leq \dots . \tag {B.3}
+$$
+
+Since $\mathcal{L}(\pmb{\theta}, z)$ is upper bounded by 0, it suggests that the sequence of $\mathcal{L}(\pmb{\theta}_t, z_t)$ will converge w.r.t. the growth of $t$ .
+
+# B.2 PROOF OF LEMMA 3.2
+
+Proof of Lemma 3.2. We start by expanding $\mathbb{E}_{\mathbf{y},\mathbf{y}^{\prime}\sim \pi_{\theta_t(\cdot |\mathbf{x})}}\mathcal{L}_{\mathrm{reg}}(\pmb {\theta};\mathbf{y},\mathbf{y}^{\prime},\mathbf{x})$ as
+
+$$
+\begin{array}{l} \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} \mathcal {L} _ {\operatorname {r e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) = \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} [ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) ] \\ = \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x}), \mathbf {y} \prec \mathbf {y} ^ {\prime}} \left[ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) \right] \\ + \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x}), \mathbf {y} \succeq \mathbf {y} ^ {\prime}} [ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) ] \\ = \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} P _ {\theta_ {t}} (z = 0) [ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) ] \\ + \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} P _ {\boldsymbol {\theta} _ {t}} (z = 1) [ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) ], \tag {B.4} \\ \end{array}
+$$
+
+where the second equation decompose the expectation $\mathbb{E}_{\mathbf{y},\mathbf{y}^{\prime}\sim \pi_{\theta_t}(\cdot |\mathbf{x})}$ into two expectation $\mathbb{E}_{\mathbf{y},\mathbf{y}^{\prime}\sim \pi_{\theta_t}(\cdot |\mathbf{x})} + \mathbb{E}_{\mathbf{y},\mathbf{y}^{\prime}\sim \pi_{\theta_t}(\cdot |\mathbf{x})}$ , the third equation extract the event $\mathbf{y}\geq \mathbf{y}^{\prime}$ as distribution $P_{\theta_t}(z)$ . Then Eq. (B.4) can be further written by
+
+$$
+\begin{array}{l} \mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} \mathcal {L} _ {\text {r e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) = P _ {\boldsymbol {\theta} _ {t}} (z = 1) [ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) ] \\ + P _ {\boldsymbol {\theta} _ {t}} (z = 0) \left[ \log P _ {\boldsymbol {\theta}} (z = 1) + \log P _ {\boldsymbol {\theta}} (z = 0) \right], \tag {B.5} \\ \end{array}
+$$
+
+since both $\mathbf{y},\mathbf{y}^{\prime}$ are generated from $\pi_{\pmb{\theta}_t}(\cdot |\mathbf{x})$ $P_{\pmb{\theta}_t}(z = 0) = P_{\pmb{\theta}_t}(z = 1) = 0.5$ . Thus Eq. (B.5) becomes
+
+$$
+\mathbb {E} _ {\mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} \mathcal {L} _ {\operatorname {r e g}} \left(\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}\right) = 2 \mathrm {K L} \left(P _ {\boldsymbol {\theta}} (z) \| P _ {\boldsymbol {\theta} _ {t}} (z)\right) = 2 \mathrm {K L} \left(P _ {\boldsymbol {\theta}} (z) \| u (z)\right), \tag {B.6}
+$$
+
+where $u(z)$ is the uniform binary distribution with $u(z = 0) = u(z = 1) = 0.5$ .
+
+# B.3 PROOF THEOREM 3.3
+
+Proof of Theorem 3.3. We start by writing down each components in $\mathcal{L}(\pmb{\theta}, z)$ defined in Eq. (3.1) by
+
+$$
+\begin{array}{l} \mathcal {L} (\boldsymbol {\theta}, z) = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} ^ {\prime}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {\ell}} (\cdot | \mathbf {x})} [ \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) + \lambda \mathcal {L} _ {\mathrm {R e g}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) ] \\ = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) \\ + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} ^ {\prime}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} \left[ - z (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}) \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right)\right) \right. \\ - \left(1 - z (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x})\right) \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} \left(\mathbf {y} ^ {\prime} \mid \mathbf {x}\right)}{\pi_ {\mathrm {r e f}} \left(\mathbf {y} ^ {\prime} \mid \mathbf {x}\right)}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} \mid \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} \mid \mathbf {x})}\right)\right) \\ - \lambda \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right)\right) \\ \left. - \lambda \log \sigma \left(\log \left(\frac {\pi_ {\theta} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\theta} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right)\right) \right] \\ = \mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta}; \mathcal {D} _ {\mathrm {S}}) \\ + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} ^ {\prime}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} \left[ - (\lambda + z (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x})) \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right)\right) \right. \\ \left. \left. - (1 + \lambda - z (\mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x})) \log \sigma \left(\log \left(\frac {\pi_ {\theta} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\theta} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right)\right) \right] \right] \\ \end{array}
+$$
+
+where the third equation absorbs the regularization into the DPO loss. Noticing that $\lambda + z(\mathbf{y}, \mathbf{y}', \mathbf{x}) + (1 + \lambda - z(\mathbf{y}, \mathbf{y}', \mathbf{x})) = 1 + 2\lambda$ , by dividing $(1 + 2\lambda)$ we have
+
+$$
+\begin{array}{l} \frac {\mathcal {L} (\boldsymbol {\theta} , z)}{1 + 2 \lambda} = \frac {\mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta} ; \mathcal {D} _ {\mathrm {S F T}})}{1 + 2 \lambda} \\ + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} ^ {\prime}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x})} \left[ - \frac {\lambda + z (\mathbf {y} , \mathbf {y} ^ {\prime} , \mathbf {x})}{1 + 2 \lambda} \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right)\right) \right. \\ \left. - \frac {1 + \lambda - z (\mathbf {y} , \mathbf {y} ^ {\prime} , \mathbf {x})}{1 + 2 \lambda} \log \sigma \left(\log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} ^ {\prime} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} ^ {\prime} | \mathbf {x})}\right) - \log \left(\frac {\pi_ {\boldsymbol {\theta}} (\mathbf {y} | \mathbf {x})}{\pi_ {\mathrm {r e f}} (\mathbf {y} | \mathbf {x})}\right)\right) \right]. \\ \end{array}
+$$
+
+When $z(\mathbf{y}, \mathbf{y}'\mathbf{x}) = 1$ , $(\lambda + z(\mathbf{y}, \mathbf{y}', \mathbf{x})) / (1 + 2\lambda) = 1 - \lambda / (1 + 2\lambda)$ and $(1 + \lambda - z(\mathbf{y}, \mathbf{y}', \mathbf{x})) (1 + 2\lambda) = \lambda / (1 + 2\lambda)$ . Therefore, letting $\mathcal{C}_{\lambda} = \lambda / (1 + 2\lambda)$ yields that
+
+$$
+\begin{array}{l} \frac {\mathcal {L} (\boldsymbol {\theta} , z)}{1 + 2 \lambda} = \frac {\mathcal {L} _ {\mathrm {S F T}} (\boldsymbol {\theta} ; \mathcal {D} _ {\mathrm {S F T}})}{1 + 2 \lambda} \\ + \mathbb {E} _ {\mathbf {x} \sim \mathcal {D} ^ {\prime}; \mathbf {y}, \mathbf {y} ^ {\prime} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x})} [ (1 - \mathcal {C} _ {\lambda}) \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, z) + \mathcal {C} _ {\lambda} \mathcal {L} _ {\mathrm {D P O}} (\boldsymbol {\theta}; \mathbf {y}, \mathbf {y} ^ {\prime}, \mathbf {x}, 1 - z) ], \\ \end{array}
+$$
+
+which completes the proof since minimizing $\mathcal{L}(\theta, z) / (1 + \lambda)$ is equivalent with minimizing $\mathcal{L}(\theta, z)$ itself.
+
+# B.4 PROOF OF LEMMA 3.4
+
+Proof of Lemma 3.4. To begin with, according to the ranking of $J_{ij}$ , the sufficient and necessary condition for $J_{ij} - J_{i'j} > 0$ is that $r_{ij} < r_{i'j}$ . Similarly, the sufficient and necessary condition for $K_{ij} > K_{i'j}$ is that $r_{ij}' < r_{i'j}'$ . As a result, the indicator becomes
+
+$$
+\mathbb {1} \left[ \left(J _ {i j} - J _ {i ^ {\prime} j}\right) \left(K _ {i j} - K _ {i ^ {\prime} j}\right) > 0 \right] = \mathbb {1} \left[ \left(r _ {i j} - r _ {i ^ {\prime} j}\right) \left(r _ {i ^ {\prime}} ^ {\prime} - r _ {i ^ {\prime} j} ^ {\prime}\right) > 0 \right] \tag {B.7}
+$$
+
+$$
+\mathbb {1} \left[ \left(J _ {i j} - J _ {i ^ {\prime} j}\right) \left(K _ {i j} - K _ {i ^ {\prime} j}\right) < 0 \right] = \mathbb {1} \left[ \left(r _ {i j} - r _ {i j ^ {\prime}}\right) \left(r _ {i j} ^ {\prime} - r _ {i ^ {\prime} j} ^ {\prime}\right) < 0 \right]. \tag {B.8}
+$$
+
+Since $r_{ij} > r_{i'j}$ yields $\mathbf{y}_{ij} \succ \mathbf{y}_{i'j}$ under the input prompt $xb_{j}$ and language model $\theta_{t}$ , Eq. (B.7) becomes
+
+$$
+\begin{array}{l} \mathbb {1} \left[ \left(J _ {i j} - J _ {i ^ {\prime} j}\right) \left(K _ {i j} - K _ {i ^ {\prime} j}\right) > 0 \right] = \mathbb {1} \left[ r _ {i j} > r _ {i ^ {\prime} j} \right] \mathbb {1} \left[ r _ {i j} ^ {\prime} > r _ {i ^ {\prime} j} ^ {\prime} \right] + \mathbb {1} \left[ r _ {i j} < r _ {i ^ {\prime} j} \right] \mathbb {1} \left[ r _ {i j} ^ {\prime} < r _ {i ^ {\prime} j} ^ {\prime} \right] \\ = \mathbb {1} \left[ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} \right] \mathbb {1} \left[ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} \right] \\ + \mathbb {1} \left[ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} \mid \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} \right] \mathbb {1} \left[ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} \mid \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} \right]. \tag {B.9} \\ \end{array}
+$$
+
+As a result, since $\mathbf{y}_{ij}$ are i.i.d. given $\mathbf{x}_j$ , the expectation of first part of the Kendall's Tau coefficient is
+
+$$
+\begin{array}{l} \mathbb {E} [ \mathbf {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) > 0 ] ] - \mathbb {E} [ \mathbf {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) < 0 ] ] \\ = \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ + \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ - \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ - \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ = \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] (\mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] - \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ]) ] \\ + \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] (\mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] - \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ]) ] \\ = \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] (1 - 2 \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ]) ] \\ - \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] (1 - 2 \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ]) ] \\ = \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] - \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] ] \\ + 2 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] (\mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] - \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ]) ] \\ = 0 + 2 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] (1 - 2 \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ]) ] \tag {B.10} \\ \end{array}
+$$
+
+where the second equation merge the terms together, and the third equation is due to the fact $\mathbb{1}[\mathbf{y}_{ij}\prec$ $\mathbf{y}_{i^{\prime}j}] + \mathbb{1}[\mathbf{y}_{ij}\succ \mathbf{y}_{i^{\prime}j}] = 1$ , the forth equation reorganize the term and the fifth equation is due to the fact that $\mathbb{E}_{\mathbf{y}_{ij},\mathbf{y}_{i^{\prime}j}\sim \pi_{\theta_t(\cdot |\mathbf{x}_j)}}[\mathbb{1}[\mathbf{y}_{ij}\succ \mathbf{y}_{i^{\prime}j}|\mathbf{x}_j,\pmb {\theta}_t] - \mathbb{1}[\mathbf{y}_{ij}\prec \mathbf{y}_{i^{\prime}j}|\mathbf{x}_j,\pmb {\theta}_t] = 0$ due to symmetry. Similarly by reversing the $\prec$ and $\succ$ , we can write Eq. (B.10) by
+
+$$
+\begin{array}{l} \mathbb {E} [ \mathbb {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) > 0 ] ] - \mathbb {E} [ \mathbb {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) < 0 ] ] \\ = 0 + 2 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbf {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] (1 - 2 \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ]) ]. \tag {B.11} \\ \end{array}
+$$
+
+Adding Eq. (B.10) and Eq. (B.11) together yields
+
+$$
+\begin{array}{l} 2 \mathbb {E} [ \mathbf {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) > 0 ] ] - \mathbb {E} [ \mathbf {1} [ (J _ {i j} - J _ {i ^ {\prime} j}) (K _ {i j} - K _ {i ^ {\prime} j}) < 0 ] ] \\ = 2 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] + \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ - 4 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ - 4 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\boldsymbol {\theta} _ {t}} (\cdot | \mathbf {x} _ {j})} [ \mathbb {1} [ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} ] \mathbb {1} [ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} ] ] \\ = 2 - 8 \mathbb {E} _ {\mathbf {y} _ {i j}, \mathbf {y} _ {i ^ {\prime} j} \sim \pi_ {\theta_ {t}} (\cdot | \mathbf {x} _ {j})} \left[ \mathbb {1} \left[ \mathbf {y} _ {i j} \succ \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t} \right] \mathbb {1} \left[ \mathbf {y} _ {i j} \prec \mathbf {y} _ {i ^ {\prime} j} | \mathbf {x} _ {j}, \boldsymbol {\theta} _ {t - 1} \right] \right], \tag {B.12} \\ \end{array}
+$$
+
+where the final equation is because $\mathbb{E}[\mathbb{1}[\mathbf{y}_{ij}\prec \mathbf{y}_{i'j}|\mathbf{x}_j,\pmb {\theta}_t]\mathbb{1}[\mathbf{y}_{ij}\succ \mathbf{y}_{i'j}|\mathbf{x}_j,\pmb{\theta}_{t - 1}]] = \mathbb{E}[\mathbb{1}[\mathbf{y}_{ij}\succ$ $\mathbf{y}_{i^{\prime}j}|\mathbf{x}_j,\pmb {\theta}_t]\mathbb{1}[\mathbf{y}_{ij}\prec \mathbf{y}_{i^{\prime}j}|\mathbf{x}_j,\pmb {\theta}_{t - 1}]$ due to symmetry. Divide Eq. (B.12) by 2 yields the claimed result.
+
+# C ADDITIONAL RESULTS
+
+# C.1 SUSTAINABILITY OF SELF-REWARDING
+
+To explore continuous improvements and further validate the effectiveness of the introduced regularization, we conduct additional experiments with SRLM (baseline method) and CREAM (ours) using Llama-3 for the 4th, 5th, and 6th iterations. From the results in Table 5, we have the following findings: (1) CREAM converges at the 4th iteration (M4) while the baseline method SRLM started performance degradation much earlier at the 2nd iteration (M2). This shows that CREAM helps stabilize the self-improvement training by mitigating the rewarding bias issue. (2) CREAM does not seriously harm the performance after convergence (i.e., during M5 and M6), while SRLM drastically drops the performance. This suggests that adding this consistency-based regularization is beneficial to preventing model from degeneration in the long term.
+
+# C.2 DIFFERENCE BETWEEN CREAM LOSS AND WEIGHTED DPO LOSS
+
+We would like to emphasize that the final form of CREAM, which combines a normal DPO and a reversed DPO, cannot simply be replaced by reducing the weight in a normal DPO (weight * DPO
+
+Table 5: Results for SRLM and CREAM using Llama-3 for six iterations. $\uparrow$ and $\downarrow$ indicate the performance improvement and degradation compared to the method's last iteration.
+
+
Method
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
Initial
M0
86.29
80.37
86.00
68.6
78.01
79.85
SFT
M1
86.78
80.14
86.40
69.50
78.39
80.24
SRLM
M2
87.79 ↑
80.38 ↑
87.80 ↑
70.95 ↑
78.01 ↓
80.99 ↑
M3
87.17 ↓
81.23 ↑
87.30 ↓
70.37 ↓
77.48 ↓
80.71 ↓
M4
86.07 ↓
78.33 ↓
87.80 ↑
68.58 ↓
75.83 ↓
79.32 ↓
M5
84.34 ↓
76.53 ↓
85.80 ↓
66.84 ↓
64.22 ↓
75.55 ↓
M6
76.22 ↓
72.36 ↓
76.00 ↓
59.06 ↓
59.29 ↓
68.59 ↓
CREAM
M2
88.89 ↑
80.89 ↑
88.00 ↑
69.79 ↑
81.04 ↑
81.72 ↑
M3
89.52 ↑
83.36 ↑
90.20 ↑
72.06 ↑
81.73 ↑
83.37 ↑
M4
89.56 ↑
82.68 ↓
90.80 ↑
72.93 ↑
82.26 ↑
83.65 ↑
M5
89.35 ↓
82.08 ↓
90.20 ↓
72.06 ↓
81.73 ↓
83.08 ↓
M6
88.85 ↓
81.57 ↓
89.60 ↓
71.14 ↓
82.49 ↑
82.73 ↓
+
+Loss). Specifically, the loss adopted by CREAM is $C\log \sigma (r(y_{+}) - r(y_{-})) + (1 - C)\log \sigma (r(y_{-}) - r(y_{+}))$ differs fundamentally from a weighted DPO loss $C\log \sigma (r(y_{+}) - r(y_{-}))$ . From the optimization perspective, the latter weighted DPO loss behaves similar with a regular DPO loss with a smaller learning rate. In addition, since the preference probability $P(y_{+}\prec y_{-}) = \sigma (r(y_{+}) - r(y_{-}))$ and $P(y_{+}\succ y_{-}) = \sigma (r(y_{-}) - r(y_{+}))$ , we would highlight that the CREAM loss can be kind of viewed as a cross-entropy loss $C\log P(y_{+}\succ y_{-}) + (1 - C)\log P(y_{-}\succ y_{+})$ with label-smoothing factor $C$ . Thus, The weighted DPO loss cannot deliver such a observation.
+
+Detailed Derivation. The loss used by our CREAM can be expressed as:
+
+$$
+C \cdot D + (1 - C) \cdot R D,
+$$
+
+where $C$ is the consistency rate, and $D$ and $RD$ are the DPO loss and ReverseDPO loss, respectively.
+
+For the DPO loss, $D = \log \sigma (a - b)$ , where the sigmoid function $\sigma$ converts the reward gap $(a - b)$ into a probability $P$ . For $RD$ , the reward gap is $(b - a)$ . Recall that the sigmoid function has a property that $\sigma (x) = 1 - \sigma (-x)$ . Using this property, we can convert the sigmoid (gap part) of $RD$ to $(1 - P)$ . Thus, the $RD$ loss is $\log (1 - P)$ , and the $D$ loss is $\log P$ .
+
+Combining these, we can derive
+
+$$
+C \cdot D + (1 - C) \cdot R D = C \cdot \log P + (1 - C) \cdot \log (1 - P),
+$$
+
+which corresponds to a cross-entropy loss for a binary classification task (binary preference judgment). The proposed loss acts as a label smoothing to regularize the training. This regularization is expected to enhance the model's generalization ability and performance during training.
+
+Gradient Analysis. To further understand the impact of the sum of normal DPO loss and reversed DPO loss, we analyze the gradient of the adopted loss function. Recall that CREAM uses the
+
+$$
+L = C \cdot D + (1 - C) \cdot R D
+$$
+
+for training, where $C$ is the consistency rate, and $D$ and $RD$ are the DPO loss and ReverseDPO loss, respectively.
+
+We can simplify the DPO loss by substituting the reward gap
+
+$$
+\left[ \log \frac {\pi_ {\theta} (y ^ {+})}{\pi_ {\mathrm {r e f}} (y ^ {+})} - \log \frac {\pi_ {\theta} (y ^ {-})}{\pi_ {\mathrm {r e f}} (y ^ {-})} \right]
+$$
+
+as $x_{\theta}$ . Then, the $D$ loss is written as $\log \sigma(x_{\theta})$ , and the $RD$ loss is written as $\log \sigma(-x_{\theta})$ .
+
+Recall that the sigmoid function $\sigma$ has the property that $\sigma(x) = 1 - \sigma(-x)$ . Then, $RD$ can be converted to $\log(1 - \sigma(x_{\theta}))$ . Our regularized loss $L$ is
+
+$$
+C \log \sigma (x _ {\theta}) + (1 - C) \log (1 - \sigma (x _ {\theta})).
+$$
+
+Table 6: Comparison of CREAM and SRLM using weighted DPO loss on Llama-3. "NA" indicates that the method cannot generate fluent sentences.
+
+
Method
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
SRLM + Weight = -1.0
M2
NA
NA
NA
NA
NA
NA
SRLM + Weight = -0.5
M2
NA
NA
NA
NA
NA
NA
SRLM + Weight = -0.25
M2
NA
NA
NA
NA
NA
NA
SRLM + Weight = 0.25
M2
88.97
80.38
87.00
71.39
78.7
81.29
SRLM + Weight = 0.50
M2
86.49
79.61
87.60
70.42
79.00
80.62
SRLM + Weight = 1.00
M2
87.79
80.38
87.80
70.95
78.01
80.99
CREAM
M2
88.89
80.89
88.00
69.79
81.04
81.72
SRLM + Weight = -1.0
M3
24.16
22.53
27.6
30.91
1.74
21.39
SRLM + Weight = -0.5
M3
NA
NA
NA
NA
NA
NA
SRLM + Weight = -0.25
M3
NA
NA
NA
NA
NA
NA
SRLM + Weight = 0.25
M3
88.93
81.40
89.20
71.34
75.74
81.32
SRLM + Weight = 0.50
M3
88.13
81.74
89.00
70.73
75.89
81.10
SRLM + Weight = 1.00
M3
87.17
81.23
87.30
70.37
77.48
80.71
CREAM
M3
89.52
83.36
90.20
72.06
81.73
83.37
+
+The gradient of $L$ with respect to model parameters $\theta$ is
+
+$$
+\frac {\partial L}{\partial \theta} = (C - \sigma (x _ {\theta})) \frac {\partial x _ {\theta}}{\partial \theta}.
+$$
+
+In particular, when $C = \frac{1}{2}$ , it pushes the model to learn $\sigma(x_{\theta}) = \frac{1}{2}$ , i.e., encouraging the model to have
+
+$$
+\frac {\pi_ {\theta} (y ^ {+})}{\pi_ {\mathrm {r e f}} (y ^ {+})} = \frac {\pi_ {\theta} (y ^ {-})}{\pi_ {\mathrm {r e f}} (y ^ {-})}.
+$$
+
+So far, there is no theoretical evidence that the likelihoods of both $y^{+}$ and $y^{-}$ will decrease. However, based on empirical results from existing works (Rafailov et al., 2023; Azar et al., 2023; Hong et al., 2024; Ethayarajh et al., 2024), the $\frac{\partial x_{\theta}}{\partial\theta}$ term will decrease the likelihoods of both $y^{+}$ and $y^{-}$ while increasing their gap. Thus, the combined optimization will potentially lead to: (1) a decrease in the likelihoods of both $y^{+}$ and $y^{-}$ , (2) an increase in the gap between $y^{+}$ and $y^{-}$ , while maintaining
+
+$$
+\frac {\pi_ {\theta} (y ^ {+})}{\pi_ {\mathrm {r e f}} (y ^ {+})} \approx \frac {\pi_ {\theta} (y ^ {-})}{\pi_ {\mathrm {r e f}} (y ^ {-})}.
+$$
+
+Empirical Results. We also take additional experiments to validate the SRLM using weight * DPO Loss, where weight $\in [-1.0, 1.0]$ . For SRLM + Weight method, M3 is trained based on the best checkpoint of M2 across different weights. The results are shown in Table 6. Note that "NA" means the negative of the DPO loss leads to catastrophic forgetting, where the LLM fails to generate fluent sentences. According to the results, we observe that CREAM outperforms the SRLM+weight method, indicating its effectiveness and irreplaceability.
+
+# C.3 CONSISTENCY TREND
+
+In CREAM, if the consistency rate $C$ reaches to 0, the preference order of the training data will be totally reversed, which may lead to overconfidence in the reversed order. However, We would like to highlight that the consistency between $\theta_{t-1}$ and $\theta_t$ can rarely be as low as $C \approx 0$ . This is because $C = 0$ means for any preference pair $y, y'$ , two consecutive model $\theta$ and $\theta_{t-1}$ give totally reversed preference. For the scaled Kendal Tau, that means if the ranking for 5 generated responses is $A > B > C > D > E$ , to reach $C = 0$ , we need to change the ranking to $E > D > C > B > A$ , which is very rare in SRLM. Since $\theta_t$ is trained using the preference data given by $\theta_{t-1}$ , they tend to have similar behavior and thus such a circumstance making $C = 0$ can hardly happen in practice.
+
+Further, we analyze the distribution of the consistency and supply the results for 4th, 5th and 6th iterations as follows. The results in Table 7 show the consistency trend for CREAM. We can find that the initial consistency rate 0.39 is acceptable, which will not result in heavily relying on reverse preferences. Besides, the regularization of CREAM is shown to encourage the consistency of rankings and maintain stability in the later rounds of training.
+
+Table 7: The distribution of the training samples' consistency rate $C$ in the six iterations of CREAM.
+
+
Iteration\Consistency Rate
0-0.2
0.2-0.4
0.4-0.6
0.6-0.8
0.8-1.0
Total
Avg. C
M1 - M2
1329 (13.86%)
3129 (32.62%)
2977 (31.04%)
1647 (17.17%)
510 (5.32%)
9592 (100%)
0.39
M2 - M3
1 (0.01%)
10 (0.10%)
48 (0.50%)
448 (4.67%)
9085 (94.71%)
9592 (100%)
0.92
M3 - M4
3 (0.03%)
24 (0.25%)
195 (2.03%)
1249 (13.03%)
8118 (84.66%)
9589 (100%)
0.87
M4 - M5
2 (0.02%)
10 (0.10%)
121 (1.26%)
888 (9.26%)
8571 (89.36%)
9592 (100%)
0.89
M5 - M6
6 (0.06%)
109 (1.14%)
573 (5.97%)
2129 (22.20%)
6775 (70.63%)
9592 (100%)
0.81
+
+# C.4 COMPARISON OF ENSEMBLE METHODS
+
+we also include an ablation study on using conservative value estimation methods (Coste et al., 2023) (Ensemble-Worst) and Ensemble-Mean in SRLMs. Specifically, ensemble method trains 3 different $\pi_{\theta}$ models with 3 different learning rates [7e-7, 1e-6, 3e-6] to serve as the ensemble reward models in each iteration, since no external models can be involved in the self-rewarding scenario. Then, these three models would independently reward and rank the responses:
+
+- Ensemble-Worst selects the minimum reward for ranking the response.
+- Ensemble-Mean selects the average reward for ranking the response.
+
+Table 8 suggests that CREAM has advantage against Ensemble methods in the alignment performance a cross iterations. Additionally, compared with the ensemble model which requires a batch of reward models, CREAM only requires the model from the last one iteration and thus would be more efficient than the ensemble methods.
+
+Further Discussion on Robust Preference Optimization In this paragraph, we would like to take in-depth discussion on the related work robust preference optimization (Fisch et al., 2024), in order to better understand the contribution of CREAM in the self-rewarding scenario. In details, Fisch et al. (2024) suggested injecting pessimism by ensemble or introducing the KL divergence $\mathrm{KL}(\pi_{\theta_t}\parallel \pi_{\mathrm{ref}})$ . However, we would like to highlight that this method cannot be directly applied in our task scenario, due to the nature of the self-rewarding setting.
+
+First, regarding the reward distillation, Fisch et al. (2024) suggested distilling the (ensembled) reward information into the language models. However, knowledge distillation usually assumes distilling information from a large model into a small model (Hinton, 2015; Buciluă et al., 2006; Mirzadeh et al., 2020). This makes perfect sense when the reward is given (e.g., from human preference, an oracle reward model, or a more advanced model). However, in SRLMs, the reward preference is given by the language model in the last iteration. The model capacity does not change over time, so the distillation may not help improve the model. For instance, if we extract $r^*$ from language model $\pi_{\theta_{t-1}}$ , the reward distillation (Eq. 7 in Fisch et al. 2024) becomes
+
+$$
+\theta_ {t} = \arg \min _ {\theta} \mathbb {E} \left(\log \frac {\pi_ {\theta_ {t - 1}} (y _ {+} \mid x)}{\pi_ {\theta_ {t - 1}} (y _ {-} \mid x)} - \log \frac {\pi_ {\theta} (y _ {+} \mid x)}{\pi_ {\theta} (y _ {-} \mid x)}\right) ^ {2},
+$$
+
+and a trivial minimizer is $\theta_t = \theta_{t-1}$ with loss equal to zero. This indicates that if we use the same, single model for reward distillation, the model can hardly be improved.
+
+Second, we would like to acknowledge that the ensembled model used in Fisch et al. (2024) and other works Coste et al. (2023); Eisenstein et al. (2023); Ramé et al. (2024) can provide pessimism, especially when we have a batch of reward models. For example, Fisch et al. (2024) used 5 reward models in their Pessimistic Ensemble DPO (e-DPO) variant, which has the best performance. However, in the self-rewarding setting, each reward model is trained by ourselves, so obtaining a reward model would be costly.
+
+For example, let's assume $\pi_{\mathrm{ref}}$ is the reference model, $\pi_1$ is the model trained by SFT, $\pi_2$ is the first round of self-rewarding training, and $\pi_3$ is the second round, etc. we would see such ensemble will not work for training $\pi_2$ , and for $\pi_3$ , will ensemble 2 models; $\pi_4$ will ensemble 3 models. Note that though we can use different data subsets or hyperparameters to obtain multiple reward models in the earlier iterations, it can bring additional training costs. It is obvious that this algorithm needs to store all models $\pi_1, \pi_2, \ldots, \pi_M$ as the iteration progresses. In the case where more models are required to improve the ensemble performance (e.g., we need to ensemble 5 separate $\pi_1$ for
+
+Table 8: Comparison of SRLM, Ensemble-Worst, Ensemble-Mean and CREAM on Llama-3. The best performance among methods in each iteration is highlighted in bold.
+
+
Method
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
SRLM
M2
87.79
80.38
87.80
70.95
78.01
80.99
Ensemble-Worst
M2
88.00
79.78
87.00
69.96
78.54
80.66
Ensemble-Mean
M2
88.47
80.80
88.00
69.50
80.67
81.49
CREAM
M2
88.89
80.89
88.00
69.79
81.04
81.72
SRLM
M3
87.17
81.23
87.30
70.37
77.48
80.71
Ensemble-Worst
M3
87.75
80.89
86.80
70.78
78.70
80.98
Ensemble-Mean
M3
88.85
80.89
87.00
69.96
79.98
81.34
CREAM
M3
89.52
83.36
90.20
72.06
81.73
83.37
+
+Pessimistic Ensemble DPO), this storage and computation consumption increase significantly. In contrast, CREAM only requires storing and evaluating the latest two checkpoints, which is more efficient compared with the standard ensemble methods.
+
+Finally, we would like to put more theoretical remarks on the regularization which is also discussed in Section 3.3 in Fisch et al. (2024). In detail, Fisch et al. (2024) considers the KL divergence between $\pi$ and $\pi_{\mathrm{ref}}$ as
+
+$$
+\mathrm {K L} \left(\pi_ {\text {r e f}} \| \pi\right) \propto \mathbb {E} _ {x} \left[ \int \pi_ {\text {r e f}} (y \mid x) \log \pi (y \mid x) \mathrm {d} y \right] = \mathbb {E} _ {x, y \sim \pi_ {\text {r e f}}} \log \pi (y \mid x), \tag {1}
+$$
+
+which is the same as conducting SFT with respect to $\pi_{\mathrm{ref}}$ . Ours considers the KL divergence for the preference model, denoted by
+
+$$
+\operatorname {K L} (u \| P _ {t} (y _ {1} \succ y _ {2})) \propto \mathbb {E} _ {x, y _ {1}, y _ {2} \sim \pi_ {t - 1}} \log P _ {t} (y _ {1} \succ y _ {2}) = \mathbb {E} _ {x, y _ {1}, y _ {2} \sim \pi_ {t - 1}} \log \sigma (\Delta_ {t} ^ {R} (y _ {1}, y _ {2})) \quad (2)
+$$
+
+with $\Delta_t^R (y_1,y_2) = \log \frac{\pi_\theta(y_1|x_t)}{\pi_{\mathrm{ref}}(y_1|x_t)} -\log \frac{\pi_\theta(y_2|x_t)}{\pi_{\mathrm{ref}}(y_2|x_t)}.$
+
+One can find the fundamental differences between (1) and (2):
+
+1. The regularization of (1) is to control the behavior of $\pi$ similar to the reference policy $\pi_{\mathrm{ref}}$ . It is more suitable for one iteration of DPO. In the SRLM where the LMs are expected to iteratively improve their performance by themselves, intuitively we should hypothesize that $\pi_t$ becomes more and more distant from $\pi_{\mathrm{ref}}$ . As a result, using (1) in SRLM would be too conservative for the LM to improve itself.
+2. The regularization of (2) is to prevent the preference model from being overconfident on preference pairs from the last iteration model. Obviously, it fits the SRLM better by letting the SRLM improve from the correct self-labeled preference pairs but also not be too conservative on the previous iteration or the baseline model.
+
+To summarize, we believe CREAM and Fisch et al. (2024) fall into different categories: in SRLM and CREAM, we are more focused on regularizing the preference pairs, while performing model ensemble would be challenging since the model is updating and depends on each other (iteration). We also acknowledge that in regular DPO or with different reward models, the ensemble methods or the regularization methods are feasible and useful.
+
+# C.5 CREAM WITH DATA CONSISTENCY
+
+For CREAM, The introduced (in)consistency serves as the uncertainty quantification for the model to prevent the model itself being overconfident due to the stochastic training noise or incorrectly labeled preference data. Such a uncertainty, usually referred to as epistemic uncertainty, is a property for each model. We further add two variants to explore treating the consistency as a property of the data instead of the model: (1) Threshold = x: This variant uses the normal DPO for samples (confident dataset) whose consistency rate $C > x$ , and uses ours $\mathrm{C}^{*}\mathrm{DPO} + (1 - \mathrm{C})^{*}\mathrm{RDPO}$ to regularize the training for other samples (unconfident dataset). (2) CREAM w/ Dynamic Consistency: Instead of original CREAM using the average consistency rate across the dataset, this method uses dynamic consistency rate for each sample, using each sample's own consistency rate to regularize the training.
+
+Table 9: Results for treating the consistency as a property of the data instead of the model using CREAM on Llama-3. The best performance among methods in each iteration is highlighted in bold.
+
+
Method
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
SRLM (Threshold = 0.0)
M2
87.79
80.38
87.80
70.95
78.01
80.99
Threshold = 0.1
M2
88.13
80.89
88.20
70.52
78.70
81.29
Threshold = 0.3
M2
88.38
80.29
89.20
68.99
79.83
81.34
Threshold = 0.5
M2
89.10
80.89
87.20
69.70
80.52
81.48
Threshold = 0.7
M2
88.72
80.20
88.00
69.24
80.82
81.4
Threshold = 0.9
M2
88.55
81.48
88.40
70.78
79.45
81.73
CREAM (Threshold = 1.0)
M2
88.89
80.89
88.00
69.79
81.04
81.72
CREAM + dynamic
M2
88.13
80.80
88.00
69.50
79.38
81.16
SRLM (Threshold = 0.0)
M3
87.17
81.23
87.30
70.37
77.48
80.71
Threshold = 0.1
M3
88.38
80.29
87.20
70.98
79.83
81.34
Threshold = 0.3
M3
88.64
80.38
88.00
71.34
80.52
81.78
Threshold = 0.5
M3
89.10
81.48
89.80
71.08
79.91
82.27
Threshold = 0.7
M3
89.48
81.31
88.60
71.55
80.67
82.32
Threshold = 0.9
M3
89.27
83.02
90.80
72.31
81.50
83.38
CREAM (Threshold = 1.0)
M3
89.52
83.36
90.20
72.06
81.73
83.37
CREAM + dynamic
M3
88.85
81.57
89.20
71.65
79.91
82.24
+
+Table 10: Results of SRLM and CREAM with Llama-2-13B.
+
+
Method
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
M0
67.47
56.31
67.00
47.54
35.03
54.67
M1
68.27
57.42
67.40
47.85
36.09
55.41
SRLM M2
69.61
57.00
64.00
52.10
31.69
54.88
SRLM M3
62.08
53.67
61.20
48.93
20.77
49.33
CREAM M2
69.19
57.17
69.60
48.57
36.01
56.11
CREAM M3
68.56
59.04
73.20
49.90
36.62
57.46
+
+As shown in Table 9, we observe that as the threshold increases beyond a certain value (including more samples for regularization), the performance gains converge. Actually, CREAM is compatible with using a threshold to fine-grainedly select the data to regularize, however, this inevitably introduces an additional hyperparameter. Besides, CREAM already achieves sufficiently good performance, without this added complexity. Compared to the "CREAM w/ Dynamic Consistency" variant, our method, which utilizes the average consistency rate, significantly reduces the variance in estimating dataset uncertainty, resulting in improved performance.
+
+# C.6 APPLICABILITY OF CREAM
+
+Applicability to Larger Models. Due to the limited computational resources, our experiments are mainly conducted on 7B-level LLMs such as Llama-2 and Llama-3. However, we believe this is still meaningful to democratize the self-rewarding paradigm to LLMs of community affordable size, such as 7B models. Advanced and larger LLMs (e.g., ChatGPT) are not always accessible, especially in specific application scenarios like those involving medical or privacy-sensitive data. It's important to note that our method is theoretically applicable to LLMs of any size (not limited to 7B). To validate our method with larger LLMs, we test the CREAM on Llama-2-13B (Touvron et al., 2023) model without any hyperparameter tunings. The results in Table 10 confirm that our method remains effective for the 13B LLM, demonstrating the generalizability of our approach across different model sizes.
+
+Applicability to unaligned Models. First, our method CREAM does require the model to have some initial alignment capability, as the adopted DPO rewarding relies on the model being aligned, otherwise the rewards would not be meaningful (Rafailov et al., 2023). Note that in the self-rewarding scenario, the original SRLM (Yuan et al., 2024) also requires the model to be "post-trained" version, where they adopt Llama-2-70B-Chat (Touvron et al., 2023) as the initial model (M0). We conduct additional experiments to test the effectiveness of CREAM with LLMs that are not post-trained. Specifically, we use Llama-3-8B-NO-Chat-Version (Dubey et al., 2024) as the base model (M0). The results in Table 11, reveal that: (1) M0 performs poorly due to its lack of instruc
+
+Table 11: Results of applying SRLM and CREAM to unaligned Llama-3-8B-NO-Chat-Version.
+
+
Method
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
M0
30.64
28.50
20.80
23.95
4.02
21.58
M1
31.23
30.21
33.40
26.51
51.25
34.52
SRLM M2
29.80
28.67
36.00
23.44
50.19
33.62
SRLM M3
31.82
30.03
39.00
28.40
48.52
35.55
CREAM M2
31.61
28.75
35.60
28.66
53.00
35.52
CREAM M3
39.18
35.07
49.00
33.62
56.48
42.67
+
+Table 12: Results for P-CREAM and Distilled DPO (Fisch et al., 2024).
+
+
Method
Iteration
Arc-Easy
Arc-Challenge
OpenBookQA
SIQA
GSM8K
Average
SRLM
M2
87.79
80.38
87.80
70.95
78.01
80.99
P-SRLM
M2
84.64
76.79
80.40
67.81
78.47
77.62
Distilled DPO
M2
87.20
80.12
85.40
69.65
79.76
80.43
P-CREAM
M2
87.67
78.58
86.40
68.47
79.76
80.18
CREAM
M2
88.89
80.89
88.00
69.79
81.04
81.72
SRLM
M3
87.17
81.23
87.30
70.37
77.48
80.71
P-SRLM
M3
83.75
76.28
80.20
66.63
78.99
77.17
Distilled DPO
M3
86.15
79.01
85.00
68.68
78.62
79.49
P-CREAM
M3
86.49
78.33
87.40
69.70
81.05
80.59
CREAM
M3
89.52
83.36
90.20
72.06
81.73
83.37
+
+tion following ability. However, after training on a small amount of seed SFT data, M1 demonstrates improved performance, especially on the reasoning task GSM8K. (2) Both SRLM and CREAM can effectively boost the performance, while CREAM often provides greater gains. (3) We find that the performance gains of CREAM in the 3rd iteration $(\mathrm{M}2 \rightarrow \mathrm{M}3)$ exceed those in the 2nd iteration $(\mathrm{M}1 \rightarrow \mathrm{M}2)$ . This may be because M2 has better alignment than M1, and the effectiveness of our method relies on the model's alignment capability. Based on these findings, we conclude that SRLM-like methods can still be applied to pre-trained models, provided they have undergone slight alignment (e.g., through SFT training).
+
+# C.7 PROMPT-REWARDING FOR REGULARIZATION
+
+In this section, we discuss the usage of prompt-rewarding with regularization, and compare its effectiveness of the DPO rewarding. We mainly consider two methods: (1) P-CREAM: CREAM with prompt-rewarding method. (2) Distilled DPO (Fisch et al., 2024) which leverages the promptrewarding to apply regularization to the DPO training. The results are shown in Table 12. We can find that (1) prompt-rewarding is not effective as DPO rewarding for both SRLM and CREAM. (2) The degradation of Distilled DPO in M3 iteration indicates its inapplicability for continuous improvements, compared to our method CREAM.
+
+Table 13: Results for different self-rewarding methods using Llama-3.
+
+
Dataset\Method
M1
M2
M3
SFT
SRLM
P-SRLM
CREAM
SRLM
P-SRLM
CREAM
Arc-Easy
86.78
87.79 ↑
84.64 ↓
88.89 ↑
87.17 ↓
83.75 ↓
89.52 ↑
Arc-Challenge
80.14
80.38 ↑
76.79 ↓
80.89 ↑
81.23 ↑
76.28 ↓
83.36 ↑
OpenBookQA
86.40
87.80 ↑
80.40 ↓
88.00 ↑
87.30 ↓
80.20 ↓
90.20 ↑
SIQA
69.50
70.95 ↑
67.81 ↓
69.79 ↑
70.37 ↓
66.63 ↓
72.06 ↑
GSM8K
78.39
78.01 ↓
78.47 ↑
81.04 ↑
77.48 ↓
78.99 ↑
81.73 ↑
\ No newline at end of file
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/images.zip b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..1c5d81fc75c3aec6b3b11503d04404f56104e5ac
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:69e6390c14b4dc1b86128223c9e6e1cb6a7610e09819aeb9cd346348a33533ed
+size 1352960
diff --git a/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/layout.json b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..def2c3abe477c4b429b7ffe71ba87b91ee89c095
--- /dev/null
+++ b/ICLR/2025/CREAM_ Consistency Regularized Self-Rewarding Language Models/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c3ec8e405e2c9a2620e55c43f3d1f823788c22fba6ffaad7a0280f101b4337df
+size 876154
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_content_list.json b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..2979eaf82f16cff72069fe613fb6eea7402edf39
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:874178ab64a6f3d6bc251836dc060fb6477b45c600f398cecfb013543a9587dc
+size 147084
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_model.json b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..9a653446ac25b5c32aa3fcbb55eb2ed544fdacd5
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8abcb2518483690fa7bb125454bde1bee79b5e1228e7e36827c1ffa401b3e381
+size 177588
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_origin.pdf b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..ce354c4f45ebf5df1f5dbd4e6e7aac56983095d9
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/11df6e2d-caef-4a3a-aa24-cff3ebb562eb_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:380097472c5c879829af710eafd4197520503345e152b232cfd97e400e9e63aa
+size 4461179
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/full.md b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..1421d5b6fd22efe5bfe9f4a3849faa26da91760c
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/full.md
@@ -0,0 +1,466 @@
+# CREMA: GENERALIZABLE AND EFFICIENT VIDEO-LANGUAGE REASONING VIA MULTIMODAL MODULAR FUSION
+
+Shoubin Yu* Jaehong Yoon* Mohit Bansal
+
+UNC Chapel Hill
+
+{shoubin, jhyoon, mbansal}@cs.unc.edu
+
+# ABSTRACT
+
+Despite impressive advancements in recent multimodal reasoning approaches, they are still limited in flexibility and efficiency, as these models typically process only a few fixed modality inputs and require updates to numerous parameters. This paper tackles these critical challenges and proposes CREMA, a generalizable, highly efficient, and modular modality-fusion framework that can incorporate many new modalities to enhance video reasoning. We first augment multiple informative modalities (such as optical flow, 3D point cloud, audio, thermal heatmap, and touch map) from given videos without extra human annotation by leveraging sensors or existing pre-trained models. Next, we introduce a query transformer with multiple parameter-efficient modules associated with each accessible modality. It projects diverse modality features to the LLM token embedding space, allowing the model to integrate different data types for response generation. Furthermore, we propose a novel progressive multimodal fusion design supported by a lightweight fusion module and modality-sequential training strategy. It helps compress information across various assisting modalities, maintaining computational efficiency in the LLM while improving performance. We validate our method on 7 video-language reasoning tasks assisted by diverse modalities, including conventional VideoQA and Video-Audio/3D/Touch/Thermal QA, and achieve better/equivalent performance against strong multimodal LLMs, including OneLLM, BLIP-2, and SeViLA while reducing over $90\%$ trainable parameters. We provide extensive analyses of CREMA, including the impact of each modality on reasoning domains, the design of the fusion module, and example visualizations.
+
+# 1 INTRODUCTION
+
+We humans understand the world through various senses, such as sight, sound, touch, and heat, allowing us to understand our environment and act accordingly. This concept has inspired the field of multimodal learning that connects various perceptions, including vision-language (Alayrac et al., 2022; Li et al., 2023b; Zang et al., 2023; Radford et al., 2021), audio-video (Han et al., 2020; Tang et al., 2022), and 2D-3D joint vision (Li et al., 2020; Hou et al., 2021; 2023; Lei et al., 2024). In particular, recent Multimodal Large Language Models (MLLMs) (Yu et al., 2023b; Li et al., 2023b; Liu et al., 2023a; Tang et al., 2023a) have shown promising versatility in handling multiple forms of input data, such as vision, audio, and text. These models are crucial in real-world applications that require a comprehensive understanding of multiple modalities to make decisions in various contexts. For example, autonomous vehicles rely on visual road signs, sirens, and LIDAR for navigation and safe driving. Embodied AI takes visual, heat, and touch information to complete household tasks. Similarly, educational AI enhances the learning experience by integrating various information, such as videos, speech, and textbooks.
+
+Despite their recent advancements, deploying a generic MLLM that handles multiple diverse modalities is still very challenging in terms of cost and flexibility. For different types of inputs, MLLMs
+
+
+Figure 1: Overview of the CREMA architecture & training. Left: Multimodal encoders, Qformer, and LLM are kept frozen in the process. For each modality input, we extract tokens using a corresponding modality-specific adaptation module. Then, we employ the fusion module to blend and compress the obtained multimodal tokens. In the end, the LLM uses modality-fusion tokens to generate responses. Right: We present a modality-sequential training and modality-adaptive early exist strategy, further boosting the training efficiency while allowing faster modality adaptation.
+
+
+
+have required extremely large computational budgets to update the LLM with individual encoders for modalities. Alternatively, recent efficient MLLMs using separate projection modules (Zhang et al., 2023; Sun et al., 2023a; Li et al., 2023b; Han et al., 2023) provide a more efficient and flexible way for multimodal reasoning. However, as each modality module contains hundreds of millions of parameters for training, this approach is still computationally intensive, and balancing as well as fusing various types of inputs becomes even more complex and costly when more modalities are introduced. Such challenges also exist in very recent pioneering works (Liu et al., 2023c; Panagopoulou et al., 2023; Lu et al., 2023); these models aim to integrate more diverse sensory data for compositional understanding via partial updates to the models, yet still require notable training resources to adapt to different modalities (7B for Unified-IO 2 (Lu et al., 2023)). Moreover, they focus primarily on fixed modality pairs (like 3D-text and visual-text), limiting their adaptability to new data forms and broader applications. This raises the crucial research question: Can we enable MLLMs to efficiently leverage multiple modalities for Video-Language Reasoning at lower costs, similar to how humans do?
+
+In this paper, we present CREMA: a generalizable and highly efficient MLLM framework designed for video-language reasoning with many modalities. The proposed framework enables us to incorporate any new set of modalities, including video, depth map, optical flow, surface normals, audio, thermal heatmap, touch map, 3D point cloud, notably with very few trainable parameters (4~10M for each new modality) as compared to BLIP-2 (Li et al., 2023b) (~108M) and SeViLA (Yu et al., 2023a) (~216M) but higher performance due to assistance of diverse modalities. As illustrated in Figure 1 Left, given a frozen pre-trained vision-language backbone, our approach introduces modality-adaptive modules on top of the Q-Former (Li et al., 2023b) architecture, including linear projectors, low-rank adapters (Hu et al., 2022), and learnable queries. Our parameter-efficient modular design ensures that the pre-trained backbone remains unchanged and enables updates with new modalities and more advanced LLMs in the future without complex architecture changes. To enrich the input modalities, we utilize pre-trained models to extract features from raw videos, e.g., depth maps and optical flow.
+
+Furthermore, despite the effectiveness of our versatile video reasoning framework for multimodal data, handling multiple modalities is not always beneficial; some modalities may be redundant or irrelevant to the reasoning tasks, and optimizing with all modalities simultaneously can lead to a certain deficiency, such as suboptimal convergence of the modality inputs. Besides, the LLM receives longer input contexts, which include token embeddings from all modality queries, resulting in increased computations to produce responses. To address these remaining concerns, we propose a new modality fusion technique that effectively integrates various modality tokens through a novel self-gated attention module and performs alternative modality training within a minibatch, preventing interference in the learning of modality-specific representation. Furthermore, we present a modality-adaptive early exit strategy to bypass the training of a specific modality if it is considered as converged.
+
+This further increases the efficiency of CREMA while allowing faster adaptation and maintaining comparable performance. (Please see Figure 1 Right). In the end, we allow the model to maintain GFLOPs while achieving enhanced reasoning ability, even when the LLM processes many modalities.
+
+We validate CREMA on various video-language reasoning benchmarks assisted by diverse modalities, including VideoQA (NExT-QA (Xiao et al., 2021), PerceptionTest (Pătrăucean et al., 2023)), 3D-VideoQA (SQA3D (Ma et al., 2023)), Audio-VideoQA (MUSIC-AVQA (Li et al., 2022), VG-GSound (Chen et al., 2020)), Touch-VideoQA (Touch&Go (Yang et al., 2022)), Thermal-VideoQA (Thermal-IM (Tang et al., 2023b)). CREMA surpasses other strong multimodal video reasoning baselines, improving fine-tuning performance by $+2.4\%$ on MUSIC-AVQA, $+2.6\%$ on SQA3D, and $+0.6\%$ on NExT-QA while reducing by $90\%$ of the trainable parameters. CREMA also outperforms general-purpose baselines in the zero-shot setting. We further provide comprehensive analyses of applying CREMA with different LLM, varying sets of modalities, different modality fusion strategies, benefits of adding more modality, and qualitative analysis with input/response visualizations to highlight the efficiency/effectiveness of CREMA in various video-language reasoning across diverse modalities. Our contributions are summarized as follows:
+
+- We propose a highly efficient and generalizable modality-extensible learning framework, coined CREMA, which learns multiple modality-adaptive modules to understand given data through augmented senses.
+- We present a novel modality fusion and training design that efficiently weighs modalities, integrating useful modality features into response generation.
+- CREMA's design allows easy embracing of any new modalities by adding additional modality-adaptive modules without any need to modify the existing framework.
+- We show the efficacy of CREMA on seven video reasoning datasets by achieving better/equivalent performance while reducing over $90\%$ of trainable parameters than strong baseline models.
+- With CREMA framework, we conduct extensive studies to provide a comprehensive analysis of how multimodal information helps video-centric language reasoning tasks.
+
+# 2 RELATED WORKS
+
+Learning with Multiple Modalities. Beyond conventional unimodal learning, leveraging additional modalities, such as visual and audio, in learning models is increasingly popular and has demonstrated remarkable success in solving diverse tasks (Zhu et al., 2024; Liu et al., 2023b; Lu et al., 2023; Moon et al., 2023; Wang et al., 2024a). Vision Language Models (Huang et al., 2023; Li et al., 2023a; Gong et al., 2023; Chen et al., 2023b) are the most prevalent branch of multimodal learning that combine vision and language by training on massive data to understand and generate outputs involving visual and text-based information. Audio-Language Models (Chuang et al., 2020; Castellon et al., 2021; Wang et al., 2023) have been proposed for various audio-associated language tasks, e.g., spoken question answering and speech synthesis. Also, 2D-3D Joint Vision (and Language) Models (Li et al., 2020; Hou et al., 2021; 2023; Lei et al., 2024) aim to combine features of both two-dimensional (2D) and three-dimensional (3D) data to interpret and analyze both modalities, allowing for a more comprehensive understanding of visual information. However, these approaches are not scalable to other tasks involving different modality inputs since they focus on handling fine-grained problems with pre-defined modalities.
+
+Multimodal Large Language Model. Very recently, several works propose integrated pipelines using more than two different data sources for general-purpose reasoning (Zellers et al., 2022; Han et al., 2023; Li et al., 2023b; Girdhar et al., 2023; Liu et al., 2023c). MERLOT-REVERSE (Zellers et al., 2022) introduces a new training objective that learns from audio, subtitles, and video frames. Given modality-specific features extracted from the encoder/tokenizer for these inputs, the joint transformer learns to predict the masked text and audio. Therefore, incorporating new types of inputs can be challenging since it requires new pre-training steps for all other modalities. X-InstructBLIP (X-BLIP) (Panagopoulou et al., 2023) integrates various modalities into a framework using frozen LLMs, employing modality-specific Q-Formers as adapters to connect different encoders. However, this method needs to train the individual Q-Former for each modality to enable modality-aligned instruction tuning, which is still resource-intensive. MultiPLY (Hong et al., 2024) is a multisensory embodied LLM for interaction within 3D environments with fixed modality set. X-VILA (Ye et al.,
+
+2024) is an omni-modality model aimed at cross-modality alignment, understanding, and generation. It concentrates on large-scale cross-modality alignment. OneLLM (Han et al., 2023) presents a universal encoder and projection module to align various modalities with language, its flexibility is limited in adapting new modalities, as the pre-trained projection may be impaired with unseen input format. Our CREMA method adopts an efficient and modular approach, using parameter-efficient adapters for each modality, and enhances flexibility in combining any new modalities.
+
+# 3 CREMA: GENERALIZABLE AND EFFICIENT VIDEO-LANGUAGE REASONING VIA MULTIMODAL MODULAR FUSION
+
+We first provide a preliminary of the Q-Former framework for connecting multimodal inputs with the LLM in Section 3.1. Next, we define the problem for compositional VideoQA and introduce our CREMA method for efficient multimodal compositional video reasoning in Section 3.2. Finally, we describe the training and inference process in Section 3.3.
+
+# 3.1 PRELIMINARIES: Q-FORMER
+
+To connect various types of sensory inputs with the LLM, we adopt the Q-Former architecture originally proposed in BLIP-2 (Li et al., 2023b), a transformer (Vaswani et al., 2017) module that bridges the modality encoder and the LLM, similar to Perceiver (Jaegle et al., 2021). It receives modality features $\mathbb{Z}$ from the encoder along with learnable queries $\pmb{v}$ and produces fixed-length tokens $\pmb{q}$ as output. This design enables the Q-Former to compress image tokens into a fixed-length set of query tokens, facilitating efficient processing of video inputs while preserving critical holistic information. It further projects obtained tokens $\pmb{q}$ into the LLM's embedding space via a fully connected layer to make them compatible. In the end, $\pmb{q}$ serves as soft visual prompts (Jia et al., 2022) for the LLM. CREMA method adopts several lightweight form-adaptive modules on top of the Q-Former to integrate knowledge from different data types (e.g., video frames, audio, 3D point cloud, touch map etc.) efficiently.
+
+# 3.2 MULTIMODAL COMPOSITIONAL VIDEO REASONING VIA EFFICIENT MODULAR ADAPTATION AND FUSION
+
+Multimodal Encoders. Our proposed method, CREMA, illustrated in Figure 1, aims to generate responses using both language (i.e., questions) and various multimodal inputs (e.g., images, audio, depth data), denoted as $\mathbb{M} = [M_1, M_2, \dots, M_n]$ , where $n$ represents the number of accessible modalities. Throughout this paper, our CREMA method handles six modalities: video RGB frames, audio, 3D point cloud, optical flow, surface normals, and depth map, in total (up to four different modalities at once), but we note that our approach is able to process a larger number of different data types if needed. We first encode input data for each modality using the corresponding encoder. Here, we adopt several classes of publicly available pre-trained encoders for modalities, which are kept frozen, to improve training efficiency and learning generalization. Universal encoder (Girdhar et al., 2023; Han et al., 2023) can be employed as well, but it lacks the flexibility of other new modalities that are not pre-trained before. Next, we add a fully connected layer (dashed box in Figure 1) for each data type when dimension misalignment happens. It maps different modality representations into a unified feature space while avoiding incompatibilities between varying encoder architectures. We then obtain a set of multimodal features and in the next step, the Q-Former will extract informative features in $\mathbb{Z}$ into the query embeddings. More details are discussed in Section 4.1 and Section A.2.
+
+Multimodal Q-Former. Previous studies (Panagopoulou et al., 2023; Yu et al., 2023b; Zhang et al., 2023; Hong et al., 2023) have shown the capability of the Q-Former architecture to integrate various modalities with LLMs. However, they necessitate the individual Q-former for each modality, leading to significant parameter demands. While Q-Formers are moderately scaled at $\sim 188$ million parameters, which is less than LLMs, this size becomes substantial with increasing modalities. For example, processing six different modalities would require about 1B parameters, highlighting the cost and complexity of scaling the modality with additional Q-Formers.
+
+Hence, to deploy a lightweight, universal module capable of integrating various sensory representations, we introduce Multimodal $Q$ -Former. This architecture integrates a Modality-specific
+
+Multi-Query Adapter (MMQA) for each modality. As illustrated in the middle of Figure 1, MMQA consists of Low-Rank Adaptation (LoRA) (Hu et al., 2022) modules $^2$ , learnable queries, and linear projections. The intuitive design of our approach enables efficient and flexible adaptation to any specific modalities. Let $\mathbb{Z}_m$ be the features extracted from the data $M_m$ of the $m^{th}$ modality. The multimodal Q-Former propagates $\mathbb{Z}_m$ with the corresponding MMQA module to capture the relevant information, producing query embeddings $q_m$ . Given the learnable input queries $\boldsymbol{v}_m = \boldsymbol{v}_m^0$ , we compute a linear projection at layer $i$ containing the modality-specific LoRA as follows:
+
+$$
+\boldsymbol {v} _ {m} ^ {i + 1} = \boldsymbol {W} \boldsymbol {v} _ {m} ^ {i} + \Delta \boldsymbol {W} _ {m}, \tag {1}
+$$
+
+$$
+\Delta \boldsymbol {W} _ {m} = \boldsymbol {B} _ {m} \boldsymbol {A} _ {m} \quad \boldsymbol {B} \in \mathbb {R} ^ {d \times r}, \boldsymbol {A} \in \mathbb {R} ^ {r \times d}, \tag {2}
+$$
+
+where $W^3$ represents the original linear projection parameters of the Q-Former. $\Delta W$ indicates a low-rank adapter for $W$ with rank $r \ll d$ . Here, $d$ is the feature size of the Q-Former. With the hidden dimension $r = 64$ , updating only a small number of parameters of $\Delta W$ for each modality while freezing the Q-Former backbone is sufficient for the model to capture rich modality-specific representation. In addition, the proposed approach can effortlessly integrate new modalities. Upon the arrival of a new modality, our method can simply append appropriate MMQA modules without modifying the existing architecture, ensuring sustained support for previously integrated modalities.
+
+Self-gated Multimodal Query Fusion. Our approach, which concatenates modality-adaptive queries from lightweight MMQA modules, efficiently manages multimodal reasoning tasks. However, the LLM faces increased training/inference time and computational costs due to extra input tokens proportional to the number of modalities. To prevent the query token size from growing linearly with each new modality, we introduce a novel self-gated multimodal query fusion module (Assistance Modality Fusion in Figure 1). We define the token embedding of video queries $q_{V} = q_{1}$ as a major and others $q_{\backslash V} = \{q_i\}_{i = 2}^n$ to be supportive ones. Next, we merge supportive query embeddings through a linear projection layer $\pi (\cdot ;\theta)$ to match the dimension with $q_{V}$ . Motivated by Ramachandran et al. (2017), we then perform attention on the merged query embeddings $\bar{q}_{\backslash V}$ via self-gated operation and fuse them with $q_{V}$ :
+
+$$
+\bar {\boldsymbol {q}} _ {\backslash V} = \pi \left(\left[ \boldsymbol {q} _ {2}; \dots ; \boldsymbol {q} _ {n} \right]; \boldsymbol {\theta}\right),
+$$
+
+$$
+\widehat {\boldsymbol {q}} = \operatorname {c o n c a t} \left(\boldsymbol {q} _ {V}, \left(\operatorname {s i g m o i d} \left(\bar {\boldsymbol {q}} _ {\backslash V}\right) \cdot \bar {\boldsymbol {q}} _ {\backslash V}\right)\right),
+$$
+
+where $[\cdot ;\dots ;\cdot ]$ denotes a channel-wise concatenation. This design mirrors human perception in video reasoning tasks, where visual cues are primary but are assisted by other modalities for a richer understanding. In the end, CREMA performs cross-modal reasoning; the model aggregates multimodal query embeddings with the language query $l$ via simple concatenation and feeds the concatenated embeddings into the Large Language Model (LLM) to obtain the final response $a$ , such that $a = LLM(\mathrm{concat}(\widehat{\boldsymbol{q}},l))$ . The proposed design of modality fusion in CREMA successfully reduces computational costs when incorporating new modalities, achieving comparable or even enhanced performance compared to CREMA without the modality fusion.
+
+# 3.3 MODALITY-SEQUENTIAL AND MODULAR TRAINING OF CREMA
+
+Leveraging the proposed highly efficient modality-specific multi-query adapter (MMQA) and the self-gated multimodal query fusion approach, CREMA effectively processes a wide range of sensory input types without requiring tailored architecture designs. However, different input modalities possess distinct characteristics and varying quantities of information. Directly optimizing the model on diverse modality inputs may lead to suboptimal convergences, suffering from over/under-fitting on dominant/insignificant data types. To address the susceptibility of optimization when training on various modality inputs simultaneously, as shown in Figure 1 Right, we propose a simple yet effective remedy: modality-sequential modular training and adaptive early exit. Inspired by the alternating update of multimodal representation learning (Zhang et al., 2024), we propose a sequential, modality-adaptive optimization process for each iteration. Instead of performing a joint back-propagation step for all modalities simultaneously, we decompose it into sequential modality-specific updates.
+
+Table 1: Fine-tuning Results on Audio-Video Question Answering (MUSIC-AVQA). We report simple notations for each modality and question type: V: Video RGB frames, A: Audio, F: optical Flow, D: Depth, and N: surface Normalization. Cnt.: Counting, Com.: Comparative, Loc.: Location, Ext.: Existential, and Tem.: Temporal. We bold the best and underline the second-best numbers.
+
+
Method
Modality
Audio
Visual
Audio-Visual
Avg.
Trainable Params.
GFLOPs
Cnt.
Com.
Avg.
Cnt.
Loc.
Avg.
Ext.
Loc.
Cnt.
Com.
Tem. Avg.
AVQA (Li et al., 2022)
V, A
80.3
60.0
77.3
74.5
77.8
76.1
81.4
68.7
69.9
64.6
67.1
70.9
73.5
18M
-
LAVISH (Lin et al., 2023)
V, A
85.6
65.9
81.4
80.2
81.1
80.6
84.6
69.2
78.8
65.6
69.1
73.8
76.9
21M
-
BLIP-2 (Li et al., 2023b)
V
86.7
58.5
76.3
87.2
93.7
90.5
81.5
72.0
81.3
64.3
70.1
74.2
78.9
108M
1.30K
V, A
86.3
58.4
76.0
87.6
93.0
90.3
80.4
68.3
82.6
63.8
69.8
73.5
78.4
216M
1.78K
V, A, F
86.0
59.9
76.4
84.9
92.5
88.8
81.8
71.4
79.7
65.1
68.4
73.6
78.1
324M
3.21K
CREMA (Ours)
V
88.3
60.6
82.3
84.4
85.2
84.8
84.8
71.7
80.8
63.8
70.6
74.6
78.7
4M
1.30K
V, A
89.0
61.4
83.0
84.7
85.0
84.8
84.4
73.2
84.8
63.2
71.3
75.6
79.4
9M
1.78K
V, A, F
87.1
61.0
81.5
84.2
90.3
87.2
83.4
74.2
82.6
68.7
71.7
76.4
80.5
21M
1.81K
V, A, F, D, N
88.3
64.7
83.2
86.2
91.3
88.7
84.9
74.9
85.2
68.6
73.5
77.7
81.7
38M
1.84K
+
+This approach selectively updates the trainable weights corresponding to the target modality input, ensuring more focused and efficient learning for each modality. Specifically, given the minibatch data $M = (M_{1},\dots,M_{n})$ containing $n$ modalities, we propagate $M$ through the model but update only the trainable modules corresponding to the target modality $M_{m}$ (i.e., the MMQA module for $m$ and the fusion module). Note that this sequential training within the minibatch helps the model remain robust to the order of modalities during training. Furthermore, we extend this to a modality-adaptive early exit strategy, allowing the model to bypass the training of a specific modality if it is considered as converged. We use the average gradient magnitude of the MMQA module weights as a metric for the early exit of each modality input. Specifically, at each training epoch $j + 1$ , we determine whether the model exits the training of the target modality if it satisfies the following equation: $\bar{g}[j + 1] > \tau \cdot \text{average}(\bar{g}[:j])^{5}$ , where the temperature parameter $\tau$ and $\bar{g} = [\bar{g}_{1},\dots,\bar{g}_{j + 1}]$ denotes the list of the averaged gradient magnitudes obtained at the end of each training epoch. In the end, CREMA effectively learns rich information from various modalities for video-language reasoning, while mitigating unnecessary over-convergence or imbalanced training across different modalities.
+
+# 4 EXPERIMENTS
+
+In this section, we first outline the overall experimental setup in Section 4.1 and show the results of the proposed CREMA on various cross-modal Video QA & reasoning tasks in Section 4.2. We further provide more insights about the MLLM backbone, training strategy, design of the fusion module, and the impact of new modalities across tasks in Section 4.3. More experiments on extra datasets (VGGSound (Chen et al., 2020) and PerceptionTest (Pătrăucean et al., 2023)), training memory comparison, the impact of sequential training, LoRA rank, MMQA initialization, and qualitative examples are included in Appendix (Section B).
+
+# 4.1 EXPERIMENTAL SETUP
+
+Datasets & Benchmarks. We evaluate CREMA on the following video reasoning and QA tasks: SQA3D (Ma et al., 2023), MUSIC-AVQA (Li et al., 2022), and NExT-QA (Xiao et al., 2021). We further evaluate CREMA on TouchQA and ThermalQA collected by ourselves based on public videotouch (Touch&Go (Yang et al., 2022)) and video-thermal data (Thermal-IM (Tang et al., 2023b)). See Appendix (Sections A.1 and A.3) for more details.
+
+Implementation Details. Pre-trained Visual Experts: We employ frozen pre-trained visual experts to extract modalities features from raw videos. Specifically, we use ZoeDepth (Bhat et al., 2023), Unimatch (Xu et al., 2023), and NLL-AngMF (Bae et al., 2021) to estimate depth, flow, and normals, respectively. Modality Encoder: We use frozen modality-specific encoders to encode each modality to embedding space. We adopt ViT-G (Sun et al., 2023b) for visual (frames, depth, norm, flow, touch, and thermal), BEATs (Chen et al., 2023a) for audio, and follow data extraction in 3D-LLM (Hong et al., 2023) and ConceptFusion (Jatavallabhula et al., 2023) for 3D point cloud. See Appendix (Section A.2) for details. Baselines & Model Implementation: We extend 3D-LLM and
+
+Table 2: Fine-tuning Results on 3D Situated Question Answering (SQA3D). V: Video RGB frames, V*: Bird-Eye View image, P: 3D Point cloud, D: Depth, and N: surface Normalization.
+
+
Method
Modality
What
Is
How
Can
Which
Others
Avg.
Trainable Params.
GFLOPs
MCAN (Yu et al., 2019)
V*
28.8
59.6
44.0
68.3
40.7
40.4
43.4
56M
-
ClipBERT (Lei et al., 2021)
V
30.2
60.1
38.7
63.3
42.4
42.7
43.3
135M
-
ScanQA (Azuma et al., 2022)
P
31.6
63.8
46.2
69.5
43.8
45.3
46.5
38M
-
3D-LLM (Hong et al., 2023)
V
45.1
62.7
48.6
63.3
45.8
49.8
51.4
108M
1.30K
V, P
47.7
61.0
49.0
63.6
49.0
49.6
52.3
216M
1.67K
V, P, D, N
45.2
62.4
44.8
64.2
45.8
49.4
52.0
434M
5.47K
CREMA (Ours)
V
44.9
62.1
48.1
67.7
48.4
49.8
51.8
4M
1.30K
V, P
46.2
63.6
46.4
63.0
48.7
50.1
52.1
8M
1.69K
V, P, D, N
47.6
66.0
51.0
65.1
48.4
56.4
54.6
38M
1.83K
+
+Table 3: Fine-tuning Results on Video Question Answering (NExT-QA). Question types are abbreviated as: P.&N.: Prev & Next, Pre.: Present, Cnt.: Count, Loc.: Location, and Otr.: Other.
+
+
Methods
Modality
Causal
Temporal
Descriptive
Avg.
Trainable Params.
GFLOPs
How
Why
Avg.
P.&N
Pre.
Avg.
Cnt.
Loc.
Otr.
Avg.
LLaMA-VQA (7B) (Ko et al., 2023)
V
-
-
72.7
-
-
69.2
-
-
-
75.8
72.0
5M
-
Mirasol3B (Piergiovanni et al., 2023)
V
-
-
-
-
-
-
-
-
-
-
73.2
3B
-
SeViLA (Yu et al., 2023a)
V
71.3
75.3
74.2
67.8
71.7
69.4
67.2
91.8
85.2
81.3
73.8
216M
-
BLIP-2 (Li et al., 2023b)
V
69.9
73.9
72.9
65.4
71.9
68.1
64.9
91.8
80.3
81.2
72.6
108M
1.30K
V, F
68.8
74.0
72.6
65.8
71.1
68.0
64.9
92.8
81.3
81.9
72.6
216M
2.21K
V, F, D
70.8
74.2
73.3
65.0
71.4
67.6
61.5
93.2
81.6
81.4
72.7
324M
5.03K
V, F, D, N
71.7
74.2
73.5
65.7
72.6
68.5
65.5
92.5
81.9
82.1
73.3
432M
6.12K
CREMA (Ours)
V
67.3
73.9
72.1
63.0
70.2
65.9
64.9
93.2
80.3
81.6
71.6
4M
1.30K
V, F
69.3
74.1
72.8
64.4
70.5
66.9
67.2
92.8
80.9
82.2
72.4
8M
2.22K
V, F, D
70.4
74.4
73.3
66.6
72.4
69.0
61.0
92.5
81.0
80.8
73.2
20M
2.34K
V, F, D, N
71.3
75.5
74.4
67.3
72.5
69.4
66.1
92.9
79.7
81.6
73.9
28M
2.47K
+
+BLIP-2 with individual Q-Formers for each new modality as our baseline. We fully fine-tune these Q-Formers. Our Multimodal Q-Former is initialized from BLIP-2 pre-trained one. We set 64 LoRA rank and 32 query tokens for all MMQA modules. More details in Appendix (Sections A.4 and A.5).
+
+# 4.2 MAIN EXPERIMENTAL RESULTS
+
+MUSIC-AVQA: CREMA achieves superior audio-video reasoning ability. In Table 1, recent parameter-efficient approaches, AVQA and LAVISH, perform reasonably well on audio and video QA tasks (MUSIC-AVQA), but are less impactful due to their restricted language capability. BLIP-2 achieves higher accuracy by training modality-specific Q-Formers with a powerful language model, FLAN-T5XL. However, it fails to incorporate multiple modalities, and degrades audio-video reasoning ability when combining $V$ modality with other modalities: $A, F, D$ , and $N$ . Our method constantly improves the average accuracy with more modality, outperforming LAVISH (+4.8% p) and BLIP-2 (+2.4~3.6% p), by using only 6.4~11.7% trainable parameters compared to BLIP-2.
+
+SQA3D: Our method is significantly efficient yet outperforms publicly available, strong MLLM baselines on 3D-associated video reasoning. As shown in Table 2, we evaluate the fine-tuning performance on SQA3D, and CREMA with video frame inputs $(V)$ obtains improved accuracy compared to baselines on single modality inputs, MCAN, ClipBERT, and ScanQA. We also measure the performance of 3D-LLM, a strong multimodal learning method that shares almost all of its structures with BLIP-2, except for the 3D encoder. Although 3D-LLM enhances its performance by integrating multiple modalities, this brings a considerable increase in parameters to update multiple Q-Formers for each modality. Meanwhile, our CREMA method with $V, P, D, N$ modalities surpasses all baselines, achieving the best average accuracy by updating only proposed MMQA modules, which uses $\sim 91.2\%$ fewer parameters (38M) for training than 3D-LLM (434M).
+
+NExT-QA: CREMA consistently achieves superior performance against strong vision-language reasoning methods on the NExT-QA dataset. As shown in Table 3, SeViLA, BLIP-2, and CREMA adopt Flan-T5XL (3B) but achieve reasoning capabilities comparable to the LLAMA-7B model. CREMA with $V$ obtains a slightly lower fine-tuning performance compared to BLIP-2 since they perform fine-tuning of the entire Q-Former framework. However, the ability of our proposed
+
+Table 4: Fine-tuning Results on TouchQA and ThermalQA. T: Touch map, H: thermal Heatmap.
+
+
Method
Modality
Acc.
Tr.
+Params.
TouchQA
CMC
V, T
44.3
12M
BLIP-2
V
78.2
108M
V, T
77.4
216M
CREMA
+(Ours)
V
78.0
4M
V, T
79.1
8M
V, T, N
79.3
20M
ThermalQA
CMC
V, H
40.3
12M
BLIP-2
V
55.2
108M
V, H
54.4
216M
CREMA
+(Ours)
V
54.9
4M
V, H
56.2
8M
V, H, D
56.7
20M
+
+Table 5: Zero-shot Evaluation on Multimodal Compositional QA tasks (SQA3D and MUSIC-AVQA).
+
+
Method
Modality
Acc.
Total
+Params.
SQA3D
Unified QA
P
41.0
11.0B
GPT-3
P
41.0
175.0B
3D-LLM
P
36.9
3.1B
OneLLM
P
34.5
7.8B
V
39.4
7.8B
V, P
37.9
7.8B
CREMA
+(Ours)
P
37.3
3.1B
V
39.6
4.1B
V, P
40.0
4.1B
+
+
Method
Modality
Acc.
Total
+Params.
MUSIC-AVQA
X-InstructBLIP
A
22.7
13.2B
V
43.5
14.1B
V, A
44.5
14.4B
OneLLM
A
34.8
7.8B
V
48.4
7.8B
V, A
42.3
7.8B
CREMA
+(Ours)
A
31.0
3.2B
V
51.0
4.1B
V, A
52.6
4.2B
+
+framework to incorporate a variety of new modalities enhances its compositional understanding: CREMA with $V, F, D, N$ surpasses BLIP-2 and SeViLA with $87\sim 94\%$ less parameters for training.
+
+TouchQA & ThermalQA: To further demonstrate the generalizability of our framework over unique/rare sensory inputs, we evaluate CREMA on video-touch and video-thermal QA tasks. In Table 4, BLIP-2 shows competitive performance but struggles to integrate data from different modalities for reasoning, resulting in degraded performance when using two modalities. In contrast, CREMA achieves superior performance using only 20M trainable parameters. This advantage is particularly significant when compared to the parameter-efficient multimodal reasoning method, CMC, showing a considerable margin of performance improvement despite similar trainable parameters.
+
+Zero-shot Evaluation: In addition to the fine-tuning evaluation, CREMA method also achieves superior zero-shot performance on compositional video reasoning. We perform zero-shot evaluations on SQA3D and MUSIC-AVQA in Table 5. Note that Unified QA (Khashabi et al., 2020) and GPT-3 $^6$ with caption generated from 3D point cloud input perform well, attributed to their considerable model size and pre-trained data. We also observe that OneLLM (Han et al., 2023), a universal multimodal reasoning framework equipped with Llama2-7B (Touvron et al., 2023) for the LLM backbone, degenerates the performance when integrating different modalities: $V$ , $P$ . On the other hand, CREMA demonstrates a distinct advantage in zero-shot compositional reasoning across modalities, improving performance when combining video frames and 3D point clouds. We also compare with X-InstructBLIP (Panagopoulou et al., 2023), a strong reasoning framework integrating various modalities with modality-specific Q-Formers as adapters to connect different encoders, and OneLLM on audio-video reasoning tasks. As shown, our method outperforms both X-BLIP (13B) and OneLLM (7.8B), by $+8.1\% p$ and $+10.3\% p$ ( $V$ , $A$ ).
+
+CREMA with Different MLLM Backbone: We further built a new version of CREMA with VideoChat2 (Li et al., 2024) using stronger Mistral-7B as an LLM backbone and processed more frames (16 frames following the VideoChat2 setting). As shown in Table 6, we observed that our CREMA achieved impressive fine-tuning performance $(79.4\%)$ outperforming other strong video-LLMs by incorporating optical flow (F) and depth map (D) on NExT-QA while using a remarkably smaller number of trainable parameters, demonstrating the generalization ability across MLLM and efficiency of our proposed framework. We leave the CREMA with even stronger MLLMs (e.g., BLIP-3 (Xue et al., 2024), Qwen-VL (Wang et al., 2024b)) with more diverse modalities for further studies.
+
+Table 6: Comparison between CREMA with Mistra-7B and other popular Video-LLMs with comparable size LLMs. $\ast$ : our reproduced.
+
+
Model (Modality)
LLM
Acc.
Tr.
+Params.
Video-LLaMA (V)
Vicuna-7B
60.6
216M
Video-LLaVA (V)
Vicuna-7B
66.3
7B
VideoChat2 (V)
Vicuna-7B
68.6
>200M
LLaMA-VQA (V)
LLaMA2-7B
72.0
5M
MotionEpic - VoT (V)
Vicuna-7B
76.0
>100M
LLaVA-NeXT (V)
Qwen1.5-7B
78.2
7B
VideoChat2* (V)
Mistral-7B
78.4
>200M
CREMA (V, F)
Mistral-7B
78.9
21M
CREMA (V, F, D)
Mistral-7B
79.4
45M
+
+# 4.3 QUANTITATIVE ANALYSIS
+
+We have extensively validated the versatility of the proposed CREMA approach over a broad range of video-related reasoning tasks, assisted by various supportive modalities. Now, we provide in-depth analyses addressing the following two research questions:
+
+# RQ 1: Why did the other baseline struggle to enhance video reasoning with more modality?
+
+To enable an LLM to comprehend information from non-linguistic modality inputs, we need to project them into a unified language embedding space. However, this becomes increasingly challenging as the number of different modalities grows, each representing distinct attributes and sensory information. This issue is observed in models like 3D-LLM and BLIP-2 (See their degraded or on-par performance when injecting new modalities in Tables 1 and 2), which introduce individual attention modules to produce modality-specific query embeddings used for LLM reasoning. Due to the lack of a shared representation space and an intelligent fusion design, these embeddings often suboptimally converge, making them less compatible with other modalities in terms of representation distribution and resulting in insufficient compositional video reasoning capabilities. Furthermore, as discussed in Section 3.3, employing a universal optimization policy for learning different modality inputs can cause the model to over-converge on a few dominant modalities, which is also another critical issue in solving the many-modal video reasoning problem.
+
+# RQ 2: How does CREMA address challenges and help video reasoning with more modalities?
+
+We note that CREMA exhibits improved compositional reasoning abilities using more diverse modalities, evident in higher average performance. The model benefits from the following crucial innovations. 1) we compel a regularization effect on the model through parameter-efficient updates, often leading to a stable and better generalization than fine-tuning large models (Zhao et al., 2021; Ding et al., 2022; Fu et al., 2023). In addition, the modular adaptation from the unified backbone using MMQA and the proposed novel modality fusion approach allow the model to produce compatible yet informative modality token embeddings sampled within a stable multimodal representation space. 2) Our proposed modality-sequential training and modality-adaptive early exit approach help CREMA to optimize multiple modality inputs effectively. In particular, we demonstrate the efficacy of our proposed modality-adaptive early exit strategy. Let the early stop indicator be $I_{es} = \bar{g}[j + 1] / \tau \cdot \text{average}(\bar{g}[:j])$ , implying that CREMA exits to learn the specific modality data once the corresponding $I_{es}$ reaches 1. We observe that our adaptive early exit reduces training time/computations by $25 \sim 60\%$ , as demonstrated in Table 7 and Figure 2, without necessitating additional complex computations or calibration data. Furthermore, CREMA with a modality-adaptive early exit facilitates faster model convergence, which is evident in a performance increase of 1.0 $\sim 1.1\%$ in both datasets, compared to CREMA trained for a similar number of epochs. Please see Section B.4 for the ablation of the modality-sequential training.
+
+RQ3: Ablations for the modality fusion module of CREMA. As the architectural design of the fusion module affects the fusion quality of token embeddings, we investigate our CREMA with different fusion strategies: given a concatenated multimodal token embedding $\mathbb{Q}$ obtained by a multimodal Q-Former (i.e., concat), Linear reduces the token size of $\mathbb{Q}$ through a linear projection, Mixture-of-Experts (MoE) adopts a MoE layer inside Q-Former to extract a few token embeddings, and Cross-Attention adopts extra prompts as an input and computes the cross-attention with $\mathbb{Q}$ . As shown in Table 8, our proposed self-gated fusion module achieves competitive performance with Concat, while other variants decrease the average accuracy despite incorporating additional modalities besides video. Also, it performs efficiently compared to Cross-attention and Linear, requiring more computationally expensive operations to combine modality. We expect that the modality fusion via MoE or Cross-attention alters the original model architecture of the Q-former through additional parametric layers. Thus, it struggles to unlock the capabilities of those powerful designs under the parameter-efficient fine-tuning setup and the limited scale of downstream data.
+
+RQ4: The impact of new modalities on easy/hard questions. We further delve into how adding extra modalities beyond video RGB frames (V) can enhance video reasoning problems. Following the previous work (Buch et al., 2022), which splits the dataset into the easy/hard groups based on the performance of the reference model to find subsets requiring less/more modality information, we classify question inputs in compositional video reasoning tasks (SQA3D and MUSIC-AVQA) based on the zero-shot performance of CREMA method with only $V$ ; i.e., if the model predicts correctly $\rightarrow$ easy, otherwise $\rightarrow$ hard, indicating that input examples in hard may need additional knowledge to find appropriate answers. After that, we fine-tune our CREMA and test on obtained
+
+Table 7: Ablation of Modality-adaptive Early Exit on MUSIC-AVQA (vs. BLIP-2 w/ V, A, F) and SQA3D (vs. 3D-LLM w/ V, P, D, N).
+
+
Method
Acc.
Tr. Params.
Avg. Epochs
Acc.
Tr. Params.
Avg. Epochs
BLIP-2 (or)
77.8
324M
8
51.2
432M
10
3D-LLM
78.1
324M
20
52.0
432M
20
CREMA (Ours)
79.3
38M
8
52.8
38M
10
80.5
38M
20
54.6
38M
20
+Adaptive
80.3
38M
~8
53.9
38M
~10
Early Exit
80.5
38M
~13
54.3
38M
~15
+
+Table 8: Average accuracy & GFLOPs (on NExT-QA) of our method with different modality fusion strategies. We use $V, F, D, N$ on NExT-QA and $V, P, D$ on SQA3D. Concat indicates that we concatenate multimodal query tokens.
+
+
Fusion
NExT-QA
SQA3D
GFLOPs
Video-Only (V)
71.6
51.8
1.30K
Concat
73.5 (+1.9)
53.0 (+1.2)
6.14K
Cross-Attention
70.5 (-1.1)
49.8 (-2.0)
2.33K
Linear
71.1 (-0.5)
51.3 (-0.5)
1.87K
MoE
72.0 (+0.4)
51.1 (-0.7)
1.02K
Self-Gated (Ours)
73.9 (+2.3)
54.6 (+2.8)
2.47K
+
+
+Figure 2: Modality-adaptive Early Exit of CREMA on SQA3D. CREMA stops to update MMQA modules for a specific modality once the corresponding indicator value reaches 1.0.
+
+Table 9: Accuracy of CREMA method on easy and hard questions across datasets and modalities.
+
+
Modality
Easy Acc.
Hard Acc.
SQA3D
V
75.0
37.2
V, P
75.8 (+0.8)
37.3 (+0.1)
V, P, D, N
72.6 (-2.4)
42.1 (+4.9)
MUSIC-AVQA
V
85.7
71.2
V, A
87.2 (+1.5)
71.4 (+0.2)
V, A, F, D, N
87.9 (+2.2)
75.2 (+4.0)
NExT-QA
V
90.6
41.5
V, D
90.2 (-0.4)
43.1 (+1.6)
V, F, D
90.5 (-0.1)
44.7 (+3.2)
V, F, D, N
89.1 (-1.5)
50.0 (+8.5)
+
+subsets. As shown in Table 9, adding new modalities brings improvement over both easy and hard subsets. However, performance gain on the easy subset is less effective as it is already dominant to the video frame inputs, whereas information from additional modalities benefits the prediction of the hard $(+4.9\% p$ on SQA3D and $+4.0\% p$ on MUSIC-AVQA). In NExT-QA, adding new modalities marginally decreases the easy subset, but significantly boosts the hard $(+8.5\% p)$ . It indicates that leveraging extra modalities can be an effective modality augmentation strategy, mitigating overfitting. Furthermore, CREMA method can be an efficient tool to determine modality importance for video reasoning benchmark designs.
+
+# 5 CONCLUSION
+
+This paper introduces CREMA, an efficient and powerful framework for multimodal compositional video reasoning. We introduce parameter-efficient modality-adaptive modules atop a multimodal Q-former to seamlessly incorporate any new modalities like video, optical flow, audio, 3D point cloud, etc. Since our CREMA method does not require modifying the backbone architectures, we can easily upgrade our framework with new and stronger language models in the future without damaging its ability on existing modalities. We demonstrate the efficacy of our method on various multimodal QA benchmarks, surpassing baselines' performance with a notable reduction in trainable parameters. We present a multimodal fusion module and training strategy to keep low computational costs in LLM while achieving better performance, when we integrate more modalities.
+
+# ETHICS STATEMENT
+
+The intended use of CREMA is to conduct video-language reasoning with the help of diverse assistance modalities. This does not have any particular potential for misuse beyond the general potential for AI technology to be used in harmful ways. Because it is based on MLLM to answer video questions, CREMA has the potential to hallucinate. Note that potential is shared widely in
+
+the MLLMs/Video-LLMs (Li et al., 2023b; 2024). The fact that CREMA answers questions with diverse modality augmentation, enhances the system performance while delimiting model overfitting thus mitigating model hallucination. This is crucial to build reliable, trustworthy video-language reasoning systems that assist educational AI.
+
+# ACKNOWLEDGEMENT
+
+We thank the reviewers, and Jaemin Cho, Abhay Zala, Han Lin, Yi-Lin Sung, and Ziyang Wang for their valuable feedback and input for the paper. This work was supported by the National Institutes of Health (NIH) under other transactions 1OT2OD038045-01, ARO Award W911NF2110220, DARPA KAIROS Grant FA8750-19-2-1004, ONR Grant N00014-23-1-2356, DARPA ECOLE Program No. HR00112390060, DARPA MCS Grant N66001-19-2-4031, and NSF-AI Engage Institute DRL211263. The views, opinions, and/or findings contained in this article are those of the authors and not of the funding agency.
+
+# REFERENCES
+
+Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
+Daichi Azuma, Taiki Miyanishi, Shuhei Kurita, and Motoaki Kawanabe. Scanqa: 3d question answering for spatial scene understanding. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
+Gwangbin Bae, Ignas Budvytis, and Roberto Cipolla. Estimating and exploiting the aleatoric uncertainty in surface normal estimation. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 13137-13146, 2021.
+Shariq Farooq Bhat, Reiner Birkl, Diana Wok, Peter Wonka, and Matthias Müller. Zoedgepth: Zero-shot transfer by combining relative and metric depth. arXiv preprint arXiv:2302.12288, 2023.
+Shyamal Buch, Cristóbal Eyzaguirre, Adrien Gaidon, Jiajun Wu, Li Fei-Fei, and Juan Carlos Niebles. Revisiting the" video" in video-language understanding. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
+Rodrigo Castellon, Chris Donahue, and Percy Liang. Codified audio language modeling learns useful representations for music information retrieval. In ISMIR, 2021.
+Honglie Chen, Weidi Xie, Andrea Vedaldi, and Andrew Zisserman. Vggsound: A large-scale audiovisual dataset. In ICASSP 2020-2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 721-725. IEEE, 2020.
+Sanyuan Chen, Yu Wu, Chengyi Wang, Shujie Liu, Daniel Tompkins, Zhuo Chen, Wanxiang Che, Xiangzhan Yu, and Furu Wei. BEATS: Audio pre-training with acoustic tokenizers. In Proceedings of the International Conference on Machine Learning (ICML), 2023a.
+Sihan Chen, Handong Li, Qunbo Wang, Zijia Zhao, Mingzhen Sun, Xinxin Zhu, and Jing Liu. Vast: A vision-audio-subtitle-text omni-modality foundation model and dataset. In Advances in Neural Information Processing Systems (NeurIPS), 2023b.
+Yung-Sung Chuang, Chi-Liang Liu, Hung-Yi Lee, and Lin-shan Lee. Speechbert: An audio-and-text jointly learned language model for end-to-end spoken question answering. In Interspeech, 2020.
+Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2017.
+Ning Ding, Yujia Qin, Guang Yang, Fuchao Wei, Zonghan Yang, Yusheng Su, Shengding Hu, Yulin Chen, Chi-Min Chan, Weize Chen, et al. Delta tuning: A comprehensive study of parameter efficient methods for pre-trained language models. arXiv preprint arXiv:2203.06904, 2022.
+
+Zihao Fu, Haoran Yang, Anthony Man-Cho So, Wai Lam, Lidong Bing, and Nigel Collier. On the effectiveness of parameter-efficient fine-tuning. In Proceedings of the AAAI National Conference on Artificial Intelligence (AAAI), 2023.
+Rohit Girdhar, Alaaeldin El-Nouby, Zhuang Liu, Mannat Singh, Kalyan Vasudev Alwala, Armand Joulin, and Ishan Misra. Imagebind: One embedding space to bind them all. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
+Tao Gong, Chengqi Lyu, Shilong Zhang, Yudong Wang, Miao Zheng, Qian Zhao, Kuikun Liu, Wenwei Zhang, Ping Luo, and Kai Chen. Multimodal-gpt: A vision and language model for dialogue with humans. 2305.04790, 2023.
+Yuan Gong, Andrew Rouditchenko, Alexander H Liu, David Harwath, Leonid Karlinsky, Hilde Kuehne, and James Glass. Contrastive audio-visual masked autoencoder. arXiv preprint arXiv:2210.07839, 2022.
+Jiaming Han, Kaixiong Gong, Yiyuan Zhang, Jiaqi Wang, Kaipeng Zhang, Dahua Lin, Yu Qiao, Peng Gao, and Xiangyu Yue. Onellm: One framework to align all modalities with language. arXiv preprint arXiv:2312.03700, 2023.
+Tengda Han, Weidi Xie, and Andrew Zisserman. Self-supervised co-training for video representation learning. In Advances in Neural Information Processing Systems (NeurIPS), 2020.
+Yining Hong, Haoyu Zhen, Peihao Chen, Shuhong Zheng, Yilun Du, Zhenfang Chen, and Chuang Gan. 3d-llm: Injecting the 3d world into large language models. In Advances in Neural Information Processing Systems (NeurIPS), 2023.
+Yining Hong, Zishuo Zheng, Peihao Chen, Yian Wang, Junyan Li, and Chuang Gan. Multiply: A multisensory object-centric embodied large language model in 3d world. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 26406-26416, 2024.
+Ji Hou, Saining Xie, Benjamin Graham, Angela Dai, and Matthias Nießner. Pri3d: Can 3d priors help 2d representation learning? In Proceedings of the International Conference on Computer Vision (ICCV), 2021.
+Ji Hou, Xiaoliang Dai, Zijian He, Angela Dai, and Matthias Nießner. Mask3d: Pre-training 2d vision transformers by learning masked 3d priors. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
+Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2022.
+Jiaxin Huang, Shixiang Shane Gu, Le Hou, Yuexin Wu, Xuezhi Wang, Hongkun Yu, and Jiawei Han. Large language models can self-improve. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
+Andrew Jaegle, Felix Gimeno, Andy Brock, Oriol Vinyals, Andrew Zisserman, and Joao Carreira. Perceiver: General perception with iterative attention. In Proceedings of the International Conference on Machine Learning (ICML), 2021.
+Krishna Murthy Jatavallabhula, Soroush Saryazdi, Ganesh Iyer, and Liam Paull. gradslam: Automagically differentiable slam. arXiv preprint arXiv:1910.10672, 2019.
+Krishna Murthy Jatavallabhula, Alihusein Kuwajerwala, Qiao Gu, Mohd Omama, Tao Chen, Shuang Li, Ganesh Iyer, Soroush Saryazdi, Nikhil Keetha, Ayush Tewari, et al. Conceptfusion: Open-set multimodal 3d mapping. In Robotics: Science and Systems (RSS), 2023.
+Menglin Jia, Luming Tang, Bor-Chun Chen, Claire Cardie, Serge Belongie, Bharath Hariharan, and Ser-Nam Lim. Visual prompt tuning. In Proceedings of the European Conference on Computer Vision (ECCV), 2022.
+
+Daniel Khashabi, Sewon Min, Tushar Khot, Ashish Sabharwal, Oyvind Tafjord, Peter Clark, and Hannaneh Hajishirzi. Unifiedqa: Crossing format boundaries with a single qa system. arXiv preprint arXiv:2005.00700, 2020.
+Chris Dongjoo Kim, Byeongchang Kim, Hyunmin Lee, and Gunhee Kim. Audiocaps: Generating captions for audios in the wild. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), 2019.
+Dohwan Ko, Ji Soo Lee, Wooyoung Kang, Byungseok Roh, and Hyunwoo J Kim. Large language models are temporal and causal reasoners for video question answering. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
+Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International journal of computer vision, 123:32-73, 2017.
+Jie Lei, Linjie Li, Luowei Zhou, Zhe Gan, Tamara L Berg, Mohit Bansal, and Jingjing Liu. Less is more: Clipbert for video-and-language learning via sparse sampling. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
+Weixian Lei, Yixiao Ge, Jianfeng Zhang, Dylan Sun, Kun Yi, Ying Shan, and Mike Zheng Shou. Vit-lens: Towards omni-modal representations. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2024.
+Bo Li, Yuanhan Zhang, Liangyu Chen, Jinghao Wang, Jingkang Yang, and Ziwei Liu. Otter: A multi-modal model with in-context instruction tuning. arXiv preprint arXiv:2305.03726, 2023a.
+Guangyao Li, Yake Wei, Yapeng Tian, Chenliang Xu, Ji-Rong Wen, and Di Hu. Learning to answer questions in dynamic audio-visual scenarios. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19108–19118, 2022.
+Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. In Proceedings of the International Conference on Machine Learning (ICML), 2023b.
+Kunchang Li, Yali Wang, Yinan He, Yizhuo Li, Yi Wang, Yi Liu, Zun Wang, Jilan Xu, Guo Chen, Ping Luo, et al. Mybench: A comprehensive multi-modal video understanding benchmark. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22195-22206, 2024.
+Yong-Lu Li, Xinpeng Liu, Han Lu, Shiyi Wang, Junqi Liu, Jiefeng Li, and Cewu Lu. Detailed 2d-3d joint representation for human-object interaction. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2020.
+Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. 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.
+Yan-Bo Lin, Yi-Lin Sung, Jie Lei, Mohit Bansal, and Gedas Bertasius. Vision transformers are parameter-efficient audio-visual learners. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
+Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning. arXiv preprint arXiv:2310.03744, 2023a.
+Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In Advances in Neural Information Processing Systems (NeurIPS), 2023b.
+Shikun Liu, Linxi Fan, Edward Johns, Zhiding Yu, Chaowei Xiao, and Anima Anandkumar. Prismer: A vision-language model with an ensemble of experts. arXiv preprint arXiv:2303.02506, 2023c.
+
+Jiasen Lu, Christopher Clark, Sangho Lee, Zichen Zhang, Savya Khosla, Ryan Marten, Derek Hoiem, and Aniruddha Kembhavi. Unified-io 2: Scaling autoregressive multimodal models with vision, language, audio, and action. arXiv preprint arXiv:2312.17172, 2023.
+Xiaojian Ma, Silong Yong, Zilong Zheng, Qing Li, Yitao Liang, Song-Chun Zhu, and Siyuan Huang. Sqa3d: Situated question answering in 3d scenes. In Proceedings of the International Conference on Learning Representations (ICLR), 2023.
+Seungwhan Moon, Andrea Madotto, Zhaojiang Lin, Tushar Nagarajan, Matt Smith, Shashank Jain, Chun-Fu Yeh, Prakash Murugesan, Peyman Heidari, Yue Liu, et al. Anymal: An efficient and scalable any-modality augmented language model. arXiv preprint arXiv:2309.16058, 2023.
+Vicente Ordonez, Girish Kulkarni, and Tamara Berg. Im2text: Describing images using 1 million captioned photographs. Advances in neural information processing systems, 24, 2011.
+Artemis Panagopoulou, Le Xue, Ning Yu, Junnan Li, Dongxu Li, Shafiq Joty, Ran Xu, Silvio Savarese, Caiming Xiong, and Juan Carlos Niebles. X-instructclip: A framework for aligning x-modal instruction-aware representations to llms and emergent cross-modal reasoning. arXiv preprint arXiv:2311.18799, 2023.
+Viorica Pătrăucean, Lucas Smaira, Ankush Gupta, Adrià Recasens Continente, Larisa Markeeva, Dylan Banarse, Skanda Koppula, Joseph Heyward, Mateusz Malinowski, Yi Yang, et al. Perception test: A diagnostic benchmark for multimodal video models. arXiv preprint arXiv:2305.13786, 2023.
+AJ Piergiovanni, Isaac Nobel, Dahun Kim, Michael S Ryoo, Victor Gomes, and Anelia Angelova. Mirasol3b: A multimodal autoregressive model for time-aligned and contextual modalities. arXiv preprint arXiv:2311.05698, 2023.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In Proceedings of the International Conference on Machine Learning (ICML), 2021.
+Prajit Ramachandran, Barret Zoph, and Quoc V Le. Swish: a self-gated activation function. arXiv preprint arXiv:1710.05941, 2017.
+Christoph Schuhmann, Richard Vencu, Romain Beaumont, Robert Kaczmarczyk, Clayton Mullis, Aarush Katta, Theo Coombes, Jenia Jitsev, and Aran Komatsuzaki. Laion-400m: Open dataset of clip-filtered 400 million image-text pairs. In NeurIPS Workshop, 2021.
+Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2556-2565, 2018.
+Guangzhi Sun, Wenyi Yu, Changli Tang, Xianzhao Chen, Tian Tan, Wei Li, Lu Lu, Zejun Ma, and Chao Zhang. Fine-grained audio-visual joint representations for multimodal large language models. arXiv preprint arXiv:2310.05863, 2023a.
+Quan Sun, Yuxin Fang, Ledell Wu, Xinlong Wang, and Yue Cao. Eva-clip: Improved training techniques for clip at scale. arXiv preprint arXiv:2303.15389, 2023b.
+Zineng Tang, Jaemin Cho, Yixin Nie, and Mohit Bansal. Tvlt: Textless vision-language transformer. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
+Zineng Tang, Ziyi Yang, Chenguang Zhu, Michael Zeng, and Mohit Bansal. Any-to-any generation via composable diffusion. In Advances in Neural Information Processing Systems (NeurIPS), 2023a.
+Zitian Tang, Wenjie Ye, Wei-Chiu Ma, and Hang Zhao. What happened 3 seconds ago? inferring the past with thermal imaging. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17111-17120, 2023b.
+
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), 2017.
+Andong Wang, Bo Wu, Sunli Chen, Zhenfang Chen, Haotian Guan, Wei-Ning Lee, Erran Li Li, Joshua B Tenenbaum, and Chuang Gan. Sok-bench: A situated video reasoning benchmark with aligned open-world knowledge. In The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2024a.
+Chengyi Wang, Sanyuan Chen, Yu Wu, Ziqiang Zhang, Long Zhou, Shujie Liu, Zhuo Chen, Yanqing Liu, Huaming Wang, Jinyu Li, et al. Neural codec language models are zero-shot text to speech synthesizers. arXiv preprint arXiv:2301.02111, 2023.
+Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, et al. Qwen2-vl: Enhancing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191, 2024b.
+Junbin Xiao, Xindi Shang, Angela Yao, and Tat-Seng Chua. Next-qa: Next phase of question-answering to explaining temporal actions. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2021.
+Haofei Xu, Jing Zhang, Jianfei Cai, Hamid Rezatofighi, Fisher Yu, Dacheng Tao, and Andreas Geiger. Unifying flow, stereo and depth estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023.
+Le Xue, Manli Shu, Anas Awadalla, Jun Wang, An Yan, Senthil Purushwalkam, Honglu Zhou, Viraj Prabhu, Yutong Dai, Michael S Ryoo, et al. xgen-mm (blip-3): A family of open large multimodal models. arXiv preprint arXiv:2408.08872, 2024.
+Fengyu Yang, Chenyang Ma, Jiacheng Zhang, Jing Zhu, Wenzhen Yuan, and Andrew Owens. Touch and go: Learning from human-collected vision and touch. arXiv preprint arXiv:2211.12498, 2022.
+Hanrong Ye, De-An Huang, Yao Lu, Zhiding Yu, Wei Ping, Andrew Tao, Jan Kautz, Song Han, Dan Xu, Pavlo Molchanov, et al. X-vila: Cross-modality alignment for large language model. arXiv preprint arXiv:2405.19335, 2024.
+Shoubin Yu, Jaemin Cho, Prateek Yadav, and Mohit Bansal. Self-chained image-language model for video localization and question answering. In Advances in Neural Information Processing Systems (NeurIPS), 2023a.
+Wenyi Yu, Changli Tang, Guangzhi Sun, Xianzhao Chen, Tian Tan, Wei Li, Lu Lu, Zejun Ma, and Chao Zhang. Connecting speech encoder and large language model for asr. arXiv preprint arXiv:2309.13963, 2023b.
+Zhou Yu, Jun Yu, Yuhao Cui, Dacheng Tao, and Qi Tian. Deep modular co-attention networks for visual question answering. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
+Yuhang Zang, Wei Li, Jun Han, Kaiyang Zhou, and Chen Change Loy. Contextual object detection with multimodal large language models. arXiv preprint arXiv:2305.18279, 2023.
+Rowan Zellers, Jiasen Lu, Ximing Lu, Youngjae Yu, Yanpeng Zhao, Mohammadreza Salehi, Aditya Kusupati, Jack Hessel, Ali Farhadi, and Yejin Choi. Merlot reserve: Neural script knowledge through vision and language and sound. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
+Hang Zhang, Xin Li, and Lidong Bing. Video-llama: An instruction-tuned audio-visual language model for video understanding. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
+
+Xiaohui Zhang, Jaehong Yoon, Mohit Bansal, and Huaxiu Yao. Multimodal representation learning by alternating unimodal adaptation. In Proceedings of the IEEE International Conference on Computer Vision and Pattern Recognition (CVPR), 2024.
+Zihao Zhao, Eric Wallace, Shi Feng, Dan Klein, and Sameer Singh. Calibrate before use: Improving few-shot performance of language models. In Proceedings of the International Conference on Machine Learning (ICML), 2021.
+Deyao Zhu, Jun Chen, Xiaogian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models. In Proceedings of the International Conference on Learning Representations (ICLR), 2024.
+
+# APPENDIX
+
+In this Appendix, we present the following:
+
+- Additional information about our experimental setup (Section A), including benchmarks details (Section A.1), details of multimodal encoder and visual expert models (Section A.2), MMQA module pre-training data pre-processing (Section A.3), baseline implementation details (Sec. A.4), and CREMA implementation details (Sec. A.5).
+- Additional experiments (Section B), including fine-tuning results on VGGSound&PerceptionTest (Section B.1), comparison of training memory (Section B.2), zero-shot per-task performance on MUSIC-AVQA (Section B.3), the impact of MMQA pre-training (Section B.5), the impact of LoRA rank (Section B.6), more qualitative visualization (Section B.7), and extra discussion on model design (Section B.8).
+- Limitation and broader impact of this work (Section C), as well as license information (Section D) for the datasets, codes, and models that we used in this paper.
+- License information (Section D) for the datasets, codes, and models that we used in this paper.
+
+# A EXPERIMENTAL SETUP
+
+In this section, we present additional information on the used datasets/benchmarks (Sec. A.1), multimodal encoder and visual expert models (Section A.2), baseline implementation (Sec. A.4), and CREMA implementation details (Sec. A.5).
+
+# A.1 BENCHMARK AND DATASET
+
+We evaluate the CREMA framework on three video reasoning and QA tasks, focusing on both conventional VideoQA (requires video and language) and compositional VideoQA (requires video, language and other modalities). These include: (1) SQA3D (Ma et al., 2023): Another compositional Video QA task, requiring the understanding of video, 3D scenes, and text. Designed for 3D situated QA, it includes 33K questions and 650 3D scenes corresponding to ego-centric videos. We apply extra depth maps to it and report results on the test part following (Hong et al., 2023). (2) MUSIC-AVQA (Li et al., 2022): A compositional Video QA benchmark that involves reasoning across video, audio, and text. This dataset contains 9288 videos and 45K questions. We follow X-InstrurctBLIP (Alayrac et al., 2022) to evaluate our CREMA and on other baselines on the high-quality real video part. We enhance it with optical flow as an extra input and report our findings on the test set. (3) NExT-QA (Xiao et al., 2021): A conventional Video QA benchmark for causal and temporal reasoning with video and text inputs. It consists of 5440 videos and 52K questions. We include optical flow, depth map, and surface normals extracted from raw videos as additional modalities. Our results are based on the validation partition following previous work (Yu et al., 2023a). (4) ThouchQA: we build a question and answering dataset based on Touch&Go (Yang et al., 2022). As the original data only contains material class annotations, we reformulate the classification task as a QA task, by asking the model: What material is the person touching?. Our TouchQA dataset contains 714 training data and 3212 test
+
+Table 10: Baseline models fine-tuning hyperparameters.
+
+
Model (Dataset)
Modality
# Frames
Batch Size per GPU
Learning Rate
Warmup
Epoch
Gradient Accumulation Step
3D-LLM (SQA3D)
V
4
16
3e-05
1000
20
2
V, P
4
16
3e-05
1000
20
2
V, P, D, N
4
8
3e-05
1000
20
2
BLIP-2 (MUSIC-AVQA)
A
4
8
3e-05
1000
20
2
V
4
8
3e-05
1000
20
2
V, A
4
8
3e-05
1000
20
2
V, A, F
4
8
3e-05
1000
20
2
BLIP-2 (NExT-QA)
V
4
16
3e-05
1000
10
1
V, F
4
8
3e-05
1000
10
2
V, F, D
4
4
3e-05
1000
10
4
V, F, D, N
4
4
3e-05
1000
10
4
+
+data. (5) ThouchQA: Similar to the TouchQA dataset, we build the ThermalQA dataset on public video-thermal heatmap dataset, Thermal-IM (Tang et al., 2023b). Thermal-IM contains action labels in each video and was originally designed to predict human pose 3 seconds ago according to both video and thermal heatmap. We reformulate it as a QA task as well by asking the model: What action might have occurred before this video? and the answer is action label. Our Thermal dataset contains 1131 training data and 391 test data. (6) PerceptionTest (Pătrăucean et al., 2023): a multimodal benchmark designed to comprehensively evaluate the perception and reasoning skills of multimodal video models. We use the multi-choice QA part of this benchmark, which contains 1955 train data and 5260 validation data. (7) VGGSound (Chen et al., 2020): is a large-scale audio-video dataset. It contains over 200K videos with audio sounds. It was originally for audio-video classification. We formulated the classification tasks as the open-ended QA task over 300 audio classes.
+
+# A.2 MULTIMODAL ENCODERS AND VISUAL EXPERT MODELS
+
+We apply multiple encoders to encode multimodal raw input as discussed in Section 3.2. For visual inputs (video RGB frames, depth map, optical flow, and surface normals), we follow BLIP-2 (Li et al., 2023b) and X-InstructBLIP (Panagopoulou et al., 2023) to utilize ViT-G (Sun et al., 2023b) to encoder visual information. As depth map, optical flow, and surface normals raw data are with different channel numbers to the ViT model required, We transform those extra visual information to the RGB domain first to adapt the ViT model. For audio, we use the same $\mathrm{BEATS}_{\mathrm{ITER}3+}$ (Chen et al., 2023a) encoder as in X-InstructBLIP (Panagopoulou et al., 2023). For the 3D point cloud, we follow data preprocessing in 3D-LLM (Hong et al., 2023) and ConceptFusion (Jatavallabhula et al., 2023) that first extract pixel-aligned dense features for rendered images features and then fuse 2D features into 3D maps using gradslam (Jatavallabhula et al., 2019).
+
+We employ plug-and-play frozen experts to extract diverse modalities features, including depth map, optical flow, and surface normals, from raw videos. For optical flow estimation, we utilize the SotA Unimatch (Xu et al., 2023) model (GMFlow-scale2-regrefine6-mixdata). For depth map estimation, we leverage the SotA ZoeDepth-NK (Bhat et al., 2023) model. For surface normals estimation, we follow Prismer (Liu et al., 2023c) to use NLL-AngMF (Bae et al., 2021) that pre-trained on ScanNet (Dai et al., 2017). We decode video into frames to extract per-frame depth map/optical flow/surface normals. We set 3 fps, 1 fps, and 3 fps to decode SQA3D, MUSIC-AVQA, and NExT-QA videos respectively.
+
+# A.3 MMQA PRE-TRAINING DETAILS
+
+As discussed in Section 3.3, we conduct extra lightweight pre-training for MMQA module to obtain a good initialization. We follow audio-pertaining settings in X-InstructBLIP (Panagopoulou et al., 2023) with AudioCaps (Kim et al., 2019), but excluded caption data as our work is more focusing video reasoning. In this case, we obtained a QA-related subset from AudioCaps for MMQA-QA pre-training. Similarly, we utilized the 3D data released from 3D-LLM (Hong et al., 2023) and also took the QA format part for MMQA-3D pretraining. We pre-trained with $1e^{-5}$ learning rate and 1 epoch for efficient initialization.
+
+# A.4 BASELINE MODEL IMPLEMENTATION
+
+We conduct experiments with $4 \times 48\mathrm{GB}$ A6000 GPUs, we report baseline model training hyperparameters in Table 10. We follow hyperparameter settings that have been searched to yield the best performance in SeViLA (Yu et al., 2023a) with the same backbone model. To prompt LLM, we design different prompts for open-ended QA tasks (SQA3D, MUSIC-AVQA) and multi-choice QA (NExT-QA) following previous works (Yu et al., 2023a; Han et al., 2023). For open-ended QA, we let LLM generate responses without extra constraints and then compare the generated answers with ground-truth answers for accuracy calculation. We list prompts design for each dataset in Table 12. We utilize the same multimodal encoders, and multimodal information from the same estimator for fair comparison.
+
+Table 11: CREMA fine-tuning hyperparameters.
+
+
Dataset
Modality
# Frames
Batch Size per GPU
Learning Rate
Warmup
Epoch
Gradient Accumulation Step
SQA3D
P
4
16
2e-4
1000
20
1
V
4
16
2e-4
1000
20
1
V, P
4
16
2e-4
1000
20
1
V, P, D
4
16
2e-4
1000
20
1
V, P, D, N
4
16
2e-4
1000
20
1
MUSIC-AVQA
A
4
24
2e-4
1000
20
1
V
4
24
2e-4
1000
20
1
V, A
4
24
2e-4
1000
20
1
V, A, F
4
24
2e-4
1000
20
1
V, A, F, D, N
4
16
2e-4
1000
20
1
NExT-QA
V
4
16
1e-4
1000
10
1
V, F
4
16
1e-4
1000
10
1
V, D
4
16
1e-4
1000
10
1
V, N
4
16
1e-4
1000
10
1
V, F, D
4
16
1e-4
1000
10
1
V, F, D, N
4
8
1e-4
1000
10
2
+
+Table 12: Prompt designs for each dataset.
+
+
Dataset
LLM Prompt
SQA3D
Based on the frames and 3D Model information, answer the question using a single word or phrase.
MUSIC-AVQA
Based on the frames and audio information, answer the question using a single word or phrase.
VGGSound
Based on the frames and audio information, answer the question using a single word or phrase.
NExT-QA
Considering the information presented in the frame, select the correct answer from the options
PerceptionTest
Considering the information presented in the frame, select the correct answer from the options
TouchQA
Based on the frames and touch map information, answer the question using a single word or phrase.
ThermalQA
Based on the frames and thermal heatmap information, answer the question using a single word or phrase.
+
+# A.5 CREMA IMPLEMENTATION DETAILS
+
+CREMA framework adopts BLIP-2 (Li et al., 2023b), an image-language model with 4.1B parameters and pre-trained on 129M images in total, including COCO (Lin et al., 2014), Visual Genome (Krishna et al., 2017), CC12M (Sharma et al., 2018), SBU (Ordonez et al., 2011), and 115M images from LAION400M (Schuhmann et al., 2021). See Appendix for details. we also report our CREMA framework training hyperparameters in Table 11. The experiments are conducted on the same $4 \times$ 48GB A6000 GPUs machine.
+
+In the zero-shot setting, we conducted evaluations on SQA3D (video + point cloud) and MUSIC-AVQA (video + audio). Since these tests include only two modalities at a time, we bypassed the Self-Gated Multimodal Query Fusion module and directly concatenated the video tokens with the corresponding modality tokens. This ensures no parameter mismatch or interference and every modality is independent during inference.
+
+Table 13: Fine-tuning Results on VGGSound. The numbers in the bracket represent results after excluding out-of-vocabulary results caused by formulating the classification as the open-ended QA.
+
+
Method
Modality
Acc
Trainable Params.
CAV-MAE (Gong et al., 2022)
V
47.0
324M
V, A
65.5
324M
Mirasol3B TTM (Piergiiovanni et al., 2023)
V, A
66.4
3B
Mirasol3B (Piergiiovanni et al., 2023)
V, A
69.8
3B
CREMA (ours)
V
51.5 (53.1)
4M
V, A
62.4 (67.0)
9M
+
+Table 14: Fine-tuning Results on PerceptionTest.
+
+
Method
Modality
Acc
Trainable Params.
BLIP-2 (Li et al., 2023b)
V
67.1
108M
V, F
68.2
216M
V, F, D
67.9
324M
CREMA (ours)
V
66.6
4M
V, F
68.2
8M
V, F, D
68.7
20M
+
+Table 15: Comparison of Training Efficiency on Video Question Answering (NExT-QA). Tested on the single A6000 GPU.
+
+
Model
Modality
BatchSize
Training Memory
BLIP-2 (Li et al., 2023b)
V, F, D, N
4
46.3GiB
CREMA
V, F, D, N
4
18.6GiB
+
+# B EXTRA EXPERIMENTS
+
+In this section, we provide additional experiments and analysis, including zero-shot per-task performance on MUSIC-AVQA (Section B.3), the impact of MMQA pre-training (Section B.5), the impact of LoRA rank (Section B.6), and more qualitative visualization (Section B.7).
+
+Table 16: Zero-shot Per-task Results of CREMA method on Audio-Video Question Answering (MUSIC-AVQA). We report simple notations for each modality and question type: V: Video RGB frames, A: Audio, Cnt.: Counting, Com.: Comparative, Loc.: Location, Ext.: Existential, and Tem.: Temporal.
+
+
Modality
Audio Question
Visual Question
Audio-Visual Question
Avg.
Cnt.
Com.
Avg.
Cnt.
Loc.
Avg.
Ext.
Loc.
Cnt.
Com.
Tem.
Avg.
A
50.4
53.2
51.0
29.1
18.5
23.9
39.9
13.0
27.1
49.6
4.3
29.1
31.0
V
73.4
51.2
68.6
51.4
44.4
48.0
76.4
43.5
38.7
47.1
26.3
47.7
51.0
A,V
75.5
51.6
70.4
55.5
42.6
49.2
76.2
44.2
45.1
48.2
26.3
49.5
52.6
+
+# B.1 EXTRA RESULTS ON VGGSOUND AND PERCEPTIONTEST
+
+As listed in Table 13 and Table 14, we report extra fine-tuning performance on VGGSound (Chen et al., 2020) and PerceptionTest (Pătrăucean et al., 2023). On VGGSound, we formulate the original audio-video classification task as an open-ended QA task. We calculate accuracy by directly matching the generated answer and the ground truth. Note that our original outputs have $2.9\%$ (V) and $7.9\%$ (V, A) predicted answers on test data that are out-of-vocabulary. We report both numbers with and without those out-of-vocabulary data in Section B.1. It shows that combined with audio (A) brings notable and consistent improvement. Our CREMA shows comparable performance with fewer trainable parameters compared with other methods. On PerceptionTest, our CREMA shows consistent improvement when adding new modalities while the baseline method struggles with this.
+
+# B.2 COMPARISON OF TRAINING MEMORY
+
+We further compare the training memory of our CREMA and baseline method in Table 15. Our method requires much less training memory when leveraging the same modality input and batch size. Thus, our method is more friendly to incorporate more modalities during the training in the view of computation resources.
+
+Table 17: Ablation of Modality-sequential Training of CREMA.
+
+
Method
Dataset
Modality
Accuracy
Trainable Params.
CREMA (Joint)
MUSIC-AVQA
V, A, F, D, N
80.6
38M
SQA3D
V, P, D, N
52.7
38M
NExT-QA
V, F, D, N
73.0
28M
CREMA (Sequential)
MUSIC-AVQA
V, A, F, D, N
81.7 (+1.1)
38M
SQA3D
V, P, D, N
54.6 (+1.9)
38M
NExT-QA
V, F, D, N
73.9 (+0.9)
28M
+
+Table 18: The impact of Modality-Specific LoRA Pre-training. We report zero-shot performance.
+
+
Dataset
Modality
w/o PT
w PT
MUSIC-AVQA (Avg.)
A
28.1
31.0
SQA3D (Avg.)
P
36.1
37.3
+
+# B.3 EXTRA ZERO-SHOT RESULTS ON MUSIC-AVQA
+
+As listed in Table 16, we report extra zero-shot performance on MUSIC-AVQA by more fine-grained task/question types. It shows that video (V) combined with audio (A) brings notable and consistent improvement across most question types, highlighting the compositional video reasoning ability of our proposed CREMA.
+
+# B.4 THE EFFECT OF MODALITY-SEQUENTIAL TRAINING
+
+We validate the effectiveness of the modality-sequential training of our approach in Table 17. We report the fine-tuning performance on three datasets: MUSIC-AVQA, SQA3D, and NExT-QA. As shown, our sequential training mechanism effectively improves multimodal video reasoning capabilities without additional architectures or the computationally and memory-intensive gradient modification strategy. This advantage is distinguishable from MLA (Zhang et al., 2024), a multimodal representation learning method that sequentially trains a shared classification head on different modalities. Since MLA uses a unified trainable module (i.e., the shared classifier head) to train multimodal data, it employs the orthogonal gradient projection technique on different sensory inputs to mitigate the forgetting of previously learned modality information. In contrast, our model leverages substantial capacity to capture crucial information from various modalities through lightweight, yet effective modality-specific multi-query adapter (MMQA) modules, avoiding modality forgetting. Furthermore, we propose a modality-adaptive dynamic early exit strategy, enabling our model to converge quickly and mitigate over-convergence issues in different modality data by utilizing the gradients of lightweight modality-specific modules.
+
+# B.5 THE IMPACT OF MMQA PRE-TRAINING.
+
+As listed in Table 18, we demonstrate the impact of MMQA module pre-training on SQA3D and MUSIC-AVQA datasets. It shows that such an efficient MMQA pre-training brings a significant boost $(+1.2\%)$ on SQA3D with 3D point could (P), $+2.9\%$ on MUSIC-AVQA with audio (A)) to the zero-shot performance for each single modality. It demonstrates the effectiveness of our MMQA and the pre-training process.
+
+Table 19: The impact of the rank $r$ of modality-adaptive LoRA module in CREMA.
+
+
#Rank
Music-AVQA (A)
SQA3D (P)
Trainable Params. (A) / (P)
32
69.4
47.0
3.8 M / 2.7 M
64
68.0
47.3
5.0 M / 3.9 M
128
67.7
46.3
7.4 M / 6.3 M
+
+
+Figure 3: Qualitative examples for multimodal compositional video reasoning from SQA3D (Left) and MUSIC-AVQA (Right). The correct predictions are marked by green check marks.
+
+# B.6 RANK OF LORA MODULE.
+
+We investigate the impact of the rank $r$ of our modality-adaptive LoRA modules in CREMA. As shown in Table 19, adjusting the rank size within a reasonable range brings an insignificant change in the number of trainable parameters (e.g., $\pm 1 \sim 2 \mathrm{M}$ ). We also find that a larger rank size does not guarantee improved performance. For MUSIC-AVQA, we fine-tuned the model on audio inputs (A), and it always outperforms the best-performing baseline (AVQA, $64.2\%$ ) by a significant margin. CREMA trained on 3d point cloud data performs similarly to the rank size of 32 and 64 on SQA3D. We set $r = 64$ as the default for all experiments, showing the robustness of our MMQA module in selecting $r$ over various modality inputs and evaluation tasks. But we believe that our CREMA method with proper $r$ can further improve its reasoning ability.
+
+# B.7 QUALITATIVE ANALYSIS
+
+Beyond the numerical comparison of the effect integrating different sets of modalities for our CREMA method, we investigate our model's generated responses according to different types of input examples. In Figure 3 Left, CREMA with 3D point cloud inputs (P) fails to find the chair and respond to the color of the wall, brown, as its 2D scene image features are incorporated in 3D point cloud features. CREMA with Video (V) and $V$ , $P$ also predict incorrect chair color, black. However, with the assistance of depth information, the method can capture objects accurately and also find the designated chair. Similarly, in Figure 3 Right, optical flow inputs help to find musicians with their poses playing instruments, so our CREMA method can tell the middle instrument is not being played at the beginning, but from the left. In Figure 4, we present additional visual examples from SQA3D and MUSIC-AVQA, demonstrating how the integration of multiple input modalities enhances model predictions. For instance, depth maps in the top-left example reveal the distance of objects, enabling the model to discern that the clock is closer than the pillow. Similarly, on the middle left, depth maps indicate an open door through depth of field analysis, aiding in question answering. In the MUSIC-AVQA examples on the right, the optical flow captures motion, which is essential for deducing which instrument is being played. Specifically, the bottom right illustration shows that the initial static behavior of the left people implies that the right instrument is not played initially. This evidence highlights the benefit of incorporating diverse modalities for improved model reasoning ability.
+
+
+Figure 4: Qualitative examples for multimodal compositional video reasoning from SQA3D (Left) and MUSIC-AVQA (Right). The correct predictions are marked by green checks.
+
+
+Figure 5: Visualization on attention map under different modality combinations. Top: with audio and video. Bottom: with audio, optical flow, and video. We omit audio for simplicity. We highlight attention regions that may affect model prediction with red boxes.
+
+# B.8 EXTRA DISCUSSIONS ON MODEL DESIGN.
+
+Prioritizing different modalities. We conducted additional experiments comparing different prioritization strategies, including prioritizing other modalities and treating all modalities equally (i.e., no fusion, directly concatenating tokens) in Table 20. It shows that prioritizing video achieves the best performance, and prioritizing other modalities or treating all modalities equally results in lower performance, validating the effectiveness of our design.
+
+Single FC layer Design. we conducted additional experiments comparing the FC layer to a lighter-weight alternative, interpolation to project dimension-mismatched features between multimodal encoder and multimodal Q-Former in Table 21. The results show that the FC layer improves
+
+
Setting
NExT-QA
Major: V + Supportive: D,F,N
73.9
Major: D + Supportive: V,F,N
62.1
No Prioritizing: V, D, F, N
73.5
+
+Table 20: Ablation on prioritizing different modalities.
+
+
Connector
# Parameters
MUSIC-AVQA
One-layer FC
0.3M
79.4
Interpolation
0M
78.9
+
+Table 21: Ablation on the projection layer between multimodal encoder and multimodal Q-Former.
+
+performance while adding a negligible number of parameters. We attribute this improvement to the FC layer's ability to provide a more dynamic and learnable projection between multimodal encoders and the Multimodal QFormer, which better aligns features compared to interpolation.
+
+Query Token Length. We conducted experiments analyzing the impact of query token length on performance, trainable parameters, and computational cost in Table 22. We find increasing the number of query tokens indeed improves accuracy as more fine-grained features are captured. However, it also leads to increasing computational costs (GFLOPs). We find that 32 query tokens per frame strike a good balance between performance and efficiency. This design aligns with BLIP-2, ensuring strong performance without excessive computational overhead.
+
+# C LIMITATION & BROADER IMPACTS
+
+Limitations. Our CREMA is mainly based on BLIP-2 structure which was originally pre-trained only on image-language data. This may lead to limited temporal modeling/knowledge in the pretrained model. It might not handle well fine-grained temporal events (e.g., open the door vs. close the door). Moreover, a potential limitation could be incorporating multimodal inputs such as depth and flow, which requires computing these modalities and introduces additional overhead.
+
+Broader Impacts. The CREMA framework leverages a pre-trained vision-language model backbone with the proposed adapter modules to integrate multiple modality inputs through a universal framework. Similar to most works leveraging pre-trained vision-language models, this might occasionally yield unexpected or inappropriate responses, potentially reflecting societal biases related to gender, race, or sexuality. More studies of vision-language models are needed to evaluate and mitigate these negative biases, and toxic output.
+
+# D LICENSE
+
+We will make our code and models publicly accessible. We use standard licenses from the community and provide the following links to the licenses for the datasets, codes, and models that we used in this paper. For further information, please refer to the specific link.
+
+SQA3D: Apache
+
+
Modalities
# Quey Token
NExT-QA
Trainable Param.
GFlops
V
16
70.8
~4M
1.0K
V
32
71.6
~4M
1.3 K
V
64
72.0
~4M
2.1 K
V,F
16
71.8
~8M
1.4K
V,F
32
72.4
~8M
2.2K
V,F
64
72.9
~8M
6.2K
+
+Table 22: Ablation on the number of query tokens.
+
+MUSIC-AVQA: MIT
+
+NExT-QA:MIT
+
+AudioCaps: MIT
+
+3D-LLM: MIT
+
+LAVIS: BSD 3-Clause
+
+Touch-and-Go: CC BY
+
+Thermal-IM: BSD 3-Clause
+
+PerceptionTest: Apache
+
+VGGSound: CC BY
+
+PyTorch: BSD-style
+
+Huggingface Transformers: Apache
+
+Torchvision: BSD 3-Clause
\ No newline at end of file
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/images.zip b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..b2e2485f376217249388faa3840604bf19b68a30
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:480e5ea67831c2279dd9e0d574fb816b03d4763565122a97e921bbc48f8c081b
+size 1134975
diff --git a/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/layout.json b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..56465d421a9e69541afbb842657e39faab369399
--- /dev/null
+++ b/ICLR/2025/CREMA_ Generalizable and Efficient Video-Language Reasoning via Multimodal Modular Fusion/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6b55a4165a2a4874923c9f35a8c684964d501cf56cae0e268b63e93dafe4f86
+size 616191
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_content_list.json b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..03b5de4e4fe7474517fbb597b6e508e221fdfcc1
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0de1708c7f2c18fd8c2f49860151cb753913394a991024ec514af8154b44ae09
+size 260759
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_model.json b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..1ee2821d6fd9f5988905f29e5262d8e4d1d00813
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:982a3e8271bf33c46f58186b2166786f9b26da212a94302a201534cc17bf0cc5
+size 309258
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_origin.pdf b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..863ea77fa9a7311ddbb14654ac0d813323fe5604
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/f7e89748-5ccd-4b1d-8b42-e4f4d616a8b3_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:692dd4fcc436ba36e78dfbbf1a93d4e2f3089d33a46e1d126dbcaa28482116fe
+size 1346552
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/full.md b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..3810a9b44bf5bc924d2ecb9f917802a4bf74cf2d
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/full.md
@@ -0,0 +1,1022 @@
+# CS-BENCH: A COMPREHENSIVE BENCHMARK FOR LARGE LANGUAGE MODELS TOWARDS COMPUTER SCIENCE MASTERY
+
+Xiaoshuai Song\*, Muxi Dao\*, Guanting Dong†, Zhengyang Wang, Yujia Fu, Runqi Qiao, Zhexu Wang, Dayuan Fu, Huangxuan Wu, Bin Liang, Weihao Zeng, Yejie Wang, Zhuoma GongQue, Jianing Yu, Qiuna Tan, Weiran Xu†
+Beijing University of Posts and Telecommunications, Beijing, China
+{songxiaoshuai, dmx, xuweiran} @bupt.edu.cn
+
+# ABSTRACT
+
+Large language models (LLMs) have demonstrated significant potential in advancing various fields of research and society. However, the current community of LLMs overly focuses on benchmarks for analyzing specific foundational skills (e.g. mathematics and code generation), neglecting an all-round evaluation of the computer science field. To bridge this gap, we introduce CS-Bench, the first multilingual (English, Chinese, French, German) benchmark dedicated to evaluating the performance of LLMs in computer science. CS-Bench comprises approximately 10K meticulously curated test samples, covering 26 subfields across 4 key areas of computer science, encompassing various task forms and divisions of knowledge and reasoning. Utilizing CS-Bench, we conduct a comprehensive evaluation of over 30 mainstream LLMs, revealing the relationship between CS performance and model scales. We also quantitatively analyze the reasons for failures in existing LLMs and highlight directions for improvements, including knowledge supplementation and CS-specific reasoning. Further cross-capability experiments show a high correlation between LLMs' capabilities in computer science and their abilities in mathematics and coding. Moreover, expert LLMs specialized in mathematics and coding also demonstrate strong performances in several CS subfields. Looking ahead, we envision CS-Bench serving as a cornerstone for LLM applications in the CS field and paving new avenues in assessing LLMs' diverse reasoning capabilities. Our project homepage is available at https://csbench.github.io/.
+
+# 1 INTRODUCTION
+
+Large language models (LLMs), exemplified by ChatGPT (OpenAI, 2022), have emerged as a significant milestone in artificial intelligence (AI), demonstrating potential far beyond natural language processing (NLP) (Zhao et al., 2023; Chang et al., 2024). These models are increasingly impacting diverse fields including education, industry, and scientific research (Guha et al., 2023; Guo et al., 2023; Xiao et al., 2023; Huang et al., 2023a; Zhou et al., 2023a; Zhao et al., 2024; Zhang et al., 2024a). As computer science (CS) continues to be the cornerstone of modern information technology, from the advent of electronic computers to today's AI advancements (Denning, 2000; Campbell-Kelly et al., 2023), a key challenge lies in enabling LLMs to better utilize CS knowledge to serve humanity in the evolving intelligent era (Donadel et al., 2024; Murtuza, 2024; Marques et al., 2024).
+
+Understanding the performance of LLMs in computer science is fundamental to the research and application of LLMs within the field. Despite studies like MMLU and C-Eval (Hendrycks et al., 2021a; Huang et al., 2023b; Liu et al., 2023a; Li et al., 2024; Gu et al., 2024) covering a wide range of fields including CS, their broad scope implies that CS is merely a component within the multiple categories of science and engineering, overlooking the importance of thoroughly evaluating the CS field. Moreover, such evaluation result can further guide the development of LLMs, offering
+
+
+
+
+Figure 1: Overview diagram and statistics of CS-Bench.
+
+practical insights to advance the corresponding capabilities. Recently, a series of studies have devoted on actively assessing and analyzing the capabilities of LLMs in mathematics, coding, and logical reasoning (Frieder et al., 2023; Collins et al., 2023; Wu et al., 2023; Yuan et al., 2023b; Dong et al., 2024; Liu et al., 2024; Zhang et al., 2024b; Lin et al., 2024; Liu et al., 2023b; Saparov et al., 2023; Xu et al., 2023; Wu et al., 2024). Unfortunately, efforts on LLMs in cross-capability evaluation is quite scarce. Considering the intersection of computer science with coding, mathematics, and reasoning abilities, we have grounds to believe that cross-capability research and analysis in CS can effectively propel the comprehensive development of the LLM community. Here, we are particularly interested in two research questions for evaluating LLMs' proficiency in computer science field:
+
+RQ1: How do LLMs perform in the field of computer science and what are the challenges and potential directions for improvement?
+
+RQ2: What are the relationship between the abilities of LLMs in computer science, mathematics, and code programming?
+
+As the bedrock for exploration, we introduce CS-Bench, the first benchmark dedicated to evaluating the performance of LLMs in computer science. CS-Bench features high-quality, diverse task forms, varying capacities, and quadrilingual evaluation. Firstly, CS-Bench comprises approximately 10K carefully curated test items spanning 26 sections across 4 key CS domains. Unlike conventional benchmarks consisting solely of multiple-choice (MC) questions (Hendrycks et al., 2021a; Huang et al., 2023b; Li et al., 2024), CS-Bench includes 4 tasks: multiple-choice, assertion, fill-in-the-blank (FITB), and open-ended, to better simulate real-world scenarios and assess the robustness of LLMs to different task formats. In addition to knowledge-type questions assessing LLMs' mastery of CS knowledge, reasoning-type questions further evaluate LLMs' ability to apply CS knowledge for reasoning. Lastly, by supporting evaluation in English, Chinese, French, and German, CS-Bench allows assessment of LLMs' ability to tackle CS challenges in various language contexts.
+
+In response to RQ1, we evaluate over 30 mainstream LLMs on CS-Bench. Our main findings are: (1) CS-Bench effectively differentiates the capabilities of LLMs in the CS field while also posing challenges to the best-performing GPT-4o/OpenAI-o1. (2) LLMs exhibit a consistent logarithmic growth pattern in scale and a linear growth pattern in scores on the CS-Bench. By establishing the scale-score fitting function, smaller models can be used to predict and guide the development of larger-scale models. (3) Further error type analysis indicates that the primary reason for the limited performance of LLMs is the lack of domain knowledge, and the CS-specific reasoning is difficult to achieve merely by enhancing general reasoning abilities, necessitating targeted reinforcement.
+
+In response to RQ2, we perform a detailed analysis of the relationship of General LLMs' ability in three domains: mathematics, coding, and computer science, as well as the performance of code- and math-specific expert LLMs on CS-Bench. We observe consistent trends in the overall performance of the general LLMs across CS-Bench and scores in benchmarks related to mathematics and coding, indicating a strong correlation between LLM's computer science proficiency and its mathematical and programming abilities. Furthermore, despite a decline in general capabilities, some expert LLMs still exhibit improvements in certain areas of CS, such as data structures and algorithms, with more pronounced knowledge and reasoning capabilities evident in supplementary smaller-scale models.
+
+To summarize, our contributions are as follows:
+
+- We introduce CS-Bench, the first benchmark dedicated to evaluate the performance of LLMs in the field of computer science. CS-Bench supports four languages, covers four key areas with 26 subfields, and includes a diverse range of task formats.
+- Utilizing CS Bench, we conduct a comprehensive evaluation of mainstream LLMs, revealing the relationship between CS performance and model scales. We also quantitatively analyze the reasons for failures in existing LLMs and highlight directions for improvement.
+- We conduct exploratory experiments on LLMs' cross-ability and find a strong relationship between their CS proficiency and mathematical and programming abilities. Moreover, the expertise in mathematics and programming of expert LLMs can improve performance in specific CS subfields.
+
+# 2 CS-BENCH
+
+# 2.1 DESIGN PRINCIPLE
+
+The objective of CS-Bench is to robustly assess the knowledge and reasoning capabilities of LLMs in different linguistic contexts within the field of computer science. To this end, our benchmark adheres to the following guidelines: (1) Coverage of key domains: it covers key areas of CS with finer subfields for specificity. (2) Diverse task forms: questions vary in format to simulate diverse real-world user queries. (3) CS-specific reasoning: it evaluates CS logical and arithmetic reasoning in addition to CS knowledge. (4) Multilinguality support: it supports assesses LLMs' performance in different language environments. Based on these criteria, CS-Bench focuses on quadrilingual evaluation in English, Chinese, French, and German, covering four domains: Data Structure and Algorithm (DSA), Computer Organization (CO), Computer Network (CN), and Operating System (OS). Twenty-six fine-grained subfields, diverse task forms, and divisions of knowledge and reasoning are further developed to enrich the dimensions of assessment and simulate real-world scenarios.
+
+# 2.2 DATA COLLECTION
+
+Data Sources. Diverse data sources are key to achieving the sample diversity of CS-Bench. Our raw data originates from three sources: (1) Computer science-related questions obtained from publicly available online channels, such as professional exams and practice tests. (2) Knowledge-type questions obtained through the initial manual extraction and subsequent adaptation of blog articles from various computer-related websites. (3) Construction of teaching materials and examination papers authorized by the authors' institutions. The latter two cate
+
+Table 1: Comparison of perplexity (PPL) across evaluation datasets. The PPL of English and Chinese datasets is calculated on Llama2-7B and Qwen1.5-7B. "MC" denotes multiple-choice, and "ALL" denotes all tasks.
+
+
English Dataset
PPL
Chinese Dataset
PPL
TruthfulQA (MC)
7.73
C-Eval
11.47
MMLU
9.54
CMMLU
13.62
CS-Bench (MC)
11.86
CS-Bench (MC)
13.31
CS-Bench (ALL)
13.3
CS-Bench (ALL)
16.95
+
+gories constitute the vast majority (over $70\%$ ) of the data, and these data are not directly exposed on the internet, effectively reducing the likelihood of LLMs encountering these questions during pre-training. We compare the perplexity (Jelinek et al., 1977) of models on CS-Bench English and Chinese datasets with several other prominent evaluation datasets in Table 1. In both English and Chinese, the perplexity of CS-Bench is comparable to or even higher than that of other datasets, further indicating the high quality of CS-Bench samples and the rarity of data leakage instances.
+
+Data Processing. The data processing relies on a team composed of five members, each holding a bachelor's degree in computer science and receiving appropriate compensation. Initially, we parse questions and answers for each sample from the data sources either automatically or manually. Subsequently, we manually label questions with knowledge-type or reasoning-type tags depending on whether in-depth reasoning and calculation are required. For reasoning-type questions, we attempt to collect explanations from the data sources whenever possible; otherwise, we handle them through cross-annotation and verification among team members. We first construct Chinese data, then translate it into other languages using GPT-4, supplemented by manual checks, to create t multilingual data. Finally, we conduct thorough manual checks on the entire dataset to ensure quality. As this benchmark pertains to objective knowledge and reasoning in the field of computer science, the annotation content is not influenced by regional or cultural differences among annotators.
+
+Statistics. CS-Bench is an evaluation benchmark supporting quadrilingual assessment, encompassing a total of 26 subfields across 4 domains, with a cumulative total of 9676 samples. These samples encompass various task formats including multiple-choice, assertion, fill-in-the-blank, and open-ended questions. Besides, CS-Bench assesses both knowledge-type and higher-order reasoning-type questions, with each reasoning question accompanied by an explanation. To validate the effectiveness of models, we randomly sample $10\%$ of the data for validation, using the remaining $90\%$ for testing. The statistics of CS-Bench are shown in Figure 1, with detailed exposition provided in Appendix C.
+
+# 3 EXPERIMENT
+
+# 3.1 EXPERIMENTAL SETUP
+
+Evaluation Protocols. Due to the diverse task formats in CS-Bench, we first design question templates for each task type. For comprehension tasks (MC and Assertion), we use regex to match LLM's predictions and then calculate their accuracy against the ground-truth answers. For generation tasks (FITB and Open-ended), due to the diversity of ground-truth answers, we score LLM's predictions by GPT-4 using standard answers in CS-Bench as references. In detail, FITB questions are scored as either 0 or 1, while the score range for Open-ended questions is 1-10, which is then linearly mapped to a range of 0.1 to 1. Finally, scores are weighted based on the quantity of each type to derive the ultimate overall score. It is worth emphasizing that while using GPT-4 for scoring generation tasks may introduce a certain threshold for evaluation, its primary purpose is to simulate diverse task formats in real-world scenarios. Therefore, we encourage isolating comprehension tasks from CS-Bench to facilitate automatic evaluation with no need for GPT-4. We provide the details of the evaluation setup in Appendix D, where we also verify the validity of GPT-4 scoring through its consistency with manually scored results, and the effect of different scoring models.
+
+Models. For open-source models, we selected Gemma-2B/7B (Team et al., 2024), Llama2-7B/13B/70B (Touvron et al., 2023), Llama3-8B/70B (Meta, 2024), Llama3.1-405B (Dubey et al., 2024), ChatGLM3-6B (THUDM, 2023), Baichuan2 (v2.0)-7B/13B (Yang et al., 2023), InternLM2-7B/20B (Cai et al., 2024), Qwen1.5-4B/7B/14B/72B/110B (Alibaba, 2024), Mistral-7B (v0.2) (Jiang et al., 2023), Mixtral- $8\times 7\mathrm{B}$ (v0.1) (Jiang et al., 2024), Mistral-Large-123B (MistralAI, 2024), and DeepSeekLLM-7B/67B (Bi et al., 2024). For closed-source commercial models, we utilized PaLM-2 (palm-2-chat-bison) (Anil et al., 2023), Claude-2.1 (Anthropic, 2023), Claude-3 (opus) (Anthropic, 2024a), Claude-3.5 (Sonnet) (Anthropic, 2024b), as well as GPT-3.5, GPT-4 (0125 version) (Achiam et al., 2023), GPT-4o (OpenAI, 2024a) and OpenAI-o1-mini-preview (0912 version) $(\mathrm{OpenAI}, 2024\mathrm{b})^2$ . To ensure the instruction-following abilities, we employ the official chat or instruction-tuned versions for all models. Details on these models are provided in Appendix D.4.
+
+# 3.2 MAIN RESULTS
+
+Table 2 presents the overall results of all foundation models directly answering questions under the zero-shot setting ${}^{3}$ . In summary, the overall scores of models range from 39.86% to 72.29%, demonstrating CS-Bench's effectiveness in distinguishing between the abilities of various models
+
+Table 2: Zero-shot scores (\%) of LLMs across domains on CS-Bench (EN), where "Klg" denotes knowledge-type, "Rng" denotes reasoning-type, and "Avg" denotes Average. The random scores are weighted as follows: $25\%$ for MC, $50\%$ for Assertion, $0\%$ for FITB, and $10\%$ for Open-ended. The highest scores for open-source and closed-source LLMs is marked in green and blue respectively.
+
+
Model
Data Struc & Algo
Computer Organization
Computer Network
Operating System
Overall
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Random
28.04
24.63
26.65
26.57
25.24
26.13
26.34
22.49
24.98
29.06
24.23
27.27
27.4
24.12
26.2
Open-source LLM (Scale<10B)
Gemma-2B
56.76
23.44
43.20
47.69
30.18
41.92
45.22
26.38
38.59
37.79
31.32
35.39
46.89
27.59
39.86
Qwen1.5-4B
58.76
36.56
49.72
52.31
33.88
46.23
52.70
33.97
46.11
40.03
38.52
39.47
51.18
35.70
45.54
ChatGLM3-6B
51.10
34.08
44.17
48.11
32.73
43.04
51.15
32.66
44.64
43.57
37.03
41.14
48.63
34.07
43.33
Llama2-7B
51.51
32.61
43.82
48.89
31.82
43.26
46.72
30.75
41.10
41.04
26.26
35.55
47.15
30.48
41.08
DeepseekLLM-7B
56.42
28.94
45.23
52.09
32.48
45.62
52.43
31.41
45.03
41.66
31.98
38.06
50.87
31.11
43.67
Baichuan2-7B
53.11
34.95
45.72
45.10
38.67
42.98
51.26
34.27
45.28
43.47
33.63
39.82
48.29
35.33
43.57
Gemma-7B
59.53
35.18
49.62
49.97
33.27
44.46
60.87
37.09
52.50
48.67
34.23
43.31
54.90
35.02
47.66
Qwen1.5-7B
59.90
35.28
49.88
55.21
42.73
51.09
61.56
43.02
55.04
52.01
39.78
47.47
57.34
40.08
51.05
InternLm2-7B
59.57
40.92
51.98
58.83
37.94
51.94
62.65
40.60
54.89
50.94
39.29
46.61
58.31
39.77
51.56
Mistral-7B
63.24
34.86
51.69
57.52
38.67
51.30
61.48
44.92
55.65
51.66
43.79
48.73
58.63
40.44
52.01
Llama3-8B
66.25
37.29
54.46
55.38
40.67
50.53
62.21
53.02
58.98
55.26
49.34
53.06
59.75
44.97
54.37
Open-source LLM (Scale>10B)
Llama2-13B
51.74
35.00
44.93
51.81
36.18
46.66
53.03
37.99
47.74
48.12
32.36
42.27
51.31
35.46
45.54
Baichuan-13B
54.82
33.39
46.10
50.50
39.52
46.88
55.87
42.21
51.06
48.44
34.73
43.35
52.53
37.44
47.03
Qwen1.5-14B
64.95
46.74
57.54
60.06
45.58
55.28
68.66
52.91
63.12
56.56
51.48
54.67
62.79
49.18
57.83
InternLm2-20B
66.72
38.21
55.11
58.38
39.82
52.26
64.13
50.35
59.28
53.51
46.43
50.88
60.81
43.66
54.56
Qwen1.5-32B
69.70
51.19
62.17
67.63
52.91
62.78
69.23
58.74
65.54
60.06
56.21
58.63
66.87
54.72
62.45
Mistral-8×7B
70.94
40.50
58.55
66.88
42.06
58.70
67.49
52.86
62.34
57.56
51.65
55.37
65.91
46.66
58.90
DeepseekLLM-67B
69.70
44.17
59.31
63.59
39.15
55.53
69.04
50.25
62.43
57.86
50.11
54.98
65.23
45.96
58.22
Llama2-70B
64.28
41.51
55.01
56.35
40.85
51.24
61.99
43.07
55.33
51.79
41.15
47.84
58.73
41.68
52.52
Llama3-70B
75.72
53.03
66.48
71.45
51.09
64.74
74.78
63.02
70.64
63.77
58.08
61.65
71.65
56.36
66.08
Qwen1.5-72B
72.71
50.69
63.75
69.28
54.12
64.28
71.97
66.73
70.13
63.96
59.62
62.35
69.63
57.75
65.31
Qwen1.5-110B
73.11
53.58
65.16
73.65
54.18
67.23
75.36
70.75
73.74
64.55
65.27
64.82
71.98
60.91
67.95
Mistral-Large-123B
79.43
59.82
71.45
74.21
63.76
70.76
77.98
68.19
74.54
66.92
66.10
66.61
74.84
64.37
71.03
Llama3.1-405B
77.63
58.85
69.99
76.57
57.58
70.31
78.50
69.90
75.47
68.86
64.73
67.33
75.64
62.81
70.96
Closed-source LLM
PaLM-2
70.07
38.98
57.41
63.81
41.91
56.59
65.11
49.43
59.59
60.41
45.96
55.22
64.85
44.01
57.26
Claude-2.1
68.39
44.54
58.68
62.09
50.24
58.18
66.58
52.81
61.74
53.93
50.55
52.67
62.97
49.42
58.04
Claude-3-Opus
77.53
52.25
67.24
72.53
64.12
69.76
75.08
68.69
72.83
64.36
62.80
63.78
72.57
61.75
68.63
GPT-3.5
71.34
39.22
58.27
60.78
42.97
54.91
65.27
52.16
60.66
54.42
39.01
48.69
63.04
43.45
55.91
GPT-4
78.53
59.36
70.73
75.40
59.21
70.06
77.38
67.64
73.95
67.21
64.40
66.16
74.85
62.66
70.41
Claude-3.5-Sonnet
77.16
58.07
69.39
75.13
61.76
70.72
77.92
71.46
75.65
69.55
64.73
67.76
75.13
63.97
71.07
GPT-4o
81.51
57.80
71.86
75.60
58.61
70.00
80.57
71.76
77.47
69.35
68.68
69.10
76.95
64.15
72.29
+
+
+Figure 2: The distribution of knowledge-type and reasoning-type scores across all models.
+
+
+Figure 3: Comparison of representative LLMs' scores across different domains and tasks.
+
+in the field of CS while also posing significant challenges to the best-performing existing models. Subsequently, we conduct a comprehensive analysis of the experimental results from various aspects including Foundation Models, Knowledge & Reasoning, Domains, and Task Formats.
+
+Comparison between Foundation Models. Firstly, the closed-source models Claude3.5/GPT-4o represent the highest standard on CS-Bench, with a proficiency exceeding $70\%$ . Secondly, leading open-source models (Mistral-Large-123B and Llama3.1-405B) have significantly narrowed the gap between open-source and closed-source models. On one hand, both models exhibit a substantial increase in parameters; on the other hand, current closed-source models are tending towards a balance between performance and efficiency, exemplified by GPT-4o-mini and Gemini Flash. Thirdly, newer models demonstrate significant improvements compared to earlier versions. For example,
+
+
Type
Model
Score
Reasoning / Completion Tokens
Knowledge
GPT-4o
76.95
- / 8.67
OpenAI-o1-mini
77.60 (+0.65)
251.0 / 269.06 (×31.03)
OpenAI-o1-preview
83.61 (+6.66)
518.49 / 545.37 (×62.9)
Reasoning
GPT-4o
64.15
- / 56.43
OpenAI-o1-mini
76.12 (+11.97)
500.1 / 546.78 (×9.69)
OpenAI-o1-preview
80.98 (+16.83)
1106.43 / 1198.78 (×21.24)
Overall
GPT-4o
72.29
- / 26.08
OpenAI-o1-mini
77.06 (+4.77)
341.8 / 370.29 (×14.2)
OpenAI-o1-preview
82.65 (+10.36)
732.79 / 783.54 (×30.04)
+
+Figure 4: Comparison between OpenAI-o1 and GPT-4o. Reasoning Tokens refer to tokens used for internal reasoning in OpenAI-o1; Completion Tokens refer to all tokens consumed both internally and in external output. “+” and “×” indicate performance gains and token consumption of OpenAI-o1 over GPT-4o.
+
+
+Figure 5: The relationship between CS-Bench scores and the number of tokens consumed.
+
+among models with scales below 10B, Llama3-8B performs the best, rivaling previous much larger-scale models and even surpassing Llama2-70B, indicating significant potential for compression in model parameters (Delétang et al., 2024). Lastly, while performance variations exist among models of different families at the same scale, models within the same family continue to improve with increasing scale on CS-Bench (see detailed scale analysis in Section 3.4).
+
+Comparison of Knowledge and Reasoning. Overall, all models perform worse on reasoning (average $45.60\%$ ) compared to knowledge scores (average $60.61\%$ ), indicating that reasoning poses a greater challenge to LLMs compared to knowledge. As shown in Figure 2, there is a strong positive correlation between reasoning scores and knowledge scores. However, this correlation is not absolute. For instance, PaLM-2 has a higher knowledge score but a lower reasoning score compared to Claude-2.1, showing PaLM-2's weakness in applying knowledge. Furthermore, more powerful LLMs demonstrate a stronger ability to use knowledge for reasoning compared to weaker LLMs. This is reflected in the much lower reasoning scores of weaker models relative to their knowledge scores. However, as the model's capability increases, the growth in reasoning scores is more pronounced than that of knowledge scores, gradually bridging the gap between knowledge and reasoning abilities.
+
+Comparison between Domains. First, regarding knowledge scores in Table 2 and Figure 3 (a), models generally perform best in DSA and worst in OS, which we attribute mainly to differences in the scale of pretraining data and the varying learning capabilities induced by model size. Second, the demand for reasoning ability varies across different domains, as evidenced by the gap between knowledge and reasoning scores. A notable example is GPT-4o, which shows close knowledge and reasoning scores in OS, while exhibiting extreme differences in DSA, with the highest and lowest scores, respectively. We further explore LLMs' performance in fine-coursed subfields in Appendix E.1 and explore the impact of Code and Math abilities on different CS domains in Section 3.5.
+
+Comparison between Tasks. As shown in Figure 3 (b) and Table 14, given the varying initial random scores, LLMs generally performs best on Assertion questions (average $63.14\%$ across all models), followed by MC questions (average $55.45\%$ ), Open-ended questions (average $49.3\%$ ), and performs worst on FITB questions (average $41.58\%$ ). However, the variation in task format sensitivity is highly pronounced in weaker models, while stronger models can mitigate the disparities caused by different task formats, exhibiting robustness. For instance, Llama2-7B scores only $26.19\%$ on Open-ended reasoning but $60.61\%$ on Assertion reasoning, whereas GPT-4 scores comparably on both Open-ended reasoning $(68.94\%)$ and Assertion reasoning $(67.68\%)$ .
+
+# 3.3 OPENAI-O1 RESULT
+
+Compared to general models' reasoning processes, OpenAI-o1 models think before they answer, forming a long internal chain of thought through reasoning tokens. As shown in Figure 4, OpenAI-o1 significantly improves reasoning performance. While OpenAI-o1-mini nearly matches GPT-4o on knowledge-type questions, it boosts scores by 11.97 points on reasoning problems. Furthermore, OpenAI-o1-preview achieves substantial progress in both knowledge and reasoning questions. However, this performance gain comes at the expense of a high token consumption. For instance,
+
+
+(a)
+
+
+(b)
+Figure 6: (a) The performance of LLMs at different parameter scales. (b) The scale-score fitting curve of Qwen1.5 and Llama2 series. (c) Comparison of models under 0-shot answer-only, 5-shot answer-only, and 5-shot COT settings.
+
+
+(c)
+
+OpenAI-o1-preview consumes an average of nearly 1.2K tokens on reasoning questions, 21.24 times that of GPT-4o. Figure 5 visualizes the relationship between model performance and completion token consumption. For reasoning questions, performance roughly increases logarithmically with the number of tokens, while the gains from token expenditure are lower for knowledge-type questions. We conduct a case study in Appendix E.7, comparing the responses of GPT-4o and OpenAI-o1.
+
+# 3.4 QUALITATIVE ANALYSIS
+
+Relationship between Scores and Model Scales. To investigate how model performance varies with parameter size, we examine several model families and plot the results in Figure 6 (a). Models within the same family consistently improve as parameter size increases, but performance gains diminish with larger models. For instance, the score in Qwen1.5 improves by $16.19\%$ from 0.5B to 7B, by $7.11\%$ from 14B to 72B, and by only $2.66\%$ from 72B to 110B. Figure 6 (b) shows that when the parameter scale grows exponentially, the score increases approximately linearly, indicating a logarithmic scale pattern in the CS field. Given the substantial computational resources required for large-scale models, we aim to establish the relationship between model scales and scores to predict the performance of larger-scale models by fitting smaller-scale model scores. Due to space limitations, the specific design and implementation of the fitting function are provided in Appendix E.2. Overall, we fit the functions of Llama2 and Qwen1.5 series based on models ranging from 7B to 70/72B. We validate the fitting function on Qwen-1.5 110B, where the predicted value $(67.83\%)$ closely matches the actual value $(67.95\%)$ , enabling further predictions for theoretical models, even up to 1000B.
+
+Comparison between Zero-shot, Few-shot and COT Prompt. To investigate the impact of few-shot prompts and chain of thought (COT (Wei et al., 2022)) on model performance, we evaluate model's performance under 5-shot answer-only (AO) and 5-shot COT prompts in Figure 6 (c), where the prompt samples are sampled from the validation set and match the domain of the test questions. Given that model-generated results under 0-shot COT often don't adhere to specific formats, making regular matching difficult, we omit 0-shot COT experiments, similar to C-Eval. Additionally, for Open-ended questions, since the answers include detailed explanations, 5-shot COT is the same as 5-shot AO. For all tested models, the 5-shot prompts show improvement compared to 0-shot, with average increases of $1.47\%$ for 5-shot AO and $2.00\%$ for 5-shot COT, respectively. Moreover, the efficacy of few-shot prompts in bringing improvements appears more pronounced in some robust models such as GPT-3.5 and GPT-4, owing to their superior in-context learning capabilities.
+
+Analysis of Error Types. To delve into the roots of LLMs' failure on CS-Bench and offer pathways toward improvement, we acquire the solution process of model errors under 5-shot COT, and utilize GPT-4 to categorize each error type in MC questions in Figure 7. It should be emphasized that models may cause joint errors, resulting in more than one error type assigned to a single answer. In general, from Llama2-7B all the way to GPT-4, the total number of errors continues to decrease for both knowledge-type and reasoning-type questions. For knowledge-type questions, both single concept errors and concept confusion show a decreasing trend. Initially, some completely wrong concepts transitioning to partially erroneous ones and subsequently being eliminated, thus exhibiting an initial
+
+
+
+
+Figure 7: The proportion of different error types varies by models for multiple-choice questions.
+
+
+Figure 8: The score changes on CS-Bench as LLM's Math/Code score increases. $p$ denotes Pearson correlation coefficient. We obtain the scores on Math/Code datasets from (Alibaba, 2024).
+
+
+Figure 9: The consistency of model performance between CS-Bench and other benchmarks. Model scores from other benchmarks are sourced from their official papers/websites or the OpenLLM Leaderboard.
+
+rise followed by a decline in partial concept errors. For reasoning-type questions, we observe that a significant portion of errors still fall under the category of knowledge-based mistakes. While stronger models have evidently reduced arithmetic reasoning errors for reasoning inaccuracies, there hasn't been much change in logic reasoning errors specific to the CS field. Our analysis highlights that reinforcing CS knowledge concepts is the most direct and effective approach to improving LLMs' performance in the field of CS. Furthermore, significant improvements in CS reasoning performance are challenging to achieve solely by enhancing general reasoning abilities and mathematical reasoning, necessitating CS-specific reinforcement. More details can be found in E.4.
+
+# 3.5 WHAT'S THE RELATIONSHIP BETWEEN CS, MATH, AND CODE ABILITIES OF LLMS?
+
+To explore the relationship between CS proficiency and the mathematical and coding capabilities of models, we investigate (1) the performance of general LLMs across the fields of Math, Code, and CS, and (2) the performance of LLMs specialized in Code and Math within the field of CS.
+
+Exploration on General Models. In Figure 8, we illustrate how the models' performance on CS-Bench varies with increasing scores on the Math datasets (GSM8K (Cobbe et al., 2021), MATH (Hendrycks et al., 2021b)) and Code datasets (HumanEval (Chen et al., 2021), MBPP (Austin et al., 2021)). The overall trend in CS-Bench performance closely aligns with changes in Math and Code scores, as indicated by a Pearson correlation coefficient (Cohen et al., 2009) exceeding 0.9. Besides the general enhancement of diverse competencies that superior models typically bring, we consider this evidence suggests a strong correlation between CS proficiency and skills in Math and Code.
+
+Table 3: The performance of the Math-expert LLMs on CS-Bench (EN). We use blue to emphasize areas where the expert LLMs improve compared to the Chat LLMs.
+
+
Model
Type
DSA
CO
CN
OS
All
Klg
Rng
Klg
Rng
Klg
Rng
Klg
Rng
Klg
Rng
Avg
InternLm2-7B
Chat
59.57
40.92
58.83
37.94
62.65
40.60
50.94
39.29
58.31
39.77
51.56
InternLM-Math-7B (Ying et al., 2024)
Math
60.23
31.56
50.56
38.61
55.93
44.47
47.69
43.85
53.64
39.41
48.45
DeepseekLMM-7B
Chat
56.42
28.94
52.09
32.48
52.43
31.41
41.66
31.98
50.87
31.11
43.67
DeepSeekMath-Instruct-7B (Shao et al., 2024)
Math
63.98
34.82
55.13
39.64
61.26
42.16
45.29
42.69
56.68
39.67
50.49
Llama2-13B
Chat
51.74
35.00
51.81
36.18
53.03
37.99
48.12
32.36
51.31
35.46
45.54
MAammoTH-13B (Yue et al., 2023)
Math
50.84
28.26
46.16
34.61
51.39
30.45
34.94
32.64
46.20
31.32
40.78
Llama2-70B
Chat
64.28
41.51
56.35
40.85
61.99
43.07
51.79
41.15
58.73
41.68
52.52
WizardMath-70B (Luo et al., 2023a)
Math
60.17
28.67
56.41
34.91
58.52
41.51
47.01
42.53
55.77
36.67
48.82
+
+Table 4: The performance of the Code-expert LLMs on CS-Bench (EN).
+
+
Model
Type
DSA
CO
CN
OS
All
Klg
Rng
Klg
Rng
Klg
Rng
Klg
Rng
Klg
Rng
Avg
Llama2-7B
Chat
51.51
32.61
48.89
31.82
46.72
30.75
41.04
26.26
47.15
30.48
41.08
CodeLlama-7B (Rozière et al., 2024)
Code
58.90
36.15
45.46
36.24
52.87
26.23
44.35
25.33
50.36
31.09
43.34
Dolphcoder-7B (Wang et al., 2024c)
Code
50.13
36.47
34.71
34.36
41.78
23.92
40.03
28.35
41.40
30.82
37.54
WizardCoder-7B (Luo et al., 2023b)
Code
47.42
33.58
35.54
37.09
41.17
26.03
40.88
30.60
41.02
31.73
37.63
Llama2-13B
Chat
51.74
35.00
51.81
36.18
53.03
37.99
48.12
32.36
51.31
35.46
45.54
CodeLlama-13B (Rozière et al., 2024)
Code
59.87
34.17
44.96
35.82
51.56
35.83
43.28
34.56
49.84
35.08
44.47
WizardCoder-13B (Luo et al., 2023b)
Code
50.80
32.98
38.69
35.27
43.42
28.34
40.88
34.29
43.27
32.59
39.38
+
+Another piece of evidence is the consistency between CS-Bench and other benchmarks, including non-CS scientific benchmarks (GPQA (Rein et al., 2023)), specialized benchmarks (Tool-use-eval (Alibaba, 2024), T-Eval (Chen et al., 2024), L-eval (An et al., 2023), BBH (Suzgun et al., 2022)), and general benchmarks (Chatbot Arena (Zheng et al., 2023), C-Eval(Huang et al., 2023b)). The results are shown in Figure 9. We observe that CS-Bench and agents, tool usage, and other fields have a low correlation $(\mathrm{P} < 0.8)$ , whereas their correlation with benchmarks involving long texts, multi-step reasoning, and general tasks is moderate $(\mathrm{P} < 0.9)$ . In contrast, the P-values for CS-Bench and benchmarks in mathematics/coding are all above 0.9, reaching as high as 0.96 in MBPP, which strongly supports the assertion that the model's CS capabilities are closely related to its coding and mathematical abilities. Additionally, we find that Chatbot Arena, BBH, and L-eval include subsets related to mathematics and coding, resulting in their correlation with CS-Bench being higher than that of other non-Code/Math benchmarks.
+
+Next, we examine models with inconsistent patterns between CS and Math/Code. In the Math domain, Qwen1.5-7B outperforms Llama2-70B in both GSM8K and MATH, yet in CS-Bench, Llama2-70B surpasses Qwen1.5-7B. In the Code domain, Mixtral- $8\times 7\mathrm{B}$ performs better than Qwen1.5-32B on HumanEval and MBPP, whereas the opposite is observed on CS-Bench. Given the NLP community's sustained focus on the Code and Math domains, some recently released models have been trained on a large amount data in these domains, leading to smaller-scale models outperforming much larger-scale ones (e.g., Qwen1.5-7B surpassing Llama2-70B). However, in the CS domain, due to insufficient attention and training data, even excellent small-scale models struggle to surpass much larger-scale models. This also indicates that CS-Bench has not been overfitted during LLM pretraining, making it a fairer benchmark for measuring model performance differences.
+
+Exploration on Expert Models. We present the results of the Math and Code expert LLMs in Tables 3 and 4. Compared to general Chat LLMs, expert LLMs usually sacrifice other abilities to boost proficiency in Math or Code, which is reflected in the lower overall performance of most expert LLMs. Therefore, we are more concerned with identifying the specific aspects of CS where Math and Code models show improvement. Regarding mathematics, InternLm-Math-7B improves InternLm2-7B's performance in CO, CN, and OS reasoning tasks, while DeepseekMath exhibits significant improvements across all domains. According to (Shao et al., 2024), DeepseekMath effectively maintains general knowledge and reasoning ability during specialization. Conversely, MAammoTH and WizardMath perform poorly due to just fine-tuning on limited mathematical datasets, resulting in a significant decline in general knowledge and reasoning. The score changes in LLMs suggest that OS is most closely linked to mathematics, followed by CO, and lastly DSA and CN.
+
+In terms of Code, many Code models show significant improvements in DSA (especially knowledge) and OS (especially reasoning), such as CodeLlama and Dolphcoder. This indicates that the disciplines
+
+of DSA and OS are more closely related to code, thus enhancing knowledge and reasoning abilities in these directions, while CO and CN have lower relevance, leading to a decrease in scores. Finally, we observe that the enhancement brought about by small-scale expert LLMs compared to larger-scale LLMs is more pronounced (see CodeLlama-7B/13B, WizardCoder-7B/13B). We attribute this to the supplementary need for specific knowledge and reasoning capabilities in small-scale LLMs, whereas large-scale LLMs already encompass a greater breadth of knowledge and stronger reasoning abilities, resulting in diminishing gains from further training in specific domains.
+
+# 4 RELATED WORK
+
+Exploration of LLMs in Computer Science. Given the powerful capabilities of LLMs, recent research has explored their potential applications across various industries and scientific fields, including finance (Zhao et al., 2024), autonomous driving (Huang et al., 2023a; Zhou et al., 2024), robotics (Yuan et al., 2023a; Xiao et al., 2023; Wang et al., 2024a), medicine (Zhou et al., 2023a; Vaid et al., 2024), and chemistry (Guo et al., 2023; Zhang et al., 2024a). Currently, studies exploring LLMs in the field of computer science fall into two main categories. The first category includes broad evaluation benchmarks covering various fields, such as MMLU (Hendrycks et al., 2021a), CMMLU (Li et al., 2024), C-Eval (Huang et al., 2023b), Xiezhi (Gu et al., 2024), and M3KE (Liu et al., 2023a). However, computer science constitutes only a small fraction of these benchmarks, accounting for less than $5\%$ and lacking detailed CS-specific analysis. The second category focuses solely on exploring specific applications of LLMs within computer science, such as network topology (Donadel et al., 2024), cybersecurity (Ferrag et al., 2024; Murtuza, 2024), and software engineering (Marques et al., 2024; Dipongkor, 2024). Nonetheless, there has been a persistent lack of comprehensive evaluation of LLMs' foundational knowledge and reasoning abilities in computer science. To address this gap, we propose CS-Bench and conduct a thorough evaluation of LLMs, providing guidance for understanding and improving their performance in the CS field.
+
+Evaluation of LLMs' Capabilities. Evaluating and understanding the capabilities of LLMs is a major focus within the NLP community. Researchers have extensively explored the capabilities of LLMs including planning (Huang et al., 2024), multilingual processing (Lai et al., 2023; Bang et al., 2023), instruction following (Zhou et al., 2023b; Wang et al., 2023b), cross-domain generalization (Wang et al., 2023a; Song et al., 2023; Wang et al., 2024b) and safety (Mazeika et al., 2024; Diao et al., 2024; Mou et al., 2025). Recently, there has been growing interest in LLMs' abilities in mathematics (Frieder et al., 2023; Collins et al., 2023; Wu et al., 2023; Yuan et al., 2023b; Dong et al., 2024; Liu et al., 2024), code programming (Luo et al., 2023b; Roziere et al., 2024; Wang et al., 2024c; Zhang et al., 2024b; Lin et al., 2024), and logical reasoning (Liu et al., 2023b; Saparov et al., 2023; Xu et al., 2023; Wu et al., 2024). While individual capabilities have been well-studied, research on their integrated application and interrelationships remains sparse. Different from (Dong et al., 2024), which investigates interactions between abilities during the supervised fine-tuning phase, we choose computer science as our research context. Given that computer science inherently integrates coding, mathematics, and reasoning, we utilize CS-Bench in this paper to deeply explore the relationship between LLMs' performance in computer science and their mathematical and coding abilities, aiming to advance cross-capability research and integrated analysis of LLM abilities.
+
+# 5 CONCLUSION
+
+In this work, we introduce CS-Bench, the first benchmark specifically designed to systematically analyze the knowledge and reasoning capabilities of mainstream LLMs in the field of computer science. Our evaluation of over 30 models highlights that even the top-performing GPT-4o/OpenAI-o1 has significant room for improvement in computer science. Further score-scale experiments and error type analyses provide directions for enhancing LLMs in the field. Moreover, our investigation into the relationship between computer science, mathematics, and coding demonstrates their close interconnections and provides valuable insights into LLMs' cross-abilities and applications.
+
+# REFERENCES
+
+Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, et al. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
+Zhipu AI, 2024. URL https://zhipuai.cn/news/95.
+Alibaba. Introducing qwen1.5 — qwen, 2024. URL https://qwenlm.github.io/blog/qwen1.5/.
+Chenxin An, Shansan Gong, Ming Zhong, Xingjian Zhao, Mukai Li, Jun Zhang, Lingpeng Kong, and Xipeng Qiu. L-eval: Instituting standardized evaluation for long context language models. arXiv preprint arXiv:2307.11088, 2023.
+Rohan Anil, Andrew M Dai, Orhan Firat, Melvin Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, et al. Palm 2 technical report. arXiv preprint arXiv:2305.10403, 2023.
+Anthropic. Introducing claude 2.1, 2023. URL https://www.anthropic.com/news/claude-2-1.
+Anthropic. Introducing the next generation of claude, 2024a. URL https://www.anthropic.com/news/claude-3-family.
+Anthropic. Introducing claude 3.5 sonnet, 2024b. URL https://www.anthropic.com/news/claude-3-5-sonnet.
+Jacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, and Charles Sutton. Program synthesis with large language models, 2021.
+Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023.
+Baidu. Wenxinyiyan online, 2023. URL https://yiyan.baidu.com/.
+Yejin Bang, Samuel Cahyawijaya, Nayeon Lee, Wenliang Dai, Dan Su, Bryan Wilie, Holy Lovenia, Ziwei Ji, Tiezheng Yu, Willy Chung, Quyet V. Do, Yan Xu, and Pascale Fung. A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity, 2023.
+Xiao Bi, Deli Chen, Guanting Chen, Shanhuang Chen, Damai Dai, Chengqi Deng, Honghui Ding, Kai Dong, Qiushi Du, Zhe Fu, et al. Deepseek llm: Scaling open-source language models with longtermism. arXiv preprint arXiv:2401.02954, 2024.
+Zheng Cai, Maosong Cao, Haojiong Chen, Kai Chen, Keyu Chen, Xin Chen, Xun Chen, Zehui Chen, Zhi Chen, Pei Chu, et al. Internl m2 technical report. arXiv preprint arXiv:2403.17297, 2024.
+Martin Campbell-Kelly, William F Aspray, Jeffrey R Yost, Honghong Tinn, and Gerardo Con Diaz. Computer: A history of the information machine. Routledge, 2023.
+Yupeng Chang, Xu Wang, Jindong Wang, Yuan Wu, Linyi Yang, Kaijie Zhu, Hao Chen, Xiaoyuan Yi, Cunxiang Wang, Yidong Wang, et al. A survey on evaluation of large language models. ACM Transactions on Intelligent Systems and Technology, 15(3):1-45, 2024.
+Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
+Zehui Chen, Weihua Du, Wenwei Zhang, Kuikun Liu, Jiangning Liu, Miao Zheng, Jingming Zhuo, Songyang Zhang, Dahua Lin, Kai Chen, et al. T-eval: Evaluating the tool utilization capability of large language models step by step. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 9510-9529, 2024.
+
+Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems, 2021.
+Israel Cohen, Yiteng Huang, Jingdong Chen, Jacob Benesty, Jacob Benesty, Jingdong Chen, Yiteng Huang, and Israel Cohen. Pearson correlation coefficient. Noise reduction in speech processing, pp. 1-4, 2009.
+Katherine M. Collins, Albert Q. Jiang, Simon Frieder, Lionel Wong, Miri Zilka, Umang Bhatt, Thomas Lukasiewicz, Yuhuai Wu, Joshua B. Tenenbaum, William Hart, Timothy Gowers, Wenda Li, Adrian Weller, and Mateja Jamnik. Evaluating language models for mathematics through interactions, 2023.
+Grégoire Delétang, Anian Ruoss, Paul-Ambroise Duquenne, Elliot Catt, Tim Genewein, Christopher Mattern, Jordi Grau-Moya, Li Kevin Wenliang, Matthew Aitchison, Laurent Orseau, Marcus Hutter, and Joel Veness. Language modeling is compression, 2024.
+Peter J Denning. Computer science: The discipline. Encyclopedia of computer science, 32(1):9-23, 2000.
+Muxi Diao, Rumei Li, Shiyang Liu, Guogang Liao, Jingang Wang, Xunliang Cai, and Weiran Xu. Seas: Self-evolving adversarial safety optimization for large language models. arXiv preprint arXiv:2408.02632, 2024.
+Atish Kumar Dipongkor. Towards interpreting the behavior of large language models on software engineering tasks. In Proceedings of the 2024 IEEE/ACM 46th International Conference on Software Engineering: Companion Proceedings, pp. 255-257, 2024.
+Denis Donadel, Francesco Marchiori, Luca Pajola, and Mauro Conti. Can llms understand computer networks? towards a virtual system administrator, 2024.
+Guanting Dong, Hongyi Yuan, Keming Lu, Chengpeng Li, Mingfeng Xue, Dayiheng Liu, Wei Wang, Zheng Yuan, Chang Zhou, and Jingren Zhou. How abilities in large language models are affected by supervised fine-tuning data composition, 2024.
+Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. The llama 3 herd of models. arXiv preprint arXiv:2407.21783, 2024.
+Mohamed Amine Ferrag, Fatima Alwahedi, Ammar Battah, Bilel Cherif, Abdechakour Mechri, and Norbert Tihanyi. Generative ai and large language models for cyber security: All insights you need, 2024.
+Simon Frieder, Luca Pinchetti, Alexis Chevalier, Ryan-Rhys Griffiths, Tommaso Salvatori, Thomas Lukasiewicz, Philipp Christian Petersen, and Julius Berner. Mathematical capabilities of chatgpt, 2023.
+Zhouhong Gu, Xiaoxuan Zhu, Haoning Ye, Lin Zhang, Jianchen Wang, Yixin Zhu, Sihang Jiang, Zhuozhi Xiong, Zihan Li, Weijie Wu, Qianyu He, Rui Xu, Wenhao Huang, Jingping Liu, Zili Wang, Shusen Wang, Weiguo Zheng, Hongwei Feng, and Yanghua Xiao. Xiezhi: An ever-updating benchmark for holistic domain knowledge evaluation, 2024.
+Neel Guha, Julian Nyarko, Daniel E. Ho, Christopher Ré, Adam Chilton, Aditya Narayana, Alex Chohlas-Wood, Austin Peters, Brandon Waldon, Daniel N. Rockmore, Diego Zambrano, Dmitry Talisman, Enam Hoque, Faiz Surani, Frank Fagan, Galit Sarfaty, Gregory M. Dickinson, Haggai Porat, Jason Hegland, Jessica Wu, Joe Nudell, Joel Niklaus, John Nay, Jonathan H. Choi, Kevin Tobia, Margaret Hagan, Megan Ma, Michael Livermore, Nikon Rasumov-Rahe, Nils Holzenberger, Noam Kolt, Peter Henderson, Sean Rehaag, Sharad Goel, Shang Gao, Spencer Williams, Sunny Gandhi, Tom Zur, Varun Iyer, and Zehua Li. Legalbench: A collaboratively built benchmark for measuring legal reasoning in large language models, 2023.
+Taicheng Guo, Kehan Guo, Bozhao Nan, Zhenwen Liang, Zhichun Guo, Nitesh V. Chawla, Olaf Wiest, and Xiangliang Zhang. What can large language models do in chemistry? a comprehensive benchmark on eight tasks, 2023.
+
+Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. Proceedings of the International Conference on Learning Representations (ICLR), 2021a.
+Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the math dataset, 2021b.
+Xu Huang, Weiwen Liu, Xiaolong Chen, Xingmei Wang, Hao Wang, Defu Lian, Yasheng Wang, Ruiming Tang, and Enhong Chen. Understanding the planning of llm agents: A survey, 2024.
+Yu Huang, Yue Chen, and Zhu Li. Applications of large scale foundation models for autonomous driving. arXiv preprint arXiv:2311.12144, 2023a.
+Yuzhen Huang, Yuzhuo Bai, Zhihao Zhu, Junlei Zhang, Jinghan Zhang, Tangjun Su, Junteng Liu, Chuancheng Lv, Yikai Zhang, Jiayi Lei, Yao Fu, Maosong Sun, and Junxian He. C-eval: A multi-level multi-discipline chinese evaluation suite for foundation models, 2023b.
+Fred Jelinek, Robert L Mercer, Lalit R Bahl, and James K Baker. Perplexity—a measure of the difficulty of speech recognition tasks. The Journal of the Acoustical Society of America, 62(S1): S63-S63, 1977.
+Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. Mistral 7b. arXiv preprint arXiv:2310.06825, 2023.
+Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. Mixtral of experts. arXiv preprint arXiv:2401.04088, 2024.
+Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention, 2023.
+Viet Dac Lai, Nghia Trung Ngo, Amir Pouran Ben Veyseh, Hieu Man, Franck Dernoncourt, Trung Bui, and Thien Huu Nguyen. Chatgpt beyond english: Towards a comprehensive evaluation of large language models in multilingual learning, 2023.
+Haonan Li, Yixuan Zhang, Fajri Koto, Yifei Yang, Hai Zhao, Yeyun Gong, Nan Duan, and Timothy Baldwin. Cmmlu: Measuring massive multitask language understanding in chinese, 2024.
+Jiayi Lin, Hande Dong, Yutao Xie, and Lei Zhang. Scaling laws behind code understanding model, 2024.
+Chuang Liu, Renren Jin, Yuqi Ren, Linhao Yu, Tianyu Dong, Xiaohan Peng, Shuting Zhang, Jianxiang Peng, Peiyi Zhang, Qingqing Lyu, Xiaowen Su, Qun Liu, and Deyi Xiong. M3ke: A massive multi-level multi-subject knowledge evaluation benchmark for Chinese large language models, 2023a.
+Hanmeng Liu, Ruoxi Ning, Zhiyang Teng, Jian Liu, Qiji Zhou, and Yue Zhang. Evaluating the logical reasoning ability of chatgpt and gpt-4, 2023b.
+Wentao Liu, Hanglei Hu, Jie Zhou, Yuyang Ding, Junsong Li, Jiayi Zeng, Mengliang He, Qin Chen, Bo Jiang, Aimin Zhou, and Liang He. Mathematical language models: A survey, 2024.
+Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct, 2023a.
+Ziyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. Wizardcoder: Empowering code large language models with evol-instruct, 2023b.
+Nuno Marques, Rodrigo Rocha Silva, and Jorge Bernardino. Using chatgpt in software requirements engineering: A comprehensive review. Future Internet, 16(6):180, 2024.
+
+Mantas Mazeika, Long Phan, Xuwang Yin, Andy Zou, Zifan Wang, Norman Mu, Elham Sakahaee, Nathaniel Li, Steven Basart, Bo Li, et al. Harmbench: A standardized evaluation framework for automated red teaming and robust refusal. arXiv preprint arXiv:2402.04249, 2024.
+Meta. Introducing meta llama 3: The most capable openly available llm to date, 2024. URL https://ai.meta.com/blog/meta-llama-3/.
+MistralAI. Large enough -- mistral ai -- frontier ai in your hands, 2024. URL https://mistral.ai/news/mistral-large-2407/.
+Yutao Mou, Shikun Zhang, and Wei Ye. Sg-bench: Evaluating llm safety generalization across diverse tasks and prompt types. Advances in Neural Information Processing Systems, 37:123032-123054, 2025.
+Shariq Murtuza. Sentinels of the stream: Unleashing large language models for dynamic packet classification in software defined networks - position paper, 2024.
+OpenAI. Introducing chatgpt, 2022. URL https://openai.com/index/chatgpt/.
+OpenAI. Hello gpt-4o, 2024a. URL https://openai.com/index/hello-gpt-4o/.
+OpenAI. Openai o1 hub — openai, 2024b. URL https://openai.com/o1/.
+David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R Bowman. Gpqa: A graduate-level google-proof q&a benchmark. arXiv preprint arXiv:2311.12022, 2023.
+Baptiste Rozière, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Romain Sauvestre, Tal Remez, Jérémy Rapin, Artyom Kozhevnikov, Ivan Evtimov, Joanna Bitton, Manish Bhatt, Cristian Canton Ferrer, Aaron Grattafori, Wenhan Xiong, Alexandre Défossez, Jade Copet, Faisal Azhar, Hugo Touvron, Louis Martin, Nicolas Usunier, Thomas Scialom, and Gabriel Synnaeve. Code llama: Open foundation models for code, 2024.
+Abulhair Saparov, Richard Yuanzhe Pang, Vishakh Padmakumar, Nitish Joshi, Seyed Mehran Kazemi, Najoung Kim, and He He. Testing the general deductive reasoning capacity of large language models using ood examples, 2023.
+Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, Y. K. Li, Y. Wu, and Daya Guo. Deepseekmath: Pushing the limits of mathematical reasoning in open language models, 2024.
+Xiaoshuai Song, Keqing He, Pei Wang, Guanting Dong, Yutao Mou, Jingang Wang, Yunsen Xian, Xunliang Cai, and Weiran Xu. Large language models meet open-world intent discovery and recognition: An evaluation of chatgpt, 2023.
+Mirac Suzgun, Nathan Scales, Nathanael Scharli, Sebastian Gehrmann, Yi Tay, Hyung Won Chung, Aakanksha Chowdhery, Quoc V Le, Ed H Chi, Denny Zhou, et al. Challenging big-bench tasks and whether chain-of-thought can solve them. arXiv preprint arXiv:2210.09261, 2022.
+Gemma Team, Thomas Mesnard, Cassidy Hardin, Robert Dadashi, Surya Bhupatiraju, Shreya Pathak, Laurent Sifre, Morgane Riviere, Mihir Sanjay Kale, Juliette Love, et al. Gemma: Open models based on gemini research and technology. arXiv preprint arXiv:2403.08295, 2024.
+THUDM. Chatglm3 series: Open bilingual chat llms, 2023. URL https://github.com/THUDM/ChatGLM3.
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
+Akhil Vaid, Joshua Lampert, Juhee Lee, Ashwin Sawant, Donald Apakama, Ankit Sakuja, Ali Soroush, Denise Lee, Isotta Landi, Nicole Bussola, et al. Generative large language models are autonomous practitioners of evidence-based medicine. arXiv preprint arXiv:2401.02851, 2024.
+
+Jiaqi Wang, Zihao Wu, Yiwei Li, Hanqi Jiang, Peng Shu, Enze Shi, Huawen Hu, Chong Ma, Yiheng Liu, Xuhui Wang, et al. Large language models for robotics: Opportunities, challenges, and perspectives. arXiv preprint arXiv:2401.04334, 2024a.
+Jindong Wang, Xixu Hu, Wenxin Hou, Hao Chen, Runkai Zheng, Yidong Wang, Linyi Yang, Haojun Huang, Wei Ye, Xiubo Geng, Bixin Jiao, Yue Zhang, and Xing Xie. On the robustness of chatgpt: An adversarial and out-of-distribution perspective, 2023a.
+Pei Wang, Keqing He, Yejie Wang, Xiaoshuai Song, Yutao Mou, Jingang Wang, Yunsen Xian, Xunliang Cai, and Weiran Xu. Beyond the known: Investigating llms performance on out-of-domain intent detection, 2024b.
+Shenzhi Wang and Yaowei Zheng. Llama3-8b-chinese-chat (revision 6622a23), 2024. URL https://huggingface.co/shenzhi-wang/Llama3-8B-Chinese-Chat.
+Yejie Wang, Keqing He, Guanting Dong, Pei Wang, Weihao Zeng, Muxi Diao, Yutao Mou, Mengdi Zhang, Jingang Wang, Xunliang Cai, and Weiran Xu. Dolphcoder: Echo-locating code large language models with diverse and multi-objective instruction tuning, 2024c.
+Yufei Wang, Wanjun Zhong, Liangyou Li, Fei Mi, Xingshan Zeng, Wenyong Huang, Lifeng Shang, Xin Jiang, and Qun Liu. Aligning large language models with human: A survey, 2023b.
+Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824-24837, 2022.
+Yiran Wu, Feiran Jia, Shaokun Zhang, Hangyu Li, Erkang Zhu, Yue Wang, Yin Tat Lee, Richard Peng, Qingyun Wu, and Chi Wang. An empirical study on challenging math problem solving with gpt-4, 2023.
+Zhaofeng Wu, Linlu Qiu, Alexis Ross, Ekin Akyurek, Boyuan Chen, Bailin Wang, Najoung Kim, Jacob Andreas, and Yoon Kim. Reasoning or reciting? exploring the capabilities and limitations of language models through counterfactual tasks, 2024.
+Xuan Xiao, Jiahang Liu, Zhipeng Wang, Yanmin Zhou, Yong Qi, Qian Cheng, Bin He, and Shuo Jiang. Robot learning in the era of foundation models: A survey. arXiv preprint arXiv:2311.14379, 2023.
+Fangzhi Xu, Qika Lin, Jiawei Han, Tianzhe Zhao, Jun Liu, and Erik Cambria. Are large language models really good logical reasoners? a comprehensive evaluation and beyond, 2023.
+Aiyuan Yang, Bin Xiao, Bingning Wang, Borong Zhang, Ce Bian, Chao Yin, Chenxu Lv, Da Pan, Dian Wang, Dong Yan, et al. Baichuan 2: Open large-scale language models. arXiv preprint arXiv:2309.10305, 2023.
+Huaiyuan Ying, Shuo Zhang, Linyang Li, Zhejian Zhou, Yunfan Shao, Zhaoye Fei, Yichuan Ma, Jiawei Hong, Kuikun Liu, Ziyi Wang, Yudong Wang, Zijian Wu, Shuaibin Li, Fengzhe Zhou, Hongwei Liu, Songyang Zhang, Wenwei Zhang, Hang Yan, Xipeng Qiu, Jiayu Wang, Kai Chen, and Dahua Lin. Internl m- math: Open math large language models toward verifiable reasoning, 2024.
+Mingze Yuan, Peng Bao, Jiajia Yuan, Yunhao Shen, Zifan Chen, Yi Xie, Jie Zhao, Yang Chen, Li Zhang, Lin Shen, et al. Large language models illuminate a progressive pathway to artificial healthcare assistant: A review. arXiv preprint arXiv:2311.01918, 2023a.
+Zheng Yuan, Hongyi Yuan, Chengpeng Li, Guanting Dong, Keming Lu, Chuanqi Tan, Chang Zhou, and Jingren Zhou. Scaling relationship on learning mathematical reasoning with large language models, 2023b.
+Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. Mammoth: Building math generalist models through hybrid instruction tuning, 2023.
+
+Aohan Zeng, Xiao Liu, Zhengxiao Du, Zihan Wang, Hanyu Lai, Ming Ding, Zhuoyi Yang, Yifan Xu, Wendi Zheng, Xiao Xia, et al. Glm-130b: An open bilingual pre-trained model. arXiv preprint arXiv:2210.02414, 2022.
+Qiang Zhang, Keyang Ding, Tianwen Lyv, Xinda Wang, Qingyu Yin, Yiwen Zhang, Jing Yu, Yuhao Wang, Xiaotong Li, Zhuoyi Xiang, Xiang Zhuang, Zeyuan Wang, Ming Qin, Mengyao Zhang, Jinlu Zhang, Jiyu Cui, Renjun Xu, Hongyang Chen, Xiaohui Fan, Huabin Xing, and Huajun Chen. Scientific large language models: A survey on biological and chemical domains, 2024a.
+Ziyin Zhang, Chaoyu Chen, Bingchang Liu, Cong Liao, Zi Gong, Hang Yu, Jianguo Li, and Rui Wang. Unifying the perspectives of nlp and software engineering: A survey on language models for code, 2024b.
+Huaqin Zhao, Zhengliang Liu, Zihao Wu, Yiwei Li, Tianze Yang, Peng Shu, Shaochen Xu, Haixing Dai, Lin Zhao, Gengchen Mai, et al. Revolutionizing finance with llms: An overview of applications and insights. arXiv preprint arXiv:2401.11641, 2024.
+Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, Yifan Du, Chen Yang, Yushuo Chen, Zhipeng Chen, Jinhao Jiang, Ruiyang Ren, Yifan Li, Xinyu Tang, Zikang Liu, Peiyu Liu, Jian-Yun Nie, and Ji-Rong Wen. A survey of large language models, 2023.
+Lianmin Zheng, Ying Sheng, Wei-Lin Chiang, Hao Zhang, Joseph E Gonzalez, and Ion Stoica. Chatbot arena: Benchmarking llms in the wild with elo ratings. Blog post, May, 2023.
+Hongjian Zhou, Boyang Gu, Xinyu Zou, Yiru Li, Sam S Chen, Peilin Zhou, Junling Liu, Yining Hua, Chengfeng Mao, Xian Wu, et al. A survey of large language models in medicine: Progress, application, and challenge. arXiv preprint arXiv:2311.05112, 2023a.
+Jeffrey Zhou, Tianjian Lu, Swaroop Mishra, Siddhartha Brahma, Sujoy Basu, Yi Luan, Denny Zhou, and Le Hou. Instruction-following evaluation for large language models, 2023b.
+Ziqi Zhou, Jingyue Zhang, Jingyuan Zhang, Boyue Wang, Tianyu Shi, and Alaa Khamis. In-context learning for automated driving scenarios. arXiv preprint arXiv:2405.04135, 2024.
+
+# ACKNOWLEDGEMENTS
+
+This work was partially supported by:
+
+- The State Key Laboratory of Massive Personalized Customization System and Technology (No. H&C-MPC-2023-02-07(Q)).
+- The State Grid Technology Project (5700-202416236A-1-1-ZN) on "Research on Active Semantic Discovery Technology Based on SG-CIM and Its Application in Power Grid Equipment Supply Chain Optimization".
+- China Unicom Software Research Institute under the "Framework Agreement for Seven Model Technology Research and Application Demonstration Projects (Software Development for Government Enterprise Content Generation) from 2024 to 2025" (No. 5500331818).
+- The National Natural Science Foundation of China (NSFC Nos. 62076031 and 62076036).
+- Zhongguancun Academy.
+
+# Appendix
+
+# CONTENTS
+
+1 Introduction 1
+2 CS-Bench 3
+
+2.1 Design Principle 3
+2.2 Data Collection 3
+
+3Experiment 4
+
+3.1 Experimental Setup 4
+3.2 Main Results 4
+3.3 OpenAI-O1 Result 6
+3.4 Qualitative Analysis 7
+3.5 What's the Relationship between CS, Math, and Code abilities of LLMs? 8
+
+4 Related Work 10
+5 Conclusion 10
+A Limitations and Dataset Bias 19
+B Broaden Impact 19
+
+C More Details on CS-Bench 20
+
+C.1 Details of Data Collection and Processing. 20
+C.2 Detailed Design Motivation and Statistics of CS-Bench 20
+C.3 Distribution of Word Lengths 22
+C.4 CS-Bench Examples 22
+
+D More Details on Experiment Setup 26
+
+D.1 Details of Template for Each Task Format 26
+D.2 Details of GPT-4 Scoring 26
+D.3 Details of Inference Implementation 27
+D.4 Details of the Models being Evaluated 27
+
+E More Details on Experiment 31
+
+E.1 Details of Model Performance 31
+E.2 Scale-Score Fitting Function for CS-Bench 33
+E.3 Model performance on CS-Bench across different languages 34
+E.4 Case Study of Error Types 36
+E.5 Analysis from Model Representation 40
+
+E.6 Exploration for Improving CS Performance 41
+E.7 Case Study of OpenAI-o1 42
+
+# A LIMITATIONS AND DATASET BIAS
+
+In this paper, we introduce CS-Bench, providing a comprehensive evaluation of LLMs and exploring the relationships between model capabilities. However, there are still some limitations to this paper.
+
+(1) Coverage Limitations: Although CS-Bench has made significant strides in comprehensiveness of CS evaluations compared to existing work, given the breadth of computer science, our evaluations cannot cover the entire scope of computer science knowledge. Furthermore, our assessment content focuses on university-level content, examining LLM's mastery of basic subjects in computer science, rather than specific computer science-related research scenarios.
+(2) Evaluation Limitations: In the CS-Bench evaluation experiments, we employ GPT-4 scoring to assess generative tasks such as fill-in-the-blank and open-ended tasks. This might lead to certain evaluation thresholds and costs. However, such issues only constitute about $20\%$ of CS-Bench. Additionally, we provide an evaluation scheme that separates comprehension tasks from CS-Bench, allowing for automatic evaluations without the need for GPT-4. We also explore the effect of different scoring models and find that even slightly inferior models produce score rankings consistent with GPT-4, while significantly reducing costs.
+(3) Language Limitations: CS-Bench are primarily focused on Chinese, French, German, and English language environments, ensuring comprehensive and in-depth evaluations in these language environments. However, for other environments, its support and coverage are relatively weak, and further optimization and improvement are needed.
+
+The main biases of CS-Bench can be categorized into two aspects:
+
+(1) Difficulty Level: Overall, the benchmark reflects a university-level difficulty.
+(2) Task Focus: It emphasizes knowledge- and reasoning-based questions rather than specific real-world production scenarios in computer science.
+
+The impact of difficulty on LLM evaluation is: lower difficulty tends to narrow the score differences between models, while higher difficulty amplifies these differences. It is worth noting that although CS-Bench maintains an overall university-level difficulty, the diversity of difficulty across questions remains significant, ranging from simple definitions in data structures to challenging computer network application problems. This is reflected in the model score range of $39.86\%$ to $72.29\%$ , demonstrating CS-Bench's effectiveness in distinguishing LLMs' capabilities in computer science and presenting challenges even for the best-performing models.
+
+Regarding task scenarios, a key motivation for CS-Bench is that "some prior work has explored LLMs in specific applications such as cybersecurity and software engineering." However, as stated in Section 4, there has been a lack of comprehensive evaluations of LLMs' fundamental knowledge and reasoning capabilities in computer science. Besides, considering the extensive research already conducted by the LLM community on coding abilities, we view programming as a separate focus area. Therefore, CS-Bench does not include programming questions but instead focuses on the relationship between CS capabilities and coding abilities.
+
+# B BROADEN IMPACT
+
+Societal Impact. CS-Bench is anticipated to play a significant role in the field of computer science. LLMs, trained and evaluated with the aid of CS-Bench, can enhance the work efficiency of relevant professionals, enabling them to complete computer-related tasks, such as code review, error detection, and algorithm optimization, more quickly and accurately. Although this might result in the disappearance of some repetitive jobs, it could also create new career opportunities. In the realm of education, the CS-Bench dataset can serve as an effective teaching tool, assisting teachers in better explaining complex computer science concepts and techniques, and also enabling students to better understand and master this knowledge through practice. However, we should also be cautious of potential risks associated with CS-Bench, such as exam cheating by students in the CS field, which requires management mechanisms and logging to prevent misuse.
+
+Ethics Statement. We ensure adherence to applicable laws and ethical guidelines during the process of data collection, annotation, and usage, providing adequate compensation to all our crowd
+
+workers. As this benchmark pertains to objective knowledge and reasoning in the field of computer science, the annotation content is not influenced by regional or cultural differences among annotators. Moreover, our dataset does not contain any personally identifiable information or offensive content. The authenticity and accuracy of CS-Bench have been thoroughly verified, providing a reliable basis for evaluating LLMs. CS-Bench is intended solely for academic and research purposes. Any commercial use or other misuse deviating from this purpose is strictly prohibited. We urge all users to respect this provision to maintain the integrity and ethical use of this valuable resource.
+
+# C MORE DETAILS ON CS-BENCH
+
+In C.1, we introduce the details of data collection and processing for CS-Bench. In C.2, we provide a detailed explanation of the design motivation and statistics for CS-Bench. In C.3, we present the distribution of question and answer lengths for each task in CS-Bench. In C.4, we provide a case example for each type under each dimension of CS-Bench.
+
+# C.1 DETAILS OF DATA COLLECTION AND PROCESSING.
+
+Our data mainly comes from three sources: 1. Public channels providing computer science-related questions, such as professional exams and practice tests5. 2. Knowledge-based questions manually extracted and adapted by professionals from various academic-permitted CS-related blog posts6. 3. Questions constructed from non-public teaching materials and exam papers authorized by the author's affiliated institution. For resources sourced from the internet, we manually extract the knowledge points and questions. For physical materials, we use Optical Character Recognition (OCR) to obtain the data. We then ensure the accuracy of the collected data through manual cross-checking. The data collection was carried out by a team of five students with bachelor's degrees in computer science. We provided each person with adequate wages, significantly above the local minimum wage standard. Based on whether the questions require in-depth reasoning and computation, we label each question as either knowledge-type or reasoning-type. Additionally, we tag each instance with domain and task type labels. For English data, we used GPT-4 to translate the Chinese instances into English, French, and German, followed by manual verification.
+
+# C.2 DETAILED DESIGN MOTIVATION AND STATISTICS OF CS-BENCH
+
+We elaborate on the design motivation of CS-Bench and statistics under each dimension as follows.
+
+Evaluation Content. To ensure comprehensive coverage of fundamental and critical areas in computer science, we select the four most foundational and prevalent domains within the field of computer science as the core content of the CS-Bench dataset. These four domains are as follows: Data Structure and Algorithm, investigating data organization and algorithmic efficiency; Computer Organization, focusing on hardware composition and foundational system operation; Computer Network, involving the analysis of network communication and data transmission; Operating System, delving into system resource management and process control. As depicted in Figure 10 (a), these four disciplines exhibit a roughly uniform distribution. Furthermore, we subdivide the disciplines into 26 granular chapters, allowing CS-Bench to furnish more nuanced evaluation outcomes for models and provide comprehensive guidance for model refinement. We summarize these chapters in Table 5.
+
+Task Format. To better simulate the diverse forms of problems encountered in the real world, we introduce assertion, fill-in-the-blank, and open-ended questions in addition to multiple-choice questions. Specifically, multiple-choice and assertion questions correspond to understanding tasks in CS, while fill-in-the-blank and open-ended questions correspond to generation tasks in CS. Although assessing generation tasks using GPT-4 incurs certain costs, it is important to emphasize that this component represents only a minority (fill-in-the-blank: $10.67\%$ , open-ended: $7.81\%$ ), whereas comprehension tasks relying on rule-based scoring constitute the majority (multiple-choice: $61.22\%$ ,
+
+Table 5: Summary of 26 fine-grained subfields of CS-Bench.
+
+
Chapter
Main Content
Subject
Question Number
Overview
Concepts and elements of data structure, Temporal and spatial complexity...
DSA
168
Linear List
Linear tables, Sequential tables and Linked lists...
DSA
276
Stack, Queue,and Array
Shared stack, Circle queue, Arrays,Special matrices...
DSA
352
String
Concept and operation of strings, Pattern matching of strings...
DSA
132
Tree
Binary trees, Traversal of trees ans forests, Huffman tree...
DSA
428
Graph
Concepts of graphs, Traversals of graphs,Application of graphs...
Hardware and performance indicators of computers...
CO
224
Data Representation and Operation
Number system and encoding, Representation and operation of fixed-point nu- mbers and floating-point numbers...
CO
436
Storage System
Main Memory, External Memory, Cache Memory, Virtual Memory...
CO
448
Instruction System
Instruction format, Instruction addressing method, CISC and RISC...
CO
312
Central Processing Unit
Functions of CPU, Instruction execution process, CPU internal bus and data path, CPU hard wiring design and micro programming, Exception and inter-rupt mechanisms, Instruction pipelines, and multiprocessor concepts...
CO
488
Bus
Overview of the bus, Bus arbitration, Bus operation and timing, Bus standards...
CO
268
Input/Output System
I/O interfaces and methods...
CO
312
Overview and Architecture
Concepts, compositions, functions of computer networks, Architecture and reference models of computer networks...
CN
296
Physical Layer
Fundamentals of Communication Theory, Transmission Media and Physical Layer Devices...
CN
328
Data Link Layer
Data frames, Error control, Flow control and Reliable transmission, Media access control, Local and wide area networks, and data link layer devices...
CN
632
Network Layer
Overview of network layer functions, Routing algorithms, IPv4 and IPv6, Routing protocols, IP multicast, Mobile IP, Router...
CN
600
Transport Layer
The services provided by the transport layer, UDP and TCP protocols...
CN
364
Application Layer
Network application model, Domain name system DNS, FTP protocol, World Wide Web, and HTTP...
CN
408
Overview
Concepts of operating systems, Development and classification of operating systems, Operational mechanisms and architecture of operating systems...
OS
332
Processes and Threads
Processes and threads, Scheduling of processors, Synchronization and mutual exclusion of processes, Deadlock issues...
OS
700
Memory Management
Concept of memory management, Concept of virtual memory management, and methods of virtual memory management...
OS
432
File Management
File systems, Organization and management of disks...
OS
332
Input/Output Management
I/O devices and control methods, I/O core subsystem, Buffer management...
OS
368
+
+
+Figure 10: The quantity and proportion of each type in different dimensions on CS-Bench.
+
+
+
+
+
+
+
+assertion: $20.3\%$ . Therefore, if resources are limited, we recommend considering the independent use of understanding tasks from CS-Bench for evaluation purposes.
+
+Knowledge / Reasoning. The design goal of CS-Bench is not only to assess the mastery of knowledge in the field of CS but also to evaluate the model's ability to reason using CS knowledge. Therefore, each dataset is labeled with "knowledge" or "reasoning", corresponding to simple questions requiring knowledge recall and challenging questions necessitating knowledge inference, respectively. As shown in Figure 10 (c), knowledge-based questions account for $63.58\%$ , while reasoning-based questions account for $36.42\%$ .
+
+Language. To assess the ability of LLMs in addressing CS problems in various linguistic environments, and to adapt CS-Bench for the evaluation of a wider range of LLMs, CS-Bench comprises quadrilingual (English, Chinese, French, and German) data, with each language accounting for $25\%$ .
+
+The other data is obtained through translation by GPT-4, followed by manual verification of processed Chinese data.
+
+# C.3 DISTRIBUTION OF WORD LENGTHS
+
+We compute the distributions of word lengths for questions and answers in CS-Bench (English) across various task formats, as illustrated in Figure 11. For Multiple-Choice questions, the question length includes both the question itself and the four options. Since Multiple-Choice and Assertion questions are comprehension tasks, the answers consist of only one character (A/B/C/D or True/False). For generation tasks, Fill-in-the-blank answers are relatively short, with an average word length of approximately 2, whereas Open-ended questions typically yield longer answers as they entail detailed explanatory processes.
+
+
+
+
+Figure 11: Question and answer lengths of each task format in CS-Bench (English).
+
+
+
+
+
+
+
+
+
+
+
+
+
+# C.4 CS-BENCH EXAMPLES
+
+We present samples of knowledge and reasoning types in Table 6, samples from various domains in Table 7, samples of different task formats in Table 8, and samples from different languages in Table 9.
+
+Table 6: Examples of knowledge-type and reasoning-type.
+
+
Type
Example
Knowledge
Question:
+The three fundamental elements of data structure include().
+A: Logical structure, storage structure, operations on data.
+B: Logical structure, algorithm design, program implementation.
+C: Data types, data storage, data manipulation.
+D: Data Definition, Data Implementation, Data Manipulation.
+Answer:
+A
+Analysis:
+None
Reasoning
Question:
+The time complexity of a certain algorithm is O(n2), indicating that the algorithm's().
+A: The problem size is O(n2).
+B: Execution time equals O(n2).
+C: The execution time is directly proportional to O(n2).
+D: The problem size is directly proportional to O(n2).
+Answer:
+C
+Analysis:
+The time complexity is O(n2), which means the time complexity T(n) satisfies
+T(n) ≤ c * n2 (where c is a proportionality constant), that is, T(n) = O(n2). The time complexity T(n) is a function of the problem size n, and the problem size remains n, not n2.
+
+Table 7: Examples of samples in different domains.
+
+
Domain
Example
Data Structure and Algorithm
Question:
+The correct statement about data structures is().
+A: The logical structure of data is independent of its storage structure.
+B: The storage structure of data is independent of its logical structure.
+C: The logical structure of data uniquely determines its storage structure.
+D: The data structure is determined solely by its logical structure and storage structure.
+Answer:
+A
+Analysis:
+The logical structure of data is approached from the perspective of practical problems, using only abstract expressions and is independent of the various choices of data storage methods. The storage structure of data is the mapping of the logical structure on a computer, and it cannot exist independently of the logical structure. Data structure includes three essential elements, all of which are indispensable.
Computer Organization
Question:
+A complete computer system should include().
+A: Arithmetic Logic Unit (ALU), Memory, Control Unit
+B: Peripheral devices and host computer
+C: Host and Application
+D: The accompanying hardware devices and software systems
+Answer:
+D
+Analysis:
+A is a component of the computer host, while B and C only involve parts of the computer system and are both incomplete.
Computer Network
Question:
+The most basic function of computer networks is().
+A: Data Communication
+B: Resource Sharing
+C: Distributed Processing
+D: Information Synthesis Processing
+Answer:
+A
+Analysis:
+The functions of computer networks include: data communication, resource sharing, distributed processing, integrated information processing, load balancing, enhancing reliability, etc. However, the most fundamental function is data communication, which is also the basis for realizing other functions.
Operating System
Question:
+Among the following options, () is not an issue of concern for the operating system.
+A: Manage bare-metal computers
+B: Design and provide an interface between user programs and hardware systems
+C: Manage computer system resources
+D: Compiler for High-Level Programming Languages
+Answer:
+D
+Analysis:
+The operating system manages computer software/hardware resources, expands the bare machine to provide a more powerful extended machine, and acts as an intermediary between the user and the hardware. Clearly, the compiler for high-level programming languages is not a concern of the operating system. The essence of a compiler is a set of program instructions that are stored in the computer.
+
+Table 8: Examples of different task formats.
+
+
Type
Example
Multiple Choice
Question:
+Given that the storage space for a circular queue is the array A[21], with front pointing to the position before the head element and rear pointing to the tail element, assuming the current values of front and rear are 8 and 3, respectively, the length of the queue is ().
+A: 5
+B: 6
+C: 16
+D: 17
+Answer:
+C
+Analysis:
+The length of the queue is (rear - front + maxsize) % maxsize = (rear - front + 21) % 21 = 16. This situation is the same as when front points to the current element and rear points to the next element after the last element in the queue.
Assertion
Question:
+In a directed graph with n vertices, the degree of each vertex can reach up to 2n.
+Answer:
+False.
+Analysis:
+In a directed graph, the degree of a vertex is equal to the sum of its in-degree and outdegree. In a directed graph with n vertices, any given vertex can have at most one pair of oppositely directed edges connecting it with each of the other n-1 vertices.
Fill-in-the-blank
Question:
+In a sequential list of length n, when deleting the ith (1 ≤ i ≤ n) element, () elements need to be moved forward.
+Answer:
+n-i
+Analysis:
+The elements from a[i+1] to a[n] need to be moved forward by one position, involving the movement of n-(i+1)+1=n-i elements.
Open-ended
Question:
+Given that the 9th level of a complete binary tree has 240 nodes, how many nodes does the entire complete binary tree have? How many leaf nodes are there?
+Answer:
+In a complete binary tree, if the 9th level is full, then the number of nodes = 2^(9-1) = 256. However, currently, there are only 240 nodes on the 9th level, indicating that the 9thlevel is not full and is the last level. Levels 1 to 8 are full, so the total number of nodes = 2^8 + 240 = 495. Since the 9th level is the last level, all nodes on the 9th level are leaf nodes. Moreover, the parents of the 240 nodes on the 9th level are on the 8th level, with the number of parents being 120, which means there are 120 branch nodes on the 8th level, and the rest are leaf nodes. Therefore, the number of leaf nodes on the 8th level is 2^(8-1) - 120 = 8. Consequently, the total number of leaf nodes = 8 + 240 = 248.
+Analysis:
+None
+
+Table 9: Examples of different languages.
+
+
Type
Example
English
Question:For a linear list with sequential storage, the operation with a time complexity of O(1) should be ().A: Sort n elements in ascending order.B: Remove the i-th (1 ≤ i ≤ n) element.C: Change the value of the i-th element (1 ≤ i ≤ n).D: Insert a new element after the i-th (1 ≤ i ≤ n) element.Answer:CAnalysis:The time complexity for sorting n elements is at least O(n) (when initially ordered), and typically O(n log2n) or O(n2). Options B and D are clearly incorrect. Sequential lists support random access by index.
Chinese
Question:对于顺序存储的线性表,其算法时间复杂度为O(1)的运算应该是()。A:将n个元素从小到大排序B:删除第i (1 ≤ i ≤ n)个元素C:改变第i (1 ≤ i ≤ n)个元素的值D:在第i (1 ≤ i ≤ n)个元素后插入个新元素Answer:CAnalysis:对n个元素进行排序的时间复杂度最小也要O(n)(初始有序时)通常为O(n log2n)或O(n2)。B和D显然错误。顺序表支持按序号的随机存取方式。
French
Question:Pour une liste linéaire stockée de manière séquentielle, l'opération dont la complexité temporelle algorithmique est O(1) devrait être ().A: Trier n éléments dans l'ordre croissant.B: Supprimer le i-ème (1 ≤ i ≤ n) élément.C: Modifier la valeur du i-ème élément (1 ≤ i ≤ n).D: Insérez un nouvel élément après le i-ème (1 ≤ i ≤ n) élément.Answer:CAnalysis:La complexité temporelle pour trier n éléments est au minimum O(n) (lorsque la liste est initialement ordonnée), généralement O(n log2n) ou O(n2). Les options B et D sont manifestement incorrectes. Une liste séquentiellesupporte l'accès aléatoire par indice.
German
Question:Für sequentiellgespeicherte lineare Listen, welche Operation hat eine algorithmische Zeitkomplexität von O(1)? ().A: Sortiere n Elemente der Höhe nach von klein nach groß.B: Lösche das i-te (1 ≤ i ≤ n) Element.C: Änderen den Wert des i-ten Elements (1 ≤ i ≤ n).D: Füge nach dem i-ten (1 ≤ i ≤ n) Element ein neuen Element ein.Answer:CAnalysis:Die Zeitkomplexität für das Sortieren von n Elementen betragt mindestens O(n) (wenn sie anfänglich sortiert sind) und ist normalerweise O(n log2n) oder O(n2). B und D sind offensichtlich falsch. Eine sequentielle Listeteinstützt den zufälligen Zugriff nach Index.
+
+# D MORE DETAILS ON EXPERIMENT SETUP
+
+In D.1, we present the question templates used to prompt models for each type of task. In D.2, we show the prompts used for GPT-4 to score models' answers to fill-in-the-blank and open-ended questions, and validate the effectiveness of GPT-4's automatic scoring through consistency experiments with human scoring. We also explore the effect of different scoring models. In D.3, we detail the experimental environment used to implement model inference. In D.4, we introduce all the evaluated model families.
+
+# D.1 DETAILS OF TEMPLATE FOR EACH TASK FORMAT
+
+We present the templates for querying LLMs with various question formats in Table 10.
+
+Table 10: Prompt Templates for asking various questions to LLMs.
+
+
Type
Prompt Template
Multiple Choice
This is a multiple-choice question. Please read the question carefully and choose the correct answer. Question: <Question>Which one of the following options is correct? Options:(A) <A>(B) <B>(C) <C>(D) <D>Please provide the answer to this question directly (a single letter):
Assertion
This is a true/false question. Please determine whether the following statement is true or false. Statement: <Question>Please give the answer directly (true or false):
Fill-in-the-blank
You are a professor proficient in computer science. This is a fill-in-the-blank question.Give answers to the following question without explanation or repeating it.Question: <Question>Answer:
Open-ended
This is a subjective Question: <Question>Please provide a brief answer to this question:
+
+# D.2 DETAILS OF GPT-4 SCORING
+
+GPT-4 Scoring Prompt. In Table 13, we present the prompts utilized to instruct GPT-4 in scoring the outputs of LLMs in CS generation tasks, encompassing both FITB and Open-ended questions.
+
+Consistency between GPT-4 Scoring and Manual Scoring. To assess the effectiveness of GPT-4 scoring in evaluating LLM responses, we conduct a consistency experiment between GPT-4 prediction scores and manual scores. For Fill-in-the-blank and Open-ended types, we randomly sample 100 instances from the GPT-4 scoring samples and employ three human annotators to score these predicted results. These three annotators all hold bachelor's degrees in computer science. Their scoring criteria were consistent with the evaluation standards provided to GPT-4 and can be found in Table 13. In Table 11, we report the consistency scores among human annotators (measured by Cronbach's alpha), as well as the consistency scores between the average human annotation scores and GPT-4 scoring (measured by Pearson correlation coefficient). The excellent consistency between human and GPT-4 scores validates the effectiveness of GPT-4 scoring.
+
+Table 11: Consistency between GPT-4 scoring and human scoring.
+
+
Type
Annotation Count
Consistency
Human-GPT4
Human-Human
Fill-in-the-blank
100
0.808
0.9311
Open-ended
100
0.9494
0.9751
+
+Effect of Different Scoring Models To investigate the impact of different models acting as judges, as well as the relationship between the tested model and the judge's capabilities on the robustness of the evaluation process, we first use the Claude family to construct a set of models with varying abilities: Claude3-Haiku $<$ Claude3-Sonnet $<$ Claude3-Opus $<$ Claude3.5-Sonnet (following the official Claude capability ranking (Anthropic, 2024b)). Next, we pair each two models respectively as the judge and the tested model. The results are as shown in Table 12.
+
+Table 12: Performance of tested models under different scoring models.
+
+
Model
Claude3-Jaiku (Judge)
Claude3-Sonnet (Judge)
Claude3-Opus (Judge)
Claude3.5-Sonnet (Judge)
GPT-4 (Judge)
Claude3-Haiku (Test)
64.61
64.56
63.22
62.45
60.69
Claude3-Sonnet (Test)
64.33
63.75
62.13
62.05
60.17
Claude3-Opus (Test)
71.74
71.29
70.46
69.97
68.63
Claude3.5-Sonnet (Test)
73.97
73.46
72.43
72.27
71.01
+
+Firstly, when all Claude models act as judges, their scoring of the tested models aligns consistently with GPT-4. This effectively demonstrates the robustness of the evaluation process, as consistent ranking results are obtained regardless of whether the tested model's performance is inferior or superior to that of the judge model (Claude3-Haiku and Claude3.5-Opus representing the two extremes of judge model capabilities). We believe that as long as a model possesses a certain level of discernment, it can serve as a judge, without needing to outperform all tested models. Even the least capable model, Claude3-Haiku, can yield score rankings consistent with GPT-4 during evaluation, while costing only $0.25 / 1.25 per million tokens for input/output, respectively, significantly reducing evaluation costs. Secondly, we observe that stronger models tend to be more stringent in their scoring. This is reflected in the assessment scores for all tested models, consistently following the order: Claude3-Haiku < Claude3-Sonnet < Claude3-Opus < Claude3.5-Sonnet. We believe this occurs because more capable evaluation models can identify deeper levels of error. Lastly, we find that the models score fairly and do not tend to give themselves disproportionately high scores (as seen when the same model acts as both judge and test model).
+
+# D.3 DETAILS OF INFERENCE IMPLEMENTATION
+
+For all open-source models, we utilize a cluster with 8 NVIDIA A100-80GB GPUs to run the inference, and we use vLLM (Kwon et al., 2023) for inference acceleration, applying the corresponding chat templates and the same hyper-parameters: batch size=1, temperature=0, top-p=1.0, and max_tokens=2048. For all closed-source models with API access, we also adopt the generation scheme with temperature=0, and simply run the inference with CPUs, which typically completes within a day. During the evaluation of GPT-4, we also applied the setting of temperature=0. To avoid error bias, we conducted the experiments 3 times and took the average of the scores. For models supporting web search or tool calls, we disable these features to ensure a fair comparison.
+
+# D.4 DETAILS OF THE MODELS BEING EVALUATED
+
+Gemma (Team et al., 2024) is a family of lightweight, open models from Google, built from the same research and technology used to create the Gemini models. They are text-to-text, decoder-only large language models, available in English, with open weights, pre-trained variants, and instruction-tuned variants. The Gemma model excels on academic benchmarks in language understanding, reasoning, and security. Gemma publishes models in two sizes (2 billion and 7 billion parameters).
+
+Llama2 (Touvron et al., 2023) is an upgraded version of Llama developed by MetaAI. It utilizes more robust data cleaning and mixing techniques, and up-samples sources closest to factual information, which can enhance knowledge and reduce hallucinations. Additionally, it employs Grouped-Query Attention technology to lessen reliance on memory.
+
+Llama3 (Meta, 2024) is the latest generation of large language models developed by MetaAI. The training dataset for Llama 3 is seven times larger than that used for Llama 2, with the amount of code included being four times that of Llama 2. Compared to previous versions of the model, it has seen a tremendous enhancement in reasoning, code generation, and instruction following capabilities.
+
+Table 13: Scoring Prompts for Fill-in-the-blank and Open-ended Questions.
+
+
Type
Prompt Template
Fill-in-the-blank
You are now a teaching assistant. As a TA, your task is to grade the fill-in-the-blank assignments of computer science students.
+You will see the standard answer for each question (these answers are verified and completely correct), and you need to score the students' answers based on this.
+If the student's answer conveys the same meaning as the standard answer or other answers (different formats are also considered correct), then award 1 point; if not, then 0 points.
+Question: <question>
+Standard Answer: <correct_answer>
+Other Answers: <other_answers>
+Student Response: <predict_output>
+Score (0 or 1):
Open-ended
You are now serving as a teaching assistant. In this role, your task is to grade the subjective homework assignments of computer science students. You will be presented with the standard answers for each question (which are verified and completely correct), and you must use these to score the students' responses. The grading scale ranges from 1 to 10 points, with 10 being the highest and 1 being the lowest. When grading, please take into consideration the accuracy, relevance, completeness, and depth of thought of the answers. Scores should be assigned based on the following *criteria*:
+First Tier: 1-3 points
+Accuracy: The answer contains several fundamental errors, showing limited understanding.
+Relevance: The answer has low relevance to the question and standard answer, with most content straying from the requirements. Completeness: The answer omits multiple key points, failing to cover the main aspects of the question.
+Second Tier: 4-6 points
+Accuracy: There are some errors in the answer, although most of the basic concepts are understood correctly.
+Relevance: The answer is generally relevant to the question and standard answer, but some content does not fully conform to the requirements.
+Completeness: The answer is fairly complete, but lacks some important details or certain key points are not fully elaborated.
+Third Tier: 7-8 points
+Accuracy: The answer is almost entirely correct, with only very minor errors.
+Relevance: The answer is highly relevant to the question and standard answer, focused and with almost no deviation from the topic.
+Completeness: The answer is comprehensive and detailed, covering all key aspects very well.
+Fourth Tier: 9-10 points
+Accuracy: The answer is free of any errors, demonstrating a deep understanding and precise grasp of the issue.
+Relevance: The answer is in complete accordance with the requirements, strictly aligned with the question and standard answer, without any deviation.
+Completeness: The answer is structured rigorously, logically organized, and systematically covers all aspects of the question.
+Grading Guide: When assigning a score, please first make a preliminary assessment of accuracy based on the student's answer compared to the standard answer. Then, consider the relevance and completeness to determine the final score. Ensure that each point awarded is based on a fair and justified comprehensive evaluation.
+
+Llama3.1-405B (Dubey et al., 2024) is an auto-regressive language model developed by MetaAI, utilizing an optimized transformer architecture. Trained on over 15 trillion tokens, it demonstrates excellent flexibility, control, and advanced capabilities. Llama3.1-405B is the largest openly available foundation model released by MetaAI.
+
+Llama3-Chinese (Wang & Zheng, 2024) is an instruction-tuned language model for Chinese and English users with various abilities such as roleplaying and tool-using built upon the Meta-Llama-3-8B-Instruct model.
+
+ChatGLM3 (Zeng et al., 2022) is a next-generation conversational pre-trained model jointly released by Zhipu AI and KEG Lab of Tsinghua University. ChatGLM3-6B adopts a newly designed Prompt format, in addition to regular multi-turn dialogue. It also natively supports complex scenarios such as function call, code interpretation.
+
+Baichuan2 (Yang et al., 2023) is a large-scale multilingual model developed by Baichuan Company. It adopts several advanced techniques in its design and training process, including Rotary Position Embedding, a novel position encoding technique, SwiGLU activation function, and memory efficient attention mechanism. Compared with Baichuan1, its performance has been greatly improved.
+
+InternLM2 (Cai et al., 2024) is an open-source large-scale language model developed by Shanghai AI Laboratory. This model has good processing ability for ultra long texts and adopts COOL RLHF technology. It solves human preference conflicts through a conditional reward model and performs multiple rounds of online RLHF to improve the model's alignment ability.
+
+Qwen1.5 (Bai et al., 2023) is a family of language models developed by Alibaba. It has features such as SwiGLU activation, attention QKV bias, group query attention, mixture of sliding window attention and full attention, etc. Qwen 1.5 series models have strong basic capabilities including language understanding.
+
+Mistral-7B (Jiang et al., 2023), a 7-billion-parameter language model designed for superior performance and efficiency, which is developed by Mistral AI. Mistral 7B leverages Packet Query Attention (GQA) for faster inference, combined with Sliding Window Attention (SWA) to efficiently process sequences of arbitrary length while reducing inference costs.
+
+Mixtral-8×7B (Jiang et al., 2024) is a Sparse Mixture of Experts (SMoE) language model developed by Mistral AI. Its architecture is the same as that of the Mistral 7B, except that each layer consists of 8 feedforward blocks (i.e., experts). Mixtral has demonstrated exceptional abilities in math, code generation, and tasks that require multilingual understanding.
+
+Mistral-Large-123B (MistralAI, 2024) is a language model developed by Mistral AI with a 128K context window, supporting dozens of languages including French, German, Spanish, Italian, Russian, Chinese, Japanese, and Korean, as well as over 80 programming languages. It is designed for single-node inference with long-context applications in mind – its size of 123 billion parameters allows it to run at large throughput on a single node.
+
+DeepSeekLLM (Bi et al., 2024) is a family of models released by DeepSeek-AI, and its core architecture borrows from the Llama model. This family of models employs Multi-Head Attention (MHA) and Group Query Attention (GQA) techniques, which significantly enhance their performance and efficiency. Furthermore, DeepSeekLLM demonstrates strong bilingual capabilities in both Chinese and English.
+
+PaLM-2 (Anil et al., 2023) is the higher-performance successor to PaLM released by Google, which differs in terms of dataset mixing. Compared to the first-generation PaLM version, it uses a smaller model but performs more training calculations. It also relies on more diverse pre-training targets.
+
+Claude2 Claude2.1(Anthropic, 2023) and Claude3 (Anthropic, 2024a) are AI models developed by Anthropic, showcasing advanced language understanding and generation capabilities. Utilizing the constitutional AI framework, Claude models are designed to ensure helpfulness and trustworthiness. Claude-3.5-Sonnet (Anthropic, 2024b) is the first product in the Claude-3.5 model series developed by Anthropic. It demonstrates significant improvements in understanding nuance, humor, and complex instructions, and excels at generating high-quality content with a natural, relatable tone. It possesses
+
+exceptional coding capabilities, allowing it to independently write, edit, and execute code, along with advanced reasoning and troubleshooting skills. Additionally, it is Anthropic's most powerful visual model to date.
+
+GPT GPT-3.5 (OpenAI, 2022), GPT-4 (Achiam et al., 2023) and GPT-4o (OpenAI, 2024a), released by OpenAI, are part of the GPT-series models enhanced by a three-stage reinforcement learning with human feedback (RLHF) algorithm. This algorithm not only improves the models' ability to follow instructions but also significantly reduces the generation of harmful or toxic content. Additionally, GPT-4 supports image inputs and achieves human-level performance on various benchmarks. GPT-4o, the latest model developed by OpenAI, boasts powerful real-time reasoning, language interaction, and multimodal capabilities.
+
+OpenAI-o1 (OpenAI, 2024b) is a new large language model developed by OpenAI, trained with reinforcement learning to handle complex reasoning. It can produce a long internal chain of thought before responding to the user, and o1 refines its chain of thought and improves its strategies by learning to recognize and correct mistakes, break down complex steps into simpler ones, and adopt alternative approaches when the current method fails. It currently has two versions: o1-preview, which has strong reasoning capabilities and broad world knowledge, and o1-mini, a lightweight version with faster reasoning speed.
+
+GLM-4 (AI, 2024) is a new generation base large model developed by Zhipu AI. It has strong tool calling and multi-modal capabilities, as well as strong mathematical reasoning ability and code generation ability.
+
+ERNIE (Baidu, 2023) ERNIE3.5 and ERNIE4 are large language models developed by Baidu. ERNIE3.5 is capable of processing text data in multiple languages and has a good understanding and representation ability for entities and relationships in text. Ernie 4 has adopted more advanced knowledge graph information and more advanced knowledge integration technology, further improving the performance of the model.
+
+# E MORE DETAILS ON EXPERIMENT
+
+In E.1, we present detailed performance of the models on CS-Bench (EN), including the leaderboard, task formats, and domains. In E.2, we describe and validate the design of the scale-score fitting function. In E.3, we compare models' performance across different contexts, with a focus on evaluating and analyzing the model's performance on CS-Bench (CN). In E.4, we conduct case studies to better understand the specific details of the models' failures on CS-Bench. In E.5, We further analyze and interpret the relationship phenomena among Code, Math, and CS abilities from internal representations and data characteristics. In E.6, based on our findings, we explore and experiment with several specific approaches to enhance CS capabilities. In E.7, we analyze examples from OpenAI-o1 and compare them with GPT-4o.
+
+# E.1 DETAILS OF MODEL PERFORMANCE
+
+The Leaderboard on CS-Bench. We visualize the results of LLMs on CS-Bench in Figure 12.
+
+
+Figure 12: The leaderboard of LLMs on CS-Bench (EN).
+
+Detailed Performance on Each Task Format. We present models' performance on four types of tasks in Table 14 and visualize the results in Figure 13.
+
+
+Figure 13: Performance of various LLMs for each ability dimension about task formats.
+
+
+
+
+
+Detailed Performance on Each Subfield. In Figure 14, we visualize the models' knowledge and reasoning performance across the four domains of CS-Bench. Subsequently, we focus on the models' performance in 26 fine-grained subfields. Table 15 presents the results of eight representative models.
+
+Table 14: Zero-shot scores $(\%)$ of LLMs across question formats on CS-Bench (EN).
+
+
Model
Multiple-choice
Assertion
Fill-in-the-blank
Open-ended
All
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Random
25.00
25.00
25.00
50.00
50.00
50.00
0.00
0.00
0.00
10.00
10.00
10.00
27.4
24.12
26.20
Open-source LLM (Scale < 10B)
Gemma-2B
46.87
25.85
38.74
52.58
48.48
51.64
34.12
7.55
27.68
49.60
26.02
32.96
46.89
27.59
39.86
Qwen1.5-4B
53.00
35.47
46.22
56.84
58.59
57.24
29.41
11.32
25.02
55.40
28.58
36.47
51.18
35.70
45.54
ChatGLM3-6B
47.51
33.07
41.92
58.97
60.61
59.34
31.76
5.66
25.43
53.80
28.94
36.25
48.63
34.07
43.33
Llama2-7B
47.00
28.06
39.67
56.84
60.61
57.70
23.53
5.66
19.20
63.80
26.19
37.25
47.15
30.48
41.08
DeepseekLLM-7B
50.19
28.06
41.63
60.49
58.59
60.06
31.76
13.21
27.26
59.80
28.67
37.83
50.87
31.11
43.67
Baichuan2-7B
47.51
35.27
42.77
57.14
59.60
57.70
32.94
7.55
26.78
52.40
26.90
34.40
48.29
35.33
43.57
Gemma-7B
56.70
33.07
47.56
58.05
57.58
57.94
38.82
15.09
33.06
58.20
33.36
40.67
54.90
35.02
47.66
Qwen1.5-7B
59.90
40.08
52.23
58.97
56.57
58.42
38.24
16.98
33.08
69.60
35.75
45.71
57.34
40.08
51.05
InternLm2-7B
59.26
39.48
51.61
60.49
55.56
59.36
45.88
15.09
38.41
69.00
39.03
47.84
58.31
39.77
51.56
Mistral-7B
57.34
39.68
50.51
62.61
54.55
60.77
53.53
16.98
44.66
67.40
42.39
49.75
58.63
40.44
52.01
Llama3-8B
61.81
46.09
55.73
64.44
61.62
63.80
38.24
11.32
31.71
67.60
41.33
49.06
59.75
44.97
54.37
Open-source LLM (Scale > 10B)
Llama2-13B
50.06
33.87
43.79
55.93
56.57
56.08
44.71
22.64
39.36
62.00
29.65
39.16
51.31
35.46
45.54
Baichuan-13B
53.00
37.68
47.07
58.66
53.54
57.49
35.88
16.98
31.30
59.80
31.15
39.58
52.53
37.44
47.03
Qwen1.5-14B
64.62
50.70
59.23
62.61
59.60
61.92
51.76
28.30
46.07
70.60
43.45
51.44
62.79
49.18
57.83
InternLm2-20B
62.20
43.69
55.04
61.09
62.63
61.44
51.18
24.53
44.72
67.20
36.02
45.19
60.81
43.66
54.56
Qwen1.5-32B
70.63
57.92
65.71
63.53
62.63
63.32
53.53
22.64
46.04
73.20
48.76
55.95
66.87
54.72
62.45
Mixtral-8×7B
66.28
47.09
58.85
67.78
56.57
65.22
58.24
26.42
50.52
71.00
45.93
53.30
65.91
46.66
58.90
DeepseekLLM-67B
66.92
45.29
58.55
65.96
63.64
65.43
54.71
28.30
48.30
67.20
42.57
49.81
65.23
45.96
58.22
Llama2-70B
58.88
42.28
52.46
61.09
59.60
60.75
51.18
16.98
42.88
63.80
34.96
43.44
58.73
41.68
52.52
Llama3-70B
73.95
57.52
67.59
69.91
63.64
68.48
63.53
37.74
57.27
72.00
53.98
59.28
71.65
56.36
66.08
Qwen1.5-72B
72.03
60.32
67.50
70.52
66.67
69.64
55.29
28.30
48.74
73.00
52.30
58.39
69.63
57.75
65.31
Qwen1.5-110B
74.33
62.73
69.84
73.25
67.68
71.98
57.06
33.96
51.46
75.20
60.00
64.47
71.98
60.91
67.95
Mistral-Large-123B
78.29
66.13
73.58
73.86
66.67
72.22
60.00
41.51
55.52
74.80
65.13
67.97
74.84
64.37
71.03
Llama3.1-405B
79.57
63.93
73.52
72.04
65.66
70.58
65.29
56.60
63.18
70.80
58.58
62.17
75.64
62.81
70.96
Closed-source LLM
PaLM-2
65.91
43.66
57.30
66.36
62.77
65.54
56.52
29.79
50.04
64.47
35.64
44.12
64.85
44.01
57.26
Claude-2.1
63.47
46.89
57.05
66.87
67.68
67.06
49.41
24.53
43.38
72.40
55.84
60.71
62.97
49.42
58.04
Claude-3-Opus
73.82
61.32
68.98
73.56
70.71
72.91
62.94
37.74
56.83
76.73
66.11
69.23
72.57
61.75
68.63
GPT-3.5
63.35
41.48
54.89
68.39
63.64
67.30
48.82
24.53
42.93
68.00
42.65
50.11
63.04
43.45
55.91
GPT-4
77.27
62.32
71.48
75.38
67.68
73.62
61.18
43.40
56.87
77.40
68.94
71.43
74.85
62.66
70.41
Claude-3.5-Sonnet
77.14
64.33
72.18
73.25
64.65
71.28
69.41
58.49
66.76
73.60
64.16
66.94
75.13
63.97
71.07
GPT-4o
80.08
63.73
73.75
75.68
72.73
75.01
64.71
41.51
59.08
75.20
69.47
71.16
76.95
64.15
72.29
Special Reasoning LLM
OpenAI-o1-mini
80.46
77.56
79.34
76.29
75.76
76.17
67.06
71.70
68.19
75.60
72.74
73.58
77.60
76.12
77.06
OpenAI-o1-preview
87.99
83.57
86.28
79.33
77.78
78.98
72.35
73.58
72.65
80.60
76.73
77.87
83.61
80.98
82.65
+
+
+
+
+
+
+
+
+Figure 14: Performance of various LLMs for each ability dimension about CS domains.
+
+
+
+
+
+Firstly, we can observe significant variations in scores across different subfields within the same domains for the models. Taking the DSA domain as an example, Llama2-70B scores range from $45.44\%$ to $76.67\%$ across different chapters (average $56.93\%$ ), while GPT-3.5 scores range from $55.17\%$ to $80.00\%$ (average $60.67\%$ ). Secondly, the performance of different models in the same subfield is generally consistent compared to the average scores. For instance, all models perform above the average scores in the "Overview" and "Stack, Queue, and Array" subfields of DSA but below average in the "Tree" and "Graph" subfields. These detailed scores allow us to understand which content poses greater challenges for the models and provides guidance for improving the models' performance in computer science by strengthening these weaker subfields.
+
+We further observe that although the overall scores of models from the same family increase with scale, not all chapters follow this pattern. As shown in Figure 15, the Llama2 series exhibits a trend
+
+Table 15: Detailed scores of models on fine-grained subfields.
+
+
Content
Llama2-7B
Llama2-13B
Llama2-70B
Mixtral-8×7B
Llama3-8B
Llama3-70B
GPT-3.5
GPT-4
Data Structure and Algorithm
Overview
56.67
51.11
59.44
68.06
73.33
68.06
71.11
74.17
Linear List
34.48
44.83
53.45
58.62
53.45
65.52
55.17
67.24
Stack, Queue, and Array
49.61
50.91
57.40
57.66
58.96
71.95
61.43
76.49
String
76.67
66.67
76.67
66.67
70.00
80.00
80.00
70.00
Tree
32.78
36.33
45.78
47.89
35.67
57.11
40.33
60.56
Graph
43.80
37.47
45.44
65.70
54.56
68.23
56.96
68.61
Searching
51.29
52.00
61.14
60.57
54.86
56.71
58.14
74.86
Sorting
30.52
37.27
56.10
52.08
54.55
71.56
62.21
74.68
Average
46.98
47.07
56.93
59.66
56.92
67.39
60.67
70.83
Computer Organization
Overview
51.20
61.40
61.60
76.40
68.20
80.20
73.20
81.80
Data Representation and Operation
27.95
38.72
38.46
50.51
39.74
50.38
45.64
57.44
Storage System
41.80
46.10
58.00
61.70
53.60
68.10
56.20
68.50
Instruction System
51.76
53.68
57.79
59.56
53.82
75.74
65.29
80.44
Central Processing Unit
41.93
42.66
53.67
54.50
51.65
62.75
51.74
74.86
Bus
60.70
59.12
61.40
66.32
47.37
71.75
66.49
73.33
Input/Output System
37.58
35.48
29.19
52.42
44.03
52.42
35.48
58.23
Average
44.70
48.17
51.44
60.20
51.20
65.91
56.29
70.66
Computer Network
Overview and Architecture
52.15
48.31
58.77
62.77
58.15
68.62
57.23
69.08
Physical Layer
42.11
47.61
52.25
57.89
53.52
65.77
54.51
69.01
Data Link Layer
32.35
41.06
42.35
57.12
50.61
59.62
60.23
63.94
Network Layer
38.40
48.78
58.47
62.37
65.19
75.57
62.98
77.48
Transport Layer
42.95
48.72
66.28
70.77
63.46
81.79
61.54
86.79
Application Layer
47.61
55.00
60.34
65.91
63.30
75.34
64.55
79.89
Average
42.60
48.25
56.41
62.81
59.04
71.12
60.17
74.37
Operating System
Overview
39.74
40.65
48.57
65.32
60.65
69.87
51.82
68.31
Processes and Threads
34.14
42.61
43.57
55.73
50.83
63.57
47.58
66.82
Memory Management
31.63
42.04
52.04
51.02
53.67
60.71
51.02
70.41
File Management
40.00
49.34
57.37
54.87
55.66
61.97
56.32
64.08
Input/Output Management
34.88
36.83
41.46
50.98
47.07
51.10
38.05
59.76
Average
36.08
42.29
48.60
55.58
53.58
61.44
48.96
65.88
Overall
41.08
45.54
52.52
58.90
54.37
66.08
55.91
70.41
+
+
+
+
+Operation
+(b) Computer Organization
+
+(a) Data Structure and Algorithm
+(c) Computer Network
+
+Llama2-7B Llama2-13B Llama2-70B
+
+
+(d) Operating System
+Figure 15: The performance of the Llama2 series models in each subfield.
+
+of scores increasing with scale in most subfields (17 out of 26 subfields); however, there are some exceptions. For instance, Llama2-7B performs exceptionally well in the "string" chapter of DSA, while Llama2-13B excels in the "Data Representation and Operation" chapter of CO, surpassing the performance of Llama2-70B.
+
+# E.2 SCALE-SCORE FITTING FUNCTION FOR CS-BENCH
+
+To enhance CS performance, large-scale models are often utilized; however, these models demand more computational resources for both training and deployment inference. Therefore, it is desirable
+
+
+(a)
+Figure 16: The logarithmic scale-score performance and scale-score fitting curve of Qwen1.5 and Llama2 series.
+
+
+(b)
+
+to establish a relationship between model scale and CS performance, enabling the prediction of theoretically larger models' scores on CS-Bench based on the performance of smaller-scale models. The established fitting function should adhere to the following criteria:
+
+1. The score should monotonically increase with the increase in model scale, approaching 0 as the scale approaches 0, and approaching 1 (100%) as the scale approaches infinity.
+2. As illustrated in Figure 16 (a), when the model scale varies exponentially, the score should exhibit an approximately linear trend.
+3. Due to variations in performance and change slopes among different model families at the same scale, the fitting function needs to incorporate model-family-specific hyperparameters.
+
+Guided by these criteria, we experiment with various functions and find the following function to satisfy the conditions and work best:
+
+$$
+\operatorname {S c o r e} = 1 - \frac {1}{\theta_ {1} \log_ {1 0} \left(\theta_ {2} \cdot \operatorname {S c a l e} + 1\right) + 1} \tag {1}
+$$
+
+Where $\theta_{1}$ and $\theta_{2}$ are hyperparameters specific to the model family. To validate the effectiveness of the function, we estimate hyperparameters based on the minimum mean square error on small-scale models and predict performance scores on larger-scale models. For the Qwen1.5 family, we use models of 7, 14, 32, and 72B to predict the 110B model's performance. For the Llama2 series, we predict the 70B model's performance based on 7B and 13B. As depicted in Figure 16 (b), for Qwen1.5 110B, the predicted score $(67.83\%)$ closely matches the true value $(67.95\%)$ . For Llama2-70B, with only two reference data points, the predicted score $(55.08\%)$ deviates from the true value $(52.52\%)$ by only $2.56\%$ .
+
+# E.3 MODEL PERFORMANCE ON CS-BENCH ACROSS DIFFERENT LANGUAGE
+
+We first compare the performance of multilingual models in different languages within CSBench, as shown in Figure 17. It is observed that the Llama2 and Llama3 series show a significant decline in performance for languages other than English, such as Llama3-8B. In contrast, GPT-4o maintains a good balance across multiple languages. Next, we select the Chinese model as a case outside of English, conducting in-depth tests on Chinese-oriented models and comparing their performance differences between Chinese and English.
+
+Performance on CS-Bench (CN). We assess models that support Chinese on CS-Bench (CN). The foundation models include the LLama3 and GPT-4 series, which are not specifically optimized for Chinese, as well as Chinese-oriented open-source models, including ChatGLM, Baichuan2, InternLm2, Qwen1.5 and llama3-chinese series. We also evaluate Chinese-oriented closed-source models, including GLM-4 and ERNIE-3.5/4. Details of these models are provided in Appendix D.4.
+
+
+Figure 17: Comparison of models in different languages on CS-Bench. Due to the Llama2 series not supporting Chinese, we ignore their results in CS-Bench (CN).
+
+Table 16: Zero-shot scores (\%) of LLMs across domains on CS-Bench (CN), where "Klg" represents knowledge-type, "Rng" represents reasoning-type, and "Avg" represents Average.
+
+
Model
Data Struc & Algo
Computer Organization
Computer Network
Operating System
Overall
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Random
28.04
24.63
26.65
26.57
25.24
26.13
26.34
22.49
24.98
29.06
24.23
27.27
27.4
24.12
26.20
Open-source LLM (Scale < 10B)
ChatGLM3-6B
41.74
32.48
37.97
44.07
34.91
41.05
49.02
32.31
43.14
43.02
32.86
35.98
44.67
33.09
40.45
Baichuan2-7B
42.04
31.51
37.75
44.93
37.88
42.61
50.74
31.11
43.83
42.18
34.07
39.16
45.27
33.47
40.97
InternLm2-7B
41.97
34.54
38.95
55.77
38.67
50.13
60.05
41.86
53.65
50.94
44.07
48.39
52.71
39.61
47.94
Qwen1.5-7B
49.13
37.71
44.48
60.86
44.48
55.46
60.90
45.68
55.54
58.38
48.24
54.61
57.62
43.79
52.59
Llama3-8B
50.47
29.68
42.01
50.81
36.30
46.03
56.09
42.21
51.21
52.01
38.85
47.12
52.46
36.61
46.69
Llama3-8B-Chinese
49.20
33.72
42.90
54.99
33.09
47.77
58.77
48.59
55.19
55.58
41.10
50.20
54.84
39.17
49.13
Open-source LLM (Scale > 10B)
Baichuan2-13B
48.83
34.68
43.07
54.18
36.00
48.18
55.11
39.85
49.74
49.19
40.27
45.88
52.10
37.63
46.83
Qwen1.5-14B
51.47
48.81
50.39
64.43
46.85
58.63
68.69
55.18
63.94
69.58
56.59
64.76
63.78
51.81
59.42
InternLm2-20B
51.97
38.03
46.30
58.36
45.76
54.20
60.60
50.50
57.05
58.70
45.66
53.86
57.59
44.85
52.95
Qwen1.5-32B
55.89
56.70
56.22
67.74
60.00
65.19
70.33
66.83
69.10
72.40
62.03
68.55
66.77
61.35
64.80
Llama3-70B
53.28
55.41
54.15
67.97
49.58
61.91
71.07
61.81
67.81
65.29
57.36
62.35
64.86
56.18
61.70
Qwen1.5-72B
58.16
52.02
55.66
70.28
52.91
64.55
75.25
66.23
72.08
74.12
63.19
70.06
69.73
58.52
65.64
Closed-source LLM
GPT-3
54.15
39.63
48.24
60.86
43.27
55.06
64.29
48.89
58.87
56.36
39.84
50.22
59.27
42.96
53.33
GPT-4
60.03
60.28
60.13
77.60
60.24
71.88
73.50
72.86
73.27
71.46
65.60
69.29
71.06
64.80
68.78
GPT-4o
61.67
66.45
63.62
78.86
55.32
71.10
78.61
74.17
77.05
72.66
69.94
71.67
73.46
66.69
71.00
GLM-4
58.12
58.37
58.22
74.03
59.49
69.24
71.65
70.21
71.14
73.31
67.14
71.06
69.55
63.75
67.44
ERNIE-3.5
58.16
55.62
57.13
74.56
58.73
69.34
74.68
65.16
71.33
72.13
63.37
68.94
70.28
60.63
66.77
ERNIE-4
57.92
62.33
59.72
78.24
64.18
73.60
76.27
69.74
73.97
75.84
69.54
73.54
72.49
66.36
70.26
+
+Table 17: Zero-shot scores $(\%)$ of LLMs across task formats on CS-Bench (CN).
+
+
Model
Multiple-choice
Assertion
Fill-in-the-blank
Open-ended
Overall
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Klg
Rng
Avg
Random
25.00
25.00
25.00
50.00
50.00
50.00
0.00
0.00
0.00
10.00
10.00
10.00
27.4
24.12
26.20
Open-source LLM (Scale < 10B)
ChatGLM3-6B
45.21
34.07
40.90
54.41
48.48
53.05
23.53
11.32
20.57
43.80
25.22
30.68
44.67
33.09
40.45
Baichuan2-7B
44.96
32.26
40.05
53.80
56.57
54.43
29.41
13.21
25.48
47.20
27.52
33.31
45.27
33.47
40.97
InternLm2-7B
51.09
40.08
46.83
59.88
55.56
58.89
44.12
18.87
38.00
60.80
33.27
41.37
52.71
39.61
47.94
Qwenl.5-7B
59.64
48.50
55.33
60.79
50.51
58.44
42.35
15.09
35.74
58.20
30.35
38.54
57.62
43.79
52.59
Llama3-8B
53.26
35.67
46.45
56.23
59.60
57.00
42.35
16.98
36.20
49.60
29.47
35.39
52.46
36.61
46.69
Llama3-8B-Chinese
55.43
40.08
49.49
59.57
56.57
58.88
42.94
16.98
36.64
55.60
30.62
37.97
54.84
39.17
49.13
Open-source LLM (Scale > 10B)
Baichuan2-13B
52.11
39.48
47.22
59.57
51.52
57.73
40.00
16.98
34.42
43.40
27.08
31.88
52.10
37.63
46.83
Qwenl.5-14B
67.82
57.72
63.91
65.05
56.57
63.11
43.53
24.53
38.92
63.80
34.96
43.44
63.78
51.81
59.42
InternLm2-20B
58.49
46.89
54.00
59.57
54.55
58.42
47.06
26.42
42.05
67.00
35.40
44.69
57.59
44.85
52.95
Qwenl.5-32B
71.26
68.74
70.28
64.74
63.64
64.49
51.76
28.30
46.07
63.40
42.04
48.32
66.77
61.35
64.80
Llama3-70B
66.03
60.32
63.82
66.57
65.66
66.36
58.24
33.96
52.35
59.00
40.71
46.09
64.86
56.18
61.70
Qwenl.5-72B
72.41
67.74
70.60
72.34
55.56
68.51
54.71
28.30
48.30
63.80
34.96
43.44
69.73
58.52
65.64
Closed-source LLM
GPT-3
57.98
42.48
51.98
65.05
61.62
64.27
54.71
24.53
47.39
56.60
36.81
42.63
59.27
42.96
53.33
GPT-4
73.31
67.13
70.92
72.04
67.68
71.04
62.35
60.38
61.87
60.40
54.16
56.00
71.06
64.80
68.78
GPT-4o
75.92
69.33
73.37
73.86
68.69
72.68
62.94
50.94
60.03
70.20
62.92
65.06
73.46
66.69
71.00
GLM-4
73.68
69.76
72.16
68.09
57.58
65.69
55.03
47.17
53.12
68.00
52.92
57.36
69.55
63.75
67.44
ERNIE-3.5
72.24
63.71
68.94
69.30
61.62
67.55
63.91
50.94
60.76
70.40
51.95
57.38
70.28
60.63
66.77
ERNIE-4
73.55
70.35
72.31
72.34
56.57
68.74
70.00
67.92
69.50
68.40
58.32
61.28
72.49
66.36
70.26
+
+
+Figure 18: Comparison of models in English and Chinese on CS-Bench.
+
+As shown in Table 16 and Table 17, the scores of these models on CS-Bench(CN) range from $40.45\%$ to $70.26\%$ . Despite not being specifically optimized for Chinese, GPT-4o still achieves the best performance. Among the Chinese-oriented models, ERNIE-4 outperforms GPT-4, achieving performance close to GPT-4o. Additionally, ERNIE-3.5 and GLM-4 score similarly, slightly lower than GPT-4's performance in Chinese. Notably, Llama3-8B-chinese surpasses Llama3-8B by $2.44\%$ , highlighting the importance of adapting models to specific languages. We further compare the performance of the models on CS-Bench(EN) and CS-Bench(CN) in Figure 18. Compared to English, the GPT and Llama3 series, which are not optimized for Chinese, perform worse on Chinese context. For instance, Llama3-8B experiences a decrease of $7.68\%$ on Chinese, and Llama3-70B drops by $4.38\%$ . Although some Chinese-oriented models also show slight decreases in performance in the Chinese context, such as InterLm2-20B, the decline is much less significant than that of the Llama3 series. Moreover, the Qwen1.5 series even demonstrates improved performance on Chinese tasks. Finally, we observe that larger models within the same family are less affected by different languages, as reflected in Baichuan2-7/13B, Internlm2-7/20B, and Llama3-8/70B.
+
+# E.4 CASE STUDY OF ERROR TYPES
+
+We first introduce the error types of knowledge-type questions and reasoning-type questions in Table 18 and Table 19. To facilitate a better understanding of each error type, we provide examples of each error type made by GPT-3.5 in knowledge-based and reasoning-based questions in Table20 and 21, respectively. Additionally, Table 22 presents several examples that contain multiple error types.
+
+Table 18: Error types for knowledge-type questions.
+
+
Error Type
Explanation
Complete conceptual error
For a certain piece of knowledge or concept, the model is completely unaware of it or has misunderstood all of it.
Partial conceptual error
For a certain piece of knowledge or concept, the model has only grasped part of it or has misunderstood part of its content.
Conceptual confusion
For multiple pieces of knowledge or concepts, the model has incorrectly matched their names with their attributes.
+
+Table 19: Error types for reasoning-type questions.
+
+
Error Type
Explanation
Concept-related error
The model misunderstands certain pieces of knowledge, causing incorrect answers, This includes the three types of knowledge-based errors mentioned above.
Logical reasoning error
The model made logical reasoning errors when answering computer science-related questions.
Mathematical reasoning error
During the response process, errors in numerical calculations, symbolic calculations, and other computational processes caused the model to produce incorrect answers.
+
+Table 20: Example of knowledge-type question error types. We use red to mark errors in the output and blue to indicate the reasons for the errors.
+
+
Error Type
Example
Complete conceptual error
Question:
+When two sequential stacks share the same one-dimensional array space, how are their stack bottoms and stack tops set?
+A: Two stacks with the same bottom end, extending in opposite directions from the top.
+B: Two stacks with tops at the same end and bottoms extending in opposite directions.
+C: The bottom and top of the stack are at the same end.
+D: Two stacks with bottoms at opposite ends and tops extending towards the middle.
+Answer:
+D
+Wrong Output:
+When two sequential stacks share the same one-dimensional array space, their stack bottoms and stack tops are set as follows: Two stacks with tops at the same end and bottom-
+ons extending in opposite directions. This means that the top of one stack and the bottom
+of the other stack are at the same end of the array, while their bottoms extend in opposite
+directions. This allows for efficient utilization of the array space for both stacks. The
+correct answer is (B). Answer: (B) Two stacks with tops at the same end and bottom
+extending in opposite directions.
+Error Details:
+In GPT-3.5's response, it was mentioned that the top of two stacks are at the same end,
+while the bottom of the stack extends in opposite directions. This reflects that GPT-3.5 is
+completely not familiar with the implementation of shared stacks.
Partial conceptual error
Question:
+What are the main functions of the network layer?
+A: Data Transparent Transmission
+B: Power Management
+C: Signal Amplification
+D: Data Compression
+Answer:
+A
+Wrong Output:
+The main functions of the network layer are data transparent transmission and data
+compression. The network layer is responsible for routing and forwarding data packets
+between different networks, ensuring that data is delivered to the correct destination. It
+does not handle power management or signal amplification. The correct answers are A
+and D.
+Error Details:
+GPT-3.5 correctly answered that transparent data transmission is a function of the network
+layer, but at the same time incorrectly pointed out that data compression is the main
+function of the network layer, witch indicating an incorrect understanding of certain
+aspects of network layer functionality.
Conceptual confusion
Question:
+What are the basic steps of simple selection sort?
+A: Select the element with the smallest key from the elements to be sorted and swap it
+with the first element. B: Insert elements into the sorted sequence in order.
+C: Compare adjacent elements in sequence and swap them.
+D: Use the divide and conquer method to sort elements.
+Answer:
+D
+Wrong Output:
+The basic steps of simple selection sort are: (A) Select the element with the smallest key
+from the elements to be sorted and swap it with the first element. (C) Compare adjacent
+elements in sequence and swap them. The correct answer is A and C.
+Error Details:
+The answers output by GPT-3.5 are A and C, and it is claimed that the basic steps of
+simple selection sorting are to select the smallest element and exchange it with the first
+element, and to compare adjacent elements and exchange them. This is obviously
+incorrect because comparing adjacent elements and swapping them is a Bubble Sort This
+indicates that GPT confuses bubble sorting and selection sorting.
+
+Table 21: Example of reasoning-type question error types.
+
+
Error Type
Example
Concept-related error
Question:
+In the topological ordering of the directed graph G, if vertex Vi precedes vertex Vj, then the following situation cannot occur:()
+A: G contains an arc<Vi,Vj>.
+B: There is a path from Vi to Vj in G.
+C: There is no arc<Vi,Vj> in G.
+D: There is a path from Vj to Vi in G.
+Answer: D
+Wrong Output:
+If vertex Vi precedes vertex Vj in the topological ordering of the directed graph G, then it means that there is a directed path from Vi to Vj in G. Therefore, the si- tuation where there is no arc<Vi,Vj> in G cannot occur. The correct answer is (C) There is no arc<Vi,Vj> in G.
+Error Details:
+The sequence obtained by topological sorting has i before j. GPT-3.5 chose C in the answer, but according to the topological sorting rule, placing i before j does not necessarily indicate that two nodes can be directly connected. GPT-3.5 does not understand the meaning of topological sorting.
Logical reasoning error
Question:
+In the array representation of a linear list with n elements, the operations with a time complexity of O(1) are () I. Accessing the ith (1 ≤ i ≤ n) node and finding the immediate predecessor of the ith (2 ≤ i ≤ n) node. II. Inserting a new node after the last node. III. Deleting the first node. IV. Sequentially outputting the values of these n elements.
+A:I
+B: II, III
+C: I, II
+D: I, II, III
+Answer: C
+Wrong Output:
+The operations with a time complexity of O(1) in the array representation of a linear list with n elements are: I. Accessing the ith (1 ≤ i ≤ n) node and finding the immediate predecessor of the ith(2 ≤ i ≤ n) node. II. Inserting a new node after the last node. III. Deleting the first node. Therefore, the correct answer is (D) I, II, III. Answer: D
+Error Details:
+For item II in the question, after deleting the first element of the array, the next n-1 elements need to be moved forward, resulting in a time complexity of o(n). However, GPT-3.5 considers it to be o(1), which is a GPT-3.5 inference error.
Mathematical reasoning error
Question:
+In a computer with an 8-bit adder, the machine numbers of signed integers X and y are represented in two's complement, with [x] complement = F5H and [y] complement = 7EH. If the calculation X - y is performed in this adder,the carry-in information for the lower bit and the overflow flag OF after the operation are respectively ().
+A: 1,1 B: 1,0 C: 0,1 D: 0,0
+Answer: C
+Wrong Output:
+First, let's find the two's complement of y. The two's complement of a number is obtained by inverting all the bits and adding 1. [y] complement = 7EH Inverting all the bits: 10000001. Adding 1: 10000010. Now, we can perform the subtraction X - y using the 8-bit adder. [X] complement = F5H [y] complement = 10000010. Adding X and the two's complement of y: 11110101 + 10000010 = 101101111. The result is 10110111, which is the two's complement representation of the result of X - y. To determine the carry-in information for the lower bit, we need to look at the carry-out from the lower bit. In this case, the carry-out is 1, so the carry-in for the lower bit is also 1. To determine the overflow flag (OF), we need to compare the carry-in and carry-out from the sign bit. In this case, the carry-in and carry-out from the sign bit are both 0, so the overflow flag is 0.
+Error Details:
+The complement of x and (-y) is calculated incorrectly.
Question:
+Given that the system uses a 32-bit physical address and a 48-bit virtual address, with a page size of 4KB and a page table entry size of 8B. Assuming the system employs pure paging, it will use a (-)level page table, and the page offset is () bits.
+A: 3, 12
+B: 3, 14
+C: 3, 12
+D: 4, 14
+Answer:
+C
+Wrong Output:
+To determine the number of levels in the page table, we need to calculate the number of bits required to represent the virtual address space. The virtual address space is 48 bits, and the page size is 4KB, which is equivalent to 212 bytes. Therefore, the num-ber of pages in the virtual address space is 248 / 212 = 236 pages. Since each page table entry is 8 bytes, we can calculate the number of entries in each level of the page table. At the first level, there are 236 entries, which can be represented by 36 bits. At the second level, each entry points to a page table at the next level, so there are 236 entries. At the third level, each entry points to a page table at the next level, so there are 236 entries. Therefore, we need 3 levels of page tables. The page offset is the number of bits required to represent the offset within a page. Since the page size is 4KB, which is equivalent to 212 bytes, the page offset is 12 bits. Therefore, the correct answer is (A) 3, 12.
+Error Details:
+The number of page table items that can be accommodated on each page is 4KB/8B = 512=29, while GPT-3.5 did not mention calculations and directly stated that the first level page table has 236 items; According to the GPT-3.5 calculation, if there are 236 items in the first level page table, there should be a 36/36=first level page table instead of a third level page table, resulting in a mathematical inference error. From the process of calculating the number of page table levels in GPT-3.5, it can be seen that its logical reasoning path is not correct.
Complete conceptual error & Conceptual confusion
Question:
+The following network connecting devices that operate at the data link layer are()
+A: Repeaters and Hubs
+B: Hubs and Bridges
+C: Network bridges and local area network switches
+D: Hubs and Local Area Network (LAN) Switches
+Answer:
+C
+Wrong Output:
+The correct answer is (D) Hubs and Local Area Network (LAN) Switches. Repeaters operate at the physical layer, while hubs and bridges operate at the data link layer. Local Area Network (LAN) switches also operate at the data link layer. Therefore, the correct combination of network connecting devices that operate at the data link layer is hubs and LAN switches.
+Error Details:
+GPT-3.5 is unaware that the bridge is a network link device operating at the data link layer, indicating a lack of knowledge about the bridge. Meanwhile, GPT-3.5 believes that the Hub is a device at the data link layer, indicating that it confuses physical layer devices with data link layer devices.
+
+# E.5 ANALYSIS FROM MODEL REPRESENTATION
+
+
+Figure 19: Representation Visualization of General and Expert Models.
+
+
+
+
+
+
+
+To analyze the reasons behind capability correlations, we first explore the relationships between different abilities of general models at the representation level. We extract the last hidden layer of Llama3-8B-instruct and obtain representations for different domains through average pooling. We then calculate the average cosine distance between CS-Bench reasoning-type representations and other data representations, where smaller distances indicate greater similarity.
+
+As shown in Table 23, We find that the similarity of representations between different abilities/domains generally aligns with the observed capability correlations, especially in the areas of code and math. This explains the correlation between CS skills and math and coding abilities at the representation level. Additionally, due to BBH containing various reasoning data, the distance between CS-Bench and BBH is relatively small, which is consistent with the analysis in Section 3.5.
+
+Table 23: Representation Distance between CS-Bench and Different Datasets.
+
+
Dataset
Domain
Distance
MBPP
code
0.4645
MATH
math
0.5395
BBH
reasoning
0.5494
T-Eval
tool
0.6310
Chatbot Arena (first turn)
chat
0.5555
GPQA
science
0.5775
L-eval
long context
0.6409
+
+Next, we analyze from the perspective of training data characteristics. We intuitively find that some questions in CS-Bench can be understood as mathematical problems in a computer science context, while the main role of code is to supplement the model's knowledge of data structures and logical reasoning abilities. This data-level correlation explains the expert model experimental results in Table 3 and 4, specifically why math and code expert models help improve CS capabilities in certain areas, even when their general abilities are weakened. For example: Q1: If the data part is 3800B and the maximum fragment size is 1420B, what is the total length in bytes of the third fragment? and Q2: The height h of a binary tree with 1025 nodes is().
+
+Finally, we analyze the relationship between general models and math & code expert models in computer science representations. We select the chat model Llama2-7B-Chat, math expert model MAmmoTH, and code expert model CodeLlama, all based on Llama2-7B-base, to observe their average cosine distances for the same data points in CS-Bench.
+
+Table 24: Representation Distance of Different Models on CS-Bench.
+
+
Model pair
Distance
between Chat and Math model
0.4645
between Chat and Code model
0.5395
between Math and Code model
0.5494
+
+Table 24 show that expert models' representations shift to some extent compared to the Chat model, especially the Code model, which can be attributed to Code's unique data patterns. Further representation visualization in Figure 19 reveals that in the general dataset Chatbot-arena, the features of the three models do not significantly separate. However, in MATH and CS-Bench datasets, the Code model forms a distinct feature cluster, while Math and Chat models' representations remain similar, as we state before: many questions in CS can be viewed as mathematical problems in a CS context. Lastly, in the MBPP dataset, the representations of the three models clearly differentiate and form their own clusters.
+
+# E.6 EXPLORATION FOR IMPROVING CS PERFORMANCE
+
+Although the specific methods to enhance LLM performance in CS are not the primary focus of this paper, we are eager to explore potential solutions based on our findings. These include capability transfer, inference frameworks, integrating external knowledge sources, incorporating symbolic reasoning systems, and targeted fine-tuning.
+
+Capability Transfer. The capability analysis experiments in Section 3.5 demonstrate that math and code expert models can improve CS performance in certain areas. Therefore, in scenarios where CS data is scarce, training on math or code tasks can be leveraged to transfer and enhance CS capabilities.
+
+Inference Frameworks. The experiments in Section 3.3 show that compared to GPT-4o, OpenAI-01 significantly improves the reasoning scores on CS-Bench. This suggests that combining LLMs with reasoning frameworks can be expected to enhance reasoning capabilities. However, this approach comes with the trade-off of increased token consumption during inference.
+
+# Integrating External Knowledge Sources. The error type analysis in Section 3.4 identifies knowledge gaps as the main reason for LLM failures in the CS field. To address this, we implemented a RAG framework that uses Wikipedia as an external knowl
+
+edge source. The process involves extracting key terms from the question, retrieving relevant information from Wikipedia, and summarizing it to provide supplemental knowledge, which is then integrated into the context for answering the question. The results are shown in Table 25. Both knowledge and reasoning scores of the model have improved significantly, aligning with the findings in error analysis: the primary errors in knowledge and reasoning questions are knowledge-related issues. Performance is expected to be further enhanced when combined with a more advanced RAG framework or more suitable knowledge sources.
+
+Table 25: Changes in model scores after incorporating RAG.
+
+
Model
Knowledge
Reasoning
Overall
GPT-3.5-turbo
63.04
43.45
55.91
GPT-3.5-turbo (+RAG)
64.92(+1.88)
48.68(+5.23)
59(+3.09)
Llama3-8B
59.75
44.97
54.37
Llama3-8B(+RAG)
66.11(+6.36)
50.64(+5.67)
60.47(+6.1)
+
+# Incorporating Symbolic Reasoning Systems. To enable joint reasoning between language and symbolic systems, we developed a Python API as a symbolic reasoning tool. This allows the LLM to generate Python code when it identifies a need for sym
+
+bolic reasoning. The generated code is executed using the Python tool, and the results are reintegrated into the LLM's context for further output generation. The results are shown in Table 26. Since symbolic reasoning focuses on improving reasoning tasks, we observe that there is little improvement in the model's knowledge capabilities, but there is a significant enhancement in its reasoning performance.
+
+Table 26: Changes in model scores after incorporating Python Tool.
+
+
Model
Knowledge
Reasoning
Overall
gpt-4o
76.95
64.15
72.29
gpt-4o(+Python Tool)
77.47(+0.5)
71.86(+7.71)
75.42(+3.13)
+
+Fine-tuning. The error analysis also highlighted the need for specialized fine-tuning for CS. Due to the scarcity of fine-tuning data in the CS domain, we randomly sampled $10\%$ of the English data from CS-Bench as a mini
+
+test set. The remaining data was converted into SFT training data and used to fine-tune Llama3-8B-Instruct. As shown in Table 27, despite the challenges posed by the difficulty of CS tasks and the limited size of the training set, the model's knowledge and reasoning capabilities improved after fine-tuning. We expect that fine-tuning with a larger amount of domain-specific data could further enhance the LLM's performance in CS.
+
+Through these discussions, we aim to provide insights and directions for the future development of LLMs in the field of computer science.
+
+Table 27: Changes in model scores after CS fine-tuning.
+
+
Model
Knowledge
Reasoning
Overall
Llama3-8b-Instruct
66.89
43.73
58.07
Llama3-8b-Instruct (+SFT)
71.19(+4.3)
49.88(+6.15)
63.07(+5)
+
+# E.7 CASE STUDY OF OPENAI-01
+
+We present the responses of GPT-4o, OpenAI-o1-mini, and OpenAI-o1-preview to the same questions in Table 28, 29, and 30, and analyze them in detail as follows.
+
+Example 1. In this example, the models GPT-4o, OpenAI-o1-mini, and OpenAI-o1-preview each scored 0.2, 0.3, and 0.2 respectively, but none of them provided the correct answer. GPT-4o had a correct understanding of the IEEE 754 standard concept but incorrectly identified the e fraction (last 23 bits) as 1000 0000 0000 0000 0000 0000 (24 bits), which led to the wrong result. OpenAI-o1-mini also had a correct understanding of the IEEE 754 standard concept but made an error in identifying the e fraction (last 23 bits), resulting in an incorrect outcome. Similarly, OpenAI-o1-preview made a mistake in the interpretation of the fractional part, leading to an incorrect result. All three models had a correct understanding of the IEEE 754 standard; however, they made errors in identifying the last 23 bits of the fraction, which led to incorrect results.
+
+Example 2. In this example, the models GPT-4o, OpenAI-o1-mini, and OpenAI-o1-preview each scored 0.9, 1.0, and 0.3 respectively. GPT-4o and OpenAI-o1-mini answered the question correctly, while OpenAI-o1-preview did not provide the correct answer. OpenAI-o1-preview showed a detailed calculation process, it contained several critical errors that led to an incorrect result. The model used an incorrect throughput formula. The maximum throughput of the pure ALOHA protocol is $18.4\%$ of the channel capacity, but the model directly used the full bandwidth of $56~\mathrm{kb / s}$ for calculations. This resulted in an overestimation of the maximum number of stations.
+
+Example 3. In this example, the models GPT-4o, OpenAI-o1-mini, and OpenAI-o1-preview each scored 0.3, 0.3, and 0.7 respectively, but none of them provided the correct answer. GPT-4o and OpenAI-o1-mini used incorrect methods to calculate the total number of nodes. The models incorrectly calculated the number of nodes from level 0 to level 8 as $2^{9} - 1 = 511$ . The $9^{\text{th}}$ level should have $2^{8} - 1 = 255$ nodes because the levels are counted starting from 0, which led to incorrect conclusions. OpenAI-o1-preview correctly calculated the total number of nodes but lacked an analysis of the leaf nodes at level 8 when calculating the number of leaf nodes. Although the answer was not fully complete, it arrived at the correct result.
+
+Table 28: An example where GPT-4o, OpenAI-o1-mini , and OpenAI-o1-preview all failed.
+
+
Type
Content
Question
Question:
+Explain which type of number
+(normalized number, denominalized number, infinity, 0) the following IEEE 754 single-precision value represents.
+When it represents a specific value, please provide
+that value: 0b1111 1111 1000 0000 0000 0000 0000 0000 0000.
+Reference Answer:
+Since the exponent field of the number is all ones and the mantissa field is zero, with the sign bit being one, it
+represents negative infinity.
GPT-4o
Output:
+The given IEEE 754 single-precision value is:
+0b1111 1111 1000 0000 0000 0000 0000 0000
+To determine what this represents, let's break it down:
+1. The first bit is the sign bit. 2. The next 8 bits are the exponent. 3. The remaining 23 bits are the fraction (or
+mantissa).
+For the given value:
+- The sign bit (first bit) is 1, indicating a negative number.
+- The exponent (next 8 bits) is 1111 1111, which is 255 in decimal.
+- The fraction (last 23 bits) is 1000 0000 0000 0000 0000 0000.
+According to the IEEE 754 standard: - An exponent of 255 (all ones) with any non-zero fraction indicates a NaN
+(Not a Number). - An exponent of 255 with a zero fraction would indicate infinity, determined by the sign bit.
+In this case, the fraction is non-zero (it starts with 1000). Therefore, this specific combination represents a NaN
+(Not a Number).
+So, the IEEE 754 single-precision value 0b1111 1111 1000 0000 0000 0000 0000 0000 0000 represents a NaN (Not a
+Number).
+Score:
+0.2
OpenAI-o1-
+mini
Output:
+The IEEE 754 single-precision value 0b11111111 10000000 00000000 00000000 represents a NaN (Not a
+Number).
+Explanation:
+- Sign Bit: 1 (negative)
+- Exponent: 11111111 (255), which is the maximum value.
+- Fraction (Mantissa): 100000000000000000000000 (not all zeros)
+In IEEE 754: - When the exponent is 255 and the fraction is not all zeros, the value is classified as NaN. - If the
+exponent were 255 and the fraction were all zeros, it would represent infinity.
+Since the fraction here is not all zeros, the value is NaN, indicating an undefined or unrepresentable value.
+Score:
+0.3
OpenAI-o1-
+preview
Output:
+The given IEEE 754 single-precision binary value is: 0b1111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+Breaking it down into the IEEE 754 format:
+- Sign bit (S): The first bit is '1', indicating the sign (though for NaNs, sign bits are generally ignored).
+- Exponent bits (E): The next 8 bits are '11111111'.
+- Fraction/Mantissa bits (F): The remaining 23 bits are '100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Analysis:
+1. Exponent Analysis: - Exponent bits are '11111111' (E = 255), which is the maximum possible value for the
+exponent in IEEE 754. - When the exponent is all ones (E = 255), it indicates either infinity or NaN.
+2. Fraction Analysis: - Fraction bits are not all zeros (F ≠ 0). Specifically, the most significant bit of the fraction
+is '1', and the rest are zeros. - When E = 255 and F ≠ 0, the value represents a Not a Number (NaN).
+3. Type of NaN: - Quiet NaN vs. Signaling NaN: - If the most significant bit of the fraction (also known as the quiet
+bit) is '1', it's a Quiet NaN (qNaN). - If this bit is '0' and there's any non-zero bit in the fraction, it's a Signaling
+NaN (sNaN). - In this case, the most significant bit of the fraction is '1', so it's a Quiet NaN.
+Conclusion:
+The given IEEE 754 single-precision value represents a Quiet NaN (Not a Number). This special value is used to
+represent undefined or unrepresentable numerical results, such as the result of 0/0 or the square root of a negative
+number.
+Answer: It represents a quiet NaN (Not a Number) in IEEE 754 single-precision format.
+Score:
+0.2
+
+Table 29: An example where GPT-4o and OpenAI-o1-mini succeeded, OpenAI-o1-preview failed.
+
+
Type
Content
Question
Question: A group of N stations share a 56kb/s pure ALOHA channel, with each station outputting a 1000-bit frame on average every 100s, even if the previous frame has not finished transmitting. What is the maximum value of N? Reference Answer: For the pure ALOHA protocol, the channel utilization is 0.184, so the available bandwidth is 0.184x56Kb/s. The bandwidth required by each station is 1000/100-10b/s. Therefore, the maximum value of N is 1030.
GPT-4o
Output: To determine the maximum number of stations N that can share a 56 kb/s pure ALOHA channel efficiently, we need to consider the throughput of the pure ALOHA protocol. The maximum throughput for pure ALOHA is 18.4%, or 1/2e. First, let's calculate the frame generation rate for one station: - One station generates a 1000-bit frame every 100 seconds. - Therefore, the frame rate per station (G) is 1000 bits/100 s. For the total maximum channel capacity: - The channel capacity is 56,000 bps. - With the maximum throughput efficiency of 18.4%, the effective throughput is 56,000 × 0.184 = 10,304 bps. Now, to find the maximum number of stations N: - Each station contributes 10 bps to the load. - The maximum number of stations can be calculated by dividing the effective throughput by the load per station: N = 10,304 bps/10 bps per station = 1,030.4. Since N must be an integer, the maximum value of N is 1,030. Thus, the maximum value of N is 1,030 stations. Score: 0.9
OpenAI-o1-mini
Output: To determine the maximum number of stations N that can share a 56 kb/s pure ALOHA channel, follow these steps: 1. Calculate Frame Transmission Time (T): T = 1000 bits/56,000 bits/s ≈ 0.01786 seconds (17.86 ms) 2. Determine the Offered Load (G): Each station sends a frame every 100 seconds, so the load per station per frame time is G_i = T/100 = 1/5600. Total offered load for N stations: G = N × G_i = N/5600 3. Apply Pure ALOHA Throughput: The maximum throughput for pure ALOHA is S_max = 1/2e ≈ 0.184. 4. Set Offered Load to Maximum Throughput: N/5600 ≤ 1/2e. Solving for N: N ≤ 5600/2e ≈ 5600/5.436 ≈ 1030 Conclusion: The maximum number of stations N that can effectively share the 56 kb/s pure ALOHA channel is approximately 1030. Score: 1.0
OpenAI-o1-preview
Output: To determine the maximum number of stations N that can share the 56 kb/s pure ALOHA channel without exceeding the maximum acceptable load, we follow these steps: 1. Calculate the Frame Transmission Time (Tframe) The time it takes to transmit one frame is: T_frame = Frame Size / Channel Bandwidth = 1000 bits/56,000 bits/sec = 1/56 sec 2. Determine the Offered Load per Station (Gstation) Each station generates frames at an average rate of: λstation = 1/100 sec The offered load per station in frames per frame time is: G_station = λstation × T_frame = (1/100) × (1/56) = 1/5,600 3. Calculate the Total Offered Load (G) For N stations, the total offered load is: G = N × G_station = N × (1/5,600) 4. Apply the Pure ALOHA Throughput Formula In pure ALOHA, the maximum throughput occurs when the offered load G = 0.5 frames per frame time: G_max = 0.5 Setting the total offered load equal to the maximum: N × (1/5,600) = 0.5 5. Solve for N N = 0.5 × 5,600 = 2,800 Conclusion: The maximum number of stations N that can share the channel without exceeding the optimal load for pure ALOHA is 2,800 stations. Answer: 2800 Score: 0.3
+
+Table 30: An example where GPT-4o and OpenAI-o1-mini failed, OpenAI-o1-preview succeeded.
+
+
Type
Content
Question
Question:
+Given that the 9th level of a complete binary tree has 240 nodes, how many nodes does the entire complete binary tree have? How many leaf nodes are there?
+Reference Answer:
+In a complete binary tree, if the 9th level is full, then the number of nodes = 29-1 = 256. However, currently, there are only 240 nodes on the 9th level, indicating that the 9th level is not full and is the last level. Levels 1 to 8 are full, so the total number of nodes = 28 - 1 + 240 = 495. Since the 9th level is the last level, all nodes on the 9th level are leaf nodes. Moreover, the parents of the 240 nodes on the 9th level are on the 8th level, with the number of parents being 120, which means there are 120 branch nodes on the 8th level, and the rest are leaf nodes. Therefore, the number of leaf nodes on the 8th level is 28-1 - 120 = 8. Consequently, the total number of leaf nodes = 8 + 240 = 248.
GPT-4o
Output:
+In a complete binary tree, each level k has 2k nodes. The 9th level has 240 nodes. Given this, we need to determine the total number of nodes in the tree and the number of leaf nodes.
+First, let's confirm that the given information fits the structure of a complete binary tree. The 9th level should have 29 = 512 nodes. Since 240 nodes do not fit this pattern, it implies the tree is incomplete at that level, hence not truly complete. Still, if this were a theoretical exercise, we might infer the tree is complete up until level 8 and partially filled at the 9th level.
+1. Calculating the Total Number of Nodes: - Levels 0 through 8 are fully filled, with 20 + 21 + ··· + 28 nodes. - The sum of nodes from level 0 to 8 is 29 - 1 = 511. - Adding 240 nodes from the 9th level: 511 + 240 = 751. So, the total number of nodes in the tree is 751.
+2. Calculating the Number of Leaf Nodes: - In a complete binary tree, the leaf nodes are typically the nodes at the last level or partially filled level. - Here, the 9th level only has 240 nodes. These are leaf nodes. So, there are 240 leaf nodes. Therefore, the entire complete binary tree has 751 nodes and 240 leaf nodes.
+Score:
+0.3
OpenAI-o1-mini
Output:
+In a complete binary tree where the 9th level has 240 nodes:
+- Total Nodes: The first 8 levels are fully filled, containing 20 + 21 + ··· + 28 = 511 nodes. Adding the 240 nodes at the 9th level gives a total of 511 + 240 = 751 nodes.
+- Leaf Nodes: All 240 nodes at the 9th level are leaf nodes.
+Summary: - Total Nodes: 751 - Leaf Nodes: 240
+Score:
+0.3
OpenAI-o1-preview
Output:
+To determine the total number of nodes in the complete binary tree and the number of leaf nodes, we can follow these steps:
+1. Calculate the total nodes from levels 1 to 8:
+In a complete binary tree, levels 1 to 8 are fully filled. The number of nodes at each level doubles starting from 1 at the root.
+- Total nodes from level 1 to level 8: ∑i=072i=28 - 1 = 256 - 1 = 255 nodes
+2. Add the nodes at level 9:
+It's given that there are 240 nodes at level 9.
+- Total nodes in the tree: 255 (nodes from levels 1-8) + 240 (nodes at level 9) = 495 nodes
+3. Determine the number of leaf nodes:
+In a complete binary tree, all nodes at the last level are leaf nodes. Therefore, the number of leaf nodes is equal to the number of nodes at level 9.
+- Number of leaf nodes: 240
+Answer:
+The complete binary tree has 495 nodes in total, and there are 240 leaf nodes.
+Score:
+0.7
\ No newline at end of file
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/images.zip b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..882c91bce5f7baa162ee7379e971dd3637b33ceb
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3e20f8b60852047a03c784ddf80eb964eff6e6c9fe8f61054869e936bf8db5d2
+size 5214327
diff --git a/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/layout.json b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..bf839c864d42cb71112f4afbe561711bbbbfd770
--- /dev/null
+++ b/ICLR/2025/CS-Bench_ A Comprehensive Benchmark for Large Language Models towards Computer Science Mastery/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8fce7c19183354449147a4964a3343359a1f06586fcaa8cd16613b67be8ab8ea
+size 975197
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_content_list.json b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..0131c319b830e65fba4a2a5671f6c7b717ebc629
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f34ac8452fd911ac08d1ca351ba7fd85aab7b9400242df58bc4e229fbf43f418
+size 113886
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_model.json b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..39aa07ad85fa007a3226acc41efc89e5340cc54f
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7b061ff16cada7776ff67400cc3fc44d2c792e8814e24ab761a0241cd19a670a
+size 136854
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_origin.pdf b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..a2c78e95a697ba06b55f4e7ce7c50ebfb8186e6e
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/6465a7b7-9448-470d-8985-6a0c00afbded_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:23424ed55af7ca88b4a63df719ed188a93f450a9b928168d03404ec07131e108
+size 1650052
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/full.md b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..8eba07baf34fbe5b2ac9f960895fcf3ec8d44956
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/full.md
@@ -0,0 +1,422 @@
+# CSA: DATA-EFFICIENT MAPPING OF UNIMODAL FEATURES TO MULTIMODAL FEATURES
+
+Po-han Li, Sandeep Chinchali & Ufuk Topcu
+
+The University of Texas at Austin
+{pohanli, sandeepc, utopcu}@utexas.edu
+
+# ABSTRACT
+
+Multimodal encoders like CLIP excel in tasks such as zero-shot image classification and cross-modal retrieval. However, they require excessive training data. We propose canonical similarity analysis (CSA), which uses two unimodal encoders to replicate multimodal encoders using limited data. CSA maps unimodal features into a multimodal space, using a new similarity score to retain only the multimodal information. CSA only involves the inference of unimodal encoders and a cubic-complexity matrix decomposition, eliminating the need for extensive GPU-based model training. Experiments show that CSA outperforms CLIP while requiring $50,000 \times$ fewer multimodal data pairs to bridge the modalities given pre-trained unimodal encoders on ImageNet classification and misinformative news caption detection. CSA surpasses the state-of-the-art method to map unimodal features to multimodal features. We also demonstrate the ability of CSA with modalities beyond image and text, paving the way for future modality pairs with limited paired multimodal data but abundant unpaired unimodal data, such as LiDAR and text.
+
+# 1 INTRODUCTION
+
+Multimodal encoders like CLIP (Radford et al., 2021) excel in various zero-shot multimodal tasks, such as image classification and cross-modal retrieval. Despite the huge success, they demand excessive training data. For example, OpenAI trained the original CLIP model on 400 million image-text pairs using 592 V100 GPUs, and the training size of the new CLIP models (Ilharco et al., 2021) has increased to 12 billion image-text pairs since then. In addition, more data do not guarantee better performance. CLIP relies on Internet data, which are often of poor quality (Sharma et al., 2018). Incorrectly captioned data may lead to specific failure modes in similar instances (Northcutt et al., 2021; Vasudevan et al., 2022). In this work, we focus on learning a multimodal encoder with limited data that is robust to noisy data.
+
+Our conjecture is that unimodal encoders such as DINO (Oquab et al., 2023) and GTR (Ni et al., 2022) can serve as the building blocks of multimodal encoders. Unimodal encoders only need unimodal data, which are easier to obtain than paired multimodal data. They also require significantly less data than multimodal models, and advanced unimodal encoders are already well-developed. We distill the unimodal knowledge in these models to accelerate the learning of multimodal encoders. We map their unimodal features into a multimodal feature space, similar to how CLIP encodes images and text jointly to a shared feature space. In addition, this process should be data-efficient.
+
+We propose canonical similarity analysis (CSA) to verify our conjecture. It replicates a multimodal encoder such as CLIP with two unimodal encoders, as shown in Figure 1. CSA maps features from unimodal encoders to a multimodal space. It removes redundant information from unimodal features and employs a novel similarity function to replicate CLIP similarity score for multimodal data, e.g. images and captions. CSA operates by inference of unimodal encoders and solving an optimization problem, essentially a matrix decomposition without training of neural networks. CSA supports all zero-shot tasks that CLIP is capable of while requiring significantly fewer training data.
+
+
+Figure 1: Canonical similarity analysis (CSA) replicates the CLIP multimodal similarity scores with two unimodal encoders. CSA uses two unimodal encoders to encode data into unimodal features. Then, it projects the unimodal features to a joint multimodal feature space. The weighted cosine similarity in this feature space replicates the CLIP similarity, enabling various downstream tasks, e.g., cross-modal retrieval. CSA is a robust and data-efficient method that learns even when data are misaligned.
+
+Contributions. Our contributions are threefold: (1) We propose CSA which replicates the CLIP model using two unimodal encoders while demanding less computation and data (Section 4). (2) Our theoretical analysis characterizes the trade-off of obtaining informative embeddings and distinguishing multimodal data pairs, considering various hyperparameters of CSA (Section 5). (3) We tested CSA on tasks such as image classification, cross-modal retrieval, and misinformative captions detection (Section 6). The experimental results show that CSA outperforms or matches CLIP while requiring $50,000 \times$ fewer paired multimodal data that are used to train the multimodal mapping function given pre-trained unimodal encoders (see Table 1). CSA outperforms the state-of-the-art method that employs unimodal models with the same amount of training data as $18\%$ in ImageNet classification and $23\%$ in image-to-text retrieval.
+
+CSA works across all modalities beyond images and text. We additionally demonstrate its capability with audio and text, paving the way for new modality pairs, such as LiDAR and text Yang et al. (2023). In the future, we envision that new modality pairs will have limited paired multimodal data but sufficient unimodal data, where CSA can efficiently map unimodal features to multimodal features.
+
+# 2 RELATED WORKS
+
+Unimodal Encoders. Unimodal encoders encode unimodal data to fixed-dimensional features. In computer vision, encoders, e.g., CosPlace (Berton et al., 2022), ViT (Dosovitskiy et al., 2021), and Dino (Caron et al., 2021; Oquab et al., 2023), are trained with augmented data with random cropping and blurring with contrastive loss (van den Oord et al., 2019). In natural language processing, one common data augmentation method is to randomly mask words or tokens, used in the universal sentence encoder (Cer et al., 2018), Bert (Devlin et al., 2019), and GTR (Ni et al., 2022).
+
+Multimodal Encoders. Multimodal encoders project multimodal data points into a feature space shared between modalities. Thus, multimodal features enable training for downstream models (Shridhar et al., 2021; Li et al., 2024b; Goel & Narasimhan, 2024). Another common usage is to directly take the inner product of features of data from different modalities, e.g., an image and a sentence, as a similarity metric. This metric enables downstream tasks such as zero-shot image classification and cross-modal data retrieval. The CLIP model (Radford et al., 2021) is the milestone of multimodal encoders, which bridges the gap between language and vision. CLIP inspires encoders for other modalities, such as audio and inertial measurement units. Such encoders include ImageBind (Girdhar et al., 2023), AudioCLIP (Guzhov et al., 2022) and CLAP (Wu* et al., 2023). Previous work also studied cross-modal retrieval on multi-label images (Ranjan et al., 2015), while ours focuses on a more generic multimodal setting with pre-trained unimodal encoders. Although ImageBind encodes 6 modalities, it lacks training data for all possible modality pairs, resulting in suboptimal performance for pairs such as audio and inertial measurement units.
+
+Neural Networks with CCA. Previous works have shown that training losses inspired by canonical correlation analysis (CCA) (Hardoon et al., 2004) are useful in multimodal or multi-distribution tasks (Sun et al., 2019; Lyu & Fu, 2020; 2023). Although taking a crucial step of introducing CCA to deep learning, these works focus on training deep neural networks from scratch instead of using existing foundation encoder models, as in this work. Other works use techniques similar to CCA, such as principal component analysis (PCA), to process the output features of encoders (Li et al., 2024a; Omama et al., 2024). In this work, we focus on using CCA to map unimodal features to a multimodal feature space without any model training, which significantly reduces the size of the required training dataset.
+
+Combining multiple unimodal Encoders. The closest work to ours is ASIF (Norelli et al., 2023), which also uses multiple unimodal encoders to bridge the multimodal gap. ASIF calculates the similarity of a pair of multimodal data based on the unimodal similarity of the given data pair and a pre-selected, multimodal anchor dataset, similar to Moschella et al. (2023). It creates a linear kernel space by the anchor set. However, ASIF demands a huge anchor set to achieve similar performance to CLIP, while our proposed method, CSA, constantly outperforms ASIF in all tasks.
+
+# 3 PROBLEM FORMULATION
+
+Given two datasets of size $N$ , $X^{1} = \{x_{1}^{1}, x_{2}^{1}, \ldots, x_{N}^{1}\}$ , $X^{2} = \{x_{1}^{2}, x_{2}^{2}, \ldots, x_{N}^{2}\}$ , from two modalities $m^{1}, m^{2}$ (such as vision and language), we want to find two feature extractors (encoders) $\mathbf{E}^{1}, \mathbf{E}^{2}$ that map the data to the same-dimensional feature space. The encoders generated feature pairs $\mathbf{E}^{1}(x_{i}^{1}), \mathbf{E}^{2}(x_{i}^{2})$ are close, and the feature pairs from different pairs of data $\mathbf{E}^{1}(x_{i}^{1}), \mathbf{E}^{2}(x_{j}^{2})$ are far.
+
+Note that the two sets of data are paired, which means that they are sophisticatedly related (such as an image and its corresponding caption), although of different modalities. Previous works trained multimodal encoder pairs to achieve this goal by minimizing the following loss:
+
+$$
+\begin{array}{l} \mathcal {L} \left(X ^ {1}, X ^ {2}; \mathbf {E} ^ {1}, \mathbf {E} ^ {2}\right) := \quad (\text {M u l t i m o d a l C o n t r a s t i v e L o s s}) \\ \frac {- 1}{2 N} \sum_ {i = 1} ^ {N} \left[ 2 \left(\mathbf {E} ^ {1} \left(x _ {i} ^ {1}\right)\right) ^ {\top} \left(\mathbf {E} ^ {2} \left(x _ {i} ^ {2}\right)\right)) - \sum_ {j \neq i} \frac {\left(\mathbf {E} ^ {1} \left(x _ {i} ^ {1}\right) + \mathbf {E} ^ {2} \left(x _ {i} ^ {2}\right)\right) ^ {\top} \left(\mathbf {E} ^ {1} \left(x _ {j} ^ {1}\right) + \mathbf {E} ^ {2} \left(x _ {j} ^ {2}\right)\right)}{2 N - 2} \right], \tag {1} \\ \end{array}
+$$
+
+where the first term encourages similar features for the same pair of data, and the second term encourages the opposite. Variants of this loss are commonly used in contrastive learning (van den Oord et al., 2019), such as CLIP (Radford et al., 2021).
+
+From Unimodal to Multimodal. Training a multimodal encoder to learn a multimodal feature space is time-consuming and data-inefficient. The original CLIP model learns from Internet-scale datasets (400 million images) and requires 500 A100 Nvidia GPUs. Instead of training end-to-end multimodal encoders, we leverage existing unimodal encoders to accelerate the multimodal learning process. That is, given unimodal encoders that encode data into unimodal feature spaces, we directly find two mapping functions that map each unimodal feature space to a multimodal space.
+
+Mathematically, we use two unimodal encoders $\mathbf{E}^1, \mathbf{E}^2$ that capture only unimodal latent information and individually encode data $x_i^1, x_i^2$ into features $\hat{z}_i^1, \hat{z}_i^2 \in \mathbb{R}^{q^1}, \mathbb{R}^{q^2}$ . Because these features $\hat{z}_i^1, \hat{z}_i^2$ come from different encoders, their dimensions need not be the same ( $q^1 \neq q^2$ ), which complicates the discovery of the mapping functions. The dimensions of the features are significantly smaller than those of the raw data $x_i$ . Hence, we utilize unimodal encoders to significantly reduce the dimension of the data and the complexity of the problem. Our ultimate goal is to efficiently find two mapping functions $\mathbf{A}, \mathbf{B}$ that map the feature spaces to a multimodal one while preserving the contrastiveness property characterized in Equation 1.
+
+# 4 CANONICAL SIMILARITY ANALYSIS (CSA)
+
+The problem in Section 3 is easier to state than to solve. First, unimodal encoders have completely different architectures (e.g., transformers vs. U-net), losses, and output dimensions. Second, mapping data from various-dimensional feature spaces to a multimodal one means that we need to discard latent information from the higher-dimensional space. The challenge lies in determining what
+
+information to discard to maintain the contrastiveness property. Also, we do not want to preserve all information as there might be some modality-specific information that we wish not to preserve through the mapping, such as words that cannot be expressed in images or punctuation.
+
+We thus propose canonical similarity analysis (CSA). We observe that all downstream tasks use cosine similarity to obtain the similarity of multimodal data points. It inspires us to use correlation coefficients, the cosine similarity between centered vectors, to approximate this similarity and build the mapping functions from unimodality to multimodality. Precisely, we find the pairs of bases in each unimodal feature space that maximize the correlation coefficients. We use CCA to find such bases. Then, instead of directly using an inner product, we use a weighted cosine similarity score to evaluate the similarity of the multimodal data. We discard information from low-correlated bases, as they might not be relevant to the multimodal feature space, and we weight the contributions of the bases to the similarity score based on their correlation coefficients.
+
+# 4.1 CANONICAL CORRELATION ANALYSIS
+
+Recall the previous notation of two sets of data $X^{1} = \{x_{1}^{1}, x_{2}^{1}, \dots, x_{N}^{1}\}$ , $X^{2} = \{x_{1}^{2}, x_{2}^{2}, \dots, x_{N}^{2}\}$ . We use two unimodal encoders $\mathbf{E}^{1}, \mathbf{E}^{2}$ to encode and normalize the data into zero-meaned latent features $\{\hat{z}_{i}^{1}, \hat{z}_{i}^{2}\}_{i=1}^{N}$ . To find the bases that maximize the correlation coefficients, we use CCA to map the two feature spaces to a multimodal feature space of dimension $r = \min(q^{1}, q^{2})$ :
+
+$$
+\begin{array}{l} \mathbf {A} ^ {*}, \mathbf {B} ^ {*} = \underset {\mathbf {A} \in \mathbb {R} ^ {r \times q ^ {1}}, \mathbf {B} \in \mathbb {R} ^ {r \times q ^ {2}}} {\arg \max } \operatorname {T r} \left(\mathbf {A} \hat {Z} ^ {1} \left(\mathbf {B} \hat {Z} ^ {2}\right) ^ {\top}\right) \quad (\text {F o r m u l a t i o n o f C C A}) \tag {2} \\ \mathrm {s . t .} \quad (\mathbf {A} \hat {Z} ^ {1}) (\mathbf {A} \hat {Z} ^ {1}) ^ {\top} = (\mathbf {B} \hat {Z} ^ {2}) (\mathbf {B} \hat {Z} ^ {2}) ^ {\top} = \mathbf {I} _ {r}, \\ \end{array}
+$$
+
+where $\hat{Z}^1\in \mathbb{R}^{q^1\times N},\hat{Z}^2\in \mathbb{R}^{q^2\times N}$ are the matrices consisting of column feature vectors $\hat{z}$ , $\mathbf{I}_r\in \mathbb{R}^{r\times r}$ is the identity matrix, and $\mathrm{Tr}$ is the trace function. The objective of Equation 2 can be viewed as the sum of the correlation coefficients of the bases, and the identity constraints normalize the vectors so that covariance becomes correlation. In summary, CCA finds the bases of the two given matrices such that the projected vectors have the highest correlation coefficients $\rho_{i}$ for $i = 1,\dots,r$
+
+Solving CCA is similar to principal component analysis (PCA), which is essentially a singular value decomposition (SVD) of time complexity $O(q^{1}q^{2}r)$ . Therefore, it possesses the beneficial property of removing noise from the data, which we later detailed in the theoretical analysis. Weenink (2003) gives the analytical solution:
+
+$$
+\mathbf {A} ^ {*}, \mathbf {B} ^ {*} = U \Sigma_ {\hat {z} ^ {1}} ^ {- 1 / 2}, V \Sigma_ {\hat {z} ^ {2}} ^ {- 1 / 2}, \quad (\text {A n a l y t i c a l S o l u t i o n o f C C A}) \tag {3}
+$$
+
+where $U^{\top}PV$ are the resulting SVD matrices of the rank- $r$ matrix $= \Sigma_{\hat{z}^{1}}^{-1 / 2}\hat{Z}^{1}\hat{Z}^{2\top}\Sigma_{\hat{z}^{2}}^{-1 / 2}\in \mathbb{R}^{q^{1}\times q^{2}}$ . The correlation coefficients $\rho$ of Equation 2 are the diagonal entries of $P$ in descending order $\rho_{1}\geq \rho_{2}\geq \ldots \geq \rho_{r}$ like the descending principal components of PCA.
+
+# 4.2 CANONICAL SIMILARITY ANALYSIS
+
+We now define CSA. For any pair of multimodal data $\{x_j^1, x_j^2\}$ , with slight abuse of the notation of original data and features, we define the similarity as:
+
+$$
+\mathcal {S} \left(x _ {j} ^ {1}, x _ {j} ^ {2}; s\right) = \mathcal {S} \left(\hat {z} _ {j} ^ {1}, \hat {z} _ {j} ^ {2}; s\right) = \frac {\sum_ {i = 1} ^ {s} \rho_ {i} \left(\mathbf {A} ^ {*} \hat {z} _ {j} ^ {1}\right) _ {i} \left(\mathbf {B} ^ {*} \hat {z} _ {j} ^ {2}\right) _ {i}}{\| \left(\mathbf {A} ^ {*} \hat {z} _ {j} ^ {1}\right) _ {1 : s} \| _ {2} \| \left(\mathbf {B} ^ {*} \hat {z} _ {j} ^ {2}\right) _ {1 : s} \| _ {2}}, \quad (\text {C a n o n i c S i m i l a r i t y}) \tag {4}
+$$
+
+where $(\cdot)_{1:s}$ denotes the 1st to $s$ -th row vector, $(\cdot)_i$ denotes the $i$ -th entry, and $s$ is a pre-defined hyperparameter. Note that Equation 4 is the weighted cosine similarity of the first $s$ dimensions of the transformed data matrix. The weights determine how much each dimension influences the overall similarity score, depending on their level of correlation. We chose the hyperparameter $s$ so that CSA preserves the information of dimensions with correlations greater than $\rho_s$ . As stated earlier, the feature space might contain modal-specific information that cannot be mapped to the other modality. Thus, we only take into account meaningful bases. We choose CCA with linear correlation instead of complicated kernel CCA because most contrastive learning loss functions only contain the linear inner product of the feature vectors, which is also the case in Equation 2.
+
+# 4.3 TRAINING AND INFERENCE
+
+Similar to standard machine learning models, CSA consists of both training and inference phases. We split the multimodal data into training and test sets, just like in standard machine learning. CSA performs all optimizations on the training set, and the test set is not known a priori and is used only for evaluation. During the training phase, or also called the fitting phase, CSA obtains the training set of encoded features from the unimodal encoders and then solves Equation 2. Note that CSA does not train any encoders, so it does not require GPUs. The resulting correlation coefficients $\rho$ determines the value of $s$ in Equation 4:
+
+$$
+s = \underset {i} {\arg \min } \rho_ {i} \quad \text {s . t .} \rho_ {i} \geq \text {c o n s t .} \tag {5}
+$$
+
+Note that const here is an empirical constant threshold to optimize performance in our experience. Finally, for any multimodal downstream task, CSA uses Equation 4 to evaluate the similarity between any pair of multimodal data. We later show the experimental results of CSA and compare the results with the state-of-the-art methods.
+
+# 5 THEORETICAL ANALYSIS OF CSA
+
+In this section, we characterize the trade-off of obtaining informative embeddings and distinguishing multimodal data pairs caused by selecting the appropriate $s$ in Equation 4. We start with the linear setting, but the conclusion holds for a more general setting.
+
+Assumptions. We follow the assumption of data generation as per Joshi et al. (2024) and analyze the effect of CSA based on the theoretical results of contrastive losses (Ji et al., 2023; Tian, 2022; Nakada et al., 2023). Suppose that the $N$ pairs of data $\{x_i^1, x_i^2\}_{i=1}^N$ from two modalities $m^1, m^2$ are generated as follows:
+
+$$
+x _ {i} ^ {1} = \mathcal {T} ^ {1} z _ {i} + \epsilon_ {i} ^ {1}, \quad x _ {i} ^ {2} = \mathcal {T} ^ {2} z _ {i} + \epsilon_ {i} ^ {2}. \tag {6}
+$$
+
+Here, $z_{i} \in \mathbb{R}^{q}$ is the shared unobservable latent feature of the two modalities, and $\mathcal{T}^1 \in \mathbb{R}^{p^1 \times q}, \mathcal{T}^2 \in \mathbb{R}^{p^2 \times q}$ are the linear mapping functions of the latent vectors to the observable data. Without loss of generality, we assume that both the latent feature vectors and noise for each modality are independent and identically distributed (i.i.d.) samples from any distribution.
+
+Optimal Linear Encoders of Contrastive Loss. Previous work (Ji et al., 2023) gives the analytical solution of a unimodal linear encoder $\mathbf{E}^i$ trained on linear contrastive loss with norm regularization:
+
+$$
+\begin{array}{l} \mathcal {L} (X ^ {k}, X ^ {' k}; \mathbf {E} ^ {k}) := \frac {- 1}{2 N} \sum_ {i = 1} ^ {N} \left[ 2 (\mathbf {E} ^ {k} x _ {i} ^ {k}) ^ {\top} (\mathbf {E} ^ {k} x _ {i} ^ {' k}) - \sum_ {j \neq i} \frac {(\mathbf {E} ^ {k} x _ {i} ^ {k} + \mathbf {E} ^ {k} x _ {i} ^ {' k}) ^ {\top} (\mathbf {E} ^ {k} x _ {j} ^ {k} + \mathbf {E} ^ {k} x _ {j} ^ {' k})}{2 N - 2} \right] \\ + \frac {\lambda}{2} \| \mathbf {E} ^ {k} \mathbf {E} ^ {k \top} \| _ {F} ^ {2}, \quad \text {f o r} k = 1, 2, \tag {7} \\ \end{array}
+$$
+
+where $X^{k}, X^{\prime k}$ are two sets of original and augmented (e.g., random masked, Gaussian blurred, etc.) data from the same modality, and $\lambda$ is a hyperparameter weighting the regularization term. Note that this contrastive loss function is similar to Equation 1, but the second modality is the augmented data now. For simplicity, we assume that all unimodal data are augmented with complementary random masking with probability 0.5, so the optimal linear encoder is:
+
+$$
+\mathbf {E} _ {\text {l i n e a r}} ^ {k} = \underset {E \in \mathbb {R} ^ {q \times p ^ {k}}} {\arg \min } \mathcal {L} = C \left(\sum_ {i = 1} ^ {q} u _ {i} \sigma_ {i} e _ {i} ^ {\top}\right) ^ {\top}, \text {f o r} k = 1, 2. \tag {8}
+$$
+
+In Equation 8, $C > 0$ is a positive constant related to $\lambda$ in Equation 7. $e_i$ is the $i$ -th standard vector basis, and $\sigma_i$ is the $i$ -th largest eigenvalue of matrix:
+
+$$
+\operatorname {O f f D i a g} \left(X ^ {i} X ^ {i ^ {\top}}\right) - \frac {1}{N - 1} X ^ {i} \left(\mathbf {1} - \mathbf {I} _ {N}\right) X ^ {i ^ {\top}}, \tag {9}
+$$
+
+where OffDiag denotes the function that makes all diagonal entries 0, and $\mathbf{1}$ is a square matrix of ones. From Equation 3, 6, and 8, the solution of CSA in linear setting is:
+
+$$
+\mathbf {A} ^ {*} \hat {z} _ {i} ^ {1} = \mathbf {A} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {1} x _ {i} ^ {1} = \mathbf {A} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {1} \left(\mathcal {T} ^ {1} z _ {i} + \epsilon_ {i} ^ {1}\right), \quad \mathbf {B} ^ {*} \hat {z} _ {i} ^ {2} = \mathbf {B} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {2} x _ {i} ^ {2} = \mathbf {B} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {2} \left(\mathcal {T} ^ {2} z _ {i} + \epsilon_ {i} ^ {2}\right). \tag {10}
+$$
+
+
+(a) SNR and $\lambda_{\mathrm{min}}$ vs. selected dimension.
+
+
+(b) p-value (lower is better) of similarity scores.
+Figure 2: Trade-off of canonical similarity analysis: (a) When $s$ is low, the signal-to-noise ratio (SNR) of the data is high, and the minimum singular value $\lambda_{\mathrm{min}}$ is large. It preserves the distance between contrastive data. (b) When $s$ is low, the p-value is large, and the original and shuffled distributions are alike, so the similarity score is meaningless. (a) shows the desirable properties when $s$ is low and (b) shows the opposite.
+
+Sensitivity to Noise. The noise in Equation 6 affects the unimodal linear encoders $\mathbf{E}_{\mathrm{linear}}^{1}$ , $\mathbf{E}_{\mathrm{linear}}^{2}$ from the second term of Equation 9. It hinders the unimodal encoders in finding the inverse of $\mathcal{T}^1, \mathcal{T}^2$ but in encoding the noise. The noise then propagates and affects the covariance matrices of $\hat{z}$ and the decomposed orthogonal matrices $U$ and $V$ in Equation 3.. Hence, we rely on the hyperparameter $s$ to prevent noise from dominating. When $s$ increases, we include the less correlated dimensions caused by noise in the canonical similarity metric in Equation 4.
+
+Distinguish Contrastive Data Pairs. In Equation 7, similar sample pairs, i.e., the augmented and original data, stay close to each other, while dissimilar ones, i.e., augmented data from different data points, are far apart. However, in the objective of CCA Equation 2, we focus only on maximizing the correlation coefficients of similar samples while ignoring dissimilar ones.
+
+We now analyze how CSA distinguishes contrastive latent feature pairs from the two unimodal encoders. Given two data pairs $(x_{a}^{1}, x_{a}^{2})$ and $(x_{b}^{1}, x_{b}^{2})$ , we assume that the predicted latent feature pairs $(\hat{z}_{a}^{1}, \hat{z}_{b}^{1}), (\hat{z}_{a}^{2}, \hat{z}_{b}^{2})$ are distant because the unimodal encoders are trained for it. The distance between latent features preserved in the matrix transformations is bounded as follows:
+
+$$
+\lambda_ {\min } \left(\mathbf {A} ^ {*}\right) \lambda_ {\min } \left(\mathbf {E} _ {\text {l i n e a r}} ^ {1}\right) \| x _ {a} ^ {1} - x _ {b} ^ {1} \| _ {2} \leq \lambda_ {\min } \left(\mathbf {A} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {1}\right) \| x _ {a} ^ {1} - x _ {b} ^ {1} \| _ {2} \leq \| \mathbf {A} ^ {*} (\hat {z} _ {a} ^ {1} - \hat {z} _ {b} ^ {1}) \| _ {2}, \tag {11}
+$$
+
+$$
+\lambda_ {\min } \left(\mathbf {B} ^ {*}\right) \lambda_ {\min } \left(\mathbf {E} _ {\text {l i n e a r}} ^ {2}\right) \| x _ {a} ^ {2} - x _ {b} ^ {2} \| _ {2} \leq \lambda_ {\min } \left(\mathbf {B} ^ {*} \mathbf {E} _ {\text {l i n e a r}} ^ {2}\right) \| x _ {a} ^ {2} - x _ {b} ^ {2} \| _ {2} \leq \| \mathbf {B} ^ {*} (\hat {z} _ {a} ^ {1} - \hat {z} _ {b} ^ {1}) \| _ {2},
+$$
+
+where $\lambda_{\mathrm{min}}(\cdot)$ denotes the minimum singular value, which is the opposite of the Lipschitz constant of a matrix. From Equation 11, we can see that the distance between the CSA features (right-hand side) is lower bounded by the distance of the original data with a constant of minimum singular values (left-hand side). Thus, we know how the hyperparameter $s$ selecting the dimension of CSA affects the distance between dissimilar data pairs. When the hyperparameter $s$ decreases, CSA takes into account fewer dimensions per Equation 4. That is, $\lambda_{\mathrm{min}}(\mathbf{A}_{1:s}^{*}) = \rho_{s}$ is effectively larger, which ultimately results in more distant features in the CSA space, and vice versa. In summary, a smaller $s$ preserves distance in the CSA space, which distinguishes contrastive data pairs.
+
+Trade-off of Canonical Similarity Analysis. Previous results show that a smaller $s$ leads to less noisy but more contrastive similarity scores, which is desirable. However, $s = 1$ is not desirable because it loses much information about the true latent features, and most vectors will have identical similarity scores. In practice, we do not know the dimension of the latent feature $q$ and can only use CSA to project the encoded features of two modalities to a dimension that is less noisy, but also contains enough information about the true shared latent feature $z$ .
+
+Numerical Experiments. We validate the trade-off through numerical experiments following Equation 6. Figure 2a shows that if we only account for a few dimensions ( $s$ is low), the signal-to-noise ratio (SNR) of the data is then high, and the minimum singular value $\lambda_{min}$ is large, which preserves the distance between contrastive data. Note that Figure 2a shows the values in decibels (dB). Figure 2b compares paired data $(x_i^1, x_i^2)$ and randomly shuffled data $(x_i^1, x_j^2), i \neq j$ . High Wilcoxon p-values mean that the two distributions of similarity scores from Equation 4 are alike. In this case, the canonical similarity score is meaningless, and larger $s$ is more desirable. The intrinsic trade-off
+
+
Method
Train images
Train text
Parameter
Feature dimension q, r
CLIP
2B
2B
1.3B
q = 1280
GTR
X
2B
335M
q = 768
DINOv2
142M
X
1.1B
q = 1536
CSA (ours on ImageNet)
35k
1k
X
r = 700
CSA (ours on Leafy Spurge)
800
2
X
r = 250
CSA (ours on Flickr30k)
5k
25k
X
r = 200
CSA (ours on COSMOS)
41k
41k
X
r = 750
+
+Table 1: Comparison of methods: CSA utilizes two unimodal encoders to match the performance of CLIP while requiring significantly less data. We show the CLIP parameters of only one encoder for a fair comparison to other unimodal encoders.
+
+
+(a) ImageNet.
+
+
+(b) Leafy Spurge.
+
+Figure 3: Image classification: CSA (blue) is highly data-efficient, requiring only 35,000 training samples to match the performance of CLIP in ImageNet and 360 samples in Leafy Spurge.
+
+
Method
mAP@5
Precision@1
Precision@5
CSA (ours)
36.6%
59.3%
43.4%
CLIP
73.8%
92.9%
77.2%
ASIF
14.6%
25.6%
20.0%
+
+(a) Image-to-text retrieval
+
+
Method
Precision@1
CSA (ours)
44.7%
CLIP
79.5%
ASIF
0.1%
+
+(b) Text-to-image retrieval
+
+Table 2: Cross-modal retrieval on Flickr30k: CSA exhibits lower performance compared to the multimodal baseline, CLIP. However, it outperforms the unimodal baseline, ASIF, in both retrieval scenarios.
+
+in selecting $s$ is now clear. When $s$ is too small, we do not have meaningful similarity scores that distinguish unpaired data, but when $s$ is too large, we have noisy and closer clusters of features.
+
+# 6 EXPERIMENTS
+
+Baselines. We compared CSA with another baseline, ASIF (Norelli et al., 2023). It has the same setting as CSA, which uses two unimodal encoders to calculate the similarity of a multimodal data pair. Unlike CSA, which solves an optimization problem, ASIF infers multimodal similarity by the unimodal distance between data points. ASIF is the only fair baseline for CSA. We trained CSA and ASIF with the same training set and unimodal encoders and evaluated all the methods in the test set. We also compared CSA with the state-of-the-art multimodal encoder model from OpenCLIP (Ilharco et al., 2021; Cherti et al., 2022), acknowledging their incomparable training set and model parameters, shown in Table 1. In addition to encoder models, we compared the performance of LLaVA2-13B (Touvron et al., 2023), a multimodal large language model, and prompted it to solve the specified tasks from the provided image and text. The unimodal encoders of CSA and ASIF are GTR (Ni et al., 2022) and DINOv2 (Oquab et al., 2023) here. Section A shows the detailed settings.
+
+Image Classification. We first examined CSA's ability of image classification on ImageNet and Leafy Spurge. All methods input an image and all possible captions "This is an image of label" and select the most similar caption as the predicted label. In Figure 3a, CSA requires only 35,000 training samples to match the performance of CLIP and consistently outperforms ASIF, which needs millions of data points to achieve a similar performance to CLIP. Since CLIP is zero-shot, its performance is independent of the amount of data. Leafy Spurge challenges the capability of methods with
+
+
+(a) Results for a training size of 5000.
+
+
+(b) Results for a training size of 35000.
+Figure 4: Detecting unlabeled ImageNet images: CSA (blue) outperforms CLIP, ASIF, and LLaVA with a higher AUC. (a) and (b) illustrate the results for CSA and ASIF across 2 training set sizes, showing the superior performance of CSA with limited and noisy training data.
+
+extremely limited data. This dataset includes only 800 training images and 100 test images of plants with binary classes: leafy spurge and others. The images are out-of-distribution for any encoders, as this dataset was newly published in 2024 and captured using drones. Figure 3b shows that while the performance of CSA fluctuates, it consistently outperforms CLIP and ASIF in this challenging scenario, demonstrating CSA's effectiveness with limited out-of-distribution data.
+
+Table 1 shows the size of the training set and the number of parameters of the neural network encoders. Notably, CSA surpasses CLIP by utilizing two unimodal model encoders trained on 2 billion text samples and 142 million images, along with only 35,000 multimodal data points. This is $50,000 \times$ less unimodal data compared to the CLIP training set. We also visualize the image features of CSA and CLIP in Section H.
+
+Cross-modal Retrieval. We examined CSA and the other baselines on a cross-modal retrieval dataset, Flickr30k (Young et al., 2014), which contains 15,000 images, each paired with 5 textual descriptions. This dataset is common for evaluating the performance of image-to-text and text-to-image retrieval. For image-to-text retrieval, the task is to find the corresponding caption from a set of possible candidates (the so-called reference set) given a query image and vice versa. We retrieved the most similar images or text from the reference set according to the similarity scores of all methods and showed the results in Table 2. For image-to-text retrieval, we show mean average precision (mAP), precision@1, and precision@5. For text-to-image retrieval, we only evaluated performance using precision@1 since there is only one correct image. From Table 2, CSA exhibits lower performance compared to the multimodal baseline, CLIP. However, it outperforms the unimodal baseline, ASIF, in both retrieval scenarios. Notably, ASIF completely fails in the text-to-image retrieval task.
+
+Detecting Mislabeled ImageNet Images. We again show CSA's superiority with limited and noisy data. Previous works show that ImageNet is imperfect and contains incorrectly labeled images, leading to several failure modes of downstream models (Vasudevan et al., 2022). Trained with the original incorrect ImageNet dataset, all methods detect if the input image and the label align. We use human-evaluated labels from (Northcutt et al., 2021) to define incorrectly labeled images.
+
+All methods input an image and caption "This is an image of label" and output if the image and caption align or not (true or false). LLaVA answers questions about whether the given image and caption align. CSA, CLIP, and ASIF output true if the calculated similarity score of the image and caption pair is greater than a threshold. We enumerated the thresholds to obtain several true and false positive rates and show the receiver operating characteristic (ROC) curves in Figure 4. In the legend, we listed the area under the curve (AUC), where a higher value indicates better performance. In Figure 4, CSA outperforms all other baselines, even LLaVA, given 5,000 image-label pairs. We also see that when the size of the training data increases from 5,000 to 35,000, the performance of CSA and ASIF increases as well. We emphasize that the comparison of AUC does not directly compare accuracy. As shown in Figure 4b, the true positive rate of CSA outperforms LLaVA by nearly $10\%$ under the same false positive rate.
+
+Note that the training sets of CSA and ASIF contain mislabeled ImageNet images, which are $11\%$ of the training data in both dataset sizes. It shows CSA's robustness to noisy data and efficiency in learning from just 5,000 pairs. Similarly, the CLIP encoders' training set also contains mislabeled
+
+
+(a) Illustrative examples.
+
+
+(b) Results.
+Figure 5: Detecting misinformative news captions: (a) We consider the retrieved captions misinformative if they do not align with the images and the corresponding captions. (b) CSA (blue) outperforms CLIP, ASIF, and LLaVA with a higher AUC. The orange cross is the supervised learning method from the original COSMOS paper trained with labels of object locations, which is the only method that outperforms CSA.
+
+ImageNet images, making the comparison fair. We later demonstrate CSA's robustness with even noisier training data.
+
+Detecting Misinformative Captions. Detecting unlabeled images is easy since text captions differ only in labels. We considered a much harder task to detect misinformation news captions from the COSMOS dataset (Aneja et al., 2023). The task involves determining whether a Google-retrieved caption aligns with news images and its original captions, as shown in Figure 5a. The benchmark considers the retrieved captions misinformative if they do not align with the images and the corresponding captions simultaneously. The ultimate goal of the task is to identify and prevent the spread of misinformative news captions on the Internet.
+
+We evaluated the similarities between the image and its retrieved caption, as well as between the two captions, and identified misinformation when both similarity scores fell below the respective thresholds. Figure 5b shows all the ROC curves and their AUC. Again, CSA outperforms CLIP with two unimodal encoders. The supervised learning method from the original COSMOS paper is the only method that performs better than CSA, although trained with supervised labels of object locations. Note that the LLaVA agent completely fails this task with a false positive rate of $100\%$ , as it always thinks that the retrieved captions align with the given images and the original captions.
+
+Robustness to noisy data. To test CSA's robustness, we randomly shuffled a percentage of the training labels of ImageNet and evaluated the resulting test accuracy. Figure 6 shows that CSA constantly outperforms ASIF and achieves $70\%$ accuracy even if $50\%$ of the training labels are incorrect. When all the data are shuffled, both CSA and ASIF degrade to $0\%$ accuracy.
+
+Towards more modalities and ablation study. We show additional results in the Appendix to provide a comprehensive study to CSA. To show that CSA generalizes to other modalities, we tested it on audio and text data in Section B, text-to-LiDAR retrieval in Section F, and text-to-timeseries in Section G. See Section C for the correlation coefficients of multimodal data and the results of CSA with various $s$ in Equation 4 in Section D and unimodal encoders in Section E. We visualized and examine Section I. Lastly, we present the ablation study of CLIP e
+
+
+Figure 6: Robustness to noisy ImageNet data: CSA remains performant even when the training labels, comprising a total of 35,000 samples, are partially shuffled.
+
+Limitations. CSA is suitable for bimodal data, similar to CLIP, unlike Imagebind (Girdhar et al., 2023) is capable of 6 modalities. Like ASIC, CSA is based on unimodal encoders. If the unimodal encoders are not foundation models but trained on limited datasets like MNIST, the performance of CSA degrades. Once the encoded features are obtained, CSA is just SVD. In our case, the underlying
+
+implementation of CSA is NumPy, which is efficient in handling large matrix operations parallelly on multiple CPUs. Also, solving SVD with NumPy takes more time and is computationally efficient than training models on GPUs for datasets of the same size. There are tricks to speed up SVD approximately. For instance, GPU libraries like CuPy Okuta et al. (2017), and randomized SVD algorithms compute approximate results faster than full SVD. Lastly, for a given hyperparameter $s$ we only need to obtain the first $s$ singular values, which can also speed up the computation.
+
+Summary. CSA always outperforms the unimodal baseline, ASIF, and matches or exceeds CLIP's performance, except in cross-modal retrieval. This exception likely arises because cross-modal retrieval involves comparing thousands of similarity score pairs between the query data and the reference set, unlike the other tasks that compare against certain captions. It highlights the trade-off of CSA discussed in Section 5. CSA encounters a trade-off between distinguishability and informativeness, i.e., to maintain the distant features. Retrieval tasks require a more curated balance between these aspects, and other tasks benefit from greater distinguishability of similarity scores.
+
+We conclude that CSA is a robust and data-efficient method to replicate the CLIP similarity score using two unimodal encoders. In Table 1, the amount of data required compared to CLIP underscores that unimodal encoders are significantly more efficient to train. A small amount of multimodal data suffices to learn the mapping of unimodal features to a multimodal space, even if the training data are unprocessed by humans (COSMOS) or incorrectly labeled (ImageNet).
+
+# 7 CONCLUSIONS AND FUTURE WORKS
+
+In this work, we proposed CSA, which maps two unimodal feature spaces from pre-trained encoders to a multimodal feature space. CSA is extremely data-efficient. We characterize the intrinsic tradeoff of CSA, and CSA shows competitive performance compared to CLIP models in image classification, mislabeled data detection, text-to-LiDAR retrieval, and misinformation detection tasks with limited data. CSA also outperforms the state-of-the-art method in the same setting.
+
+Future work includes extending CSA to more than 2 modality pairs, just as generalized CCA (Horst, 1961) extends CCA to more sources. In addition, understanding the relationship between the size of the training set and its performance is crucial. If we can fine-tune the unimodal encoders, which loss function will result in the most suitable feature space for CSA remains an open problem. Lastly, CSA essentially finds a mapping function between two feature spaces, which need not be modality features. We aim to test CSA on mapping intramodal data, such as multi-view images of an object.
+
+# REPRODUCIBILITY STATEMENT
+
+For the theoretical analysis of this work, we state all assumptions made in the assumptions paragraph. For all the hyperparameters and detailed settings of the experiments, please refer to Appendix Section A. Lastly, we put the core code of CSA in the supplementary details. The code includes dataloaders, execution code, and links to download all the datasets and models used. We will provide an example configuration file after publication, as it contains non-anonymous directory paths.
+
+# ACKNOWLEDGEMENT
+
+This work was supported in part by the National Science Foundation grants No. 2133481 and No. 2148186, NASA 80NSSC21M0071, the Office of Naval Research (ONR) under Grant No. N00014-22-1-2254, the Defense Advanced Research Projects Agency (DARPA) contract FA8750-23-C-1018, and DARPA ANSR: RTXCW2231110. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. We also thank Mohammad Omama and Sai Shankar Narasimhan for their valuable feedback and discussions on the paper.
+
+# REFERENCES
+
+Andrea Agostinelli, Timo I. Denk, Zalán Borsos, Jesse Engel, Mauro Verzetti, Antoine Caillon, Qingqing Huang, Aren Jansen, Adam Roberts, Marco Tagliasacchi, Matt Sharifi, Neil Zeghidour, and Christian Frank. Musicl: Generating music from text, 2023. URL https://arxiv.org/abs/2301.11325.
+Shivangi Aneja, Chris Bregler, and Matthias Nießner. Cosmos: catching out-of-context image misuse with self-supervised learning. In AAAI, 2023. ISBN 978-1-57735-880-0. doi: 10.1609/aaai.v37i12.26648. URL https://doi.org/10.1609/aaai.v37i12.26648.
+Gabriele Berton, Carlo Masone, and Barbara Caputo. Rethinking visual geo-localization for large-scale applications. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2022.
+Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the International Conference on Computer Vision (ICCV), 2021.
+Daniel Cer, Yinfei Yang, Sheng yi Kong, Nan Hua, Nicole Limtiaco, Rhomni St. John, Noah Constant, Mario Guajardo-Cespedes, Steve Yuan, Chris Tar, Yun-Hsuan Sung, Brian Strope, and Ray Kurzweil. Universal sentence encoder, 2018. URL https://arxiv.org/abs/1803.11175.
+James Chapman and Hao-Ting Wang. Cca-zoo: A collection of regularized, deep learning based, kernel, and probabilistic cca methods in a scikit-learn style framework. Journal of Open Source Software, 6(68):3823, 2021.
+Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. Reproducible scaling laws for contrastive language-image learning. arXiv preprint arXiv:2212.07143, 2022.
+Maximilian Christ, Nils Braun, Julius Neuffer, and Andreas W Kempa-Liehr. Time series feature extraction on basis of scalable hypothesis tests (tsfresh-a python package). Neurocomputing, 307: 72-77, 2018.
+Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding, 2019.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=YicbFdNTTy.
+Samir Yitzhak Gadre, Gabriel Ilharco, Alex Fang, Jonathan Hayase, Georgios Smyrnis, Thao Nguyen, Ryan Marten, Mitchell Wortsman, Dhruba Ghosh, Jieyu Zhang, Eyal Orgad, Rahim Entezari, Giannis Daras, Sarah Pratt, Vivek Ramanujan, Yonatan Bitton, Kalyani Marathe, Stephen Mussmann, Richard Vencu, Mehdi Cherti, Ranjay Krishna, Pang Wei Koh, Olga Saukh, Alexander Ratner, Shuran Song, Hannaneh Hajishirzi, Ali Farhadi, Romain Beaumont, Sewoong Oh, Alex Dimakis, Jenia Jitsev, Yair Carmon, Vaishaal Shankar, and Ludwig Schmidt. Datacomp: In search of the next generation of multimodal datasets, 2023. URL https://arxiv.org/abs/2304.14108.
+Rohit Girdhar, Alaaeldin El-Nouby, Zhuang Liu, Mannat Singh, Kalyan Vasudev Alwala, Armand Joulin, and Ishan Misra. Imagebind: One embedding space to bind them all, 2023.
+Harsh Goel and Sai Shankar Narasimhan. Improving end-to-end autonomous driving with synthetic data from latent diffusion models. In First Vision and Language for Autonomous Driving and Robotics Workshop, 2024.
+Andrey Guzhov, Federico Raue, Jorn Hees, and Andreas Dengel. Audioclip: Extending clip to image, text and audio. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 976-980, 2022.
+
+David R. Hardoon, Sandor Szedmak, and John Shawe-Taylor. Canonical correlation analysis: An overview with application to learning methods. Neural Computation, 16(12):2639-2664, 2004.
+Paul Horst. Generalized canonical correlations and their application to experimental data. Journal of clinical psychology, 14, 1961.
+Gabriel Ilharco, Mitchell Wortsman, Ross Wightman, Cade Gordon, Nicholas Carlini, Rohan Taori, Achal Dave, Vaishaal Shankar, Hongseok Namkoong, John Miller, Hannaneh Hajishirzi, Ali Farhadi, and Ludwig Schmidt. Openclip, 2021.
+Wenlong Ji, Zhun Deng, Ryumei Nakada, James Zou, and Linjun Zhang. The power of contrast for feature learning: A theoretical analysis. Journal of Machine Learning Research, 24(330):1-78, 2023.
+Siddharth Joshi, Arnav Jain, Ali Payani, and Baharan Mirzasoleiman. Data-efficient contrastive language-image pretraining: Prioritizing data quality over quantity. In International Conference on Artificial Intelligence and Statistics, 2024.
+Po-han Li, Sravan Kumar Ankireddy, Ruihan Philip Zhao, Hossein Nourkhiz Mahjoub, Ehsan Moradi Pari, Ufuk Topcu, Sandeep Chinchali, and Hyeji Kim. Task-aware distributed source coding under dynamic bandwidth. Advances in Neural Information Processing Systems, 36, 2024a.
+Po-han Li, Oyku Selin Toprak, Aditya Narayanan, Ufuk Topcu, and Sandeep Chinchali. Online foundation model selection in robotics. arXiv preprint arXiv:2402.08570, 2024b.
+Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning, 2023.
+Qi Lyu and Xiao Fu. Nonlinear multiview analysis: Identifiability and neural network-assisted implementation. IEEE Transactions on Signal Processing, 68:2697-2712, 2020. URL https://ieeexplore.ieee.org/document/9064884/.
+Qi Lyu and Xiao Fu. Finite-sample analysis of deep CCA-based unsupervised post-nonlinear multimodal learning. IEEE Transactions on Neural Networks and Learning Systems, 34(11):9568-9574, 2023. URL https://ieeexplore.ieee.org/document/9747934/.
+Luca Moschella, Valentino Maiorca, Marco Fumero, Antonio Norelli, Francesco Locatello, and Emanuele Rodola. Relative representations enable zero-shot latent space communication. In International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=SrC-nwieGJ.
+Ryumei Nakada, Halil Ibrahim Gulluk, Zhun Deng, Wenlong Ji, James Zou, and Linjun Zhang. Understanding multimodal contrastive learning and incorporating unpaired data. In International Conference on Artificial Intelligence and Statistics, pp. 4348-4380. PMLR, 2023.
+Jianmo Ni, Chen Qu, Jing Lu, Zhuyun Dai, Gustavo Hernandez Abrego, Ji Ma, Vincent Zhao, Yi Luan, Keith Hall, Ming-Wei Chang, and Yinfei Yang. Large dual encoders are generalizable retrievers. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, December 2022. doi: 10.18653/v1/2022.emnlp-main.669. URL https://aclanthology.org/2022.emnlp-main.669.
+Antonio Norelli, Marco Fumero, Valentino Maiorca, Luca Moschella, Emanuele Rodolà, and Francesco Locatello. ASIF: Coupled data turns unimodal models to multimodal without training. In Advances in Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=XjOj3ZmWE1.
+Curtis G. Northcutt, Anish Athalye, and Jonas Mueller. Pervasive label errors in test sets destabilize machine learning benchmarks. In Proceedings of the 35th Conference on Neural Information Processing Systems Track on Datasets and Benchmarks, December 2021.
+Ryosuke Okuta, Yuya Unno, Daisuke Nishino, Shohei Hido, and Crissman Loomis. Copy: A numpy-compatible library for nvidiagpu calculations. In Proceedings of Workshop on Machine Learning Systems (LearningSys) in The Thirty-first Annual Conference on Neural Information Processing Systems (NIPS), 2017. URL http://learningsys.org/nips17/ assets/papers/paper_16.pdf.
+
+Mohammad Omama, Po-han Li, and Sandeep P Chinchali. Exploiting distribution constraints for scalable and efficient image retrieval. arXiv preprint arXiv:2410.07022, 2024.
+Maxime Oquab, Timothee Darcet, Theo Moutakanni, Huy Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel Haziza, Francisco Massa, Alaaeldin El-Nouby, Mahmoud Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Hervé Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. Dinov2: Learning robust visual features without supervision, 2023.
+Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, pp. 8748-8763, 2021.
+Viresh Ranjan, Nikhil Rasiwasia, and CV Jawahar. Multi-label cross-modal retrieval. In Proceedings of the IEEE international conference on computer vision, 2015.
+Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, 2018. doi: 10.18653/v1/P18-1238. URL https://aclanthology.org/P18-1238.
+Mohammad Shokoohi-Yekta, Bing Hu, Hongxia Jin, Jun Wang, and Eamonn Keogh. Generalizing dtw to the multi-dimensional case requires an adaptive approach. Data mining and knowledge discovery, 31:1-31, 2017.
+Mohit Shridhar, Lucas Manuelli, and Dieter Fox. CIoR: What and where pathways for robotic manipulation. In Proceedings of the 5th Conference on Robot Learning (CoRL), 2021.
+Sai Shubodh, Mohammad Omama, Husain Zaidi, Udit Singh Parihar, and Madhava Krishna. Liploc: Lidar image pretraining for cross-modal localization. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 948-957, 2024.
+Krishna Srinivasan, Karthik Raman, Jiecao Chen, Michael Bendersky, and Marc Najork. Wit: Wikipedia-based image text dataset for multimodal multilingual machine learning. In Proceedings of the 44th international ACM SIGIR conference on research and development in information retrieval, pp. 2443-2449, 2021.
+Zhongkai Sun, Prathusha Sarma, William Sethares, and Yingyu Liang. Learning relationships between text, audio, and video via deep canonical correlation for multimodal language analysis, 2019. URL http://arxiv.org/abs/1911.05544.
+Yuandong Tian. Understanding deep contrastive learning via coordinate-wise optimization. In Advances in Neural Information Processing Systems, 2022.
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023.
+Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding, 2019.
+
+Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579-2605, 2008. URL http://jmlr.org/papers/v9/vandermaaten08a.html.
+Vijay Vasudevan, Benjamin Caine, Raphael Gontijo Lopes, Sara Fridovich-Keil, and Rebecca Roelofs. When does dough become a bagel? analyzing the remaining mistakes on imagenet. Advances in Neural Information Processing Systems, 35:6720-6734, 2022.
+David Weenink. Canonical correlation analysis. In Proceedings of the Institute of Phonetic Sciences of the University of Amsterdam, volume 25, pp. 81-99. University of Amsterdam, 2003.
+Yusong Wu*, Ke Chen*, Tianyu Zhang*, Yuchen Hui*, Taylor Berg-Kirkpatrick, and Shlomo Dubnov. Large-scale contrastive language-audio pretraining with feature fusion and keyword-to-caption augmentation. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2023.
+Senqiao Yang, Jiaming Liu, Ray Zhang, Mingjie Pan, Zoey Guo, Xiaoqi Li, Zehui Chen, Peng Gao, Yandong Guo, and Shanghang Zhang. Lidar-llm: Exploring the potential of large language models for 3d lidar understanding. arXiv preprint arXiv:2312.14074, 2023.
+Peter Young, Alice Lai, Micah Hodosh, and Julia Hockenmaier. From image descriptions to visual denotations: New similarity metrics for semantic inference over event descriptions. Transactions of the Association for Computational Linguistics, 2:67-78, 2014.
+
+# Appendices
+
+# A ADDITIONAL DETAILS ON THE EXPERIMENTS
+
+We run all inferences of LLAVA and encoder models on an NVIDIA RTX A5000 GPU, and solving Equation 2 with 35,000 multimodal feature vectors on a 64 core Xeon Gold 6226R CPU machine takes less than 10 minutes. The implementation of CCA is from CCA Zoo Chapman & Wang (2021).
+
+Multimodal Encoders. The multimodal image-text encoder used throughout the experiments is laion/CLIP-ViT-bigG-14-laion2B-39B-b160k from Huggingface. The multimodal audio-text encoder used is laion/larger_clap_general from Huggingface (Wu* et al., 2023).
+
+Unimodal Encoders. We use several unimodal encoders and show the difference in performance in Section E. To encode images, we tested DINOv2-Giant (Oquab et al., 2023) and the unimodal part of the multimodal encoders previously mentioned. To encode text, we tested GTR-t5-large (Ni et al., 2022) and the unimodal part of the multimodal encoders mentioned above. To show CSA's ability to combine unimodal models, we never tried using the paired unimodal encoders of a multimodal encoder in our experiments, i.e., using CLIP to encode both images and text.
+
+Flickr30k. We trained ASIF and CSA on the Flickr validation set, which includes 145,000 images and 5 captions for each image. We then validated the models on a test set of 5,000 images and 25,000 captions.
+
+COSMOS. We trained ASIF and CSA on the COSMOS validation set, which includes 41,006 image-caption pairs. We then validated the models using a test set of 1,700 image-caption pairs, with half of the captions labeled as misinformation by human annotators.
+
+# B TOWARDS MORE MODALITIES—AUDIO AND TEXT
+
+
+Figure 7: Classification of YouTube audio and genre tags: CSA (blue) performs as well as CLAP, the CLIP-inspired multimodal audio and text encoder, and outperforms ASIF in classifying genre tags of YouTube audio.
+
+We now show CSA's generalization ability to more modalities with MusicCaps (Agostinelli et al., 2023). We use GTR and CLAP to encode YouTube audio along with the tagged genre descriptions of the audio. We conducted a classification task in which the models input the audio and a tag and output if the audio aligns with the caption. Similar to the mislabeled ImageNet experiment, we show the ROC curves and compare the AUC in Figure 7. We trained ASIF and CSA for 3,777 data points and tested all methods on 1,625 data points. We randomly sampled a tag for each data point during both training and inference. In Figure 7, we see that CSA performs as well as CLAP, the CLIP-inspired multimodal audio and text encoder, and outperforms ASIF. Thus, we conclude that CSA extends its capabilities beyond image and text, effectively handling audio and text as well.
+
+
+Figure 8: Correlation coefficients of COSMOS image and caption features under CSA: The data are inherently noisy, as indicated by the correlation coefficients of the unimodal feature spaces, which concentrate on 0.2 to 0.4. The unimodal encoders here are GTR and DINOv2.
+
+# C CORRELATION OF FEATURE SPACES
+
+To take a deeper look into unimodal feature spaces, we show the correlation coefficients of COSMOS image and caption features under CSA in Figure 8. The data are inherently noisy, as indicated by the correlation coefficients of the unimodal feature spaces, which concentrate on 0.2 to 0.4. This distribution of correlation coefficients highlights that, despite the fact that the original multimodal data are noisy and show complex correlations, CSA can effectively map them to a multimodal space where the similarity score remains meaningful for the zero-shot downstream tasks.
+
+# D SENSITIVITY TO HYPERPARAMETER $s$
+
+
Method
s
mAP
Precision@1
Precision@5
CSA
10
9.5%
18.1%
13.4%
CSA
50
32.7%
53.9%
40.0%
CSA
100
36.0%
58.3%
42.9%
CSA
200
36.6%
59.3%
43.4%
CSA
500
31.8%
56.3%
38.3%
CSA
750
27.3%
50.2%
33.6%
CLIP
X
73.8%
92.9%
77.2%
ASIF
X
14.6%
25.6%
20.0%
+
+(a) Image-to-text retrieval.
+
+
Method
s
Precision@1
CSA
10
15.2%
CSA
50
41.2%
CSA
100
43.8%
CSA
200
44.7%
CSA
500
41.7%
CSA
750
40.1%
CLIP
×
79.5%
ASIF
×
0.1%
+
+(b) Text-to-image retrieval.
+
+Table 3: Cross-modal retrieval on Flickr30k under different $s$ : CSA achieves optimal performance at $s = 200$ , and its performance degrades with increases and decreases in $s$ , illustrating the trade-off characterized in Section 5.
+
+Retrieval tasks: We show CSA's sensitivity to the hyperparameter $s$ in terms of the end performance. In Table 3, CSA achieves optimal performance in $s = 200$ , and its performance degrades with increases and decreases in $s$ , illustrating the trade-off characterized in Section 5. However, for tasks other than retrieval, we find that a larger $s$ improves performance in image classification, mislabeling detection, and misinformation caption detection. This phenomenon is likely due to the trade-off between distinguishability and informative embedding features, namely the distance between features. Although retrieval tasks require a more curated balance between these aspects, other tasks benefit from greater distinguishability of similarity scores.
+
+Detection tasks: Table 4 shows the sensitivity to hyperparameter $s$ of CSA on ImageNet mislabeled data and COSMOS misinformative news captions detection. The relation between hyperparameter $s$ and the AUC performance is different from retrieval tasks (Flickr30k and KITTI), as shown in Table 3. In detection tasks, the AUC increases as hyperparameter $s$ increases. We explained this phenomenon in the theoretical analysis with the perspective of feature distinguishability above.
+
+
+(a) Results for a training size of 5000.
+
+
+(b) Results for a training size of 35000.
+
+
+Figure 9: Detecting unlabeled ImageNet images (cont'd): CSA (blue) outperforms CLIP, ASIF, and LLaVA with a higher AUC. (a) and (b) illustrate the results for CSA and ASIF across various training set sizes, showing the superior performance of CSA with limited noisy training data. The unimodal encoders are GTR and CLIP (image) here.
+Figure 10: Detecting misinformative COSMOS captions (cont'd): CSA (blue) outperforms CLIP, ASIF, and LLaVA with a higher AUC. The supervised-learning method from the original COSMOS paper is the orange cross. It is the only method that outperforms CSA, though trained with supervised labels of object locations. The unimodal encoders are GTR and CLIP (image) here.
+
+# E SENSITIVITY TO UNIMODAL ENCODERS
+
+We change the unimodal encoders of ASIF and CSA to showcase their generalization ability to different unimodal encoders. Figure 9 shows the results on the detection of mistrabeled ImageNet data with other encoders, and Figure 10 shows the results on the detection of misinformative captions with other encoders. CSA again outperforms ASIF and CLIP while outperforming the results of the combination of GTR and DINOv2 in Section 6.
+
+# F TEXT-TO-LIDAR RETRIEVAL
+
+Settings: We additionally test CSA's capability on new, unexplored modality pairs. The KITTI dataset, designed for place recognition in autonomous vehicles, contains RGB and LiDAR images captured in Karlsruhe, Germany. To add a text modality, we use LLaVA Liu et al. (2023) to generate descriptive captions for the images with a prompt "Describe the static objects and the numbers of objects in the image within 20 words." In place recognition, autonomous vehicles utilize local RGB, LiDAR, and text captions to locate themselves within a city by retrieving the nearest landmark from a reference set. The landmarks act as the reference data, while the vehicles' local observations serve as query data, resulting in trimodal data for this task. We used Lip-loc Shubodh et al. (2024), and the image-LiDAR encoder, to encode the LiDAR data and GTR Ni et al. (2022) to encode the captions. The train set contains 5,000 cross-modal instances, and the test set contains 6,000 instances. The
+
+retrieval task here is to locate the vehicle at any landmark within 20 meters. We set this distance threshold per Shubodh et al. (2024).
+
+Results: We conducted retrieval on KITTI, augmented with textual captions. Figure 11 shows that CSA achieves the same performance as LiDAR-to-LiDAR retrieval, showcasing CSA's capability of bridging multimodal data. Notably, we are the first to perform text-to-LiDAR retrieval, only made possible by CSA, which maps LiDAR and text embeddings into a shared feature space.
+
+
+Figure 11: Text-to-LiDAR retrieval on KITTI: The figure shows the Recall@5 retrieval rate on KITTI. The cross-modal retrieval result from the LiDAR query is directly from Lip-loc, while the other with text is from CSA. CSA matches the performance of Lip-loc, which is trained on KITTI.
+
+
Method
s
AUC (ImageNet)
AUC (COSMOS)
CLIP
X
0.66
0.68
ASIF
X
0.50
0.64
CSA
10
0.54
0.65
25
0.59
0.66
50
0.62
0.68
100
0.65
0.69
500
0.72
0.70
700
0.73
0.70
+
+# G TEXT-TO-TIMESERIES CLASSIFICATION
+
+Setting: We now demonstrate the effect of CSA on more modality pairs. We conducted a classification of handwritten alphabets. One modality is the 3-dimensional time series of movement of pens on a pad Shokoohi-Yekta et al. (2017). The other modality is either the images of alphabets or the text of "Alphabet X." We leveraged tsfresh Christ et al. (2018) to extract statistical features from time series. We re-used the same image and text encoder as the main experiments in the paper for the other modalities. Note that tsfresh is not a contrastive-learning encoder but a statistical feature extractor, hence we also demonstrated CSA's ability to adapt any form of encoder.
+
+Results: The classification task is similar to that one of ImageNet. We calculated the AUC of multiple classification tasks (an alphabet each) and showed the average AUC under the "ovr (one-vs-rest)" setting. From Table 5, we see that CSA constantly outperforms ASIF by $0.1 \times$ of the performance. Notably, we are the first in the community to conduct multimodal classification with multivariate time series, so there are no comparable baselines.
+
+Table 4: Sensitivity to $s$ on detection tasks: As analyzed in the appendix of the main paper, the AUC increases as $s$ increases. This trend holds for all detection tasks, which is different from the trend of retrieval.
+
+
Method
Modality 1
Modality 2
AUC (one-vs-rest)
ASIF
time series
image
0.50
time series
text
0.50
CSA
time series
image
0.58
time series
text
0.54
+
+Table 5: Multimodal time series classification: We further demonstrated CSA's performance on multimodal time series classification, which is first in the community.
+
+
+(a) t-SNE embeddings of CLIP.
+
+
+(b) t-SNE embeddings of CSA.
+Figure 12: t-SNE visualization of embeddings: (a) shows the t-SNE visualization of CLIP image embeddings, and (b) shows the t-SNE visualization of CSA's embeddings. Both exhibit strong clustering of embeddings, with colors representing their respective classes.
+
+# H VISUALIZATION OF CSA EMBEDDINGS
+
+In Figure 12, we showed the t-SNE van der Maaten & Hinton (2008) visualization of ImageNet embeddings. We selected 20 classes out of 1000 classes. Both CLIP and CSA have strong clustering of embeddings, thus verifying that they have similar performance on image classification.
+
+# I LINEAR CLASSIFICATION OF EMBEDDINGS
+
+
+Figure 13: Classification of SVM with ImageNet embeddings: Trained linear SVMs enhance classification performance, providing a $10\%$ improvement over zero-shot cross-modal classification. Additionally, CLIP with SVM outperforms CSA with SVM by $5\%$ .
+
+We used linear support vector machines (SVMs) to classify CLIP's and CSA's image embeddings. Note that linear classification on image embeddings is fundamentally different from cross-modal classification with text embeddings. This experiment has nothing to do with cross-modal feature space but provides us insight into the clustering of the unimodal embeddings of CLIP and CSA. The results are shown in Figure 13. While CSA outperforms CLIP with SVM when limited to $5\mathrm{k}$ training samples, CLIP with SVM achieves $5\%$ higher classification performance than CSA with SVM when trained on $35\mathrm{k}$ samples, and $10\%$ higher than CLIP without SVM.
+
+# J ABLATION STUDY ON ENCODER ARCHITECTURES
+
+To further ablate the effect of CSA from the disparity of the unimodal encoder's architecture vs. the multimodal one's. We ran CSA with two different CLIP encoders with the same architecture but different train sets, hence having different feature spaces.
+
+
+(a) ImageNet classification.
+
+
+(b) Detecting unlabeled ImageNet images.
+Figure 14: CSA enhances performance across different encoder architectures: (a) and (b) demonstrate that CSA's success in image classification and mistrabeled data detection is due to the method itself, not the architecture of the unimodal encoders.
+
+Setting: All encoders are from the OpenCLIP library, and we choose 2 CLIP encoders with the same backbone (ViT-L/14) and trained on DataComp-1B Gadre et al. (2023) and WIT Srinivasan et al. (2021), respectively. The latter is the original model from OpenAI and the text encoder in the ablation study. Note that the models used here are smaller than the ones used in the main paper (ViT-G/14) as there are no multiple ViT-G/14 CLIP models, and the results are not directly comparable. The size of the train set here is 35,000 for detecting unlabeled images.
+
+Results: We used the two encoders to re-run the classification and mislabel detection of ImageNet. We show the results in Figure 14. We observe that CSA constantly outperforms CLIP even with the same encoder architecture, which justifies that the success of CSA is due to its method rather than the encoder architectures of the unimodal encoders.
\ No newline at end of file
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/images.zip b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..6f9c7763191fd24d78a314df0a7a4bb029bf5ade
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4b26f141a3d70f2084918c25d29160e62676d51964234eb30532477d5494ee86
+size 756310
diff --git a/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/layout.json b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..97e847b6773435f6fa519c4eeff1ab2259da77f0
--- /dev/null
+++ b/ICLR/2025/CSA_ Data-efficient Mapping of Unimodal Features to Multimodal Features/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c481646629f1c6d6e1b3720f3223da37bd140275e8bf0684ccd6ed25ac539c3c
+size 543518
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_content_list.json b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..6daad0d3a5987453822354447e3bc599a67112cc
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:235cc5fe5d06303640b22da9d986d8a1a7c6819226488c6aca049a2fffa7a867
+size 126783
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_model.json b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..721ae2c9b99118d05dc652074f5dde851dcd29cf
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d15f4631a43415fad1674e673bdb7973dd79a481df06db97bd53dada3bcf95f
+size 158031
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_origin.pdf b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9c3405d06228f7cf1c210ca91bd5f89ac9805373
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/091330f2-3273-4f10-a61f-c186effe2d88_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f5b47956e6db49f23b6c16a2c412f19f8f31124c99a8c0b7219c48cb8fa686fb
+size 1906416
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/full.md b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..9657ade00219a42596c72fa2035da9f0395e76fe
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/full.md
@@ -0,0 +1,515 @@
+# CTSYN: A FOUNDATION MODEL FOR CROSS TABULAR DATA GENERATION
+
+Xiaofeng Lin1, Chenheng Xu1, Matthew Yang2, Guang Cheng1
+
+$^{1}$ Department of Statistics and Data Science, University of California Los Angeles CA, USA
+$^{2}$ Department of Computer Science, University of California Los Angeles, CA, USA
+
+{bernardo1998, chenhengx0101, ymatt24, guangcheng}@ucla.edu
+
+# ABSTRACT
+
+Generative Foundation Models (GFMs) have achieved remarkable success in producing high-quality synthetic data for images and text. However, their application to tabular data presents significant challenges due to the heterogeneous nature of table features. Current cross-table learning frameworks struggle because they lack a generative model backbone and an effective mechanism to decode heterogeneous feature values. To address these challenges, we propose the Cross-Table Synthesizer (CTSyn), a diffusion-based generative foundation model for tabular data generation. CTSyn comprises two key components. The first is an autoencoder network that consolidates diverse tables into a unified latent space. It dynamically reconstructs table values using a table schema embedding, allowing adaptation to heterogeneous datasets. The second is a conditional latent diffusion model that generates samples from the learned latent space, conditioned on the table schema. Through large-scale pre-training, CTSyn outperforms existing table synthesizers on standard benchmarks in both utility and diversity. These results position CTSyn as a promising framework for synthetic table generation and lay the groundwork for developing large-scale tabular foundation models.
+
+# 1 INTRODUCTION
+
+Generative Foundation Models (GFMs) have revolutionized fields such as Computer Vision (CV) and Natural Language Processing (NLP)(Bommasani et al., 2021; He et al., 2016; OpenAI, 2023; Touvron et al., 2023; Ramesh et al., 2022; Rombach et al., 2022). Trained on vast datasets (Merit et al., 2016; Deng et al., 2009; Schuhmann et al., 2022) and with versatile model backbones (Vaswani et al., 2017; Ho et al., 2020), these models excel across a diverse range of domains and tasks. They can generate valuable synthetic training examples to enhance the performance of various downstream applications (Kirillov et al., 2023; Li et al., 2023b; Moor et al., 2023; Trabucco et al., 2023; Zhang et al., 2023a).
+
+GFMs also hold immense potential for generating tabular data, a modality essential to many real-world applications (Dash et al., 2019; Borisov et al., 2022; Shwartz-Ziv & Armon, 2022). Despite the ubiquity of tabular data, obtaining high-quality samples for modeling remains a challenge. Although tabular data synthesizers have increasingly gained attention (Xu et al., 2019; Kotelnikov et al., 2023; McKenna et al., 2022), they yield little performance improvement in downstream models when real data is limited (Elor & Averbuch-Elor, 2022; Manousakas & Aydore, 2023). This limitation stems from a fundamental constraint: synthesizers cannot generate information beyond what is present in the original training data. Tabular GFMs have the potential to overcome this limitation by leveraging diverse pre-training data.
+
+Despite these opportunities, implementing tabular GFMs remains particularly challenging and largely overlooked due to the heterogeneity of column structures, feature sets, and value ranges (Onishi et al., 2023; Huang et al., 2020; Borisov et al., 2022; Zhu et al., 2023; van Breugel & van der Schaar, 2024). Existing methods for transferable tabular learning either model tables with language models (Ye et al., 2024; Wang & Sun, 2022; Hegselmann et al., 2023; Yan et al., 2024) or attempt to learn a unified latent space across datasets (Wang & Sun, 2022; Onishi et al., 2023; Zhu et al., 2023;
+
+Ye et al., 2023). These methods either lack generative capability or rely on pre-trained language models that process tables as unstructured text, distorting structural information and metadata that are critical for effective tabular modeling.
+
+To address these limitations, we propose $CTSyn$ , a foundational model specifically designed for generating heterogeneous tables.
+
+- Unified table representation and reconstruction: We developed a cross-tabular autoencoder that embeds heterogeneous table rows, projects them into a unified latent space, and decodes tabular values using table metadata as guidance. This approach enables model training across diverse tabular formats, overcoming data-specific structural constraints while preserving structural information in a table-consistent manner.
+- Generative foundation model: Our versatile conditional diffusion transformer backbone efficiently samples from the unified latent space, enhancing flexibility and applicability across diverse tabular domains.
+- Cross-tabular pre-training: We conduct extensive cross-tabular pre-training on a large-scale web-scale dataset containing 5 million rows. With diverse data domains covering common table applications, this pre-training serves as a foundation for various downstream generation tasks.
+
+Through extensive benchmarking with real-world datasets, we demonstrate that CTSyn extends the pre-training/fine-tuning paradigm to tabular data generation, achieving state-of-the-art (SOTA) performance on low-data regime. Crucially, by effectively leveraging prior knowledge and incorporating table metadata, our model unlocks unprecedented potential in synthetic tabular data generation and holds immense promise for extending to various tabular tasks such as regression and classification.
+
+# 2 RELATED WORK
+
+# 2.1 TRANSFERABLE TABLE REPRESENTATION
+
+Self-supervised learning can significantly improve representation quality for various downstream tasks (Gururangan et al., 2020; Yuan et al., 2021b; Wei et al., 2021; Chen et al., 2024). In the tabular domain, methods like VIME (Yoon et al., 2020) train an encoder using a combination of supervised reconstruction loss and mask-array prediction loss, while SCARF (Bahri et al., 2022) employs contrastive loss by utilizing randomly corrupted feature vectors as positive pairs. Subtab (Ucar et al., 2021) and SSP (Chitlangia et al., 2022) integrate contrastive and reconstruction losses. However, these approaches do not produce transferable representations across tables, as they rely on data-specific feature encodings and structures.
+
+Xtab (Zhu et al., 2023) and TabRet (Onishi et al., 2023) introduce transformer-based backbones with separate data-specific featurizers or projection heads for each downstream task. These models achieve transferability at the expense of increasing model complexity as the number of datasets and tasks grows.
+
+Pre-trained Language Models (PLMs) can be used to unify representation dimensions of heterogeneous features. TransTab (Wang & Sun, 2022) extends Subtab's methodology by tokenizing and then encoding column names and categories, creating a latent space that can be shared across tables. By combining tokenization with a masked-value prediction objective, transformer-based models can be trained to perform predictive tasks across tables (Ye et al., 2024; Yak et al., 2023; Yang et al., 2024; Yan et al., 2024). However, such methods include neither a generative model backbone nor a fixed-dimensional row representation and decoder that can be integrated with other generative models.
+
+Another line of research involving PLMs converts tabular features to sentences and models regression/classification problems as NLP tasks (Dinh et al., 2022; Hegselmann et al., 2023; Borisov et al., 2023; Liu et al., 2022; Zhang et al., 2023c;b). Despite enabling transfer learning, these methods face challenges in accurately modeling continuous values and tend to overlook the intrinsic structural properties of tables (van Breugel & van der Schaar, 2024).
+
+
+
+
+Figure 1: Overview of the proposed CTSyn framework.
+
+# 2.2 SYNTHETIC TABULAR DATA GENERATION
+
+Synthetic Tabular Data Generation (STDG) has long been studied by statisticians (Nowok et al., 2016; Reiter, 2005; Chawla et al., 2002). Recent advances in deep generative models have significantly pushed its boundaries (Che et al., 2017; Kim et al., 2021; Figueira & Vaz, 2022).
+
+In particular, CTGAN and TVAE (Xu et al., 2019) combine conditional generation with Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), along with model-specific normalization, to handle highly imbalanced and non-Gaussian columns. CtabGAN+ (Zhao et al., 2021; 2024) proposes a solution for handling mixed-type and long-tailed variable distributions. Autodiff (Suh et al., 2023) and Tabsyn (Zhang et al., 2024) use a combination of latent diffusion and data-specific autoencoder structures. While these are the most similar works to ours, they lack critical transferable encoding and decoding capabilities. TabDDPM (Kotelnikov et al., 2023) achieves the current state-of-the-art in tabular generation by employing separate diffusion processes for numerical and categorical columns.
+
+Some models also synthesize data with Differential Privacy guarantees (Jordon et al., 2018; Zhang et al., 2017; McKenna et al., 2022). Despite their effectiveness in modeling column distributions, none of the above methods is able to effectively boost the training of machine learning models with synthesized data, greatly limiting their usage in data augmentation (Manousakas & Aydore, 2023).
+
+GReaT (Borisov et al., 2023) and Tabula (Zhao et al., 2023) generate tables using PLMs by treating table rows as natural language text. Despite showing evidence of transferability, they do not consider cross-table pre-training and generation. Additionally, they introduce the risk of producing out-of-bound examples due to unconstrained sampling of output tokens and face the well-known challenge of modeling numeracy in a discrete token space (Wallace et al., 2019).
+
+# 3 METHODOLOGY
+
+In this section, we outline $CTSyn$ , our approach to overcoming the challenges of developing a tabular GFM. Figure 1 provides an overview of the proposed framework.
+
+# 3.1 FEATURE EMBEDDING
+
+Let an observation (row) in a mixed-type table be represented as
+
+$$
+\boldsymbol {x} = (c _ {1}, x _ {1}, c _ {2}, x _ {2}, \dots , c _ {p}, x _ {p}),
+$$
+
+where $c_{i}$ for $i = 1,2,\ldots ,p$ are the feature names, and $x_{i}$ for $i = 1,2,\ldots ,p$ are the corresponding feature values, which can be either numerical or categorical. The parameter $p$ denotes the number of features in this row. Let $m_{\mathrm{meta}}$ be the text metadata describing the context of the table.
+
+To facilitate knowledge transfer across tables, it is crucial to develop a unified representation that preserves information at the cell, observation, and table levels. Using techniques such as one-hot encoding and min-max normalization results in the loss of structural and contextual information: tables with entirely different contents can end up with identical representations. Thus, we tokenize and embed all levels of information into vectors of consistent dimensions to facilitate unified modeling.
+
+The first step in this process is consolidating all text metadata, column names, and categorical values, ensuring that integer class labels and abbreviations are expanded into their full textual forms to preserve their original meanings. Then, we create embeddings as follows:
+
+$$
+e _ {m} = \operatorname {L M} (m), \quad e _ {c _ {i}} = \operatorname {L M} (c _ {i}), \quad e _ {x _ {i}} = \left\{ \begin{array}{l l} \operatorname {L M} (x _ {i}) & \text {i f x _ {i} i s c a t e g o r i c a l}, \\ \operatorname {Q u a n t i l e} (x _ {i}) \cdot \mathbf {1} & \text {i f x _ {i} i s n u m e r i c a l} \end{array} \right.
+$$
+
+where LM is a pre-trained text embedding model that is invoked only once for each unique category or column name. Quantile is a quantile transformer (Pedregosa et al., 2011) fitted to the dataset, mapping numerical values to a uniform distribution. $\mathbf{1}$ is a vector of ones with the same dimension as $M_{\mathrm{LM}}$ , ensuring that numerical and categorical embeddings maintain consistent dimensionality.
+
+Finally, we interleave all embeddings and flatten them into a sequence:
+
+$$
+\boldsymbol {E} = \left[ \left(e _ {c _ {1}}, e _ {x _ {1}}\right), \left(e _ {c _ {2}}, e _ {x _ {2}}\right), \dots , \left(e _ {c _ {p}}, e _ {x _ {p}}\right) \right] \in \mathbb {R} ^ {p \times 2 M _ {\mathrm {L M}}}, \tag {1}
+$$
+
+where $M_{\mathrm{LM}}$ is the dimensionality of the language model embeddings. Each step in the sequence is formed by concatenating the column name embedding $e_{c_i}$ with the corresponding column value embedding $e_{x_i}$ . This interleaving creates cell-level representations that encapsulate both column type and value context, eliminating the need to learn the relative positions of column names and values in the sequence. This design aligns with the permutation-invariant property of tabular data.
+
+# 3.2 AUTOENCODER FOR HETEROGENEOUS TABLES
+
+Encoder: To facilitate efficient learning of the diffusion model, we use an encoder model $f$ to further compress the input sequence $E$ into a fixed-dimensional latent vector:
+
+$$
+\boldsymbol {z} = \boldsymbol {f} (\boldsymbol {E}) \in \mathbb {R} ^ {\ell \times M _ {\mathrm {a g g}}},
+$$
+
+where $\ell$ is the latent dimension, and $M_{\mathrm{agg}}$ is the size of each latent vector. The encoder is based on the Perceiver Resampler (Yuan et al., 2021a), consisting of multi-head attention (MHA) blocks and linear layers. The learnable latent parameters serve as queries, while the keys and values consist of the concatenation of the latent queries and the flattened input sequence $\pmb{E}$ .
+
+In each layer of the encoder, a cross-attention operation is performed where the latent queries iteratively attend to both the input sequence (in the first layer) and the latent representations (in subsequent layers). Formally, the output of one attention block is given by:
+
+$$
+\boldsymbol {Z} ^ {(l + 1)} = \mathrm {F F N} \left(\boldsymbol {Z} ^ {(l)} + \mathrm {M H A} (q = \boldsymbol {Z} ^ {(l)}, k v = \boldsymbol {Z} ^ {(l)})\right),
+$$
+
+where $Z^{(l)}$ is the latent representation at layer $l$ , MHA( $\cdot$ ) represents the multi-head attention operation, and FFN is a feedforward network. At the first layer ( $l = 0$ ), the keys and values are the concatenation of the latent queries and the input sequence, i.e., $kv = [Z^{(0)}; E]$ .
+
+Note that we do not include positional embeddings in the sequence $\pmb{E}$ to maintain the permutation invariance property of tabular features.
+
+Following the variational autoencoder (VAE) framework, we use two separate encoders, where each output serves as either the mean vector $\mu \in \mathbb{R}^{\ell \times M_{\mathrm{agg}}}$ or the log-variance vector $\log \sigma^2 \in \mathbb{R}^{\ell \times M_{\mathrm{agg}}}$ , respectively. The encoder outputs parameterize the latent distribution, and for each input, we sample the latent vector $z$ using the reparameterization trick, given the predicted mean $\mu$ and log-variance $\log \sigma^2$ .
+
+Decoder with Meta Guidance: To enable cross-tabular training, the decoder must handle varying column orders and combinations of mixed-type columns while ensuring permutation invariance. Since positional embeddings are excluded during encoding, our approach uses a cross-attention-based transformer decoder, where the column order in the decoder is guided by explicit embeddings of the target column names.
+
+We encode the column names using a PLM as:
+
+$$
+\boldsymbol {E} _ {\boldsymbol {c}} = \left[ e _ {\mathrm {c} _ {1}}, e _ {\mathrm {c} _ {2}}, \dots , e _ {\mathrm {c} _ {p}} \right],
+$$
+
+where each $e_{\mathrm{c}_i}$ represents the embedding of column $c_i$ . These embeddings serve as queries for the decoder.
+
+The table metadata embedding $e_m$ is concatenated with the latent variables $z$ (derived from the encoder) to form the keys and values. The decoder $g(\cdot)$ operates by cross-attending to $E_c$ and $[e_m, z]$ . The order of the output from the decoder is thus determined by the order of columns in $E_c$ , and the model learns to dynamically extract cell information from the row latent representation. The output of the decoder is:
+
+$$
+h = g \left(\boldsymbol {E} _ {c}, \left[ e _ {m}; f (\boldsymbol {E}) \right]\right) \in \mathbb {R} ^ {p \times M _ {\text {d e c o d e d}}}.
+$$
+
+Table reconstruction: The decoded embeddings are used to reconstruct the table cell values.
+
+For numerical variables, the decoding process transforms the embedding back into scalar values using a linear layer followed by a sigmoid activation function, producing the predicted value:
+
+$$
+\hat {x} _ {i} ^ {\text {n u m}} = \operatorname {S i g m o i d} \left(\operatorname {L i n e a r} \left(h _ {i}\right)\right).
+$$
+
+For categorical columns, we use a loss based on cosine similarity to accommodate unseen categories in real-world applications. Inspired by (Yak et al., 2023), we compute the cosine similarity by first refining both the reconstructed embeddings and the PLM embeddings of all real categories using a linear layer. Then, we calculate the cosine similarity between these embeddings, apply softmax to the similarities, and use the resulting distribution as the predicted class probabilities:
+
+$$
+\hat {P} \left(x _ {j} ^ {\mathrm {c a t}}\right) = \operatorname {S o f t m a x} \left(\operatorname {C o s i n e S i m} \left(\operatorname {L i n e a r} \left(h _ {j}\right), \operatorname {L i n e a r} (C)\right)\right),
+$$
+
+where $h_i$ and $h_j$ are the latent representations of the $i$ -th numerical cell and $j$ -th categorical cell, respectively, and $C$ represents the set of embeddings for all possible categories in the column. These predicted probabilities and values are then used to reconstruct the original table by mapping the latent space to the appropriate categorical or numerical values for each cell.
+
+Training VAE: Following the $\beta$ -VAE setup (Higgins et al., 2017), the overall objective is a combination of numerical and categorical reconstruction losses and KL-regularization on the latent space:
+
+$$
+\mathcal {L} = \sum_ {i = 1} ^ {p} \mathcal {L} _ {\text {n u m}} \left(x _ {i} ^ {\text {n u m}}, \hat {x} _ {i} ^ {\text {n u m}}\right) + \sum_ {j = 1} ^ {q} \mathcal {L} _ {\text {c a t}} \left(x _ {j} ^ {\text {c a t}}, \hat {P} \left(x _ {j} ^ {\text {c a t}}\right)\right) + \beta \sum_ {k = 1} ^ {\ell} D _ {\mathrm {K L}} \left(\mathcal {N} \left(\mu_ {k}, \sigma_ {k} ^ {2}\right) \| \mathcal {N} (0, 1)\right),
+$$
+
+where $\mathcal{L}_{\mathrm{num}}$ is the MSE loss for numerical variables, $\mathcal{L}_{\mathrm{cat}}$ is the cross-entropy loss for categorical variables, $D_{\mathrm{KL}}$ is the KL-divergence between the learned latent distribution $\mathcal{N}(\mu_k,\sigma_k^2)$ and the standard Gaussian $\mathcal{N}(0,1)$ , and $\beta$ is a weighting factor balancing the reconstruction and KL-divergence terms.
+
+Implementation: We use four cross-attention layers for both the encoder and decoder, with $\ell = 16$ latent dimensions and $M_{\mathrm{agg}} = 64$ . All VAE models in this paper are trained using the AdamW optimizer with an initial learning rate of 0.0002. The learning rate is multiplied by 0.95 if the validation loss does not improve for 10 consecutive epochs.
+
+We use a $\beta$ -VAE setup, starting with $\beta_{\mathrm{max}} = 10^{-2}$ , and gradually decrease $\beta$ by multiplying it by 0.7 when the reconstruction loss does not improve for 5 consecutive epochs, until reaching a minimum value of $10^{-5}$ .
+
+We construct training batches to contain samples from the same source table, improving training efficiency by reducing inter-domain contrast, as unrealistic domain shifts are not representative of real-world applications. We use GTE-large (Li et al., 2023a) as our text embedding model, as it provides robust representations for metadata and categorical features.
+
+# 3.3 CONDITIONAL DIFFUSION MODEL FOR LATENT VECTOR GENERATION
+
+For cross-tabular generation, a conditional latent diffusion model is preferred because table schemas can vary significantly across domains, with different column types and distributions. An unconditional model would struggle to generalize across these diverse formats, making fine-tuning more difficult for domain-specific tasks. We follow the Denoising Diffusion Probabilistic Model (DDPM) formulation to train a conditional diffusion model, with the objective specified below. The input latent variable $z$ is derived from our VAE.
+
+For the denoising objective, we utilize the $v$ -parameterization strategy, which is more effective for latent diffusion than the classic noise prediction strategy. We condition the embedding generation on the embedding sequence $[e_m, E_c]$ , which encompasses the schema of the desired table. The model is trained with the following loss function:
+
+$$
+\mathcal {L} (\theta) = \mathbb {E} _ {t, (z _ {\mathrm {s r c}}, z _ {\mathrm {t r g}}), \epsilon} \left[ \lambda_ {t} \left\| \hat {z} _ {\theta} \left(\sqrt {\alpha_ {t}} z _ {\mathrm {t r g}} + \sqrt {1 - \alpha_ {t}} \epsilon , t, [ e _ {m}, E _ {c} ]\right) - z _ {\mathrm {t r g}} \right\| _ {2} ^ {2} \right],
+$$
+
+where $z_{\mathrm{trg}}$ is the latent variable from the target sequence, and $\alpha_{t}$ is the noise schedule. Classifier-free guidance is used to improve sample quality, with conditional and unconditional networks jointly trained, where conditioning is dropped with a probability of 0.1 during training.
+
+Following the specifications in Lovelace et al. (2024), our diffusion model uses a pre-LayerNorm transformer architecture with 12 layers, a hidden dimension of 768, learnable absolute positional encodings, and a GeGLU activation function. The noise level is conditioned via a sinusoidal time embedding, which is processed by an MLP and added to the input sequence. Adaptive layer normalization is applied to each feedforward layer, conditioned on the time embedding. We use the AdamW optimizer with a learning rate of 0.0001, a cosine annealing scheduler, a batch size of 256, and 250 sampling steps.
+
+# 4 EXPERIMENT
+
+# 4.1 EVALUATION SETUP
+
+In this section, we evaluate the performance of CTSyn in representing tables and generating informative and diverse synthetic tabular data. Our primary research questions are: 1. Does pre-training on large, general datasets improve the quality of synthetic data generation for downstream tasks? 2. How does the inclusion of metadata and table schema help CTSyn create effective and transferable table representations?
+
+Baselines: We compare our method against a wide array of baselines in synthetic data generation. These include modified SMOTE (Chawla et al., 2002), CTGAN and TVAE (Xu et al., 2019), TabDDPM (Kotelnikov et al., 2023), TabSyn (Zhang et al., 2024), AIM (McKenna et al., 2022), PATE-CTGAN (Jordon et al., 2018), and GReaT (Borisov et al., 2023). The implementation of baselines is detailed in Section B.
+
+Dataset Construction: We use a filtered version of the OpenTab dataset (Ye et al., 2024) as our pretraining set. The filtering follows the strategy outlined in (Yan et al., 2024), which excludes duplicate tables, tables containing free-text, date-time, or personally identifiable information (PII) columns, tables with fewer than 10,000 rows, and tables with categorical columns in integer label format that cannot be mapped back to their original string representations. After filtering, the pre-training set comprises 86 tables with a total of 5.01 million observations. Note that while the multi-modal representation framework of CTSyn is extensible to include text and date-time variables, we focus on numerical and categorical variables in this work (an extension to text and date-time is demonstrated in Appendix F).
+
+For downstream benchmarking, we evaluate eleven real-world datasets widely used in the tabular synthesis literature (Suh et al., 2023; Kotelnikov et al., 2023; Zhang et al., 2024) (see Table 1). To avoid any data leakage, we manually verify that none of the datasets used for pre-training appear in the downstream benchmarks; further details on these datasets can be found in Appendix C. For each downstream dataset, we randomly split the data into a fine-tuning set $(80\%)$ and a held-out test set $(20\%)$ . The fine-tuning set is then randomly shuffled, and few-shot subsets are created by
+
+selecting the first 30, 50, 100, 200, and 500 rows, respectively. This procedure allows us to assess the performance of synthetic data generation in low-data scenarios. For each few-shot subset, a separate generator is trained, and three synthetic tables are generated over three independent trials. All synthetic tables generated for a given downstream dataset are evaluated using the same held-out test set. Synthetic data modeled from different subsets are all sampled to 500 observations to ensure a fair comparison and highlight impact of training data size.
+
+For CTSyn, we pre-train the autoencoder for 300 epochs and the diffusion model for 200,000 steps. For fine-tuning, we train the conditional diffusion model and decoder network of the autoencoder while freezing the encoder to maintain alignment in the latent space. We fine-tune the decoder for 100 epochs and the diffusion model for 10,000 steps.
+
+Metadata: The text data describing table context was generated by querying the ChatGPT-4o (OpenAI, 2024) model with the first 10 rows of each table and prompting it to generate a
+
+description of the table's context, domain, and potential use cases. The prompt and metadata generation process is detailed in Appendix G.
+
+
+
+Table 2: Statistical Fidelity Metrics. Scores are averaged across benchmark datasets.
+
+We evaluate the similarity between real and synthetic tables based on the marginal distributions of columns, column-wise correlations, and sample-level coverage.
+
+For column distributions, we use the Kolmogorov-Smirnov (KS) test for numerical columns and Total Variation Distance (TVD) for categorical columns, subtracting them from one so that higher values indicate better similarity. For column-wise correlation, we apply Pearson's correlation for numerical columns, a contingency similarity metric for categorical columns, and a combined method for mixed types (Dat, 2023). For sample-level coverage, we measure precision and recall to quantify the overlap between real and synthetic data (Alaa et al., 2022).
+
+Table 2 presents the average similarity of column distributions and correlations across benchmark datasets. CTSyn consistently matches or exceeds state-of-the-art baselines. While methods like TabSyn and SMOTE excel in maintaining lower-order statistical similarity due to their focus on replicating training data distributions, CTSyn demonstrates superior performance in capturing complex relationships between columns. This is particularly evident in its higher correlation scores and significantly better recall, indicating its ability to preserve important structural relationships within the data, as well as benefiting from the regularization effect of pre-training.
+
+# 4.3 MACHINE LEARNING UTILITY
+
+To evaluating machine learning utility of synthetic data, we fit the following classifiers: logistic regression, Naïve Bayes, decision tree, random forest, XGBoost (Chen & Guestrin, 2016), and Cat-
+
+
+(a) Classification F1-Scores
+
+
+(b) Regression RMSE
+Figure 2: Downstream Machine Learning Utility on Classification and Regression Datasets, on synthetic data from different generators.
+
+Boost (Prokhorenkova et al., 2018), and then evaluate them on the holdout test set. Figure 2 reports the average classification F1-score (for classification datasets) and regression root mean squared error (RMSE) across models and shots. For clarity, only the top five performing models are shown. We report scores for the remaining models in Appendix E.
+
+We observe that for the low-data regime (See-dat et al.) with $N \leq 100$ , CTSyn consistently outperforms all baselines and even real data at the corresponding scale. The performance gap widens in the 100-200 shot range. This indicates CTSyn's ability to leverage pre-training data to assist training when real data is limited. Note that GReaT failed to generate text that follows the tabular format for $N < 100$ . However, as the data size increases further, the advantage of CTSyn diminishes. We conjecture that this phenomenon is due to an ineffective transfer learning setup and leave the exploration of transfer learning for tabular GFMs beyond the simple pre-training/fine-tuning paradigm to future work.
+
+
Model
PCT
Authenticity
SMOTE
0.82 (0.24)
0.88 (0.03)
CTGAN
0.84 (0.04)
0.91 (0.29)
TVAE
0.84 (0.01)
0.95 (0.31)
AIM
1.00 (0.00)
1.00 (0.00)
PATECTGAN
1.00 (0.00)
1.00 (0.06)
TabDDPM
0.85 (0.07)
0.87 (0.16)
TabSyn
0.80 (0.03)
0.93 (0.03)
GReaT
0.74 (0.21)
0.79 (0.03)
CTSyn
0.90 (0.02)
0.97 (0.06)
+
+Table 3: Privacy scores of synthesized data. Best scores of non-DP synthesizers are bolded.
+
+# 4.4 DIVERSITY AND PRIVACY
+
+We evaluate the diversity and privacy of the synthesized data using two metrics: the proportion of synthetic examples with L2 distance closer to the test set (PCT) compared to the training set (Platzer & Reutterer, 2021), and authenticity scores (Alaa et al., 2022), which assess the likelihood that a synthetic data point is genuinely generated rather than a memorization of real data. Lower PCT or authenticity values suggest that synthetic data points are too close to the training set, raising concerns about potential memorization risk. A powerful generator can easily memorize training data, achieving falsely high fidelity and utility without truly generating new samples, thus harming downstream model generalization and breaching individual privacy.
+
+Table 3 presents the diversity scores. CTSyn achieves the highest PCT and authenticity scores compared to state-of-the-art models like TabDDPM and TabSyn, indicating that CTSyn produces more distinct synthetic data. CTSyn's high PCT scores are comparable to those of AIM and PATECTGAN, which incorporate Differential Privacy (DP) mechanisms to reduce proximity to real data. However, these DP models have demonstrated poor fidelity and utility in previous sections. CTSyn,
+
+by contrast, achieves a balance between data utility, diversity, and privacy, further supporting the claim that pre-training acts as regularization.
+
+
+
+
+
+
+
+
+
+
+Figure 3: T-sne plot of Indian Liver Patient dataset from different synthesizers.
+
+
+Synthetic data Test data
+
+
+
+
+
+We further illustrate the diversity of synthesized data using a 2D t-SNE projection in Figure 3 for the Indian Liver Patient dataset. Among all synthesizers, CTSyn generates the most diverse data distribution, covering a wider region around the test set. In contrast, baseline models tend to overfit to regions surrounding certain data points. This diversity, enabled by pre-training, explains CTSyn's superior utility, as the diverse pre-training data serves as implicit regularization, promoting better generalization.
+
+# 4.5 ABLATION STUDY
+
+
Variants
In-distribution
Unseen Columns
Permuted Columns
MSE
Acc
MSE
Acc
MSE
Acc
Column & Meta
0.0004
0.94
0.0063
0.76
0.0005
0.94
Column Name Only
0.0007
0.93
0.0068
0.68
0.0006
0.93
Meta Only
0.0008
0.91
0.0082
0.61
0.0009
0.91
PE Only
0.006
0.87
0.07
0.54
0.08
0.67
+
+Table 4: Reconstruction performance of different autoencoder settings.
+
+Importance of Metadata. We evaluate the key factors for effective cross-tabular representation and reconstruction by testing different autoencoder variations: removing column name embeddings in decoder guidance, removing both column names and metadata embeddings while using positional encoding to encoder on positions of sequnce $\pmb{E}$ . These models are trained on the same pre-training data and tested on three scenarios: (1) in-distribution data from the validation splits, (2) unseen data from downstream test datasets, and (3) Permuted data, where column order is randomly permuted.
+
+Table 4 presents the results in terms of Mean Squared Error (MSE) and categorical accuracy. Removing column names primarily affects categorical column reconstruction, emphasizing the need for contextual representation. The replacement of metadata with PE significantly worsens performance, particularly when handling permuted column order. This highlights a fundamental distinction between tables and unstructured data like text: tables have permutation-invariant structures, and relying on positional information, as in PE, is ineffective.
+
+We further observe that while retaining column names alone results in some performance degradation compared to the full model, the impact is less severe than dropping column names entirely. This outcome highlights the importance of column names in capturing table structure and semantics. We
+
+conjecture that this robustness arises from our diverse pre-training dataset, where column names act as proxies for metadata.
+
+
Model
Pretrained
Shape
Corr
Synth F1
Synth RMSE
PCT
CTSyn
✓
0.94
0.95
0.84
0.13
0.97
×
0.96
0.90
0.80
0.17
0.90
GReaT
✓
0.90
0.71
0.79
3.75
0.88
×
0.90
0.64
0.83
0.18
0.79
TabSyn
✓
0.88
0.82
0.75
0.23
0.90
×
0.97
0.93
0.84
0.14
0.93
+
+Table 5: Impact of transfer learning on different models.
+
+Impact of Pre-training. We compare different models' potential to leverage pre-training data. We repeat the experiments with CTSyn trained without pre-training, while GReaT and TabSyn are also pre-trained before training on downstream benchmarks. For GReaT, we pool all pre-training data into one datalocator to train a pre-trained distilled GPT-2 and use the resulting model as initialization for downstream benchmark training. For TabSyn, since its model structure is data-specific, we first train separate VAE networks for each pre-training table, pool, and zero-pad all embeddings to the same length, and use them to train a latent diffusion model. During downstream training, the VAE embeddings are padded to the same dimension as in pre-training.
+
+As shown in Table 5, the performance of CTSyn degrades without pre-training, though it remains on par with other state-of-the-art models across all dimensions. On the other hand, the change in performance of GReaT and TabSyn with pre-training is mostly negative, indicating their inability to effectively translate knowledge across tabular domains and further reinforcing the need for a model that comprehensively encodes tabular structure information like CTSyn.
+
+# 5 CONCLUSION
+
+In this paper, we introduced CTSyn, a pioneering framework within the realm of Generative Foundation Models (GFMs) for tabular data. Through extensive experimentation on real-world datasets, we demonstrated that CTSyn effectively represents heterogeneous tabular data while leveraging knowledge from diverse pre-trained tables to enhance synthetic data in low-data regimes.
+
+To the best of our knowledge, CTSyn is the first method to integrating large-scale pre-training in tabular data generation via lateng diffusion. Our results highlight its ability to capture complex relationships between table columns, maintain permutation invariance, and generate synthetic data with high fidelity and diversity, surpassing existing state-of-the-art approaches. By incorporating metadata and schema-based conditioning, CTSyn bridges a critical gap in cross-table generalization, allowing for more robust and transferable table representations.
+
+Despite these advances, challenges remain in fully optimizing tabular generative models for broader applications. Future work should explore the potential of conditional diffusion mechanisms and generative pre-training to further enhance tabular tasks such as predictive modeling, imputation, and multi-table learning. Additionally, investigating transfer learning paradigms beyond simple pre-training/full fine-tuning could improve adaptability across diverse tabular domains, unlocking new frontiers in synthetic data generation such as in-context generation and parameter efficient fine tuning for tabular diffusion model.
+
+# REFERENCES
+
+Ahmed Alaa, Boris Van Breugel, Evgeny S Saveliev, and Mihaela van der Schaar. How faithful is your synthetic data? sample-level metrics for evaluating and auditing generative models. In International Conference on Machine Learning, pp. 290-306. PMLR, 2022.
+
+Dara Bahri, Heinrich Jiang, Yi Tay, and Donald Metzler. Scarf: Self-supervised contrastive learning using random feature corruption. In International Conference on Learning Representations, 2022. URL https://openreview.net/forum?id=CuV_qYkmKb3.
+
+Rishi Bommasani, Drew A Hudson, Ehsan Adeli, Russ Altman, Simran Arora, Sydney von Arx, Michael S Bernstein, Jeannette Bohg, Antoine Bosselut, Emma Brunskill, et al. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258, 2021.
+Vadim Borisov, Tobias Leemann, Kathrin Seßler, Johannes Haug, Martin Pawelczyk, and Gjergji Kasneci. Deep neural networks and tabular data: A survey. IEEE Transactions on Neural Networks and Learning Systems, 2022.
+Vadim Borisov, Kathrin Sessler, Tobias Leemann, Martin Pawelczyk, and Gjergji Kasneci. Language models are realistic tabular data generators. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=cEygqmQNOeI.
+Nitesh V Chawla, Kevin W Bowyer, Lawrence O Hall, and W Philip Kegelmeyer. Smote: synthetic minority over-sampling technique. Journal of artificial intelligence research, 16:321-357, 2002.
+Zhengping Che, Yu Cheng, Shuangfei Zhai, Zhaonan Sun, and Yan Liu. Boosting deep learning risk prediction with generative adversarial networks for electronic health records. In 2017 IEEE International Conference on Data Mining (ICDM), pp. 787-792. IEEE, 2017.
+Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm SIGkdd international conference on knowledge discovery and data mining, pp. 785-794, 2016.
+Xiaokang Chen, Mingyu Ding, Xiaodi Wang, Ying Xin, Shentong Mo, Yunhao Wang, Shumin Han, Ping Luo, Gang Zeng, and Jingdong Wang. Context autoencoder for self-supervised representation learning. International Journal of Computer Vision, 132(1):208-223, 2024.
+Sharad Chitlangia, Anand Muralidhar, and Rajat Agarwal. Self supervised pre-training for large scale tabular data. 2022.
+Sabyasachi Dash, Sushil Kumar Shakyawar, Mohit Sharma, and Sandeep Kaushik. Big data in healthcare: management, analysis and future prospects. Journal of big data, 6(1):1-25, 2019.
+Synthetic Data Metrics. DataCebo, Inc., 10 2023. URL https://docs.sdv.dev/sdmetrics/. Version 0.12.0.
+Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248-255. IEEE, 2009.
+Tuan Dinh, Yuchen Zeng, Ruisu Zhang, Ziqian Lin, Michael Gira, Shashank Rajput, Jy-yong Sohn, Dimitris Papailiopoulos, and Kangwook Lee. Lift: Language-interfaced fine-tuning for non-language machine learning tasks. Advances in Neural Information Processing Systems, 35:11763-11784, 2022.
+Yotam Elor and Hadar Averbuch-Elor. To smote, or not to smote? arXiv preprint arXiv:2201.08528, 2022.
+Alvaro Figueira and Bruno Vaz. Survey on synthetic data generation, evaluation methods and gans. Mathematics, 10(15):2733, 2022.
+Cheng Guo and Felix Berkhahn. Entity embeddings of categorical variables. arXiv preprint arXiv:1604.06737, 2016.
+Suchin Gururangan, Ana Marasovic, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A Smith. Don't stop pretraining: Adapt language models to domains and tasks. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 8342-8360, 2020.
+Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016.
+
+Stefan Hegselmann, Alejandro Buendia, Hunter Lang, Monica Agrawal, Xiaoyi Jiang, and David Sontag. Tabllm: Few-shot classification of tabular data with large language models. In International Conference on Artificial Intelligence and Statistics, pp. 5549-5581. PMLR, 2023.
+Irina Higgins, Loic Matthew, Arka Pal, Christopher P Burgess, Xavier Glorot, Matthew M Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. *ICLR (Poster)*, 3, 2017.
+Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840-6851, 2020.
+Xin Huang, Ashish Khetan, Milan Cvitkovic, and Zohar Karnin. Tabtransformer: Tabular data modeling using contextual embeddings. arXiv preprint arXiv:2012.06678, 2020.
+James Jordon, Jinsung Yoon, and Mihaela Van Der Schaar. Pate-gan: Generating synthetic data with differential privacy guarantees. In International conference on learning representations, 2018.
+Jayoung Kim, Jinsung Jeon, Jaehoon Lee, Jihyeon Hyeong, and Noseong Park. Oct-gan: Neural ode-based conditional tabular gans. In Proceedings of the Web Conference 2021, pp. 1506-1515, 2021.
+Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. arXiv preprint arXiv:2304.02643, 2023.
+Akim Kotelnikov, Dmitry Baranchuk, Ivan Rubachev, and Artem Babenko. Tabddpm: Modelling tabular data with diffusion models. In International Conference on Machine Learning, pp. 17564-17579. PMLR, 2023.
+Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7871-7880, 2020.
+Zehan Li, Xin Zhang, Yanzhao Zhang, Dingkun Long, Pengjun Xie, and Meishan Zhang. Towards general text embeddings with multi-stage contrastive learning. arXiv preprint arXiv:2308.03281, 2023a.
+Zhuoyan Li, Hangxiao Zhu, Zhuoran Lu, and Ming Yin. Synthetic data generation with large language models for text classification: Potential and limitations. In The 2023 Conference on Empirical Methods in Natural Language Processing, 2023b.
+Guang Liu, Jie Yang, and Ledell Wu. Ptab: Using the pre-trained language model for modeling tabular data. arXiv preprint arXiv:2209.08060, 2022.
+Justin Lovelace, Varsha Kishore, Chao Wan, Eliot Shekhtman, and Kilian Q Weinberger. Latent diffusion for language generation. Advances in Neural Information Processing Systems, 36, 2024.
+Dionysis Manousakas and Sergul Aydore. On the usefulness of synthetic tabular data generation. arXiv preprint arXiv:2306.15636, 2023.
+Ryan McKenna, Brett Mullins, Daniel Sheldon, and Gerome Miklau. Aim: an adaptive and iterative mechanism for differentially private synthetic data. Proceedings of the VLDB Endowment, 15 (11):2599-2612, 2022.
+Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. arXiv preprint arXiv:1609.07843, 2016.
+Michael Moor, Oishi Banerjee, Zahra Shakeri Hossein Abad, Harlan M Krumholz, Jure Leskovec, Eric J Topol, and Pranav Rajpurkar. Foundation models for generalist medical artificial intelligence. Nature, 616(7956):259-265, 2023.
+Beata Nowok, Gillian M Raab, and Chris Dibben. synthpop: Bespoke creation of synthetic data in r. Journal of statistical software, 74:1-26, 2016.
+
+Soma Onishi, Kenta Oono, and Kohei Hayashi. Tabret: Pre-training transformer-based tabular models for unseen columns. In ICLR 2023 Workshop on Mathematical and Empirical Understanding of Foundation Models, 2023.
+OpenAI. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
+OpenAI. Chatgpt (gpt-4o-2024-08-06) [large language model], 2024. URL https:// platform.openai.com/models/gpt-4o-2024-08-06.
+F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825-2830, 2011.
+Michael Platzer and Thomas Reutterer. Holdout-based empirical assessment of mixed-type synthetic data. Frontiers in big Data, 4:679939, 2021.
+Liudmila Prokhorenkova, Gleb Gusev, Aleksandr Vorobev, Anna Veronika Dorogush, and Andrey Gulin. Catboost: unbiased boosting with categorical features. Advances in neural information processing systems, 31, 2018.
+Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022.
+Jerome P Reiter. Using cart to generate partially synthetic public use microdata. Journal of official statistics, 21(3):441, 2005.
+Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 10684-10695, 2022.
+Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, 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.
+Nabeel Seedat, Nicolas Huynh, Boris van Breugel, and Mihaela van der Schaar. Curated llm: Synergy of llms and data curation for tabular augmentation in low-data regimes. In *Forty-first International Conference on Machine Learning*.
+Ravid Shwartz-Ziv and Amitai Armon. Tabular data: Deep learning is not all you need. Information Fusion, 81:84-90, 2022.
+Namjoon Suh, Xiaofeng Lin, Din-Yin Hsieh, Merhdad Honarkhah, and Guang Cheng. Autodiff: combining auto-encoder and diffusion model for tabular data synthesizing. CoRR, abs/2310.15479, 2023. URL https://doi.org/10.48550/arXiv.2310.15479.
+Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023.
+Brandon Trabucco, Kyle Doherty, Max A Gurinas, and Ruslan Salakhutdinov. Effective data augmentation with diffusion models. In The Twelfth International Conference on Learning Representations, 2023.
+Talip Ucar, Ehsan Hajiramezanali, and Lindsay Edwards. Subtab: Subsetting features of tabular data for self-supervised representation learning. Advances in Neural Information Processing Systems, 34:18853-18865, 2021.
+Boris van Breugel and Mihaela van der Schaar. Why tabular foundation models should be a research priority. arXiv preprint arXiv:2405.01147, 2024.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
+
+Eric Wallace, Yizhong Wang, Sujian Li, Sameer Singh, and Matt Gardner. Do nlp models know numbers? probing numeracy in embeddings. In 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. 5307-5315, 2019.
+Zifeng Wang and Jimeng Sun. Transtab: Learning transferable tabular transformers across tables. Advances in Neural Information Processing Systems, 35:2902-2915, 2022.
+Colin Wei, Sang Michael Xie, and Tengyu Ma. Why do pretrained language models help in downstream tasks? an analysis of head and prompt tuning. Advances in Neural Information Processing Systems, 34:16158-16170, 2021.
+Lei Xu, Maria Skoularidou, Alfredo Cuesta-Infante, and Kalyan Veeramachaneni. Modeling tabular data using conditional gan. Advances in neural information processing systems, 32, 2019.
+Scott Yak, Yihe Dong, Javier Gonzalvo, and Sercan Arik. Ingestables: Scalable and efficient training of llm-enabled tabular foundation models. In NeurIPS 2023 Second Table Representation Learning Workshop, 2023.
+Jiahuan Yan, Bo Zheng, Hongxia Xu, Yiheng Zhu, Danny Chen, Jimeng Sun, Jian Wu, and Jintai Chen. Making pre-trained language models great on tabular prediction. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=anzIzGZuLi.
+Yazheng Yang, Yuqi Wang, Guang Liu, Ledell Wu, and Qi Liu. Unitabe: A universal pretraining protocol for tabular foundation model in data science. In The Twelfth International Conference on Learning Representations, 2024.
+Chao Ye, Guoshan Lu, Haobo Wang, Liyao Li, Sai Wu, Gang Chen, and Junbo Zhao. Towards crosstable masked pretraining for web data mining. In Proceedings of the ACM on Web Conference 2024, pp. 4449-4459, 2024.
+Han-Jia Ye, Qile Zhou, and De-Chuan Zhan. Training-free generalization on heterogeneous tabular data via meta-representation. 2023.
+Jinsung Yoon, Yao Zhang, James Jordon, and Mihaela Van der Schaar. Vime: Extending the success of self-and semi-supervised learning to tabular domain. Advances in Neural Information Processing Systems, 33:11033-11043, 2020.
+Lu Yuan, Dongdong Chen, Yi-Ling Chen, Noel Codella, Xiyang Dai, Jianfeng Gao, Houdong Hu, Xuedong Huang, Boxin Li, Chunyuan Li, et al. Florence: A new foundation model for computer vision. arXiv preprint arXiv:2111.11432, 2021a.
+Xin Yuan, Zhe Lin, Jason Kuen, Jianming Zhang, Yilin Wang, Michael Maire, Ajinkya Kale, and Baldo Faieta. Multimodal contrastive training for visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 6995-7004, June 2021b.
+Boyu Zhang, Hongyang Yang, Tianyu Zhou, Muhammad Ali Babar, and Xiao-Yang Liu. Enhancing financial sentiment analysis via retrieval augmented large language models. In Proceedings of the Fourth ACM International Conference on AI in Finance, pp. 349-356, 2023a.
+Han Zhang, Xumeng Wen, Shun Zheng, Wei Xu, and Jiang Bian. Towards foundation models for learning on tabular data. arXiv preprint arXiv:2310.07338, 2023b.
+Hengrui Zhang, Jiani Zhang, Zhengyuan Shen, Balasubramaniam Srinivasan, Xiao Qin, Christos Faloutsos, Huzefa Rangwala, and George Karypis. Mixed-type tabular data synthesis with score-based diffusion in latent space. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=4Ay23yeuz0.
+Jun Zhang, Graham Cormode, Cecilia M Procopiac, Divesh Srivastava, and Xiaokui Xiao. Privbayes: Private data release via bayesian networks. ACM Transactions on Database Systems (TODS), 42(4):1-41, 2017.
+
+Tianping Zhang, Shaowen Wang, YAN Shuicheng, Li Jian, and Qian Liu. Generative table pretraining empowers models for tabular prediction. In The 2023 Conference on Empirical Methods in Natural Language Processing, 2023c.
+Zilong Zhao, Aditya Kunar, Robert Birke, and Lydia Y Chen. Ctab-gan: Effective table data synthesizing. In Asian Conference on Machine Learning, pp. 97-112. PMLR, 2021.
+Zilong Zhao, Robert Birke, and Lydia Chen. Tabula: Harnessing language models for tabular data synthesis. arXiv preprint arXiv:2310.12746, 2023.
+Zilong Zhao, Aditya Kunar, Robert Birke, Hiek Van der Scheer, and Lydia Y Chen. Ctab-gan+: Enhancing tabular data synthesis. Frontiers in big Data, 6:1296508, 2024.
+Bingzhao Zhu, Xingjian Shi, Nick Erickson, Mu Li, George Karypis, and Mahsa Shoaran. Xtab: cross-table pretraining for tabular transformers. In Proceedings of the 40th International Conference on Machine Learning, pp. 43181-43204, 2023.
+
+# Appendix
+
+# A BROADER IMPACT AND LIMITATIONS
+
+A foundational table generator like CTSyn can significantly enhance various application domains, especially where real data is scarce, sensitive, or expensive to obtain, by providing high-quality synthetic tabular data. In healthcare, for example, CTSyn can generate synthetic patient records that maintain statistical fidelity to real data, enhancing the robustness and generalization ability of machine learning models by augmenting datasets with synthetic data.
+
+CTSyn also facilitates data collaboration between parties, such as advertising companies and social media websites. Through conditional generation, CTSyn can augment one party's dataset with essential columns for business analysis without violating privacy laws that prohibit linking individual data points across parties.
+
+However, CTSyn's performance relies heavily on clean, large-scale tabular datasets. The quality of generated data depends on the training data, and any biases or errors can be propagated. This risk can be mitigated by carefully curating high-quality datasets for different domains. Additionally, despite pre-training reducing memorization of downstream data, individuals included in the pretraining data still face privacy risks, complicating the safe gathering of large datasets. This can be mitigated by properly anonymizing or adding noise to public pre-training datasets to ensure privacy before they are used for pre-training.
+
+The requirement of semantically meaningful category names also present challenges for acquiring large-scale training data, as normalized values must be carefully sanitized and converted back to raw form.
+
+# B BASELINES IMPLEMENTATION
+
+CTGAN: We use the official implementation at https://github.com/sdv-dev/CTGAN. We use embedding dimension $= 128$ , generator dimension $(= (256,256)$ , discriminator dimension $(= (256,256)$ , generator learning rate $= 0.0002$ , generator decay $= 0.000001$ , discriminator learning rate $= 0.0002$ , discriminator decay $= 0.000001$ , batch size $= 500$ , training epoch $= 300$ , discriminator steps $= 1$ , pad size $= 5$ .
+
+TVAE: We used the official implementation at: https://docs.sdv.dev/sdv. We used default parameters: class dimensions $= (256, 256, 256, 256)$ , random dimensions $= 100$ , 64 channels, 12 scale $= 1e-5$ , batch size $= 500$ , training epoch $= 300$ .
+
+TabDDPM: We used the official implementation at https://github.com/yandex-research/tab-ddpm. We used 2500 diffusion steps, 10000 training epochs, learning rate $= 0.001$ , weight decay $= 1\mathrm{e} - 05$ , batch size $= 1024$
+
+AIM: We use the code implementation at https://github.com/ryan112358/private-pgm, with default parameters: epsilon=3, delta=1e-9, max model size=80
+
+PATE-CTGAN: We adapted the implementation posted at: https://github.com/opendp/smartnoise-sdk/blob/main/synth/snsynth, which combines the PATE (Jordon et al., 2018) learning framework with CTGAN. We use epsilon $= 3$ , 5 iterations for student and teacher network, and the same value for other parameters which are shared with CTGAN.
+
+GReaT: We used the official implementation at https://github.com/kathrinse/begreat/tree/main. We used a batch size of 32. During pre-training, we began with a pretrained distilgpt2 model and training for 2 millions steps on the combination of pre-training data. We train 200 epochs for each dataset during finetuning.
+
+TabSyn: We use the official implementation at https://github.com/amazon-science/tabsyn, with default parameters. For pre-training with heterogeneous VAE embeddings, we train its VAE model for each pre-training dataset, zero-pad all embeddings to the same dimension, and then pre-train a diffusion model on such padded embeddings. During downstream training, the VAE embedding of the downstream datasets are padded to the same dimension as in the pre-training. The pre-trained TabSyn is loaded and diffusion training proceed with it as initialization.
+
+SMOTE: The original SMOTE algorithm are designed to upsample minority classes. We extend it to perform interpolation for all classes. For each generation, we first randomly select one target class using empirical class frequency as probability. Then we randomly sample one example from the selected class, and generated interpolated examples using number of nearest neighbour $k = 5$ . The interpolation weight $\alpha = 0.5$ .
+
+# C BENCHMARK DATASETS
+
+We provide the URL for the sources of each downstream benchmark set considered in the paper.
+
+1. abalone (OpenML): https://www.openml.org/search?type=data&sort=runs&id=183&status=active (Multi class)
+2. Bean (UCI): https://archive.ics.uci.edu/dataset/602/dry+bean+dataset (Multi class)
+3. faults (UCI) : https://archive.ics.uci.edu/dataset/198/steel+plates+faults (Multi class)
+4. HTRU (UCI) : https://archive.ics.uci.edu/dataset/372/htru2 (Binary class)
+5. indian liver patient (Kaggle): https://www.kaggle.com/datasets/uciml/indian-liver-patient-records?resource $\equiv$ download (Binary class)
+6. insurance (Kaggle) : https://www.kaggle.com/datasets/mirichoi0218/insurance (Regression)
+7. News (UCI): https://archive.ics.uci.edu/dataset/332 online + news + popularity (Regression)
+8. Obesity (Kaggle): https://www.kaggle.com/datasets/tathagatbanerjee/obesity-dataset-uci-ml (Multi class)
+9. Shoppers (Kaggle): https://www.kaggle.com/datasets/henrysue/online-shoppers-intention (Binary class)
+10. Titanic (Kaggle): https://www.kaggle.com/c/titanic/data (Multi class)
+11. wilt (OpenGL) : https://www.openml.org/search?type=data&sort=runs&id=40983&status=active (Binary class)
+
+# D PRETRAINING DATASETS
+
+We show the OpenTab files included in our pre-training, as well as their summary statistics. The classification type dataset are shown in table 6, and regression datasets in table 7.
+
+
+
+Table 7: Regression Task Files
+
+# E NUMERICAL RESULTS FOR UTILITY
+
+
Model
30
50
100
200
500
Full
Real
0.79
0.79
0.82
0.83
0.88
0.90
SMOTE
0.67
0.74
0.76
0.77
0.83
0.85
PATECTGAN
0.31
0.27
0.32
0.34
0.37
0.40
AIM
0.44
0.48
0.55
0.62
0.52
0.57
CTGAN
0.41
0.52
0.52
0.54
0.63
0.64
GReaT
-
-
0.76
0.80
0.84
0.85
TVAE
0.75
0.77
0.79
0.79
0.82
0.84
TabDDPM
0.77
0.79
0.81
0.81
0.84
0.85
TabSyn
0.76
0.78
0.81
0.82
0.85
0.86
CTSyn
0.79
0.81
0.83
0.84
0.84
0.86
+
+Table 8: ML utility for classification benchmarks Columns represent training examples(shots) provided.
+
+
Model
30
50
100
200
500
Full
Real
0.24
0.23
0.21
0.17
0.15
0.14
SMOTE
0.48
0.24
0.22
0.16
0.13
0.11
AIM
10274.55
≫10k
≫10k
≫10k
≫10k
110.14
PATECTGAN
≫10k
≫10k
≫10k
≫10k
≫10k
≫10k
CTGAN
0.97
0.25
0.28
0.19
0.21
0.20
TVAE
0.60
0.50
0.47
0.33
0.34
0.28
GReaT
0.30
0.25
0.23
0.20
0.19
0.16
TabDDPM
0.35
0.30
0.27
0.21
0.20
0.18
TabSyn
0.27
0.23
0.22
0.19
0.16
0.13
CTSyn
0.22
0.18
0.17
0.15
0.14
0.12
+
+# F VAE FOR TEXT AND DATETIME VARIABLES
+
+In our main experiment, we omitted free text and date-time variables to align with prior research in tabular transfer learning (Yan et al., 2024). However, CTSyn can handle these data types with proper decoder. We conducted preliminary VAE reconstruction experiments on the 'ebay reviews' and '0875 nfl games' table from OpenTab, incorporating textual and date-time columns. We train a VAE model from scratch jointly on these two data frames. For text encoding and decoding, we followed (Lovelace et al., 2024), encoding text with a pre-trained frozen BART-base model (Lewis et al., 2020) followed by a 4 layer Perceive resampler encoder-decoder network, and train the entire VAE and text encoder with cross-entropy loss on token prediction. Date column is cyclically encoded (Guo & Berkhahn, 2016) to capture periodicity and decoded with a linear layer with circular loss function. The reconstruction performances are as follows:
+
+Table 9: ML utility for regression benchmarks. Columns represent training examples(shots) provided.
+
+
Metric
Numerical (MSE)
Categorical (Accuracy)
Text (ROUGE-1, eBay)
Date-Time (Circular Loss, NFL)
Score
0.0005
92%
0.80
0.021
+
+Table 10: Performance metrics across different data types.
+
+These findings demonstrate CTSyn's potential to handle diverse data types without compromising performance. Further studies can be explore the potential of text pre-training in assisting categorical reconstruction, as well as text decoding as a method for table summarization tasks.
+
+# G METADATA GENERATION
+
+To generate metadata for each table, we used GPT-4o (gpt-4o-2024-08-06). The metadata serves as a textual description capturing the context of the table, aiding in cross-table learning and improving generalization across diverse tabular datasets. Each table's metadata was generated by providing GPT-4o with the first 10 rows of the dataset and prompting it to generate a concise yet informative description. Below, we detail the exact procedure, including an example prompt and the corresponding metadata generated for the Indian Liver Patient Dataset.
+
+# G.1 QUERYING GPT-40 FOR METADATA
+
+For each table, we queried GPT-4o using a structured prompt. The prompt included:
+
+- A brief instruction specifying that the model should describe the table.
+- The first 10 rows of the dataset, formatted as a tab-separated table.
+- A request for a summary that captures the table's context.
+
+# G.2 EXAMPLE PROMPT
+
+The following prompt was used for query GPT-4o in metadata generation:
+
+You are analyzing a dataset called ' {dataset_name}'
+
+Below are the first 10 rows of this dataset along with the corresponding column names:
+
+Columns: {column_names}
+Data: {first_row_of_data_frame_in}
+
+Based on the above data, please do the following:
+
+1. Identify which columns are likely categorical.
+2. Determine whether all categorical columns are represented in text form. If a categorical column has integer values like 0 or 1, then it is not in text form. But if a categorical column has values like male/female, then it is in text form.
+3. Output the result as a JSON string with:
+
+- "dtypes": A dictionary mapping column names to "categorical" or "numerical".
+- "metadata": A short description of the dataset background.
+- "nontextcolumns": A list of categorical columns not in text form.
+
+The output should be a JSON string and should not contain anything else.
+
+# G.3 GENERATED METADATA EXAMPLE
+
+Upon submitting this prompt to GPT-4o, the model generated the following metadata:
+
+"The dataset contains numerical data related to liver function and alcohol consumption. It is likely used for medical research purposes, particularly to analyze the effects of alcohol consumption on liver-related enzyme levels and overall liver health. Each column represents specific biochemical parameters from liver tests as well as the reported number of alcoholic drinks consumed by an individual."
+
+# H LATENT SPACE VISUALIZATION
+
+We conducted a qualitative analysis comparing the encodings generated by the Transformer-VAE used in TabSyn with those from the encoder module of our VAE on an insurance dataset. Latent vectors of data points were color-coded based on categories. The results demonstrate that our model maintains clear separation of groups in the encoding space, providing evidence that our shared latent space enhances model capacity while maintaining interpretability for heterogeneous tables.
+
+
+(a) Tsne plot on Region column.
+
+
+(b) Tsne plot on Sex column.
+Figure 4: Tsne visualization of embedding space created by pre-trained VAE model, on columns of Insurance dataset.
+
+# I ENCODING UNINFORMATIVE FEATURES
+
+
Metric
Original Data
Uninformative Column Names
Shape
0.94 (0.02)
0.92 (0.03)
Corr
0.95 (0.02)
0.93 (0.03)
Precision
0.64 (0.04)
0.60 (0.05)
Recall
0.075 (0.006)
0.070 (0.007)
+
+Non-informative or abbreviated column headers(such as "X1", "VAR1") is a notable concern for tabular foundation models, especially as such models are expected to be pre-trained on web-scale dataset with limited curation in a self-supervised manner. To evaluate the robustness of CTSyn against such noisy data, we conducted an experiment where all column names in downstream benchmarks used during finetuning were replaced with single English letters (A-Z). This setting simulates real-world scenarios with non-descriptive headers in finetuning data. The results show a slight decline in statistical fidelity; however, CTSyn maintains a high level of performance, demonstrating its robustness to uninformative column headers.
+
+# J COMPUTATION
+
+Our training are completed on an Amazon AWS g5.12xlarge instance, with 192 GB system memory, 4 Nvidia A10G GPU with $4 \times 24$ GB GPU memory. The pre-training time of CTSyn, GReaT and TabSyn are shown in the table 12.
+
+Table 11: Comparison of metrics between Original Data and Uninformative Column Names.
+
+
Model
VAE
Generation
CTSyn
12 hours
12 hours
GReaT
-
50 hours
TabSyn
86 × 0.5 = 43 hours
24 hours
+
+Table 12: Pre-training computation cost. Note that TabSyn requires training table-specific autoencoders.
\ No newline at end of file
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/images.zip b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ab6be0f50dc6cc8cf7ffc76717a2d1af3f0c1b66
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6bbf959bc09125dd09ef759f8e8d7b08af3b4c9fea48037dd1577ef05ed7e43
+size 1015330
diff --git a/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/layout.json b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..900599abe6a8ea5a2db4ea92affcd945247c176c
--- /dev/null
+++ b/ICLR/2025/CTSyn_ A Foundation Model for Cross Tabular Data Generation/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bab2aae7126a6111c9058a06d6fe352b65140cb2decba1b74f911978c44d5e53
+size 598017
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_content_list.json b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..8db8cf0ea8de421cfbd8942d760ee54ff16daec8
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f240d493a82e6ccc1cfa099bfd2eb94bcda334bc374a0397bc3c200788d6b805
+size 270858
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_model.json b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..30de81e1bdd6f0c1e6838966372f29cbafb82e21
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:063552d03774035d479be306996132f2b21423b25ec24a7fb54a71b9f3c7b705
+size 309250
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_origin.pdf b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..9595dc34f646b0d9fb9b505b66c5780073dfe4c6
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/2bff7ae8-89a6-4ecd-b34c-5676c8f7b30b_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:86fa8c0b1d72fbf19c80a2fa6335dea3966330487d414cf06e324e4ed45fa241
+size 25724310
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/full.md b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..315547bd077b76db86a64c183ac6341fef6b809b
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/full.md
@@ -0,0 +1,1224 @@
+# CURIE: EVALUATING LLMs ON MULTITASK SCIENTIFIC LONG CONTEXT UNDERSTANDING AND REASONING
+
+Hao Cui $^{1,\star}$ Zahra Shamsi $^{1,\star}$ Gowoon Cheon $^{1,\star}$ Xuejian Ma $^{1}$ Shutong Li $^{1}$ Maria Tikhanovskaya $^{2,\diamond}$
+
+Peter Norgaard $^{1}$ Nayantara Mudur $^{2}$ Martyna Plomecka $^{3,\diamond}$ Paul Raccuglia $^{1}$ Yasaman Bahri $^{1}$
+
+Victor V. Albert $^{4,5}$ Pranesh Srinivasan $^{1}$ Haining Pan $^{6}$ Philippe Faist $^{7}$ Brian Rohr $^{8}$
+
+Michael J. Statt $^{8}$ Dan Morris $^{1}$ Drew Purves $^{1}$ Elise Kleeman $^{1}$ Ruth Alcantara $^{1}$ Matthew Abraham $^{1}$
+
+Muqthar Mohammad1 Ean Phing VanLee1 Chenfei Jiang1 Elizabeth Dorfman1
+
+Eun-Ah Kim $^{9}$ Michael P Brenner $^{1,2}$ Viren Jain $^{1}$ Sameera Ponda $^{1}$ Subhashini Venugopalan $^{1,\star,\dagger}$
+
+1Google, 2Harvard, 3University of Zurich, 4NIST, 5UMD College Park, 6Rutgers, 7FU Berlin, 8Modelyst, 9Cornell
+
+# ABSTRACT
+
+Scientific problem-solving involves synthesizing information while applying expert knowledge. We introduce CURIE, a scientific long-Context Understanding, Reasoning and Information Extraction benchmark to measure the potential of Large Language Models (LLMs) in scientific problem-solving and assisting scientists in realistic workflows. This benchmark introduces ten challenging tasks with a total of 580 problems and solution pairs curated by experts in six disciplines - materials science, condensed matter physics, quantum computing, geospatial analysis, biodiversity, and proteins - covering both experimental and theoretical workflows in science. We evaluate a range of closed and open LLMs on tasks in CURIE which requires domain expertise, comprehension of long in-context information, and multi-step reasoning. While Gemini Flash 2.0 and Claude-3 show consistent high comprehension across domains, the popular GPT-4o and command-R+ fail dramatically on protein sequencing tasks. With the best performance at $32\%$ there is much room for improvement for all models. We hope that insights gained from CURIE can guide the future development of LLMs in sciences. Evaluation code and data links in: https://github.com/google/curie
+
+# 1 INTRODUCTION
+
+The advancement of science relies on the ability to build upon the collective knowledge accumulated in scientific literature, requiring not only deep domain expertise and reasoning skills, but also the capacity to apply that knowledge within the context of a given problem. Large Language Models (LLMs) have already shown remarkable knowledge across a wide spectrum of domains (Fig. 1b). Recent benchmarks e.g., MMLU (Hendrycks et al., 2020), have demonstrated proficiency in varied subjects (e.g., mathematics, history, social sciences, law) with standardized exams (BAR, SAT etc.), commonsense reasoning (Zellers et al., 2019), coding (Chen et al., 2021; Jimenez et al., 2023), reading comprehension (Dua et al., 2019), arithmetic (Zhang et al., 2024; Lu et al., 2023), and grade school scientific knowledge (Clark et al., 2018). However, as LLMs transition from merely surfacing knowledge to actively solving problems, the capacity to understand and reason about long-form, context-rich information is paramount. Recent advances in model architecture have seen dramatic increases in context windows from 8k to 32k, 128k, and $1\mathrm{M}+$ tokens, reflecting a growing recognition of this need.
+
+This has led to development of benchmarks testing capabilities of LLMs on long document understanding such as ZeroScrolls (Shaham et al., 2023), Bamboo (Dong et al., 2023) on a variety of tasks including summarization (Kryscinski et al., 2021), retrieval (Kamradt, 2023), multi-hop QA (Zhu et al., 2024; Kočisky et al., 2018), sorting sequences (Wang et al., 2024) and others (Bai et al., 2023). However, current LLM benchmarks on science e.g., PubmedQA (Jin et al., 2019), GPQA (Rein et al., 2023) focus primarily on short sequence questions, with answers often in multiple choice form. To address this gap, we introduce the scientific long-Context Understanding, Reasoning, and Information Extraction benchmark (CURIE).
+
+
+Figure 1: (a) Average normalized performance of state-of-the-art LLMs across 10 tasks from six scientific domains in CURIE. (b) Comparing performance of different model versions supporting long-context windows on previous benchmarks testing Knowledge (MMLU), Linguistic (DROP), and Science expertise (GPQA), along with our new scientific long-context understanding CURIE benchmark, highlighting the difficulty of the tasks in the benchmark.
+
+
+
+The CURIE benchmark introduces 10 tasks, with a total of 580 input and solution pairs based on 429 research documents across six diverse scientific disciplines: materials science, theoretical condensed matter physics, quantum computing, geospatial analysis, biodiversity, and proteins - covering both experimental and theoretical aspects of scientific research. These tasks not only require deep domain understanding but also challenge models on their capacity to comprehend full-length scientific papers for information extraction, concept tracking, aggregation, algebraic manipulation, multimodal understanding, and cross-domain expertise (e.g. generating code for theoretical calculations).
+
+We use the CURIE testbed to perform extensive evaluation and analysis of 8 state-of-the-art open and closed weight models (see Fig. 1a) supporting context windows of $32\mathrm{k}$ tokens or more. Among closed models, Gemini Flash 2.0 and Claude-3 perform consistently well across all disciplines, while Command- $\mathbb{R}+$ does better amongst the open models. Our materials tasks, which require models to exhaustively retrieve and aggregate information spread through the document proved to be exceptionally challenging for all models. Notably, while GPT-4o does well on most tasks, it fares dramatically poorly on the protein sequencing task failing to stop generation and repeating subsequences leading to a very low score. This repetition in subsequence is also seen in other open models. On the same task, the more recent Flash 2.0 provided correct python code to solve the problem half the time, and attempted to enumerate the sequence with lesser success other times.
+
+While the CURIE benchmark is aimed at facilitating evaluation of scientific reasoning over long contexts, we hope the rich human annotations can serve the community in advancing planning, instruction following, and evaluation of generated texts of mixed and heterogeneous formats including dates, locations, numerical values, units, descriptors, domain specific terms, equations and code.
+
+# 2 RELATED WORK
+
+Science NLP tasks. There have been numerous datasets created to perform core NLP tasks on scientific texts e.g. BLURB Gu et al. (2021). This includes (i) named entity recognition to annotate entities such as disease names (Li et al., 2016) or material properties (Mavracic et al., 2021a), and relations such as disease-chemical interaction (Luan et al., 2018); (ii) dependency parsing (Kim et al., 2003), (iii) participant-intervention-outcome (PICO) annotation (Nye et al., 2018), (iv) text classification such as citation intent classification (Jurgens et al., 2018; Cohan et al., 2019), paper domain classification (Beltagy et al., 2019) from titles; (v) relation extraction for chemical-protein-disease annotation (Kringelum et al., 2016) or material structure and properties (Zhang et al., 2023), (vi) information extraction e.g. material property values (Dong & Cole, 2022a; Polak & Morgan), and (vii) question answering (Jin et al., 2019; Krallinger et al., 2020). However all of these focus on inputs of short length such as paper abstracts, sentences or text spans. They were curated for language models operating on short contexts, though the task in the actual scientific workflow requires application on full documents. Of the recent LLM benchmarks, GPQA (Rein et al., 2023) focuses on evaluating scientific domain expertise in biology, physics, and chemistry, while MMLU (Hendrycks et al., 2020) covers a range of high school science. These too are limited to short questions and multiple choice answers.
+
+Long context benchmarks. With the increase in context windows supported by the LLMs, there have been new benchmarks focusing on evaluating long context capabilities. ZeroScrolls (Shaham
+
+
Benchmark
Source Domain
Diverse Tasks
Long Context
ZeroSCROLLS
various
✓
✓
Bamboo
various
✓
✓
Ada-Leval
lit., code
QA,sort
✓
Ruler
synthetic
✓
✓
BLURB
biomed
✓
✗
QASA
ML lit.
QA
✓
Qasper
NLP lit.
QA
✓
GPQA
science
MCQ
✗
CURIE
sci. lit.
✓
✓
+
+(a) Comparison with other datasets.
+
+
+(b) Distribution of tasks.
+Figure 2: CURIE dataset. (a) CURIE introduces diverse long context tasks on scientific literature, (b) Distribution of 10 tasks and 429 research documents in six disciplines from which 580 examples were curated, and (c) Length of input context in each domain (log scale), avg. is about $15\mathrm{k}$ .
+
+
+(c) Input word lengths per domain.
+
+et al., 2023) covers summarization, question answering, aggregation which are now present in many newer benchmarks: NIAH (Kamradt, 2023) includes retrieval, LongBench (Bai et al., 2023) includes bilingual tasks, Bamboo (Dong et al., 2023) has textual entailment tasks amongst others and M4LE (Kwan et al., 2023) has tasks testing translation and classification, L-eval (An et al., 2023) includes a task on multi-document dialog, and Loogle (Li et al., 2023) includes a computation task. However, while all of these benchmarks combine many existing datasets to cover a range of tasks none of them operate on data from the scientific domain. Further, for very long $(100\mathrm{k}+)$ contexts synthetically crafted data used, e.g. Ruler (Hsieh et al., 2024) proposes synthetically created length adaptable tasks and Ada-Leval (Wang et al., 2024) includes length adaptable sorting and QA tasks, where they add distractor texts to increase the context. These ignore data from scientific literature that's naturally complex and requires processing long context, see Fig. 2(a) for comparison.
+
+Scientific literature. Of the tasks most relevant to scientific expertise, QASA (Lee et al., 2023) and QASPER (Dasigi et al., 2021) operate on a full scientific paper, Machine Learning (ML) and Natural Language Processing (NLP) papers respectively, however these focus solely on question answering, since it is expensive and labor-intensive to collect tasks requiring expert knowledge. In our work we introduce ten new tasks curated from six disciplines, all annotated by experts(with Ph.D. degrees) and requiring reasoning over long context information, on average about 15k words (Fig. 2c). The outputs also include structured and unstructured text averaging about 1k words (Fig. 4c).
+
+# 3 CURIE DATASET AND TASKS
+
+The CURIE benchmark consists of a series of tasks that measure how well LLMs can assist in diverse scientific workflows, from synthesis of information towards final execution anchored on single scientific research documents. Each task in the benchmark: (1) is a realistic task performed by scientific experts on domains requiring years of study, (2) has information relevant to solve the given problem within the context provided (e.g. a full-length scientific paper, image/caption pair), and (3) ensures expert humans can evaluate task performance, providing metrics that highlight the potential limitations of current models. Summary of data, tasks, and metrics are in Appendix A.
+
+Collection guidelines. We selected six domains requiring deep scientific expertise: materials science, theoretical condensed matter physics, quantum computing, geospatial analysis, biodiversity, and proteins. Within these, we worked with 1-3 experts to define tasks representative of realistic scientific workflows, covering the following seven assessment categories: concept extraction, concept tracking (co-reference resolution), aggregation, algebraic manipulation, summarization, visual comprehension, and integrating expertise across domains. We focused on tasks that, if successful, could enable automation (Donoho, 2024) of a time intensive critical component of a workflow e.g. extraction of experimentally reported values towards curating a database (Dong & Cole, 2022b), or generate code or calculations to fully reproduce computational or theoretical analyses. We worked with domain experts on 3 critical aspects of the task preparation: (1) sourcing papers representative of the task and domain; (2) creating ground truth answers that were accurate, nuanced and comprehensive; and (3) identifying measures to evaluate model responses against ground truth answers that properly captured salient features of the task which the experts also used for rating the difficulty of each example. Figure 2(b) shows the distribution and details of tasks in the CURIE benchmark.
+
+
+Figure 3: Examples of tasks in the CURIE benchmark. The DFT, HFD, QECC, and GEO tasks require the LLM to perform tasks on scientific papers (top blocks), as described in the task snippets (in orange), to extract, calculate, or aggregate information. Expected output (ground truth) snippets are shown in the blue blocks. (Only snippets of the query /outputs are shown for illustrative purposes.)
+
+
+
+
+
+
+
+We provide a brief motivation and describe tasks for each of the domains. We identified papers with permissive licenses and worked with 1 to 3 experts in each domain to select specific papers, and to perform ground truth annotations. Data collection details are included in Appendix F.
+
+Density Functional Theory Task (DFT). Density Functional Theory (DFT) is a widely used framework for quantum mechanical modeling of materials, enabling first-principles predictions and validation of experimental findings. We define 3 tasks that measure the ability of LLMs to reproduce DFT calculations from papers: (1) extracting input material structures (DFT-S); (2) identifying DFT calculation parameters associated with computation steps (DFT-P); and (3) translating computational steps essential for reproducing key results from the paper into functional code (DFT-C). Executing all these tasks successfully requires the LLM to comprehend domain-specific concepts, extract information dispersed across different sections of the publication, and generate scientific code. Two Ph.Ds with expertise in DFT computations identified 75 papers and prepared solutions for the tasks.
+
+Material Property Value Extraction (MPV). While historically material properties have been tabulated in books (Welsch et al., 1993; Kutz, 2002), the published literature is an untapped resource, with experimentally reported materials, structure information, properties, and processing conditions. Human curation of such data is time intensive and expensive, and rule-based automation is limited in scope (Swain & Cole, 2016) as it can miss crucial processing details. However, prompt-based LLM extraction has shown promising early results (Zheng et al., 2023) at sentence-level extractions. Our benchmark contains 17 scientific papers for exhaustively extracting material properties at the full document-level, annotated and verified by experts. The main task is to identify all instances of material properties mentioned in the text, including material name, descriptor and particular property, along with the passage or table where the property is described. For ablations, we consider variations to extract just a pre-specified set of properties (e.g. just refractive index and band gap).
+
+Hartree-Fock Tasks (HFD, HFE). In condensed matter physics, Hartree-Fock mean-field theory is a framework for simplifying mathematical descriptions of interacting quantum systems. The framework begins with an interacting Hamiltonian and uses symbolic computations to reduce to a simpler non-interacting Hamiltonian. We construct two tasks: derivation (HFD) and extraction (HFE). HFD measures the ability of an LLM to derive the Hartree-Fock mean-field Hamiltonian for a quantum many-body system, motivated by prior work (Pan et al., 2024). Deriving the correct answer requires 13-19 reasoning steps, making it extremely challenging without expert oversight as the LLM needs to (i) identify the necessary steps to carry out the calculation and (ii) execute the steps, which requires symbolic computations and deep knowledge of theoretical physics. The
+
+
+(a) An example from BIOGR.
+
+
+(b) Illustration of the PDB task.
+Figure 4: (a) A map input from the BIOGR Task. (b) Example PDB task of reconstructing a protein's amino acid sequence from the 3D structure. (c) Length of ground truth per domain (avg. 954 words).
+
+
+(c) Length of groundtruth outputs
+
+second simpler task, HFE, evaluates an LLM's ability to identify and aggregate key equations from a research paper to extract the most general mean-field Hamiltonian. We have 53 papers (38 HFE, 15 HFD) with expert annotations including prompts for detailed reasoning.
+
+Error Correction Zoo Task (QECC). The Error Correction (EC) Zoo $\frac{\mathrm{Ec}}{\mathrm{Zoo}}$ (Albert & Faist, 2024) is an open source effort to build a Wikipedia-like repository collecting and categorizing error correcting codes from the literature. EC codes are used to redundantly encode and store classical or quantum information so as to protect it from noise, with wide applications (e.g. in 5G communication and broadcast protocols). Creating an entry in the EC Zoo is a knowledge intensive process and requires listing the properties of a given EC code along with any relations to other codes in literature. Each example contains many different types of information: a succinct non-technical summary, bespoke technical details, numerical parameters quantifying code performance, and non-trivial connections to other literature. The diversity in encoding schemes makes the task of selecting critical components for code-entries challenging to Templatize. We construct a benchmark that tests the ability of LLMs to curate the EC Zoo by taking a given paper and asking it to produce a YAML code-entry file. Our benchmark consists of codes from 65 papers curated by experienced experts.
+
+Geospatial Dataset Extraction (GEO). Geospatial analysts integrate various diverse datasets to answer complex questions. For example, a study of time-series snowmelt detection over Antarctica may combine satellite imagery, radar data, weather station temperature data, elevation/topography information, etc (Liang et al., 2021). In this task, given a research paper, the LLM is required to identify all utilized datasets, including source websites, variable names, descriptions, time ranges and spatial ranges. This requires not only recognizing direct dataset references within the text, but also contextualization, comprehension and aggregation of information scattered throughout the paper, pushing the boundaries of long-context understanding. Our benchmark includes 19 papers ranging across earth observation, economics, epidemiology and public health, along with detailed ground truth annotations necessary to reproduce each study.
+
+Biodiversity Georeferencing Task (BIOGR). Critical geospatial information is often conveyed exclusively through maps, highlighting the need for powerful tools capable of interpreting such visual data. In this task we study the ability of multimodal LLMs to work with geographical maps. Specifically, we investigate the core capability of georeferencing, where, given an image of a map and its associated caption, the task is to determine the latitude/longitude bounding box encompassing the region displayed. A domain expert would often use a multi-step process and specialized mapping tools (e.g., QGIS, ArcGIS), zooming in and switching between different imagery layers to find recognizable landmarks (river bends etc.) For this multimodal task, we assembled a dataset of 138 map images (e.g., Fig. 4a) and captions from papers in ecology, of varying difficulty with ground truth labels for bounding boxes verified by domain experts.
+
+Protein Sequence Reconstruction (PDB). This final task tests the ability of an LLM to extract meaning from a three dimensional structure, associating the 3D structure of a protein with its sequence. Given the 3D structural coordinates of a protein, provided in the Protein Data Bank (PDB), capturing the precise arrangement of atoms within a complex molecule, we ask the LLM to reconstruct the protein's amino acid sequence. To create the benchmark we curated the DB file to contain only coordinate information, stripped of any explicit functional annotation. This minimalist approach forces the LLM to rely solely on its understanding of structural patterns to deduce the underlying amino acid sequence. We curated 64 structures with annotations for this task.
+
+
+Figure 5: Per task normalized scores of various LLMs on the CURIE benchmark that measures performance of LLMs on 10 long-context tasks requiring expertise across six scientific disciplines. DFT-S, DFT-P, and MPV are scored using LLMSim, while others use programmatic metrics.
+
+Annotations. The annotations include ground truth solutions for each task, and difficulty rating for each example based on complexity of information extraction and reasoning (details in Appendix F). On the extraction tasks, such as MPV, HFE, GEO, and DFT-S, experts within each domain reviewed each others' work and reported a high rate of agreement.
+
+# 4 EXPERIMENTS AND EVALUATION
+
+# 4.1 EXPERIMENTAL SETUP
+
+We evaluate the CURIE benchmark tasks on several state-of-the-art LLMs supporting long-context windows, including five closed weight LLMs such as GPT-4o (OpenAI), Claude-3 Opus (Anthropic), Gemini 1.5 Pro (Reid et al., 2024), and three open-weight LLMs, Mixtral (Jiang et al., 2024), Command-R-+ (Cohere), and LongLLaMa-3B (Tworkowski et al., 2024). We follow a standard zero-shot prompt template across tasks, first describing the task the model needs to perform and the desired output format, and then providing the text of the full paper (except for LongLLaMa-3B full paper was provided first). In the case of DFT and MPV tasks, we provide the output format in the context of an additional hand-crafted excerpt to clarify expectation of formats for each field. The BIOGR task is multimodal, and for this we provide just the image and caption as input, rather than the full paper. Performance is reported for each model on each task using a single run.
+
+# 4.2 EVALUATION METRICS
+
+For the tasks requiring generation of long English text responses (eight out of ten tasks), we use the ROUGE-L (Lin, 2004) and BERTScore F1 (Zhang et al., 2019) metrics. For BIOGR and PDB we use other more appropriate quantitative metrics. BIOGR uses Intersection-over-Union (IoU), defined as the area of intersection between two bounding box regions (using latitude and longitude) divided by the union. This metric captures the similarity between two polygons, accounting for both location and size, while also being scale-invariant. We also present additional metrics such as the normalized distance error between the predicted and ground truth boxes in Appendix Tab. 7. For the PDB task, we compare reconstructed sequences to ground truth sequences (Cock et al., 2009), using pairwise sequence alignment scored using the number of identities. The raw scores are normalized by the alignment length to account for potential length discrepancies, yielding the identity ratio $(ID_r)$ metric.
+
+Computing average performance across all tasks in the CURIE benchmark. Appendix Table 4 reports the primary metric for each task used to compute the average performance. DFT-S, DFT-P, MPV use model-based F1 scores (Sec. 4.3), BIOGR uses IoU, PDB uses $ID_{r}$ , the rest use ROUGE-L. All metrics are normalized to [0,1]. Fig. 5 shows performance of models per-task and Fig. 1(a) shows average performance of models across all 10 tasks.
+
+Human evaluations. Additionally, experts identified a set of rubrics for evaluating model responses and compared responses. E.g., for the tasks requiring extraction of information such as DFT-S, DFT-P, and MPV, experts measured precision and recall of retrieved information relative to ground truth. Experts also rated $10 - 12\%$ responses in each task with an overall "good", "ok", "bad" rating.
+
+# 4.3 MODEL-BASED EVALUATION OF MIXED LONG FORM RESPONSES
+
+Tasks in CURIE are varied and have ground truth annotations in mixed and heterogenous outputs. Evaluating free-form generation is challenging because answers are often descriptive, and even when a format is specified as in most of our cases the response to each field can have differing forms e.g. in case of materials grid points may sometimes be specified as [p,q,r] and at other times as $\mathbf{p}\times \mathbf{q}\times \mathbf{r}$ . Hence most existing knowledge related benchmarks (Hendrycks et al., 2020; Rein et al., 2023) lean towards multiple choice format for answers. While these allow for clean evaluation, this doesn't allow us to evaluate the full expressiveness of the model. Inspired by the ability of LLMs to evaluate natural language (Zheng et al., 2024; Liu et al., 2024; Kamalloo et al., 2023), three recent approaches, LAVE (Manas et al., 2024), LIMA (Zhou et al., 2024) and Prometheus-Vision (Lee et al., 2024), utilize the in-context capability of instruction-tuned LLMs to rate the candidate answers in 3-point, 6-point and 5-point Likert scales, respectively. While evaluation on Likert scales is suited for generated text, many of the outputs on our task have structured information that could benefit from more fine grained evaluation. So we propose two model-based evaluations $(i)$ LLMSim a nuanced score for measuring similarity of elements in lists of dictionaries, which can then be used to compute precision and recall of elements, and $(ii)$ LMScore an overall weighted score on a 3-point scale obtained by asking the LLM if the predictions match ground truth. We focus on LLMSim here since it provides a quantitative measure for structured outputs missing in previous work and discuss LMScore in Appendix D.
+
+LLMSim is used to compare similarity of dictionary elements to assist in comparison of sets of dictionaries. Our goal is to identify the number of ground truth dictionary items that have been retrieved correctly. So, we ask the LLM to examine all of the predicted dictionaries and match and identify the predicted dictionary most similar to the each of the ground truth dictionaries. We use a chain-of-thought (CoT) prompt that asks the LLM to identify the predicted dictionary indices that correctly match each field (key) of the ground truth, and then select the predicted dictionary index most similar to the ground truth or output 'None'. Prompt and code are included in the supplement.
+
+Concretely, suppose $D_P$ is the set of predicted dictionaries, $D_G$ the set of ground truth dictionaries, LLMSim helps find the optimal matching $M$ between the predicted dictionaries and each ground truth $D_g \in D_G$ :
+
+$$
+\begin{array}{l} \operatorname {L L M S i m} = M \left(D _ {P}, D _ {g}\right) \\ = \left\{ \begin{array}{l} N o n e, i f n o m a t c h i n v a l u e s \\ D _ {p} \in D _ {P}: \arg \max s (f _ {i}, D _ {p}, D _ {g}) \end{array} \right. \\ \end{array}
+$$
+
+where $f_{i}$ represents the $i^{th}$ field (key) in the dictionary and $s(f_{i},D_{p},D_{g})$ is the similarity of the value of each field of $D_{p}$ with $D_{g}$ . Given the matching, we can then compute precision, recall and F1 as
+
+$$
+P r = \frac {| (D _ {p} , D _ {g}) \in M |}{| D _ {P} |}, R e = \frac {| (D _ {p} , D _ {g}) \in M |}{| D _ {G} |}, F 1 = 2 \frac {P r \cdot R e}{P r + R e}
+$$
+
+# 5 RESULTS
+
+Main Results. Fig. 1 shows the performance of all models averaged across all tasks in the CURIE benchmark. Claude-3 Opus is the best performing with consistent high performance across all tasks. Fig. 5 and Table 1 show task level performance of all models. The popular GPT-4o outperforms the others on GEO and BIOGR, however it's performance on PDB and HFD is surprisingly low. On closer inspection we found the GPT-4o model exhibited repetition in the outputs in the PDB task (see. Fig. 6), clipped responses in the MPV task, and failed to follow formatting instructions on the HFD task leading to lower performance. Overall though, most of the closed models had similar performance, and given the variability (e.g., $25\% -75\%$ error bars around the mean in Fig. 5) the difference between them is not significant. On several tasks there is considerable room for improvement, making CURIE an interesting benchmark for furthering model development.
+
+Room for improvement. Fig.1(b) compares performance of models from two different generations, Gemini 1.0 pro (32k) and Gemini 1.5 pro (1M+ context window) on popular benchmarks evaluating linguistic capability Dua et al. (2019), breadth of knowledge (Hendrycks et al., 2020), and expertise in science (Rein et al., 2023), alongside the performance on our benchmark evaluating expertise with long-context comprehension. We observe that there is considerable room for improvement on the types of realistic complex scientific tasks the CURIE benchmark provides.
+
+
Method
DFT
MPV
HFD
HFE
QECC
GEO
BIOGR
PDB
R-L
B-F1
R-L
B-F1
R-L
B-F1
R-L
B-F1
R-L
B-F1
R-L
B-F1
IoU
IDr
Zero-shot Open Weight LLMs
Mixtral
12.20
0.75
12.48
0.82
3.78
0.27
9.15
0.47
5.11
0.17
20.23
0.67
0.00
0.03
Command-R+
13.79
0.79
15.67
0.83
5.93
0.82
41.23
0.85
15.88
0.67
21.36
0.78
0.00
0.07
LongLLaMa
8.17
0.77
9.28
0.80
4.36
0.78
10.33
0.77
9.38
0.76
9.53
0.77
0.00
0.00
Zero-shot Closed Weight LLMs
Gemini 1.0 Pro
11.22
0.78
17.37
0.83
5.81
0.53
12.95
0.69
5.10
0.27
22.56
0.79
0.34
0.00
GPT-4o
13.30
0.78
12.74
0.83
9.81
0.81
48.93
0.85
20.02
0.70
27.30
0.80
0.37
0.13
Gemini 1.5 Pro
13.66
0.78
31.54
0.82
18.86
0.84
39.56
0.71
20.07
0.76
27.24
0.74
0.42
0.29
Gemini 1.5 Flash
11.31
0.76
12.11
0.79
22.86
0.84
41.92
0.78
23.50
0.81
27.76
0.78
0.36
0.15
Gemini 2.0 Flash
14.18
0.79
14.72
0.84
22.52
0.84
50.06
0.87
22.36
0.79
29.69
0.79
0.49
0.56
Claude 3 (Opus)
13.78
0.80
15.86
0.83
16.82
0.83
49.10
0.87
21.81
0.72
28.66
0.79
0.39
0.29
+
+Table 1: Results comparing performance of all models on all tasks based on automated metrics R-L: Rouge-L, and B-F1:BertScore-F1. The avg. performance of all 3 DFT tasks are reported under DFT. All models support a context length of ${32}\mathrm{k}$ or more. BIOGR has multimodal inputs which is unsupported by the chosen open models. Blue highlights the highest values.
+
+
+Figure 6: Comparing responses on the PDB task. Measuring alignment using identity ratio $(ID_{r})$ between the predicted amino acid sequence and groundtruth sequence for a given protein structure, Gemini 1.5 pro and Claude were better at predicting the sequence of amino acids, whereas GPT-4o collapsed into a mode of repetition, and Flash 2.0 generated code to solve the problem.
+
+Human vs Model-based eval on retrieval. On the information retrieval tasks: DFT-S and DFT-P tasks which requires LLMs to retrieve material structures and DFT parameters from a given paper; as well as the MPV tasks requiring models to retrieve material property and values, we use LLMSim to compare the dictionaries of extracted material properties. Table 2 reports precision, recall and F1 scores computed after matching elements using LLMSim. We found the precision and recall to closely match those measured by human experts (on the Gemini 1.5 pro and GPT-4o models).
+
+Human evaluation of model responses. We worked with experts in each domain to evaluate predictions generated by the models against ground truth responses on a 3-point scale identical to the proposed LMScore (in Appendix D). For each example, the expert was asked to rate a response as "good" if it had few or no errors compared to the ground truth, "okay" if it had many minor errors, and "bad" if there were major errors. We use these human responses to compare and correlate the newly proposed LMScore which is reported in the Appendix (App. Fig. 10 and Table 5). While LMScore appears to be promising, it requires further analysis prior to wider usage.
+
+Performance vs. Difficulty Experts in each domain independently determined and rated the difficulty of answering each input example on a 3-point scale as "easy", "medium", or "hard". In most cases, such as with the MPV, HFE, QECC, and DFT-S extraction and aggregation tasks, difficulty was determined based on how dispersed the information was within the paper. "Easy" examples had answers often within a section or a page, while "medium" cases could be spread across multiple sections, and if the information required knowledge of specific literature outside of the given context the example was rated "hard". Additionally for the DFT-C code generation task, the ratio of the number of implementable functions to the total number of functions mentioned in the paper was used. For HFD, the number of reasoning steps and for GEO the number of datasets was also fac
+
+tored in, and for PDB the length of the sequence determined complexity. Fig. 7 reports performance of each model sliced by difficulty. Overall, models perform substantially better on easy examples compared to the medium and hard examples. Models appear to perform about the same on examples marked medium or hard. Though, one thing of note is that there are usually many more medium examples than hard examples across all tasks.
+
+
+Figure 7: Avg. performance of models sliced by difficulty of examples. Consistent with expectations, all models perform substantially better on easy examples except in the case of Mixtral. For most domains, experts independently converged on measuring difficulty for each example based on how spread-out the requested information was within the context of the full paper.
+
+# 6 DISCUSSION
+
+Model responses lack robustness in instruction following. A common observation across tasks was that, there is variability across model runs, even though average performance remained fairly constant. The variability is usually higher on harder tasks. Instruction following remains a challenge: Models often had pieces of the right answer, but were unable to consistently format it despite examples in the prompt. In rare cases, even though we explicitly asked models to provide answers when they weren't sure, they often refused to venture an educated guess. The model-based evaluation metrics were quite helpful in mitigating issues arising from lack of adherence to instructions.
+
+Performance on retrieval. Fig. 5 and Table 1 report performance of the models on each task in each of the domains. Noticeably all models show high ROUGE-L scores on HFE which is a variation of the needle-in-a-haystack problem where the model needs to extract related equations that might be spread throughout the paper. On tasks requiring exhaustive retrieval of multiple values and aggregation, e.g., DFT (see App. Fig. 14), MPV, and GEO, the models have considerably lower performance than just single value retrieval tasks (e.g., HFE).
+
+Concept tracking, aggregation, summarization. On tasks requiring concept aggregation and tracking, e.g. DFT-P, GEO and QECC, experts found responses from some models quite promising. With DFT-P, Claude-3 appeared to understand the purpose of DFT calculations better and grouped relevant parameters to appropriate functions (see App. Fig.8). On QECC, the experts noted that the summaries generated by the LLM tended to be succinct while also including multitude of key informational "nuggets" and quantitative measurements. While not all of these were correct or important, experts noted that it would be easier to exclude the wrong bits (after examination) but harder to extract and comb out such details from the paper. On the GEO task, the closed models did well
+
+
Model
DFT-S
DFT-P
MPV
MPV-non-trivial
MPV-specific
Pr.
Rec.
F1
Pr.
Rec.
F1
Pr.
Rec.
F1
Pr.
Rec.
F1
Pr.
Rec.
F1
Zero-shot Open Weight LLMs
Mixtral
24.96
23.30
22.67
9.12
6.13
7.09
31.86
23.29
22.82
29.70
21.14
22.31
22.20
35.05
22.64
Command-R+
41.67
27.95
32.19
6.92
4.63
5.41
22.64
27.25
20.80
3.87
6.31
4.52
18.18
17.84
15.97
LongLLaMa
1.26
1.47
1.36
2.99
3.95
3.13
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
Zero-shot Closed Weight LLMs
Gemini 1.0 Pro
11.19
12.62
10.93
23.1
21.01
20.56
31.28
32.92
31.00
36.41
34.92
31.78
24.86
38.76
23.26
GPT-4o
36.96
29.50
30.63
27.93
19.66
22.13
39.22
24.14
25.90
45.10
24.08
30.05
32.35
21.77
22.97
Gemini 1.5 Pro
36.04
33.67
32.11
23.67
16.53
19.00
23.86
38.36
26.85
31.74
42.60
30.08
25.00
31.34
24.48
Gemini 1.5 Flash
33.07
48.74
35.28
22.35
16.42
17.91
16.41
50.90
23.16
15.82
50.97
21.69
14.77
32.90
17.76
Gemini 2.0 Flash
31.38
40.46
32.39
8.22
7.74
7.68
35.84
46.56
36.99
30.81
47.76
33.79
26.48
33.64
24.37
Claude 3 (Opus)
40.45
32.89
33.76
27.26
17.17
19.87
41.35
35.60
34.04
45.64
43.67
38.32
32.18
47.06
31.48
+
+Table 2: Retrieval performance using LLMSim On tasks requiring exhaustive retrieval of information we use LLMSim and compute Precision, Recall, and F1 scores on each document and report the mean. We also include 2 ablations for the MPV task where we ask the LLM to retrieve non-trivial or specific property values (refractive index and optical bandgap) for materials.
+
+# Claude 3 Opus
+
+Here are the details of the DFT calculations in the paper in the specified JSON format:
+
+[
+
+```csv
+"function_name": "DFT_calculations_1",
+"software": "GPAW",
+"functional": "PW91",
+"k-points": [2,2,1],
+```
+
+"other_information": "Grid spacing of 0.18 Å. PAW method used to describe effect of inner cores on valence electrons. Periodic slab of 4 atomic (110) planes used, with atoms in 3 outermost layers allowed to relax. Fixed alloy composition of $6.25\%$ Co (0.25 ML surface Co atoms)."
+
+1
+
+```python
+"function_name": "DFT_parameters_convergence Tests",
+"software": "GPAW",
+"functional": "PW91",
+"k-points": "Tested (2,2,1), (2,4,1), (2,6,1), (3,4,1), (4,6,1)",
+```
+
+"other_information": "Convergence tested with respect to k-points, grid spacing h, and smearing of occupation numbers. Binding energies converged within 0.02 eV and surface Gibbs free energy within 1 meV/k^2."
+
+1
+
+```txt
+"function_name":"DFT_calculations-functional_test", "software": "GPAW", "functional": "Tested PW91, RPBE, vdW-DF2", "k-points": "NaN",
+```
+
+"other_information": "Tested impact of exchange-correlation functional and inclusion of van der Waals corrections on binding energies for selected structures. PW91 overbinds compared to RPBE. vdW-corrected binding energies between PW91 and RPBE values."
+
+1
+
+In summary, the DFT calculations were performed using the GPAW code with the PW91 exchange-correlation functional, a [2,2,1] k-point grid, and a force convergence criteria of 0.81 eV. $\mathring{\mathrm{A}}^{* - 1}$ . Convergence tests were performed with respect to k-points, grid spacing, and smearing, and the impact of the exchange-correlation functional was tested. Key details like the energy cutoff were not provided.
+
+# GPT-40
+
+```txt
+"function_name": "create_dft_parameters_pw91",
+"software": "GPW",
+"functional": "P901",
+"k-points": [2,2,1],
+"energy_cutoff": "NaN",
+"energy_convergence": "NaN",
+"force_convergence": "0.81 eV/Å",
+"relaxed_nuclei": 1.0,
+"relaxed_unit_cell": "NaN",
+```
+
+"other_information": "Grid spacing of 0.18 Å, PAW method, 4x2 periodic slab, 4 atomic planes, experimental lattice parameter of 3.61 Å for Cu matrix, atoms in three outermost atomic layers allowed to relax, periodic boundary conditions in X and Y directions."
+
+1
+
+```python
+"function_name": "create_dft_parameters rpbe",
+"software": "GPAW",
+"functional": "RPBE",
+"k-points": [2, 2, 1]",
+```
+
+"other_information": "Grid spacing of $0.18\,\text{\AA}$ , PAW method, 4x2 periodic slab, 4 atomic planes, experimental lattice parameter of $3.61\,\text{\AA}$ for Cu matrix, atoms in three outermost positions to relax, periodic boundary conditions in X and Y directions."
+
+1
+
+```txt
+"function_name": "create_dft_parameters_vdw_df2",
+"software": "GPAW",
+"functional": "vDW-DF2",
+"k-points": [2,2,1],
+"energy_cutoff": "NaN",
+```
+
+"other_information": "Grid spacing of $0.18\,\text{\AA}$ , PAW method, 4x2 periodic slab, 4 atomic planes, experimental lattice parameter of $3.61\,\text{\AA}$ for Cu matrix, atoms in three outermost positions to relax, periodic boundary conditions in X and Y directions."
+
+1
+
+Figure 8: Example of model outputs for the DFT-P parameter identification task. Claude-3 Opus appears to understand the purpose of the calculations better than the other models and avoids unnecessary repetition. Claude-3 correctly (green) identifies that there is one set of DFT parameters used in the actual study as well as two more set of parameters which are used for convergence testing.
+
+to extract some of the important datasets with the correct spatial and temporal ranges (Fig.25) but performance degrades when multiple datasets are used to cover a larger spatial extent (App. Fig.27). Overall, carefully engineered prompts and agentic workflows could be effective on such tasks.
+
+Closed vs Open models. One thing of note is that on QECC, DFT, and MPV extraction and aggregation tasks, the Command-R+ open weights model which uses retrieval-augmented approaches shows performance similar to the closed weight models. The evals on BIOGR highlight that open models are yet to support both multimodal and long-context capabilities which can enable more scientific applications. On PDB, Mixtral performed higher than GPT-4o which is quite surprising. Both LongLLaMA and Command-R+, failed to produce any sort of FASTA format on the PDB task. They either failed to fully understand the task, or missed steps during aggregation.
+
+Reasoning in code. On the PDB task, remarkably, the more recent Gemini Flash 2.0 model, not only understood the task but seemed to realize the task is better solved by using programming and wrote a python function (which executed correctly) about half of the time. On other half of the PDB inputs, Flash 2.0 decided to aggregate and generate the amino acid sequence similar to other models.
+
+Overall, across tasks, model performances have room for improvement and we discuss specific examples and failure cases in appendix F for each task.
+
+# 7 CONCLUSION
+
+In this work we introduce the CURIE benchmark. A series of tasks designed to measure the ability of LLMs on scientific reasoning and understanding long-contexts. Our main contributions are $(i)$ A new benchmark of 580 examples from 429 research papers that can assess LLMs on comprehension of long-context information from across six scientific disciplines requiring deep expertise. $(ii)$ 10 realistic tasks combining concept retrieval and extraction, concept tracking, aggregation, algebraic manipulation, and expertise across multiple domains to measure capability of models on different aspects of scientific workflows. $(iii)$ We propose model-based evaluation metrics to address the challenge of automatically evaluating complex mixed-format heterogeneous outputs and compare them with human evaluations. $(iv)$ We share guidelines for curating such multi-step tasks and evaluating annotation quality of such complex answers. We hope the diverse tasks and rich annotations in the CURIE benchmark can serve the community in not only evaluating LLMs on their scientific problem solving abilities but also advance research on scientific planning, instruction following, and evaluation of generated texts containing information of diverse types and formats.
+
+# REPRODUCIBILITY STATEMENT
+
+We make the data, prompts, and code available in https://github.com/google/curie under the Apache 2.0 license. Our dataset is available under a CC-BY license. The dataset includes full text of the papers, the ground truth annotations, prompts (which includes prompts used to elicit model responses, as well as the prompts used for evaluation using the proposed LMScore and LLMSim metrics), model responses and code for evaluations. The appendix includes additional information on each of the tasks, annotation procedures, and examples of model outputs and failure modes.
+
+# DISCLAIMER
+
+V.V.A. participated only as a subject-matter expert for the QECC task. Certain equipment, instruments, software, or materials are identified in this paper in order to specify the experimental procedure adequately. Such identification is not intended to imply recommendation or endorsement of any product or service by NIST, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.
+
+# ACKNOWLEDGEMENTS
+
+N.M. acknowledges support from the National Science Foundation under Cooperative Agreement PHY2019786 (The NSF AI Institute for Artificial Intelligence and Fundamental Interactions).
+
+# REFERENCES
+
+Materialsproject.org. https://docs-materialsproject.org/methodology/materials-methodology/electronic-structure-accuracy-of-band-structures, 2017.
+Victor V. Albert and Philippe Faist (eds.). The Error Correction Zoo. 2024. URL https://errorcorrectionzoo.org/.
+Chenxin An, Shansan Gong, Ming Zhong, Mukai Li, Jun Zhang, Lingpeng Kong, and Xipeng Qiu. L-eval: Instituting standardized evaluation for long context language models. arXiv preprint arXiv:2307.11088, 2023.
+Anthropic. The Claude 3 Model Family: Opus, Sonnet, Haiku. Available online at: https:// www-cdn.anthropic.com/de8ba9b01c9ab7cbabf5c33b80b7bbc618857627/ Model_Card_Claude_3.pdf.
+Yushi Bai, Xin Lv, Jiajie Zhang, Hongchang Lyu, Jiankai Tang, Zhidian Huang, Zhengxiao Du, Xiao Liu, Aohan Zeng, Lei Hou, et al. Longbench: A bilingual, multitask benchmark for long context understanding. arXiv preprint arXiv:2308.14508, 2023.
+Iz Beltagy, Kyle Lo, and Arman Cohan. Scibert: A pretrained language model for scientific text. EMNLP, 2019.
+Thomas Camara, Harold Ollivier, and Jean-Pierre Tillich. A class of quantum ldpc codes: construction and performances under iterative decoding. 2007 IEEE International Symposium on Information Theory, pp. 811-815, 2007. URL https://api-semanticscholar.org/CorpusID:13899261.
+Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.
+Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge. arXiv, abs/1803.05457, 2018. URL https://api(semanticscholar.org/ CorpusID:3922816.
+
+Peter JA Cock, Tiago Antao, Jeffrey T Chang, Brad A Chapman, Cymon J Cox, Andrew Dalke, Iddo Friedberg, Thomas Hamelryck, Frank Kauff, Bartek Wilczynski, et al. Biopython: freely available python tools for computational molecular biology and bioinformatics. Bioinformatics, 25(11):1422, 2009.
+Arman Cohan, Waleed Ammar, Madeleine Van Zuylen, and Field Cady. Structural scaffolds for citation intent classification in scientific publications. arXiv preprint arXiv:1904.01608, 2019.
+Cohere. Introducing Command R+: A Scalable LLM Built for Business. Available online at: https://cohere.com/blog/command-r-plus-microsoft-azure.
+Pradeep Dasigi, Kyle Lo, Iz Beltagy, Arman Cohan, Noah A Smith, and Matt Gardner. A dataset of information-seeking questions and answers anchored in research papers. In *NAACL*, pp. 4599-4610, 2021.
+Qingyang Dong and Jacqueline M Cole. Auto-generated database of semiconductor band gaps using chemdataextractor. *Scientific Data*, 9(1):193, 2022a.
+Qingyang Dong and Jacqueline M Cole. Auto-generated database of semiconductor band gaps using chemdataextractor. *Scientific Data*, 9(1):193, 2022b.
+Zican Dong, Tianyi Tang, Junyi Li, Wayne Xin Zhao, and Ji-Rong Wen. Bamboo: A comprehensive benchmark for evaluating long text modeling capacities of large language models. arXiv preprint arXiv:2309.13345, 2023.
+David Donoho. Data science at the singularity. Harvard Data Science Review, 6(1), 2024.
+Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, and Matt Gardner. Drop: A reading comprehension benchmark requiring discrete reasoning over paragraphs. arXiv preprint arXiv:1903.00161, 2019.
+Alexander Dunn, John Dagdelen, Nicholas Walker, Sanghoon Lee, Andrew S Rosen, Gerbrand Ceder, Kristin Persson, and Anubhav Jain. Structured information extraction from complex scientific text with fine-tuned large language models. arXiv preprint arXiv:2212.05238, 2022.
+Yu Gu, Robert Tinn, Hao Cheng, Michael Lucas, Naoto Usuyama, Xiaodong Liu, Tristan Naumann, Jianfeng Gao, and Hoifung Poon. Domain-specific language model pretraining for biomedical natural language processing. ACM Transactions on Computing for Healthcare (HEALTH), 3(1): 1-23, 2021.
+Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020.
+Cheng-Ping Hsieh, Simeng Sun, Samuel Kriman, Shantanu Acharya, Dima Rekesh, Fei Jia, and Boris Ginsburg. Ruler: What's the real context size of your long-context language models? arXiv preprint arXiv:2404.06654, 2024.
+Albert Q Jiang, Alexandre Sablayrolles, Antoine Roux, Arthur Mensch, Blanche Savary, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Emma Bou Hanna, Florian Bressand, et al. Mixtral of experts. arXiv preprint arXiv:2401.04088, 2024.
+Carlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik Narasimhan. Swe-bench: Can language models resolve real-world github issues? arXiv preprint arXiv:2310.06770, 2023.
+Qiao Jin, Bhuwan Dhingra, Zhengping Liu, William Cohen, and Xinghua Lu. Pubmedqa: A dataset for biomedical research question answering. In EMNLP, pp. 2567-2577, 2019.
+David Jurgens, Srijan Kumar, Raine Hoover, Dan McFarland, and Dan Jurafsky. Measuring the evolution of a scientific field through citation frames. Transactions of the Association for Computational Linguistics, 6:391-406, 2018.
+
+Ehsan Kamalloo, Nouha Dziri, Charles LA Clarke, and Davood Rafiei. Evaluating open-domain question answering in the era of large language models. arXiv preprint arXiv:2305.06984, 2023.
+Gregory Kamradt. Needle in a haystack - pressure testing LLMs. https://github.com/gkamradt/LLMTest_NeedleInAHaystack/tree/main, 2023.
+J-D Kim, Tomoko Ohta, Yuka Tateisi, and Jun'ichi Tsujii. Genia corpus—a semantically annotated corpus for bio-textmining. Bioinformatics, 19(suppl_1):i180-i182, 2003.
+Tomáš Kočisky, Jonathan Schwarz, Phil Blunsom, Chris Dyer, Karl Moritz Hermann, Gábor Melis, and Edward Grefenstette. The narrativeqa reading comprehension challenge. Transactions of the Association for Computational Linguistics, 6:317-328, 2018.
+Martin Krallinger, Anastasia Krithara, Anastasios Nentidis, Georgios Paliouras, and Marta Villegas. Bioasq at clef2020: Large-scale biomedical semantic indexing and question answering. In Advances in Information Retrieval: 42nd European Conference on IR Research, ECIR 2020, Lisbon, Portugal, April 14–17, 2020, Proceedings, Part II 42, pp. 550–556. Springer, 2020.
+Jens Kringelum, Sonny Kim Kjaerulff, Søren Brunak, Ole Lund, Tudor I Oprea, and Olivier Taboureau. Chemprot-3.0: a global chemical biology diseases mapping. Database, 2016:bav123, 2016.
+Wojciech Krysciński, Nazneen Rajani, Divyansh Agarwal, Caiming Xiong, and Dragomir Radev. Booksum: A collection of datasets for long-form narrative summarization. arXiv preprint arXiv:2105.08209, 2021.
+Myer Kutz. Handbook of materials selection. John Wiley & Sons, 2002.
+Wai-Chung Kwan, Xingshan Zeng, Yufei Wang, Yusen Sun, Liangyou Li, Lifeng Shang, Qun Liu, and Kam-Fai Wong. M4le: A multi-ability multi-range multi-task multi-domain long-context evaluation benchmark for large language models. arXiv preprint arXiv:2310.19240, 2023.
+Seongyun Lee, Seungone Kim, Sue Hyun Park, Geewook Kim, and Minjoon Seo. Prometheus: Vision-language model as a judge for fine-grained evaluation. arXiv preprint arXiv:2401.06591, 2024.
+Yoonjoo Lee, Kyungjae Lee, Sunghyun Park, Dasol Hwang, Jaehyeon Kim, Hong-in Lee, and Moontae Lee. Qasa: advanced question answering on scientific articles. In ICML, pp. 19036-19052. PMLR, 2023.
+Jiao Li, Yueping Sun, Robin J Johnson, Daniela Sciaky, Chih-Hsuan Wei, Robert Leaman, Allan Peter Davis, Carolyn J Mattingly, Thomas C Wiegers, and Zhiyong Lu. Biocreative v cdr task corpus: a resource for chemical disease relation extraction. Database, 2016, 2016.
+Jiaqi Li, Mengmeng Wang, Zilong Zheng, and Muhan Zhang. Looge: Can long-context language models understand long contexts? arXiv preprint arXiv:2311.04939, 2023.
+Dong Liang, Huadong Guo, Lu Zhang, Yun Cheng, Qi Zhu, and Xuting Liu. Time-series snowmelt detection over the antarctic using sentinel-1 sar images on google earth engine. Remote Sensing of Environment, 256:112318, 2021.
+Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74-81, 2004.
+Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. Transactions of the Association for Computational Linguistics, 12:157-173, 2024.
+Pan Lu, Hritik Bansal, Tony Xia, Jiacheng Liu, Chunyuan Li, Hannaneh Hajishirzi, Hao Cheng, Kai-Wei Chang, Michel Galley, and Jianfeng Gao. Mathvista: Evaluating mathematical reasoning of foundation models in visual contexts. arXiv preprint arXiv:2310.02255, 2023.
+Yi Luan, Luheng He, Mari Ostendorf, and Hannaneh Hajishirzi. Multi-task identification of entities, relations, and coreference for scientific knowledge graph construction. EMNLP, 2018.
+
+Oscar Manas, Benno Krojer, and Aishwarya Agrawal. Improving automatic vqa evaluation using large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 4171-4179, 2024.
+Juraj Mavracic, Callum J Court, Taketomo Isazawa, Stephen R Elliott, and Jacqueline M Cole. Chemdataextractor 2.0: Autopopulated ontologies for materials science. Journal of Chemical Information and Modeling, 61(9):4280-4289, 2021a.
+Juraj Mavracic, Callum J Court, Taketomo Isazawa, Stephen R Elliott, and Jacqueline M Cole. Chemdataextractor 2.0: Autopopulated ontologies for materials science. Journal of Chemical Information and Modeling, 61(9):4280-4289, 2021b.
+James Mayfield, Eugene Yang, Dawn Lawrie, Sean MacAvaney, Paul McNamee, Douglas W. Oard, Luca Soldaini, Ian Soboroff, Orion Weller, Efsun Kayi, Kate Sanders, Marc Mason, and Noah Hibbler. On the Evaluation of Machine-Generated Reports, May 2024. URL http://arxiv.org/abs/2405.00982. arXiv:2405.00982 [cs].
+Nicolas C. Menicucci. Fault-tolerant measurement-based quantum computing with continuous-variable cluster states. Phys. Rev. Lett., 112:120504, Mar 2014. doi: 10.1103/PhysRevLett.112.120504. URL https://link.aps.org/doi/10.1103/PhysRevLett.112.120504.
+Benjamin Nye, Junyi Jessy Li, Roma Patel, Yinfei Yang, Iain J Marshall, Ani Nenkova, and Byron C Wallace. A corpus with multi-level annotations of patients, interventions and outcomes to support language processing for medical literature. In Proceedings of the conference. Association for Computational Linguistics. Meeting, volume 2018, pp. 197. NIH Public Access, 2018.
+OpenAI. Hello GPT-4o. Available online at: https://openai.com/index/hello-gpt-4o/.
+Haining Pan, Nayantara Mudur, Will Taranto, Maria Tikhanovskaya, Subhashini Venugopalan, Yasaman Bahri, Michael P. Brenner, and Eun-Ah Kim. Quantum many-body physics calculations with large language models. arxiv 2403.03154, 2024.
+Maciej Polak and Dane Morgan. Extracting Accurate Materials Data from Research Papers with Conversational Language Models and Prompt Engineering -Example of ChatGPT. URL https://arxiv.org/pdf/2303.05352.pdf.
+Machel Reid, Nikolay Savinov, Denis Teplyashin, Dmitry Lepikhin, Timothy Lillicrap, Jean-baptiste Alayrac, Radu Soricut, Angeliki Lazaridou, Orhan Firat, Julian Schrittwieser, et al. Gemini 1.5: Unlocking multimodal understanding across millions of tokens of context. arXiv preprint arXiv:2403.05530, 2024.
+David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, and Samuel R Bowman. Gpqa: A graduate-level google-proof q&a benchmark. arXiv preprint arXiv:2311.12022, 2023.
+Ari Seifter, Alison Schwarzwalder, Kate Geis, and John Aucott. The utility of google trends for epidemiological research: Lyme disease as an example. *Geospatial health*, 4(2):135-137, 2010.
+Uri Shaham, Maor Ivgi, Avia Efrat, Jonathan Berant, and Omer Levy. Zeroscrolls: A zero-shot benchmark for long text understanding. arXiv preprint arXiv:2305.14196, 2023.
+Matthew C Swain and Jacqueline M Cole. Chemdataextractor: a toolkit for automated extraction of chemical information from the scientific literature. Journal of chemical information and modeling, 56(10):1894-1904, 2016.
+Szymon Tworkowski, Konrad Staniszewski, Mikołaj Pacek, Yuhuai Wu, Henryk Michalewski, and Piotr Miłos. Focused transformer: Contrastive training for context scaling. Advances in Neural Information Processing Systems, 36, 2024.
+Chonghua Wang, Haodong Duan, Songyang Zhang, Dahua Lin, and Kai Chen. Ada-leval: Evaluating long-context llms with length-adaptable benchmarks. arXiv preprint arXiv:2404.06480, 2024.
+
+Gerhard Welsch, Rodney Boyer, and EW Collings. Materials properties handbook: titanium alloys. ASM international, 1993.
+Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830, 2019.
+Renrui Zhang, Dongzhi Jiang, Yichi Zhang, Haokun Lin, Ziyu Guo, Pengshuo Qiu, Aojun Zhou, Pan Lu, Kai-Wei Chang, Peng Gao, et al. MathVerse: Does Your Multi-modal LLM Truly See the Diagrams in Visual Math Problems? arXiv preprint arXiv:2403.14624, 2024.
+Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675, 2019.
+Xiang Zhang, Zichun Zhou, Chen Ming, and Yi-Yang Sun. Gpt-assisted learning of structure-property relationships by graph neural networks: Application to rare-earth doped phosphors. arXiv preprint arXiv:2306.14238, 2023.
+Yuzhou Zhang, Gabriel Milinovich, Zhiwei Xu, Hilary Bambrick, Kerrie Mengersen, Shilu Tong, and Wenbiao Hu. Monitoring pertussis infections using internet search queries. Scientific reports, 7(1):10437, 2017.
+Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. Advances in Neural Information Processing Systems, 36, 2024.
+Zhiling Zheng, Oufan Zhang, Christian Borgs, Jennifer T Chayes, and Omar M Yaghi. Chatgpt chemistry assistant for text mining and prediction of mof synthesis. arXiv preprint arXiv:2306.11296, 2023.
+Chunting Zhou, Pengfei Liu, Puxin Xu, Srinivasan Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. Advances in Neural Information Processing Systems, 36, 2024.
+Andrew Zhu, Alyssa Hwang, Liam Dugan, and Chris Callison-Burch. Fanoutqa: Multi-hop, multi-document question answering for large language models. arXiv preprint arXiv:2402.14116, 2024.
+
+# A DATASET STATISTICS AND TASKS OVERVIEW.
+
+In Fig. 2 (b), Fig. 2 (c), and Fig. 4 (c) we present the distribution of the CURIE dataset in terms of papers, and distribution of lengths of inputs and outputs per domain. Here, in Table. 3 we consolidate and present the number of examples in each task and the average length of the inputs and ground truth outputs. Table 4 presents a brief description of the tasks, the capabilities necessary for the task, the format of the output, and both programmatic and LLM-based metrics that are used to evaluate performance on the task.
+
+
Domain
Task
# papers
# examples
Avg. length (# words)
input
output (ground truth)
Material Science
DFT-S
74
74
5818
232
Material Science
DFT-P
74
74
5818
132
Material Science
DFT-C
74
74
5818
1742
Material Science
MPV
17
17
1687
2188
Condensed Matter Physics
HFD
15
15
5385
1422
Condensed Matter Physics
HFE
38
38
8472
111
Quantum Computing
QECC
65
65
19913
207
Geospatial
GEO
19
19
7802
808
Biodiversity
BIOGR
137
138
-
20
Protein Sequencing
PDB
64
64
44028
-
+
+Table 3: Statistics of the CURIE dataset. We report the the number of papers and examples for each task in each of the domains and also include the average length the input and ground truth outputs in words.
+
+
Task
Brief description
Capability
Output Format
Primary Eval. Metric
DFT-S
Extract input material structures for DFT calculations.
entity recognition, concept tracking
JSON
LLMSim-F1
DFT-P
Extract parameters for DFT calculations.
concept extraction, tracking, aggregation
JSON
LLMSim-F1
DFT-C
Write functional code for DFT computations.
concept aggregation, coding
TEXT
ROUGE-L
MPV
Identify all instances of materials, their properties, and descriptors.
entity recognition, concept extraction, tracking
JSON
LLMSim-F1
HFD
Derive the Hartree-Fock mean-field Hamiltonian for a quantum many-body system.
concept extraction, alg. manipulation, reasoning
TEXT
ROUGE-L
HFE
Extract the most general mean-field Hamiltonian.
concept extraction
TEXT (latex equation)
ROUGE-L
QECC
Create a YAML file with the Error Correction Code's properties.
concept aggregation, summarization
YAML
ROUGE-L
GEO
Extract information for all geospatial datasets used along with the spatial and temporal extents.
concept extraction, aggregation
JSON
ROUGE-L
BIOCR
Determine the latitude, longitude bounding box encompassing the region in the map image.
visual comprehension, reasoning
JSON (lat., lon. co-ordinates)
Intersection-over-union (IoU)
PDB
Reconstruct a protein's amino acid sequence form the 3D structure.
tracking, aggregation reasoning
Code or TEXT (seq.)
Identity ratio (IDr)
+
+Table 4: Task details and capabilities required. A brief description of the tasks, capabilities assessed, output format, and the primary evaluation metric (used in Fig. 1 and Fig. 5).
+
+
+
+
+Figure 9: Comparing model performances on scientific QA and long-context benchmarks. We compare the performance of the top 3 closed models on CURIE against, 2 science QA benchmarks - GPQA, MathVista, an improved language understanding benchmark MMLU-pro, and 2 long-context benchmarks Zero-Scrolls and RULER.
+
+# B MODEL PERFORMANCES ON SCIENCE VS LONG-CONTEXT BENCHMARKS
+
+In Fig. 9 we observe how performance of models on the CURIE benchmark correlate or compare with performance on other scientific QA benchmarks and long-context benchmarks. We specifically examine the top-3 models on CURIE (Claude-3, Gemini 1.5 Pro, and GPT-4o). We observe that performance of models on CURIE is more in-line with the realistic ZeroScrolls long-context benchmark and also the GPQA scientific question answering benchmark. CURIE appears to be a harder benchmark than both Zero-Scrolls and GPQA.
+
+# C ANNOTATOR AGREEMENTS.
+
+For all tasks we worked with experts to establish a consistent output format over a couple of initial iterations. We then had a pilot phase followed by some adjudication to clarify outputs. To evaluate annotator agreements, for retrieval tasks, we had annotators examine each other's work after the adjudication. For the HFE and DFT-S tasks the agreement was near perfect $(>95\%)$ . There were minor differences in the exact phrasing / chemical formula notation used. For MPV, we had two rounds of feedback and were then able to get an agreement over $80\%$ on the materials to be extracted comprehensively. For GEO, the agreement was again high after an initial pilot phase and discussion, agreement was over $90\%$ on the datasets, spatial and time ranges. There were minor differences in the exact phrasing of the responses but these were discounted e.g. "for each year between 2012-2015" vs "2012,2013,2014,2015".
+
+# D LMSCORE: A COARSE MODEL-BASED EVALUATION METRIC.
+
+Evaluation on Likert scales provide a quick coarse signal of the quality of the responses on generation tasks. With LMScore we propose an overall weighted score on a 3-point scale obtained by asking the LLM if the predictions match ground truth and using the model's confidence (log-probs scores) to get a weighted score. Specifically, given the ground truth and predicted responses, we ask the model to check if the predicted responses match the ground truth, and ask the model to output "good" (if the prediction has few minor errors), "okay" (if there are many minor errors), and "bad" if
+
+there are major errors. Instead of using the model generated response directly, we compute a score based on the model log-likelihood values. If $x_{t}$ represents the tokens for the 3 categories we are interested in, $x_{t} \in \{\text{bad, ok, good}\}$ , and $w_{t}$ are the corresponding weights we want to assign to each category, $w_{t} \in \{0, 0.5, 1\}$ , then
+
+$$
+L M S c o r e = \sum_ {t = 0} ^ {2} p \left(x _ {t}\right) \times w _ {t} \tag {1}
+$$
+
+$p(x_{t})$ is computed by renormalize the probabilities of the tokens by considering a softmax() operation on the log-probabilities of the tokens: $\left([l_{bad}, l_{ok}, l_{good}]\right)$ . We consider an uncased version of the tokens and treat 'ok' and 'okay' equivalently. We use GPT-4o as the LLM. When the tokens are not present in the top-5 log probabilities we compute an approximation based on the probability mass of the tokens not present in the top-5. We make the code for computation available in the supplement.
+
+
+Figure 10: Correlation of GPT-4o based LMScore metric with human evaluations, Across tasks in domains where ROUGE-L is the primary evaluation metric, LMScore appears to be a promising alternative to ROUGE.
+
+
Method
DFT
MPV
HFD
HFE
QECC
GEO
R-L
LMS
R-L
LMS
R-L
LMS
R-L
LMS
R-L
LMS
R-L
LMS
Zero-shot Open Weight LLMs
Mixtral
7.43
0.08
13.43
0.18
3.78
0.05
9.15
0.11
3.10
0.06
20.23
0.19
Command-R+
5.12
0.06
11.22
0.37
15.81
0.17
41.23
0.31
17.23
0.16
21.36
0.15
LongLLaMa
4.61
0.02
6.03
0.06
4.36
0.01
10.33
0.00
8.67
0.01
9.53
0.00
Zero-shot Closed-Weight LLMs
Gemini 1.0 Pro
10.52
0.06
13.69
0.30
18.10
0.02
36.60
0.10
17.48
0.05
28.44
0.18
GPT-4o
9.05
0.12
13.52
0.25
9.81
0.06
48.93
0.47
19.51
0.16
31.47
0.30
Claude 3 (Opus)
8.38
0.11
15.54
0.34
16.82
0.13
49.10
0.50
20.54
0.18
28.63
0.24
Gemini 1.5 Flash
10.62
0.13
14.14
0.43
17.53
0.21
43.94
0.39
17.40
0.22
28.94
0.29
Gemini 1.5 Pro
10.83
0.12
14.12
0.41
18.86
0.14
39.56
0.33
18.03
0.23
30.25
0.30
+
+Table 5: Results comparing performance of all models on all tasks based on the ROUGE-L metric and the proposed GPT-4o based LMScore (LMS) metric. DFT reports avg. across all 3 DFT tasks.
+
+Human vs. Model-based 3-point evaluations We worked with experts in each domain to evaluate predictions generated by the models against ground truth responses on a 3-point scale identical to the proposed LMScore. For each example, the expert was asked to rate a response as "good" if it had few or no errors compared to the ground truth, "okay" if it had many minor errors, and "bad" if there were major errors. We use these human responses to compare and correlate the newly proposed LMScore which is reported in Fig. 10.
+
+Table 5 shows performance of the proposed LMScore (LMS) for all models across all tasks. We observe that LMScore values show trends similar to what is observed in ROUGE-L (R-L). Table 6
+
+# E LIMITATIONS
+
+This work focused on a select set of domains and a narrow set of tasks with high quality annotations, thus limiting the scale. Increasing the scale of examples across tasks would provide a more robust
+
+
Method
DFT-C
DFT-S
DFT-P
DFT-AVG
R-L
LMS
LLMSim F1
R-L
LMS
LLMSim F1
R-L
LMS
R-L
LMS
Zero-shot Open Weight LLMs
Mixtral
7.43
0.09
25.61
14.03
0.05
7.87
15.16
0.10
7.43
0.08
Command-R+
5.12
0.06
34.47
18.68
0.03
6.97
17.59
0.09
5.12
0.06
LongLLaMa
4.61
0.03
1.96
8.68
0.01
5.02
11.23
0.02
4.61
0.02
Zero-shot Closed-Weight LLMs
Gemini 1.0 Pro
6.57
0.10
42.95
12.42
0.02
9.66
14.67
0.05
10.52
0.06
GPT-4o
9.05
0.16
33.30
15.70
0.04
24.76
15.17
0.15
9.05
0.12
Claude 3 (Opus)
8.38
0.16
36.28
16.87
0.05
21.81
16.10
0.13
8.38
0.11
Gemini 1.5 Flash
10.07
0.22
39.34
10.96
0.05
21.36
12.90
0.13
10.62
0.13
Gemini 1.5 Pro
10.83
0.21
36.99
14.55
0.03
20.89
15.59
0.12
10.83
0.12
+
+Table 6: Results comparing performance of all models on the DFT tasks based on the ROUGE-L metric (R-L), LLMSim (F1) and the proposed GPT-4o based LMScore (LMS) metric. Blue is highest score and Yellow is second highest.
+
+evaluation benchmark. With the fast pace of language model advancements, evaluating the generated text responses on such complex tasks is challenging even with high quality human annotations. In particular, just based on instructions and output format provided in the prompt, existing automated evaluation metrics Rouge-L and BERTScore can be unforgiving resulting in low scores for responses that look different but might still be reasonable. While we propose model based evaluation metrics, these are still far from perfect and provides room for more creative strategies. Further, we primarily evaluate models in the zero-shot and two-shot settings (discussed in the supplement) and we invite researchers to explore retrieval augmented generation and chained prompting strategies that evaluate the models on planning and task decomposition.
+
+Another limitation is that, it is difficult to obtain human performance on the benchmark. These tasks require extensive expertise and it's unlikely that any one person has sufficient expertise across these domains. On the other hand, hiring an expert for each of the domains and evaluating their performance of the task would double the cost of annotation, so in this work we rely on annotator adjudication to come up with the final answers.
+
+# F DETAILED DESCRIPTIONS OF TASKS AND DATA
+
+# F.1 DENSITY FUNCTIONAL THEORY (DFT) TASK
+
+Density functional theory (DFT) provides a robust framework for quantum mechanical modeling of materials, enabling first-principles predictions and validation of experimental findings. Despite its widespread use and success in materials science, DFT calculations remain largely inaccessible to most experimental researchers, typically requiring a specialized PhD-level training in computational materials science. This knowledge gap arises from a confluence of factors: the underlying quantum mechanical formalism; intricacies of numerical implementation and software-specific parameters; and the nuanced interpretation of results. While the theoretical foundations are often covered in elective graduate coursework, the practical application of DFT necessitates years of specialized training to develop the intuition required to navigate software complexities, select appropriate parameters and ensure the physical validity of results.
+
+This benchmark represents a critical first step towards harnessing LLMs for automating complex scientific workflows. While considerable interest exists in leveraging AI to accelerate scientific discovery, concerns persist regarding the accuracy and reliability of LLMs in this context. Evaluating the performance of LLMs on intricate scientific tasks, such as DFT calculations, presents a significant challenge due to the domain expertise required for assessment. To address this, we introduce a comprehensive framework for evaluating each stage of the DFT workflow - from initial planning to final execution, ultimately aiming towards the complete automation of DFT calculations. Such automation would empower a broader range of scientists including materials scientists, chemists and physicists to perform complex calculations without the need for extensive specialized training, enriching the theoretical foundations of experimental work and accelerating discovery.
+
+To assess the ability of large language models (LLMs) to generate DFT workflows, we propose a benchmark task requiring the translation of materials science papers into executable Python code, leveraging established domain-specific libraries. This benchmark encapsulates three core subtasks: (1) identifying the computational steps essential for reproducibility; (2) extracting metadata, including input structures and DFT parameters; and (3) translating these steps and metadata into functional code. Subtask (1) evaluates the LLM's comprehension of domain-specific concepts and ability to plan complex procedures. Subtask (2) assesses its capacity to extract pertinent information within a potentially expansive context, where relevant details may be dispersed across different sections of the publication. Finally, subtask (3) gauges the LLM's aptitude for scientific coding which requires not only proficiency in a specific coding language and libraries but also a deep understanding of the underlying scientific principles.
+
+# F.1.1 DFT DATASET COLLECTION DETAILS
+
+We identified a set of $\sim 200$ papers from the S2ORC corpus1 that mentioned DFT computations in the abstract. We hired two expert annotators, who hold PhD degrees specifically in Materials Science and work directly on DFT computations to annotate the papers. The annotators identified 74 papers which had DFT calculations to validate experimental results and also included a mix of theoretical understanding. Some of the papers that were discarded included papers that were proposing new DFT computation methods, or papers that were large focused on theory with just a passing mention of DFT computations. The annotators were asked to annotate all information necessary to reproduce the DFT computations in the paper.
+
+The annotators started by identifying the structures studied in the paper. They identified the graph of the computational steps carried out along with the inputs and outputs that went into each computation. They used the inputs and outputs to perform a topological sorting of the functions to create a computational graph of the different DFT computations done in the paper. They then implemented the functions of the DFT computation in python code. In cases where the paper did not have sufficient information, they marked such functions with placeholders noting that additional information was necessary and missing from the paper to fully reproduce that specific step. The annotators also identified analysis steps, and include code to perform the analysis functions. The annotators provide final code that includes the structure metadata, DFT params, and general helper functions as well as specific functions for each of the computation steps, and a final block of code that executes the computations and the analysis in the sequence performed in the paper.
+
+# F.1.2 DFT TASK DETAILS
+
+Our dataset is composed of three parts: calculation metadata for input structures, DFT computation functions and parameters, and code.
+
+Metadata for input structures and DFT functions We capture the details of the inputs to each DFT calculation run in the workflow in two different types of metadata: structure metadata for the input structure, and DFT parameters for the DFT calculation settings. These subtasks are named DFT-S and DFT-P respectively and prompts are shown in Fig. 11 and Fig. 12.
+
+Code for reproducing the calculation workflow We write python code that reproduces the calculation workflow specified by the computation graph and the calculation metadata. The code is written in python, and we primarily use the Atomic Simulation Environment (ASE) library for setting up, manipulating, running and analyzing DFT calculations. We assume that the DFT software used in the original paper are available to run, and call the DFT software from ase. The prompt for this is shown in Fig. 13.
+
+# DFT-S Prompt
+
+A materials scientist would like to reproduce the DFT calculations from a paper.
+
+They want to identify the input structures, and gather as much information about the structures as possible.
+
+```txt
+Make sure to identify all input structures, and output a list of the distinct input structures information with fields "id", "common_name", "scientific_name", "type", "composition", "description", "vacuum_x", "vacuum_y", "vacuum_z", "supercell", "cas_number", "lattice_a", "lattice_b", "lattice_c", "space group", "orientation", "mp_id", "isomer_name". The "id" field is just a string of format "structure_metadata.{number}", where {number} starts from 1 and indicates the order the structure appears in the excerpt. The "description" field should capture all relevant information that is not captured by the other fields. Make sure to write your output as a list of dictionaries, NOT A BULleted LIST. The "common_name" field should have the common name of the material and "scientific_name" should have the formal scientific name of the material. The "type" field should point out whether the material is a molecule, a protein, a bulk crystal structure, a thin film or something else. If the structure has vacuum around it, please include the thickness of vacuum layer in three directions with units in these fields: "vacuum_x", "vacuum_y", "vacuum_z". The fields "lattice_a", "lattice_b", "lattice_c" correspond to the lattice parameters of the unit cell. Include units in these fields as well. Leave them blank if lattice parameters are missing. The "supercell" field should tell how many times the unit cell is repeated in the [x, y, z] directions, like "2x2x2". If the text indicates the material structure is from material project and provides a "mp_id", please include that in the field "mp_id". If the structure has multiple isomers and the text mentions which is used, please indicate that in the field "isomer_name". If any information is relevant but missing, input "UNKNOWN" in the field. If any information is irrelevant and missing, input None in the field. The "description" field should capture all relevant information that is not captured by the other fields. Make sure to write your output as a list of dictionaries, NOT A BULleted LIST. Example excerpt: [Excerpt and additional electronic configuration details abbreviated]
+Example output format: {"id": "structure_metadata_1", "common_name": "STO", "scientific_name": "Strontium titanate", [Additional fields abbreviated: type, composition, all parameters] "description": "pure SrTi03" [Additional structures abbreviated]]} Here is the paper: {{text}}
+```
+
+Figure 11: Prompt for extracting input structures used in DFT calculations (DFT-S Task).
+
+# DFT-P prompt
+
+```txt
+A materials scientist would like to reproduce the DFT calculations from a paper.
+They want detailed information about each of the DFT calculations in the paper.
+Output a list of the distinct DFT parameters with fields including, but not limited to, "software", "functional", "k-points-grid", "pseudopotentials",
+"basis_set", "energy_cutoff", "energy_convergence",
+"force_convergence", "relaxed_nuclei",
+"relaxed_unit_cell", "spin", "hubbard_U".
+If a structure is relaxed, please set "relaxed_nuclei" or "relaxed_unit_cell"
+to 1.0 (corresponding to true).
+If spin is involved in the calculation, set "spin" to 1.0
+Include the units in these fields if applicable.
+If any information is relevant but missing, input "NaN" in the field.
+If any information is irrelevant and missing, input "NaN" in the field.
+Make sure to write your output in JSON format..
+Include any related information to the that has not been covered into the "other_information" field..
+Use the following format:
+{
+"function_name": "short_function_description",
+"software": "Specify which software was used, e.g. vasp,
+gaussian, castep, qe, dmol, orca, wein2k",
+"functional": "functional name",
+"k-points": "k-point grid as [x,y,z
+",
+"energy_cutoff": "energy cutoff in eV if mentioned, else NaN",
+"energy_convergence": "energy convergence if mentioned, else NaN",
+"force_convergence": "force convergence if mentioned, else NaN",
+"relaxed_nuclei": "1.0 if nuclei is mentioned to be relaxed, 0.0 if mentioned to be fixed, else NaN",
+"relaxed_unit_cell": "1.0 if it is mentioned to be relaxed, 0.0 if if mentioned not relaxed or else NaN ",
+"spin": "1.0 if spin considered, 0.0 if not considered, else NaN", "hubbard_U": "NaN if not mentioned",
+"other_information": "Any other relevant information for the calculation."
+},
+...
+]
+[Example excerpt abbreviated]
+[Example output: Single DFT calculation with VASP, HSE06, key parameters shown]
+Here is the paper:
+{\{text\}}
+Using the specified format, extract and
+list out the details of all the DFT calculations in the paper.
+```
+
+Figure 12: Prompt for extracting DFT calculation parameters (DFT-P Task).
+
+# DFT-C prompt
+
+I am a computational materials scientist, and I would like to reproduce the DFT calculations from a paper.
+
+Write python code to reproduce all DFT calculations from a paper. You have access to the library as, and any DFT software used in the paper.
+
+Whenever possible, make the code modular by write functions for each step of the calculation
+
+(i.e. set up the unit cell, run DFT, find the total energy from the DFT calculation, plot the band structure, ...)
+
+and calling the functions, instead of writing one long body of code.
+
+Make sure all input structures, DFT calculations, and calculation outputs such as energies, density of states or band gap are accounted for.
+
+```txt
+-
+This is the paper I'd like to write the python code for: {{text}}
+-
+Output:
+```
+
+
+Figure 13: Prompt for generating Python code to reproduce DFT calculations (DFT-C Task).
+
+
+Figure 14: Model responses on the DFT-S structure metadata extraction task. Claude-3 Opus extracts accurate structures (green) relevant to the DFT computation whereas the other models do not precisely identify the exact structures that go into the DFT computation and tend to repeat entries.
+
+
+
+
+
+
+
+# F.1.3 DFT TASKS: RESULTS AND ANALYSIS
+
+Structure Metadata. (DFT-S) Many of the models did a good job of picking out relevant information about the chemical structures from the text. Qualitatively, the claude-3-opus-20240229 model outperforms the others in its ability to understand how many structures are described in the paper. For example, on record 2023-09-22-13bcf90c3ef43f1413deg, claude-3-opus-20240229 correctly identifies two structures that are present in the text. The other models output many more struc
+
+tures with repeated information. The same is true for records 2023-09-22-01b9cdba467fd7882e42g and 2023-09-22-07b4d66e23971ccb85c0g
+
+DFT Paramaters Metadata. (DFT-P) Again, all models do a reasonable job of identifying relevant information from the text and structuring it properly as prompted. However, claude-3-opus20240229 appears to understand the purpose of the calculations better than the other models, and it avoids unnecessary repetition. For example, in record 2023-09-22-07b4d66e23971ccb85c0g, claude-3-opus-20240229 correctly identifies that there is one set of DFT parameters used in the actual study as well as two more sets of parameters used for convergence testing. Based on how it names each parameter set, it is clear that it understands the purpose of each parameter set. For example, it named a parameter set "DFT-parameters-convergence-tests" as opposed to the other models' more generic names, like GPT-4o's "create-dft-parameters-rpbe". However, its predisposition to brevity has its drawbacks as well. For example in record 2023-09-22-0ce1b5ea9a8637db5435g, claude-3-opus20240229 incorrectly finds only one set of DFT parameters. Meanwhile, gemini-1.5-flash-latest correctly identifies the two sets of parameters actually present in the paper. All other models reproduce the same sets of parameters multiple times with different names.
+
+Code (DFT-C). Gemini-1.5-flash-latest and mixtral-8x7b-32768 do much worse than the others. E.g. record 2023-09-22-0ce1b5ea9a8637db5435g. Gemini-1.5-flash-latest returns simple constant values like "return 0" and "return [0]" where other models implement more useful functions. Mixtral appeared not to finish writing a script at all. The others arguably performed similarly. Claude3 was the best overall.
+
+# F.2 MATERIAL, PROPERTY, VALUE EXTRACTION TASK (MPV)
+
+Modern scientific research articles contain unstructured natural language descriptions of materials, their structure, processing, and properties. This wealth of information is often difficult to access due to the unstructured nature of the text. Collection and standardization of such unstructured information at scale would benefit materials researchers and accelerate new materials discovery. Existing resources, such as human-curated tables or handbooks, are typically limited in scope and often lack crucial details regarding material structure and processing. This lack of context can lead to poor predictability of material properties. While rule-based approaches have been widely employed Swain & Cole (2016); Mavracic et al. (2021b); Dong & Cole (2022b), they often fail to capture critical information hidden within the broader context of the text. Dataset curated by computational methods is a good alternative with structured information, however computational results could not be generalized to the prediction of experimental measurements mp (2017) due to the inherent limitation in the theory itself (e.g. density functional theory (DFT)).
+
+With LLM, prompt-based extraction from the scientific literature is emerging as a new extraction method that could result in better accuracy at a lower amount of human effort. Early LLM-based property extraction studies utilized fine-tuning Dunn et al. (2022), but there have been a series of papers using prompt engineering with success, such as extraction of critical cooling rates of metallic glasses, yield strengths of high-entropy alloys, emission wavelengths of phosphors or synthesis parameters metal organic frameworks Zhang et al. (2023); Zheng et al. (2023); Polak & Morgan.
+
+# F.2.1 MPV: DATASET COLLECTION DETAILS
+
+We identified a set of 17 papers from the S2ORC corpus2. We hired expert annotators to annotate the papers and extract all material names, material descriptors, property studied along with property descriptors, and values corresponding to the properties as mentioned in the paper. The annotators were also asked to provide the source sentence to help validate the extractions.
+
+# F.2.2 MPV: TASK DETAILS
+
+We perform 3 sets of tasks.
+
+Extraction of all properties. We ask the model to extract all materials, properties and values mentioned in the paper. Prompt for this is shown in Fig. 15. This is identical to the task description given to the annotators. This task also requires that the final output includes the material descriptor, property descriptor and source sentence corresponding to the descriptors and values being extracted. This is the main MPV task reported in the results in Table 1 and Figure 5.
+
+# MPV prompt
+
+You are a materials scientist. Your goal is to find and extract all numeric values or numeric value ranges of material properties mentioned or tabulated in a given paper text.
+
+```jsonl
+The output should be in JSON format:
+[
+{
+"material": "",
+"material descriptor": "",
+"material_source Passage": "",
+"material_source_table": "",
+"property_name": "",
+"property descriptor": "",
+"property_source Passage": "",
+"property_source_table": "",
+"low_value": "",
+"high_value": "",
+"value.units": "",
+"value_source Passage": "",
+"value_source_table": "",
+}, ...
+]
+An example of the output is as follows:
+[Example: Single entry for HfO2 with refractive index 1.84]
+```
+
+```txt
+There are some certain rules you need to follow:
+1. Be thorough! Don't miss even a single numeric value.
+2. Avoid null low_value and high_value. Simply skip the entry if you cannot extract the numeric value.
+3. If a value is only extractable from a figure, not text or table, simply skip that entry.
+4. Make sure whatever low_value and high_value actually exists in the source passage or referred table.
+5. If one passage contains multiple materials or properties, record all of them as separate entries.
+6. If different values are mentioned for the same material property, record all of them as separate entries.
+7. Material, property, and value may or may not be mentioned in the same passage.
+```
+
+```handlebars
+This below is the excerpt from a paper in LaTeX format published in a materials science journal.
+Excerpt:
+text:
+{{text}}
+```
+
+With the above excerpt, the goal is to extract numeric values or numeric value ranges of material properties from the above paper.
+
+Please only output your answer in the exact format as shown above without any prefix.
+Output:
+
+Figure 15: Prompt for extracting material property values from text (MPV Task).
+
+Extraction of specific properties. The second task we do is to test performance when we narrow down specific properties of interest. We specifically ask the model to extract materials, property values where refractive index and bandgap properties are being studied. This is a more tightly scoped task, and we do this specifically to evaluate the models on a narrower well defined task. As with the task of extracting all material property values, we ask the model to also include the material descriptor, property descriptor and source sentence corresponding to the descriptors and values being extracted.
+
+Extraction of non-trivial properties. We also evaluate a minor variation of the first task where we ask the model to extract all non-trivial properties of materials and their values. These properties in some sense would be considered to be important contributions of the experimental work reported in the particular research paper. This is to avoid any confusion between generic properties of materials that are known prior to a given research paper vs. those specifically studied or identified newly in a research paper. This task is useful in extracting just the additional information necessary to populate a database of materials, properties and values.
+
+# F.2.3 MPV:DIFFICULTY RATING LOGIC
+
+When rating the difficulty of each example for the MPV task, the experts marked an example as "Easy" if the answer could be found in the original sentence without modification. Examples were marked "Medium" if the answer was not very obvious, and the descriptors are very important and cannot be missed. Examples were marked "Hard" if the answer was derived from multiple sentences, and sometimes from tables and figures and reasoning was necessary to determine the right descriptors or values.
+
+```javascript
+Ground Truth
+{ material:"ZnO", property_name:"direct bandgap", low_value:"3.3",high_value:"3.3",value.units:"eV", }, { material:"ZnO", property_name:"exciton binding energy", low_value:"60",high_value:" ",value.units:"meV", }, { material:"ZnO", property_name:"lattice parameter\nc-axis lattice constant", low_value:"0.518",high_value:"0.518",value.units:"nm", }, 1
+```
+
+```javascript
+GPT-4o
+{ material:"Zn0", property_name:"direct bandgap", low_value:"3.3",high_value:"3.3",value.units:"eV", }, { material:"ZnO", property_name:"exciton binding energy", low_value:"60",high_value:" ",value.units:"meV", }, { material:"ZnO", property_name:"grain size", low_value:"135",high_value:"175",value.units:"nm", }, 1
+```
+
+```javascript
+{ Claude-3 Opus { material:"ZnO", property_name:"direct bandgap", low_value:"3.3",high_value:"3.3",value.units:"eV", }, { material:"ZnO", property_name:"exciton binding energy", low_value:"60",high_value:" ",value.units:"meV", }, { material:"ZnO", property_name:"lateral grain size\nmeasured by AFM", low_value:"130",high_value:"230",value.units:"nm", },
+}
+```
+
+```javascript
+Gemini 1.5 Pro
+{ material:"Zn0", property_name:"direct bandgap", low_value:"3.3",high_value:"3.3",value.units:"eV", },
+{ material:"ZnO", property_name:"exciton binding energy", low_value:"60",high_value:" ",value.units:"meV", },
+{ material:"ZnO", property_name:"wavelength\nλ", low_value:"248",high_value:"248",value.units:"nm", },
+}
+```
+
+Figure 16: Example from the MPV task where Claude-3 Opus, Gemini 1.5 pro, and GPT-4o recalled some important material properties and values but failed to capture all relevant properties and focused instead on some trivial properties. (paper id: 53519111)
+
+# F.2.4 MPV: RESULTS AND ANALYSIS
+
+Both precision and recall rate were used in the evaluation process. A tuple of material, material descriptor, property, value were used for matching and then measuring if property value is accu
+
+
+
+MPV task, paper_id: "15804005"
+
+# GPT-40
+
+
+
+
+Figure 17: Example from the MPV task where all models correctly identify and extract a material, property and other information but have slight differences. (paper id: 15804005)
+
+
+
+rate. The model output and ground truth are only considered as a match if these four fields are semantically equivalent. Exact match is often impossible because of the existence of alternative names for material and properties. The material descriptors could also be part of the material name, which makes the exact match very difficult. For example, "TiO $_2$ nanocrystal" as a material name is equivalent to "TiO $_2$ " as material name and "nanocrystal" as material descriptor.
+
+In the context of model evaluation, we once again incorporate LLM models into the workflow in order to analyze the level of correspondence between the material properties extracted by the previous LLM and the material properties annotated by humans. This process is referred to as the model evaluation. During the model evaluation, both the material properties annotated by humans and those extracted by the LLM are fed into the LLM. Prompt engineering is utilized to enable the LLM models to identify matches based on specific attributes: material names, property names, low and high values, and unit of measurement. To ensure comprehensive matching, we specifically instruct the model to exhibit leniency; this allows it to encompass properties that, despite lacking identical names, convey the same meaning (e.g., Indium Nitride vs. InN) or differ in the order of units (e.g., $100cm^2$ vs. $1\times 10^{2}cm^{2}$ ). Furthermore, we emphasize the importance for the LLM to pay attention to descriptors of materials and properties, as these may indicate a significant difference in the form or state of the material. During the model evaluation process, the source passages are not taken into consideration while instructing the LLM. This decision is made because the same properties can be extracted from different passages. Additionally, it is not uncommon for different annotators to select different sections of the same passages or to use different lengths as their source passages. Consequently, the source passages are only utilized as a reference for human attention when identifying and analyzing issues of evaluations.
+
+By correlating each human-annotated material property with a matching or empty LLM-output property, we can compute the precision and recall of the model evaluation, as illustrated in Table 2.
+
+The results of the model evaluation provide valuable insights into the potential transformation of the entire task into fully automated pipelines all by LLM, with the LLM doing both the material property extraction and extraction result evaluation tasks.
+
+It is also worth mentioning that the LLM outputs also include trivial material-property entities such as sample thickness. Human annotators omit this information due to the lack of general interest to materials science community. Thus we explicitly asked LLM to only include non-trivial material property entities in the outputs and the precision is significantly improved while the recall rate is similar, as shown in the "mpv-non-trivial" column of Table 3. We further limit the properties to "bandgap" and "refractive index" as these two properties are the most common material properties reported in scientific literature. The results can be seen in the "mpv-specific" column of Table 3: the precision is significantly higher than the regular mpv task due to less ambiguity on whether a property should be included. But the recall rate is reduced, which is also related to the filtering we applied in the prompt.
+
+# F.3 HARTREE-FOCK MEAN-FIELD THEORY TASKS (HFD, HFE)
+
+In this section we provide additional details about the datasets, detailed task description and analysis of the results for the condensed matter physics tasks. Condensed matter physics often utilizes the Hartree-Fock method, which involves deriving a Hartree-Fock (mean-field) Hamiltonian.
+
+# F.3.1 HFD AND HFE TASK DETAILS
+
+We select two tasks pertaining to Hartree-Fock mean-field theory.
+
+Hartree-Fock Derivation (HFD). The first task, HFD, involves analytically deriving the Hartree-Fock Hamiltonian through a series of 13 to 19 intricate steps. Each step demands a deep understanding of the physical system and requires specific mathematical operations. Due to the complexity of this task, we employ a template approach. The template provides a general structure for each step and includes placeholders for key components. The specific task for the Large Language Model (LLM) is towards filling these placeholders which would allow for analytic derivation of a Hamiltonian at each step. We evaluate the LLM's performance by comparing the responses for the placeholders with the ground truth written by an expert. Aside from filling in the placeholders at each step, we also ask the model to derive a Hamiltonian at each step and compare it to the ground truth Hamiltonian. The entire prompt used for this task contains about 6k words.
+
+Hartree-Fock Extraction (HFE). Recognizing the challenges inherent in HFD, we introduce the Hartree-Fock extraction task (HFE) as a simpler comprehension task as opposed to the deep reasoning required in HFD. This task involves extracting a Hartree-Fock Hamiltonian from scientific papers that contain this Hamiltonian. If the Hamiltonian contains some terms that are defined in the paper, we ask the model to extract those terms as well. While HFE is less demanding than HFD, it presents its own challenges, as a single paper may contain multiple Hartree-Fock Hamiltonians specific to different cases being studied. So we ask the LLM to fill in a template with an exact Hamiltonian expression and all the terms that are necessary to describe it. We note that a Hamiltonian, in most cases, contains several terms that are written in different parts of the paper. For example, it usually contains non-interacting term $(H_0)$ as well as interacting $H_{int}^{HF}$ terms. While the non-interacting term is usually unique, the interacting term can take on various forms in a given paper and, therefore, the LLM must choose which interacting Hamiltonian is the most general.
+
+By dividing the process into these two tasks, we can systematically evaluate the capabilities of LLMs in tackling complex physics problems. HFD allows us to assess the model's ability to perform step-by-step complex, scientific analytical derivation, while HFE focuses on reasoning and information extraction. The prompt for HFE task is shown in Fig. 18 and a condensed version for HFD in Fig. 19.
+
+# F.3.2 HARTREE-FOCK DATASET COLLECTION
+
+We have two datasets for the two tasks (Hartree-Fock derivation and Hartree-Fock extraction).
+
+# HFE prompt
+
+```txt
+You are a physicist.
+You are reading a paper that has explicit equation (or equations) for the general Hartree-Fock or mean-field Hamiltonian.
+There are might be several Hartree-Fock Hamiltonians in the paper.
+You should return the one that is the most general.
+Return this Hamiltonian.
+Print out each equation explicitly instead of citing it.
+Print out terms in the Hamiltonian if they are present in the paper, including intergrals.
+Do not explain the Hamiltonian or the terms
+Return the Hamiltonian in the following format: The general Hartree-Fock Hamiltonian is $\{\{\mathrm{The~Hartree - Fock~or~mean - field~Hamiltonian}\} \}$ where $\{\{\mathrm{include~all~terms~in~the~Hamiltonian}\} \}$ Be concise. Do not explain constants..
+PAPER: {{text}}
+YOUR RESPONSE:
+```
+
+Figure 18: Prompt for extracting the general Hartree-Fock Hamiltonian from a paper (HFE Task)
+
+HFD. The dataset for the HFD task consisted of the papers used in Pan et al. (2024). These were hand selected by expert post-doctoral scientists intimately familiar with the derivations in the work. 15 papers were selected and reasoning steps from solving the quantum many body system was identified for each paper. Pan et al. (2024) also provides prompts and includes derivations to compare responses from a language model. The contribution of our work is a generalized version of the template created by Pan et al. (2024). We create a format that is consistent across all papers so that evaluation can be automated. The ground truth for task includes all of the derivations associated with each of the reasoning steps annotated in Pan et al. (2024).
+
+HFE. The papers for the HFE dataset were selected from those that contained Hartree-Fock Hamiltonian, discovered using the arXiv advanced search. Specifically, we performed advanced search on arXiv with the following parameters: (i) We set Classification: Physics: Condensed Matter; (ii) we set include cross list as 'True'; (iii) we look for 'Hartree-Fock' as key words in abstract. We then selected papers in reverse chronological order (from most recent onwards) and filtered to get a total of about 50-80 papers. An expert doctoral candidate in the field then filtered papers where the Hartree-Fock Hamiltonians were present in the paper directly and also extracted and aggregated the equations form across the papers to create a ground truth evaluation set. The final dataset for the HFE task consisted of 38 papers.
+
+# F.3.3 DIFFICULTY RATING LOGIC
+
+Two experts marked each example with the difficulty ratings using the following rubric.
+
+HartreeFock Extraction task. Easy: If the non-interacting term $H_0$ and interacting terms $H_{HF}$ are on the same page or in the same section and the paper does not have many formulas, so the Hamiltonian is easy to find then it was marked "easy". Medium: If $H_0$ and $H_{HF}$ are in different parts of the paper the example was marked "medium". Hard: If the paper contains many formulas, or several HF Hamiltonians and it requires time or involves logic to find the right Hamiltonian in the paper then it was marked "hard".
+
+HartreeFock Derivation task. For the derivation task, the experts evaluated the non-interacting term and the interaction term separately as either "easy" or "hard". If both are "hard" then the example was marked as "hard". If both are "easy", then the example was marked as "easy". Otherwise, the example was marked as "medium".
+
+# HFD prompt
+
+You are a materials scientist. You are provided with a paper and the STEPS to derive a Hartree-Fock Hamiltonian.
+
+Be concise. Some STEPS are optional. You should decide whether or not to perform the step based on your understanding of the paper.
+
+In the STEPS below, you will need to answer the questions or deduct necessary information from the paper in order to fill in the placeholders {}.
+
+You should print a Hamiltonian at each step whenever it is requested to derive.
+
+# Placeholders Explanation:
+
+1. The $\{\}$ placeholders are intended for string substitutions.
+2. The $\{A|B\}$ placeholders are intended for string substitutions with either A or B.
+3. The $\{\text{text|None}\}$ brackets denote optional strings (text).
+
+# System Choice Before Derivation:
+
+Before starting the derivation, you should make a choice among these three possibilities for the system based on the paper:
+
+This is very important. The choice is strongly correlated with the description of the problem in the paper.
+
+Which Hamiltonian does the paper study? Choose one:
+
+1. Continuum version, single-particle
+2. Continuum version, second-quantized
+3. Lattice version
+
+Note: Do not print out the choice. Rather, follow the steps based on the choice.
+
+# Output Format:
+
+Respond in a valid JSON-formatted string. Ensure your response follows this format:
+
+```json
+[
+{ "Step": "1", "task": "Construct Kinetic Hamiltonian", "answer": "Hamiltonian ..."}
+},
+[Additional steps follow the same format]
+```
+
+# STEP5:
+
+# Step 1: Construct Kinetic Hamiltonian
+
+Express Hamiltonian using proper operators and summations.
+
+# Step 2: Define Terms in Kinetic Hamiltonian
+
+Choose dispersion: parabolic, Dirac, or cos-like.
+
+[Example dispersions abbreviated]
+
+# Step 3: Construct Potential/Interaction Hamiltonian
+
+Add diagonal and off-diagonal terms.
+
+[Detailed potential terms abbreviated]
+
+# Step 4: Convert to Second Quantized Form
+
+# Step 5: Apply Wick's Theorem
+
+[Additional steps and examples abbreviated]
+
+# Here is the paper:
+
+```txt
+{{text}}
+```
+
+Figure 19: Prompt for deriving the Hartree-Fock Hamiltonian (HFD Task).
+
+
+
+
+Figure 20: Model responses for an example in the HFD task.
+
+
+
+
+
+# F.3.4 HF TASKS: RESULTS AND ANALYSIS
+
+HFD. As described in the main text, the derivation task is challenging, and we expect poor LLM performance. Fig. 5 shows that Gemini 1.5 Pro performs better than other models. Gemini 1.5 Flash, Gemini 1.0 Pro, Claude 3, and Command R Plus also achieved good scores. GPT-4o and LongLLaMa performed the worst. We note that GPT-4o's score was affected by a formatting issue. Although we instructed the model to provide the output in JSON format, GPT-4o's output included the words "key" and "value," which were not present in the ground truth. Despite this, the average score for the HFD task across all models is much lower than for the HFE task, which a human expert considers simpler.
+
+HFE. The extraction task does not involve extensive instructions and is considered simpler than HFD. As shown in Fig. 5, all models (GPT-4o, Claude 3, Gemini 1.5 Flash, Gemini 1.5 Pro, Gemini 1.0 Pro, and Command R Plus, listed in descending order of performance) performed consistently well on this task. However, LongLLaMa performed significantly worse than any other model. Overall, the average score for this task is much better than the score for the HFD task, as expected. This difference in performance is even more evident when using the proposed LMScore as seen in
+
+
+
+
+Figure 21: Model responses for an example in the HFE task.
+
+
+
+
+Fig. 10, which presents the human evaluation of LLM performance, showing better results for the HFE task than the HFD task.
+
+# F.4 (QUANTUM) ERROR CORRECTION ZOO TASK (QECC)
+
+The Error Correction Zoo (EC Zoo) (Albert & Faist, 2024) is an open source effort to build a Wikipedia-like repository collecting and categorizing error correcting codes from the literature. Such codes are used to redundantly encode and store classical or quantum information so as to protect it from noise, with wide applications (e.g., 5G communication and broadcast protocols, quantum communication and computing). Currently, the construction and maintenance of the zoo is carried out manually by a "Zookeeper", who updates the EC Zoo's contents whenever a paper introducing a new code appears on the arXiv repository.
+
+An entry in the EC Zoo consists of a YAML file, listing the properties of a given EC code along with any relations to other codes. Each entry contains many different types of information: a succinct non-technical summary, bespoke technical details, numerical parameters quantifying code performance, and non-trivial connections to other literature. Due to the diversity of encoding schemes, code entries can be very different, and there is no one-size-fits-all template. We construct a benchmark that tests the ability of LLMs to curate the EC Zoo.
+
+# F.4.1 QECC: TASK DETAILS
+
+The goal of the QECC task is to produce the YAML file similar to the EC Zoo code entry given a paper and an appropriately designed prompt description of the task. The models output is then compared against the human-curated ground truth. Prompting an LLM to provide such an entry tests its ability to correctly extract both the relevant information Mayfield et al. (2024) and the context.
+
+Figure 22 shows the prompt for this task which lists various available YAML key-value pairs taken from a template code YAML file3.
+
+# F.4.2 QECC: DATASET COLLECTION
+
+We curated the benchmark from two experts in the domain who have prior experience curating entries for the ECZoo. Our benchmark consists codes from 65 arXiv papers ranging from 1997 to 2024. Each paper introduces a particular code or code family, running the gamut of classical and quantum coding theory and including codes relevant to high-energy/particle physics, phases of quantum matter, theoretical computer science, electrical engineering, and quantum engineering. More specifically, the 65 codes include 15 codes realizing phases of quantum matter, 14 codes designed for continuous-variable quantum systems, 12 high-performing codes designed for qubit-based quantum devices, 7 general qubit and 4 general qudit code families, 4 classical codes, 2 fermionic codes, 2 randomized code constructions, 2 codes for transmission of classical information over quantum channels, 2 codes designed for magic-state distillation, and 1 code describing holography.
+
+# F.4.3 QECC RESULTS ANALYSIS
+
+All LLM-generated error-correcting code YAML files were evaluated by the Rouge metric, and a sample of about 20 was carefully read by a human expert. The Rouge metric indicates that LLMs performed relatively well overall.
+
+The human-expert reading of the LLM-generated files affirms that LLMs can effectively summarize technical scientific papers. The summaries tend to be succinct, while at the same time flagging a multitude of key informational "nuggets" and quantitative metrics relevant to a code. The required YAML formatting rules tended to be respected. The performance was consistent across the sample and independent of the underlying discipline of the paper.
+
+In some cases, an LLM flagged informational "nuggets" that were not (but should have been) in a given ground-truth EC Zoo entry. For example, an LLM mentioned a numerical parameter relevant to the performance of a code that was buried in the paper and that was missing from the ground truth. As another example, an LLM pointed out that a particular code was independently discovered by another cited work. Such statements could only be obtained upon a very careful human reading, which takes much longer than running the text through an LLM.
+
+On the other hand, since useful nuggets are not always (and need not be) technically correct, correction from an expert is necessary at this stage. The observed advantage of LLMs is that manual correction is faster than a manual identification of all relevant nuggets.
+
+The level of technical detail in the output files tended to be low, with many LLMs tending to avoid recasting technical details of the paper in pedagogical fashion (see Sec. F.4.4 for an exception). It remains unclear whether this can be mitigated by prompt engineering or if further training is required.
+
+Much of the text in a typical LLM-generated entry consisted of extraneous information that ranged from superficial "fluff" to complete hallucination. In this case, this information was relatively easy to spot by the expert and so did not impede evaluation efforts. It remains to be seen whether this ability to fish out relevant nuggets from the sea of boilerplate holds true for other scenarios.
+
+In summary, current LLMs are beneficial for synthesizing literature for the EC Zoo. More often than not, the LLM thoroughly flagged key aspects of a paper and left only the (faster) process of verification to the human. Running a paper through an LLM produces a draft EC Zoo entry whose
+
+# QECC prompt
+
+Fill in a YAML file for the code described in the attached paper according to the prescription defined in the YAML template below. Fields are to be filled only if they are directly relevant to the code introduced in the paper. Be sure to extract any quantitative data like thresholds and code rates. Above all, be concise! If you cannot explain something technical in detail, do not try to explain it. If something is not detailed in the paper, do not mention it.
+
+```yaml
+>>> This is a code entry in the error correction zoo.
+https://github.com/incorrectcorrectionzoo
+>>> # UTF-8 encoding, AMS-TeX in (
+...),
+), cite with
+cite{arXiv:#.}
+# [Additional documentation comments abbreviated]
+code_id: noSpaces_lowercase # lowercase only
+physical: qubits # one of: bits, qubits, quids, etc.
+logical: qubits
+Code_parameter: '((2^r-1,r,d))_6' # e.g., ((n,K,d))
+name: 'Code-name'
+introduced:
+ cite{doi:...}'
+description: |
+Brief description, no references.
+[Additional description paragraphs abbreviated]
+protection: 'Protects against ...'
+features: # Include only if specifically mentioned
+[Multiple encoder examples abbreviated to:]
+encoders: ['Process description']
+[Multiple decoder examples abbreviated to:]
+decoders: ['Syndrome measurements']
+threshold: ['Error rates']
+relations: # Optional
+parents: [code_id: parent_code]
+_meta:
+changelog:
+- date: 'YYYY-MM-DD'
+Here is the paper
+{{text}}
+```
+
+Figure 22: Prompt for generating YAML code entries in the Error Correction Zoo Task (QECC).
+
+comprehensive part can be verified and whose superficial part can be deleted, with both jobs done relatively quickly for this task scenario.
+
+# F.4.4 QECC TYPICAL MODEL RESPONSE EXAMPLES
+
+As we analyze the typical model responses, we also present components of the code entry to give a sense for the aspects considered by the human expert when evaluating the model responses. We
+
+go through the output for the code described in Ref. Menicucci (2014). The output below is Gemini 1.5 Pro, with GPT-4o, Claude 3, and Gemini 1.5 Pro producing similar outputs for the same input. Inputting other papers yields outputs with similar features as those covered below.
+
+The header of the output file is generally formatted in the correct YAML format, containing a guess of the code_id key, the underlying physical alphabet used to construct the code, the alphabet used for the logical information, and the code name (with some superfluous information removed). Almost all LLMs respect the desired key-value YAML format throughout the file, and we will not mention this from now on.
+
+```yaml
+...
+code_id: cv_cluster_gkp
+physical: qubits (coded in continuous-variable oscillators)
+logical: qubits
+...
+name: 'GKP-encoded qubits on CV cluster states'
+introduced: '\cite{arXiv:1311.3538}'
+```
+
+Next comes a concise description of the code, a typical strength of LLMs. The summary is succinct and well done, while being sufficiently vague so as to not be incorrect. Two quantitative informational nuggets are flagged: the code's 20.5dB threshold and $12.6\%$ error probability.
+
+```txt
+description: |
+This code describes a fault-tolerant measurement-based quantum computation scheme using continuous-variable (CV) cluster states and GKP-encoded qubits.
+```
+
+```txt
+The scheme relies on concatenating GKP error correction with a qubit-level error-correcting code. If the initial squeezing in the cluster state and the GKP states is above a threshold (20.5 dB for a typical threshold of $10^{-6}$ ), the error rate on the encoded qubits falls below the fault-tolerance threshold of the concatenated code, enabling fault-tolerant computation.
+```
+
+```txt
+Magic state distillation of encoded Hadamard eigenstates with an error probability of $12.6\%$ and success probability of 2/3 allows for universal computation.
+```
+
+```txt
+protection: 'Protects against Pauli noise introduced by finite squeezing in the CV cluster state and GKP encoding.'
+```
+
+Next, the LLM produces a list of various features of the code, as instructed. The features to be listed depend on what the paper covers, but LLMs tend to provide text for all available features, irrespective of whether they are discussed in the paper or not. If the paper discusses a particular feature, the LLM flags the relevant information, e.g., the code's 20.5 dB threshold. If the paper does not mention a feature, LLMs tend to put boilerplate for the value in the corresponding key, which ranges from a summary similar to those above to a hallucination. This effect is likely to be mitigated by prompt adjustments.
+
+```yaml
+features: encoders: - 'GKP encoding using sharp Gaussians.' transversal_gates: 'All Clifford gates are transversal.' general_gates: - 'Universal gate set achieved through magic state distillation of encoded Hadamard eigenstates.' decoders: - 'GKP error correction using ancilla-based measurements.'
+```
+
+```python
+fault_tolerance:
+- 'Transversal Clifford gates are fault-tolerant when the initial
+```
+
+squeezing is above the threshold.'
+
+- 'Concatenation with a qubit-level error-correcting code provides fault tolerance for the entire computation.'
+
+threshold:
+
+- '20.5 dB squeezing threshold for fault-tolerant computation with a typical concatenated code threshold of $10^{-6}$ .'
+
+notes:
+- 'The squeezing threshold can be generalized to include additional noise sources like photon loss and detector inefficiency.'
+- 'The scheme presented is not necessarily optimal, and further research may lead to better encoding methods and improved thresholds.'
+
+Finally, the LLM presents relations between the primary code extracted from the paper and other codes. Relations form a large portion of the EC Zoo and are difficult to spot because they may be mentioned only briefly somewhere deep in the body of the paper. Using LLMs to flag them saves reading time. In this case, both notable relations are extracted.
+
+```yaml
+relations:
+parents:
+- code_id: cv_cluster_state
+detail: 'CV cluster state is the underlying physical resource.'
+cousins:
+- code_id: gkp_code
+detail: 'GKP code is used for encoding qubits in CV oscillators.'
+```
+
+# Attempt at technical details
+
+All LLMs tend to not delve into technical detail, so pedagogy was rare. A notable exception is this attempt by Claude 3 to technically explain codes from Ref. Camara et al. (2007). We present the value of the description key, which includes subsections and LaTeX-formatted equations.
+
+description:
+
+The authors present two methods for constructing quantum LDPC codes. Both approaches are based on representing the generators of the stabilizer group as a graph with simple local rules that ensure commutativity.
+
+\subsection{Generic $(a,b)$-regular construction}
+
+The generic construction produces $(a,b)=$(regular quantum LDPC codes, meaning each qubit is involved in $a$ parity checks and each parity check involves $b$ qubits. It starts by choosing a group ${\mathfrak{g}}$ and two subgroups ${\mathfrak{h}}$ and ${\mathfrak{m}}$ qubits. The cosets of ${\mathfrak{g}}$ to parity checks. Generators of ${\mathfrak{g}}$ are divided into sets ${\mathfrak{G}}_{{\mathfrak{m}}{\mathfrak{e}}{\mathfrak{a}}}{\mathfrak{a}}} and ${\mathfrak{G}}_{{\mathfrak{H}}_{{\mathfrak{m}}{\mathfrak{e}}{\mathfrak{a}}}}{{\mathfrak{g}}_{{\mathfrak{g}}_{{\mathfrak{m}}{\mathfrak{e}}{\mathfrak{a}}}}}
+
+\subsection{Construction of a $(4,8)$-regular code}
+
+The $(4,8)$ -regular construction uses a 3-step procedure. First it constructs a 4-cycle graph as a Cayley graph. Then a $(4,8)$ -regular Tanner graph is obtained based on the 4-cycle graph. Finally, the edges are labeled to satisfy the commutation relations. Each qubit is involved in two $\mathbb{S}$ omega and two $\mathbb{S}$ bar\{\omega_ega\} parity checks.
+
+# F.5 GEOSPATIAL DATASET EXTRACTION TASK (GEO)
+
+A key aspect of geospatial analysis is integrating various diverse datasets together to answer complex questions. For example, a study of time-series snowmelt detection over Antarctica may combine
+
+
+Figure 23: Examples of outputs on the QECC task. All models do a reasonable job in extracting and describing the code. Claude-3 does a good attempt to recover the technical details. (paper id: 1501.07779)
+
+
+
+
+
+satellite imagery, radar data, weather station temperature data, elevation/topography information, etc. Liang et al. (2021). An epidemiological study on infectious disease spread may combine data from the CDC with people dynamics and behaviours (e.g., census, zoning, mobility patterns, Google Trends searches, etc.) Seifter et al. (2010); Zhang et al. (2017). Geospatial analysts leverage their extensive domain expertise to choose representative datasets and then build models to achieve new insights or conclusions that can be used to inform policy, analyze economic or environmental impacts, etc. The goal of our GEO task is to help evaluate how well LLMs can assist with Geo-Analyst workflows.
+
+# F.5.1 GEO TASK DETAILS
+
+In this task we study the ability of LLMs to extract all the relevant information regarding datasets used in a given research paper, including source websites, variable names, descriptions, time ranges and spatial ranges. This task presents a significant challenge to LLMs because it requires not only recognizing direct dataset references within the text, but also contextualization, comprehension and aggregation of information scattered throughout the paper, pushing the boundaries of long-context understanding. Prompt for this is shown in Fig. 24.
+
+# F.5.2 GEO DATASET COLLECTION
+
+Our benchmark consists of 19 papers spanning across earth observation, economics, epidemiology and public health, along with ground truth annotations describing the datasets used in each study. To source this dataset we pulled from various sources and repositories (e.g., DigitalCommons, ScienceDirect, MDPI, NIH, Arxiv, etc.), and included only articles with open licenses (e.g., CC BY 4.0, CC BY-NC 4.0, MDPI OpenAccess, etc.) While we started out with more papers, not all of them had permissive licenses thus resulting in a smaller set of 19 final papers. We wanted to represent a variety of domains, as well as varying degrees of dataset extraction difficulty and literature quality. For example, some studies had only a few datasets or variables and others many, some had complex time ranges like "Jan-Apr for every year from 2012-2015", some had a mix of spatial ranges like "every state in the United States, and also 9 countries in Western Europe", some articles were well written and others quite poor, some had information about the datasets cleanly written in one section and others had the information scattered throughout the introduction, problem statement, analyses, and even figure captions, some articles were missing key pieces of information altogether (e.g., regarding time range, spatial range, or source), but a knowledgeable domain expert can correctly guess what these should be if they were familiar with the datasets and study topics.
+
+Given the paper, please gather the following information and put it in a JSON format.
+
+Here is the JSON format:
+
+GEO prompt
+```txt
+{
+ "paper_title": ,
+ "paper_link": ,
+ "datasets": [{}
+ "dataset_name": ,
+ "dataset Websites_or_source": [],
+ "variables": [{}
+ "variable_name": ,
+ "description": ,
+ "time_range": {
+ "start_date": ,
+ "end_date":
+},
+ "spatial_range":
+}, ],
+}];
+"notes":
+```
+
+```txt
+ is the paper title. is the paper link. For ALL datasets used in the paper: is the name of dataset. is a link to the dataset. is the list of variables used in dataset. Be thorough and descriptive.
+```
+
+ is a list of all the names of variables.
+
+ is the description of variable.
+
+```txt
+* Example: if data includes all tweets that include a set of keywords between two dates, explain this with enough detail that the dataset could be reproduced if we had access to the raw tweets. For example if the dataset is based on google trends, you need to include search terms or categories used
+```
+
+\*FORMAT:VARIABLE_1,VARIABLE_2,VARIABLE_3,
+
+ is a list of all time ranges of the variables.
+
+```txt
+ is the start date of the time range (format: yy-mm-dd).
+```
+
+ is the end date of the time range (format: yy-mmd-dd).
+
+$\star$ Note: Make sure to give all the time ranges in a list format.
+
+ is a list of all spatial ranges of variables.
+
+```txt
+* Note: Make sure to specify all locations with enough detail that the dataset can be exactly reproduced. So if a dataset includes data from 196 counties in the US, please give explicitly the names of all of the counties.
+```
+
+$\star$ Note: Make sure to give the names of all the locations in a list format.
+
+$\star$ Example: County vs State vs Country vs Census Block. add a note if you have issues filling out any o fields.
+
+Please copy directly the text of the paper. Please be concise but have enough detail to reproduce. Make sure you generate the JSON.
+
+```handlebars
+Here is the paper: {{text}}
+```
+
+Figure 24: Prompt for extracting datasets from geospatial research papers (GEO Task).
+
+To annotate the papers in the dataset, we worked with two annotators who carefully captured the dataset details for each paper in a standardized JSON format. If key information was missing, we asked the annotators to use domain expertise and common sense to make an educated guess, while also adding detailed information in the notes section highlighting the shortcomings of the paper. The work of the annotators was verified by experts with Ph.Ds. Agreeing on a reasonable format that correctly captured all details required to reproduce the work, while not being overly cumbersome to annotate or read, was challenging (e.g., sometimes it made sense to group variable names and time ranges, versus writing out the entire combinatorial set). After a few iterations, we arrived at a reasonable representation that we believe a human reader could understand clearly without ambiguity or error, while still being concise.
+
+# F.5.3 GEO:DIFFICULTY RATING LOGIC
+
+Human evaluation consideration. Extracting structured dataset information from unstructured scientific text poses unique challenges for evaluation, so we first present the components considered for evaluation prior to describing the logic for measuring difficulty. At the dataset level, we evaluated each model's ability to accurately predict the number of datasets mentioned and identify dataset names using text similarity metrics. At the variable level, evaluation focused on the model's accuracy in predicting the total number of variables, identifying individual variables based on a composite representation incorporating multiple attributes, and correctly extracting the time and spatial ranges of each variable.
+
+Using the above rubrics, the difficulty of each example was rated as "easy" if the number datasets and the time and spatial ranges were more easily extracted from a single section of the paper. Examples were rated "hard" if the information was much more spread out and the annotators felt it was tricky to have captured all aspects accurately. Other examples were rated "medium".
+
+# F.5.4 GEO TASK RESULTS ANALYSIS
+
+Doing a full evaluation of all of the components described above allowed us to pay attention to the parts of the answers we cared about most, but to do this well one had to have similar formatting between the ground truth answer and the model response, and the models often got a lot of the right pieces of the answer but in a different format, or returned something that looked mostly correct but was not a parsable JSON, making programmatic metric calculations difficult. Other specific points about why this task was challenging to evaluate are: there were often multiple ways to format a correct answer, some parameters required exact matches (e.g., time range) and others semantic matches (like variable description), variable name and description were often muddled and salient information could be placed in either one, dataset name and variable name could sometimes be confused as well (sometimes it was reasonable to concatenate variable name, description, and dataset name and then do a semantic match on the whole set). The most success we had was with prompting an LLM to do the scoring using the LMScore, as described in Appendix D. We found that LMScore scores captured the salient features that mattered most automatically, hiding a lot of this complexity, and for this task the human evaluation results correlated quite strongly with the model-based scores.
+
+A few overall observations: there was variability across model runs for almost all models, even though average performance remained fairly constant. The variability was usually higher on the harder tasks. Instruction following remains a challenge: models often had pieces of the right answer, but were unable to consistently format their responses, often leading to un parsable JSONs. The model-based scoring approach circumvented this challenge and also showed good correlation with human evaluations. ROUGE-L scores on the closed-weight LLMs were all quite similar (in range [28, 32]), with GPT-4o performing slightly higher than the others. Open-weight model scores were lower (in the 20's for Mixtral and Command-R+ and ; 10 for LongLLaMa). We explored a few different breakdowns of the task results to try to identify systematic correlations in model performance. The first breakdown, shown in Figure 26, plots score values versus the number of datasets in the paper, showing a slight inverse correlation between score and number of datasets, although the trend is very small and not very consistent.
+
+We also analyzed performance as a function of geographical or spatial information. For studies encompassing one continent the performance was higher than for compound spatial ranges involving multiple continents (see Figure 27). Overall, results for this task illustrate that there is much room
+
+
+
+
+
+
+Figure 25: Example from the GEO task where all closed models Gemini 1.5 pro, GPT-4o, and Claude-3 Opus extracted the correct spatial and time range for the datasets. They provided a less specific link than what human annotators provided and used a slightly different format where the models treated each variable as a separate dataset whereas human considered the dataset to be a single source but with different variables. Despite this slight difference the model's response is still accurate and useful. (paper id: 00000)
+
+
+
+for improvement for LLMs to be able to automatically extract dataset information from the literature, especially in some of these more complex compound cases.
+
+
+Figure 26: Score value versus number of datasets in the paper. There papers with fewer datasets have substantially higher performance, but there isn't a linear degradation in performance as the number of datasets studied in the paper increases perhaps because when many datasets are used in the paper they are still tied to some common sources.
+
+
+Figure 27: Score value versus geographical/spatial range studied in the paper. The scores for papers containing datasets covering multiple continents in their spatial extents (the 4 bars on the right) have noticeably lower performance compared to those covering the spatial extent within a single continent. Further, spatial ranges in Europe and Antartica seem better scoped than other continents, this might be worth verifying with a large sampling of papers.
+
+# F.6 BIODIVERSITY GEOREFERENCING TASK (BIOCR)
+
+In this task we study the ability of multi-modal LLMs to work with geographical maps. Specifically, we investigate the core capability of georeferencing, where, given an image of a map and its associated caption, the task is to determine the latitude/longitude bounding box encompassing the region displayed. Figure 28 shows examples of images from the dataset georeferenced against geographical maps. This section provides additional details regarding the dataset creation, task definition, and evaluations for the biodiversity georeferencing task.
+
+
+
+
+
+
+
+
+
+
+Figure 28: Illustrations of map georeferencing, showing images from the dataset superimposed over geographical maps in their correct georeferenced locations.
+
+
+
+# F.6.1 BIOGR DATASET COLLECTION
+
+To source this dataset we worked with domain experts in ecology to find articles that were representative of the domain, paying specific attention to the map figures. We pulled from various sources and repositories (e.g., bioRxiv, ScienceDirect, Nature, etc.), and included only articles with open licenses (e.g., CC BY 4.0 or CC BY-NC 4.0). We wanted to represent a variety of map features often displayed in these figures, as well as varying degrees of georeferencing difficulty (e.g., some regions are larger and some smaller, some mention locations explicitly in the image and/or caption, some have recognizable shapes at the continent or country level, some contain multiple repeated instances of the displayed region, some have insets or coordinates displayed to help the reader understand the spatial information, etc. Fig. 29 shows a few illustrative examples). We assembled a dataset of 24 map images and captions, extracted from 24 papers, and worked with a domain ex
+
+pert to acquire the ground truth latitude/longitude bounding box for each image. We also asked the domain expert to rate the individual tasks using a difficulty scale from 1-10 (1 being the easiest and 10 the hardest) which we simplify to the easy, medium, hard ratings as with other tasks. A portion of the BIOGR dataset consisting of 114 examples with additional metadata including original pdf documents from which the figures are sourced is available at https://github.com/google-research/ecology-georeferencing.
+
+
+Figure 29: A sample of map images from the Biodiversity Georeferencing Task dataset.
+Figure 30: Prompt for the Biodiversity Georeferencing Task (BIOGR).
+
+# F.6.2 BIOGR TASK DETAILS
+
+The goal for the BIOGR task is to accurate extract the spatial coordinates (latitude and longitude) for a location that is specified in the map images. To do this, we configured a standard prompt, and passed the prompt, along with each image and caption pair, to each of the multi-modal models evaluated. The prompt we used is shown in Fig. 30
+
+# BIOGR prompt
+
+```handlebars
+For the following figure and caption, please return the WGS84 latitude and longitude bounding box coordinates of the map in the image. If there are multiple maps of the same region, please just return only one answer. If two areas are represented, and one is an inset of the other, return the smaller of the two areas. If you are not sure, please guess at an answer anyway. I'd rather have an answer than no answer at all. Make sure to return decimal coordinates in range [-90, 90] for latitude and (-180, 180] for longitude. Please put your answer in the following JSON format: { "W": , "S": , "E": , "N": } Here is the image and caption. {{text}}
+```
+
+Given this prompt, the image, and the caption, the selected model would provide a text response. Even though explicitly instructed not to, some models would provide a text preamble prior to the JSON bounding box answer. In these cases we filtered the response to extract the JSON bounding box answer. In all instances, all models were able to format their answer in the requested JSON format suggested in the prompt, so we did not have to handle cases where the answer was provided but not in the requested format. For illustration purposes, a sample ground truth answer looks like:
+
+```json
+{ "W":-114.4726175647, "S":48.2299910717, "E":-113.2291776519, "N":49.0025266467 }
+```
+
+
+Figure 31: Responses from the different models for an example from the BIOGR task. Here, Claude-3 (blue) predicts the coordinates closest to the ground truth (green) bounding box locations indicated by the red dot in the original map image (top-left). GPT-4o (purple) and Claude-3 Opus generally performed well across examples on this task while Gemini 1.5 pro (orange) was a bit less precise. (record id: 556058_2)
+
+# F.6.3 BIOGR RESULTS ANALYSIS
+
+For this task we consider 3 evaluation metrics. Intersection-over-Union (IoU), which is defined as the area of intersection between two bounding box regions divided by the area of union. IoU is a popular metric for bounding box tasks, and captures the similarity between two polygons, accounting for both location and size, while also being scale-invariant. For simplicity, we computed IoU using longitude and latitude as our X and Y axes directly versus converting into meters4. Explicitly, we used "W" and "E" as our minimum and maximum X-coordinates, and "S" and "N" as our minimum and maximum Y-coordinates respectively. Normalized Distance Error measures the distance between the centers of the two bounding box regions (in kilometers) when placed on the surface of the Earth, and this is normalized relative to the distance of the half-diagonal of the ground truth bounding box. This metric helps measure how far off the predicted box is when the prediction doesn't overlap with the ground truth box. Relative box size. This is the relative size of the predicted box (distance of the half-diagonal) with respect to the ground truth box half-diagonal, which is indicative of the error in the predicted box size.
+
+When performing this task, over the full image/caption set and 3 model runs, the average IoU with each model ranged between 0.42 and 0.54 (Table 1), with GPT-4o performing slightly higher than the other models. The median results, with $25\%$ and $75\%$ error bars, are shown in Figure 5, with medians ranging between 0.3 and 0.6 and error bars showing wide variability accounting for both task and model variability. To put these numbers in context, the IoU metric ranges between 0 and 1, and any value greater than 0 denotes at least some region overlap, which implies that the model has at least some geospatial knowledge. Values between 0.2 and 0.5 have reasonable region overlap, and
+
+values greater than 0.8 have very good georeferencing performance (see Figure 32 for an illustration of IoU).
+
+
+(a) IoU = 0.07
+
+
+(b) $\mathrm{IoU} = 0.8$
+Figure 32: An illustration of Intersection-over-Union (IoU) metric for biodiversity georeferencing.
+
+
Model
IoU ↑
Normalized Distance Error ↓
Relative Box Size ↓
Claude 3 (Opus)
0.39
6.15
1.39
Gemini 1.5 Pro
0.42
14.28
1.20
Gemini 2.0 Flash
0.49
3.03
3.05
Gemini 1.5 Flash
0.36
6.09
1.69
GPT-4o
0.37
1.43
1.22
Gemini 1.0 Pro
0.34
12.37
1.30
+
+Table 7: Performance of models on BIOGR based on IoU, Normalized Distance Error, and Relative Box Size. $\uparrow$ indicates higher is better, $\downarrow$ indicates lower is better. Blue highlights the highest values across closed models.
+
+One observation is that, even though we explicitly asked the models to provide answers even if they weren't sure, there were instances where models refused to estimate any coordinates. We also noted that there was some variability in model responses over the 3 runs for each image, and the variability was higher on the harder examples in the dataset. In additional experiments with Gemini 1.5 Pro, reducing the temperature of the model reduced variability but also increased the percentage of cases where the model refused to provide an answer. These stochastic and robustness performance issues must be taken into account when building systems that use LLMs.
+
+To analyze how different features in the image/caption pair contributed to the LLM's ability to perform the task, we ran further experiments with Gemini 1.5 Pro, where we passed in only the image without the caption, and only the caption with no image. On the image only runs the average IoUs and model non-responses remained roughly the same, but on the caption only runs the IoUs decreased and the model non-responses increased significantly, highlighting that the image is much more important than the caption for this multimodal task. We also computed average IoUs over various subsets of the dataset, shown in Figure 33 on the left. The subset of images with coordinates shown on the map performed better than average, which is reasonable since multi-modal LLMs are trained on similar bounding box object detection tasks at the pixel level, and having a numerical scale present in the image that the model can reference increases performance. The larger regions were significantly easier for the model than smaller regions, partly because the chances of overlap are higher and partly because larger regions often had recognizable shapes or well-known locations mentioned. One result that was surprising was that, in this set of results, the images of small regions without insets performed better than the ones with insets, which is counter-intuitive. On closer inspection, the images in this set with small regions and without insets either had coordinates displayed, or were really well-known regions (e.g., maps of known cities), explaining the higher performance. Increasing the size of the dataset and adding more representation of images with insets and without coordinates or well-known shapes/locations would help generate more comprehensive
+
+statistical results for the inset subset. Our suspicion is that these models are not currently paying a lot of attention to the image insets, like a human georeferencer would, and that there is room for improvement in teaching these models to process that information well. We plan on studying this further in future work. Finally, the right side of Figure 33 shows IoUs for all the tasks and models plotted against the domain expert's difficulty rating, suggesting that the tasks that were harder for the domain expert were also more challenging for the model (GPT-4o had the cleanest correlation trend, whereas the other models had more variability in their performance).
+
+
+Figure 33: On a subset of 24 BIOGR examples, the left chart shows a breakdown of IoU for various data subsets. On the right we show IoU versus task difficulty ratings provided by a domain expert.
+
+
+
+Finally, we note that we discarded some examples as out of scope when creating the dataset not because of difficulty, but because they did not facilitate clear query and a single accuracy metric (e.g. multiple unrelated images in the same figure, multiple study areas within a bigger region, cropped and concatenated regions that were not actually geographically contiguous, etc.). However, a system that automatically parses the literature to extract information will have to deal with these real-world examples as well. For future directions we would like to go deeper and build benchmarks that help study the ability of LLMs to extract more detailed information from maps (e.g. polygons of surveyed areas, points of interest highlighted in the legend, geographical features and insights that correlate to the data presented, Q&A pairs that capture what a domain expert would ask, etc.). Being able to work well with maps has wide applicability to many scientific domains (e.g. geospatial analysis, public health, epidemiology, etc.) so it's encouraging to see how much spatial information is already captured by these models today. One final note is that a domain expert usually uses a variety of tools at their disposal to perform these tasks (e.g., using ArcGIS, QGIS, Google Maps, etc.), rather than memorizing a large library of maps. It would be interesting to teach LLMs to integrate these geospatial tools as part of their workflows and analyze how much performance can increase via this agentic approach.
+
+# F.7 PROTEIN SEQUENCE RECONSTRUCTION TASK (PDB)
+
+This task assesses the ability of large language models (LLMs) to extract biologically relevant information from structured textual data. Specifically, we challenge the models to reconstruct the amino acid sequence of a protein given its three-dimensional structure in PDB format. The dataset consists of 64 PDB files representing diverse proteins with varying sizes, functions, and originating species. Each example comprises a single chain to maintain task focus and complexity.
+
+Solving this problem necessitates an intricate understanding of the PDB format and the ability to parse it accurately. The model must first recognize the hierarchical organization of PDB files, identifying sections containing atomic coordinates and residue information. Subsequently, it needs to extract the three-letter amino acid codes for each residue, traversing the entire structure to ensure completeness. Finally, the model should leverage its knowledge of amino acid IUPAC Data to map the three-letter codes to their corresponding single-letter representations, ultimately producing a FASTA formatted sequence.
+
+# F.7.1 PDB DATASET COLLECTION
+
+An expert in the domain identified 64 proteins from the Protein Data Bank5 The proteins span a variety of species (15), sequence lengths, and protein functions. The ground truth amino acid sequences are also available in the data bank and can also be computed programmatically.
+
+# F.7.2 PDB TASK DETAILS
+
+For this task, we passed into the models PDB text describing the three-dimensional structure of a protein, along with a standard prompt asking the model to return the amino acid sequence in FASTA format. The prompt is shown in Fig. 34.
+
+# PDB prompt
+
+You are a computational biologist and I want you to reconstruct a protein's amino acid sequence from its tertiary structure.
+
+* The input is a PDB that is a textual format describing the three-dimensional structures of a protein.
+
+$\star$ Return the amino acid sequence in the standard FASTA format, which starts with a definition line with the greater than $(>)$ line, followed by the single-letter codes for all amino acids in the second line.
+
+$\star$ Make sure the amino acid sequence is in the second line.
+
+* If there is an unknown amino acid in the structure, put "X" in the sequence.
+
+* Make sure you go through the whole structure and get all the amino acids.
+
+$\star$ No extra explanation is needed.
+
+below are the tertiary structure:
+
+```txt
+{text}
+```
+
+Figure 34: Prompt for reconstructing protein amino acid sequences from tertiary structures (PDB Task).
+
+# F.7.3 PDB RESULTS ANALYSIS
+
+Evaluating the reconstructed sequences involves comparing them to ground truth sequences obtained using the Biopython library. We employ pairwise sequence alignment to determine the optimal correspondence between predicted and ground truth sequences. The alignment is then scored using standard metrics including the number of gaps, identities, and mismatches. These raw scores are normalized by the alignment length to account for potential length discrepancies. We primarily report the identity ratio, defined as the number of identities divided by the alignment length, as the primary performance metric. Unlike other tasks, model-based evaluation is not employed here due to the straightforward nature of exact evaluation and the limited ability of current LLMs to accurately assess sequence similarity. ROUGE score, typically used for text summarization, is also unsuitable for capturing the nuances of protein sequence similarity.
+
+Our experiments revealed several failure modes, highlighting the challenges LLMs face in processing long and structured biological data. Frequently, the models struggled to accommodate the entire PDB file within their limited context windows. Even when the context window sufficed, the models often failed to traverse the complete structure, leading to incomplete sequences, particularly for larger proteins. Another recurring issue was the incorrect handling of consecutive identical amino acids, often resulting in undercounting. Additionally, we observed instances where the model mistakenly uses the first letter of the three-letter amino acid name instead of employing the established three-to-one letter mapping, despite this mapping being a fundamental concept in bioinformatics
+
+and likely encountered during the model's training. One noticeable trend was that the identity ratio dropped as the protein sequence became longer, which is reasonable, although we note that for the shorter sequence length proteins there was a large variability in performance (see Figure 35 for details).
+
+
+Figure 35: Plot of identity ratio versus protein sequence length, showing that performance drops as the protein sequence length increases.
\ No newline at end of file
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/images.zip b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..ca4486c4457cadac2507bcd4886f9c9c68624cc6
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:790da136c60d763f728347254aa63fbf176bb0193263f848076c34a8e2bf49ed
+size 2456982
diff --git a/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/layout.json b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..364d117842c69357bd6ab94c6173b91efa8bd5da
--- /dev/null
+++ b/ICLR/2025/CURIE_ Evaluating LLMs on Multitask Scientific Long-Context Understanding and Reasoning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0ccb1ab2a7608f97eb4856bfbda7e313cd731c2068534cb7081325bd89062f82
+size 1089603
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_content_list.json b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..dfdad2e025100de2437516c63a584f8f3bfdc61b
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a197cd20239c7fe664f648fd067fc760dccb52d0a8763c6019f6931080a077f
+size 202818
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_model.json b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..8ddd4c8acefffce958e966cf6aba7a065347749f
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2522eb23739dfcdff7777407726454c07ad473bd6630ad06bd1c3de6efdc3ad4
+size 241769
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_origin.pdf b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..3d068cfa5d646fbec5699450c7d542509f421e84
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/2e14432f-ce0d-4bdd-9de5-e94507889079_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:42207d374af5b1c58b1fdb05bd5ebb04d3d044f4a2b29354a09d80dc989cc5a0
+size 35831807
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/full.md b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..15052bcf478b379e601235ea63e6c3aee8defd1a
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/full.md
@@ -0,0 +1,933 @@
+# CVIT: CONTINUOUS VISION TRANSFORMER FOR OPERATOR LEARNING
+
+Sifan Wang $^{1}$ , Jacob H. Seidman $^{3,4,5}$ , Shyam Sankaran $^{3}$ , Hanwen Wang $^{2}$ , George J. Pappas $^{4}$ , Paris Perdikaris $^{3}$
+
+$^{1}$ Institution for Foundation of Data Science, Yale University
+$^{2}$ Graduate Program in Applied Mathematics and Computational Science, University of Pennsylvania
+$^{3}$ Department of Mechanical Engineering and Applied Mechanics, University of Pennsylvania
+$^{4}$ Department of Electrical and Systems Engineering, University of Pennsylvania
+Reality Defender
+
+sifan.wang@yale.edu
+
+{seidj, wangh19}@sas.upenn.edu
+
+{shyamss,pappasg,pgp}@seas.upenn.edu
+
+# ABSTRACT
+
+Operator learning, which aims to approximate maps between infinite-dimensional function spaces, is an important area in scientific machine learning with applications across various physical domains. Here we introduce the Continuous Vision Transformer (CViT), a novel neural operator architecture that leverages advances in computer vision to address challenges in learning complex physical systems. CViT combines a vision transformer encoder, a novel grid-based coordinate embedding, and a query-wise cross-attention mechanism to effectively capture multi-scale dependencies. This design allows for flexible output representations and consistent evaluation at arbitrary resolutions. We demonstrate CViT's effectiveness across a diverse range of partial differential equation (PDE) systems, including fluid dynamics, climate modeling, and reaction-diffusion processes. Our comprehensive experiments show that CViT achieves state-of-the-art performance on multiple benchmarks, often surpassing larger foundation models, even without extensive pretraining and roll-out fine-tuning. Taken together, CViT exhibits robust handling of discontinuous solutions, multi-scale features, and intricate spatio-temporal dynamics. Our contributions can be viewed as a significant step towards adapting advanced computer vision architectures for building more flexible and accurate machine learning models in the physical sciences. All data and code are publicly available at https://github.com/PredictiveIntelligenceLab/cvit.
+
+# 1 INTRODUCTION
+
+Neural operators (Kovachki et al., 2023) have emerged as a powerful class of deep learning models for scientific machine learning applications, particularly in building efficient surrogates for expensive partial differential equation (PDE) solvers. These models aim to learn mappings between infinite-dimensional function spaces, enabling rapid acceleration of complex simulations in fields such as fluid dynamics and climate modeling (Azizzadenesheli et al., 2024; Serrano et al., 2023). Popular architectures like Fourier Neural Operators (FNO) (Li et al., 2021; Tran et al., 2021) and DeepONet (Lu et al., 2021; Wang et al., 2022) have shown promising results, supported by universal approximation guarantees (Chen & Chen, 1995; Lanthaler et al., 2022; Kovachki et al., 2021; De Ryck & Mishra, 2022) and interpretations as learning low-dimensional manifolds in function spaces (Seidman et al., 2022; 2023).
+
+However, the architectural design of current neural operators has largely been motivated by mathematical intuition about the structure of PDE solution spaces, rather than leveraging recent advances in deep learning architectures. This approach, while theoretically sound, may limit the performance and flexibility of these models when applied to complex, real-world physical systems.
+
+In parallel, the field of computer vision has seen significant advancements in neural field models, which represent continuous functions parameterized by neural networks (Stanley, 2007). A key innovation in this domain has been the development of conditioned neural fields, which allow for auxiliary inputs to modulate the field's behavior (Xie et al., 2022). These models have demonstrated remarkable effectiveness in tasks such as representing high-resolution images and 3D scenes (Mildenhall et al., 2021; Müller et al., 2022).
+
+Motivated by the success of conditioned neural fields in computer vision, we introduce the Continuous Vision Transformer (CViT), a novel neural operator architecture that bridges the gap between advanced computer vision techniques and scientific machine learning. Our main contributions can be summarized as follows:
+
+- Continuous Vision Transformer (CViT). We introduce CViT, a neural operator that combines a vision transformer encoder with a novel, trainable grid-based coordinate embedding in its decoder. This design enables CViT to effectively capture multi-scale spatial dependencies and allows for continuous querying at arbitrary resolutions.
+- Theoretical Insights into Lipschitz Constant and Spectral Bias. We present novel insights into the impact of coordinate embeddings on the Lipschitz constant of neural fields and neural operators. This analysis supports the choice of the proposed grid-based coordinate embedding and its efficacy in mitigating spectral bias, a common limitation in training neural operators.
+- State-of-the-art Performance. Despite its architectural simplicity, CViT achieves state-of-the-art results on challenging benchmarks in climate modeling, fluid dynamics and reaction-diffusion processes. It often outperforms larger models while using fewer parameters and without requiring extensive pretraining.
+
+Taken together, we explore the connection between operator learning architectures and conditioned neural fields, offering a unifying perspective for examining differences among popular operator learning models (see Appendices B and C). This perspective not only enhances understanding of existing architectures but also provides a general framework for designing future neural operators. By bridging the gap between computer vision and scientific machine learning, CViT paves the way for improved surrogates of complex physical systems, with potential applications ranging from climate modeling to engineering design.
+
+# 2 BACKGROUND AND RELATED WORK
+
+Background. The emergence of neural operators has driven advancements in solving partial differential equations (PDEs) and modeling physical systems. Building upon the foundational architectures mentioned in the introduction, recent developments have focused on enhancing the expressiveness and efficiency of these models. For instance, extensions of the Fourier Neural Operator (FNO) (Li et al., 2021) have explored factorized representations (Tran et al., 2021) to reduce computational complexity while maintaining performance. Similarly, wavelet-based approaches (Gupta et al., 2021; Tripura & Chakraborty, 2022) have been proposed to capture multi-scale features more effectively. Most existing neural operator architectures can be interpreted as conditioned neural fields (Xie et al., 2022) with specific choices of base fields and conditioning mechanisms, see Appendices B and C for a detailed discussion.
+
+Transformer-Based Operator Learning. Concurrently, the success of vision transformers in computer vision tasks has inspired their adaptation to scientific machine learning problems. The self-attention mechanism central to transformers offers a powerful tool for capturing long-range dependencies in spatial and temporal data, a crucial aspect in many PDE-governed systems. For example, OFormer (Li et al., 2022) introduced a novel way to embed continuous input functions and output queries into a transformer architecture. This approach demonstrated the potential of transformers in handling the inherent continuity of physical problems. GNOT (Hao et al., 2023) further extended this idea by incorporating graph structures, allowing for more flexible representation of input functions and improved handling of irregular domains. A significant advancement in this direction came with DPOT (Hao et al., 2024), which introduced a denoising pre-training strategy. This approach enables the model to learn from diverse PDE datasets, significantly enhancing its generalization capabilities.
+
+
+Figure 1: Continuous Vision Transformer (CViT) Architecture: CViT consists of the following components: (1) Spatio-temporal patch embeddings to extract localized features. (2) A temporal aggregation module based on the Perceiver architecture, which captures temporal correlations to compresses tokens along the time axis. (3) A Transformer encoder that captures multi-scale spatial dependencies via self-attention layers. (4) A novel grid-based positional encoding scheme for query coordinates, allowing for flexible output representation and interpolation. (5) A cross-attention decoder that integrates information from the input function with query coordinates.
+
+Open Challenges. Despite these advancements, several key challenges remain in the field of operator learning, particularly in addressing resolution independence, high-dimensional data, long-range spatio-temporal dependencies and trade-offs between model expressiveness and computational efficiency. Transformers typically rely on fixed-resolution data and positional encodings, which hinder their ability to generalize across varying scales or irregular domains commonly encountered in scientific problems. Efficiently capturing global and local dependencies in high-dimensional systems further compounds computational demands, especially as self-attention scales quadratically with input size. These constraints make it difficult to balance scalability, precision, and efficiency. Addressing even a subset of these challenges requires novel architectural designs that can leverage the strengths of both neural operators and vision transformers while overcoming their respective limitations. This sets the stage for our proposed Continuous Vision Transformer (CViT), which aims to tackle specific challenges related to resolution independence and efficient capturing of multi-scale features in regular grid-based problems, combining the continuous nature of neural operators with the powerful representation capabilities of vision transformers.
+
+# 3 CONTINUOUS VISION TRANSFORMER (CVIT)
+
+While neural operators have shown promising results in learning mappings between function spaces, their architectural design has not fully leveraged recent advancements in deep learning. Popular architectures like FNO (Li et al., 2021), DeepONet (Lu et al., 2021), and NoMaD (Seidman et al., 2022) (see Appendix C) primarily rely on simple building blocks such as Fourier layers or fully connected networks, which may not effectively capture complex spatial dependencies and multiscale features present in many physical systems.
+
+Motivated by the success of vision transformers in computer vision tasks, we introduce the Continuous Vision Transformer (CViT), a novel neural operator architecture that combines the strengths of vision transformers and continuous function representations. CViT aims to learn more powerful and flexible representations of time-dependent physical systems by leveraging a vision transformer encoder to capture complex spatial dependencies in input functions, a trainable grid-based positional encoding for flexible representation of query coordinates, and a cross-attention mechanism to integrate input function information with query coordinates.
+
+Taken together, the overall design of CViT's architecture draws inspiration from the analysis of existing neural operators presented in Appendix C, while leveraging the power of vision transformers to enhance expressiveness.
+
+# 3.1 ARCHITECTURE DESCRIPTION
+
+The CViT architecture consists of three main components: a vision transformer encoder, a grid-based positional encoding, and a cross-attention mechanism.
+
+Patch Embeddings. The vision transformer encoder takes as input a gridded representation of the input function $u$ , yielding a spatio-temporal data tensor $\mathbf{u} \in \mathbb{R}^{T \times H \times W \times D}$ with $D$ channels. We patchify our inputs into 3D tokens $\mathbf{u}_p \in \mathbb{R}^{T \times \frac{H}{P} \times \frac{W}{P} \times C}$ by tokenizing each 2D spatial frame independently, following the process used in standard Vision Transformers (Dosovitskiy et al., 2020). We then add trainable 1D temporal and 2D spatial positional embeddings to each token:
+
+$$
+\mathbf {u} _ {p e} = \mathbf {u} _ {p} + \mathrm {P E} _ {t} + \mathrm {P E} _ {s}, \quad \mathrm {P E} _ {t} \in \mathbb {R} ^ {T \times 1 \times 1 \times C}, \quad \mathrm {P E} _ {s} \in \mathbb {R} ^ {1 \times \frac {H}{P} \times \frac {W}{P} \times C}. \tag {1}
+$$
+
+Temporal Aggregation. To reduce computational cost, we use a temporal aggregation layer based on the Perceiver architecture (Jaegle et al., 2021; Alayrac et al., 2022). Specifically, we learn a pre-defined number of latent input queries $\mathbf{z} \in \mathbb{R}^{T' \times C}$ . These queries serve as learnable parameters in a cross-attention module, which processes the visual features of our input. The Perceiver module operates on flattened visual features $\mathbf{u}_f \in \mathbb{R}^{\left(\frac{H}{P} \times \frac{W}{P}\right) \times T \times C}$ obtained by flattening the positionally encoded features $u_{pe}$ . Through this cross-attention mechanism, we aggregate the temporal information into a compact latent representation $\mathbf{z}_{agg} \in \mathbb{R}^{\left(\frac{H}{P} \times \frac{W}{P}\right) \times T' \times C}$ as:
+
+$$
+\mathbf {z} ^ {\prime} = \hat {\mathbf {z}} + \operatorname {M H A} (\ln (\hat {\mathbf {z}}), \ln \left(\mathbf {u} _ {f}\right), \ln \left(\mathbf {u} _ {f}\right)), \tag {2}
+$$
+
+$$
+\mathbf {z} _ {a g g} = \mathbf {z} ^ {\prime} + \operatorname {M L P} \left(\ln \left(\mathbf {z} ^ {\prime}\right)\right). \tag {3}
+$$
+
+Here, $\mathbf{z}$ is initialized by a unit Gaussian distribution and $\hat{\mathbf{z}}\in \mathbb{R}^{(\frac{H}{P}\times \frac{W}{P})\times T^{\prime}\times C}$ is obtained by tiling the latent query $\mathbf{z}\left(\frac{H}{P}\times \frac{W}{P}\right)$ times. Besides compressing tokens over the time axis, this module also enables the model to handle inputs with a variable number of time steps.
+
+Transformer Encoder. We then process the aggregated tokens $\mathbf{z}_{agg}$ using a sequence of $L$ pre-norm Transformer blocks (Vaswani et al., 2017; Xiong et al., 2020),
+
+$$
+\mathbf {z} _ {0} = \mathrm {L N} \left(\mathbf {z} _ {\text {a g g}}\right), \tag {4}
+$$
+
+$$
+\mathbf {z} _ {\ell} ^ {\prime} = \operatorname {M S A} \left(\mathrm {L N} \left(\mathbf {z} _ {\ell - 1}\right)\right) + \mathbf {z} _ {\ell - 1}, \quad \ell = 1 \dots L, \tag {5}
+$$
+
+$$
+\mathbf {z} _ {\ell}, = \operatorname {M L P} \left(\ln \left(\mathbf {z} _ {\ell} ^ {\prime}\right)\right) + \mathbf {z} _ {\ell} ^ {\prime}, \quad \ell = 1 \dots L. \tag {6}
+$$
+
+Cross-Attention Decoder. To enable continuous evaluation of outputs, we design a novel and efficient coordinate embedding to capture the fine-scale features of the target functions. Specifically, we create a uniform grid $\{\mathbf{y}_{ij}\} \subset [0,1]^2$ , for $i = 1,\dots N_x$ and $j = 1,\dots N_y$ , along with associated trainable latent grid features $\mathbf{x} \in \mathbb{R}^{N_x \times N_y \times C}$ . For a query point $y \in \mathbb{R}^2$ , we compute a Nadaraya-Watson interpolant over grid latent features:
+
+$$
+\mathbf {x} ^ {\prime} = \sum_ {i = 1} ^ {N _ {x}} \sum_ {j = 1} ^ {N _ {y}} w _ {i j} \mathbf {x} _ {i j}, \quad w _ {i j} = \frac {\exp \left(- \beta \| y - \mathbf {y} _ {i j} \| ^ {2}\right)}{\sum_ {i j} \exp \left(- \beta \| y - \mathbf {y} _ {i j} \| ^ {2}\right)}. \tag {7}
+$$
+
+Here $\beta > 0$ is a hyperparameter that determines the locality of the interpolated features. It is important for determining the smoothness of the interpolation function. Specifically, larger values of $\beta$ yield more localized weight distributions $w_{ij}$ , resulting in a higher-frequency interpolant that captures finer-scale variations. Conversely, smaller $\beta$ values produce a smoother interpolant by averaging over a broader neighborhood of points.
+
+The interpolated grid feature $\mathbf{x}_0 = \mathbf{x}' \in \mathbb{R}^{1 \times C}$ is used as query input to a transformer decoder. This decoder uses the output of the vision transformer encoder $\mathbf{z}_L$ as keys and values in a cross-attention mechanism:
+
+$$
+\mathbf {x} _ {k} ^ {\prime} = \mathbf {x} _ {k - 1} + \operatorname {M H A} \left(\ln \left(\mathbf {x} _ {k - 1}\right), \ln \left(\mathbf {z} _ {L}\right), \ln \left(\mathbf {z} _ {L}\right)\right), \quad k = 1 \dots K, \tag {8}
+$$
+
+$$
+\mathbf {x} _ {k} = \mathbf {x} _ {k} ^ {\prime} + \operatorname {M L P} \left(\ln \left(\mathbf {x} _ {k} ^ {\prime}\right)\right), \quad k = 1 \dots K. \tag {9}
+$$
+
+Finally, a small MLP network projects the output to the desired output dimension.
+
+Theoretical Insights. The theoretical analysis of Lipschitz constants for different coordinate embeddings (as detailed in Appendix E) provides crucial insights that inform the design choices in CViT and have broader implications for neural operator architectures. Our findings reveal that the choice of coordinate embedding significantly influences the decoder's capacity to learn complex, high-frequency functions.
+
+For conventional MLP decoders with linear coordinate embeddings, the Lipschitz constant is approximately 1 at initialization, which does not enhance the network's ability to capture fine-scale features, thereby leading to prediction susceptible to spectral bias (Rahaman et al., 2019). In contrast, random Fourier features can increase the Lipschitz constant through two mechanisms: by increasing the standard deviation of the sampling distribution or by increasing the network width. This observation not only explains the effectiveness of Fourier features in addressing spectral bias, but also highlights a potential trade-off between network size and the frequency range that can be captured.
+
+Our proposed grid-based coordinate embedding in CViT offers a more direct and controllable approach to increasing the network's Lipschitz constant. By adjusting the interpolation parameter $\beta$ , we can tune the model's ability to capture high-frequency components in the target functions. This provides a clear advantage as it allows for more precise control over the model's spectral properties without necessarily increasing model complexity.
+
+CViT vs other Transformer-based Approaches. To further highlight the key innovations of CViT, we compare it with other popular transformer-based operator learning methods:
+
+OFormer (Li et al., 2022): OFormer uses an encoder-decoder structure. Its encoder combines a point-wise MLP and stacked self-attention blocks to process input functions, while employing random Fourier Features (Tancik et al., 2020) for query coordinate encoding. The model generates latent embeddings through cross-attention at sampled query locations. In the decoder, OFormer uses recurrent MLPs for dynamic propagation instead of traditional masked attention. Unlike CViT, it doesn't use ViT's patch embedding to tokenize input functions, potentially limiting its ability to capture complex spatial dependencies.
+
+GNOT (Hao et al., 2023): GNOT is a transformer-based framework for learning operators that addresses the challenges of multiple input functions and irregular meshes. It designs a heterogeneous normalized attention layer, providing an encoding interface for various input functions and additional prior information. Additionally, GNOT features a geometric gating mechanism, described as a soft domain decomposition approach to multi-scale problems. Unlike CViT, GNOT uses an plain MLP to process query coordinates, which may potentially suffer from spectral bias (Rahaman et al., 2019).
+
+DPOT (Hao et al., 2024): DPOT is a transformer-based architecture designed for pretraining on multiple PDEs. It introduces a new auto-regressive denoising strategy and a novel model architecture based on Fourier attention. Unlike OFformer, GNOT, and CViT, DPOT does not explicitly take query coordinates as inputs, which implies that it cannot be evaluated at arbitrary locations.
+
+MPP (McCabe et al., 2023): MPP is a large-scale PDE surrogate model that directly employs a Vision Transformer as its backbone. Similar to DPOT, it does not take query coordinates as inputs, thereby losing flexibility in diverse output representations.
+
+# 4 EXPERIMENTS
+
+We compare the CViT against popular neural operators on three challenging benchmarks in physical sciences. In addition to demonstrating CViT's performance against strong baselines, we also conduct comprehensive ablation studies to probe the sensitivity on its own hyper-parameters.
+
+CViT model setup. We construct CViT models with different configurations, as summarized in Table 1. For all experiments, unless otherwise stated, we use a patch size of $8 \times 8$ for tokenizing inputs. We also employ a decoder with a single cross-attention Transformer block for all configurations. While we tested decoders with multiple layers, they did not yield improvements. The grid resolution is set to the spatial resolution of each dataset. The latent dimension of grid features is set to 512, and if it does not match the transformer's embedding dimension, we align it using a dense layer. Besides, we use $\beta = 10^5$ to ensure sufficient locality of the interpolated features. These choices are validated
+
+
+Figure 2: Advection of discontinuous waveforms. Prediction (red dashed line) versus ground truth (blue line) for the worst-case example in the test dataset, for: DeepONet; NoMaD; FNO; CViT. Also reported is the associated Total Variation (TV) error $(\downarrow)$ .
+
+by extensive ablation studies, as illustrated in Figure 4. Full details of the training and evaluation procedures are provided in Appendix F.1.
+
+Table 1: Details of Continuous Vision Transformer model variants.
+
+
Model
Encoder layers
Embedding dim
MLP width
Heads
# Params
CViT-S
5
384
384
6
13 M
CViT-B
10
512
512
8
30 M
CViT-L
15
768
1536
12
92 M
+
+Baselines. We select the following methods as our baselines for comparisons. DeepONet (Lu et al., 2021): One of the first neural operators with universal approximation guarantees. NoMaD (Seidman et al., 2022): A recently proposed architecture leveraging nonlinear decoders to achieve enhanced dimensionality reduction. FNO (Li et al., 2021): An efficient framework for operator learning in the frequency domain. FFNO (Tran et al., 2021): An improved version of FNO utilizing a separable Fourier representation, which reduces model complexity and facilitates deeper network structures. UNO (Ashiqur Rahman et al., 2022): A U-shaped neural operator with FNO layers. U-Netatt (Gupta & Brandstetter, 2022): A modern U-Net architecture using bias weights and group normalization, and wide ResNet-style 2D convolutional blocks, each of which is followed by a spatial attention block. U-F2Net (Gupta & Brandstetter, 2022): A U-Net variant where the lower blocks in both the downsampling and upsampling paths are replaced by Fourier blocks, each consisting of 2 FNO layers with residual connections. Dilated ResNet (Stachenfeld et al., 2021): A ResNet model that adapts filter sizes at different layers using dilated convolutions, providing an alternative method for aggregating global information. GK-Transformer (Cao, 2021) / OFormer (Li et al., 2022) / GNOT (Hao et al., 2023): Various transformer-based architectures for operator learning, with different designs of their encoder/decoder and attention mechanisms. DPOT (Hao et al., 2024) / MPP (McCabe et al., 2023): Transformer-based networks with patch embedding as in ViT, and pre-trained on extensive PDE datasets using a rollout loss.
+
+For all baselines, we report evaluation results from the original papers when applicable. When not applicable, we train and evaluate each model following the suggested settings in the respective paper. Details on the implementation of baseline models are provided in Appendix F.2.
+
+# 4.1 MAIN RESULTS
+
+Here we provide our main results across three challenged benchmarks. The full details on the underlying equations, dataset generation and problem setup for each case are provided in the Appendix; see Section F.3, F.4 and F.5, respectively.
+
+Advection of discontinuous waveforms. The first benchmark involves predicting the transport of discontinuous waveforms governed by a linear advection equation with periodic boundary conditions. We make use of the datasets and problem setup established by Hoop et al. (de Hoop et al., 2022). This benchmark evaluates our model's capability in handling discontinuous solutions and shocks in comparison to popular neural operator models.
+
+Figure 2 illustrates the test sample corresponding to the worst-case prediction of each model we compared. We observe that CViT is able to better capture the discontinuous targets and yield the
+
+most sharp predictions across all baselines. This is also reflected in both the relative L2 and Total Variation error metrics; see Appendix Table 5 for a more complete summary, including details on model configurations, as well as average, median and worst case errors across the entire test dataset.
+
+Shallow-water equations. The second benchmark involves a fluid flow system governed by the 2D shallow-water equations. This describes the evolution of a 2D incompressible flow on the surface of the sphere and it is commonly used as a benchmark in climate modeling. Here we adhere to the dataset and problem setup established in PDEArena (Gupta & Brandstetter, 2022), allowing us to perform fair comparisons with several state-of-the-art deep learning surrogates.
+
+Table 2 presents the results of CViT against several competitive and heavily optimized baselines. Our proposed method achieves the lowest relative $L^2$ error. It is also worth noting that the reported performance gains are achieved using CViT configurations with a significantly smaller parameter count compared to the other baselines. This highlights the merits of our approach that enables the design of parameter-efficient models whose outputs can also be continuously queried at any resolution. Additional visualizations of our models are shown in Figure 3 and 10.
+
+In addition, here we perform extensive ablation studies on the hyper-parameters of CViT. The results are
+
+Table 2: Performance for 5-step roll-out predictions in the shallow-water equations benchmark.
+
+
Model
# Params
Rel. L2 error (↓)
DilResNet
4.2 M
13.20%
U-Netatt
148 M
5.68%
FNO
268 M
3.97%
U-F2Net
344 M
1.89%
UNO
440 M
3.79%
CViT-S
13 M
4.47%
CViT-B
30 M
2.69%
CViT-L
92 M
1.56%
+
+summarized in Figure 4. As shown in Figure 4 (a), we observe that a smaller patch size typically leads to better accuracy, but at higher computational costs. Moreover, Figure 4 (b) demonstrates that the model performance is significantly influenced by the type of coordinate embeddings used in the CViT decoder. We compare our proposed grid-based embedding against a small MLP and random Fourier features (Tancik et al., 2020). The grid-based embedding achieves the best accuracy, outperforming other methods by up to an order of magnitude. This result is in agreement with the theoretical insights presented in Appendix E.
+
+We also investigate the impact of the resolution of the associated grid. Figure 4 (c) reveals that the best results are obtained when the grid resolution matches the highest resolution at which the model is evaluated. As another direct empirical evidence of theoretical results in Appendix E, Figure 4(d) shows the CViT model's sensitivity to the hyper-parameter $\beta$ used for computing interpolated features; too small $\beta$ values can degrade predictive accuracy. Finally, in Appendix Figure 9, we observe minor improvements by increasing the latent dimension of grid features, or the number of decoder attention heads. Hence the overall model performance remains robust to variations in these hyper-parameters.
+
+Taken together, these findings not only justify our design choices for CViT but also provide general insights for the development of neural operators. They suggest that future research in this field should pay close attention to the interplay between spatio-temporal tokenization, coordinate representation, and the inherent multi-scale nature of physical systems. Such considerations could lead to even more effective architectures for a wide range of scientific machine learning tasks.
+
+Navier-Stokes equations (NS). Our third benchmark focuses on the compressible and incompressible Navier-Stokes equations, which underpin a variety of systems, ranging from hydromechanical processes to weather forecasting and turbulent dynamics analysis. For a fair comparison with various neural operators and other state-of-the-art deep learning models, we use the dataset generated by PDEArena (Gupta & Brandstetter, 2022), and PDEBench Takamoto et al. (2022). and follow the problem setup reported in Hao et al. (Hao et al., 2024).
+
+Our main results are summarized in Table 3, indicating that CViT outperforms all baselines we have considered. Notably, the previous best result (DPOT-L (Fine-tuned)) is achieved with a much larger transformer-based architecture, which involves pretraining on massive diverse PDE datasets followed by fine-tuning on the target dataset for 500 epochs. Here we also note that DPOT was pretrained and fine-tuned using a rollout loss, which directly optimizes for the multi-step prediction task on which the models are evaluated. In contrast, CViT was trained using a one-step loss without any rollout
+
+
+
+
+Figure 3: Shallow water benchmark. Representative CViT rollout prediction of the vorticity field, an
+Figure 4: Ablation studies for CViT on the shallow-water equations benchmark. Convergence of test errors for: (a) different patch sizes; (b) different coordinate embeddings; (c) different resolutions of latent grids; (d) sensitivity on interpolating the CViT latent grid features, as controlled by the $\beta$ parameter. Results obtained using CViT-L with $16 \times 16$ patch-size, varying each hyper-parameter of interest while keeping others fixed.
+
+finetuning. This difference in training objective significantly favors DPOT for rollout evaluations across all benchmarks. Furthermore, CViT exhibits remarkable parameter efficiency. CViT-S, with only 13M parameters, achieves accuracy comparable to the largest pretrained model (1.03B). Additionally, CViT shows good scalability; as the number of parameters increases, performance improves. These findings strongly support the effectiveness our approach in learning evolution operators for complex physical systems. Additional results and sample visualizations are provided in Figure 5, as well as Figure 13 and 14 in Appendix.
+
+Table 3: Relative $L^2$ error of rollout predictions on the incompressible and compressible Navier-Stokes and Diffusion-Reaction benchmark.
+
+
Model
# Params
NS
CNS
DR
FNO
0.5 M
9.12 %
9.60 %
12.00 %
FFNO
1.3 M
8.39 %
5.20 %
5.71 %
GK-T
1.6 M
9.52%
3.77%
3.59 %
GNOT
1.8 M
17.20 %
4.20 %
3.11 %
Oformer
1.9 M
13.50 %
6.25 %
1.92 %
DPOT-Ti
7 M
12.50 %
3.97 %
3.21 %
MPP-S
30M
-
-
1.12 %
DPOT-S
30 M
9.91 %
3.37 %
3.79 %
MPP-L (Pre-trained)
400 M
-
-
0.98 %
DPOT-L (Pre-trained)
500 M
7.98 %
2.16 %
2.32 %
DPOT-L (Fine-tuned)
500 M
2.78 %
1.31 %
0.73 %
DPOT-H (Pre-trained)
1.03 B
3.79 %
1.80 %
1.91 %
CViT-S
13 M
3.75 %
2.71 %
1.13 %
CViT-B
30 M
3.18 %
1.99 %
1.11 %
CViT-L
92 M
2.35 %
1.29 %
0.68 %
+
+
+Figure 5: Incompressible Navier-Stokes benchmark (NS). Representative CViT rollout predictions of the passive scalar field, and point-wise error against the ground truth.
+
+
+Figure 6: Compressible Navier-Stokes Benchmark (CNS). Representative CViT rollout prediction of the density field $\rho$ , and point-wise error against the ground truth.
+
+Diffusion-Reaction equations (DR). Our final benchmark focuses on learning the density fields $\mathbf{u} = (u,v)$ governed by a coupled 2D diffusion-reaction equation (DR). This PDE, commonly used in chemistry, models substances reacting and diffusing across a spatial domain, illustrating chemical reaction processes and resulting in diverse spatial patterns. For a fair comparison, we use the dataset from PDEBench (Takamoto et al., 2022) and follow the problem setup described by Hao et al. (2024).
+
+Table 3 presents our main results. Consistent with previous findings, CViT-L achieves the best performance across all baselines. CViT models outperform other approaches with comparable or fewer parameters, demonstrating good scalability and parameter efficiency. Representative rollout predictions are provided in Figure 18 and 19 (see Appendix). Our predictions show excellent agreement with the corresponding ground truth.
+
+Interestingly, we note that the solution of Diffusion-Reaction equations appears simpler than that of the Navier-Stokes equation dataset, resulting in uniformly lower test errors for various baselines in the DR benchmark. In particular, OFformer outperforms GNOT in both examples, despite having
+
+comparable parameters. We postulate that this performance gain is due to the use of random Fourier features in OFormer, facilitating more efficient learning of complex functions. This observation further demonstrates the importance of coordinate embedding in designing neural operators and indirectly highlights the effectiveness of our proposed grid-based embedding.
+
+# 5 DISCUSSION
+
+Summary. This work introduces the Continuous Vision Transformer (CViT), a novel neural operator architecture that leverages advances in computer vision to address challenges in learning complex physical systems. CViT combines the strengths of vision transformers and continuous function representations, achieving state-of-the-art accuracy on challenging benchmarks in climate modeling, fluid dynamics and reaction-diffusion processes. Our approach demonstrates the potential of adapting advanced computer vision techniques to develop more flexible and accurate machine learning models for physical sciences. The key innovations of CViT include: (a) a vision transformer encoder for capturing multi-scale spatial dependencies in input functions, (b) a trainable grid-based positional encoding for flexible representation of query coordinates, and (c) a query-wise cross-attention mechanism ensuring consistent evaluation at arbitrary resolutions. These design choices ensure that CViT maintains the desirable properties of a well-defined conditioned neural field (as discussed in Appendix B), while offering improved flexibility and performance (as discussed in Appendix E).
+
+Our empirical results across various PDE benchmarks demonstrate that CViT often outperforms larger models with fewer parameters and without extensive pretraining. This highlights the merits of our approach in designing parameter-efficient models that can be continuously queried at any resolution. The broader impact of this work lies in its potential to accelerate scientific discovery through more efficient and accurate simulations of complex physical systems, with applications ranging from climate modeling to engineering design.
+
+Limitations. Despite its promising performance, the proposed CViT architecture can be further improved in multiple areas. Firstly, like most transformer-based models, CViT's self-attention blocks scale quadratically with the number of tokens, posing computational challenges for high-dimensional or high-resolution data. Recent advancements in computer vision (Liu et al., 2021b) are tackling these scalability issues, and these ideas can be transferred to our setting to improve CViT's efficiency for larger-scale problems. Secondly, transformer-based models like CViT generally require large training datasets for optimal performance and may struggle in data-scarce scenarios without careful regularization. To address this, future work could explore leveraging CViT's ability to reconstruct continuous output functions in conjunction with physics-informed loss functions (Wang et al., 2021; 2023) for more data-efficient training and improved generalization. Lastly, while our current experiments treat input functions as sequences of images, many practical applications in scientific computing involve complex geometric structures and diverse input modalities such as unstructured meshes or point clouds. Addressing these cases requires developing appropriate tokenization schemes, and recent work in (Alkin et al., 2024; Pang et al., 2022) has taken steps in this direction. Extending CViT to handle such diverse input modalities represents an important avenue for future research.
+
+Future Work. Building on the success of CViT, several promising directions for future research emerge. One key area is the exploration of more efficient attention mechanisms to improve scalability to higher-dimensional problems. Additionally, investigating the potential of pre-training strategies, similar to those employed in DPOT (Hao et al., 2024), could further enhance CViT's performance and generalization capabilities across diverse PDE systems. Finally, extending CViT to handle 3D problems and developing techniques for multi-resolution training and evaluation could significantly broaden its applicability in scientific computing domains.
+
+Broader Impact. The broader impact of this work lies in its potential to fuel the development of resolution-invariant foundation models for accelerating scientific discovery and enable more efficient and accurate simulations of complex physical systems, with applications ranging from climate modeling to engineering design.
+
+# ACKNOWLEDGMENT
+
+We would like to acknowledge support from the US Department of Energy under the Advanced Scientific Computing Research program (grant DE-SC0024563) and Yale Institute for Foundations of Data Science. We also thank the developers of the software that enabled our research, including JAX Bradbury et al. (2018), Matplotlib Hunter (2007), and NumPy Harris et al. (2020).
+
+# ETHICS STATEMENT
+
+Our contributions enable advances in accelerating the modeling and emulation of complex physical systems. This has the potential to significantly impact fields such as climate science, fluid dynamics, and materials engineering by providing more accurate and efficient simulation tools. While we do not anticipate specific negative impacts from this work, as with any powerful predictive tool, there is potential for misuse. We encourage the research community to consider the ethical implications and potential dual-use scenarios when applying these technologies in sensitive domains.
+
+# REPRODUCIIBILITY STATEMENT
+
+The code used to carry out the ablation experiments is provided as a supplementary material for this submission. All data and code are publicly available at https://github.com/PredictiveIntelligenceLab/cvit.
+
+# REFERENCES
+
+Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katherine Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. Advances in neural information processing systems, 35:23716-23736, 2022.
+Benedikt Alkin, Andreas Fürst, Simon Schmid, Lukas Gruber, Markus Holzleitner, and Johannes Brandstetter. Universal physics transformers. arXiv preprint arXiv:2402.12365, 2024.
+Md Ashiqur Rahman, Zachary E Ross, and Kamyar Azizzadenesheli. U-no: U-shaped neural operators. arXiv e-prints, pp. arXiv-2204, 2022.
+Kamyar Azizzadenesheli, Nikola Kovachki, Zongyi Li, Miguel Liu-Schiaffini, Jean Kossaifi, and Anima Anandkumar. Neural operators for accelerating scientific simulations and design. Nature Reviews Physics, pp. 1-9, 2024.
+Kaushik Bhattacharya, Bamdad Hosseini, Nikola B Kovachki, and Andrew M Stuart. Model reduction and neural networks for parametric PDEs. The SMAI journal of computational mathematics, 7: 121-157, 2021.
+James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
+J Bruna, W Zaremba, A Szlam, and Y LeCun. Spectral networks and deep locally connected networks on graphs. arxiv. arXiv preprint arXiv:1312.6203, 2014.
+Qianying Cao, Somdatta Goswami, and George Em Karniadakis. Lno: Laplace neural operator for solving differential equations. arXiv preprint arXiv:2303.10528, 2023.
+Shuhao Cao. Choose a transformer: Fourier or galerkin. Advances in neural information processing systems, 34:24924-24940, 2021.
+Rohan Chabra, Jan E Lenssen, Eddy Ilg, Tanner Schmidt, Julian Straub, Steven Lovegrove, and Richard Newcombe. Deep local shapes: Learning local sdf priors for detailed 3d reconstruction. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XXIX 16, pp. 608-625. Springer, 2020.
+
+Eric R Chan, Marco Monteiro, Petr Kellnhofer, Jiajun Wu, and Gordon Wetzstein. pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5799-5809, 2021.
+Eric R Chan, Connor Z Lin, Matthew A Chan, Koki Nagano, Boxiao Pan, Shalini De Mello, Orazio Gallo, Leonidas J Guibas, Jonathan Tremblay, Sameh Khamis, et al. Efficient geometry-aware 3d generative adversarial networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16123-16133, 2022.
+Anpei Chen, Zexiang Xu, Andreas Geiger, Jingyi Yu, and Hao Su. Tensorf: Tensorial radiance fields. In Computer Vision-ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part XXXII, pp. 333-350. Springer, 2022.
+Tianping Chen and Hong Chen. Universal approximation to nonlinear operators by neural networks with arbitrary activation functions and its application to dynamical systems. IEEE transactions on neural networks, 6(4):911-917, 1995.
+Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 5939-5948, 2019.
+Julian Chibane, Thiemo Alldieck, and Gerard Pons-Moll. Implicit functions in feature space for 3d shape reconstruction and completion. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6970-6981, 2020.
+Maarten V de Hoop, Daniel Zhengyu Huang, Elizabeth Qian, and Andrew M Stuart. The cost-accuracy trade-off in operator learning with neural networks. arXiv preprint arXiv:2203.13181, 2022.
+Tim De Ryck and Siddhartha Mishra. Generic bounds on the approximation error for physics-informed (and) operator learning. Advances in Neural Information Processing Systems, 35:10945-10958, 2022.
+Harm De Vries, Florian Strub, Jérémie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Modulating early visual processing by language. Advances in Neural Information Processing Systems, 30, 2017.
+Terrance DeVries, Miguel Angel Bautista, Nitish Srivastava, Graham W Taylor, and Joshua M Susskind. Unconstrained scene generation with locally conditioned radiance fields. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14304-14313, 2021.
+Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
+VS Fanaskov and Ivan V Oseledets. Spectral neural operators. In Doklady Mathematics, volume 108, pp. S226-S232. Springer, 2023.
+Herbert Federer. Geometric measure theory. Springer, 2014.
+Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249-256, 2010.
+Gaurav Gupta, Xiongye Xiao, and Paul Bogdan. Multiwavelet-based operator learning for differential equations. Advances in neural information processing systems, 34:24048-24062, 2021.
+Jayesh K Gupta and Johannes Brandstetter. Towards multi-spatiotemporal-scale generalized pde modeling. arXiv preprint arXiv:2209.15616, 2022.
+David Ha, Andrew M. Dai, and Quoc V. Le. Hypernetworks. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=rkpAcel1x.
+
+Zhongkai Hao, Zhengyi Wang, Hang Su, Chengyang Ying, Yinpeng Dong, Songming Liu, Ze Cheng, Jian Song, and Jun Zhu. Gnot: A general neural operator transformer for operator learning. In International Conference on Machine Learning, pp. 12556-12569. PMLR, 2023.
+Zhongkai Hao, Chang Su, Songming Liu, Julius Berner, Chengyang Ying, Hang Su, Anima Anandkumar, Jian Song, and Jun Zhu. Dpot: Auto-regressive denoising operator transformer for large-scale pde pre-training. arXiv preprint arXiv:2403.03542, 2024.
+Charles R Harris, K Jarrod Millman, Stefan J Van Der Walt, Ralf Gommers, Pauli Virtanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J Smith, et al. Array programming with numpy. Nature, 585(7825):357-362, 2020.
+John D Hunter. Matplotlib: A 2d graphics environment. Computing in science & engineering, 9(03): 90-95, 2007.
+Andrew Jaegle, Felix Gimeno, Andy Brock, Oriol Vinyals, Andrew Zisserman, and Joao Carreira. Perceiver: General perception with iterative attention. In International conference on machine learning, pp. 4651-4664. PMLR, 2021.
+Wonbong Jang and Lourdes Agapito. Codenerf: Disentangled neural radiance fields for object categories. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 12949-12958, 2021.
+Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
+Nikola Kovachki, Samuel Lanthaler, and Siddhartha Mishra. On universal approximation and error bounds for fourier neural operators. Journal of Machine Learning Research, 22:Art-No, 2021.
+Nikola Kovachki, Zongyi Li, Burigede Liu, Kamyar Azizzadenesheli, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Neural operator: Learning maps between function spaces with applications to pdes. Journal of Machine Learning Research, 24(89):1-97, 2023.
+Samuel Lanthaler, Siddhartha Mishra, and George E Karniadakis. Error estimates for deeponets: A deep learning framework in infinite dimensions. Transactions of Mathematics and Its Applications, 6(1):tnac001, 2022.
+Fabian Latorre, Paul Rolland, and Volkan Cevher. Lipschitz constant estimation of neural networks via sparse polynomial optimization. arXiv preprint arXiv:2004.08688, 2020.
+Zijie Li, Kazem Meidani, and Amir Barati Farimani. Transformer for partial differential equations' operator learning. arXiv preprint arXiv:2205.13671, 2022.
+Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Neural operator: Graph kernel network for partial differential equations. arXiv preprint arXiv:2003.03485, 2020.
+Zongyi Li, Nikola Borislavov Kovachki, Kamyar Azizzadenesheli, Burigede liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier neural operator for parametric partial differential equations. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=c8P9NQVtmnO.
+Lingjie Liu, Jiatao Gu, Kyaw Zaw Lin, Tat-Seng Chua, and Christian Theobalt. Neural sparse voxel fields. Advances in Neural Information Processing Systems, 33:15651-15663, 2020.
+Steven Liu, Xiuming Zhang, Zhoutong Zhang, Richard Zhang, Jun-Yan Zhu, and Bryan Russell. Editing conditional radiance fields. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5773-5783, 2021a.
+Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 10012-10022, 2021b.
+
+Miguel Liu-Schiaffini, Julius Berner, Boris Bonev, Thorsten Kurth, Kamyar Azizzadenesheli, and Anima Anandkumar. Neural operators with localized integral and differential kernels. arXiv preprint arXiv:2402.16845, 2024.
+Ilya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983, 2016.
+Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
+Lu Lu, Pengzhan Jin, Guofei Pang, Zhongqiang Zhang, and George Em Karniadakis. Learning nonlinear operators via DeepONet based on the universal approximation theorem of operators. Nature Machine Intelligence, 3(3):218-229, 2021.
+Michael McCabe, Bruno Regaldo-Saint Blancard, Liam Holden Parker, Ruben Ohana, Miles Cranmer, Alberto Bietti, Michael Eickenberg, Siavash Golkar, Geraud Krawezik, Francois Lanusse, et al. Multiple physics pretraining for physical surrogate models. arXiv preprint arXiv:2310.02994, 2023.
+Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4460-4470, 2019.
+Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. Communications of the ACM, 65(1):99-106, 2021.
+Thomas Müller, Alex Evans, Christoph Schied, and Alexander Keller. Instant neural graphics primitives with a multiresolution hash encoding. ACM Trans. Graph., 41(4):102:1-102:15, July 2022. doi: 10.1145/3528223.3530127. URL https://doi.org/10.1145/3528223.3530127.
+Thomas Müller, Alex Evans, Christoph Schied, and Alexander Keller. Instant neural graphics primitives with a multiresolution hash encoding. ACM Transactions on Graphics (ToG), 41(4): 1-15, 2022.
+Yatian Pang, Wenxiao Wang, Francis EH Tay, Wei Liu, Yonghong Tian, and Li Yuan. Masked autoencoders for point cloud self-supervised learning. In European conference on computer vision, pp. 604-621. Springer, 2022.
+Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 165-174, 2019.
+Songyou Peng, Michael Niemeyer, Lars Mescheder, Marc Pollefeys, and Andreas Geiger. Convolutional occupancy networks. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part III 16, pp. 523-540. Springer, 2020.
+Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
+Nasim Rahaman, Aristide Baratin, Devansh Arpit, Felix Draxler, Min Lin, Fred Hamprecht, Yoshua Bengio, and Aaron Courville. On the spectral bias of neural networks. In International conference on machine learning, pp. 5301-5310. PMLR, 2019.
+Daniel Rebain, Mark J Matthews, Kwang Moo Yi, Gopal Sharma, Dmitry Lagun, and Andrea Tagliasacchi. Attention beats concatenation for conditioning neural fields. arXiv preprint arXiv:2209.10684, 2022.
+Jacob H Seidman, Georgios Kissas, Paris Perdikaris, and George J. Pappas. NOMAD: Nonlinear manifold decoders for operator learning. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=5OWV-sZvM1.
+
+Jacob H Seidman, Georgios Kissas, George J. Pappas, and Paris Perdikaris. Variational autoencoding neural operators. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 30491-30522. PMLR, 23-29 Jul 2023. URL https://proceedings.mlr.press/v202/seidman23a.html.
+Louis Serrano, Lise Le Boudec, Armand Kassai Koupai, Thomas X Wang, Yuan Yin, Jean-Noel Vittaut, and Patrick Gallinari. Operator learning with neural fields: Tackling pdes on general geometries. Advances in Neural Information Processing Systems, 36:70581-70611, 2023.
+Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. Advances in Neural Information Processing Systems, 33:7462-7473, 2020.
+Kimberly Stachenfeld, Drummond B Fielding, Dmitrii Kochkov, Miles Cranmer, Tobias Pfaff, Jonathan Godwin, Can Cui, Shirley Ho, Peter Battaglia, and Alvaro Sanchez-Gonzalez. Learned coarse models for efficient turbulence simulation. arXiv preprint arXiv:2112.15275, 2021.
+Kenneth O Stanley. Compositional pattern producing networks: A novel abstraction of development. Genetic programming and evolvable machines, 8:131-162, 2007.
+Elias M Stein and Rami Shakarchi. Real analysis: measure theory, integration, and Hilbert spaces. Princeton University Press, 2009.
+Makoto Takamoto, Timothy Praditia, Raphael Leiteritz, Daniel MacKinlay, Francesco Alesiani, Dirk Pflüger, and Mathias Niepert. Pdebench: An extensive benchmark for scientific machine learning. Advances in Neural Information Processing Systems, 35:1596-1611, 2022.
+Matthew Tancik, Pratul Srinivasan, Ben Mildenhall, Sara Fridovich-Keil, Nithin Raghavan, Utkarsh Singhal, Ravi Ramamoorthi, Jonathan Barron, and Ren Ng. Fourier features let networks learn high frequency functions in low dimensional domains. Advances in neural information processing systems, 33:7537-7547, 2020.
+Alasdair Tran, Alexander Mathews, Lexing Xie, and Cheng Soon Ong. Factorized fourier neural operators. arXiv preprint arXiv:2111.13802, 2021.
+Edgar Tretschk, Ayush Tewari, Vladislav Golyanik, Michael Zollhöfer, Carsten Stoll, and Christian Theobalt. Patchnets: Patch-based generalizable deep implicit 3d shape representations. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XVI 16, pp. 293-309. Springer, 2020.
+Alex Trevithick and Bo Yang. Grf: Learning a general radiance field for 3d representation and rendering. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15182-15192, 2021.
+Tapas Tripura and Souvik Chakraborty. Wavelet neural operator: a neural operator for parametric partial differential equations. arXiv preprint arXiv:2205.02191, 2022.
+Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.
+Aladin Virmaux and Kevin Scaman. Lipschitz regularity of deep neural networks: analysis and efficient estimation. Advances in Neural Information Processing Systems, 31, 2018.
+Sifan Wang, Hanwen Wang, and Paris Perdikaris. Learning the solution operator of parametric partial differential equations with physics-informed deeponets. Science advances, 7(40):eabi8605, 2021.
+Sifan Wang, Hanwen Wang, and Paris Perdikaris. Improved architectures and training algorithms for deep operator networks. Journal of Scientific Computing, 92(2):35, 2022.
+Sifan Wang, Shyam Sankaran, Hanwen Wang, and Paris Perdikaris. An expert's guide to training physics-informed neural networks. arXiv preprint arXiv:2308.08468, 2023.
+
+Yiheng Xie, Towaki Takikawa, Shunsuke Saito, Or Litany, Shiqin Yan, Numair Khan, Federico Tombari, James Tompkin, Vincent Sitzmann, and Srinath Sridhar. Neural fields in visual computing and beyond. In Computer Graphics Forum, volume 41, pp. 641-676. Wiley Online Library, 2022.
+Ruibin Xiong, Yunchang Yang, Di He, Kai Zheng, Shuxin Zheng, Chen Xing, Huishuai Zhang, Yanyan Lan, Liwei Wang, and Tieyan Liu. On layer normalization in the transformer architecture. In International Conference on Machine Learning, pp. 10524-10533. PMLR, 2020.
+Qiangeng Xu, Weiyue Wang, Duygu Ceylan, Radomir Mech, and Ulrich Neumann. Disn: Deep implicit surface network for high-quality single-view 3d reconstruction. Advances in neural information processing systems, 32, 2019.
+Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4578-4587, 2021.
+
+# A NOMENCLATURE
+
+Table 4 summarizes the main symbols and notation used in this work.
+
+Table 4: Summary of the main symbols and notation used in this work.
+
+
Notation
Description
Operator Learning
X
The input function space
Y
The output function space
u∈X
Input function
s∈Y
Output function
y
Query coordinate in the input domain of s
G:X→Y
The operator mapping between function spaces
E:X→Rn
Encoder mapping
D:Rn→Y
Decoder mapping
Fourier Neural Operator
F,F-1
Fourier transform and its inverse
Fn,F-1
Discrete Fourier transform and its inverse truncated on the first n modes
K
Linear transformation applied to the n leading Fourier modes
W
Linear transformation (bias term) applied to the layer inputs
k
Fourier modes / wave numbers
σ
Activation function
Continuous Vision Transformer
PEt
Temporal positional embedding
PEs
Spatial positional embedding
MSA
Multi-head self-attention
MHA
Multi-head attention
LN
Layer normalization
P
Patch size of Vision Transformer
C
Embedding dimension of Vision Transformer
x∈RN×Ny×C
Latent grid features
β
Locality of interpolated latent grid features
Partial Differential Equations
ζ
Vorticity of shallow water equations
η
Height of shallow water equations
u
Velocity field
P
Pressure field
c
Passive scalar (smoke)
ν
Viscosity
Hyperparameters
B
Batch size
Q
Number of query coordinates in each batch
D
Number of latent variables of interest
T
Number of previous time-steps
H×W
Resolution of spatial discretization
+
+# B NEURAL FIELDS & CONDITIONED NEURAL FIELDS
+
+A neural field is a function over a continuous domain parameterized by a neural network (Stanley, 2007). Recently, the computer vision community has adopted neural fields to represent 3D spatial fields, such as neural radiance fields (NeRFs) (Mildenhall et al., 2021), spatial occupancy fields (Mescheder et al., 2019), and signed distance functions (Park et al., 2019). These fields represent functions defined over continuous spatial domains, with NeRFs additionally taking an element of a continuous ray space as input. In this paper, a point in the domain of a neural field is referred to as a query point, here denoted by $y$ . Conditioned neural fields allow these fields to change based on auxiliary inputs $u$ , often represented as latent codes $z$ , without the need to retrain the entire field; see Figure 7. The latent code affects the forward pass by modifying the parameters of the base field through either global conditioning, where the forward pass is affected uniformly across all query points, or local conditioning, where the modifications depend on
+
+
+Figure 7: The structure of a conditioned neural field with both global and local conditioning.
+
+Global Conditioning. Global conditioning in a neural field refers to modifying the forward pass only by the input $u$ and in a uniform manner over the entire query domain. This can be achieved through concatenation, where a global latent code is appended to the query vector and passed together through an MLP (Chen & Zhang, 2019; Liu et al., 2021a; Jang & Agapito, 2021). Alternatively, a hypernetwork could accept the auxiliary input and determine the neural field's parameter values based on this input (Ha et al., 2017; Rebain et al., 2022). However, modifying every parameter of the base field for different auxiliary inputs can be computationally expensive. For example, feature-wise Linear Modulation (FiLM) (Perez et al., 2018), which originates from conditional batch normalization (De Vries et al., 2017), has been proposed to modify only the sine activation function parameters in a SIREN network (Sitzmann et al., 2020). This technique has been used for global conditioning in methods such as $\pi$ -GAN (Chan et al., 2021).
+
+Local Conditioning. Local conditioning occurs when the latent code $z$ , which modifies the base field's parameters, is a function of the input query $y$ , i.e., $z = g(y)$ . This results in query-dependent field parameters that can vary across the query domain. A common approach to generate local latent codes is to process the image or scene with a convolutional network and extract features from activations with receptive fields containing the query point. This can be done using 2D convolutions of projected 3D scenes (Xu et al., 2019; Yu et al., 2021; Trevithick & Yang, 2021) or 3D convolutions (Peng et al., 2020; Liu et al., 2020; Chibane et al., 2020). Muller et al. (Muller et al., 2022) learn features directly on multiresolution grid vertices and create local features via nearest grid point interpolation for each grid. Chan et al. (Chan et al., 2022) create features along three 2D planes and interpolate features from projections onto these planes. DeVries et al. (DeVries et al., 2021) learn latent codes over patches on a 2D "floorplan" of a scene. Other methods divide the query domain into patches or voxels and learn a latent code $z$ for each patch or voxel (Chabra et al., 2020; Tretschk et al., 2020; Chen et al., 2022).
+
+# C NEURAL OPERATORS AS CONDITIONED NEURAL FIELDS
+
+Here we demonstrate that many popular operator learning architectures are in fact neural fields with local and/or global conditioning. While connections between architectures such as the DeepONet and the Fourier Neural Operator have been described previously (Kovachki et al., 2021), they are typically formulated under certain architecture choices which allow these architectures to approximate one another. In contrast, here we show that, by viewing these architectures as conditioned neural fields, they are explicitly related through their respective choices of conditioning mechanisms and base fields.
+
+# C.1 ENCODER-DECODER NEURAL OPERATORS
+
+A large class of operator learning architectures can be described as encoder-decoder architectures according to the following construction. To learn an operator $\mathcal{G}:\mathcal{X}\to \mathcal{Y}$ , an input function $u\in \mathcal{X}$ are first mapped to a finite dimensional latent representation through the encoding map $\mathcal{E}:\mathcal{X}\rightarrow \mathbb{R}^n$ . This latent representation is then mapped to a callable function through a decoding map $\mathcal{D}:\mathbb{R}^n\to \mathcal{V}$ . The composition of these two maps gives the architecture of the operator approximation scheme, $\mathcal{G} = \mathcal{D}\circ \mathcal{E}$ . The class of encoder-decoder architectures includes the DeepONet (Lu et al., 2021), the PCA-based architecture of (Bhattacharya et al., 2021), and NoMaD (Seidman et al., 2022).
+
+These encoder-decoder architectures can be seen as neural fields with a global conditioning mechanism by viewing the role of the decoder as an operator which performs the conditioning of a base field, with a latent code derived from a parameterized encoder, $z = \mathcal{E}_{\phi}(u)$ .
+
+DeepONet. For example, in a DeepONet, the base field is a neural network $t_{\theta}(y)$ (trunk network) appended with a last linear layer, and the decoder map conditions the weights of this last layer via the output of the encoding map $\mathcal{E}_{\phi}(u)$ (branch network); see Figure 8(a) for a visual illustration. In other words, the decoder map is a weighted linear combination of $n$ basis elements $t_{\theta}(y)$ , where the weights are modulated by a global encoding of the input function $\mathcal{E}_{\phi}(u)$ , yielding outputs of the form $s(y) = \langle \mathcal{E}_{\phi}(u), t_{\theta}(y) \rangle$ . The PCA-based architecture of (Bhattacharya et al., 2021) can be viewed analogously using as basis elements the leading $n$ eigenfunctions of the empirical covariance operator computed over the output functions in the training set.
+
+NoMaD. Seidman et al. (Seidman et al., 2022) demonstrated how encoder-decoder architectures can employ nonlinear decoders to learn low-dimensional manifolds in an ambient function space. These so-called NoMaD architectures typically perform their conditioning by concatenating the input function encoding with the query input, i.e., $s(y) = f_{\theta}(y,\mathcal{E}_{\phi}(u))$ ; see Figure 8(b) for an illustration.
+
+# C.2 INTEGRAL KERNEL NEURAL OPERATORS
+
+Integral Kernel Neural Operators form another general class of neural operators that learn mappings between function spaces by approximating the integral kernel of an operator using neural networks. They were introduced as a generalization of the Neural Operator framework proposed by Li et al. (Li et al., 2020). The key idea behind here is to represent the operator $\mathcal{G}:\mathcal{X}\to \mathcal{Y}$ as an integral kernel, $\mathcal{G}(u)(y) = \int_{\Omega}\kappa (x,y,u(x))dx$ , where $\kappa$ is a kernel function. In practice, the kernel function $\kappa$ is parameterized by a neural network, and the integral is then approximated using a quadrature rule, such as Monte Carlo integration, Gaussian quadrature, or via spectral convolution in the frequency domain.
+
+Graph Neural Operator (GNO). A single layer of the GNO (Li et al., 2020) is given by
+
+$$
+s (y) = \sigma \left(W u (y) + \frac {1}{| N (y) |} \sum_ {x \in N (y)} \kappa_ {\phi} (x, y, u (x)) u (x)\right), \tag {10}
+$$
+
+where $W \in \mathbb{R}^{d_u \times d_s}$ is a trainable weight matrix, and $\kappa_{\phi}(\cdot)$ is a local message passing kernel parameterized by $\phi$ (Li et al., 2020). As illustrated in Figure 8(c), the GNO layer is a conditioned neural field with local and global conditioning on the input function $u$ . The base field uses a fixed positional encoding $\gamma(y)$ that maps query coordinates $y$ to input function values at neighboring nodes $x \in N(y)$ , i.e., $\gamma(y) = u(x) / |N(y)|$ , followed by a linear layer. The encoding width equals the maximum number of neighboring nodes, with zeros filling tailing entries for queries with fewer neighbors. The GNO layer is conditioned globally via the parameterized kernel $\kappa_{\phi}(\cdot)$ modulating the linear layer weights, and locally via a position-dependent bias term $Wu(y)$ added as a skip connection. The layer outputs $s(y)$ are finally obtained by summing the linear layer outputs and the skip connection, then applying a nonlinear activation function $\sigma$ .
+
+Fourier Neural Operator (FNO). The FNO introduced a computationally efficient approach for performing global message passing in GNO layers assuming a stationary kernel $\kappa_{\phi}(\cdot)$ (Li et al., 2021; Bruna et al., 2014). Leveraging the Fourier transform, a single layer of FNO (Li et al., 2021) is given
+
+
+Figure 8: Viewing common neural operators as conditioned neural fields. Base field and conditioning mechanisms for: (a) DeepONet; (b) NoMaD; (c) the GNO layer; (d) the FNO layer.
+
+by
+
+$$
+s (y) = \sigma \left(W u (y) + \mathcal {F} _ {n} ^ {- 1} \left(K \mathcal {F} _ {n} (u)\right) (y)\right), \tag {11}
+$$
+
+where $W \in \mathbb{R}^{d_o \times d_o}$ and $K \in \mathbb{R}^{n \times n}$ are trainable weight matrices, $\mathcal{F}_n: L^2 \to \mathbb{C}^n$ is the Fourier transform truncated to the first $n$ modes, and $\mathcal{F}_n^{-1}: \mathbb{C}^n \to L^2$ is the left inverse of this operator. We show that the FNO layer can be viewed as a conditioned neural field employing both local and global conditioning on the input function $u$ . Without loss of generality, we demonstrate this for a one-dimensional query domain $y \in \mathbb{R}$ . To this end, note that the convolutional part of the FNO layer (equation 11) can be re-written as (see Appendix D for a derivation)
+
+$$
+\mathcal {F} _ {n} ^ {- 1} \left(K \mathcal {F} _ {n} (u)\right) (y) = \sum_ {j = 1} ^ {n} \Re \left(K \hat {u}\right) _ {j} \cos \left(2 \pi \langle k _ {j}, y \rangle\right) - \sum_ {j = 1} ^ {n} \Im \left(K \hat {u}\right) _ {j} \sin \left(2 \pi \langle k _ {j}, y \rangle\right), \tag {12}
+$$
+
+where $\hat{u} = \mathcal{F}_n u$ denotes the truncated Fourier transform of $u$ , and $\Re(z)$ and $\Im(z)$ denote the real and imaginary parts of a complex vector $z \in \mathbb{C}^n$ . We may interpret this transformation of $u(y)$ as a linear transformation (which depends on $\hat{u}$ ) acting on the positional encoding,
+
+$$
+\gamma (y) = \left[ \cos \left(2 \pi \langle k _ {1}, y \rangle\right), \sin \left(2 \pi \langle k _ {1}, y \rangle\right), \dots , \cos \left(2 \pi \langle k _ {n}, y \rangle\right), \sin \left(2 \pi \langle k _ {n}, y \rangle\right) \right] ^ {T}. \tag {13}
+$$
+
+The resulting expression (equation 12) is then acted on with a position dependant bias term $W u(y)$ , followed by a pointwise nonlinearity $\sigma$ . In this manner, we see that an FNO layer is a neural field with a fixed positional encoding (first $n$ Fourier features), a global conditioning of the weights by the Fourier transform of $u$ , and a local conditioning acting as a bias term by $W u(y)$ ; see Figure 8(d) for an illustration. This neural field interpretation also suggests an alternative way for implementing FNO layers by explicitly using equation 12 to compute the inverse Fourier transform, thereby allowing them to be evaluated at arbitrary query points instead of a fixed regular grid.
+
+Extending to other neural operators. In practice, GNO and FNO layers are stacked to form deeper architectures with a compositional structure. These can also be interpreted as conditioned neural fields, where the base field corresponds to the last GNO or FNO layer, while all previous layers are absorbed into the definition of the conditioning mechanism. Analogously, one can examine a broader collection of models that fall under the class of Integral Kernel Neural Operators, such as (Gupta et al., 2021; Tripura & Chakraborty, 2022; Cao et al., 2023; Fanaskov & Oseledets, 2023; Liu-Schiaffini et al., 2024).
+
+# D THE FNO LAYER AS A CONDITIONED NEURAL FIELD
+
+Proposition D.1. Suppose that a single layer of the Fourier Neural Operator (FNO) (Li et al., 2021) is given by
+
+$$
+s (y) = \sigma \left(W u (y) + \mathcal {F} _ {n} ^ {- 1} \left(K \mathcal {F} _ {n} (u)\right) (y)\right). \tag {14}
+$$
+
+Then the integral kernel term can be expressed as
+
+$$
+\mathcal {F} _ {n} ^ {- 1} \left(K \mathcal {F} _ {n} (u)\right) (y) = \sum_ {j = 1} ^ {n} \Re \left(K \hat {u}\right) _ {j} \cos \left(2 \pi \langle k _ {j}, y \rangle\right) - \sum_ {j = 1} ^ {n} \Im \left(K \hat {u}\right) _ {j} \sin \left(2 \pi \langle k _ {j}, y \rangle\right), \tag {15}
+$$
+
+Proof. Recall that the map $\mathcal{F}_n:L^2\to \mathbb{C}^n$ is the Fourier transform truncated to the first $n$ modes and $\mathcal{F}^{-1}:\mathbb{C}^n\rightarrow L^2$ is the left inverse of this operator,
+
+$$
+\mathcal {F} _ {n} ^ {- 1} (z) (y) = \sum_ {j = 1} ^ {n} z _ {j} e ^ {2 \pi i \langle k _ {j}, y \rangle}. \tag {16}
+$$
+
+Recall Euler's formula,
+
+$$
+e ^ {2 \pi i \langle k, y \rangle} = \cos (2 \pi \langle k, y \rangle) + i \sin (2 \pi \langle k, y \rangle). \tag {17}
+$$
+
+When the (complex) Fourier coefficients $z_{1},\ldots ,z_{n}$ come from a real valued signal, the imaginary components in the reconstruction equation 16 cancel and we are left with only real values. In this case, if we decompose each $z_{j}$ into real and imaginary parts, $z_{j} = \alpha_{j} + i\beta_{j}$ , then using equation 17 we rewrite equation 16 as
+
+$$
+\mathcal {F} _ {n} ^ {- 1} (z) (y) = \sum_ {j = 1} ^ {n} \alpha_ {j} \cos \left(2 \pi \langle k _ {j}, y \rangle\right) - \sum_ {j = 1} ^ {n} \beta_ {j} \sin \left(2 \pi \langle k _ {j}, y \rangle\right). \tag {18}
+$$
+
+This allows us to view the convolutional part of the FNO layer equation 11 as
+
+$$
+\mathcal {F} _ {n} ^ {- 1} \left(K \mathcal {F} _ {n} (u)\right) (y) = \sum_ {j = 1} ^ {n} \Re (K \hat {u}) _ {j} \cos (2 \pi \langle k _ {j}, y \rangle) - \sum_ {j = 1} ^ {n} \Im (K \hat {u}) _ {j} \sin (2 \pi \langle k _ {j}, y \rangle), \tag {19}
+$$
+
+where $\hat{u} = \mathcal{F}_n u$ denotes the truncated Fourier transform of $u$ , and $\Re(z)$ and $\Im(z)$ denote the real and imaginary parts of a complex vector $z \in \mathbb{C}^n$ .
+
+
+
+# E THEORETICAL INSIGHTS ON COORDINATES EMBEDDINGS
+
+Without loss of generality, we consider an MLP with scalar inputs and outputs. Specifically, let $x \in \mathbb{R}$ be the input coordinate, $g^{(0)}(x) = x$ and $d_0 = d_{L + 1} = 1$ . An MLP $f_{\theta}(x)$ is recursively defined as follows
+
+$$
+\mathbf {f} _ {\theta} ^ {(l)} (x) = \mathbf {W} ^ {(l)} \cdot \mathbf {g} ^ {(l - 1)} (x) + \mathbf {b} ^ {(l)}, \quad \mathbf {g} ^ {(l)} (x) = \sigma \left(\mathbf {f} _ {\theta} ^ {(l)} (x)\right), \quad l = 1, 2, \dots , L, \tag {20}
+$$
+
+with a final linear layer defined by
+
+$$
+f _ {\theta} (x) = \mathbf {W} ^ {(L + 1)} \cdot \mathbf {g} ^ {(L)} (x) + \mathbf {b} ^ {(L + 1)}, \tag {21}
+$$
+
+where $\mathbf{W}^{(l)}\in \mathbb{R}^{d_l\times d_{l - 1}}$ is the weight matrix in $l$ -th layer and $\sigma$ is an element-wise activation function. Here, $\theta = \left(\mathbf{W}^{(1)},\mathbf{b}^{(1)},\dots ,\mathbf{W}^{(L + 1)},\mathbf{b}^{(L + 1)}\right)$ represents all trainable parameters of the network. In particular, we suppose that the network is equipped with Tanh activation functions and all weight matrices are initialized by the Glorot initialization scheme (Glorot & Bengio, 2010), i.e., $\mathbf{W}^{(l)}\sim \mathcal{N}(0,\frac{2}{d_l + d_{l - 1}})$ for $l = 1,2,\ldots ,L + 1$ . Moreover, all bias parameters are initialized to zeros.
+
+Definition E.1. A function $f: \mathbb{R}^n \to \mathbb{R}^m$ is called Lipschitz continuous if there exists a constant $L$ such that
+
+$$
+\left\| f (x) - f (y) \right\| _ {2} \leq L \| x - y \| _ {2}, \quad \forall x, y \in \mathbb {R} ^ {n}. \tag {22}
+$$
+
+The smallest $L$ for which the previous inequality is true is called the Lipschitz constant of $f$ and will be denoted $\operatorname{Lip}(f)$ .
+
+Theorem E.2. ((Federer, 2014), Theorem 3.1.6] If $f: \mathbb{R}^n \to \mathbb{R}^m$ is a locally Lipschitz continuous function, then $f$ is differentiable almost everywhere. Moreover, if $f$ is Lipschitz continuous, then
+
+$$
+L i p (f) = \sup _ {x \in \mathbb {R} ^ {n}} \| \mathrm {D} _ {x} f \| _ {2}, \tag {23}
+$$
+
+where $\| M\| _2 = \sup_{\{x:\| x\| = 1\}}\| Mx\| _2$ is the operator norm of the matrix $M\in \mathbb{R}^{m\times n}$ .
+
+In particular, if $f$ is real valued (i.e. $m = 1$ ), its Lipschitz constant is the maximum norm of its gradient $Lip(f) = \sup_x \| \nabla f(x) \|_2$ on its domain set.
+
+By Theorem 1 and the chain rule, the Lipschitz constant of MLPs have an explicit formula (Virmaux & Scaman, 2018; Latorre et al., 2020)
+
+$$
+L i p \left(f _ {\theta}\right) = \sup _ {x \in \mathbb {R} ^ {n}} \left\| \prod_ {i = L + 1} ^ {2} \left(\mathbf {W} ^ {(i)} \cdot \operatorname {d i a g} \left(\dot {\sigma} \left(\mathbf {f} _ {\theta} ^ {(i - 1)} (x)\right)\right)\right) \cdot \mathbf {W} ^ {(1)} \right\| _ {2}. \tag {24}
+$$
+
+In Eq. equation 24, the diagonal matrices $\mathrm{diag}\left(\dot{\sigma}\big(\mathbf{f}_{\theta}^{(i - 1)}(x)\big)\right)$ are difficult to evaluate, as they may depend on the input value $x$ and previous layers. Fortunately, most major activation functions are 1-Lipschitz. More specifically, these activation functions have a derivative $\dot{\sigma} (\cdot)\in [0,1]$ . Hence, we may replace the supremum on the input vector $x$ by a supremum over all possible values:
+
+$$
+\begin{array}{l} L i p \left(f _ {\theta}\right) \leq \sup _ {\mathbf {z} ^ {(i - 1)} \in [ 0, 1 ] ^ {n}} \left\| \prod_ {i = L + 1} ^ {2} \left(\mathbf {W} ^ {(i)} \cdot \operatorname {d i a g} \left(\mathbf {z} ^ {(i - 1)}\right)\right) \cdot \mathbf {W} ^ {(1)} \right\| _ {2} (25) \\ \leq \prod_ {i = 1} ^ {L + 1} \left\| \mathbf {W} ^ {(i)} \right\| _ {2}. (26) \\ \end{array}
+$$
+
+From the above derivation, we immediately obtain that the Lipschitz constant of a MLP is inherently tied to the weight matrices of its hidden layers. MLPs are known to suffer from spectral bias, struggling to learn high-frequency functions efficiently. One reasonable explanation is that $Lip(f)$ is bounded by the product of its parameter norms, which can only increase gradually during training by gradient descent. Consequently, higher frequency components of the target function are learned later in the optimization process (Rahaman et al., 2019). Random Fourier features (Tancik et al., 2020) have been proposed as a potential solution to this spectral bias issue. In the following theorem, we demonstrate that both random Fourier features and our proposed position embedding can substantially increase the network's Lipschitz constant at initialization. This enhancement enables more efficient learning of complex, fine-scale signals from the early stages of training.
+
+Theorem E.3. Given the definition of MLP in equation 20 and equation 21, the Lipschitz constant of the following coordinates embeddings can be bounded as follows
+
+(a) For conventional MLPs, the coordinating embedding is trivial and can be viewed as the first linear layer $\phi_1(x) = \mathbf{W}x + b$ , where $\mathbf{W} \in \mathbb{R}^d$ , $b \in \mathbb{R}$ , and $d$ is the width of the network. Each element of $\mathbf{W}$ is independently sampled from $\mathcal{N}(0, \frac{1}{d})$ . The expected Lipschitz constant of $\phi_1$ satisfies
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {1}\right) = \frac {\sqrt {2}}{\sqrt {d}} \frac {\Gamma \left(\left(d + 1\right) / 2\right)}{\Gamma (d / 2)} \approx 1 - \frac {1}{2 d}. \tag {27}
+$$
+
+(b) The coordinate embedding of random Fourier features is given by $\phi_2(x) = \begin{bmatrix} \cos (\mathbf{W}x) \\ \sin (\mathbf{W}x) \end{bmatrix}$ , where $\mathbf{W} \in \mathbb{R}^{d/2}$ and each element of $\mathbf{W}$ is independently sampled from $\mathcal{N}(0, s^2)$ , with $s > 0$ being a hyperparameter. The expected Lipschitz constant of $\phi_2$ satisfies
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {2}\right) = 2 s \cdot \frac {\Gamma \left(\frac {d / 2 + 1}{2}\right)}{\Gamma (d / 4)} \approx s \sqrt {d} \left(1 - \frac {1}{8 d}\right). \tag {28}
+$$
+
+(c) The proposed coordinate embedding is defined as:
+
+$$
+\phi_ {\beta} (x) = \sum_ {i = 1} ^ {n} \omega_ {i} (x) \mathbf {f} _ {i} = \sum_ {i = 1} ^ {n} e ^ {- \beta \left(x - x _ {i}\right) ^ {2}} \mathbf {f} _ {i}, \tag {29}
+$$
+
+where $\{x_{i}\}_{i = 1}^{n}$ is a uniform grid in [0, 1], and $\mathbf{f}_i\in \mathbb{R}^h$ are bounded latent features independent of coordinates, satisfying $\| \mathbf{f}_i\| \leq M$ for some $m,M > 0$ . Let $h$ denote the spacing of the grid, i.e., $h = x_{i + 1} - x_{i}$ for any $i\in 0,1,\ldots ,n - 1$ . For sufficiently large $\beta >0$ such that $\frac{1}{\sqrt{2\beta}} < h$ , the Lipschitz constant of $\phi_{\beta}$ is bounded as:
+
+$$
+M \sqrt {2 \beta} e ^ {- \frac {1}{2}} \lesssim \operatorname {L i p} \left(\phi_ {\beta}\right) \lesssim 2 M \sqrt {2 \beta} e ^ {- \frac {1}{2}}. \tag {30}
+$$
+
+Proof. (a) Let $\mathbf{W} = (W_{i})_{i = 1}^{d}$ . Then we have
+
+$$
+\operatorname {L i p} \left(\phi_ {1}\right) = \| \mathbf {W} \| _ {2} = \sqrt {\sum_ {i = 1} ^ {d} W _ {i} ^ {2}} = \sqrt {\sum_ {i = 1} ^ {d} \frac {1}{d} Z _ {i} ^ {2}} = \frac {1}{\sqrt {d}} \chi (d). \tag {31}
+$$
+
+Since $\mathbb{E}\chi (d) = \sqrt{2}\frac{\Gamma((d + 1) / 2)}{\Gamma(d / 2)}$
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {1}\right) = \frac {1}{\sqrt {d}} \mathbb {E} \chi (d) = \frac {\sqrt {2}}{\sqrt {d}} \frac {\Gamma \left(\left(d + 1\right) / 2\right)}{\Gamma \left(d / 2\right)}, \tag {32}
+$$
+
+where $\Gamma (\cdot)$ is the Gamma function.
+
+For large $d$ , this can be approximated by:
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {1}\right) \approx \frac {1}{\sqrt {d}} \sqrt {d} \left(1 - \frac {1}{4 d}\right) = 1 - \frac {1}{4 d}. \tag {33}
+$$
+
+(b) We observe that
+
+$$
+\operatorname {L i p} \left(\phi_ {2}\right) = \sup _ {x \in R} \| \phi_ {2} ^ {\prime} \| _ {2} = \left\| \left[ \begin{array}{c} \mathbf {W} \cos (\mathbf {W x}) \\ - \mathbf {W} \sin (\mathbf {W x}) \end{array} \right] \right\| _ {2} \leq \sqrt {2 \sum_ {i = 1} ^ {d / 2} W _ {i} ^ {2}} = \sqrt {2} \| \mathbf {W} \| _ {2}. \tag {34}
+$$
+
+Similar to the proof of (a), we have
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {2}\right) \leq s \sqrt {2} \mathbb {E} \chi (d / 2) = 2 s \cdot \frac {\Gamma \left( \right.\frac {d}{2} + 1}{\Gamma \left(\frac {d}{4}\right)}. \tag {35}
+$$
+
+For large $d$ , this can be approximated by:
+
+$$
+\mathbb {E} \operatorname {L i p} \left(\phi_ {2}\right) \approx s \sqrt {2} \sqrt {\frac {d}{2}} \left(1 - \frac {1}{2 d}\right) = s \sqrt {d} \left(1 - \frac {1}{2 d}\right). \tag {36}
+$$
+
+(c) To estimate the Lipschitz constant of $\phi$ , we apply Theorem E.2, which reduces the problem to estimating its first-order derivative:
+
+$$
+\phi_ {\beta} ^ {\prime} (x) = \sum_ {i = 1} ^ {n} \omega_ {i} ^ {\prime} (x) \mathbf {f} _ {i}. \tag {37}
+$$
+
+For any given $x$ , there exists a unique $k$ such that $x \in [x_k, x_{k+1}]$ . We can then decompose $\phi'(x)$ as follows:
+
+$$
+\phi_ {\beta} ^ {\prime} (x) = \omega_ {k} ^ {\prime} (x) \mathbf {f} _ {k} + \omega_ {k + 1} ^ {\prime} (x) \mathbf {f} _ {k + 1} + \sum_ {i \neq k, k + 1} \omega_ {i} ^ {\prime} (x) \mathbf {f} _ {i} := I _ {1} + I _ {2} + I _ {3}. \tag {38}
+$$
+
+Let us first estimate $I_1, I_2$ . Since all $\mathbf{f}_i$ are bounded, we consider $g(x) = e^{-\beta x^2}$ , as each $\omega_i(x)$ is a translation of $g$ by $x_i$ . By differentiation, we obtain:
+
+$$
+g ^ {\prime} (x) = - 2 \beta x e ^ {- \beta x ^ {2}} \tag {39}
+$$
+
+$$
+g ^ {\prime \prime} (x) = \left(4 \beta^ {2} x ^ {2} - 2 \beta x\right) e ^ {- \beta x ^ {2}}. \tag {40}
+$$
+
+Setting $g''(x) = 0$ yields $x = \pm \frac{1}{\sqrt{2\beta}}$ . Consequently, $g'(x)$ achieves its maximum value of $\sqrt{2\beta} e^{-\frac{1}{2}}$ at $x = -\frac{1}{\sqrt{2\beta}}$ and its minimum value of $-\sqrt{2\beta} e^{-\frac{1}{2}}$ at $x = \frac{1}{\sqrt{2\beta}}$ . Therefore, we can bound $\omega_i'(x)$ as follows:
+
+$$
+- \sqrt {2 \beta} e ^ {- \frac {1}{2}} \leq \omega_ {i} ^ {\prime} (x) \leq \sqrt {2 \beta} e ^ {- \frac {1}{2}}. \tag {41}
+$$
+
+To estimate $I_3$ , recall that we assume $\frac{1}{\sqrt{2\beta}} < h$ . For $i \neq k, k + 1$ and fixed $x$ , we have $mh \leq |x - x_i| \leq (m + 1)h$ for a unique integer $m$ , and $\omega_i'(x)$ decreases as $x$ moves away from $x_i$ . Then:
+
+$$
+\left| \omega_ {i} ^ {\prime} (x) \right| \leq 2 \beta m h \cdot e ^ {- \beta m ^ {2} h ^ {2}}. \tag {42}
+$$
+
+Therefore, we have
+
+$$
+\sum_ {i \neq k, k + 1} \left| \omega_ {i} ^ {\prime} (x) \right| \leq 2 \sum_ {m = 1} ^ {n} 2 \beta m h \cdot e ^ {- \beta m ^ {2} h ^ {2}} \tag {43}
+$$
+
+$$
+\leq 2 \sum_ {m = 1} ^ {n} \int_ {m - 1} ^ {m} 2 \beta h x \cdot e ^ {- \beta h ^ {2} x ^ {2}} d x \tag {44}
+$$
+
+$$
+= 2 \int_ {0} ^ {n - 1} 2 \beta h x \cdot e ^ {- \beta h ^ {2} x ^ {2}} d x \tag {45}
+$$
+
+$$
+= \frac {2}{h} \left[ - e ^ {- \beta h x ^ {2}} \Big | _ {0} ^ {n - 1} \right] \tag {46}
+$$
+
+$$
+= \frac {2 \left(1 - e ^ {- \beta h ^ {2} (n - 1) ^ {2}}\right)}{h} \tag {47}
+$$
+
+$$
+\leq \frac {2}{h}. \tag {48}
+$$
+
+Since $\| \mathbf{f}_i\| \leq M$
+
+$$
+\left| \left| \phi_ {\beta} ^ {\prime} (x) \right| \right| _ {2} \leq M \left(\left| w _ {k} ^ {\prime} (x) \right| + \left| w _ {k + 1} ^ {\prime} (x) \right| + \sum_ {i \neq k, k + 1} \left| \omega_ {i} ^ {\prime} (x) \right|\right) \tag {49}
+$$
+
+$$
+\leq M \left(2 \sqrt {2 \beta} e ^ {- \frac {1}{2}} + \frac {2}{h}\right). \tag {50}
+$$
+
+Therefore, we conclude that
+
+$$
+\operatorname {L i p} \left(\phi_ {\beta}\right) \lesssim 2 M \sqrt {2 \beta} e ^ {- \frac {1}{2}}. \tag {51}
+$$
+
+To obtain a lower bound for $\mathrm{Lip}(\phi_{\beta})$ , we proceed as follows: Without loss of generality, assume $\| \mathbf{f}_2\| _2 = M$ . Let $x^{*} = h - \frac{1}{\sqrt{2}\beta}$ , where $|\omega_2^{\prime}|$ achieves its maximum. Then
+
+$$
+\left\| \phi_ {\beta} ^ {\prime} \left(x ^ {*}\right) \right\| _ {2} \geq \left\| \omega_ {2} ^ {\prime} \left(x ^ {*}\right) \mathbf {f} _ {2} \right\| _ {2} - \left\| \omega_ {1} ^ {\prime} \left(x ^ {*}\right) \mathbf {f} _ {1} \right\| _ {2} - \sum_ {i \geq 3} \left\| \omega_ {i} ^ {\prime} \left(x ^ {*}\right) \mathbf {f} _ {i} \right\| _ {2} = J _ {1} - J _ {2} - J _ {3}. \tag {52}
+$$
+
+We can bound each term as follows:
+
+$$
+J _ {1} = M \sqrt {2 \beta} e ^ {- \frac {1}{2}}, \tag {53}
+$$
+
+and
+
+$$
+J _ {2} \leq M (2 \beta) \left(h - \frac {1}{\sqrt {2 \beta}}\right) e ^ {- \beta \left(h - \frac {1}{\sqrt {2 \beta}}\right) ^ {2}}. \tag {54}
+$$
+
+Note that $J_{2}$ goes to 0 as $\beta$ goes to infinity. So $J_{2}$ is bounded with respect to $\beta$ . For $J_{3}$ , we similarly estimate:
+
+$$
+J _ {3} \leq M \sum_ {m = 1} ^ {n} \beta m h \cdot e ^ {- \beta m ^ {2} h ^ {2}} \leq \frac {\left(1 - e ^ {- \beta h ^ {2} (n - 1) ^ {2}}\right)}{h} \leq \frac {1}{h}. \tag {55}
+$$
+
+Thus, combining these estimates, we conclude that
+
+$$
+\operatorname {L i p} \left(\phi_ {\beta}\right) \gtrsim M \sqrt {2 \beta} e ^ {- \frac {1}{2}}. \tag {56}
+$$
+
+
+
+Our theorem yields key insights into the Lipschitz constants of various coordinate embedding methods. For trivial coordinate embeddings (linear layer MLP), the Lipschitz constant is approximately 1.
+
+This has no impact on the network's global Lipschitz constant, resulting in the network remaining susceptible to spectral bias.
+
+In the case of random Fourier features, the Lipschitz constant can be improved through two main approaches. First, by increasing the standard deviation of the Gaussian used for sampling the frequency matrix. Second, by increasing the network width. This observation implies a trade-off between network width and the frequencies used in the Fourier features.
+
+For our proposed coordinate embeddings, the Lipschitz constant primarily depends on the parameter $\beta$ in the interpolation process. This dependence on a single parameter potentially offers more straightforward control over the Lipschitz constant compared to Fourier features.
+
+These findings significantly impact neural field design and optimization using different coordinate embedding techniques. They provide a quantitative basis for comparing embedding methods' capabilities, particularly in addressing the spectral bias inherent in standard MLPs. The straightforward control of the Lipschitz constant in our proposed method (via $\beta$ ) may offer advantages in model tuning and optimization.
+
+# F EXPERIMENTAL DETAILS
+
+# F.1 TRAINING AND EVALUATION
+
+Training recipe. We use a unified training recipe for all CViT experiments. We employ AdamW optimizer (Kingma & Ba, 2014; Loshchilov & Hutter, 2017) with a weight decay $10^{-5}$ . Our learning rate schedule includes an initial linear warm-up phase of 5,000 steps, starting from zero and gradually increasing to $10^{-3}$ , followed by an exponential decay at a rate of 0.9 for every 5,000 steps. The loss function is a one-step mean squared error (MSE) between the model predictions and the corresponding targets at the next time-step, evaluated at randomly sampled query coordinates:
+
+$$
+\mathrm {M S E} = \frac {1}{B} \frac {1}{Q} \frac {1}{D} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {Q} \sum_ {k = 1} ^ {D} \left| \hat {s} _ {i} ^ {(k)} (\mathbf {y} _ {\mathbf {j}}) - s _ {i} ^ {(k)} (\mathbf {y} _ {\mathbf {j}}) \right| _ {2} ^ {2}, \tag {57}
+$$
+
+where $s_i^{(k)}(\mathbf{y_j})$ denotes the $k$ -th variable of the $i$ -th sample in the training dataset, evaluated at a query coordinate $\mathbf{y}_j$ , and $\hat{s}$ denotes the corresponding model prediction. It is worth noting that our objective function is a one-step loss, which differs significantly from the rollout loss used in training DPOTs. All models are trained for $2 \times 10^5$ iterations with a batch size $B = 64$ . Within each batch, we randomly sample $Q = 1, 024$ query coordinates from the grid and corresponding output labels.
+
+Training instabilities We observe certain training instabilities in CViT models, where the loss function occasionally blows up, causing the model to collapse. To stabilize training, we clip all gradients at a maximum norm of 1. If a loss blowup is detected, we restart training from the last saved checkpoint.
+
+Evaluation. After training, we obtain the predicted trajectory by performing an auto-regressive rollout on the test dataset. We evaluate model accuracy using the relative $L^2$ norm, as commonly used in Li et al.(Li et al., 2021):
+
+$$
+\text {R e l .} L ^ {2} = \frac {1}{N _ {\mathrm {t e s t}}} \frac {1}{D} \sum_ {i = 1} ^ {N _ {\mathrm {t e s t}}} \sum_ {k = 1} ^ {D} \frac {\left\| \hat {s} _ {i} ^ {(k)} - s _ {i} ^ {(k)} \right\| _ {2}}{\left\| s _ {i} ^ {(k)} \right\| _ {2}}, \tag {58}
+$$
+
+where the norm is computed over the rollout prediction at all grid points, averaged over each variable of interest.
+
+# F.2 MODEL DETAILS
+
+CViT. For the 1D advection equation, we create a tiny version of CViT to ensure the model size is comparable to other baselines. Specifically, we use a patch size of 4 to generate tokens. The encoder consists of 6 transformer layers with an embedding dimension of 256 and 16 attention heads. A single transformer decoder layer with 16 attention heads is used.
+
+For the shallow water equation, compressible and incompressible Navier-Stokes equations and diffusion reaction equations, the CViT configurations are detailed in Table 1. While we use a patch size of $8 \times 8$ by default, we use a smaller patch size of $4 \times 4$ when training CViT-L for the Navier-Stokes problem. We find that using a smaller patch size better captures the small-scale features in flow motion, leading to improved accuracy.
+
+DeepONet. For the DeepONet, the branch network (encoder) is an MLP with 4 hidden layers of 512 neurons each. The trunk-net (decoder) also employs an MLP with 4 hidden layers of 512 neurons.
+
+NoMaD. The encoder consists of 4 hidden layers with 512 neurons each, mapping the input to a latent representation of dimension 512. The decoder, also an MLP with 4 hidden layers of 512 neurons, takes the latent representation and maps it to the output function.
+
+Dilated ResNet. Following the comprehensive experiments and ablation studies in PDEArena (Gupta & Brandstetter, 2022), we adopt the optimal Dilated ResNet configuration reported in their work. This model has 128 channels and employs group normalization. It consists of four residual blocks, each comprising seven dilated CNN layers with dilation rates of [1, 2, 4, 8, 4, 2, 1].
+
+U-Nets. Based on comprehensive experiments and ablation studies in PDEArena (Gupta & Brandstetter, 2022), we select the two strongest U-Net variants reported in their work: U-Net $_{\text{att}}$ and U-F2Net. For both architectures, we use one embedding layer and one output layer with kernel sizes of $3 \times 3$ . Besides, we use 64 channels and a channel multipliers of $(1,2,2,4)$ and incorporate residual connections in each downsampling and upsampling block. Pre-normalization and pre-activations are applied, along with GELU activations. For U-Net $_{\text{att}}$ , attention mechanisms are used in the middle blocks after downsampling. For U-F2Net, we replace the lower blocks in both the downsampling and upsampling paths of the U-Net architecture with Fourier blocks. Each Fourier block consists of 2 FNO layers with modes 16 and residual connections.
+
+UNO. Following the comprehensive experiments and ablation studies in PDEArena (Gupta & Brandstetter, 2022), we adopt the optimal UNO of 128 channels.
+
+FNO. For the 1D advection equation, our FNO model employs 3 Fourier neural blocks, each with 256 channels and 12 Fourier modes. The output is projected back to a 256-dimensional space before passing through a linear layer that produces the solution over the defined grid.
+
+For the shallow water equation, we employ the best FNO model from comprehensive experiments and ablation studies in PDEArena (Gupta & Brandstetter, 2022). Specifically, we use the FNO consisting of 4 FNO layers, each with 128 channels and 32 modes. Additionally, we use two embedding layers and two output layers with kernel sizes of $1 \times 1$ , as suggested in Li et al. (Li et al., 2021). We use GeLU activation functions and no normalization scheme.
+
+For the Navier-Stokes equation, we follow the problem setup in DPOT (Hao et al., 2024), which differs from the setup in PDEArena (Gupta & Brandstetter, 2022). Therefore, we directly report the results from DPOT (Hao et al., 2024).
+
+FFNO / GK-T / OFormer / GNOT / DPOT / MPP. We directly report the results from DPOT (Hao et al., 2024). Detailed implementations can be found in their paper.
+
+# F.3 LINEAR ADVECTION EQUATION
+
+We consider the one-dimensional linear advection equation
+
+$$
+\frac {\partial u}{\partial t} + c \frac {\partial u}{\partial x} = 0, \qquad x \in [ 0, 1 ],
+$$
+
+with periodic boundary conditions $u(0,t) = u(1,t)$ given an initial condition $u(x,0) = u_0(x)$ with the advection velocity $c = 1$ . To generate discontinuous initial conditions, the initial condition $u_{0}$ is assumed to be
+
+$$
+u _ {0} = - 1 + 2 \mathbb {1} _ {\{u _ {0} \geq 0 \}},
+$$
+
+Table 5: Performance of neural operator architectures under the relative L2 and Total Variation metrics for the linear advection with discontinuous initial conditions benchmark.
+
+
Rel. L2 error (%, ↓)
Total Variation error (↓)
Model
# Params
Mean
Median
Worst-case
Mean
Median
Worst-case
FNO
4.98M
13.94
12.03
56.52
0.0406
0.0309
0.1910
DeepONet
2.20M
13.77
12.20
39.64
0.0572
0.0453
0.2300
NoMaD
2.21M
13.64
11.01
69.00
0.0326
0.0245
0.1732
CViT
3.03M
11.70
10.68
35.44
0.0334
0.0274
0.1516
+
+where $\tilde{u_0}$ a centered Gaussian,
+
+$$
+\widetilde {u _ {0}} \sim \mathcal {N} (0, C) \text {a n d ,} \mathrm {C} = (- \Delta + \tau^ {2}) ^ {- d}.
+$$
+
+Here $-\Delta$ denotes the Laplacian on $D$ subject to periodic conditions on the space of spatial mean zero functions. Moreover, $\tau$ denotes the inverse length scale of the random field and $d$ determines the regularity of $\widetilde{u_0}$ . For this example, we set $\tau = 3$ and $d = 2$ .
+
+Dataset. We make use of the datasets released by Hoop et al. (de Hoop et al., 2022). This dataset consists of 40,000 samples of discretized initial conditions on a grid of $N = 200$ points.
+
+Problem setup. We follow the problem setup by Hoop et al. (de Hoop et al., 2022). Our objective is to predict the solution profile at time $t = 0.5$ . We compare the CViT model's performance against several strong baseline neural operators: DeepONet (Lu et al., 2021), NoMaD (Seidman et al., 2022) and Fourier Neural Operators (Li et al., 2021). For the training and evaluation, we considered a split of 20,000 samples used for training, 10,000 for validation, and 10,000 for testing.
+
+Training. For all models, we use a batch size of 256 with a grid sampling size of 128, except for the FNO, which uses the full grid size of 200. The models are trained using the AdamW optimizer (Loshchilov & Hutter, 2017) with an exponential decay learning rate scheduler. The models are trained for 200,000 iterations, and the best model state is selected based on the validation set performance to avoid overfitting. The final performance is evaluated on the test set of 10,000 samples.
+
+Evaluation. Due to the discontinuous nature of the problem, the relative L2 norm may not properly reflect the performance of the models. Instead, a more suitable metric for this task is the total variation (Stein & Shakarchi, 2009), defined as
+
+$$
+T V (f, g) = \int_ {\Omega} | | \nabla f | - | \nabla g | | \mathrm {d x}.
+$$
+
+The total variation quantifies the integrated difference between the magnitudes of the gradients of the predicted solution and the ground truth, providing a better indicator of a model's ability to capture and preserve discontinuities in the solution.
+
+Table 5 presents a summary of our results. We notice that the CViT model achieves the lowest mean, median and worst-case relative $L^2$ errors, outperforming the other architectures on this metric. Furthermore, when considering the total variation metric, the CViT model exhibits competitive performance for the mean and median total variation values, and achieves the lowest prediction error the worst-case sample in the test dataset.
+
+# F.4 SHALLOW-WATER EQUATIONS
+
+Let $\mathbf{u}$ denote the velocity and $\eta$ interface height which conceptually represents pressure. We define $\zeta = \nabla \times \mathbf{u}$ and divergence $\mathcal{D} = \nabla \cdot \mathbf{u}$ . The vorticity formulation is given by:
+
+$$
+\frac {\partial \boldsymbol {\zeta}}{\partial t} + \nabla \cdot (\mathbf {u} (\boldsymbol {\zeta} + \boldsymbol {f})) = 0,
+$$
+
+$$
+\frac {\partial \mathcal {D}}{\partial t} - \nabla \times (\mathbf {u} (\zeta + f)) = - \nabla^ {2} \left(\frac {1}{2} (u ^ {2} + v ^ {2}) + g \eta\right),
+$$
+
+$$
+\frac {\partial \eta}{\partial t} + \nabla \cdot (\mathbf {u} h) = 0,
+$$
+
+subject to the periodic boundary conditions. Here $f$ is Coriolis parameter and $g = 9.81$ is the gravitational acceleration, and $h$ is the dynamic layer thickness.
+
+Data generation. The dataset is generated by PDEArena (Gupta & Brandstetter, 2022) using SpeedyWeather.jl on a regular grid with spatial resolution of $192 \times 96$ ( $h = 1.875^\circ$ , $\Delta y = 3.75^\circ$ ), and temporal resolution of $\Delta t = 48$ h. The resulting dataset contains 6,600 trajectories with a temporal spatial resolution $11 \times 96 \times 192$ .
+
+Problem setup. We follow the problem setup reported in PDEArena (Gupta & Brandstetter, 2022). Our goal is to learn the operator that maps the vorticity and pressure fields from the previous 2 two time-steps to the next time-step. All models are trained with 5,600 trajectories and evaluated on the remain 1,000 trajectories. We report the relative $L^2$ errors over 5-steps rollout predictions.
+
+Training. For training CViT models, please refer to section F.1. For training other baselines in Table 2, we follow the recommended training procedure and hyper-parameters presented in PDEArena (Gupta & Brandstetter, 2022) Specifically, we use the AdamW optimizer with a learning rate of $2 \times 10^{-4}$ and a weight decay of $10^{-5}$ . Training is conducted for 50 epochs, minimizing the summed mean squared error. We use cosine annealing as the learning rate scheduler (Loshchilov & Hutter, 2016) with a linear warm-up phase of 5 epochs. An effective batch size of 32 is used for training.
+
+Impact of Grid Resolution. In our experiments, we matched the resolution of the embedding grid to the dataset for convenience. However, our model's performance is not significantly affected as long as the embedding grid roughly matches the dataset resolution.
+
+To validate this, we use CViT-B as our backbone architecture, conduct experiments with three different grid resolutions: $95 \times 191$ , $97 \times 193$ , and $128 \times 200$ . We performed these experiments using the shallow water equation example under the same hyper-parameter settings. The resulting relative $L^2$ errors are summarized below:
+
+Table 6: Swallow Water equation: Relative $L^2$ error for different grid resolutions.
+
+
Grid Resolution
96 × 192
95 × 191
97 × 193
128 × 200
Rel. L² Error
1.563 × 10-2
1.572 × 10-2
1.568 × 10-2
1.562 × 10-2
+
+The results demonstrate negligible variation in error across different resolutions. This empirical evidence supports our claim that CViT's performance is robust to small variations in grid resolution, suggesting that precise matching between the embedding grid and dataset resolution is not critical for model efficacy.
+
+Impact of random Fourier feature frequencies. We conduct an ablation study to investigate the impact of the scaling parameter $s$ in random Fourier feature embeddings. Using CViT-B as our backbone architecture, we trained models with different values of $s$ on the SWE benchmark. As shown in Table 7, model accuracy improves with moderately large values of $s$ but deteriorates when $s$ becomes too large (e.g., $s = 16\pi$ ), reverting to performance levels similar to $s = 4\pi$ . Notably, our proposed grid-based embedding consistently outperforms the random Fourier feature approach across all tested values of $s$ .
+
+
+Figure 9: Shallow water benchmark. Ablation studies on the latent dimension of grid features and number of attention heads in decoder. Here we use CViT-B as our backbone architecture.
+
+
+
+Table 7: Shallow water benchmark. Ablation studies on the hyper-parameter $s$ of random Fourier features. Here we use CViT-B as the backbone.
+
+
Random Fourier Features
Grid-based embedding
s = 2π
s = 4π
s = 8π
s = 16π
β = 105
Rel. L2 error
4.94 × 10-2
4.16 × 10-2
3.25 × 10-2
4.08 × 10-2
2.69 × 10-2
+
+# F.5 INCOMPRESSIBLE NAVIER-STOKES EQUATION
+
+We consider the two-dimensional incompressible Navier-Stokes equations in the velocity-pressure formulation, coupled with a scalar field representing a transported particle concentration via the velocity field. The governing equations are given by:
+
+$$
+\frac {\partial c}{\partial t} + \mathbf {u} \cdot \nabla c = 0,
+$$
+
+$$
+\frac {\partial \mathbf {u}}{\partial t} + \mathbf {u} \cdot \nabla \mathbf {u} + \nabla p - \nu \nabla^ {2} \mathbf {u} = \mathbf {f},
+$$
+
+$$
+\nabla \cdot \mathbf {u} = 0,
+$$
+
+where $c$ is the scalar field, $\mathbf{u}$ is the velocity field, and and $\nu$ is the kinematic viscosity. In addition, the velocity field is affected through an external buoyancy force term $\mathbf{f}$ in the $y$ direction, represented as $\mathbf{f} = (0,f)^T$ .
+
+Data generation. The 2D Navier-Stokes data is generated by PDEArena (Gupta & Brandstetter, 2022), which is obtained on a grid with a spatial resolution of $128 \times 128$ ( $h = 0.25$ , $\Delta y = 0.25$ ) and a temporal resolution of $\Delta t = 1.5$ s. The simulation uses a viscosity parameter of $\nu = 0.01$ and a
+
+
+Figure 10: Shallow water benchmark. Representative CViT rollout prediction of the pressure field, and point-wise error against the ground truth.
+
+buoyancy factor of $(0,0.5)^T$ . The equation is solved on a closed domain with Dirichlet boundary conditions $(v = 0)$ for the velocity, and Neumann boundaries $\left(\frac{\partial s}{\partial x} = 0\right)$ for the scalar field. The simulation runs for $21\mathrm{~s}$ , sampling every $1.5\mathrm{~s}$ . Each trajectory contains scalar and vector fields at 14 different time frames, resulting in a dataset with 7,800 trajectories.
+
+Problem setup. We follow the problem setup reported in Hao et al. (Hao et al., 2024). We aim to learn the solution operator that maps the passive scalar and velocity fields from the previous 10 time-steps to the next time-step. The models are trained with 6,500 trajectories and tested on the remaining 1,300 trajectories. We report the resulting relative $L^2$ errors over 4-steps rollout predictions.
+
+Evaluation. We directly report the results as presented in DPOT (Hao et al., 2024). For comprehensive details on the training procedures, hyper-parameters, please refer to their original paper.
+
+Impact of Latent Queries in the Time Aggregation Layer. In our implementation, we use a single latent query in the Perceiver module. This query condenses information from $T$ time steps into a single time step representation, effectively reducing the length of spatial-temporal tokens and computational costs.
+
+To investigate the effect of this hyperparameter on model performance, we conduct an ablation study by training CViT-L model with a patch size of 16, varying the number of latent queries $(n)$ . As shown in Table 8, the results demonstrate that increasing the number of queries significantly enhances model performance, though it also increases the effective token length proportionally to the number of queries. This improvement likely stems from the fact that $n = 1$ discards too much useful information from the input trajectory during the time aggregation step, highlighting the potential for further optimization in this architecture.
+
+Table 8: Navier-Stokes benchmark. Relative $L^2$ error for CViT-L models trained with a patch size of 16 and varying numbers of latent queries. Increasing the number of latent queries significantly improves accuracy. Note that these results differ from Table 3, where the best performance is achieved with a patch size of 4.
+
+
# Latent queries
n = 1
n = 2
n = 4
n = 6
Rel. L2 error
6.56 %
4.32 %
3.81 %
3.18 %
+
+Analysis of cross-attention patterns. we analyze the attention patterns that emerge in CViT when trained on the Navier-Stokes equation. We examine both the encoder and decoder cross-attention mechanisms to understand how the model learns to process temporal and spatial information.
+
+The encoder's cross-attention mechanism is responsible for temporal aggregation. Figure 11 shows the averaged attention weights across different samples and attention heads, visualizing how the model attends to different timesteps in the input sequence. We observe that the attention weights systematically favor more recent timesteps, with the final timestep receiving notably higher attention. This temporal bias aligns with the physical intuition that recent states are more informative for predicting future dynamics while still maintaining some attention on earlier states for capturing longer-term dependencies.
+
+The decoder's cross-attention patterns reveal how the model processes spatial relationships. Figure 12 visualizes the attention weights for various query points in the spatial domain. A clear pattern emerges where attention weights decay with distance from the query point, indicating that the model has learned to focus primarily on locally relevant information. This locality-aware behavior is particularly evident in regions of high fluid activity, suggesting the model adapts its attention patterns based on the underlying physics.
+
+These attention patterns demonstrate that CViT learns physically meaningful representations through its cross-attention mechanisms. The encoder effectively prioritizes recent temporal information while the decoder captures spatially local dependencies, both of which are crucial for accurate fluid dynamics prediction.
+
+
+Figure 11: Incompressible Navier-Stokes benchmark (NS). Visualization of encoder cross-attention weights in CViT. It shows averaged attention weights across different samples and attention heads, where the x-axis represents input timesteps. The model learns to assign higher attention weights to more recent timesteps, particularly the final timestep.
+
+
+Figure 12: Incompressible Navier-Stokes benchmark (NS). Visualization of decoder cross-attention patterns in CViT. Spatial attention weights for selected query points (marked by red stars), showing how attention naturally decays with distance from each query location. The attention patterns demonstrate that the model has learned to focus on spatially proximate regions when learning fluid dynamics.
+
+
+Figure 13: Incompressible Navier-Stokes benchmark (NS). Representative CViT rollout prediction of the velocity field in $x$ direction, and point-wise error against the ground truth.
+
+
+Figure 14: Incompressible Navier-Stokes benchmark (NS). Representative CViT rollout prediction of the velocity field in $y$ direction, and point-wise error against the ground truth.
+
+# F.6 COMPRESSIBLE NAVIER-STOKES EQUATION
+
+The 2D compressible Navier-Stokes equations govern fluid flow with variable density:
+
+$$
+\partial_ {t} \rho + \nabla \cdot (\rho \mathbf {v}) = 0, \tag {59}
+$$
+
+$$
+\rho \left(\partial_ {t} \mathbf {v} + \mathbf {v} \cdot \nabla \mathbf {v}\right) = - \nabla p + \eta \triangle \mathbf {v} + (\zeta + \eta / 3) \nabla (\nabla \cdot \mathbf {v}), \tag {60}
+$$
+
+$$
+\partial_ {t} \left[ \epsilon + \frac {\rho v ^ {2}}{2} \right] + \nabla \cdot \left[ \left(\epsilon + p + \frac {\rho v ^ {2}}{2}\right) \mathbf {v} - \mathbf {v} \cdot \sigma^ {\prime} \right] = 0. \tag {61}
+$$
+
+Here, $\rho$ denotes mass density, $\mathbf{v}$ velocity, $p$ gas pressure, $\Gamma = 5 / 3$ , $\sigma^{\prime}$ is the viscous stress tensor, and $\epsilon$ internal energy (determined by the equation of state). The viscous stress tensor $\sigma^{\prime}$ incorporates both shear $(\eta)$ and bulk $(\zeta)$ viscosity coefficients. This system captures complex fluid dynamics phenomena, including shock wave dynamics, and finds applications in aerospace engineering and astrophysical fluid dynamics.
+
+Data generation. We use the dataset generated by PDEBench (Takamoto et al., 2022), with $M = 0.1, \zeta = \eta = 0.01$ , where $M = |v| / c_s$ is the Mach number, $c_s = \sqrt{\Gamma p / \rho}$ is the sound velocity.
+
+Problem setup. We follow the problem setup reported in Hao et al. (Hao et al., 2024). We aim to learn the solution operator that maps the activator and inhibitor fields from the previous time-steps to the next time-step. The models are trained with 9,000 trajectories and tested on the remaining 1,000 trajectories. We report the resulting relative $L^2$ errors over rollout predictions.
+
+Training. For training CViT models, please refer to section F.1. It is worth noting that for this specific task, we employ an initial learning rate of $5 \times 10^{-4}$ , different from the $10^{-3}$ used in other experiments.
+
+Evaluation. We directly report the results as presented in DPOT (Hao et al., 2024). For comprehensive details on the training procedures, hyper-parameters, please refer to their original paper.
+
+
+Figure 15: Compressible Navier-Stokes Benchmark. Representative CViT rollout prediction of the velocity field $u$ , and point-wise error against the ground truth.
+
+
+Figure 16: Compressible Navier-Stokes Benchmark. Representative CViT rollout prediction of the velocity field $v$ , and point-wise error against the ground truth.
+
+
+Figure 17: Compressible Navier-Stokes Benchmark. Representative CViT rollout prediction of the pressure field $p$ , and point-wise error against the ground truth.
+
+# F.7 DIFFUSION-REACTION EQUATION
+
+The 2D diffusion-reaction equation is given by
+
+$$
+\partial_ {t} u = D _ {u} \partial_ {x x} u + D _ {u} \partial_ {y y} u + R _ {u},
+$$
+
+$$
+\partial_ {t} v = D _ {v} \partial_ {x x} v + D _ {v} \partial_ {y y} v + R _ {v},
+$$
+
+where $u = u(t,x,y)$ is the activator and $v = v(t,x,y)$ denotes the inhibitor. Here $D_{u}$ and $D_{v}$ are the diffusion coefficient for the activator and inhibitor, respectively, $R_{u} = R_{u}(u,v)$ and $R_{v} = R_{v}(u,v)$ are the activator and inhibitor reaction function, respectively. The domain of the simulation includes $x\in (-1,1),y\in (-1,1),t\in (0,5]$ . The reaction functions for the activator and inhibitor are defined by:
+
+$$
+R _ {u} (u, v) = u - u ^ {3} - k - v,
+$$
+
+$$
+R _ {v} (u, v) = u - v,
+$$
+
+where $k = 5 \times 10^{-3}$ , and the diffusion coefficients for the activator and inhibitor are $D_{u} = 1 \times 10^{-3}$ and $D_{v} = 5 \times 10^{-3}$ , respectively. The initial condition is generated as standard normal random noise $u(0, x, y) \sim \mathcal{N}(0, 1.0)$ for $x \in (-1, 1)$ and $y \in (-1, 1)$ .
+
+Data generation. We use the dataset generated by PDEBench (Takamoto et al., 2022), where discretized into $N_{x} = 512$ , $N_{y} = 512$ and $N_{t} = 501$ , as well as the downsampled version for the models training with $N_{x} = 128$ , $N_{y} = 128$ , and $N_{t} = 101$ , the spatial discretization is performed using the finite volume method, and the time integration is performed using the built-in fourth order Runge-Kutta method in the scipy package.
+
+Problem setup. We follow the problem setup reported in Hao et al. (Hao et al., 2024). We aim to learn the solution operator that maps the activator and inhibitor fields from the previous time-steps to the next time-step. The models are trained with 900 trajectories and tested on the remaining 100 trajectories. We report the resulting relative $L^2$ errors over rollout predictions.
+
+Training. For training CViT models, please refer to section F.1. It is worth noting that for this specific task, we employ an initial learning rate of $5 \times 10^{-4}$ , different from the $10^{-3}$ used in other experiments.
+
+Evaluation. We directly report the results as presented in DPOT (Hao et al., 2024). For comprehensive details on the training procedures, hyper-parameters, please refer to their original paper.
+
+
+Figure 18: Diffusion-reaction Benchmark. Representative CViT rollout prediction of the density field $u$ , and point-wise error against the ground truth.
+
+
+Figure 19: Diffusion-reaction Benchmark. Representative CViT rollout prediction of the density field $v$ , and point-wise error against the ground truth.
+
+# F.8 COMPUTATIONAL COST
+
+All experiments were performed on a single Nvidia RTX A6000 GPU. Average training times varied between 5 hours and 60 hours, depending on the task, input resolution, model size, and patch size. The following table summarizes the training times for different models. We use a brief notation to indicate the model size and the input patch size: for instance, CViT-L/16 refers to the "Large" variant with a $16 \times 16$ input patch size.
+
+Table 9: Training times (hours) on a single Nvidia RTX A6000 GPU for different models and patch sizes $(8\times 8,16\times 16,32\times 32)$ on benchmarks of Shallow water equation and Navier-Stokes equation.
+
+
Method
Shallow Water
Navier-Stokes
CViT-S/8
15
9
CViT-B/8
25
14
CViT-L/8
57
28
CViT-L/16
17
10
CViT-L/32
9
6
+
+Table 10: Comparison of parameter count and inference time. All measurements are performed on a single NVIDIA A6000 GPU with batch size 32, averaged over 100 runs.
+
+
Model
# Params
Inference time (ms)
CViT-L
93 M
79.09
ViT
87 M
45.49
FNO
67 M
34.96
UNet
124 M
44.25
\ No newline at end of file
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/images.zip b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/images.zip
new file mode 100644
index 0000000000000000000000000000000000000000..dba46affb5f790b6795e6040ed6aab25306cef26
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/images.zip
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:33a4bf37c1596d18fdba5997e7f48465273bda628632fa1d179342cbf1b026e6
+size 2104641
diff --git a/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/layout.json b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/layout.json
new file mode 100644
index 0000000000000000000000000000000000000000..c09edbf4365401cbc7152cd90190c492205b251e
--- /dev/null
+++ b/ICLR/2025/CViT_ Continuous Vision Transformer for Operator Learning/layout.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d471505318428d1d8e86fa71c2bd1919d2cdf117e813214c27fb2b99269b6b17
+size 1075043
diff --git a/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_content_list.json b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_content_list.json
new file mode 100644
index 0000000000000000000000000000000000000000..c1dbd7665eb382d18d00ff2371e852e9dfa4acba
--- /dev/null
+++ b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_content_list.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:30a9eba89680826360000c494caf8a4dc756f33c43b57aab9afbeccdc1123a5e
+size 143626
diff --git a/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_model.json b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_model.json
new file mode 100644
index 0000000000000000000000000000000000000000..3db18126434cbddb33cc509b839348154215e117
--- /dev/null
+++ b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_model.json
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fa1fc7599bfb46f79066da511b2e7d7a7d1ae86a9219d7b627c22b7eb6b6d5e0
+size 176844
diff --git a/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_origin.pdf b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_origin.pdf
new file mode 100644
index 0000000000000000000000000000000000000000..162254590fbdd9026c9eff4787abbea439612a96
--- /dev/null
+++ b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/a4b2d633-ab65-4b48-b50a-dd6968d6512a_origin.pdf
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:831f28d931dcf948dcf23d7204ae0c980688eaa933e7943d6e8b47c3f7efefc8
+size 2195735
diff --git a/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/full.md b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/full.md
new file mode 100644
index 0000000000000000000000000000000000000000..5bf4ab145c287179b6d5734ca93f8021656686e9
--- /dev/null
+++ b/ICLR/2025/CaPo_ Cooperative Plan Optimization for Efficient Embodied Multi-Agent Cooperation/full.md
@@ -0,0 +1,571 @@
+# CAPO: COOPERATIVE PLAN OPTIMIZATION FOR EFFICIENT EMBodied MULTI-AGENT COOPERATION
+
+Jie Liu1 Pan Zhou2* Yingjun Du1 Ah-Hwee Tan2 Cees G.M. Snoek1
+
+Jan-Jakob Sonke3 Efstratos Gavves1,4
+
+1University of Amsterdam, The Netherlands 2Singapore Management University, Singapore
+
+3The Netherlands Cancer Institute, The Netherlands 4Archimedes/Athena RC, Greece
+
+j.liu5@uva.nl panzhou3@gmail.com E.Gavves@uva.nl
+
+# ABSTRACT
+
+In this work, we address the cooperation problem among large language model (LLM) based embodied agents, where agents must cooperate to achieve a common goal. Previous methods often execute actions extemporaneously and incoherently, without long-term strategic and cooperative planning, leading to redundant steps, failures, and even serious repercussions in complex tasks like search-and-rescue missions where discussion and cooperative plan are crucial. To solve this issue, we propose Cooperative Plan Optimization (CaPo) to enhance the cooperation efficiency of LLM-based embodied agents. Inspired by human cooperation schemes, CaPo improves cooperation efficiency with two phases: 1) meta-plan generation, and 2) progress-adaptive meta-plan and execution. In the first phase, all agents analyze the task, discuss, and cooperatively create a meta-plan that decomposes the task into subtasks with detailed steps, ensuring a long-term strategic and coherent plan for efficient coordination. In the second phase, agents execute tasks according to the meta-plan and dynamically adjust it based on their latest progress (e.g., discovering a target object) through multi-turn discussions. This progress-based adaptation eliminates redundant actions, improving the overall cooperation efficiency of agents. Experimental results on the ThreeDworld Multi-Agent Transport and Communicative Watch-And-Help tasks demonstrate CaPo's much higher task completion rate and efficiency compared with state-of-the-arts. The code is released at https://github.com/jliu4ai/CaPo.
+
+# 1 INTRODUCTION
+
+Large Language Models (LLMs) have demonstrated remarkable capabilities in understanding and generating human language, complex reasoning, and planning, achieving impressive advancement (OpenAI, 2024; Touvron et al., 2023). These advancements empower LLM-based embodied agents to autonomously make plans (Li et al., 2023a; Padmakumar et al., 2022; Zhu et al., 2023; Wang et al., 2023a; Wu et al., 2023b; Huang et al., 2022b) and perform reasoning (Du et al., 2023; Hao et al., 2023; Zhou et al., 2024; Huang et al., 2022a) by using human language to assist people in daily activities, such as housework and daily chores. The next milestone for agents is to cooperate with others to achieve joint tasks. This is crucial not only for efficiently performing simple tasks but also for tackling complex ones that cannot be completed in isolation due to their inherent complexity or the dynamic nature of the environment (Zhang et al., 2023b; Guo et al., 2024; Mandi et al., 2023).
+
+Notably, the cooperation among LLM-based embodied agents is rarely investigated despite being highly desired. Conventional works often focus on adopting reinforcement learning (RL) (Jiang & Lu, 2018; Liu et al., 2021; Wang et al., 2021) to explore the dynamics of cooperative behavior among non-LLM-based agents. In spite of their promising performance in certain scenarios, RL-based cooperation methods exhibit limited adaptability across different tasks (Dittadi et al., 2021; Cobbe et al., 2019), since they are often not trained on large-scale data and lack sufficient generalization ability. To solve this issue, in this work, we are particularly interested in the problem of "how to
+
+Task Description: Transport 1 mice, 1 pen, 1 iPhone, and 1 purse to the bed.
+
+Existing Agent Information: Alice knows the location of mouse, pen; Bob knows the location of purse. They don't know the location of iPhone.
+
+# CoELA
+
+
+
+Communication & Execution
+
+Alice grasps purse; Bob grasps mouse.
+
+
+
+
+
+Communication & Execution
+
+Alice transports purse to the bed;
+
+Bob transports mouse to the bed.
+
+
+
+
+
+Communication & Execution
+
+Alice grasps pen; Bob grasps pen.
+
+
+Figure 1: Examples of task accomplishment of CoELA (Zhang et al., 2023b) and our CaPo. In CoELA, after each action execution, Alice and Bob communicate to decide next action which is a greedy single-step plan and suboptimal. For example, they do not use wood basket which can contain multiple objects, and both temporaneously move a single item to the target bed without a long-term and collaborative plan. In contrast, in CaPo, Alice and Bob first discuss to make a long-term meta-plan for strategical cooperation in which Alice is arranged to move several target items into a wood basket, and Bob moves the remaining target items and also searches the unknown objects. Then during execution phase, both follow the meta-plan to accomplish task, and dynamically adapt the meta-plan to latest task progress, ensuring its effectiveness and efficiency in coordinating agents.
+
+
+Progress-adaptive Meta Plan
+A
+
+# Ours (CaPo)
+
+Meta Plan Generation
+
+Step 1: Alice grasps mouse, pen, and put them into the wood basket. Bob grasps purse. Step 2: Alice transports mouse and pen using wood basket to the bed; Bob transports purse to the bed; and try to find iPhone and transport it to the bed.
+
+Progress-adaptive Meta Plan 1
+
+Step 1: Alice grasps mouse, pen, and put them into the wood basket. Bob grasps purse. Step 2: Alice transports mouse and pen using wood basket to the bed; Bob transports purse to the bed; and try to find iPhone and transport it to the bed.
+
+New Alice found iPhone when Progress: grasping pen
+
+
+
+
+
+Progress-adaptive Meta Plan 2 Step 1: Alice grasps iPhone and puts it into wood Bob transports purse to the bed. Step 2: Alice to wood basket (containing pen, mouse, iPhone) to the (The task is completed.)
+
+develop an effective collaboration framework for LLM-based agents", since LLMs have revealed strong reasoning and planning capability as good agents' brain across different tasks.
+
+Among the limited related works, CoELA (Zhang et al., 2023b) proposes an LLM-based multiagent cooperation framework in which after each action execution, agents communicate to devise a single-step plan for the next action. Despite its significant advancements, CoELA's short-term, single-step planning, which lacks consideration for long-term strategic collaboration, often results in extemporaneous and incoherent actions among agents, leading to several potential issues. Without a long-term coherent collaboration plan, agents are prone to executing numerous redundant actions, resulting in increased costs. This issue is particularly critical in the physical world, where agents' movements are inherently challenging and resource-intensive. For instance, as shown in Fig. 1, for the object transport task, agent Alice and Bob do not use the wood basket which can contain several objects, and extemporaneously move their nearest target objects one by one, leading to inferior efficiency. Complex tasks are challenging to accomplish without thorough discussion and long-term collaboration, particularly in embodied environments where agents operate with only partial observations. Without a long-term cooperative plan, agents' uncoordinated actions can lead to severe consequences. For example, in search-and-rescue missions, poor coordination may endanger lives due to the complexity of such operations.
+
+Contributions. This work introduces Cooperative Plan Optimization (CaPo), a novel framework designed to enhance the cooperation efficiency of LLM-based embodied agents by leveraging their advanced reasoning and planning capabilities. Inspired by human cooperation schemes (Tuomela, 1998; Thürmer et al., 2017), CaPo enables agents to collaboratively create and refine long-term, strategic, and coherent meta-plans through multi-turn discussions. These meta-plans serve as actionable guides that facilitate efficient task coordination and completion.
+
+Specifically, CaPo addresses key challenges in multi-agent cooperation through two main phases. The first phase is Meta-Plan Generation, where agents collaboratively analyze the task and exchange information to generate a meta-plan that decomposes the overall task into detailed subtasks, including agent assignments and execution steps. A designated agent initiates the meta-plan, while others evaluate and refine it through iterative feedback, ensuring alignment and optimal planning. The discussion process continues until consensus is reached or the communication budget is exhausted. This phase ensures thorough deliberation and creates a coherent roadmap for task execution. For example, in the object transport task, agents Alice and Bob are strategically assigned complementary subtasks to optimize their coordination (see Fig. 1).
+
+The second phase is Progress-Adaptive Meta-Plan and Execution, where agents dynamically adapt the meta-plan based on real-time progress and discoveries during task execution. For instance, if Alice identifies the location of an object that was initially unknown (e.g., an "iPhone"), the agents collaboratively update the meta-plan to incorporate this new information, ensuring timely and efficient task completion. This adaptive mechanism maintains the meta-plan's effectiveness, even in dynamic environments, and prevents inefficiencies or redundant actions.
+
+The proposed approach has been rigorously evaluated on benchmark tasks, including the ThreeDworld Multi-Agent Transport (TDW-MAT) and Communicative Watch-And-Help (C-WAH) tasks (Zhang et al., 2023b). Experimental results demonstrate that CaPo significantly improves task completion rates and cooperation efficiency compared to state-of-the-art methods. Notably, on the TDW-MAT task, CaPo achieves a completion rate improvement of $16.7\%$ and $4.7\%$ over the SoTA CoELA method with GPT-3.5 and GPT-4 agents, respectively.
+
+# 2 RELATED WORK
+
+LLM-based Agents. LLM-based agents (Hong et al., 2023; Wang et al., 2024; Shen et al., 2024; Liu et al., 2023a) are designed to autonomously perceive environments, execute actions, and accumulate knowledge, with rich real world knowledge and complex reasoning capability inherited from LLMs. Notable agents like AutoGPT (Richards & et al., 2021), BabyAGI (Nakajima, 2023), and AgentGPT (Reworkd, 2023) showcase remarkable proficiency in decision-making and complex reasoning. In the embodied environment, LLM-based agents have shown superior capacity in strategic planning (Li et al., 2023a; Padmakumar et al., 2022; Wu et al., 2023b; Huang et al., 2022b). Specifically, LLM-planner (Song et al., 2023) harness LLMs to do few-shot planning for embodied agents. PET (Wu et al., 2023a) translates a task description with LLMs into a list of high-level sub-tasks. TaPA wu2023embodied enables the agent to generate executable plans by aligning LLMs with visual perception models. Another research line focuses on harnessing LLMs's reasoning capabilities in embodied tasks (Zhou et al., 2024; Huang et al., 2022a). ELLM (Du et al., 2023) utilizes LLMs to set pretraining goals in RL, guiding agents towards the goal without human involvement.
+
+Multi-Agent Cooperation. Multi-agent cooperation and communication have been studied for decades to improve communication efficiency (Jiang & Lu, 2018; Li et al., 2023b) and planning (Torreno et al., 2017; Zhang et al., 2023a). Within the domain of embodied intelligence, ProAgent (Zhang et al., 2023a) harnesses LLMs to develop proactive agents that dynamically adjust their behavior to foster better cooperation with teammates. RoCo (Mandi et al., 2023) introduce a multi-robot collaboration framework that employs LLMs for both high-level communication and low-level path planning. (Guo et al., 2024) proposed a prompt-based organizational framework for LLM agents to reduce communication costs and boost team efficiency. CoELA (Zhang et al., 2023b) enables agents to plan, communicate, and collaborate effectively, but its plan is one-step plan and is short-term. Despite these advancements, these methods focus on short-term planning and do not involve sufficient agent discussion, while ours seeks to a long-term strategical and coherent plan via agent's thoughtful discussions for efficient multi-agent cooperation.
+
+Optimization with LLMs. With the advancement of prompting techniques, LLMs have shown remarkable performance across various domains (Wei et al., 2022; Kojima et al., 2022; Wang et al., 2022; Zhou et al., 2022; Madaan et al., 2024). Their ability to understand natural language lays out a new possibility for optimization. (Yang et al., 2023) first proposed to leverage LLMs as optimizer, where the optimization task is described in natural language. OPT2I (Manas et al., 2024) aims to enhance prompt-image consistency in text-to-image models by iteratively generating revised prompts with LLMs to maximize the consistency score. VislingInstruct (Zhu et al., 2024) proposes optimizing multi-modal instruction for multi-modal language models in a zero-shot manner. DyLAN (Liu et al., 2023b) is particularly relevant to our work. DyLAN (Liu et al., 2023b) enables agents to interact for multiple rounds in a dynamic architecture to optimize the selection of agent. In contrast, our work investigates cooperative plan optimization via multi-turn discussion between agents.
+
+# 3 PRELIMINARIES
+
+Task Formulation. We formulate the embodied multi-agent cooperation task as an decentralized partially observable Markov decision process (DEC-POMDP) (Bernstein et al., 2002; Spanan et al.,
+
+
+Figure 2: Overview of the CooperAtive Plan Optimization (CaPo) framework for embodied multi-agent cooperation. CaPo consists of two key phases: 1) meta-plan Generation: All agents collaboratively formulate a meta-plan before taking any actions through multi-turn discussions. One agent serves as meta-plan designer, responsible for creating the meta-plan, while all other agents serve as meta-plan evaluators, providing critical feedback about meta-plan. 2) Progressive-adaptive meta-plan and Execution: As new progress is made, agents adopt a progress-adaptive planning module to adapt the meta-plan to the latest task progress, ensuring the effectiveness of meta-plan.
+
+2006), which is defined as $< n, S, \mathcal{O}, \mathcal{A}, P, r, \gamma>$ . Here, $n$ represents the number of agents; $S$ is the finite state space; $\mathcal{O}$ denotes the observation space; $\mathcal{A}$ is a finite joint action space of all agents; $P: S \times \mathcal{A} \times S \to [0,1]$ denotes the transition probability function; $r = S \times \mathcal{A} \to \mathbb{R}$ denotes the reward function; $\gamma \in [0,1]$ denotes the discount factor. In this framework, at time step $t \in \mathbb{N}$ , each agent $i$ observes the environment's state $s_t \in S$ , and receives an observation set $\mathcal{O}_i$ . $\mathcal{O}_i$ consists of a world observation $\mathcal{O}_i^w$ , which the agent gathers through its sensors, or a communication message observation $\mathcal{O}_i^c$ from other teammate agents. Agent $i$ takes actions from its action space $\mathcal{A}_i$ , which includes a finite set of world action $\mathcal{A}_i^w$ , e.g., grasping a target object, or a finite set of messaging action $\mathcal{A}_i^c$ . Then agents receive a shared reward $r_t = r(s_t, a_t)$ , where $a_t \in \mathcal{A}$ denotes the joint actions of agents, and observe a new state $s_{t+1}$ with probability $P(s_{t+1}|s_t, a_t)$ . We formulate the problem with two decentralized intelligent embodied agents working together to complete a long-horizon rearrangement task (Zhang et al., 2023b; Batra et al., 2020) in a multi-room indoor environment. During the task, agents can execute multiple kinds of actions, such as navigation, interaction, and communication by sending messages.
+
+CoELA Framework. CoELA Zhang et al. (2023b) is a pioneering modular framework for embodied multi-agent cooperation, which consists of five key modules: (a) Perception, (b) Memory, (c) Communication, (d) Planning, and (e) Execution. For each agent, the (a) Perception Module gathers observations from environment, including messages from other agents and relevant scene information from the RGB-D image. The (b) Memory Module dynamically stores the shared task, dialogue history between agents, agent progress, team- mate progress, and action history, all formatted as text descriptions. (c) The Communication Module retrieves relevant information from the memory module and uses an LLM to generate messages that are sent to other agents. (d) The Planning Module driven by LLM decides which plan to take given related information retrieved from the memory module and available actions proposed regarding the current state. Finally, the (e) Execution Module convert high-level plan into primitive actions executable in the environment. CoELA exhibits great performances in the embodied multi-agent cooperation tasks, making it a strong baseline for validating the effectiveness of our model in improving multi-agent cooperation efficiency.
+
+# 4 COOPERATIVE PLAN OPTIMIZATION
+
+We first introduce the overall framework of CooperAtive Plan Optimization (CaPo) for LLM-based embodied agents in Sec. 4.1. We then respectively elaborate on the two key phases of CaPo, i.e., meta-plan generation and progress-adaptive meta-plan and execution, in Sec. 4.2 and Sec. 4.3.
+
+# 4.1 OVERALL FRAMEWORK OF CAPO
+
+CaPo addresses the challenge of enabling two centralized embodied agents to effectively cooperate in a shared environment. In this setup, each agent has partial observations and must rely on communication and coordination to accomplish complex tasks. The key objective is to achieve strategic and step-by-step collaboration, where both agents contribute to the task's completion through efficient planning and adaptive decision-making. As shown in Fig. 2, each agent is equipped with five foundational modules from CoELA: perception, memory, communication, plan-phrasing, and execution. These modules enable the agents to perceive their environment, store and retrieve relevant information, exchange messages for coordination, generate plans, and execute actions accordingly.
+
+To complete a task cooperatively and efficiently, inspired by humans collaboration (Tuomela, 1998; Thürmer et al., 2017), CaPo first analyzes the task at hand to create a long-term meta-plan before agents take any actions. All agents participate in this plan-making process, either generating meta-plan or providing feedback. The meta-plan is then dynamically refined based on the latest agent progress to ensure its effectiveness in coordinating agents. To this end, it contains two key phases, including 1) meta-plan generation, and 2) progress-adaptive meta-plan and execution. In the meta-plan generation phase, given a task, multiple embodied agents first gather relevant information such as object locations. Then, they discuss together to create a meta-plan that decomposes the task into subtasks and consider agent situation (e.g., agent and object locations) to assign agents to different subtasks with accomplishment steps. In the progress-adaptive meta-plan and execution phase, agents dynamically align the meta-plan with their latest progress. This is achieved through multi-turn discussion triggered by clear task progress, such as discovering target objects or successfully completing subtasks. In the following, we will elaborate on these two phases in turn.
+
+# 4.2 META-PLAN GENERATION
+
+To generate the long-term meta-plan which coordinates all agents to accomplish tasks efficiently, CaPo introduces two key steps, including 1) meta-plan initialization where one agent initializes a meta-plan according to the task description and existing information, and 2) meta-plan evaluation and optimization where all agents evaluate the meta-plan and provide feedback to improve the plan.
+
+Meta-plan Initialization. At the beginning of a task, the task description is provided to all agents, e.g., Transport 2 apples and 3 bananas to the bed. One agent, e.g., Alice in Fig. 2, is randomly selected as the meta-plan designer, and creates the meta-plan through a cooperative planning module. Note that the meta-plan here, as illustrated in Fig. 3, differs from the short-term or unorganized plans used in previous work (Zhang et al., 2023b; a; Mandi et al., 2023). Specifically, the cooperative planning module is equipped with a pre-trained LLM, and leverage the LLM to generate the meta-plan. The prompting for the LLM is organized as follows:
+
+Prompt: + \n.
+
+LLM: .
+
+Here, , , and are three placeholders for the task description, instruction head, and generated meta-plan. The task description provides background descriptions about the task, while the instruction head introduces additional constraints into the generation of meta-plan, such as the format of meta-plan and available actions to generate a clear and executable plan. Detailed prompt design is shown in Fig. 9 of Appendix.
+
+Meta-plan Evaluation and Optimization. The meta-plan generated by a single agent is often biased by that agent's partial observations, resulting in a suboptimal plan that fails to coordinate all agents effectively. To address this issue, CaPo involves all agents in a multi-turn discussion to optimize the meta-plan. Specifically, the meta-plan designer (e.g., Alice in Fig. 3) broadcasts the meta-plan to all teammate agents, while teammate agents (e.g., Bob in Fig. 3) serve as meta-plan evaluators, providing feedback about the meta-plan. Since teammate agents have different partial observations of the environment, they provide the meta-plan designer with better situational awareness to help generate a more efficient and effective meta-plan. This optimization process continues until all agents reach a consensus, i.e., the evaluator agents are satisfied with the meta-plan, or the communication budget (e.g., maximum discussion round) is exhausted. Indeed, Fig. 8 in Sec. 5.2 analyzes the convergence analysis of the meta-plan optimization process, and shows that typically agents would reach a consensus within three rounds of discussion.
+
+
+Figure 3: Examples of the evaluation and optimization process of meta-plan via multi-turn discussion between agents. The discussion is triggered by new progress, i.e., Alice founds new object 'purse'. Here, Alice acts as the meta-plan designer, while Bob serves as the meta-plan evaluator. The example is derived from the transporting task of TDW-MAT.
+
+As shown in Fig. 2, each agent is equipped with a communication module powered by a pretrained LLM to facilitate multi-turn discussions. Specifically, the communication module first retrieves relevant information from the memory, e.g., meta-plan, agent state, and previous dialogue history among agents, then prompts the LLM to generate the message to send via the following prompt:
+
+
+
+The tags , , and