diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_content_list.json b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f0a3ba14cb6927c0539dd0a8c8e1143a9ce76582 --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec5bb9b83fc98760274b4fe9a21947bd463c3ff35ba52aa2f1e7f5d0afbf3a44 +size 185607 diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_model.json b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4c5a5c1a9bd2e4c1cebce78e3daf19ac3386e112 --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f54687220fd2ad0b98c47d4c5d54e179ea0f210329503808be2aca3db62fa75e +size 220527 diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_origin.pdf b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..371cb74cee60dc6526597b8eb62810680ce45a76 --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/43906c17-ce37-4c19-b5ad-47f7d11a1cbd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e9e4acf70f45e586115a0241fb1255f248d4f27b084d973ec814763bf395762 +size 9381331 diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/full.md b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f34f9c38d05fb33c6086ca23f492ef48aa6a2783 --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/full.md @@ -0,0 +1,909 @@ +# Learning Robust Neural Processes with Risk-Averse Stochastic Optimization + +Huafeng Liu $^{12}$ Yiran Fu $^{12}$ Liping Jing $^{123}$ Hui Li $^{12}$ Shuyang Lin $^{12}$ Jingyue Shi $^{12}$ Deqiang Ouyang $^{4}$ Jian Yu $^{12}$ + +# Abstract + +Neural processes (NPs) are a promising paradigm to enable skill transfer learning across tasks with the aid of the distribution of functions. The previous NPs employ the empirical risk minimization principle in optimization. However, the fast adaption ability to different tasks can vary widely, and the worst fast adaptation can be catastrophic in risk-sensitive tasks. To achieve robust neural processes modeling, we consider the problem of training models in a risk-averse manner, which can control the worst fast adaption cases at a certain probabilistic level. By transferring the risk minimization problem to a two-level finite sum minimax optimization problem, we can easily solve it via a double-looped stochastic mirror prox algorithm with a task-aware variance reduction mechanism via sampling samples across all tasks. The mirror prox technique ensures better handling of complex constraint sets and non-Euclidean geometries, making the optimization adaptable to various tasks. The final solution, by aggregating prox points with the adaptive learning rates, enables a stable and high-quality output. The proposed learning strategy can work with various NPs flexibly and achieves less biased approximation with a theoretical guarantee. To illustrate the superiority of the proposed model, we perform experiments on both synthetic and real-world data, and the results demonstrate that our approach not only helps to achieve more accurate performance but also improves model robustness. + +1Beijing Key Laboratory of Traffic Data Mining and Embodied Intelligence, Beijing, China 2School of Computer Science and Technology, Beijing Jiaotong University, Beijing, China 3State Key Laboratory of Advanced Rail Autonomous Operation, Beijing, China 4Collage of Computer Science, Chongqing University, Chongqing, China. Correspondence to: Deqiang Ouyang, Liping Jing . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Neural processes (NPs) (Garnelo et al., 2018a;b) represent a class of approximation models for Gaussian processes (GPs) (Rasmussen, 2003), offering promising attributes in terms of computational efficiency and uncertainty quantification. Unlike conventional statistical modeling, where a user typically needs to manually specify a prior, such as the smoothness of functions characterized by a Gaussian distribution in Gaussian processes, NPs subtly define a broad spectrum of stochastic processes using neural networks in a data-driven fashion. When trained appropriately, NPs can delineate a flexible range of stochastic processes that are particularly apt for representing complex functions that existing stochastic processes struggle to capture. + +NPs model the relationship between inputs and outputs in the form of probability distributions. This allows the model to generate predictions with associated uncertainty, which is particularly beneficial when only a small amount of training data is available. By capturing the model's confidence, NPs are more robust in few-shot scenarios. NPs can leverage meta-learning to extract shared knowledge from multiple related tasks. This enables the model to quickly adapt to new tasks by utilizing the information learned from previous tasks. Even with limited data in the current task, the model can make accurate predictions by drawing on this shared knowledge. Unlike traditional Bayesian methods, NPs do not depend on explicit prior assumptions. Instead, they learn directly from the data, making them more flexible and effective in few-shot learning contexts. Thanks to the characteristics above of NPs, many researchers are focusing on the few-shot learning capabilities of NPs (Gordon et al., 2019; Liu et al., 2024b; Bruinsma et al., 2023). + +However, the optimization in most of the previous NPs optimizations has adopted the empirical risk minimization principle, overlooking the differences in rapid adaptation between tasks. Given a batch of training tasks, NPs treat the task weights uniformly, which can result in insufficient training for the fast adaptation capability to certain tasks. As shown in Figure 1, we present the original task risk frequency statistics. It can be observed that high-risk tasks (with risk values above $70\%$ ) account for more than $30\%$ of the total tasks. Therefore, when a new task matches + +![](images/c3ed8601298626271b12f02fe2db8885b4ce0fb0aee39720ce6ef08fb555bc36.jpg) +Figure 1. Illustration of the task risk distributions of original NPs and our robust NPs. + +these high-risk tail tasks, the prediction risk for the new task is similarly high, thereby affecting the performance of the new task. This issue is particularly critical in sensitive scenarios, such as spike sorting (Pakman et al., 2020), and robot navigation (Yildirim & Ugur, 2022). + +In this paper, we focus on the performance difference in fast adaptation to various tasks as an indispensable consideration. By investigating the learning paradigm from the view of risk distribution, we convert the optimization principles for NPs to stochastic optimization problems while minimizing the expected tail risk, i.e., conditional value-at-risk (CVaR) (Rockafellar et al., 2000). Specifically, we focus on expected tail risk minimization for NPs with CVaR, which can reshape the task risk distribution and control the task's fast adaptation ability at a certain probabilistic level. When using a variant of SGD for solving the tail risk, it is common to approximate the expectation through mini-batch sampling. However, if the batch is sampled uniformly at random, only a small fraction (e.g., $\alpha$ in CVaR) of the selected samples may carry meaningful gradient information. For the remaining points, their gradients are often truncated to zero due to the presence of the max·operation and the inherent non-linearity. On the other hand, for the points that do contribute, their gradients are amplified by a factor of a small number (e.g., $1 / \alpha$ ), which can result in exploding gradients. Meanwhile, only a small number of higi-loss samples contribute to the gradient, and the variance of the gradient estimates is significantly high, which makes the optimization trajectory highly unstable. These combined issues make stochastic optimization highly challenging. + +Inspired by the previous work (Alacaoglu & Malitsky, 2022), we formulate the CVaR problem as a distributionally robust optimization problem with stochastic minimax optimization and introduce a variance-reduced stochastic mirror prox algorithm. Specifically, we follow the double-loop structure of variance reduction and leverage the two-level structure to compute the stochastic gradient based on a sampling strategy across all tasks, which can get a variance-reduced stochastic gradient estimator. The final solution, by aggregating prox points with the adaptive learning rates, enables a stable and high-quality output. The proposed risk + +and optimization algorithm can be flexible to work with various NPs and achieve a less biased approximation. Extensive experiments conducted on both synthetic and real-world datasets demonstrate that the proposed solution can improve robustness. + +# 2. Related Work + +In this section, we briefly review three different areas that are highly relevant to the proposed method: neural processes and risk-sensitive optimization. + +Neural Processes Neural Processes (NPs) are a class of models that aim to combine the flexibility of neural networks with the probabilistic framework of Gaussian Processes (GPs). Introduced by (Garnelo et al., 2018a), NPs learn a distribution over functions by conditioning on a set of context points. This allows them to perform tasks such as few-shot learning and function approximation with remarkable efficiency. Several mechanisms or techniques have been integrated into NPs to enhance their performance and applicability, such as attention mechanisms (Kim et al., 2019), hierarchical priors (Wang & Van Hoof, 2020), translation equivariance (Gordon et al., 2019; Kawano et al., 2021), bootstraping (Lee et al., 2020). In recent years, cutting-edge technologies have been applied to NPs to enhance model performance, such as neural ODE (Norcliffe et al., 2021), transformer (Nguyen & Grover, 2022; Maraval et al., 2024), diffusion model (Dutordoir et al., 2023), contrastive learning (Ye & Yao, 2022), autoregressive mechanism (Bruinsma et al., 2023; Tai, 2023). Unlike making improvements to the model, many researchers have also explored the applicability of NPs to different specific tasks, for example, recommender systems (Lin et al., 2021; Liu et al., 2022; 2024b), hyperparameter optimization (Wei et al., 2021), neuroscience (Cotton et al., 2020; Pakman et al., 2020), space science (Park & Choi, 2021), and physics-informed systems design (Vadeboncoeur et al., 2023). + +Risk-sensitive Optimization Robust Optimization (RO) (Gabrel et al., 2014; Rahimian & Mehrotra, 2019; Yu et al., 2024) aims to improve model stability and reliability by designing algorithms capable of handling uncertainty and perturbations. The core idea of robust optimization is to consider the worst-case performance of a model with min-max formulation during the training process, rather than just its expected performance (Bertsimas & Sim, 2004) by introducing uncertainty sets or adversarial perturbations. Robust optimization strategies typically include two major categories: adversarial robustness and distributionally robust optimization. Adversarial examples are a specific form of perturbation in machine learning, where an attacker can deceive the model by making small perturbations to the input (adversarial attacks) (Gabrel et al., 2014;?). Distributionally robust optimization is a + +method that focuses on ensuring model robustness when the training data distribution changes (Rahimian & Mehrotra, 2019). Among them, the risk principle Value-at-Risk (VaR), as a representative method of robust optimization with probabilistic constraints, was first introduced in the financial sector (Rockafellar et al., 2000), gained significant attention (Quaranta & Zaffaroni, 2008), and has since been widely applied to other fields, such as healthcare (Chen et al., 2019), reinforcement learning (Pinto et al., 2017; Gagne & Dayan, 2021), smart grid (Ben-Tal & Nemirovski, 1999; Bertsimas et al., 2012), and so on. As for robust strategies for NPs, some researchers have explored approaches such as using bootstrapping (Lee et al., 2020) or ensemble methods (Liu et al., 2024a). + +# 3. Preliminaries + +Let calligraphic letter (e.g., $\mathcal{A}$ ) indicate set, capital letter (e.g., $A$ ) for scalar, lower-case bold letter (e.g., a) for vector, and capital bold letter (e.g., $\mathbf{A}$ ) for matrix. Suppose there is a dataset $\mathcal{D} = (\mathbf{X}, \mathbf{y}) = \{(\mathbf{x}_i, y_i)\}_{i=1}^N$ with $N$ data points $\mathbf{X} = [\mathbf{x}_1, \mathbf{x}_2, \dots, \mathbf{x}_N]^\top \in \mathbb{R}^{N \times D}$ , and corresponding labels $\mathbf{y} = [y_1, y_2, \dots, y_N] \in \mathbb{R}^N$ . Considering an arbitrary number of data points $\mathcal{D}^{\mathcal{C}} = (\mathbf{X}^{\mathcal{C}}, \mathbf{y}^{\mathcal{C}}) = \{(x_i, y_i)\}_{i \in \mathcal{C}}$ , where $\mathcal{C} \subseteq \{1, 2, \dots, N\}$ is an index set defining context information, neural processes model the conditional distribution of the target values $\mathbf{y}^{\mathcal{T}} = \{y_i\}_{i \in \mathcal{T}}$ at some target data points $\mathbf{X}^{\mathcal{T}} = \{x_i\}_{i \in \mathcal{T}}$ based on the context $\mathcal{D}^{\mathcal{C}}$ , i.e., $\mathbb{E}_{p(\mathcal{C})} p_{\theta}(\mathbf{y}^{\mathcal{T}} | \mathbf{X}^{\mathcal{T}}, \mathcal{D}^{\mathcal{C}}) = \mathbb{E}_{p(\mathcal{C})} \sum_{i \in \mathcal{T}} p_{\theta}(y_i | x_i, \mathcal{D}^{\mathcal{C}})$ , where $p(\mathcal{C})$ is a context prior indicating selecting context information from the whole data set $\mathcal{D}$ , e.g., $|\mathcal{C}| \sim U[1, \dots, N]$ . Usually, target set is defined as $\mathcal{T} = \{1, 2, \dots, N\}$ . Only in CNP (Garnelo et al., 2018a), $\mathcal{T} \subseteq \{1, 2, \dots, N\}$ and $\mathcal{T} \cap \mathcal{C} = \emptyset$ . + +Usually, a latent variable $\mathbf{z}$ is introduced to capture model uncertainty and the NPs infer $q_{\theta}(\mathbf{z}|\mathcal{D}^{\mathcal{C}})$ given context set using the reparameterization trick (Kingma & Welling, 2013) and models such a conditional distribution as $p_{\theta}(y_i|\mathbf{x}_i,\mathcal{D}^{\mathcal{C}}) = \int p_{\theta}(y_i|\mathbf{x}_i,\mathcal{D}^{\mathcal{C}},\mathbf{z})q_{\theta}(\mathbf{z}|\mathcal{D}^{\mathcal{C}})d\mathbf{z}$ , and it is trained by maximizing an ELBO: $\ell (\mathcal{D}^{\mathcal{C}},\mathcal{D}^{\mathcal{T}};\theta) = \mathbb{E}_{\mathbf{z}\sim q_{\theta}(\mathbf{z}|\mathcal{D}^{\mathcal{T}})}[\log p_{\theta}(\mathbf{y}^{\mathcal{T}}|\mathbf{x}^{\mathcal{T}})] - KL[q_{\theta}(\mathbf{z}|\mathcal{D}^{\mathcal{T}})\| p_{\theta}(\mathbf{z}|\mathcal{D}^{\mathcal{C}})]$ . The problems are difficult non-convex optimization problems, especially when the neural networks are introduced, and iterative methods, e.g., gradient-based methods, are adopted to find solutions converging to local minimum (Wang & Van Hoof, 2020). + +# 3.1. Risk Minimization of NPs + +To achieve robust NPs and inspired by (Wang et al., 2024), we can optimize CVaR of the task risk function for NPs with the adjustable confidence level $\alpha$ , and define controllable expected tail task risk based on the CVaR of the task risk function. + +To achieve fast prediction on a new context set at test time, NPs meta-learn a distribution over predictors. Consider the distribution of tasks $p(\tau)$ for NPs. Let the task space be $\Omega_{\tau}$ and $\tau$ be the task sampled from the distribution $p(\tau)$ . To perform meta-learning, we require a meta-dataset (dataset of datasets) $\mathcal{D}_{\tau,1:M} = \{\mathcal{D}_{\tau,m}\}_{m=1}^{M}$ with contains $M$ datasets. In NPs, the task risk function $\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta)$ evaluates the model's adaption performance. Based on the commonly used risk minimization principle, the expected risk minimization of NPs is given as follows. + +Definition 3.1. (Expected Risk Minimization for NPs) Given the task distribution $p(\tau)$ , the expected risk minimization for NPs is given as + +$$ +\min _ {\theta \in \Theta} \hat {R} _ {\tau} (\theta) := \mathbb {E} _ {p (\tau)} [ \ell (\mathcal {D} _ {\tau} ^ {\mathcal {C}}, \mathcal {D} _ {\tau} ^ {\mathcal {T}}; \theta) ]. \tag {1} +$$ + +The task distribution determines the diversity and breadth of the meta-dataset, which plays a crucial role in fast adaptation. By performing Monte Carlo estimation to Eq.(1), we can get the empirical risk minimization as $\min_{\theta}\frac{1}{B}\sum_{i = 1}^{B}[\ell (\mathcal{D}_{\tau ,i}^{\mathcal{C}},\mathcal{D}_{\tau ,i}^{\mathcal{T}};\theta)]$ + +Next, we focus on defining the task risk functions as random variables. Given the task space $\Omega_{\tau}$ , we can define a probability measure $p: \delta_{\tau} \mapsto [0,1]$ over the task space as $(\Omega_{\tau}, \delta_{\tau}, p)$ , where $\delta_{\tau}$ is a $\sigma$ -algebra on the subsets of task space. Let $(\mathbb{R}^{+}, \mathcal{B})$ be a probability measure over the non-negative real domain defined by the task risk function $\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta)$ and $\mathcal{B}$ be a Borel $\sigma$ -algebra, the NP operator $NP_{\theta}: \Omega_{\tau} \mapsto \mathbb{R}^{+}$ is given as $NP_{\theta}: \tau \mapsto \ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta)$ . + +In this case, the task risk function $\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta)$ can be viewed as a random variable, and we can induce a distribution $p(\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta))$ over the task risk function. The cumulative distribution function (CDF) of a real-valued random variable $\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta)$ can be formulated as $F_{\ell}(\xi; \theta) = p(\ell(\mathcal{D}_{\tau}^{\mathcal{C}}, \mathcal{D}_{\tau}^{\mathcal{T}}; \theta) \leq \xi)$ , where $\xi \in \mathbb{R}^{+}$ . We cannot give an explicit form of this CDF since it implicitly depends on the loss function $\ell(\cdot)$ and model parameter $\theta$ . + +Based on the definition of VaR and CVar (Eq.(16)), we can define the VaR and CVaR of the task risk function. + +Definition 3.2. Given the task risk function $\ell (\mathcal{D}_{\tau ,1:M};\theta)$ with cumulative distribution function $F_{\ell}(\xi ;\theta)$ , the VaR of the task risk function at level $\alpha \in (0,1)$ is given as $v_{\alpha}(\ell (\mathcal{D}_{\tau ,1:M};\theta)) = \inf \{\xi |F_{\ell}(\xi ;\theta)\geq \alpha \}$ . + +Definition 3.3. Given the task risk function $\ell(\mathcal{D}_{\tau,1:M};\theta)$ with cumulative distribution function $F_{\ell}(\xi;\theta)$ and the VaR of the task risk function $v_{\alpha}(\ell(\mathcal{D}_{\tau,1:M};\theta))$ . Assume the random variable is constrained by $\ell(\mathcal{D}_{\tau}^{\mathcal{C}},\mathcal{D}_{\tau}^{\mathcal{T}};\theta) \geq v_{\alpha}(\ell(\mathcal{D}_{\tau,1:M};\theta))$ , the CVaR of the task risk function is defined as $c_{\alpha}(\ell(\mathcal{D}_{\tau,1:M};\theta)) = \int_0^\infty \xi dF_{\ell}^{\alpha}(\xi;\theta)$ , where $F_{\ell}^{\alpha}(\xi;\theta)$ is the normalized cumulative distribution, which + +is + +$$ +F _ {\ell} ^ {\alpha} (\xi ; \theta) = \left\{ \begin{array}{l l} 0 & \xi < v _ {\alpha} \left(\ell \left(\mathcal {D} _ {\tau , 1: M}; \theta\right)\right) \\ \frac {F _ {\ell} (\xi ; \theta) - \alpha}{1 - \alpha} & \xi \geq v _ {\alpha} \left(\ell \left(\mathcal {D} _ {\tau , 1: M}; \theta\right)\right) \end{array} \right. \tag {2} +$$ + +Thus, we can obtain the normalized probability measure $(\Omega_{\alpha,\tau}, \delta_{\alpha,\tau}, p_{\alpha})$ , where $\Omega_{\alpha,\tau} = \cup_{\xi \geq v_{\alpha}(\ell(\mathcal{D}_{\tau,1:M};\theta))} [NP_{\theta}^{-1}]$ . In this case, the task distribution constrained in $\Omega_{\alpha,\tau}$ is denoted by $p_{\alpha}(\tau)$ . + +# 3.2. Learning with the CVaR + +Given the constrained task distribution $p_{\alpha}(\tau)$ , the controllable expected tail task risk is defined as minimizing CVaR $c_{\alpha}(\ell(\mathcal{D}_{\tau,1:M}; \theta))$ , which can be rewritten as follows: + +$$ +\min _ {\theta \in \Theta} \hat {R} _ {\alpha , \tau} (\theta) := \mathbb {E} _ {p _ {\alpha} (\tau)} \left[ \ell \left(\mathcal {D} _ {\tau} ^ {\mathcal {C}}, \mathcal {D} _ {\tau} ^ {\mathcal {T}}; \theta\right) \right]. \tag {3} +$$ + +However, directly optimizing the above controllable expected tail task risk is intractable since the constrained task distribution $p_{\alpha}(\tau)$ implicitly depends on $\theta$ and $\alpha$ and cannot access an explicit closed-form expression. + +To avoid directly computing the constrained task distribution $p_{\alpha}(\tau)$ , by introducing slack variable $l$ and auxiliary risk function $[\ell (\mathcal{D}_{\tau}^{\mathcal{C}},\mathcal{D}_{\tau}^{\mathcal{T}};\theta) - l]^{+}$ , the probability-constrained function in Eq.(3) can be converted into the following unconstrained form: + +$$ +\min _ {\theta \in \Theta , l \in \mathbb {R}} \hat {R} _ {\alpha} (l, \theta) := l + \frac {1}{1 - \alpha} \mathbb {E} _ {p (\tau)} \left[ \left[ \ell \left(\mathcal {D} _ {\tau} ^ {\mathcal {C}}, \mathcal {D} _ {\tau} ^ {\mathcal {T}}; \theta\right) - l \right] ^ {+} \right]. \tag {4} +$$ + +Let samples from $\mathcal{D}_{\tau,m}$ be $\{Z_{m,i}\}_{i=1}^{n_m}$ , where $n_m$ is the number of samples in the dataset $\mathcal{D}_{\tau,m}$ and $Z = (\mathbf{x},y)$ . By replacing the expectation $\mathbb{E}_{p(\tau)}$ with the empirical tasks, the problem (4) yields the following learning problem: + +$$ +\min _ {\theta \in \Theta , l \in \mathbb {R}} R _ {\alpha} (l, \theta) := l + \frac {1}{(1 - \alpha) M} \sum_ {m = 1} ^ {M} \left[ \left[ R _ {m} (\theta) - l \right] ^ {+} \right]. \tag {5} +$$ + +where $R_{m}(\theta) = \frac{1}{n_{m}}\sum_{j = 1}^{n_{m}}\ell_{m}(Z_{m,j};\theta)$ . This formulation focuses on the tail distribution of the loss by truncating smaller losses and optimizing only large ones. + +# 3.3. Challenges for Stochastic Optimization + +A variant of the SGD method can optimize the above problem. However, there are several challenges in CVaR optimization: 1) Vanishing Gradient Problem: In the CVaR optimization formula, gradients are non-zero only for samples where the loss $\ell(\mathcal{D}_{\tau,i}^{\mathcal{C}}, \mathcal{D}_{\tau,i}^{\mathcal{T}}; \theta)$ exceeds the truncation threshold $s$ . However, only a small fraction of samples (proportional to $\alpha$ ) typically satisfy this condition. As a result, most samples contribute no gradient, leading to fewer effective updates and slowing or even halting the optimization process. 2) Exploding Gradient Problem: For samples + +where $\ell(\mathcal{D}_{\tau,i}^{\mathcal{C}},\mathcal{D}_{\tau,i}^{\mathcal{T}};\theta) \geq s$ , the gradient is scaled by $1 / \alpha$ . Since $\alpha$ is usually a small value (e.g., 0.01 or 0.05), this scaling can cause the gradient magnitude to grow excessively large, leading to exploding gradients and destabilizing the optimization process. 3) High Gradient Variance: Because only a small number of high-loss samples contribute to the gradient, the variance of the gradient estimates is significantly high. This high variance makes the optimization trajectory highly unstable and can cause the algorithm to converge slowly or get stuck in local extrema. In summary, the combination of vanishing gradients, exploding gradients, and high gradient variance leads to inefficiency and instability in stochastic optimization algorithms for CVaR objectives. + +# 4. Algorithm for Tail Task Risk Optimization + +The CVaR objective has a natural distributionally robust optimization (DRO) formulation. Given the DRO set $\mathcal{Q}_{\alpha} = \{q \in \mathbb{R}^{M} | 1 \leq q_{m} \leq 1 / k, \sum_{m} q_{m} = 1\}$ with $k = \lfloor \alpha M \rfloor$ , the DRO problem can be formulated as the following min-max problem: + +$$ +\min _ {\theta \in \Theta} \max _ {q \in \mathcal {Q} _ {\alpha}} \left\{F _ {\alpha} (\theta , q) := \sum_ {m = 1} ^ {M} q _ {m} ^ {\top} R _ {m} (\theta) \right\}, \tag {6} +$$ + +The above problem is a finite-sum convex-concave saddle-point problem if $R_{m}(\theta)$ is a convex function. However, introducing neural networks often renders $R_{m}(\theta)$ nonconvex, leading to variance in algorithms like stochastic mirror descent and stochastic mirror prox, designed for finite-sum convex-concave saddle-point problems. This variance results in instability during the parameter learning process. + +Here, inspired by (Carmon & Hausler, 2022; Yu et al., 2024), we incorporate variance reduction into the stochastic mirror prox algorithm. Specifically, we introduce a simple and effective task-sampling technique that selects $M$ samples, one for each task, to form the stochastic gradients. Additionally, we incorporate variance reduction strategies within each task to accelerate the convergence rate. + +# 4.1. Distance-generating Function and Bregman Setups + +Let $\| \cdot \| _x$ denote a general norm on a finite-dimensional Banach space $\mathcal{E}_x$ , and its dual norm is defined as $\| \cdot \|_{x,*} = \sup_{y\in \mathcal{E}_x}\{\langle x,y\rangle \mid \| y\| _x\leq 1\}$ . We define the set $[\mathcal{S}] = \{1,2,\dots ,S\}$ and its index set $[\mathcal{S}]^0 = \{0,1,\dots ,S - 1\}$ , where $S$ is a positive integer. For $(\theta ,q)\in \Theta \times \mathcal{Q}_{\alpha}$ where $\mathcal{Q}_{\alpha}$ represents the simplex, we view $(\theta ,q)$ as the concatenation of $\theta$ and $q$ . The gradient $\nabla F_{\alpha}(\theta ,q)$ is expressed as $\nabla F_{\alpha}(\theta ,q) = (\nabla_{\theta}F_{\alpha}(\theta ,q); - \nabla_{q}F_{\alpha}(\theta ,q))$ , denoting the combined gradient with respect to $\theta$ and $q$ . + +For primal-dual methods of the mirror descent type(Beck + +& Teboulle, 2003), it is necessary to define a distance-generating function and the corresponding Bregman divergence. + +Definition 4.1. (Distance-generating function) A continuous function $\psi_x: X \to \mathbb{R}$ is termed a distance-generating function with modulus $\alpha_x$ relative to the norm $\| \cdot \|_x$ if the following conditions hold: 1) The set $X^\circ = \{x \in X \mid \partial \psi_x(x) \neq 0\}$ is convex; 2) $\psi_x$ is continuously differentiable and $\alpha_x$ -strongly convex with respect to $\| \cdot \|_x^2$ , i.e., $\langle \nabla \psi_x(x_1) - \nabla \psi_x(x_2), x_1 - x_2 \rangle \geq \alpha_x \| x_1 - x_2 \|_x^2, \forall x_1, x_2 \in X^\circ$ . + +Definition 4.2. (Bregman divergence) The Bregman divergence $B_{x}: X \times X^{\circ} \to \mathbb{R}_{+}$ associated with the distance-generating function $\psi_{x}$ is defined as: $B_{x}(x, x^{\circ}) = \psi_{x}(x) - \psi_{x}(x^{\circ}) - \langle \nabla \psi_{x}(x^{\circ}), x - x^{\circ} \rangle$ . + +In this work, we equip $\Theta$ with a distance-generating function $\psi_{\theta}(\cdot)$ , which has modulus $\alpha_{\theta}$ with respect to a norm $\| \cdot \|_{\theta}$ on $\mathcal{E}$ . Similarly, $\psi_q(\cdot)$ is defined with modulus $\alpha_{q}$ relative to the norm $\| \cdot \|_q$ . The choice of $\psi_x$ and $\| \cdot \|_x$ should align with the geometric structure of the domain. In this paper, we use $\psi_q(q) = \sum_{i=1}^{m} q_i \log q_i$ , which corresponds to the entropy function. + +The following standard assumptions are also widely used in Bregman setup analyses. + +Assumption 4.3. (Boundedness of the Domain) The diameter of the domain $\Theta$ under the distance-generating function $\psi_{\theta}(\cdot)$ is bounded by a constant $D_{\theta}$ , i.e., $\max_{\theta \in \Theta} \psi_{\theta}(\theta) - \min_{\theta \in \Theta} \psi_{\theta}(\theta) \leq D_{\theta}^{2}$ . Similarly, the simplex $\mathcal{Q}_{\alpha}$ is assumed to be bounded by $D_q$ . Since the entropy function $\psi_q$ is used, we have $D_q = \sqrt{\ln M}$ . + +We define the Cartesian product space $\mathcal{E} \times \mathbb{R}^M$ with its associated norm and dual norm as follows. For any $(\theta, q) \in \Theta \times \mathbb{R}^M$ and any $(\theta, q)^* = (\theta^*; q^*) \in \mathcal{E}^* \times \mathbb{R}^M$ : + +$$ +\begin{array}{l} \| (\theta , q) \| := \sqrt {\frac {\alpha_ {\theta}}{2 D _ {\theta} ^ {2}} \| \theta \| _ {\theta} ^ {2} + \frac {\alpha_ {q}}{2 D _ {q} ^ {2}} \| q \| _ {q} ^ {2}}, \\ \left\| (\theta , q) ^ {*} \right\| _ {*} := \sqrt {\frac {2 D _ {\theta} ^ {2}}{\alpha_ {\theta}} \left\| \theta^ {*} \right\| _ {\theta , *} ^ {2} + \frac {2 D _ {q} ^ {2}}{\alpha_ {q}} \left\| q ^ {*} \right\| _ {q , *} ^ {2}}}. \tag {7} \\ \end{array} +$$ + +The corresponding distance-generating function is defined as $\psi((\theta, q)) := \frac{1}{2D_{\theta}^{2}} \psi_{\theta}(\theta) + \frac{1}{2D_{q}^{2}} \psi_{q}(q)$ . + +It is straightforward to verify that $\psi((\theta, q))$ is 1-strongly convex with respect to the norm $\|\cdot\|$ defined in Eq. (7). Using this, we define the Bregman divergence $B: (\Theta \times \mathcal{Q}_{\alpha}) \times (\Theta \times \mathcal{Q}_{\alpha})^{\circ} \to \mathbb{R}_{+}$ as: $B((\theta, q), (\theta, q)^{\circ}) := \psi((\theta, q)) - \psi((\theta, q)^{\circ}) - \langle \nabla \psi((\theta, q)^{\circ}), (\theta, q) - (\theta, q)^{\circ} \rangle$ . + +# 4.2. Double-loop Structure of Variance Reduction + +Unfortunately, this method proves ineffective when stochastically optimizing CVaR due to the high variance in the + +mini-batch gradient estimates of CVaR, particularly for nonconvex problems like training deep neural networks. The double-loop structure of variance reduction is the commonly used strategy in optimization algorithms. It consists of an outer loop and an inner loop, which separate global updates from local refinements, providing a structured approach to achieving optimization goals. Inspired by the previous work (Carmon & Hausler, 2022; Alacaoglu & Malitsky, 2022), we adopt a double-loop structure based on variance reduction. The outer loop computes snapshot points in both the primal and dual spaces, while the inner loop uses a modified mirror prox method. Instead of computing two stochastic gradients, we use a combination of a mini-batch gradient and a stochastic gradient, building upon classical mirror prox algorithms. + +Outer Loop The outer loop follows a standard variance reduction procedure (Johnson & Zhang, 2013), periodically computing snapshot points based on the weighted average of previous iterates. Let the snapshot in the $s$ -th outer loop be $(\theta, q)^s$ , and $\nabla \psi((\theta, q)^s)$ be the corresponding mirror snapshot. Formally, we define $(\theta, q)^*$ as: + +$$ +(\theta , q) ^ {s} = \frac {\sum_ {k = 1} ^ {K _ {s - 1}} w _ {k - 1} ^ {s - 1} (\theta , q) _ {k} ^ {s - 1}}{\sum_ {k = 1} ^ {K _ {s}} w _ {k - 1} ^ {s - 1}}, \tag {8} +$$ + +and the mirror snapshot is + +$$ +\nabla \psi \left(\left(\theta , q\right) ^ {s}\right) = \frac {\sum_ {k = 1} ^ {K _ {s - 1}} w _ {k - 1} ^ {s - 1} \nabla \psi \left(\left(\theta , q\right) _ {k} ^ {s - 1}\right)}{\sum_ {k = 1} ^ {K _ {s}} w _ {k - 1} ^ {s - 1}}, \tag {9} +$$ + +The full gradient $\nabla F_{\alpha}((\theta ,q)^{s})$ is then computed as: + +$$ +\nabla_ {\theta} F _ {\alpha} \left(\theta^ {s}, q ^ {s}\right) = \sum_ {m = 1} ^ {M} q _ {m} ^ {s} \nabla R _ {m} \left(\theta^ {s}\right) \tag {10} +$$ + +$$ +\nabla_ {q} F _ {\alpha} \left(\theta^ {s}, q ^ {s}\right) = - \left[ R _ {1} \left(\theta^ {s}\right), \dots , R _ {M} \left(\theta^ {s}\right) \right] ^ {\top} +$$ + +Inner Loop In the $k$ -th inner loop, we updates $\mathbf{z}_k$ using a modified mirror prox step: + +$$ +\begin{array}{l} (\theta , q) _ {k + 1 / 2} ^ {s} = \arg \min _ {(\theta , q) \in \mathcal {Z}} \left\{\langle \nabla F _ {\alpha} ((\theta , q) ^ {s}), (\theta , q) \rangle \right. \\ \left. + w _ {k} ^ {s} B \left(\left(\theta , q\right), \left(\theta , q\right) ^ {s}\right) + \left(1 - w _ {k} ^ {s}\right) B \left(\left(\theta , q\right), \left(\theta , q\right) _ {k} ^ {s}\right) \right\}, \tag {11} \\ \end{array} +$$ + +which utilizes the full gradient $\nabla F_{\alpha}(\theta^{s},q^{s})$ . The above update employs techniques such as "negative momentum" (Driggs et al., 2022) to enhance convergence speed. Note that the above prox point using a full gradient differs from traditional mirror prox algorithms (Nemirovski, 2004), which use stochastic gradients. Although a full gradient can achieve more stable solutions, it is time-consuming. To alleviate computational complexity, we can replace the full gradient (Eq. (10)) with a mini-batch gradient. + +# 4.3. Variance-reduced Stochastic Gradient Estimator + +After $(\theta ,q)_{k + 1 / 2}^{s}$ is computed, we sample data points from each task (dataset) to construct the stochastic gradient. For the $m$ -th task, we sample uniformly from the corresponding dataset $\mathcal{D}_{\tau ,m}$ . The sampling process is denoted as: 1) for each dataset, uniformly sampling one sample: $Z_{k,m}^{s}\sim U(\{Z_{m,i}\}_{i = 1}^{n_m}),\forall m\in [M];2)$ forming the task-specific samples as $Z_{k}^{s}:= \{Z_{k,m}^{s}\}_{m = 1}^{M}$ . + +The task sampling strategy ensures that stochastic gradients utilize information from all $M$ datasets. In this case, we can get the task-specific stochastic gradient based on the task-specific samples $\{Z_{k,m}^{s}\}_{m = 1}^{M}$ : + +$$ +\begin{array}{l} \nabla_ {\theta} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {s}, q ^ {s}\right) = \sum_ {m = 1} ^ {M} q _ {m} ^ {s} \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right) \\ \nabla_ {q} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {s}, q ^ {s}\right) = - \left[ \ell_ {1} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right), \dots , \ell_ {M} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right) \right] ^ {\top} \tag {12} \\ \end{array} +$$ + +This formulation balances randomness across tasks, effectively leveraging the two-level finite-sum structure of Eq. (6). + +Leveraging variance reduction techniques from (Johnson & Zhang, 2013), we construct a robust and efficient approach to minimize variance in stochastic gradients while maintaining computational efficiency. Specifically, we define the variance-reduced stochastic gradient estimator with the aid of the stochastic gradient at the $s$ -th snapshot $(\theta, q)^{s}$ and the full gradient as follows: + +$$ +\begin{array}{l} g _ {k} ^ {s} = \nabla F _ {\alpha} \left(\left\{Z _ {k, m} ^ {s} \right\} _ {m = 1} ^ {M}; (\theta , q) _ {k + 1 / 2} ^ {s}\right) \\ - \nabla F _ {\alpha} \left(\left\{Z _ {k, m} ^ {s} \right\} _ {m = 1} ^ {M}; (\theta , q) ^ {s}\right) + \nabla F _ {\alpha} ((\theta , q) ^ {s}). \tag {13} \\ \end{array} +$$ + +where the second term $\nabla F_{\alpha}\left(\{Z_{k,m}^{s}\}_{m=1}^{M}; (\theta, q)^{s}\right)$ is given in Eq. (12), the third term $\nabla F_{\alpha}((\theta, q)^{s})$ is given in Eq. (10). The above gradient is an unbiased estimator since the samples across all tasks are used. + +With the aid of the mirror prox method, the next step is to compute $(\theta ,q)_{k + 1}^{s}$ : + +$$ +\begin{array}{l} (\theta , q) _ {k + 1} ^ {s} = \arg \min _ {(\theta , q) \in \Theta \times \mathcal {Q} _ {\alpha}} \left\{\eta_ {k} ^ {s} \langle g _ {k} ^ {s}, (\theta , q) \rangle \right. \\ \left. + w _ {k} ^ {s} B \left(\left(\theta , q\right), \left(\theta , q\right) ^ {s}\right) + \left(1 - w _ {k} ^ {s}\right) B \left(\left(\theta , q\right), \left(\theta , q\right) _ {k} ^ {s}\right) \right\}. \tag {14} \\ \end{array} +$$ + +In the above stochastic gradient, the variance-reduced stochastic gradient estimator $g_{k}^{s}$ is used instead of the raw stochastic gradient at $(\theta ,q)_{k}^{s}$ to achieve variance reduction. The final solution is given as: + +$$ +(\theta , q) ^ {S} = \frac {\sum_ {s = 0} ^ {S - 1} \sum_ {k = 0} ^ {K _ {s} - 1} \eta_ {k} ^ {s} (\theta , q) _ {k + 1} ^ {s}}{\sum_ {s = 0} ^ {S - 1} \sum_ {k = 0} ^ {K _ {s} - 1} \eta_ {k} ^ {s}}, \tag {15} +$$ + +Algorithm 1 Variance-Reduced Stochastic Mirror Prox Algorithm for Tail Task Risk Optimization + +Input: Risk functions $\{\ell_m(\theta)\}_{m\in [M]}$ related to NPs, epoch number $S$ , iteration numbers $\{K_s\}$ , learning rates $\{\eta_k^s\}$ , and weights $\{w_k^s\}$ . + +1: Initialize parameters $(\theta, q)_0 = (\theta_0, q_0) = \arg \min_{(\theta, q) \in \Theta \times \mathcal{Q}_\alpha} \psi((\theta, q))$ as the starting point. +2: for $s = 0$ to $S - 1$ do +3: Compute the snapshot $(\theta ,q)^s$ and the mirror snapshot $\nabla \psi ((\theta ,q)^s)$ according to Eq.(8) and Eq.(9), respectively. +4: Compute the full gradient $\nabla F_{\alpha}((\theta ,q)^{s})$ according to Eq. (10). (mini-batch is feasible) +5: for $k = 0$ to $K_{s} - 1$ do +6: Compute $(\theta ,q)_{k + 1 / 2}^{s}$ according to Eq.(11). +7: For each $m\in [M],Z_{k,m}^{s}\sim U(\{Z_{m,i}\}_{i = 1}^{n_m})$ +8: Compute the variance-reduced stochastic gradient estimator $g_{k}^{s}$ defined in Eq.(13). +9: Compute $(\theta ,q)_{k + 1}^{s}$ according to Eq.(14). +10: end for +11: Set $(\theta ,q)_0^{s + 1} = (\theta ,q)_{K_s^*}^s$ +12: end for +13: Return $(\theta ,q)^{S}$ according to Eq. (15). + +which adopts adaptive learning rates $\eta_k^s$ as weighting coefficients for the cumulated prox points. The whole variance-reduced stochastic mirror prox algorithm for tail task risk optimization is given in Algorithm 1. + +# 4.4. Discussion + +The task sampling method uniformly selects data across all tasks, thus reducing the variance of stochastic gradients. This approach leverages the hierarchical structure of the objective function to achieve a Lipschitz constant reduction, ultimately lowering the computational complexity. In the gradient computation process of the outer loop, the weighting coefficient for the gradient from the previous step is typically determined using an average weighting strategy, i.e., $w_{k - 1}^{s - 1} = \frac{1}{K_{s - 1}}, \forall k = 1, \dots, K_{s - 1}$ . However, we can set it as a learning rate $\eta_k^s$ as shown in Eq. (15). In many algorithms, the learning rate is gradually decreased, meaning that earlier iterations may contribute larger weights. This operation can reduce fluctuations in each gradient update and improve the stability of the algorithm. Additionally, by comprehensively leveraging historical solutions or gradients, the quality of the current solution can be enhanced. In summary, by using a variance-reduced gradient estimator in the inner loop, our solution significantly reduces gradient variance, improving convergence rates. The mirror prox technique ensures better handling of complex constraint sets and non-Euclidean geometries, making the optimization adaptable to various tasks. The final solution $(\theta ,q)^S$ aggregates the + +Table 1. Comparison of our robust NPs with the baselines on log-likelihood of the target points on two real-world datasets: CelebA and EMNIST. We train each method with 5 different seeds and report the mean and standard deviation. + +
MethodCelebAEMNIST
Seen (0-9)Unseen (10-46)
CNP2.1601±0.0040.7373±0.0040.4854±0.004
BCNP2.1652±0.0050.7552±0.0050.4982±0.006
SCNP2.1713±0.0040.7631±0.0060.5125±0.008
RCNP2.1896±0.0050.7879±0.0050.5362±0.006
NP2.4816±0.0150.7953±0.0020.5847±0.003
BNP2.7691±0.0030.8706±0.0050.7167±0.012
SNP2.8714±0.0060.8873±0.0030.7021±0.009
RNP2.8915±0.0060.8911±0.0050.7121±0.006
ANP2.9214±0.0040.9815±0.0060.8843±0.003
BANP2.9411±0.0080.9833±0.0070.8891±0.003
SANP2.9518±0.0040.9753±0.0080.8924±0.005
RANP2.9718±0.0060.9881±0.0040.8967±0.005
ConvNP3.1241±0.0041.1525±0.0211.0351±0.006
BConvNP3.1683±0.0051.1651±0.0091.0511±0.004
SConvNP3.2135±0.0061.2125±0.0061.0698±0.008
RConvNP3.2319±0.0051.2348±0.0051.0721±0.006
TNP4.4042±0.0201.5501±0.0041.4196±0.006
BTNP4.4151±0.0041.5561±0.0031.4221±0.004
STNP4.4124±0.0031.5547±0.0021.4236±0.003
RTNP4.4226±0.0051.5572±0.0021.4413±0.004
+ +Table 2. Bayesian optimization experiments on data generated by different GP kernels + +
MethodRBFMatérn 5/2Periodic
ANP0.1245±0.0030.1518±0.0030.1892±0.002
BANP0.1341±0.0030.1316±0.0040.1788±0.005
SANP0.1142±0.0020.1201±0.0020.1672±0.001
RANP0.1025±0.0020.1171±0.0030.1779±0.006
TNP0.1125±0.0030.1451±0.0010.1715±0.003
BTNP0.1037±0.0060.1455±0.0030.1691±0.008
STNP0.0998±0.0040.1351±0.0060.1561±0.002
RTNP0.0915±0.0040.1289±0.0030.1463±0.004
+ +updates through weighted averaging, enabling a stable and high-quality output. + +# 5. Experiments + +We started with learning predictive functions on synthetic datasets, and high-dimensional tasks, e.g., image completion, Bayesian optimization, and contextual bandits, were performed to evaluate the properties of the NP-related models. We compare the baselines NP classes (CNP (Garnelo et al., 2018a), NP (Garnelo et al., 2018b), ANP (Kim et al., 2019), ConvNP (Foong et al., 2020), and TNP (Nguyen & Grover, 2022)), bootstrapping versions (Lee et al., 2020) (BCNP, BNP, BANP, BConvNP, and BTNP), stable versions (Liu et al., 2024a) (SCNP, SNP, SANP, SConvNP, and STNP) to our robust versions (RCNP, RNP, RANP, RConvNP, and RTNP). + +![](images/853d67ce73f1e9f5cc04565b14ab598ec4289b0257a47f2b6cf7d7e925e3ffd8.jpg) +(a) CelebA + +![](images/66301187d5f72c6467eae4a64dd601fcf6d38de79bcb01c2297d8613014592fc.jpg) +(b) EMNIST +Figure 2. Visualizations of CNP, ANP, and their bootstrapping versions (BCNP, BANP), stable versions (SNP, SANP), and robust versions (RCNP, RANP) for image completion tasks. + +# 5.1. Image Completion + +Following (Kim et al., 2019), we compared the models on image completion tasks on CelebA (Liu et al., 2015) and EMNIST (Cohen et al., 2017), where each image is downsampled to $32 \times 32$ . More detailed experimental settings are given in the Appendix. Table 1 lists the log-likelihood of the target point of our robust NPs over the baselines on two datasets. Notably, on the EMNIST dataset, in addition to the standard experiments, we also conducted model-data mismatch experiments. Specifically, we trained on the first 10 classes and tested not only on these first 10 classes (seen classes) but also on the remaining 37 classes (unseen classes). Similar to 1D regression, our robust NPs still outperform all baselines, especially in model-data mismatch settings (unseen classes). In the mismatch setting, all the models become less accurate, but NPs with our robust solutions are affected less, which is similar to the results in 1D regression tasks. Furthermore, we visualize the generated images and Figure 2 shows that the proposed robust NPs produce noticeably better-completed images than the baselines. + +# 5.2. Bayesian Optimization + +Following the setting in BANP (Lee et al., 2020; Nguyen & Grover, 2022), we conducted the Bayesian optimization experiment, see Appendix for details. Taking GP data with RBF, Matérn 5/2, and Periodic prior functions as examples, we gave the results of ANP, TNP, corresponding bootstrapping NPs (BANP, BTNP), stable NPs (SANP, STNP), and + +Table 3. Comparison of our robust NPs with the baselines on cumulative regret on contextual bandit problems with different values of $\gamma$ . We run each model 50 times for each value of $\gamma$ and report the mean and standard deviation. + +
Methodγ = 0.7γ = 0.9γ = 0.95γ = 0.99γ = 0.995γ = 0.999
CNP4.0816±0.3218.1512±0.4118.0125±0.39326.771±0.79138.833±0.98693.2232±2.564
BCNP5.8921±0.51610.2726±1.15310.0116±1.07529.6628±1.21642.2516±1.15195.5624±3.616
SCNP3.5266±0.4158.29152±0.5257.2852±0.25824.5264±0.61937.4265±0.94689.8256±3.669
RCNP3.1876±0.3647.3115±0.6577.6796±0.64723.4416±0.54735.5597±0.86387.1514±2.165
NP1.5626±0.1252.9616±0.2914.2513±0.25118.2417±0.46525.5646±0.19562.7342±1.503
BNP62.5115±1.07657.4966±2.13858.2276±2.28558.9122±3.78562.5021±5.15677.5255±6.226
SNP1.4356±0.2142.4451±0.5523.4056±0.24217.2551±0.35723.5226±0.22660.8862±0.952
RNP1.4581±0.1532.5632±0.3663.2367±0.19515.6269±1.32922.5154±0.85158.2676±1.124
ANP1.6246±0.1724.0558±0.3165.3983±0.50619.5712±0.67827.6516±0.95273.3661±5.956
BANP5.3165±15.61415.2415±19.15634.1167±24.16758.2314±23.66262.3364±17.99469.3436±18.362
SANP1.5878±0.2053.6691±0.5644.8767±0.70418.2519±0.55225.1169±0.89171.5169±3.537
RANP1.2555±0.1622.6256±0.5363.8987±0.66316.5155±0.64124.1519±0.98370.1414±1.368
ConvNP1.5035±0.1042.4552±0.3173.1761±0.44716.3585±0.98825.2359±1.25172.3526±4.257
BConvNP2.2563±0.2513.6762±0.3764.4626±0.55118.2516±1.12126.3629±1.35774.6324±4.257
SConvNP1.3846±0.5362.0081±0.2082.2662±0.22615.2315±0.79623.5266±1.44770.1251±3.654
RConvNP1.1536±0.1031.7369±0.2491.9854±0.34113.2352±0.62719.2516±2.35261.1273±2.226
TNP1.1895±0.9421.7057±0.4182.5562±0.4383.5795±1.2254.6867±1.0929.5694±0.465
BTNP3.3686±0.3562.7356±0.5234.6371±0.6285.2526±1.6437.3521±1.36711.2657±2.277
STNP1.1637±0.1281.4362±0.3782.1526±0.5742.3612±1.5223.5267±1.2678.9824±0.678
RTNP1.2155±0.2041.5962±0.5391.1371±0.3482.0813±0.8963.1231±0.9577.2355±1.429
+ +![](images/620881e4d7819aafefdf55124d5ac6dc8114535a05ce17adcecac22ad24f4647.jpg) +Figure 3. Regret performance on 1D Bayesian optimization tasks. For each kernel, we generate 100 functions and report the mean and standard deviation. + +robust NPs (RANP, RTNP). Note that we use NPs as the surrogate functions and Upper Confidence Bound (UCB) as the acquisition function. To maintain consistent comparison, we standardized the initializations and normalized the results. For each objective function, we run Bayesian optimization for 100 iterations, and simple regret is used as the evaluation metric. As shown in Table 2 and Figure 3, we can see that our robust solutions consistently achieve lower regret than other NPs. + +# 5.3. Contextual Bandits + +Following (Riquelme et al., 2018; Nguyen & Grover, 2022), we focus on the contextual bandit problem, which is a type of reinforcement learning problem where an agent makes a series of decisions, each with an associated context, to maximize cumulative reward. More detailed experimental settings, including problem definition, training, and testing procedure can be given in the Appendix. Considering this + +![](images/67f2d9ab36aac28254feb173314e9b63ac1a7db698568e4ce107bccb26af893a.jpg) +(a) CelebA + +![](images/395af638a751f55b57218663ba25863b0d5c6a440fe050a1ad1cf6ee6dc6a7d1.jpg) +(b) EMNIST(Seen) +Figure 4. The histograms of task risks in image completion tasks. + +problem involves dividing a fixed-sized circle into a low-reward region (the central circle) and four high-reward regions (the remaining outer ring divided into four equal parts), a control variable $\gamma$ is introduced to manage the proportion between the high and low-reward regions. The higher the $\gamma$ value, the larger the central circle and the smaller the outer ring, and vice versa. We conducted experiments with different $\gamma$ , and Table 3 presents the experimental results of all methods. We can see that NPs with our robust solutions outperform all baselines by a large margin in most settings, especially for harder settings (larger value of $\gamma$ ). We obtained similar experimental results as in (Nguyen & Grover, 2022), where the performance of models using the attention mechanism is generally lower than that of models without the attention mechanism, which is contrary to the results obtained in other experimental tasks. + +# 5.4. Risk Distribution + +As we stated previously, the proposed strategy can iteratively reshape the task risk distribution to increase robustness, i.e., transport the probability mass in high-risk regions + +to the lower-risk regions. To verify this point, we present the task risk distributions with and without using our strategy. Specifically, taking RANP as an example, Figure 4 shows the task risk distributions of ANP and RANP on image completion tasks with two different kernels. We select MSE as the risk measure. Overall, it can be seen that the robust solutions shift the original risk distribution to the left, reducing the proportion of high-risk tasks and effectively demonstrating the robustness of the proposed model. + +# 6. Conclusion and Future Work + +The paper introduces a novel approach to enhance the robustness of Neural Processes (NPs) in skill transfer learning across different tasks. Traditional NPs focus on empirical risk minimization, which can lead to varying levels of fast adaptation, potentially resulting in catastrophic outcomes in risk-sensitive tasks. To address this problem, we propose incorporating controllable expected tail meta risk, allowing control over the worst-case fast adaptation scenarios at a given probabilistic level. By reformulating the risk minimization as a distributional robust formulation, we introduce a variance-reduced stochastic mirror prox algorithm with double-loop structures and leverage the two-level structure to get a stochastic gradient among samples across all tasks. The proposed risk and optimization strategy is versatile, working with various NPs while providing a less biased approximation. + +A common optimization approach for the minimax problem of CVaR involves leveraging a two-player game framework. Designing efficient methods to optimize the game between the two players is a topic worth exploring. Although our variance-reduced stochastic mirror prox algorithm has been validated for its effectiveness both intuitively and experimentally, this kind of algorithm is primarily designed for convex optimization. Models with deep neural networks typically involve high-dimensional, non-convex objectives for which the method lacks general convergence guarantees. One future point is to investigate the algorithms' convergence guarantee. Additionally, improving the efficiency of the overall optimization process is another point of interest. + +# Acknowledgements + +This work was partly supported by the Talent Fund of Beijing Jiaotong University (2024XKRC075); Beijing Natural Science Foundation (4244096); The National Natural Science Foundation of China under Grant (62406019, 62436001, 62176020); The Joint Foundation of the Ministry of Education for Innovation team (8091B042235); The National Key Research and Development Program of China (2024YFE0202900); The State Key Laboratory of Rail Traffic Control and Safety (RCS2023K006); Natural + +Science Foundation of Chongqing (Grant CSTB2023NSCQ-MSX1020). + +# Impact Statement + +This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Alacaoglu, A. and Malitsky, Y. Stochastic variance reduction for variational inequality methods. In Conference on Learning Theory, pp. 778-816. PMLR, 2022. +Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. +Beck, A. and Teboulle, M. Mirror descent and nonlinear projected subgradient methods for convex optimization. Operations Research Letters, 31(3):167-175, 2003. +Ben-Tal, A. and Nemirovski, A. Robust solutions of uncertain linear programs. Operations research letters, 25(1): 1-13, 1999. +Bertsimas, D. and Sim, M. The price of robustness. Operations research, 52(1):35-53, 2004. +Bertsimas, D., Litvinov, E., Sun, X. A., Zhao, J., and Zheng, T. Adaptive robust optimization for the security constrained unit commitment problem. IEEE transactions on power systems, 28(1):52-63, 2012. +Bruinsma, W. P., Markou, S., Requiema, J., Foong, A. Y., Andersson, T. R., Vaughan, A., Buonomo, A., Hosking, J. S., and Turner, R. E. Autoregressive conditional neural processes. arXiv preprint arXiv:2303.14468, 2023. +Carmon, Y. and Hausler, D. Distributionally robust optimization via ball oracle acceleration. Advances in Neural Information Processing Systems, 35:35866-35879, 2022. +Chen, K., Yao, L., Zhang, D., Chang, X., Long, G., and Wang, S. Distributionally robust semi-supervised learning for people-centric sensing. In Proceedings of the AAAI conference on Artificial Intelligence, volume 33, pp. 3321-3328, 2019. +Chow, Y., Ghavamzadeh, M., Janson, L., and Pavone, M. Risk-constrained reinforcement learning with percentile risk criteria. Journal of Machine Learning Research, 18 (167):1-51, 2018. +Cohen, G., Afshar, S., Tapson, J., and Van Schaik, A. Einstein: Extending mnist to handwritten letters. In 2017 International Joint Conference on Neural Networks (IJCNN), pp. 2921-2926. IEEE, 2017. + +Cotton, R. J., Sinz, F., and Tolias, A. Factorized neural processes for neural processes: K-shot prediction of neural responses. Advances in Neural Information Processing Systems, 33:11368-11379, 2020. +Curi, S., Levy, K. Y., Jegelka, S., and Krause, A. Adaptive sampling for stochastic risk-averse learning. Advances in Neural Information Processing Systems, 33:1036-1047, 2020. +Driggs, D., Ehrhardt, M. J., and Schonlieb, C.-B. Accelerating variance-reduced stochastic gradient methods. Mathematical Programming, pp. 1-45, 2022. +Dutordoir, V., Saul, A., Ghahramani, Z., and Simpson, F. Neural diffusion processes. In International Conference on Machine Learning, pp. 8990-9012. PMLR, 2023. +Fan, Y., Lyu, S., Ying, Y., and Hu, B. Learning with average top-k loss. Advances in neural information processing systems, 30, 2017. +Foong, A., Bruinsma, W., Gordon, J., Dubois, Y., Requeima, J., and Turner, R. Meta-learning stationary stochastic process prediction with convolutional neural processes. Advances in Neural Information Processing Systems, 33: 8284-8295, 2020. +Gabrel, V., Murat, C., and Thiele, A. Recent advances in robust optimization: An overview. European journal of operational research, 235(3):471-483, 2014. +Gagne, C. and Dayan, P. Two steps to risk sensitivity. Advances in Neural Information Processing Systems, 34: 22209-22220, 2021. +Garnelo, M., Rosenbaum, D., Maddison, C., Ramalho, T., Saxton, D., Shanahan, M., Teh, Y. W., Rezende, D., and Eslami, S. A. Conditional neural processes. In International Conference on Machine Learning, pp. 1704-1713. PMLR, 2018a. +Garnelo, M., Schwarz, J., Rosenbaum, D., Viola, F., Rezende, D. J., Eslami, S., and Teh, Y. W. Neural processes. arXiv preprint arXiv:1807.01622, 2018b. +Gordon, J., Bruinsma, W. P., Foong, A. Y., Requeima, J., Dubois, Y., and Turner, R. E. Convolutional conditional neural processes. arXiv preprint arXiv:1910.13556, 2019. +Gotoh, J.-y. and Takeda, A. Cvar minimizations in support vector machines. Financial Signal Processing and Machine Learning, pp. 233-265, 2016. +Johnson, R. and Zhang, T. Accelerating stochastic gradient descent using predictive variance reduction. Advances in neural information processing systems, 26, 2013. + +Jones, D. R., Schonlau, M., and Welch, W. J. Efficient global optimization of expensive black-box functions. Journal of Global optimization, 13:455-492, 1998. +Kawano, M., Kumagai, W., Sannai, A., Iwasawa, Y., and Matsuo, Y. Group equivariant conditional neural processes. arXiv preprint arXiv:2102.08759, 2021. +Kim, H., Mnih, A., Schwarz, J., Garnelo, M., Eslami, A., Rosenbaum, D., Vinyals, O., and Teh, Y. W. Attentive neural processes. arXiv preprint arXiv:1901.05761, 2019. +Kingma, D. P. and Welling, M. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +Lee, J., Lee, Y., Kim, J., Yang, E., Hwang, S. J., and Teh, Y. W. Bootstrapping neural processes. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M. F., and Lin, H. (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 6606-6615. Curran Associates, Inc., 2020. +Lin, X., Wu, J., Zhou, C., Pan, S., Cao, Y., and Wang, B. Task-adaptive neural process for user cold-start recommendation. In Proceedings of the Web Conference, pp. 1306-1316, 2021. +Liu, H., Jing, L., Yu, D., Zhou, M., and Ng, M. Learning intrinsic and extrinsic intentions for cold-start recommendation with neural stochastic processes. In Proceedings of the 30th ACM International Conference on Multimedia, pp. 491-500, 2022. +Liu, H., Jing, L., and Yu, J. Neural processes with stability. Advances in Neural Information Processing Systems, 36, 2024a. +Liu, H., Zhou, M., Song, M., Ouyang, D., Li, Y., Jing, L., Yu, J., and Ng, M. K. Learning hierarchical preferences for recommendation with mixture intention neural stochastic processes. IEEE Transactions on Knowledge and Data Engineering, 2024b. +Liu, Z., Luo, P., Wang, X., and Tang, X. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), December 2015. +Maraval, A., Zimmer, M., Grosnit, A., and Bou Ammar, H. End-to-end meta-bayesian optimisation with transformer neural processes. Advances in Neural Information Processing Systems, 36, 2024. +Nemirovski, A. Prox-method with rate of convergence o $(1 / t)$ for variational inequalities with lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM Journal on Optimization, 15(1): 229-251, 2004. + +Nguyen, T. and Grover, A. Transformer neural processes: uncertainty-aware meta learning via a sequence modeling. In International Conference on Machine Learning, pp. 16569-16594. PMLR, 2022. +Norcliffe, A., Bodnar, C., Day, B., Moss, J., and Lio, P. Neural ode processes. arXiv preprint arXiv:2103.12413, 2021. +Ogryczak, W. and Tamir, A. Minimizing the sum of the k largest functions in linear time. Information Processing Letters, 85(3):117-122, 2003. +Pakman, A., Wang, Y., Mitelut, C., Lee, J., and Paninski, L. Neural clustering processes. In International Conference on Machine Learning, pp. 7455-7465. PMLR, 2020. +Park, Y.-J. and Choi, H.-L. A neural process approach for probabilistic reconstruction of no-data gaps in lunar digital elevation maps. Aerospace Science and Technology, 113:106672, 2021. +Pinto, L., Davidson, J., Sukthankar, R., and Gupta, A. Robust adversarial reinforcement learning. In International conference on machine learning, pp. 2817-2826. PMLR, 2017. +Quaranta, A. G. and Zaffaroni, A. Robust optimization of conditional value at risk and portfolio selection. Journal of Banking & Finance, 32(10):2046-2056, 2008. +Rahimian, H. and Mehrotra, S. Distributionally robust optimization: A review. arXiv preprint arXiv:1908.05659, 2019. +Rasmussen, C. E. Gaussian processes in machine learning. In Summer school on machine learning, pp. 63-71. Springer, 2003. +Riquelme, C., Tucker, G., and Snoek, J. Deep bayesian bandits showdown: an empirical comparison of bayesian deep networks for thompson sampling. In International Conference on Learning Representations, 2018. +Rockafellar, R. T., Uryasev, S., et al. Optimization of conditional value-at-risk. Journal of risk, 2:21-42, 2000. +Sani, A., Lazaric, A., and Munos, R. Risk-aversion in multi-armed bandits. Advances in neural information processing systems, 25, 2012. +Schölkopf, B., Smola, A. J., Williamson, R. C., and Bartlett, P. L. New support vector algorithms. Neural computation, 12(5):1207-1245, 2000. +Shalev-Shwartz, S. and Wexler, Y. Minimizing the maximal loss: How and why. In International Conference on Machine Learning, pp. 793-801. PMLR, 2016. + +Tai, J. Global perception based autoregressive neural processes. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 10487-10497, 2023. +Vadeboncoeur, A., Kazlauskaite, I., Papandreou, Y., Cirak, F., Girolami, M., and Akyildiz, O. D. Random grid neural processes for parametric partial differential equations. In International Conference on Machine Learning, pp. 34759-34778. PMLR, 2023. +Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., and Polosukhin, I. Attention is all you need. In Advances in neural information processing systems, pp. 5998-6008, 2017. +Wang, Q. and Van Hoof, H. Doubly stochastic variational inference for neural processes with hierarchical latent variables. In International Conference on Machine Learning, pp. 10018-10028. PMLR, 2020. +Wang, Q., Lv, Y., Xie, Z., Huang, J., et al. A simple yet effective strategy to robustify the meta learning paradigm. Advances in Neural Information Processing Systems, 36, 2024. +Wei, Y., Zhao, P., and Huang, J. Meta-learning hyperparameter performance prediction with neural processes. In International Conference on Machine Learning, pp. 11058-11067. PMLR, 2021. +Williamson, R. and Menon, A. Fairness risk measures. In International conference on machine learning, pp. 6786-6797. PMLR, 2019. +Ye, Z. and Yao, L. Contrastive conditional neural processes. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9687-9696, 2022. +Yildirim, Y. and Ugur, E. Learning social navigation from demonstrations with conditional neural processes. Interaction Studies, 23(3):427-468, 2022. +Yu, D., Cai, Y., Jiang, W., and Zhang, L. Efficient algorithms for empirical group distributionally robust optimization and beyond. In Proceedings of the 41st International Conference on Machine Learning, pp. 57384-57414, 2024. +Zaheer, M., Kottur, S., Ravanbakhsh, S., Poczos, B., Salakhutdinov, R., and Smola, A. Deep sets. arXiv preprint arXiv:1703.06114, 2017. + +# A. Basic Knowledge + +# A.1. CVaR + +we recall standard definitions of Value-at-Risk and Conditional Value-at-Risk which are used in our solution. + +Definition A.1. ((Conditional) Value-at-Risk) Given a random variable $X$ with cumulative distribution function $F(\cdot)$ , the Value-at-Risk VaR $v_{\alpha}(X)$ and Conditional Value-at-Risk CVaR $c_{\alpha}(X)$ at level $\alpha \in (0,1)$ are defined as: + +$$ +\begin{array}{l} v _ {\alpha} (X) = \inf \{\xi : p (X \leq \xi) \geq \alpha \}, \text {a n d} \\ c _ {\alpha} (X) = v _ {\alpha} (X) + \frac {1}{1 - \alpha} \mathbb {E} [ X - v _ {\alpha} (X) ] ^ {+}, \tag {16} \\ \end{array} +$$ + +where the notation $[\cdot ]^{+} = \max (0,\cdot)$ and $\alpha$ is a predefined confidence level or risk level. + +In machine learning, the concept of Conditional Value at Risk (CVaR) has been widely applied. For instance, the $\nu$ -SVM algorithm (Schölkopf et al., 2000), can be seen as addressing the minimization of the CVaR of the loss, as analyzed by (Gotoh & Takeda, 2016). Additionally, (Shalev-Shwartz & Wexler, 2016) suggests focusing on minimizing the maximum loss across all samples, which is equivalent to the limiting case of CVaR when $\alpha \to 0$ . Building on this, (Fan et al., 2017) extend the idea to optimize a top- $k$ average loss. Although they do not explicitly connect their criterion to CVaR, their learning strategy aligns with the CVaR framework for empirical measures. For optimization tasks, (Ogryczak & Tamir, 2003) proposed a method to minimize the maximum value of a summation over $k$ functions. This approach is closely related to the "truncated" algorithm developed by (Rockafellar et al., 2000) for CVaR optimization. CVaR has since found applications in areas such as risk-averse reinforcement learning, including works by (Sani et al., 2012) and (Chow et al., 2018), and fairness in machine learning, as discussed by (Williamson & Menon, 2019). Despite its widespread use, the original CVaR optimization approach suffers from challenges such as the high variance of mini-batch gradient estimators (Rockafellar et al., 2000). To overcome these limitations, adaptive sampling techniques (Shalev-Shwartz & Wexler, 2016) have been proposed, enabling the efficient handling of large-scale datasets and complex models, including deep neural networks (Curi et al., 2020; Wang et al., 2024). + +# A.2. Neural Processes + +The neural process aims to learn a stochastic process (random function) mapping target features $\mathbf{x}_i$ to prediction $y_i$ given the context set $\mathcal{D}^c$ as training data (a realization from the stochastic process), i.e., learning + +$$ +\log p \left(\mathbf {y} ^ {\mathcal {T}} \mid \mathbf {X} ^ {\mathcal {T}}, \mathcal {D} ^ {\mathcal {C}}\right) = \sum_ {i = 1} ^ {N} p \left(y _ {i} \mid \mathbf {x} _ {i}, \mathcal {D} ^ {\mathcal {C}}\right). \tag {17} +$$ + +Conditional neural process (CNP) (Garnelo et al., 2018a) describes $p\left(y_{i} \mid \mathbf{x}_{i}, \mathcal{D}^{\mathcal{C}}\right)$ with a deterministic neural network taking $\mathcal{D}^{\mathcal{C}}$ to output the parameters of $p\left(y_{i} \mid \mathbf{x}_{i}, \mathcal{D}^{\mathcal{C}}\right)$ . CNP consists of an encoder $f_{\mathrm{enc}}(\cdot)$ , an aggregator $f_{\mathrm{agg}}(\cdot)$ and a decoder $f_{\mathrm{dec}}(\cdot)$ ; the encoder summarizes $\mathcal{D}^{\mathcal{C}}$ and $\mathbf{x}_{i}$ into latent representations $[\mathbf{r}_1, \dots, \mathbf{r}_{|\mathcal{C}|}] \in \mathbb{R}^{|\mathcal{C}| \times d}$ via permutation-invariant neural network (Zaheer et al., 2017), where $d$ is the number of latent dimensions, and aggregator summarizes the encoded context features to a single representation $\mathbf{r}^{\mathcal{C}}$ , and decoder takes as input the aggregated representations $\mathbf{r}^{\mathcal{C}}$ and $\mathbf{x}_{i}$ and output the single output-specific mean $\mu_{i}$ and variance $\sigma_{i}^{2}$ for the corresponding value of $y_{i}$ . + +$$ +\begin{array}{l} \mathbf {r} _ {i} = f _ {\mathrm {e n c}} \left(\mathbf {x} _ {i}, y _ {i}\right), \quad i \in \mathcal {C} \\ \mathbf {r} ^ {\mathcal {C}} = \frac {1}{| \mathcal {C} |} \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} (18) \\ \phi = f _ {\mathrm {a g g}} \left(\mathbf {r} ^ {\mathcal {C}}\right) (16) \\ \left(\mu_ {i}, \sigma_ {i}\right) = f _ {\mathrm {d e c}} \left(\phi , \mathbf {x} _ {i}\right), \\ p \left(y _ {i} | \mathbf {x} _ {i}, \mathcal {D} ^ {\mathcal {C}}\right) = \mathcal {N} \left(y _ {i}; \mu_ {i}, \sigma_ {i} ^ {2}\right) \quad i \in \mathcal {T} \\ \end{array} +$$ + +where $f_{\mathrm{enc}}(\cdot)$ and $f_{\mathrm{dec}}(\cdot)$ are feed-forward neural networks. The decoder output $\mu_i$ and variance $\sigma_i^2$ are predicted mean and variance. We use Gaussian distribution $\mathcal{N}(y_i; \mu_i, \sigma_i^2)$ as predictive distribution. CNP is trained to maximize the expected likelihood $\mathbb{E}_{p(\mathcal{T})}[p(y_i | \mathbf{x}_i, \mathcal{D}^\mathcal{C})]$ . + +Neural process (Garnelo et al., 2018b) further models functional uncertainty using a global latent variable. Unlike CNP, which maps a context into a deterministic representation $\widetilde{\mathbf{r}}_i$ , NP encoders a context into a Gaussian latent variable $\mathbf{z}$ , giving additional stochasticity in function construction. Following (Kim et al., 2019), we consider an NP with both a deterministic path and latent path, where the deterministic path models the overall skeleton of the function $\widetilde{\mathbf{r}}_i$ , and the latent path models the functional uncertainty: + +$$ +\mathbf {r} _ {i} = f _ {\mathrm {e n c}} ^ {(1)} \left(\mathbf {x} _ {i}, y _ {i}\right), \quad i \in \mathcal {C} +$$ + +$$ +\mathbf {r} ^ {\mathcal {C}} = \frac {1}{| \mathcal {C} |} \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} +$$ + +$$ +\phi = f _ {\text {a g g}} (\mathbf {r}) \tag {19} +$$ + +$$ +\left(\mu_ {z}, \sigma_ {z}\right) = f _ {\mathrm {e n c}} ^ {(2)} \left(\mathcal {D} ^ {\mathcal {C}}\right), +$$ + +$$ +q (\mathbf {z} | \mathcal {D} ^ {\mathcal {C}}) = \mathcal {N} (\mathbf {z}; \mu_ {z}, \sigma_ {z} ^ {2}) +$$ + +$$ +\left(\mu_ {i}, \sigma_ {i}\right) = f _ {\mathrm {d e c}} \left(\phi , \mathbf {z}, \mathbf {x} _ {i}\right), +$$ + +$$ +p \left(y _ {i} | \mathbf {x} _ {i}, \mathbf {z}, \mathcal {D} ^ {\mathcal {C}}\right) = \mathcal {N} \left(y _ {i}; \mu_ {i}, \sigma_ {i} ^ {2}\right) \quad i \in \mathcal {T} +$$ + +with $f_{\mathrm{enc}}^{(1)}(\cdot)$ and $f_{\mathrm{enc}}^{(2)}(\cdot)$ having the same structure as $f_{\mathrm{enc}}(\cdot)$ in Eq.(18). In this scenario, the conditional distribution is lower bounded as: + +$$ +\log p (\mathbf {y} | \mathbf {X}, \mathcal {D} ^ {\mathcal {C}}) \geq \sum_ {i = 1} ^ {N} \mathbb {E} _ {q (\mathbf {z} | \mathcal {D} ^ {\mathcal {C}})} \left[ \log \frac {p \left(y _ {i} | \mathbf {x} _ {i} , \mathbf {z} , \mathcal {D} ^ {\mathcal {C}}\right) P (\mathbf {z} | \mathcal {D} ^ {\mathcal {C}})}{q (\mathbf {z} | \mathbf {X} , \mathbf {y})} \right]. \tag {20} +$$ + +We further approximate $q(\mathbf{z}|\mathcal{D}^{\mathcal{C}}) \approx p(\mathbf{z}|\mathcal{D}^{\mathcal{C}})$ and train the model by maximizing this expected lower bound over tasks. Furthermore, ANP introduces attention mechanisms into NP to resolve the issue of under-fitting. + +# B. Theoretical Investigations + +Proposition B.1. (Curi et al., 2020) Let $h: \mathcal{X} \to \mathcal{Y}$ be a finite function class $|\mathcal{H}|$ . Let $\ell(h): \mathcal{H} \to [0,1]$ be a random variable. Then, for any $0 < \alpha \leq 1$ , with probability at least $1 - \delta$ , + +$$ +\mathbb {E} \left[ \sup _ {h \in \mathcal {H}} \left| \hat {R} _ {\alpha} (s, \theta) - R _ {\alpha} (s, \theta) \right| \right] \leq \frac {1}{1 - \alpha} \sqrt {\frac {\log (2 | \mathcal {H} | / \delta)}{M N}}. \tag {21} +$$ + +To deeply analyze the Bregman setup, we give the following assumptions. + +Assumption B.2. (Boundedness of the Domain) The diameter of the domain $\Theta$ under the distance-generating function $\psi_{\theta}(\cdot)$ is bounded by a constant $D_{\theta}$ , i.e., + +$$ +\max _ {\theta \in \Theta} \psi_ {\theta} (\theta) - \min _ {\theta \in \Theta} \psi_ {\theta} (\theta) \leq D _ {\theta} ^ {2}. \tag {22} +$$ + +Similarly, the simplex $\mathcal{Q}_{\alpha}$ is assumed to be bounded by $D_{q}$ . Since the entropy function $\psi_{q}$ is used, we have $D_{q} = \sqrt{\ln M}$ . + +Assumption B.3. ((Smoothness and Lipschitz Continuity)) For any sample from meta-dataset (dataset of datasets) $\mathcal{D}_{\tau,1:M} = \{\mathcal{D}_{\tau,m}\}_{m=1}^{M}$ , the loss function $\ell_m(\theta)$ is assumed to satisfy $L$ -smoothness and $G$ -Lipschitz continuity. + +For the task-specific stochastic gradient defined in Eq. (12), we have the following theorem to indicate its unbiasedness. + +Theorem B.4. The stochastic gradient + +$$ +\nabla F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {s}, q ^ {s}\right) = \left[ \begin{array}{l} \nabla_ {\theta} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {s}, q ^ {s}\right) \\ \nabla_ {q} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {s}, q ^ {s}\right) \end{array} \right] = \left[ \begin{array}{c} \sum_ {m = 1} ^ {M} q _ {m} ^ {s} \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right) \\ - \left[ \ell_ {1} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right), \dots , \ell_ {M} \left(Z _ {k, m} ^ {s}; \theta^ {s}\right) \right] ^ {\top} \end{array} \right] \tag {23} +$$ + +defined in Eq. (12) is unbiased. + +Proof. For the sampling strategy defined in Section 4.3: 1) for each dataset, uniformly sampling one sample: $Z_{k,m}^{s} \sim U(\{Z_{m,i}\}_{i=1}^{n_m}), \forall m \in [M]$ ; 2) forming the task-specific samples as $\{Z_{k,m}^{s}\}_{m=1}^{M}$ , we have + +$$ +\forall (\theta , q) \in \Theta \times \mathcal {Q} _ {\alpha}: \quad \mathbb {E} [ \ell_ {m} (Z _ {k, m} ^ {s}; \theta) ] = R _ {m} (\theta), \quad \mathbb {E} [ \nabla \ell_ {m} (Z _ {k, m} ^ {s}; \theta) ] = \nabla R _ {m} (\theta). \tag {24} +$$ + +Based on the additivity of expectation, we can get + +$$ +\forall (\theta , q) \in \Theta \times \mathcal {Q} _ {\alpha}: \quad \mathbb {E} [ \nabla F _ {\alpha} \left(Z _ {k} ^ {s}; \theta\right) ] = \nabla F _ {\alpha} (\theta). \tag {25} +$$ + +In this case, it can be proved that the stochastic gradient is unbiased. + +We assume that $\ell_{m}(Z_{k,m};\theta)$ is $L$ -smooth and $G$ -Lipschitz continuous for all $m\in [M], k\in [n_m]$ . The following theorem analyzes the Lipschitz continuity of the stochastic gradient $\nabla F_{\alpha}(Z_{k,m}^{s};\theta^{s},q^{s})$ + +Theorem B.5. For any $s \in [S]^0$ , $k \in [K_s]^0$ , $\nabla F_{\alpha}(Z_{k,m}^{s};\theta^{s},q^{s})$ is $L^*$ -Lipschitz continuous, where $L_* = 2D_\theta \max \{ \sqrt{2D_\theta^2L^2 + G^2\ln M}, G\sqrt{2\ln M} \}$ . + +Proof. Randomly selecting two parameters $(\theta^{+}, q^{+})$ and $(\theta^{-}, q^{-})$ , we can bound the gradient of $\theta$ as follows: + +$$ +\begin{array}{l} \left\| \nabla_ {\theta} F _ {\alpha} \left(Z _ {k} ^ {s}; \theta^ {+}, q ^ {+}\right) - \nabla_ {\theta} F _ {\alpha} \left(Z _ {k} ^ {s}; \theta^ {-}, q ^ {-}\right) \right\| _ {\theta a, *} ^ {2} \\ = \left\| \sum_ {m = 1} ^ {M} q _ {m} ^ {+} \left[ \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {+}\right) - \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right] + \sum_ {m = 1} ^ {M} \left(q _ {m} ^ {+} - q _ {m} ^ {-}\right) \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right\| _ {\theta , *} ^ {2} \\ \leq 2 \left\| \sum_ {m = 1} ^ {M} q _ {m} ^ {+} \left[ \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {+}\right) - \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right] \right\| _ {\theta , *} ^ {2} + 2 \left\| \sum_ {m = 1} ^ {M} \left(q _ {m} ^ {+} - q _ {m} ^ {-}\right) \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right\| _ {\theta , *} ^ {2} \tag {26} \\ \leq 2 \sum_ {m = 1} ^ {M} q _ {m} ^ {+} \left\| \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {+}\right) - \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right\| _ {\theta , *} ^ {2} + 2 \left(\sum_ {m = 1} ^ {M} \left| q _ {m} ^ {+} - q _ {m} ^ {-} \right| \left\| \nabla \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right\| _ {\theta , *} ^ {2}\right) \\ \leq 2 \sum_ {m = 1} ^ {M} q _ {m} ^ {+} L ^ {2} \| \theta^ {+} - \theta^ {-} \| _ {\theta} ^ {2} + 2 \left(\sum_ {m = 1} ^ {M} | q _ {m} ^ {+} - q _ {m} ^ {-} | G\right) \\ = 2 L ^ {2} \| \theta^ {+} - \theta^ {-} \| _ {\theta} ^ {2} + 2 G ^ {2} \| q ^ {+} - q ^ {-} \| _ {1} ^ {2}. \\ \end{array} +$$ + +We can also bound the gradient of $q$ as follows: + +$$ +\forall m \in [ M ]: \quad \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {+}\right) - \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \leq G \| \theta^ {+} - \theta^ {-} \| _ {\theta}. \tag {27} +$$ + +Given $\nabla_qF_\alpha (Z_{k,m}^s;\theta^s,q^s) = -\left[\ell_1(Z_{k,m}^s;\theta^s),\dots ,\ell_M(Z_{k,m}^s;\theta^s)\right]^\top$ we have + +$$ +\left\| \nabla_ {q} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {+}, q ^ {+}\right) - \nabla_ {q} F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {-}, q ^ {-}\right) \right\| _ {\infty} ^ {2} +$$ + +$$ += \max _ {m \in [ M ]} \left[ \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {+}\right) - \ell_ {m} \left(Z _ {k, m} ^ {s}; \theta^ {-}\right) \right] ^ {2} \tag {28} +$$ + +$$ +\leq G ^ {2} \left\| \theta^ {+} - \theta^ {-} \right\| _ {\theta}. +$$ + +Based on the above bound, we have + +$$ +\begin{array}{l} \left\| \nabla F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {+}, q ^ {+}\right) - \nabla F _ {\alpha} \left(Z _ {k, m} ^ {s}; \theta^ {-}, q ^ {-}\right) \right\| _ {*} ^ {2} \\ = 2 D _ {\theta} ^ {2} \| \nabla_ {\theta} F _ {\alpha} (Z _ {k, m} ^ {s}; \theta^ {+}, q ^ {+}) - \nabla_ {\theta} F _ {\alpha} (Z _ {k, m} ^ {s}; \theta^ {-}, q ^ {-}) \| _ {\theta , *} ^ {2} + 2 \ln M \| \nabla_ {q} F _ {\alpha} (Z _ {k, m} ^ {s}; \theta^ {+}, q ^ {+}) - \nabla_ {q} F _ {\alpha} (Z _ {k, m} ^ {s}; \theta^ {-}, q ^ {-}) \| _ {\infty} ^ {2} \\ \leq \left(4 D _ {\theta} ^ {2} L ^ {2} + 2 G ^ {2} \ln M\right) \| \theta^ {+} - \theta^ {-} \| _ {\theta} ^ {2} + 4 D _ {\theta} ^ {2} G ^ {2} \| q ^ {+} - q ^ {-} \| _ {1} ^ {2} \\ \leq \frac {1}{2 D _ {\theta} ^ {2}} \left[ (4 D _ {\theta} ^ {2} L ^ {2} + G ^ {2} \ln M) \| \theta^ {+} - \theta^ {-} \| _ {\theta} ^ {2} \right] + \frac {1}{2 \ln M} [ 4 D _ {\theta} ^ {2} (2 G ^ {2} \ln M) \| q ^ {+} - q ^ {-} \| _ {1} ^ {2} ] \\ \leq \frac {L _ {*} ^ {2}}{2 D _ {\theta} ^ {2}} \| \theta^ {+} - \theta^ {-} \| _ {\theta} ^ {2} + \frac {L _ {*} ^ {2}}{2 \ln M} \| q ^ {+} - q ^ {-} \| _ {1} ^ {2} \\ = L _ {*} ^ {2} \| \left(\theta^ {+}, q ^ {+}\right) - \left(\theta^ {-}, q ^ {-}\right) \| ^ {2} \tag {29} \\ \end{array} +$$ + +# C. Model Architecture + +The architectural details of the CNP, NP, and ANP are the same as in (Kim et al., 2019). Here we give the detailed architectures of the encoder and decoder of NPs. + +# C.1. Encoder without attention + +Encoder focuses on learning embeddings for each data point in the context set, and the basic component is multi-layer perceptron, which is defined by + +$$ +\mathrm {M L P} (l, d _ {i n}, d _ {h}, d _ {o u t}) = \text {L I N E A R} \left(d _ {h}, d _ {o u t}\right) \circ \underbrace {\left(\text {R E L U} \circ \text {L I N E A R} \left(d _ {h} , d _ {h}\right) \circ \cdots\right)} _ {\times (l - 2)} \circ \text {L I N E A R} \left(d _ {h}, d _ {i n}\right) \tag {30} +$$ + +where $l$ is the number of layers, $d_{in}$ , $d_h$ and $d_{out}$ are dimensionalities of inputs, hidden unites and outputs. Here $\mathrm{RELU}(\cdot)$ is adapted as activation function. + +The encoder in Vanilla CNP uses a deterministic encoder that focuses on learning embeddings for each data point in the context set. + +$$ +\mathbf {r} _ {i} = \operatorname {M L P} \left(l _ {e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left(\left[ \mathbf {x} _ {i}, y _ {i} \right]\right), +$$ + +$$ +\mathbf {r} ^ {\mathcal {C}} = \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i}, \quad \phi = \operatorname {M L P} \left(l _ {e 2}, d _ {h}, d _ {h}\right) \left(\mathbf {r} ^ {\mathcal {C}}\right) \tag {31} +$$ + +where $d_{x}$ and $d_{y}$ are the dimensionalities of $\mathbf{x}_i$ and $y_{i}$ + +To follow the encoder structure in NP, we introduce another encoder aligned with the original deterministic encoder to permit the same number of parameters, i.e., + +$$ +\mathbf {r} _ {i} ^ {(1)} = \operatorname {M L P} \left(l _ {e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left(\left[ \mathbf {x} _ {i}, y _ {i} \right]\right) +$$ + +$$ +\mathbf {r} _ {\mathcal {C}} ^ {(1)} = \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} ^ {(1)}, \quad \phi_ {1} = \operatorname {M L P} \left(l _ {e 2}, d _ {h}, d _ {h}\right) \left(\mathbf {r} _ {\mathcal {C}} ^ {(1)}\right) +$$ + +$$ +\mathbf {r} _ {i} ^ {(2)} = \operatorname {M L P} \left(l _ {e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left(\left[ \mathbf {x} _ {i}, y _ {i} \right]\right) \tag {32} +$$ + +$$ +\mathbf {r} _ {\mathcal {C}} ^ {(2)} = \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} ^ {(2)}, \quad \phi_ {2} = \mathrm {M L P} (l _ {e 2}, d _ {h}, d _ {h}) (\mathbf {r} _ {\mathcal {C}} ^ {(2)}) +$$ + +$$ +\phi = [ \phi_ {1}, \phi_ {2} ] +$$ + +The encoder in NP contains a deterministic path and a latent path, i.e., + +$$ +\mathbf {r} _ {i} ^ {(1)} = \operatorname {M L P} \left(l _ {d e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left(\left[ \mathbf {x} _ {i}, y _ {i} \right]\right) +$$ + +$$ +\mathbf {r} _ {\mathcal {C}} ^ {(1)} = \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} ^ {(1)}, \quad \phi = \operatorname {M L P} \left(l _ {d e 2}, d _ {h}, d _ {h}\right) \left(\mathbf {r} _ {\mathcal {C}} ^ {(1)}\right) +$$ + +$$ +\mathbf {r} _ {i} ^ {(2)} = \operatorname {M L P} \left(l _ {l a 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left(\left[ \mathbf {x} _ {i}, y _ {i} \right]\right) \tag {33} +$$ + +$$ +\mathbf {r} _ {\mathcal {C}} ^ {(2)} = \sum_ {i \in \mathcal {C}} \mathbf {r} _ {i} ^ {(2)}, \qquad [ \mu_ {z}, \sigma_ {z} ^ {\prime} ] = \mathrm {M L P} (l _ {l a 2}, d _ {h}, d _ {h}) (\mathbf {r} _ {\mathcal {C}} ^ {(2)}) +$$ + +$$ +\sigma_ {z} = 0. 1 + 0. 9 \cdot \operatorname {S I G M O I D} \left(\sigma_ {z} ^ {\prime}\right), \quad \mathbf {z} \sim \mathcal {N} \left(\mu_ {z}, \operatorname {d i a g} \left(\sigma_ {z} ^ {2}\right)\right). +$$ + +In this case, the encoder outputs deterministic representation $\phi$ and latent representation $\mathbf{z}$ . + +# C.2. Encoder with attention + +The attention mechanism is widely used in NPs, Specifically, multi-head attention (Vaswani et al., 2017) is adapted, which is defined by + +$$ +\mathbf {Q} ^ {\prime} = \left\{\operatorname {L I N E A R} \left(d _ {q}, d _ {o u t}\right) (\mathbf {q}) \right\} _ {\mathbf {q} \in \mathbf {Q}}, +$$ + +$$ +\left\{\mathbf {Q} _ {i} ^ {\prime} \right\} _ {i = 1} ^ {n _ {h e a d}} = \text {S P L I T} \left(\mathbf {Q} ^ {\prime}, n _ {h e a d}\right), +$$ + +$$ +\mathbf {K} ^ {\prime} = \left\{\operatorname {L I N E A R} \left(d _ {k}, d _ {o u t}\right) (\mathbf {k}) \right\} _ {\mathbf {k} \in \mathbf {K}}, +$$ + +$$ +\{\mathbf {K} _ {i j} ^ {\prime} \} _ {i = 1} ^ {n _ {h e a d}} = \mathrm {S P L I T} (\mathbf {K} ^ {\prime}, n _ {h e a d}), +$$ + +$$ +\mathbf {V} ^ {\prime} = \left\{\operatorname {L I N E A R} \left(d _ {v}, d _ {o u t}\right) (\mathbf {v}) \right\} _ {\mathbf {v} \in \mathbf {V}}, +$$ + +$$ +\left\{\mathbf {V} _ {i j} ^ {\prime} \right\} _ {i = 1} ^ {n _ {\text {h e a d}}} = \operatorname {S P L I T} \left(\mathbf {V} ^ {\prime}, n _ {\text {h e a d}}\right), \tag {34} +$$ + +$$ +\mathbf {H} _ {i} = \mathrm {S O F T M A X} \left(\mathbf {Q} _ {i} ^ {\prime} (\mathbf {K} _ {i} ^ {\prime}) ^ {\top} / \sqrt {d _ {o u t}}\right) \mathbf {V} _ {i} ^ {\prime}, +$$ + +$$ +\mathbf {H} = \operatorname {C O N C A T} \left(\left\{\mathbf {H} _ {i} \right\} _ {i = 1} ^ {n _ {\text {h e a d}}}\right) +$$ + +$$ +\mathbf {H} ^ {\prime} = \text {L A Y E R N O R M} (\mathbf {Q} ^ {\prime} + \mathbf {H}) +$$ + +$$ +\mathbf {M H A} (d _ {o u t}) (\mathbf {Q}, \mathbf {K}, \mathbf {V}) = \text {L A Y E R N O R M} (\mathbf {H} ^ {\prime} + \text {R E L U} (\text {L I N E A R} (d _ {o u t}, d _ {o u t}))) +$$ + +where $d_q, d_v, d_k$ are the dimensionalities of query $\mathbf{Q}$ , key $\mathbf{K}$ , and value $\mathbf{V}$ , respectively. $n_{head}$ is the number of head. Here Layer normalization (Ba et al., 2016) LAYERNORM( $\cdot$ ) is adapted. It is easy to derive self-attention by setting $\mathbf{Q} = \mathbf{K} = \mathbf{V}$ , i.e., + +$$ +\mathrm {S A} \left(d _ {\text {o u t}}\right) (\mathbf {X}) = \mathrm {M H A} \left(d _ {\text {o u t}}\right) (\mathbf {X}, \mathbf {X}, \mathbf {X}) \tag {35} +$$ + +For CNP, the encoder with attention still contains two deterministic paths, + +$$ +f _ {q k} = \mathrm {M L P} \left(l _ {q k}, d _ {x}, d _ {h}, d _ {h}\right) +$$ + +$$ +\mathbf {Q} = f _ {q k} (\mathbf {x} _ {i}), \quad i \in \mathcal {T} +$$ + +$$ +\mathbf {K} = \left\{f _ {q k} (\mathbf {x} _ {i}) \right\}, \quad i \in \mathcal {C} +$$ + +$$ +\mathbf {V} = \operatorname {S A} \left(d _ {h}\right). \left(\left\{\operatorname {M L P} \left(l _ {v}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left([ \mathbf {x} _ {i}, y _ {i} ]\right) \right\} _ {i \in \mathcal {C}}\right) +$$ + +$$ +\phi_ {1} = \mathrm {M H A} \left(d _ {h}\right) (\mathbf {Q}, \mathbf {K}, \mathbf {V}) \tag {36} +$$ + +$$ +\mathbf {H} = \mathrm {S A} (d _ {h}) \left(\{\mathrm {R E L U} \circ \mathrm {M L P} \left(l _ {e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) ([ \mathbf {x} _ {i}, y _ {i} ]) \} _ {i \in \mathcal {C}}\right) +$$ + +$$ +\phi_ {2} = \operatorname {M L P} \left(l _ {e}, d _ {h}, d _ {h}\right) \left(\frac {1}{| \mathcal {C} |} \sum_ {i \in \mathcal {C}} \mathbf {h} _ {i}\right) +$$ + +$$ +\phi = [ \phi_ {1}, \phi_ {2} ] +$$ + +Similarly, an encoder with attention in NP contains a deterministic path and a latent path, i.e., + +$$ +f _ {q k} = \mathrm {M L P} \left(l _ {q k}, d _ {x}, d _ {h}, d _ {h}\right) +$$ + +$$ +\mathbf {Q} = f _ {q k} (\mathbf {x} _ {i}), \quad i \in \mathcal {T} +$$ + +$$ +\mathbf {K} = \left\{f _ {q k} \left(\mathbf {x} _ {i}\right) \right\}, \quad i \in \mathcal {C} \tag {37} +$$ + +$$ +\mathbf {V} = \operatorname {S A} \left(d _ {h}\right). \left(\left\{\operatorname {M L P} \left(l _ {v}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) \left([ \mathbf {x} _ {i}, y _ {i} ]\right) \right\} _ {i \in \mathcal {C}}\right) +$$ + +$$ +\phi = \mathrm {M H A} (d _ {h}) (\mathbf {Q}, \mathbf {K}, \mathbf {V}) +$$ + +and + +$$ +\mathbf {H} = \mathbf {S A} (d _ {h}) \left(\left\{\mathrm {R E L U} \circ \mathrm {M L P} \left(l _ {e 1}, d _ {x} + d _ {y}, d _ {h}, d _ {h}\right) ([ \mathbf {x} _ {i}, y _ {i} ]) \right\} _ {i \in \mathcal {C}}\right) +$$ + +$$ +\left[ \mu_ {z}, \sigma_ {z} ^ {\prime} \right] = \operatorname {M L P} \left(l _ {l a}, d _ {h}, d _ {h}\right) \left(\frac {1}{| \mathcal {C} |} \sum_ {i \in \mathcal {C}} \mathbf {h} _ {i}\right) \tag {38} +$$ + +$$ +\sigma_ {z} = 0. 1 + 0. 9 \cdot \operatorname {S I G M O I D} \left(\sigma_ {z} ^ {\prime}\right), +$$ + +$$ +\mathbf {z} \sim \mathcal {N} \left(\mu_ {z}, \operatorname {d i a g} \left(\sigma_ {z} ^ {2}\right)\right). +$$ + +# C.3. Decoder + +The decoder focuses on predicting output for target points based on the encoder's outputs $\phi$ . For target point $\{\mathbf{x}_i\}_{i\in \mathcal{T}}$ , the decoder of CNP is defined by + +$$ +\begin{array}{l} \left[ \mu_ {i}, \sigma_ {i} ^ {\prime} \right] = \operatorname {M L P} \left(d _ {d e c}, 2 d _ {h} + d _ {x}, d _ {h}, 2 d _ {y}\right) \left[ \phi , \mathbf {x} _ {i} \right], \quad i \in \mathcal {T} \\ \sigma_ {i} = 0. 1 + 0. 9 \cdot \text {S O F T P L U S} \left(\sigma_ {i} ^ {\prime}\right) \tag {39} \\ y _ {i} \sim \mathcal {N} (\mu_ {i}, \sigma_ {i}) \\ \end{array} +$$ + +Decoder of NP is defined by + +$$ +\begin{array}{l} [ \mu_ {i}, \sigma_ {i} ^ {\prime} ] = \operatorname {M L P} \left(d _ {d e c}, d _ {h} + d _ {z} + d _ {x}, d _ {h}, 2 d _ {y}\right) [ \phi , \mathbf {x} _ {i}, \mathbf {z} ], \quad i \in \mathcal {T} \\ \sigma_ {i} = 0. 1 + 0. 9 \cdot \text {S O F T P L U S} \left(\sigma_ {i} ^ {\prime}\right) \tag {40} \\ y _ {i} \sim \mathcal {N} (\mu_ {i}, \sigma_ {i}) \\ \end{array} +$$ + +# D. Implementation Details and Experiments + +# D.1. Infrastructure + +We implement our model with Pytorch, and conduct our experiments with: + +CPU: Intel Xeon Silver 4316. +- GPU: 8x GeForce RTX 4090. +RAM: DDR4 384GB. +- ROM: 16TB 7.2K 6Gb SATA and 1x 960G SATA 6Gb R SSD. +- Operating system: Ubuntu 18.04 LTS. +- Environments: Python 3.7; NumPy 1.18.1; SciPy 1.2.1; scikit-learn 0.23.2; seaborn 0.1; torch-geometric 1.6.1; matplotlib 3.1.3; django 0.4.2; pytorch 1.6. + +# D.2. Experimental Settings + +For CNP (Garnelo et al., 2018a), BCNP (Lee et al., 2020), SCNP (Liu et al., 2024a), and our RCNP, we apply the encoder with attention described in Eq (36) and decoder described in Eq (39). For NP (Garnelo et al., 2018b), ANP (Kim et al., 2019), BNP (Lee et al., 2020), BANP (Lee et al., 2020) and our SNP and SANP models, we apply encoder with attention described in Eq (37) and (38), and decoder described in Eq (40). + +# D.2.1. 1D REGRESSION + +For synthetic 1D regression experiments, the neural architectures for CNP, NP, ANP, BCNP, BNP, BANP, and our SCNP/SNP/SANP refer to Appendix C. The number of hidden units is $d_h = 128$ and latent representation $d_z = 128$ . The number of layers are $l_e = l_{de} = l_{la} = l_{qk} = l_v = 2$ . + +We generate datasets for synthetic 1D regression. Specifically, the stochastic process (SP) initializes with a 0 mean Gaussian Process $(\mathrm{GP})$ $y^{(0)}\sim GP(0,k(\cdot ,\cdot))$ indexed in the interval $x\in [-2.0,2.0]$ , where the radial basis function kernel $k(x,x^{\prime}) = \sigma^{2}\exp (-\| x - x^{\prime}\|^{2} / 2l^{2})$ with $s\sim U(0.1,1.0)$ and $\sigma \sim U(0.1,0.6)$ . Furthermore, GP with Matern Kernel is adopted for model-data mismatch scenario, which is defined as $k(x,x^{\prime}) = \sigma^{2}(1 + \sqrt{5} d / l + 5d^{2} / (3l^{2}))\exp (-\sqrt{5} d / l)$ and $d = \| x - x^{\prime}\|$ with $s\sim U(0.1,1.0)$ and $\sigma \sim U(0.1,0.6)$ . For a fair comparison, we set the same data generation, training, and testing for all models. + +We trained all models for 100,000 steps with each step computing updates with a batch containing 100 tasks. We used the Adam optimizer with an initial learning rate $5 \cdot 10^{-4}$ and decayed the learning rate using Cosine annealing scheme for baselines. For SCNP/SNP/SANP, we set $K = 3$ . The size of the context $\mathcal{C}$ was drawn as $|\mathcal{C}| \sim U(3,200)$ . Testings were done for 3,000 batches with each batch containing 16 tasks (48,000 tasks in total). + +# D.2.2. IMAGE COMPLETION + +Analogous to the 1D experiments, we take random pixels of a given image at training as targets, and select a subset of this as contexts, again choosing the number of contexts and targets randomly ( $n \sim U[3,200]$ , $m \sim n + U[0,200 - n]$ ). The $\mathbf{x}_i$ are rescaled to $[-1,1]$ and the $y_i$ are rescaled to $[-0.5,0.5]$ . We use a batch size of 16 for both EMNIST and CelebA, i.e. use 16 randomly selected images for each batch. + +For image completion experiments on EMNIST and CelebA dataset, the neural architectures for CNP, NP, ANP, BCNP, BNP, BANP, and our SCNP, SNP, and SANP refer to Appendix C. The number of hidden unites is $d_h = 128$ and latent representation $d_z = 128$ . The number of layers are $l_e = l_{de} = 4$ , $l_{la} = l_{qk} = l_v = 5$ . $h_{head} = 8$ + +# D.2.3. BAYESIAN OPTIMIZATION + +We sampled 100 GP prior functions from zero mean and unit variance. After realizing them, the prior functions are used to optimize via Bayesian optimization. We normalized these functions in order to fairly compare simple regrets and cumulative regrets across distinct sampled functions (Basically, since they are sampled from the same distributions, the scales of them are quite similar, but we used more precise evaluations). + +As presented in the Bayesian optimization results, all the methods are started from the same initializations. We employed Gaussian process regression (Rasmussen, 2003) with squared exponential kernels as a surrogate model, and expected improvement (Jones et al., 1998) as an acquisition function, which is optimized by the multi-started local optimization method, L-BFGS-B with 100 initial points. + +# D.2.4. CONXTUAL BANDITS + +The whell bandit problem is introduced in (Riquelme et al., 2018) and can be illustrated in Figure 5. In this problem, a unit circle is divided into a low-reward region (blue area) and four high-reward regions (the other four colored areas). A scalar $\gamma$ determines the size of the low-reward region, and other regions have equal sizes. The agent does not know the underlying $\gamma$ , and has to choose among $k = 5$ arms given its coordinates $X = (X_{1}, X_{2})$ within the circle. If $\|X\| \leq \gamma$ , the agent falls within the low-reward region (blue). In this case, the optimal action is $k = 1$ , which provides a reward $r \sim N(1.2, 0.012)$ , while all other actions only return $r \sim N(1.0, 0.012)$ . If the agent falls within any of the four high-reward regions $(\|X\| > \gamma)$ , the optimal arm will be one of the remaining four $k = 2 - 5$ , depending on the specific area. Pulling the optimal arm here results in a high reward $r \sim N(50.0, 0.012)$ , and as before all other arms receive $N(1.0, 0.012)$ except for arm $k = 1$ which always returns $N(1.2, 0.012)$ . + +We sample a dataset of $K$ different wheel problems $\gamma_{i i=1}^{K}$ , which are drawn from a uniform distribution $\gamma \sim U(0,1)$ . For each problem, we sample $N$ points to evaluate and pick $m$ points as context, in which each point is a tuple $(X,r)$ of the coordinates $X$ and the corresponding reward values $r$ of all 5 arms. The training objective is to regress the reward values from the coordinates. We set $K = 8$ , $N = 562$ , $m = 512$ in our experiments. + +# E. Additional Experiments + +# E.1. 1D Regression + +Following (Kim et al., 2019; Lee et al., 2020; Liu et al., 2024a), we first conduct 1D regression experiments. We generate training data from a GP with RBF kernels and test the trained model on the data generated from GPs with different kernels, including RBF, Matérn, and Periodic. Among them, data from Matérn and Periodic are used to evaluate model performance on unseen functions. We give a detailed description of experimental settings in the Appendix. Table 4 lists the average log-likelihood comparison in terms of different kernels. The best results are marked in bold. After several repetitive observations, we can observe that our robust version outperforms not only vanilla ones but also bootstrapping versions and stable versions. For model-data mismatch settings, all the models become less accurate, but our robust ones affect less. Visualizations for 1D regression data are shown in Figure 6. Each solid blue curve represents one sample function and the blue area around each curve represents the variance in the predictive distribution. We can see that NPs with bootstrapping, stable, and robust solutions generally achieve better fitting performance, especially on data points where other methods fail to fit effectively. + +![](images/ea2111ead9338dc39e2059b13baf591bffa00681df809cc53bbb27a0544680f7.jpg) +Figure 5. The wheel bandit problem with varying values of $\gamma$ . (Riquelme et al., 2018; Nguyen & Grover, 2022). + +![](images/1435e7af4397d6c9e3ccc9a8abed184bf8cb641853764e1bce69618dba32eb5b.jpg) + +![](images/c5285cf0c4e0fdebe31b49291f6a325db49c0b5a4b06b869b0301687e8b81f43.jpg) + +![](images/1946322a6e0c8446eff848d65c653cdef3721c58d743142d9aced912c4515625.jpg) + +![](images/84cf415fd7eda89195584732654a9c3a0e9910d8328442847590021a947375cb.jpg) + +Table 4. Comparison of our robust NPs with the baselines on log-likelihood of the target points on various GP kernels. We train each method with 5 different seeds and report the mean and standard deviation. + +
MethodRBFMatérn 5/2Periodic
CNP0.4334±0.0070.2431±0.010-1.2521±0.008
BCNP0.4589±0.0060.2762±0.009-1.1915±0.007
SCNP0.4733±0.0040.2953±0.006-1.1779±0.006
RCNP0.4798±0.0030.3021±0.005-1.1699±0.006
NP0.3853±0.0050.2041±0.015-1.4255±0.009
BNP0.4211±0.0040.2689±0.007-1.3988±0.009
SNP0.4356±0.0040.2844±0.005-1.4085±0.008
RNP0.4398±0.0020.2832±0.006-1.3761±0.009
ANP0.5763±0.0040.6366±0.004-1.1824±0.009
BANP0.5887±0.0060.6514±0.005-1.1781±0.006
SANP0.5994±0.0040.6653±0.004-1.1774±0.004
RANP0.6025±0.0020.6771±0.006-1.1779±0.006
ConvNP0.6503±0.0040.6557±0.005-1.1761±0.006
BConvNP0.6531±0.0050.6787±0.006-1.1675±0.006
SConvNP0.6831±0.0030.6836±0.004-1.1681±0.008
RConvNP0.6898±0.0030.6916±0.004-1.1547±0.004
TNP0.8711±0.0030.7151±0.001-1.1625±0.005
BTNP0.8981±0.0060.7255±0.003-1.1591±0.008
STNP0.8798±0.0080.7151±0.006-1.1552±0.002
RTNP0.8815±0.0040.7389±0.003-1.1511±0.004
+ +![](images/e5282f2f9e0cf456244fafe3c0469dceac170be360b70544720a41777d9edc9b.jpg) +Figure 6. Visualizations of CNP, ANP, and their bootstrap versions (BCNP, BANP), stable versions (SNP, SANP), and robust versions (RCNP, RANP) for 1D regression data. + +![](images/fafe8fc4801cc9163003c12047a3628d83d5e7edd9304bad4b4de3714eda09c4.jpg) + +![](images/89dd5c292dcff578877f1df9f5a15d2f0cefc0a8c581e969da21c4d3cbf346ce.jpg) + +![](images/faafe8e29927f19c6d311728682ba2091d3501aef54e3d363ca33ff027e8cce6.jpg) + +![](images/ccf18700528741eb375ca75b846e08a2eedd3b70c4ac452ebdf6df7e07068b0e.jpg) +Figure 7. Regret performance on 1D Bayesian optimization tasks. For each kernel, we generate 100 functions and report the mean and standard deviation. + +![](images/2ebca2152d0f161bcda6d476c6b5d3d468385418e80e1a895784283d47257a96.jpg) + +![](images/fa0d49f482ff829ee9171c7f43d31aca09c5c13673a52a96095fa4c01eb6359c.jpg) + +# E.2. Bayesian Optimization + +Taking GP data with RBF, Matérn 5/2, and periodic prior functions as examples, we gave the results of CNP, ANP, corresponding bootstrapping NPs (BCNP, BANP), stable NPs (SCNP, SANP), and robust NPs (RCNP, RANP). Note that we use NPs as the surrogate functions and Upper Confidence Bound (UCB) as the acquisition function. To maintain consistent comparison, we standardized the initializations and normalized the results. For each objective function, we run Bayesian optimization for 100 iterations, and simple regret is used as the evaluation metric. As shown in Figure 7 and Table 5, we can see that our robust solutions consistently achieve lower regret than other NPs in all three kernels. + +# E.3. The effect of confidence level $\alpha$ + +The key parameter in our robust solution is the confidence level $\alpha$ , which controls the extent to which the learning model focuses on difficult tasks. Taking RANP as an example, we investigate the average log-likelihood in terms of different $\alpha$ on the 1D regression, image completion, and Bayesian optimization, as shown in Figure 8. We can see that RANP obtains the best results (around 0.6), after that, the performance remained stable. This result is in line with our intuition. If there is too much focus on difficult tasks, it may neglect the learning of general tasks. On the other hand, insufficient focus on difficult tasks can also affect the model's performance. + +# E.4. Risk Distribution + +As we stated previously, the proposed strategy can iteratively reshape the task risk distribution to increase robustness, i.e., transport the probability mass in high-risk regions to the lower-risk regions. To verify this point, we present the task risk distributions with and without using our strategy. Specifically, taking RANP as an example, Figure 9 shows the task risk distributions of ANP and RANP on, 1d regression, image completion, and Bayesian optimization tasks. We select MSE as the risk measure. Overall, it can be seen that the robust solutions shift the original risk distribution to the left, reducing the proportion of high-risk tasks and effectively demonstrating the robustness of the proposed model. + +Table 5. Bayesian optimization experiments on data generated by different GP kernels + +
MethodRBFMatérn 5/2Periodic
CNP0.1524±0.0040.1852±0.0040.2051±0.005
BCNP0.1501±0.0030.1815±0.0030.2016±0.003
SCNP0.1415±0.0050.1752±0.0030.1998±0.003
RCNP0.1352±0.0030.1711±0.0040.1941±0.004
NP0.1647±0.0030.1988±0.0030.1985±0.007
BNP0.1611±0.0030.1901±0.0040.1962±0.003
SNP0.1536±0.0040.1871±0.0030.1915±0.005
RNP0.1415±0.0030.1789±0.0050.1873±0.003
ANP0.1245±0.0030.1518±0.0030.1892±0.002
BANP0.1341±0.0030.1316±0.0040.1788±0.005
SANP0.1142±0.0020.1201±0.0020.1672±0.001
RANP0.1025±0.0020.1171±0.0030.1779±0.006
ConvNP0.1211±0.0040.1256±0.0030.1854±0.004
BConvNP0.1187±0.0030.1201±0.0040.1819±0.003
SConvNP0.1176±0.0060.1179±0.0030.1786±0.004
RConvNP0.1056±0.0040.1156±0.0040.1773±0.003
TNP0.1125±0.0030.1451±0.0010.1715±0.003
BTNP0.1037±0.0060.1455±0.0030.1691±0.008
STNP0.0998±0.0040.1351±0.0060.1561±0.002
RTNP0.0915±0.0040.1289±0.0030.1463±0.004
+ +![](images/c22b3e84db0532aa9f8ada9393507161ffba454d3e1f9094d86369cdb5e17aad.jpg) +(a) $RBF$ + +![](images/30aeacd181f96263cef4e7051f9dd580b0e75dca5ee2c7d958e9133f8da06354.jpg) +(b) Matérn 5/2 + +![](images/c124f30274e51099254a957022096b6732d2ae108107d4517ca4c2286b5a0a75.jpg) +(c) Periodic + +![](images/e05208ac7499502a769d2544aa4a0ca52ae10789d0fdb93a98e92b7b941f0651.jpg) +(d) CelebA + +![](images/7d84c47a796e8c801d651864e77a476cab9b004a39428e8e847d5a29b1a74fab.jpg) +(e) EMNIST(Seen) + +![](images/be70ffa371c01ea9f7550eb1a37db7fd68a4ff65e0c47424865b2de6d17ecbb4.jpg) +(f) EMNIST(Unseen) + +![](images/19c7abc303af37556ef11c679dcc3fe7ff8f57d293e1fe186c39655ed9ac0f10.jpg) +(g) $BO(RBF)$ + +![](images/64d12d0e72b1818f1231ffb67d2d50174231cb700bf4848d913530897c357c37.jpg) +(h) $BO(\text{Matérn} 5/2)$ + +![](images/3b9666a5a8975f7fb6b46d736ec6c118e399bf8861093e72cd32a54421251077.jpg) +(i) $BO(\text{Periodic})$ +Figure 8. The performance evaluation when we set the confidence level $\alpha$ with different values. + +![](images/87e6bbe100ec1778fe70b760361ba3415ed286051ba084eb3bd7d0b9eacce256.jpg) +(a) RBF + +![](images/b8b2f28bb8d23f3d7409b4d0ffbcc303850f5e6bd882c8731fb2c718494e5dc5.jpg) +(b) Matérn 5/2 + +![](images/ac30e572a41a21e733fabd059fd755b7ada83df084b72baf558a2e81dc73ff39.jpg) +(c) Periodic + +![](images/cd916c3a663987a27a59e59e73f1df6324cd4288bc4bb63391605ae1508b847b.jpg) +(d) CelebA + +![](images/5f3db951de16c4227236943ad55a9cad22bc8e011a53b33a3d6a257c1518ccec.jpg) +(e) EMNIST(Seen) + +![](images/ea4b87898244ee4498a83738c76012a5acc2c495aedbd79e20950fbdb77d7992.jpg) +(f) EMNIST(Unseen) + +![](images/cc466a311eaf95f49c6d6bca78675520510bfd1e0e14926b1658b24d7762454e.jpg) +(g) $BO(RBF)$ + +![](images/01edb84499af52f51e0550792049e0d8669ade4e08fbd9f6e020be1fdedbbc21.jpg) +(h) $BO(\text{Matérn} 5/2)$ + +![](images/3bd22690fd2a3938ad27987fed15ad308d28849bcf930037343ab9a63e673b36.jpg) +(i) $BO(\text{Periodic})$ +Figure 9. The histograms of task risks in different tasks. + +Table 6. Comparison of our robust NPs under different weight strategies on log-likelihood of the target points on various GP kernels. We train each method with 5 different seeds and report the mean and standard deviation. + +
MethodRBFMatérn 5/2Periodic
averageadamaverageadamaverageadam
RCNP0.4756±0.0020.4798±0.0030.2989±0.0030.3021±0.005-1.1751±0.005-1.1699±0.006
RNP0.4359±0.0030.4398±0.0020.2797±0.0030.2832±0.006-1.3895±0.007-1.3761±0.009
RANP0.5989±0.0040.6025±0.0020.6688±0.0050.6771±0.006-1.1797±0.007-1.1779±0.006
RConvNP0.6857±0.0040.6898±0.0030.6871±0.0040.6916±0.004-1.1699±0.008-1.1547±0.004
RTNP0.8796±0.0050.8815±0.0040.7276±0.0040.7389±0.003-1.1544±0.006-1.1511±0.004
+ +Table 7. Comparison of our robust NPs under different weight strategies on log-likelihood of the target points on two real-world datasets: CelebA and EMNIST. We train each method with 5 different seeds and report the mean and standard deviation. + +
MethodCelebAEMNIST(Seen (0-9))EMNIST(Unseen (10-46))
averageadamaverageadamaverageadam
RCNP2.1735±0.0072.1896±0.0050.7845±0.0050.7879±0.0050.5321±0.0050.5362±0.006
RNP2.8871±0.0062.8915±0.0060.8876±0.0040.8911±0.0050.7101±0.0060.7121±0.006
RANP2.9651±0.0032.9718±0.0060.9825±0.0060.9881±0.0040.8915±0.0070.8967±0.005
RConvNP3.2215±0.0043.2319±0.0051.2251±0.0061.2348±0.0051.0663±0.0051.0721±0.006
RTNP4.4189±0.0034.4226±0.0051.5541±0.0031.5572±0.0021.4361±0.0051.4413±0.004
+ +# E.5. The effect of $w_{k}$ + +In the gradient computation process of the outer loop, the weighting coefficient for the gradient from the previous step is typically determined using an average weighting strategy, i.e., $w_{k - 1}^{s - 1} = \frac{1}{K_{s - 1}}, \forall k = 1, \dots, K_{s - 1}$ . However, we can set it as a learning rate $\eta_k^s$ as shown in Eq. (15). We compared the performance of the robust model using the average strategy and adaptive learning rates, using three tasks as examples. The results are shown in Table 6, 7, and 8. It can be observed that the experimental results with the adaptive learning rate (Adam) outperformed the average strategy, while the average strategy performed better than other bootstrap strategies or the stable strategy. + +Table 8. Comparison of our robust NPs under different weight strategies on Bayesian optimization experiments with different GP kernels. We train each method with 5 different seeds and report the mean and standard deviation. + +
MethodRBFMatérn 5/2Periodic
averageadamaverageadamaverageadam
RCNP0.1396±0.0030.1352±0.0030.1753±0.0030.1711±0.0040.1985±0.0050.1941±0.004
RNP0.1489±0.0040.1415±0.0030.1837±0.0030.1789±0.0050.1908±0.0040.1873±0.003
RANP0.1097±0.0030.1025±0.0020.1204±0.0030.1171±0.0030.1798±0.0050.1779±0.006
RConvNP0.1128±0.0050.1056±0.0040.1180±0.0040.1156±0.0040.1793±0.0060.1773±0.003
RTNP0.0973±0.0010.0915±0.0040.1327±0.0050.1289±0.0030.1517±0.0060.1463±0.004
\ No newline at end of file diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/images.zip b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6482c744b1f97e7179bb100909d2ed93a470415e --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acd16688c9863160700524e5a4f705ebc5d5e7dfa6df02431c1f2e429a047361 +size 1946067 diff --git a/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/layout.json b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..533745a62288a1507b38182890b30a5a660a36d1 --- /dev/null +++ b/ICML/2025/Learning Robust Neural Processes with Risk-Averse Stochastic Optimization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41fbe710851877df86fbcb192dc018c5cf3357fa9ed041130e8d33c736b2657b +size 1047746 diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_content_list.json b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a6740abcaae4e8aad2f1242ba1fd1b224af52bb1 --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:984994bf1fb89b80c8cb4b94a39dd6eacaac1815de9f30f41ae8e42c12247d80 +size 155904 diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_model.json b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b49a8651543715589c528faa313cdaf716cc1a10 --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95bed521a83d8c683a8c6e505fe81d407e8fe43e8140cde22dfc49b96c7b608f +size 183678 diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_origin.pdf b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e4c9db250cdb007a5972d906af4f57268d7cadcd --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/b84d2055-9a0f-436c-a0aa-a418688df453_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3cfe2c1fbba162f77c40409e6486a3a62d1ff85738ce9f036f754c44f9154b1e +size 2125481 diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/full.md b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9f167e72bbd784ea334451f96f4e08ff6302b249 --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/full.md @@ -0,0 +1,880 @@ +# Learning Safe Control via On-the-Fly Bandit Exploration + +Alexandre Capone $^{1}$ Ryan Cosner $^{2}$ Aaron Ames $^{2}$ Sandra Hirche $^{3}$ + +# Abstract + +Control tasks with safety requirements under high levels of model uncertainty are increasingly common. Machine learning techniques are frequently used to address such tasks, typically by leveraging model error bounds to specify robust constraint-based safety filters. However, if the learned model uncertainty is very high, the corresponding filters are potentially invalid, meaning no control input satisfies the constraints imposed by the safety filter. While most works address this issue by assuming some form of safe backup controller, ours tackle it by collecting additional data on the fly using a Gaussian process bandit-type algorithm. We combine a control barrier function with a learned model to specify a robust certificate that ensures safety if feasible. Whenever infeasibility occurs, we leverage the control barrier function to guide exploration, ensuring the collected data contributes toward the closed-loop system safety. By combining a safety filter with exploration in this manner, our method provably achieves safety in a setting that allows for a zero-mean prior dynamics model, without requiring a backup controller. To the best of our knowledge, it is the first safe learning-based control method that achieves this. + +# 1. Introduction + +With the growing proliferation of robotics in safety-critical fields, e.g., autonomous vehicles, medical robotics, and aerospace systems, the need for methods that ensure the safety of systems and their users has become paramount. In control tasks, guaranteeing safety has become synonym- + +*Equal contribution $^{1}$ Robotics Institute, Carnegie Mellon University, Pittsburgh, PA, USA $^{2}$ Department of Mechanical and Civil Engineering, California Institute of Technology, Pasadena, CA, USA $^{3}$ TUM School of Computation, Information and Technology, Technical University of Munich, Munich, Germany. Correspondence to: Alexandre Capone . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +mous with guaranteeing that the system always satisfies a pre-specified set of constraints. While there exist various tools to achieve safety whenever the system is known perfectly (Agrawal & Sreenath, 2017; Ames et al., 2017; Bansal et al., 2017; Wabersich & Zeilinger, 2018; Zeng et al., 2021), doing so if the dynamics have to be learned poses a significantly more difficult challenge. + +To address safety in a control setting, existing approaches typically attempt to bound the model error and assess how its worst-case estimate affects safety. To estimate the model error, frequently used frameworks include ensembles of neural networks (Chua et al., 2018; Curi et al., 2020) or Gaussian processes (GPs) (Capone et al., 2022; Rodriguez et al., 2021). The impact of the model error on safety is then frequently estimated by predicting the worst-case trajectory multiple steps into the future (Akametalu et al., 2014; Hewing et al., 2020; Koller et al., 2018). Alternatively, safety filters attempt to condense the long-term impact of a control input on safety (Ao et al., 2025; Berkenkamp et al., 2017; Castaneda et al., 2021; Cheng et al., 2019; Jagtap et al., 2020). A crucial drawback of most of these methods is that they assume the model uncertainty is always small enough for the conservative safety constraints to be feasible. In other words, if the uncertainty becomes too large, the underlying methods are no longer applicable. + +Motivated by the aforementioned challenges, we present a learning-based control algorithm that ensures safety by exploring on the fly. We use a Gaussian process model to estimate model uncertainty, which we combine with a control barrier function to compute a robust safety filter. Whenever our safety filter becomes infeasible, we employ the control barrier function to guide exploration in a manner that is informative for safety. Formally, this is done by leveraging the lower confidence bound of the certificate constraint function for certifiably safe control inputs, and the upper confidence bound for exploration. Our approach draws heavily from ideas from Bayesian optimization, where exploration is done in a similar manner. Overall, our main contributions are as follows: + +1. We present the first safe control algorithm that addresses infeasible safety filters by exploring online using a Gaussian process bandit algorithm. + +- Starting state - Feasible (safe) region - Infeasible (safe) region - Unsafe region - System trajectory + +![](images/b7d90696de64990b74e2ab19bb30dc51c82933d1eff297d6ad8c914c9f299e2c.jpg) +(a) System state exits the region where the safety filter is feasible. + +![](images/90cd0926c879b18c2cc22ed4bd7f3634c03dfd5f945556dfe8aee92f97ae6787.jpg) +(b) Our algorithm computes exploratory control inputs using a bandit-type technique. + +![](images/e4be0989ac260f23d679e64ad18028836107ef67e878088c962af55f64b5c7f8.jpg) +(c) Theorem 3.2 guarantees that the safety filter always becomes feasible before the boundary of the safe set is reached. +Figure 1. Illustration of our method (Algorithm 1) and theoretical result (Theorem 3.2). + +2. We rigorously analyze our approach and discuss our main theorem, which shows the interdependence between model uncertainty, sampling time, and safety. +3. We showcase our approach using two numerical simulations where we achieve safety using a control barrier function, a dynamics model with a zero-mean prior, and no prior measurements. To the best of our knowledge, this setting cannot be addressed by current state-of-the-art methods. + +The remainder of this paper is structured as follows. In Section 2 we describe the problem setting considered in this paper, together with some background on control barrier functions and Gaussian processes. Our main contribution, which includes an exploration-driven safe control algorithm and safety guarantees, is presented in Section 3. In Section 5, we apply our method using numerical simulations of cruise control and a quadcopter. We finalize the paper with some conclusions in Section 7. + +# 2. Background and Problem Setting + +We consider a system that is affine in the control inputs + +$$ +\dot {x} = f (x) + g (x) u \tag {1} +$$ + +where $x \in \mathcal{X} \subseteq \mathbb{R}^n$ and $u \in \mathcal{U} \subseteq \mathbb{R}^m$ , and $f: \mathbb{R}^n \to \mathbb{R}^n$ and $g: \mathbb{R}^n \to \mathbb{R}^{n \times m}$ are (partially) unknown locally Lipschitz continuous functions that represent the drift dynamics and the input matrix, respectively. Eq. (1) represents a broad class of physical systems. Though our method can be straightforwardly extended to the more general case $\dot{x} = f(x,u)$ , this structure significantly facilitates the computation of safe control inputs, as described in Section 2.1. We further assume that $\mathcal{X}$ is an open and connected set and that $\mathcal{U}$ is compact. When a locally Lipschitz controller + +$\pi : \mathbb{R}^n \to \mathbb{R}^m$ is used, we can define the closed-loop system: + +$$ +\dot {x} = f (x) + g (x) \pi (x). \tag {2} +$$ + +We also assume to know an upper bound $L_{\dot{x}} \in \mathbb{R}_{+}$ for the time-derivative of the dynamics, as specified by the following assumption. + +Assumption 2.1. There exists a known positive constant $L_{\dot{x}}$ , such that $\| \dot{x} \|_2 \leq L_{\dot{x}}$ holds for all $x \in \mathcal{X}$ and $u \in \mathcal{U}$ . + +We define safety by considering a safe set $\mathcal{C}$ , as specified in the following. + +Definition 2.2 (Safety). The closed-loop system (2) is said to be safe (with respect to $\mathcal{C}$ ) if $x(0) \in \mathcal{C}$ implies $x(t) \in \mathcal{C}$ for all $t \geq 0$ . + +We consider the case where the safe set $\mathcal{C}$ corresponds to the superlevel set of some known continuously differentiable function $h:\mathbb{R}^n\to \mathbb{R}$ with 0 a regular value: + +$$ +\mathcal {C} \triangleq \{x \in \mathbb {R} ^ {n} \mid h (x) \geq 0 \}. +$$ + +This specification of $\mathcal{C}$ allows us to achieve safety through the control barrier function framework, which we discuss in the following section. This paper considers a compact $\mathcal{C}$ and a Lipschitz continuous functions $h$ , as stated in the following assumption. + +Assumption 2.3. The safe set $\mathcal{C}$ is compact and the function $h$ admits a Lipschitz constant $L_{h}$ , i.e., $|h(x) - h(x')| \leq L_{h} \|x - x' \|_{2}$ holds for all $x, x' \in \mathcal{X}$ . + +Given an arbitrary nominal controller $\pi_{\mathrm{nom}}: \mathcal{X} \to \mathcal{U}$ , we aim to design a control law $\pi$ that renders the closed loop + +system (2) safe while following $\pi_{\mathrm{nom}}$ as closely as possible. We make the following assumption regarding the nominal controller: + +Assumption 2.4. The nominal controller $\pi_{\mathrm{nom}}$ is locally Lipschitz in $\mathcal{X}$ . + +Assumption 2.4 is not restrictive, as it includes a broad class of controllers, including most types of neural networks. + +# 2.1. Safety through Control Barrier Functions + +Our method attempts to ensure safety using control barrier functions, which we introduce in the following. + +Definition 2.5 (Control Barrier Function (CBF) (Ames et al., 2017)). Let $\mathcal{C} \subset \mathcal{X}$ be the 0-superlevel set of a continuously differentiable function $h: \mathbb{R}^n \to \mathbb{R}$ with 0 a regular value. Furthermore, let $\alpha$ be a radially unbounded, strictly monotonically increasing function with $\alpha(0) = 0$ . The function $h$ is a control barrier function (CBF) for (1) on $\mathcal{C}$ if, for all $x \in \mathcal{X}$ , + +$$ +\sup _ {u \in \mathcal {U}} \dot {h} (x, u) \triangleq \sup _ {u \in \mathcal {U}} \frac {\partial h}{\partial x} (x) (f (x) + g (x) u) > - \alpha (h (x)). \tag {3} +$$ + +Intuitively, (3) states that there exists a control input that decreases the time derivative of the CBF as the boundary of the safe set $\mathcal{C}$ is approached, effectively slowing down the system as the boundary gets closer. If $f$ and $g$ were known perfectly, we could leverage this property to compute certifiably safe control inputs by including a CBF increase condition as a constraint when synthesizing control inputs: + +$$ +\begin{array}{l} \pi (x) = \underset {u \in \mathcal {U}} {\operatorname {a r g m i n}} \quad \| u - \pi_ {\text {n o m}} (x) \| _ {2} \tag {4} \\ \begin{array}{c c} \text {s . t .} & \dot {h} (x, u) \geq - \alpha (h (x)). \end{array} \\ \end{array} +$$ + +Given the affine form of this constraint, this safety filter is a quadratic program (QP) that has a closed form solution (Ames et al., 2017) and can be solved fast enough for online safe controller synthesis (Gurrier et al., 2018). + +Since we are dealing with unknown systems (3) is not directly applicable, and we need to formulate a robust CBF constraint that accounts for potential modeling errors. To this end, we assume the CBF constraint is feasible up to a positive margin $\epsilon > 0$ : + +Assumption 2.6 (Robust CBF Feasibility). There exists a radially unbounded, strictly monotonically increasing function $\alpha$ with $\alpha(0) = 0$ and a positive scalar $\epsilon > 0$ , such that + +$$ +\sup _ {u \in \mathcal {U}} \frac {\partial h}{\partial x} (x) (f (x) + g (x) u) \geq - \alpha (h (x)) + \epsilon \tag {5} +$$ + +holds for all $x\in \mathcal{X}$ + +Given the existence of a CBF, we note that this assumption is not very conservative. Intuitively, it states that we can violate the non-robust CBF by a margin of at most $\epsilon$ . + +# 2.2. Gaussian Processes and Reproducing Kernel Hilbert Spaces + +We now introduce the tools used to model the unknown functions $f$ and $g$ . + +Consider a prior model of the system $\hat{f}$ and $\hat{g}$ , which can be set to zero if no prior knowledge is available. For the remainder of this paper, we assume $\hat{f} = \hat{g} = 0$ for simplicity. We then model the residuals $f - \hat{f}$ and $g - \hat{g}$ jointly by using a GP model. To obtain theoretical guarantees on the growth of the model error as new data is added, we assume that the residual model belongs to a reproducing kernel Hilbert space (RKHS). This is codified later in this section. In the following, we review both GPs and RKHSs, and provide some preliminary theoretical results. + +A GP is a collection of random variables, of which any finite number is jointly Gaussian distributed. GPs are fully specified by a prior mean, which we set to zero without loss of generality, and kernel $k: \mathcal{X} \times \mathcal{X} \to \mathbb{R}$ . We model each dimension of the unknown dynamics $f(x) + g(x)u$ using a separate GP. This is achieved by employing composite kernels + +$$ +k _ {i} \left(\mathbf {z}, \mathbf {z} ^ {\prime}\right) \triangleq k _ {f _ {i}} \left(x, x ^ {\prime}\right) + \sum_ {j = 1} ^ {m} u _ {j} k _ {g _ {i, j}} \left(x, x ^ {\prime}\right) u _ {j} ^ {\prime}, \tag {6} +$$ + +where $\mathbf{z} \triangleq (x^{\top}, u^{\top})^{\top}$ . The kernels $k_{f_i}$ and $k_{g_{i,j}}$ capture the behavior of the individual entries of the residuals $f$ and $g$ , respectively. In this paper, we do not require a specific form of kernel $k_{f_i}$ and $k_{g_{i,j}}$ , though the choice of kernel significantly affects performance. We employ a composite kernel (6) because this allows us to leverage measurements of $\dot{x}$ to improve our learned model. + +Consider $N$ noisy measurements $\mathcal{D}_{i,N} \triangleq \{\mathbf{z}^{(q)}, y_i^{(q)}\}_{q=1,\dots,N}$ of the i-th entry of the time-derivative of the state, where + +$$ +y _ {i} ^ {(q)} = f _ {i} \left(x ^ {(q)}\right) + \sum_ {j = 1} ^ {m} g _ {i, j} \left(x ^ {(q)}\right) u _ {j} ^ {(q)} + \xi_ {i} ^ {(q)} \tag {7} +$$ + +and the measurement noise $\xi^{(q)}$ satisfies the following assumption. + +Assumption 2.7. The measurement noise $\xi^{(q)}$ is iid $\sigma_{i,\mathrm{ns}}$ -sub Gaussian for every $i\in \{1,\dots,n\}$ . + +The posterior of the model at an arbitrary state $\mathbf{z}^*$ is then + +given by + +$$ +\begin{array}{l} \mu_ {i, N} (\mathbf {z} ^ {*}) \triangleq \mathbf {k} _ {i, *} ^ {\top} \left(\mathbf {K} _ {i, N} + \sigma_ {i, \mathrm {n s}} ^ {2} \mathbf {I} _ {N}\right) ^ {- 1} \mathbf {y} _ {i}, \\ \sigma_ {i, N} ^ {2} (\mathbf {z} ^ {*}) \triangleq k _ {i} (\mathbf {z} ^ {*}, \mathbf {z} ^ {*}) - \mathbf {k} _ {i, *} ^ {\top} \left(\mathbf {K} _ {i, N} + \sigma_ {i, \mathrm {n s}} ^ {2} \mathbf {I} _ {N}\right) ^ {- 1} \mathbf {k} _ {i, *}, \\ \end{array} +$$ + +where $\mathbf{k}_{i,*}\triangleq (k_i(\mathbf{z}^*,\mathbf{z}^{(1)}),\dots,k_i(\mathbf{z}^*,\mathbf{z}^{(N)}))^\top$ , and the entries of the covariance matrix are given by $[\mathbf{K}_{i,N}]_{pq} = k_i(\mathbf{z}^{(p)},\mathbf{z}^{(q)})$ . In our approach, we employ $\mu_{i,N}$ as a model of our system, and $\sigma_{i,N}$ as a measure of uncertainty, which we employ to inform the data-collection trigger. + +In the following, we refer to the mean and covariance matrix of the full multivariate Gaussian process model as + +$$ +\begin{array}{l} \begin{array}{l}\boldsymbol {\mu} _ {N} (\cdot) \triangleq \left(\mu_ {1, N} (\cdot), \dots , \mu_ {n, N} (\cdot)\right) ^ {\top},\\\overline {{\rightarrow 3}} (\cdot) \triangleq \left(3, \dots , 3, \dots , 3, \dots , 3\right)\end{array}\tag {8} \\ \boldsymbol {\Sigma} _ {N} ^ {2} (\cdot) \triangleq \operatorname {d i a g} \left(\sigma_ {1, N} ^ {2} (\cdot), \dots , \sigma_ {n, N} ^ {2} (\cdot)\right). \\ \end{array} +$$ + +Furthermore, we employ $\mathcal{D}_N = \{\mathbf{z}^{(q)},\mathbf{y}^{(q)}\}_{q = 1,\dots ,N}$ where $\mathbf{y}^{(q)}\triangleq (y_1^{(q)},\ldots ,y_n^{(q)})^\top$ to refer to the full data set corresponding to $N$ system measurements. + +To be able to ensure safety, we need to estimate how data affects the worst-case model error. Though this is impossible in a general setting, an estimate is possible if we assume that the entries of $f$ and $g$ belong to an RKHS, a very rich function space specified by the composite kernel (6). + +Assumption 2.8. For every $i = 1, \dots, n$ , the $i$ -th entry of $f(x) + g(x)u$ belongs to the RKHS with reproducing kernel $k_{i}$ , and the corresponding RKHS norm is bounded by a known positive scalar $B_{i} \in (0, \infty)$ . + +The satisfaction of Assumption 2.8 hinges on choosing the kernels correctly. In practice, if little is known about the system, then so-called "universal kernels" (e.g. Matérn or squared-exponential kernels) are often employed, which can approximate continuous functions arbitrarily accurately (Micchelli et al., 2006). Furthermore, there exist several techniques to mitigate kernel specification that can easily be applied to the methods described in this paper (Berkenkamp et al., 2019; Capone et al., 2022; Fiedler et al., 2021). + +# 3. Safe Control Through Bandit Exploration + +In this section, we present our main algorithm and theoretical guarantees. + +Our algorithms employs two key quantities: the lower confidence bound (LCB) and upper confidence bound (UCB) of the time derivative of $h$ given the data. These quantities are + +computed as + +$$ +L C B _ {N} (x, u) = \frac {\partial h}{\partial x} (x) \boldsymbol {\mu} _ {N} (x, u) - L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x , u)\right)} \tag {9} +$$ + +$$ +U C B _ {N} (x, u) = \frac {\partial h}{\partial x} (x) \boldsymbol {\mu} _ {N} (x, u) + L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x , u)\right)}, \tag {10} +$$ + +where $L_{h} > 0$ is the global Lipschitz constant of $h$ , specified in Assumption 2.3 and + +$$ +\beta_ {N} \triangleq \max _ {i \leq n} \left(B _ {i} + \sigma_ {i, \mathrm {n s}} \sqrt {2 \left(\gamma_ {i , N} + 1 + \log \left(n \delta^ {- 1}\right)\right)}\right). \tag {11} +$$ + +Here, $\gamma_{i,N}$ denotes the maximal information gain after $N$ rounds of data collection, and is computed as + +$$ +\gamma_ {i, N} = \max _ {\mathbf {z} ^ {(1)}, \dots \mathbf {z} ^ {(N)}} \frac {1}{2} \log \left| \mathbf {I} _ {N} + \sigma_ {i, \mathrm {n s}} ^ {- 1} \mathbf {K} _ {i, N} \right|. +$$ + +Intuitively, the LCB (9) and UCB (10) respectively correspond to the lowest and highest permissible value for $\dot{h}(x,u)$ given the model error bound. + +Given the nominal controller $\pi_{\mathrm{nom}}$ , we leverage the LCB (9) to compute robustly safe control inputs by solving the second-order cone program + +$$ +\begin{array}{l} \pi_ {N, \text {s a f e}} (x) = \underset {u \in \mathcal {U}} {\operatorname {a r g m i n}} \quad \| u - \pi_ {\text {n o m}} (x) \| _ {2} \\ \text {s . t .} \quad L C B _ {N} (x, u) \geq - \alpha (h (x)) + \frac {\epsilon}{2}. \tag {12} \\ \end{array} +$$ + +Note that, due to the nature of the composite kernels (6), $\pmb{\mu}_N(x,u)$ is a linear function of $u$ and $\Sigma_N(x,u)$ is a diagonal matrix whose entries are positive definite quadratic functions of $u$ . Hence, (12) can be solved straightforwardly with conventional second-order cone program optimizers. + +We include the term $\frac{\epsilon}{2}$ in the constraint in (12) because this keeps the system from getting too close to the boundary. This ensures that when (12) becomes infeasible, there is still some distance to go until it reaches the boundary of the safe set, leaving us with enough time to explore the system. + +As long as the robust safety filter (12) is strictly feasible, the resulting control policies are locally Lipschitz continuous (Castañeda et al., 2022), yielding unique and well-behaved closed-loop system trajectories. + +If (12) is feasible for all $x \in \mathcal{C}$ , we can leverage standard results from CBF theory (Ames et al., 2017) to show that the resulting trajectory is safe. However, since (12) includes model uncertainty, it becomes potentially infeasible in regions of the state space where uncertainty is high. We address this by employing a bandit-type exploration algo + +rithm to acquire new data whenever infeasibility occurs. Our algorithm is designed to collect sufficiently informative data to render (12) feasible before exiting the safe set. We now describe the corresponding sampling scheme in detail. + +Let $N$ denote the number of data collected up to the current time. If (12) is strictly feasible, it is used to compute control inputs. As soon as strict feasibility is impossible, we switch to our bandit exploration strategy. This corresponds to the first instance in time when + +$$ +\max _ {u \in \mathcal {U}} L C B _ {N} (x, u) = - \alpha (h (x)) + \frac {\epsilon}{2} \tag {13} +$$ + +holds and can be easily verified using a quadratic program. We denote this point in time by $t_{N + 1}$ . At this point, we switch to an exploration-driven controller $\bar{\pi}_{N + 1}$ , which can be chosen freely, provided that it is locally Lipschitz continuous and satisfies $\bar{\pi}(x(t_{N + 1})) = u^{(N + 1)}$ , where $u^{(N + 1)}$ maximizes the upper confidence bound + +$$ +u ^ {(N + 1)} = \arg \max _ {u \in \mathcal {U}} U C B _ {N} (x (t _ {N + 1}), u). \tag {14} +$$ + +In our experiments in Section 5, we choose $\bar{\pi}(x) \equiv u^{(N+1)}$ . Choosing a control input this way is very similar to bandit exploration algorithms, which aim to find the maximum of an unknown function. In our case, we wish to maximize the unknown time derivative of the CBF $\dot{h}(x,u)$ given the state $x$ , which we know to satisfy Assumption 2.6. We apply $\bar{\pi}_{N+1}$ for a time length of $\Delta t$ , where $\Delta t$ corresponds to the data sampling frequency and is specified a priori. We then collect a noisy measurement of the time-derivative of the system + +$$ +\mathbf {y} ^ {(N + 1)} = f (x (t _ {N + 1})) + g (x (t _ {N + 1})) u ^ {(N + 1)} + \xi^ {(N + 1)} +$$ + +and update the GP model with the measurement data pair $(\mathbf{z}^{(N + 1)},\mathbf{y}^{(N + 1)})$ , where + +$$ +\mathbf {z} ^ {(N + 1)} = \left(\left(x (t _ {N + 1})\right) ^ {\top}, \left(u ^ {(N + 1)}\right) ^ {\top}\right) ^ {\top}. +$$ + +After a time of $\Delta t$ has passed, we check if the optimization problem (12) is strictly feasible. To this end, we check if + +$$ +\max _ {u \in \mathcal {U}} L C B _ {N} (x, u) > - \alpha (h (x)) + \frac {\epsilon}{2} \tag {15} +$$ + +holds. If so, we apply $\pi_{N,\text{safe}}$ . Otherwise, we repeat the sampling procedure. These steps are summarized in Algorithm 1. + +Remark 3.1. The condition (13) specifies that exploration starts when strict infeasibility is not given, as opposed to waiting until infeasibility occurs. In general, it is not advisable to wait for infeasibility to start exploring, as this means that the control law is not well-defined, which can be + +Algorithm 1 Safe Control via On-the-Fly Bandit Exploration + +Input: Sampling time $\Delta t$ , GP prior, CBF $h$ , class- $\mathcal{KL}$ function $\alpha$ +1: Set EXPLORE = FALSE +2: for $t \in [0, \infty)$ do +3: if EXPLORE == FALSE then +4: if $\max_{u \in \mathcal{U}} LCB_N(x, u) > -\alpha(h(x)) + \frac{\epsilon}{2}$ then +5: Solve (12) and apply $\pi_{N,\text{safe}}(x)$ +6: else +7: Set EXPLORE = TRUE +8: Set $N = N + 1$ . +9: Set $t_N = t$ . +10: Set $x^{(N)} = x$ . +11: Compute $u^{(N)}$ by solving (14). +12: end if +13: end if +14: if EXPLORE == TRUE then +15: if $t < t_N + \Delta t$ then +16: Apply a locally Lipschitz controller $\bar{\pi}$ with $\bar{\pi}(x^{(N)}) = u^{(N)}$ . +17: Collect noisy measurement $\mathbf{y}^{(N)} = \dot{x}(t_N) - \hat{f}(x(t_N)) - \hat{g}(x(t_N))u^{(N)} + \xi^{(N)}$ +18: else if $t = t_N + \Delta t$ then +19: Set EXPLORE = FALSE +20: Set $\mathcal{D}_N = \mathcal{D}_{N-1} \cap \{\mathbf{z}^{(N)}, \mathbf{y}^{(N)}\}$ and update GP. +21: end if +22: end if +23: end for + +detrimental to control. + +We then show that, if we choose $\Delta t$ high enough, the closed-loop system under Algorithm 1 is safe with high probability. + +Theorem 3.2. Let Assumptions 2.1, 2.3, 2.4 and 2.6 to 2.8 hold. Choose $\delta \in [0,1]$ and $\beta_{N}$ as in (11). Moreover, choose the sampling time as + +$$ +\Delta t > \frac {\epsilon}{L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta N _ {\max }}, \tag {16} +$$ + +where $\Delta N_{\max}$ satisfies + +$$ +\Delta N _ {\max } > \frac {3 2 \beta_ {\Delta N _ {\max }} ^ {2} L _ {h} ^ {2}}{\epsilon^ {2} \log \left(1 + \sigma_ {i , n s} ^ {- 2}\right)} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {\max }} \tag {17} +$$ + +Let the initial state $x(0)$ be strictly within the safe set, such that $\alpha(h(x(0))) \geq \epsilon$ . Then, with probability at least $1 - \delta$ , the closed-loop system under the policy specified by Algorithm 1 is safe. Furthermore, the closed-loop stops collecting data after at most $\Delta N_{\text{max}}$ collected observations. + +The proof of Theorem 3.2 can be found in Appendix B. + +![](images/5d71d337d5ff2f50a6bda7c5efb7aae1038ceb94ad977ac91959d8de6df6c12b.jpg) +(a) Value of control barrier function $h(x)$ for cruise control example. Since no prior model is available for control, safety is obtained by efficiently learning a model online. + +![](images/a6b7300102290987356a56404d2fb0a1e9a740bc922e5b1b0af6c72811d7b9a4.jpg) +(b) Minimum of LCB of CBF time derivative for cruise control example. Spikes are due to training data set updates, leading to decreased model uncertainty. Positive values indicate infeasibility of the robust safety filter (12). +Figure 2. CBF and LCB for a single cruise control simulation using a sampling time of $\Delta t = 10^{-5}\mathrm{s}$ . + +Intuitively, Theorem 3.2 states that if we choose the data collection frequency high enough, we guarantee safety after collecting a finite number of data. The quantity $\beta_{\Delta N_{\mathrm{max}}}^2 \sum_{i=1}^{n} \gamma_i, \Delta N_{\mathrm{max}}$ is the only part in the right-hand side of (17) that depends on $\Delta N_{\mathrm{max}}$ . It is closely related to the regret metric frequently found in bandit literature, which measures the deviation from optimal decisions. This quantity grows sublinearly for most commonly employed kernels, meaning there exists a $\Delta N_{\mathrm{max}}$ that satisfies (17). In practice, we can approximate by sampling the state and input space. Alternatively, we can obtain a (potentially crude) bound for this term based on the kernel hyperparameters. This is discussed in Appendix C. + +# 4. Discussion and Limitations + +Although we assume that the system structure (1) is affine in the control input, this is not strictly a requirement for theoretical guarantees and can be relaxed, provided that the optimization problems (12), (13) and (14) can be solved adequately. + +Theorem 3.2 points at an interaction between various quantities, including the sampling frequency, model uncertainty, measurement noise, CBF violation tolerance, and Lipschitz constants of the system and CBF. In simple terms, Theorem 3.2 indicates that a higher sampling frequency is likely more beneficial for safety. However, other practical considerations can also improve safety. For instance, we can reduce the Lipschitz constant $L_{\hat{x}}$ of the system by cleverly restricting the permissible control input space $\mathcal{U}$ , thereby reducing the bound (17). + +A practical concern that may arise with control inputs $u$ geared towards exploration is that the corresponding inputs may strain the system and lead to undesirable behavior, e.g., if the input exhibits a high frequency and amplitude. However, computing the input by maximizing the UCB + +(14) corresponds to choosing the optimistically safest input under uncertainty. Hence, it is reasonable to expect the corresponding input to be acceptable to the system, i.e., not damaging. + +The primary focus of this work is the safety of the closed-loop function, and we do not address closed-loop control performance. However, the tools presented here can be straightforwardly extended to address performance, e.g., by designing a data collection scheme that aims to reduce model uncertainty whenever control performance is not satisfactory. Furthermore, our method can be potentially improved by preemptively exploring before infeasibility occurs, increasing the space of permissible control actions. + +Although Assumption 2.6 can seem strict, it still offers flexibility, and there are ways to relax it in practice. Typically, only a portion of the safe set is visited during control. Hence, it is enough if the CBF is valid only for the corresponding subset of the state space. Furthermore, we can achieve conservatism by initially restricting the safe set to a region that is easy to control and then iteratively expanding it as more data is collected. This potentially allows us to gradually improve the CBF as more system knowledge allows us to expand the safe set. Alternatively, we can include conservatism in the safety requirement by computing the CBF condition from a collection of (potentially valid) CBFs and taking the worst case. + +# 5. Numerical Experiments + +We now showcase how our approach performs using two numerical simulations: a cruise control system and a quadrotor with ground dynamics. We assume to have either no prior model (cruise control example) or to know only the model component corresponding to the time derivatives (quadrotor). Note that this is insufficient to implement any state-of-the-art approach, as the prior model does not include + +![](images/27382bb69d3ef008956b152537c172c9234b2fb9027686d7e4cd3729bb68de76.jpg) +(a) The quadrotor starts at a state within the safe region where (12) is infeasible. + +![](images/18bd36d1041a30c996ebdd5d45841dc0e0b27c693c2e0e204391c6b7b67e4b39.jpg) +(b) Our algorithm computes exploratory control inputs without leaving the safe set. The observations are used to update the model. This phase corresponds roughly to the first two seconds of the simulation. + +![](images/2695a793d11fbd8a43b03032bd4c181dd4d0082067bca600d0e350140b50da4d.jpg) +(c) After a finite amount of data is collected without exiting the safe set, the uncertainty is small enough to achieve the feasibility of the safety filter (12). This is expected from Theorem 3.2. + +![](images/b1f21c9baf9ad4a81e57583185f47722d582c01bfd5021e9aa0f5032b7b38e1a.jpg) +Figure 3. Visualization of a single trajectory of the quadrotor experiment using a sampling time of $\Delta t = 10^{-5}\mathrm{s}$ . +(a) Value of control barrier functions for quadrotor example. +Figure 4. CBF and LCB for a single quadrotor run using a sampling time of $\Delta t = 10^{-5}\mathrm{s}$ . + +![](images/412be21839878c3ab85ef82692a18140d9dfb3c26b7d879e8232725e144feac6.jpg) +(b) Minimum of the LCB of the CBF time derivative for quadrotor example. + +the influence of the control input. We additionally perform experiments that aim to answer the following questions: + +- How does our method compare with random exploration during infeasibility? +- How does the choice of sampling time $\Delta t$ affect safety? + +# 5.1. Cruise Control + +We employ our approach to learn the road vehicle model presented in Castañeda et al. (2021) while applying an adaptive cruise control system. The states are given by $x = [v z]^\top$ , where $z$ is the distance between the ego vehicle and the target vehicle in front, and $v$ denotes the ego vehicle speed. Our setup is fully described in Appendix A.1. + +As a control barrier function, we employ $h(x) = z - T_{h}v$ , where $T_{h} = 1.8$ , which aims to maintain a safe distance between the ego vehicle and the vehicle in front. The nominal controller $\pi_{\mathrm{nom}}(x)$ used for the robust CBF-SOCP (12) is a P-controller $\pi_{\mathrm{nom}} = -10(v - v_d)$ , where $v_{d} = 24$ + +corresponds to the desired velocity. We employ squared-exponential kernels to model $f$ and $g$ and assume to have $N = 10$ data points at the start of the simulation, which we employ exclusively to learn the kernel hyperparameters. We do so by minimizing the posterior likelihood (Rasmussen & Williams, 2006). + +We simulate the system for 100 seconds. The CBF value for a single simulation run using a sampling time of $\Delta t = 10^{-5}\mathrm{s}$ is shown in Figure 2a. The minimum of the LCB is depicted in Figure 2b. The CBF value $h(x)$ is always above zero, meaning the system is safe. This is to be expected from Theorem 3.2. As can be seen in Figure 2b, the minimum of the LCB is frequently positive in the beginning of the simulation. This means that the safety filter (12) is infeasible during these time instances, particularly in the beginning. This leads to a high rate of exploratory inputs, which suddenly decreases model uncertainty, causing the LCB to spike. After approximately 6 seconds, enough information was collected to recover feasibility, after which a safe input can be obtained without further exploration. + +![](images/a4f439b903ef8e286e3bbff7f2850883c7b9aa567d712387b62455c2e1fedaf4.jpg) +Figure 5. Rate of failure using our approach and random inputs for the cruise control (left) and quadrotor (right) settings at varying sampling frequencies $(\Delta t)^{-1}$ . + +![](images/0514a68f0315b0b145e60b2d81b93ea6e0bb715ea08c86b660c7823bfcfc722f.jpg) + +# 5.2. Quadrotor + +We additionally showcase our approach using a numerical simulation of a quadrotor with ground dynamics. The quadrotor dynamics are described in detail in Appendix A.2. + +The quadrotor states are given by $x = [p, v, q]$ , where where $p \in \mathbb{R}^3$ is the global position, $v \in \mathbb{R}^3$ the global velocity, and $q \in \mathbb{R}^4$ is the system orientation in quaternion format. The control inputs $u = [T\omega]^{\top}$ consist of the thrust acceleration $T$ and the body-frame angle rates $\omega \in SO(3)$ . + +In this example, we employ two CBFs. The first is $h(x) = 10(p_z - T_zv_z)$ , where $T_{z} = 0.1$ , and is geared toward keeping altitude higher than zero. The second CBF utilizes the differential flatness of the quadrotor to restrict velocities, orientation we add a rotation, and the orientation of the thrust vector. It is fully described in Appendix A.2. When computing the exploratory control inputs (14), we alternate between CBFs. The nominal controller $\pi_{\mathrm{nom}}(x)$ used for the robust safety filter (12) corresponds to a differentially flat controller, computed as in Faessler et al. (2018), and we consider bounded thrust, with $|T| \leq 15000$ . Similarly to the cruise control setting, we use squared-exponential kernels and assume to have $N = 10$ data points at the start of the simulation to learn the kernel hyperparameters. + +We simulate the system for 50 seconds. The CBF value for a single run using a sampling time of $\Delta t = 10^{-5}\mathrm{s}$ can be seen in Figure 4a, the minimum of the LCB is depicted in Figure 4b. Figure 4 depicts the corresponding quadrotor trajectory. Similarly to the cruise control setting, infeasibility is frequently encountered initially, causing our algorithm to explore. After approximately 2 seconds, feasibility is recovered, causing the quadrotor to hover in place for the remainder of the simulation. + +# 5.3. Comparison with Random Exploratory Control + +Theorem 3.2 states that it is sufficient to collect data by applying (14) to the system in order to guarantee safety. However, other types of control inputs may also satisfy this requirement. In the following, we investigate how our approach performs compared to random exploratory control inputs. More specifically, we apply our method to the system with the following difference: instead of computing exploratory inputs by solving (14), we sample the control inputs from a uniform distribution on $\mathcal{U}$ . We again consider the adaptive cruise control and quadrotor settings and investigate how our approach and the random input-based one perform using various sampling frequencies $\Delta t$ . This is especially relevant, as many practical settings do not allow for arbitrarily high sampling frequencies. + +We perform 100 simulations with different initial conditions, uniformly sampled from a region within the safe set. We report how often each method fails, i.e., leads to a positive value for the CBF during the simulation. The average number of failures for both settings is shown in Figure 5. A non-zero failure rate is expected at low sampling frequencies since too little data is collected to learn a model quickly. However, our approach nonetheless performs better than the random control input-based approach. This is because the inputs applied to the system are geared towards recovering the feasibility of the robust safety filter (12), whereas random inputs are not. We also observe that data efficiency is higher at higher sampling, leading to less collected data. This is because a higher sampling rate means that the elapsed time between data collection and model update is smaller, i.e., the model captures the true system more faithfully immediately after an update. This suggests that, if the maximal permissible sampling frequency is low, then particular effort should be put into updating the model as fast as possible. + +# 6. Related Work + +# 6.1. Control Barrier Functions + +CBFs have been studied extensively in settings with perfectly known dynamics (Agrawal & Sreenath, 2017; Ames et al., 2017; Bansal et al., 2017; Wabersich & Zeilinger, 2018; Zeng et al., 2021). However, the setting where a known CBF is used to guide data collection when dynamics are unknown is an ongoing research question that has recently garnered increased attention. In (Choi et al., 2020; Taylor et al., 2020), the authors employ a neural network to learn the residual dynamics in a reinforcement learning setting. The safety of the learned policy is enforced by including a CBF constraint during training. An event-triggered approach for improving the learned dynamics model is proposed in (Lederer et al., 2024), where a CBF and the system structure are leveraged to guarantee safety. + +# 6.2. Safe Exploration with Gaussian Processes + +Gaussian processes have been used extensively in the context of safe control and exploration. The work of (Sukhija et al., 2023) leverages contextual bandits to safely tune a parametric controller. By formulating an upper confidence bound for the safety function, the method switches to safe parameters whenever the boundary of the safe set is reached. The works of Prajapat et al. (2022); Sui et al. (2015); Turchetta et al. (2016); Wachi & Sui (2020) consider exploration with finite state spaces, known dynamics, and unknown functions specifying safe state-action pairs. A lower confidence bound of the safety constraints ensures safe actions, whereas an upper confidence bound for the reward drives exploration. A significant difference between our method and those described above is that they explore safe states to expand the safe set and maximize return, whereas exploration in our approach is driven by the need to ensure safety. The methods of (Hewing et al., 2019; Koller et al., 2018) use a GP to formulate safety constraints over a finite horizon for a model predictive control algorithm. + +# 7. Conclusion + +We have presented a learning-based control approach for exploring on the fly to guarantee safety. Using a Gaussian process model, we have formulated a robust safety filter that guarantees safe inputs whenever feasible. Whenever infeasibility occurs we revert to a bandit exploration algorithm that is geared toward ensuring that feasibility is recovered before exiting the safe set. We show that if the sampling rate is chosen high enough, we can provably ensure safety with high probability. In future, we aim to apply the proposed approach to real-life and other complex systems. + +# Acknowledgements + +This work is supported by the DAAD programme Kon- rad Zuse Schools of Excellence in Artificial Intelligence (relAI), sponsored by the German Federal Ministry of Education and Research and by the European Research Council (ERC) Consolidator Grant "Safe data-driven control for humancentric systems (CO-MAN)" under grant agreement number 864686. + +# Impact Statement + +This paper presents work toward advancing the safety of Machine Learning-based methods. Safety plays a crucial role in developing Machine Learning techniques, as guaranteeing safety greatly enhances the applicability of existing methods. We feel that developing and further improving safe learning-based techniques such as the one presented in this paper will have a significant societal impact, as the spectrum of applications is substantial, including healthcare, autonomous driving, human-machine interaction, and various other robotics fields. + +# References + +Agrawal, A. and Sreenath, K. Discrete control barrier functions for safety-critical control of discrete systems with application to bipedal robot navigation. In Robotics: Science and Systems, volume 13, pp. 1-10. Cambridge, MA, USA, 2017. +Akametalu, A. K., Fisac, J. F., Gillula, J. H., Kaynama, S., Zeilinger, M. N., and Tomlin, C. J. Reachability-based safe learning with Gaussian processes. In 53rd IEEE Conference on Decision and Control, pp. 1424-1431, 2014. doi: 10.1109/CDC.2014.7039601. +Ames, A. D., Xu, X., Grizzle, J. W., and Tabuada, P. Control Barrier Function Based Quadratic Programs for Safety Critical Systems. IEEE Transactions on Automatic Control, 62(8):3861-3876, August 2017. ISSN 0018-9286, 1558-2523. doi: 10.1109/TAC.2016.2638961. URL http://arxiv.org/abs/1609.06408. arXiv: 1609.06408. +Ao, Y., Esfandiari, H., Carrillo, F., Laux, C. J., As, Y., Li, R., Van Assche, K., Davoodi, A., Cavalcanti, N. A., Farshad, M., Grewe, B. F., Vander Poorten, E., Krause, A., and Furnstahl, P. Saferplan: Safe deep reinforcement learning for intraoperative planning of pedicle screw placement. Medical Image Analysis, 99:103345, 2025. ISSN 1361-8415. +Bansal, S., Chen, M., Herbert, S., and Tomlin, C. J. Hamilton-jacobi reachability: A brief overview and recent advances. In 2017 IEEE 56th Annual Conference + +on Decision and Control (CDC), pp. 2242-2253. IEEE, 2017. +Berkenkamp, F., Turchetta, M., Schoellig, A., and Krause, A. Safe model-based reinforcement learning with stability guarantees. In Advances in Neural Information Processing Systems, pp. 908-919, 2017. +Berkenkamp, F., Schoellig, A. P., and Krause, A. No-regret Bayesian optimization with unknown hyperparameters. Journal of Machine Learning Research, 20(50):1-24, 2019. +Capone, A. and Hirche, S. Backstepping for partially unknown nonlinear systems using Gaussian processes. IEEE Control Systems Letters, 3:416-421, 2019. +Capone, A., Lederer, A., and Hirche, S. Gaussian process uniform error bounds with unknown hyperparameters for safety-critical applications. In International Conference on Machine Learning, pp. 2609-2624. PMLR, 2022. +Castañeda, F., Choi, J. J., Zhang, B., Tomlin, C. J., and Sreenath, K. Pointwise feasibility of Gaussian process-based safety-critical control under model uncertainty. In 2021 60th IEEE Conference on Decision and Control (CDC), pp. 6762-6769, 2021. doi: 10.1109/CDC45484.2021.9683743. +Castañeda, F., Choi, J. J., Jung, W., Zhang, B., Tomlin, C. J., and Sreenath, K. Probabilistic safe online learning with control barrier functions. arXiv preprint arXiv:2208.10733, 2022. +Cheng, R., Orosz, G., Murray, R. M., and Burdick, J. W. End-to-end safe reinforcement learning through barrier functions for safety-critical continuous control tasks. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pp. 3387-3395, 2019. +Choi, J., Castañeda, F., Tomlin, C. J., and Sreenath, K. Reinforcement learning for safety-critical control under model uncertainty, using control lyapunov functions and control barrier functions. Robotics: Science and Systems (RSS), 2020. +Chua, K., Calandra, R., McAllister, R., and Levine, S. Deep reinforcement learning in a handful of trials using probabilistic dynamics models. Advances in neural information processing systems, 31, 2018. +Curi, S., Berkenkamp, F., and Krause, A. Efficient model-based reinforcement learning through optimistic policy search and planning. In Advances in Neural Information Processing Systems, volume 33, pp. 14156-14170. Curran Associates, Inc., 2020. + +Danjun, L., Yan, Z., Zongying, S., and Geng, L. Autonomous landing of quadrotor based on ground effect modelling. In 2015 34th Chinese Control Conference (CCC), pp. 5647-5652, 2015. doi: 10.1109/ChiCC.2015.7260521. +Faessler, M., Franchi, A., and Scaramuzza, D. Differential flatness of quadrotor dynamics subject to rotor drag for accurate tracking of high-speed trajectories. IEEE Robotics and Automation Letters, 3(2):620-626, 2018. doi: 10.1109/LRA.2017.2776353. +Fiedler, C., Scherer, C. W., and Trimpe, S. Practical and rigorous uncertainty bounds for Gaussian process regression. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pp. 7439-7447, 2021. +Gurriet, T., Singletary, A., Reher, J., Ciarletta, L., Feron, E., and Ames, A. Towards a framework for realizable safety critical control through active set invariance. In 2018 ACM/IEEE 9th International Conference on CyberPhysical Systems (ICCPS), pp. 98-106. IEEE, 2018. +Hewing, L., Kabzan, J., and Zeilinger, M. N. Cautious model predictive control using Gaussian process regression. IEEE Transactions on Control Systems Technology, 2019. +Hewing, L., Wabersich, K. P., Menner, M., and Zeilinger, M. N. Learning-based model predictive control: Toward safe learning in control. Annual Review of Control, Robotics, and Autonomous Systems, 3:269-296, 2020. +Jagtap, P., Pappas, G. J., and Zamani, M. Control barrier functions for unknown nonlinear systems using Gaussian processes. In 2020 59th IEEE Conference on Decision and Control (CDC), pp. 3699-3704. IEEE, 2020. +Khalil, H. K. Nonlinear systems. Prentice-Hall, New Jersey, 2(5):5-1, 1996. +Koller, T., Berkenkamp, F., Turchetta, M., and Krause, A. Learning-based model predictive control for safe exploration. In IEEE Conference on Decision and Control, pp. 6059-6066, 2018. +Krause, A. and Ong, C. Contextual Gaussian process bandit optimization. In Advances in Neural Information Processing Systems, volume 24. Curran Associates, Inc., 2011. +Lederer, A., Begzadic, A., Hirche, S., Cortés, J., and Herbert, S. Safe barrier-constrained control of uncertain systems via event-triggered learning. arXiv preprint arXiv:2408.16144, 2024. +Micchelli, C. A., Xu, Y., and Zhang, H. Universal kernels. Journal of Machine Learning Research, 7(Dec):2651-2667, 2006. + +Nguyen, Q. and Sreenath, K. Exponential control barrier functions for enforcing high relative-degree safety-critical constraints. In 2016 American Control Conference (ACC), pp. 322-328. IEEE, 2016. +Prajapat, M., Turchetta, M., Zeilinger, M., and Krause, A. Near-optimal multi-agent learning for safe coverage control. Advances in Neural Information Processing Systems, 35:14998-15012, 2022. +Rasmussen, C. E. and Williams, C. K. Gaussian processes for machine learning. 2006. The MIT Press, Cambridge, MA, USA, 2006. +Rodriguez, I. D. J., Rosolia, U., Ames, A. D., and Yue, Y. Learning unstable dynamics with one minute of data: A differentiation-based Gaussian process approach. arXiv preprint, 2021. +Srinivas, N., Krause, A., Kakade, S. M., and Seeger, M. W. Information-theoretic regret bounds for Gaussian process optimization in the bandit setting. IEEE Transactions on Information Theory, 58(5):3250-3265, 2012. +Sui, Y., Gotovos, A., Burdick, J., and Krause, A. Safe exploration for optimization with Gaussian processes. In Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pp. 997-1005, Lille, France, 07-09 Jul 2015. PMLR. +Sukhija, B., Turchetta, M., Lindner, D., Krause, A., Trimpe, S., and Baumann, D. Gosalfeopt: Scalable safe exploration for global optimization of dynamical systems. Artificial Intelligence, 320:103922, 2023. ISSN 0004-3702. +Taylor, A., Singletary, A., Yue, Y., and Ames, A. Learning for safety-critical control with control barrier functions. In Proceedings of the 2nd Conference on Learning for Dynamics and Control, volume 120 of Proceedings of Machine Learning Research, pp. 708-717. PMLR, 10-11 Jun 2020. +Turchetta, M., Berkenkamp, F., and Krause, A. Safe exploration in finite markov decision processes with Gaussian processes. In Advances in Neural Information Processing Systems, pp. 4312-4320, 2016. +Wabersich, K. P. and Zeilinger, M. N. Linear Model Predictive Safety Certification for Learning-Based Control. In 2018 IEEE Conference on Decision and Control (CDC), pp. 7130-7135, December 2018. doi: 10.1109/CDC.2018.8619829. ISSN: 2576-2370. +Wachi, A. and Sui, Y. Safe reinforcement learning in constrained Markov decision processes. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 9797-9806. PMLR, 13-18 Jul 2020. + +Zeng, J., Zhang, B., and Sreenath, K. Safety-critical model predictive control with discrete-time control barrier function. In 2021 American Control Conference (ACC), pp. 3882-3889. IEEE, 2021. + +# A. Full Description of Numerical Experiments + +# A.1. Cruise Control + +In the following, we omit physical dimensions when describing the system model. The state space model of the cruise control is given by $\dot{x} = f(x) + g(x)u$ , with state-dependent functions + +$$ +f (x) = \left[ \begin{array}{c} - \frac {1}{m} \left(\zeta_ {0} + \zeta_ {1} v + \zeta_ {2} v ^ {2}\right) \\ v _ {0} - v \end{array} \right], \quad g (x) = \left[ \begin{array}{l} 0 \\ \frac {1}{m} \end{array} \right] \tag {18} +$$ + +and state $x = [v z]^\top$ , where $z$ denotes the distance between the ego vehicle and the target vehicle in front, $v$ denotes the ego vehicle speed, $m = 1650$ its mass, and $\zeta_0 = 0.2$ , $\zeta_1 = 10$ , $\zeta_2 = 0.5$ are parameters that specify the rolling resistance. + +# A.2. Quadrotor + +The quadrotor dynamics are specified by the functions + +$$ +\dot {p} = v, \quad \dot {v} = g _ {\mathrm {g r}} e _ {z} + \zeta (p _ {z}) R e _ {z} T, \tag {19a} +$$ + +$$ +\dot {R} = R [ \omega ] _ {\times} \tag {19b} +$$ + +where $p \in \mathbb{R}^3$ is the global position, $v \in \mathbb{R}^3$ the global velocity, and $R \in \mathrm{SO}(3)$ the system orientation. The parameter $g_{\mathrm{gr}} = 9.81$ denotes gravity, $[\cdot]_{\times} : \mathbb{R}^3 \to \mathbb{R}^{3 \times 3}$ is the skew-symmetric mapping, and $e_z = [001]^\top$ is the unit- $z$ vector. The function $\zeta : \mathbb{R}_+ \to [0,1]$ models ground effects and takes the quadrotor height $p_z$ as an input variable. It is computed as Danjun et al. (2015) + +$$ +\zeta \left(p _ {z}\right) = 1 - \rho \left(\frac {r _ {\mathrm {r o t}}}{4 p _ {z}}\right) ^ {2}, \tag {20} +$$ + +where $\rho = 5$ and $r_{\mathrm{rot}} = 0.09$ is the rotor radius. + +The first CBF is $h(x) = 10(p_z - T_zv_z)$ , where $T_{z} = 0.1$ . It is geared toward keeping altitude higher than zero. The second CBF utilizes the differential flatness of the quadrotor to synthesize a viable safe set. In particular, we are concerned with restricting the system to safe positions defined as the 0-superlevel set of $h_p(p) = r^2 -\| p\| ^2$ . We extend $h_p$ to include velocities as $h_e(p,v) = \dot{h}_p(p,v) + \alpha h_p(p)$ for some $\alpha >0$ to produce a relative degree-1 CBF for a double integrator system as in Nguyen & Sreenath (2016). To include orientation we add a rotation term to produce a CBF for the drone, $h(p,v,R) = h_e(p,v) - \lambda (1 - \frac{1}{2r}\frac{\partial h}{\partial p} Re_z)$ , with some $\lambda \in (0,r^2 /2)$ which shrinks the safe set to ensure that the thrust vector is pointing inwards whenever $h_e(p,v) = 0$ . + +# B. Proof of Theorem 3.2 + +We prove Theorem 3.2 in two steps. First, we show that the control inputs are well-behaved and the closed-loop system is safe if the robust CBF-SOCP (12) is strictly feasible. Afterward, we show that strict feasibility is always recovered before exiting the safe set when using our exploration approach. + +We begin by leveraging Assumptions 2.7 and 2.8 to obtain a bound on the model error, which is crucial to establish safety. + +Lemma B.1. Let Assumptions 2.7 and 2.8 hold and let + +$$ +\beta_ {N} \triangleq \max _ {i \leq n} \left(B _ {i} + \sigma_ {i, n s} \sqrt {2 \left(\gamma_ {i , N} + 1 + \log \left(n \delta^ {- 1}\right)\right)}\right). +$$ + +Then, with probability at least $1 - \delta$ + +$$ +\left\| f \left(x ^ {*}\right) + g \left(x ^ {*}\right) u ^ {*} - \boldsymbol {\mu} \left(x ^ {*}, u ^ {*}\right) \right\| _ {2} \leq \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} \left(x ^ {*} , u ^ {*}\right)\right)} +$$ + +holds for all $x\in \mathcal{X}$ $u\in \mathcal{U}$ and all $N\in \mathbb{N}$ + +Proof. By Capone & Hirche (2019, Lemma 1), with probability at least $1 - \delta$ , + +$$ +\left| f _ {i} \left(x ^ {*}\right) + \sum_ {j = 1} ^ {m} g _ {i, j} \left(x ^ {*}\right) u _ {j} ^ {*} - \mu_ {i, N} \left(x ^ {*}, u ^ {*}\right) \right| \leq \left(B _ {i} + \sigma_ {i, \mathrm {n s}} \sqrt {2 \left(\gamma_ {i , N} + 1 + \log \left(n \delta^ {- 1}\right)\right)}\right) \sigma_ {i, N} \left(x ^ {*}, u ^ {*}\right) +$$ + +holds for all $i = 1,\dots,n$ , all $x\in \mathcal{X}$ , $u\in \mathcal{U}$ , and all $N\in \mathbb{N}$ . We then have + +$$ +\begin{array}{l} \left\| f \left(x ^ {*}\right) + g \left(x ^ {*}\right) u ^ {*} - \boldsymbol {\mu} \left(x ^ {*}, u ^ {*}\right) \right\| _ {2} ^ {2} \leq \sum_ {i = 1} ^ {n} \left| f _ {i} \left(x ^ {*}\right) + \sum_ {j = 1} ^ {m} g _ {i, j} \left(x ^ {*}\right) u _ {j} ^ {*} - \mu_ {i, N} \left(\mathbf {z} ^ {*}\right) \right| ^ {2} \\ \leq \sum_ {i = 1} ^ {n} \beta_ {i, N} ^ {2} \sigma_ {i, N} ^ {2} (\mathbf {z} ^ {*}) \\ \leq \sum_ {i = 1} ^ {n} \beta_ {N} ^ {2} \sigma_ {i, N} ^ {2} (\mathbf {z} ^ {*}) \\ = \beta_ {N} ^ {2} \operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} \left(x ^ {*}, u ^ {*}\right)\right). \\ \end{array} +$$ + +![](images/cd51f73ded551ebb9a7f0f6f36dff69116dc2ef81dab56eb9b09e5a35cd4d25d.jpg) + +Lemma B.1 allows us to bound the GP model error at any given point $\mathbf{z}^*$ given any data with high probability. This plays a crucial role in establishing robust system safety in the face of model uncertainty. + +# Safety under Strict Feasibility + +We first demonstrate that when the robust safety filter (12) is strictly feasible, the control law $\pi_{N,\mathrm{safe}}$ ensures the system remains strictly within the safe set with high probability. Specifically, the control barrier function value of the closed-loop system increases over time whenever $\alpha(h(x)) < \frac{\epsilon}{2}$ . To prove this statement formally, we first present some preliminary results. + +Lemma B.2. Let the robust safety filter (12) be strictly feasible for some $x \in \mathcal{X}$ . Then the policy $\pi_{N, safe}$ specified by the safety filter (12) is Lipschitz continuous in a neighborhood of $x$ . + +Proof. The proof is identical to that of Castaneda et al. (2022, Lemma 6). + +Lemma B.2 is important to guarantee that the trajectory resulting from applying $\pi_{N,\mathrm{safe}}$ is unique and well-behaved, allowing us to establish safety. + +Lemma B.3. Let Assumptions 2.1, 2.3 and 2.6 to 2.8 hold. Then, with probability at least $1 - \delta$ , the following holds for all $x \in \mathcal{X}$ , all $u \in \mathcal{U}$ , and all $N \in \mathbb{N}$ : + +$$ +L C B _ {N} (x, u) \leq \dot {h} (x, u) \leq U C B _ {N} (x, u). \tag {21} +$$ + +Proof. We show the result only for the lower bound $LCB_{N}$ since the argument is identical for the upper bound $UCB_{N}$ . By + +Lemma B.1, with probability at least $1 - \delta$ + +$$ +\begin{array}{l} \dot {h} (x, u) = \frac {\partial h}{\partial x} (x) (f (x) + g (x) u) \\ = \frac {\partial h}{\partial x} (x) (\boldsymbol {\mu} _ {N} (x, u)) + \frac {\partial h}{\partial x} (x) (f (x) + g (x) u - \boldsymbol {\mu} _ {N} (x, u)) \\ \geq \frac {\partial h}{\partial x} (x) (\boldsymbol {\mu} _ {N} (x, u)) - \left\| \frac {\partial h}{\partial x} (x) \right\| _ {2} \| (f (x) + g (x) u - \boldsymbol {\mu} _ {N} (x, u)) \| _ {2} \\ \geq \frac {\partial h}{\partial x} (x) (\boldsymbol {\mu} _ {N} (x, u)) - \left\| \frac {\partial h}{\partial x} (x) \right\| _ {2} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x , u)\right)} + \frac {\epsilon}{2} \\ \geq \frac {\partial h}{\partial x} (x) (\boldsymbol {\mu} _ {N} (x, u)) - L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x , u)\right)} \\ = L C B _ {N} (x, u). \\ \end{array} +$$ + +holds for all $x\in \mathcal{X}$ ,all $u\in \mathcal{U}$ ,and all $N\in \mathbb{N}$ + +![](images/56b6f39ba61290dcb6196a6448a931cf422959d613239d908247fc16a2373a56.jpg) + +We additionally require the following result, which is a direct consequence of a classical result on CBFs (Ames et al., 2017, Theorem 1). + +Lemma B.4. For some $\tau_{max} \in \mathbb{R} \cup \infty$ , let $\tilde{x}(t)$ , $t \in [0, \tau_{max})$ , be the unique and well-defined solution to the differential equation + +$$ +\dot {\tilde {x}} = \tilde {f} (\tilde {x}), \quad \tilde {x} \in \mathcal {X}, \quad \tilde {x} (0) = \tilde {x} _ {0} \tag {22} +$$ + +where $\tilde{f}$ is Lipschitz continuous around a neighborhood of $\tilde{x}(t)$ for all $t \in [0, \tau_{\max})$ . If $h(\tilde{x}(0)) > 0$ and + +$$ +\frac {\partial h}{\partial \tilde {x}} (\tilde {x} (t)) \tilde {f} (\tilde {x} (t)) \geq - \alpha (h (\tilde {x} (t))) + \frac {\epsilon}{2} \tag {23} +$$ + +holds for all $t\in [0,\tau_{\mathrm{max}})$ , then $\alpha (h(\tilde{x} (t))) > 0$ for all $t\in [0,\tau_{\mathrm{max}})$ + +Proof. The proof is identical to that of Ames et al. (2017, Theorem 1). Note that, although Ames et al. (2017, Theorem 1) requires $\tilde{f}$ to be locally Lipschitz continuous in $\mathcal{X}$ and (23) to hold for any state in $\mathcal{X}$ , these properties are only used to generalize the result to all solutions of (22) with arbitrary $\tilde{x}(0) \in \mathcal{X}$ , which we do not require in this case. + +We now show that finite-time trajectories obtained with the controller $\pi_{N,\text{safe}}$ are always strictly within the safe set, provided that the safety filter (12) is strictly feasible. + +Lemma B.5. Let Assumptions 2.1, 2.3 and 2.6 to 2.8 hold. For all $N \in \mathbb{N}$ , define + +$$ +\mathcal {X} _ {N} = \left\{x \in \mathcal {X} \left| \max _ {u \in \mathcal {U}} L C B _ {N} (x, u) > - \alpha (h (x)) + \frac {\epsilon}{2} \right. \right\} +$$ + +and the dynamical system + +$$ +\dot {x} _ {N} = f \left(x _ {N}\right) + g \left(x _ {N}\right) \pi_ {\text {s a f e}, N} \left(x _ {N}\right), \quad t \in \left[ t _ {N} + \Delta t, t _ {N + 1}\right), \tag {24} +$$ + +specified within the time interval $[t_N + \Delta t, t_{N+1})$ , where the initial condition satisfies $x_N(t_N + \Delta t) \in \mathcal{X}_N$ , $t_{N+1}$ is given by + +$$ +t _ {N + 1} \triangleq \inf \left\{t \geq t _ {N} + \Delta t \left| \max _ {u \in \mathcal {U}} L C B _ {N} (x, u) = - \alpha (h (x)) + \frac {\epsilon}{2} \right. \right\}, \tag {25} +$$ + +and $\alpha(h(x_{N}(t_{N} + \Delta t))) > 0$ , and $\pi_{safe,N}$ is given by (12). Then, if $\mathcal{X}_{N}$ is non-empty, (24) has a unique solution $x_{N}(t)$ . Furthermore, with probability at least $1 - \delta$ , the trajectories $x_{N}(t)$ satisfy the following conditions for all $N \in \mathbb{N}$ : + +(i) $x_{N}(t)\in \mathcal{C}$ for $t\in [t_N + \Delta t,t_{N + 1})$ +(ii) If $\alpha(h(x_N(\hat{t}))) < \frac{\epsilon}{2}$ for any $\hat{t} \in [t_N + \Delta t, t_N)$ , then $\alpha(h(x_N(t))) > \alpha(h(x_N(\hat{t})))$ for all $t \in (\hat{t}, t_N)$ . +(iii) If $\alpha\left(h(x_{N}(\hat{t}))\right) \leq \frac{\epsilon}{2}$ for any $\hat{t} \in [t_{N} + \Delta t, t_{N}]$ , then $\alpha\left(h(x_{N}(t))\right) \geq \alpha\left(h(x_{N}(\hat{t}))\right)$ for all $t \in [\hat{t}, t_{N}]$ . + +Proof. We begin by showing condition (i), then show (ii) and (iii). + +(i) Due to the definition of $\mathcal{X}_N$ , the safety filter (12) is strictly feasible for all $x \in \mathcal{X}_N$ . Furthermore, the definition of $t_{N+1}$ implies that a candidate solution $x_N(t)$ satisfies $x_N(t) \in \mathcal{X}_N$ for all $t \in [t_N + \Delta t, t_{N+1})$ . Moreover, $\pi_{N,\text{safe}}$ is well-defined and strictly feasible in $\mathcal{X}_N$ . By Lemma B.2, $\pi_{N,\text{safe}}$ is Lipschitz continuous around a neighborhood of any $x \in \mathcal{X}_N$ . Since $f$ and $g$ are locally Lipschitz continuous, this implies that $f(x) + g(x)\pi_{N,\text{safe}}(x)$ is locally Lipschitz continuous in $\mathcal{X}_N$ . Hence, by the Picard-Lindelöf Theorem, (24) has a unique solution $x_N(t)$ . Since $\mathcal{X}_N$ is bounded and $x_N(t) \in \mathcal{X}_N$ for all $t \in [t_N + \Delta t, t_{N+1})$ , $x_N(t)$ is also well-defined for all $t \in [t_N + \Delta t, t_{N+1})$ . Moreover, due to the definition of $\pi_{N,\text{safe}}$ , Lemma B.3 implies that, with probability at least $1 - \delta$ , + +$$ +\frac {\partial h}{\partial x} \left(x _ {N}\right) \left(f \left(x _ {N}\right) + g \left(x _ {N}\right) \pi_ {N, \text {s a f e}} \left(x _ {N}\right)\right) \geq - \alpha \left(h \left(x _ {N}\right)\right) + \frac {\epsilon}{2} +$$ + +holds for all $N$ and all $x_{N}\in \mathcal{X}_{N}$ . By Lemma B.4, $x_{N}(t)\in \mathcal{C}$ holds for all $t\in [t_N + \Delta t,t_{N + 1})$ and all $N\in \mathbb{N}$ with probability at least $1 - \delta$ . + +(ii) The following holds with probability at least $1 - \delta$ : For all $x_{N}(t)$ and all $N \in \mathbb{N}$ , if $\alpha(h(x_{N}(t')) < \frac{\epsilon}{2}$ for any $t' \in [t_{N} + \Delta t, t_{N+1})$ , then, by Lemma B.3 and the definition of $\pi_{\mathrm{safe}, N}$ : + +$$ +\dot {h} \left(x, \pi_ {\text {s a f e}, N} \left(x _ {N} \left(t ^ {\prime}\right)\right)\right) \geq - \alpha \left(h \left(x \left(t ^ {\prime}\right)\right)\right) + \frac {\epsilon}{2} > - \frac {\epsilon}{2} + \frac {\epsilon}{2} = 0 +$$ + +Due to continuity with respect to time, this means there exists an instance in time $t_c \in (t', t_{N+1})$ and an $\tilde{\varepsilon} > 0$ , such that $\dot{h}(x_N(t), \pi_{\mathrm{saf}, N}(x_N(t))) > \tilde{\varepsilon}$ holds for all $t \in (t', t_c]$ . By the Comparison Lemma (Khalil, 1996), $h(x_N(t)) > h(x_N(t')) + \tilde{\varepsilon}(t_c - t') > h(x_N(t'))$ for all $t \in (t', t_c]$ . By the same argument, $h(x_N(t))$ is strictly increasing in $t$ whenever $h(x_N(t')) < h(x_N(t)) < \frac{\epsilon}{2}$ , hence $h(x_N(t)) > h(x_N(t'))$ for all $t \in (t_c, t_N]$ . Since $\alpha$ is strictly increasing, this implies the desired result. + +(iii) The proof is identical to that of (ii), except that the strict inequality is replaced by a non-strict one. + +A consequence of Lemma B.5 is that safety is guaranteed if infeasibility never occurs within the safe set: + +Corollary B.6. Let Assumptions 2.3, 2.4 and 2.6 to 2.8 hold. With probability $1 - \delta$ , if + +$$ +\max _ {u \in \mathcal {U}} L C B _ {N} (x, u) > - \alpha (h (x)) + \frac {\epsilon}{2}, \quad \forall x \in \mathcal {C} \tag {26} +$$ + +holds for any $N\in \mathbb{N}$ $\pi_{safe,N}(x)$ is well-defined for all $x\in \mathcal{C}$ . Furthermore, $t_{N + 1} = \infty$ and the closed-loop system + +$$ +\dot {x} _ {N} = f \left(x _ {N}\right) + g \left(x _ {N}\right) \pi_ {N, s a f e} \left(x _ {N}\right), \quad t \in \left[ t _ {N} + \Delta N, \infty\right), +$$ + +is safe. + +Proof. Due to the definition of $\pi_{\mathrm{safe},N}$ , (26) directly implies that its feasible region is non-empty, i.e., $\pi_{\mathrm{safe},N}$ is well-defined, for all $x \in \mathcal{C}$ . We now show that $t_{N+1} = \infty$ by contradiction. Hence, suppose $t_{N+1} < \infty$ holds. By Item (ii) in Lemma B.5, the trajectory $x_N(t)$ stays strictly in the interior of $\mathcal{C}$ for $t \in [t_N + \Delta N, t_{N+1})$ . Due to continuity with respect to time, $x_N(t_{N+1}) = \lim_{t \to t_{N+1}} x_N(t) \in \mathcal{C}$ . Recall that $t_{N+1}$ denotes the earliest instance when the CBF-SOCP specifying $\pi_{\mathrm{safe},N}$ is no longer strictly feasible. Since $x_N(t) \in \mathcal{C}$ and $\pi_{\mathrm{safe},N}$ is strictly feasible in $\mathcal{C}$ , this is a contradiction, meaning $t_{N+1} = \infty$ . + +# Recovering Feasibility Through Bandit Exploration + +We now analyze the effect of data collected under Algorithm 1 on the feasibility of the safety filter. Specifically, we demonstrate that by gathering enough data before exiting the safe set $\mathcal{C}$ , strict feasibility is ensured anywhere in $\mathcal{C}$ . To + +achieve this, we will need the following preliminary results, which bound the growth of the cumulative worst-case model error. + +Lemma B.7. The posterior variance satisfies + +$$ +\sum_ {q = 1} ^ {N} \sigma_ {i, q} ^ {2} \left(\mathbf {z} ^ {(q - 1)}\right) \leq \frac {2}{\log \left(1 + \sigma_ {i , n s} ^ {- 2}\right)} \gamma_ {i, N} \tag {27} +$$ + +for all $N$ , all $i$ and all $\mathbf{z}^{(1)}, \ldots, \mathbf{z}^{(N)} \in \tilde{\mathcal{X}}$ . + +Proof. Employing the same argument as in the proof of Srinivas et al. (2012, Lemma 5.4), we get + +$$ +\sigma_ {i, q} ^ {2} \left(\mathbf {z} ^ {(q)}\right) \leq \frac {1}{\log \left(1 + \sigma_ {i , \mathrm {n s}} ^ {- 2}\right)} \log \left(1 + \sigma_ {i, \mathrm {n s}} ^ {- 2} \sigma_ {i, q} ^ {2} \left(\mathbf {z} ^ {(q)}\right)\right). +$$ + +The result then follows from Srinivas et al. (2012, Lemma 5.3). + +Lemma B.8. For all $N$ , the posterior covariance matrices satisfy + +$$ +\sum_ {q = 1} ^ {N} t r \left(\boldsymbol {\Sigma} _ {N} \left(x ^ {(N)}, u ^ {(N)}\right)\right) \leq \sum_ {i = 1} ^ {n} \frac {2}{\log \left(1 + \sigma_ {i , n s} ^ {- 2}\right)} \gamma_ {i, N}. \tag {28} +$$ + +Proof. By Lemma B.7, + +$$ +\sum_ {q = 1} ^ {N} \operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x ^ {(N)}, u ^ {(N)})\right) = \sum_ {q = 1} ^ {N} \sum_ {i = 1} ^ {n} \sigma_ {i, N} ^ {2} \left(\mathbf {z} ^ {(N - 1)}\right) \leq \sum_ {i = 1} ^ {n} \frac {2}{\log \left(1 + \sigma_ {i , \mathrm {n s}} ^ {- 2}\right)} \gamma_ {i, N}. +$$ + +Lemma B.8 bounds the growth of the posterior covariance matrices. + +We now show that strict feasibility in $\mathcal{C}$ is recovered after collecting at most $\Delta N_{\mathrm{max}}$ data points. + +Lemma B.9. Let Assumptions 2.3, 2.4 and 2.6 to 2.8 hold. The following holds with probability at least $1 - \delta$ : If Algorithm 1 collects $\Delta N_{max} - 1$ measurements in $\mathcal{C}$ , where $\Delta N_{max}$ satisfies + +$$ +\Delta N _ {m a x} > \frac {3 2 \beta_ {\Delta N _ {m a x}} ^ {2} L _ {h} ^ {2}}{\epsilon^ {2} \log (1 + \sigma_ {i , n s} ^ {- 2})} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {m a x}} +$$ + +then the safety filter is strictly feasible everywhere in $\mathcal{C}$ . + +Proof. We employ a proof by contradiction. Hence, assume that after $\Delta N_{\mathrm{max}} - 1$ observations have been collected, there exists an $x^{\mathrm{c}} \in \mathcal{C}$ , such that + +$$ +\max _ {u \in \mathcal {U}} L C B _ {\Delta N _ {\max }} \left(x ^ {\mathrm {c}}, u\right) \leq - \alpha \left(h \left(x ^ {\mathrm {c}}\right)\right) + \frac {\epsilon}{2}. \tag {29} +$$ + +In the following, we set + +$$ +x ^ {(\Delta N _ {\max })} \triangleq x ^ {\mathrm {c}}, +$$ + +$$ +u ^ {(\Delta N _ {\max })} \triangleq \operatorname * {a r g m a x} _ {u \in \mathcal {U}} L C B _ {\Delta N _ {\max }} (x ^ {\mathrm {c}}, u). +$$ + +Recall that Algorithm 1 only collects observations $x^{(N)}, u^{(N)}$ if (12) is not strictly feasible, i.e., + +$$ +\begin{array}{l} L C B _ {N} \left(x ^ {(N)}, u ^ {(N)}\right) \leq \max _ {u \in \mathcal {U}} L C B _ {N} \left(x ^ {(N)}, u\right) \\ \leq - \alpha \left(h (x ^ {(N)})\right) + \frac {\epsilon}{2} \\ \end{array} +$$ + +for all $u \in \mathcal{U}$ . Furthermore, due to Lemma B.3, with probability at least $1 - \delta$ , + +$$ +\begin{array}{l} \sup _ {u \in \mathcal {U}} \dot {h} \left(x ^ {(N)}, u\right) \leq \max _ {u \in \mathcal {U}} U C B _ {N} \left(x ^ {(N)}, u\right) \\ = U C B _ {N} \left(x ^ {(N)}, u ^ {(N)}\right), \\ \end{array} +$$ + +holds for all $u\in \mathcal{U}$ and all $N\in \mathbb{N}$ . By employing the identity + +$$ +L C B _ {N} (x, u) - U C B _ {N} (x, u) = - 2 L _ {h} \beta_ {N} \sqrt {\mathrm {t r} (\pmb {\Sigma} _ {N} (x , u))}, +$$ + +we then obtain, with probability at least $1 - \delta$ , for all $N \in \mathbb{N}$ : + +$$ +\begin{array}{l} - \alpha (h (x ^ {(N)})) + \frac {\epsilon}{2} \geq L C B _ {N} \left(x ^ {(N)}, u ^ {(N)}\right) \\ \geq L C B _ {N} \left(x ^ {(N)}, u ^ {(N)}\right) + \sup _ {u \in \mathcal {U}} \dot {h} \left(x ^ {(N)}, u\right) - U C B _ {N} \left(x ^ {(N)}, u ^ {(N)}\right) \\ = \sup _ {u \in \mathcal {U}} \dot {h} \left(x ^ {(N)}, u\right) - 2 L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\Sigma_ {N} \left(x ^ {(N)} , u ^ {(N)}\right)\right)} \\ \geq - \alpha (h (x ^ {(N)})) + \epsilon - 2 L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x ^ {(N)} , u ^ {(N)})\right)}, \\ \end{array} +$$ + +where the last inequality is due to Assumption 2.6. Hence, with probability at least $1 - \delta$ , + +$$ +2 L _ {h} \beta_ {N} \sqrt {\mathrm {t r} \left(\pmb {\Sigma} _ {N} \left(x ^ {(N)} , u ^ {(N)}\right)\right)} \geq \frac {\epsilon}{2}, \quad \forall N \in \mathbb {N}. +$$ + +By squaring and summing up from $N = 1$ to $\Delta N_{\mathrm{max}}$ , then employing Lemma B.8 and (29), we get + +$$ +\begin{array}{l} \Delta N _ {\max } \left(\frac {\epsilon}{2}\right) ^ {2} = \sum_ {N = 1} ^ {\Delta N _ {\max }} \left(\frac {\epsilon}{2}\right) ^ {2} \\ \leq \sum_ {N = 1} ^ {\Delta N _ {\max }} \left(2 L _ {h} \beta_ {N} \sqrt {\operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} \left(x ^ {(N)} , u ^ {(N)}\right)\right)}\right) ^ {2} \\ \leq \beta_ {\Delta N _ {\max }} ^ {2} 4 L _ {h} ^ {2} \sum_ {N = N _ {0}} ^ {\Delta N _ {\max }} \operatorname {t r} \left(\boldsymbol {\Sigma} _ {N} (x ^ {(N)}, u ^ {(N)})\right) \\ \leq \beta_ {\Delta N _ {\max }} ^ {2} 4 L _ {h} ^ {2} \sum_ {i = 1} ^ {n} \frac {2}{\log \left(1 + \sigma_ {i , \mathrm {n s}} ^ {- 2}\right)} \gamma_ {i, \Delta N _ {\max }}. \\ \end{array} +$$ + +This implies + +$$ +\Delta N _ {\max } \leq \frac {3 2 \beta_ {\Delta N _ {\max }} ^ {2} L _ {h} ^ {2}}{\epsilon^ {2} \log \left(1 + \sigma_ {i , \mathrm {n s}} ^ {- 2}\right)} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {\max }}, +$$ + +which is a contradiction. Hence, the safety filter is strictly feasible in all of $\mathcal{C}$ . + +Next, we analyze the amount of data collected under Algorithm 1 before potentially exiting the safe set $\mathcal{C}$ . Specifically, we show that the closed-loop system under Algorithm 1 collects at least $\Delta N_{\mathrm{max}}$ data points before exiting the safe set. To do so, + +we will require the following result: + +Lemma B.10. Let Assumptions 2.1, 2.3, 2.4 and 2.6 to 2.8 hold. Then, with probability at least $1 - \delta$ : consider the closed-loop system (2) and assume there exists a time interval $[t', t'']$ with $t' < t''$ , such that + +$$ +\alpha \left(h \left(x \left(t ^ {\prime}\right)\right) \leq \frac {\epsilon}{2}, \right. \tag {30} +$$ + +$$ +\alpha (h (x (t)) < \alpha (h (x (t ^ {\prime})), \quad \forall t \in (t ^ {\prime}, t ^ {\prime \prime} ], +$$ + +and let + +$$ +t _ {N ^ {\prime}} = \max _ {N \in \mathbb {N}} t _ {N}, \quad s. t. \quad t _ {N} \leq t ^ {\prime} \tag {31} +$$ + +denote the last time instance when data is collected up until $t'$ . Then, the safety filter is not strictly feasible at times $t'$ and $t_N$ , and + +$$ +| \alpha (h (x (t _ {N}))) - \alpha (h (x (t ^ {\prime}))) | < L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t +$$ + +holds, where $\Delta t$ is the sampling frequency used by Algorithm 1. + +Proof. We begin by showing that the safety filter is not strictly feasible at time $t'$ by contradiction. Hence, assume that the safety filter is strictly feasible at $t'$ . Since $\alpha(h(x(t))) \leq \frac{\epsilon}{2}$ , by Item (iii) in Lemma B.5, $\alpha(h(x(t))) \geq \frac{\epsilon}{2}$ holds for some $t \in (t', t'']$ . This contradicts (30). + +We now show that strict feasibility does not hold at $t_{N'}$ by contradiction. Hence, assume strict feasibility holds at $t_{N'}$ . Due to the definition of $t_{N'}$ (31), a new data point is not collected until strictly after $t'$ . This implies strict feasibility at time $t'$ , which is a contradiction. + +Since the safety filter is not strictly feasible at time $t_{N'}$ , and $t_{N'}$ is the last time instance when data is collected before $t'$ , from the sampling frequency $\Delta t$ , we have + +$$ +\Delta t = t _ {N ^ {\prime} + 1} - t _ {N ^ {\prime}} > t ^ {\prime} - t _ {N ^ {\prime}}. +$$ + +The result then follows from the Lipschitz continuity of $\alpha, x$ and $h$ . + +We now show that if the closed-loop system ever exits the safe set, it must collect at least $\Delta N_{\mathrm{max}}$ data points before doing so. + +Lemma B.11. Let Assumptions 2.1, 2.3, 2.4 and 2.6 to 2.8 hold and let $x(0)$ be strictly within the safe set, such that $\alpha(h(x(0))) \geq \epsilon$ . Then the following holds with probability at least $1 - \delta$ : if the closed-loop system under Algorithm 1 ever exits the safe set $\mathcal{C}$ , then it collects at least $\Delta N_{\max}$ data points before doing so. + +Proof. Assume that the closed-loop trajectory $x(t)$ reaches the boundary of the safe set $\mathcal{C}$ at some time $t_{\mathrm{exit}}$ before exiting it: + +$$ +t _ {\text {e x i t}} = \sup \left\{\hat {t} \geq 0 \mid \alpha (h (x (t)) \geq 0 \forall t \in [ 0, \hat {t} ] \right\}. \tag {32} +$$ + +Due to the continuity of $x$ , $\alpha$ and $h$ , and $\alpha(h(x(0))) \geq \epsilon$ , there exists a time $t_{\frac{\epsilon}{2}} < t_{\mathrm{exit}}$ , such that + +$$ +t _ {\frac {\epsilon}{2}} = \sup \left\{\hat {t} \geq 0 \mid \alpha (h (x (\hat {t})) = \frac {\epsilon}{2}, \quad \alpha (h (x (t)) < \frac {\epsilon}{2}, \quad \forall t \in (\hat {t}, t _ {\text {e x i t}} ] \right\}. \tag {33} +$$ + +Let $N_{\frac{\epsilon}{2}}$ and $N_{\mathrm{exit}}$ denote the number of collected observations at time $t_{\frac{\epsilon}{2}}$ and $t_{\mathrm{exit}}$ , respectively: + +$$ +N _ {\frac {\epsilon}{2}} = \arg \max _ {N \in \mathbb {N}} t _ {N}, \quad \text {s . t .} \quad t _ {N} \leq t _ {\frac {\epsilon}{2}} +$$ + +$$ +N _ {\text {e x i t}} = \arg \max _ {N \in \mathbb {N}} t _ {N}, \quad \text {s . t .} \quad t _ {N} \leq t _ {\text {e x i t}}. +$$ + +Then, with probability at least $1 - \delta$ : Due to Lemma B.10, we have + +$$ +\left| \alpha \left(h \left(x \left(t _ {N _ {\frac {\epsilon}{2}}}\right)\right)\right) - \alpha \left(h \left(x \left(t _ {\frac {\epsilon}{2}}\right)\right)\right) \right| \leq L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t \tag {34} +$$ + +$$ +\left| \alpha \left(h \left(x \left(t _ {N _ {\mathrm {e x i t}}}\right)\right)\right) - \alpha \left(h \left(x \left(t _ {\mathrm {e x i t}}\right)\right)\right) \right| \leq L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t. \tag {35} +$$ + +We now analyze the growth of $\alpha(h(x(t)))$ between $t = t_N$ and $t = t_{N+1}$ . We separately analyze the case where the safety filter is strictly feasible and the case where it is not. If the safety filter is not strictly feasible at time $t_{N-1}$ , due to Assumption 2.1 and the sampling frequency $\Delta t$ , the CBF changes between $t_{N-1}$ and $t_N$ at most by + +$$ +\begin{array}{l} \left| \alpha (h (x (t _ {N}))) - \alpha (h (x (t _ {N - 1}))) \right| \\ \leq L _ {\dot {x}} L _ {\alpha} L _ {h} \left| t _ {N} - t _ {N - 1} \right| \tag {36} \\ \leq L _ {\dot {x}} L _ {\alpha} L _ {h} \Delta t. \\ \end{array} +$$ + +By Item (iii) in Lemma B.5, if the safety filter is strictly feasible at time $t_{N-1}$ and $\alpha(h(x(t_{N-1}))) \leq \frac{\epsilon}{2}$ , then $\alpha(h(x(t_{N}))) \geq \alpha(h(x(t_{N-1}))$ . Hence, for all $t_{N-1} \in [t_{\frac{\epsilon}{2}}, t_{\mathrm{exit}}]$ , whether the safety filter is feasible or not, + +$$ +\alpha \left( \right.h \left(x \left(t _ {N - 1}\right)\right) - \alpha \left(h \left(x \left(t _ {N}\right)\right)\right) \leq L _ {\dot {x}} L _ {\alpha} L _ {h} \Delta t \tag {37} +$$ + +holds. We then have + +$$ +\begin{array}{l} \frac {\epsilon}{2} = \alpha \left(h \left(x \left(t _ {\frac {\epsilon}{2}}\right)\right) - \alpha \left(h \left(x \left(t _ {\text {e x i t}}\right)\right) \right. \right. \\ = \alpha (h (x (t _ {\frac {\epsilon}{2}})) - \alpha (h (x (t _ {\mathrm {e x i t}})) + \alpha (h (x (t _ {N _ {\mathrm {e x i t}}})) - \alpha (h (x (t _ {N _ {\frac {\epsilon}{2}}})) - \alpha (h (x (t _ {N _ {\mathrm {e x i t}}})) + \alpha (h (x (t _ {N _ {\frac {\epsilon}{2}}})) \\ \leq \alpha (h (x (t _ {N _ {\frac {\epsilon}{2}}})) - \alpha (h (x (t _ {N _ {\mathrm {e x i t}}})) + 2 L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t \\ = \sum_ {N = N _ {\frac {\epsilon}{2}} + 1} ^ {N _ {\text {e x i t}}} \alpha (h (x (t _ {N - 1}))) - \alpha (h (x (t _ {N}))) + 2 L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t \\ \leq \left(N _ {\text {e x i t}} - N _ {\frac {2}{3}} - 1\right) L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t + 2 L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t \\ = \left(N _ {\text {e x i t}} + 1 - N _ {\frac {\epsilon}{2}}\right) L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t, \\ \end{array} +$$ + +where the first inequality is due to (34), and the second inequality is due to (37). This implies + +$$ +N _ {\text {e x i t}} - N _ {\frac {\epsilon}{2}} + 1 \geq \frac {\epsilon}{2 L _ {\alpha} L _ {h} L _ {\dot {x}} \Delta t} > \Delta N _ {\max }, +$$ + +where the last equality follows from the sampling frequency specification (16). Since $N_{\mathrm{exit}}$ , $N_{\frac{\varepsilon}{2}}$ and $\Delta N_{\max}$ are integers, this implies that the amount of collected data satisfies $N_{\mathrm{exit}} - N_{\frac{\varepsilon}{2}} \geq \Delta N_{\max}$ . + +We now put everything together and prove Theorem 3.2. + +Proof of Theorem 3.2. By Lemma B.11, Algorithm 1 collects at least $\Delta N_{\mathrm{max}}$ observations before ever exiting the safe set $\mathcal{C}$ . Lemma B.9 states that the safety filter is strictly feasible within all of $\mathcal{C}$ after collecting at most $\Delta N_{\mathrm{max}}$ observations. Together with Corollary B.6 this implies that, with probability at least $1 - \delta$ , the closed-loop system is safe and Algorithm 1 collects at most $\Delta N_{\mathrm{max}}$ observations. + +# C. Kernel-Dependent Bounds for $\Delta N_{\mathrm{max}}$ + +Theorem 3.2 specifies that + +$$ +\Delta N _ {\max } > \frac {3 2 \beta_ {\Delta N _ {\max }} ^ {2} L _ {h} ^ {2}}{\epsilon^ {2} \log \left(1 + \sigma_ {i , \mathrm {n s}} ^ {- 2}\right)} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {\max }} \tag {38} +$$ + +is a sufficient condition to guarantee safety. We now analyze how the right-hand side term behaves for different kernels. We begin by analyzing how the maximal information gain $\gamma_{i,N}$ depends on the maximal information gain of the kernels $k_{f_i}$ and $k_{g_{i,j}}$ used to model $f$ and $g$ . + +Lemma C.1. Let $k_{i}$ be given as in (6), and let $\gamma_{f_i,N}$ and $\gamma_{g_{i,j},N}$ denote the maximal information gain after $N$ rounds of data collection under the kernels $k_{f_i}$ and $k_{g_{i,j}}$ , respectively. Then + +$$ +\gamma_ {i, N} \leq \gamma_ {f _ {i}, N} + \sum_ {j = 1} ^ {m} \gamma_ {g _ {i, j}, N} + 3 m \log (N) \tag {39} +$$ + +Proof. The proof follows directly the definition of the composite kernel $k_{i}$ , Krause & Ong (2011, Theorem 2) and Krause & Ong (2011, Theorem 3). + +We now dissect the right-hand side of (40). Define $\gamma_{\Delta N_{\mathrm{max}}} \triangleq \max_{i \leq n} \gamma_{i, \Delta N_{\mathrm{max}}}$ and $B \triangleq \max_{i \leq n} B_i$ . From the definition of $\beta_{\Delta N_{\mathrm{max}}}$ , it follows that + +$$ +\begin{array}{l} \beta_ {\Delta N _ {\max }} ^ {2} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {\max }} \leq \beta_ {\Delta N _ {\max }} ^ {2} n \gamma_ {\Delta N _ {\max }} \\ = n \gamma_ {\Delta N _ {\max }} B ^ {2} + n \gamma_ {\Delta N _ {\max }} 2 B \sigma_ {i, \mathrm {n s}} \sqrt {2 \left(\gamma_ {\Delta N _ {\max }} + 1 + \log \left(n \delta^ {- 1}\right)\right)} + n \gamma_ {\Delta N _ {\max }} \sigma_ {i, \mathrm {n s}} ^ {2} 2 \left(\gamma_ {\Delta N _ {\max }} + 1 + \log \left(n \delta^ {- 1}\right)\right) \\ \leq C _ {1} (B, \sigma_ {i, \mathrm {n s}}, n) \gamma_ {\Delta N _ {\max}} + C _ {\frac {3}{2}} (B, \sigma_ {i, \mathrm {n s}}, n) \gamma_ {\Delta N _ {\max}} ^ {\frac {3}{2}} + C _ {2} (B, \sigma_ {i, \mathrm {n s}}, n) \gamma_ {\Delta N _ {\max}} ^ {2} \\ \leq \left(C _ {1} (B, \sigma_ {i, \mathrm {n s}}, n) + C _ {\frac {3}{2}} (B, \sigma_ {i, \mathrm {n s}}, n) + C _ {2} (B, \sigma_ {i, \mathrm {n s}}, n)\right) \max \left\{\gamma_ {\Delta N _ {\max }} ^ {2}, 1 \right\} \\ \leq \left(C _ {1} (B, \sigma_ {i, \mathrm {n s}}, n) + C _ {\frac {3}{2}} (B, \sigma_ {i, \mathrm {n s}}, n) + C _ {2} (B, \sigma_ {i, \mathrm {n s}}, n)\right) \left(\gamma_ {\Delta N _ {\max }} ^ {2} + 1\right), \\ \end{array} +$$ + +where + +$$ +C _ {1} (B, \sigma_ {i, \mathrm {n s}}, n) = n B ^ {2} + n 2 B \sigma_ {i, \mathrm {n s}} \sqrt {2 \left(1 + \log \left(n \delta^ {- 1}\right)\right)} + n \sigma_ {i, \mathrm {n s}} ^ {2} 2 \left(1 + \log \left(n \delta^ {- 1}\right)\right) +$$ + +$$ +C _ {\frac {3}{2}} (B, \sigma_ {i, \mathrm {n s}}, n) = n 2 B \sigma_ {i, \mathrm {n s}} \sqrt {2} +$$ + +$$ +C _ {2} (B, \sigma_ {i, \mathrm {n s}}, n) = 2 n \sigma_ {i, \mathrm {n s}} ^ {2}. +$$ + +For most commonly used kernels, the growth rate of the maximal information gain is of the form $\mathcal{O}(N^{\omega}\log (N))$ , where $0\leq \omega < 1$ (Srinivas et al., 2012). Hence, using Lemma C.1, we can bound $\gamma_{N}$ as $\gamma_N\leq C_\gamma N^\omega (\log (N))^{\theta}$ for some positive $C_\gamma$ , $\omega$ and $\theta$ , and $N$ large enough. Using an estimate of this type, we can compute a (potentially crude) upper bound for the right-hand side of (40) as + +$$ +\frac {3 2 \beta_ {\Delta N _ {\max}} ^ {2} L _ {h} ^ {2}}{\epsilon^ {2} \log (1 + \sigma_ {i , \mathrm {n s}} ^ {- 2})} \sum_ {i = 1} ^ {n} \gamma_ {i, \Delta N _ {\max}} \leq C (B, \sigma_ {i, \mathrm {n s}}, n) \left(C _ {\gamma} \Delta N _ {\max } ^ {2 \omega} (\log (N)) ^ {\theta} + 1\right) \leq \tilde {C} (B, \sigma_ {i, \mathrm {n s}}, n) \Delta N _ {\max } ^ {2 \omega} (\log (N)) ^ {2 \theta} \tag {40} +$$ + +where $C$ and $\tilde{C}$ are appropriate constants. This yields the sufficient condition for choosing $\Delta N_{\mathrm{max}}$ + +$$ +\Delta N _ {\max } \geq \left(\tilde {C} (B, \sigma_ {i, \mathrm {n s}}, n) (\log (\Delta N _ {\max }) ^ {2 \theta}\right) ^ {\frac {1}{1 - 2 \omega}}, \tag {41} +$$ + +which can easily be solved using numerical methods. For squared-exponential kernels, $\omega = 0$ and $\theta = n$ . For linear kernels, $\omega = 0$ and $\theta = 1$ , whereas for Matérn kernels, $\theta = 0$ and $\omega$ depends on its smoothness parameter (Srinivas et al., 2012). \ No newline at end of file diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/images.zip b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6a78884a456cafbb48848a5cbf04f1dbf792aa67 --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f514fc2631aeb13bb1535d96323e17a9ab8411808c5bb9cf9fe0c3eb9a0f68c4 +size 828204 diff --git a/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/layout.json b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5561c7ff2fba7f97c61a2b1f7e1f3ba5a2a59abc --- /dev/null +++ b/ICML/2025/Learning Safe Control via On-the-Fly Bandit Exploration/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dda5871ffc1526a2318b2acfc213ec1dfa72c646402b0678b458a3abad52b2a0 +size 1010294 diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_content_list.json b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e6268051268868125fccff8f79d15a2697fad091 --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15801151e2cb7fa577d8367665e80704b35ccc22e0e11f175ceabd6d021f86e8 +size 320812 diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_model.json b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_model.json new file mode 100644 index 0000000000000000000000000000000000000000..062250eb4ba2e8c4dbbbcb4c18733153b2595701 --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:da029927a3d6e5bf8419179356cf0178784f874da84d107738da85cb9c5fa741 +size 378077 diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_origin.pdf b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a706dda65a0378716b207b8f5e79fdc1754728d7 --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/6f071229-2a90-4bbb-ae87-1a28c52e5fd5_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ee82d806d0f50d5f678c8055e59f436751e587be7c88a75d183a8b4b6e0d3ff +size 1163071 diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/full.md b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4715a5b78b059cf6fbf16e79d0ab134a8a6e808f --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/full.md @@ -0,0 +1,1619 @@ +# Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions + +Negin Golrezaei1 Sourav Sahoo1 + +# Abstract + +We study the bidding problem in repeated uniform price multi-unit auctions from the perspective of a single value-maximizing buyer who aims to maximize their cumulative value over $T$ rounds while adhering to return-on-investment (RoI) constraints in each round. Buyers adopt $m$ -uniform bidding format, where they submit $m$ bid-quantity pairs $(b_i, q_i)$ to demand $q_i$ units at bid $b_i$ . We introduce safe bidding strategies as those that satisfy RoI constraints in every auction, regardless of competing bids. We show that these strategies depend only on the bidder's valuation curve, and the bidder can focus on a finite subset of this class without loss of generality. While the number of strategies in this subset is exponential in $m$ , we develop a polynomial-time algorithm to learn the optimal safe strategy that achieves sublinear regret in the online setting, where regret is measured against a clairvoyant benchmark that knows the competing bids a priori and selects a fixed hindsight optimal safe strategy. We then evaluate the performance of safe strategies against a clairvoyant that selects the optimal strategy from a richer class of strategies in the online setting. In this scenario, we compute the richness ratio, $\alpha \in (0,1]$ for the class of strategies chosen by the clairvoyant and show that our algorithm, designed to learn safe strategies, achieves $\alpha$ -approximate sublinear regret against these stronger benchmarks. Experiments on semi-synthetic data from real-world auctions show that safe strategies substantially outperform the derived theoretical bounds, making them quite appealing in practice. + +# 1. Introduction + +In a uniform price multi-unit auction, the auctioneer sells $K$ identical units of a single good to buyers who may demand + +1Massachusetts Institute of Technology, Cambridge, USA. Correspondence to: Sourav Sahoo . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +multiple units, with the per-unit price set at the $K^{th}$ highest bid. These auctions are widely used to allocate scarce resources in critical markets such as emissions permits, energy markets, and Treasury auctions. To succeed in these markets, bidders must develop effective bidding strategies that balance long-term value maximization with financial risk management, all while operating under limited information, uncertainty in competing bids and strategic (or adversarial) behavior of other bidders, among other challenges. + +In this paper, we model the bidders as a value-maximizing agent with per-round return-on-investment (RoI) constraints. This model reflects real-world decision-making in industries where managing financial risks is as critical as maximizing value. Unlike traditional mechanism design, which assumes bidders with quasilinear utility (i.e., utility decreases linearly with payments), many practical settings involve bidders who optimize total value while adhering to financial constraints such as RoI or budgets. These scenarios frequently arise in industries where agents or algorithms bid on behalf of clients, optimizing for high-level objectives within strict constraints—a context akin to the principal-agent framework (Fadaei & Bichler, 2016; Aggarwal et al., 2024). Examples include autobidders in online advertising, where advertisers seek to maximize clicks while keeping the average cost per click below a threshold (Lucier et al., 2024; Balseiro et al., 2021a; Deng et al., 2023b), and consultants bidding for small firms in emission permit auctions (EEX, 2024). + +Building on this, we study the bidding problem in repeated uniform price auctions over $T$ rounds, from the perspective of a single bidder who seeks to maximize cumulative value while adhering to per-round RoI constraints—that is, ensuring that the value obtained in each round is at least a fixed multiple of the corresponding payment (see Eq. (2)). + +To address practical bidding interfaces, we assume bidders adopt $m$ -uniform bidding format, a generalization of the uniform bidding format (De Keijzer et al., 2013; Birmpas et al., 2019) for some $m \in \mathbb{N}$ . In a $m$ -uniform strategy $\mathbf{b} := \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ , bidders bid $b_1$ for the first $q_1$ units, $b_2$ for the next $q_2$ units and so on (see Definition 1). + +# 1.1. Our Contributions + +Safe Bidding Strategies (Section 3). To ensure that the bidder satisfies the RoI constraint without knowing the com + +peting bids, we introduce the concept of safe bidding strategies. These strategies guarantee that the RoI constraint is met regardless of how the other participants bid. We then identify the class of $m$ -uniform safe undominated bidding strategies, denoted by $\mathcal{S}_m^\star$ (Theorem 3.2), and demonstrate that the strategies within this class depend solely on the bidder's valuation vector $[v_1, \ldots, v_K]$ and exhibit a "nested" structure (illustrated in Fig. 1). + +![](images/4ecab9869196249ac0f3eaf2d7d9eaa3066ffb02bcb0cbdb02fe186cb6f33a32.jpg) +Figure 1. Nested structure of the bidding strategies in $\mathcal{S}_3^*$ . Consider the strategy $\mathbf{b} = \langle (w_3, 3), (w_7, 4), (w_9, 2) \rangle \in \mathcal{S}_3^*$ , where we note that $Q_1 = 3$ , $Q_2 = 3 + 4 = 7$ and $Q_3 = 3 + 4 + 2 = 9$ . The $j^{th}$ highest bid (i.e., $b_j$ ) is the average of the first $Q_j$ entries of the valuation vector, i.e., $b_j = w_{Q_j}$ , where $w_j = \frac{1}{j} \sum_{\ell \leq j} v_\ell$ . + +Learning Safe Bidding Strategies (Section 4). Designing an algorithm to learn the optimal safe strategy with at most $m$ bid-quantity pairs poses significant challenges due to the exponential size of the decision space in $m$ . So, we first consider an offline setting where the competing bids are known in advance. In this setting, we construct a polynomial-sized directed acyclic graph (DAG) with carefully assigned edge weights and show that determining the maximum weight path in the DAG is equivalent to computing the optimal safe strategy with at most $m$ bid-quantity pairs (Theorem 4.2). + +Building on this, we develop an online learning algorithm when the competing bids are unknown. Our algorithm runs in polynomial time and achieves a regret of $\widetilde{O}(M\sqrt{mT})$ in a full-information setting and $\widetilde{O}(m^{3/2}M^2\sqrt{T})$ regret in a bandit setting, where the clairvoyant selects the fixed hindsight optimal safe strategy (Theorem 4.3). Additionally, we establish a regret lower bound of $O(M\sqrt{T})$ (Theorem 4.4). + +The problem of learning to bid in multi-unit uniform price and pay-as-bid auctions has been explored recently by Brânzei et al. (2023); Galgana & Golrezaei (2024); Potfer et al. (2024), assuming the bidders are quasilinear utility maximizers. Our work differs from them in two key ways: (a) we consider value-maximizing buyers with RoI constraints, a fundamentally different behavioral model, and (b) from a technical perspective, unlike prior works that require bid spaces to be discretized, our approach does not, due to the structure of safe strategies. Consequently, the time complexity becomes independent of $T$ in both online and offline settings2, and under bandit feedback, the depen + +dence on $T$ in the regret bound improves from $T^{2/3}$ to $\sqrt{T}$ implying that it is easier to learn safe strategies for value maximizers compared to bidding strategies for quasilinear utility maximizers. + +Richer Classes of Strategies for the Clairvoyant (Section 5). A key novel aspect of our work is to evaluate the performance of safe bidding strategies with at most $m$ bid-quantity pairs and the online learning algorithm from Section 4 against a clairvoyant that selects the optimal strategy from a richer class of strategies. In this case, the bidder (learner) achieves $\alpha$ -approximate sublinear regret (same as Theorem 4.3) for a parameter $\alpha \in (0,1]$ defined as the richness ratio—thereby demonstrating the robustness of the safe bidding strategies against a broad range of benchmarks (Corollary 5.2). One of our main contributions is to compute the richness ratio, $\alpha$ , for various classes of bidding strategies. Specifically, when the clairvoyant selects the optimal bidding from the class of + +(a) strategies that are RoI-feasible, not necessarily safe and have at most $m$ bid-quantity pairs, we get $\alpha = \frac{1}{2}$ , notably independent of $m$ (Theorem 5.3). +(b) safe strategies with at most $m'$ bid-quantity pairs, where $m' \geq m$ , we obtain $\alpha = \frac{m}{m'}$ (Theorem 5.4). +(c) strategies that are RoI-feasible, not necessarily safe and have at most $m'$ bid-quantity pairs, where $m' \geq m$ , we get that $\alpha = \frac{m}{2m'}$ (Theorem 5.5). + +Computing $\alpha$ involves two key challenges: (a) deriving an upper bound on the ratio between the value obtained by the clairvoyant's optimal strategy and that of the optimal safe strategy in the worst case (see Definition 4 for details), and (b) proving that this upper bound is tight. The key ideas for deriving the upper bound are outlined in Section 5. The construction of problem instances, each tailored to a specific strategy class, is non-trivial due to their exponential size in $m$ and the need for a careful choice of competing bids and the valuation vector, as detailed in Appendices D.1 to D.4. Simulations using semi-synthetic data show that the empirical richness ratios in practical scenarios are significantly better than the theoretical bounds, making safe strategies highly appealing in practice (Section 5.3). + +# 1.2. Related Work + +Value Maximizers and RoI Constraints. The concept of agents as value maximizers within financial constraints is a well-established notion in microeconomic theory (Mas-Colell et al., 1995). In mechanism design literature, one of the earliest explorations of value-maximizing agents was conducted by Wilkens et al. (2016). Their work primar + +ily delved into the single-parameter setting, characterizing truthful auctions for value maximizers. Similarly, Fadaei & Bichler (2016) and Lu et al. (2023) studied truthful (approximate) revenue-maximizing mechanisms in combinatorial markets tailored for such agents. + +In recent years, there has been growing interest in RoI-constrained value maximizers, particularly in the context of autobidding and online advertising. One of the earliest works in this area is Golrezaei et al. (2021), which studied auction design for RoI-constrained buyers and validated the presence of such soft financial constraints using data from online ad auctions. Broadly, the literature in this space can be divided into two categories: (i) works that design optimal auctions under RoI constraints (Balseiro et al., 2021a;b; 2022; Deng et al., 2021; 2023b), and (ii) works that characterize optimal bidding strategies and/or develop learning algorithms in repeated auction settings (Aggarwal et al., 2019; Deng et al., 2023a; Golrezaei et al., 2023; Castiglioni et al., 2024; Aggarwal et al., 2025; Lucier et al., 2024). Our work primarily aligns with the latter. We study value-maximizing buyers in uniform price auctions under RoI constraints and demonstrate that these buyers can employ safe bidding strategies that are efficiently learnable and robust against a variety of strong benchmarks. + +Multi-unit Auctions. In this work, we focus on a subset of combinatorial auctions termed as multi-unit auctions in which multiple identical goods are sold to a group of buyers. These auctions find widespread application in various practical scenarios, including Treasury auctions (Hortaçsu & McAdams, 2010), procurement auctions (Cramton & Ausubel, 2006), electricity markets (Tierney et al., 2008), and emissions permit auctions (Schmalensee & Stavins, 2017). While several works have focused on studying the equilibria properties in these auctions (Ausubel et al., 2014; Markakis & Telelis, 2015; De Keijzer et al., 2013), computing equilibrium strategies is usually intractable in general multi-unit auctions due to multi-dimensional valuations. As a result, a growing body of work has emphasized on designing optimal bidding strategies in a prior-free setting, i.e., without any assumptions of the competing bidders' bids or valuations (Galgana & Golrezaei, 2024; Potfer et al., 2024; Brânzei et al., 2023). Our work contributes to this literature by learning optimal strategies for value-maximizing buyers in repeated uniform price auctions. + +# 2. Model + +Preliminaries. There are $n$ buyers (bidders) indexed by $i \in [n]$ , and $K$ identical units of a single good. Each bidder $i$ has a fixed, private valuation curve, denoted by $\mathbf{v}_i \in \mathbb{R}_+^K$ . + +For a comprehensive survey on combinatorial auctions, we refer the readers to several excellent works by De Vries & Vohra (2003); Blumrosen & Nisan (2007); Palacios-Huerta et al. (2022). + +that has diminishing marginal returns property, i.e., $v_{i,1} \geq v_{i,2} \geq \dots \geq v_{i,K}$ which is standard in literature (Brânzei et al., 2023; Goldner et al., 2020). As we study optimal bidding strategies from the perspective of a single bidder, we drop the index $i$ when the context is clear. The maximum total demand for bidder $i$ , denoted by $M \in [K]$ , is defined as $\min \{j \in [K - 1] : v_{j + 1} = 0\}$ . If such an index does not exist, we set $M$ as $K$ . Hence, without loss of generality, we assume $\mathbf{v} \in \mathbb{R}_+^M$ . For each $\mathbf{v} = [v_1, \ldots, v_M]$ , we define the average cumulative valuation vector as $\mathbf{w} = [w_1, \ldots, w_M]$ , + +$$ +w _ {j} = \frac {1}{j} \sum_ {\ell \leq j} v _ {\ell}, \forall j \in [ M ]. \tag {1} +$$ + +As $v_{1}\geq \dots \geq v_{M}$ , we also have $w_{1}\geq \dots \geq w_{M}$ + +# 2.1. Auction Format and Bidders' Behavior + +Allocation and Payment Rule. In a uniform price auction, each bidder $i$ submits a sorted bid vector $\mathbf{b}$ using $m$ -uniform bidding language (see Definition 1). The auctioneer collects the bids (entries of the bid vector) from all the bidders, sorts them in non-increasing order, and allocates units to the bidders with the top $K$ bids (also termed as 'winning' bids). That is, if bidder $i$ has $j$ bids in the top $K$ positions, they are allocated $j$ units. For ease of exposition, we assume there are no ties (or ties are always broken in the favor of the bidder in consideration). See Appendix F for our discussion on handling ties. We assume the auction follows the last-accepted-bid payment rule (bidders pay the $K^{th}$ highest bid per unit) which is widely used for uniform price auctions in practice (Regulations, 2019; Garbade & Ingber, 2005). + +Let $\beta_{-}$ denote the bids submitted by all bidders except bidder $i$ and $\beta_{-}^{-(j)}$ be the $j^{th}$ smallest among the top $K$ competing bids (i.e., bids from all bidders except bidder $i$ ). Suppose bidder $i$ submits $\mathbf{b}$ , such that the bid profile is $\beta := (\mathbf{b}; \beta_{-})$ . Let $x(\beta)$ and $p(\beta)$ denote the number of units allocated to bidder $i$ and the clearing price (i.e., the per-unit price which is the $K^{th}$ highest submitted bid), respectively. The total value obtained by the bidder is $V(\beta) = \sum_{j \leq x(\beta)} v_j$ , while the total payment made is $P(\beta) = p(\beta) \cdot x(\beta)$ . + +Bidding Language. Multi-unit auctions allocate a large number of identical units, requiring efficient ways for the bidders to express preferences. A common approach is standard bidding, where bidders submit a vector of bids, one for each unit (Brânzei et al., 2023; Galgana & Golrezaei, 2024; Babaioff et al., 2023; Birmpas et al., 2019; Potfer et al., 2024). Although expressive, this becomes computationally impractical when the number of units, $K$ , is large, as in EU ETS emission permit auctions and Treasury auctions. To address this, we consider a bidding language called m-uniform bidding, for any $m \in \mathbb{N}$ . In m-uniform bidding, + +bidders submit $m$ bid-quantity pairs $(b_i, q_i)$ , where $b_i$ is the bid value per unit and $q_i$ is the quantity demanded: + +Definition 1 (m-Uniform Bidding). For a fixed $m \in \mathbb{N}$ , a m-uniform bidding strategy is characterized by $m$ bid-quantity pairs, denoted as $\mathbf{b} := \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ , where $b_1 > b_2 > \dots > b_m > 0$ and $q_j > 0$ , $j \in [m]$ . This m-uniform bid can be equivalently expressed as a vector (similar to the standard bidding format) in which the first $q_1$ bids are $b_1$ , followed by $q_2$ bids of $b_2$ , and so on. + +We define $\mathbf{b}[1:\ell] = \langle (b_1,q_1),\ldots ,(b_\ell ,q_\ell)\rangle$ , for all $\ell < m$ , to represent the first $\ell$ bid-quantity pairs within a $m$ -uniform bidding strategy $\mathbf{b} = \langle (b_{1},q_{1}),\dots ,(b_{m},q_{m})\rangle$ . We further define $Q_{j} = \sum_{\ell = 1}^{j}q_{\ell}$ for all $j\in [m]$ as the total quantity demanded in the first $j$ bid-quantity pairs, with $Q_{0} = 0$ , where we assume, without loss of generality that $Q_{m}\leq M$ . If $m = M$ , the bidding format is equivalent to standard bidding but in practice, bidders often submit only a few bid-quantity pairs. For instance, in the 2023 EU ETS auctions, bidders submitted $\sim 4.35$ bid-quantity pairs per auction on average (EEX, 2023). + +Bidders' Behavior. The bidders maximize their total value obtained while adhering to a constraint that ensures the total value obtained in an auction is at least a constant multiple of the payment in that auction. This can be equivalently expressed as a return-on-investment (RoI) constraint: + +$$ +V (\mathbf {b}; \beta_ {-}) \geq (1 + \gamma) P (\mathbf {b}; \beta_ {-}). \tag {2} +$$ + +Here, $\gamma$ is defined as the target RoI which is private and fixed. Without loss of generality, we assume $\gamma = 0$ (or equivalently the valuation curve $\mathbf{v}$ is scaled by $\frac{1}{1 + \gamma}$ ) for the rest of this work. For $\gamma = 0$ , the RoI constraint implies the value obtained in an auction is at least the payment. We illustrate how the auction operates in Example 1. + +Example 1. Consider an auction with $n = 2$ bidders, and $K = 5$ identical units. The valuations are: $\mathbf{v}_1 = [6,4,3,1,1]$ and $\mathbf{v}_2 = [5,3,1,1,0]$ . Both the bidders are value maximizing buyers with target RoI, $\gamma_1 = \gamma_2 = 0$ . Suppose $m = 2$ and the bids submitted by the bidders are $\mathbf{b}_1 = \langle (5,2), (3,3) \rangle$ and $\mathbf{b}_2 = \langle (4,2), (2,2) \rangle$ . The bid profile: $\beta = [5,5,4,4,3,3,3,2,2]$ and top $K = 5$ winning bids are $[\underline{5},\underline{5},4,4,\underline{3}]$ . Bidder 1 is allocated 3 units as they have 3 bids (underlined) in the winning bids, and bidder 2 gets the remaining 2 units. The clearing price $p(\beta) = 3$ , $V_1(\beta) = 6 + 4 + 3 = 13$ , $V_2(\beta) = 5 + 3 = 8$ , $P_1(\beta) = 3 \cdot 3 = 9$ , and $P_2(\beta) = 2 \cdot 3 = 6$ . The RoI constraint is satisfied for both the bidders as $13 > 9$ and $8 > 6$ . + +jzer et al., 2013; Birmpas et al., 2019) and aligns with practical languages like those in product-mix auctions (Klemperer, 2009) and piecewise-linear bidding (Nisan, 2015). + +Suppose the bidder bids for, and wins more than $M$ units. There is no additional value being allocated over $M$ units, but the total payment increases (assuming the clearing price is positive), potentially violating the RoI constraint. + +# 2.2. Learning to Bid in Repeated Settings + +In practice, most multi-unit auctions, such as emission permit auctions and Treasury auctions, are conducted in a repeated setting. Formally, the auction described in the previous section takes place sequentially over $T$ rounds indexed by $t \in [T]$ . We assume that the valuation vector $\mathbf{v}$ is fixed over the $T$ rounds which is a standard assumption in the literature (Branzei et al., 2023; Galgana & Golrezaei, 2024; Potfer et al., 2024). Similarly, the target RoI is also assumed to be fixed over the $T$ rounds. + +We now extend the notations from the previous section to the repeated setting. Formally, in this setting, $\beta_{-}^{t}$ denotes the bids submitted by all bidders except bidder $i$ in round $t$ and $\beta_{-,t}^{-(j)}$ is the $j^{th}$ smallest among the top $K$ competing bids in round $t$ . In round $t$ , if bidder $i$ submits a bid $\mathbf{b}^t$ , the bid profile is $\beta^t \coloneqq (\mathbf{b}^t; \beta_{-}^t)$ . Let $x(\beta^t)$ and $p(\beta^t)$ denote the number of units allocated to bidder $i$ and the clearing price, respectively, in round $t$ . The total value obtained by the bidder is $V(\beta^t) = \sum_{j \leq x(\beta^t)} v_j$ , while the total payment made is $P(\beta^t) = p(\beta^t) \cdot x(\beta^t)$ . + +RoI Constraints in Repeated Setting. In the repeated setting, we require the bidders to satisfy the RoI constraint described in Eq. (2) in every round. A bidding strategy $\mathbf{b}$ is called feasible for a sequence of competing bids $[\beta_{-}^{t}]_{t\in [T]}$ , if the RoI constraint is satisfied for every round $t\in [T]$ . + +Remark 2.1 (RoI Constraints). Our notion of RoI constraints in the repeated setting aligns with the definitions in Wilkens et al. (2016; 2017); Lv et al. (2023). Similar constraints are considered by Lucier et al. (2024) and Gaitonde et al. (2023), termed as marginal RoI (or value) and maximum bid constraints (up to scaling factors), respectively. Unlike the aggregate constraints over $T$ rounds typically assumed in online ad auction literature (Deng et al., 2021; 2024; Feng et al., 2023; Deng et al., 2023a), we enforce RoI constraints for each auction individually. This distinction reflects the fundamental differences between the two settings: ad auctions often occur simultaneously and frequently, with values in the order of cents, whereas Treasury and emission permit auctions occur sequentially over longer horizons, with units valued in millions. Hence, bidders in such auctions prioritize profitability in each auction rather than waiting for an indefinite period, leading to per-round RoI constraints. $^{6}$ + +# 2.3. Objective and Performance Metric + +We consider an online setting where a bidder seeks to maximize cumulative value while satisfying RoI constraints + +and managing uncertainty about competing bids. In this setting, bidders privately submit their bids, and the auctioneer allocates items and sets prices based on these bids. In round $t$ , the learning algorithm maps the feedback information set from the first $t - 1$ rounds, denoted by $\mathcal{I}^{t - 1}$ , to a bid $\mathbf{b}^t$ , where this mapping may be deterministic or random. Under full information feedback, the information set $\mathcal{I}^{t - 1} = (\beta^1, \beta^2, \dots, \beta^{t - 1})$ , which includes all bids from previous rounds. In the bandit setting, the information set $\mathcal{I}^{t - 1} = (V(\beta^1), P(\beta^1), \dots, V(\beta^{t - 1}), P(\beta^{t - 1}))$ includes only the value and price outcomes of the previous rounds. + +We design learning algorithms to minimize regret, the difference in the value obtained by a fixed hindsight-optimal strategy chosen by a clairvoyant with a priori knowledge of competing bids and that by the learner over time. Formally, + +$$ +\operatorname {R E G} = \max _ {\mathbf {b} \in \mathcal {B}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) - \sum_ {t = 1} ^ {T} \mathbb {E} [ V (\mathbf {b} ^ {t}; \boldsymbol {\beta} _ {-} ^ {t}) ], \tag {3} +$$ + +where the expectation is with respect to any randomness in the learning algorithm. Here, $\mathcal{B}$ is the class of bidding strategies (formally characterized in Section 3). We require the bidding strategies in $\mathcal{B}$ to be RoI feasible for the sequence of competing bids $[\beta_{-}^{t}]_{t\in [T]}$ . In Section 4, we consider the case when the both the clairvoyant and the learner choose strategies from the same class and aim to obtain sublinear regret. Later, we consider more challenging settings where the clairvoyant can choose the optimal strategy from much richer classes of strategies compared to the learner. In these cases, we obtain sublinear $\alpha$ -approximate regret, where $\alpha \in (0,1]$ is the richness ratio (see details in Section 5). + +# 3. Safe Bidding Strategies + +Recall that strategies chosen by the learner must be causal (mapping the history to a bidding strategy) while remaining RoI feasible for all rounds $t \in [T]$ , even under adversarially generated competing bids. This creates an obvious challenge: a bidding strategy that satisfies RoI feasibility in previous rounds may become infeasible even under the slightest change in the competing bids e.g., if $\mathbf{v} = [0.9, 0.5, 0.1]$ , the bidding strategy (0.6, 3) is RoI feasible for competing bids $\beta_{-}^{1} = [0.61, 0.59, 0.59]$ but not for $\beta_{-}^{2} = [0.59, 0.59, 0.59]$ . To address this, we focus on safe bidding strategies that inherently guarantee RoI feasibility, regardless of the adversarial behavior of competing bids: + +Definition 2 (Safe Strategies). A $m$ -uniform bidding strategy, $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ , is called a safe strategy if it is feasible irrespective of the competing bids, i.e., + +$$ +V (\mathbf {b}; \beta_ {-}) \geq P (\mathbf {b}; \beta_ {-}), \quad \forall \beta_ {-}. +$$ + +The class of all $m$ -uniform safe bidding strategies is denoted as $\mathcal{S}_m$ . The union of classes of safe bidding strategies with at most $m$ bid-quantity pairs is denoted as $\mathcal{U}_m = \bigcup_{k \in [m]} \mathcal{S}_k$ . + +# 3.1. Characterizing Safe Bidding Strategies + +We begin by defining underbidding (overbidding) under the $m$ -uniform bidding format in the given context. Recall that in a single-item auction, if the value of the item is $v$ , then a bid $b$ is an underbid (overbid) if $b < v$ ( $b > v$ ). + +Definition 3 (Underbid and Overbid). A $m$ -uniform bidding strategy $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ is an + +(a) underbidding strategy if $b_{j} \leq w_{Q_{j}}, \forall j \in [m]$ and $\exists \ell \in [m]$ such that $b_{\ell} < w_{Q_{\ell}}$ . +(b) overbidding strategy if $\exists \ell \in [m]$ such that $b_{\ell} > w_{Q_{\ell}}$ + +![](images/62147b1726f636ebc401c7ab10636b25133ec0d514a3b9264ed223c995b4dbe4.jpg) +Figure 2. The solid line represents the average cumulative valuation curve, $\mathbf{w}$ , and the dotted line represents the valuation curve, $\mathbf{v}$ . The figure in the left (resp. right) illustrates underbidding (resp. overbidding) for a 2-uniform bidding strategy. Note that the notions of underbidding and overbidding in Definition 3 are defined with respect to $\mathbf{w}$ and not $\mathbf{v}$ .8 Here, the plots of $\mathbf{v}$ and $\mathbf{w}$ are shown to be linear for illustrative purposes only. + +![](images/39cecd6f0d083f4aa8d11b106ef0c73da8d81ec6af3673a327ae7344eb573d16.jpg) + +In other words, if $\gamma = 0$ , $\mathbf{b} = \langle (b_1, q_1), \dots, (b_m, q_m) \rangle$ is an underbidding strategy if, for all $j \in [m]$ , the bid $b_j$ is at most the average of the first $Q_j$ entries of the valuation vector, denoted as $w_{Q_j}$ , and there exists $\ell \in [m]$ where the inequality is strict. Recall that $Q_j = \sum_{\ell \leq j} q_\ell$ denotes the maximum number of demanded units in the first $j$ bid-quantity pairs. Similarly, $\mathbf{b}$ is an overbidding strategy if there exists some $\ell \in [m]$ such that $b_\ell$ is strictly greater than the average of the first $Q_\ell$ entries of the valuation vector. Having defined the notions of overbidding and underbidding, we characterize the class of safe bidding strategies, $S_m$ : + +Theorem 3.1. For any $m \in \mathbb{N}$ , no overbidding is allowed in $\mathcal{S}_m$ . So, the collection of all $m$ -uniform safe strategies is + +$$ +\mathcal {S} _ {m} = \left\{\mathbf {b} = \langle (b _ {1}, q _ {1}), \dots , (b _ {m}, q _ {m}) \rangle : b _ {\ell} \leq w _ {Q _ {\ell}}, \forall \ell \in [ m ] \right\}, +$$ + +where $\mathbf{w}$ is defined in Eq. (1). + +The proofs of this section are presented in Appendix A. Since there are infinitely many safe strategies in $\mathfrak{S}_m$ , we + +focus on the subset of safe undominated strategies, $\mathcal{S}_m^{\star}$ , obtained by removing very weakly dominated strategies. A safe strategy $\mathbf{b}$ is said to be very weakly dominated if there exists another safe strategy $\mathbf{b}'$ such that, for any competing bid $\beta_{-}$ , $V(\mathbf{b},\beta_{-}) \leq V(\mathbf{b}',\beta_{-})$ (Shoham & Leyton-Brown, 2008, pp. 79). Keeping these strategies does not improve the bidder's performance, but removing them yields a finite strategy class (as shown below), which significantly simplifies the design of online learning algorithms. We now present the main result of this section: + +Theorem 3.2. The class of $m$ -uniform safe undominated bidding strategies, $S_{m}^{\star}$ , is given as follows: + +$$ +\mathcal {S} _ {m} ^ {\star} = \left\{\mathbf {b} = \langle (b _ {1}, q _ {1}), \dots , (b _ {m}, q _ {m}) \rangle : b _ {\ell} = w _ {Q _ {\ell}}, \ell \in [ m ] \right\}. +$$ + +The union of classes of safe undominated strategies with at most $m$ bid-quantity pairs is denoted by $\mathcal{U}_m^\star = \bigcup_{k\in [m]}S_k^\star$ + +Observe that $\mathcal{S}_m^\star$ is a finite class of bidding strategies that depend only on the valuation curve and is independent of the competing bids. The strategies in $\mathcal{S}_m^\star$ exhibit a "nested" structure, referred to as nested $m$ -uniform bidding strategies hereafter, where the $j^{th}$ highest bid $(b_j)$ is the average of the first $Q_j = \sum_{\ell=1}^j q_\ell$ entries of the valuation curve (illustrated in Fig. 1). Importantly, fixing $Q_j$ 's uniquely determines the bidding strategy, as $b_j = w_{Q_j}$ for strategies in $\mathcal{S}_m^\star$ which will be crucial in learning the optimal safe bidding strategy, as discussed in the following section. + +# 4. Learning Safe Bidding Strategies + +Here, the clairvoyant and the learner choose strategies from the class of safe bidding strategies with at most $m$ bidquantity pairs, $\mathcal{U}_m^{\star}$ . Thus, the regret defined in Eq. (3) is + +$$ +\mathsf {R E G} = \max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) - \sum_ {t = 1} ^ {T} \mathbb {E} [ V (\mathbf {b} ^ {t}; \boldsymbol {\beta} _ {-} ^ {t}) ]. +$$ + +To design learning algorithms, we first consider the offline setting, where we aim to solve the following problem given the bid history, $[\beta_{-}^{t}]_{t\in [T]}$ . + +$$ +\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \beta_ {-} ^ {t}) \quad \left(\text {O F F L I N E}\right) +$$ + +Since $\mathcal{U}_m^\star$ contains $O(M^m)$ strategies, evaluating each strategy individually is intractable. To overcome this, we reduce the offline problem to finding the maximum weight path in a carefully constructed edge-weighted directed acyclic graph (DAG), which allows for the computation of the optimal offline bidding strategy in poly $(m,M)$ time. + +# 4.1. Offline Problem + +Fix a bid history, $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ , and consider (OFFLINE). The following lemma shows that the objective function can + +be decomposed across the bid-quantity pairs. Formally, + +Lemma 4.1. Problem (OFFLINE) can be formulated as + +$$ +\max _ {\ell \in [ m ]} \max _ {Q _ {1}, \dots , Q _ {\ell}} \sum_ {j = 1} ^ {\ell} \sum_ {t = 1} ^ {T} \sum_ {k = Q _ {j - 1} + 1} ^ {Q _ {j}} v _ {k} \cdot \mathbb {I} \left[ w _ {Q _ {j}} \geq \boldsymbol {\beta} _ {-, t} ^ {- (k)} \right]. +$$ + +The proofs of this section are presented in Appendix B. Building on the decomposition in Lemma 4.1, we now construct an edge-weighted DAG $\mathcal{G}(V,E)$ as proposed earlier. + +Vertices. The DAG has a 'layered' structure with a source node $(s)$ , destination node $(d)$ and $m$ intermediate layers. The $\ell^{th}$ intermediate layer contains $M + 1 - \ell$ nodes, denoted by $(\ell, j)$ where $\ell \in [m], j \in \{\ell, \ell + 1, \dots, M\}$ as shown in Fig. 3. For convenience, we set $s = (0, 0)$ . + +Edges and Edge Weights. A directed edge exists from vertex $x$ to $y$ under the following conditions: + +(i) $x = (\ell -1,j)$ and $y = (\ell ,j^{\prime}),\forall \ell \in [m]$ and $j < j^{\prime}$ This edge connects consecutive layers in the graph, and its weight is given by: + +$$ +w (e) = \sum_ {t = 1} ^ {T} \sum_ {k = j + 1} ^ {j ^ {\prime}} v _ {k} \cdot \mathbb {I} \left[ w _ {j ^ {\prime}} \geq \beta_ {-, t} ^ {- (k)} \right]. \tag {4} +$$ + +(ii) $x = (\ell, j)$ and $y = d$ , $\forall \ell \in [m], j \in [M]$ . This edge connects the current layer to the destination node $d$ , and its weight is $\mathsf{w}(e) = 0$ . + +![](images/6e5a98abf69ad36feab9c28db1e0c0513d0e92a607f2a9e5420bdb9752cd5cb9.jpg) +Figure 3. In this DAG, $M = 3$ , $m = 2$ . The red path refers to $\mathbf{b} = \langle (w_1, 1), (w_3, 2) \rangle \in \mathcal{U}_2^\star$ . The values in red are the corresponding $Q_j$ 's. Similarly, the blue path refers to $\mathbf{b} = (w_3, 3) \in \mathcal{U}_2^\star$ . + +Theorem 4.2. There exists a bijective mapping between the $s$ - $d$ paths in $\mathcal{G}(V,E)$ and bidding strategies in $\mathcal{U}_m^\star$ , i.e., the path $s\rightarrow (1,z_1)\rightarrow \dots \rightarrow (k,z_k)\rightarrow d$ for $k\in [m]$ refers to the strategy $\mathbf{b} = \langle (b_{1},q_{1}),\ldots ,(b_{k},q_{k})\rangle$ where + +$$ +b _ {\ell} = w _ {z _ {\ell}} \quad a n d \quad q _ {\ell} = z _ {\ell} - z _ {\ell - 1}, \forall \ell \in [ k ]. +$$ + +where $w_{z_\ell}$ is defined as per Eq. (1), $\forall \ell \in [k]$ . Conversely, the strategy $\mathbf{b} = \langle (w_{Q_1}, q_1), \ldots, (w_{Q_k}, q_k) \rangle$ maps to the path $s \to (1, Q_1) \to \dots \to (k, Q_k) \to d$ . + +- The value obtained by a bidding strategy is the weight of the corresponding $s$ -d path. Thus, the Problem (OFFLINE) is equivalent to finding the maximum weight $s$ -d path in $\mathcal{G}(V,E)$ which can be computed in poly(m,M) time. + +# 4.2. Online Setting + +In the online setting, in each round $t \in [T]$ , the learner submits a strategy $\mathbf{b}^t \in \mathcal{U}_m^\star$ and receives feedback from the auction. We consider two feedback models: (a) full information setting and (b) bandit setting, with the latter discussed in Appendix B.3.1. Leveraging the DAG formulation, we design an online learning algorithm such that $\mathrm{REG} = o(T)$ . Without loss of generality, assume $v_j \in [0,1], \forall j \in [M]$ . + +In every round $t$ , a DAG $\mathcal{G}^t(V,E)$ is constructed as described earlier. After receiving feedback at the end of the round, in the full information setting, + +(i) If $x = (\ell - 1, j)$ and $y = (\ell, j')$ with $\ell \in [m]$ and $j < j'$ , + +$$ +\mathsf {w} ^ {t} (e) = \sum_ {k = j + 1} ^ {j ^ {\prime}} v _ {k} \cdot \mathbb {I} \left[ w _ {j ^ {\prime}} \geq \beta_ {-, t} ^ {- (k)} \right]. \tag {5} +$$ + +(ii) If $x = (\ell, j)$ and $y = d$ , then $\mathsf{w}^t(e) = 0, \forall \ell \in [m], j \in [M]$ . + +The online algorithm in Algorithm 1 consists of three main steps: (1) UPDATE, (2) SAMPLE, and (3) MAP. In the first two steps, the algorithm maintains and updates the probabilities over the edges in the constructed DAG and selects a $s$ - $d$ path in the DAG by sampling from these probabilities. These steps implement exponential weight updates using the weight-pushing method proposed by Takimoto & Warmuth (2003). Naively implementing exponential weight updates by treating each $s$ - $d$ path (safe strategy) as an expert is intractable as there are $O(M^m)$ such experts. However, following the decomposition in Lemma 4.1, Algorithm 1 only needs to maintain weights for individual edges and then sample a path based on these weights, avoiding the need to track weights for each path separately. The MAP step is the key component of the algorithm that maps the sampled path to a safe strategy (by Theorem 4.2). + +# Algorithm 1 Learning Safe Bidding Strategies (Full Info.) + +Require: valuation curve $\mathbf{v}$ , time horizon $T$ , learning rate $\eta > 0$ . + +1: for $t = 1,2,\ldots ,T$ do +2: Construct $\mathcal{G}^t (V,E)$ similar to $\mathcal{G}(V,E)$ without weights. +3: UPDATE : Obtain edge probabilities $\varphi^t (\cdot)$ by Algorithm 2. SAMPLE: Define initial node $u = s$ and path $\mathfrak{p}^t = s$ +4: while $u \neq d$ do +5: Sample $v$ with probability $\varphi^t (u\to v)$ +6: Append $v$ to the path $\mathfrak{p}^t$ ; set $u \gets v$ . +7: end while +8: MAP: If $\mathfrak{p}^t = s\rightarrow (1,z_1)\rightarrow \dots \rightarrow (k,z_k)\rightarrow d$ for some $k\in [m]$ , submit $\mathbf{b}^t = \langle (b_1,q_1),\ldots ,(b_k,q_k)\rangle$ where + +$$ +b _ {\ell} = w _ {z _ {\ell}} \quad \text {a n d} \quad q _ {\ell} = z _ {\ell} - z _ {\ell - 1}, \forall \ell \in [ k ]. +$$ + +where $w_{z_{\ell}}$ is defined as per Eq. (1) for all $\ell \in [k]$ . + +9: The bidder observes $\beta_{-}^{t}$ and sets $\mathsf{w}^t (e)$ as per Eq. (5). +10: end for + +Theorem 4.3. Algorithm 1 runs in poly(m, M) time per round and achieves REG $\leq O(M\sqrt{mT\log M})$ under full information feedback, and REG $\leq O(M^2\sqrt{m^3T\log M})$ in the bandit setting. + +# Algorithm 2 Update Edge Probabilities + +Require: For $t \geq 1$ , $\mathcal{G}^t(V, E)$ . For $t \geq 2$ , additionally require $\eta$ , $\varphi^{t-1}(e)$ and $\mathsf{w}^{t-1}(e)$ , $\forall e \in E$ . + +1: If $t = 1$ +- Initialize the edge probability of each edge $e = x \rightarrow y$ as $\varphi^1(e) = 1 / |\mathcal{N}_x|$ where $\mathcal{N}_x$ is the set of out-neighbors of $x$ . +2: If $t > 2$ : +- Set $\Gamma^{t - 1}(d) = 1$ and recursively compute in bottom-to-top fashion for every node $u$ in $\mathcal{G}^t (V,E)$ : + +$$ +\Gamma^ {t - 1} (u) = \sum_ {v: u \rightarrow v = e \ni E} \Gamma^ {t - 1} (v) \cdot \varphi^ {t - 1} (e) \cdot \exp (\eta w ^ {t - 1} (e)) +$$ + +- For edge $e = u \rightarrow v$ in $\mathcal{G}^t(V, E)$ , update edge probability: + +$$ +\varphi^ {t} (e) = \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)) \cdot \frac {\Gamma^ {t - 1} (v)}{\Gamma^ {t - 1} (u)}. +$$ + +We prove Theorem 4.3 by showing that Algorithm 1 is an efficient (polynomial time) and equivalent implementation of the exponential weight updates algorithm. We complement Theorem 4.3 by establishing the following lower bound. + +Theorem 4.4. Suppose $M \geq 2$ and $m = 1$ . Then, there exist competing bids, $[\beta_{-}^{t}]_{t \in [T]}$ , such that, under any learning algorithm, the expected regret $\mathbb{E}[\mathsf{REG}] = \Omega (M\sqrt{T})$ in both full information and bandit settings. + +# 5. Competing Against Richer Classes of Bidding Strategies + +In previous sections, we characterized the class of safe bidding strategies and proposed a learning algorithm that obtain sublinear regret, where the regret is computed against a clairvoyant that also selects the optimal safe bidding strategy. In this section, we consider the cases where the clairvoyant can choose the optimal strategy from richer bidding classes, which we will describe shortly. We show that under Algorithm 1, the class of safe bidding strategies achieves sublinear (approximate) regret when competing against these stronger benchmarks. Here, the performance metric is + +$$ +\alpha \text {-} R E G _ {\mathcal {B} _ {c}} = \alpha \cdot \max _ {\mathbf {b} \in \mathcal {B} _ {c}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) - \sum_ {t = 1} ^ {T} \mathbb {E} [ V (\mathbf {b} ^ {t}; \boldsymbol {\beta} _ {-} ^ {t}) ]. +$$ + +Here, $\mathcal{B}_c$ is the class of bidding strategies from which the clairvoyant (which serves as our benchmark) chooses the optimal bidding strategy whereas the bidder (learner) submits bids, $\mathbf{b}^t \in \mathcal{U}_m^\star$ , in each round unless stated otherwise and $\alpha \in (0,1]$ is defined as the richness ratio. + +Remark 5.1 (Richness Ratio $\alpha$ ). In prior works on approximate regret, $\alpha$ typically measures the hardness of the offline + +problem, such as $\max_{\mathbf{b} \in \mathcal{B}_c} \sum_{t=1}^T V(\mathbf{b}; \boldsymbol{\beta}_-^t)$ (see Streeter & Golovin (2008); Niazadeh et al. (2022)). In contrast, our work reinterprets $\alpha$ as richness ratio, capturing the relative richness of the clairvoyant's strategy class compared to the learner's. Specifically, it quantifies how closely the value achieved by the optimal strategy in $\mathcal{U}_m^\star$ approximates that by the optimal strategy in $\mathcal{B}_c$ . If $\mathcal{B}_c = \mathcal{U}_m^\star$ , then $\alpha = 1$ (see Section 4). By considering a richer class of strategies for the clairvoyant, we aim to quantify the robustness and performance of safe strategies against stronger benchmarks. + +Our main contribution in this section is to compute the richness ratio $\alpha$ for different classes of bidding strategies. To this end, for any $\mathcal{B}_c$ , define: + +$$ +\Lambda_ {\mathcal {B} _ {c}, \mathcal {U} _ {m} ^ {\star}} := \max _ {\mathbf {v}, \mathcal {H} _ {-}} \Lambda_ {\mathcal {B} _ {c}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}), \text {w h e r e} +$$ + +$$ +\Lambda_ {\mathcal {B} _ {c}, \mathcal {U} _ {m} ^ {*}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {\max _ {\mathbf {b} \in \mathcal {B} _ {c}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} ^ {\prime} \in \mathcal {U} _ {m} ^ {*}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ^ {\prime} ; \boldsymbol {\beta} _ {-} ^ {t})} \tag {6} +$$ + +for $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ . In words, $\Lambda_{\mathcal{B}_c}$ is the maximum ratio of the value obtained by the optimal bidding strategy in $\mathcal{B}_c$ and that by the optimal strategy in $\mathcal{U}_m^\star$ over all valuation curves and bid histories in an offline setting. We drop the argument $\mathbf{v}$ from $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^\star}(\mathcal{H}_{-},\mathbf{v})$ when the context is clear. + +Definition 4 (Richness Ratio). Suppose the clairvoyant chooses the optimal strategy from $\mathcal{B}_c$ (which may depend on the bid history, $\mathcal{H}_{-}$ ) such that $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^*} \leq \lambda$ , and the bound is tight, i.e., there exist a bid history $\mathcal{H}_{-}$ , a valuation curve $\mathbf{v}$ , and $\overline{\delta} > 0$ such that $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^*}(\mathcal{H}_{-},\mathbf{v}) \geq \lambda - \delta$ for any $\delta \in (0,\overline{\delta}]$ . Then, the richness ratio of $\mathcal{B}_c$ is $\alpha = 1 / \lambda$ . + +The key idea is that if, in the worst-case scenario for the offline problem, the optimal safe strategy achieves no more than a $\frac{1}{\lambda}$ -fraction of the value obtained by the optimal bidding strategy in $\mathcal{B}_c$ , then the learner can achieve at most a $\frac{1}{\lambda}$ -fraction of that value in the online setting as well. In the subsequent sections, we consider different classes of bidding strategies for the clairvoyant and compute its richness ratio $\alpha$ . An immediate corollary of Definition 4 is: + +Corollary 5.2. Suppose the clairvoyant chooses the optimal strategy from the class $\mathcal{B}_c$ such that $\Lambda_{\mathcal{B}_c, \mathcal{U}_m^*} \leq \lambda$ and this bound is tight. Then, Algorithm 1 obtains $\frac{1}{\lambda}$ - $\text{REG}_{\mathcal{B}_c} \leq O(M \sqrt{mT \log M})$ under full information feedback and $\frac{1}{\lambda}$ - $\text{REG}_{\mathcal{B}_c} \leq O(M^2 \sqrt{m^3 T \log M})$ under bandit feedback. + +Proof. As $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^*}\leq \lambda$ + +$$ +\begin{array}{l} \frac {1}{\lambda} \text {- R E G} _ {\mathcal {B} _ {c}} = \frac {1}{\lambda} \cdot \max _ {\mathbf {b} \in \mathcal {B} _ {c}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) - \sum_ {t = 1} ^ {T} \mathbb {E} [ V (\mathbf {b} ^ {t}; \boldsymbol {\beta} _ {-} ^ {t}) ] \\ \leq \max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {*}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) - \sum_ {t = 1} ^ {T} \mathbb {E} [ V (\mathbf {b} ^ {t}; \boldsymbol {\beta} _ {-} ^ {t}) ] = \mathsf {R E G}. \\ \end{array} +$$ + +By Theorem 4.3, we get the stated regret upper bound. $\square$ + +# 5.1. Richness Ratio of $m$ -uniform Non-Safe Strategies + +Here, we consider the clairvoyant class $\mathcal{B}_c$ to be the class of bidding strategies containing at most $m$ bid-quantity pairs, which are feasible only for the given bid history $\mathcal{H}_{-}$ , rather than for every possible sequence of competing bids as in the case of safe strategies. The following theorem characterizes the richness ratio of this class, denoted as $\mathcal{F}_m^{\mathcal{H}_{-}}$ : + +Theorem 5.3. For any $m \in \mathbb{N}$ , $\Lambda_{\mathcal{F}_m^{\mathcal{H}^{-}},\mathcal{U}_m^{\star}} \leq 2$ . Furthermore, there exist a bid history and valuation curve such that for any $\delta \in (0,\frac{1}{2}]$ , $\Lambda_{\mathcal{F}_m^{\mathcal{H}^{-}},\mathcal{U}_m^{\star}}(\mathcal{H}_{-},\mathbf{v}) \geq 2 - \delta$ . Thus, the richness ratio of the class $\mathcal{F}_m^{\mathcal{H}^{-}}$ is $\alpha = 1/2$ . + +Theorem 5.3 implies that restricting the learner to safe bidding strategies has a bounded cost and does not lead to an arbitrary loss in the obtained value as the upper bound is independent of $m$ . Building on this, Corollary 5.2 shows that Algorithm 1 results in $\frac{1}{2}$ -approximate sublinear regret in the online setting when the safe strategies compete against $\mathcal{F}_m^{\mathcal{H}^-}$ . Additionally, the factor-of-two loss represents a worst-case scenario, occurring in a highly non-trivial setting (see Appendix D.2). In practice, we expect these strategies to perform near-optimally, a claim further supported by the numerical simulations presented in Section 5.3. + +Proof Sketch of Theorem 5.3 (Upper Bound). We now present the central ideas to prove the upper bound, which are also used to show the subsequent theorems, albeit with changes specific to each case. Fixing a bid history, $\mathcal{H}_{-}$ , we consider the expression in Eq. (6). Maximizing over all bid histories and valuation curves, we get the desired result. + +Firstly, we bridge the we bridge the gap between the bidding strategies of the clairvoyant and the learner by constructing a restricted class of safe strategies, $\mathcal{U}_m^{\star}(\mathcal{H}_{-})\subseteq \mathcal{U}_m^{\star}$ . This restricted class is exponentially smaller in size and is derived based on the optimal strategy selected by the clairvoyant (see exact characterization in Eq. (17) for Theorem 5.3 and Algorithm 3 for Theorem 5.4). We demonstrate that considering this restricted class of safe strategies is sufficient to derive tight upper bounds. + +Second, as a crucial step, we show that for any $m$ -uniform safe bidding strategy $\mathbf{b} = \langle (w_{Q_1}, q_1), \ldots, (w_{Q_m}, q_m) \rangle$ + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-}) = \max _ {\ell \in [ m ]} V ((w _ {Q _ {\ell}}, Q _ {\ell}); \boldsymbol {\beta} _ {-}) +$$ + +for all competing bids $\beta_{-}$ , where, $Q_{\ell} = \sum_{j=1}^{\ell} q_{j}$ . Thus, the value obtained by any $m$ -uniform safe strategy can be determined by knowing the value obtained by the strategies in $\mathcal{U}_{1}^{\star}$ , allowing us to focus solely on 1-uniform strategies. + +As the third key idea, we partition the $T$ rounds into sets $T_{j}$ , based on the least winning bid of the optimal bidding strategy chosen by the clairvoyant (see details in Eq. (15)) and derive lower bounds on the value obtained by 1-uniform + +strategies in $\mathcal{U}_m^{\star}(\mathcal{H}_{-})$ in terms of the value obtained by optimal strategy chosen by the clairvoyant in each partition $T_{j}$ . With these three key ideas, we bound the ratio in Eq. (6). The detailed proof is presented in Appendix C.1. + +Proof Sketch of Theorem 5.3 (Tight Lower Bound). For any $\delta \in (0,1]$ , we construct a tight lower-bound instance for any $m \in \mathbb{N}$ by considering an offline problem where $M = T = N^{2m}$ and $K = M + 1$ , with $N = O(1 / \delta)$ . We set $\mathbf{v} = [1,v,\dots,v] \in \mathbb{R}^M$ , where $v = 1 - O(\delta)$ . The sequence of $T$ auctions is divided into $2m$ partitions of exponentially varying sizes, each with an identical competing bid profile. In each bid profile, there are two types of bids: 'big' and 'small'. All 'big' bids are set to $C \gg 1$ , while the 'small' bids remain identical within a partition. The partition sizes, the number of 'small' competing bids, and the exact values of these bids are carefully chosen to ensure that $\Lambda_{\mathcal{F}_m^{\mathcal{H}_-},\mathcal{U}_m^*}(\mathcal{H}_-;\mathbf{v}) \geq 2 - \delta$ (see Appendices D.1 to D.2). + +# 5.2. Richness Ratio of $m'$ -uniform Strategies + +We first consider the case when the clairvoyant selects the optimal strategy from the class of safe bidding strategies with at most $m'$ bid-quantity pairs where $m' \geq m$ . + +Theorem 5.4. For any $m, m' \in \mathbb{N}$ such that $m' \geq m$ , $\Lambda_{\mathcal{U}_{m'}^{\star}, \mathcal{U}_m^{\star}} \leq \frac{m'}{m}$ . Additionally, there exist $\mathcal{H}_-$ and $\mathbf{v}$ such that for any $\delta \in (0, \frac{1}{2}]$ , $\Lambda_{\mathcal{U}_{m'}^{\star}, \mathcal{U}_m^{\star}}(\mathcal{H}_-, \mathbf{v}) \geq \frac{m'}{m} - \delta$ . Thus, the richness ratio of the class $\mathcal{U}_{m'}^{\star}$ is $\alpha = m / m'$ . + +Suppose the clairvoyant can now select the optimal strategy from $\mathcal{F}_{m'}^{\mathcal{H}_-}$ , the class of bidding strategies with at most $m'$ bid-quantity pairs ( $m' \geq m$ ) that are feasible for the bid history $\mathcal{H}_- = [\beta_-^t]_{t \in [T]}$ , but not necessarily safe. Then, + +Theorem 5.5. For any $m, m' \in \mathbb{N}$ such that $m' \geq m$ , $\Lambda_{\mathcal{F}_{m'}^{-}, \mathcal{U}_m^*} \leq \frac{2m'}{m}$ . Moreover, there exist $\mathcal{H}_-$ and $\mathbf{v}$ such that for any $\delta \in (0, \frac{1}{2}]$ , $\Lambda_{\mathcal{F}_{m'}^{-}, \mathcal{U}_m^*}(\mathcal{H}_-, \mathbf{v}) \geq \frac{2m'}{m} - \delta$ . Thus, the richness ratio of the class $\mathcal{F}_{m'}^{-}$ is $\alpha = m / 2m'$ . + +By Corollary 5.2, for $m' \geq m$ , Algorithm 1 obtains $\frac{m}{m'}$ -approximate (resp. $\frac{m}{2m'}$ -approximate) sublinear regret in the online setting when the clairvoyant draws the optimal strategy from the class of safe (resp. feasible but not necessarily safe) strategies with at most $m'$ bid-quantity pairs. + +The richness ratio in Theorem 5.4 and Theorem 5.5 can theoretically become arbitrarily small as $m'$ grows, for a fixed $m$ . However, the bidder has the flexibility to choose $m$ ; increasing $m$ , though, incurs higher space and time complexity for Algorithm 1. Moreover, for any given pair $(m, m')$ , the bound is tight under a highly non-trivial setting (see details in Appendices D.3 to D.4). In practice, as shown in Section 5.3, the observed richness ratios are substantially better than the theoretical bounds, suggesting that the worst-case scenarios are unlikely to arise in real-world applications. + +# 5.3. Estimating The Richness Ratio: A Case Study + +In this section, we estimate the richness ratio (equivalently $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^*}$ ) for the discussed classes of bidding strategies by experiments using EU ETS emission permit auction data from 2022 and 2023. Detailed methods are provided in Appendix E, and the results are shown in Fig. 4. + +![](images/2fb89671692a13182fab033e1268e64cce0644988bcdc7aee057f3191ff14fd8.jpg) +Figure 4. The left (resp. right) figure refers to (the upper bound on) $\Lambda_{\mathcal{F}_m^{\mathcal{H}^-},\mathcal{U}_m^\star}(\mathcal{H}_-)$ (resp. $\Lambda_{\mathcal{U}_m^\star ,\mathcal{U}_1^\star}(\mathcal{H}_-))$ as a function of $m$ . + +![](images/0e1a25aa9c4598d0f862ae7a458db10215adf4ddb29a1973aab9158c01203834.jpg) + +Estimating $\Lambda_{\mathcal{F}_m^{\mathcal{H}^-},\mathcal{U}_m^*}(\mathcal{H}_-)$ . The left plot of Fig. 4 shows that (the upper bound for) $\Lambda_{\mathcal{F}_m^{\mathcal{H}^-},\mathcal{U}_m^*}(\mathcal{H}_-)$ is significantly better than the theoretical bound of 2. The decaying trend of the plot with increasing $m$ can be attributed to the fact that we are computing an upper bound for the value achieved by the optimal bidding strategy in $\mathcal{F}_m^{\mathcal{H}^-}$ , which is independent of $m$ , rather than the exact value (see Appendix E.2). For $m \geq 4$ , even the upper bound of $\Lambda_{\mathcal{F}_m^{\mathcal{H}^-},\mathcal{U}_m^*}(\mathcal{H}_-) \sim 1.05$ indicating that the safe bidding strategies are near-optimal. + +Estimating $\Lambda_{\mathcal{U}_m^*,\mathcal{U}_1^*}(\mathcal{H}_-)$ . From the right plot of Fig. 4, we observe that the empirical values of $\Lambda_{\mathcal{U}_m^*,\mathcal{U}_1^*}(\mathcal{H}_-)$ is significantly better than the worst-case bound $m$ (Theorem 5.4). In fact, the gain obtained by increasing the number of bidquantity pairs plateaus after $m = 4$ and even for $m = 10$ , the ratio of the value obtained by the optimal bidding strategy with at most 10 bid-quantity pairs to that by optimal 1-uniform bidding strategy is $\sim 1.25$ . + +Both plots show that the richness ratio is significantly better in practice than the theoretical bounds, suggesting that safe strategies with small $m$ are near-optimal in practice. + +# 6. Conclusion and Open Problems + +We studied bidding in repeated uniform price auctions for a value maximizing buyer with per-round RoI constraints and characterized safe bidding strategies that can be efficiently learnt and are robust against various strong benchmarks. This study suggests several interesting future research directions: (1) analyzing bidding strategies in discriminatory-price ("pay-as-bid") auctions; (2) modeling bidders with time-varying valuations and cumulative RoI constraints; (3) incorporating both RoI and budget constraints for a more realistic model of bidder behavior; and (4) extending the analysis to the more complex setting of combinatorial auctions with non-identical items. + +# Impact Statement + +This is primarily a theoretical work that discusses a class of bidding strategies in multi-unit auctions. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# Acknowledgements + +N.G. and S.S. are partially supported by the MIT Junior Faculty Research Assistance Grant and the Young Investigator Award from the Office of Naval Research (ONR), Award No. N00014-21-1-2776. We thank the anonymous reviewers whose comments greatly improved the presentation of this manuscript. + +# References + +Aggarwal, G., Badanidiyuru, A., and Mehta, A. Autobidding with constraints. In Web and Internet Economics: 15th International Conference, WINE 2019, New York, NY, USA, December 10-12, 2019, Proceedings 15, pp. 17-30. Springer, 2019. +Aggarwal, G., Badanidiyuru, A., Balseiro, S. R., Bhawalkar, K., Deng, Y., Feng, Z., Goel, G., Liaw, C., Lu, H., Mahdian, M., Mao, J., Mehta, A., Mirrokni, V., Leme, R. P., Perlroth, A., Piliouras, G., Schneider, J., Schvartzman, A., Sivan, B., Spendlove, K., Teng, Y., Wang, D., Zhang, H., Zhao, M., Zhu, W., and Zuo, S. Auto-bidding and auctions in online advertising: A survey. SIGecom Exch., 22(1):159-183, 2024. doi: 10.1145/3699824.3699838. +Aggarwal, G., Fikioris, G., and Zhao, M. No-regret algorithms in non-truthful auctions with budget and roi constraints. In Proceedings of the ACM on Web Conference 2025, WWW '25, pp. 1398-1415, New York, NY, USA, 2025. URL https://doi.org/10.1145/3696410.3714881. +Ausubel, L. M., Cramton, P., Pycia, M., Rostek, M., and Weretka, M. Demand reduction and inefficiency in multi-unit auctions. The Review of Economic Studies, 81(4): 1366-1400, 2014. +Babaioff, M., Immorlica, N., Li, Y., and Lucier, B. Making auctions robust to aftermarkets. In 14th Innovations in Theoretical Computer Science Conference (ITCS 2023). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2023. +Balseiro, S., Deng, Y., Mao, J., Mirrokni, V., and Zuo, S. Robust auction design in the auto-bidding world. Advances in Neural Information Processing Systems, 34: 17777-17788, 2021a. +Balseiro, S., Deng, Y., Mao, J., Mirrokni, V. S., and Zuo, S. The landscape of auto-bidding auctions: Value versus utility maximization. In Proceedings of the 22nd ACM Conference on Economics and Computation, pp. 132- + +133, 2021b. +Balseiro, S., Deng, Y., Mao, J., Mirrokni, V., and Zuo, S. Optimal mechanisms for value maximizers with budget constraints via target clipping. Available at SSRN 4081457, 2022. +Birmpas, G., Markakis, E., Telelis, O., and Tsikiridis, A. Tight welfare guarantees for pure nash equilibria of the uniform price auction. Theory of Computing Systems, 63: 1451-1469, 2019. +Blumrosen, L. and Nisan, N. Combinatorial auctions. Algorithmic game theory, 267:300, 2007. +Brânzei, S., Derakhshan, M., Golrezaei, N., and Han, Y. Learning and collusion in multi-unit auctions. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. +Castiglioni, M., Celli, A., and Kroer, C. Online learning under budget and roi constraints via weak adaptivity. In Proceedings of the 41st International Conference on Machine Learning, 2024. +Cramton, P. and Ausubel, L. M. Dynamic auctions in procurement. Handbook of Procurement, pp. 1-21, 2006. +De Keijzer, B., Markakis, E., Schäfer, G., and Telelis, O. Inefficiency of standard multi-unit auctions. In European Symposium on Algorithms, pp. 385-396. Springer, 2013. +De Vries, S. and Vohra, R. V. Combinatorial auctions: A survey. INFORMS Journal on computing, 15(3):284-309, 2003. +Deng, Y., Mao, J., Mirrokni, V., and Zuo, S. Towards efficient auctions in an auto-bidding world. In Proceedings of the Web Conference 2021, pp. 3965-3973, 2021. +Deng, Y., Golrezaei, N., Jaillet, P., Liang, J. C. N., and Mirrokni, V. Multi-channel autobidding with budget and roi constraints. In International Conference on Machine Learning, pp. 7617-7644. PMLR, 2023a. +Deng, Y., Mao, J., Mirrokni, V., Zhang, H., and Zuo, S. Autobidding auctions in the presence of user costs. In Proceedings of the ACM Web Conference 2023, pp. 3428-3435, 2023b. +Deng, Y., Golrezaei, N., Jaillet, P., Liang, J. C. N., and Mirrokni, V. Individual welfare guarantees in the autobidding world with machine-learned advice. In Proceedings of the ACM on Web Conference 2024, pp. 267-275, 2024. +EEX. Eex - eua primary auction spot download, 2023. URL https://www.eex.com/en/ market-data/environmental-markets/ eua-primary-auction-spot-download. Accessed on January 17, 2024. +EEX. Auctions participation report, August 2024. URL https://www.eex.com/fileadmin/EEX/Markets/Environmental_markets/Emissions_Auctions/20240801_Auctions_ + +participation_5min_Final.pdf. Accessed: 2024-08-01. +Fadaei, S. and Bichler, M. Truthfulness and approximation with value-maximizing bidders. In International Symposium on Algorithmic Game Theory, pp. 235-246. Springer, 2016. +Feng, Z., Padmanabhan, S., and Wang, D. Online bidding algorithms for return-on-spend constrained advertisers. In Proceedings of the ACM Web Conference 2023, pp. 3550-3560, 2023. +Freund, Y. and Schapire, R. E. A decision-theoretic generalization of on-line learning and an application to boosting. Journal of computer and system sciences, 55(1):119-139, 1997. +Gaitonde, J., Li, Y., Light, B., Lucier, B., and Slivkins, A. Budget pacing in repeated auctions: Regret and efficiency without convergence. In 14th Innovations in Theoretical Computer Science Conference (ITCS 2023), volume 251, pp. 52, 2023. +Galgana, R. and Golrezaei, N. Learning in repeated multiunit pay-as-bid auctions. Manufacturing & Service Operations Management, 2024. +Garbade, K. and Ingber, J. The treasury auction process: Objectives, structure, and recent adaptations. Current Issues in Economics and Finance, 2005. URL https://www.newyorkfed.org/medialibrary/media/research/current_issues/cil1-2.html. +Goldner, K., Immorlica, N., and Lucier, B. Reducing inefficiency in carbon auctions with imperfect competition. In 11th Innovations in Theoretical Computer Science Conference (ITCS 2020). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020. +Golrezaei, N., Lobel, I., and Paes Leme, R. Auction design for roi-constrained buyers. In Proceedings of the Web Conference 2021, pp. 3941-3952, 2021. +Golrezaei, N., Jaillet, P., Liang, J. C. N., and Mirrokni, V. Pricing against a budget and roi constrained buyer. In International Conference on Artificial Intelligence and Statistics, pp. 9282-9307. PMLR, 2023. +Hortaçsu, A. and McAdams, D. Mechanism choice and strategic bidding in divisible good auctions: An empirical analysis of the turkish treasury auction market. Journal of Political Economy, 118(5):833-865, 2010. +Klemperer, P. A new auction for substitutes: Central-bank liquidity auctions, 'toxic asset' auctions, and variable product-mix auctions. Journal of the European Economic Association, Forthcoming, 2009. +Lattimore, T. and Szepesvári, C. Bandit algorithms. Cambridge University Press, 2020. +Lu, P., Xu, C., and Zhang, R. Auction design for value maximizers with budget and return-on-spend constraints. In + +International Conference on Web and Internet Economics, pp. 474-491, 2023. +Lucier, B., Pattathil, S., Slivkins, A., and Zhang, M. Autobidders with budget and roi constraints: Efficiency, regret, and pacing dynamics. In Proceedings of Thirty Seventh Conference on Learning Theory, pp. 3642-3643. PMLR, 2024. +Lv, H., Zhang, Z., Zheng, Z., Liu, J., Yu, C., Liu, L., Cui, L., and Wu, F. Utility maximizer or value maximizer: mechanism design for mixed bidders in online advertising. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 5789-5796, 2023. +Markakis, E. and Telelis, O. Uniform price auctions: Equilibria and efficiency. Theory of Computing Systems, 57: 549-575, 2015. +Mas-Colell, A., Whinston, M. D., Green, J. R., et al. Microeconomic theory, volume 1. Oxford university press New York, 1995. +Niazadeh, R., Golrezaei, N., Wang, J., Susan, F., and Badani-diyuru, A. Online learning via offline greedy algorithms: Applications in market design and optimization. Management Science, 2022. +Nisan, N. Algorithmic mechanism design: Through the lens of multiunit auctions. In Handbook of Game Theory with Economic Applications, volume 4, pp. 477-515. Elsevier, 2015. +Palacios-Huerta, I., Parkes, D. C., and Steinberg, R. Combinatorial auctions in practice. Available at SSRN 3844338, 2022. +Potfer, M., Baudry, D., Richard, H., Perchet, V., and Wan, C. Improved learning rates in multi-unit uniform price auctions. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=UN7nXLeh9D. +Regulations, E. E. A. Eu ets auction regulations, 2019. URL https://eur-lex.europa.eu/ legal-content/EN/TXT/PDF/?uri $\equiv$ CELEX: 02010R1031-20191128. Accessed on January 19, 2024. +Roughgarden, T. and Wang, J. R. Minimizing regret with multiple reserves. ACM Transactions on Economics and Computation (TEAC), 7(3):1-18, 2019. +Schmalensee, R. and Stavins, R. N. Lessons learned from three decades of experience with cap and trade. Review of Environmental Economics and Policy, 2017. +Shoham, Y. and Leyton-Brown, K. Multiagent systems: Algorithmic, game-theoretic, and logical foundations. Cambridge University Press, 2008. +Streeter, M. and Golovin, D. An online algorithm for maximizing submodular functions. Advances in Neural Information Processing Systems, 21, 2008. + +Takimoto, E. and Warmuth, M. K. Path kernels and multiplicative updates. The Journal of Machine Learning Research, 4:773-818, 2003. +Tierney, S. F., Schatzki, T., and Mukerji, R. Uniform-pricing versus pay-as-bid in wholesale electricity markets: does it make a difference? New York ISO, 2008. +Tsybakov, A. B. Introduction to Nonparametric Estimation. Springer Series in Statistics. Springer, New York, 1st edition, 2009. ISBN 978-0-387-79051-0. doi: 10.1007/b13794. +Wilkens, C. A., Cavallo, R., Niazadeh, R., and Taggart, S. Mechanism design for value maximizers. arXiv preprint arXiv:1607.04362, 2016. +Wilkens, C. A., Cavallo, R., and Niazadeh, R. Gsp: the cinderella of mechanism design. In Proceedings of the 26th International Conference on World Wide Web, pp. 25-32, 2017. +Williamson, D. P. and Shmoys, D. B. The design of approximation algorithms. Cambridge university press, 2011. + +# Contents + +A Omitted Proofs from Section 3 14 + +A.1 Proof of Theorem 3.1 14 +A.2 Proof of Theorem 3.2 15 + +B Omitted Proofs From Section 4 15 + +B.1 Proof of Lemma 4.1 15 +B.2 Proof of Theorem 4.2 15 +B.3 Proof of Theorem 4.3 16 +B.4 Proof of Theorem 4.4 19 + +C Omitted Proofs from Section 5 20 + +C.1 Proof of Theorem 5.3 20 +C.2 Proof of Lemma C.1 23 +C.3 Proof of Lemma C.2 24 +C.4 Proof of Theorem 5.4 26 +C.5 Proof of Theorem 5.5 29 + +D Tight Lower Bounds for Results in Section 5 29 + +D.1 Tight Lower Bound for Theorem 5.3 (For $m = 1$ ) 29 +D.2 Tight Lower Bound for Theorem 5.3 (For $m\geq 2$ ) 30 +D.3 Tight Lower Bound for Theorem 5.4 33 +D.4 Tight Lower Bound for Theorem 5.5 35 + +E Simulation Details 36 + +E.1 Reconstructing Individual Bid Data 36 +E.2 An Uniform Upper Bound for $V_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ 36 + +F Resolving Ties 36 + +# A. Omitted Proofs from Section 3 + +# A.1. Proof of Theorem 3.1 + +Before proving Theorem 3.1, we present the following lemma about the bidder's per unit payments, which we will also use to prove several other results. + +Lemma A.1 (Per-unit Payments). Suppose the bidder bids $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ . Recall that $Q_j = \sum_{\ell=1}^{j} q_\ell$ , $\forall j \in [m]$ . Recall that, $\beta_{-,t}^{-(j)}$ is the $j^{\text{th}}$ smallest winning bid in the absence of bids from bidder $i$ for round $t$ . If $j = 0$ , $\beta_{-,t}^{-(j)} = 0$ and $j > K$ , $\beta_{-,t}^{-(j)} = \infty$ . Then, the per-unit payments by the bidder in round $t$ is + +$$ +p \left(\boldsymbol {\beta} ^ {t}\right) = \left\{ \begin{array}{l l} 0, & \text {i f} x \left(\boldsymbol {\beta} ^ {t}\right) = 0 \\ b _ {\ell}, & \text {i f} Q _ {\ell - 1} < x \left(\boldsymbol {\beta} ^ {t}\right) < Q _ {\ell} \\ \min \left(b _ {\ell}, \boldsymbol {\beta} _ {-, t} ^ {- (Q _ {\ell} + 1)}\right), & \text {i f} x \left(\boldsymbol {\beta} ^ {t}\right) = Q _ {\ell} \end{array} . \right. \tag {7} +$$ + +Define the following class of no-overbidding (NOB) strategies with $m$ bid-quantity pairs: + +$$ +\mathcal {S} _ {m} ^ {\mathbf {N O B}} := \left\{\mathbf {b} = \left\langle \left(b _ {1}, q _ {1}\right), \dots , \left(b _ {m}, q _ {m}\right) \right\rangle : b _ {\ell} \leq w _ {Q _ {\ell}}, \forall \ell \in [ m ] \right\}. +$$ + +We first show that $\mathfrak{S}_m\subseteq \mathfrak{S}_m^{\mathbf{NOB}}$ , and then complete the proof by showing $\mathfrak{S}_m^{\mathbf{NOB}}\subseteq \mathfrak{S}_m$ + +Proof of $\mathbb{S}_m\subseteq \mathbb{S}_m^{\mathrm{NOB}}$ + +Observation 1. Overbidding is not a safe bidding strategy. To see this, let $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_\ell, q_\ell), \ldots, (b_m, q_m) \rangle$ be an overbid such that $b_\ell > w_{Q_\ell}$ . Now, consider an auction in which the competing bids are: + +$$ +\beta_ {-,} ^ {- (j)} = \left\{ \begin{array}{l l} \epsilon , & \text {i f} 1 \leq j \leq Q _ {\ell} \\ 2 b _ {1}, & \text {i f} Q _ {\ell} < j \leq K \end{array} \right., +$$ + +where $\epsilon < \frac{b_m}{2}$ . Submitting $\mathbf{b}$ gets allocated $Q_{\ell}$ units and from Lemma A.1, we conclude that the clearing price of auction is $b_{\ell}$ . As $b_{\ell} > w_{Q_{\ell}}$ by assumption, the RoI constraint is violated. + +As overbidding is not a safe strategy, every safe bidding strategy is a NOB strategy, i.e., $\mathcal{S}_m\subseteq \mathcal{S}_m^{\mathrm{NOB}}$ + +Proof of $\mathcal{S}_m^{\mathrm{NOB}}\subseteq \mathcal{S}_m$ . We now prove that the converse is also true, i.e., every NOB strategy is also a safe strategy. To show this, fix any competing bid, $\beta_{-}$ , and consider any $\mathbf{b} = \langle (b_1,q_1),\ldots ,(b_m,q_m)\rangle \in \mathcal{S}_m^{\mathrm{NOB}}$ Suppose bidding b wins $x(\beta)$ units. So, from Lemma A.1, if $x(\beta) = 0$ , trivially, $P(\beta) = 0 = V(\beta)$ . If $Q_{\ell -1} < x(\beta)\leq Q_{\ell}$ , for some $\ell \in [m]$ + +$$ +P (\boldsymbol {\beta}) = x (\boldsymbol {\beta}) \cdot p (\boldsymbol {\beta}) \leq x (\boldsymbol {\beta}) \cdot b _ {\ell} \leq x (\boldsymbol {\beta}) \cdot w _ {Q _ {\ell}} \leq x (\boldsymbol {\beta}) \cdot w _ {x (\boldsymbol {\beta})} = V (\boldsymbol {\beta}). +$$ + +The first inequality holds true because bidders' per-unit payment is at most their least winning bid (individual rationality of the auction format), the second is true by definition, and the third is true because the $w_{j}$ is non-decreasing in $j$ and $x(\beta) \leq Q_{\ell}$ . As the choice of competing bids and bidding strategy $\mathbf{b}$ was arbitrary, we conclude that every strategy in $\mathcal{S}_m^{\mathrm{NOB}}$ is safe, i.e., $\mathbb{S}_m^{\mathrm{NOB}} \subseteq \mathbb{S}_m$ , which completes the proof. + +# A.1.1. PROOF OF LEMMA A.1 + +Consider the following three cases: + +(1) If $x(\beta^t) = 0$ , trivially, $p(\beta^t) = 0$ . +(2) Let $Q_{\ell - 1} < x(\beta^t) < Q_\ell$ . Let $b$ be the last accepted bid after including $\mathbf{b}$ , i.e., the smallest bid in $\beta^t = (\mathbf{b}, \beta_-^t)$ . Then $b_\ell \stackrel{(a)}{\geq} b \stackrel{(b)}{\geq} b_\ell$ . + +I. $(a)$ holds true because the bidder is allocated at least one unit for bid $b_{\ell}$ and +II. $(b)$ is correct because they do not acquire at least one unit for bid $b_{\ell}$ . Hence, $p(\beta^t) = b_{\ell}$ . + +(3) Suppose $x(\beta^t) = Q_\ell$ . If $b_\ell > \beta_{-,t}^{-(Q_\ell + 1)}$ , then $p(\beta^t) = \beta_{-,t}^{-(Q_\ell + 1)}$ . However, if $b_\ell \leq \beta_{-,t}^{-(Q_\ell + 1)}$ , $p(\beta^t) = b_\ell$ . So, $p(\beta^t) = \min(b_\ell, \beta_{-,t}^{-(Q_\ell + 1)})$ . + +# A.2. Proof of Theorem 3.2 + +We show that for any $m \in \mathbb{N}$ , most safe bidding strategies are very weakly dominated for which they can be removed from $\mathcal{S}_m$ , resulting in $\mathcal{S}_m^{\star}$ . We begin by establishing a general result regarding the monotonicity of feasible bid vectors (not necessarily $m$ -uniform strategies) for value maximizing bidders. As the result holds for any bid vector, it is also true for $m$ -uniform bidding strategies. + +Lemma A.2 (Monotonocity of feasible bids). Consider two sorted bid vectors: $\mathbf{b} = [b_1, b_2, \ldots, b_k]$ and $\mathbf{b}' = [b_1', b_2', \ldots, b_k']$ such that $b_j \geq b'_j$ , $\forall j \in [k]$ . Suppose $\mathbf{b}$ is RoI feasible for some competing bid, $\beta_{-}$ . Then, $\mathbf{b}'$ is also feasible for $\beta_{-}$ and $V(\mathbf{b}; \beta_{-}) \geq V(\mathbf{b}'; \beta_{-})$ . + +Suppose $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ is an underbidding strategy per Definition 3. Consider $\mathbf{b}' = \langle (b_1', q_1'), \ldots, (b_m', q_m') \rangle$ such that $q_j' = q_j$ and $b_j' = w_{Q_j}, \forall j \in [m]$ . By Theorem 3.1, we establish that $\mathbf{b}$ , $\mathbf{b}' \in S_m$ . Invoking Lemma A.2 gives us that the underbidding strategy is very weakly dominated, and hence can be removed from $S_m$ to obtain $S_m^{\star}$ . + +# A.2.1. PROOF OF LEMMA A.2 + +Let $\beta = (\mathbf{b},\beta_{-})$ and $\beta^{\prime} = (\mathbf{b}^{\prime},\beta_{-})$ . We first prove that $\mathbf{b}^{\prime}$ is also feasible for $\beta_{-}$ . Contrary to our claim, suppose $\mathbf{b}^{\prime}$ is infeasible, i.e., the value obtained by $\mathbf{b}^{\prime}$ when the competing bids are $\beta_{-}$ is strictly less than the payment. Suppose $\mathbf{b}^{\prime}$ is allocated $r^\prime$ units with clearing price $p(\beta ')$ such that the RoI constraint is violated: + +$$ +p \left(\boldsymbol {\beta} ^ {\prime}\right) > w _ {r ^ {\prime}}. \tag {8} +$$ + +Suppose $\mathbf{b}$ is allocated $r$ units when the competing bids are $\beta_{-}$ . By definition of allocation and payment rule, the units allocated and the clearing price in an auction are weakly increasing in bids, so $r' \leq r$ and $p(\beta') \leq p(\beta)$ . As $\mathbf{b}$ is feasible, + +$$ +p (\boldsymbol {\beta}) \leq w _ {r}. \tag {9} +$$ + +Combining Equations (8) and (9), we have + +$$ +p (\boldsymbol {\beta}) \leq w _ {r} \stackrel {(a)} {\leq} w _ {r ^ {\prime}} < p (\boldsymbol {\beta} ^ {\prime}) \Rightarrow p (\boldsymbol {\beta}) < p (\boldsymbol {\beta} ^ {\prime}), +$$ + +which is a contradiction. Here $(a)$ is true as $w_{j}$ is non-increasing in $j$ and $r^{\prime}\leq r$ . So, $\mathbf{b}^{\prime}$ is feasible. + +By definition of the allocation rule, the value obtained in an auction is weakly increasing in the bids submitted. As $\mathbf{b}$ and $\mathbf{b}'$ are both feasible, $V(\mathbf{b};\beta_{-}) \geq V(\mathbf{b}';\beta_{-})$ . + +# B. Omitted Proofs From Section 4 + +# B.1. Proof of Lemma 4.1 + +By Theorem 3.2, a strategy $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_\ell, q_\ell) \rangle \in \mathcal{U}_m^\star$ for some $\ell \in [m]$ can be uniquely identified by $\{Q_1, \ldots, Q_\ell\}$ where $Q_j = \sum_{k \leq j} q_k$ because $b_j = w_{Q_j}$ for all $j \in [\ell]$ . Let the bid history $\mathcal{H}_{-} = [\beta_{-}^t]_{t \in [T]}$ . Then, for any round $t$ , + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \sum_ {j = 1} ^ {\ell} \sum_ {k = Q _ {j - 1} + 1} ^ {Q _ {j}} v _ {k} \cdot \mathbb {I} \left[ w _ {Q _ {j}} \geq \boldsymbol {\beta} _ {-, t} ^ {- (k)} \right] +$$ + +Hence, the problem (OFFLINE) can be equivalently expressed as + +$$ +\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {*}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \max _ {\ell \in [ m ]} \max _ {Q _ {1}, \dots , Q _ {\ell}} \sum_ {j = 1} ^ {\ell} \sum_ {t = 1} ^ {T} \sum_ {k = Q _ {j - 1} + 1} ^ {Q _ {j}} v _ {k} \cdot \mathbb {I} \left[ w _ {Q _ {j}} \geq \boldsymbol {\beta} _ {-, t} ^ {- (k)} \right]. +$$ + +# B.2. Proof of Theorem 4.2 + +$\mathcal{G}(V,E)$ is a DAG. For convenience, let $d = (m + 1,0)$ . In the constructed graph, any node $(\ell ,j)$ where $\ell \in [m]$ has edges edges either to the next layer, i.e. nodes of the form $(\ell +1,j^{\prime})$ where $j^{\prime} > j$ or to the destination node $(m + 1,0)$ . Hence, the directed graph has a topological sorting of the nodes implying that $\mathcal{G}(V,E)$ is a DAG. + +Bijection between $s$ - $d$ paths and strategies in $\mathcal{U}_m^{\star}$ . Consider a path9 + +$$ +\mathfrak {p} = s \rightarrow (1, z _ {1}) \rightarrow \dots \rightarrow (m, z _ {m}) \rightarrow d. +$$ + +By construction of $\mathcal{G}(V,E)$ , edges $e = s\rightarrow (1,z_1)$ and $e = (m,z_m)\to d$ always exist. For any $\ell \in [m - 1]$ , the edge $(\ell ,z_{\ell})\to (\ell +1,z_{\ell +1})$ exists if $z_{\ell} < z_{\ell +1}$ . With this path $\mathfrak{p}$ , we associate the strategy + +$$ +\mathbf {b} = \left\langle \left(b _ {1}, q _ {1}\right), \dots , \left(b _ {m}, q _ {m}\right) \right\rangle \quad \text {w h e r e} \quad b _ {\ell} = w _ {z _ {\ell}} \quad \text {a n d} \quad q _ {\ell} = z _ {\ell} - z _ {\ell - 1}, \forall \ell \in [ m ]. +$$ + +where $z_0 = 0$ . By definition, $Q_{j} = \sum_{\ell = 1}^{j}q_{\ell} = z_{j}$ and $b_{j} = w_{z_{j}} = w_{Q_{j}},\forall j\in [m]$ . Hence, $\mathbf{b}\in \mathcal{U}_m^\star$ + +Conversely, consider any safe strategy $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ with $b_j = w_{Q_j}$ . With this strategy, we associate the $s$ -d path $\mathfrak{p}' = s \to (1, Q_1) \to \dots \to (m, Q_m) \to d$ where $Q_j = \sum_{\ell=1}^{j} q_\ell, \forall j \in [m]$ . We claim that $\mathfrak{p}'$ is a valid path, i.e., all the edges exist, because by definition $e = s \to (1, Q_1)$ and $e = (m, Q_m) \to d$ always exist. Furthermore, for any $\ell \in [m-1]$ , the edge $(\ell, Q_\ell) \to (\ell+1, Q_{\ell+1})$ also exists as $Q_{\ell+1} - Q_\ell = q_{\ell+1} > 0$ . + +Weight of $s$ - $d$ paths. By assumption, $s = (0,0)$ and $z_0 = 0$ . The weight of $\mathfrak{p} = s \to (1,z_1) \to \dots \to (m,z_m) \to d$ is: + +$$ +\begin{array}{l} w (p) = \sum_ {e \in p} w (e) = \sum_ {\ell = 1} ^ {m} w ((\ell - 1, z _ {\ell - 1}) \rightarrow (\ell , z _ {\ell})) \\ \stackrel {(4)} {=} \sum_ {\ell = 1} ^ {m} \sum_ {t = 1} ^ {T} \sum_ {k = z _ {\ell - 1} + 1} ^ {z _ {\ell}} v _ {k} \cdot \mathbb {I} \left[ w _ {z _ {\ell}} \geq \beta_ {-, t} ^ {- (k)} \right] \\ = \sum_ {t = 1} ^ {T} \sum_ {\ell = 1} ^ {m} \sum_ {k = z _ {\ell - 1} + 1} ^ {z _ {\ell}} v _ {k} \cdot \mathbb {I} \left[ w _ {z _ {\ell}} \geq \boldsymbol {\beta} _ {-, t} ^ {- (k)} \right], \\ \end{array} +$$ + +which is the value obtained by the safe strategy $\mathbf{b} = \langle (b_{1},q_{1}),\dots ,(b_{m},q_{m})\rangle \in \mathcal{U}_{m}^{\star}$ where $b_{\ell} = w_{z_{\ell}},\forall \ell \in [m]$ + +Computing maximum weight path. As $\mathcal{G}(V,E)$ is a DAG, the edge weights can be negated and the maximum (resp. minimum) weight path problem in the original (resp. 'negated') DAG can be solved in space and time complexity of $O(|V| + |E|) = O(mM^2)$ which is polynomial in the parameters of the problem. + +# B.3. Proof of Theorem 4.3 + +We begin by observing that there is a bijective mapping between $s$ - $d$ paths in the DAG $\mathcal{G}^t(V,E)$ and bidding strategies $\mathbf{b} \in \mathcal{U}_m^\star$ (see proof of Theorem 4.2). The core idea of the proof is to show that Algorithm 1 is an equivalent and efficient implementation of the Hedge algorithm (Freund & Schapire, 1997) where every $s$ - $d$ path is treated as an individual expert. Similar ideas have been utilized in Brânzei et al. (2023); Potfer et al. (2024); Galgana & Golrezaei (2024). For the sake of completeness, we provide the details below. + +In Algorithm 1, $\varphi^t (u\to \cdot)$ denotes the probability distribution over the outgoing neighbors of node $u$ . By the recursive sampling of nodes (Line 4-7 of Algorithm 1), we get that the probability of selecting $s - d$ path $\mathfrak{p}$ is + +$$ +\mathbb {P} ^ {t} (\mathfrak {p}) = \prod_ {e \in \mathfrak {p}} \varphi^ {t} (e), \tag {10} +$$ + +and for any edge $e = u\rightarrow v$ in $\mathcal{G}^t (V,E)$ , the edge probabilities, $\varphi^t (e)$ , are updated as + +$$ +\varphi^ {t} (e) = \varphi^ {t - 1} (e) \cdot \exp (\eta \mathrm {w} ^ {t - 1} (e)) \cdot \frac {\Gamma^ {t - 1} (v)}{\Gamma^ {t - 1} (u)}, \tag {11} +$$ + +where $\Gamma^{t - 1}(d) = 1$ and $\Gamma^{t - 1}(\cdot)$ is computed recursively in bottom-to-top fashion for every node $u$ in $\mathcal{G}^t (V,E)$ as follows: + +$$ +\Gamma^ {t - 1} (u) = \sum_ {v: u \rightarrow v \in E} \Gamma^ {t - 1} (v) \cdot \varphi^ {t - 1} (u \rightarrow v) \cdot \exp \left(\eta w ^ {t - 1} (u \rightarrow v)\right). \tag {12} +$$ + +Now, consider a naive implementation of the Hedge algorithm with learning rate $\eta$ in which each $s$ - $d$ path is treated as an individual expert. For $t = 1$ , define $\mathbb{P}_{\mathrm{Hedge}}^{1}(\mathfrak{p}) = \prod_{e\in \mathfrak{p}}\varphi^{1}(e)$ . For $t\geq 2$ , the probability of selecting path $\mathfrak{p}$ in round $t$ is + +$$ +\mathbb {P} _ {\mathrm {H E D G E}} ^ {t} (\mathfrak {p}) = \frac {\mathbb {P} _ {\mathrm {H E D G E}} ^ {t - 1} (\mathfrak {p}) \exp (\eta \sum_ {e \in \mathfrak {p}} \mathsf {w} ^ {t - 1} (e))}{\sum_ {\mathfrak {p} ^ {\prime}} \mathbb {P} _ {\mathrm {H E D G E}} ^ {t - 1} (\mathfrak {p} ^ {\prime}) \exp (\eta \sum_ {e \in \mathfrak {p} ^ {\prime}} \mathsf {w} ^ {t - 1} (e))}. +$$ + +Now, we show that for any path $\mathfrak{p}$ and $t\in [T],\mathbb{P}^t (\mathfrak{p}) = \mathbb{P}_{\mathrm{Hedge}}^t (\mathfrak{p})$ . To this end, we first present the following result: + +Claim B.1. For any node $u$ in the graph, let $\mathcal{P}(u)$ be the set of paths starting at $u$ and terminating at $d$ . Then, + +$$ +\Gamma^ {t - 1} (u) = \sum_ {\mathfrak {p} \in \mathcal {P} (u)} \prod_ {e \in \mathfrak {p}} \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)) +$$ + +Proof. We prove the result by induction in a bottom-to-top order. For the base case, $u = d$ , $\Gamma^{t-1}(d) = 1$ . Suppose the result is true for all the nodes in layer $\ell + 1$ for some $0 \leq \ell \leq m$ . By the recursion in Eq. (12), for any node $u$ in layer $\ell$ , + +$$ +\begin{array}{l} \Gamma^ {t - 1} (u) = \sum_ {v: u \rightarrow v \in E} \Gamma^ {t - 1} (v) \cdot \varphi^ {t - 1} (u \rightarrow v) \cdot \exp (\eta w ^ {t - 1} (u \rightarrow v)) \\ = \sum_ {v: u \rightarrow v \in E} \Big (\sum_ {\mathfrak {p} \in \mathcal {P} (v)} \prod_ {e \in \mathfrak {p}} \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)) \Big) \varphi^ {t - 1} (u \rightarrow v) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (u \rightarrow v)) \\ = \sum_ {\mathfrak {p} \in \mathcal {P} (u)} \prod_ {e \in \mathfrak {p}} \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)), \\ \end{array} +$$ + +where the first equality follows from induction hypothesis. + +We will show by induction on $t \in [T]$ that for any path $\mathfrak{p}$ , $\mathbb{P}^t(\mathfrak{p}) = \mathbb{P}_{\mathrm{Hedge}}^t(\mathfrak{p})$ . For $t = 1$ and any path $\mathfrak{p}$ , $\mathbb{P}_{\mathrm{Hedge}}^1(\mathfrak{p}) = \prod_{e \in \mathfrak{p}} \varphi^1(e) = \mathbb{P}^1(\mathfrak{p})$ . Here, the second equality holds by Eq. (10). Suppose the result holds for round $t - 1$ , i.e., $\mathbb{P}^{t - 1}(\mathfrak{p}) = \mathbb{P}_{\mathrm{Hedge}}^{t - 1}(\mathfrak{p}) = \prod_{e \in \mathfrak{p}} \varphi^{t - 1}(e)$ . For round $t$ , + +$$ +\mathbb {P} ^ {t} (\mathfrak {p}) = \prod_ {e \in \mathfrak {p}} \varphi^ {t} (e) \stackrel {(1 1)} {=} \prod_ {e = u \to v \in \mathfrak {p}} \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)) \cdot \frac {\Gamma^ {t - 1} (v)}{\Gamma^ {t - 1} (u)} = \mathbb {P} _ {\mathrm {H E D G E}} ^ {t - 1} (\mathfrak {p}) \cdot \exp \left(\eta \sum_ {e \in \mathfrak {p}} \mathsf {w} ^ {t - 1} (e)\right) \cdot \frac {\Gamma^ {t - 1} (d)}{\Gamma^ {t - 1} (s)}, +$$ + +where the last equality follows by telescoping product and invoking the induction hypothesis. By definition, $\Gamma^{t - 1}(d) = 1$ . By Claim B.1, + +$$ +\Gamma^ {t - 1} (s) = \sum_ {\mathfrak {p} ^ {\prime}} \prod_ {e \in \mathfrak {p} ^ {\prime}} \varphi^ {t - 1} (e) \cdot \exp (\eta \mathsf {w} ^ {t - 1} (e)) = \sum_ {\mathfrak {p} ^ {\prime}} \mathbb {P} _ {\mathrm {H E D G E}} ^ {t - 1} (\mathfrak {p} ^ {\prime}) \cdot \exp \left(\eta \sum_ {e \in \mathfrak {p} ^ {\prime}} \mathsf {w} ^ {t - 1} (e)\right) +$$ + +Substituting the values gives $\mathbb{P}^t (\mathfrak{p}) = \mathbb{P}_{\mathrm{Hedge}}^t (\mathfrak{p})$ implying Algorithm 1 is a correct implementation of the Hedge algorithm. + +# B.3.1. BANDIT FEEDBACK MODEL + +In the bandit setting, the bidder learns about their own allocation only for which $\mathsf{w}^t (e)$ can not be exactly computed for all the edges. Hence, we use an unbiased estimator, $\widehat{\mathsf{w}}^t (e)$ , of $\mathsf{w}^t (e)$ as follows: + +$$ +\widehat {\mathbf {w}} ^ {t} (e) = \overline {{\mathbf {w}}} (e) - \frac {\overline {{\mathbf {w}}} (e) - \mathbf {w} ^ {t} (e)}{p ^ {t} (e)} \cdot \mathbb {I} [ e \in \mathfrak {p} ^ {t} ] \quad \text {w h e r e} \quad p ^ {t} (e) = \sum_ {\mathfrak {p}: e \in \mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}). +$$ + +Here, $p^t(e)$ is the probability of selecting edge $e$ in round $t$ , $\mathbb{P}^t$ is the distribution over all $s-d$ paths in $\mathcal{G}^t(V,E)$ . Observe that $\widehat{\mathbf{w}}^t(e)$ is well defined as $p^t(e) > 0, \forall e \in E, \forall t \in [T]$ . Here, $\overline{\mathbf{w}}(e)$ is an edge-dependent upper bound of the edge weight $\mathbf{w}^t(e)$ . Formally, for $\ell \in [m]$ , + +$$ +\overline {{\mathbf {w}}} (e) = \left\{ \begin{array}{l l} j ^ {\prime} - j, & \text {i f} e = (\ell - 1, j) \to (\ell , j ^ {\prime}) \\ 0, & \text {i f} e = (\ell , j) \to d. \end{array} \right. +$$ + +The algorithm followed by the bidder in the bandit setting is identical to Algorithm 1, with each instance of $\mathsf{w}^t (e)$ replaced by $\widehat{\mathsf{w}}^t (e),\forall t\in [T],\forall e\in E$ Clearly, $\mathbb{E}[\widehat{\mathsf{w}}^t (e)] = \mathsf{w}^t (e)$ . The unbiased estimator $\widehat{\mathsf{w}}^t (e)$ is different from the natural importance-weighted estimator $\frac{\mathsf{w}^t(e)}{p^t(e)}\cdot \mathbb{I}[e\in \mathfrak{p}^t ]$ for technical reasons (similar to Lattimore & Szepesvári (2020, Eq. 11.6)) which we will clarify shortly. + +# B.3.2. REGRET UPPER BOUND + +Full Information Setting. Having shown that Algorithm 1 is equivalent to the Hedge algorithm, we now recall its regret bound from Brânzei et al. (2023, Corollary 1) which states that for learning rate $\eta$ : + +$$ +\mathsf {R E G} \leq - \frac {1}{\eta} \max _ {\mathfrak {p}} \log (\mathbb {P} ^ {1} (\mathfrak {p})) + \frac {\eta T M ^ {2}}{8}. +$$ + +Observe that $\mathbb{P}^1 (\mathfrak{p})\geq M^{-m}$ , which implies, + +$$ +\mathsf {R E G} \leq \frac {m \log M}{\eta} + \frac {\eta T M ^ {2}}{8}. +$$ + +Setting $\eta = \frac{1}{M}\sqrt{\frac{8m\log M}{T}}$ we get REG $\leq O(M\sqrt{mT\log M})$ + +Bandit Setting. Using the standard analysis for EXP3 algorithm (see Lattimore & Szepesvári (2020, Chapter 11)), we get + +$$ +\mathsf {R E G} = - \frac {1}{\eta} \max _ {\mathfrak {p}} \log (\mathbb {P} ^ {1} (\mathfrak {p})) + \sum_ {t = 1} ^ {T} \mathbb {E} \left[ \frac {1}{\eta} \log \left(\sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) e ^ {\eta \widehat {\mathbf {w}} ^ {t} (\mathfrak {p})}\right) - \sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) \widehat {\mathbf {w}} ^ {t} (\mathfrak {p}) \right] +$$ + +where $\widehat{\mathsf{w}}^t (\mathfrak{p}) = \sum_{e\in \mathfrak{p}}\widehat{\mathsf{w}}^t (e)$ . Note that $\widehat{\mathsf{w}}^t (\mathfrak{p}) = \sum_{e\in \mathfrak{p}}\widehat{\mathsf{w}}^t (e)\leq \sum_{e\in \mathfrak{p}}\overline{\mathsf{w}} (e)\leq M$ and $\mathbb{P}^1 (\mathfrak{p})\geq M^{-m}$ . For $\eta \leq \frac{1}{M}$ , + +$$ +\begin{array}{l} \mathsf {R E G} \leq \frac {m \log M}{\eta} + \eta \sum_ {t = 1} ^ {T} \sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) \mathbb {E} [ \widehat {\mathbf {w}} ^ {t} (\mathfrak {p}) ^ {2} ] \\ \leq \frac {m \log M}{\eta} + \eta m \sum_ {t = 1} ^ {T} \sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) \sum_ {e \in \mathfrak {p}} \mathbb {E} [ \widehat {\mathbf {w}} ^ {t} (e) ^ {2} ] \\ \end{array} +$$ + +where in the first inequality, we used $e^x \leq 1 + x + x^2$ for $x \leq 1$ and $\log(1 + x) \leq x$ for $x \geq 0$ and the second inequality follows from Cauchy-Schwarz. Observe that + +$$ +\sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) \sum_ {e \in \mathfrak {p}} \mathbb {E} [ \widehat {\mathsf {w}} ^ {t} (e) ^ {2} ] = \sum_ {e} \mathbb {E} [ \widehat {\mathsf {w}} ^ {t} (e) ^ {2} ] \sum_ {\mathfrak {p}: e \in \mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) = \sum_ {e} p ^ {t} (e) \mathbb {E} [ \widehat {\mathsf {w}} ^ {t} (e) ^ {2} ], +$$ + +where the last equality holds as $p^t (e) = \sum_{\mathfrak{p}:e\in \mathfrak{p}}\mathbb{P}^t (\mathfrak{p})$ + +$$ +\begin{array}{l} \sum_ {e} p ^ {t} (e) \mathbb {E} [ \widehat {\mathbf {w}} ^ {t} (e) ^ {2} ] = \sum_ {e} p ^ {t} (e) \left[ \overline {{\mathbf {w}}} (e) ^ {2} \left(1 - p ^ {t} (e)\right) + \left(\overline {{\mathbf {w}}} (e) - \frac {\overline {{\mathbf {w}}} (e) - \mathbf {w} ^ {t} (e)}{p ^ {t} (e)}\right) ^ {2} p ^ {t} (e) \right] \\ = \sum_ {e} \mathsf {w} ^ {t} (e) ^ {2} p ^ {t} (e) + (\overline {{\mathsf {w}}} (e) - \mathsf {w} ^ {t} (e)) ^ {2} (1 - p ^ {t} (e)) \leq \sum_ {e} \overline {{\mathsf {w}}} (e) ^ {2}. \\ \end{array} +$$ + +Observe that $\sum_{e}\overline{w} (e)^2\leq |E|M^2\lesssim mM^4$ . Hence, + +$$ +\begin{array}{l} \mathsf {R E G} \leq \frac {m \log M}{\eta} + \eta m \sum_ {t = 1} ^ {T} \sum_ {\mathfrak {p}} \mathbb {P} ^ {t} (\mathfrak {p}) \sum_ {e \in \mathfrak {p}} \mathbb {E} [ \widehat {\mathbf {w}} ^ {t} (e) ^ {2} ] \\ \lesssim \frac {m \log M}{\eta} + \eta T m ^ {2} M ^ {4} \\ \end{array} +$$ + +Setting $\eta = \frac{1}{M^2}\sqrt{\frac{\log M}{mT}}$ , we get $\mathsf{REG} \leq O(M^2\sqrt{m^3T\log M})$ . + +# B.3.3. TIME COMPLEXITY + +In the full information setting, the running time bottleneck is Eq. (12). Thus, Algorithm 1 runs in $|E| = O(mM^2)$ time per round. The bottleneck of running Algorithm 1 under the bandit feedback is the efficient computation of the marginal distribution, $p^t(e)$ . We claim that this can be done in $O(M|E|) = O(mM^3)$ time per-round. + +We compute the marginal probabilities in a recursive manner over the topological sorting of the nodes in the DAG as follows: for any edge starting at the source, $e = s \rightarrow u$ , $p^t(e) = \varphi^t(e)$ . For any other edge of the form $e = u \rightarrow v$ , using law of total probabilities + +$$ +p ^ {t} (u \to v) = \sum_ {x \in \mathcal {N} _ {u} ^ {i n}} \mathbb {P} [ (u \to v) | (x \to u) ] \cdot p ^ {t} (x \to u) = \sum_ {x \in \mathcal {N} _ {u} ^ {i n}} \varphi^ {t} (u \to v) \cdot p ^ {t} (x \to u), +$$ + +where $\mathcal{N}_u^{in}$ is the set of in-neighbors of node $u$ and $\mathbb{P}[(u\to v)|(x\to u)]$ is the conditional probability of selecting edge $u\rightarrow v$ once the edge $x\rightarrow u$ is chosen. The final equality holds because by Algorithm 1, we get that at any node, edges are chosen in a Markovian manner implying $\mathbb{P}[(u\to v)|(x\to u)] = \varphi^t (u\to v)$ . Observe that probabilities $p^t (x\to u)$ for any $x\in \mathcal{N}_u^{in}$ are known while computing $p^t (u\to v)$ as the edge $x\to u$ precedes $u\to v$ in the topological sort. So, the total run time is + +$$ +O \left(| E | \cdot \max _ {u \in V: u \neq d} \left| \mathcal {N} _ {u} ^ {i n} \right|\right) = O (M | E |) = O (m M ^ {3}). +$$ + +Here, we exclude the destination node $d$ while maximizing over the nodes as $d$ has no outgoing edges. + +# B.4. Proof of Theorem 4.4 + +For $m = 1$ , let $K = M$ be an even integer. Let $\mathbf{v} = [1, \ldots, 1, v, \ldots, v]$ . Here, the first $\frac{M}{2}$ entries are 1 and the remaining $\frac{M}{2}$ entries are $v$ . Let $v = 1 - \delta$ . Define $\delta' = \frac{\delta}{2M}$ . Consider two scenarios: + +Scenario 1. In this scenario, for every $t \in [T]$ , the competing bids $\beta_{-}^{t}$ are: + +$$ +\beta_ {-} ^ {t} = \left\{ \begin{array}{l l} [ 1 - \delta^ {\prime}, \ldots , 1 - \delta^ {\prime} ], & \text {w . p .} \frac {1}{2} + \delta , \\ [ \frac {1 + v}{2} - \delta^ {\prime}, \ldots , \frac {1 + v}{2} - \delta^ {\prime} ], & \text {w . p .} \frac {1}{2} - \delta , \end{array} \right. +$$ + +Scenario 2. In this scenario, for every $t \in [T]$ , the competing bids $\beta_{-}^{t}$ are: + +$$ +\boldsymbol {\beta} _ {-} ^ {t} = \left\{ \begin{array}{l l} {[ 1 - \delta^ {\prime}, \dots , 1 - \delta^ {\prime} ],} & {\mathrm {w . p .} \frac {1}{2} - \delta ,} \\ {[ \frac {1 + v}{2} - \delta^ {\prime}, \dots , \frac {1 + v}{2} - \delta^ {\prime} ],} & {\mathrm {w . p .} \frac {1}{2} + \delta ,} \end{array} \right. +$$ + +for some $\delta \in (0,1 / 4)$ that would be determined shortly. Assume the randomness used in different rounds are independent. Let $P$ and $Q$ be the distribution of $[\beta_{-}^{t}]_{t\in [T]}$ for scenario 1 and 2 respectively. Then, for $\delta \in (0,\frac{1}{4})$ + +$$ +\operatorname {K L} (P | | Q) = T \cdot \operatorname {K L} (\operatorname {B E R N} (0. 5 + \delta) | | \operatorname {B E R N} (0. 5 - \delta)) = 2 T \delta \log \left(\frac {1 + 2 \delta}{1 - 2 \delta}\right) \leq \frac {8 T \delta^ {2}}{1 - 2 \delta} \leq 1 6 T \delta^ {2} +$$ + +where the first inequality follows from $\log \left(\frac{1 + x}{1 - x}\right) \leq \frac{2x}{1 - x}$ . By Tsybakov (2009, Lemma 2.6), + +$$ +1 - \operatorname {T V} (P, Q) \geq \frac {1}{2} \exp \left(- \operatorname {K L} (P | | Q)\right) \geq \frac {1}{2} \exp \left(- 1 6 T \delta^ {2}\right). +$$ + +Consider the class of 1-uniform safe strategies. We first show that we need to consider only two strategies out of the $M$ possible strategies. Recall that any strategy in this class is of the form $(w_q, q)$ . + +Case 1. $1 \leq q \leq \frac{M}{2}$ : Here, $w_{q} = 1, \forall q$ . So, $(1, \frac{M}{2})$ weakly dominates all the strategies of the form $(1, q)$ for $1 \leq q \leq \frac{M}{2}$ . + +Case 2. $\frac{M}{2} + 1 \leq q \leq M$ : In this interval, the highest bid value is for $q = \frac{M}{2} + 1$ due to diminishing marginal returns property. Note that, + +$$ +w _ {\frac {M}{2} + 1} = \frac {\frac {M}{2} + 1 - \delta}{\frac {M}{2} + 1} = 1 - \frac {\delta}{\frac {M}{2} + 1} \leq 1 - \frac {\delta}{M} < 1 - \delta^ {\prime}. +$$ + +Hence, no strategy of form $(w_{q}, q)$ for $q \geq \frac{M}{2} + 1$ is allocated any unit in when the competing bids are $[1 - \delta', \dots, 1 - \delta']$ . The smallest bid value for $\frac{M}{2} + 1 \leq q \leq M$ is for $q = M$ . Note that, $w_{M} = \frac{1 + v}{2} > \frac{1 + v}{2} - \delta'$ . Hence, $(w_{M}, M) = (\frac{1 + v}{2}, M) = (1 - \frac{\delta}{2}, M)$ is allocated all the units when the competing bids are $[\frac{1 + v}{2} - \delta', \dots, \frac{1 + v}{2} - \delta']$ and, by definition, weakly dominates all the strategies of the form $(w_{q}, q)$ for $q \geq \frac{M}{2} + 1$ . Hence, we have two undominated (for the constructed competing bids) strategies: $\mathbf{b}_{1} = (1, \frac{M}{2})$ and $\mathbf{b}_{2} = (1 - \frac{\delta}{2}, M)$ . + +Now, we compute the expected value obtained by $\mathbf{b}_1$ and $\mathbf{b}_2$ for scenarios $P$ and $Q$ . + +$$ +\mathbb {E} _ {P} \left[ V \left(\mathbf {b} _ {1}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = \mathbb {E} _ {Q} \left[ V \left(\mathbf {b} _ {1}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = \frac {M}{2} +$$ + +$$ +\mathbb {E} _ {P} \left[ V \left(\mathbf {b} _ {2}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = M \left(\frac {1}{2} - \delta\right) \left(\frac {1 + v}{2}\right) = \frac {M}{2} \left(\frac {1}{2} - \delta\right) (2 - \delta) < \frac {M}{2} +$$ + +$$ +\mathbb {E} _ {Q} \left[ V \left(\mathbf {b} _ {2}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = M \left(\frac {1}{2} + \delta\right) \left(\frac {1 + v}{2}\right) = \frac {M}{2} \left(\frac {1}{2} + \delta\right) (2 - \delta) > \frac {M}{2} +$$ + +So, $\mathbf{b}_1$ (resp. $\mathbf{b}_2$ ) is optimal for scenario $P$ (resp. scenario $Q$ ). Now, consider the distribution $\frac{P + Q}{2}$ , i.e., $\mathrm{BERN}(0.5)$ . + +$$ +\begin{array}{l} \mathbb {E} _ {\frac {P + Q}{2}} \left[ V \left(\mathbf {b} _ {1}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = \frac {M}{2} \quad \text {a n d} \quad \mathbb {E} _ {\frac {P + Q}{2}} \left[ V \left(\mathbf {b} _ {2}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] = \frac {M}{2} \left(\frac {1 + v}{2}\right) \leq \frac {M}{2} \\ \Rightarrow \max _ {\mathbf {b} \in \mathcal {U} _ {1} ^ {*}} \mathbb {E} _ {\frac {P + Q}{2}} \left[ V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) \right] \leq \frac {M}{2} \tag {13} \\ \end{array} +$$ + +Hence, for any $\mathbf{b} \in \mathcal{U}_1^\star$ , and any round $t \in [T]$ + +$$ +\begin{array}{l} \max _ {\mathbf {b} ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {P} \left[ V \left(\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}\right) - V \left(\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] + \max _ {\mathbf {b} ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {Q} \left[ V \left(\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}\right) - V \left(\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] \\ \geq \max _ {\mathbf {b} ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {P} \left[ V \left(\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] + \max _ {\mathbf {b} ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {Q} \left[ V \left(\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] - 2 \max _ {b ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {\frac {P + Q}{2}} \left[ V \left(\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}\right) \right] \\ = \mathbb {E} _ {P} \left[ V (\mathbf {b} _ {1}; \boldsymbol {\beta} _ {-} ^ {t}) \right] + \mathbb {E} _ {Q} \left[ V (\mathbf {b} _ {2}; \boldsymbol {\beta} _ {-} ^ {t}) \right] - 2 \max _ {\mathbf {b} ^ {*} \in \mathcal {U} _ {1} ^ {\star}} \mathbb {E} _ {\frac {P + Q}{2}} \left[ V (\mathbf {b} ^ {*}; \boldsymbol {\beta} _ {-} ^ {t}) \right] \\ \stackrel {(1 3)} {\geq} \frac {M}{2} + \frac {M}{2} \left(\frac {1}{2} + \delta\right) (2 - \delta) - 2 \cdot \frac {M}{2} = \frac {M}{2} \left(\frac {3 \delta}{2} - \delta^ {2}\right) \geq \frac {5 M \delta}{8}, \\ \end{array} +$$ + +where the last inequality follows as $\delta \in (0, \frac{1}{4})$ . Hence, any strategy $\mathbf{b} \in \mathcal{U}_1^\star$ incurs a total regret of $\frac{5MT\delta}{16}$ either under $P$ or under $Q$ . By two-point method from Tsybakov (2009, Theorem 2.2), + +$$ +\mathbb {E} _ {\frac {P + Q}{2}} [ \mathsf {R E G} ] \geq \frac {5 M T \delta}{1 6} \cdot (1 - \operatorname {T V} (P, Q)) \geq \frac {5 M T \delta}{3 2} \exp (- 1 6 T \delta^ {2}) +$$ + +Setting $\delta = \frac{1}{4\sqrt{2T}}$ , we get $\mathbb{E}_{\frac{P + Q}{2}}[\mathsf{REG}] \geq \frac{M\sqrt{T}}{36\sqrt{e}}$ . Hence, $\mathbb{E}_{\frac{P + Q}{2}}[\mathsf{REG}] = \Omega(M\sqrt{T})$ . + +# C. Omitted Proofs from Section 5 + +# C.1. Proof of Theorem 5.3 + +To prove that $\Lambda_{\mathcal{F}_m^{\mathcal{H}_-},\mathcal{U}_m^*}\leq 2$ for any $m\in \mathbb{N}$ , recall from the proof sketch that we first defined the following metric for any bid history, $\mathcal{H}_{-} = [\pmb {\beta}_{-}^{t}]_{t\in [T]},$ + +$$ +\Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}) = \frac {\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}. \tag {14} +$$ + +Let $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (b_1^*, q_1^*), \ldots, (b_m^*, q_m^*) \rangle$ where $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-) := \operatorname{argmax}_{\mathbf{b} \in \mathcal{F}_m^{\mathcal{H}_-}} \sum_{t=1}^{T} V(\mathbf{b}; \beta_-^t)$ . Define $Q_\ell^* = \sum_{j \leq \ell} q_j^*$ . Suppose $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ is allocated $r_t^*$ units in round $t$ . For any $j \in [m]$ , let $T_j$ be the set of rounds in which the + +least winning bid is $b_{j}^{*}$ , i.e., + +$$ +T _ {j} = \left\{t \in [ T ]: Q _ {j - 1} ^ {*} < r _ {t} ^ {*} \leq Q _ {j} ^ {*} \right\}. \tag {15} +$$ + +For any $j \in [m]$ , partition $T_{j}$ into $T_{j,0}$ and $T_{j,1}$ such that $T_{j,0}$ is the set of rounds where the bidder gets strictly less than $Q_{j}^{*}$ units and $T_{j,1}$ is the set of rounds when they get exactly $Q_{j}^{*}$ units: + +$$ +T _ {j, 0} = \left\{t \in T _ {j}: r _ {t} ^ {*} < Q _ {j} ^ {*} \right\}, \quad T _ {j, 1} = \left\{t \in T _ {j}: r _ {t} ^ {*} = Q _ {j} ^ {*} \right\}. \tag {16} +$$ + +For any $j\in [m]$ , let + +$$ +\widehat {Q} _ {j} = \left\{ \begin{array}{l l} \max \{r _ {t} ^ {*}: t \in T _ {j, 0} \}, & \text {i f} T _ {j, 0} \neq \emptyset \\ Q _ {j} ^ {*} & \text {i f} T _ {j, 0} = \emptyset . \end{array} \right. +$$ + +In other words, $\widehat{Q}_j$ is the $2^{nd}$ highest number of units allocated to $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-$ ) over the rounds in $T_{j}$ (or the highest if $T_{j,0} = \emptyset$ or $T_{j,1} = \emptyset$ ). + +Step 1. Constructing a Restricted Class of Safe Bidding Strategies. Here, as a crucial part of the proof, we construct a restricted class of safe bidding strategies, denoted by $\mathcal{U}_m^{\star}(\mathcal{H}_{-})$ , where $\mathcal{U}_m^{\star}(\mathcal{H}_{-}) \subset \mathcal{U}_m^{\star}$ . This construction serves two purposes. First, it reduces the search space for the optimal safe bidding strategy. Second, and more importantly, it enables us to establish a connection between the optimal safe bidding strategy and $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ . + +In defining the restricted class, we use the quantities, $\{\widehat{Q}_j,Q_j^*\}_{j\in [m]}$ as follows: + +$$ +\mathcal {U} _ {m} ^ {\star} (\mathcal {H} _ {-}) = \left\{\mathbf {b} = \langle (b _ {1}, q _ {1}), \dots , (b _ {m}, q _ {m}) \rangle : b _ {\ell} = w _ {Q _ {\ell}}, Q _ {\ell} \in \left\{\widehat {Q} _ {\ell}, Q _ {\ell} ^ {*} \right\}, \forall \ell \in [ m ] \right\}. \tag {17} +$$ + +Recall that any strategy in $\mathcal{U}_m^*$ with $m$ bid-quantity pairs takes the form of $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle : b_\ell = w_{Q_\ell}, \forall \ell \in [m]$ . The strategies in $\mathcal{U}_m^*(\mathcal{H}_-$ also have the same structure but as an important difference, for any $\ell \in [m]$ , we enforce $Q_\ell \in \{\widehat{Q}_\ell, Q_\ell^*\}$ . Observe that for any $\ell \in [m - 1]$ , + +$$ +Q _ {\ell} \leq Q _ {\ell} ^ {*} < \widehat {Q} _ {\ell + 1} \leq Q _ {\ell + 1}, +$$ + +where the first and third inequalities follow directly from the definition of $Q_{\ell}$ and the second one follows from the definition of $\widehat{Q}_{\ell +1}$ . So, $Q_{\ell}$ 's are distinct and ordered. Further observe that the number of bidding strategies in $\mathcal{U}_m^{\star}(\mathcal{H}_-)$ is $O(2^{m})$ ; significantly smaller than the number of strategies in $\mathcal{U}_m^{\star}$ , which is $O(M^{m})$ . + +With the definition of the restricted class of safe bidding strategies, we have + +$$ +\Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}) = \frac {\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})} \leq \frac {\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {\star} (\mathcal {H} _ {-})} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}. \tag {18} +$$ + +Step 2. Value Decomposition for $m$ -uniform Strategies. Let $V_{j,k}$ be the time-average value obtained by $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ in the set of rounds in $T_{j,k}$ (as defined in Eq. (16)). Formally, $\forall j \in [m], k \in \{0,1\}$ , + +$$ +V _ {j, k} = \frac {1}{\left| T _ {j , k} \right|} \sum_ {t \in T _ {j, k}} V \left(\mathbf {b} _ {m} ^ {\mathsf {O P T}} \left(\mathcal {H} _ {-}\right), \boldsymbol {\beta} _ {-} ^ {t}\right). +$$ + +Define $W_{k} = \sum_{j=1}^{k} v_{j}$ . Note that $V_{j,1} = W_{Q_{j}^{*}}$ because for any $t \in T_{j,1}$ , we have $r_{t}^{*} = Q_{j}^{*}$ . For any $\mathbf{b} \in \mathcal{U}_{m}^{\star}(\mathcal{H}_{-})$ , where $\mathbf{b} = \langle (b_{1}, q_{1}), \ldots, (b_{m}, q_{m}) \rangle : b_{\ell} = w_{Q_{\ell}}$ , and $Q_{\ell} \in \{Q_{\ell}^{*}, \widehat{Q}_{\ell}\}$ for any $\ell \in [m]$ , define $N^{*}, \widehat{N} \subseteq [m]$ as follows: + +$$ +N ^ {*} = \left\{j: Q _ {j} = Q _ {j} ^ {*}, j \in [ m ] \right\} \quad \text {a n d} \quad \widehat {N} = \left\{j: Q _ {j} = \widehat {Q} _ {j} < Q _ {j} ^ {*}, j \in [ m ] \right\}. +$$ + +We now present a crucial result that expresses the value obtained by a $m$ -uniform bidding strategy as a function of the value obtained by $m$ 1-uniform strategies. + +Lemma C.1. Let $\mathbf{b} = \langle (w_{Q_1},q_1),\ldots ,(w_{Q_m},q_m)\rangle$ be a m-uniform safe bidding strategy for some $m\in \mathbb{N}$ . Then, for any competing bids $\beta_{-}$ + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-}) = \max _ {\ell \in [ m ]} V ((w _ {Q _ {\ell}}, Q _ {\ell}); \boldsymbol {\beta} _ {-}), +$$ + +where we recall that $Q_{\ell} = \sum_{j = 1}^{\ell}q_{j},\forall \ell \in [m]$ + +A key consequence of Lemma C.1 is that knowing the value obtained by the strategies in $\mathcal{U}_1^{\star}$ is sufficient to compute the value obtained any $m$ -uniform safe bidding strategy. By Lemma C.1, for any round $t \in T_j$ , and $\mathbf{b} \in \mathcal{U}_m^{\star}(\mathcal{H}_{-})$ , we get + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \max _ {\ell \in [ m ]} V ((w _ {Q _ {\ell}}, Q _ {\ell}); \boldsymbol {\beta} _ {-} ^ {t}) \geq V ((w _ {Q _ {j}}, Q _ {j}); \boldsymbol {\beta} _ {-} ^ {t}), \tag {19} +$$ + +$$ +\Rightarrow \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) \geq \sum_ {j \in N ^ {*}} \sum_ {t \in T _ {j}} V ((w _ {Q _ {j}}, Q _ {j}); \boldsymbol {\beta} _ {-} ^ {t}) + \sum_ {j \in \hat {\mathcal {N}}} \sum_ {t \in T _ {j}} V ((w _ {Q _ {j}}, Q _ {j}); \boldsymbol {\beta} _ {-} ^ {t}). \tag {20} +$$ + +Step 3. Allocation Lower Bounds for 1-uniform Strategies. For any $j \in [m]$ , we now invoke the following lemma to establish lower bound on $\sum_{t \in T_j} V((w_{Q_j}, Q_j); \beta_-^t)$ . + +Lemma C.2. Let $\mathbf{b} \in \mathcal{U}_m^\star(\mathcal{H}_-)$ , where $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle : b_j = w_{Q_j}$ , and $Q_j \in \{Q_j^*, \widehat{Q}_j\}, \forall j \in [m]$ . Then, for any $j \in [m]$ , + +(a) if $Q_{j} = \widehat{Q}_{j} < Q_{j}^{*}$ (i.e., $j \in \widehat{N}$ ), we have + +$$ +\sum_ {t \in T _ {j}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq V _ {j, 0} \left| T _ {j, 0} \right| + W _ {\hat {Q} _ {j}} \left| T _ {j, 1} \right|. \tag {21} +$$ + +(b) If $Q_{j} = Q_{j}^{*}$ (i.e., $j \in N^{*}$ ), we have + +$$ +\sum_ {t \in T _ {j}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq W _ {Q _ {j} ^ {*}} \left| T _ {j, 1} \right|. \tag {22} +$$ + +Note that the right hand side of Eq. (20) depends only on the choice of the partitions $N^{*}$ and $\widehat{N}$ . Substituting the lower bound from Lemma C.2 in Eq. (20), we establish that, + +$$ +\begin{array}{l} \Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {*}} (\mathcal {H} _ {-}) \stackrel {(1 8)} {\leq} \frac {\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} \in \mathcal {U} _ {m} ^ {*} (\mathcal {H} _ {-})} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})} \\ \leq \frac {\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {(N ^ {*}, \widehat {N})} \left\{\sum_ {j \in N ^ {*}} \left(W _ {Q _ {j} ^ {*}} \left| T _ {j , 1} \right|\right) + \sum_ {j \in \widehat {N}} \left(V _ {j , 0} \left| T _ {j , 0} \right| + W _ {\widehat {Q} _ {j}} \left| T _ {j , 1} \right|\right) \right\}}. \tag {23} \\ \end{array} +$$ + +Let $(N_0^*,\widehat{N}_0) = \operatorname{argmax}_{(N^*,\widehat{N})}\left\{\sum_{j\in N^*}\left(W_{Q_j^*}|T_{j,1}|\right) + \sum_{j\in \widehat{N}}\left(V_{j,0}|T_{j,0}| + W_{\widehat{Q}_j}|T_{j,1}|\right)\right\}$ . Then, + +$$ +\begin{array}{l} \max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \sum_ {t = 1} ^ {T} \sum_ {\ell = 0} ^ {1} V _ {j, \ell} | T _ {j, \ell} | \\ = \sum_ {j \in N _ {0} ^ {*}} \left(V _ {j, 0} \left| T _ {j, 0} \right| + W _ {Q _ {j} ^ {*}} \left| T _ {j, 1} \right|\right) + \sum_ {j \in \widehat {\mathcal {N}} _ {0}} \left(V _ {j, 0} \left| T _ {j, 0} \right| + W _ {Q _ {j} ^ {*}} \left| T _ {j, 1} \right|\right). \tag {24} \\ \end{array} +$$ + +Consider a partition of $[m]$ that differs from the maximizing partition $(N_0^*,\widehat{N}_0)$ by exactly one element, i.e., for any $a\in \widehat{N}_0$ consider the following partition: $(N_0^*\cup \{a\} ,\widehat{N}_0\setminus \{a\})$ . By definition, + +$$ +\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j, 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j, 0} | T _ {j, 0} | + W _ {\widehat {Q} _ {j}} | T _ {j, 1} |\right) \geq \sum_ {j \in N _ {0} ^ {*} \cup \{a \}} \left(W _ {Q _ {j} ^ {*}} | T _ {j, 1} |\right) + \sum_ {j \in \widehat {N} _ {0} \setminus \{a \}} \left(V _ {j, 0} | T _ {j, 0} | + W _ {\widehat {Q} _ {j}} | T _ {j, 1} |\right) +$$ + +$$ +\Rightarrow V _ {a, 0} \left| T _ {a, 0} \right| + W _ {\widehat {Q} _ {a}} \left| T _ {a, 1} \right| \geq W _ {Q _ {a} ^ {*}} \left| T _ {a, 1} \right|. \tag {25} +$$ + +Now, for any $b \in N_0^*$ , consider the following partition: $(N_0^* \setminus \{b\}, \widetilde{N}_0 \cup \{b\})$ . By definition, + +$$ +\begin{array}{l} \sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j, 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j, 0} | T _ {j, 0} | + W _ {\widehat {Q} _ {j}} | T _ {j, 1} |\right) \geq \sum_ {j \in N _ {0} ^ {*} \setminus \{b \}} \left(W _ {Q _ {j} ^ {*}} | T _ {j, 1} |\right) + \sum_ {j \in \widehat {N} _ {0} \cup \{b \}} \left(V _ {j, 0} | T _ {j, 0} | + W _ {\widehat {Q} _ {j}} | T _ {j, 1} |\right) \\ \Longrightarrow W _ {Q _ {b} ^ {*}} \left| T _ {b, 1} \right| - W _ {\widehat {Q} _ {b}} \left| T _ {b, 1} \right| \geq V _ {b, 0} \left| T _ {b, 0} \right|. \tag {26} \\ \end{array} +$$ + +Plugging in the values, + +$$ +\begin{array}{l} \Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {*}} (\mathcal {H} _ {-}) \stackrel {(2 4)} {\leq} \frac {\sum_ {j \in N _ {0} ^ {*}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right)}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)} \\ \stackrel {(2 5)} {\leq} \frac {\sum_ {j \in N _ {0} ^ {*}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(2 V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)} \\ \stackrel {(2 6)} {\leq} \frac {\sum_ {j \in N _ {0} ^ {*}} \left(2 W _ {Q _ {j} ^ {*}} | T _ {j , 1} | - W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(2 V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)} \\ = \frac {2 \Big \{\sum_ {j \in N _ {0} ^ {*}} W _ {Q _ {j} ^ {*}} | T _ {j , 1} | + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right) \Big \} - \sum_ {j = 1} ^ {m} W _ {\widehat {Q} _ {j}} | T _ {j , 1} |}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)} \\ = 2 - \theta_ {\mathcal {H} _ {-}}, \\ \end{array} +$$ + +where + +$$ +\begin{array}{l} 0 < \theta_ {\mathcal {H} _ {-}} = \frac {\sum_ {j = 1} ^ {m} W _ {\widehat {Q} _ {j}} | T _ {j , 1} |}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(V _ {j , 0} | T _ {j , 0} | + W _ {\widehat {Q} _ {j}} | T _ {j , 1} |\right)} \\ \stackrel {(2 5)} {\leq} \frac {\sum_ {j = 1} ^ {m} W _ {\widehat {Q} _ {j}} | T _ {j , 1} |}{\sum_ {j \in N _ {0} ^ {*}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right) + \sum_ {j \in \widehat {N} _ {0}} \left(W _ {Q _ {j} ^ {*}} | T _ {j , 1} |\right)} \\ = \frac {\sum_ {j = 1} ^ {m} W _ {\widehat {Q} _ {j}} | T _ {j , 1} |}{\sum_ {j = 1} ^ {m} W _ {Q _ {j} ^ {*}} | T _ {j , 1} |} \stackrel {(a)} {\leq} \max _ {j \in [ m ]} \frac {W _ {\widehat {Q} _ {j}}}{W _ {Q _ {j} ^ {*}}} \leq 1, \\ \end{array} +$$ + +and $(a)$ follows from Fact 1. Finally, + +$$ +\Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} = \max _ {\mathcal {H} _ {-}} \Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}) \leq 2 - \min _ {\mathcal {H} _ {-}} \theta_ {\mathcal {H} _ {-}} =: 2 - \theta , \quad \text {w h e r e} \quad \theta = \min _ {\mathcal {H} _ {-}} \theta_ {\mathcal {H} _ {-}} \in (0, 1 ]. +$$ + +Fact 1 (Williamson & Shmoys (2011, pp. 25)). For positive numbers $a_1, \ldots, a_m$ and $b_1, \ldots, b_m$ , + +$$ +\frac {\sum_ {j = 1} ^ {m} a _ {j}}{\sum_ {j = 1} ^ {m} b _ {j}} \leq \max _ {j \in [ m ]} \frac {a _ {j}}{b _ {j}}. +$$ + +# C.2. Proof of Lemma C.1 + +We state and prove a stronger version of the result in Lemma C.1. Formally, + +Lemma C.3. For any $m \in \mathbb{N}$ and competing bid $\beta_{-}$ , let $\mathbf{b} = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ be a feasible (not necessarily safe) $m$ -uniform strategy for $\beta_{-}$ . Then, + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-}) = \max _ {\ell \in [ m ]} V ((b _ {\ell}, Q _ {\ell}); \boldsymbol {\beta} _ {-}), +$$ + +where we recall that $Q_{\ell} = \sum_{j=1}^{\ell} q_{j}, \forall \ell \in [m]$ . + +Lemma C.3 states a similar result as Lemma C.1, except a key difference that the bidding strategies are not necessarily safe. + +# C.2.1. PROOF OF LEMMA C.3 + +We prove the lemma via induction on $m$ . The base case is $m = 1$ for which the result is trivially true. Now assume that the result holds for any $m$ -uniform bidding strategy for any competing bid $\beta_{-}$ . We now show that the result holds for any $(m + 1)$ -uniform bidding strategy which is feasible for $\beta_{-}$ . + +Consider any $m + 1$ -uniform bidding strategy $\mathbf{b} = \langle (b_{1},q_{1}),\dots ,(b_{m},q_{m}),(b_{m + 1},q_{m + 1})\rangle$ feasible for $\beta_{-}$ . Then, + +Claim C.4. The bid-quantity pair $(b_{m + 1},Q_{m + 1})$ is feasible for $\beta_{-}$ and $V(\mathbf{b};\beta_{-})\geq V((b_{m + 1},Q_{m + 1});\beta_{-})$ + +Proof. By assumption, $\mathbf{b}$ is feasible, the total demand of $\mathbf{b}$ and $(b_{m+1}, Q_{m+1})$ are equal and $b_{(j)} \geq b_{m+1}, \forall j \in [Q_{m+1}]$ , where $b_{(j)}$ denotes the bid value in $j$ th position in the sorted bid vector. So, by Lemma A.2, $(b_{m+1}, Q_{m+1})$ is feasible and $V(\mathbf{b}; \boldsymbol{\beta}_{-}) \geq V((b_{m+1}, Q_{m+1}), \boldsymbol{\beta}_{-})$ . + +Suppose that by bidding $\mathbf{b}$ , the bidder is allocated $r$ units. There are two cases: (a) $r \leq Q_m$ and (b) $r > Q_m$ . + +Case I. $r \leq Q_m$ . In this case, we have + +$$ +V (\mathbf {b}; \beta_ {-}) = V (\mathbf {b} [ 1: m ]; \beta_ {-}). \tag {27} +$$ + +Hence, by Claim C.4 and Eq. (27), + +$$ +V (\mathbf {b}; \beta_ {-}) = \max \left\{V (\mathbf {b} [ 1: m ]; \beta_ {-}), V ((b _ {m + 1}, Q _ {m + 1}); \beta_ {-}) \right\}. \tag {28} +$$ + +Case II. $r > Q_{m}$ . As $r > Q_{m}$ , $b_{m + 1}$ is the least winning bid which implies $b_{m + 1} \geq \beta_{-}^{-(r)}$ , where we recall that $\beta_{-}^{-(r)}$ is the $r^{th}$ smallest competing bid in $\beta_{-}$ . So, $(b_{m + 1}, Q_{m + 1})$ is allocated at least $r$ units which implies $V((b_{m + 1}, Q_{m + 1}), \beta_{-}) \geq V(\mathbf{b}; \beta_{-})$ . By Claim C.4, we also have $V(\mathbf{b}; \beta_{-}) \geq V((b_{m + 1}, Q_{m + 1}), \beta_{-})$ . Hence, + +$$ +V (\mathbf {b}; \beta_ {-}) = V \left(\left(b _ {m + 1}, Q _ {m + 1}\right); \beta_ {-}\right). \tag {29} +$$ + +As $r > Q_m$ , $(b_{m+1}, Q_{m+1})$ is allocated at least $Q_m + 1$ units, whereas $\mathbf{b}[1:m]$ has demand for (hence, can be allocated) at most $Q_m$ units. So, + +$$ +\begin{array}{l} V (\mathbf {b}; \boldsymbol {\beta} _ {-}) \geq V (\mathbf {b} [ 1: m ]; \boldsymbol {\beta} _ {-}) \\ \Rightarrow V (\mathbf {b}; \beta_ {-}) = \max \left\{V (\mathbf {b} [ 1: m ]; \beta_ {-}), V ((b _ {m + 1}, Q _ {m + 1}); \beta_ {-}) \right\}. \tag {30} \\ \end{array} +$$ + +For both Case I and Case II, we get the same result (cf. (28) and (30)). Hence, + +$$ +\begin{array}{l} V (\mathbf {b}; \boldsymbol {\beta} _ {-}) = \max \left\{V (\mathbf {b} [ 1: m ]; \boldsymbol {\beta} _ {-}), V ((b _ {m + 1}, Q _ {m + 1}); \boldsymbol {\beta} _ {-}) \right\} \\ \stackrel {(a)} {=} \max \left\{\max _ {\ell \in [ m ]} V \left(\left(b _ {\ell}, Q _ {\ell}\right); \beta_ {-}\right), V \left(\left(b _ {m + 1}, Q _ {m + 1}\right); \beta_ {-}\right) \right\} \\ = \max _ {\ell \in [ m + 1 ]} V \left(\left(b _ {\ell}, Q _ {\ell}\right); \boldsymbol {\beta} _ {-}\right). \\ \end{array} +$$ + +Here, $(a)$ holds as $\mathbf{b}[1:m]$ is feasible for $\beta_{-}$ allowing us to apply the induction hypothesis for $m$ . + +# C.3. Proof of Lemma C.2 + +To prove this result, we use the following key lemma that measures the value obtained by $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ in terms of 1-uniform safe bidding strategies. + +Lemma C.5. Let $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (b_1^*,q_1^*),\ldots ,(b_m^*,q_m^*)\rangle$ . Suppose $Q_{j}^{*} = \sum_{\ell \leq j}q_{\ell}^{*},\forall j\in [m]$ and $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ is allocated $r_t^*$ units in any round $t\in [T]$ . Then, + +1. For any $t \in [T]$ and $q \leq r_t^*$ , $(w_q, q)$ gets exactly $q$ units. + +2. For any $j \in [m]$ , let $T_j \subseteq [T]$ be the rounds in which $b_j^*$ is the least winning bid, i.e., + +$$ +T _ {j} = \left\{t \in [ T ]: Q _ {j - 1} ^ {*} < r _ {t} ^ {*} \leq Q _ {j} ^ {*} \right\}. +$$ + +Suppose that $\exists t\in T_j$ such that $r_t^* < Q_j^*$ . Then in any round $t'\in T_j$ in which $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ is allocated at most $r_t^*$ units, i.e., $r_{t'}^* \leq r_t^*$ , $(w_{r_t^*},r_t^*)$ is allocated at least $r_{t'}^*$ units. + +With this lemma, we are ready to prove Lemma C.2. + +Case I: $Q_{j} = \widehat{Q}_{j} < Q_{j}^{*}$ . For any $t \in T_{j,1}$ , invoking Lemma C.5 (1) with $q = \widehat{Q}_j$ , we conclude that $(w_{\widehat{Q}_j},\widehat{Q}_j)$ is allocated exactly $\widehat{Q}_j$ units. Summing over all rounds in $T_{j,1}$ , + +$$ +\sum_ {t \in T _ {j, 1}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) = W _ {\widehat {Q} _ {j}} \left| T _ {j, 1} \right|. \tag {31} +$$ + +As $\widehat{Q}_j < Q_j^*$ and $\widehat{Q}_j \geq r_s^*$ for any $s \in T_{j,0}$ . So, for any $s \in T_{j,0}$ , invoking Lemma C.5 (2) with $r_t^* = \widehat{Q}_j$ , we conclude that $(w_{\widehat{Q}_j}, \widehat{Q}_j)$ is allocated at least $r_s^*$ units. Hence, summing over all rounds, $(w_{\widehat{Q}_j}, \widehat{Q}_j)$ gets at least the value obtained by $\mathbf{b}_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ over the rounds in $T_{j,0}$ . So, + +$$ +\sum_ {t \in T _ {j, 0}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq \sum_ {t \in T _ {j, 0}} V \left(\mathbf {b} _ {m} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right), \beta_ {-} ^ {t}\right) = V _ {j, 0} \left| T _ {j, 0} \right|. \tag {32} +$$ + +Combining Eq. (31) and (32), for $Q_{j} = \widehat{Q}_{j}$ + +$$ +\sum_ {t \in T _ {j}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq V _ {j, 0} \left| T _ {j, 0} \right| + W _ {\hat {Q} _ {j}} \left| T _ {j, 1} \right|. \tag {33} +$$ + +Case II: $Q_{j} = Q_{j}^{*}$ . So, for any $t \in T_{j,1}$ , using Lemma C.5 (1) with $q = Q_{j}^{*}$ , we get that $(w_{Q_j^*},Q_j^*)$ is allocated exactly $Q_{j}^{*}$ units, which is the same as the allocation for $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ . Summing over all rounds in $T_{j,1}$ , + +$$ +\sum_ {t \in T _ {j, 1}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) = W _ {Q _ {j} ^ {*}} \left| T _ {j, 1} \right|. \tag {34} +$$ + +For the rounds in $T_{j,0}$ , trivially, + +$$ +\sum_ {t \in T _ {j, 0}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq 0. \tag {35} +$$ + +Combining Eq. (34) and (35), for $Q_{j} = Q_{j}^{*}$ + +$$ +\sum_ {t \in T _ {j}} V \left(\left(w _ {Q _ {j}}, Q _ {j}\right); \beta_ {-} ^ {t}\right) \geq W _ {Q _ {j} ^ {*}} \left| T _ {j, 1} \right|. \tag {36} +$$ + +# C.3.1. PROOF OF LEMMA C.5 + +(1) First we show that for any $t \in [T]$ and $q \leq r_t^*$ , the 1-uniform bid $(w_q, q)$ is allocated exactly $q$ units. + +As $(w_q,q)\in \mathcal{U}_1^\star$ , it is a safe strategy. By assumption, $\mathbf{b}_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ is allocated $r_t^*$ units in round $t$ . Let $\beta^{t} = (\mathbf{b}_{m}^{\mathrm{OPT}}(\mathcal{H}_{-}),\beta_{-}^{t})$ . Recall that, $\beta_{-,t}^{-(j)}$ is the $j^{th}$ smallest winning bid in the absence of bids from bidder $i$ for round $t$ . If $r_t^* = 0$ , the result is vacuously true. Suppose $r_t^* >0$ , then + +$$ +\beta_ {-, t} ^ {- (q)} \leq \beta_ {-, t} ^ {- (r _ {t} ^ {*})} \leq p (\beta^ {t}) \leq w _ {r _ {t} ^ {*}} \leq w _ {q}, +$$ + +where the first inequality holds by definition of $\beta_{-t}^{-(j)}$ and our assumption that $q \leq r_t^*$ . For the second inequality, suppose $Q_{\ell - 1}^* < r_t^* \leq Q_\ell^*$ for some $\ell \in [m]$ which by definition implies that $b_\ell^*$ is the least winning bid. By Lemma A.1, + +1. If $p(\boldsymbol{\beta}^t) = b_\ell^*$ , we have $p(\boldsymbol{\beta}^t) \geq \beta_{-,t}^{-(r_t^*)}$ as $b_\ell^*$ is the least winning bid. +2. If $p(\beta^t) = \beta_{-,t}^{-(Q_\ell^* + 1)}$ , we have $r_t^* = Q_\ell^*$ and by definition of $\beta_{-,t}^{-(j)}, p(\beta^t) = \beta_{-,t}^{-(Q_\ell^* + 1)} \geq \beta_{-,t}^{-(r_t^*)}$ . + +The third inequality is true as RoI constraint is satisfied by $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-$ ) for round $t$ , and the fourth is true as $w_{j}$ is a non-decreasing function of $j$ and $q\leq r_t^*$ . From the first and last expressions, $\beta_{-t}^{-(q)}\leq w_q$ which implies that $(w_{q},q)$ is allocated at least $q$ units in round $t$ . Moreover, $(w_{q},q)$ can be allocated at most $q$ units. Hence, the 1-uniform bid $(w_{q},q)$ is allocated exactly $q$ units. + +(2) For any $j \in [m]$ , let $T_j \subseteq [T]$ , defined in Eq. (15), be the rounds in which $b_j^*$ is the least winning bid. Suppose that $\exists t \in T_j$ such that $r_t^* < Q_j^*$ . We show that in any round $t' \in T_j$ in which $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ is allocated at most $r_t^*$ units, i.e., $r_{t'}^* \leq r_t^*$ , the 1-uniform strategy $(w_{r_t^*}, r_t^*)$ is allocated at least $r_{t'}^*$ units. + +Observe that $(w_{r_t^*}, r_t^*) \in \mathcal{U}_1^*$ , so it is a safe strategy. If $r_t^* = 0$ , the result is trivially true. Hence, suppose $r_t^* > 0$ and consider the set of rounds in $T_j$ for any $j \in [m]$ . As $r_t^* < Q_j^*$ , by Lemma A.1, $p(\beta^t) = b_j^*$ . So, for any $t' \in T_j$ such that $r_{t'}^* \leq r_t^*$ , + +$$ +\beta_ {-, t ^ {\prime}} ^ {- \left(r _ {t ^ {\prime}} ^ {*}\right)} \leq b _ {j} ^ {*} \leq w _ {r _ {t} ^ {*}}. +$$ + +Here, the first inequality holds as $b_{j}^{*}$ is the least winning bid for round $t' \in T_{j}$ and the second one holds as the RoI constraint is true for $\mathbf{b}_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ for round $t$ . Hence, $(w_{r_t^*}, r_t^*)$ is allocated at least $r_{t'}^*$ units in round $t'$ . + +# C.4. Proof of Theorem 5.4 + +We state and prove a stronger result which recovers the upper bound in Theorem 5.4 as a corollary and is also crucial to prove the upper bound in Theorem 5.5. Let $\mathcal{F}_m^{\mathcal{H}_{-}}$ be the class of bidding strategies with at most $m$ bid-quantity pairs that are feasible for the bid history $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ . Then, + +Theorem C.6. For any $m, m' \in \mathbb{N}$ such that $m' \geq m$ , $\Lambda_{\mathcal{F}_{m'}^{\mathcal{H}_-}, \mathcal{F}_m^{\mathcal{H}_-}} \leq \frac{m'}{m}$ . + +Proof. For $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ , we define + +$$ +\Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} (\mathcal {H} _ {-}) = \frac {\max _ {{\bf b} ^ {\prime} \in \mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ^ {\prime} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {{\bf b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ; \boldsymbol {\beta} _ {-} ^ {t})}. +$$ + +Then, maximizing over all bid histories, we get the desired result. + +Let $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-) = \operatorname*{argmax}_{\mathbf{b} \in \mathcal{F}_{m'}^{\mathcal{H}_-}} \sum_{t=1}^{T} V(\mathbf{b}; \beta_-^t)$ . If $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-)$ is a $k$ -uniform bidding strategy where $k \leq m \leq m'$ , by definition, $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-) \in \mathcal{F}_{m'}^{\mathcal{H}_-}$ implying $\Lambda_{\mathcal{F}_{m'}, \mathcal{F}_{m}^{\mathcal{H}_-}}(\mathcal{H}_-) = 1 \leq \frac{m'}{m}$ . + +Without loss of generality, let the optimal bidding strategy in $\mathcal{F}_{m'}^{\mathcal{H}_-}$ be $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (b_1^*, q_1^*), \ldots, (b_{m'}^*, q_{m'}^*) \rangle$ and $Q_{\ell}^{*} = \sum_{j \leq \ell} q_j^*$ for all $\ell \in [m']$ . Let $r_t^*$ be the number of units allocated to $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-$ in round $t$ . Recall that $T_j$ is the set of rounds when $b_j^*$ is the least winning bid when $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-$ is submitted (see Eq. (15)). So, + +$$ +\sum_ {t = 1} ^ {T} V \left(\mathbf {b} _ {m ^ {\prime}} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \boldsymbol {\beta} _ {-} ^ {t}\right) = \sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\mathbf {b} _ {m ^ {\prime}} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \boldsymbol {\beta} _ {-} ^ {t}\right). +$$ + +Observe that, for any $t \in T_j$ , + +$$ +V (\mathbf {b} _ {m ^ {\prime}} ^ {\mathsf {O P T}} (\mathcal {H} _ {-}); \boldsymbol {\beta} _ {-} ^ {t}) = V (\mathbf {b} _ {m ^ {\prime}} ^ {\mathsf {O P T}} (\mathcal {H} _ {-}) [ 1: j ]; \boldsymbol {\beta} _ {-} ^ {t}) = \max _ {\ell \in [ j ]} V ((b _ {\ell} ^ {*}, Q _ {\ell} ^ {*}); \boldsymbol {\beta} _ {-} ^ {t}), +$$ + +where recall that $\mathbf{b}[1:j]$ represents the first $j$ bid-quantity pairs and the last equality holds due to Lemma C.3. For any $t\in T_j,r_t^* >Q_{j - 1}^*$ . So, $\forall \ell < j,V(\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-);\beta_-^t) > V((b_\ell^*,Q_\ell^*);\beta_-^t)$ as the demand of the strategy $(b_{\ell}^{*},Q_{\ell}^{*})$ is strictly less than the number of units obtained by $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-)$ in that round. Hence, for any $t\in T_j$ + +$$ +V \left(\mathbf {b} _ {m ^ {\prime}} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \beta_ {-} ^ {t}\right) = V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right) \Rightarrow \sum_ {t = 1} ^ {T} V \left(\mathbf {b} _ {m ^ {\prime}} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \beta_ {-} ^ {t}\right) = \sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right). \tag {37} +$$ + +Let $\mathcal{G}_m^{\mathcal{H}^-} \subseteq \mathcal{F}_m^{\mathcal{H}^-}$ be the class of feasible strategies for $\mathcal{H}_{-}$ that contain exactly $m$ bid-quantity pairs. Then, + +$$ +\Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} (\mathcal {H} _ {-}) \stackrel {(3 7)} {=} \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*} , Q _ {j} ^ {*}\right) ; \boldsymbol {\beta} _ {-} ^ {t}\right)}{\max _ {\mathbf {b} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})} \leq \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*} , Q _ {j} ^ {*}\right) ; \boldsymbol {\beta} _ {-} ^ {t}\right)}{\max _ {\mathbf {b} \in \mathcal {G} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}. \tag {38} +$$ + +Constructing the class of bidding strategies, $\widetilde{\mathcal{G}}_m^{\mathcal{H}_-}$ . We now construct a class of $m$ -uniform bidding strategies, $\widetilde{\mathcal{G}}_m^{\mathcal{H}_-}$ using $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-)$ as a 'parent' bidding strategy, in Algorithm 3. + +# Algorithm 3 Constructing $\widetilde{\mathfrak{G}}_m^H$ + +Require: $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (b_1^*, q_1^*), \ldots, (b_{m'}^*, q_{m'}^*) \rangle$ . The collection, $\mathcal{C}$ , of all subsets $S \subseteq [m']$ such that $|S| = m$ . Initialize $\widetilde{\mathcal{G}}_m^{\mathcal{H}^-} = \emptyset$ . 1: for $S \in \mathbb{C}$ do + +2: Suppose $\mathcal{S} = \{k_1, \dots, k_m\}$ such that $k_1 < k_2 < \dots < k_m$ . +3: Construct a $m$ -uniform bidding strategy $\mathbf{b} = \langle (b_{1},q_{1}),\ldots ,(b_{m},q_{m})\rangle$ where + +$$ +b _ {j} = b _ {k _ {j}} ^ {*} \quad \text {a n d} \quad q _ {j} = Q _ {k _ {j}} ^ {*} - Q _ {k _ {j - 1}} ^ {*}, \forall j \in [ m ]. \tag {39} +$$ + +4: $\widetilde{\mathfrak{G}}_m^{\mathcal{H}_-} \gets \widetilde{\mathfrak{G}}_m^{\mathcal{H}_-} \cup \{\mathbf{b}\}$ +5: end for + +Return: The class of bidding strategies, $\widetilde{\mathcal{G}}_m^H$ . + +For example: suppose $m' = 4$ and $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (w_3, 3), (w_7, 4), (w_8, 1), (w_{10}, 2) \rangle$ . Let $m = 2$ and $S = \{2, 4\}$ . Then, $\mathbf{b} = \langle (w_7, 7), (w_{10}, 3) \rangle$ . + +Lemma C.7. Let $b_{(j)}^{*}$ be the $j^{th}$ entry when $\mathbf{b}_{m'}^{\mathrm{OPT}}(\mathcal{H}_-)$ is expressed as a bid vector. Similarly, for any $\mathbf{b} \in \widetilde{\mathcal{G}}_m^{\mathcal{H}_-}$ , let $b_{(j)}$ be the $j^{th}$ entry when $\mathbf{b}$ is expressed as a bid vector. Then, for any $j \in [Q_{k_m}]$ , $b_{(j)} \leq b_{(j)}^{*}$ . Thus, by Lemma A.2, $\mathbf{b}$ is also feasible for $\mathcal{H}_-$ and as $\mathbf{b}$ was chosen arbitrarily, we conclude that $\widetilde{\mathcal{G}}_m^{\mathcal{H}_-} \subseteq \mathcal{G}_m^{\mathcal{H}_-}$ . + +Proof. Let $S$ contain $k_{1} < \dots < k_{m}$ and $\mathbf{b}$ be constructed per Algorithm 3. Then, for any $j \in [m]$ and any entry $\ell \in (Q_{k_{j-1}}^{*}, Q_{k_{j}}^{*}]$ , + +$$ +b _ {(\ell)} ^ {*} \geq b _ {(Q _ {k _ {j}} ^ {*})} ^ {*} = b _ {k _ {j}} ^ {*} = b _ {(\ell)}, +$$ + +where the first inequality follows because entries in bid vector are in non-increasing order, the first equality follows as $b_{(Q_r)}^* = b_r^*$ for all $r \in [m']$ and second equality follows from Eq. (39). As $j$ and $\ell$ were picked arbitrarily, we get that for all $j \in [Q_{k_m}]$ , $b_{(j)} \leq b_{(j)}^*$ . + +By Lemma C.7, + +$$ +\Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} (\mathcal {H} _ {-}) \stackrel {(3 8)} {\leq} \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*} , Q _ {j} ^ {*}\right) ; \boldsymbol {\beta} _ {-} ^ {t}\right)}{\max _ {\mathbf {b} \in \mathfrak {G} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})} \leq \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*} , Q _ {j} ^ {*}\right) ; \boldsymbol {\beta} _ {-} ^ {t}\right)}{\max _ {\mathbf {b} \in \tilde {\mathfrak {G}} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})}. \tag {40} +$$ + +Consider any $\mathbf{b} \in \widetilde{\mathcal{G}}_m^{\mathcal{H}_-}$ obtained from the set $S = \{k_1, \ldots, k_m\} \subseteq [m']$ . As $\mathbf{b}$ is feasible for $\mathcal{H}_-$ , invoking Lemma C.3 for any round $t \in [T]$ , we get: + +$$ +V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \max _ {\ell \in [ m ]} V \left(\left(b _ {k _ {\ell}} ^ {*}, Q _ {k _ {\ell}} ^ {*}\right); \boldsymbol {\beta} _ {-} ^ {t}\right) = \max _ {\ell \in \mathcal {S}} V \left(\left(b _ {\ell} ^ {*}, Q _ {\ell} ^ {*}\right); \boldsymbol {\beta} _ {-} ^ {t}\right), \tag {41} +$$ + +because for any $\ell \in [m]$ , $b_{\ell} = b_{k_{\ell}}^{*}$ and $Q_{\ell} = \sum_{j=1}^{j} q_{j} = \sum_{j=1}^{j} Q_{k_{j}}^{*} - Q_{k_{j-1}}^{*} = Q_{k_{\ell}}^{*}$ . + +Recall that $T_{j}$ s, the set of rounds in which $b_{j}^{*}$ is the least winning bid, form a partition of $[T]$ . So, + +$$ +\sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \sum_ {t = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \sum_ {j \in \mathcal {S}} \sum_ {t \in T _ {j}} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) + \sum_ {j \in [ m ^ {\prime} ] \backslash \mathcal {S}} \sum_ {t \in T _ {j}} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) \geq \sum_ {j \in \mathcal {S}} \sum_ {t \in T _ {j}} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) \tag {42} +$$ + +For any $j\in \mathcal{S}$ , consider any round $t\in T_j$ .. + +$$ +V \left(\mathbf {b}; \beta_ {-} ^ {t}\right) \stackrel {(4 1)} {=} \max _ {\ell \in \mathcal {S}} V \left(\left(b _ {\ell} ^ {*}, Q _ {\ell} ^ {*}\right); \beta_ {-} ^ {t}\right) \geq V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right) \Rightarrow \sum_ {t \in T _ {j}} V (\mathbf {b}; \beta_ {-} ^ {t}) \geq \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right) \tag {43} +$$ + +which implies, + +$$ +\sum_ {t = 1} ^ {T} V \left(\mathbf {b}; \beta_ {-} ^ {t}\right) \stackrel {(4 2)} {\geq} \sum_ {j \in \mathcal {S}} \sum_ {t \in T _ {j}} V \left(\mathbf {b}; \beta_ {-} ^ {t}\right) \stackrel {(4 3)} {\geq} \sum_ {j \in \mathcal {S}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right). \tag {44} +$$ + +Note that a bidding strategy $\mathbf{b} \in \widetilde{\mathcal{G}}_m^{\mathcal{H}_-}$ is uniquely determined by the set $S \subseteq [m']$ that generates $\mathbf{b}$ . Hence, + +$$ +\begin{array}{l} \max _ {\mathbf {b} \in \mathcal {G} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) = \max _ {\mathcal {S} \subseteq [ m ^ {\prime} ]: | S | = m} \sum_ {t = 1} ^ {T} V (\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}) \\ \stackrel {(4 4)} {\geq} \max _ {\mathcal {S} \subseteq [ m ^ {\prime} ]: | \mathcal {S} | = m} \sum_ {j \in \mathcal {S}} \sum_ {t \in T _ {j}} V ((b _ {j} ^ {*}, Q _ {j} ^ {*}); \boldsymbol {\beta} _ {-} ^ {t}) \\ \geq \frac {m}{m ^ {\prime}} \sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V \left(\left(b _ {j} ^ {*}, Q _ {j} ^ {*}\right); \beta_ {-} ^ {t}\right). \tag {45} \\ \end{array} +$$ + +Hence, + +$$ +\Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} (\mathcal {H} _ {-}) \leq \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V ((b _ {j} ^ {*} , Q _ {j} ^ {*}) ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {\mathbf {b} \in \tilde {\mathcal {G}} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \boldsymbol {\beta} _ {-} ^ {t})} \stackrel {(4 5)} {\leq} \frac {m ^ {\prime}}{m}. +$$ + +Maximizing over all bid histories, we get that $\Lambda_{\mathcal{F}_{m^{\prime}}^{\mathcal{H}_{-}},\mathcal{F}_{m}^{\mathcal{H}_{-}}}\leq \frac{m^{\prime}}{m}$ . + +Now, we prove that the result also holds for safe bidding strategies. Formally, we show that for $m,m^{\prime}\in \mathbb{N}$ and $m^{\prime}\geq m$ $\Lambda_{\mathcal{U}_{m^{\prime}}^{\star},\mathcal{U}_{m}^{\star}}\leq \frac{m^{\prime}}{m}$ . To this end, we consider the quantity $\Lambda_{\mathcal{U}_{m^{\prime}}^{\star},\mathcal{U}_{m}^{\star}}(\mathcal{H}_{-})$ analogous to $\Lambda_{\mathcal{F}_{m^{\prime}}^{\mathcal{H}_{-}},\mathcal{F}_{m}^{\mathcal{H}_{-}}(\mathcal{H}_{-})}$ , upper bound it and maximize over all bid histories to get the desired result. + +For any bid history, $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ , let $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_{-}) := \operatorname{argmax}_{\mathbf{b}' \in \mathcal{U}_{m'}^{\star}} \sum_{t=1}^{T} V(\mathbf{b}'; \beta_{-}^{t})$ . Without loss of generality, let $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = \langle (w_{Q_1^*}, q_1^*), \ldots, (w_{Q_{m'}^*}, q_{m'}^*) \rangle$ . The proof to bound $\Lambda_{\mathcal{U}_{m'}^{\star}, \mathcal{U}_{m}^{\star}}(\mathcal{H}_{-})$ is similar to that of Theorem C.6 till Eq. (38), where we have + +$$ +\Lambda_ {\mathcal {U} _ {m ^ {\prime}} ^ {\star}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}) \leq \frac {\sum_ {j = 1} ^ {m ^ {\prime}} \sum_ {t \in T _ {j}} V ((w _ {Q _ {j}} ^ {*} , Q _ {j} ^ {*}) ; \beta_ {-} ^ {t})}{\max _ {\mathbf {b} \in \mathcal {S} _ {m}} \sum_ {t = 1} ^ {T} V (\mathbf {b} ; \beta_ {-} ^ {t})}. +$$ + +Recall that $\mathcal{S}_m$ is the class of $m$ -uniform safe bidding strategies. Suppose $\mathcal{S}_m(\mathcal{H}_-)$ be the class that is constructed analogous to the class $\widetilde{\mathcal{G}}_m^{\mathcal{H}^-}$ obtained in Algorithm 3. We now show that $\mathcal{S}_m(\mathcal{H}_-) \subseteq \mathcal{S}_m$ . + +Lemma C.8. For any subset $S \subseteq [m']$ such that $|S| = m$ , suppose $\mathbf{b}$ is the bidding strategy obtained from $S$ . Then, $\mathbf{b}$ is a safe bidding strategy. As $S$ was chosen arbitrarily, $\mathcal{S}_m(\mathcal{H}_-) \subseteq \mathcal{S}_m$ . + +Proof. Let $S$ contain $k_{1} < \dots < k_{m}$ and $\mathbf{b}$ be constructed per Algorithm 3. Then, for any $j \in [m]$ , + +$$ +b _ {j} = b _ {k _ {j}} ^ {*} = w _ {Q _ {k _ {j}} ^ {*}}, \quad \text {a n d} \quad Q _ {j} = Q _ {k _ {j}} ^ {*}. +$$ + +Thus, $\mathbf{b}$ is a safe bidding strategy. + +The rest of the proof follows similar to that of Theorem C.6 which gives the desired result. + +# C.5. Proof of Theorem 5.5 + +We need to establish upper bounds on $\Lambda_{\mathcal{F}_{m'}^{\mathcal{H}^{-}},\mathcal{U}_m^{\star}}$ . From Theorem C.6 and Theorem 5.3, we have: + +$$ +\begin{array}{l} \Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} = \frac {\max _ {{\bf b} ^ {\prime} \in \mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ^ {\prime} ; \beta_ {-} ^ {t})}{\max _ {{\bf b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V ({\bf b} ; \beta_ {-} ^ {t})} \\ = \frac {\max _ {{\bf b} ^ {\prime} \in \mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ^ {\prime} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {{\bf b} ^ {\prime \prime} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ^ {\prime \prime} ; \boldsymbol {\beta} _ {-} ^ {t})} \cdot \frac {\max _ {{\bf b} ^ {\prime \prime} \in \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \sum_ {t = 1} ^ {T} V ({\bf b} ^ {\prime \prime} ; \boldsymbol {\beta} _ {-} ^ {t})}{\max _ {{\bf b} \in \mathcal {U} _ {m} ^ {\star}} \sum_ {t = 1} ^ {T} V ({\bf b} ; \boldsymbol {\beta} _ {-} ^ {t})} \\ = \Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}} \cdot \Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {*}} \leq \frac {2 m ^ {\prime}}{m}. \\ \end{array} +$$ + +# D. Tight Lower Bounds for Results in Section 5 + +# D.1. Tight Lower Bound for Theorem 5.3 (For $m = 1$ ) + +In this section, we construct a bid history, $\mathcal{H}_{-}$ and valuation curve $\mathbf{v}$ (equivalently the $\mathcal{U}_m^{\star}$ ) for which the upper bound on $\Lambda_{\mathcal{F}_m^{\mathcal{H}_{-}},\mathcal{U}_m^{\star}}$ , presented in Theorem 5.3, is tight. Recall that for any choice of $\mathcal{H}_{-}$ , $\Lambda_{\mathcal{F}_m^{\mathcal{H}_{-}},\mathcal{U}_m^{\star}}(\mathcal{H}_{-}) \leq 2 - \theta_{\mathcal{H}_{-}}$ , where $\theta_{\mathcal{H}_{-}} \leq \max_{j \in [m]} (W_{\widehat{Q}_j} / W_{Q_j^*})$ . To minimize $\theta_{\mathcal{H}_{-}}$ , we choose a valuation curve that is very weakly decreasing. We then set the competing bids such that $\widehat{Q}_j \ll Q_j^*$ for all $j \in [m]$ . Finally, we determine the values of $|T_{j,0}|$ and $|T_{j,1}|$ for which the upper bound is tight. See the definition of these quantities in Appendix C.1, where the first part of the theorem is proven. + +We present the case when $m = 1$ below. The case for $m \geq 2$ is deferred to Appendix D.2. Although the main idea for both the cases are the same, for $m \geq 2$ , the construction is more involved, and hence presented separately. Formally, for any $\delta \in (0,1/2]$ , we design a bid history, $\mathcal{H}_{-}$ , and valuation vector, $\mathbf{v}$ for which $\Lambda_{\mathcal{F}_1^{\mathcal{H}_{-}},\mathcal{U}_1^\star}(\mathcal{H}_{-},\mathbf{v}) \geq 2 - \delta$ . + +Let $M = 2\left\lceil \frac{1}{\delta} \right\rceil$ . Suppose $\mathbf{v} = [1, v, \dots, v] \in \mathbb{R}^M$ , target RoI $\gamma = 0$ and $v = 1 - 4\epsilon$ where $\epsilon = \frac{\delta - 1 / M}{4(1 - 1 / M)} < \frac{\delta}{4}$ . Observe that $\epsilon \in (0, 1/8)$ as $\delta \leq 1/2$ . Let $T = M$ and $K = M + 1$ . The bid history is defined as: + +$$ +\beta_ {-, t} ^ {- (j)} = \left\{ \begin{array}{l l} 1 - \epsilon , & \text {i f} t \leq M - 1 \text {a n d} j = 1 \\ C, & \text {i f} t \leq M - 1 \text {a n d} 2 \leq j \leq K \\ \epsilon , & \text {i f} t = M \text {a n d} 1 \leq j \leq K \end{array} \right., +$$ + +where $C \gg w_{1}$ . The bid history is presented in Table 1. + +Table 1. Bid history for tight lower bound for $m = 1$ . Here, $C \gg 1$ and $\epsilon > 0$ is a small real number. + +
t=1t=2···t=M-1t=M
CC···Cε
::...::
CC···C:
1-ε1-ε···1-εε
+ +Notice that the constructed $\mathcal{H}_{-}$ contains $M - 1$ rounds with high competition (where the bidder can acquire at most 1 unit), while there is one round with minimal competition, allowing the bidder to obtain any desired number of units. The + +1-uniform safe bidding strategies of the form $(w_{q}, q)$ do not perform well universally on all rounds because with increase in $q$ , despite the increasing demand (i.e., $q$ ), the bid value $w_{q}$ decreases, thereby reducing the likelihood of acquiring any units. + +Notations. For a given bid history $\mathcal{H}_{-}$ , recall that for any $m\in \mathbb{N}$ , $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-) = \operatorname*{argmax}_{\mathbf{b}\in \mathcal{F}_m^{\mathcal{H}_-}}\sum_{t = 1}^T V(\mathbf{b};\beta_-^t)$ . We define $V_{m}^{\mathrm{OPT}}(\mathcal{H}_{-}) = \sum_{t = 1}^{T}V(\mathbf{b}_{m}^{\mathrm{OPT}}(\mathcal{H}_{-});\beta_{-}^{t})$ , the value obtained by $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-$ ) over the bid history $\mathcal{H}_{-}$ . Similarly, $\mathbf{b}_{m}^{\mathrm{SAFE}}(\mathcal{H}_{-}):= \operatorname*{argmax}_{\mathbf{b}\in \mathcal{U}_{m}^{\star}}\sum_{t = 1}^{T}V(\mathbf{b};\beta_{-}^{t})$ and $V_{m}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = \sum_{t = 1}^{T}V(\mathbf{b}_{m}^{\mathrm{SAFE}}(\mathcal{H}_{-});\beta_{-}^{t})$ . + +Computing the optimal strategy in $\mathcal{F}_1^{\mathcal{H}_{-}}$ . We observe that no bidding strategy in $\mathcal{F}_1^{\mathcal{H}_{-}}$ can obtain more than 1 unit in the first $M - 1$ rounds and $M$ units in the final round. + +We claim that $\mathbf{b}_1^{\mathrm{OPT}}(\mathcal{H}_-) = (1,M)$ . Observe that $\mathbf{b}_1^{\mathrm{OPT}}(\mathcal{H}_-)$ is allocated 1 unit in each of the first $M - 1$ rounds and $M$ units in the final round. Hence, it is allocated the maximum number of units possible. To verify that $\mathbf{b}_1^{\mathrm{OPT}}(\mathcal{H}_-)$ is feasible for the bid history, notice that for $\forall t\in [M - 1],p(\beta^{t}) = 1\leq w_{1} = 1$ . For round $t = M$ , as $K > M$ , + +$$ +p (\boldsymbol {\beta} ^ {t}) = \epsilon \leq 1 - 4 \epsilon < w _ {M} = \mu \cdot 1 + (1 - \mu) \cdot (1 - 4 \epsilon), \quad \text {w h e r e} \quad \mu = \frac {1}{M}, +$$ + +implying that RoI constraint is satisfied by $\mathbf{b}_1^{\mathrm{OPT}}(\mathcal{H}_-)$ in round $t = T$ . So, $V_1^{\mathrm{OPT}}(\mathcal{H}_-) = M + v(M - 1)$ . + +Computing the optimal strategy in $\mathcal{U}_1^\star$ . Here, we argue that the optimal strategy in $\mathcal{U}_1^\star$ is $(w_1, 1) = (1, 1)$ . Observe that the strategy $(1, 1)$ is allocated 1 unit in each round. Hence, it obtains a total value of $M$ . + +As $\beta_{-,t}^{-(1)} = 1 - \epsilon > 1 - 2\epsilon = w_2$ , for $t = 1,2,\ldots,M-1$ , bidding $(w_q,q)$ for $q \geq 2$ does not get any value in the first $M-1$ rounds. Bidding $(w_q,q)$ gets exactly $q$ units in round $M$ as $w_q > \epsilon$ for any $q \geq 2$ . So, for $2 \leq q \leq M$ , the total value obtained by bidding $(w_q,q)$ is $1 + (q-1)v < q$ . Hence, $V_1^{\text{SAFE}}(\mathcal{H}_-) = M$ , which is the value obtained by the safe strategy $(w_1,1) = (1,1)$ . So, + +$$ +\Lambda_ {\mathcal {F} _ {1} ^ {\mathcal {H} _ {-}}; \mathcal {U} _ {1} ^ {*}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {V _ {1} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{V _ {1} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})} = \frac {M + v (M - 1)}{M} = \frac {2 M - 1 - 4 \epsilon (M - 1)}{M} = 2 - \delta . +$$ + +# D.2. Tight Lower Bound for Theorem 5.3 (For $m \geq 2$ ) + +In this section, we design a bid history $\mathcal{H}_{-}$ and valuation vector, $\mathbf{v}$ such that for any $\delta \in (0,1 / 2],\Lambda_{\mathcal{F}_m^{\mathcal{H}^-},\mathcal{U}_m^*}(\mathcal{H}_-, \mathbf{v})\geq 2 - \delta$ By definition, for any $\mathcal{H}_{-}$ and $m\geq 2$ + +$$ +\Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {*}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {V _ {m} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{V _ {m} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})} \geq \frac {V _ {m} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{m V _ {1} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})}, \tag {46} +$$ + +where the second inequality follows because $\Lambda_{\mathcal{U}_m^{\star},\mathcal{U}_1^{\star}}\leq m$ (by Theorem 5.4). So, instead of computing $V_{m}^{\mathrm{SAFE}}(\mathcal{H}_{-})$ directly which requires solving a DP, we obtain $V_{1}^{\mathrm{SAFE}}(\mathcal{H}_{-})$ and show that the bound is tight. + +# D.2.1. CONSTRUCTION OF $\mathcal{H}_{-}$ + +We first decide all the parameters. + +Fix $m\geq 2$ and any integer $N\geq 2\left\lceil \frac{1}{\delta}\right\rceil$ +- Let $M = N^{2m - 1}$ . Consider $T = N^{2m - 1}$ rounds and $K = N^{2m - 1} + 1$ units in each auction. +- Let $\epsilon' = \frac{m\delta/(2m-1) - 1/N}{2(1-1/N)} < \frac{\delta}{2} \leq \frac{1}{4}$ . Set $\epsilon$ such that $\epsilon' = \epsilon N^{2m-1}(N^{2m-1} + 1)$ . + +Consider a valuation vector $\mathbf{v} = [1, v, \dots, v]$ such that $v = 1 - 2\epsilon'$ , and target RoI $\gamma = 0$ . Partition the $N^{2m-1}$ rounds into $2m$ partitions such that the first partition has 1 round and the $j^{th}$ partition has $N^{j-1} - N^{j-2}$ rounds for $2 \leq j \leq 2m$ . Each partition has identical competing bid profile submitted by other bidders. In particular, + +1. The first partition (containing one round) has all the bids submitted by others as $w_{N^{2m-1}+1} + \epsilon$ . + +2. If $j > 1$ and $j$ is odd, for the $j^{th}$ partition (of size $N^{j-1} - N^{j-2}$ ), the smallest $N^{2m-j} + 1$ winning competing bids are $w_{N^{2m-j}+1} + \epsilon$ and the remaining bids are $C \gg w_1$ . +3. If $j > 1$ and $j$ is even, for the $j^{th}$ partition (of size $N^{j-1} - N^{j-2}$ ), the smallest $N^{2m-j}$ winning competing bids are $w_{N^{2m-j}+1} + \epsilon$ and the remaining bids are $C \gg w_1$ . + +We present an example for such a bid history in Table 2. + +Table 2. Bid history achieving tight lower bound for $m = 2$ . Each round in the same partition has identical competing bid profile. Total number of units in each auction is $K = N^3 + 1$ . + +
Partition 1 +t=1Partition 2 +t∈[2,N]Partition 3 +t∈[N+1,N2]Partition 4 +t∈[N2+1,N3]
0 bids are C +N3+1 bids are wN3+1+εN3-N2+1 bids are C +N2bids are wN2+1+εN3-Nbids are C +N+1bids are wN+1+εN3bids are C +1 bid is w2+ε
+ +# D.2.2. COMPUTING $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ + +We make the following claim about the optimal $m$ -uniform bidding strategy for the constructed $\mathcal{H}_{-}$ . + +Lemma D.1. For the aforementioned $\mathcal{H}_{-}$ , $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-) = \langle (b_1, q_1), \ldots, (b_m, q_m) \rangle$ where + +$$ +\left(b _ {j}, q _ {j}\right) = \left\{ \begin{array}{l l} (1, N), & \text {i f} j = 1 \\ \left(w _ {N ^ {2 j - 2}}, N ^ {2 j - 1} - N ^ {2 j - 3}\right), & \text {i f} 2 \leq j \leq m. \end{array} \right. \tag {47} +$$ + +Furthermore, + +$$ +V _ {m} ^ {\mathsf {O P T}} (\mathcal {H} _ {-}) = N ^ {2 m - 1} + (2 m - 1) (N ^ {2 m - 1} - N ^ {2 m - 2}) v. +$$ + +Proof. We begin by a crucial observation that the bid history does not allow obtaining more than $N^{2m - j}$ units in the $j^{th}$ partition while satisfying the RoI constraint, irrespective of the number of bids submitted by the bidder. To verify this, note that, the maximum number of units that can be allocated to any bidding strategy in the $j^{th}$ partition is either $N^{2m - j}$ or $N^{2m - j} + 1$ (depending on if $j$ is even or odd). Suppose contrary to our claim, the bidder is allocated $N^{2m - j} + 1$ units in the same round $t$ in the $j^{th}$ partition by bidding some b. Let $\beta^t = (\mathbf{b},\beta_-^t)$ be the complete bid profile. So, $p(\beta^t)\geq w_{N^{2m - j} + 1} + \epsilon$ but $x(\beta^t) = N^{2m - j} + 1$ indicating that the RoI constraint is violated, which verifies our claim. + +So, the total number of units, $N_{\mathrm{total}}$ , that can be obtained by the bidder over all the rounds is: + +$$ +N _ {\mathrm {t o t a l}} \leq N ^ {2 m - 1} + \sum_ {j = 2} ^ {2 m} N ^ {2 m - j} (N ^ {j - 1} - N ^ {j - 2}) = 2 m N ^ {2 m - 1} - (2 m - 1) N ^ {2 m - 2} =: N _ {\max}. +$$ + +Now, we compute the number of units obtained by bidding $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ and show that it is allocated $N_{\mathrm{max}}$ units for the constructed bid history, demonstrating that it is the optimal bidding strategy. + +Consider any auction in the $j^{th}$ partition. The lowest winning bid in the bid profile is $w_{N^{2m-j+1}} + \epsilon$ . Note that the unique bid values (ignoring the quantity for the sake of brevity) in $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ are $\mathbf{b} = \{1, w_{N^2}, \ldots, w_{N^{2m-2}}\}$ . We claim that the winning bid values of $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ in the $j^{th}$ partition are $\widehat{\mathbf{b}} = \{1, w_{N^2}, \ldots, w_{N^{2m+2\lfloor -j/2\rfloor}}\}$ . This is true because the least bid value in $\widehat{\mathbf{b}}$ is greater than $w_{N^{m-j+1}} + \epsilon$ , i.e., + +$$ +\begin{array}{l} w _ {N ^ {2 m + 2 \lfloor - j / 2 \rfloor}} - (w _ {N ^ {2 m - j} + 1} + \epsilon) \geq w _ {N ^ {2 m - j}} - (w _ {N ^ {2 m - j} + 1} + \epsilon) \\ = \frac {1 - v}{N ^ {2 m - j} (N ^ {2 m - j} + 1)} - \epsilon = \frac {2 \epsilon N ^ {2 m - 1} (N ^ {2 m - 1} + 1)}{N ^ {2 m - j} (N ^ {2 m - j} + 1)} - \epsilon \geq \epsilon > 0. \\ \end{array} +$$ + +Let $N_{j}$ denote the number of units allocated to $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ in each auction in the $j^{th}$ partition. There are two cases: + +(a) for $j$ odd, recall that for the $j^{th}$ partition (of size $N^{j - 1} - N^{j - 2}$ ), the smallest $N^{2m - j} + 1$ winning competing bids are $w_{N^{2m - j} + 1} + \epsilon$ and the remaining bids are $C\gg w_{1}$ . Then, + +$$ +N _ {j} = N + \sum_ {\ell = 2} ^ {m - \frac {j - 1}{2}} (N ^ {2 \ell - 1} - N ^ {2 \ell - 3}) = N ^ {2 m - j}. +$$ + +(b) For $j$ even, recall that for the $j^{th}$ partition (of size $N^{j-1} - N^{j-2}$ ), the smallest $N^{2m-j}$ winning competing bids are $w_{N^{2m-j+1}} + \epsilon$ and the remaining bids are $C \gg w_1$ . + +$$ +N _ {j} = \min \left\{N ^ {2 m - j}, N + \sum_ {\ell = 2} ^ {m + 1 - \frac {j}{2}} (N ^ {2 \ell - 1} - N ^ {2 \ell - 3}) \right\} = \min \{N ^ {2 m - j}, N ^ {2 m - j + 1} \} = N ^ {2 m - j}. +$$ + +Here, the minimum is taken over two quantities where the first quantity is the number of competing bids less than $C$ in any round $t$ in the $j^{th}$ partition and the second quantity represents the total demand of the winning bids in $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_{-})$ for that round. So, the total number of units obtained across all rounds is + +$$ +N ^ {2 m - 1} + \sum_ {j = 2} ^ {2 m} N ^ {2 m - j} (N ^ {j - 1} - N ^ {j - 2}) = 2 m N ^ {2 m - 1} - (2 m - 1) N ^ {2 m - 2}. +$$ + +As this is the maximum number of units that can be obtained by the bidder, $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ is optimal. The total value obtained by bidding $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-)$ is + +$$ +\begin{array}{l} V _ {m} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right) = 1 + (N ^ {2 m - 1} - 1) v + \sum_ {j = 2} ^ {2 m} (N ^ {j - 1} - N ^ {j - 2}) (1 + (N ^ {2 m - j} - 1) v) \\ = N ^ {2 m - 1} + (2 m - 1) \left(N ^ {2 m - 1} - N ^ {2 m - 2}\right) v. \\ \end{array} +$$ + +![](images/4438d5d5ad990d46f25df0e7ad788a4e37a96b0a2fe9015bf94073cf55d02b24.jpg) + +# D.2.3. COMPUTING $V_{1}^{\mathrm{SAFE}}(\mathcal{H}_{-})$ + +Recall that we compute $V_{1}^{\text{SAFE}}(\mathcal{H}_{-})$ and invoke the bounds on $\Lambda_{\mathcal{U}_m^{\star},\mathcal{U}_1^{\star}}$ , instead of directly evaluating $V_{m}^{\text{SAFE}}(\mathcal{H}_{-})$ . + +Lemma D.2. For the aforementioned $\mathcal{H}_{-}$ , $\mathbf{b}_1^{\mathrm{SAFE}}(\mathcal{H}_-) = (1,1)$ and $V_{1}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = N^{2m - 1}$ . + +Proof. The basic idea is to enumerate the total units (value) that can be obtained by bidding $(w_q, q)$ for $q \in [N^{2m-1}]$ and then finding the maximum of those values. As $q$ can be exponential in $m$ , we exploit the structure of the bid history to compute the objective in an efficient manner. + +Suppose $q = 1$ . The maximum number of units (value) that can be obtained by bidding (1, 1) is trivially $N^{2m - 1}$ , So, (1, 1) obtains a total value $N^{2m - 1}$ . + +Suppose $q \geq 2$ . Furthermore, assume $N^{2m - j} < q \leq N^{2m - j + 1}$ , for some $2 \leq j \leq 2m$ . Consider any bid of the form $(w_q, q)$ . Bidding $(w_q, q)$ does not obtain any units in the partitions indexed by $j, j + 1, \ldots, 2m$ as $w_q$ is strictly less than the least winning competing bids in those partitions, i.e., $w_q \leq w_{N^{2m - j} + 1} < w_{N^{2m - \ell} + 1} + \epsilon$ , for any $\ell \in \{j, j + 1, \ldots, 2m\}$ . So, if $N^{2m - j} < q \leq N^{2m - j + 1}$ , $(w_q, q)$ gets no units in + +$$ +\sum_ {\ell = j} ^ {2 m} N ^ {\ell - 1} - N ^ {\ell - 2} = N ^ {2 m - 1} - N ^ {j - 2} \text {a u c t i o n s}. +$$ + +In the remaining $N^{j - 2}$ auctions it can win at most $q$ units. So, the maximum value obtained by $(w_{q}, q)$ for any $q \geq 2$ is + +$$ +N ^ {j - 2} (1 + (q - 1) v) \le N ^ {j - 2} (1 + (N ^ {2 m - j + 1} - 1) v) = N ^ {j - 2} + (N ^ {2 m - 1} - N ^ {j - 2}) v < N ^ {2 m - 1}, +$$ + +where the last inequality holds as $v < 1$ . Hence, $\mathbf{b}_1^{\mathrm{SAFE}}(\mathcal{H}_-) = (1,1)$ and $V_{1}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = N^{2m - 1}$ . + +Hence, from Lemma D.1, Lemma D.2 and Eq. (46) + +$$ +\begin{array}{l} \Lambda_ {\mathcal {F} _ {m} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}) \geq \frac {V _ {m} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{m V _ {1} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})} = \frac {N ^ {2 m - 1} + (2 m - 1) (N ^ {2 m - 1} - N ^ {2 m - 2}) v}{m N ^ {2 m - 1}} \\ = \frac {2 m N ^ {2 m - 1} - (2 m - 1) N ^ {2 m - 2} - 2 \epsilon^ {\prime} (2 m - 1) \left(N ^ {2 m - 1} - N ^ {2 m - 2}\right)}{m N ^ {2 m - 1}} \\ = 2 - \frac {2 m - 1}{m} \left(\frac {1}{\bar {N}} + 2 \epsilon^ {\prime} \left(1 - \frac {1}{\bar {N}}\right)\right) \\ = 2 - \delta , \\ \end{array} +$$ + +where the last step follows by substituting the value of $\epsilon^{\prime}$ and thus concludes the proof. + +# D.3. Tight Lower Bound for Theorem 5.4 + +In this section, we construct a bid history $\mathcal{H}_{-}$ and valuation vector, $\mathbf{v}$ such that for any $\delta \in (0,\frac{1}{2} ],\Lambda_{\mathcal{U}_{m^{\prime}}^{\star},\mathcal{U}_{m}^{\star}}(\mathcal{H}_{-},\mathbf{v})\geq \frac{m^{\prime}}{m} -\delta$ i.e., the upper bound is tight for $m^{\prime}\geq m + 1$ (If $m^{\prime} = m$ $\Lambda_{\mathcal{U}_{m^{\prime}}^{\star},\mathcal{U}_{m}^{\star}} = 1$ implying the bound is tight). + +Recall that Theorem 5.4 states that $\Lambda_{\mathcal{U}_{m}^{\prime},\mathcal{U}_{1}^{\prime}}\leq m$ for any $m\geq 1$ . So, + +$$ +\Lambda_ {\mathcal {U} _ {m ^ {\prime}} ^ {\star}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {V _ {m ^ {\prime}} ^ {\text {S A F E}} (\mathcal {H} _ {-})}{V _ {m} ^ {\text {S A F E}} (\mathcal {H} _ {-})} \geq \frac {V _ {m ^ {\prime}} ^ {\text {S A F E}} (\mathcal {H} _ {-})}{m V _ {1} ^ {\text {S A F E}} (\mathcal {H} _ {-})} = \frac {1}{m} \cdot \Lambda_ {\mathcal {U} _ {m ^ {\prime}} ^ {\star}, \mathcal {U} _ {1} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}). \tag {48} +$$ + +We now establish a lower bound on $\Lambda_{\mathcal{U}_{m^{\prime}}^{\star},\mathcal{U}_{1}^{\star}}(\mathcal{H}_{-},\mathbf{v})$ + +# D.3.1. CONSTRUCTION OF $\mathcal{H}_{-}$ + +We first decide all the parameters. + +Fix $m^{\prime}\geq 2$ and any integer $N\geq \left\lceil \frac{m^{\prime}}{\delta}\right\rceil$ +- Let $M = N^{m' - 1}$ . Consider $T = N^{m' - 1}$ rounds and $K = N^{m' - 1}$ units in each auction. +- Let $\epsilon' = \frac{m\delta / (m' - 1) - 1 / N}{2(1 - 1 / N)} < \frac{m\delta}{2(m' - 1)} \leq \frac{1}{4}$ . Set $\epsilon$ such that $\epsilon' = \epsilon N^{m' - 1}(N^{m' - 1} + 1)$ . + +Let the valuation vector be $\mathbf{v} = [1, v, \dots, v]$ such that $v = 1 - 2\epsilon'$ , and target RoI, $\gamma = 0$ . Partition the $N^{m' - 1}$ rounds into $m'$ partitions such that the first partition has 1 round and the $j^{th}$ partition has $N^{j - 1} - N^{j - 2}$ rounds for $2 \leq j \leq m'$ . Each partition has identical competing bid profile submitted by the other bidders. In particular, + +1. The first partition (containing one round) has all the competing bids to be $w_{N^{m'} - 1 + 1} + \epsilon$ . +2. For $2 \leq j \leq m'$ , the $j^{th}$ partition (of size $N^{j-1} - N^{j-2}$ ); the smallest $N^{m'-j} + 1$ competing winning bids are $w_{N^{m'} - j + 1} + \epsilon$ and the remaining bids are $C \gg w_1$ . + +We present an example for such a bid history in Table 3. + +Table 3. Bid history attaining tight lower bound for $m' = 4$ (and $m = 1$ ). Each round in the same partition has identical competing bid profile. Total number of units in each auction is $K = N^3$ . + +
Partition 1 +t = 1Partition 2 +t ∈ [2, N]Partition 3 +t ∈ [N + 1, N²]Partition 4 +t ∈ [N² + 1, N³]
0 bids are CN³ - N² - 1 bids are CN³ - N - 1 bids are CN³ - 2 bids are C
N³ bids are wN³+1 + εN² + 1 bids are wN²+1 + εN + 1 bids are wN+1 + ε2 bids are w2 + ε
+ +# D.3.2. COMPUTING $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-$ + +We make the following claim about the optimal $m^{\prime}$ -uniform safe bidding strategy for $\mathcal{H}_{-}$ . + +Lemma D.3. For the aforementioned $\mathcal{H}_{-}$ , $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = \langle (b_1, q_1), \ldots, (b_m', q_m') \rangle$ where + +$$ +\left(b _ {j}, q _ {j}\right) = \left\{ \begin{array}{l l} (1, 1), & \text {i f} j = 1 \\ \left(w _ {N ^ {j - 1}}, N ^ {j - 1} - N ^ {j - 2}\right), & \text {i f} 2 \leq j \leq m ^ {\prime} \end{array} . \right. \tag {49} +$$ + +Furthermore, + +$$ +V _ {m ^ {\prime}} ^ {\text {S A F E}} \left(\mathcal {H} _ {-}\right) = N ^ {m ^ {\prime} - 1} + (m ^ {\prime} - 1) \left(N ^ {m ^ {\prime} - 1} - N ^ {m ^ {\prime} - 2}\right) v. +$$ + +Proof. We begin by a crucial observation that the bid history does not allow obtaining more than $N^{m' - j}$ units in the $j^{th}$ partition, while satisfying the RoI constraint, irrespective of the number of bids submitted by the bidder. To verify this, suppose contrary to our claim, that the bidder is allocated $N^{m' - j} + 1$ units in the some round $t$ in the $j^{th}$ partition by bidding some b. Let $\beta^t = (\mathbf{b},\beta_-^t)$ be the complete bid profile. Hence, $p(\beta^t)\geq w_{N^{m'} - j + 1} + \epsilon$ but $x(\beta^t) = N^{m' - j} + 1$ indicating that the RoI constraint is violated which verifies our claim. + +So, the total number of units, $N_{\mathrm{total}}$ , that can be obtained by the bidder across all the rounds is: + +$$ +N _ {\text {t o t a l}} \leq N ^ {m ^ {\prime} - 1} + \sum_ {j = 2} ^ {m ^ {\prime}} N ^ {m ^ {\prime} - j} (N ^ {j - 1} - N ^ {j - 2}) = m ^ {\prime} N ^ {m ^ {\prime} - 1} - (m ^ {\prime} - 1) N ^ {m ^ {\prime} - 2} := N _ {\max}. +$$ + +Now, we compute the number of units obtained by bidding $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-$ ) and show that it is allocated $N_{\mathrm{max}}$ units across all the auctions, implying that it is the optimal bidding strategy. + +To show $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-)$ is optimal, consider any auction in the $j^{th}$ partition. The lowest winning competing bid is $w_{N^{m' - j + 1} + \epsilon}$ . Note that the unique bid values (ignoring the quantity for the sake of brevity) in $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-)$ , provided in Eq. (49), are $\mathbf{b} = \{1, w_N, \ldots, w_{N^{m' - 1}}\}$ . We claim that the winning bid values of $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-)$ in the $j^{th}$ partition are $\widetilde{\mathbf{b}} = \{1, w_N, \ldots, w_{N^{m' - j}}\}$ . Again recall that for $2 \leq j \leq m'$ , for the $j^{th}$ partition (of size $N^{j - 1} - N^{j - 2}$ ), the smallest $N^{m' - j} + 1$ competing winning bids are $w_{N^{m' - j + 1}} + \epsilon$ and the remaining bids are $C \gg w_1$ . And here, the least bid value in $\widetilde{\mathbf{b}}$ is greater than $w_{N^{m' - j + 1}} + \epsilon$ , i.e., + +$$ +w _ {N ^ {m ^ {\prime} - j}} - \left(w _ {N ^ {m ^ {\prime} - j} + 1} + \epsilon\right) = \frac {1 - v}{N ^ {m ^ {\prime} - j} \left(N ^ {m ^ {\prime} - j} + 1\right)} - \epsilon = \frac {2 \epsilon N ^ {m ^ {\prime} - 1} \left(N ^ {m ^ {\prime} - 1} + 1\right)}{N ^ {m ^ {\prime} - j} \left(N ^ {m ^ {\prime} - j} + 1\right)} - \epsilon \geq \epsilon > 0. +$$ + +Moreover, observe that the bidder is allocated the maximum number of units demanded for each of the bid value in $\widetilde{\mathbf{b}}$ . So, the number of units in each auction in the $j^{th}$ partition by bidding $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-$ ) is + +$$ +N _ {j} = 1 + \sum_ {\ell = 2} ^ {m ^ {\prime} - j + 1} \left(N ^ {\ell - 1} - N ^ {\ell - 2}\right) = N ^ {m ^ {\prime} - j}. +$$ + +Hence, the total number of units obtained across all rounds is + +$$ +N ^ {m ^ {\prime} - 1} + \sum_ {j = 2} ^ {m ^ {\prime}} N ^ {m ^ {\prime} - j} (N ^ {j - 1} - N ^ {j - 2}) = m ^ {\prime} N ^ {m ^ {\prime} - 1} - (m ^ {\prime} - 1) N ^ {m ^ {\prime} - 2} = N _ {\max}. +$$ + +As this is the maximum number of units that can be obtained by the bidder, $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-$ ) is optimal. The total value obtained by bidding $\mathbf{b}_{m'}^{\mathrm{SAFE}}(\mathcal{H}_-$ ) is given by + +$$ +\begin{array}{l} V _ {m ^ {\prime}} ^ {\text {S A F E}} \left(\mathcal {H} _ {-}\right) = 1 + \left(N ^ {m ^ {\prime} - 1} - 1\right) v + \sum_ {j = 2} ^ {m ^ {\prime}} \left(N ^ {j - 1} - N ^ {j - 2}\right) \left(1 + \left(N ^ {m ^ {\prime} - j} - 1\right) v\right) \\ = N ^ {m ^ {\prime} - 1} + (m ^ {\prime} - 1) \left(N ^ {m ^ {\prime} - 1} - N ^ {m ^ {\prime} - 2}\right) v. \\ \end{array} +$$ + +![](images/429a9fb944738003c08567a6b4d6121920c472d35b1484ad519c26d98e110207.jpg) + +# D.3.3. COMPUTING $\mathbf{b}_1^{\mathrm{SAFE}}(\mathcal{H}_{-})$ + +In this section, we compute the optimal 1-uniform safe bidding strategy for the bid history, $\mathcal{H}_{-}$ . + +Lemma D.4. For the constructed $\mathcal{H}_{-}$ , $\mathbf{b}_1^{\mathrm{SAFE}}(\mathcal{H}_-) = (1,1)$ and $V_{1}^{\mathrm{SAFE}}(\mathcal{H}_{-}) = N^{m - 1}$ . + +Proof. The proof is similar to that of Lemma D.2 in the sense that it involves enumerating the total units obtaining by submitting $(w_q, q)$ for all $q \in [N^{m-1}]$ in an efficient manner by leveraging the structure in the bid history. + +Substituting values from Lemma D.3, Lemma D.4 and Eq. (48) + +$$ +\begin{array}{l} \Lambda_ {\mathcal {U} _ {m ^ {\prime}} ^ {*}, \mathcal {U} _ {m} ^ {*}} (\mathcal {H} _ {-}, \mathbf {v}) \geq \frac {1}{m} \cdot \Lambda_ {\mathcal {U} _ {m ^ {\prime}} ^ {*}, \mathcal {U} _ {1} ^ {*}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {V _ {m ^ {\prime}} ^ {\text {S A F E}} (\mathcal {H} _ {-})}{m V _ {1} ^ {\text {S A F E}} (\mathcal {H} _ {-})} \\ = \frac {N ^ {m ^ {\prime} - 1} + (m ^ {\prime} - 1) (N ^ {m ^ {\prime} - 1} - N ^ {m ^ {\prime} - 2}) v}{m N ^ {m ^ {\prime} - 1}} \\ = \frac {m ^ {\prime} N ^ {m ^ {\prime} - 1} - (m ^ {\prime} - 1) N ^ {m ^ {\prime} - 2} - 2 \epsilon^ {\prime} (m ^ {\prime} - 1) \left(N ^ {m ^ {\prime} - 1} - N ^ {m ^ {\prime} - 2}\right)}{m N ^ {m ^ {\prime} - 1}} \\ = \frac {m ^ {\prime}}{m} - \frac {(m ^ {\prime} - 1)}{m} \left(\frac {1}{N} + 2 \epsilon^ {\prime} \left(1 - \frac {1}{N}\right)\right) \\ = \frac {m ^ {\prime}}{m} - \delta , \\ \end{array} +$$ + +where the last step follows by substituting the value of $\epsilon^{\prime}$ and thus concludes the proof. + +Corollary D.5. As $\mathcal{U}_m^{\star} \subseteq \mathcal{F}_m^{\mathcal{H}_{-}}$ for all $m \in \mathbb{N}$ , the upper bound in Theorem C.6 is also tight, i.e., for any $m' \geq m$ and $\delta \in (0, \frac{1}{2}]$ , there exists a bid history $\mathcal{H}_{-}$ and valuation curve $\mathbf{v}$ such that $\Lambda_{\mathcal{F}_{m'}, \mathcal{F}_m^{\mathcal{H}_{-}}}(\mathcal{H}_{-}, \mathbf{v}) \geq \frac{m'}{m} - \delta$ . + +# D.4. Tight Lower Bound for Theorem 5.5 + +In this section, we present a bid history $\mathcal{H}_{-}$ and valuation vector, $\mathbf{v}$ such that for any $\delta \in (0,\frac{1}{2} ],\Lambda_{\mathcal{F}_{m^{\prime}}^{\mathcal{H}_{-}},\mathcal{U}_{m}^{\star}}(\mathcal{H}_{-},\mathbf{v})\geq \frac{2m^{\prime}}{m} -\delta$ i.e., the upper bound is tight for $m^{\prime}\geq m$ + +Recall that Theorem 5.4 states that $\Lambda_{\mathcal{U}_m^*,\mathcal{U}_1^*}\leq m$ for any $m\geq 1$ . So, + +$$ +\Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {V _ {m ^ {\prime}} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{V _ {m} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})} \geq \frac {V _ {m ^ {\prime}} ^ {\mathrm {O P T}} (\mathcal {H} _ {-})}{m V _ {1} ^ {\mathrm {S A F E}} (\mathcal {H} _ {-})} = \frac {1}{m} \cdot \Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {1} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}). \tag {50} +$$ + +Recall that for showing tightness of the bound for Theorem 5.3 for any $m \geq 2$ , we computed a lower bound on $\Lambda_{\mathcal{F}_m^{\mathcal{H}_-}, \mathcal{U}_1^\star}(\mathcal{H}_-, \mathbf{v})$ (cf. Eq. (46)). Thus, we consider a valuation curve and a bid history that has a structure identical to the one presented in Appendix D.2 but with the following modified parameters, + +Fix $m^{\prime}\geq 1$ and any integer $N\geq 2\left\lceil \frac{2m^{\prime}}{\delta}\right\rceil$ +- Let $M = N^{2m' - 1}$ . Consider $T = N^{2m' - 1}$ rounds and $K = N^{2m' - 1} + 1$ units in each auction. +- Let $\epsilon' = \frac{m\delta/(2m' - 1) - 1/N}{2(1 - 1/N)} < \frac{m\delta}{2(2m' - 1)} \leq \frac{1}{4}$ . Set $\epsilon$ such that $\epsilon' = \epsilon N^{2m' - 1}(N^{2m' - 1} + 1)$ . + +Consider a valuation vector $\mathbf{v} = [1, v, \dots, v]$ such that $v = 1 - 2\epsilon'$ , and target RoI $\gamma = 0$ . Substituting the values from Lemma D.1 and Lemma D.2, + +$$ +\begin{array}{l} \Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {m} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}) \geq \frac {1}{m} \cdot \Lambda_ {\mathcal {F} _ {m ^ {\prime}} ^ {\mathcal {H} _ {-}}, \mathcal {U} _ {1} ^ {\star}} (\mathcal {H} _ {-}, \mathbf {v}) = \frac {N ^ {2 m ^ {\prime} - 1} + (2 m ^ {\prime} - 1) (N ^ {2 m ^ {\prime} - 1} - N ^ {2 m ^ {\prime} - 2}) v}{m N ^ {2 m ^ {\prime} - 1}} \\ = \frac {2 m ^ {\prime} N ^ {2 m ^ {\prime} - 1} - (2 m ^ {\prime} - 1) N ^ {2 m ^ {\prime} - 2} - 2 \epsilon^ {\prime} (2 m ^ {\prime} - 1) \left(N ^ {2 m ^ {\prime} - 1} - N ^ {2 m ^ {\prime} - 2}\right)}{m N ^ {2 m ^ {\prime} - 1}} \\ = \frac {2 m ^ {\prime}}{m} - \frac {(2 m ^ {\prime} - 1)}{m} \left(\frac {1}{N} + 2 \epsilon^ {\prime} \left(1 - \frac {1}{N}\right)\right) \\ \end{array} +$$ + +$$ += \frac {2 m ^ {\prime}}{m} - \delta , +$$ + +where the last step follows by substituting the value of $\epsilon^{\prime}$ and thus concludes the proof. + +# E. Simulation Details + +In Section 5.3, we conducted numerical experiments to estimate the richness ratio (or equivalently $\Lambda_{\mathcal{B}_c,\mathcal{U}_m^*}$ ) in practice for the classes of bidding strategies discussed earlier. We now discuss a few details regarding the same. + +Dataset. We estimate the richness ratio for the EU ETS emission permit auction data for 2022 and 2023. However, only aggregate statistics of the submitted bids is publicly available for privacy reasons. Hence, we synthesize individual level bid data from these available statistics. The exact procedure to reconstruct the bid data is presented in Appendix E.1. We sample the values from the Unif[0,1] distribution. In each simulation, we sample $T \sim \mathrm{Unif}[100,300]$ auctions and let $M \sim \mathrm{Unif}[10,80]$ . We vary $m = 1$ to $m = 10$ and average over 100 simulations to obtain plots in Fig. 4. As computing $V_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ (the value obtained by the optimal bidding strategy in $\mathcal{T}_m^{\mathcal{H}_-}$ ) can be non-trivial, we obtain a uniform upper bound for $V_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ that is independent of $m$ (see details in Appendix E.2). + +# E.1. Reconstructing Individual Bid Data + +We obtained the publicly available auction data for $T_{\mathrm{max}} = 443$ EU ETS emission permit auctions held in 2022 and 2023 (EEX, 2023). For each auction indexed by $t \in [T_{\mathrm{max}}]$ , we have the following relevant information: the minimum bid $(b_{\mathrm{min}}^t)$ , the maximum bid $(b_{\mathrm{max}}^t)$ , the average of the bids $(b_{\mathrm{avg}}^t)$ , the median of the bids $(b_{\mathrm{med}}^t)$ , and the number of bid-quantity pairs submitted $(n_{\mathrm{sub}}^t)$ . We normalized the bids to be in [0, 1]. For all rounds $t$ , $b_{\mathrm{avg}}^t \approx b_{\mathrm{med}}^t$ (linear regression yields coefficient 1.01 and intercept -0.008). + +Upon further investigation, we observed that, except a few, a significant number of auctions had either $b_{\mathrm{min}}^t \approx b_{\mathrm{avg}}^t \ll b_{\mathrm{max}}^t$ (Type I) or $b_{\mathrm{min}}^t \ll b_{\mathrm{avg}}^t \approx b_{\mathrm{max}}^t$ (Type II). As $b_{\mathrm{avg}}^t \approx b_{\mathrm{med}}^t, \forall t$ , we deduce that for Type I, most of the bids are concentrated in the interval $[b_{\mathrm{min}}^t, 2b_{\mathrm{avg}}^t - b_{\mathrm{min}}^t]$ whereas for Type II, most of the bids are in the interval $[2b_{\mathrm{avg}}^t - b_{\mathrm{max}}^t, b_{\mathrm{max}}^t]$ . We posit that for Type I (resp. Type II) auctions, $f \in (0,1)$ fraction of the bids ( $n_{\mathrm{sub}}^t$ ) are in $[b_{\mathrm{min}}^t, 2b_{\mathrm{avg}}^t - b_{\mathrm{min}}^t]$ (resp. $[2b_{\mathrm{avg}}^t - b_{\mathrm{max}}^t, b_{\mathrm{max}}^t]$ ) and the $1 - f$ fraction of bids are in $[2b_{\mathrm{avg}}^t - b_{\mathrm{min}}^t, b_{\mathrm{max}}^t]$ (resp. $[b_{\mathrm{min}}^t, 2b_{\mathrm{avg}}^t - b_{\mathrm{max}}^t]$ ). If for Type I (resp. Type II) auctions, $2b_{\mathrm{avg}}^t > b_{\mathrm{min}}^t + b_{\mathrm{max}}^t$ (resp. $2b_{\mathrm{avg}}^t < b_{\mathrm{min}}^t + b_{\mathrm{max}}^t$ ), we assume that all the bids are uniformly present in the interval $[b_{\mathrm{min}}^t, b_{\mathrm{max}}^t]$ . With these assumptions, we generate individual bid data for each auction by sampling uniformly from these intervals. + +After generating the individual bid data, we compute the metrics for the reconstructed bids (say $\widehat{b}_{\mathrm{avg}}^t$ ) for each auction and reject those with a relative error of at least $\delta$ (tolerance). For our simulations, we set $\delta = 0.05$ . We perform a grid search for $f$ to maximize the number of auctions where the metrics of the reconstructed data are within $\delta$ relative error of the actual metrics, and obtain that $f = 0.97$ . Following this pre-processing, we have reconstructed individual bid data for $T = 341$ auctions. The bids are normalized to be in $[0,1]$ . + +# E.2. An Uniform Upper Bound for $V_{m}^{\mathrm{OPT}}(\mathcal{H}_{-})$ . + +For any bid history, $\mathcal{H}_{-} = [\beta_{-}^{t}]_{t\in [T]}$ , suppose $\mathbf{b}_m^{\mathrm{OPT}}(\mathcal{H}_-$ is allocated $r_t$ units in any round $t$ . Then, by Lemma C.5 (1), we know that $(w_{r_t},r_t)$ also obtains $r_t$ units in round $t$ . So, + +$$ +\begin{array}{l} V \left(\mathbf {b} _ {m} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \boldsymbol {\beta} _ {-} ^ {t}\right) = V \left(\left(w _ {r _ {t}}, r _ {t}\right); \boldsymbol {\beta} _ {-} ^ {t}\right) \leq \max _ {\mathbf {b} \in \mathcal {U} _ {1} ^ {\star}} V \left(\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}\right) \\ \Rightarrow V _ {m} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right) = \sum_ {t = 1} ^ {T} V \left(\mathbf {b} _ {m} ^ {\mathrm {O P T}} \left(\mathcal {H} _ {-}\right); \boldsymbol {\beta} _ {-} ^ {t}\right) \leq \sum_ {t = 1} ^ {T} \max _ {\mathbf {b} \in \mathcal {U} _ {1} ^ {*}} V \left(\mathbf {b}; \boldsymbol {\beta} _ {-} ^ {t}\right). \\ \end{array} +$$ + +# F. Resolving Ties + +We first emphasize that the effect of resolution of ties on the objective function under the value maximization behavioral model is fundamentally different from the quasilinear utility maximization model. To illustrate this, consider a single-item second price auction with two bidders each valuing the item equally at $v$ . Assume that both the bidders bid $v$ and there exists a definitive tie breaking rule (either randomized or deterministic). If the bidders are considered quasilinear utility + +maximizers, the objective function value (value obtained minus the payments) for both the bidders is 0. However, under the value maximization model (assume $\gamma = 0$ for both the bidders), the objective function value for the winning bidder is $v$ and 0 for the losing bidder. Hence, we need to carefully analyze the key results of our work in the event of ties. + +In the context of multi-unit auctions, we can classify ties into two informal types: (a) 'good ties'—ties occurring at any bid other than the last accepted bid (LAB) and (b) 'bad ties', which are the ties occurring at the LAB. All the results in this work are unaffected in case only 'good ties' occur. Thus, we focus on 'bad ties' for the rest of this section. For this discussion, we consider a public, deterministic tie breaking rule under which ties are always broken in favor of lower indexed bidder. In the presence of ties, the undominated class of safe bidding strategies is still the class of nested strategies (Theorem 3.2). The tie breaking rule is incorporated into the decomposition in Lemma 4.1 and computing the edge weights in the DAG in the offline and online settings in Section 4, ensuring that the maximum weight path in the DAG gives the optimal offline solution and Algorithm 1 achieves sublinear regret in the online setting. \ No newline at end of file diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/images.zip b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7e467485f079e769a8a4986bc55f1cfd23e67dba --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44ad3554a355170c9e5bfadb15c160e6133454a8d1258d4ba686ac4a89cf292 +size 1590900 diff --git a/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/layout.json b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2d5f702156f7eb05b902519b1d3afaa0a4bf0bd5 --- /dev/null +++ b/ICML/2025/Learning Safe Strategies for Value Maximizing Buyers in Uniform Price Auctions/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf14e295341f2aa96ac3a15e21de99c0f3b9038319f65cb9d841702fce8d264c +size 2536373 diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_content_list.json b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..77999ec9d024e4d40836d9559036dde0fa7d7c10 --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5effb5f48846dd385c8abc02498796201baf2cb3b0728aa4db9e793406f2c10b +size 147763 diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_model.json b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2ba0b1bde90e9c3eb1678c7ceb6de08cb0c467c3 --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f15013645f8248fff37f76b007bc286ca5d209e78f6eb0a015b4e6e6f839964d +size 175341 diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_origin.pdf b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5340f097226515170ddcad21085fe08287d59698 --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/dd72b6ff-9134-4921-9108-fee3f2bf756d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:749a9d275f9dd47d474b6d2725a593c397ec0b69cfa5309bfce63e85af3fae05 +size 765843 diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/full.md b/ICML/2025/Learning Safety Constraints for Large Language Models/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6b2bcaf33d479a288054ada261c839536236994c --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/full.md @@ -0,0 +1,523 @@ +# Learning Safety Constraints for Large Language Models + +Xin Chen1 Yarden As1 Andreas Krause1 + +# Abstract + +Large language models (LLMs) have emerged as powerful tools but pose significant safety risks through harmful outputs and vulnerability to adversarial attacks. We propose SaP—short for Safety Polytope—a geometric approach to LLM safety, that learns and enforces multiple safety constraints directly in the model's representation space. We develop a framework that identifies safe and unsafe regions via the polytope's facets, enabling both detection and correction of unsafe outputs through geometric steering. Unlike existing approaches that modify model weights, SaP operates post-hoc in the representation space, preserving model capabilities while enforcing safety constraints. Experiments across multiple LLMs demonstrate that our method can effectively detect unethical inputs, reduce adversarial attack success rates while maintaining performance on standard tasks, thus highlighting the importance of having an explicit geometric model for safety. Analysis of the learned polytope facets reveals emergence of specialization in detecting different semantic notions of safety, providing interpretable insights into how safety is captured in LLMs' representation space. + +# 1. Introduction + +Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse tasks, yet their increasing real-world deployment raises urgent safety concerns—these models can generate harmful content or be manipulated through adversarial attacks. While approaches like Reinforcement Learning from Human Feedback (RLHF) show promise, they face fundamental limitations. For instance, models can learn to "game" reward functions rather than become genuinely safer, and noisy specification of human preferences leads to unintended behaviors (Casper et al., 2023). + +$^{1}$ Department of Computer Science, ETH Zürich, Zürich, Switzerland. Correspondence to: Xin Chen . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Current approaches to LLM safety span a broad spectrum yet face significant tradeoffs. Prompt-based techniques attempt to alter model behavior through input/output engineering; however, they prove brittle and easily circumvented (Kandpal et al., 2023). Training-time approaches that rely on safe RLHF (Dai et al., 2023; Wachi et al., 2024; Rame et al., 2024) aim to balance helpfulness with safety but require expensive data relabeling and model retraining, lacking post-hoc mechanisms to ensure safety. In addition, it is often difficult to interpret how these methods make safety-related decisions. For instance, it is unclear how these methods quantify the severity of unsafe users' requests, or how they pinpoint the underlying cause that makes a request unsafe. This landscape suggests the need for the development of methods that leverage inference-time techniques while offering intuitive means for interpretability. + +Motivated by recent work on constraint learning from demonstrations in constrained Markov decision processes (CMDP, Altman, 1999; Lindner et al., 2024), our key insight is that LLM safety can be framed as a geometric constraint learning problem. This geometric perspective allows us to model an explicit safe set, defined as a polytope, within the model's representation space. Each of the polytope's facets represents a different constraint that must be satisfied. As we later show, while learning these constraints solely depends on binary safe/unsafe labels, our approach associates these constraints with different intuitive semantic meanings of safety. + +We develop SaP to realize this geometric approach. Our approach comprises two key components: a concept encoder that disentangles different safety concepts, and a steering algorithm that guides unsafe outputs back into the safe set while preserving model capabilities. Our framework and its components are illustrated in Figure 1 to provide a clearer understanding of our approach. + +# Contributions. + +- We propose a novel geometric framework that yields an explicit model of safety in LLMs, formulated as a polytope in models' representation space. +- An inference-time steering algorithm that guides unsafe outputs back to the safe set while preserving model capabilities, providing defense against state-of-the-art adversarial attacks. + +![](images/49287b31b79b2b9944cd7a5e9bdc9d441d8b724f7729fc22e87894dd9e7268c2.jpg) +Figure 1: Illustration of the geometric approach to language model safety proposed in this paper. A safety facet is triggered when a user asks the model to write a response suggesting fabricated content. When the model generates responses, we steer its internal representation back to the safe region to produce safe outputs. + +- An extensive empirical analysis of learned polytope facets, which reveals naturally emerging specialization in detecting different semantic concepts of safety. + +Our code is publicly available at https://github.com/lasgroup/SafetyPolytope. + +# 2. LLM Safety through the Lens of Constrained Markov Decision Processes + +We tackle LLM safety as a sequential decision-making problem, where models must reason about long-term consequences of their decisions, i.e., their choice of words. An intuitive approach for modeling safety requirements is by imposing some constraints within this decision-making process. Constraint Markov decision processes pose a natural formulation for such problems, allowing harmful behaviors to be modeled as constraints. + +Constrained Markov decision processes. We define an infinite-horizon discounted constrained Markov decision processes (Altman, 1999, CMDP) as the tuple $(\mathcal{X},\mathcal{A},r,\{c_j\}_{j = 1}^n,p,\gamma ,\rho)$ , where $\mathcal{X}$ and $\mathcal{A}$ are state and action spaces respectively, $p(\pmb{x}'\mid \pmb{x},\pmb{a})$ , describes a probability distribution over the next state $\pmb{x}'$ , given a state $\pmb{x}\in \mathcal{X}$ and an action $\pmb{a}\in \mathcal{A}$ . States are initially drawn from $\rho (\pmb{x}_0)$ , the initial state distribution. A reward function $r(\pmb{x},\pmb{a})$ is to be maximized, whereas $c_{j}(\pmb {x},\pmb {a}),j\in \{1,\ldots ,n\}$ , are cost functions that must remain bounded. The goal is to find a stationary policy $\pi (\pmb {x}\mid \pmb {a})$ that solves $\max_{\pi \in \mathcal{F}}\mathbb{E}_{\pi}[\sum_{t = 0}^{\infty}\gamma^{t}r(\pmb{x}_{t},\pmb{a}_{t})]$ where $\mathcal{F}:= \{\pi |\forall j\mathbb{E}_{\pi}[\sum_{t = 0}^{\infty}\gamma^{t}c_{j}(\pmb{x}_{t},\pmb{a}_{t})]\leq \xi_{j}\}$ and $\xi_{j}$ are predefined cost budget paramters. Constraints in CMDPs can be equivalently expressed in terms of the value functions of the cost objectives. Specifically, let + +$v_{j}^{\pi}(\pmb {x}) = \mathbb{E}_{\pi}\left[\sum_{t = 0}^{\infty}\gamma^{t}c_{j}(\pmb{x}_{t},\pmb{a}_{t})\mid \pmb{x}_{0} = \pmb {x}\right]$ denote the cost value function for cost $c_{j}$ . Then, the constraint can be rewritten as $\mathbb{E}_{\rho}\left[v_{j}(\pmb{x}_{0})\right]\leq \xi_{j}$ . + +Natural language as a Markov decision process. In the case of language, one can think of a token-level MDP. In this formulation, a finite set of tokens $\mathcal{V}$ represents the language's vocabulary, the state space is a set of all (possibly infinitely long) sequences $\mathcal{X} = \bigcup_{H=1}^{\infty} \mathcal{V}^{H}$ , where $\mathcal{V}^{H} = \mathcal{V} \times \dots \times \mathcal{V}$ ( $H$ times), an $H$ -fold Cartesian product of all tokens in $\mathcal{V}$ . Indeed, LLMs have proven highly effective in meaningfully "navigating" this combinatorially vast state space. Models predict only the next token, hence the action space is $\mathcal{A} = \mathcal{V}$ . The vocabulary includes two special tokens ' and ' ', that represent the MDP's terminal and initial states respectively. The initial state distribution $\rho(\boldsymbol{x}_0) = \mathbb{1}_{\boldsymbol{x}_0 \in \{\langle \text{bos} \rangle\}}$ , hence trajectories always start from the token ' '. For an action $\boldsymbol{a} \in \mathcal{V}$ , the next state is $\boldsymbol{x}' = \boldsymbol{x} \| \boldsymbol{a}$ where the operation $(\cdot \| \cdot)$ represents a concatenation. A special transition is reserved for when $\boldsymbol{a} = $ , leading to a terminal state, where $\boldsymbol{x}'$ is fixed to $\boldsymbol{x}$ forever. An autoregressive language model can be seen as a policy $\pi(\boldsymbol{a} | \boldsymbol{x})$ for determining the next token given all the previous tokens. While using MDPs to describe autoregressive models and language has been extensively studied in several previous works (Cundy & Ermon, 2023; Rafailov et al., 2024; Zeng et al., 2024), the main argument of this work is that safe and ethical language not only tries to maximize a reward function, but is also subject to some constraints. For instance, LLMs should avoid using language that incites harm or solicits unlawful actions. We argue that these constraints are intrinsically reflected in human natural language and should be modeled to ensure model safety and control. While manually specifying such constraints is nuanced due to their complexity and context-dependence, this work in + +produces a framework for learning them directly from data. + +Learning constraints from demonstrations. Our main result relies on the idea that for CMDPs, a conservative estimate of $\mathcal{F}$ can be learned only from trajectory demonstrations. More concretely, Lindner et al. (2024) establish that given a dataset of trajectories that were drawn from $k$ safe policies $\pi_1,\ldots ,\pi_k$ , and a feature representation $\mathbf{f}:\mathcal{X}\times \mathcal{A}\to [0,1]^d$ such that $\mathbf{f}(\pi)\coloneqq \mathbb{E}_{\pi}[\sum_{t = 0}^{\infty}\gamma^{t}\mathbf{f}(\pmb{x}_{t},\pmb{a}_{t})]$ , one can construct a conservative approximation of $\mathcal{F}$ with any convex combination of the feature expectations of $\pi_1,\dots ,\pi_k$ + +$$ +\mathcal {Q} := \left\{\pi \left| \sum_ {i = 1} ^ {k} \lambda_ {i} \mathbf {f} \left(\pi_ {k}\right), \lambda_ {i} \geq 0, \sum_ {i = 1} ^ {k} \lambda_ {i} = 1 \right. \right\}. +$$ + +Crucially, the set $\mathcal{Q}$ is a convex polyhedron, i.e., a set of linear equations that determines the feasibility of policies. Furthermore, Lindner et al. (2024) show that safety constraints can be learned as linear mappings of feature expectations $\mathbf{f}$ , independently from rewards. + +The geometry of constraints in LLMs. The above two observations—that $\mathcal{Q}$ is a convex polyhedron, and that constraints are linear w.r.t. feature expectations— motivate a geometric interpretation for safety in LLMs. We propose viewing safety constraints through a geometric lens, representing them via a polytope—the intersection of $k$ halfspaces defined by linear inequalities $\tilde{\mathcal{Q}} := \left\{\tilde{\mathbf{f}} \mid \boldsymbol{\phi}^{\top} \tilde{\mathbf{f}} \leq \tilde{\boldsymbol{\xi}}\right\}$ . Here, $\boldsymbol{\phi} \in \mathbb{R}^{d \times K}$ represents $K$ hyperplanes in $d$ -dimensional space, $\tilde{\boldsymbol{\xi}} \in \mathbb{R}^{K}$ are thresholds, and $\tilde{\mathbf{f}} \in \mathbb{R}^{d}$ is the input feature vector. The features $\tilde{\mathbf{f}}$ are learned during the pre-training phase of LLMs. The linear representation hypothesis (Park et al., 2023; 2024) provides empirical evidence that high-level semantic concepts in LLMs naturally manifest as linear directions in the feature space of $\tilde{\mathbf{f}}$ . This suggests that safety constraints in language, like those in CMDPs, have an inherent geometric structure, further grounding our approach of learning polytope facets in the LLM's feature space. This formulation of safety facets as geometric constraints enables post-hoc safety control without model fine-tuning, while providing a tool for analyzing the learned safety concepts. + +# 3. Safety Polytope (SaP) + +In this section, we present our approach for learning the facets from demonstration data and demonstrate the utility of our approach for interpretability and steering of unsafe output generation. On a high-level, our approach is composed of three main steps: (i) using a labeled dataset to obtain features $\tilde{\mathbf{f}}$ from a pre-trained LLM and (ii) determining the polytope's hyperplanes' parameters $\phi$ and $\tilde{\xi}$ . (iii) using the learned polytope for steering unsafe outputs into the safe region. + +Feature extraction. Our aim is to use a pre-trained LLM to extract features $\tilde{\mathbf{f}}$ , which can then be used to construct our polytope. Concretely, given a dataset $\{(x^i,y^i)\}_{i = 1}^N$ consisting of token sequences $x^{i}\in \mathcal{X}$ and their corresponding labels $y^{i}\in \{-1, + 1\}$ , indicating whether the token sequence is considered safe. Following our conceptual motivation from the previous section, this can be thought of as a case, where for some $j$ and $\pi$ , the label indicates whether $v_{j}^{\pi}(\pmb{x}^{i})\leq \xi_{j}$ . These labels are commonly derived from human annotations on aspects such as ethics, toxicity, and privacy protection (Ji et al., 2023; Gehman et al., 2020; Lin et al., 2021) or from success/failure of adversarial attacks. A simple method for feature extraction is to perform a forward pass on each example and collect the model's intermediate features (Arditi et al., 2024), $\pmb {h}\in \mathbb{R}^{d_h}$ . Denoting the intermediate features of layer $l$ as $\bar{\pi}_l$ , we get $\pmb {h}^i = \bar{\pi}_l(\pmb {x}^i)$ , yielding data $\{(h^i,y^i)\}_{i = 1}^N$ . To determine a full sentence's safety, we use the feature $\pmb{h}^i$ obtained at the last word of a sentence, i.e., when the last token of $\pmb{x}^i$ is . + +Convex Polytope Machines. A key challenge in constraint learning for LLMs is scaling the estimation of the polytope's facets $\phi$ to high dimensions. For instance, the QuickHull algorithm for convex-hull vertex identification (Barber et al., 1996), employed by Lindner et al. (2024), becomes prohibitively intractable due to its $\mathcal{O}(N^{\lfloor d_h / 2\rfloor})$ time complexity. To overcome this, we adopt the CPM algorithm (Convex Polytope Machine, Kantchelian et al., 2014). Instead of explicitly computing a convex-hull, CPM treats the computation of polytopes as a classification problem. Concretely, given a dataset $\{(h^i,y^i)\}_{i = 1}^N$ , where the labels indicate whether a point $h^i$ lies outside $(-1)$ or inside $(+1)$ the polytope, and for this discussion only, suppose $d_{h} = d$ to maintain consistent notation, CPM learns a decision boundary by minimizing + +$$ +\sum_ {i \in \mathcal {I} _ {+ 1}} \sum_ {k = 1} ^ {K} \left[ \kappa + \phi_ {k} ^ {\top} \boldsymbol {h} ^ {i} \right] _ {+} + \sum_ {i \in \mathcal {I} _ {- 1}} \left[ \kappa - \phi_ {z (\boldsymbol {h} ^ {i})} ^ {\top} \boldsymbol {h} ^ {i} \right] _ {+} + \lambda_ {\phi} \| \phi \| ^ {2}. +$$ + +Above, $[\cdot]_{+} := \max(0, \cdot)$ , $\mathcal{I}_{+1} = \{i \mid y^{i} = +1\}$ and $\mathcal{I}_{-1} = \{i \mid y^{i} = -1\}$ , $\kappa > 0$ is a margin parameter, $\lambda_{\phi}$ is a regularization parameter and $z(\cdot)$ assigns input points to their corresponding facet (see Appendix A). Kantchelian et al. (2014) provide more details on the connection of the CPM loss to Support Vector Machines. Crucially, optimizing the above loss allows us to leverage gradient descent to learn $\phi$ , effectively mitigating scalability challenges associated with the dataset size $N$ and feature dimension $d_{h}$ . + +Untangling word ambiguity. Learning polytopes with gradient descent enables us to use tools from the interpretability literature to associate facets with intuitive, "human-friendly", concepts of safety. Concretely, model representations are often susceptible to polysemanticity (Elhage + +et al., 2022), a phenomenon where the same model activations are triggered by multiple distinct concepts. Drawing inspiration from sparse autoencoders (Cunningham et al., 2023), we propose three modifications to the pipeline introduced above. First, we introduce a linear layer followed by a ReLU function to provide nonlinearity on top of $\pmb{h}$ , referred to as the 'Concept Encoder', $\mathrm{E}_C: \mathbb{R}^{d_h} \to \mathbb{R}^d$ , producing a dataset of features and labels $\{(\tilde{\mathbf{f}}^i = \mathrm{E}_C(\bar{\pi}(\boldsymbol{x}^i)), y^i)\}_{i=1}^N$ . Second, together with $\phi$ , we make the safety threshold $\xi$ a learnable parameter. Finally, we include a sparsity regularization term on $\tilde{\mathbf{f}}$ . These modifications result in the following training loss: + +$$ +\begin{array}{l} L (\phi , \tilde {\xi}) := \sum_ {i \in \mathcal {I} _ {+ 1}} \sum_ {k = 1} ^ {K} \left[ \kappa + \phi_ {k} ^ {\top} \tilde {\mathbf {f}} ^ {i} - \tilde {\xi} _ {k} \right] _ {+} \\ + \sum_ {i \in \mathcal {I} _ {- 1}} \left[ \kappa - \phi_ {z (\tilde {\mathbf {f}} ^ {i})} ^ {\top} \tilde {\mathbf {f}} ^ {i} + \tilde {\xi} _ {z (\tilde {\mathbf {f}} ^ {i})} \right] _ {+} + \lambda_ {\tilde {\mathbf {f}}} \| \tilde {\mathbf {f}} ^ {i} \| _ {1} ^ {2} + \lambda_ {\phi} \| \phi \| ^ {2} \tag {1} \\ \end{array} +$$ + +Intuitively, the inclusion of the sparsity regularization term $\lambda_{\tilde{\mathbf{f}}}$ induces feature sparsity, which empirically reduces polysemanticsy when assigning inputs to different concepts of safety. We highlight that, while this training objective is non-smooth due to the sparsity regularization term, we can still compute its sub-gradients and use standard SGD-based learning techniques to optimize it w.r.t. $\phi$ . Additional implementation details are provided in Appendix A. In Section 4, we analyze the correspondence between human concepts of safety (e.g., violent language) and polytope edges and ablate the use of the additional non-linear transformation, demonstrating the critical role of these components. + +Representation steering. Obtaining $\phi$ allows us to directly verify whether next-token predictions by our model lie within the polytope $\tilde{\mathcal{Q}}$ —and are therefore safe—by evaluating $\phi^{\top}\tilde{\mathbf{f}} \leq \tilde{\boldsymbol{\xi}}$ . An immediate implication of this insight is that, before exposing the next token to users, we can adjust activations dynamically, i.e., within the model's response generation loop. Building on methodology from constrained reinforcement learning (c.f. Dalal et al., 2018), we propose solving the following optimization problem: + +$$ +\min _ {\boldsymbol {h}} \| \bar {\pi} _ {l} (\boldsymbol {x}) - \boldsymbol {h} \| _ {1} \text {s . t .} \phi^ {\top} \tilde {\mathbf {f}} (\boldsymbol {h}) \leq \tilde {\xi}. \tag {2} +$$ + +Importantly, as long as the model's representations already reside within $\tilde{\mathcal{Q}}$ , the original token generation remains unchained. Algorithm 1 provides a detailed token generation loop that actively adjusts outputs to ensure safety when necessary. Note that in practice, obtaining an approximate solution Equation (2) can be achieved using first-order methods (Bertsekas, 2016). For example, in our experiments, taking only a few steps of a simple Lagrangian relaxation (see Appendix B) substantially improves safety performance. + +Algorithm 1 SafeFlow: Representation Steering for Safe Response Generation + +Require: $\pi, x_0, \phi, \tilde{\xi}$ + +$$ +\begin{array}{l} \boldsymbol {x} _ {t} \gets \boldsymbol {x} _ {0} \\ \text {w h i l e} x _ {t} [ \text {e n d} ] \neq < \mathrm {e o s} > \mathbf {d o} \\ \end{array} +$$ + +Obtain $\bar{\pi}_l(\pmb{x}_t)$ + +$$ +\begin{array}{l} \boldsymbol {h} \leftarrow \arg \min _ {\boldsymbol {h}} \| \bar {\pi} _ {l} (\boldsymbol {x}) - \boldsymbol {h} \| _ {1} \text {s . t .} \phi^ {\top} \tilde {\mathbf {f}} \leq \tilde {\xi} \quad > \text {E q .} 2 \\ \bar {\pi} _ {l} \leftarrow h \quad > \text {O v e r r i d e a c t i v a t i o n s o f l a y e r} l \\ \boldsymbol {a} _ {t} \leftarrow \pi (\boldsymbol {a} _ {t} \mid \boldsymbol {x} _ {t}) \quad > \text {C o m p l e t e p a s s , d e c o d e n e x t t o k e n} \\ \boldsymbol {x} _ {t} \leftarrow \boldsymbol {x} _ {t} \| \boldsymbol {a} _ {t} \\ \end{array} +$$ + +end while + +output $x_{t}$ + +Our approach scales efficiently to large batches via existing tools for vectorized computation (Bradbury et al., 2018; Agrawal et al., 2019; Blondel et al., 2022; Lu et al., 2024) and aligns with the paradigm shift towards "test time compute" (OpenAI, 2024) to improve safety in tandem with reasoning capabilities. + +# 4. Experiments + +We evaluate SaP on three LLMs: Llama2-7B (Touvron et al., 2023), Ministral-8B (Jiang et al., 2024), and Qwen2-1.5B (Yang et al., 2024). Section 4.1 presents our main results on defending against adversarial attacks using SaP's steering method in Algorithm 1. In Section 4.2, we demonstrate SaP's interpretability via the Concept Encoder and its defense performance when evaluated on the BeaverTails dataset(Ji et al., 2023). Next, Section 4.3 analyzes the impact of polytope facets through ablation studies, with discussions on model design. + +# 4.1. Tactful Responses via Representation Steering + +We evaluate the steering capability of Algorithm 1 on Harm-Bench (Mazeika et al., 2024), a standardized benchmark for assessing LLM safety against adversarial attacks. We select nine representative attack methods including gradient-based approaches: GCG (Zou et al., 2023), GBDA (Guo et al., 2021), AutoPrompt (Shin et al., 2020), PEZ (Wen et al., 2023), UAT (Wallace et al., 2021), AutoDAN (Liu et al., 2023) and human-crafted jailbreaks: Human Jailbreak (Shen et al., 2024) and Direct Request (Mazeika et al., 2024). We additionally evaluate on Adaptive Attack (Andriushchenko et al., 2024), a state-of-the-art adversarial attack method, on JailBreakBench (Chao et al., 2024). + +For each model, we train SaP using the following procedure: (i) we identify the top 3 most effective attack methods based on their success rates; (ii) for these methods, we collect model features from $80\%$ of their attack strings for + +![](images/851d9c3df2adc40b0831c6ce95a67d8e1968df111cbaad253c94fb72d7ef2d55.jpg) +Figure 2: Comparison of model MMLU accuracy and average Attack Success Rate (ASR) on 9 attack algorithms. All defense methods are evaluated over 5 seeds. SaP consistently retains the original MMLU accuracy while having significantly lower ASR compared to most baseline methods. + +training, reserving $20\%$ for testing; (iii) we then evaluate SaP's effectiveness against all nine attack methods. Our extensive evaluations test the trained polytope's robustness and generalization ability across both attack methods and adversarial attack benchmarks. Detailed training setup can be found in Appendix C.1. + +For each attack method, we compare SaP against 6 defense baselines. Our comparison includes (i) Prompt-based defense methods: Self Reminder (Xie et al., 2023), Response Check (Wang et al., 2024), and SmoothLLM (Robey et al., 2024). These baselines defend against unreasonable LLM requests by prompting, filtering, or defaulting to a rejection string when unsafe content is detected. (ii) Training-based defense methods: Rejection Sampling that rejects a request based on the polytope's binary decision. We further compare against MLP where we use an MLP model with equivalent parameter count as our SaP model. It is first trained as a safety classifier using binary cross entropy (BCE) loss, then used for the same steering procedure as SaP. We also train MLP with 5 extra layers (referred to below as $\mathrm{MLP} + 5$ ) that has the same setup as MLP but with 5 extra layers. Along with SaP, we test all 7 defense methods on the selected 9 attack algorithms, with each setup repeated over 5 seeds. + +We evaluate all methods' capability on The Massive Multi-task Language Understanding benchmark (Hendrycks et al., 2020, MMLU), which evaluates models across 57 subjects through multiple-choice questions in fields like mathematics, history, law, and science. In our experiments, MMLU accuracy measures how well models maintain their capabilities while implementing safety defenses. + +Figure 2 presents our main results across models, comparing SaP against the baselines. Each defense algorithm is evaluated on all 9 attack methods over 5 seeds first, then + +
Llama2-7BMinistral-8BQwen2-1.5B
Polytope91.24 ± 2.7490.82 ± 0.2383.96 ± 0.31
MLP97.28 ± 0.1992.90 ± 0.1387.56 ± 0.15
MLP+591.08 ± 7.2590.72 ± 2.3186.12 ± 2.86
+ +Table 1: Test accuracy (\%) of different methods over 5 seeds, early-stopped to prevent overfitting. The trained models are deployed for experiments in Figure 2. Models with similar classification accuracies do not imply the same defense capability. Having a better geometric model for the representation space is essential for successful defenses. + +positioned on the figure by their average attack success rates (ASR) across 9 attack algorithms. As shown, SaP achieves strong defense performance while maintaining model capabilities. For Llama2-7B, it reduces the attack success rate from $12.92\%$ to $0.26\%$ while preserving the original MMLU accuracy $(45.8\%$ vs. $45.7\%)$ . This pattern holds for Ministral-8B (ASR: $55.77\%$ to $3.25\%$ , accuracy: $63.4\%$ vs $63.3\%$ ) and Qwen2-1.5B (ASR: $27.57\%$ to $11.81\%$ , accuracy: $52.7\%$ ). Detailed performance of each method on Harmbench and MMLU is presented in Appendix C.2. + +In contrast, the baseline methods show varying effectiveness across models. Rejection Sampling achieves competitive defense performance on Llama2 and maintains accuracy on both Llama2 and Qwen2, but significantly impacts Ministrial's MMLU performance (28.5% vs original 63.4%). Other baselines like In-Context Learning and Response Check maintain accuracy but provide weaker defense, with ASRs ranging from 1.7-28.4%. These results suggest that SaP effectively balances defense capabilities and model performance across different architectures. + +SaP's comparison with MLP and $\mathrm{MLP + 5}$ in Table 1, illus + +![](images/d28d6418d156551703b6436d2aa421d732cef96156824bea2eb70af052f0cbc0.jpg) +Figure 3: Comparison of average ASR for each model, with and without Concept Encoder (CE). SaP with CE consistently shows robustness against attack across models. + +trates the importance of having a structured and principled geometric model for the representation space of LLMs. Prior to SaP, an intuitive practice is to train an MLP with BCE loss for binary classification first, then deploy the trained MLP for steering. However, obtaining a decent classification accuracy does not necessarily lead to better defense performance. In addition, Table 1 and Figure 2 show that while classification accuracy is on par across methods, even when scaling the MLP with more layers, SaP's geometric modeling enables significant improvements compared to the MLP and $\mathrm{MLP} + 5$ baselines. + +# 4.2. The Role of the Concept Encoder + +Enhanced defense performance. Figure 3 compares SaP variants with and without the concept encoder $\mathrm{E}_C$ (indicated with CE) with average ASR across attack methods on HarmBench, averaged over 5 seeds. The results demonstrate significant improvements in defense performance when using the concept encoder. For Llama2, adding CE enables almost perfect defense (averaged $0.1\%$ ASR) against all attacks, while the variant without CE shows vulnerabilities to various attacks. The improvement is particularly pronounced for Ministral, where CE reduces ASR from an average of $51.5\%$ to $1.7\%$ . + +Qwen2 shows strong baseline robustness even without CE, and adding CE maintains this performance without significant improvements. This behavior might be attributed to Qwen2's smaller feature dimensionality (1536-dimensional) compared to Ministral and Llama-2 (both 4096-dimensional). The lower-dimensional features could be inherently easier for the polytope constraints to capture safety patterns directly, making the additional abstraction from a concept encoder less crucial for effective defense. Detailed results are presented in Appendix C.2 + +Improved interpretability. To analyze how well the facets capture different safety concepts, we use the Beaver-Tails dataset (Ji et al., 2023), which contains $330\mathrm{k}$ annotated + +sentences in 14 safety categories. Each sentence is labeled as either safe or unsafe within its category. Note that we do not provide the polytope with category labels, nor hinting category information in the prompt, hence these semantic meanings are captured without direct supervision. + +We run both polytope variants (with and without CE) on the complete dataset to obtain facet violation patterns. For each facet $k$ and input $\mathbf{x}$ , we first compute the facet violation $\left[\phi^{\top}\tilde{\mathbf{f}} -\tilde{\xi}\right]_{k}$ , then normalize each facet's violations to within [0, 1]. We calculate the mutual information between these violation scores and the labels of each safety category to see how well each facet corresponds to each safety concept. For clear comparison, we normalize each row in the resulting mutual information matrix by dividing by its maximum value, ensuring that for each safety category, the highest mutual information score is 1. More details can be found in Appendix D.1. + +Figure 4 compares the mutual information heatmaps with and without the concept encoder. Without the encoder, we observe significant polysemanticity in the learned facets, manifesting as high mutual information values across multiple categories for individual facets. For example, 'Facet 36' exhibits strong correlations with categories '2' to '9', all over 0.93. After introducing the concept encoder, we observe a marked reduction in polysemanticity. The mutual information matrix shows more focused correlations, with strong correlations $(\mathrm{MI} > 0.9)$ more likely to appear in isolation rather than in clusters. + +To understand the semantic concepts encoded by each facet, we analyze differences in the Kullback-Leibler (KL) divergence when masking context around negative terms in BeaverTails' child abuse dataset. Results in Figure 5 reveal specialized detection patterns: 'Facet 7' demonstrates strong sensitivity to kidnapping scenarios $(\mathrm{KLD} = 0.366)$ , 'Facet 22' primarily focuses on sexual content $(\mathrm{KLD} = 0.733)$ and abuse-related terms $(\mathrm{KLD} = 0.114)$ , while 'Facet 26' shows distinct activation for bullying $(\mathrm{KLD} = 1.404)$ with secondary response to violent terms. This differentiation suggests the facets learn to capture specific categories of harmful content rather than just detecting negative terms broadly. We refer to Appendix D for additional experiments and details on this experiment. + +# 4.3. Ablating the Number of Constraints + +To understand how the number of facets affects polytope performance, we conduct two sets of experiments. For defense evaluation, we vary the facet count from 1 to 50 and measure performance against 7 HarmBench attack methods (AutoPrompt, DirectRequest, GBDA, GCG, HumanJailbreaks, PEZ, UAT), computing the mean and standard deviation of ASR across these attacks, repeated over 5 seeds. Additionally, we evaluate SaP's classification performance as the + +![](images/109b2b87ffb6a87274a9c4290f6a565bfa96d8a0c4148422cd19f270ef373568.jpg) +(a) No Concept Encoder + +![](images/ff2e99e3ebeabe6c80d88837a5d4df0ecaf242d25f688b8cc4e68d52412a7be0.jpg) +(b) With Concept Encoder + +![](images/e94fcd9bf36b28f4a1f71c471a79c37fe7e6b4eaf142d34b3996e9070539542c.jpg) +Figure 4: Mutual Information Heatmap showing the comparison between models without (a) and with Concept Encoder (b). Polytope facets learned with a concept encoder show more disentangled activations in safety classes. + +![](images/b1b3c637dabb519403996959002a035fa082321c39d6d8125f09327f63e8e788.jpg) +Figure 5: KL divergence analysis revealing semantic specialization of SaP's facets. Higher values indicate stronger activation when masking specific context words, demonstrating how each facet learns to detect distinct categories of harmful content rather than broadly negative terms. + +![](images/49f65728268970dff3a34c8b20233974e2553f65f6fc92c82afd506285a65b78.jpg) + +number of facets increase. To this end, we vary facets from 1 to 60 and evaluate on the 14 BeaverTails categories separately. We measure classification accuracy on BeaverTails' test set, reporting the mean and standard deviation of per-category accuracy across categories, repeated over 5 seeds. We emphasize that we use BeaverTails' categories only for evaluation, that is, these categories are not given to SaP during training. + +Figure 6 shows how the number of polytope facets affects both defense and classification performance. In terms of defense capabilities (left), increasing facet count leads to rapid improvement in safety, particularly evident in reducing attack success rates. Llama-2 achieves near-perfect defense $(\mathrm{ASR} < 0.1\%)$ with just 20 facets, while Ministral and Qwen2 show continued improvements up to 30 facets before stabilizing. The three models exhibit different convergence patterns: Llama-2 maintains consistently low ASR after 20 facets, while Ministral and Qwen2 show slight + +fluctuations even with additional facets, suggesting their defense mechanisms might be more sensitive to the specific geometric arrangements of polytope constraints. + +For classification accuracy (right), we observe steady improvements up to approximately 30 facets, after which performance diminishes. Ministral demonstrates the most substantial initial gains, with accuracy increasing from $76.8\%$ to $82.5\%$ when moving from 1 to 40 facets. Llama and Qwen2 show more gradual improvements but follow a similar pattern that the performance does not significantly improve beyond certain facet counts. A comprehensive presentation of all metric values is available in Appendix D.3. We additionally conducted safety classification with a standard fully connected neural network trained using cross entropy loss, and show that SaP's classification performance does not degrade substantially compared to a fully connected neural network with an equivalent parameter count. We present these results in Appendix D.3. + +![](images/a22475d22ac4d77d5c44364dc8380bc0626ce9c6cd7c261f1784e54057252e6c.jpg) +Figure 6: Impact of polytope constraint count on model performance. Left: Average attack success rate (ASR) across 7 HarmBench attack methods, where lower values indicate better defense. Right: Average classification accuracy across 14 BeaverTails safety categories. With more facets, SaP's performance first improves, then hits a diminishing return. + +![](images/a54b473737dec0c499c5c14fb3bf08f885048483e445c26459c9ee0f2a22b33a.jpg) + +We empirically observe that many polytope facets remain inactive during training—they rarely activate on violations in the training data. This suggests potential inefficiency in the polytope loss design of CPM, where the training objective might not effectively utilize the full capacity of available parameters in the facets. + +# 5. Related Work + +Constrained and multi-objective alignment. Recent work has explored multi-objective approaches to handle competing goals in language model alignment. Similar to our steering algorithm, MCA (Fu et al., 2024) use posttraining decoding to align LLMs to different objectives. Their treatment of safety relies on "contrastive prompts", used to obtain a Pareto front for multiple objective. In contrast, SaP treats safety as constraints that must be enforced. Training-time methods like Safe-RLHF (Dai et al., 2023), SACPO (Wachi et al., 2024), RePO (Peng et al., 2024), and Constrained DPO (Liu et al., 2024) frame safety as constraints within reward learning. Other approaches, like Panacea (Zhong et al., 2024) and MODPO (Zhou et al., 2024), focus too on training-time techniques, however, like (Fu et al., 2024), they frame safety as a multiple objectives problem, instead of constraint satisfaction. The above methods require model retraining or finetuning, lack interpretable insights into learned safety concepts, and provide no mechanisms for post-deployment safety corrections. SaP addresses these challenges by learning safety constraints directly in the representation space, enabling both post-hoc control without retraining and interpretable analysis of how different safety concepts are captured through specialized polytope boundaries. This provides a complementary approach that can work alongside training-time methods. + +Adversarial defenses. Prior work explores four main categories of LLM safety defenses. Input filtering methods (Cao et al., 2023; Jain et al., 2023) detect and filter suspicious + +prompts. Input modification approaches (Yi et al., 2024; Wei et al., 2024; Xie et al., 2023; Robey et al., 2024) modify input prompts to weaken potential attacks. Both methods are vulnerable to white-box attacks, and focus only on input-level patterns rather than addressing model-internal safety representations. Output filtering (Phute et al., 2024; Zhang et al., 2024; Wang et al., 2024) uses additional language models to check for safety violations with significant computational overhead. Despite the computation overhead, large-scale training of input-output safety classifiers can yield highly promising defense results (Sharma et al., 2025). Representation-based approaches (Casper et al., 2024; Sheshadri et al., 2024; Zou et al., 2024) modify a model's internal representations for improved robustness but rarely provide interpretable insights into their safety mechanisms. We complement the limitations by introducing constraints in the model's representation space. This approach allows us to modify models' representations, opposed to modifying/filtering user inputs or model outputs. Furthermore, it facilitates treating safety concepts as constraints that should not be violated, enabling easy detection and analysis by humans, in contrast to previous representation-based approaches. + +AI safety and alignment. Recent work has surfaced many challenges in AI safety and alignment. Anwar et al. (2024) elucidate fundamental challenges spanning scientific understanding, development methodologies, and sociotechnical considerations in LLM safety. While Reuel et al. (2024) advocates for sophisticated technical governance frameworks, Dalrymple et al. (2024) makes a case for rigorous approaches to design AI systems with quantifiable safety assurances. AI Control (Greenblatt et al., 2023) proposes that safety can be maintained through systems that prevent harmful actions, even when models are misaligned. In this context, SaP's geometric approach to constraints in the representation space offers a promising framework for advancing both alignment and control. + +# 6. Limitations and Future Work + +Our results encourage further practical and theoretical development of SaP. A key future work direction lies in further disentangling semantic understandings across polytope edges. CPM represents progress, however, its heuristic facet assignment algorithm limits its overall performance. Leveraging tools from mechanistic interpretability (Black et al., 2022) or exploring other (possibly non-linear) geometric representations of safety (Park et al., 2024) could reveal deeper insights into the learned constraints. + +Based on our novel geometric framework for explicit safety modeling, SaP demonstrates an effective defense against various adversarial attacks. However, we observe that under many attacks, specifically for the Ministrial-8B model, SaP can induce semantically incoherent outputs. Importantly, all evaluated models, including Ministrial-8B, perform as expected on standard capability benchmarks like MMLU and MT-Bench (Bai et al., 2024), with results listed in Tables 8 and 9. Although comprehensive adversarial robustness and broad capability improvements are beyond the scope of this paper, we encourage future research to investigate and improve SaP's performance in these critical domains. + +In terms of theory, our work lacks a more rigorous understanding of SaP. Current sample complexity bounds for learning polytopes build on Probably Approximately Correct (PAC) learning. The PAC-style results of Gottlieb et al. (2018) provide a solid starting point, as they shed light on the fat-shattering dimension required to learn polytopes (discussed in Appendix E). However, these results depend on strong assumptions that are hard to verify in practice. Adapting these results to LLMs could provide further insights into what can be achieved in terms of formal guarantees for LLM safety, as stressed by Dalrymple et al. (2024). + +# 7. Conclusion + +We introduce SaP, a geometric framework for learning safety constraints in LLMs. Motivated by constrained Markov decision processes, we formulate safety as a geometric problem, introducing constraints in model representations. This view enables post-deployment control without model fine-tuning and provides interpretable insights into the learned safety mechanism. Experiment results demonstrate the effectiveness of this framework in defending against adversarial attacks while maintaining model capabilities and offering facets that naturally correspond to different safety concepts. While significant challenges remain in developing safe AI, this geometric perspective offers a promising framework for aligning and controlling model behaviors. Substantial research remains necessary, from developing more sophisticated geometric frameworks to establishing rigorous theoretical foundations for safety guarantees in large-scale models. + +# Acknowledgement + +We thank Javier Rando and Daniel Paleka for their valuable input during the development of this framework. We are grateful to the anonymous reviewers for their constructive feedback, which led to additional experiments and baselines that strengthened our arguments. We also thank Ido Hakimi, Vignesh Ram Somnath and Roni Globerman for their helpful comments on earlier versions of the manuscript. Xin Chen is supported by the Open Philanthropy AI Fellowship and the Vitalik Buterin Fellowship from the Future of Life Institute. Yarden As is supported by the ETH AI Center Fellowship and a grant of the Hasler foundation (no. 21039). The research received further support through ELSA (European Lighthouse on Secure and Safe AI) funded by the European Union under grant agreement No. 101070617. + +# Impact Statement + +The increasing capabilities and deployment of large language models (LLMs) highlight the critical importance of ensuring their safety. LLMs can generate harmful content and are vulnerable to adversarial attacks, posing significant risks. Research focused on developing robust safety measures is essential to mitigate these risks and promote the responsible development of LLMs. This work contributes to advancing the field of LLM safety by introducing a novel geometric framework for learning and enforcing safety constraints. We believe that our research can support the creation of safer and more reliable AI systems, ultimately benefiting society by reducing the potential for harm. + +# References + +Agrawal, A., Amos, B., Barratt, S., Boyd, S., Diamond, S., and Kolter, J. Z. Differentiable convex optimization layers. Advances in neural information processing systems, 2019. +Altman, E. Constrained Markov Decision Processes. Chapman and Hall, 1999. +Andriushchenko, M., Croce, F., and Flammarion, N. Jailbreaking leading safety-aligned llms with simple adaptive attacks. arXiv preprint arXiv:2404.02151, 2024. +Anthony, M. and Bartlett, P. L. Neural Network Learning: Theoretical Foundations 1st Edition by Anthony, Martin, Bartlett, Peter L. (1999) Hardcover. 1999. +Anwar, U., Saparov, A., Rando, J., Paleka, D., Turpin, M., Hase, P., Lubana, E. S., Jenner, E., Casper, S., Sourbut, O., Edelman, B. L., Zhang, Z., Gunther, M., Korinek, A., Hernandez-Orallo, J., Hammond, L., Bigelow, E., Pan, A., Langosco, L., Korbak, T., Zhang, H., Zhong, R., Chan, A., Anderljung, M., Edwards, L., Bengio, Y., Chen, D., Albanie, S., Maharaj, T., Foerster, J., Tramer, F., He, H., + +Kasirzadeh, A., Choi, Y., and Krueger, D. Foundational Challenges in Assuring Alignment and Safety of Large Language Models. 2024. +Arditi, A., Obeso, O., Syed, A., Paleka, D., Panickssery, N., Gurnee, W., and Nanda, N. Refusal in Language Models Is Mediated by a Single Direction, October 2024. +Bai, G., Liu, J., Bu, X., He, Y., Liu, J., Zhou, Z., Lin, Z., Su, W., Ge, T., Zheng, B., et al. Mt-bench-101: A fine-grained benchmark for evaluating large language models in multi-turn dialogues. arXiv preprint arXiv:2402.14762, 2024. +Barber, C. B., Dobkin, D. P., and Huhdanpaa, H. The quickhull algorithm for convex hulls. ACM Transactions on Mathematical Software (TOMS), 1996. +Bertsekas, D. Nonlinear Programming. Athena scientific optimization and computation series. Athena Scientific, 2016. +Black, S., Sharkey, L., Grinsztajn, L., Winsor, E., Braun, D., Merizian, J., Parker, K., Guevara, C. R., Millidge, B., Alfour, G., et al. Interpreting neural networks through the polytope lens. arXiv preprint arXiv:2211.12312, 2022. +Blondel, M., Berthet, Q., Cuturi, M., Frostig, R., Hoyer, S., Llinares-López, F., Pedregosa, F., and Vert, J.-P. Efficient and modular implicit differentiation. Advances in neural information processing systems, 2022. +Bradbury, J., Frostig, R., Hawkins, P., Johnson, M. J., Leary, C., Maclaurin, D., Necula, G., Paszke, A., VanderPlas, J., Wanderman-Milne, S., and Zhang, Q. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/jax-ml/jax. +Cao, B., Cao, Y., Lin, L., and Chen, J. Defending Against Alignment-Breaking Attacks via Robustly Aligned LLM, December 2023. +Casper, S., Davies, X., Shi, C., Gilbert, T. K., Scheurer, J., Rando, J., Freedman, R., Korbak, T., Lindner, D., Freire, P., Wang, T., Marks, S., Segerie, C.-R., Carroll, M., Peng, A., Christoffersen, P., Damani, M., Slocum, S., Anwar, U., Siththaranjan, A., Nadeau, M., Michaud, E. J., Pfau, J., Krasheninnikov, D., Chen, X., Langosco, L., Hase, P., Biryik, E., Dragan, A., Krueger, D., Sadigh, D., and Hadfield-Menell, D. Open Problems and Fundamental Limitations of Reinforcement Learning from Human Feedback. 2023. +Casper, S., Schulze, L., Patel, O., and Hadfield-Menell, D. Defending against unforeseen failure modes with latent adversarial training. arXiv preprint arXiv:2403.05030, 2024. + +Chao, P., Debenedetti, E., Robey, A., Andriushchenko, M., Croce, F., Sehwag, V., Dobriban, E., Flammarion, N., Pappas, G. J., Tramer, F., Hassani, H., and Wong, E. JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Models, July 2024. +Cundy, C. and Ermon, S. Sequencematch: Imitation learning for autoregressive sequence modelling with backtracking. arXiv preprint arXiv:2306.05426, 2023. +Cunningham, H., Ewart, A., Riggs, L., Huben, R., and Sharkey, L. Sparse Autoencoders Find Highly Interpretable Features in Language Models, October 2023. +Dai, J., Pan, X., Sun, R., Ji, J., Xu, X., Liu, M., Wang, Y., and Yang, Y. Safe RLHF: Safe Reinforcement Learning from Human Feedback, October 2023. +Dalal, G., Dvijotham, K., Vecerik, M., Hester, T., Paduraru, C., and Tassa, Y. Safe exploration in continuous action spaces. arXiv preprint arXiv:1801.08757, 2018. +Dalrymple, D. d., Skalse, J., Bengio, Y., Russell, S., Tegmark, M., Seshia, S., Omohundro, S., Szegedy, C., Goldhaber, B., Ammann, N., Abate, A., Halpern, J., Barrett, C., Zhao, D., Zhi-Xuan, T., Wing, J., and Tenenbaum, J. Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systems, May 2024. +Elhage, N., Hume, T., Olsson, C., Schiefer, N., Henighan, T., Kravec, S., Hatfield-Dodds, Z., Lasenby, R., Drain, D., Chen, C., Grosse, R., McCandlish, S., Kaplan, J., Amodei, D., Wattenberg, M., and Olah, C. Toy models of superposition. Transformer Circuits Thread, 2022. +Fu, T., Hou, Y., McAuley, J., and Yan, R. Unlocking decoding-time controllability: Gradient-free multi-objective alignment with contrastive prompts. arXiv preprint arXiv:2408.05094, 2024. +Gehman, S., Gururangan, S., Sap, M., Choi, Y., and Smith, N. A. Realtoxicityprompts: Evaluating neural toxic degeneration in language models. arXiv preprint arXiv:2009.11462, 2020. +Gottlieb, L.-A., Kaufman, E., Kontorovich, A., and Nivasch, G. Learning convex polytopes with margin. 2018. +Gottlieb, L.-A., Kaufman, E., Kontorovich, A., and Nivasch, G. Learning convex polyhedra with margin, November 2021. +Greenblatt, R., Shlegeris, B., Sachan, K., and Roger, F. Ai control: Improving safety despite intentional subversion. arXiv preprint arXiv:2312.06942, 2023. +Guo, C., Sablayrolles, A., Jégou, H., and Kiela, D. Gradient-based Adversarial Attacks against Text Transformers, April 2021. + +Hendrycks, D., Burns, C., Basart, S., Zou, A., Mazeika, M., Song, D., and Steinhardt, J. Measuring massive multitask language understanding. arXiv preprint arXiv:2009.03300, 2020. +Jain, N., Schwarzschild, A., Wen, Y., Somepalli, G., Kirchenbauer, J., Chiang, P.-y., Goldblum, M., Saha, A., Geiping, J., and Goldstein, T. Baseline Defenses for Adversarial Attacks Against Aligned Language Models, September 2023. +Ji, J., Liu, M., Dai, J., Pan, X., Zhang, C., Bian, C., Zhang, C., Sun, R., Wang, Y., and Yang, Y. BeaverTails: Towards Improved Safety Alignment of LLM via a Human-Preference Dataset, November 2023. +Jiang, A. Q., Sablayrolles, A., Roux, A., Mensch, A., Savary, B., Bamford, C., Chaplot, D. S., de las Casas, D., Hanna, E. B., Bressand, F., Lengyel, G., Bour, G., Lample, G., Lavaud, L. R., Saulnier, L., Lachaux, M.-A., Stock, P., Subramanian, S., Yang, S., Antoniak, S., Scao, T. L., Gervet, T., Lavril, T., Wang, T., Lacroix, T., and Sayed, W. E. Mixtral of Experts, January 2024. +Kandpal, N., Jagielski, M., Tramér, F., and Carlini, N. Back-door attacks for in-context learning with language models. arXiv preprint arXiv:2307.14692, 2023. +Kantchelian, A., Tschantz, M. C., Huang, L., Bartlett, P. L., Joseph, A. D., and Tygar, J. D. Large-Margin Convex Polytope Machine. 2014. +Lin, S., Hilton, J., and Evans, O. Truthfulqa: Measuring how models mimic human falsehoods. arXiv preprint arXiv:2109.07958, 2021. +Lindner, D., Chen, X., Tschiatschek, S., Hofmann, K., and Krause, A. Learning Safety Constraints from Demonstrations with Unknown Rewards, March 2024. +Liu, X., Xu, N., Chen, M., and Xiao, C. Autodan: Generating stealthy jailbreak prompts on aligned large language models. arXiv preprint arXiv:2310.04451, 2023. +Liu, Z., Sun, X., and Zheng, Z. Enhancing LLM Safety via Constrained Direct Preference Optimization. https://arxiv.org/abs/2403.02475v1, March 2024. +Lu, H., Peng, Z., and Yang, J. Mpax: Mathematical programming in jax. arXiv preprint arXiv:2412.09734, 2024. +Mazeika, M., Phan, L., Yin, X., Zou, A., Wang, Z., Mu, N., Sakhaee, E., Li, N., Basart, S., Li, B., Forsyth, D., and Hendrycks, D. HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusal, February 2024. + +OpenAI. Learning to Reason with LLMs, 2024. URL https://openai.com/index/ learning-to-reason-with-llms/. +Park, K., Choe, Y. J., and Veitch, V. The Linear Representation Hypothesis and the Geometry of Large Language Models, November 2023. +Park, K., Choe, Y. J., Jiang, Y., and Veitch, V. The Geometry of Categorical and Hierarchical Concepts in Large Language Models, June 2024. +Peng, X., Guo, H., Zhang, J., Zou, D., Shao, Z., Wei, H., and Liu, X. Enhancing safety in reinforcement learning with human feedback via rectified policy optimization. arXiv preprint arXiv:2410.19933, 2024. +Phute, M., Helbling, A., Hull, M., Peng, S., Szyller, S., Cornelius, C., and Chau, D. H. LLM Self Defense: By Self Examination, LLMs Know They Are Being Tricked, May 2024. +Rafailov, R., Hejna, J., Park, R., and Finn, C. From $\$ 10$ to $\$ 12$ ?: Your language model is secretly a q- function. In First Conference on Language Modeling, 2024. +Rame, A., Couairon, G., Dancette, C., Gaya, J.-B., Shukor, M., Soulier, L., and Cord, M. Rewarded soups: towards pareto-optimal alignment by interpolating weights finetuned on diverse rewards. Advances in Neural Information Processing Systems, 36, 2024. +Reuel, A., Bucknall, B., Casper, S., Fist, T., Soder, L., Aarne, O., Hammond, L., Ibrahim, L., Chan, A., Wills, P., Anderljung, M., Garfinkel, B., Heim, L., Trask, A., Mukobi, G., Schaeffer, R., Baker, M., Hooker, S., Solaiman, I., Luccioni, A. S., Rajkumar, N., Moës, N., Ladish, J., Guha, N., Newman, J., Bengio, Y., South, T., Pentland, A., Koyejo, S., Kochenderfer, M. J., and Trager, R. Open Problems in Technical AI Governance, July 2024. +Robey, A., Wong, E., Hassani, H., and Pappas, G. J. Smooth-LLM: Defending Large Language Models Against Jailbreaking Attacks, June 2024. +Sharma, M., Tong, M., Mu, J., Wei, J., Kruthoff, J., Goodfriend, S., Ong, E., Peng, A., Agarwal, R., Anil, C., et al. Constitutional classifiers: Defending against universal jailbreaks across thousands of hours of red teaming. arXiv preprint arXiv:2501.18837, 2025. +Shen, X., Chen, Z., Backes, M., Shen, Y., and Zhang, Y. "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language Models, May 2024. + +Sheshadri, A., Ewart, A., Guo, P., Lynch, A., Wu, C., Hebbar, V., Sleight, H., Stickland, A. C., Perez, E., Hadfield-Menell, D., et al. Latent adversarial training improves robustness to persistent harmful behaviors in llms. arXiv preprint arXiv:2407.15549, 2024. +Shin, T., Razeghi, Y., IV, R. L. L., Wallace, E., and Singh, S. AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts, November 2020. +Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., Bikel, D., Blecher, L., Ferrer, C. C., Chen, M., Cucurull, G., Esiobu, D., Fernandes, J., Fu, J., Fu, W., Fuller, B., Gao, C., Goswami, V., Goyal, N., Hartshorn, A., Hosseini, S., Hou, R., Inan, H., Kardas, M., Kerkez, V., Khabsa, M., Kloumann, I., Korenev, A., Koura, P. S., Lachaux, M.-A., Lavril, T., Lee, J., Liskovich, D., Lu, Y., Mao, Y., Martinet, X., Mihaylov, T., Mishra, P., Molybog, I., Nie, Y., Poulton, A., Reizenstein, J., Rungta, R., Saladi, K., Schelten, A., Silva, R., Smith, E. M., Subramanian, R., Tan, X. E., Tang, B., Taylor, R., Williams, A., Kuan, J. X., Xu, P., Yan, Z., Zarov, I., Zhang, Y., Fan, A., Kambadur, M., Narang, S., Rodriguez, A., Stojnic, R., Edunov, S., and Scialom, T. Llama 2: Open Foundation and Fine-Tuned Chat Models, July 2023. +Wachi, A., Tran, T. Q., Sato, R., Tanabe, T., and Akimoto, Y. Stepwise Alignment for Constrained Language Model Policy Optimization, October 2024. +Wallace, E., Feng, S., Kandpal, N., Gardner, M., and Singh, S. Universal Adversarial Triggers for Attacking and Analyzing NLP, January 2021. +Wang, Y., Shi, Z., Bai, A., and Hsieh, C.-J. Defending LLMs against Jailbreaking Attacks via Backtranslation, June 2024. +Wei, Z., Wang, Y., Li, A., Mo, Y., and Wang, Y. Jailbreak and Guard Aligned Language Models with Only Few In-Context Demonstrations, May 2024. +Wen, Y., Jain, N., Kirchenbauer, J., Goldblum, M., Geiping, J., and Goldstein, T. Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discovery, June 2023. +Xie, Y., Yi, J., Shao, J., Curl, J., Lyu, L., Chen, Q., Xie, X., and Wu, F. Defending ChatGPT against jailbreak attack via self-reminders. Nature Machine Intelligence, December 2023. +Yang, A., Yang, B., Hui, B., Zheng, B., Yu, B., Zhou, C., Li, C., Li, C., Liu, D., Huang, F., Dong, G., Wei, H., Lin, H., Tang, J., Wang, J., Yang, J., Tu, J., Zhang, J., Ma, J., + +Yang, J., Xu, J., Zhou, J., Bai, J., He, J., Lin, J., Dang, K., Lu, K., Chen, K., Yang, K., Li, M., Xue, M., Ni, N., Zhang, P., Wang, P., Peng, R., Men, R., Gao, R., Lin, R., Wang, S., Bai, S., Tan, S., Zhu, T., Li, T., Liu, T., Ge, W., Deng, X., Zhou, X., Ren, X., Zhang, X., Wei, X., Ren, X., Liu, X., Fan, Y., Yao, Y., Zhang, Y., Wan, Y., Chu, Y., Liu, Y., Cui, Z., Zhang, Z., Guo, Z., and Fan, Z. Qwen2 Technical Report, September 2024. +Yi, J., Xie, Y., Zhu, B., Kiciman, E., Sun, G., Xie, X., and Wu, F. Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models, March 2024. +Zeng, Y., Liu, G., Ma, W., Yang, N., Zhang, H., and Wang, J. Token-level direct preference optimization. arXiv preprint arXiv:2404.11999, 2024. +Zhang, Z., Zhang, Q., and Foerster, J. PARDEN, Can You Repeat That? Defending against Jailbreaks via Repetition, May 2024. +Zhong, Y., Ma, C., Zhang, X., Yang, Z., Chen, H., Zhang, Q., Qi, S., and Yang, Y. Panacea: Pareto alignment via preference adaptation for llms. arXiv preprint arXiv:2402.02030, 2024. +Zhou, Z., Liu, J., Shao, J., Yue, X., Yang, C., Ouyang, W., and Qiao, Y. Beyond one-preference-fits-all alignment: Multi-objective direct preference optimization. In Findings of the Association for Computational Linguistics ACL 2024, 2024. +Zou, A., Wang, Z., Carlini, N., Nasr, M., Kolter, J. Z., and Fredrikson, M. Universal and Transferable Adversarial Attacks on Aligned Language Models, December 2023. +Zou, A., Phan, L., Wang, J., Duenas, D., Lin, M., Andriushchenko, M., Wang, R., Kolter, Z., Fredrikson, M., and Hendrycks, D. Improving Alignment and Robustness with Circuit Breakers, June 2024. + +# A. Entropy-based Heuristic Facet Assignment Strategy + +Following the Convex Polytope Machine (Kantchelian et al., 2014) algorithm, we use an entropy-based heuristic strategy to select constraint violations while preventing overreliance on individual facets. For each unsafe example $x$ where $y = -1$ , rather than simply choosing the facet $k$ with maximum violation $\max_k (\phi_k^\top \tilde{\mathbf{f}} - \tilde{\xi}_k)$ , the method considers the set of valid facets $\mathcal{K}_{\mathrm{valid}}$ whose violations exceed a threshold $\tau$ : + +$$ +\mathcal {K} _ {\text {v a l i d}} = \left\{k: \phi_ {k} ^ {\top} \tilde {\mathbf {f}} - \tilde {\xi} _ {k} > \tau \right\} \tag {3} +$$ + +The entropy of facet assignments is computed across the set of unsafe examples $\mathcal{U}$ as: + +$$ +H (\mathcal {K}) = - \sum_ {k = 1} ^ {K} p _ {k} \log_ {2} p _ {k} \tag {4} +$$ + +where $p_k = \frac{|\{x \in \mathcal{U} : k = z(x)\}|}{|\mathcal{U}|}$ is the proportion of unsafe examples assigned to facet $k$ . + +Algorithm 2 Entropy-based facet Assignment +Require: Feature matrix $\tilde{\mathbf{f}}$ labels $y$ constraint matrix $\phi$ ,thresholds $\tilde{\xi}$ +Require: Valid facet threshold $\tau$ entropy threshold $h_\mathrm{target}$ max attempts $T$ +1: $\mathcal{U}\gets \{i:y_i = -1\}$ +2: $k_{i}\gets \arg \max_{k}(\phi_{k}^{\top}\tilde{\mathbf{f}}_{i} - \tilde{\xi}_{k})$ for all $i\in \mathcal{U}$ +3: $H\gets$ ComputeEntropy( $\{k_i\}_{i\in \mathcal{U}}$ +4: while $H < h_{\mathrm{target}}$ and attempts $< T$ do +5: Sample $i$ randomly from U +6: $\mathcal{K}_{\mathrm{valid}}\gets \{k:\phi_k^\top \tilde{\mathbf{f}}_i - \tilde{\xi}_k > \tau \}$ +7: Sample $k_{\mathrm{new}}$ randomly from $\mathcal{K}_{\mathrm{valid}}$ +8: $H_{\mathrm{new}}\gets$ ComputeEntropy( $\{k_i\}_{i\in \mathcal{U}}\cup \{k_{\mathrm{new}}\}$ +9: if $H_{\mathrm{new}} > H$ then +10: $k_{i}\gets k_{\mathrm{new}}$ +11: $H\gets H_{\mathrm{new}}$ +12: end if +13: end while +output Facet assignments $\{k_i\}_{i\in \mathcal{U}}$ + +Set of unsafe examples Initial assignments + +The algorithm iteratively attempts to increase assignment entropy by randomly selecting alternative facets from $\mathcal{K}_{\mathrm{valid}}$ while maintaining strong constraint violations. The target entropy threshold $h_{\mathrm{target}}$ is heuristically set to $\frac{1}{2}\log_2K$ , where $K$ is the total number of facets. $\tau$ is set to 0. This approach ensures diverse facet utilization across unsafe examples while preserving the effectiveness of the safety constraints. + +# B. Steering via Lagrangian Relaxation + +Building on the learned polytope facets, SaP implements directional steering in the model's representation space to constrain generation while minimizing disruption to the model's capabilities. This approach enables fine-grained safety control through local activation editing, avoiding the need for model fine-tuning or prompt engineering. + +One way to solve the constrained problem in Equation (2) is through a Lagrangian relaxation. To this end, in practice, we perform 100 gradient steps on the following loss function + +$$ +\min _ {\boldsymbol {h}} \left\| \bar {\pi} _ {l} (\boldsymbol {x}) - \boldsymbol {h} \right\| _ {1} + \lambda_ {\text {s a f e}} \sum_ {k = 1} ^ {K} \left[ \phi_ {k} ^ {\top} \mathrm {E} _ {C} (\boldsymbol {h}) - \tilde {\xi} _ {k} \right] _ {-} + \lambda_ {\text {u n s a f e}} \sum_ {k = 1} ^ {K} \left[ \phi_ {k} ^ {\top} \mathrm {E} _ {C} (\boldsymbol {h}) - \tilde {\xi} _ {k} \right] _ {+} +$$ + +where $h$ is the edited activation, $\mathrm{E}_C(h)$ is its corresponding encoded feature, $[\cdot]_+ = \max(0, \cdot)$ denotes the positive part, and $[\cdot]_- = \min(0, \cdot)$ denotes the negative part. The hyperparameters $\lambda_{\text{safe}}$ and $\lambda_{\text{unsafe}}$ control the penalties for negative and positive violations respectively, allowing for asymmetric treatment of constraint violations. + +# C. Harmbench Training Setup and Results + +# C.1. Harmbench Training Setup + +In Harmbench (Mazeika et al., 2024), we save the per-token representation at layer 20 during the original model output generation (with attacked inputs). The total training dataset size is num_sentences $\times$ tokens_per_sentence. If an output sentence is marked as unsafe, we label all token representations in the sentence as unsafe, and vice versa. For each model (Llama, Mistral, Qwen), we use its default system prompt template when inferencing both the original and the steered model. + +For the polytope training phase, we use the Adam optimizer with a learning rate of $10^{-2}$ and batch size of 128. The feature extractor projects hidden states to a 16,384-dimensional space followed by ReLU activation. The loss function uses an entropy weight 1.0 and feature L1 regularization weight $\lambda_{\phi} = 1.0$ . The margin parameter $\kappa$ varies across model architectures: 60.0 for Llama-2 7B, 5.0 for Ministrial 8B, and 30.0 for Qwen2 1.5B, reflecting different geometric requirements in their respective representation spaces. + +During the steering phase, we apply hidden state optimization at layer 20 with model-specific configurations. For Llama-2 7B, we set $\lambda_{\mathrm{unsafe}} = 4.0$ and $\lambda_{\mathrm{safe}} = 10^{-4}$ for the optimization objective. Ministral 8B uses $\lambda_{\mathrm{unsafe}} = 0.25$ without safety violation penalty ( $\lambda_{\mathrm{safe}} = 0$ ). For Qwen2 1.5B, we set $\lambda_{\mathrm{unsafe}} = 10.0$ and $\lambda_{\mathrm{safe}} = 5000$ . All models are quantized to 16-bit precision (float16 for Llama-2 and bffloat16 for Ministral and Qwen) to reduce memory requirements while maintaining numerical stability. + +# C.2. Harmbench Main Results + +Figure 2 is created by aggregating the average of each defense method's performance over all 7 attack algorithms. We present detailed Llama-2 7B results in Table 2 and Table 3, Ministral-8B results in Table 4 and Table 5, and Qwen2-1.5B results in Table 6 and Table 7. We perform experiments in the same setup with prompt-based baselines Self Reminder (Xie et al., 2023), Response Check (Wang et al., 2024), and SmoothLLM (Robey et al., 2024), implemented in the BackTranslation code base (Wang et al., 2024). + +We also implemented rejection sampling, which uses the polytope classifier. Instead of steering when a token is detected unsafe, it immediately modifies the current token output to be "Sorry". It empirically works well for defense, but might result in over-rejecting reasonable requests, as shown in the MMLU results (Table 8). All methods' results (mean ± standard deviation) are obtained over 5 seeds. Table 10 shows results over 7 attack algorithms for each model, when trained with and without the concept encoder. + +Table 2: Defense comparison for Llama2-7B across different attack methods. Lower values indicate better defense effectiveness (0 means perfect defense). Each method is evaluated over 5 seeds. + +
Attack MethodOriginalSteeringRejectionResponse CheckSelf ReminderSmoothLLM
AutoDAN1.770.00 ± 0.000.00 ± 0.000.51 ± 0.000.00 ± 0.002.33 ± 0.33
AutoPrompt16.50.00 ± 0.000.05 ± 0.118.25 ± 0.001.25 ± 0.0010.30 ± 1.58
DirectRequest1.00.00 ± 0.000.05 ± 0.110.50 ± 0.000.00 ± 0.006.50 ± 0.64
GBDA00.00 ± 0.000.00 ± 0.000.06 ± 0.040.00 ± 0.004.21 ± 0.39
GCG300.40 ± 0.290.10 ± 0.2213.00 ± 0.002.50 ± 0.0012.10 ± 0.68
HumanJailbreaks0.50.00 ± 0.000.01 ± 0.020.09 ± 0.010.05 ± 0.002.19 ± 0.45
PEZ00.00 ± 0.000.00 ± 0.000.00 ± 0.000.00 ± 0.004.03 ± 0.48
UAT6.50.00 ± 0.000.00 ± 0.002.75 ± 0.000.50 ± 0.008.45 ± 0.65
AdaptiveAttack602.00 ± 0.000.00 ± 0.000.00 ± 0.002.00 ± 0.002.04 ± 0.00
+ +Table 3: MLP defense comparison for Llama2-7B across different attack methods, evaluated over 5 seeds. Lower values indicate better defense effectiveness. + +
Attack MethodOriginalMLPMLP+5
AutoDAN1.770.25 ± 0.000.25 ± 0.00
AutoPrompt16.512.80 ± 0.2712.85 ± 0.14
DirectRequest1.00.30 ± 0.110.25 ± 0.00
GBDA00.00 ± 0.000.00 ± 0.00
GCG3027.10 ± 0.2926.90 ± 0.29
HumanJailbreaks0.50.34 ± 0.260.24 ± 0.02
PEZ00.00 ± 0.000.00 ± 0.00
UAT6.54.75 ± 0.184.75 ± 0.00
AdaptiveAttack600.00 ± 0.000.00 ± 0.00
+ +Table 4: Defense comparison for Mistral-8B across different attack methods. Lower values indicate better defense effectiveness (0 means perfect defense). Each method is evaluated over 5 seeds. + +
Attack MethodOriginalSteeringRejectionResponse CheckSelf ReminderSmoothLLM
AutoDAN66.751.35 ± 0.490.00 ± 0.001.50 ± 0.0011.50 ± 0.0019.38 ± 1.94
AutoPrompt48.32.79 ± 1.640.51 ± 0.257.88 ± 0.0013.94 ± 0.0040.36 ± 2.63
DirectRequest42.81.20 ± 0.540.33 ± 0.135.25 ± 0.002.50 ± 0.0016.30 ± 2.18
GBDA62.81.26 ± 1.100.10 ± 0.2314.62 ± 4.376.75 ± 0.0036.75 ± 8.71
GCG67.51.90 ± 1.100.08 ± 0.135.75 ± 0.0026.50 ± 0.0032.35 ± 2.00
HumanJailbreaks39.41.15 ± 0.680.01 ± 0.022.36 ± 0.139.65 ± 0.0117.41 ± 0.88
PEZ33.61.14 ± 0.400.00 ± 0.0011.38 ± 4.791.97 ± 0.0027.00 ± 10.63
UAT40.82.45 ± 1.040.54 ± 0.256.25 ± 0.004.50 ± 0.0024.65 ± 3.09
AdaptiveAttack10014.00 ± 0.000.00 ± 0.0097.33 ± 0.9490.00 ± 0.0097.33 ± 0.94
+ +Table 5: MLP defense comparison for Ministrial-8B across different attack methods, evaluated over 5 seeds. Lower values indicate better defense effectiveness. + +
Attack MethodOriginalMLPMLP+5
AutoDAN66.7516.90 ± 5.1417.80 ± 1.34
AutoPrompt48.374.30 ± 2.0473.58 ± 1.58
DirectRequest42.820.50 ± 1.0620.35 ± 1.29
GBDA62.866.31 ± 22.8280.91 ± 3.12
GCG67.560.35 ± 0.6361.10 ± 0.82
HumanJailbreaks39.427.96 ± 8.0325.62 ± 1.75
PEZ33.632.72 ± 12.7732.81 ± 15.03
UAT40.849.90 ± 1.0749.25 ± 1.38
AdaptiveAttack10016.00 ± 0.0016.00 ± 0.00
+ +# D. BeaverTails Training Setup and Results + +# D.1. Mutual Information Calculation Details + +For BeaverTails (Ji et al., 2023), the Mutual Information (MI) between each safety category and each facet's violations are computed using scikit-learn's mutual_information_score function. We compare the facets training from two polytopes, both share the same set of hyperparameters, and the only difference is whether the Concept Encoder is included in the training. They are both trained with 50 facets, trained on the full BeaverTails dataset over 20 epochs, optimized with Adam optimizer with learning rate 0.01, batch size 128, and $\lambda_{\phi} 0.01$ . The polytope trained with Concept Encoder has an encoded feature dimension 16384, $\lambda_{\tilde{F}} 1.0$ , and a margin 2.0. + +Table 6: Defense comparison for Qwen-1.5B across different attack methods. Lower values indicate better defense effectiveness (0 means perfect defense). Each method is evaluated over 5 seeds. + +
Attack MethodOriginalSteeringRejectionResponse CheckSelf ReminderSmoothLLM
AutoDAN45.000.80 ± 0.820.67 ± 0.0038.25 ± 0.0030.50 ± 0.006.85 ± 1.27
AutoPrompt17.901.16 ± 0.552.83 ± 1.0923.74 ± 0.003.54 ± 0.006.77 ± 1.20
DirectRequest13.250.15 ± 0.220.60 ± 0.295.00 ± 0.002.00 ± 0.005.60 ± 1.04
GBDA19.451.42 ± 0.873.02 ± 0.5220.63 ± 2.413.40 ± 0.008.54 ± 0.63
GCG25.001.00 ± 0.692.64 ± 2.4345.00 ± 0.0022.86 ± 0.0011.43 ± 1.16
HumanJailbreaks4.140.18 ± 0.130.28 ± 0.235.40 ± 0.004.00 ± 0.004.42 ± 0.50
PEZ10.900.45 ± 0.441.06 ± 0.744.85 ± 0.000.75 ± 0.004.63 ± 0.48
UAT12.501.15 ± 0.522.70 ± 1.1414.75 ± 0.001.75 ± 0.007.30 ± 1.56
AdaptiveAttack100100.00 ± 0.0090.00 ± 0.00100.00 ± 0.00100.00 ± 0.00100.00 ± 0.00
+ +Table 7: MLP defense comparison for Qwen-1.5B across different attack methods, evaluated over 5 seeds. Lower values indicate better defense effectiveness. + +
Attack MethodOriginalMLPMLP+5
AutoDAN45.003.75 ± 1.5612.85 ± 14.36
AutoPrompt17.908.23 ± 1.6214.29 ± 12.29
DirectRequest13.253.10 ± 0.634.00 ± 2.67
GBDA19.459.92 ± 1.4416.80 ± 11.80
GCG25.0010.57 ± 3.3518.43 ± 21.13
HumanJailbreaks4.142.26 ± 0.554.17 ± 4.38
PEZ10.92.81 ± 0.505.07 ± 2.21
UAT12.56.75 ± 1.0810.95 ± 6.36
AdaptiveAttack100100.00 ± 0.00100.00 ± 0.00
+ +Table 8: MMLU accuracy (%) comparison across different defense methods. Results show that most defense methods maintain original model performance, with some exceptions for rejection and self-reminder strategies. + +
MethodLlama2-7BMinistral-8BQwen2-1.5B
Original45.863.452.7
Steering45.763.352.7
Rejection44.628.551.2
ICL45.865.155.4
Response Check45.865.155.4
Self Reminder45.822.922.9
SmoothLLM45.865.155.4
MLP45.863.455.4
MLP+545.863.455.4
+ +# D.2. BeaverTails Training Hyperparameters + +We conduct polytope training on all BeaverTails classes. We first obtain the (human question, model answer) pairs from the dataset, formatting the input as f" {humanQuestion} \n{model_answer}" using Python f-string without any other prompts. We observe that this works better for classifying safety concepts than other basic types of input prompting. We then obtain the activation for each sentence at a model's layer $l$ at the sentence's last word. + +The polytope model is optimized using Adam with a learning rate of $10^{-2}$ and batch size of 128. For facet assignment, we use a valid facet threshold $\tau = 0.0$ . The concept encoder uses a feature dimension of 16,384. The training runs for 20 epochs. + +Table 9: Model performance across turns in MT-Bench. There are fluctuations in LLM-based judges' scores, but all models produce coherent and high-quality sentences, without signs of rejections. + +
ModelFirst TurnSecond TurnAverage
Llama2-7B6.545.466.00
Llama2-7B + SaP6.986.216.59
Ministral-8B7.556.987.26
Ministral-8B + SaP9.017.648.33
Qwen-1.5B6.905.156.03
Qwen-1.5B + SaP6.294.705.49
+ +Table 10: Attack success rate comparison between models, with and without Concept Encoder. Results show mean ± standard deviation across different attack methods. + +
MethodLlama-2 7BMinistral-8BQwen2 1.5B
Without CEWith CEWithout CEWith CEWithout CEWith CE
AutoPrompt10.7 ± 0.00.00 ± 0.0073.3 ± 0.02.79 ± 1.640.45 ± 0.331.16 ± 0.55
DirectRequest0.0 ± 0.00.00 ± 0.0021.5 ± 0.01.20 ± 0.540.15 ± 0.140.15 ± 0.22
GBDA0.0 ± 0.00.00 ± 0.0082.3 ± 0.01.26 ± 1.100.71 ± 0.281.42 ± 0.87
GCG26.5 ± 0.00.40 ± 0.2960.8 ± 0.01.90 ± 1.100.57 ± 0.541.00 ± 0.69
HumanJailbreaks0.3 ± 0.00.00 ± 0.0024.7 ± 0.01.15 ± 0.680.08 ± 0.080.18 ± 0.13
PEZ0.0 ± 0.00.00 ± 0.0048.0 ± 0.01.14 ± 0.400.32 ± 0.070.45 ± 0.44
UAT4.0 ± 0.00.00 ± 0.0050.2 ± 0.02.45 ± 1.040.45 ± 0.331.15 ± 0.52
+ +![](images/137d8634995927c6ba89cb2c376d9694df92d482b4d04e5285ce5f6084ad2009.jpg) + +![](images/f060cf3c0b3a6b1d77446caaa31bc2ba8e45e73b9a82a7d6d524ea6d0abc1140.jpg) + +![](images/5e9a05c2d97d7c63e5d702be0356d4c1d75c4f7f27b555182e0ecf4eef2bc5c5.jpg) + +![](images/2004f94314d1ecdd14525aaa8869505d63da46a9c505b2a0050a16e9279a25b9.jpg) +Figure 7: KL divergence analysis revealing semantic specialization of SaP's facets on BeaverTail's terrorism dataset. Facets can activate at one single concept (top row plots), or multiple concepts (bottom row plots) + +![](images/2dfb5a79b042de031a02ed4fb42faa15b59448c7a8f1fef99754ec778491e6c0.jpg) + +![](images/e69b74d05ba55931978956d58b29f13dcb230ab0cc4f24eb17b4209fe2a082a7.jpg) + +We empirically find that margin parameter $\kappa$ and the polytope sparsity weight $\lambda_{\phi}$ significantly influence model performance. Different safety categories and model architectures require different hyperparameter values for optimal performance. Table 11 shows hyperparameters for Llama2-7B, and Table 12 and 13 show hyperparameters for Ministral-8B and Qwen2-1.5B respectively. + +Table 11: Category-specific hyperparameters for BeaverTails for Llama2-7B. The last row "All data" shows the hyperparameters used to train all BeaverTails data. + +
CategoryMarginλφ
Animal abuse0.50.01
Child abuse0.70.01
Politics3.00.0001
Discrimination2.00.0001
Drug abuse1.00.01
Financial crime2.00.01
Hate speech10.00.0001
Misinformation0.80.0001
Unethical behavior20.00.0001
Privacy violation1.00.01
Self-harm1.00.0001
Adult content1.00.01
Terrorism1.00.01
Violence20.00.0001
All data20.00.01
+ +Table 12: Category-specific hyperparameters for BeaverTails for Ministrial-8B. The last row "All data" shows the hyperparameters used to train all BeaverTails data. + +
CategoryMarginλφ
Animal abuse1.00.0001
Child abuse0.80.0001
Politics10.00.0001
Discrimination10.00.0001
Drug abuse2.00.0001
Financial crime2.00.0001
Hate speech1.00.0001
Misinformation10.00.0001
Unethical behavior15.00.0001
Privacy violation2.00.0001
Self-harm2.00.01
Adult content0.60.01
Terrorism0.60.01
Violence2.00.01
All data20.00.0001
+ +# D.3. BeaverTails Results + +We present test accuracy results across different configurations of facets of Llama2-7B, Ministral-8B, and Qwen2-1.5B in Tables 14, 15, and 16 respectively. For each category, we additionally run learning on a multi-layer perceptron (MLP) classifier using the same representation inputs. For fair comparison, the MLP is defined to have a similar model size with the polytope trained for each safety category. The MLP architecture has two layers and a classification head: + +- The first layer is $\mathrm{ReLU}(W_1\bar{\pi}_l(\pmb{x}) + b_1)$ , with $\bar{\pi}_l(\pmb{x})$ being the LLM activation at layer $l$ (i.e., the same representation input as the one used in polytope training). This layer has the same number of parameters as the concept encoder, with $W_1 \in \mathbb{R}^{16384 \times d_l}$ , $b_1 \in \mathbb{R}^{16384}$ . +- We then add a second layer $\mathrm{ReLU}(W_2x_1 + b_2)$ , with $W_{2}\in \mathbb{R}^{n_{\mathrm{facet}}\times 16384}$ , with $x_{1}$ being the output of the first layer, $b_{1}\in \mathbb{R}^{n_{\mathrm{facet}}}$ matching the parameter size of the polytope $\phi$ and $\tilde{\xi}$ . + +Table 13: Category-specific hyperparameters for BeaverTails for Qwen-1.5B. The last row "All data" shows the hyperparameters used to train all BeaverTails data. + +
CategoryMarginλφ
Animal abuse15.00.0001
Child abuse2.00.01
Politics20.00.0001
Discrimination10.00.0001
Drug abuse15.00.0001
Financial crime10.00.0001
Hate speech0.80.01
Misinformation0.80.01
Unethical behavior15.00.0001
Privacy violation2.00.0001
Self-harm2.00.0001
Adult content3.00.0001
Terrorism0.90.0001
Violence10.00.0001
All data10.00.01
+ +- To perform classification, MLP has an additional classification head defined by $\operatorname{Softmax}(W_3x_2 + b_3)$ , where $x_2$ is the second layer output, $W_3 \in \mathbb{R}^{2 \times n_{\mathrm{facet}}}$ , $b_3 \in \mathbb{R}^2$ . It outputs the model's estimated probability whether an input is safe or unsafe (i.e., 2 classes). Hence, for each category, the MLP has $n_{\mathrm{facet}} \times 2 + 2$ more parameters than the SaP polytope. + +The MLP is trained using cross-entropy loss and an Adam optimizer with learning rate 0.0001. We present the results in Table 17. More KL divergence analysis on SaP's facets are presented in Table 7. + +Table 14: Test accuracy (%) comparison across different numbers of facets for each category in Llama2-7B. Results show mean ± standard deviation. Bold numbers indicate the selected configuration in our final model. + +
Category1 facet10 facets20 facets30 facets40 facets50 facets60 facets
Animal abuse60.0 ± 18.092.0 ± 3.093.0 ± 1.492.0 ± 3.091.0 ± 4.093.0 ± 1.089.0 ± 2.0
Child abuse85.0 ± 8.091.8 ± 2.289.0 ± 4.088.0 ± 1.088.0 ± 2.087.0 ± 2.089.0 ± 3.0
Politics82.0 ± 3.082.0 ± 1.082.0 ± 2.084.1 ± 0.580.0 ± 2.081.0 ± 1.080.0 ± 2.0
Discrimination86.0 ± 2.081.0 ± 5.085.0 ± 2.085.0 ± 2.092.8 ± 1.882.0 ± 4.082.0 ± 3.0
Drug abuse93.7 ± 0.889.0 ± 7.092.0 ± 1.090.0 ± 2.090.0 ± 3.091.0 ± 1.092.0 ± 1.0
Financial crime92.6 ± 1.092.0 ± 1.090.0 ± 2.087.0 ± 6.088.0 ± 1.091.0 ± 1.090.0 ± 2.0
Hate speech80.0 ± 8.088.3 ± 0.782.0 ± 3.080.0 ± 6.084.0 ± 2.080.0 ± 9.083.0 ± 4.0
Misinformation55.0 ± 9.075.5 ± 1.171.0 ± 7.072.0 ± 2.067.0 ± 6.069.0 ± 2.070.0 ± 2.0
Unethical behavior83.0 ± 6.085.0 ± 1.085.0 ± 1.085.0 ± 1.087.5 ± 0.684.0 ± 1.081.0 ± 4.0
Privacy violation89.0 ± 5.094.0 ± 2.092.0 ± 1.092.0 ± 2.093.0 ± 1.091.0 ± 2.092.0 ± 1.0
Self-harm90.0 ± 3.093.0 ± 2.091.0 ± 2.093.0 ± 3.092.0 ± 3.092.0 ± 2.092.5 ± 1.6
Adult content90.0 ± 3.093.5 ± 1.091.0 ± 2.090.0 ± 2.089.0 ± 2.089.0 ± 2.086.0 ± 3.0
Terrorism90.0 ± 3.091.0 ± 2.089.1 ± 1.192.0 ± 1.088.0 ± 5.090.0 ± 3.085.0 ± 9.0
Violence87.0 ± 2.087.0 ± 2.087.0 ± 3.086.0 ± 3.090.9 ± 0.586.0 ± 3.086.0 ± 3.0
+ +Table 15: Test accuracy (%) comparison across different numbers of facets for each category in Ministrial-8B. Results show mean ± standard deviation. Bold numbers indicate the selected configuration in our final model. + +
Category1 facet10 facets20 facets30 facets40 facets50 facets60 facets
Animal abuse50.0 ± 0.080.0 ± 20.093.6 ± 1.488.0 ± 6.080.0 ± 17.061.0 ± 11.084.0 ± 4.0
Child abuse86.0 ± 6.089.9 ± 1.385.0 ± 2.086.0 ± 4.088.0 ± 1.088.0 ± 2.085.0 ± 2.0
Politics86.9 ± 0.476.0 ± 5.062.0 ± 13.057.0 ± 8.076.0 ± 6.073.0 ± 8.065.0 ± 17.0
Discrimination82.0 ± 2.076.0 ± 11.061.0 ± 13.078.0 ± 6.070.0 ± 9.087.2 ± 0.369.0 ± 13.0
Drug abuse93.7 ± 0.868.0 ± 14.084.0 ± 14.073.0 ± 16.073.0 ± 20.082.0 ± 19.088.0 ± 7.0
Financial crime92.6 ± 1.091.0 ± 1.091.0 ± 1.091.0 ± 1.090.0 ± 2.090.0 ± 1.091.0 ± 1.0
Hate speech86.0 ± 4.088.3 ± 0.782.0 ± 7.085.0 ± 3.087.0 ± 2.081.0 ± 4.081.0 ± 3.0
Misinformation56.0 ± 12.075.5 ± 1.173.0 ± 2.070.0 ± 7.071.0 ± 2.072.0 ± 3.068.0 ± 8.0
Unethical behavior85.0 ± 2.085.0 ± 1.087.8 ± 0.686.0 ± 0.084.0 ± 1.082.0 ± 4.082.0 ± 5.0
Privacy violation84.0 ± 10.094.0 ± 2.093.0 ± 2.091.0 ± 3.091.0 ± 5.093.0 ± 2.091.0 ± 4.0
Self-harm91.0 ± 2.091.0 ± 6.092.5 ± 1.691.0 ± 2.092.0 ± 2.089.0 ± 3.093.0 ± 2.0
Adult content92.0 ± 3.093.5 ± 1.091.0 ± 3.093.0 ± 2.093.0 ± 0.092.0 ± 2.091.0 ± 2.0
Terrorism87.0 ± 5.089.0 ± 1.089.1 ± 1.188.0 ± 1.089.0 ± 1.088.0 ± 1.087.0 ± 2.0
Violence88.0 ± 4.090.0 ± 1.088.0 ± 3.090.9 ± 0.587.0 ± 2.086.0 ± 4.089.0 ± 1.0
+ +Table 16: Test accuracy (%) comparison across different numbers of facets for each category in Qwen2-1.5B. Results show mean ± standard deviation. Bold numbers indicate the selected configuration in our final model. + +
Category1 facet10 facets20 facets30 facets40 facets50 facets60 facets
Animal abuse93.5 ± 1.189.0 ± 6.088.0 ± 5.084.0 ± 7.084.0 ± 7.086.0 ± 4.083.0 ± 10.0
Child abuse83.0 ± 8.086.2 ± 2.285.0 ± 2.083.0 ± 3.084.0 ± 3.085.0 ± 2.082.0 ± 4.0
Politics81.0 ± 3.080.0 ± 6.077.0 ± 8.077.0 ± 6.078.0 ± 2.083.3 ± 1.077.0 ± 7.0
Discrimination76.0 ± 6.076.0 ± 5.078.0 ± 3.085.3 ± 0.476.0 ± 10.080.0 ± 4.081.0 ± 1.0
Drug abuse90.0 ± 3.088.0 ± 6.092.6 ± 0.987.0 ± 8.090.0 ± 1.089.0 ± 4.089.0 ± 5.0
Financial crime90.0 ± 3.088.0 ± 3.091.0 ± 1.089.0 ± 2.089.0 ± 4.089.0 ± 1.084.8 ± 1.2
Hate speech82.0 ± 5.084.8 ± 1.282.0 ± 3.083.0 ± 5.085.0 ± 2.084.0 ± 1.085.0 ± 1.0
Misinformation50.0 ± 0.063.0 ± 7.071.0 ± 2.071.5 ± 2.469.0 ± 1.067.0 ± 5.068.0 ± 5.0
Unethical behavior81.0 ± 7.083.0 ± 3.086.3 ± 0.782.0 ± 4.080.0 ± 3.083.0 ± 1.082.0 ± 1.0
Privacy violation90.0 ± 3.088.0 ± 4.090.0 ± 2.089.0 ± 2.093.1 ± 0.491.0 ± 1.088.0 ± 2.0
Self-harm77.0 ± 14.086.0 ± 4.090.4 ± 1.688.0 ± 3.088.0 ± 2.088.0 ± 2.087.0 ± 2.0
Adult content89.0 ± 1.091.5 ± 0.585.0 ± 3.088.0 ± 4.086.0 ± 2.088.0 ± 2.086.0 ± 5.0
Terrorism85.0 ± 6.090.0 ± 1.088.0 ± 3.088.0 ± 2.088.0 ± 2.089.7 ± 1.689.0 ± 2.0
Violence85.0 ± 3.081.0 ± 9.072.0 ± 15.088.2 ± 1.384.0 ± 2.086.0 ± 2.084.0 ± 3.0
+ +Table 17: Classification accuracy (%) on the BeaverTails dataset. Results show mean ± standard deviation across different safety categories. MLP uses an architecture with a similar amount of Safety Polytope parameters, but has additional parameters in the classification layer. + +
CategoryLlama2-7BMinistral-8BQwen2-1.5B
1 facetSaPMLP1 facetSaPMLP1 facetSaPMLP
Animal abuse60.0 ± 18.093.0 ± 1.096.050.0 ± 0.093.6 ± 1.495.593.5 ± 1.193.5 ± 1.194.8
Child abuse85.0 ± 8.091.8 ± 2.292.886.0 ± 6.089.9 ± 1.391.783.0 ± 8.086.2 ± 2.287.6
Politics82.0 ± 3.084.1 ± 0.584.186.9 ± 0.486.9 ± 0.486.881.0 ± 3.083.3 ± 1.085.1
Discrimination86.0 ± 2.092.8 ± 1.888.982.0 ± 2.087.2 ± 0.388.476.0 ± 6.085.3 ± 0.487.0
Drug abuse93.7 ± 0.893.7 ± 0.895.193.7 ± 0.893.7 ± 0.895.990.0 ± 3.092.6 ± 0.993.6
Financial crime92.6 ± 1.092.6 ± 1.094.092.6 ± 1.092.6 ± 1.094.790.0 ± 3.091.0 ± 1.093.5
Hate speech80.0 ± 8.088.3 ± 0.788.586.0 ± 4.088.3 ± 0.788.382.0 ± 5.085.0 ± 2.086.9
Misinformation55.0 ± 9.075.5 ± 1.171.756.0 ± 12.075.5 ± 1.177.650.0 ± 0.071.5 ± 2.474.5
Unethical behavior83.0 ± 6.087.5 ± 0.688.885.0 ± 2.087.8 ± 0.688.381.0 ± 7.086.3 ± 0.786.8
Privacy violation89.0 ± 5.094.0 ± 2.094.984.0 ± 10.094.0 ± 2.096.290.0 ± 3.093.1 ± 0.494.7
Self-harm90.0 ± 3.093.0 ± 2.092.691.0 ± 2.093.0 ± 2.094.377.0 ± 14.090.4 ± 1.689.7
Adult content90.0 ± 3.093.5 ± 1.092.792.0 ± 3.093.5 ± 1.094.189.0 ± 1.091.5 ± 0.591.3
Terrorism90.0 ± 3.092.0 ± 1.092.787.0 ± 5.090.0 ± 1.090.085.0 ± 6.090.0 ± 1.092.3
Violence87.0 ± 2.090.9 ± 0.591.688.0 ± 4.090.9 ± 0.591.985.0 ± 3.088.2 ± 1.390.6
All data81.2 ± 0.282.2 ± 0.483.980.2 ± 0.582.2 ± 0.883.979.5 ± 0.880.3 ± 1.083.1
+ +# E. Polytope Sample Complexity + +We present the current theoretical results of learning a polytope. Note that these results make 3 important assumptions: (i) reliance on certain restricted encoder nature; (ii) perfect data separability by the polytope; (iii) the feasibility of finding a solution. + +The following theorem is derived from (Gottlieb et al., 2021), which establishes the fat-shattering dimension of $\gamma$ -fat $t$ -polyhedra. + +Theorem E.1 (Theorem 2.2, Gottlieb et al. (2021)). The class of $\gamma$ -fat $t$ -polyhedra in $\mathbb{R}^d$ , with at most $t$ hyperplanes, has a fat-shattering dimension of order: + +$$ +D = O \left(\frac {t \log t}{\gamma^ {2}}\right), +$$ + +where $t$ is the number of hyperplanes defining the polyhedron, and $\gamma$ is the margin. + +This result provides the fat-shattering dimension $D$ for our hypothesis class (the class of $\gamma$ -fat polytopes), which we will use to derive the sample complexity. + +The second theorem we rely on is a general result from Anthony & Bartlett (1999), which gives a sample complexity bound based on the fat-shattering dimension. + +Theorem E.2 (Theorem 19.1, Anthony & Bartlett (1999)). Suppose that $F$ is a class of functions mapping from a domain $X$ into the real interval [0, 1], and suppose also that $F$ has finite fat-shattering dimension. Let $\mathcal{A}$ be any approximate-SEM algorithm for $F$ and define, for $z \in Z^m$ , $L(z) = \mathcal{A}(z, \epsilon_0 / 6)$ , where $\epsilon_0 = 16 / \sqrt{m}$ . Then $L$ is a learning algorithm for $F$ , and its sample complexity satisfies + +$$ +m (\epsilon , \delta) \leq \frac {2 5 6}{\epsilon^ {2}} \left(1 8 \mathrm {f a t} _ {F} \left(\frac {\epsilon}{2 5 6}\right) \ln^ {2} \left(\frac {1 2 8}{\epsilon}\right) + \ln \left(\frac {1 6}{\delta}\right)\right) +$$ + +for all $\epsilon, \delta > 0$ . + +Using big-O notation, we simplify this to the following form: + +$$ +m (\epsilon , \delta) = O \left(\frac {1}{\epsilon^ {2}} \left(\operatorname {f a t} _ {F} (\epsilon) \log^ {2} \left(\frac {1}{\epsilon}\right) + \log \left(\frac {1}{\delta}\right)\right)\right). +$$ + +We now state and prove the main result, which gives the sample complexity bound for learning $\gamma$ -fat polytopes. + +Corollary E.3 (Sample complexity of $\gamma$ -fat polytopes). Let $\mathcal{H}$ be the class of $\gamma$ -fat $t$ -polyhedra in $\mathbb{R}^d$ . The sample complexity $m(\epsilon, \delta)$ required to learn a polytope from $\mathcal{H}$ with accuracy $\epsilon$ and confidence $1 - \delta$ is bounded by: + +$$ +m (\epsilon , \delta) = O \left(\frac {1}{\epsilon^ {2}} \left(\frac {t \log t}{\gamma^ {2}} \log^ {2} \left(\frac {1}{\epsilon}\right) + \log \left(\frac {1}{\delta}\right)\right)\right). +$$ + +Proof. By Theorem E.1, the fat-shattering dimension of the class of $\gamma$ -fat $t$ -polyhedra is: + +$$ +D = O \left(\frac {t \log t}{\gamma^ {2}}\right). +$$ + +Substituting this into the sample complexity bound from Theorem E.2, we get: + +$$ +m (\epsilon , \delta) = O \left(\frac {1}{\epsilon^ {2}} \left(\frac {t \log t}{\gamma^ {2}} \log^ {2} \left(\frac {1}{\epsilon}\right) + \log \left(\frac {1}{\delta}\right)\right)\right). +$$ + +Thus, the sample complexity of learning a $\gamma$ -fat polytope is as stated. \ No newline at end of file diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/images.zip b/ICML/2025/Learning Safety Constraints for Large Language Models/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1693be1fb4013d2ee1f1e187cf253d048c494210 --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f1446f0f7676c319edf521d3034b24c566757f88cdac21255c04edf44bd7bc5 +size 1784016 diff --git a/ICML/2025/Learning Safety Constraints for Large Language Models/layout.json b/ICML/2025/Learning Safety Constraints for Large Language Models/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..51c6bd1f819fab5b556f0e6a51524a968e5b226e --- /dev/null +++ b/ICML/2025/Learning Safety Constraints for Large Language Models/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1e13f3538e5978bfe59a7b967092e62ae86ebfe5037b327f3f1b7cb3ab5ae47 +size 740161 diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_content_list.json b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..23195e26a3f67a7750e51d6198f3b368b169b2c1 --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:627d1efbc4ad07b3c35f292851a587d478bfbe6c127d74acf5c048464b9a1d16 +size 164057 diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_model.json b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9f974239b36996499d75cd8e19d80f21694e9eaf --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b21ac3d5dd2a265078db26d52803aa61cc7bf8627e2687e83eea1304d8a044c +size 206312 diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_origin.pdf b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..440706e32b5c6be192b01c44662b5dce1f052614 --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/a79ef8d7-cb55-4c5c-a7d5-167524bb331c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d59094c4e6a81b5d028dbb33c42bde8ca280cf96f972e54f0e19b8a3ade52dd +size 19869582 diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/full.md b/ICML/2025/Learning Single Index Models with Diffusion Priors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4880699d8a72ebb07d49d333367325e94497f751 --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/full.md @@ -0,0 +1,722 @@ +# Learning Single Index Models with Diffusion Priors + +Anqi Tang *1 Youming Chen *1 Shuchen Xue23 Zhaoqiang Liu1 + +# Abstract + +Diffusion models (DMs) have demonstrated remarkable ability to generate diverse and high-quality images by efficiently modeling complex data distributions. They have also been explored as powerful generative priors for signal recovery, resulting in a substantial improvement in the quality of reconstructed signals. However, existing research on signal recovery with diffusion models either focuses on specific reconstruction problems or is unable to handle nonlinear measurement models with discontinuous or unknown link functions. In this work, we focus on using DMs to achieve accurate recovery from semi-parametric single index models, which encompass a variety of popular nonlinear models that may have discontinuous and unknown link functions. We propose an efficient reconstruction method that only requires one round of unconditional sampling and (partial) inversion of DMs. Theoretical analysis on the effectiveness of the proposed methods has been established under appropriate conditions. We perform numerical experiments on image datasets for different nonlinear measurement models. We observe that compared to competing methods, our approach can yield more accurate reconstructions while utilizing significantly fewer neural function evaluations. + +# 1. Introduction + +The objective of compressed sensing is to accurately recover the underlying high-dimensional sparse signal from a small number of linear measurements, with the measurement model as follows (Candes & Wakin, 2008; Foucart & + +*Equal contribution $^{1}$ University of Electronic Science and Technology of China $^{2}$ University of Chinese Academy of Sciences $^{3}$ Academy of Mathematics and Systems Science, CAS. Correspondence to: Zhaoqiang Liu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Rauhut, 2013; Scarlett & Cevher, 2021): + +$$ +\boldsymbol {y} = \mathbf {A} \boldsymbol {x} ^ {*} + \boldsymbol {e}, \tag {1} +$$ + +where $\mathbf{A} \in \mathbb{R}^{m \times n}$ is the measurement matrix, $\pmb{x}^* \in \mathbb{R}^n$ is the signal to be recovered, $\pmb{e} \in \mathbb{R}^m$ is the additive noise vector, and $\pmb{y} \in \mathbb{R}^m$ is the observed vector. + +Although the linear measurement model utilized in compressed sensing can serve as a good testbed for demonstrating conceptual phenomena, in many real-world problems, it may not be justifiable or even feasible. For instance, the binary measurement model employed in 1-bit compressed sensing (Boufounos & Baraniuk, 2008) has attracted substantial interest. This is due to its cost-effective and efficient hardware. It has also been shown that 1-bit compressed sensing is robust against certain nonlinear distortions (Laska & Baraniuk, 2012). The limitations of the linear data model have prompted the study of general nonlinear measurement models. Among these, the semi-parametric single index model (SIM) is arguably the most popular (Horowitz, 2009). The SIM models the observations as follows: + +$$ +\boldsymbol {y} = f \left(\mathbf {A} \boldsymbol {x} ^ {*}\right), \tag {2} +$$ + +where $\mathbf{A}$ consists of i.i.d. standard Gaussian entries, and $f: \mathbb{R} \to \mathbb{R}$ is an unknown and possibly random nonlinear link function that is applied element-wise. The aim is to estimate the signal $\boldsymbol{x}^*$ using the knowledge of $\mathbf{A}$ and $\boldsymbol{y}$ , despite the unknown nonlinear link $f$ . It is well-known that in the SIM, $\boldsymbol{x}^*$ is generally not identifiable (Plan & Vershynin, 2016), since any scaling of $\boldsymbol{x}^*$ can be incorporated into the unknown $f$ . Consequently, it is common to impose the identifiability constraint $\| \boldsymbol{x}^* \|_2 = 1$ . + +To enable efficient and reliable recovery of the underlying signal $\boldsymbol{x}^*$ , the predominant approach is to introduce structural modeling assumptions, such as sparse and conventional generative priors. For instance, the research works following (Bora et al., 2017) typically achieve signal reconstruction under the assumption that the underlying signal lies within the range of a variational autoencoder (VAE) or a generative adversarial network (GAN) (Van Veen et al., 2018; Hand et al., 2018; Heckel & Hand, 2019; Wu et al., 2019; Asim et al., 2020; Ongie et al., 2020; Whang et al., 2020; Jalal et al., 2021b; Nguyen et al., 2021; Liu et al., 2021b; 2022a; Genzel et al., 2022; Liu et al., 2024). + +Compared to conventional generative models like VAEs and GANs, diffusion models (DMs) (Sohl-Dickstein et al., 2015; Song & Ermon, 2019; Ho et al., 2020) have recently demonstrated their superiority in terms of robust generative capabilities and learning complex data distributions (Dhariwal & Nichol, 2021). DMs have been integrated into a wide variety of domains, leading to transformative progress and reshaping traditional approaches in areas such as vision and audio generation (Saharia et al., 2022b; Kong et al., 2021), and reinforcement learning (Chi et al., 2023; Hansen-Estruch et al., 2023). In particular, when it comes to addressing signal recovery problems, diffusion models offer a more flexible and robust solution, facilitating high-quality reconstructions and improved performance (Kawar et al., 2022; Whang et al., 2022; Sahara et al., 2022c;a; Alkan et al., 2023; Chung et al., 2023a; Cardoso et al., 2023; Wang et al., 2023; Chung et al., 2023b; Feng & Bouman, 2023; Rout et al., 2023; Wu et al., 2023; Aali et al., 2024; Chung et al., 2024; Dou & Song, 2024; Song et al., 2024; Wu et al., 2024; Sun et al., 2024). + +Inspired by the strong capabilities of DMs in diverse real-world applications, in this study, we investigate the application of DMs to learn SIMs. + +# 1.1. Related Work + +Relevant works on signal recovery with conventional generative models (such as GANs and VAEs) have shown that learned priors can drastically reduce sample complexity in compressed sensing and related problems. A comprehensive discussion of diffusion-based and conventional generative approaches is provided in Appendix A. In the following, we highlight diffusion-based signal recovery methods. + +Signal recovery with diffusion models: Diffusion models (DMs) have advanced signal recovery by modeling complex data distributions, with two main paradigms: task-specific and pre-trained approaches. Task-specific DMs are trained for particular problems, such as super-resolution (Saharia et al., 2022c) or deblurring (Ren et al., 2023). Pre-trained DMs, used without task-specific training, guide reconstruction via score estimation (e.g., (Feng et al., 2023)) or adapt frameworks like DDPM for linear measurements (e.g., DDRM (Kawar et al., 2022)). MCG (Chung et al., 2022a) and IIGDM (Song et al., 2023) are mainly designed for the linear setting. Additionally, IIGDM can be extended to certain nonlinear settings (where the link function is known) by leveraging a combination of pseudoinverse operations and nonlinear transformations. DPS (Chung et al., 2023b) and DAPS (Zhang et al., 2024a) are applicable in nonlinear settings as well, also primarily under the assumption that the link function is known. + +However, the works mentioned above either concentrate on + +specific linear signal recovery problems or are incapable of handling nonlinear measurement models with discontinuous or unknown link functions. Perhaps most relevant to the present paper, the work (Meng & Kabashima, 2022) uses SGMs to learn the underlying distribution of natural signals. By estimating the conditional score function, it enables better reconstruction quality when dealing with quantized compressed sensing problems. Nevertheless, the approach in (Meng & Kabashima, 2022) is restricted to quantized measurements and is relatively slow in reconstruction. Even if utilizing the knowledge of the link function, it requires thousands of neural function evaluations (NFEs) to achieve a reasonably accurate recovery. + +# 1.2. Contributions + +The main contributions of this paper are threefold: + +- We propose an efficient method for accurately recovering the underlying signal from nonlinear observations of SIMs by utilizing diffusion priors. Our approach does not require the knowledge of the link function, and it only requires one round of unconditional sampling and (partial) inversion of DMs, resulting in a relatively small number of NFEs for the entire process. +- Based on heuristic theoretical results, we opt to initiate the inversion of DMs from an intermediate time rather than performing the full inversion of DMs. Under suitable conditions, we provide a theoretical analysis on the effectiveness of the corresponding approach. Additionally, we empirically observe that carrying out partial inversion results in significantly better reconstructions compared to performing full inversion. +- To validate the effectiveness of our method, we conduct numerical experiments on image datasets under distinct nonlinear measurement models. Notably, in the noisy 1-bit measurement setting, our approach not only achieves substantially faster computational performance but also outperforms competing methods in reconstruction accuracy, even when these methods explicitly incorporate knowledge of the link function. + +# 1.3. Notation + +We use upper and lower case boldface letters to denote matrices and vectors respectively. For any $M \in \mathbb{N}$ , we use the shorthand notation $[M] = \{1, 2, \dots, M\}$ , and we use $\pmb{I}_M$ to denote the identity matrix in $\mathbb{R}^{M \times M}$ . Given two sequences of real values $\{a_i\}$ and $\{b_i\}$ , we write $a_i = O(b_i)$ if there exists an absolute constant $C_1$ and a positive integer $i_1$ such that for any $i > i_1$ , $|a_i| \leq C_1 b_i$ . We use $\mathcal{S}^{n-1}$ to denote the unit sphere in $\mathbb{R}^n$ , i.e., $\mathcal{S}^{n-1} = \{s \in \mathbb{R}^n : \|s\|_2 = 1\}$ . For a generator $G: \mathbb{R}^n \to \mathbb{R}^n$ , we use $\mathcal{R}(G)$ to denote the range of $G$ , i.e., $\mathcal{R}(G) = \{G(z): z \in \mathbb{R}^n\}$ . + +# 2. Preliminaries for Diffusion Models + +Diffusion Models (DMs) define a forward process $\{\pmb{x}_t\}_{t\in [0,T]}$ starting from $t = 0$ and $\pmb{x}_0$ . For any $t\in [0,T]$ , the distribution of $\pmb{x}_t$ conditioned on $\pmb{x}_0$ satisfies the following equation: + +$$ +q _ {0 t} \left(\boldsymbol {x} _ {t} \mid \boldsymbol {x} _ {0}\right) = \mathcal {N} \left(\alpha_ {t} \boldsymbol {x} _ {0}, \sigma_ {t} ^ {2} \boldsymbol {I} _ {n}\right). \tag {3} +$$ + +Here, $\alpha_{t}$ and $\sigma_{t}$ are non-negative, differentiable functions possessing bounded derivatives. Moreover, $\alpha_{t}$ is monotonically non-increasing with $\alpha_0 = 1$ , while $\sigma_{t}$ is monotonically increasing. It has been demonstrated that the following stochastic differential equation (SDE) has the same transition distribution $q_{0t}(\pmb{x}_t|\pmb{x}_0)$ for any $t\in [0,T]$ (Song et al., 2021b; Kingma et al., 2021): + +$$ +\mathrm {d} \boldsymbol {x} _ {t} = f (t) \boldsymbol {x} _ {t} \mathrm {d} t + g (t) \mathrm {d} \boldsymbol {w} _ {t}, \quad \boldsymbol {x} _ {0} \sim q _ {0} (\boldsymbol {x} _ {0}), \tag {4} +$$ + +where $\pmb{w}_t \in \mathbb{R}^n$ is the standard Wiener process, and $q_t$ represents the marginal distribution of $\pmb{x}_t$ . Moreover, $f(t)$ is a scalar function known as the drift coefficient and $g(t)$ is a scalar function called the diffusion coefficient, which are specified as follows: + +$$ +f (t) = \frac {\mathrm {d} \log \alpha_ {t}}{\mathrm {d} t}, g ^ {2} (t) = \frac {\mathrm {d} \sigma_ {t} ^ {2}}{\mathrm {d} t} - 2 \frac {\mathrm {d} \log \alpha_ {t}}{\mathrm {d} t} \sigma_ {t} ^ {2}. (5) +$$ + +Under certain regularity conditions, Song et al. (2021b) demonstrate that the forward process in Eq. (4) has an equivalent reverse process running from time $T$ to 0, which starts with the marginal distribution $q_{T}(\pmb{x}_{T})$ : + +$$ +\mathrm {d} \boldsymbol {x} _ {t} = [ f (t) \boldsymbol {x} _ {t} - g ^ {2} (t) \nabla_ {\boldsymbol {x}} \log q _ {t} (\boldsymbol {x} _ {t}) ] \mathrm {d} t + g (t) \mathrm {d} \bar {\boldsymbol {w}} _ {t}, \tag {6} +$$ + +where $\bar{\boldsymbol{w}}_t\in \mathbb{R}^n$ represents the Wiener process in reverse time, and $\nabla_{\pmb{x}}\log q_t(\pmb {x}_t)$ stands for the time-varying score function. + +For more efficient sampling, Song et al. (2021b) further show that the following probability flow ordinary differential equation (ODE) possesses the same marginal distribution at each time $t$ as that of reverse SDE in Eq. (6): + +$$ +\frac {\mathrm {d} \boldsymbol {x} _ {t}}{\mathrm {d} t} = f (t) \boldsymbol {x} _ {t} - \frac {1}{2} g ^ {2} (t) \nabla_ {\boldsymbol {x}} \log q _ {t} (\boldsymbol {x} _ {t}), \quad \boldsymbol {x} _ {T} \sim q _ {T} (\boldsymbol {x} _ {T}). \tag {7} +$$ + +The only unknown term in Eq. (7) is the time-varying score function $\nabla_{\pmb{x}}\log q_t(\pmb{x}_t)$ . In practice, DMs typically estimate the scaled score function $-\sigma_t\nabla_{\pmb{x}}\log q_t(\pmb{x}_t)$ by using a noise prediction network $\epsilon_{\theta}(\pmb{x}_t,t)$ , and optimizes the parameter $\pmb{\theta}$ through minimizing the following objective: + +$$ +\int_ {0} ^ {T} \mathbb {E} _ {\boldsymbol {x} _ {0} \sim q _ {0}} \mathbb {E} _ {\boldsymbol {\epsilon} \sim \mathcal {N} (\boldsymbol {0}, \mathbf {I} _ {n})} \left[ \| \boldsymbol {\epsilon} _ {\boldsymbol {\theta}} \left(\alpha_ {t} \boldsymbol {x} _ {0} + \sigma_ {t} \boldsymbol {\epsilon}, t\right) - \boldsymbol {\epsilon} \| _ {2} ^ {2} \right] d t. \tag {8} +$$ + +By substituting $\nabla_{\pmb{x}}\log p_t(\pmb{x}_t) = -\epsilon_\pmb{\theta}(\pmb{x}_t,t) / \sigma_t$ into Eq. (7) and taking advantage of its semi-linear structure, we obtain the following numerical integration formula (Lu et al., 2022a; Zhang & Chen, 2022): + +$$ +\boldsymbol {x} _ {t} = e ^ {\int_ {s} ^ {t} f (\tau) \mathrm {d} \tau} \boldsymbol {x} _ {s} + \int_ {s} ^ {t} \left(e ^ {\int_ {\tau} ^ {t} f (r) \mathrm {d} r} \cdot \frac {g ^ {2} (\tau)}{2 \sigma_ {\tau}} \cdot \boldsymbol {\epsilon} _ {\theta} \left(\boldsymbol {x} _ {\tau}, \tau\right)\right) \mathrm {d} \tau . \tag {9} +$$ + +Alternatively, we can use a data prediction network $\pmb{x}_{\theta}(\pmb{x}_t,t)$ that satisfies the condition $\epsilon_{\theta}(\pmb{x}_t,t) = (\pmb{x}_t - \alpha_t\pmb{x}_{\theta}(\pmb{x}_t,t)) / \sigma_t$ (Kingma et al., 2021; Salimans & Ho, 2022). By substituting Eq. (5) into Eq. (9) and using the transition between $\epsilon_{\theta}$ and $\pmb{x}_{\theta}$ , we obtain the following integration formula (Lu et al., 2022b): + +$$ +\boldsymbol {x} _ {t} = \frac {\sigma_ {t}}{\sigma_ {s}} \boldsymbol {x} _ {s} + \sigma_ {t} \int_ {\lambda_ {s}} ^ {\lambda_ {t}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) \mathrm {d} \lambda , \tag {10} +$$ + +where $\lambda_{t} := \log (\alpha_{t} / \sigma_{t})$ is strictly decreasing with respect to $t$ and has an inverse function $t_{\lambda}(\cdot)$ . Thus, $\pmb{x}_{\theta}(\pmb{x}_{t}, t)$ can be written as $\pmb{x}_{\theta}\big(\pmb{x}_{t_{\lambda}(\lambda)}, t_{\lambda}(\lambda)\big) = \hat{\pmb{x}}_{\theta}(\hat{\pmb{x}}_{\lambda}, \lambda)$ . + +# 2.1. The Sampling Process of Diffusion Models + +The sampling process in DMs gradually denoises a noise vector to an image vector that approximately follows the same distribution as the training data. More precisely, if we divide the time interval $[\epsilon, T]^1$ into $N$ sub-intervals with $\epsilon = t_N < t_{N-1} < \ldots < t_1 < t_0 = T$ , and use a first-order numerical scheme for Eq. (10), for $i \in [N]$ , we can derive the following iterative formula for the transition from time $t_{i-1}$ to $t_i$ : + +$$ +\tilde {\boldsymbol {x}} _ {t _ {i}} = \frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} \tilde {\boldsymbol {x}} _ {t _ {i - 1}} + \sigma_ {t _ {i}} \left(\frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}} - \frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}}\right) \cdot \boldsymbol {x} _ {\boldsymbol {\theta}} \left(\tilde {\boldsymbol {x}} _ {t _ {i - 1}}, t _ {i - 1}\right), \tag {11} +$$ + +which is in line with the widely-used DDIM sampling method (Song et al., 2021a). + +Moreover, second- or third-order numerical schemes can be employed to enhance the sampling efficiency further (Lu et al., 2022b; Zhao et al., 2024). Specifically, the second-order multi-step numerical solver for Eq. (10) yields the following iterative formula for $i \geq 2$ (Lu et al., 2022b): + +$$ +\begin{array}{l} \tilde {\boldsymbol {x}} _ {t _ {i}} = \frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} \tilde {\boldsymbol {x}} _ {t _ {i - 1}} - \alpha_ {t _ {i}} (e ^ {- h _ {i}} - 1) \\ \times \left(\left(1 + \frac {1}{2 r _ {i}}\right) \boldsymbol {x} _ {\boldsymbol {\theta}} \left(\tilde {\boldsymbol {x}} _ {t _ {i - 1}}, t _ {i - 1}\right) - \frac {1}{2 r _ {i}} \boldsymbol {x} _ {\boldsymbol {\theta}} \left(\tilde {\boldsymbol {x}} _ {t _ {i - 2}}, t _ {i - 2}\right)\right), \tag {12} \\ \end{array} +$$ + +where $h_i = \lambda_{t_i} - \lambda_{t_{i-1}}$ and $r_i = h_{i-1} / h_i$ . We refer to the corresponding sampling method as DM2M for brevity. + +Let $\kappa_{i}$ be the function corresponding to the $i$ -th sampling step. For instance, for the DDIM sampling method in Eq. (11), we have + +$$ +\kappa_ {i} (\boldsymbol {x}) := \frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} \boldsymbol {x} + \sigma_ {t _ {i}} \left(\frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}} - \frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}}\right) \cdot \boldsymbol {x} _ {\boldsymbol {\theta}} (\boldsymbol {x}, t _ {i - 1}). \tag {13} +$$ + +Then, the entire sampling process can be expressed as $\tilde{\pmb{x}}_{\epsilon} = G(\tilde{\pmb{x}}_T)$ , where the generator $G:\mathbb{R}^n\to \mathbb{R}^n$ is the composition of of $\kappa_{1},\kappa_{2},\ldots ,\kappa_{N}$ , i.e., + +$$ +G (\boldsymbol {x}) = \kappa_ {N} \circ \dots \circ \kappa_ {2} \circ \kappa_ {1} (\boldsymbol {x}). \tag {14} +$$ + +In addition, for convenience, for any $t \in (\epsilon, T]$ , we use $G_t$ to denote the sampling process from $t$ to $\epsilon$ (and thus $G_T = G$ ). Specifically, if letting $i_t = \max \{i \in [N] : t_{i-1} \geq t\}$ , we have that $G_t$ is the composition of $\kappa_{i_t}, \kappa_{i_t+1}, \ldots, \kappa_N$ , i.e., + +$$ +G _ {t} (\boldsymbol {x}) = \kappa_ {N} \circ \dots \circ \kappa_ {i _ {t} + 1} \circ \kappa_ {i _ {t}} (\boldsymbol {x}). \tag {15} +$$ + +# 2.2. The Inversion of Diffusion Models + +The inversion in DMs retraces the ODE sampling process with the aim of identifying the specific noise vector that generates a given image vector. This inversion is a crucial aspect in various applications, including image editing (Hertz et al., 2023; Kim et al., 2022; Wallace et al., 2023; Patashnik et al., 2023), watermark detection (Wen et al., 2023), and imaged-to-image translation (Kawar et al., 2022; Su et al., 2023). Recently, the inversion of DMs has attracted increasing attention, and several relevant methods have emerged (Pan et al., 2023; Zhang et al., 2024b; Wallace et al., 2023; Hong et al., 2024; Wang et al., 2024). + +For example, the naive DDIM inversion method (Hertz et al., 2023; Kim et al., 2022) has the following iterative procedure: + +$$ +\hat {\boldsymbol {x}} _ {t _ {i - 1}} = \frac {\sigma_ {t _ {i - 1}}}{\sigma_ {t _ {i}}} \hat {\boldsymbol {x}} _ {t _ {i}} + \sigma_ {t _ {i - 1}} \left(\frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}} - \frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}}\right) \boldsymbol {x} _ {\boldsymbol {\theta}} \left(\hat {\boldsymbol {x}} _ {t _ {i}}, t _ {i - 1}\right). \tag {16} +$$ + +The naive DDIM inversion method circumvents the computational overhead of the implicit numerical scheme by substituting $\boldsymbol{x}_{\theta}(\hat{\boldsymbol{x}}_{t_{i - 1}}, t_{i - 1})$ with $\boldsymbol{x}_{\theta}(\hat{\boldsymbol{x}}_{t_i}, t_{i - 1})$ . It has been widely used in imaging applications like image editing. Alternatively, by taking into account the first-order numerical discretization of Eq. (10) from $t = \epsilon$ to $t = T$ , it is straightforward to derive an iterative formula that is slightly + +different from Eq. (16): + +$$ +\hat {\boldsymbol {x}} _ {t _ {i - 1}} = \frac {\sigma_ {t _ {i - 1}}}{\sigma_ {t _ {i}}} \hat {\boldsymbol {x}} _ {t _ {i}} + \sigma_ {t _ {i - 1}} \left(\frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}} - \frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}}\right) \boldsymbol {x} _ {\boldsymbol {\theta}} \left(\hat {\boldsymbol {x}} _ {t _ {i}}, t _ {i}\right). \tag {17} +$$ + +Furthermore, similar to DM2M in Eq. (12), by considering the second-order numerical discretization of Eq. (10) from $t = \epsilon$ to $t = T$ , we can obtain the corresponding iterative formula for the inversion of DMs. + +Letting $v_{i}$ be the function corresponding to the $i$ -th inversion step. Then, the entire inversion procedure can be written as $\hat{\pmb{x}}_T = G^\dagger (\hat{\pmb{x}}_\epsilon)$ , where the inversion operator $G^{\dagger}:\mathbb{R}^{n}\to \mathbb{R}^{n}$ is the composition of $v_{1},v_{2},\ldots ,v_{N}$ , i.e., + +$$ +G ^ {\dagger} (\boldsymbol {x}) = v _ {1} \circ v _ {2} \circ \dots \circ v _ {N} (\boldsymbol {x}). \tag {18} +$$ + +In addition, for convenience, for any $t \in [\epsilon, T)$ , we use $G_t^\dagger$ to denote the inversion from $t$ to $T$ (and thus $G_\epsilon^\dagger = G^\dagger$ ). Specifically, if letting $j_t = \min \{j \in [M] : t_j \leq t\}$ , we have that $G_t^\dagger$ is the composition of $v_{j_t}, v_{j_{t-1}}, \ldots, v_1$ , i.e., + +$$ +G _ {t} ^ {\dagger} (\boldsymbol {x}) = v _ {1} \circ v _ {2} \circ \dots \circ v _ {j _ {t}} (\boldsymbol {x}). \tag {19} +$$ + +# 3. Setup and Approaches + +Recall that the nonlinear observation vector $\pmb{y} \in \mathbb{R}^{m}$ is assumed to be generated in accordance with the SIM in Eq. (2), where $\pmb{x}^{*} \in S^{n-1}$ is the signal to be estimated. We follow (Liu & Liu, 2022) to assume that the unknown link function $f$ satisfies the following conditions: + +$$ +\mu := \mathbb {E} _ {\boldsymbol {a} \sim \mathcal {N} (\boldsymbol {0}, \mathbf {I} _ {n})} \left[ f \left(\boldsymbol {a} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {a} ^ {T} \boldsymbol {x} ^ {*} \right] \neq 0, \tag {20} +$$ + +$$ +\mathbb {E} _ {\boldsymbol {a} \sim \mathcal {N} (\boldsymbol {0}, \mathbf {I} _ {n})} \left[ f \left(\boldsymbol {a} ^ {T} \boldsymbol {x} ^ {*}\right) ^ {4} \right] < \infty . \tag {21} +$$ + +The conditions in Eqs. (20) and (21) are mild and hold true for various forms of $f$ , such as $f(x) = \mathrm{sign}(x)$ for 1-bit measurements and $f(x) = x^3$ for cubic measurements. However, as noted in prior works such as (Liu & Scarlett, 2020a; Liu & Liu, 2022), the condition in Eq. (20) is not satisfied for phase retrieval models with $f(x) = x^2$ or $f(x) = |x|$ (or their noisy versions). + +Remark 1. The condition in Eq. (20) is a classic and crucial condition for SIMs. For example, it is (albeit implicitly) assumed in the seminal work (Plan & Vershynin, 2016) and in subsequent research that builds upon it. If this condition fails to hold, specifically when $\mu = 0$ , the recovery of $\mu x^{*}$ as (Plan & Vershynin, 2016) and in our Eq. (24) below becomes meaningless. Additionally, we follow (Liu & Liu, 2022) to assume the condition in Eq. (21), which generalizes the assumption that $f(\boldsymbol{a}^T\boldsymbol{x}^*)$ is sub-Gaussian (which is satisfied by quantized measurement models), and accommodates more general nonlinear measurement models such as cubic measurements with $f(x) = x^3$ and their noisy counterparts. + +We utilize a generator $G: \mathbb{R}^n \to \mathbb{R}^n$ that corresponds to the sampling process of DMs (cf. Eq. (14)) to model the underlying signal. Specifically, we assume that $\pmb{x}^{*} \in \mathcal{R}(G)$ , where $\mathcal{R}(G)$ denotes the range of $G$ . This assumption is standard for nonlinear measurement models with generative priors and has also been made in prior works such as (Wei et al., 2019; Liu & Scarlett, 2020a). + +Let $G^{\dagger}:\mathbb{R}^{n}\to \mathbb{R}^{n}$ be an operator corresponding to an inversion method for DMs (cf. Eq. (18)). The work (Liu & Liu, 2022) sets the estimated vector as $\mathcal{P}_G(\mathbf{A}^T\mathbf{y} / m)$ , where $\mathcal{P}_G$ denotes the projection operator onto the range of $G$ . Since performing the projection step can be time-consuming even for conventional generative models like GANs, the authors of (Raj et al., 2019) use the composition of the pseudoinverse of the generator and the generator itself to approximate the projection operator. Building on these works, to reconstruct the direction of the signal $x^{*}$ from the knowledge of the measurement matrix $\mathbf{A}\in \mathbb{R}^{m\times n}$ and the observed vector $\pmb {y}\in \mathbb{R}^{m}$ (despite the unknown link $f$ ), a natural idea is to set the estimated vector $\hat{x}$ as follows: + +$$ +\hat {\boldsymbol {x}} = G \circ G ^ {\dagger} \left(\frac {1}{m} \mathbf {A} ^ {T} \boldsymbol {y}\right). \tag {22} +$$ + +However, such a simple idea does not fully exploit the relationship between $\frac{1}{m}\mathbf{A}^T\mathbf{y}$ and the underlying signal $\mathbf{x}^*$ , and it leads to unsatisfactory empirical results for diffusion models, as we will see in Section 5. In particular, in the approach corresponding to Eq. (22), the inversion step starts from time $\epsilon$ (for an $\epsilon$ close to 0; see Section 2.1), and this implicitly assumes that $\frac{1}{m}\mathbf{A}^T\mathbf{y}$ approximately follows the target data distribution $q_0$ . However, based on the following lemmas, we observe that $\frac{1}{m}\mathbf{A}^T\mathbf{y}$ should instead be regarded as a noisy version of $\mathbf{x}^* \sim q_0$ , especially when the number of samples $m$ is relatively small compared to the ambient dimension $n$ . First, it is easy to obtain the following lemma. + +Lemma 1. If $\epsilon \sim \mathcal{N}(\mathbf{0},\mathbf{I}_n)$ , then we have that the following holds with high probability5 + +$$ +\| \epsilon \| _ {\infty} \leq C \sqrt {\log (2 n)}, \tag {23} +$$ + +where $C$ is a sufficiently large positive constant. + +Furthermore, we have the following lemma, which demonstrates that $\frac{1}{m}\mathbf{A}^T\mathbf{y}$ is a noisy version of $\mu \mathbf{x}^{*}$ (see Eq. (20) for the definition of $\mu$ ) and approximately characterizes the noise level. The proofs of Lemmas 1 and 2 are placed in Appendix B. + +Lemma 2. Under conditions for the link function $f$ in Eqs. (20) and (21), we have the following holds w.h.p.: + +$$ +\left\| \frac {1}{m} \mathbf {A} ^ {T} \boldsymbol {y} - \mu \boldsymbol {x} ^ {*} \right\| _ {\infty} \leq \frac {C ^ {\prime} \sqrt {\log (2 n)}}{\sqrt {m}}, \tag {24} +$$ + +where $C^\prime$ is a sufficiently large positive constant. + +The comparison between Lemmas 1 and 2 inspires us to express $\frac{1}{m\mu}\mathbf{A}^T\mathbf{y}$ as + +$$ +\frac {1}{m \mu} \mathbf {A} ^ {T} \boldsymbol {y} \approx \boldsymbol {x} ^ {*} + \frac {C ^ {\prime}}{C \mu \sqrt {m}} \boldsymbol {\epsilon} \tag {25} +$$ + +for $\epsilon \sim \mathcal{N}(\mathbf{0},\mathbf{I}_n)$ . Additionally, from Eq. (3), we know that $\pmb{x}_t$ can be written as $\pmb{x}_t = \alpha_t\pmb{x}_0 + \sigma_t\pmb{\epsilon}_t = \alpha_t(\pmb{x}_0 + (\sigma_t / \alpha_t)\pmb{\epsilon}_t)$ with $\pmb{\epsilon}_t \sim \mathcal{N}(\mathbf{0},\mathbf{I}_n)$ . Since the nonlinear link function $f$ is unknown (and consequently, $\mu$ is also unknown), and $C, C'$ are undetermined positive constants, we employ a tuning parameter $C_s$ and find a time $t^*$ such that + +$$ +\frac {\sigma_ {t ^ {*}}}{\alpha_ {t ^ {*}}} = \frac {C _ {s}}{\sqrt {m}}, \tag {26} +$$ + +and start the inversion from time $t^*$ with the input vector being $\alpha_{t^*} C_s' \mathbf{A}^T \mathbf{y} / m$ , where $C_s' > 0$ is a tuning parameter. Remark 2. Unlike prior works such as (Chung et al., 2022b; Fabian et al., 2024; Wu et al., 2024) that identify an intermediate time for sampling, we seek an intermediate time mainly for the inversion of DMs. Moreover, this intermediate time is computed using theoretical findings in Lemma 2. + +Then, the corresponding estimated vector is + +$$ +\hat {\boldsymbol {x}} = G \circ G _ {t ^ {*}} ^ {\dagger} \left(\frac {\alpha_ {t ^ {*}} C _ {s} ^ {\prime}}{m} \mathbf {A} ^ {T} \boldsymbol {y}\right), \tag {27} +$$ + +where $G_{t^*}^\dagger$ denotes the partial inversion operator (from $t^*$ to $T$ ; see Eq. (19)). One may also notice that since $\frac{1}{m}\mathbf{A}^T\mathbf{y}$ can be regarded as a noisy version of $\mathbf{x}^*$ and the sampling process has a denoising effect, we can simply sample from $t^*$ to $\epsilon$ without taking the inversion step. In this case, the corresponding estimated vector is + +$$ +\hat {\boldsymbol {x}} = G _ {t ^ {*}} \left(\frac {\alpha_ {t ^ {*}} C _ {s} ^ {\prime}}{m} \mathbf {A} ^ {T} \boldsymbol {y}\right), \tag {28} +$$ + +where $G_{t^*}$ denotes the partial sampling operator (from $t^*$ to $\epsilon$ ; see Eq. (15)). Indeed, such a simple and efficient approach can also lead to reasonably good reconstructions, although its performance is inferior to that of the approach corresponding to Eq. (27). + +We refer to the approach for Eq. (22) as SIM-DMFIS (SIMs using diffusion models with full inversion and sampling + +procedures), the approach for Eq. (28) as SIM-DMS since it only performs a (partial) sampling procedure, and the approach for Eq. (27) as SIM-DMIS. We illustrate the differences among these three approaches in Figure 1. For convenience, we present the SIM-DMIS approach in Algorithm 1. + +![](images/2a42134524febdfef4d8d893a65f317d9a6d8ebfbb0885e5eb97871b686f65f4.jpg) +(a) SIM- DMS + +![](images/eadbf5fcd029e2145ae790e6741a16b6ec1746d4516585f40db0d854d3b2f346.jpg) +(b) SIM-DMFIS +Figure 1. An illustration of our three approaches. For SIM-DMS, we only perform the sampling from $t^*$ to $\epsilon$ . For SIM-DMFIS, we perform the full inversion and sampling procedures. For SIM-DMIS, we first perform the inversion from $t^*$ to $T$ , and then perform the sampling from $T$ to $\epsilon$ . + +![](images/bc6f481a9475f50eb7f0276b5ebdd6444293321b3a8d1757d0313115f1f32524.jpg) +(c) SIM-DMIS + +# Algorithm 1 The SIM-DMIS approach + +Input: $\mathbf{A} \in \mathbb{R}^{m \times n}$ , $\pmb{y} \in \mathbb{R}^m$ , $\pmb{x}_{\theta}$ , time steps $\epsilon = t_N < t_{N-1} < \ldots < t_1 < t_0 = T$ , generator $G$ corresponding to the sampling process as in Eq. (14), partial inversion operator $G_t^\dagger$ as in Eq. (19), tuning parameters $C_s$ and $C_s'$ + +1: Calculate $t^{*}\in [\epsilon ,T]$ as in Eq. (26). + +2: Calculate the estimated vector $\hat{\pmb{x}}$ as in Eq. (27). + +Output: $\hat{x}$ + +# 4. Theoretical Analysis + +In this section, we provide a theoretical analysis of the effectiveness of our proposed SIM-DMIS approach. Before presenting the analysis, we first present some preliminary results. Firstly, the following assumption states that the neural function $x_{\theta}(x,t)$ is Lipschitz continuous with respect to its first argument. This assumption has been widely adopted in relevant works such as (Lu et al., 2022a; Chen et al., 2023a;c; 2024; 2023d; Bortoli, 2022; Lee et al., 2022; Li et al., 2023). + +Assumption 1 (Lipschitz Continuity of the Neural Function). For any $t \in [0, T]$ , there exists a positive constant $L_t > 0$ such that the neural function $\pmb{x}_{\theta}(\pmb{x}, t)$ is $L_t$ -Lipschitz continuous with respect to its first parameter $\pmb{x}$ . That is, it holds for all $\pmb{x}_1, \pmb{x}_2 \in \mathbb{R}^n$ that $\| \pmb{x}_{\theta}(\pmb{x}_1, t) - \pmb{x}_{\theta}(\pmb{x}_2, t) \|_2 \leq L_t \| \pmb{x}_1 - \pmb{x}_2 \|_2$ . + +Based on Assumption 1, it can be easily demonstrated that the generator corresponding to popular sampling methods such as DDIM and DM2M (cf. Sec. 2.1) is Lipschitz continuous. Specifically, we have the following lemma. + +Lemma 3. Suppose that the data prediction network $\pmb{x}_{\theta}$ satisfies Assumption 1. Then, if $G: \mathbb{R}^n \to \mathbb{R}^n$ is the generator as in Eq. (14), we have that $G$ is $L$ -Lipschitz continuous with $L > 0$ being dependent on $\{\alpha_{t_i}\}_{i=0}^{N-1}$ , $\{\sigma_{t_i}\}_{i=0}^{N-1}$ , and $\{L_{t_i}\}_{i=0}^{N-1}$ . + +Lemma 3 shows that it is reasonable to assume that $G$ is Lipschitz continuous. The proof of Lemma 3 and the precise characterization of the Lipschitz constant $L$ for DDIM and DM2M are deferred to Appendix C. + +Then, we have the following theorem regarding the effectiveness of the SIM-DMIS approach as presented in Eq. (27). Specifically, for $t \in [\epsilon, T]$ , it offers an upper bound for the distance between $G \circ G_t^\dagger(\bar{\boldsymbol{x}}_t)$ and $\bar{\boldsymbol{x}}_\epsilon$ , where $\bar{\boldsymbol{x}}_t$ is a sample of $q_t$ and $\bar{\boldsymbol{x}}_\epsilon$ is on the same ODE trajectory as $\bar{\boldsymbol{x}}_t$ . When $\epsilon$ is sufficiently small and the (scaled) data prediction network $\boldsymbol{x}_\theta$ provides a good approximation to the ground-truth score $\nabla \log q_t$ (Chen et al., 2023d; Li et al., 2023), $\bar{\boldsymbol{x}}_\epsilon$ will be close to the ground-truth data following $q_0$ that corresponds to $\bar{\boldsymbol{x}}_t$ . Additionally, it has been demonstrated in (Lu et al., 2022a;b) that under certain regularity conditions, DDIM and DM2M are first- and second-order numerical sampling methods for Eq. (10), respectively. Moreover, by considering the first- and second-order numerical discretization of Eq. (10) from $t = \epsilon$ to $t = T$ , we similarly obtain the first- and second-order numerical inversion methods for Eq. (10) respectively (for instance, the inversion method in Eq. (17) is a first-order numerical inversion method). + +Therefore, based on Theorem 3, if the term $\alpha_{t^*}C_s'\mathbf{A}^T\pmb {y} / m$ in Eq. (27) can be approximately expressed as $\alpha_{t^*}\pmb{x}^* +$ $\sigma_{t^{*}}\epsilon$ with $\epsilon$ being a standard normal vector, $\hat{\pmb{x}}\coloneqq G\circ$ $G_{t^*}^\dagger (\alpha_{t^*}C_s'\mathbf{A}^T\pmb {y} / m)$ is close to $\pmb{x}^*$ under appropriate conditions. The proof of Theorem 3 can be found in Appendix C. + +Theorem 3. For $t \in [\epsilon, T]$ , let $\bar{\mathbf{x}}_t \in \mathbb{R}^n$ be a sample of $q_t$ , and let $\bar{\mathbf{x}}_\epsilon = \frac{\sigma_\epsilon}{\sigma_t} \bar{\mathbf{x}}_t + \sigma_\epsilon \int_{\lambda_t}^{\lambda_\epsilon} e^\lambda \hat{\mathbf{x}}_\theta (\hat{\mathbf{x}}_\lambda, \lambda) \, \mathrm{d}\lambda$ , which is the analytic solution of Eq. (10) with respect to the initial vector $\bar{\mathbf{x}}_t$ . For $k_1, k_2 \in \{1, 2, 3\}$ , suppose that $G^\dagger$ corresponds to a $k_1$ -th order numerical inversion method for Eq. (10), and $G_t^\dagger$ denotes the partial inversion operator from $t$ to $T$ (see Eq. (19)). Suppose that the generator $G$ corresponds to a $k_2$ -th order numerical sampling method for Eq. (10) and $G$ is $L$ -Lipschitz continuous. Then, under certain regularity conditions, we have the following: + +$$ +\left\| \bar {\boldsymbol {x}} _ {\epsilon} - G \circ G _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) \right\| _ {2} = O \left(\sqrt {n} \left(h _ {\max } ^ {k _ {2}} + L h _ {\max } ^ {k _ {1}}\right)\right), \tag {29} +$$ + +where $h_{\mathrm{max}} = \max_{i\in [N]}(\lambda_{t_i} - \lambda_{t_{i - 1}})$ . + +# 5. Experiments + +In this section, we conduct a series of experiments to validate the effectiveness of the proposed SIM-DMIS approach (see Algorithm 1). Specifically, we evaluate our method on two datasets: FFHQ $256 \times 256$ (Karras et al., 2019), ImageNet $256 \times 256$ (Deng et al., 2009). For FFHQ and Im + +ageNet, the ambient dimension is $n = 3 \times 256 \times 256 = 196608$ . + +We perform experiments on nonlinear measurement models with 1-bit and cubic measurements, for which we have $\pmb{y} = \mathrm{sign}(\mathbf{A}\pmb{x}^{*} + \pmb{e})$ and $\pmb{y} = (\mathbf{A}\pmb{x}^{*})^{3} + \pmb{e}$ respectively, where $\pmb{e} \sim \mathcal{N}(\mathbf{0},\sigma^2\mathbf{I}_m)$ . We compare SIM-DMIS with QCS-SGM proposed in (Meng & Kabashima, 2022), which uses DMs to handle quantized compressed sensing problems. We also compare our approach with the posterior sampling methods DPS (Chung et al., 2023b) and DAPS (Zhang et al., 2024a). DPS is a popular baseline for general signal recovery problems, and DAPS has shown excellent performance in nonlinear signal recovery problems. When DPS and DAPS utilize the knowledge of the link function $f$ , the corresponding methods are denoted as DPS-N and DAPS-N respectively. In addition, we compare with DPS and DAPS for the linear operator without using the knowledge of $f$ , and the corresponding methods are denoted as DPS-L and DAPS-L respectively. + +For the QCS-SGM method, we adhere to the experimental settings specified in (Meng & Kabashima, 2022) to ensure a fair comparison. Additionally, we compare with SIM-DMFIS and SIM-DMS (see Eqs. (22) and (28)), which are two variants of SIM-DMIS. We employ three metrics to assess the performance of these methods: Peak signal-to-noise ratio (PSNR), structural similarity index measure (SSIM), and learned perceptual image patch similarity (LPIPS). The reported quantitative results are averaged over 100 testing images. In the experimental process, we use DDIM for sampling and the DM2M inversion method (refer to Sec. 2.1 for details). The reported NFEs represent the total number of NFEs utilized by each approach. For instance, in the case of SIM-DMIS and SIM-DMFIS, the reported NFE is the sum of the number of steps in the inversion process and the number of steps in the sampling process. We adopt the variance preserving (VP) schedule with $\beta_{\mathrm{min}} = 0.1$ and $\beta_{\mathrm{max}} = 20$ . For SIM-DMS, we use 50 NFEs, while for SIM-DMIS and SIM-DMFIS, we use 150 NFEs. $^{10}$ The remaining parameters are set as $\epsilon = 0.001$ , $T = 1$ , and $\sigma = 0.05$ . For the detailed parameter settings of $C_s$ and $C_s'$ in SIM-DMS and SIM-DMIS, please refer to Appendices F and G. + +Results for FFHQ $(256\times 256)$ Since the experiments for FFHQ are time-consuming, we only report the results for $m = n / 8 = 24576$ . For the QCS-SGM method, we leverage a pre-trained unconditional Score-SDE model with the + +For 1-bit measurements where $f$ is not always differentiable, PyTorch can still enforce automatic differentiation. +10The same number of NFEs is used for the inversion process of SIM-DMIS and SIM-DMFIS. As demonstrated in Appendices F and G, this choice has a negligible impact on the experimental results. + +variance exploding (VE) schedule11 for the FFHQ dataset. As for the other methods, we employ the model from DPS, which has been trained on 49,000 FFHQ $256 \times 256$ images and validated on the first 1,000 images. + +It is evident from Table 1 and Figure 2 that SIM-DMIS exhibits superior reconstruction performance with 1-bit measurements. Notably, SIM-DMIS requires only 150 NFEs, in contrast to QCS-SGM, which demands a significantly higher 11,555 NFEs. Additionally, both DPS and DAPS utilize 1,000 NFEs. The results for cubic measurements presented in Table 2 and Figure 3 further demonstrate the effectiveness of our proposed methods. In particular, SIM-DMIS consistently achieves the highest reconstruction quality across all evaluated metrics while requiring only 150 NFEs, demonstrating both the efficiency and robustness of our approach under the cubic measurement setting on the FFHQ dataset. + +Note that in 1-bit measurements, even in the noiseless scenario, the link function $f(x) = \mathrm{sign}(x)$ is non-differentiable at $x = 0$ (though as mentioned in Footnote 9, PyTorch can still enforce automatic differentiation). The non-differentiability also poses challenges for DPS-N and DAPS-N as they rely on $f$ in gradient based updates. This can lead to inaccurate gradients and ultimately resulting in subpar performance. $^{12}$ For cubic measurements, since we have observed from the results for 1-bit measurements that SIM-DMFIS, DPS-L, and DAPS-L do not perform well, we do not compare against them. Furthermore, we do not include comparisons with DAPS-N since although the link function for cubic measurements is differentiable, its pronounced non-linearity produces unstable gradient directions that make optimization with DAPS-N unreliable and significantly degrade reconstruction performance. + +Table 1. Quantitative results for FFHQ with 1-bit measurements $(m = n / 8 = 24576)$ . We mark bold the best scores, and underline the second best scores. + +
MethodNFEPSNR (↑)SSIM (↑)LPIPS (↓)
QCS-SGM1155512.91±2.360.51±0.070.50±0.08
DPS-N100011.14±1.460.37±0.090.69±0.05
DPS-L10008.57±2.050.22±0.080.69±0.09
DAPS-N100016.59±0.540.33±0.050.48±0.05
DAPS-L10005.63±0.710.04±0.030.61±0.03
SIM- DMS5017.14±2.410.44±0.070.48±0.05
SIM-DMFIS1508.48±0.130.03±0.000.90±0.02
SIM-DMIS15019.87±2.770.60±0.090.37±0.05
+ +11https://huggingface.co/google/ncsnpp-ffhq-256 +12The supplementary material of DAPS suggests using Metropolis Hasting for non-differentiable forward operators, but it is also mentioned to have inferior performance and low efficiency, with results only in the supplementary material. + +Table 2. Quantitative results on the FFHQ with cubic measurements ( $m = n/8 = 24576$ ). We mark **bold** the best scores, and underline the second best scores. + +
MethodNFEPSNR (↑)SSIM (↑)LPIPS (↓)
DPS-N100015.41±1.380.37±0.080.50±0.07
SIM-DMS5014.44±2.130.51±0.100.47±0.08
SIM-DMIS15017.56±2.560.57±0.100.40±0.07
+ +![](images/39dd09512abd79b6114ad3ade46e756272148592f417b72673d3e3b2a7205f49.jpg) +Figure 2. Examples of 1-bit reconstructed images for FFHQ. + +![](images/856e64f8569120b8c9091c3669dbc58781dc3a2add696a7ce4ab812b4da985ba.jpg) +Figure 3. Examples of cubic reconstructed images for FFHQ. + +Results for ImageNet $(256\times 256)$ For ImageNet, we report the results for $m = n / 16 = 12288$ . We utilize a pretrained conditional ImageNet $256\times 256$ model along with its corresponding classifier sourced from ADM (Dhariwal & Nichol, 2021). We adhere to the default recommended configuration settings of these models, substituting the unconditional ImageNet $256\times 256$ model initially provided by DPS. The tests are conducted on 100 images selected from the Validation1K Set. Given that QCS-SGM lacks pre-trained models for ImageNet, we do not compare with it. + +Table 3 and Figure 4 demonstrate that SIM-DMIS achieves superior reconstruction with 1-bit measurements compared to DPS and DAPS variants, while requiring only 150 NFEs. The results with cubic measurements, summarized in Table 4 and Figure 5, further validate the advantages of our methods. Notably, SIM-DMIS achieves the best performance across all metrics while maintaining a low computational cost of only 150 NFEs. These results underscore the effectiveness and efficiency of our approach in handling cubic measurement settings on the ImageNet dataset. + +Table 3. Quantitative results for ImageNet with 1-bit measurements ( $m = n/16 = 12288$ ). We mark **bold** the best scores, and **underline** the second best scores. + +
MethodNFEPSNR (↑)SSIM (↑)LPIPS (↓)
DPS-N100011.57±2.630.24±0.110.64±0.04
DPS-L100012.67±3.430.11±0.160.81±0.12
DAPS-N100014.62±1.200.12±0.010.61±0.04
DAPS-L10006.20±1.660.08±0.140.64±0.02
SIM-DMS5016.93±3.160.32±0.090.54±0.09
SIM-DMFIS15011.89±2.240.08±0.020.76±0.06
SIM-DMIS15018.06±3.160.45±0.130.46±0.08
+ +Table 4. Quantitative results on the ImageNet with cubic measurements ( $m = n/16 = 12288$ ). We mark **bold** the best scores, and **underline** the second best scores. + +
MethodNFEPSNR (↑)SSIM (↑)LPIPS (↓)
DPS-N100011.47±2.970.22±0.080.62±0.06
SIM-DMS5014.99±2.820.33±0.060.59±0.08
SIM-DMIS15016.28±3.380.40±0.150.55±0.10
+ +![](images/038a0d162186e703ede681055302880d493906ea91c6152e2e94dcb5534afc40.jpg) +Figure 4. Examples of 1-bit reconstructed images for ImageNet. + +![](images/da8f1d5f175d6ace58dc53825e217c4bb703da30bfc09b175197e5bc8bf6e7b0.jpg) +Figure 5. Examples of cubic reconstructed images for ImageNet. + +# 6. Conclusion + +In this paper, we present approaches for learning SIMs by making use of the sampling and inversion methods for pre-trained unconditional DMs. Theoretical analysis and numerical results are provided to illustrate the effectiveness of the proposed approaches. + +# Impact Statement + +This paper presents work aimed at advancing the field of Machine Learning, particularly in the area of signal recovery using diffusion models (DMs). The proposed method applies DMs to enhance the recovery of signals from Single Index Models (SIMs), offering more flexible and robust solutions for complex signal reconstruction tasks. It could have broad applications in fields such as imaging, signal processing, and data reconstruction, with potential to improve the efficiency and accuracy of various real-world tasks. While no direct ethical concerns are associated with the methodology, the potential societal impacts of this work include improvements in computational efficiency and the enhancement of technologies reliant on image reconstruction and signal recovery. + +# References + +Aali, A., Daras, G., Levac, B., Kumar, S., Dimakis, A. G., and Tamir, J. I. Ambient diffusion posterior sampling: Solving inverse problems with diffusion models trained on corrupted data. https://arxiv.org/2403.08728, 2024. +Alkan, C., Oscanoa, J., Abraham, D., Gao, M., Nurdinova, A., Setsompop, K., Pauly, J. M., Mardani, M., and Vasanawala, S. Variational diffusion models for blind MRI inverse problems. In NeurIPS 2023 Workshop on Deep Learning and Inverse Problems, 2023. +Asim, M., Daniels, M., Leong, O., Ahmed, A., and Hand, P. Invertible generative models for inverse problems: Mitigating representation error and dataset bias. In ICML, 2020. +Aubin, B., Loureiro, B., Baker, A., et al. Exact asymptotics for phase retrieval and compressed sensing with random generative priors. In MSML, 2020. +Bora, A., Jalal, A., Price, E., and Dimakis, A. G. Compressed sensing using generative models. In ICML, 2017. +Bortoli, V. D. Convergence of denoising diffusion models under the manifold hypothesis. Transactions on Machine Learning Research, 2022. Expert Certification. +Boufounos, P. T. and Baraniuk, R. G. 1-bit compressive sensing. In CISS, 2008. + +Candes, E. J. and Wakin, M. B. An introduction to compressive sampling. IEEE Signal Processing Magazine, 25(2): 21-30, 2008. doi: 10.1109/MSP.2007.914731. +Cardoso, G., Le Corff, S., Moulines, E., et al. Monte Carlo guided denoising diffusion models for Bayesian linear inverse problems. In ICLR, 2023. +Chen, H., Lee, H., and Lu, J. Improved analysis of score-based generative modeling: User-friendly bounds under minimal smoothness assumptions. In ICML, 2023a. +Chen, J., Scarlett, J., Ng, M., and Liu, Z. A unified framework for uniform signal recovery in nonlinear generative compressed sensing. In NeurIPS, 2023b. +Chen, M., Huang, K., Zhao, T., and Wang, M. Score approximation, estimation and distribution recovery of diffusion models on low-dimensional data. In ICML, 2023c. +Chen, S., Chewi, S., Li, J., Li, Y., Salim, A., and Zhang, A. R. Sampling is as easy as learning the score: Theory for diffusion models with minimal data assumptions. In ICLR, 2023d. +Chen, S., Chewi, S., Lee, H., Li, Y., Lu, J., and Salim, A. The probability flow ODE is provably fast. In NeurIPS, 2024. +Chi, C., Feng, S., Du, Y., Xu, Z., Cousineau, E., Burchfiel, B., and Song, S. Diffusion policy: Visuomotor policy learning via action diffusion. In Robotics: Science and Systems, 2023. +Chung, H., Sim, B., Ryu, D., and Ye, J. C. Improving diffusion models for inverse problems using manifold constraints. In NeurIPS, 2022a. +Chung, H., Sim, B., and Ye, J. C. Come-closer-diffuse-faster: Accelerating conditional diffusion models for inverse problems through stochastic contraction. In CVPR, 2022b. +Chung, H., Kim, J., Kim, S., and Ye, J. C. Parallel diffusion models of operator and image for blind inverse problems. In CVPR, 2023a. +Chung, H., Kim, J., McCann, M. T., Klasky, M. L., and Ye, J. C. Diffusion posterior sampling for general noisy inverse problems. In ICLR, 2023b. +Chung, H., Lee, S., and Ye, J. C. Decomposed diffusion sampler for accelerating large-scale inverse problems. In ICLR, 2024. +Daras, G., Dean, J., Jalal, A., and Dimakis, A. Intermediate layer optimization for inverse problems using deep generative models. In ICML, 2021. + +Daras, G., Dagan, Y., Dimakis, A., and Daskalakis, C. Score-guided intermediate level optimization: Fast Langevin mixing for inverse problems. In ICML, 2022. +Daras, G., Chung, H., Lai, C.-H., Mitsufuji, Y., Ye, J. C., Milanfar, P., Dimakis, A. G., and Delbracio, M. A survey on diffusion models for inverse problems. https://arxiv.org/2410.00083, 2024. +Deng, J., Dong, W., Socher, R., Li, L.-J., Li, K., and Fei-Fei, L. ImageNet: A large-scale hierarchical image database. In CVPR, 2009. +Dhar, M., Grover, A., and Ermon, S. Modeling sparse deviations for compressed sensing using generative models. In ICML, 2018. +Dhariwal, P. and Nichol, A. Diffusion models beat GANs on image synthesis. In NeurIPS, 2021. +Dou, Z. and Song, Y. Diffusion posterior sampling for linear inverse problem solving: A filtering perspective. In ICLR, 2024. +Fabian, Z., Tinaz, B., and Soltanolkotabi, M. DiracDiffusion: Denoising and incremental reconstruction with assured data-consistency. In ICML, 2023. +Fabian, Z., Tinaz, B., and Soltanolkotabi, M. Adapt and diffuse: Sample-adaptive reconstruction via latent diffusion models. Proceedings of machine learning research, 235: 12723, 2024. +Fei, B., Lyu, Z., Pan, L., Zhang, J., Yang, W., Luo, T., Zhang, B., and Dai, B. Generative diffusion prior for unified image restoration and enhancement. In CVPR, 2023. +Feng, B. T. and Bouman, K. L. Efficient Bayesian computational imaging with a surrogate score-based prior. In NeurIPS 2023 Workshop on Deep Learning and Inverse Problems, 2023. +Feng, B. T., Smith, J., Rubinstein, M., Chang, H., Bouman, K. L., and Freeman, W. T. Score-based diffusion models as principled priors for inverse imaging. In ICCV, 2023. +Foucart, S. and Rauhut, H. A Mathematical Introduction to Compressive Sensing. Springer New York, 2013. +Genzel, M., Macdonald, J., and Marz, M. Solving inverse problems with deep neural networks-robustness included? IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(1):1119-1134, 2022. +Hand, P., Leong, O., and Voroninski, V. Phase retrieval under a generative prior. In NeurIPS, 2018. + +Hansen-Estruch, P., Kostrikov, I., Janner, M., Kuba, J. G., and Levine, S. IDQL: Implicit Q-learning as an actor-critic method with diffusion policies. https://arxiv.org/2304.10573, 2023. +Heckel, R. and Hand, P. Deep decoder: Concise image representations from untrained non-convolutional networks. In ICLR, 2019. +Hertz, A., Mokady, R., Tenenbaum, J., Aberman, K., Pritch, Y., and Cohen-Or, D. Prompt-to-Prompt image editing with cross-attention control. In ICLR, 2023. +Ho, J., Jain, A., and Abbeel, P. Denoising diffusion probabilistic models. In NeurIPS, 2020. +Hong, S., Lee, K., Jeon, S. Y., Bae, H., and Chun, S. Y. On exact inversion of DPM-Solvers. In CVPR, 2024. +Horowitz, J. L. Semiparametric and nonparametric methods in econometrics, volume 12. 2009. +Hyder, R., Shah, V., Hegde, C., and Asif, M. S. Alternating phase projected gradient descent with generative priors for solving compressive phase retrieval. In ICASSP, 2019. +Jagatap, G. and Hegde, C. Algorithmic guarantees for inverse imaging with untrained network priors. In NeurIPS, volume 32, 2019. +Jalal, A., Arvinte, M., Daras, G., Price, E., Dimakis, A. G., and Tamir, J. Robust compressed sensing MRI with deep generative priors. In NeurIPS, 2021a. +Jalal, A., Karmalkar, S., Dimakis, A., and Price, E. Instance-optimal compressed sensing via posterior sampling. In ICML, 2021b. +Karras, T., Laine, S., and Aila, T. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. +Kawar, B., Elad, M., Ermon, S., and Song, J. Denoising diffusion restoration models. In NeurIPS, 2022. +Killedar, V. and Seelamantula, C. S. Compressive phase retrieval based on sparse latent generative priors. In ICASSP, 2022. +Kim, G., Kwon, T., and Ye, J. C. Diffusionclip: Text-guided diffusion models for robust image manipulation. In CVPR, 2022. +Kingma, D., Salimans, T., Poole, B., and Ho, J. Variational diffusion models. In NeurIPS, 2021. +Kong, Z., Ping, W., Huang, J., Zhao, K., and Catanzaro, B. DiffWave: A versatile diffusion model for audio synthesis. In ICLR, 2021. + +Krizhevsky, A. and Hinton, G. Learning multiple layers of features from tiny images. 2009. +Laska, J. N. and Baraniuk, R. G. Regime change: Bit-depth versus measurement-rate in compressive sensing. IEEE Trans. Sig. Proc., 60(7):3496-3505, 2012. +Lee, H., Lu, J., and Tan, Y. Convergence for score-based generative modeling with polynomial complexity. In NeurIPS, 2022. +Li, G., Wei, Y., Chen, Y., and Chi, Y. Towards faster non-asymptotic convergence for diffusion-based generative models. https://arxiv.org/2306.09251, 2023. +Liu, J. and Liu, Z. Non-iterative recovery from nonlinear observations using generative models. In CVPR, 2022. +Liu, Z. and Scarlett, J. The generalized Lasso with nonlinear observations and generative priors. In NeurIPS, 2020a. +Liu, Z. and Scarlett, J. Information-theoretic lower bounds for compressive sensing with generative models. IEEE J. Sel. Areas Inf. Theory, 1(1):292-303, 2020b. +Liu, Z., Gomes, S., Tiwari, A., and Scarlett, J. Sample complexity bounds for 1-bit compressive sensing and binary stable embeddings with generative priors. In ICML, 2020. +Liu, Z., Ghosh, S., and Scarlett, J. Robust 1-bit compressive sensing with partial Gaussian circulant matrices and generative priors. In ITW, 2021a. +Liu, Z., Ghosh, S., and Scarlett, J. Towards sample-optimal compressive phase retrieval with sparse and generative priors. In NeurIPS, 2021b. +Liu, Z., Liu, J., Ghosh, S., Han, J., and Scarlett, J. Generative principal component analysis. In ICLR, 2022a. +Liu, Z., Wang, X., and Liu, J. Misspecified phase retrieval with generative priors. In NeurIPS, 2022b. +Liu, Z., Li, W., and Chen, J. Generalized eigenvalue problems with generative priors. In NeurIPS, 2024. +Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J. DPM-Solver: A fast ODE solver for diffusion probabilistic model sampling in around 10 steps. In NeurIPS, 2022a. +Lu, C., Zhou, Y., Bao, F., Chen, J., Li, C., and Zhu, J. DPM-Solver++: Fast solver for guided sampling of diffusion probabilistic models. https://arxiv.org/2211.01095, 2022b. +Meng, X. and Kabashima, Y. Quantized compressed sensing with score-based generative models. https://arxiv.org/2211.13006, 2022. + +Nguyen, T. V., Jagatap, G., and Hegde, C. Provable compressed sensing with generative priors via Langevin dynamics. https://arxiv.org/2102.12643, 2021. +Ongie, G., Jalal, A., Metzler, C. A., et al. Deep learning techniques for inverse problems in imaging. IEEE J. Sel. Areas Inf. Theory, 1(1):39-56, 2020. +Pan, Z., Gherardi, R., Xie, X., and Huang, S. Effective real image editing with accelerated iterative diffusion inversion. In ICCV, 2023. +Patashnik, O., Garibi, D., Azuri, I., Averbuch-Elor, H., and Cohen-Or, D. Localizing object-level shape variations with text-to-image diffusion models. In ICCV, 2023. +Plan, Y. and Vershynin, R. The generalized Lasso with non-linear observations. IEEE Trans. Inf. Theory, 62(3): 1528-1537, 2016. +Qiu, S., Wei, X., and Yang, Z. Robust one-bit recovery via ReLU generative networks: Improved statistical rates and global landscape analysis. In ICML, 2020. +Raj, A., Li, Y., and Bresler, Y. GAN-based projector for faster recovery with convergence guarantees in linear inverse problems. In ICCV, 2019. +Ren, M., Delbracio, M., Talebi, H., Gerg, G., and Milanfar, P. Multiscale structure guided diffusion for image deblurring. In ICCV, 2023. +Rout, L., Raoof, N., Daras, G., Caramanis, C., Dimakis, A., and Shakkottai, S. Solving linear inverse problems provably via posterior sampling with latent diffusion models. In NeurIPS, 2023. +Saharia, C., Chan, W., Chang, H., Lee, C., Ho, J., Salimans, T., Fleet, D., and Norouzi, M. Palette: Image-to-image diffusion models. In SIGGRAPH, 2022a. +Saharia, C., Chan, W., Saxena, S., Li, L., Whang, J., Denton, E. L., Ghasemipour, K., Gontijo Lopes, R., Karagol Ayan, B., Salimans, T., et al. Photorealistic text-to-image diffusion models with deep language understanding. In NeurIPS, 2022b. +Saharia, C., Ho, J., Chan, W., Salimans, T., Fleet, D. J., and Norouzi, M. Image super-resolution via iterative refinement. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(4):4713-4726, 2022c. +Salimans, T. and Ho, J. Progressive distillation for fast sampling of diffusion models. In ICLR, 2022. +Scarlett, J. and Cevher, V. An introductory guide to Fano's inequality with applications in statistical estimation. Information-Theoretic Methods in Data Science, 2021. + +Scarlett, J., Heckel, R., Rodrigues, M. R., Hand, P., and Eldar, Y. C. Theoretical perspectives on deep learning methods in inverse problems. IEEE Journal on Selected Areas in Information Theory, 3(3):433-453, 2022. +Shah, V. and Hegde, C. Solving linear inverse problems using GAN priors: An algorithm with provable guarantees. In ICASSP, 2018. +Shamshad, F. and Ahmed, A. Compressed sensing-based robust phase retrieval via deep generative priors. IEEE Sens. J., 21(2):2286-2298, 2020. +Sohl-Dickstein, J., Weiss, E., Maheswaranathan, N., and Ganguli, S. Deep unsupervised learning using nonequilibrium thermodynamics. In ICML, 2015. +Song, B., Kwon, S. M., Zhang, Z., Hu, X., Qu, Q., and Shen, L. Solving inverse problems with latent diffusion models via hard data consistency. In ICLR, 2024. +Song, J., Meng, C., and Ermon, S. Denoising diffusion implicit models. In ICLR, 2021a. +Song, J., Vahdat, A., Mardani, M., and Kautz, J. Pseudoinverse-guided diffusion models for inverse problems. In ICLR, 2023. +Song, Y. and Ermon, S. Generative modeling by estimating gradients of the data distribution. In NeurIPS, 2019. +Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., and Poole, B. Score-based generative modeling through stochastic differential equations. In ICLR, 2021b. +Su, X., Song, J., Meng, C., and Ermon, S. Dual diffusion implicit bridges for image-to-image translation. *ICLR*, 2023. +Sun, Y., Wu, Z., Chen, Y., Feng, B. T., and Bouman, K. L. Provable probabilistic imaging using score-based generative priors. IEEE Transactions on Computational Imaging, 2024. +Van Veen, D., Jalal, A., Soltanolkotabi, M., et al. Compressed sensing with deep image prior and learned regularization. https://arxiv.org/1806.06438, 2018. +Wainwright, M. J. High-dimensional statistics: A nonasymptotic viewpoint, volume 48. Cambridge University Press, 2019. +Wallace, B., Gokul, A., and Naik, N. Edict: Exact diffusion inversion via coupled transformations. In CVPR, 2023. +Wang, F., Yin, H., Dong, Y.-J., Zhu, H., Zhang, C., Zhao, H., Qian, H., and Li, C. BELM: Bidirectional explicit linear multi-step sampler for exact inversion in diffusion models. In NeurIPS, 2024. + +Wang, Y., Yu, J., and Zhang, J. Zero-shot image restoration using denoising diffusion null-space model. In ICLR, 2023. +Wei, X., Yang, Z., and Wang, Z. On the statistical rate of nonlinear recovery in generative models with heavy-tailed data. In ICML, 2019. +Wen, Y., Kirchenbauer, J., Geiping, J., and Goldstein, T. Tree-ring watermarks: Fingerprints for diffusion images that are invisible and robust. https://arxiv.org/2305.20030, 2023. +Whang, J., Lei, Q., and Dimakis, A. G. Compressed sensing with invertible generative models and dependent noise. In NeurIPS 2020 Workshop on Deep Learning and Inverse Problems, 2020. +Whang, J., Delbracio, M., Talebi, H., Sahara, C., Dimakis, A. G., and Milanfar, P. Deblurring via stochastic refinement. In CVPR, 2022. +Wu, L., Trippe, B., Naesseth, C., Blei, D., and Cunningham, J. P. Practical and asymptotically exact conditional sampling in diffusion models. In NeurIPS, 2023. +Wu, Y., Rosca, M., and Lillicrap, T. Deep compressed sensing. In ICML, 2019. +Wu, Z., Sun, Y., Chen, Y., Zhang, B., Yue, Y., and Bouman, K. L. Principled probabilistic imaging using diffusion models as plug-and-play priors. In NeurIPS, 2024. +Zhang, B., Chu, W., Berner, J., Meng, C., Anandkumar, A., and Song, Y. Improving diffusion inverse problem solving with decoupled noise annealing. arXiv preprint arXiv:2407.01521, 2024a. +Zhang, G., Ji, J., Zhang, Y., Yu, M., Jaakkola, T. S., and Chang, S. Towards coherent image inpainting using denoising diffusion implicit models. In ICLR, 2023. +Zhang, G., Lewis, J. P., and Kleijn, W. B. Exact diffusion inversion via bi-directional integration approximation. In ECCV, 2024b. +Zhang, Q. and Chen, Y. Fast sampling of diffusion models with exponential integrator. In NeurIPS 2022 Workshop on Score-Based Methods, 2022. +Zhao, W., Bai, L., Rao, Y., Zhou, J., and Lu, J. UniPC: A unified predictor-corrector framework for fast sampling of diffusion models. In NeurIPS, 2024. + +# A. Extended Related Work + +In this subsection, we summarize some relevant works, which can roughly be divided into (i) nonlinear signal recovery with conventional generative models, and (ii) signal recovery with diffusion models. + +Nonlinear signal recovery with conventional generative models: The seminal work (Bora et al., 2017) studies linear compressed sensing with conventional generative priors (such as GANs and VAEs) and demonstrates via numerical experiments on image datasets that using a pre-trained generative prior can significantly reduce the number of required measurements (compared to that of using the sparse prior) for accurate signal recovery. This has led to a significant volume of follow-up works in (Dhar et al., 2018; Hand et al., 2018; Shah & Hegde, 2018; Jagatap & Hegde, 2019; Asim et al., 2020; Ongie et al., 2020; Daras et al., 2021; Liu & Scarlett, 2020b; Jalal et al., 2021b;a), which explore various aspects of high-dimensional signal recovery with generative priors. A literature review in this area can be found in (Scarlett et al., 2022). + +In particular, under conventional generative priors, there have been several studies on 1-bit compressed sensing (Qiu et al., 2020; Liu et al., 2020; 2021a) and phase retrieval (Hand et al., 2018; Hyder et al., 2019; Jagatap & Hegde, 2019; Aubin et al., 2020; Shamshad & Ahmed, 2020; Liu et al., 2021b; Killedar & Seelamantula, 2022; Liu et al., 2022b), among others. Moreover, SIMs that account for unknown nonlinearity and conventional generative priors have been explored in several studies, including (Wei et al., 2019; Liu & Scarlett, 2020a; Liu & Liu, 2022; Chen et al., 2023b). More specifically, the works (Liu & Scarlett, 2020a; Liu & Liu, 2022; Chen et al., 2023b) provide recovery guarantees for the generalized Lasso approach and practical algorithms under the assumption of Gaussian sensing vectors. In (Wei et al., 2019), under the extra assumption that the link function is differentiable, SIMs with link functions of first- and second-orders are studied through Stein's identity, allowing for general non-Gaussian sensing vectors. + +Signal recovery with diffusion models: Due to the ability to model complex distributions, DMs have demonstrated remarkable performance in a variety of applications. The seminal work on DMs (Sohl-Dickstein et al., 2015) introduces a framework for the diffusion process, which has been further developed in multiple forms, such as denoising diffusion probabilistic models (DDPMs) (Ho et al., 2020) and score-based generative models (SGMs) (Song et al., 2021b). These models have been widely applied to signal recovery problems (Daras et al., 2024), which can be broadly classified into two main paradigms. + +One paradigm is task-specific, in which DMs are trained for particular tasks. For example, the model in (Saharia et al., 2022c) is customized for super-resolution, while the model in (Ren et al., 2023) is developed for deblurring. The other paradigm makes use of pre-trained DMs that are not limited to any specific signal recovery problem. Works within this paradigm can be further classified according to how they handle the measurements. Some approaches use DMs as priors to direct the reconstruction process by estimating the score function, as shown in (Feng et al., 2023; Daras et al., 2022). Other approaches, such as DDRM (Kawar et al., 2022), adapt the DDPM framework specifically for linear signal recovery problems. By incorporating singular value decomposition to limit the solution space, DDRM can effectively handle linear measurements. However, its performance degrades when dealing with sparse or limited measurements, rendering it less effective in challenging situations. + +To solve general noisy linear signal recovery problems, some recent works (Chung et al., 2022a; 2023b; Song et al., 2023; Fei et al., 2023; Fabian et al., 2023; Zhang et al., 2023) aim to estimate the posterior distribution using the unconditional diffusion model based on Bayes' rule. In particular, MCG (Chung et al., 2022a) approaches data consistency from the perspective of the data manifold. It proposes a manifold-constrained gradient to ensure that corrections stay on the data manifold DPS (Chung et al., 2023b) abandons the projection step in the reverse process because it may cause the sampling path to deviate from the data manifold. Instead, it approximates the gradient of the posterior through a specially hand-designed strategy, where the measurements can be regarded as a signal conditioning the sampling process. IIGDM (Song et al., 2023) further develops this type of strategy into a unified expression that encompasses various signal recovery problems by using the Moore-Penrose pseudoinverse. IIGDM guides the diffusion process by matching the one-step denoising solution and the ground-truth measurements, after transforming both via a generalized pseudoinverse of the measurement model. DAPS (Zhang et al., 2024a) modifies the traditional diffusion process by decoupling consecutive steps in the sampling trajectory. This allows for greater variation between steps, improving the exploration of the solution space and leading to more accurate and stable reconstructions. + +# B. Proofs of Lemmas 1 and 2 + +Before presenting the proofs, we present the following simple tail bound for a Gaussian random variable. + +Lemma 4. (Gaussian tail bound (Wainwright, 2019, Example 2.1)) Suppose that $X \sim \mathcal{N}(\alpha, \sigma^2)$ is a Gaussian random variable with mean $\alpha$ and variance $\sigma^2$ . Then, for any $u > 0$ , $\mathbb{P}(|X - \alpha| \geq u) \leq 2e^{-\frac{u^2}{2\sigma^2}}$ . + +# B.1. Proof of Lemma 1 + +For $u > 0$ and any $j \in [n]$ , from Lemma 4, from Lemma 4, we have with probability at least $1 - 2e^{-\frac{u^2}{2}}$ that $|\epsilon_j| \leq u$ . Taking a union bound over all $j \in [n]$ , we obtain with probability at least $1 - 2ne^{-\frac{u^2}{2}}$ that $\| \epsilon \|_{\infty} \leq u$ . Then, by setting $u = C\sqrt{\log(2n)}$ , we obtain the desired result. + +# B.2. Proof of Lemma 2 + +Let $g_{i} = \pmb{a}_{i}^{T}\pmb{x}^{*}$ . Since $\pmb{x}^{*} \in S^{n - 1}$ , we know that $g_{i}$ are independent standard normal random variables. Additionally, note that + +$$ +\begin{array}{l} \frac {1}{m} \mathbf {A} ^ {T} \boldsymbol {y} - \mu \boldsymbol {x} ^ {*} = \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \boldsymbol {a} _ {i} - \mu \boldsymbol {x} ^ {*} (30) \\ = \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} - \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {x} ^ {*}\right) + \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {x} ^ {*} - \mu \boldsymbol {x} ^ {*}. (31) \\ \end{array} +$$ + +For any $j \in [n]$ , since $\mathbb{E}[a_{ij}g_i] = x_j^*$ , $a_{ij}$ can be written as + +$$ +a _ {i j} = x _ {j} ^ {*} g _ {i} + \sqrt {1 - \left(x _ {j} ^ {*}\right) ^ {2}} r _ {i j}, \tag {32} +$$ + +where $r_{ij}$ is a standard normal random variable that is independent of $g_i$ . Then, the $j$ -th entry of the first term in the right-hand side of Eq. (31) can be written as + +$$ +\begin{array}{l} \left[ \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} - \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {x} ^ {*}\right) \right] _ {j} = \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(a _ {i j} - g _ {i} x _ {j} ^ {*}\right) (33) \\ = \sqrt {1 - \left(x _ {j} ^ {*}\right) ^ {2}} \cdot \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} r _ {i j}. (34) \\ \end{array} +$$ + +Note that $y_{i} = f(\pmb{a}_{i}^{T}\pmb{x}^{*}) = f(g_{i})$ . Thus $r_{ij}$ is also independent of $y_{i}$ . Let $M_2 \coloneqq \mathbb{E}_{g\sim \mathcal{N}(0,1)}[f(g)^2]$ and $\mathcal{E}_1$ be the event that $\frac{1}{m}\sum_{i=1}^{m}y_{i}^{2} \leq 2M_{2}$ . From (Liu & Liu, 2022, Lemma 3), we have + +$$ +\mathbb {P} \left(\mathcal {E} _ {1} ^ {c}\right) \leq \frac {C _ {f}}{m}, \tag {35} +$$ + +where $C_f$ is a positive constant depending on $f$ . Moreover, conditioned on the event $\mathcal{E}_1$ , the term $\sum_{i=1}^{m} y_i r_{ij}$ in Eq. (34) is zero-mean Gaussian with the variance being $\sum_{i=1}^{m} y_i^2$ . Then, from Lemma 4, we obtain + +$$ +\mathbb {P} \left(\left| \sum_ {i = 1} ^ {m} y _ {i} r _ {i j} \right| > u\right) \leq 2 \exp \left(- \frac {u ^ {2}}{2 \sum_ {i = 1} ^ {m} y _ {i} ^ {2}}\right) \leq 2 \exp \left(- \frac {u ^ {2}}{4 m M _ {2}}\right). \tag {36} +$$ + +Taking a union bound over all $j \in [n]$ , we obtain with probability at least $1 - 2n\exp \left(-\frac{u^2}{4mM_2}\right)$ that + +$$ +\left\| \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} - \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {x} ^ {*}\right) \right\| _ {\infty} = \left\| \sqrt {1 - \left(x _ {j} ^ {*}\right) ^ {2}} \cdot \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} r _ {i j} \right\| _ {\infty} \leq \frac {u}{m}. \tag {37} +$$ + +Furthermore, the $j$ -th entry of the second term in the right-hand side of Eq. (31) can be written as + +$$ +\frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) \boldsymbol {x} ^ {*} - \mu \boldsymbol {x} ^ {*} = \left(\frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) - \mu\right) \boldsymbol {x} ^ {*}. \tag {38} +$$ + +For any $\tau > 0$ , let $\mathcal{E}_2$ be the event that $\left|\frac{1}{m}\sum_{i=1}^{m}y_i(\pmb{a}_i^T\pmb{x}^*) - \mu\right| < \tau$ . From (Liu & Liu, 2022, Lemma 3), we have + +$$ +\mathbb {P} \left(\mathcal {E} _ {2} ^ {c}\right) \leq \frac {C _ {f} ^ {\prime}}{m \tau^ {2}}, \tag {39} +$$ + +where $C_f^\prime$ is a positive constant depending on $f$ . Additionally, conditioned on $\mathcal{E}_2$ , we have + +$$ +\left\| \left(\frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) - \mu\right) \boldsymbol {x} ^ {*} \right\| _ {\infty} = \left| \frac {1}{m} \sum_ {i = 1} ^ {m} y _ {i} \left(\boldsymbol {a} _ {i} ^ {T} \boldsymbol {x} ^ {*}\right) - \mu \right| \cdot \| \boldsymbol {x} ^ {*} \| _ {\infty} \leq \tau . \tag {40} +$$ + +Combining Eqs. (31), (35), (37), (39), and (40), we observe that by setting $u = C_1 \sqrt{\log(2n)} \cdot \sqrt{m}$ and $\tau = C_2 \sqrt{\log(2n)} / \sqrt{m}$ for some sufficiently large positive constants $C_1$ and $C_2$ and letting $C' = C_1 + C_2$ , we obtain the desired result. + +# C. Proof of Theorem 3 + +First, we provide a proof for the auxiliary result in Lemma 3 for popular sampling methods such as DDIM and DM2M (cf. Sec. 2.1). Specifically, we have the following detailed version of Lemma 3. + +Lemma 5. Suppose that the data prediction network $\pmb{x}_{\pmb{\theta}}$ satisfies Assumption 1. Then, if $G: \mathbb{R}^n \to \mathbb{R}^n$ is the generator corresponding to the entire sampling process of DDIM (see Eq. (11)), we have that $G$ is L-Lipschitz continuous with + +$$ +L = \prod_ {i = 1} ^ {N} \left(\frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} + \sigma_ {t _ {i}} \left(\frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}} - \frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}}\right) \cdot L _ {t _ {i - 1}}\right). \tag {41} +$$ + +Additionally, suppose that $G: \mathbb{R}^n \to \mathbb{R}^n$ is the generator corresponding to the entire sampling process of DM2M (see Eq. (12)), and suppose that for $i = 0, 1, 2, \ldots, N$ , $\tilde{\boldsymbol{x}}_{t_i}$ is $\tilde{L}_i$ -Lipschitz continuous with respect to $\tilde{\boldsymbol{x}}_{t_0}$ . Then, we have that $\tilde{L}_0$ can be set to 1 and $\tilde{L}_1$ can be set to be $\frac{\sigma_{t_1}}{\sigma_{t_0}} + \sigma_{t_1}\left(\frac{\alpha_{t_1}}{\sigma_{t_1}} - \frac{\alpha_{t_0}}{\sigma_{t_0}}\right) \cdot L_{t_0}$ , and for $i \geq 2$ , $\tilde{L}_i$ can be calculated via the following recursive formula: + +$$ +\tilde {L} _ {i} = \left(\frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} + \alpha_ {t _ {i}} (1 - e ^ {- h _ {i}}) \cdot \left(1 + \frac {1}{2 r _ {i}}\right) L _ {t _ {i - 1}}\right) \tilde {L} _ {i - 1} + \alpha_ {t _ {i}} (1 - e ^ {- h _ {i}}) \cdot \frac {1}{2 r _ {i}} L _ {t _ {i - 2}} \tilde {L} _ {i - 2}. \tag {42} +$$ + +In particular, we have that $G$ is $L$ -Lipschitz continuous with $L = \tilde{L}_N$ . + +Proof. For DDIM, by the triangle inequality, we have the following inequality for any $i \in [N]$ and any $\pmb{x}_1, \pmb{x}_2 \in \mathbb{R}^n$ : + +$$ +\left\| \kappa_ {i} \left(\boldsymbol {x} _ {1}\right) - \kappa_ {i} \left(\boldsymbol {x} _ {2}\right) \right\| _ {2} \leq \left(\frac {\sigma_ {t _ {i}}}{\sigma_ {t _ {i - 1}}} + \sigma_ {t _ {i}} \left(\frac {\alpha_ {t _ {i}}}{\sigma_ {t _ {i}}} - \frac {\alpha_ {t _ {i - 1}}}{\sigma_ {t _ {i - 1}}}\right) \cdot L _ {t _ {i - 1}}\right) \cdot \left\| \boldsymbol {x} _ {1} - \boldsymbol {x} _ {2} \right\| _ {2}, \tag {43} +$$ + +where $\kappa_{i}$ is defined in Eq. (13). Additionally, it is easy to show that if function $f$ is $L_{f}$ -Lipschitz and $g$ is $L_{g}$ -Lipschitz, then their composition $f\circ g$ is $(L_{f}L_{g})$ -Lipschitz (Bora et al., 2017). Then, we obtain that the generator $G = \kappa_{N}\circ \dots \circ \kappa_{2}\circ \kappa_{1}$ (see Eq. (14)) is $L$ -Lipschitz continuous, with $L$ given by Eq. (41). Note that for the first sampling step of DM2M, we need to use the first-order numerical scheme—DDIM. Then, similarly to the case of DDIM, based on Eq. (12), we can obtain the desired recursive formula for the Lipschitz constants. + +Then, we list the regularity conditions on $\pmb{x}_{\theta}$ required for Theorem 3 as follows. These conditions are similar to those in (Lu et al., 2022a, Appendix B.1). + +The total derivatives $\frac{\mathrm{d}^j\hat{x}_\theta(\hat{x}_\lambda,\lambda)}{\mathrm{d}\lambda^j}$ (as a function of $\lambda$ ) exist and are continuous for $j = 0,1,2,3$ +- The neural function $x_{\theta}(x, t)$ is Lipschitz continuous with w.r.t. its first parameter $x$ (i.e., Assumption 1). +$h_{\mathrm{max}} = \max_{i\in [N]}(\lambda_{t_i} - \lambda_{t_{i - 1}}) = O(1 / N).$ + +Based on the above auxiliary results, we are now ready to present the proof of Theorem 3. + +# C.1. Proof of Theorem 3 + +Let $\bar{G}_t^\dagger$ be the analytic inversion operator (corresponding to Eq. (10)) from time $t$ to $T$ . That is, for any $\pmb{x} \in \mathbb{R}^n$ , we have + +$$ +\bar {G} _ {t} ^ {\dagger} (\boldsymbol {x}) = \frac {\sigma_ {T}}{\sigma_ {t}} \boldsymbol {x} + \sigma_ {T} \int_ {\lambda_ {t}} ^ {\lambda_ {T}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) \mathrm {d} \lambda . \tag {44} +$$ + +Additionally, let $\bar{G}$ be the analytic sampling operator (corresponding to Eq. (10)) from time $T$ to $\epsilon$ . That is, for any $\pmb{x} \in \mathbb{R}^n$ , we have + +$$ +\bar {G} (\boldsymbol {x}) = \frac {\sigma_ {\epsilon}}{\sigma_ {T}} \boldsymbol {x} + \sigma_ {\epsilon} \int_ {\lambda_ {T}} ^ {\lambda_ {\epsilon}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} \left(\hat {\boldsymbol {x}} _ {\lambda}, \lambda\right) \mathrm {d} \lambda . \tag {45} +$$ + +Let $\bar{\pmb{x}}_T = \bar{G}_t^\dagger (\bar{\pmb{x}}_t) = \frac{\sigma_T}{\sigma_t}\bar{\pmb{x}}_t + \sigma_T\int_{\lambda_t}^{\lambda_T}e^{\lambda}\hat{\pmb{x}}_\pmb {\theta}(\hat{\pmb{x}}_\lambda ,\lambda)\mathrm{d}\lambda$ We have + +$$ +\begin{array}{l} \bar {G} \circ \bar {G} _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) = \bar {G} (\bar {\boldsymbol {x}} _ {T}) (46) \\ = \frac {\sigma_ {\epsilon}}{\sigma_ {\epsilon}} \bar {\boldsymbol {x}} _ {T} + \sigma_ {\epsilon} \int_ {\lambda_ {T}} ^ {\lambda_ {\epsilon}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) \mathrm {d} \lambda (47) \\ = \frac {\sigma_ {\epsilon}}{\sigma_ {T}} \left(\frac {\sigma_ {T}}{\sigma_ {t}} \bar {\boldsymbol {x}} _ {t} + \sigma_ {T} \int_ {\lambda_ {t}} ^ {\lambda_ {T}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) \mathrm {d} \lambda\right) + \sigma_ {\epsilon} \int_ {\lambda_ {T}} ^ {\lambda_ {\epsilon}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) \mathrm {d} \lambda (48) \\ = \frac {\sigma_ {\epsilon}}{\sigma_ {t}} \bar {\boldsymbol {x}} _ {t} + \sigma_ {\epsilon} \int_ {\lambda_ {t}} ^ {\lambda_ {T}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) d \lambda + \sigma_ {\epsilon} \int_ {\lambda_ {T}} ^ {\lambda_ {\epsilon}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) d \lambda (49) \\ = \frac {\sigma_ {\epsilon}}{\sigma_ {t}} \bar {\boldsymbol {x}} _ {t} + \sigma_ {\epsilon} \int_ {\lambda_ {t}} ^ {\lambda_ {\epsilon}} e ^ {\lambda} \hat {\boldsymbol {x}} _ {\boldsymbol {\theta}} (\hat {\boldsymbol {x}} _ {\lambda}, \lambda) d \lambda (50) \\ = \bar {x} _ {\epsilon}. (51) \\ \end{array} +$$ + +Therefore, we obtain + +$$ +\begin{array}{l} \left\| G \circ G _ {t} ^ {\dagger} \left(\bar {x} _ {t}\right) - \bar {x} _ {\epsilon} \right\| _ {2} = \left\| G \circ G _ {t} ^ {\dagger} \left(\bar {x} _ {t}\right) - \bar {G} \circ \bar {G} _ {t} ^ {\dagger} \left(\bar {x} _ {t}\right) \right\| _ {2} (52) \\ \leq \| G \circ G _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) - G \circ \bar {G} _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) \| _ {2} + \| G \circ \bar {G} _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) - \bar {G} \circ \bar {G} _ {t} ^ {\dagger} (\bar {\boldsymbol {x}} _ {t}) \| _ {2} (53) \\ \leq L \left\| G _ {t} ^ {\dagger} \left(\bar {\boldsymbol {x}} _ {t}\right) - \bar {G} _ {t} ^ {\dagger} \left(\bar {\boldsymbol {x}} _ {t}\right) \right\| _ {2} + \left\| G \left(\bar {\boldsymbol {x}} _ {T}\right) - \bar {G} \left(\bar {\boldsymbol {x}} _ {T}\right) \right\| _ {2}, (54) \\ \end{array} +$$ + +where the last inequality follows from the $L$ -Lipschitz continuity of $G$ and $\bar{\boldsymbol{x}}_T = \bar{G}_t^\dagger (\bar{\boldsymbol{x}}_t)$ . Under the regularity conditions listed above, similarly to (Lu et al., 2022a, Theorem 3.2), we have + +$$ +\left\| G _ {t} ^ {\dagger} \left(\bar {\boldsymbol {x}} _ {t}\right) - \bar {G} _ {t} ^ {\dagger} \left(\bar {\boldsymbol {x}} _ {t}\right) \right\| _ {2} = O \left(\sqrt {n} h _ {\max } ^ {k _ {1}}\right) \tag {55} +$$ + +and + +$$ +\left\| G \left(\bar {x} _ {T}\right) - \bar {G} \left(\bar {x} _ {T}\right) \right\| _ {2} = O \left(\sqrt {n} h _ {\max } ^ {k _ {2}}\right). \tag {56} +$$ + +Combining Eqs. (54), (55), and (56), we obtain the desired result. + +# D. Experimental Results for CIFAR-10 with 1-bit and cubic Measurements + +In this section, we present the experimental results obtained from the CIFAR-10 dataset (Krizhevsky & Hinton, 2009) using 1-bit and cubic measurements. For the CIFAR-10 dataset, the ambient dimension is $n = 32 \times 32 \times 3 = 3072$ , and the pixel values are normalized to the range [0, 1]. Prior experimental findings have shown that the SIM-DMIS method outperforms SIM-DMS and SIM-DMFIS in terms of reconstruction performance. Therefore, in this study, we limit our comparison to our SIM-DMIS approach against QCS-SGM, DPS-N, and DPS-L. For 1-bit measurements, since QCS-SGM cannot handle cubic measurements, we compare against OneShot proposed in (Liu & Liu, 2022), which uses GANs to solve nonlinear signal recovery problems. Additionally, since we have observed from the results for 1-bit measurements that SIM-DMFIS does not perform well, we do not compare against it. The experimental results demonstrate the superior performance of our proposed method SIM-DMIS across different datasets and measurement settings. + +Results on CIFAR-10 $(32\times 32)$ with 1-Bit Measurements For 1-bit measurements, we report results under two measurement settings: $m = 500$ and $m = 1000$ , corresponding to approximately $16\%$ and $32\%$ of the ambient dimension $n$ . We utilize a pre-trained unconditional DDPM model with the variance preserving (VP) schedule for CIFAR-10. Prior experimental findings have shown that the SIM-DMIS method outperforms SIM-DMS and SIM-DMFIS in terms of reconstruction performance. Therefore, in this study, we limit our comparison to our SIM-DMIS approach against QCS-SGM, DPS-N, and DPS-L. As shown in Table 5, SIM-DMIS consistently outperforms existing approaches across both $m = 500$ and $m = 1000$ . Qualitative results in Figure 6 further confirm its strong reconstruction capability. + +Table 5. Quantitative results for 1-bit with $m = {500}$ and $m = {1000}$ measurements. We mark bold the best scores, and underline the second best scores. + +
MethodNFEm = 500m = 1000
PSNR (↑)SSIM (↑)LPIPS (↓)PSNR (↑)SSIM (↑)LPIPS (↓)
QCS-SGM11608.40±3.750.25±0.190.55±0.2011.76±4.590.41±0.220.41±0.18
DPS-N10009.43±1.890.04±0.060.57±0.059.70±2.190.04±0.060.65±0.08
DPS-L100011.53±1.590.08±0.020.61±0.0312.24±2.710.10±0.050.69±0.07
SIM-DMIS15016.24±1.650.55±0.100.40±0.1018.61±1.650.65±0.080.31±0.07
+ +![](images/fedec3cf3f112032d91b19b9d5f481ef5338b5c51afa392ab6b8dd2a4f8ab8db.jpg) +Figure 6. Examples of reconstructed images for CIFAR-10 with $m = 1000$ 1-bit measurements. + +Results on CIFAR-10 $(32\times 32)$ with Cubic Measurements The quantitative results are shown in Table 6, and examples of reconstructed images are presented in Figure 7. SIM-DMIS consistently outperforms OneShot across all measurement + +settings. Specifically, with $m = 500$ measurements, SIM-DMIS achieves approximately $15\%$ higher PSNR and $2\%$ better SSIM compared to OneShot. With $m = 1000$ measurements, SIM-DMIS achieves approximately $25\%$ higher PSNR and $12\%$ better SSIM compared to OneShot. Furthermore, SIM-DMIS consistently yields a lower LPIPS value, indicating better perceptual similarity to the original images, compared to OneShot. + +Table 6. Quantitative results for CIFAR-10 with cubic measurements. We mark bold the best scores, and underline the second best scores. + +
Methodm = 500m = 1000
PSNR (↑)SSIM (↑)LPIPS (↓)PSNR (↑)SSIM (↑)LPIPS (↓)
OneShot13.68±2.090.33±0.090.50±0.0414.61±2.090.39±0.090.48±0.04
SIM-DMIS15.80±2.020.45±0.100.43±0.0816.97±2.210.55±0.120.38±0.09
+ +![](images/5c858b4ecd1d080aa10e6540d2c18ed2b10de424dc468dfb504ece5f91d27359.jpg) +Figure 7. Examples of reconstructed images for CIFAR-10 with $m = 1000$ cubic measurements. + +# E. Additional Examples of Reconstructed Images for FFHQ and ImageNet with 1-bit Measurements + +In this section, we present some additional examples of reconstructed images for the FFHQ $256 \times 256$ dataset in Figure 8, and also present some additional examples of reconstructed images for the ImageNet $256 \times 256$ dataset in Figure 9. + +![](images/66646f17a9892f12649ff63a1a6d1504297f8b5ecc163b732926980933bf400e.jpg) + +![](images/bc51431fd762d1d2ae04142723db80420f5ebac5706062db626a43218ec6c4d5.jpg) + +![](images/592431885635cd9692bf1c0e885c12090956e7037d8be802ac70ced39899a853.jpg) +Figure 8. Examples of reconstructed images for FFHQ with $m = n / 8 = 24576$ 1-bit measurements. Top: Origin, Middle: SIM-DMS, Bottom: SIM-DMIS. + +![](images/d3c3c784826947dcb5e99ce18107a609cdffe2dec809f2a5d72fc4e62d7ced14.jpg) +Figure 9. Examples of reconstructed images for ImageNet with $m = n / 16 = 12288$ 1-bit measurements. + +# F. Ablation Study for SIM-DMS + +In this section, we present a detailed analysis of the ablation experiments conducted on SIM-DMs using the CIFAR-10 dataset with $m = 500$ 1-bit measurements. The experimental setup follows the same framework as in the main body of the research, and the sampling technique is applied throughout. + +The results shown in Table 7 provide valuable insights into the performance of SIM-DMs under different parameter configurations. Specifically, we analyze the impact of hyperparameters $C_s$ , $C_s'$ , and the number of function evaluations on model performance. + +When varying $C_s$ while fixing $C_s' = 55$ and $\mathrm{NFE} = 50$ , we observe a clear upward trend in both PSNR and SSIM, indicating improved signal quality and better structural similarity with increasing $C_s$ . However, LPIPS reaches its minimum value at a moderate $C_s$ , suggesting that the best perceptual quality is achieved with balanced parameter settings. On the other hand, when $C_s$ is fixed at 55 and $C_s'$ is varied, we find that lower values of $C_s'$ yield better performance across all metrics, with PSNR and SSIM reaching their peak at the lowest tested value. LPIPS remains relatively stable but shows a slight decrease at lower $C_s'$ values. Finally, when we adjust the NFE with $C_s = 55$ and $C_s' = 55$ , all performance metrics show minimal fluctuation, suggesting that once NFE reaches a certain threshold, increasing it further does not yield significant improvements. + +In conclusion, these results underscore the flexibility of SIM-DMS with respect to parameter tuning. The parameter $C_s$ demonstrates a clear impact on reconstruction quality, while lower values of $C_s'$ tend to yield better results. Additionally, the stability across different NFE values indicates the model's efficiency even with fewer iterations. These findings provide valuable guidance for parameter selection in practical applications of SIM-DMS. + +Table 7. Ablation experiments for SIM-DMs on CIFAR-10 with $m = {500}$ 1-bit measurements,with different values of ${C}_{s},{C}_{s}^{\prime }$ and NFEs. We mark bold the best scores, and underline the second best scores. + +
ValueCs(Cs' = 55)Cs'(Cs = 55)NFE (Cs = 55, C's' = 55)
50525558605052555860205080100
PSNR (↑)14.441 ±1.03714.625 ±1.11914.860 ±1.20114.956 ±1.27514.971 ±1.33415.337 ±1.35415.214 ±1.25214.860 ±1.20114.451 ±1.18514.205 ±1.14614.860 ±1.20114.860 ±1.20114.860 ±1.20114.860 ±1.201
SSIM (↑)0.427 ±0.0960.442 ±0.0990.460 ±0.1030.467 ±0.1060.470 ±0.1080.481 ±0.1070.475 ±0.1040.460 ±0.1030.440 ±0.1010.426 ±0.0990.460 ±0.1030.460 ±0.1030.460 ±0.1030.460 ±0.103
LPIPS (↓)0.444 ±0.0900.436 ±0.0900.433 ±0.0940.441 ±0.0970.447 ±0.0990.440 ±0.1000.436 ±0.0980.433 ±0.0940.440 ±0.0910.447 ±0.0900.433 ±0.0940.433 ±0.0940.433 ±0.0940.433 ±0.094
+ +# G. Ablation Study for SIM-DMIS + +In this section, we present a detailed analysis of the ablation experiments conducted on SIM-DMIS using the CIFAR-10 dataset with a measurement of $m = 500$ . The experimental setup follows the same framework as in the main body of the research, and the DDIM sampling and DM2M inversion technique is applied throughout. The results are shown in Table 8. + +When varying $C_s$ while fixing $C_s' = 55$ and $\mathrm{NFE} = 50$ , the trend of PSNR and SSIM are consistent with the SIM-DMS where higher values of $C_s$ also led to better signal quality and structural similarity. On the other hand, when $C_s$ is fixed at 55 and $C_s'$ is varied, the trends for PSNR and SSIM are largely similar to the SIM-DMS results, where lower values of $C_s'$ lead to better performance in these metrics. Interestingly, while the improvement in PSNR and SSIM is clear, LPIPS remains relatively stable across a wide range of $C_s'$ values, with a slight decrease at lower values of $C_s'$ , particularly around 50 and 52. Finally, when adjusting the NFE with $C_s = 55$ and $C_s' = 55$ , the results show minimal fluctuation in all performance metrics. This observation is consistent with the findings from SIM-DMS, where a similar behavior was noted. + +In summary, the findings from the ablation study of SIM-DMIS underline several important insights. The parameter $C_s$ has a notable impact on both the signal quality and structural similarity of the reconstructed images, with higher values leading to better PSNR and SSIM. The parameter $C_s'$ plays a crucial role in enhancing PSNR and SSIM, with lower values yielding better results, while LPIPS remains stable. Additionally, the minimal effect of increasing NFE suggests that SIM-DMIS is highly efficient and provides stable performance even with fewer evaluations. + +Table 8. Ablation experiments for SIM-DMIS on CIFAR-10 with $m = {500}$ 1-bit measurements. We mark bold the best scores, and underline the second best scores. + +
ValueCs(Cs' = 55, NFE=150)Cs'(Cs = 55, NFE=150)NFE (Cs = 55, C's' = 55)
50525558605052555860100150200250
PSNR (↑)15.38815.56215.73315.80915.82016.24716.09115.73315.32215.05715.73315.73315.73315.733
±1.218±1.331±1.420±1.513±1.592±1.655±1.500±1.420±1.355±1.307±1.420±1.420±1.420±1.420
SSIM (↑)0.4890.5060.5220.5310.5340.5480.5400.5220.5000.4840.5220.5220.5220.522
±0.097±0.098±0.099±0.101±0.104±0.101±0.099±0.099±0.099±0.099±0.099±0.099±0.099±0.099
LPIPS (↓)0.4060.3990.4020.4110.4170.4090.4050.4020.4040.4110.4020.4020.4020.402
±0.095±0.093±0.095±0.100±0.102±0.103±0.098±0.095±0.093±0.094±0.095±0.095±0.095±0.095
+ +# H. Comparative Evaluation of SIM-DMS and SIM-DMIS on Performance and Efficiency + +In this section, we evaluate the performance and efficiency of SIM-DMIS and SIM-DMIS on the FFHQ dataset. The experimental setup follows the same framework as in the main body of the research. The results presented in the main paper (Table 1) show that SIM-DMIS consistently outperforms QCS-SGM and SIM-DMFIS in both reconstruction quality and NFE. Notably, QCS-SGM requires over 11,000 NFEs to achieve competitive results, incurring a high computational cost. Due to the performance of SIM-DMIS over both methods, and the particularly high computational cost of QCS-SGM, we exclude QCS-SGM and SIM-DMFIS from the comparisons in this section. + +Performance Evaluation As discussed in Footnote 10 and Appendices F and G, ablation studies on CIFAR-10 show that further increasing the NFE for SIM-DMs does not lead to substantial performance enhancements. + +To further verify this behavior and to compare the relative performance of SIM-DMS and SIM-DMIS, we conduct additional experiments on the FFHQ dataset. The results, summarized in Table 9, indicate that under the same NFEs, SIM-DMIS consistently outperforms SIM-DMS across all standard metrics. + +Table 9. Quantitative results on FFHQ $\left( {m = n/8 = {24576}}\right)$ . We mark bold the best scores, and underline the second best scores. + +
MethodNFEPSNR (↑)SSIM (↑)LPIPS (↓)FID (↓)
DPS-N100011.14±1.460.37±0.090.69±0.05349.24
DPS-L10008.57±2.050.22±0.080.69±0.09109.01
DAPS-N100016.59±0.540.33±0.050.48±0.05138.70
DAPS-L10005.63±0.710.04±0.030.61±0.03322.75
SIM- DMS5017.14±2.410.44±0.070.48±0.05105.04
SIM- DMS15017.72±2.630.46±0.080.48±0.0695.52
SIM-DMIS5018.78±3.090.58±0.100.41±0.0889.47
SIM-DMIS15019.87±2.770.60±0.090.37±0.0576.21
+ +Reconstruction Speed We conduct additional experiments to measure the reconstruction speed of SIM-DMS and SIM-DMIS. The inference time is averaged over 10 validation images from the FFHQ dataset. All experiments are executed on a single NVIDIA GeForce RTX 4090 GPU. As shown in Table 10, the results indicate that SIM-DMS and SIM-DMIS exhibit significantly faster reconstructions when compared to the competing methods. + +Table 10. Comparison of inference time (in seconds) for reconstructing 10 images on FFHQ. We mark bold the best scores, and underline the second best scores. + +
MethodNFEInference Time (s) (↓)
DPS-N1000142
DPS-L1000142
DAPS-N1000160
DAPS-L1000160
SIM- DMS501.96
SIM-DMIS1505.66
\ No newline at end of file diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/images.zip b/ICML/2025/Learning Single Index Models with Diffusion Priors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b8116b531f5adce56c27ea84e2498290a4413d6a --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd6e8715043ae2295cec3f82c2e94b3c634a46ba76cbdad7d5cbffa05e5defae +size 1603120 diff --git a/ICML/2025/Learning Single Index Models with Diffusion Priors/layout.json b/ICML/2025/Learning Single Index Models with Diffusion Priors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bcf3ea1e65e513e19af17ebaccf2cbb05102923a --- /dev/null +++ b/ICML/2025/Learning Single Index Models with Diffusion Priors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af39eb867ff775e3a106a2138125cf400117b2324c29b53184f75130ae11b50f +size 1060187 diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_content_list.json b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..9fe88f2dfe2b6f9ec4ca510a69042bebf44ede76 --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df57fa3d5de3d2a2c0976ceb7a0cdc3a3b92b49c73411e4d8df75cd777dd5786 +size 128065 diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_model.json b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e0765416121dd5b725e347d3b99e23823deacf34 --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60906bef3616c9b776f70b6f0fa2b4be3178f2e79a10b56c8ae6c33f0ad97cef +size 158121 diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_origin.pdf b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0dda03de2ab50eea9db47894a169167a18bd8d98 --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/4bf16e02-c67f-4681-8c5a-7625ddb33317_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2536ab28d20781cb7f4b97dfac10de68e69215bdc15114f5ba0d95b1afd9efc0 +size 5296325 diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/full.md b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..24d30c2730fcbe57bd1b9284ceabecccd50f8fe4 --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/full.md @@ -0,0 +1,460 @@ +# Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction + +Xiang Fu1 Brandon M. Wood1 Luis Barroso-Luque1 Daniel S. Levine1 Meng Gao1 Misko Dzamba1 C. Lawrence Zitnick1 + +# Abstract + +Machine learning interatomic potentials (MLIPs) have become increasingly effective at approximating quantum mechanical calculations at a fraction of the computational cost. However, lower errors on held out test sets do not always translate to improved results on downstream physical property prediction tasks. In this paper, we propose testing MLIPs on their practical ability to conserve energy during molecular dynamic simulations. If passed, improved correlations are found between test errors and their performance on physical property prediction tasks. We identify choices which may lead to models failing this test, and use these observations to improve upon highly-expressive models. The resulting model, eSEN, provides state-of-the-art results on a range of physical property prediction tasks, including materials stability prediction, thermal conductivity prediction, and phonon calculations. + +# 1. Introduction + +Density Functional Theory (DFT), which models the electrons in materials and molecules, serves as the foundation for many modern drug and materials discovery workflows. Unfortunately, DFT calculations are notoriously computationally intensive, scaling cubically with the number of electrons in the system: $O(n^{3})$ . Machine learning interatomic potentials (MLIPs) are promising in approximating and expediting DFT calculations. With increasing data set sizes and model innovations, MLIPs have shown substantial improvements in accuracy and generalization capabilities (Batatia et al., 2023; Merchant et al., 2023; Yang et al., 2024; Barroso-Luque et al., 2024). + +Fundamental AI Research (FAIR) at Meta. Correspondence to: Xiang Fu , C. Lawrence Zitnick . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +Predicting physical properties in chemistry and materials science often requires complex workflows involving numerous evaluations of DFT or MLIPs. For example, in molecular dynamics (MD) simulations, forces are predicted over thousands to millions of time steps. However, the MLIP literature has mostly focused on assessing models based on energy and force predictions over static DFT test sets rather than directly assessing their performance in complex simulations. This approach has limitations, as improved accuracy on test sets does not always lead to better predictions of physical properties (Póta et al., 2024; Loew et al., 2024). + +In this paper, we address two questions: Why does higher test accuracy sometimes fail to enhance a model's ability to predict physical properties, and how can we improve MLIPs to excel in this area? We first outline four critical property prediction tasks and identify the properties required for an MLIP to succeed in these tasks. These properties entail learning a conservative model with continuous and bounded energy derivatives, indicating a smoothly-varying and physically meaningful energy landscape. To test whether these properties hold, we propose testing the ability of MLIPs to practically conserve energy in MD simulations. We demonstrate models that pass this test have a higher correlation between test errors and property prediction accuracy. + +Building on these insights, we present a novel MLIP called eSEN and training approach that achieves state-of-the-art (SOTA) performance on complex property prediction tasks. Specifically, our model is capable of running energy-conserving MD simulations for out-of-distribution systems (Figure 1 (a)). For materials stability prediction, eSEN achieves a leading F1 score of 0.831 and a $\kappa_{\mathrm{SRME}}$ of 0.340 on the compliant Matbench-Discovery benchmark (Riebesell et al., 2023; Pota et al., 2024). Previous models are only able to excel in one of these metrics (Figure 1 (b,c)). We also achieve a SOTA F1 score of 0.925 and $\kappa_{\mathrm{SRME}}$ of 0.170 on the non-compliant category. On the MDR Phonon benchmark (Loew et al., 2024), SOTA results are found (Figure 1 (d)). Finally, eSEN achieves the highest test accuracy on the SPICE-MACE-OFF dataset (Kovacs et al., 2023). + +![](images/0add68526bf5748846ca85a4b3f54d5a95c7da46c36104cb323aef72e0d55fb3.jpg) +Figure 1. (a) Energy conservation in MD simulations. Direct-force models (Orb, eqV2) and CHGNet fail to conserve. (b) A higher F1 score on the Matbench-Discovery strongly correlates with a lower test-set energy MAE. (c) Test-set energy MAE and $\kappa_{\mathrm{SRME}}$ on the Matbench-Discovery benchmark. (d) Test-set energy MAE and vibrational entropy MAE on the MDR Phonon benchmark. Our model (eSEN) achieves the best performance on all benchmarks. A higher correlation between test-set energy MAE and physical property prediction performance can be observed among energy-conserving models. All models are trained on MPTrj. + +# 2. Preliminaries + +# 2.1. Machine learning interatomic potentials + +Under the Born-Oppenheimer approximation (Oppenheimer, 1927) utilized by DFT (Parr et al., 1979), the Potential Energy Surface (PES) can be written as a function of positions, $\pmb{r}$ , and atomic numbers, $\pmb{a}$ : $E(\pmb{r},\pmb{a})$ . Per-atom forces can be calculated by taking the negative gradient of the PES with respect to the atom positions, $\pmb{F} = -\nabla_{\pmb{r}}E$ . For periodic systems such as inorganic materials, the lattice parameters $\pmb{l}$ are also considered ( $E(\pmb{r},\pmb{a},\pmb{l})$ ), and the stress $\sigma$ may also be calculated, which can be understood as the gradient of the potential energy surface with respect to the lattice parameters. + +The goal of an MLIP (Unke et al., 2021b) is to predict the exact same properties as DFT from a training dataset of DFT calculations (Chanussot et al., 2021; Riebesell et al., 2023; Loew et al., 2024). The most straightforward benchmark for MLIPs is to evaluate the model on a held-out test set of DFT calculations, and compare models based on the mean absolute error (MAE) or root mean squared error (RMSE) of + +energies, forces, or stresses. To bridge the gap between these performance metrics and practical applicability, we need to ensure they correlate with physical property prediction tasks, such as those described next. + +# 2.2. Physical property prediction tasks + +Geometry optimization/relaxation. Many computational chemistry and materials science tasks rely on atomic systems being in stable configurations, which correspond to minima of the PES. Stable states are found by minimizing the potential energy using an optimization procedure that iteratively updates atom positions based on the predicted forces $(\boldsymbol{F} = -\nabla_{r}\boldsymbol{E})$ . Given that many physical properties are evaluated at or near equilibrium states, geometry optimization (also referred to as "relaxation") is usually the first step in most computational workflows. + +MD simulations. Simulating the time evolution of atomic systems enables us to gain understanding of various chemical and biological processes, as well as enabling the calculation of macroscopic properties, such as liquid densities, that can be experimentally verified. For the task of molecular dynamics simulation, we typically use a potential to compute the per-atom forces which are then used to numerically integrate Newton's equations of motion. In this work, we will focus on the microcanonical ensemble (NVE), where the number of particles (N), the volume of the system (V), and the energy of the system (E) are kept constant. + +Phonon and thermal conductivity calculations. Precise predictions of phonon band structures and vibrational modes are essential for understanding various material properties, including dynamical stability, thermal stability (Bartel, 2022; Fultz, 2010), thermal conductivity (Razeghi, 2002), and optoelectronic behavior (Ganose et al., 2021). The calculation of phonon band structures requires the MLIP to accurately predict higher-order derivatives and capture the subtle curvature of the true PES around critical points. Recent work (Póta et al., 2024) has demonstrated the usage of MLIPs in predicting thermal conductivity $(\kappa)$ by solving the Wigner transport equation (Simoncelli et al., 2022). In order to accurately predict $\kappa$ , MLIPs must reliably capture both harmonic and anharmonic phonon behavior, which necessitates the calculation of second and third derivatives of the learned PES. + +# 3. Desideratum for physical property prediction + +We begin the section by defining what it means for an MLIP to be energy conserving, which is a fundamental principle for applications such as MD simulations (Tuckerman, 2023). For many physical property prediction tasks that probe the higher-order derivatives of the PES it is also important that + +the PES's derivatives are well-behaved (they exist and are bounded). To indicate whether a PES meets these criteria, we discuss how an MLIP's ability to conserve energy given fixed simulation settings may be used. + +# 3.1. Conservative forces + +For a force model to be conservative, the work done by moving in a closed path must be zero, i.e., the integration of the forces along any path that starts and ends at the same point is zero: + +$$ +\oint \boldsymbol {F} \cdot d \boldsymbol {r} = 0 \tag {1} +$$ + +This property holds if the forces are calculated as the negative derivative of the PES with respect to the atom positions (Unke et al., 2021b). However, predicting forces as derivatives requires an additional backpropagation step through the network, which increases the computational cost of the MLIP. Alternatively, some networks (Liao et al., 2023; Neumann et al., 2024) directly predict forces using a separate force head to increase efficiency1. Although direct-force models can achieve high accuracy, their non-conservative nature leads to significantly larger errors in certain property prediction tasks (Fu et al., 2023; Loew et al., 2024; Póta et al., 2024; Bigi et al., 2024). + +# 3.2. Bounded energy derivatives + +Conservative forces is a necessary but not sufficient condition for an MLIP to demonstrate energy conservation in MD. In practice, MD simulations use a finite-order numerical integration algorithm and a finite time step $\Delta t$ , which introduces truncation errors. The most commonly used integrator for the NVE ensemble is the Verlet algorithm—a second-order integrator. The Verlet integrator is known to approximately conserve the total energy of the system in long-time simulations. As shown by Theorem 5.1 of Hairer et al. 2003, the total energy drift of a simulation satisfies + +$$ +| E (\pmb {r} _ {T}, \pmb {a}) - E (\pmb {r} _ {0}, \pmb {a}) | \leq C \Delta t ^ {2} + C _ {N} \Delta t ^ {N} T, (2) +$$ + +where $T, 0 \leq T \leq \Delta t^{-N}$ , is the total simulation time, $N$ is a positive integer representing the highest order for which the $N$ th-order derivative of $E$ is continuously differentiable with a bounded derivative, and $\boldsymbol{r}_0$ and $\boldsymbol{r}_T$ are the starting and ending positions of the atoms in the simulation respectively. The constants $C$ and $C_N$ are independent of $T$ and $\Delta t$ . The energy drift bound contains two terms: the first term represents a time-independent fluctuation of $O(\Delta t^2)$ and the second term represents the long-term energy conservation. The proof for this theorem is long and technical, for + +![](images/3a94b44fe2dbc563755dbcc745fdb9e8920663e223fafb13cc064667d2041ed0.jpg) +Figure 2. (a) The eSEN architecture. The high-level architecture is similar to Transformer/Equiformer, while the edgewise/nodewise layers are simplified/enhanced. The final-layer $L = 0$ features are used to predict nodewise energy, which is summed to get the total potential energy $E$ . Forces and stress are obtained through back-propagation. (b) The Edgewise Convolution layer in eSEN. + +![](images/8e7267438b0687ea9399c43d356aef0f55296af16fb93809b051d267c843823b.jpg) + +which we refer interested readers to Hairer et al. 2003 and Hairer et al. 2006 for more details. + +In Equation (2), the $\Delta t^{N}$ in the second term and the bound on the simulation time $T\leq \Delta t^{-N}$ implies that the PES must be continuously differentiable to high order for energy conservation in long-time simulations. The critical constant $C_N$ depends on the bounds of the derivatives of $E$ up to the $(N + 1)\mathrm{th}$ order. This implies that, given a fixed time step size, $E$ and its higher-order derivatives up to the $(N)$ th order all need to be continuously differentiable with bounded derivatives to maintain long-time conservation. If the derivatives of a PES are more tightly bound, approximate energy conservation will be maintained even at larger step sizes $\Delta t$ . Therefore, the magnitude of $\Delta t$ for which the energy is stable can be viewed as a proxy for the derivative bounds of the estimated PES. Alternatively, if a certain time step is known to be stable when using DFT, we can determine whether an MLIP has similar bounds on higher-order derivatives by testing whether it is also stable using the same time step. + +# 4.eSEN + +We propose equivariant Smooth Energy Network (eSEN), a new MLIP architecture that improves upon architectures that demonstrate high test accuracies to achieve effective physical property predictions. eSEN is a message-passing neural network that conducts multiple blocks of edgewise + +and nodewise neural processing. Initially, all nodes are embedded as multi-channel spherical harmonic representations. Each eSEN layer block updates the node embedding by conducting an edgewise convolution, followed by a node-wise feed-forward network with normalization layers and residual connections between all layers. + +A model diagram is shown in Figure 2. eSEN utilizes the same SO2 convolution layer from the equivariant spherical channel network (eSCN) architecture (Passaro & Zitnick, 2023) inside the edgewise convolution block. Compared to eSCN, our edgewise convolution blocks first concatenate the source and target node embedding, then apply two SO2 convolution layers with an intermediate non-linearity. We also add an envelope function (details in Section 5) which is not in eSCN. The nodewise feed-forward layer uses two equivariant linear layers and an intermediate SiLU-based gated non-linearity (Weiler et al., 2018; Geiger & Smidt, 2022), which is the same as Equiformer (Liao & Smidt, 2022). Unlike eSCN and EquiformerV2 (Liao et al., 2023), which projects the spherical-harmonics channels onto spatial grids for nodewise processing, the nodewise layers in eSEN do not discretize the node representations. As we demonstrate in Section 5, this design improves the ability of the model to conserve energy. Normalization is performed using the equivariant layer normalization (Ba, 2016) proposed by Equiformer (Liao & Smidt, 2022). In the next section, we conduct an in-depth analysis of the key design choices for energy conservation, which we argue is important for accurate physical property prediction. + +# 5. Design choices for enhancing physical property prediction + +As discussed in Section 3, having conservative forces with continuous and bounded energy derivatives are properties an MLIP should obey for MD simulations. It can also be seen as a prerequisite for the MLIP to accurately capture higher-order behavior of the PES and thus high accuracy in physical property prediction tasks such as phonon calculations. Motivated by this observation, we identify design choices that impact a model's ability to conserve energy and whether its PES varies smoothly. These design choices can be categorized into three aspects: (1) conservative vs. direct-force prediction; (2) discretization of the representation; and (3) obtaining a continuous and smoothly varying PES. For many of these design aspects, their impact on the desired properties is not well understood. + +To quantify whether an MLIP's PES is continuous and smoothly varying, we measure the ability of the resulting MLIP to conserve energy during MD simulations with a predetermined fixed time step. We trained eSEN models under the same hyperparameters while ablating one design choice at a time. We construct out-of-distribution (OOD) MD + +simulation tasks for both inorganic materials and organic molecules using models trained on the MPTrj (Jain et al., 2013; Deng et al., 2023) and the SPICE-MACE-OFF (Eastman et al., 2023; Kovacs et al., 2023) datasets. For inorganic materials, we compute an average conservation error over 81 NVE MD simulations of 100 ps based on the TM23 dataset's simulation settings (Owen et al., 2024). For organic molecules, we compute an average conservation error over 7 NVE MD simulations of 100 ps based on the MD22 dataset's simulation settings (Chmiela et al., 2023). All eSEN models are 2-layer with 3.2M trainable parameters. We include details regarding the task protocol in Appendix A. + +# 5.1. Direct-force prediction + +Models that directly predict forces $\hat{F}$ from the atomic configuration may produce forces that are inconsistent with the energy prediction, i.e., $\hat{F} \neq -\nabla_{r}\hat{E}$ , and more importantly are unlikely to be conservative. From the perspective of minimizing the test error, the direct-force approach has strong motivations: it avoids the backward pass for force prediction, which significantly improves model efficiency and enables low-precision training which further accelerates training. Empirically, current SOTA accuracy on the OC20, OC22, and Matbench-Discovery (Chanussot et al., 2021; Tran et al., 2023; Riebesell et al., 2023) benchmarks are achieved by direct-force models. Despite this, the direct-force formulation results in significant energy drift in MD simulations, as shown in Figure 4 (a1, a2). For this reason, we compute forces as the negative gradient of the PES with respect to the atom positions in eSEN. + +![](images/14bce4b453c9d6063e78ad3cf675c3639395e4f0308a80f70fa58dc011f2900a.jpg) +Figure 3. Validation loss curves for epoch and wallclock time. + +Direct-force pre-training. Although direct-force models are not suitable for certain physical property prediction tasks, they may still offer advantages (Bigi et al., 2024; Amin et al., 2025). We demonstrate their efficiency can offer significant benefit as a pre-training strategy for a conservative model. Figure 3 shows the validation loss of 2-layer eSEN models trained on the MPTrj dataset: direct-force, conservative, and conservative fine-tuning from a pre-trained direct-force backbone. We start from a direct-force model trained for 60 epochs, remove its direct-force prediction head, and fine- + +![](images/6d66b0f41773e96ebf564fbdd061a48c781b7767e14310395ab148948a12eb39.jpg) + +![](images/840ddf741a2c35363ccca783188e13affdf4123624c83d858b9c7bf02b068403.jpg) + +![](images/6c47773461827b4b5f34ce2140cdd3476fef4c33aebbf44e6c662cc46687702a.jpg) + +![](images/b9e6bfdaa03d66a0ea506ae41937fec54e781dc5abe7f0f6e8eb68ba25e5aa72.jpg) +Figure 4. Conservation error on the TM23 task (top row) and MD22 task (bottom row) for ablating design choices of eSEN. Models that conserve energy are bolded in the legends. + +![](images/6a537e8a5fb762ce7a0bdc8f1aeed56772de0e0ed91104e3c47eb9c253cbc173.jpg) + +![](images/c969f06d48c12b1081d3f333580e1f5ef48cbf2315faf5b4f4a52d2c54b807e5.jpg) + +tune using conservative force prediction. The conservative fine-tuned model achieves a lower validation loss after being trained for 40 epochs compared to the from-scratch conservative model being trained for 100 epochs. The fine-tuning strategy also reduces the wallclock time for model training by $40\%$ . The strategy of combining direct-force pre-training and conservative fine-tuning is also shown to be effective under different data/model settings (Bigi et al., 2024). + +# 5.2. Representation discretization + +As proposed by Cohen & Welling 2016 and later used in eSCN and EquiformerV2 (Zitnick et al., 2022; Passaro & Zitnick, 2023; Liao et al., 2023), non-linearities may be performed by projecting the spherical harmonics to a discrete grid. A $1 \times 1$ convolution or pointwise non-linearity may then be applied to this grid, which then get projected back to the spherical-harmonics space. The non-linear step may introduce higher-frequency signals than cannot be properly represented by the spherical harmonics, i.e., they are beyond the Nyquist frequency. This can lead to sampling errors that break strict equivariance and energy conservation. This problem can be mitigated by sampling the grid at higher resolutions as shown in Figure 4 (b1, b2). In eSEN, we instead use the SiLU-based equivariant Gated non-linearity (Weiler et al., 2018; Geiger & Smidt, 2022) that performs the nonlinearity directly in the spherical harmonic representation. This does not require a projection to a discrete grid, so the model is perfectly equivariant and conservative up to numerical accuracy. + +# 5.3. Smoothly varying PES + +Subtle choices in the design of MLIPs can have a significant impact on whether a PES varies smoothly and can even lead to the presence of discontinuities. These include how neighboring atoms are chosen, whether envelope functions are used near atom distance cutoffs, and which basis functions are used to embed pairwise atom distances. We discuss each of these in turn. + +A maximum number of neighbors limit in graph construction has been found to improve training efficiency without compromising test error (Liao et al., 2023; Qu & Krishnapriyan, 2024). However, it results in a discontinuity in the learned PES as the nearest-K neighbors may change drastically under a small perturbation of the atom positions. As shown in Figure 4 (c1, c2), having a maximum neighbor limit breaks energy conservation. In eSEN, instead of limiting the number of neighbors, we use the common approach of applying a distance cutoff (6Å) under which all neighbors are kept. + +Envelope functions were first introduced in the DimeNet architecture (Gasteiger et al., 2020a) to improve model smoothness. The radial basis function used in MLIPs is not twice continuously differentiable due to the use of a finite cutoff during graph construction. By applying a polynomial envelope function on the edge messages, the values in an edge message and its first/higher-order derivatives with respect to atom positions decays to 0 when the edge distance approaches the cutoff distance. Figure 4 (c1, c2) + +Table 1. Test set MAE for design choices studied in Section 3. The conserved model significantly outperforms the direct-force model on SPICE-MACE-OFF. $N_{\mathrm{basis}} = 512$ performs slightly better on SPICE but slightly worse on MPTrj. Other eSEN variants all have similar test errors on MPTrj/SPICE-MACE-OFF. Energy MAE is in meV/atom. Force MAE is in meV/Å. Stress MAE is in meV/Å/atom. + +
ModelMPTrjSPICE
EnergyForceStressEnergyForce
eSEN17.0243.960.140.236.36
eSEN, direct18.6643.620.160.5610.98
eSEN, neighbor limit17.3044.110.140.246.52
eSEN, no envelope17.6044.690.140.236.33
eSEN, Nbasis=51219.8748.290.150.195.40
eSEN, Bessel17.6544.830.150.205.54
eSEN, discrete, res=617.0543.100.140.266.34
eSEN, discrete, res=1017.1143.130.140.336.57
eSEN, discrete, res=1417.1243.090.140.336.51
+ +shows a model fails to conserve energy without the envelope function. + +Radial basis functions are commonly used to embed interatomic distances (Bartók et al., 2013). A larger number of basis functions (512 in Passaro & Zitnick 2023, as opposed to 10 in eSEN's default setting) allows higher-frequency signals to pass through the network. This can lead to the PES being more sensitive to small shifts in the atom positions. In our experiments, using a large number of basis functions breaks conservation for the TM23 tasks, but is able to conserve energy for the MD22 tasks. Using a Bessel radial basis function (as opposed to a Gaussian radial basis in the default setting) does not impact conservation properties in both tasks. + +# 5.4. Ablation studies + +Many of the architecture choices described above have negligible impact on the test set errors as shown in Table 1. However, as shown in Figure 4, they can have a dramatic impact on whether a model is conservative in practice. If a model is found to be conservative, stronger correlations are found between test errors and property prediction tasks (Figure 1 and Figure 6). + +# 6. Experiments + +In the previous section, we demonstrated the design of eSEN results in its ability to be energy-conserving in MD simulations. In this section, we evaluate eSEN in physical property prediction tasks: (1) materials stability prediction based on geometry optimization; (2) thermal conductivity prediction; and (3) phonon calculation. We also demonstrate the correlation between test energy MAE and physical property prediction tasks for eSEN. + +# 6.1. Matbench Discovery + +The Matbench-Discovery benchmark evaluates a model's ability to predict ground-state (0 K) thermodynamic stability through geometry optimization and energy prediction. It is a widely used benchmark for evaluating ML models in materials discovery. The compliant benchmark only includes models trained on the MPTrj (Jain et al., 2013; Deng et al., 2023) dataset or its subset, which facilitate a fair comparison of model architectures. The F1 score is the primary metric used to rank models. We train an eSEN with 30M parameters on MPTrj for 60 epochs of direct-force pre-training and 40 epochs of conservative fine-tuning. DeNS (Liao et al., 2024) is used during direct-force pre-training. As shown in Table 2, eSEN-30M-MP achieves an F1 score of 0.831—the highest among all compliant models. eSEN-30M-MP also achieves the lowest root mean square deviation (RMSD) when comparing the relaxed structures to the ground truth DFT reference. + +The thermal conductivity prediction task requires accurate modeling of harmonic and anharmonic phonons in materials, which tests the accuracy of second and third order derivatives of the learned PES. The primary metric is the symmetric relative mean error in predicting thermal conductivity ( $\kappa_{\mathrm{SRME}}$ ). We follow the protocol set forth in the Matbench-Discovery benchmark (Riebesell et al., 2023; Póta et al., 2024) to predict thermal conductivity $\kappa$ . After running a structural relaxation, $\kappa$ is computed using second and third order force constants obtained from phonon calculations using the supercell method. + +As shown in Table 2, our model achieves a $\kappa_{\mathrm{SRME}}$ of 0.340 under the default evaluation protocol proposed by Póta et al. 2024. Notably, our model excels in both the F1 score and $\kappa_{\mathrm{SRME}}$ , while all previous models only achieve SOTA performance on one or the other of these metrics. + +The non-compliant Matbench-Discovery benchmark includes models trained on datasets other than MPTrj. eSEN30M-OAM is an eSEN model with 30 million parameters pre-trained on the OMat24 (Barroso-Luque et al., 2024) dataset then fine-tuned on the subsampled Alexandria (sAlex) dataset (Barroso-Luque et al., 2024; Schmidt et al., 2024) and MPTrj dataset. As shown in Table 3, eSEN30M-OAM achieves the best performance among all noncompliant models with an F1 score of 0.925, a $\kappa_{\mathrm{SRME}}$ of 0.170, and an RMSD of 0.0608, significantly advancing state-of-the-art. + +# 6.2. MDR phonon benchmark + +The MDR Phonon benchmark (Loew et al., 2024) assesses the performance of MLIPs in predicting key phonon properties, including maximum phonon frequency ( $\omega_{\mathrm{max}}$ ), entropy ( $S$ ), free energy ( $F$ ) and heat capacity at constant volume + +Table 2. Matbench-Discovery benchmark results of compliant models (trained only on MPtrj or its subset) with results on the unique prototype split. MAE is in units of eV/atom. $(\uparrow/\downarrow)$ stands for higher/lower the better. + +
MetriceSEN-30M-MPeqV2 S DeNSMatRIS-MPAlphaNet-MPDPA3-v2-MPORB v2 MPtrjSevenNet-13i5GRACE-2L-MPtrjMACE-MP-0CHGNetM3GNet
F1 ↑0.8310.8150.8090.7990.7860.7650.7600.6910.6690.6130.569
DAF ↑5.2605.0425.0494.8634.8224.7024.6294.1633.7773.3612.882
Precision ↑0.8040.7710.7720.7430.7370.7190.7080.6360.5770.5140.441
Accuracy ↑0.9460.9410.9380.9330.9290.9220.9200.8960.8780.8510.813
MAE ↓0.0330.0360.0370.0410.0390.0450.0440.0520.0570.0630.075
R2 ↑0.8220.7880.8030.7450.8040.7560.7760.7410.6970.6890.585
κSRME ↓0.3401.6760.8611.310.9591.7250.5500.5250.6471.7171.412
RMSD ↓0.07520.07570.07730.10670.08230.10070.08470.08970.09150.09490.1117
+ +Table 3. Matbench-Discovery benchmark results of non-compliant models with results on the unique prototype split. + +
ModeleSEN-30M-OAMeqV2-M-OAMORB v3SevenNet-MF-ompaDPA3-v2-OpenLAMGRACE-2L-OAMMatterSim-v1-5MMACE-MPA-0GNoME
F1 ↑0.9250.9170.9050.9010.8900.8800.8620.8520.829
DAF ↑6.0696.0475.9125.8255.7475.7745.8525.5825.523
Precision ↑0.9280.9240.9040.8790.8790.8830.8950.8530.844
Accuracy ↑0.9770.9750.9710.9690.9660.9630.9590.9540.955
MAE ↓0.0180.0200.0240.0210.0220.0230.0240.0280.035
R2 ↑0.8660.8480.8210.8670.8690.8620.8630.8420.785
\( \kappa_{\text{SRME}} \)↓0.1701.7710.2100.3170.6870.2940.5740.412N/A
RMSD ↓0.06080.06910.07500.06390.06790.06660.07330.0731N/A
+ +$(C_V)$ , for around 10,000 materials. The evaluation follows the testing protocol outlined by Loew et al. 2024. Section 6.2 shows the resulting MAE of our model and those of several other models2. eSEN achieves SOTA results in both compliant and non-compliant categories. + +Our results are consistent with those reported by Loew et al. 2024, showing that conservative MLIPs significantly outperform direct-force models in terms of prediction accuracy when tested using phonon calculations with a displacement of $0.01\AA$ . The high error of direct-force models can be largely attributed to high-frequency prediction errors at small displacements (Loew et al., 2024). Increasing the displacement used in the finite-difference phonon calculations to $0.2\AA$ can considerably improve prediction accuracy of direct-force models (with caveats). We include a more detailed analysis of the relationship between atom displacement and phonon prediction in Appendix B. + +In physical phonon calculations, we expect the results to converge as the displacement goes to zero. By examining the resulting phonon band structure, we can gain insight into this behavior. Figure 5 presents the predicted phonon band structure and density of states for three representative materials using eSEN. The predicted phonon bands exhibit convergence as the displacement decreases. In contrast, Figures Figure C.11 and Figure C.12 display the phonon bands for the same three materials predicted using eqV2-S-DeNS (direct-forces), which not only fail to demonstrate convergence but also exhibit significant errors, including missing + +Table 4. Summary of model performance on the MDR Phonon benchmark. Metrics include maximum phonon frequency (MAE( $\omega_{\text{max}}$ ), in K), the vibrational entropy (MAE(S), in J/K/mol), the Helmholtz free energy (MAE(F), in kJ/mol), and the heat capacity at constant volume (MAE( $C_V$ ), in J/K/mol). *The OMat24 dataset uses a slightly different DFT setting from the DFT setting of the MDR Phonon benchmark. + +
Compliant modelsMAE(ωmax)MAE(S)MAE(F)MAE(CV)
M3GNet981505622
CHGNet891144521
MACE61602413
GRACE-2L (r6)402595
SevenNet-04048199
SevenNet-13i52628105
eSEN-30M-MP211354
Direct-force models
Orb MPTrj [0.01 Å]30947664181
Orb MPTrj [0.2 Å]6134118
eqV2-S-DeNS [0.01 Å]2802245494
eqV2-S-DeNS [0.2 Å]582688
Non-compliant models
eqV2-M-OAM [0.01 Å]780403241100
eqV2-M-OAM [0.2 Å]502579
MatterSim171553
GRACE-2L-OAM191454
SevenNet-MF-ompa15833
eSEN-30M-OAM151043
+ +acoustic branches and spurious imaginary frequencies. + +While we find that the OMat-trained models (without sAlex/MPTrj finetuning) may provide a lower error on phonon prediction (7/7/2/2 for $\omega_{\mathrm{max}} / S / F / C_V$ MAE), we refrain from direct comparison due to mismatch in level of theory. We attribute this result to the softening issue of the sAlex and MPTrj dataset (Deng et al., 2025; Barroso-Luque et al., 2024), which OMat24 addresses. We refer interested + +![](images/6b08f218d03ef6d8204faf5503319828d20c566d4ddbed451d6701e83cab305b.jpg) +Figure 5. Predicted phonon band structure and density of states (DOS) of Si (diamond structure), CsCl (CsCl structure), AlN (wurtzite structure) using eSEN at different displacement values. DFT baseline is taken from the PBE MDR dataset (Loew et al., 2024) calculated using a displacement of $0.01\AA$ + +![](images/167d0497ed02dac060f1b4aec7910fb00875b50a7f67975b7f1e558a24927179.jpg) + +![](images/6ed6abebb45516113bbd7af0a74429e21f8d0b294c244d25d0ebbc25bf650913.jpg) + +Table 5. Test set MAE for SPICE-MACE-OFF. Energy (E) MAE is in meV/atom. Force (F) MAE is in meV/Å. *EscAIP-45M is a direct-force model. + +
DatasetMACE-4.7MESCaIP-45M*eSEN-3.2MeSEN-6.5M
EFEFEFEF
PubChem0.8814.750.535.860.226.100.154.21
DES370K M.0.596.580.413.480.171.850.131.24
DES370K D.0.546.620.382.180.202.770.152.12
Dipeptides0.4210.190.315.210.103.040.072.00
Sol. AA0.9819.430.6111.520.305.760.253.68
Water0.8313.570.7210.310.243.880.152.50
QMugs0.4516.930.418.740.165.700.123.78
+ +readers to Deng et al. 2025 and Barroso-Luque et al. 2024 for a detailed discussion on the softening issue of some DFT datasets and its relation to phonon properties. + +# 6.3. SPICE-MACE-OFF + +We train and evaluate eSEN models on the SPICE-MACE-OFF dataset (Kovács et al., 2023), which is built upon the SPICE dataset (Eastman et al., 2023). As shown in Table 5, eSEN with 6.5M parameters outperforms MACE-OFF-L (4.7M parameters) and EscAIP (45M parameters, direct-force) on all test-set splits for both energy and force MAE. We also include results for eSEN with 3.2M parameters, which has inference efficiency similar to MACE-4.7M, while achieving lower test energy/force MAE. More details on the inference efficiency benchmark are included in Appendix C. + +# 6.4. Test-set error for model development + +In Figure 1, we showed the correlation between test error and physical property prediction tasks for different architectures. Figure 6 demonstrates this correlation for different variants of eSEN (with a 1k-materials subset of the MDR Phonon benchmark for efficiency). In particular, among models that pass the MD energy conservation test, a strong + +Figure 6. Test error correlation across several property prediction tasks for eSEN variants. Conservative models are shown as boxes and those found to not conserve as crosses. Note metrics for conservative models have a stronger correlation with test set errors. +![](images/36c202e7d97e5088549be3092b956fed5e77e0d0f8f4a62a2a39edb5ed5ad42d.jpg) +eSEN-30M eSEN, Bessel eSEN, neighbor limit eSEN-6.5M eSEN, direct-force eSEN, no envelope + +![](images/e6c19ad3c5e2bd8d9ba794f94d24c44fb395ff441321bc51d90e45e23be76668.jpg) +eSEN-3.2M eSEN, discrete eSEN, $N_{\mathrm{basis}} = 512$ + +correlation between test error and $\kappa_{\mathrm{SRME}}$ /vibrational entropy MAE can be observed. We include experimental details about Figure 1 and Figure 6 in Appendix A and additional results for other phonon properties in Appendix B. + +# 7. Related works + +MLIP architectures have made significant progress since their initial proposal (Behler & Parrinello, 2007). These architectures are usually symmetry-preserving (Smith et al., 2017; Schutt et al., 2017; Gilmer et al., 2017; Chmiela et al., 2017; Artrith et al., 2017; Unke & Meuwly, 2018; Zhang et al., 2018; Zubatyuk et al., 2019; Smith et al., 2020; Kovacs et al., 2021), with increasingly expressive atom environment embeddings and message-passing operations (Gasteiger et al., 2020b; 2021; Schutt et al., 2021; Liu et al., 2021; Unke et al., 2021a; Chen & Ong, 2022; Deng et al., 2023; Cheng, 2024; Yin et al., 2025). Notably, equiv- + +ariant architectures based on spherical harmonics representations (Thomas et al., 2018; Thölke & De Fabritiis, 2021; Batzner et al., 2022; Musaelian et al., 2022; Batatia et al., 2022; Passaro & Zitnick, 2023; Liao et al., 2023; Bochkarev et al., 2024; Park et al., 2024; Batatia et al., 2025) have shown strong performance on large-scale datasets. Meanwhile, the high computational cost of these architectures has sparked significant interest in scalable architectures that may not respect physical principles such as energy conservation (Langer et al., 2024; Brehmer et al., 2024; Hu et al., 2021; Yang et al., 2024; Qu & Krishnapriyan, 2024; Neumann et al., 2024; Rhodes et al., 2025). These models have demonstrated strong performance in accuracy, scalability, and relaxation tasks (Chanussot et al., 2021; Riebesell et al., 2023). While their non-physical nature may make them unsuitable for direct usage in some physical property prediction tasks, they may still provide benefit by using the pre-training strategy proposed in this paper and Bigi et al. 2024, distilling them to conservative models (Amin et al., 2025), or combining them with a conservative model using multiple-time-step integration (Bigi et al., 2024). + +MLIPs and physical observables. While MLIPs continue to improve, it is necessary to evaluate them in realistic tasks that are relevant to scientific discovery. Physical property prediction benchmarks that involve geometry optimization (Riebesell et al., 2023; Lan et al., 2023; Wander et al., 2024), MD simulations (Fu et al., 2023; Kovacs et al., 2023; Moore et al., 2024; Sabanes Zariquiey et al., 2024; Eastman et al., 2024), vibrational analysis and phonon calculations (Pota et al., 2024; Loew et al., 2024; Wines & Choudhary, 2024), and others are increasing in scale with broader applications and wider adoption. Training strategies for learning from physical observables (Wang et al., 2020; Greener, 2024; Röcken et al., 2024; Raja et al., 2024) and the higher-order derivatives of the PES (Fang et al., 2024; Williams et al., 2025) are promising directions to further improve MLIPs for predicting physical properties. + +# 8. Discussion + +We identify conservative forces and a smoothly-varying PES as two important properties for MLIPs to consistently perform well in physical property prediction tasks. We offer an analysis of design choices to enhance these two properties. The resulting eSEN architecture bridges the gap between the test-set error and downstream applications, achieving SOTA performance in force/energy prediction, geometry optimization, phonon calculations, and thermal conductivity prediction. This implies it may be possible to use test error as a proxy metric for evaluating model performance during development, if a model passes energy conservation tests. This can accelerate innovations in MLIPs, since benchmarking physical properties usually requires significant domain + +knowledge and is usually time-consuming, whereas evaluating test set error is straightforward and efficient. + +# Software and Data + +Code is available at: https://github.com/facebookresearch/fairchem. Pretrained checkpoints are available at https://huggingface.co/facebook/OMAT24. + +# Acknowledgements + +We acknowledge Zachary W. Ulissi (FAIR at Meta), Aditi S. Krishnapriyan (UC Berkeley), Samuel M. Blau (LBNL) and other members of the FAIR Chemistry team for helpful discussions, and Ammar Rizvi (FAIR at Meta) for project support. + +# Impact Statement + +This paper presents work whose goal is to advance the field of machine learning for atomistic modeling, with the potential to accelerate scientific discovery in chemistry and biological sciences. As the field of ML-based atomistic modeling continues to evolve, we emphasize the importance of ongoing discussions on ethical considerations and best practices to ensure that these technologies are developed and applied in ways that benefit society as a whole. + +# References + +Ackland, G., Warren, M., and Clark, S. Practical methods in ab initio lattice dynamics. Journal of Physics: Condensed Matter, 9(37):7861, 1997. +Amin, I., Raja, S., and Krishnapriyan, A. Towards fast, specialized machine learning force fields: Distilling foundation models via energy hessian. arXiv preprint arXiv:2501.09009, 2025. +Artrith, N., Urban, A., and Ceder, G. Efficient and accurate machine-learning interpolation of atomic energies in compositions with many species. Physical Review B, 96 (1):014112, 2017. +Ba, J. L. Layer normalization. arXiv preprint arXiv:1607.06450, 2016. +Barroso-Luque, L., Shuaibi, M., Fu, X., Wood, B. M., Dzamba, M., Gao, M., Rizvi, A., Zitnick, C. L., and Ulissi, Z. W. Open materials 2024 (omat24) inorganic materials dataset and models. arXiv preprint arXiv:2410.12771, 2024. +Bartel, C. J. Review of computational approaches to predict + +the thermodynamic stability of inorganic solids. Journal of Materials Science, 57(23):10475-10498, 2022. +Bartók, A. P., Kondor, R., and Csányi, G. On representing chemical environments. Physical Review B—Condensed Matter and Materials Physics, 87(18):184115, 2013. +Batatia, I., Kovacs, D. P., Simm, G. N. C., Ortner, C., and Csanyi, G. MACE: Higher order equivariant message passing neural networks for fast and accurate force fields. In Oh, A. H., Agarwal, A., Belgrave, D., and Cho, K. (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/forum?id=YPpSngE-ZU. +Batatia, I., Benner, P., Chiang, Y., Elena, A. M., Kovács, D. P., Riebesell, J., Advincula, X. R., Asta, M., Avaylon, M., Baldwin, W. J., et al. A foundation model for atomistic materials chemistry. arXiv preprint arXiv:2401.00096, 2023. +Batatia, I., Batzner, S., Kovács, D. P., Musaelian, A., Simm, G. N., Drautz, R., Ortner, C., Kozinsky, B., and Csányi, G. The design space of e (3)-equivariant atom-centred interatomic potentials. Nature Machine Intelligence, pp. 1-12, 2025. +Batzner, S., Musaelian, A., Sun, L., Geiger, M., Mailoa, J. P., Kornbluth, M., Molinari, N., Smidt, T. E., and Kozinsky, B. E (3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nature communications, 13(1):1-11, 2022. +Behler, J. and Parrinello, M. Generalized neural-network representation of high-dimensional potential-energy surfaces. Physical review letters, 98(14):146401, 2007. +Bigi, F., Langer, M., and Ceriotti, M. The dark side of the forces: assessing non-conservative force models for atomistic machine learning. arXiv preprint arXiv:2412.11569, 2024. +Bochkarev, A., Lysogorskiy, Y., and Drautz, R. Graph atomic cluster expansion for semilocal interactions beyond equivariant message passing. Phys. Rev. X, 14:021036, Jun 2024. doi: 10.1103/PhysRevX.14.021036. URL https://link.aps.org/doi/10.1103/PhysRevX.14.021036. +Brehmer, J., Behrends, S., de Haan, P., and Cohen, T. Does equivariance matter at scale? arXiv preprint arXiv:2410.23179, 2024. +Chanussot, L., Das, A., Goyal, S., Lavril, T., Shuaibi, M., Riviere, M., Tran, K., Heras-Domingo, J., Ho, C., Hu, W., Palizhati, A., Sriram, A., Wood, B., Yoon, J., Parikh, D., Zitnick, C. L., and Ulissi, Z. Open catalyst 2020 (oc20) dataset and community challenges. + +ACS Catalysis, 11(10):6059-6072, 2021. doi: 10.1021/acscatal.0c04525. URL https://doi.org/10.1021/acscatal.0c04525. +Chen, C. and Ong, S. P. A universal graph deep learning interatomic potential for the periodic table. Nature Computational Science, 2(11):718-728, 2022. +Cheng, B. Cartesian atomic cluster expansion for machine learning interatomic potentials. npj Computational Materials, 10(1):157, 2024. +Chmiela, S., Tkatchenko, A., Sauceda, H. E., Holtavsky, I., Schütt, K. T., and Müller, K.-R. Machine learning of accurate energy-conserving molecular force fields. Science advances, 3(5):e1603015, 2017. +Chmiela, S., Vassilev-Galindo, V., Unke, O. T., Kabylda, A., Sauceda, H. E., Tkatchenko, A., and Müller, K.-R. Accurate global machine learning force fields for molecules with hundreds of atoms. Science Advances, 9 (2):eadf0873, 2023. +Cohen, T. and Welling, M. Group equivariant convolutional networks. In International conference on machine learning, pp. 2990-2999. PMLR, 2016. +Deng, B., Zhong, P., Jun, K., Riebesell, J., Han, K., Bartel, C. J., and Ceder, G. Chgnet as a pretrained universal neural network potential for charge-informed atomistic modelling. Nature Machine Intelligence, 5(9):1031-1041, 2023. +Deng, B., Choi, Y., Zhong, P., Riebesell, J., Anand, S., Li, Z., Jun, K., Persson, K. A., and Ceder, G. Systematic softening in universal machine learning interatomic potentials. npj Computational Materials, 11(1):1-9, 2025. +Eastman, P., Behara, P. K., Dotson, D. L., Galvelis, R., Herr, J. E., Horton, J. T., Mao, Y., Chodera, J. D., Pritchard, B. P., Wang, Y., et al. Spice, a dataset of drug-like molecules and peptides for training machine learning potentials. Scientific Data, 10(1):11, 2023. +Eastman, P., Pritchard, B. P., Chodera, J. D., and Markland, T. E. Nutmeg and spice: models and data for biomolecular machine learning. Journal of chemical theory and computation, 20(19):8583-8593, 2024. +Fang, S., Geiger, M., Checkelsky, J. G., and Smidt, T. Phonon predictions with e (3)-equivariant graph neural networks. arXiv preprint arXiv:2403.11347, 2024. +Fu, X., Wu, Z., Wang, W., Xie, T., Keten, S., Gomez-Bombarelli, R., and Jaakkola, T. S. Forces are not enough: + +Benchmark and critical evaluation for machine learning force fields with molecular simulations. Transactions on Machine Learning Research, 2023. ISSN 2835-8856. URL https://openreview.net/forum?id=A8pqQipwkt. Survey Certification. +Fultz, B. Vibrational thermodynamics of materials. Progress in Materials Science, 55(4):247-352, 2010. +Ganose, A. M., Park, J., Faghaninia, A., Woods-Robinson, R., Persson, K. A., and Jain, A. Efficient calculation of carrier scattering rates from first principles. Nature communications, 12(1):2222, 2021. +Gasteiger, J., Groß, J., and Gunnemann, S. Directional message passing for molecular graphs. arXiv preprint arXiv:2003.03123, 2020a. +Gasteiger, J., Groß, J., and Gunnemann, S. Directional message passing for molecular graphs. In International Conference on Learning Representations, 2020b. +Gasteiger, J., Becker, F., and Gunnemann, S. Gemnet: Universal directional graph neural networks for molecules. Advances in Neural Information Processing Systems, 34: 6790-6802, 2021. +Geiger, M. and Smidt, T. e3nn: Euclidean neural networks. arXiv preprint arXiv:2207.09453, 2022. +Gilmer, J., Schoenholz, S. S., Riley, P. F., Vinyals, O., and Dahl, G. E. Neural message passing for quantum chemistry. In International conference on machine learning, pp. 1263-1272. PMLR, 2017. +Greener, J. G. Differentiable simulation to develop molecular dynamics force fields for disordered proteins. Chemical Science, 15(13):4897-4909, 2024. +Hairer, E., Lubich, C., and Wanner, G. Geometric numerical integration illustrated by the störmer-verlet method. Acta numerica, 12:399-450, 2003. +Hairer, E., Hochbruck, M., Iserles, A., and Lubich, C. Geometric numerical integration. Oberwolfach Reports, 3(1): 805-882, 2006. +Hu, W., Shuaibi, M., Das, A., Goyal, S., Sriram, A., Leskovec, J., Parikh, D., and Zitnick, C. L. Forcenet: A graph neural network for large-scale quantum calculations. arXiv preprint arXiv:2103.01436, 2021. +Jain, A., Ong, S., Hautier, G., Chen, W., Richards, W., Dacek, S., Cholia, S., Gunter, D., Skinner, D., Ceder, G., et al. The materials project: a materials genome approach to accelerating materials innovation. amplater 1: 011002, 2013. + +Kovács, D. P., Oord, C. v. d., Kucera, J., Allen, A. E., Cole, D. J., Ortner, C., and Csányi, G. Linear atomic cluster expansion force fields for organic molecules: beyond rmse. Journal of chemical theory and computation, 17 (12):7696-7711, 2021. +Kovács, D. P., Moore, J. H., Browning, N. J., Batatia, I., Horton, J. T., Kapil, V., Witt, W. C., Magdău, I.-B., Cole, D. J., and Csányi, G. Mace-off23: Transferable machine learning force fields for organic molecules. arXiv preprint arXiv:2312.15211, 2023. +Lan, J., Palizhati, A., Shuaibi, M., Wood, B. M., Wander, B., Das, A., Uytendaele, M., Zitnick, C. L., and Ulissi, Z. W. Adsorbml: a leap in efficiency for adsorption energy calculations using generalizable machine learning potentials. npj Computational Materials, 9(1):172, 2023. +Langer, M. F., Pozdnyakov, S. N., and Ceriotti, M. Probing the effects of broken symmetries in machine learning. Machine Learning: Science and Technology, 5(4):04LT01, 2024. +Larsen, A. H., Mortensen, J. J., Blomqvist, J., Castelli, I. E., Christensen, R., Dušak, M., Friis, J., Groves, M. N., Hammer, B., Hargus, C., Hermes, E. D., Jennings, P. C., Jensen, P. B., Kermode, J., Kitchin, J. R., Kolsbjerg, E. L., Kubal, J., Kaasbjerg, K., Lysgaard, S., Maronsson, J. B., Maxson, T., Olsen, T., Pastewka, L., Peterson, A., Rostgaard, C., Schötz, J., Schütt, O., Strange, M., Thygesen, K. S., Vegge, T., Vilhelmsen, L., Walter, M., Zeng, Z., and Jacobsen, K. W. The atomic simulation environment—a python library for working with atoms. Journal of Physics: Condensed Matter, 29(27): 273002, 2017. URL http://stacks.iop.org/0953-8984/29/i=27/a=273002. +Liao, Y.-L. and Smidt, T. Equiformer: Equivariant graph attention transformer for 3d atomistic graphs. arXiv preprint arXiv:2206.11990, 2022. +Liao, Y.-L., Wood, B., Das, A., and Smidt, T. Equiformerv2: Improved equivariant transformer for scaling to higher-degree representations. arXiv preprint arXiv:2306.12059, 2023. +Liao, Y.-L., Smidt, T., and Das, A. Generalizing denoising to non-equilibrium structures improves equivariant force fields. arXiv preprint arXiv:2403.09549, 2024. +Liu, Y., Wang, L., Liu, M., Lin, Y., Zhang, X., Oztekin, B., and Ji, S. Spherical message passing for 3d molecular graphs. In International Conference on Learning Representations, 2021. +Loew, A., Sun, D., Wang, H.-C., Botti, S., and Marques, M. A. Universal machine learning interatomic potentials + +are ready for phonons. arXiv preprint arXiv:2412.16551, 2024. +Merchant, A., Batzner, S., Schoenholz, S. S., Aykol, M., Cheon, G., and Cubuk, E. D. Scaling deep learning for materials discovery. Nature, 624(7990):80-85, 2023. +Moore, J. H., Cole, D. J., and Csanyi, G. Computing hydration free energies of small molecules with first principles accuracy. arXiv preprint arXiv:2405.18171, 2024. +Musaelian, A., Batzner, S., Johansson, A., Sun, L., Owen, C. J., Kornbluth, M., and Kozinsky, B. Learning local equivariant representations for large-scale atomistic dynamics. arXiv preprint arXiv:2204.05249, 2022. +Neumann, M., Gin, J., Rhodes, B., Bennett, S., Li, Z., Choubisa, H., Hussey, A., and Godwin, J. Orb: A fast, scalable neural network potential. arXiv preprint arXiv:2410.22570, 2024. +Nickolls, J., Buck, I., Garland, M., and Skadron, K. Scalable parallel programming with CUDA: Is CUDA the parallel programming model that application developers have been waiting for? Queue, 6(2):40-53, 2008. +Oppenheimer, M. Zur quantentheorie der molekeln [on the quantum theory of molecules]. Annalen der Physik, 389 (20):457-484, 1927. +Owen, C. J., Torrisi, S. B., Xie, Y., Batzner, S., Bystrom, K., Coulter, J., Musaelian, A., Sun, L., and Kozinsky, B. Complexity of many-body interactions in transition metals via machine-learned force fields from the tm23 data set. npj Computational Materials, 10(1):92, 2024. +Park, Y., Kim, J., Hwang, S., and Han, S. Scalable parallel algorithm for graph neural network interatomic potentials in molecular dynamics simulations. *J. Chem. Theory Comput.*, 20(11):4857-4868, 2024. doi: 10.1021/acs.jctc.4c00190. +Parr, R. G., Gadre, S. R., and Bartolotti, L. J. Local density functional theory of atoms and molecules. Proceedings of the National Academy of Sciences, 76(6):2522-2526, 1979. +Passaro, S. and Zitnick, C. L. Reducing so (3) convolutions to so (2) for efficient equivariant gnns. In International Conference on Machine Learning, pp. 27420-27438. Proceedings of Machine Learning Research, 2023. +Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., et al. Pytorch: An imperative style, high-performance deep learning library. Advances in neural information processing systems, 32, 2019. + +Póta, B., Ahlawat, P., Csányi, G., and Simoncelli, M. Thermal conductivity predictions with foundation atomistic models. arXiv preprint arXiv:2408.00755, 2024. +Qu, E. and Krishnapriyan, A. S. The importance of being scalable: Improving the speed and accuracy of neural network interatomic potentials across chemical domains. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. URL https://openreview.net/forum?id=Y4mBaZu4vy. +Raja, S., Amin, I., Pedregosa, F., and Krishnapriyan, A. S. Stability-aware training of neural network interatomic potentials with differentiable boltzmann estimators. arXiv preprint arXiv:2402.13984, 2024. +Razeghi, M. Thermal Properties of Crystals. In Razeghi, M. (ed.), Fundamentals of Solid State Engineering, pp. 197-220. Springer US, 2002. doi: 10.1007/0-306-47567-7_7. +Rhodes, B., Vandenhauge, S., Simkus, V., Gin, J., Godwin, J., Duignan, T., and Neumann, M. Orb-v3: atomistic simulation at scale. arXiv preprint arXiv:2504.06231, 2025. +Riebesell, J., Goodall, R. E., Jain, A., Benner, P., Persson, K. A., and Lee, A. A. Matbench discovery—an evaluation framework for machine learning crystal stability prediction. arXiv preprint arXiv:2308.14920, 2023. +Röcken, S., Burnet, A. F., and Zavadlav, J. Predicting solvation free energies with an implicit solvent machine learning potential. arXiv preprint arXiv:2406.00183, 2024. +Sabanes Zariquey, F., Galvelis, R., Gallicchio, E., Chodera, J. D., Markland, T. E., and De Fabritiis, G. Enhancing protein-ligand binding affinity predictions using neural network potentials. Journal of Chemical Information and Modeling, 64(5):1481-1485, 2024. +Schmidt, J., Cerqueira, T. F., Romero, A. H., Loew, A., Jäger, F., Wang, H.-C., Botti, S., and Marques, M. A. Improving machine-learning models in materials science through large datasets. Materials Today Physics, 48: 101560, 2024. +Schütt, K., Kindermans, P.-J., Sauceda Felix, H. E., Chmiela, S., Tkatchenko, A., and Müller, K.-R. Schnet: A continuous-filter convolutional neural network for modeling quantum interactions. Advances in neural information processing systems, 30, 2017. +Schütt, K., Unke, O., and Gastegger, M. Equivariant message passing for the prediction of tensorial properties and molecular spectra. In International Conference on Machine Learning, pp. 9377-9388. PMLR, 2021. + +Simoncelli, M., Marzari, N., and Mauri, F. Wigner formulation of thermal transport in solids. Physical Review X, 12 (4):041011, 2022. +Smith, J. S., Isayev, O., and Roitberg, A. E. Ani-1: an extensible neural network potential with dft accuracy at force field computational cost. Chemical science, 8(4): 3192-3203, 2017. +Smith, J. S., Zubatyuk, R., Nebgen, B., Lubbers, N., Barros, K., Roitberg, A. E., Isayev, O., and Tretiak, S. The ani-1ccx and ani-1x data sets, coupled-cluster and density functional theory properties for molecules. *Scientific data*, 7(1):134, 2020. +Thölke, P. and De Fabritiis, G. Equivariant transformers for neural network based molecular potentials. In International Conference on Learning Representations, 2021. +Thomas, N., Smidt, T., Kearnes, S., Yang, L., Li, L., Kohlhoff, K., and Riley, P. Tensor field networks: Rotation-and translation-equivariant neural networks for 3d point clouds. arXiv preprint arXiv:1802.08219, 2018. +Togo, A., Chaput, L., and Tanaka, I. Distributions of phonon lifetimes in brillouin zones. Phys. Rev. B, 91:094306, Mar 2015. doi: 10.1103/PhysRevB.91.094306. +Togo, A., Chaput, L., Tadano, T., and Tanaka, I. Implementation strategies in phonopy and phono3py. J. Phys. Condens. Matter, 35(35):353001, 2023. doi: 10.1088/1361-648X/acd831. +Tran, R., Lan, J., Shuaibi, M., Wood, B. M., Goyal, S., Das, A., Heras-Domingo, J., Kolluru, A., Rizvi, A., Shoghi, N., et al. The open catalyst 2022 (oc22) dataset and challenges for oxide electrocatalysts. ACS Catalysis, 13 (5):3066-3084, 2023. +Tuckerman, M. E. Statistical mechanics: theory and molecular simulation. Oxford university press, 2023. +Unke, O. T. and Meuwly, M. A reactive, scalable, and transferable model for molecular energies from a neural network approach based on local information. The Journal of chemical physics, 148(24):241708, 2018. +Unke, O. T., Chmiela, S., Gastegger, M., Schutt, K. T., Sauceda, H. E., and Müller, K.-R. Spookynet: Learning force fields with electronic degrees of freedom and nonlocal effects. Nature communications, 12(1):1-14, 2021a. +Unke, O. T., Chmiela, S., Sauceda, H. E., Gastegger, M., Poltavsky, I., Schutt, K. T., Tkatchenko, A., and Müller, K.-R. Machine learning force fields. Chemical Reviews, 121(16):10142-10186, 2021b. + +Van De Walle, A. and Ceder, G. The effect of lattice vibrations on substitutional alloy thermodynamics. *Reviews of Modern Physics*, 74(1):11, 2002. +Wander, B., Shuaibi, M., Kitchin, J. R., Ulissi, Z. W., and Zitnick, C. L. Cattsunami: Accelerating transition state energy calculations with pre-trained graph neural networks. arXiv preprint arXiv:2405.02078, 2024. +Wang, W., Axelrod, S., and Gómez-Bombarelli, R. Differentiable molecular simulations for control and learning. arXiv preprint arXiv:2003.00868, 2020. +Weiler, M., Geiger, M., Welling, M., Boomsma, W., and Cohen, T. S. 3d steerable cnns: Learning rotationally equivariant features in volumetric data. Advances in Neural Information Processing Systems, 31, 2018. +Williams, N. J., Kabalan, L., Stojanovic, L., Zólyomi, V., and Pyzer-Knapp, E. O. Hessian qm9: A quantum chemistry database of molecular hessians in implicit solvents. Scientific Data, 12(1):9, 2025. +Wines, D. and Choudhary, K. Chips-ff: Evaluating universal machine learning force fields for material properties. arXiv preprint arXiv:2412.10516, 2024. +Yang, H., Hu, C., Zhou, Y., Liu, X., Shi, Y., Li, J., Li, G., Chen, Z., Chen, S., Zeni, C., et al. Matters: A deep learning atomistic model across elements, temperatures and pressures. arXiv preprint arXiv:2405.04967, 2024. +Yin, B., Wang, J., Du, W., Wang, P., Ying, P., Jia, H., Zhang, Z., Du, Y., Gomes, C. P., Duan, C., et al. Alphanumeric: Scaling up local frame-based atomistic foundation model. arXiv preprint arXiv:2501.07155, 2025. +Zhang, L., Han, J., Wang, H., Saidi, W., Car, R., et al. End-to-end symmetry preserving inter-atomic potential energy model for finite and extended systems. Advances in Neural Information Processing Systems, 31, 2018. +Zitnick, L., Das, A., Kolluru, A., Lan, J., Shuaibi, M., Sriram, A., Ulissi, Z., and Wood, B. Spherical channels for modeling atomic interactions. Advances in Neural Information Processing Systems, 35:8054-8067, 2022. +Zubatyuk, R., Smith, J. S., Leszczynski, J., and Isayev, O. Accurate and transferable multitask prediction of chemical properties with an atoms-in-molecules neural network. Science advances, 5(8):eaav6490, 2019. + +# A. Experimental details + +# A.1. MD simulation protocol + +Simulating molecular systems not seen during training is a key capability of MLIPs. Therefore, we construct challenging MD simulation tasks featuring out-of-distribution data to test a model's conservation capability. We conduct experiments on two chemical domains: inorganic crystals and organic molecules. + +Inorganic materials. For training models on inorganic materials we utilize the MPTrj (Deng et al., 2023) dataset, and we establish a suite of simulation tasks based on the TM23 dataset (Owen et al., 2024). TM23 contains MD samples of 27 single vacancy defect transition metal systems at cold, warm, and melt temperatures using an NVT ensemble, in total 81 combinations of different metals and temperature. These defected systems are out-of-distribution for a model trained on the MPTrj datasets, which only contains relaxation trajectories of non-defected systems. Additionally, some of the metals in the TM23 dataset is very rare in the MPTrj dataset. We initialize the simulation by sampling a frame from the TM23 dataset, run a relaxation using the LBFGS algorithm, randomly initialize the atom velocities at cold/warm/melt temperatures using a Maxwell-Boltzmann distribution, then run MD simulations under the NVE ensemble for 100 ps using a time step of 5 fs (same as the time step used in the TM23 ab initio MD protocol). + +Organic molecules. For training models on organic molecules we use the SPICE-MACE-OFF dataset (Kovács et al., 2023), which is mainly based on the SPICE-1.0 dataset (Eastman et al., 2023), and we establish a suite of simulation tasks from the MD22 dataset (Chmiela et al., 2023) that contains seven large molecules. Molecules in MD22 are out-of-distribution for a model trained on the SPICE-MACE-OFF dataset as they are considerably larger than all molecules in the SPICE-MACE-OFF training dataset. We initialize the simulation by sampling a frame from the MD22 dataset, run a relaxation using the LBFGS algorithm, randomly initialize the atom velocities at a temperatures of $400 / 500\mathrm{K}$ using a Maxwell-Boltzmann distribution $(400\mathrm{K}$ for Buckyball catcher and Double-walled nanotube and $500\mathrm{K}$ for other molecules, which are the same as the MD22 protocol), then run MD simulations under the NVE ensemble for $100~\mathrm{ps}$ using a time step of 1 fs (same as the time step used in the MD22 ab initio MD protocol). + +All ML-based MD simulations use a Velocity-Verlet integrator and are conducted with ASE (Larsen et al., 2017). We measure the energy conservation error (extent of energy drift) across the 100-ps simulations. All eSEN models are 2-layer with $L_{\mathrm{max}} = 2$ and $M_{\mathrm{max}} = 2$ (3.2M trainable parameters). Detailed model hyperparameters are included in Appendix D. + +# A.2. Phonon calculation protocols + +Harmonic and anharmonic phonon calculations and solutions to the Wigner transport equation (Simoncelli et al., 2022) used for the thermal conductivity benchmark ( $\kappa_{\mathrm{SRME}}$ ) values given in Table 2 were carried out using the supercell method with finite differences implemented in PHONO3PY (Togo et al., 2015; 2023). The calculations followed the protocol described in the Matbench-Discovery benchmark (Riebesell et al., 2023; Póta et al., 2024). For eSEN30M, an even lower $\kappa_{\mathrm{SRME}}$ of 0.298 is obtained when we adjust the evaluation parameter atom displacement from 0.03 Å to 0.05 Å. + +Harmonic phonon calculations for the MDR benchmark results listed in Section 6.2 were carried out following the calculation protocol used by (Loew et al., 2024) which employs phonon calculations using the supercell method with finite differences with a displacement of $0.01\AA$ . Calculations were done using the PHONOPY software (Togo et al., 2023). + +# A.3. Test-set error for MPTrj-trained models + +Since MPTrj lacks an official test split and various models are typically trained on distinct subsets of the data, we randomly selected 5000 samples from the subsampled Alexandria (sAlex) dataset (Schmidt et al., 2024; Barroso-Luque et al., 2024) for a fair comparison. This subset was used to calculate the test-set energy mean absolute errors (MAEs) presented in Figures 1, 6, B.7, and B.8. + +In the ablation study reported in Table 1, we use a random test split of the MPTrj dataset. We find the performance of eSEN to be highly stable with different random seeds. We trained 2-layer eSENmodels on the MPTrj dataset using 3 different seeds for 50 epochs, with loss coefficients the same loss coefficients of models in Table 1. The validation set errors and standard deviations are $19.67 \pm 0.23$ for energy (meV/atom), $43.85 \pm 0.058$ for forces (meV/Å), and $0.16 \pm 0.00038$ for stress (meV/(Å $^3$ -atom)). + +# B. Phonon calculations and vibrational properties + +# B.1. Correlation of test-set energy errors and vibrational property errors + +Figure B.7 presents the correlation between test-set energy MAE and the other three phonon calculation tasks, evaluated across various model architectures. The corresponding correlations for different variants of eSEN are displayed in Figure B.8. In both figures, improved correlation can be observed among energy-conserving models. + +Figure B.8 illustrates that failing the conservation test can + +![](images/a1263d55f23b164a08631e7bebdce5ee8304e04cc451c65c79c7134e44451099.jpg) +Figure B.7. The correlation between test-set energy error and maximum frequency, free energy and heat capacity across different model architectures. + +![](images/728ef8ebe02da3dbf74e2772276dd94c7f95b9de3627a5caf689ab212e744de2.jpg) +Figure B.8. The correlation between test-set energy error and maximum frequency, free energy and heat capacity for different variants of eSEN. + +result in varying degrees of impact on different properties, depending on the specific design choices made. Although the neighbor limit, envelope function, and number of basis functions substantially affect $\kappa_{\mathrm{SRME}}$ (see Figure 6), their influence on the properties evaluated in the MDR Phonon benchmark is relatively minor. Representation discretization impacts vibrational entropy and heat capacity but not other properties. While a model might still be able to get good performance in some physical property task when the energy conservation test is failed, when the conservation test is passed, the model performs very well robustly across all metrics. + +# B.2. Displacement values and their relation to phonon band structure predictions + +Figure B.9 presents the MAEs on phonon calculations for eSEN, MACE, and eqV2 S DeNS as a function of increasing displacement values. As anticipated, both eSEN and MACE exhibit constant or slightly increasing MAE with respect to displacement. In contrast, eqV2 S DeNS displays a notable decrease in MAE with increasing displacement. Notably, when using a displacement of $0.2\AA$ , the resulting phonon + +benchmark MAE values for eqV2 S DeNS become comparable to those of conservative force models (Section 6.2). + +While the prediction accuracy of thermodynamic properties such as maximum frequency, entropy, free energy, and heat capacity improves with increasing displacement for direct-force models, this improvement is deceptive and does not translate to accurate predictions of the underlying phonon band structure and density of states (DOS). As illustrated in Figure C.11, the predicted phonon bands and DOS for three selected materials exhibit significant errors, particularly in capturing the correct dispersion relations. Moreover, imaginary frequencies are commonly predicted at small displacement values, suggesting a rough energy landscape (i.e. the learned PES is not truly convex when it's very close to the minima). The eqV2 S DeNS model also fails to accurately capture acoustic modes—those that go to zero linearly at the $\gamma$ point—which is due to a non-zero net force on the structure. In contrast, non-zero net force at energy local minima does not occur for conservative models by definition (Figure 5). + +By enforcing a net zero force prediction, as proposed by Neumann et al. 2024, direct-force models can be modified + +![](images/fd951da17d3ab4d74d20b296566db6702681a72b850c3e995b9e392d8709fe1e.jpg) +Figure B.9. Errors in a randomly sampled subset (1000 samples) of the MDR Phonon benchmark when the atom displacement is adjusted. + +![](images/a3cf144dc53901f6493a4b1477c04454394121bd8a905035a08385a55801e13a.jpg) + +![](images/3272bf29b12285c8807d75be914e78346596d7a459bb5c9181108c6093850939.jpg) + +![](images/5015255e682a9778893bc090c6a36833fd1e001c7afcd6f3c79d282c1b600fee.jpg) + +to accurately capture acoustic phonon modes. As demonstrated in Figure C.12, incorporating this constraint allows the model to predict acoustic modes correctly. However, despite this improvement, the model continues to struggle with accurately reproducing the phonon band structure, and the issue of predicting imaginary frequencies at small displacement values persists. + +The apparent paradox of direct-force models like eqV2 S DeNS failing to accurately capture phonon band structures while still achieving competitive accuracy for thermodynamic properties such as entropy, free energy, and heat capacity can be resolved by examining the underlying calculation methodology. These properties are computed using weighted integrals of the DOS. Additionally the metrics in the MDR are performed at room temperature (300 K). The predicted DOS in Figure C.11 and Figure C.12 at larger displacement values adequately captures the overall features of the DFT DOS, but does not reproduce finer details such as high density areas and fluctuations. This level of agreement is sufficient for accurate predictions because the Boltzmann-weighted integrals used in calculating thermal properties help to mitigate the impact of point-wise errors, making it less crucial to precisely capture fine details in the band structure and DOS (Ackland et al., 1997; Van De Walle & Ceder, 2002). Moreover, since properties are estimated at 300 K, models can achieve accurate predictions by prioritizing prediction accuracy of lower-frequency modes, which are more relevant for thermal property calculations, rather than attempting to capture higher-frequency modes. Although eqV2 S DeNS without a net-zero force constraint may not accurately capture acoustic phonon branches, its ability to predict vibrational thermodynamics at room temperature remains unaffected due to the relatively small number of acoustic phonon states at low frequencies. + +As a comparison with eqV2 S DeNS, Figures Figure C.13 and Figure C.14 shows the predicted phonon dispersion and DOS for the same three materials using eSEN with direct-force prediction. Although the results still exhibit some of the characteristic artifacts of direct-force models, such + +as convergence at larger displacements and the absence of acoustic modes, these issues are less pronounced compared to eqV2 S DeNS. Moreover, the predicted phonon bands and DOS are significantly improved, providing a more accurate representation of the DFT reference values. The better approximation of phonon bands and a lower tendency to predict imaginary frequencies highlight the importance of a smoothly-varying model, even without being conservative. + +Extending the existing metrics proposed by Loew et al. 2024 with additional evaluations would provide a more comprehensive assessment of MLIP performance. Specifically, new metrics could be developed to assess phonon dispersion across all modes and frequencies at commensurate points; and computing vibrational thermodynamic properties at a range of temperatures. + +![](images/998d8aa8ad76c0a14a6e00fef119fe0f6daccc62915d1c59f9db34f12e9d4206.jpg) +Figure B.10. Inference efficiency of MACE-OFF-L and eSENs of a similar scale. + +# C. Inference efficiency + +We benchmarked the inference speed of our models against the similar sized MACE-OFF-L (Kovács et al., 2023) (4.7M) on a single 80GB Nvidia A-100 GPU. For MACE-OFF-L we used the exact benchmark code found in https://github.com/ACESuit/mace/blob/main/tests/test_benchmark.py with mace-torch v0.3.6 (PyPi). To create a fair comparison, we replicated the identical benchmark environment as MACE benchmarks + +using the same diamond system with variable number of supercells (carbon atoms) as input. All models are benchmarked using the standard Python (3.12) runtime with Pytorch v2.4.0 (Paszke et al., 2019) and CUDA 12.1 (Nickolls et al., 2008). No compile/torchscript was used for standardization of runtime. Across all system sizes, eSEN-3.2M has a comparable inference efficiency to MACE-OFF-L. For 216 atoms (Figure B.10), our models (3.2M, 6.4M) can run approximately (0.4, 0.8) million steps per day comparable to MACE-OFF-L (0.7 million steps per day). + +# D. Hyper-parameters + +Hyper-parameters used for model training are shown in Table 6. We train all models using a per-atom energy MAE loss, a force $l_{2}$ loss, and a stress MAE loss. For direct-force models or direct-force pre-training, we use the same decomposed loss as described in Barroso-Luque et al. 2024. The eSEN-30M-MP model trained on MPTrj uses Denoising Non-equilibrium Structures (DeNS) (Liao et al., 2024) with a noisig probability of 0.5, a standard deviation of 0.1 Å for the added Gaussian noise, and 10 for the DeNS loss coefficient during direct-force pre-training. DeNS is not used during conservative fine-tuning. In our ablation study for maximum neighbor limit we used 30 as the limit. The main effect of DeNS is reducing overfitting in the pretraining stage. Such benefit is found to carry over to the conservative finetuning stage. The eSEN-30M-OMat and the OAM Finetuned models do not use DeNS. + +![](images/3bf5407c5d6fdcfa92f024c6a60929b67f4d387040154cd3ff5f4a0a1be51a56.jpg) +Figure C.11. Predicted phonon band structure and density of states (DOS) of Si (diamond structure), CsCl (CsCl structure), AlN (wurtzite structure) using eqV2 S DeNS (direct-force prediction) at different displacement values. DFT baseline is taken from the PBE MDR dataset (Loew et al., 2024) calculated using a displacement of $0.01\AA$ + +![](images/7f6cdd88c0bbae250703a9e1d6e9333717bb40529c4a36e2fa68a74694867176.jpg) + +![](images/30e495eb83b6f481a71960b75fc37eea93af57313b45f5abf2dc7194dc3cce83.jpg) + +![](images/5fcc6defa4a10b2fdb3f477f1739a84f1d77f2355a3ffc09bb31b9be5e059d41.jpg) +Figure C.12. Predicted phonon band structure and density of states (DOS) of Si (diamond structure), CsCl (CsCl structure), AlN (wurtzite structure) using eqV2 S DeNS (direct-force prediction with a zero net force constraint) at different displacement values. DFT baseline is taken from the PBE MDR dataset (Loew et al., 2024) calculated using a displacement of $0.01\AA$ + +![](images/273524e44416f898ccf33e596a94b977f7fbc99ab92689e43ada8b4aacbb33d5.jpg) + +![](images/cf3fe5fc6251fd6bfea4bed605580ddb34727a4b87075c65e6faee3a752ee14a.jpg) + +![](images/0ba073d0b0dff7964d5dc99ee9fe55eba59fa3cb47e8e94da48a0a43874a70e3.jpg) +Figure C.13. Predicted phonon band structure and density of states (DOS) of Si (diamond structure), CsCl (CsCl structure), AlN (wurtzite structure) using eSEN with direct-force prediction at different displacement values. DFT baseline is taken from the PBE MDR dataset (Loew et al., 2024) calculated using a displacement of $0.01\AA$ + +![](images/3456420823f0cc8cdb94f1185c9e8e2e77928e6aea1880178347d950c265cb85.jpg) + +![](images/afcfcc27c6293e9ace9d0f7db70dce3ce03836071c77c84e7d3a7a41471132ce.jpg) + +![](images/df07e5ee8f4487f0bba7c2cb51e7710c942ec4fc867731f86dbfc4a3da44cbf4.jpg) +Figure C.14. Predicted phonon band structure and density of states (DOS) of Si (diamond structure), CsCl (CsCl structure), AlN (wurtzite structure) using eSEN with direct-force prediction and a zero-net force constraint at different displacement values. DFT baseline is taken from the PBE MDR dataset (Loew et al., 2024) calculated using a displacement of $0.01\AA$ + +![](images/ee05b20f77532edb7a0fec8a696ee0779929c8ada9cdde30035e3ebfc6a47704.jpg) + +![](images/f133dcb9b121d7c6b12260eb9d2e243804b122df481b6412e7d554a18108e95f.jpg) + +Table 6. Hyper-parameters for eSEN variants reported in this paper. ${}^{ * }$ eSEN-30M on MPTrj was trained for 60 epochs using direct-force pre-training and 40 epochs of conserved fine-tuning. eSEN-30M-OMat was trained for 2 epochs using direct-force pre-training and 2 epochs of conserved fine-tuning. ${}^{ \dagger }$ The eSEN-30M-OAM model starts from the eSEN-30M-OMat model, and was finetuned for 1 epoch on a dataset constructed by combining the sAlex training dataset and 8 copies of the MPTrj training dataset. + +
Hyper-parametersSPICE-3.2MSPICE-6.5MMPTrj-3.2MMPTrj-6.5MMPTrj-30MOMat-30MOAM Fine-tuning
Number of eSEN layer blocks2424101010
Maximum degree Lmax2222333
Maximum order Mmax2222222
Number of channels Nchannel128128128128128128128
Radial basis functionBesselBesselGaussianGaussianGaussianGaussianGaussian
Number of radial basis functions10101010106464
Cutoff radius (Å)5566666
Batch size128128512512512512256
OptimizerAdamWAdamWAdamWAdamWAdamWAdamWAdamW
Learning rate schedulingCosineCosineCosineCosineCosineCosineCosine
Warmup epochs0.10.010.10.10.10.10.1
Warmup factor0.20.20.20.20.20.20.2
Maximum learning rate4 × 10-44 × 10-44 × 10-44 × 10-44 × 10-44 × 10-42 × 10-4
Number of epochs10010010010060 + 40*2 + 2*1†
Gradient clipping norm100100100100100100100
Model EMA decay0.9990.9990.9990.9990.9990.9990.999
Weight decay1 × 10-31 × 10-31 × 10-31 × 10-31 × 10-31 × 10-31 × 10-3
Energy loss coefficient101011202020
Force loss coefficient20201010202020
Stress loss coefficient--100100555
\ No newline at end of file diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/images.zip b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7cfa07aeaae188df0c78b985eacb61e3f1705723 --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a068bf97c6ee1f1760065fd5aa2eef88239dd460655abc35405ed5a5593b9817 +size 1112382 diff --git a/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/layout.json b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2512d94d354ee80e8d8379dfaedb5407245c79bf --- /dev/null +++ b/ICML/2025/Learning Smooth and Expressive Interatomic Potentials for Physical Property Prediction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce48d72376946e786dc2a285dbb1a6ca7c55fdcd480ae4afae4e64bebaf22bdc +size 583708 diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_content_list.json b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..99a006fce73c517a60389dc958790a8a56d4a84e --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b606fc48a0891224efba6b4a50d0d333e3abc022059084026076a945c52a6af8 +size 252774 diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_model.json b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8a54d145cbab7ec3f2ea958247c2e3f236e1d5c5 --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8dd0d41e70c418d028aae00b2764103b261b933407b62218f7b5a5450939eb8 +size 291022 diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_origin.pdf b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..31f58d59447ff2f1cb662db6cb6b82c7a8b27a3b --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/c003ae5a-01f2-440a-8ef4-9055ce3a7cbf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44ac00d051230f583f8b24898db72593eb268d70865fce9ff3f5ed150b64a1db +size 2809389 diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/full.md b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/full.md new file mode 100644 index 0000000000000000000000000000000000000000..a0e74d695c99460596f1640f195f2436dec78917 --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/full.md @@ -0,0 +1,626 @@ +# Learning Soft Sparse Shapes for Efficient Time-Series Classification + +Zhen Liu $^{1,2}$ Yicheng Luo $^{1}$ Boyuan Li $^{1}$ Emadeldeen Eldele $^{2}$ Min Wu $^{†,2}$ Qianli Ma $^{†,1}$ + +# Abstract + +Shapelets are discriminative subsequences (or shapes) with high interpretability in time series classification. Due to the time-intensive nature of shapelet discovery, existing shapelet-based methods mainly focus on selecting discriminative shapes while discarding others to achieve candidate subsequence sparsification. However, this approach may exclude beneficial shapes and overlook the varying contributions of shapelets to classification performance. To this end, we propose a Soft sparse Shapes (SoftShape) model for efficient time series classification. Our approach mainly introduces soft shape sparsification and soft shape learning blocks. The former transforms shapes into soft representations based on classification contribution scores, merging lower-scored ones into a single shape to retain and differentiate all subsequence information. The latter facilitates intra- and inter-shape temporal pattern learning, improving model efficiency by using sparsified soft shapes as inputs. Specifically, we employ a learnable router to activate a subset of class-specific expert networks for intra-shape pattern learning. Meanwhile, a shared expert network learns inter-shape patterns by converting sparsified shapes into sequences. Extensive experiments show that SoftShape outperforms state-of-the-art methods and produces interpretable results. Our source code is available at https://github.com/qianlima-lab/SoftShape. + +# 1. Introduction + +Time series classification (TSC) is a critical task with various real-world applications, such as human activity recog- + +1 School of Computer Science and Engineering, South China University of Technology, Guangzhou, China 2Institute for Infocomm Research, Agency for Science, Technology and Research, Singapore. Correspondence to: Qianli Ma , Min Wu . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/031cd312d37728a06342cee5b7dc4b368108468f72d4d918865d1bbc973f3451.jpg) +(a) Walking on Carpet + +![](images/82e33d95160a655c132d549c93f8007e8348f379b0656ab00c4ae51007325112.jpg) +(b) Hard Shapelets (Red subsequences) + +![](images/56bfa65fe96a8eb3254b45081cdb532ae32375b624963edc0cda522929fce1c8.jpg) +(c) Walking on Cement + +![](images/4f61f553295d7a0707ded61fd85b4c2d95d800fb6de51e7aa183353996895af6.jpg) +(d) Soft Discriminatory regions (Red) +Figure 1: (a) Yellow and (c) Blue lines represent two time series class samples from the SonyAIBORobotSurface1 UCR dataset. (b) Red subsequences denote shapelets for the "Walking on Carpet" class. (d) Red regions show discriminative parts of the "Walking on Carpet" class, with darker red indicating greater discriminative power. + +nition (Lara & Labrador, 2012) and medical diagnostics (Wang et al., 2024). Unlike traditional data types, time series data consists of ordered numerical observations with temporal dependencies, which is often difficult for human intuition to understand. Recent studies (Mohammadi Foumani et al., 2024; Middlehurst et al., 2024; Jin et al., 2024; Ma et al., 2024) indicate that deep neural networks showed remarkable success in TSC, even without specialized knowledge. However, their black-box nature is a barrier to adopting effective models in critical applications such as healthcare, where insights about model decisions are important. Therefore, enhancing the interpretability of these models for TSC is a crucial ongoing issue. + +Shapelets, which are discriminative subsequences that characterize target classes, offer a promising approach towards interpretable TSC models (Ye & Keogh, 2009). For instance, Figures 1(a) and 1(c) show time series classes of a robotic dog walking on carpet and cement (Vail & Veloso, 2004). The red subsequences shown in Figure 1(b) illustrate shapelets, as selected by Hou et al. (2016). However, identifying these shapelets is usually computationally intensive (Rakthanmanon & Keogh, 2013), as it requires evaluating subsequences across varying positions and lengths. + +Existing methods (Grabocka et al., 2014; Li et al., 2020) address this issue via a shapelet transformation strategy for candidate subsequence sparsification. Specifically, they convert each subsequence into a feature that quantifies the distance between a time series sample and the subsequence (Ma + +et al., 2020). Subsequently, this strategy was followed by many methods (Li et al., 2021; Le et al., 2024) to learn shapelet representations, thereby enhancing the model's interpretability. While efficient, this approach discards many subsequences from the entire time series in a hard manner, those that could be beneficial for the classification tasks. In addition, this approach fails to account for the varying importance of shapelets to classification. As shown in Figure 1(b), this leads to poor capture of class patterns in the third and fourth subsequences due to minimal class differences, while omitting many informative regions. + +Recent advances in time series patch tokenization (Nie et al., 2023; Bian et al., 2024), i.e., converting time series into subsequence-based tokens, and in the mixture of experts (MoE) architectures (Riquelme et al., 2021; Fedus et al., 2022) inspired a new direction. In computer vision, MoE routers dynamically assign input patches to specialized experts, which can improve both efficiency and class-specific feature learning (Chen et al., 2022; Chowdhury et al., 2023). By analogy, time series shapelets, which can exhibit intraclass similarity and inter-class distribution, can act as patch tokens, with MoE enabling adaptive focus on the most discriminative subsequences. Yet, existing shapelet-based methods overlooked such an approach. + +In this paper, we propose the Soft sparse Shapes (SoftShape) model for TSC, which replaces hard shapelet sparsification with soft shapelets. Specifically, we introduce a soft shape sparsification mechanism to reduce the number of learning shapes, thereby enhancing the efficiency of model training. To clarify our motivation, Figure 1(d) shows the classification results of InceptionTime (Ismail Fawaz et al., 2020) using multiple-instance learning (Early et al., 2024). Unlike the hard way depicted in Figure 1(b), our soft shapelet sparsification assigns weights to shapes based on their classification contribution scores, effectively preserving and differentiating all subsequence information from the time series. Furthermore, we enhance the discriminability of the learned soft shapes by combining: (1) Intra-shape patterns via MoE, where experts specialize in class-specific shapelet types; and (2) Inter-shape dependencies via a shared expert that models temporal relationships among sparsified shapes. + +In summary, the major contributions are as follows: + +- We propose SoftShape, a soft shapelet sparsification approach for TSC. This weighted aggregation of subsequences is based on classification contribution scores, avoiding information loss from hard filtering. +- We introduce a dual-pattern shapelet learning approach based on an MoE-driven intra-shape specialization and sequence-aware inter-shape modeling, improving the discriminative power of learned shape embeddings. + +- We conduct extensive experiments on 128 UCR time series datasets, demonstrating the superior performance of our proposed method against state-of-the-art approaches while showcasing interpretable results. + +# 2. Related Work + +# 2.1. Deep Learning for Time-Series Classification + +Recently, deep learning has received significant attention from scholars in time series classification tasks due to its powerful feature extraction capabilities (Ismail Fawaz et al., 2020; Zhang et al., 2024). For example, Ismail Fawaz et al. (2019) and Mohammadi Foumani et al. (2024) have systematically reviewed deep learning approaches for time series classification, focusing on different types of deep neural networks and deep learning paradigms, respectively. In addition, Middlehurst et al. (2024) and Ma et al. (2024) have conducted extensive experiments to evaluate recent time series classification methods. Their findings demonstrate that deep learning models can be effectively applied to time series classification tasks. Despite their strong performance, these deep learning-based time series classification methods often struggle to improve the interpretability of classification results. + +# 2.2. Time-Series Classification with Shapelets + +Ye & Keogh (2009) first introduced shapelets, providing good interpretability for time series classification results. Early methods (Mueen et al., 2011; Rakthanmanon & Keogh, 2013) selected the most discriminative subsequences as shapelets using an evaluation function, but the sparsification process was computationally intensive due to the numerous candidate subsequences. To tackle this problem, Hills et al. (2014) introduced the shapelet transform, converting all candidate subsequences into distance-based features for shapelet discovery. Recent studies (Qu et al., 2024; Le et al., 2024; Wen et al., 2025) have applied the shapelet transform strategy in deep learning models for time series classification, thereby improving model interoperability. However, these methods often handle candidate subsequences in a hard way, which easily leads to the loss of helpful temporal patterns from the time series sample. + +More recently, Nie et al. (2023); Wu et al. (2025) showed that using patches of time series as input data enhances forecasting performance and reduces training time. Building on this, Luo & Wang (2024), Wang et al. (2024), and Wen et al. (2024) validated the effectiveness of patch techniques for time series classification. Eldele et al. (2024) further demonstrated that using time series patches as CNN inputs outperformed Transformer-based methods. However, these methods typically use all patches as inputs, leading to computational inefficiency in TSC for long sequences. + +# 2.3. Mixture-of-Experts in Time Series + +Mixture of experts (MoE) typically consist of multiple subnetworks (experts) and a learnable router (Shazeer et al., 2017; Zhou et al., 2022). MoE has been utilized in time series forecasting for decades (Zeevi et al., 1996; Ni et al., 2024) and recently applied to improve the efficiency of time series forecasting foundation models (Liu et al., 2024a; Shi et al., 2025). In addition, Huang et al. (2025) extended MoE to graph-based models for time series anomaly detection. Wen et al. (2025) introduced a gated router within MoE to integrate DNNs for learning time series representations, combining them with shapelet transform features to address the performance limitations of using shapelet transform alone in TSC. Unlike the above methods, we utilize the MoE router to activate class-specific experts for learning intra-shape local temporal patterns. Furthermore, we employ a shared expert to capture global temporal patterns across sparsified shapes from the same time series, thereby enhancing the discriminative power of shape embeddings. + +# 3. Preliminaries + +# 3.1. Problem Definition + +In this study, we focus on the use of deep learning models for univariate time series classification. Let the time series dataset be represented as $\mathcal{D} = \{(\mathcal{X}_n,\mathcal{Y}_n)\}_{n = 1}^N$ , where $N$ denotes the total number of time series samples. Each univariate time series $\mathcal{X}_n = \{x_1,x_2,\dots ,x_T\}$ is an ordered sequence of $T$ real-valued observations. The corresponding label $\mathcal{V}_n\in \mathbb{R}^C$ is a one-hot encoded vector, where each value $y_{c}\in \{0,1\}$ indicates whether $\mathcal{X}_n$ belongs to class $c$ , with $C$ representing the total number of classes. Given a deep learning model parameterized by $\theta$ , the objective of the TSC task is to optimize the function $f_{\theta}:\mathbb{R}^{T}\to \mathbb{R}^{C}$ such that it can accurately predict the label $\mathcal{V}_n$ corresponding to any input time series $\mathcal{X}_n$ . + +# 3.2. Time Series Shapelets + +Given a time series $\mathcal{X}_n$ , a subsequence of length $m$ , where $m < T$ , is denoted as $\mathcal{S}_{n,p}^{m} = \{x_{p}, x_{p+1}, \ldots, x_{p+m-1}\}$ . Here, $p$ denotes the starting index of $\mathcal{S}_{n,p}^{m}$ , where $0 \leq p < T - m$ . All subsequences of length $m$ from the time series $\mathcal{X}_n$ can be extracted using a sliding window of size $m$ with a fixed step size $q$ (commonly $q = 1$ ), traversing from $t = 1$ to $T$ . Thus, the set of all subsequences of length $m$ from $\mathcal{X}_n$ can be defined as $\mathcal{S}_{n}^{m} = \{\mathcal{S}_{n,p}^{m} \mid 0 \leq p < T - m\}$ . + +Due to the length of the subsequences varying within the range $2 \leq m \leq T - 1$ , the candidate set $\mathcal{A}$ of all possible subsequences for the time series dataset $\mathcal{D}$ is expressed as: + +$$ +\mathcal {A} = \bigcup_ {n = 1} ^ {N} \bigcup_ {m = 2} ^ {T - 1} \mathcal {S} _ {n} ^ {m} = \left\{\mathcal {S} _ {n, p} ^ {m} \mid 0 \leq p < T - m \right\}. \tag {1} +$$ + +Shapelets are defined as a subset of discriminative subsequences within $\mathcal{A}$ that maximally represent the class of each time series $\mathcal{X}_n$ (Ye & Keogh, 2009). Given that every shape in $\mathcal{A}$ could potentially serve as a shapelet, a brute-force search to evaluate all subsequences of each $\mathcal{X}_n$ using an evaluation function becomes computationally prohibitive as the number of samples $N$ and the sequence length $T$ increase. Thus, the design of appropriate sparsification techniques for the set $\mathcal{A}$ is crucial for enhancing the computational efficiency of shapelet-based TSC methods. + +# 4. Methodology + +# 4.1. Model Overview + +The overall architecture of the SoftShape model is illustrated in Figure 2. SoftShape begins with a shape embedding layer that transforms the input time series into shape embeddings corresponding to multiple equal-length subsequences. These embeddings are normalized with a norm layer and then processed using soft shape sparsification (see Section 4.2). Specifically, an attention head assigns weight scores to each shape embedding based on its classification contribution. High-weight embeddings are scaled by their scores to form soft shapes, while low-weight embeddings are merged into a single shape for sparsification. The normalized sparsified shape embeddings are then input into the soft shape learning block to learn temporal patterns (see Section 4.3). Within this block, a MoE router activates a few class-specific experts to capture intra-shape temporal patterns (see Section 4.3.1). Meanwhile, these sparsified soft shapes are transformed into sequences, with a shared expert learning inter-shape temporal patterns (see Section 4.3.2). Finally, the sparsified soft shape embeddings, along with the intra-shape and inter-shape embeddings learned by the soft shape learning block, are combined in a residual way. After stacking $L$ layers, the output is passed to a linear layer for classification training (see Section 4.4). + +# 4.2. Soft Shape Sparsification + +For each input time series $\mathcal{X}_n$ , we use a 1D convolutional neural network (CNN) as the shape embedding layer to obtain $M = \frac{T - m}{q} + 1$ ( $q < m$ ) overlapping subsequence embeddings, denoted $\hat{S}_n^m = \{\hat{S}_{n,p}^m \mid 0 \leq p < T - m\}$ . Each shape embedding $\hat{S}_{n,p}^m$ is computed using the following convolution operation: + +$$ +\hat {\mathcal {S}} _ {n, p} ^ {m} = \left\{\sum_ {i = 0} ^ {\mathrm {m} - 1} \mathbf {W} _ {i} \mathcal {S} _ {n, p} ^ {m} \mid p = 0, q, 2 q, \dots , T - m \right\}, \tag {2} +$$ + +where $\mathbf{W}_i$ denotes the weights of the $i$ -th filter within the kernel of the CNN, and $\hat{S}_{n,p}^{m}\in \mathbb{R}^{d}$ , with $d$ representing the dimension of the shape embedding. Like patch-based methods (Nie et al., 2023; Eldele et al., 2024), we incorporate + +![](images/3efe8aa2d2242526363ded074799f2cf172885eeff566fa15e5291d87bd7afb8.jpg) +Figure 2: The general architecture of SoftShape model. SoftShape mainly involves: a) Soft Shape Sparsification converts shapes into soft forms and fuses those with lower scores into a single shape. b) Soft Shape Learning Block employs a MoE router to activate class-specific experts to learn intra-shape patterns and utilizes a shared expert to learn inter-shape patterns. + +learnable positional embeddings into shape embeddings to capture temporal dependencies within the time series. + +To identify the most discriminative shape embeddings in $\hat{S}_n^m$ , we employ a parameter-shared attention head across soft shape learning blocks at different depths. Unlike the self-attention mechanism in Transformers, we employ a gated attention mechanism (Ilse et al., 2018) that assumes independence among shape embeddings. This design facilitates label-guided identification of key shapes while maintaining linear computational complexity with respect to the number of shapes (Early et al., 2024). The attention head evaluates the contribution score of each $\hat{S}_{n,p}^{m}$ for classification training, defined as follows: + +$$ +\alpha \left(\hat {\mathcal {S}} _ {n, p} ^ {m}\right) = \sigma \left(\mathbf {W} _ {2} \tanh \left(\mathbf {W} _ {1} \hat {\mathcal {S}} _ {n, p} ^ {m} + \mathbf {b} _ {1}\right) + \mathbf {b} _ {2}\right), \tag {3} +$$ + +where $\sigma (\cdot)$ is the sigmoid function outputting $\alpha \in (0,1)$ , $\tanh (\cdot)$ is the hyperbolic tangent function, $\mathbf{W}_1\in \mathbb{R}^{d_{\mathrm{attn}}\times d}$ and $\mathbf{W}_2\in \mathbb{R}^{1\times d_{\mathrm{attn}}}$ are the weights of a linear layer, and $\mathbf{b}_1\in \mathbb{R}^{d_{\mathrm{attn}}}$ and $\mathbf{b}_2\in \mathbb{R}$ are the bias terms. + +The value of $\alpha (\hat{S}_{n,p}^{m})$ closer to 1 indicates a greater contribution to enhancing classification performance. Hence, we + +can perform soft shape sparsification using scores from the attention head based on their ranking. For each attention score of $\hat{S}_{n,p}^{m}$ ranked within the top $\eta$ proportion among the total $J = \frac{T - m}{q} + 1$ shape embeddings in $\hat{S}_n^m$ , we convert them into soft shape embeddings as follows: + +$$ +\widetilde {\mathcal {S}} _ {n, p} ^ {m} = \alpha (\hat {\mathcal {S}} _ {n, p} ^ {m}) \hat {\mathcal {S}} _ {n, p} ^ {m}. \tag {4} +$$ + +For those with scores below the top $\eta$ proportion, we fuse them into a single shape embedding as follows: + +$$ +\widetilde {\mathcal {S}} _ {\mathrm {n}, \text {f u s e d}} ^ {m} = \sum_ {p \in \mathcal {E}} \alpha \left(\hat {\mathcal {S}} _ {n, p} ^ {m}\right) \hat {\mathcal {S}} _ {n, p} ^ {m}, \tag {5} +$$ + +where $\mathcal{E}$ denotes the index of scores that are below the top $\eta$ proportion. Finally, the soft shape embeddings are sorted according to their original order in $\hat{S}_n^m$ , with the fused embedding $\widetilde{S}_{\mathrm{n,fused}}^m$ appended at the end to form the sparsified soft shape embeddings $\widetilde{S}_n^m$ . + +Through this sparsification process, we transform the time series $\mathcal{X}_n$ into sparsified soft shape embeddings $\widetilde{S}_n^m$ . Compared to directly using all shape embeddings in $\hat{S}_n^m$ as input, the number of shape embeddings in $\widetilde{S}_n^m$ is reduced, thereby decreasing the cost of the model's computation. + +# 4.3. Soft Shape Learning Block + +# 4.3.1. INTRA-SHAPE LEARNING + +Intuitively, shapelets from different classes show distinct temporal patterns, whereas those from the same class are more similar. Recently, Chen et al. (2022); Chowdhury et al. (2023) theoretically indicated that the MoE router can direct input embeddings with similar class patterns to the same expert while filtering out class-irrelevant features. This allows the router to selectively activate a subset of experts (sub-networks) for each shape embedding, enabling class-specific feature learning while reducing computational overhead compared to activating all experts simultaneously. Therefore, we introduce a module that employs the MoE router to activate class-specific experts for learning intra-shape temporal patterns, thereby enhancing the discriminative capability of each soft shape embedding. The function of the MoE router is defined as: + +$$ +G \left(\widetilde {\mathcal {S}} _ {n, p} ^ {m}\right) = \operatorname {T O P} _ {k} \left(\operatorname {s o f t m a x} \left(\mathbf {W} _ {t} \widetilde {\mathcal {S}} _ {n, p} ^ {m}\right)\right), \tag {6} +$$ + +$$ +\operatorname {T O P} _ {k} (v) = \left\{ \begin{array}{l l} v _ {i}, & \text {i f} v _ {i} \text {i s i n t h e t o p} k \text {v a l u e s o f} v, \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {7} +$$ + +where $\mathbf{W}_t\in \mathbb{R}^{\hat{C}\times d}$ are the learning weights of the router that convert the sparsified shape embedding $\widetilde{S}_{n,p}^{m}$ into a vector of corresponding to the total number of experts $\hat{C}$ . The $\mathrm{TOP}_k(v)$ is applied after the softmax function to prevent the values of $G(\widetilde{S}_{n,p}^{m})$ being zero almost everywhere during training (Riquelme et al., 2021), particularly when $k = 1$ . + +In the paper, each MoE expert employs a lightweight MLP network to learn class-specific patterns using each soft shape embedding as input. The $e$ -th expert function is defined as: + +$$ +h _ {e} (\theta , \widetilde {\mathcal {S}} _ {n, p} ^ {m}) = \hat {G} _ {e} (\widetilde {\mathcal {S}} _ {n, p} ^ {m}) \mathrm {G e L U} \left(\mathbf {W} _ {e} \widetilde {\mathcal {S}} _ {n, p} ^ {m} + \mathbf {b} _ {e}\right), \quad (8) +$$ + +$$ +\hat {G} _ {e} \left(\widetilde {\mathcal {S}} _ {n, p} ^ {m}\right) = \frac {e ^ {G _ {e} \left(\widetilde {\mathcal {S}} _ {n , p} ^ {m}\right)}}{\sum_ {i \in \mathrm {T O P} _ {k} (v)} e ^ {G _ {i} \left(\widetilde {\mathcal {S}} _ {n , p} ^ {m}\right)}}, \tag {9} +$$ + +where $\mathbf{W}_e$ and $\mathbf{b}_e$ represent the weight and bias terms of the MLP network, and $\mathrm{GeLU}(\cdot)$ denotes the gaussian error linear unit activation function. The MoE experts' parameters are shared across soft shape learning blocks at different depths, ensuring the efficiency of parameter optimization. + +However, the MoE router often tends to converge to a state where it assigns higher weights to a few favored experts. This imbalance can cause the favored experts to train faster and dominate the expert selection process, resulting in underutilization and potential underfitting of less frequently chosen experts. To address this issue, following (Shazeer et al., 2017), we employ two loss functions as follows: + +$$ +\mathcal {L} _ {\mathrm {i m p}} \left(\widetilde {\mathcal {S}} _ {n, p} ^ {m}\right) = \mathbf {W} _ {\mathrm {i m p}} \mathbf {C V} \left(\sum_ {\widetilde {\mathcal {S}} _ {n, p} ^ {m} \in \widetilde {\mathcal {S}} _ {n} ^ {m}} G \left(\widetilde {\mathcal {S}} _ {n, p} ^ {m}\right)\right) ^ {2}, \tag {10} +$$ + +where $\mathbf{W}_{\mathrm{imp}}$ is the learning weight parameters and $\mathrm{CV}(\cdot)$ denotes the coefficient of variation, thus ensuring all experts contribute equally. + +$$ +\mathcal {L} _ {\text {l o a d}} \left(\widetilde {S} _ {n, p} ^ {m}\right) = \mathbf {W} _ {\text {l o a d}} \mathrm {C V} \left(\operatorname {L o a d} \left(\widetilde {S} _ {n, p} ^ {m}\right)\right) ^ {2}, \tag {11} +$$ + +where $\mathbf{W}_{\mathrm{load}}$ is the learning weight parameters for load balancing and $\mathrm{Load}(\widetilde{S}_{n,p}^{m})$ is the number of soft shape embeddings assigned to each expert, thereby reducing the risk of underutilization. By jointly optimizing $\mathcal{L}_{\mathrm{imp}}$ and $\mathcal{L}_{\mathrm{load}}$ in the overall loss function, we can alleviate the likelihood of underfitting in some experts. In addition, following Zoph et al. (2022), we apply a residual connection between the input shape embedding $\widetilde{S}_{n,p}^{m}$ and the output $h_e(\theta, \widetilde{S}_{n,p}^{m})$ to enhance training stability. + +# 4.3.2. INTER-SHAPE LEARNING + +While the MoE router activates a few experts to learn class-specific temporal patterns within each soft shape, it treats the multiple shapes extracted from each time series sample independently, thereby overlooking the temporal dependencies among shapes. In general, learning intra-shape temporal patterns is beneficial for capturing local discriminative features, but it can be difficult to learn the global temporal patterns from the time series that are vital for classification. To this end, we introduce a shared expert to learn the temporal patterns among sparsified shapes within the time series. + +The sparsified soft shape embeddings are first transformed into a sequence where each shape is treated as an individual unit. This transformation is defined as: + +$$ +\mathcal {Q} _ {n} ^ {m} = \left(\widetilde {\mathcal {S}} _ {n} ^ {m}\right) ^ {T}, \quad \text {w h e r e} \quad \widetilde {\mathcal {S}} _ {n} ^ {m} \in \mathbb {R} ^ {B \times N u m \times d}, \tag {12} +$$ + +where $\mathcal{Q}_n^m\in \mathbb{R}^{B\times d\times Num}$ , and $B$ denotes the batch size, $Num = J\times \eta +1$ is the number of sparsified soft shapes of each time series, and $d$ is the dimension of one soft shape embedding. Recent studies (Middlehurst et al., 2024) have shown that CNN-based models perform remarkably in TSC tasks. In this work, we employ a CNN-based Inception module (Ismail Fawaz et al., 2020) as the shared expert. The shared expert comprises three 1D convolutional layers with different kernel sizes, sliding along the third dimension of $\mathcal{Q}_n^m$ from 0 to $Num$ . This allows it to learn multi-resolution temporal patterns across soft shapes effectively. For raw input time series samples, the input dimension containing $B$ univariate time series can be represented as $(B,1,T)$ , where $T$ is the length of each time series. Traditional CNN-based methods (Ismail Fawaz et al., 2020) typically transform each point in the time series into $d$ -dimensional embeddings, resulting in an input dimension of $(B,d,T)$ . Unlike the above, we treat each shape as a sequence point and convert it into $d$ -dimensional embeddings for training. + +As shown in Equations (1) and (5), with a higher sparsity rate $(1 - \eta)$ , the actual sequence length $Num$ of $\mathcal{Q}_n^m$ fed + +into the shared expert is significantly smaller than $T$ , thus reducing the model's computational load. The shared expert ensures efficient learning of temporal patterns across sparsified soft shapes, better capturing global features of the time series for classification training. + +# 4.4. The Training of SoftShape + +The SoftShape model stacks $L$ layers of the soft shape learning block for classification training. Each layer's output is processed using a $\mathrm{GeLU}(\cdot)$ activation function. The final layer outputs three types of embeddings: the sparsified soft shape embeddings, the intra-shape embeddings, which are combined through a residual way denoted as $O_{n}^{m}$ . To accurately represent the learned attention scores for each shape embedding associated with the target class, we employ conjunctive pooling (Early et al., 2024) for training: + +$$ +\hat {\mathcal {Y}} _ {n} = \frac {1}{N u m} \sum_ {i = 0} ^ {N u m} \alpha \left(O _ {n} ^ {m}\right) \phi \left(O _ {n, i} ^ {m}\right), \tag {13} +$$ + +where $\phi$ denotes a linear layer as the classifier. For all time series samples, we use the cross-entropy loss for classification training, defined as: + +$$ +\mathcal {L} _ {\mathrm {c e}} (\mathcal {X}, \mathcal {Y}) = - \frac {1}{B} \sum_ {i = 1} ^ {B} \sum_ {j = 1} ^ {C} 1 \left\{y _ {i} = j \right\} \log \left(\hat {\mathcal {Y}} _ {i} ^ {j}\right), \tag {14} +$$ + +where $\hat{\mathcal{Y}}_i^j$ is the predicted class probability at the $j$ -th class for the sample $\mathcal{X}_i$ . Therefore, the overall training objective for SoftShape is given by: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\mathrm {c e}} + \lambda \left(\mathcal {L} _ {\mathrm {i m p}} + \mathcal {L} _ {\text {l o a d}}\right), \tag {15} +$$ + +where $\lambda$ is a hyperparameter to adjust the training loss ratio. Additionally, the pseudo-code for SoftShape can be found in Algorithm 1 located in the Appendix. + +# 5. Experiments + +To evaluate the performance of various methods for TSC, we conduct experiments using the UCR time series archive (Dau et al., 2019), a widely recognized benchmark in TSC (Ismail Fawaz et al., 2019). Many datasets in the UCR archive contain a significantly higher number of test samples compared to the training samples. Also, the original UCR time series datasets lack a specific validation set, increasing the risk of overfitting in deep learning methods. Following (Dau et al., 2019; Ma et al., 2024), we merge the original training and test sets of each UCR dataset. These merged datasets are then divided into train-validation-test sets at a ratio of $60\% - 20\% - 20\%$ . This paper compares SoftShape against 19 baseline methods, categorized as follows: + +- Deep Learning Methods (DL): + +CNN-based (DL-CNN): FCN (Wang et al., 2017), T-Loss (Franceschi et al., 2019), SelfTime (Fan et al., 2020), TS-TCC (Eldele et al., 2021), TS2Vec (Yue et al., 2022), TimesNet (Wu et al., 2023b), InceptionTime (Ismail Fawaz et al., 2020), LightTS (Campos et al., 2023), ShapeConv (Qu et al., 2024), ModernTCN (Luo & Wang, 2024), and TSLANet (Eldele et al., 2024). +- Transformer-based (DL-Trans): TST (Zerveas et al., 2021), PatchTST (Nie et al., 2023), Shapeformer (Le et al., 2024), and Medformer (Wang et al., 2024). +- Foundation models (DL-FM): GPT4TS (Zhou et al., 2023) and UniTS (Gao et al., 2024). + +- Non-Deep Learning Methods (Non-DL): RDST (Guillaume et al., 2022) and MultiRocket-Hydra (MRH) (Dempster et al., 2023). + +For information on datasets, baselines, and implementation details, please refer to Appendix A. + +# 5.1. Main Results + +Table 1: Test classification accuracy comparisons on 128 UCR time series datasets. The best results are in **bold**, and the second best results are underlined. + +
MethodsAvg. AccAvg. RankWinP-value
DL-CNNFCN0.82969.53131.43E-12
T-Loss0.832511.1292.95E-14
SelfTime0.801713.8004.53E-25
TS-TCC0.780713.9601.60E-15
TS2Vec0.86918.4391.69E-15
TimesNet0.836710.1374.22E-15
InceptionTime0.91814.05297.39E-06
ShapeConv0.768813.9153.58E-24
ModernTCN0.793811.3791.78E-18
TSLANet0.92053.68311.06E-03
DLTransTST0.775513.5412.00E-19
PatchTST0.82659.56121.27E-15
Medformer0.85419.2677.15E-16
DLFMGPT4TS0.85939.3467.89E-16
UniTS0.85029.6651.41E-13
NonDLRDST0.88976.41237.54E-10
MR-H0.89725.51293.80E-07
SoftShape (Ours)0.93342.7253-
+ +The classification accuracies on the test sets of the 128 UCR datasets are presented in Table 1, with detailed results provided in Appendix B.1. The average ranking (Avg. Rank) reflects the method's relative position based on test accuracy, where lower values signify higher accuracy. Win indicates the number of datasets where the baseline achieves the highest test accuracy. The $P$ -value from the Wilcoxon signed-rank test (Demšar, 2006) assesses the significance of + +differences in test accuracy between pairwise methods. A $P$ -value $< 0.05$ suggests SoftShape outperforms the baseline. + +Due to the high computational cost of LightTS (Campos et al., 2023) and Shapeformer (Le et al., 2024), their results are reported only on 18 selected UCR time series datasets in Table 10 of Appendix B.1. Detailed reasons for 18 UCR dataset selection are in Appendix B.3. The experimental results in Table 1 and Table 10 highlight SoftShape's superior classification performance, demonstrating its effectiveness in TSC. Also, the P-value results confirm the statistical significance of SoftShape's performance compared to baselines, highlighting its capacity to capture the discriminative patterns of time series data. The critical diagram (Figure 6) in the Appendix further supports the statistical significance of SoftShape's performance improvement. + +# 5.2. Ablation Study + +Table 2: Test accuracy of ablation study on 128 UCR datasets. The best results are in **bold**, and the second best results are **underlined**. + +
MethodsAvg. AccAvg. RankWinP-value
w/o Soft Sparse0.91233.04294.69E-06
w/o Intra0.92452.75315.39E-04
w/o Inter0.90223.74191.81E-09
w/o Intra & Inter0.86965.02114.35E-16
with Linear Shape0.91643.23221.80E-09
SoftShape (Ours)0.93342.0460-
+ +The ablation studies include: 1) w/o Soft Sparse removes the soft sparse process, using only the selected top $\eta$ shape embeddings for training; 2) w/o Intra eliminates the intra-shape learning process via the class-specific experts; 3) w/o Inter removes the inter-shape learning process via the shared expert; 4) w/o Intra & Inter excludes both the intra-shape learning and inter-shape learning processes; 5) with Linear Shape employs a linear layer commonly used in (Nie et al., 2023; Wang et al., 2024) to replace the 1D CNN in Equation (2) as the shape embedding layer. + +Table 2 presents the statistical ablation results, with detailed results provided in Appendix B.2. w/o Soft Sparse reduces accuracy and lowers the Avg. Rank, indicating the importance of this process in capturing the most helpful shape embeddings for classification. Similarly, w/o Intra highlights the significant role of the intra-shape module in SoftShape. Moreover, w/o Inter leads to a large drop in performance, underscoring the critical contribution of inter-shape relationships in learning global patterns of time series. When both the intra- and inter-shape learning processes are excluded (w/o Intra & Inter), performance further degrades, demonstrating that these two processes are foundational to SoftShape's effectiveness. Finally, with Linear Shape con + +firms the superiority of the CNN architecture for learning shape embeddings. These results confirm the importance of each component in the SoftShape model. + +# 5.3. Shape Sparsification and Learning Analysis + +Table 3: Test accuracy of different sparse ratios on 18 UCR datasets. The best results are in **bold**, and the second best results are **underlined**. + +
Sparse RatioAvg. AccAvg. RankWinP-value
0%0.94612.444-
10%0.94692.3972.97E-01
30%0.94482.7852.66E-01
50%0.94532.6163.46E-01
70%0.93233.8959.37E-03
90%0.92614.5024.02E-04
+ +Evaluating all 128 UCR time series datasets takes considerable time, so we selected 18 datasets from the UCR time series archive for analysis and subsequent experiments. Table 3 presents the test results when combining shape embeddings with weighted fusion at varying sparse ratio $(1 - \eta)$ proportions during sparsification, with detailed results provided in Appendix B.3. When $(1 - \eta) \leq 50\%$ , test accuracy showed no significant decline compared to the nonsparsified case $(0\%)$ , with all p-values $>0.05$ . Conversely, when $(1 - \eta) > 50\%$ , particularly at $90\%$ , performance declined significantly compared to $0\%$ , indicating that excessive sparsification can remove some shape embeddings beneficial for capturing inter-shape global temporal patterns. Furthermore, the performance degradation under high sparsity ratios suggests that hard shapelet-based methods discard numerous informative subsequences, which may result in the loss of critical patterns useful for classification. As performance at $50\%$ is statistically comparable to $0\%$ , we set $\eta$ to $50\%$ in the main experiments to optimize the computational efficiency of the soft shape learning block. + +Table 4 illustrates the effect of the number of activated experts $(k)$ selected by the MoE router during intra-shape learning, with detailed results provided in Appendix B.3. The results show that when $k = 3$ or $k = 4$ , the average rank is worse than when $k = 1$ or $k = 2$ . This suggests that activating a greater number of class-specific experts for each soft shape increases computational cost while diminishing the class discriminability of the intra-shape embeddings. + +Also, we select one non-deep learning method (MR-H) and three deep learning baselines for runtime analysis. MR-H uses randomly initialized convolutional kernels for feature extraction, with training times measured on a CPU. The deep learning methods are evaluated on a GPU. Inception-Time is an advanced deep learning method described in + +Table 4: Test accuracy comparison of the number of activated experts on 18 UCR datasets. The best result is in **bold**. + +
Activated Expertsk=1k=2k=3k=4
Avg. Rank1.891.942.782.39
+ +![](images/2302111fe23eeaeb406f4d0defa09d9b30f2b9872967605629b91f5901748308.jpg) + +![](images/6756217515201ac0f23a243e1b0f5ed018d2c120f9213b8405625dadf902603d.jpg) + +![](images/1f22cf42847ec03ee68576c9b6a0658e92707d4b7acdbb5a7eddf1fb3ebcfd94.jpg) +Figure 3: Running time analysis on the Chlorine Concentration and House Twenty datasets. + +![](images/f1139482e487a3136f2e1e5164214c9ee7907f7a121bad7d576b54ad6aafff4d.jpg) + +(Middlehurst et al., 2024). TSLANet and Medformer are recent patch-based models utilizing CNNs and Transformers, respectively. To evaluate SoftShape's sparsification efficiency, we select two datasets: Chlorine Concentration (4,307 samples, length 166) and HouseTwenty (159 samples, length 2,000). In Figures 3(a) and 3(b), sequence lengths are extended to 16,600 and 20,000 by sample concatenation to simulate long-sequence scenarios. Given Medformer's high computational cost for long sequences, we report only its runtime at 50 epochs (out of a maximum of 500), denoted as Medformer-50. As shown in Figures 3(a) and 3(b), SoftShape outperforms all deep learning baselines and is slightly slower than MR-H. Specifically, Medformer's self-attention leads to higher training time with long sequences, while SoftShape's linear-complexity gated attention ensures greater efficiency. In short-sequence [Figure 3(c)] and small-sample [Figure 3(d)] scenarios, SoftShape exhibits slightly higher runtime than TSLANet and substantially higher than MR-H. In these settings, sparsification offers limited efficiency gains, as the number of sparsified shapes does not decrease significantly compared to a greater number of training samples with long sequences. Additionally, Table 14 in Appendix B.3 presents the inference times and parameter counts for the settings in Figures 3(c) and 3(d). + +# 5.4. Visualization Analysis + +To evaluate SoftShape's effectiveness and interpretability, we use Multiple Instance Learning (MIL) (Early et al., 2024) for visualization. MIL identifies key time points in time se + +![](images/5b85f01b2ea092243087e88483ed781499f8706d142d59b662591b54eecd76ec.jpg) + +![](images/60e88fe32c98109d48c6f2d53d5cf0ac9f8123d684e3d9ee51a9bc53a0d5272f.jpg) +Figure 4: The MIL visualization on the Trace dataset. + +ries that improve classification performance. This study applies MIL to highlight significant shapes. Figure 4 shows the discriminative regions and attention scores learned by SoftShape on Class 1 of the Trace dataset. Deeper red indicates beneficial regions for classification, while deeper blue shows less relevant ones. Figures 4(a) and 4(b) treat each shape (length $m = 64$ ) as one sequence point, while Figures 4(c) and 4(d) map these results to the entire time series. SoftShape assigns higher attention scores to subsequences with significant differences between Class 1 and Class 2, while sparsifying less discriminative regions. These findings indicate that SoftShape learns highly discriminative shapes as shapelets, enhancing interpretability through attention scores. Further MIL visualisations on the Lightning2 dataset in the Appendix of Figure 7 support this finding. + +The t-distributed Stochastic Neighbor Embedding (t-SNE) (Van der Maaten & Hinton, 2008) is used to visualize shape embeddings learned by SoftShape. Figure 5(a) shows input shape embeddings from 1D CNN (Eq. (2)) on the CBF dataset. Figures 5(b) and 5(c) present sparsified intra-shape and inter-shape embeddings from the soft shape learning block, while Figure 5(d) displays final output sparsified shape embeddings for classification. Compared to Figure 5(a), the intra-shape embeddings [Figure 5(b)] learned by activating class-specific experts form clusters for samples of the same class but still mix some samples from different classes. The inter-shape embeddings [Figure 5(c)] learned by a shared expert effectively separate different classes while dispersing same-class samples into multiple clusters. Combining intra- and inter-shape embeddings, Figure 5(d) balances class distinction and clusters samples of the same class closely together. These results indicate that SoftShape leverages intra- and inter-shape patterns to improve shape embedding discriminability. Further t-SNE visualization on the TwoPatterns, Fiftywords, and ECG200 datasets with different classification difficulty can be seen in the Appendix of Figures 8, 9, and 10, respectively. + +# 5.5. Hyperparameter Analysis + +Table 5 presents the classification results of SoftShape for various sliding fixed step sizes $q$ . We observed worse Avg. + +![](images/4649bca9995db59cc9c901a012b134596426a82c9c6df5905ab86bd26ee5a89b.jpg) + +![](images/09df71e2c76b461f1f0111e7562da8198439cb259289b2519c4ef00bdf28059d.jpg) +(b) Intra-Shape Embeddings + +![](images/3110e0eea7d2672605d7cb479120aa81e2a88aa3bff644a287ff1a9cec47efcd.jpg) +(a) Input Shape Embeddings +(c) Inter-Shape Embeddings +Figure 5: The t-SNE visualization on the CBF dataset. + +![](images/db41f996fce2e09f9db2af27ea4f8430b046e8ce706bf83c304d1d408001e144.jpg) +(d) Output Shape Embeddings + +Table 5: Test accuracy comparison of different sliding window sizes on 18 UCR datasets. The best result is in **bold**. + +
Sliding Step Sizeq=1q=2q=3q=4q=m
Avg. Rank3.832.782.441.782.94
+ +Table 6: Test accuracy comparison of model depth on 18 UCR datasets. The best result is in bold. + +
DepthL=1L=2L=3L=4L=5L=6
Avg. Rank3.722.613.063.333.443.06
+ +Rank values when $q = 1$ or $q = m$ (non-overlapping). With $q = 1$ , the maximum subsequences result in redundancy and irrelevant information. Conversely, $q = m$ generates the fewest subsequences, possibly missing important discriminative subsequences. Table 6 examines the influence of model depth $L$ , revealing that SoftShape achieves the lowest Avg. Rank at $L = 2$ , demonstrating shape embeddings capture discriminative features effectively, even at low depths. Detailed results of Tables 5 and 6 provided in Appendix B.4. Also, Tables 18, 19, 20, and 21 in Appendix B.4 present statistical test results on the impact of the maximum number of class-specific experts, class-specific expert networks, shared expert networks, and the hyperparameter $\lambda$ . + +To evaluate the impact of the hyperparameter shape length $m$ on classification performance, we conducted three experiments: (1) Val-Select: Choose a fixed $m$ for one SoftShape model using the validation set. (2) Fixed-8: Set $m = 8$ for one SoftShape model. (3) Multi-Seq: Use fixed lengths (8, 16, 32) in parallel three SoftShape models, with cross-scale residual fusion (Liu et al., 2023) for classification. As shown in Table 7 (detailed results in Appendix B.4), there was no significant difference in performance between + +Val-Select and Multi-Seq (p-value $< 0.05$ ). The Val-Select model also has fewer parameters and a lower runtime. In addition, Tables 22 and 23 in Appendix B.5 present analyses of SoftShape's time series forecasting performance. + +Table 7: Test accuracy comparison of shape length $m$ on 18 UCR datasets. The best result is in bold. + +
MethodsVal-SelectFixed-8Multi-Seq
Avg. Rank1.722.281.44
P-value2.88E-014.68E-02-
+ +# 6. Conclusion + +In this paper, we propose a soft sparse shapes model for efficient time series classification. Specifically, we introduce a soft shape sparsification mechanism that merges low-discriminative subsequences into a single shape based on learned attention scores, reducing the number of shapes for shapelet learning. Moreover, we propose a soft shape learning block for learning intra-shape and inter-shape temporal patterns, enhancing shape embedding discriminability. Extensive experiments demonstrate that SoftShape achieves state-of-the-art classification performance while providing interpretable results. However, this study does not consider the modelling of relationships among multiple variables of the time series. In the future, we will investigate deep learning methods for multivariate TSC. + +# Acknowledgements + +We thank the anonymous reviewers for their helpful feedbacks. We thank Professor Eamonn Keogh and all the people who have contributed to the UCR time series classification archive. Zhen Liu and Yicheng Luo equally contributed to this work. The work described in this paper was partially funded by the National Natural Science Foundation of China (Grant No. 62272173), the Natural Science Foundation of Guangdong Province (Grant Nos. 2024A1515010089, 2022A1515010179), the Science and Technology Planning Project of Guangdong Province (Grant No. 2023A0505050106), the National Key R&D Program of China (Grant No. 2023YFA1011601), and the China Scholarship Council program (Grant No. 202406150081). + +# Impact Statement + +Our proposed work SoftShape aims to advance the field of Machine Learning by providing a more efficient and interpretable model for time series classification across various applications. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here. + +# References + +Bian, Y., Ju, X., Li, J., Xu, Z., Cheng, D., and Xu, Q. Multi-patch prediction: Adapting language models for time series representation learning. In *Forty-first International Conference on Machine Learning*, 2024. +Campos, D., Zhang, M., Yang, B., Kieu, T., Guo, C., and Jensen, C. S. Lightts: Lightweight time series classification with adaptive ensemble distillation. Proceedings of the ACM on Management of Data, 1(2):1-27, 2023. +Chen, Z., Deng, Y., Wu, Y., Gu, Q., and Li, Y. Towards understanding the mixture-of-experts layer in deep learning. Advances in neural information processing systems, 35: 23049-23062, 2022. +Chowdhury, M. N. R., Zhang, S., Wang, M., Liu, S., and Chen, P.-Y. Patch-level routing in mixture-of-experts is provably sample-efficient for convolutional neural networks. In International Conference on Machine Learning, pp. 6074-6114. PMLR, 2023. +Dau, H. A., Bagnall, A., Kamgar, K., Yeh, C.-C. M., Zhu, Y., Gharghabi, S., Ratanamahatana, C. A., and Keogh, E. The ucr time series archive. IEEE/CAA Journal of Automatica Sinica, 6(6):1293-1305, 2019. +Dempster, A., Schmidt, D. F., and Webb, G. I. Hydra: Competing convolutional kernels for fast and accurate time series classification. Data Mining and Knowledge Discovery, 37(5):1779-1805, 2023. +Demšar, J. Statistical comparisons of classifiers over multiple data sets. The Journal of Machine learning research, 7:1-30, 2006. +Early, J., Cheung, G., Cutajar, K., Xie, H., Kandola, J., and Twomey, N. Inherently interpretable time series classification via multiple instance learning. In The Twelfth International Conference on Learning Representations, 2024. +Eldele, E., Ragab, M., Chen, Z., Wu, M., Kwoh, C. K., Li, X., and Guan, C. Time-series representation learning via temporal and contextual contrasting. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, 2021. +Eldele, E., Ragab, M., Chen, Z., Wu, M., and Li, X. Tslanet: Rethinking transformers for time series representation learning. In *Forty-first International Conference on Machine Learning*, 2024. +Fan, H., Zhang, F., and Gao, Y. Self-supervised time series representation learning by inter-intra relational reasoning. arXiv preprint arXiv:2011.13548, 2020. + +Fedus, W., Zoph, B., and Shazeer, N. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. Journal of Machine Learning Research, 23(120):1-39, 2022. +Franceschi, J.-Y., Dieuleveut, A., and Jaggi, M. Unsupervised scalable representation learning for multivariate time series. Advances in neural information processing systems, 32, 2019. +Gao, S., Koker, T., Queen, O., Hartvigsen, T., Tsiligkaridis, T., and Zitnik, M. Units: A unified multi-task time series model. Advances in Neural Information Processing Systems, 37:140589-140631, 2024. +Grabocka, J., Schilling, N., Wistuba, M., and Schmidt-Thieme, L. Learning time-series shapelets. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 392-401, 2014. +Guillaume, A., Vrain, C., and Elloumi, W. Random dilated shapelet transform: A new approach for time series shapelets. In International Conference on Pattern Recognition and Artificial Intelligence, pp. 653-664. Springer, 2022. +Hills, J., Lines, J., Baranauskas, E., Mapp, J., and Bagnall, A. Classification of time series by shapelet transformation. Data mining and knowledge discovery, 28:851-881, 2014. +Hou, L., Kwok, J., and Zurada, J. Efficient learning of time-series shapelets. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 30, 2016. +Huang, X., Chen, W., Hu, B., and Mao, Z. Graph mixture of experts and memory-augmented routers for multivariate time series anomaly detection. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 17476-17484, 2025. +Ilse, M., Tomczak, J., and Welling, M. Attention-based deep multiple instance learning. In International conference on machine learning, pp. 2127-2136. PMLR, 2018. +Ismail Fawaz, H., Forestier, G., Weber, J., Idoumghar, L., and Muller, P.-A. Deep learning for time series classification: a review. Data mining and knowledge discovery, 33 (4):917-963, 2019. +Ismail Fawaz, H., Lucas, B., Forestier, G., Pelletier, C., Schmidt, D. F., Weber, J., Webb, G. I., Idoumghar, L., Muller, P.-A., and Petitjean, F. Inceptiontime: Finding alexnet for time series classification. Data Mining and Knowledge Discovery, 34(6):1936-1962, 2020. + +Jin, M., Koh, H. Y., Wen, Q., Zambon, D., Alippi, C., Webb, G. I., King, I., and Pan, S. A survey on graph neural networks for time series: Forecasting, classification, imputation, and anomaly detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. +Langley, P. Crafting papers on machine learning. In Langley, P. (ed.), Proceedings of the 17th International Conference on Machine Learning (ICML 2000), pp. 1207-1216, Stanford, CA, 2000. Morgan Kaufmann. +Lara, O. D. and Labrador, M. A. A survey on human activity recognition using wearable sensors. IEEE communications surveys & tutorials, 15(3):1192-1209, 2012. +Le, X.-M., Luo, L., Aickelin, U., and Tran, M.-T. Shapeformer: Shapelet transformer for multivariate time series classification. In Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 1484-1494, 2024. +Li, G., Choi, B., Xu, J., Bhowmick, S. S., Chun, K.-P., and Wong, G. L.-H. Efficient shapelet discovery for time series classification. IEEE transactions on knowledge and data engineering, 34(3):1149-1163, 2020. +Li, G., Choi, B., Xu, J., Bhowmick, S. S., Chun, K.-P., and Wong, G. L.-H. Shapenet: A shapelet-neural network approach for multivariate time series classification. In Proceedings of the AAAI conference on artificial intelligence, volume 35, pp. 8375-8383, 2021. +Liu, X., Liu, J., Woo, G., Aksu, T., Liang, Y., Zimmermann, R., Liu, C., Savarese, S., Xiong, C., and Sahoo, D. Moirai-moe: Empowering time series foundation models with sparse mixture of experts. arXiv preprint arXiv:2410.10469, 2024a. +Liu, Y., Hu, T., Zhang, H., Wu, H., Wang, S., Ma, L., and Long, M. itransformer: Inverted transformers are effective for time series forecasting. In The Twelfth International Conference on Learning Representations, 2024b. +Liu, Z., Chen, D., Pei, W., Ma, Q., et al. Scale-teaching: Robust multi-scale training for time series classification with noisy labels. Advances in Neural Information Processing Systems, 36:33726-33757, 2023. +Luo, D. and Wang, X. Modernton: A modern pure convolution structure for general time series analysis. In The Twelfth International Conference on Learning Representations, 2024. +Ma, Q., Zhuang, W., Li, S., Huang, D., and Cottrell, G. Adversarial dynamic shapelet networks. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 5069-5076, 2020. + +Ma, Q., Liu, Z., Zheng, Z., Huang, Z., Zhu, S., Yu, Z., and Kwok, J. T. A survey on time-series pre-trained models. IEEE Transactions on Knowledge and Data Engineering, 36(12):7536-7555, 2024. +Middlehurst, M., Large, J., Flynn, M., Lines, J., Bostrom, A., and Bagnall, A. Hive-cote 2.0: a new meta ensemble for time series classification. Machine Learning, 110(11): 3211-3243, 2021. +Middlehurst, M., Schäfer, P., and Bagnall, A. Bake off latex: a review and experimental evaluation of recent time series classification algorithms. Data Mining and Knowledge Discovery, pp. 1-74, 2024. +Mohammadi Foumani, N., Miller, L., Tan, C. W., Webb, G. I., Forestier, G., and Salehi, M. Deep learning for time series classification and extrinsic regression: A current survey. ACM Computing Surveys, 56(9):1-45, 2024. +Mueen, A., Keogh, E., and Young, N. Logical-shapelets: an expressive primitive for time series classification. In Proceedings of the 17th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 1154-1162, 2011. +Ni, R., Lin, Z., Wang, S., and Fanti, G. Mixture-of-linear-experts for long-term time series forecasting. In International Conference on Artificial Intelligence and Statistics, pp. 4672-4680. PMLR, 2024. +Nie, Y., Nguyen, N. H., Sinthong, P., and Kalagnanam, J. A time series is worth 64 words: Long-term forecasting with transformers. In The Eleventh International Conference on Learning Representations, 2023. +Qu, E., Wang, Y., Luo, X., He, W., Ren, K., and Li, D. Cnn kernels can be the best shapelets. In The Twelfth International Conference on Learning Representations, 2024. +Rakthanmanon, T. and Keogh, E. Fast shapelets: A scalable algorithm for discovering time series shapelets. In Proceedings of the 2013 SIAM International Conference on Data Mining, pp. 668-676. SIAM, 2013. +Riquelme, C., Puigcerver, J., Mustafa, B., Neumann, M., Jenatton, R., Susano Pinto, A., Keysers, D., and Houlsby, N. Scaling vision with sparse mixture of experts. Advances in Neural Information Processing Systems, 34: 8583-8595, 2021. +Shazeer, N., Mirhoseini, A., Maziarz, K., Davis, A., Le, Q., Hinton, G., and Dean, J. Outrageously large neural networks: The sparsely-gated mixture-of-experts layer. In International Conference on Learning Representations, 2017. + +Shi, X., Wang, S., Nie, Y., Li, D., Ye, Z., Wen, Q., and Jin, M. Time-moe: Billion-scale time series foundation models with mixture of experts. In The Twelfth International Conference on Learning Representations, 2025. +Vail, D. and Veloso, M. Learning from accelerometer data on a legged robot. IFAC Proceedings Volumes, 37(8): 822-827, 2004. +Van der Maaten, L. and Hinton, G. Visualizing data using t-sne. Journal of machine learning research, 9(11), 2008. +Wang, Y., Huang, N., Li, T., Yan, Y., and Zhang, X. Medformer: A multi-granularity patching transformer for medical time-series classification. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. +Wang, Z., Yan, W., and Oates, T. Time series classification from scratch with deep neural networks: A strong baseline. In 2017 International joint conference on neural networks (IJCNN), pp. 1578-1585, 2017. +Wen, Y., Ma, T., Weng, T.-W., Nguyen, L. M., and Julius, A. A. Abstracted shapes as tokens-a generalizable and interpretable model for time-series classification. In The Thirty-eighth Annual Conference on Neural Information Processing Systems, 2024. +Wen, Y., Ma, T., Luss, R., Bhattacharjya, D., Fokoue, A., and Julius, A. A. Shedding light on time series classification using interpretability gated networks. In The Thirteenth International Conference on Learning Representations, 2025. +Wu, H., Hu, T., Liu, Y., Zhou, H., Wang, J., and Long, M. Timesnet: Temporal 2d-variation modeling for general time series analysis. In The Eleventh International Conference on Learning Representations, 2023a. +Wu, H., Hu, T., Liu, Y., Zhou, H., Wang, J., and Long, M. Timesnet: Temporal 2d-variation modeling for general time series analysis. In The Eleventh International Conference on Learning Representations, 2023b. +Wu, Y., Meng, X., Hu, H., Zhang, J., Dong, Y., and Lu, D. Affirm: Interactive mamba with adaptive fourier filters for long-term time series forecasting. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 39, pp. 21599-21607, 2025. +Ye, L. and Keogh, E. Time series shapelets: a new primitive for data mining. In Proceedings of the 15th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 947-956, 2009. +Yue, Z., Wang, Y., Duan, J., Yang, T., Huang, C., Tong, Y., and Xu, B. Ts2vec: Towards universal representation of + +time series. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pp. 8980-8987, 2022. +Zeevi, A., Meir, R., and Adler, R. Time series prediction using mixtures of experts. Advances in neural information processing systems, 9, 1996. +Zerveas, G., Jayaraman, S., Patel, D., Bhamidipaty, A., and Eickhoff, C. A transformer-based framework for multivariate time series representation learning. In Proceedings of the 27th ACM SIGKDD conference on knowledge discovery & data mining, pp. 2114-2124, 2021. +Zhang, K., Wen, Q., Zhang, C., Cai, R., Jin, M., Liu, Y., Zhang, J. Y., Liang, Y., Pang, G., Song, D., et al. Self-supervised learning for time series analysis: Taxonomy, progress, and prospects. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2024. +Zhou, T., Niu, P., Sun, L., Jin, R., et al. One fits all: Power general time series analysis by pretrained lm. Advances in neural information processing systems, 36:43322-43355, 2023. +Zhou, Y., Lei, T., Liu, H., Du, N., Huang, Y., Zhao, V., Dai, A. M., Le, Q. V., Laudon, J., et al. Mixture-of-experts with expert choice routing. Advances in Neural Information Processing Systems, 35:7103-7114, 2022. +Zoph, B., Bello, I., Kumar, S., Du, N., Huang, Y., Dean, J., Shazeer, N., and Fedus, W. St-moe: Designing stable and transferable sparse expert models. arXiv preprint arXiv:2202.08906, 2022. + +# A. Experimental Setup + +# A.1. Datasets + +In this study, we employ the UCR time series archive (Dau et al., 2019), a widely recognized benchmark for time series classification tasks (Ismail Fawaz et al., 2019; Middlehurst et al., 2024), to systematically evaluate the effectiveness of the proposed method. This archive encompasses datasets from diverse real-world domains, including human activity recognition, medical diagnostics, and intelligent transportation systems. The UCR archive consists of 128 distinct time series datasets. + +As shown in Table 8, many datasets in the UCR archive have a notably greater number of test samples than training samples, such as the CBF, DiatomSizeReduction, ECGFiveDays, MoteStrain, and TwoLeadECG time series datasets. Moreover, the original UCR time series datasets lack a specific validation set. The limited amount of training samples and the lack of a validation set present challenges in fairly comparing various deep learning-based time series classification methods. + +Following the experimental settings outlined in (Ma et al., 2024) and the recommendations of (Dau et al., 2019), we integrate the raw training and test sets and employ a five-fold cross-validation strategy to partition the dataset into training, validation, and test sets in a 3:1:1 ratio. Consistent with the approach in (Ma et al., 2024), each fold is sequentially designated as the test set, while the remaining four folds are randomly divided into training and validation sets in a 3:1 ratio. This cross-validation procedure ensures that each time series sample in the dataset is utilized as a test sample at once, thereby providing a comprehensive evaluation of classifier performance. Consequently, the specific indexing of samples during cross-validation does not substantially influence the final classification results, as each sample contributes to assessing the model's performance. + +# A.2. Baselines + +We conduct a comparative analysis of SoftShape against 19 baseline methods. Notably, nine of these baseline deep learning methods are derived from the experimental setting presented in (Ma et al., 2024), including FCN, T-Loss, SelfTime, TS-TCC, TST, TS2Vec, TimesNet, PatchTST, and GPT4TS. While Ma et al. (2024) review a broad range of techniques for time series pre-training, its experimental design for the UCR 128 time series datasets was specifically structured to evaluate the strengths and limitations of these nine deep learning models in the context of supervised time series classification. Therefore, we adopt these nine deep learning methods as baseline models for our experimental analysis, as described below: + +- $\mathbf{FCN}^1$ (Wang et al., 2017) employs a three-layer one-dimensional fully convolutional network along with a one-layer global average pooling layer for time series classification. +- T-Loss $^2$ (Franceschi et al., 2019) utilizes temporal convolutional networks as its foundation and presents an innovative triplet loss for learning representations of time series in the time series classification task. +- SelfTime $^3$ (Fan et al., 2020) is a framework for time series representation learning that explores both inter-sample and intra-temporal relationships for time series classification tasks. +- TS-TCC $^4$ (Eldele et al., 2021) is a framework for learning time series representations through temporal and contextual contrasting for classification tasks. +- TST5 (Zerveas et al., 2021) is a framework for multivariate time series representation learning based on the Transformer architecture for classification tasks. +- TS2Vec $^6$ (Yue et al., 2022) is a general framework for time series representation learning across various semantic levels, aimed at tasks such as time series classification, forecasting, and anomaly detection. In the context of the time series classification task, the authors utilized temporal convolutional networks (TCN) as the foundational framework, leveraging the low-dimensional feature representation derived from TCN as input for a support vector machine classifier utilizing a radial basis function kernel for the classification process. + +Table 8: Details of the UCR 128 time series datasets. "Train" represents the count of samples within the raw training set. "Test" represents the count of samples within the raw test set. "Total" represents the overall count of samples within the time series dataset. "Class" indicates the number of classes present within each time series dataset. "Length" refers to the sequence length of the univariate time series within the corresponding dataset. The presence of "Vary" signifies that the dataset includes instances with missing values. + +
IDName# Train# Test# Total# Class# LengthIDName# Train# Test# Total# Class# Length
1ACSF110010020010146065ItalyPowerDemand6710291096224
2Adiac3903917813717666LargeKitchenAppliances3753757503720
3AllGestureWiimoteX300700100010Vary67Lightning260611212637
4AllGestureWiimoteY300700100010Vary68Lightning770731437319
5AllGestureWiimoteZ300700100010Vary69Mallat552345240081024
6ArrowHead36175211325170Meat60601203448
7Beef303060547071MedicalImages38176011411099
8BeetleFly202040251272MelbournePedestrian1194243936331024
9BirdChicken202040251273MiddlePhalanxOutlineAgeGroup400154554380
10BME30150180312874MiddlePhalanxOutlineCorrect600291891280
11Car6060120457775MiddlePhalanxTW399154553680
12CBF30900930312876MixedShapesRegularTrain5002425292551024
13Chinatown2034336322477MixedShapesSmallTrain1002425252551024
14ChlorineConcentration46738404307316678MoteStrain2012521272284
15CinCECGTorso40138014204163979NonInvasiveFetalECGThorax118001965376542750
16Coffee282856228680NonInvasiveFetalECGThorax218001965376542750
17Computers250250500272081OliveOil3030604570
18CricketX3903907801230082OSULeaf2002424426427
19CricketY3903907801230083PhalangesOutlinesCorrect18008582658280
20CricketZ3903907801230084Phoneme21418962110391024
21Crop72001680024000244685PickupGestureWiimoteZ505010010Vary
22DiatomSizeReduction16306322434586PigAirwayPressure104208312522000
23DistalPhalanxOutlineAgeGroup40013953938087PigArtPressure104208312522000
24DistalPhalanxOutlineCorrect60027687628088PigCVP104208312522000
25DistalPhalanxTW40013953968089PLAID537537107411Vary
26DodgerLoopDay7880158728890Plane1051052107144
27DodgerLoopGame20138158228891PowerCons1801803602144
28DodgerLoopWeekend20138158228892ProximalPhalanxOutlineAgeGroup400205605380
29Earthquakes322139461251293ProximalPhalanxOutlineCorrect600291891280
30ECG20010010020029694ProximalPhalanxTW400205605680
31ECG500050045005000514095RefrigerationDevices3753757503720
32ECGFiveDays23861884213696Rock20507042844
33ElectricDevices892677111663779697ScreenType3753757503720
34EOGHorizontalSignal36236272412125098SemgHandGenderCh230060090021500
35EOGVerticalSignal36236272412125099SemgHandMovementCh245045090061500
36EthanolLevel504500100441751100SemgHandSubjectCh245045090051500
37FaceAll5601690225014131101ShakeGestureWiimoteZ505010010Vary
38FaceFour24881124350102ShapeletSim201802002500
39FacesUCR2002050225014131103ShapesAll600600120060512
40FiftyWords45045590550270104SmallKitchenAppliances3753757503720
41Fish1751753507463105SmoothSubspace150150300315
42FordA3601132049212500106SonyAIBORobotSurface120601621270
43FordB363681044462500107SonyAIBORobotSurface227953980265
44FreezerRegularTrain150285030002301108StarLightCurves10008236923631024
45FreezerSmallTrain28285028782301109Strawberry6133709832235
46Fungi1818620418201110SwedishLeaf500625112515128
47GestureMidAirD120813033826Vary111Symbols2599510206398
48GestureMidAirD220813033826Vary112SyntheticControl300300600660
49GestureMidAirD320813033826Vary113ToeSegmentation1402282682277
50GesturePebbleZ11321723046Vary114ToeSegmentation2361301662343
51GesturePebbleZ21461583046Vary115Trace1001002004275
52GunPoint501502002150116TwoLeadECG2311391162282
53GunPointAgeSpan1353164512150117TwoPatterns1000400050004128
54GunPointMaleVersusFemale1353164512150118UMD361441803150
55GunPointOldVersusYoung1363154512150119UWaveGestureLibraryAll896358244788945
56Ham1091052142431120UWaveGestureLibraryX896358244788315
57HandOutlines1000370137022709121UWaveGestureLibraryY896358244788315
58Haptics15530846351092122UWaveGestureLibraryZ896358244788315
59Herring64641282512123Wafer1000616471642152
60HouseTwenty4011915922000124Wine57541112234
61InlineSkate10055065071882125WordSynonyms26763890525270
62InsectEPGRegularTrain622493113601126Worms181772585900
63InsectEPGSmallTrain172492663601127WormsTwoClass181772582900
64InsectWingbeatSound2201980220011256128Yoga300300033002426
+ +- TimesNet7 (Wu et al., 2023b) employs TimesBlock to identify multiple periods and capture temporal 2D variations from transformed 2D tensors using a parameter-efficient inception block for time series modeling. + +- PatchTST $^{8}$ (Nie et al., 2023) segment time series into patches while assuming that channels are independent for multivariate time series forecasting. Considering that GPT4TS (Zhou et al., 2023) has utilised similar patch and channel-independent strategies for time series modeling, we employ only the patch strategy and the channel-independent approach by integrating a transformer for time series classification. +- GPT4TS9 (Zhou et al., 2023) is a unified framework for time-series modeling that utilises pre-trained large language models. Specifically, GPT4TS adopts the same patch and channel-independent strategies used in PatchTST (Nie et al., 2023) for time series classification tasks. + +Furthermore, Middlehurst et al. (2024) conduct a comprehensive analysis of the advantages and limitations of eight categories of time series classification methods: distance-based, feature-based, interval-based, shapelet-based, dictionary-based, convolution-based, deep learning-based, and hybrid-based approaches. However, in their experimental evaluation, Middlehurst et al. (2024) utilize only a training set and a test set, without incorporating a validation set for deep learning-based methods performance assessment. + +Specifically, for the selected deep learning-based time series classification methods, Middlehurst et al. (2024) employ the training epoch with the lowest training loss to generate test results. This approach increases the risk of overfitting, as the deep learning model is optimized solely on training data, potentially compromising its generalization capability. Nonetheless, the findings of (Middlehurst et al., 2024) indicate that the deep learning-based InceptionTime (Ismail Fawaz et al., 2020) model achieves superior classification performance. Additionally, experimental results (Middlehurst et al., 2024) demonstrate that HIVE-COTE version 2 (HC2) (Middlehurst et al., 2021), which is a hybrid-based method, MultiROCKET-Hydra (MR-H) (Dempster et al., 2023), a convolution-based method, and RDST, a shapelet-based approach, exhibit strong classification performance. + +Given that HC2 is computationally intensive, we select the deep learning-based InceptionTime model along with two non-deep learning methods, MR-H and RDST, as baseline models for our study. The details of these baseline methods are outlined as follows: + +- Random Dilated Shapelet Transform (RDST) $^{10}$ (Guillaume et al., 2022) is a shapelet-based algorithm that adopts many of the techniques of randomly parameterised convolutional kernels to obtain shapelet features for time series classification. +- MultiROCKET-Hydra $(\mathrm{MR - H})^{11}$ (Dempster et al., 2023) is a model that combines dictionary-based and convolution-based models, using competing convolutional kernels and combining key aspects of both Rocket and conventional dictionary methods for time series classification. +- InceptionTime $^{12}$ (Ismail Fawaz et al., 2020) is a deep convolutional neural network-based model for time series classification, drawing inspiration from the Inception-v4 architecture. + +In recent years, scholars have introduced deep learning models based on convolutional neural networks, transformer architectures, and foundation models for time series classification tasks. For our experimental analysis, we have selected seven recently published methods as baseline models, which are detailed as follows: + +- LightTS $^{13}$ (Campos et al., 2023) employs model distillation to reduce runtime by ensembling multiple classifiers. It consists of two stages: a teacher phase, where at least ten models (e.g., InceptionTime) are trained, and a student phase that distills their knowledge. Due to the time-intensive nature of the teacher phase, evaluation is limited to 18 selected UCR datasets. Moreover, since LightTS (student) underperforms compared to LightTS (teacher), only the latter's results are reported. + +- ShapeConv $^{14}$ (Qu et al., 2024) introduces an interpretable convolutional layer for time series analysis, where the convolutional kernels are designed to act as shapelets. This convolutional design is inspired by the Shapelet distance, a widely adopted approach in time series classification. +- Shapeformer $^{15}$ (Le et al., 2024) is a Shapelet Transformer that combines class-specific and generic transformer modules to effectively capture both types of features. Due to the time-consuming shapelet discovery process in Shapeformer, we evaluate its performance on 18 selected UCR datasets +- ModernTCN $^{16}$ (Luo & Wang, 2024) is a pure convolution architecture for time series modeling, which utilizes depthwise convolution and grouped pointwise convolution to learn cross-variable and cross-feature information in a decoupled way. +- TSLANet $^{17}$ (Eldele et al., 2024) is a time series lightweight adaptive network, as a universal convolutional model by combining an adaptive spectral block and interactive convolution block using patch-based technologies for time series modeling. +- $\mathrm{UniTS^{18}}$ (Gao et al., 2024) is a unified pre-trained foundation model for time series, designed to handle various forecasting and classification tasks across diverse datasets. Following the experiments in Table 14 of UniTS, we use the UNITS-SUP×64 model as the baseline. +- Medformer $^{19}$ (Wang et al., 2024) is a transformer model designed for medical time series classification that utilizes cross-channel multi-granularity patching, and intra-inter granularity self-attention within and among granularities. + +# A.3. Implementation Details + +We employ the Adam optimizer with a learning rate of 0.001 and a maximum training epoch of 500. Also, for all baseline method training, we implement a consistent early stopping strategy based on validation set loss values (Ma et al., 2024). For all UCR datasets, we apply a uniform normalization strategy to standardize each time series within the dataset (Ismail Fawaz et al., 2019). For datasets containing missing values, we use the mean of observed values at each specific timestamp across all samples in the training set to impute missing values at corresponding timestamps within the time series samples (Ma et al., 2024). Following (Wang et al., 2017), we set the batch size for model training as $\min(x_{train}.shape[0]/10, 16)$ , where $x_{train}.$ shape[0] represents the number of time series samples in the training set, and $\min(\cdot)$ denotes the function that selects the minimum value. + +From Equation (1) in the main text, the length of time series shapelets, $m$ , satisfies $2 \leq m \leq T - 1$ . Directly using subsequences of varying lengths as model inputs significantly increases computational complexity and requires additional preprocessing to standardize input dimensions. To address this, Grabocka et al. (2014); Qu et al. (2024) employ a validation set to select a fixed-length $m$ of subsequence for shapelet learning, where $m$ is defined as $\gamma T$ , with possible values $\{0.1T, 0.2T, \dots, 0.8T\}$ . This approach reduces the total number of candidate subsequences in Equation (1), thereby lowering computational costs. For patch-based time series classification (Nie et al., 2023; Wang et al., 2024), patch lengths are typically chosen from $\{4, 8, 16, 24, 32, 48, 64\}$ . Our preliminary experiments indicate that setting shape length $m$ within this range yields better classification performance. However, due to variations in sequence lengths across UCR 128 datasets, a fixed-length setting may be problematic. For datasets with long sequences, setting $m = 4$ results in excessive candidate subsequences, while for short sequences, setting $m = 64$ may eliminate viable subsequences. To balance these issues, we select $m$ from $\{4, 8, 16, 24, 32, 48, 64, 0.1T, 0.8T\}$ using the validation set. + +Additionally, we set the model depth $L$ to 2. The number of activated experts $k$ used for the Mixture of Experts (MoE) router in Equation (6) is set to 1, while the total number of experts $\hat{C}$ in MoE is defined as the total number of classes in each dataset. The parameter $\lambda$ , which regulates the learning progression of the loss term in Equation (15), is set to 0.001. The sliding window size $q$ for extracting subsequences is set to 4. The $d_{attn}$ in Equation (3) is set to 8 (Early et al., 2024). The rate $\eta$ in Equation (5) is set to $50\%$ . To mitigate the issue of inaccurate attention score evaluations for most shapes + +during the initial training phase, the model is warm-up trained for 150 epochs before initiating the soft shape sparsification process. For each UCR time series, we calculate the average test accuracy using five-fold test sets from a single seed. To ensure a fair comparison, we maintain a consistent random seed, as well as standardized dataset preprocessing and partitioning for all baseline methods. For SoftShape and deep learning-based baselines, the same optimizer and learning rate are applied during training, selecting the model with the lowest validation loss for test evaluation. Non-deep learning methods are trained on the training set and evaluated on the test set. Furthermore, for deep learning baselines, except LightTS (Campos et al., 2023), a single model instance is employed without ensembling multiple models initialized differently during both training and evaluation. Like (Ismail Fawaz et al., 2019; Ma et al., 2024), we evaluate performance based on the classification accuracy of the test set. Each experiment is conducted five times with five different random seeds, utilizing the PyTorch 1.12.1 platform and four NVIDIA GeForce RTX 3090 GPUs. The source code for SoftShape is available at https://github.com/qianlima-lab/SoftShape. + +# Algorithm 1 The proposed SoftShape model. + +Input: shape embedding layer $w_{shape}$ , attention head $w_{attn}$ , soft shape learning block $w_{block}$ , a classifier $w_{c}$ , sparse ratio $\eta$ . +Output: $w_{shape}, w_{attn}, w_{block}$ , and $w_{c}$ . + +1: Step one: Obtain all shape embeddings $\hat{S}_n^m$ through $w_{shape}$ via Eq. (2); Using a norm layer to process $\hat{S}_n^m$ , denoted as $\text{norm}(\hat{S}_n^m)$ ; +2: Step two: Soft shape sparsification using norm $(\hat{S}_n^m)$ as inputs; Calculate the attention score for all shapes via the $w_{attn}$ ; Convert scores in the top $\eta$ proportion of all shapes into soft shape embeddings via Eq. (4); Fuse those with scores below the top $\eta$ proportion into a single shape embedding via Eq. (5); Combine soft shape embeddings and the fused single shape embedding, denoted as $\widetilde{S}_n^m$ ; +3: Step three: Intra-Shape and Inter-Shape Learning through $w_{block}$ using $\widetilde{S}_n^m$ as inputs; Using a norm layer to process $\widetilde{S}_n^m$ , denoted as $\text{norm}(\widetilde{S}_n^m)$ ; Obtain Intra-Shape Embedings via $w_{block}$ using Eq. (8), denoted as $\widetilde{S}_{\text{Intra}}$ ; Obtain Inter-Shape Embedings via $w_{block}$ using a shared expert, denoted as $\widetilde{S}_{\text{Inter}}$ ; Combine $\widetilde{S}_n^m$ , $\widetilde{S}_{\text{Intra}}$ , and $\widetilde{S}_{\text{Inter}}$ in a residual way, denoted as $\widetilde{S}_{\text{out}} = \widetilde{S}_n^m + \widetilde{S}_{\text{Intra}} + \widetilde{S}_{\text{Inter}}$ ; +4: Step four: Set model depth to L for training by rerunning Step two and Step three $L$ times using $\tilde{S}_{out}$ as inputs, denoted the end outputs as $O_{n}^{m}$ ; +5: Step five: Classification training using $O_{n}^{m}$ as inputs; Update $w_{shape}, w_{attn}, w_{block}, w_{c}$ via training objective $\mathcal{L}_{total}$ using Eq. (15); + +# B. Details of Experimental Results + +# B.1. Main Results + +The test classification accuracy results of SoftShape and 17 baseline methods on the UCR 128 time series dataset are presented in Table 9. Specifically, the test classification accuracy results of nine methods, including FCN, T-Loss, SelfTime, TS-TCC, TST, TS2Vec, TimesNet, PatchTST, and GPT4TS, are obtained from (Ma et al., 2024). Figure 6 illustrates the critical difference diagram and significance analysis results for SoftShape and the 17 baseline methods on the UCR 128 time series dataset. Additionally, Table 10 presents the detailed test classification accuracies of LightTS, Shapeformer, and SoftShape on the selected 18 UCR datasets. + +Table 9: The detailed test classification accuracy comparisons on 128 UCR time series datasets. Among these, Incep refers to the InceptionTime method, and MoTCN refers to the ModernTCN method. The best results are in bold. + +
IDDatasetFCNT-LossSelftimeTS-TCCTSTTS2VecTimesNetPatchTSTGPT4TSRDSTMR-HIncepShapeConvMoTCNTSLANetUniTSMedformerSoftShape
1ACSF10.62500.80500.72500.57000.70500.88000.60000.76000.62000.84000.84500.90500.60000.45000.87000.83000.83500.9100
2Adiac0.64920.78110.73220.40030.73630.80660.80820.83580.80690.78480.85270.93540.56350.85800.88370.65960.83640.9374
3AllGestureWX.0.71100.71700.64610.72010.52800.78200.51200.57300.72200.79300.80500.85400.31700.72600.89700.85300.61300.8980
4AllGestureWY.0.67400.81100.71700.76150.38500.84000.58200.67300.78000.83600.87700.91400.29900.74700.91800.86900.82500.9110
5AllGestureWZ.0.72000.74700.64850.65670.47800.77300.66200.58900.73000.78500.81000.89200.30700.65400.90100.84600.72500.8850
6ArrowHead0.89580.87700.81550.82000.87220.89080.78210.70780.83480.93820.94300.92880.66380.81520.96720.94330.94340.9435
7Beef0.82500.87500.51670.63330.66670.68330.80000.41670.93330.83330.85000.78330.68330.85000.75000.71670.83330.8667
8BeetleFly0.92500.97500.80000.62500.67500.92500.70000.85000.72500.90000.92500.85000.92500.75000.97500.87500.90000.9750
9BirdChicken0.78330.98330.90000.67500.85000.97500.82500.85000.75000.90000.90000.95000.95000.82500.87500.82500.82500.9000
10BME0.60000.53330.97220.98890.97220.99440.97780.95000.96111.00001.00001.00000.67220.98331.00000.98891.00000.9944
+ +Learning Soft Sparse Shapes for Efficient Time-Series Classification + +
IDDatasetFCNT-LossSelftimeTS-TCCTSTTS2VecTimesNetPatchTSTGPT4TSRDSTMR-HIncepShapeConvMoTCNTSLANetUnitTSMedformerSoftShape
11Car1.00001.00000.65830.71670.75830.88330.84170.90830.90000.95000.95830.95830.77500.82500.95000.90830.84170.9583
12CBF0.94170.82500.99360.99670.99461.00001.00001.00000.99781.00001.00001.00000.99891.00001.00000.99781.00001.0000
13Chinatown0.97530.98070.96690.95070.96990.97260.98630.98360.98630.96990.98080.98360.91230.92330.98630.97810.98630.9890
14ChlorineCon.0.99840.99880.61160.84240.99740.99980.99930.99950.99980.98860.99540.99930.69730.99910.99880.99880.64270.9988
15CinCECGTorso0.99860.99440.98770.99950.99930.99720.99301.00000.99301.00001.00000.99230.97890.99931.00000.99580.99861.0000
16Coffee1.00000.98180.92730.94550.87581.00001.00001.00001.00001.00001.00001.00000.96671.00001.00001.00000.98181.0000
17Computers0.88000.71400.79200.60800.68800.69400.81200.83800.80800.81800.85400.84200.66600.65400.89200.81200.82800.8160
18CricketX0.90640.77950.73160.73270.70260.83210.79740.78210.79100.86280.86280.90130.81790.72310.92050.89230.83970.9321
19CricketY0.90000.74870.69040.71610.69620.82560.78080.78210.80260.84360.84870.82930.76920.75130.89870.88080.85000.9154
20CricketZ0.88330.78330.74110.73840.69360.84870.79620.79230.80260.86920.85260.87690.77440.73850.90640.88590.85640.9372
21Crop0.13120.70630.66340.78010.77090.74480.85030.11930.87640.76750.80570.85750.18330.09220.57810.04170.30430.8765
22DiatomSizeRc0.99690.99690.97230.97831.00000.99690.99381.00000.99071.00001.00000.99690.95310.98770.99690.97190.99381.0000
23DistalPhalanxOut.0.90910.82740.79590.82000.84040.81250.85900.87790.88900.83110.83290.85100.76620.80890.93330.80700.83120.9518
24DistalPhalanxOut.0.89170.84710.78950.76460.82540.81850.88600.90090.89290.83230.84480.88020.79800.77520.90180.73630.65290.9054
25DistalPhalanxTW0.84230.74210.75140.77550.75510.77920.84490.84850.82630.78660.77700.85000.74210.79790.87960.77180.83490.9037
26DodgerLoopDay0.74860.48190.47420.58850.53770.63910.71070.66940.74030.62660.53150.76810.78710.55280.82440.87500.86210.8623
27DodgerLoopGame0.81670.89210.82820.88570.88580.95630.84480.88720.90010.91790.97150.96210.93730.79660.95630.84840.92420.9433
28DodgerLoopWeek.0.98120.96770.96810.97420.96790.98120.96880.94920.91650.97460.98730.98060.99370.99370.98730.98061.00001.0000
29Earthquakes0.73760.74170.79830.75050.79610.79830.91360.90520.79080.78990.79390.85260.73330.92220.86131.00001.00001.0000
30ECG2000.84820.79830.79000.79500.86000.88000.91000.87630.89510.92000.92500.92500.90500.94500.85500.91801.00001.0000
31ECG50000.93500.85000.93170.95250.95020.95280.97080.93640.97460.95520.95660.97500.94320.55100.97600.96220.94601.0000
32ECGFiveDays0.92580.94780.98730.99721.00001.00001.00001.00001.00001.00001.00001.00000.96361.00001.00001.00001.0000
33ElectricDevices0.65190.65470.71730.86390.87580.88480.86100.84830.86100.90240.90490.94590.72590.35000.89110.79210.76651.0000
34EOGHorizontalS1.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00000.98141.0000
35EOGVerticalS0.67310.86730.67740.68160.68460.65190.63690.80130.78480.73530.78480.81740.47640.69220.89650.86201.0000
36EthanolLevel0.94620.97210.95520.95450.95221.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.00001.0000
37FaceAll0.94620.97210.95520.95140.94731.01341.07511.11731.11731.11731.11731.11731.11731.11731.11731.11731.1173
38FaceFour0.95570.92810.88300.93790.94541.11731.16451.16451.16451.16451.16451.16451.16451.16451.16451.16451.1645
39FacesUCR0.96970.97210.95540.95441.11731.16451.16451.16451.16451.16451.16451.16451.16451.16451.16451.16451.1645
40FiftyWords0.50720.80880.67050.72680.73181.12221.18221.22761.22761.22761.22761.22761.22761.22761.22761.22761.2276
41GunPoint1.00001.00001.85141.86281.83431.83431.83431.83431.83431.83431.83431.83431.83431.83431.83431.83431.8343
42FordA0.93120.93050.87710.90871.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.1123
43FordB1.00001.00001.85451.86501.86531.91241.92461.93771.93771.93771.93771.93771.93771.93771.93771.93771.9377
44FreezerRegular0.97900.98800.99740.99691.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.1123
45FreezerSmall0.93590.96650.99751.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.11231.1123
46Fungi0.91181.00001.03161.95571.95571.98331.83371.72761.72641.74521.76321.77860.68130.75291.41451.41451.4145
47Herring1.65940.59191.70671.67121.64181.67991.66131.66491.65441.64491.65831.67660.68130.74741.70741.74891.8640
48GustMidAirD20.58600.49730.55040.48530.54750.52700.54490.56920.54100.58590.58580.76660.54810.63080.76400.72870.7797
49GustMidAirD30.38190.31080.36640.31370.34620.33150.45590.49620.52820.41440.42910.51340.53640.53990.65770.63430.6924
50GustPebbleZ10.95410.64200.76430.77610.76540.95410.83140.91580.97690.97330.98360.82890.91770.97770.95410.95720.9572
51GustPebbleZ20.93430.66140.88170.81440.85470.98730.88580.93640.96650.96360.98360.82890.81770.94750.95410.95720.9572
52GunPoint1.00001.00001.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.2564
53GunPointSmall1.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.2564(1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 1) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2)) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) 2) +53FreeportSmall1.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.25641.2564
54FreeportSmall1.2564
55FreeportLarge1.2564
56FreeportLargeSmall1.2564
57FreeportSmallSmall1.2564
58FreeportSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmall SmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmallSmall small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small small size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size size rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate rate age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age ageage age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age AgeAge Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age Age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age age year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year year years y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y yy y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y.y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYyyYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYyy YY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY YY YY YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYyy YY yy YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YYYY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY YY BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BBBB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BBbb BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB bb BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BB BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BABA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BBA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BABABA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BABa BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA Ba BA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BHA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BAA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BCA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BGA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BPA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BNA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BBA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKA BKB K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K KK K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k kk k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k k K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K.K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K K F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f f d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D D d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d
+ +
IDDatasetFCNT-LossSelftimeTS-TCCTSTTS2VecTimesNetPatchTSTGPT4TSRDSTMR-HIncepShapeConvMoTCNTSLANetUniTSMedformerSoftShape
101ShakeWiimoteZ.0.92000.91000.89000.85000.68000.93000.59000.69000.72000.92000.93000.96000.87000.74000.95000.84000.83000.9800
102ShapeletSim0.97000.92000.94500.60500.56000.98500.55000.91500.63001.00001.00001.00000.83000.64501.00000.98000.88500.9950
103ShapesAll0.72670.89250.88350.77770.72920.91330.83250.88330.85000.94170.95330.95830.82250.89500.90830.91920.86170.9575
104SmallAppliances.0.79870.72270.82560.70950.57470.73470.78400.63870.72130.81330.83330.90080.54130.65730.90400.78400.81730.9053
105SmoothSubspace0.94670.92330.93670.94330.98000.96330.97670.96330.91330.99000.98330.98000.94330.85670.95670.94000.97330.9867
106SonyAlSurface1.0.99840.99200.97260.97750.98230.99520.99520.98880.98880.99841.00000.99840.96460.99360.99040.98880.98230.9936
107SonyAlSurface2.0.99900.98780.93760.98490.98470.99490.99390.99390.99490.99800.99901.00000.89900.98470.99690.98670.98370.9980
108StarLightCurves0.98030.97830.97930.97380.97340.98010.96160.99120.98180.98270.98380.99030.96860.98920.99100.96750.96940.9905
109Strawberry0.97560.96140.94260.94140.97350.96850.97660.96240.97360.97860.97970.97970.87900.95420.98170.95320.90540.9868
110SwedishLeaf0.99290.94040.91580.94230.92530.95020.94490.97780.96710.97070.97510.98490.92500.96180.98930.97600.96890.9867
111Symbols0.99610.98240.97980.97330.97650.98630.96180.99220.96670.99510.99510.99610.96860.97650.98330.94710.97450.9941
112SyntheticControl0.97000.98830.96830.99500.97670.99830.97670.97000.97170.99330.99331.00000.97830.94000.99670.99330.99000.9967
113ToeSegmentation10.96640.95510.91430.91810.69030.95880.85140.92190.88460.97760.97760.98120.92930.67610.97780.75000.87710.9852
114ToeSegmentation20.92820.92190.92830.82500.84350.95170.83160.85100.81430.96380.95170.97040.97060.85610.95220.90450.85540.9882
115Trace1.00001.00000.99500.91500.97001.00000.94001.00000.89001.00001.00001.00001.00000.98001.00000.81001.00001.0000
116TwoLeadECG1.00000.99830.99320.99650.99140.99910.99830.99910.99480.99911.00001.00000.86150.99830.99910.99910.99741.0000
117TwoPatterns0.94541.00000.95130.99900.99941.00000.99800.99900.99621.00001.00001.00000.99441.00000.99980.99940.99861.0000
118UMD0.87780.99440.93890.96110.97780.99440.98331.00000.97781.00000.99441.00000.90561.00000.99440.98331.00000.9944
119UWaveGestureAll.0.92450.95180.85950.97500.96020.96520.95040.99130.97080.98820.98970.98120.92520.98880.99130.97950.97570.9900
120UWaveGestureX.0.86650.84570.66800.83850.80910.85130.89240.92140.90020.88030.90150.91960.79770.92160.94130.94580.92190.9406
121UWaveGestureY.0.79060.78870.53420.75730.73000.78740.84550.89550.83990.81090.84810.88500.69360.88280.91940.91000.87770.9109
122UWaveGestureZ.0.84840.80210.60760.77620.47900.80240.86690.90060.85350.83140.85840.88120.76930.87810.92190.91430.87850.9170
123Wafer1.00000.99890.95870.99820.99900.99860.99920.99920.99921.00001.00000.99990.97850.99930.99990.99940.99711.0000
124Wire0.54110.95530.67430.52210.58540.96480.82890.51350.85610.95530.96440.75930.54900.50430.74940.49530.51300.8842
125WordSynonyms0.59670.80220.57180.74440.70830.79890.84420.86900.78230.85750.87400.93150.82540.84310.89280.87620.84860.9175
126Worms0.79060.68210.68600.54230.41480.72100.74460.80720.70970.70510.73570.81810.58560.52360.84290.78000.78760.8453
127WormsTwoClass0.80250.76340.75570.68980.62400.77160.78330.90370.82210.77150.77530.79830.67100.69060.86920.84140.83760.8802
128Yoga0.97180.96610.76990.92070.94970.97090.95390.97390.94760.98420.99060.99330.76610.98450.96940.89700.97180.9830
Avg.Acc0.82960.83250.80170.78070.77550.86910.83670.82650.85930.88970.89720.91810.76880.79380.92050.85020.85410.9334
Avg.Rank9.5311.1213.8013.9613.548.4310.139.569.346.415.514.0513.913.689.669.262.72
Win139019712623292959315753
+ +Table 10: The detailed test classification accuracy of LightTS, Shapeformer, and SoftShape on 18 UCR datasets. + +
DatasetLightTSShapeformerSoftShape (Ours)
ArrowHead0.94800.84390.9435
CBF1.00000.99781.0000
CricketX0.92820.65640.9321
DistalPhalanxOutlineAgeGroup0.86640.79210.9518
DistalPhalanxOutlineCorrect0.84600.81510.9054
ECG50000.96300.91660.9796
EOGVerticalSignal0.77370.56350.9007
EthanolLevel0.90440.72610.9204
Fish0.98000.91140.9771
GunPoint0.98500.99000.9900
InsectWingbeatSound0.83000.65860.8882
ItalyPowerDemand0.97080.96900.9891
MelbournePedestrian0.98790.71340.9573
MiddlePhalanxTW0.76730.62930.8376
MixedShapesRegularTrain0.97950.80550.9757
OSULeaf0.95230.76490.9504
Trace1.00001.00001.0000
WordSynonyms0.88920.67730.9161
Avg. Acc0.92070.80170.9453
Avg. Rank1.672.781.28
Win7213
P-value8.91E-039.80E-06-
+ +# B.2. Ablation Study + +Table 11 presents the detailed test classification accuracy results for various ablation components of SoftShape across 128 UCR time series datasets. + +![](images/10d61d55bcc1ffdc670fe3917f93daa3e6b8c109849a5060a8446c0f71fff27e.jpg) +Figure 6: The critical diagram (CD) (Demšar, 2006) illustrates statistical testing comparisons between SoftShape and baseline methods on the 128 UCR time series datasets. A smaller CD value indicates better method performance. The absence of a connecting line between the two methods signifies a statistically significant performance difference. + +![](images/ea79e4bec947ccef944c3921cae2ff2f6a63f0a602bf5d1713f6352a3de5d7eb.jpg) + +![](images/4a242219f80d6e034c43f646382be57d5b737b525042e33309b5a8aba2048935.jpg) +(c) Time Series Regions + +![](images/007f1c32ac28cf81bafbd13d947e6acd31ef52d7a2286c1cba1c3a0de1b0d41c.jpg) +(b) Learning Score of Shapes + +![](images/fdaf0b8eeed6864b8db80b18f15723d437edf79d0331a7cb8749c6cdc9fd7347.jpg) +(d) Learning Score of Time Points + +![](images/6e1cc16e4fbd98956c8104a955cea612e3fb3dafbfdabb08b87b63ef73a3319f.jpg) +Figure 7: The MIL visualization on the Lightning2 dataset. + +![](images/680d5e1e6b2776fba5c17437972a6c2133a1bf46af8fce4b9eee85302744022b.jpg) +(b) Intra-Shape Embeddings + +![](images/eb77cb9dd94003ce5674663f3a1653f93a431ed0021743270011d6513e216b97.jpg) +(a) Input Shape Embeddings +(c) Inter-Shape Embeddings +Figure 8: The t-SNE visualization on the TwoPatterns dataset. + +![](images/39dd9956c59b1bf7d162551c65f036e87d22e23267c7f1a5a63f2c989bd86d8a.jpg) +(d) Output Shape Embeddings + +![](images/fdb474524451078bc2f7436828211e0eb44e431fc42500186d2407be87970dd5.jpg) + +![](images/d54468c7c266dcefc2b9cf0934fd26cf3cfa4b68bd1c9869e91970f42d46bd2c.jpg) + +![](images/832ee1122c1622cb34617fe6530cc12e1f9774035e488f1a707cbde3610a5739.jpg) +(a) Input Shape Embeddings +(c) Inter-Shape Embeddings + +![](images/2eeaa5f106286bdd1f4bab9bc4d8c38d9c57c4046d21aa5640d88aa4613359e0.jpg) +(b) Intra-Shape Embeddings +(d) Output Shape Embeddings + +![](images/3bfe0c4199d38ba3ece7f7c157e241f2048690332bd6467f2bf1e5d55f8161d9.jpg) +Figure 9: The t-SNE visualization on the Fiftywords dataset. +(a) Input Shape Embeddings + +![](images/c70732d702b89a34f42388df0139abd3dfb1cc9a82bf7996dcd3d3175aeedf13.jpg) +(b) Intra-Shape Embeddings + +![](images/96cd0f120bd18e95acf4a9f87baf1b113e1d3e4dfb4771827e21c4a7b6f6bf41.jpg) +(c) Inter-Shape Embeddings +Figure 10: The t-SNE visualization on the ECG200 dataset. + +![](images/12044d18db49ebe70a44a82fc3dc0937a2b61ba8eb2752afb7d20aaba65790d1.jpg) +(d) Output Shape Embeddings + +# B.3. Shape Sparsification and Learning Analysis + +Due to the considerable time requirements for conducting experimental evaluations on all 128 UCR time series datasets for some baselines and hyperparameter analysis, 18 datasets were chosen from the 128 UCR datasets based on four key criteria: the number of samples, the length of the sample sequences, the number of classes, and the relevance to various application scenarios. Specifically, these 18 datasets vary in sample size from 200 to 5000, in sequence length from 24 to 1751, and in classes from 2 to 25. Besides, the selected datasets cover diverse application areas, including handwritten font sequence recognition (e.g., the WordSynonyms dataset), human activity recognition (e.g., the CricketX dataset), and medical diagnosis + +Table 11: The detailed test classification accuracy of the ablation study on 128 UCR datasets. Among these, w/o II refers to the w/o Intra & Inter method. The best results are in bold. + +
IDDatasetSoftShapew/o Softw/o Intraw/o Interw/o IIwith LinearIDDatasetSoftShapew/o Softw/o Intraw/o Interw/o IIwith Linear
1ACSF10.91000.87000.81500.89000.87000.885067Lightning20.88570.91100.88190.90330.84500.9023
2Adiac0.93740.88100.92970.82740.80940.925968Lightning70.89660.93080.95170.89970.91010.8894
3AllGestureWX.0.89800.86800.89700.80400.58500.862069Mallat0.99881.00001.00000.99960.99920.9996
4AllGestureWY.0.91100.90300.90800.83600.62600.893070Meat0.99171.00000.99170.99170.99171.0000
5AllGestureWZ.0.88500.83500.87860.80800.59600.875071MedicalImages0.92130.92210.92040.91340.77830.9256
6ArrowHead0.94350.96720.97650.96270.92480.957772MelbournePedestrian0.95730.95420.95700.96520.84660.9521
7Beef0.86670.83330.85000.75000.80000.816773MiddleAgeGroup.0.87010.84300.91340.81790.77430.8304
8BeetleFly0.97501.00000.98000.87500.85000.925074MiddleCorrect.0.92040.92600.91500.85980.82390.9070
9BirdChicken0.90000.92500.87500.92500.92500.850075MiddlePhalanxTW0.83760.81790.86290.72030.67460.8305
10BME0.99441.00000.99440.99441.00000.994476MixedRegular.0.97570.97500.97130.96270.93500.9682
11Car0.95830.91670.94830.92500.93330.925077MixedSmall.0.97430.96950.97190.96710.94460.9695
12CBF1.00001.00000.99891.00000.99780.998978MoteStrain0.98430.98430.97140.98350.97640.9851
13Chinatown0.98900.98900.98080.98960.98080.986379NonInvasive1.0.97240.96760.97870.96250.95540.9625
14ChlorineCon.0.99880.99880.99910.99910.90250.999880NonInvasive2.0.97820.96650.96840.96360.95750.9604
15CinCECGTorso1.00001.00000.99930.99931.00000.999381OliveOil0.83330.81670.83330.81670.73330.8667
16Coffee1.00001.00001.00001.00001.00001.000082OSULeaf0.95040.92570.93020.86260.83100.9077
17Computers0.81600.81200.80400.85400.86400.824083PhalangesOutlines.0.93000.93120.91350.90220.79570.9105
18CricketX0.93210.90640.92230.90380.85380.934684Phoneme0.78440.65450.64560.62340.60510.6567
19CricketY0.91540.88080.90690.86670.79740.925685PickupGesture.0.90000.86000.89000.90000.81000.8200
20CricketZ0.93720.90130.91330.89230.81790.946786PigAirwayPressure0.64320.24460.56640.56250.56620.4963
21Crop0.87650.73420.74350.72360.59730.885687PigArtPressure0.99370.86220.99040.81200.69720.9745
22DiatomSizeRe.1.00001.00000.99380.99381.00000.993888PigCVP0.94580.79260.91720.67830.68800.8344
23DistalPhalanxOut.0.95180.94620.94070.89750.89610.946289PLAID0.61920.59220.60250.54570.48790.5383
24DistalPhalanxOut.0.90540.90770.88480.89370.86310.887190Plane1.00000.99520.99021.00000.99520.9952
25DistalPhalanxTW0.90370.90920.92030.88510.86280.929291PowerCons0.99440.99170.99020.99720.98060.9750
26DodgerLoopDay0.86230.86250.85000.86980.81830.843392ProximalAgeGroup.0.90910.91070.90220.88100.87440.9074
27DodgerLoopGame0.94330.93080.92600.88130.85560.926893ProximalCorrect.0.92940.95410.94730.84850.83510.9294
28DodgerLoopWeek.1.00001.00000.99170.99370.93100.993594ProximalPhalanxTW0.92730.88760.92070.85290.86120.8942
29Earthquakes0.89170.91350.89400.93310.91350.907095RefrigerationDevices0.80270.73470.79400.76530.74800.7720
30ECG2000.94750.94000.94000.96000.94500.905096Rock0.82860.85710.88570.87140.85710.8286
31ECG50000.97960.98100.98180.97200.95660.979697ScreenType0.70270.76930.77600.82530.78530.6933
32ECGFiveDays1.00001.00001.00001.00001.00001.000098SemgHandGenderCh20.97780.92110.94780.98110.92110.9456
33ElectricDevices0.92080.86750.87560.86510.74280.865499SemgMovementCh2.0.82560.78670.84890.83000.80220.8156
34EOGHorizontalS.0.90070.83860.87310.81090.76120.8275100SemgHandSubjectCh20.96330.96670.94330.96110.94890.9544
35EOGVerticalS.0.88140.84130.85650.72120.78610.7723101ShakeWimoteZ.0.98000.96000.97700.97000.91000.9800
36EthanolLevel0.92040.92430.88950.69930.77300.8446102ShapeletSim0.99501.00001.00000.93500.89001.0000
37FaceAll0.99780.99820.99080.99110.95380.9973103ShapesAll0.95750.91580.97600.93170.87000.9442
38FaceFour0.99091.00001.00001.00001.00001.0000104SmallAppliances.0.90530.89730.90670.88130.77470.8773
39FacesUCR0.99560.99690.98800.95070.98640.9259105SmoothSubspace0.98670.96330.98000.98670.93000.9800
40FiftyWords0.93590.89720.94140.93950.86410.9359106SonyAISurface1.0.99360.99200.99360.99680.98520.9936
41Fish0.97710.98000.98000.93140.93710.9571107SonyAISurface2.0.99800.98390.99090.99390.98470.9969
42FordA0.97720.97420.98110.92590.84170.9793108StarLightCurves0.99050.96750.96790.95630.99050.9656
43FordB0.97440.96830.97210.92400.86550.9696109Strawberry0.98680.97180.97560.97460.97050.9827
44FreezerRegular.0.99900.99900.99970.99730.98770.9990110SwedishLeaf0.98670.98130.98040.97780.94840.9858
45FreezerSmall.0.99900.99930.99970.99720.99200.9986111Symbols0.99410.99120.99220.98630.99020.9931
46Fungi1.00001.00001.00001.00001.00001.0000112SyntheticControl0.99670.99170.99050.99830.98670.9917
47GestureMidAirD10.86400.75500.85530.82870.81690.8201113ToeSegmentation10.98520.97390.98550.90000.93070.9741
48GestureMidAirD20.79620.66930.78470.75200.68710.7584114ToeSegmentation20.98820.98240.98840.98650.92830.9820
49GestureMidAirD30.76130.56290.72260.69350.61350.6815115Trace1.00000.99500.99500.99500.98001.0000
50GesturePebbleZ10.98670.99340.99670.96260.96060.9967116TwoLeadECG1.00000.99910.99810.99910.99570.9991
51GesturePebbleZ20.98360.97700.98360.97380.97050.9738117TwoPatterns1.00001.00001.00000.99640.98641.0000
52GunPoint0.99000.99501.00001.00001.00001.0000118UMD0.99441.00001.00330.98890.94440.9889
53GunPointAgeSpan0.98680.98670.96670.98230.98010.7797119UWaveGestureAll.0.99000.98910.99310.98640.97790.9933
54GunPointMale.0.99560.99341.00141.01251.01121.0124120UWaveGestureX.0.98420.92700.94340.98350.83360.9241
55GunPointOld.0.97790.97780.98450.97120.96010.9889121UWaveGestureY.0.91090.98440.91030.88810.72240.9087
56Ham0.91610.91160.93950.93490.93010.8882122UWaveGestureZ.0.91700.87060.87440.87220.77220.8841
57HandOutlines0.95330.93650.93650.93430.91970.9248123Wafer1.00000.99990.99960.99960.99961.0000
58Haptics0.75220.67700.76520.73490.73270.6744124Wine0.88420.77630.72250.60360.50470.8115
59Herring0.76710.73510.79850.78280.83750.7991125WordSynonyms0.91750.89610.90930.88730.83310.9094
60HouseTwenty0.96880.97500.95500.96980.97350.9688126Worms0.84530.83040.83050.84580.85830.7834
61InlineSkate0.80770.69080.71690.72460.76020.7431127WormsTwoClass0.88020.87860.86480.83070.83800.8726
62InsertEPGR.0.99681.00000.99680.93290.97440.9936128Yoga0.98300.97880.97730.97030.92300.9609
63InsertEPGS.0.99630.99251.00251.01481.11251.1125
64InsertWing.0.88820.86820.87860.87360.79550.8986
65ItalyPowerDemand0.98910.99000.98360.99000.9726
66LargeKitchenA.0.96270.95601.11251.1125
+ +(e.g., the ECG5000 dataset). +Table 12 presents the detailed test classification accuracy results across 18 UCR time series datasets for different values of the parameter $\eta$ during SoftShape sparsification. Table 13 provides the test classification accuracy results of SoftShape on 18 UCR time series datasets when varying the number of class-specific experts $k$ activated by the MoE router during intra-shape learning. Also, as baseline settings in Figure 3(c) and 3(d) of the main text, we report the parameter counts and inference times (in seconds) for SoftShape, MedFormer, TSLANet, InceptionTime, and MR-H on the Chlorine Concentration (4,307 + +samples, length 166) and HouseTwenty (159 samples, length 2,000) datasets. It is important to note that MR-H is executed on a CPU because its core modules do not use deep learning techniques, whereas other deep learning methods are run on an NVIDIA GeForce RTX 3090 GPU. As shown in Table 14, the differences in inference time between the deep learning methods are negligible. However, we observed that SoftShape demonstrates a slight advantage in inference time on the HouseTwenty dataset, which has a longer sequence length. + +Table 12: The detailed test classification accuracy of sparse ratios on 18 UCR datasets. The best results are in bold. + +
Dataset1 - η = 01 - η = 0.11 - η = 0.31 - η = 0.51 - η = 0.71 - η = 0.9
ArrowHead0.95760.95760.95760.94350.97170.9435
CBF1.00001.00001.00001.00001.00001.0000
CricketX0.93650.93750.93310.93210.92110.9006
DistalPhalanxOutlineAgeGroup0.95290.95100.92880.95180.95300.8861
DistalPhalanxOutlineCorrect0.89510.88710.90550.90540.87800.8734
ECG50000.97720.98020.98100.97960.98100.9696
EOGVerticalSignal0.91450.93210.93100.90070.87300.8690
EthanolLevel0.92140.92050.92050.92040.89850.8856
Fish0.97420.97990.96560.97710.96280.9713
GunPoint0.98500.97500.98500.99000.98500.9850
InsectWingbeatSound0.88280.87600.88190.88820.87000.8860
ItalyPowerDemand0.98910.99170.98460.98910.98370.9901
MelbournePedestrian0.95110.96030.95450.95730.93910.9319
MiddlePhalanxTW0.83400.83220.82680.83760.74740.7781
MixedShapesRegularTrain0.97840.97810.98010.97570.96440.9620
OSULeaf0.94140.94910.94130.95040.94360.9256
Trace1.00001.00001.00001.00001.00001.0000
WordSynonyms0.93820.93600.92940.91610.90950.9128
Avg. Acc0.94610.94690.94480.94530.93230.9261
Avg. Rank2.442.392.782.613.894.50
Win475652
+ +# B.4. Hyperparameter Analysis + +Table 15 provides the test classification accuracy results of SoftShape on 18 UCR time series datasets when varying the sliding fixed step size $(q)$ . Table 16 presents the detailed test classification accuracy results of SoftShape across 18 UCR time series datasets for different model depth $(L)$ values. Table 17 presents the detailed test classification accuracies of SoftShape across 18 UCR datasets, evaluated with varying setting shape lengths $m$ . + +Tables 18, 19, 20, and 21 present the statistical test classification results of SoftShape on 18 selected UCR time series datasets. The evaluations are conducted under varying conditions, including different maximum numbers of experts for intra-shape learning, class-specific MoE expert networks, shared expert networks, and hyperparameter $\lambda$ . For clarity and ease of analysis, only the statistical results of test accuracies are reported in Tables 18, 19, 20, and 21. + +# B.5. Time Series Forecasting Results + +For the forecasting task, we evaluate SoftShape on the $ETTh1$ , $ETTh2$ , $ETTm1$ , and $ETTm2$ datasets, using TS2Vec (Yue et al., 2022), TimesNet (Wu et al., 2023a), PatchTST (Nie et al., 2023), GPT4TS (Zhou et al., 2023), and iTransformer (Liu et al., 2024b) as baselines. Following the experimental setup of (Ma et al., 2024), we report the Mean Squared Error (MSE) and Mean Absolute Error (MAE) for all methods in Tables 22 and 23. Notably, we do not adjust hyperparameters for SoftShape across the four datasets, nor do we modify its shape embedding layer as done in (Nie et al., 2023). The results demonstrate that SoftShape outperforms TS2Vec and TimesNet, highlighting its potential for time series forecasting tasks. + +Table 13: The detailed test accuracy of the number of activated experts on 18 UCR datasets. The best results are in bold. + +
Datasetk=1k=2k=3k=4
ArrowHead0.94350.93240.91960.9147
CBF1.00001.00001.00001.0000
CricketX0.93210.94870.93340.9475
DistalPhalanxOutlineAgeGroup0.95180.96650.92210.9518
DistalPhalanxOutlineCorrect0.90540.85170.85740.8517
ECG50000.97960.98400.97920.9640
EOGVerticalSignal0.90070.93810.94900.9353
EthanolLevel0.92040.92640.90540.9164
Fish0.97710.95130.95710.9656
GunPoint0.99000.98500.98500.9850
InsectWingbeatSound0.88820.87820.87320.8659
ItalyPowerDemand0.98910.98090.98090.9873
MelbournePedestrian0.95730.95810.95680.9601
MiddlePhalanxTW0.83760.84290.82310.8719
MixedShapesRegularTrain0.97570.96750.86290.9535
OSULeaf0.95040.93020.93900.8963
Trace1.00001.00001.00001.0000
WordSynonyms0.91610.95800.95360.9625
Avg. Acc0.94530.94440.93320.9405
Avg. Rank1.891.942.782.39
Win10635
+ +Table 14: Comparison of model parameter counts and inference times. + +
Methods# Parameters# Inference Time (Seconds)
ChlorineConcentrationHouseTwenty
MR-H-6.602.97
InceptionTime387.7 K1.411.30
TSLANet514.6 K1.371.29
Medformer1360.6 K1.481.31
SoftShape (Ours)472.5 K1.391.26
+ +Table 15: The detailed test classification accuracy of sliding step size $q$ on 18 UCR datasets. The best results are in bold. + +
Datasetq=1q=2q=3q=4q=m
ArrowHead0.89130.92890.94310.94350.9451
CBF1.00001.00001.00001.00001.0000
CricketX0.89360.92310.91030.93210.9295
DistalPhalanxOutlineAgeGroup0.91470.96290.96100.95180.9184
DistalPhalanxOutlineCorrect0.86880.88370.85400.90540.8632
ECG50000.96720.97340.98220.97960.9824
EOGVerticalSignal0.85510.91040.94080.90070.9533
EthanolLevel0.86560.87360.92940.92040.8786
Fish0.94850.95130.97130.97710.9399
GunPoint0.98000.98500.96500.99000.9800
InsectWingbeatSound0.79220.85630.85820.88820.8741
ItalyPowerDemand0.98180.98730.99180.98910.9891
MelbournePedestrian0.95380.94800.95180.95730.9431
MiddlePhalanxTW0.74510.82670.86290.83760.7724
MixedShapesRegularTrain0.94770.92720.87830.97570.9157
OSULeaf0.93000.97740.95250.95040.9204
Trace1.00001.00001.00001.00001.0000
WordSynonyms0.83100.90170.91720.91610.8261
Avg. Acc0.90920.93430.93720.94530.9240
Avg. Rank3.832.782.441.782.94
Win24595
+ +Table 16: The detailed test classification accuracy of model depth $L$ on 18 UCR datasets. The best results are in bold. + +
DatasetL=1L=2L=3L=4L=5L=6
ArrowHead0.94370.94350.93900.91550.91550.9251
CBF1.00001.00000.99890.99780.99890.9989
CricketX0.89620.93210.97060.97830.95010.9539
DistalPhalanxOutlineAgeGroup0.96290.95180.97400.93890.97410.9574
DistalPhalanxOutlineCorrect0.90540.90540.89170.89620.88110.9077
ECG50000.98300.97960.97700.97500.98100.9790
EOGVerticalSignal0.80380.90070.91870.94220.90830.8979
EthanolLevel0.81890.92040.89050.89750.90050.8945
Fish0.94280.97710.99140.99140.96850.9942
GunPoint0.98000.99000.99000.99000.99000.9900
InsectWingbeatSound0.92370.88820.89050.89680.87640.8777
ItalyPowerDemand0.98540.98910.99820.98640.99370.9882
MelbournePedestrian0.95890.95730.94880.95670.95310.9578
MiddlePhalanxTW0.80700.83760.77990.80520.79790.8124
MixedShapesRegularTrain0.92820.97570.97780.97810.96890.9747
OSULeaf0.93680.95040.95030.94140.95710.9233
Trace1.00001.00001.00001.00001.00001.0000
WordSynonyms0.83440.91610.90620.89740.89510.9228
Avg. Acc0.92280.94530.94410.94360.93950.9420
Avg. Rank3.722.613.063.333.443.06
Win653544
+ +Table 17: The detailed test classification accuracy of shape length $m$ on 18 UCR datasets. The best results are in bold. + +
DatasetVal-SelectFixed-8Multi-Seq
ArrowHead0.94350.94350.9436
CBF1.00001.00001.0000
CricketX0.93210.92820.9320
DistalPhalanxOutlineAgeGroup0.95180.96110.9351
DistalPhalanxOutlineCorrect0.90540.90650.9156
ECG50000.97960.96100.9810
EOGVerticalSignal0.90070.87590.8952
EthanolLevel0.92040.87850.9303
Fish0.97710.96860.9697
GunPoint0.99000.99000.9900
InsectWingbeatSound0.88820.90100.9055
ItalyPowerDemand0.98910.98550.9867
MelbournePedestrian0.95730.96410.9647
MiddlePhalanxTW0.83760.83520.8414
MixedShapesRegularTrain0.97570.98080.9849
OSULeaf0.95040.93920.9444
Trace1.00001.00001.0000
WordSynonyms0.91610.90280.9139
Avg. Acc0.94530.94010.9463
Avg. Rank1.722.281.44
Win9411
+ +Table 18: The statistical test classification accuracy of the total number of experts $\hat{C}$ on 18 UCR datasets. And $C$ denotes the total number of classes within each time series dataset. The best results are in bold. + +
MetricˆC=C/2ˆC=CˆC=2C
Avg. Acc0.92150.94530.9408
Avg. Rank2.331.391.83
Win4126
+ +Table 19: The statistical test classification accuracy across different networks used as MoE experts on 18 UCR datasets. TSLANet (ICB) indicates that the ICB block within TSLANet is used as the MoE expert. The best results are in bold. + +
MetricFCNTSLANet (ICB)Original MoE expert
Avg. Acc0.86520.90490.9453
Avg. Rank2.561.831.44
Win4710
+ +Table 20: The statistical test classification accuracy and parameter counts across different networks used as the shared expert on 18 UCR datasets. The best results are in bold. + +
MetricTransformerMLPInception
# Parameters422.5 K157.8 K179.5 K
Avg. Acc0.82390.81030.9453
Avg. Rank2.222.441.11
Win4116
+ +Table 21: The statistical test classification accuracy across different $\lambda$ on 18 UCR datasets. The best results are in bold. + +
Metricλ = 0.0001λ = 0.001λ = 0.01λ = 0.1λ = 1λ = 10λ = 100
Avg. Acc0.94170.94530.94710.93740.93940.94380.9431
Avg. Rank3.002.502.614.113.723.723.56
Win6684457
+ +Table 22: The detailed test forecasting performance (Mean Squared Error, MSE) of different methods. The best results are in bold. + +
MethodsTS2VecTimesNetPatchTSTGPT4TSiTransformerSoftShape (Ours)
MetricMSEMSEMSEMSEMSEMSE
ETTh1240.59520.34850.38900.31020.30650.5239
480.63160.39910.43620.35290.34510.5160
1680.76690.48460.53040.46000.43070.4564
3360.94190.55830.59280.51670.48890.4992
7201.09480.58860.61230.68780.51840.5099
Avg. Value0.80610.47580.51210.46550.41790.5011
Avg. Rank63.44.431.23
ETTh2240.44780.21290.21760.20090.18310.2542
480.64600.28240.27220.27380.24130.2808
1681.77710.44610.40920.44360.37250.3824
3362.11570.48750.46700.50110.43680.4429
7202.58230.51930.47210.53890.44790.4722
Avg. Value1.51380.38960.36760.39170.33630.3665
Avg. Rank64.22.83.813.2
ETTm1240.19700.24160.25220.20040.22510.2980
480.26820.31940.32020.30060.30190.3197
960.37350.35580.35530.30080.33930.3389
2880.75660.44110.42070.37120.41470.3953
6721.82170.65670.48780.45700.48800.4706
Avg. Value0.68340.40290.36720.32600.35380.3645
Avg. Rank44.64.41.43.23.4
ETTm2960.35020.18770.18760.18610.18300.1873
1920.56840.27480.25440.26240.25070.2545
3360.95890.39220.31730.31640.31790.3190
7202.57050.44770.41790.42460.41610.4248
Avg. Value1.11200.32560.29430.29740.29190.2964
Avg. Rank5.64.922.882.281.843.48
+ +Table 23: The detailed test forecasting performance (Mean Absolute Error, MAE) of different methods. The best results are in bold. + +
MethodsTS2VecTimesNetPatchTSTGPT4TSiTransformerSoftShape (Ours)
MetricMAEMAEMAEMAEMAEMAE
ETTh1240.53130.38730.41280.36260.35890.4817
480.55660.41690.43790.39040.38180.4794
1680.64050.46700.48790.46610.43040.4481
3360.73340.51750.51930.49600.46020.4719
7200.80980.52870.54420.58580.49820.4951
Avg. Value0.65430.46350.48040.46020.42590.4752
Avg. Rank63.44.431.23
ETTh2240.50320.29290.30430.29170.27190.3344
480.61840.34290.33880.34430.31200.3475
1681.05690.43610.41720.44760.39400.4042
3361.17590.46870.46100.48760.44330.4484
7201.35210.48930.47340.51460.45850.4721
Avg. Value0.94130.40600.39890.41720.37590.4013
Avg. Rank63.634.213.2
ETTm1240.31790.31150.31860.27690.29670.3564
480.37840.36370.35930.33440.34740.3644
960.44960.38640.37930.35190.37400.3751
2880.66720.43040.41620.39890.41630.4072
6721.04520.53240.45270.44830.45770.4512
Avg. Value0.57170.40490.38520.36210.37840.3908
Avg. Rank5.64.43.612.83.6
ETTm2960.43810.26780.27280.27810.26520.2744
1920.57320.32200.31400.32710.31010.3167
3360.75320.38300.35270.36500.35240.3572
7201.24830.42440.40750.43310.40900.4186
Avg. Value0.75320.34930.33670.35080.33420.3418
Avg. Rank5.923.882.3241.563.32
\ No newline at end of file diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/images.zip b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ceb3564f093f9b72c54782f8ef5fffd757a95503 --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f61ec598e4ce0bc9d7705d5c67702754983d18c740c69b9d14568c793083a93 +size 4118257 diff --git a/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/layout.json b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1ef8efeb514551829feaa517655891083437756c --- /dev/null +++ b/ICML/2025/Learning Soft Sparse Shapes for Efficient Time-Series Classification/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45e80601784a010ed0c0258366e5ea5f772dfcbe12f769f161f0662b7acc57c3 +size 991320 diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_content_list.json b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..430fecb8087602947e77ac7b0efbb22797a0f035 --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d733735fe5c302c903511f3ac887d575b9f1b233f7a3b023d39cffad2ed00853 +size 163052 diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_model.json b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6b3250ccc4778e2989e815d1a700da96910c94d3 --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:809ccb79332991aeb6d50e79be0075f86bfb7860052f9fab22c6c46ea1dc73ad +size 191012 diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_origin.pdf b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9443ac54106bcb4590ddfbfe97f471210af0eec3 --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/f1ee6b2e-43df-44b8-abe8-56ae41c8b0fc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff0a0fa5c8cfc479b26925ce31b06d645a9960a7aa04133298066e9107a24394 +size 3592839 diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/full.md b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f5a480bc6bb9c3ca28fdc3fb5e35aaae81aa1cfb --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/full.md @@ -0,0 +1,663 @@ +# Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection + +Spandan Pyakurel $^{1}$ Qi Yu $^{1}$ + +# Abstract + +Fine-Grained Openset Detection (FGOD) poses a fundamental challenge due to the similarity between the openset classes and those closed-set ones. Since real-world objects/entities tend to form a hierarchical structure, the fine-grained relationship among the closed-set classes as captured by the hierarchy could potentially improve the FGOD performance. Intuitively, the hierarchical dependency among different classes allows the model to recognize their subtle differences, which in turn makes it better at differentiating similar open-set classes even they may share the same parent. However, simply performing openset detection in a top-down fashion by building a local detector for each node may result in a poor detection performance. Our theoretical analysis also reveals that maximizing the probability of the path leading to the ground-truth leaf node also results in a sub-optimal training process. To systematically address this issue, we propose to formulate a novel state-based node representation, which constructs a state space based upon the entire hierarchical structure. We prove that the state-based representation guarantees to maximize the probability on the path leading to the ground-truth leaf node. Extensive experiments on multiple real-world hierarchical datasets clearly demonstrate the superior performance of the proposed method. + +# 1. Introduction + +Openset detection aims to identify data samples that are not part of the known set (a.k.a., closed-set) of classes in the training data. Most existing methods try to assign the detected openset samples into a single openset class (Sun et al., 2020; Bendale & Boult, 2016; Vaze et al., 2021; Chen + +$^{1}$ Rochester Institute of Technology, Rochester, New York. Correspondence to: Qi Yu . + +Proceedings of the $42^{st}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/bc8e1153c865b776da178e4f3e7c3c4adf043c1cb8e147f777c57a2be043e4d4.jpg) +Figure 1. With the support of a hierarchy, fine-grained openset detection can assign an openset data sample into different parent nodes as shown: Le Conte Sparrow $\rightarrow$ Openset Sparrow, Ring Necked Pheasant $\rightarrow$ Openset Bird + +et al., 2020b; 2021; Yang et al., 2020; Zhang & Patel, 2016). They typically quantify an openset score to measure the difference between the openset sample and all the closed-set classes as a whole. However, the semantic similarity between openset samples with closed-set classes may vary significantly. As the similarity increases, openset detection becomes more challenging and such problems are referred to as near OOD detection (Fang et al., 2022; Ren et al., 2021; Fort et al., 2021). Theoretical results have also been developed to strictly quantify the difficulty of these problems from the learnability perspective (Fang et al., 2022). + +In many real-world settings, the fine-grained relationship between the closed-set classes can be precisely captured through a hierarchical structure. Such a hierarchy could help to improve the detection performance of some openset examples despite having a high semantic similarity with certain closed-set classes. As shown in Figure 1, the closed-set training data consists of four types of birds, which can be further grouped into two parent classes, Seagull and Sparrow. Due to migration of birds from other regions, one may need to identify previously unseen species. Identifying the closest related species of these new birds can help expand the existing hierarchy and provide insights into migration patterns. By training a model that adequately captures the hierarchical dependencies among different closed-set classes, it can be better equipped to more accurately recognize openset samples with different levels of similarity with the closed-set ones. For example, when being presented with a Le Conte Sparrow, the knowledge learned from the hierarchy could + +![](images/c190e7a40dbcc8bd1507285d039369cdf4d830e9f79bda357814cc6bc2476243.jpg) +Figure 2. Error prediction analysis for a global detector that assigns an openset sample from Brandt Cormorant to a totally wrong class due to lack of considering the hierarchical dependencies. + +allow the model to recognize some important but subtle differences from the two known Seagull classes. Meanwhile, it is also more different from the two Seagull classes. As a result, the model is able to perform fine-grained openset detection (FGOD) to recognize Le Conte Sparrow as an openset sparrow as shown in Figure 1. Similarly, when facing a Ring Necked Pheasant, the model could recognize that it is different from both Seagull and Sparrow while possessing some key characteristics of birds, and hence assigns it as an openset bird. + +As illustrated by the example above, detecting openset samples that share semantic similarity with the closed-set classes (i.e., near OOD detection) can be achieved by conducting FGOD when the closed-set classes can be organized into a hierarchical structure. Such hierarchical structures commonly exist in real-world settings as evidenced by many benchmark datasets (e.g., Imagenet and Cifar100). To achieve fine-grained detection, an openset sample should be assigned to the right parent node in the hierarchy based on its difference to classes at different levels. Following the hierarchy, FGOD can be conveniently conducted in a top-down fashion by building a local detector at each non-leaf node. Each detector performs the classification of child nodes under the non-leaf node while quantifying an openset score. If a detector obtains a high openset score, an openset sample is detected. Otherwise, one child node is selected based on the classification result and the process continues unless a leaf node is reached. + +However, using a sequence of local detectors in a top-down fashion may result in a poor FGOD performance. Each detector is trained by only considering its own child node distribution, which fails to fully utilize fine-grained dependencies from nodes at lower levels or those located at other parts of the hierarchy. This usually leads to local detection decisions that are sub-optimal. To train more robust detectors, one can collectively consider all the ancestor nodes on the path to the ground-truth leaf node. By choosing the path with the highest overall probability, the model can more effectively avoid poor local decisions. Nevertheless, a deeper analysis reveals that solely maximizing the (ground-truth) + +path probability does not guarantee to decrease the probability of other nodes that are not the children of the nodes on the path, which compromises the detection performance, as evidenced by our experiments. + +To avoid large error accumulation of local detectors, a global detector can be trained that maximizes the probability of the ground truth node by considering all the leaf nodes. For open-set detection, besides evaluating an open-set score, an extra child node can be added to each non-leaf node denoting its open-set child class (Lee et al., 2018; Pyakurel & Yu, 2024), which transforms open-set detection as a multiclass classification problem that only considers all leaf nodes (see Figure 8 in the Appendix for an illustrative example). However, a global detector trained in such a way ignores the detailed hierarchical dependencies among different classes. Our thorough theoretical analysis reveals that the global detector formulation indeed leads to a sub-optimal training process causing large hierarchical detection errors. Such errors can be more precisely captured by the hierarchical performance metrics that measure the number of correct predictions out of all predictions along the hierarchy to reach the leaf node as shown in Figure 2. + +To address the fundamental limitations of both local and global detectors for FGOD, we propose to learn novel state-based node representations from a hierarchy of closed-set classes to advance the frontiers of fine-grained open-set detection. Through the formulation of legal states, we can avoid error accumulation like in local detectors while effectively capturing fine-grained hierarchical dependencies between different nodes, including (parent $\rightarrow$ child), (ancecestor $\rightarrow$ descendant), and (sibling $\rightarrow$ sibling). Such a formulation ensures that the probabilities assigned to each node (both leaf and non-leaf) strictly follow their hierarchical dependencies with theoretical guarantees. This implies that node probabilities are derived from a global view of the entire hierarchy. It is worth noting that there are a few existing works, such as (Deng et al., 2014; Chen et al., 2022), that perform state formulation, but they are designed for hierarchical classification instead of fine-grained openset + +detection. Our novel theoretical analysis shows that the use of state-based representations in model training guarantees to decrease the probabilities of all non-ground truth nodes while increasing the ground-truth node's probability. Since these non-ground truth nodes include both leaf and non-leaf nodes, the prediction of the proposed method, even when wrong is close to the ground truth node in the hierarchy as shown in Figure 2, resulting in a higher hierarchical precision. Our contribution is threefold: + +- a thorough theoretical analysis that unveals fundamental limitations of local and global detectors when performing open-set detection in a hierarchical structure, +- formulation of novel state-based node representations from a hierarchy of closed-set classes along with a FGOD process that avoids error accumulation in open-set detection while effectively capturing fine-grained hierarchical dependencies between different nodes, +- a formal analysis of the proposed state-FGOD model that ensures an optimal training process and guarantees to improve the hierarchical detection performance. + +Extensive experimentation conducted on multiple real-world hierarchical datasets demonstrates the superior performance of the proposed method. + +# 2. Related Works + +Openset detection. Openset detection usually relies on a score to differentiate openset samples from closed-set classes. Openmax (Bendale & Boult, 2016) redistributes the closed-set probabilities and assigns a probability as a score to the openset class. Some works utilize the maximum softmax probability from the classification of closed-set classes for detection (Hendrycks & Gimpel, 2016; Vaze et al., 2021). Vaze et al. (Vaze et al., 2021) replace the probability with logit and utilize the maximum logit score for openset detection. Some works (Chen et al., 2020b; 2021; Yang et al., 2020) focus on training prototypes of closed-set classes in the embedding layer and learning a representation of openset class far from all the prototypes. Based on the distance of openset sample from the closed-set prototypes, detection is performed. A line of research quantifies uncertainty measure to identify openset samples based on evidential uncertainty (Sensoy et al., 2018; Malinin & Gales, 2018; Charpentier et al., 2020), free energy (Liu et al., 2020; Wang et al., 2021; Du et al., 2021). Few works (Fang et al., 2022; Ren et al., 2021; Fort et al., 2021; Lang et al., 2024; Sun et al., 2023; Fu et al., 2023) particularly focus on near-OOD detection, where openset samples are semantically similar to the closed-set classes. Our work extends beyond near-OOD detection, which not only detects a near-OOD sample but also identifies its closest parent in the hierarchy of the closed-set classes. + +Hierarchical classification. Based on how the work leverages the hierarchical structure of data, it can be divided into two types: (i) modify network architecture, and (ii) Constraint on the loss function. First line of work (Cerri et al., 2014; Chen et al., 2020a; Peng et al., 2018; Du et al., 2020; Zhao et al., 2021; Chen et al., 2019) modifies the network architecture to adapt the hierarchical structure of data. Among the state-of-the-art, Zhao et al. (Zhao et al., 2021) uses higher-order attention to discover relations in the form of a graph of embeddings. Similarly, Du et al. (Du et al., 2020) adopts progressive training and jigsaw puzzles to focus on both fine-grained and coarse-grained features required to identify hierarchical features. Graph-Neural-Network is also leveraged to construct a graph between class and attributes (Chen et al., 2019). Another line of work (Giunchiglia & Lukasiewicz, 2020; Deng et al., 2014; Chen et al., 2022; Chang et al., 2021) imposes constraints on the loss function to ensure hierarchical relations are being followed. The goal of the work in this setting is to improve the performance of hierarchical classes seen in the training. ProTeCt (Wu et al., 2024) proposes a tree-cut loss function for taxonomic openset detection. This work deals with identifying samples at different granularity in the hierarchy, not the samples from the open-world. Li et al. leverages the hierarchical relationship to perform hierarchical classification at the pixel level. Different from ours, this work does not consider the open-world setting. To handle fine-grained openset detection, our method ensures hierarchical constraints while performing openset detection in the hierarchy. + +Fine-grained openset detection. Fine-grained openset detection is relatively under-explored in the literature. There are two ways of dealing with the problem: (i) Local Detector and (ii) Global Detector. For the former, a local openset detector can be applied at each non-leaf class of the closed-set hierarchy. For each local openset detector, (Lee et al., 2018) quantifies the confidence score based on KL divergence between the model and uniform probability distribution and (Wang et al., 2022) quantifies uncertainty based on fuzzy logic. The global detector trains a single classifier to identify the sample between closed-set and openset classes. Several strategies are proposed to leverage samples from closed-set classes as openset ones (Lee et al., 2018). (Ruiz & Serrat, 2022) trains prototypes of closed and open set classes using a cosine loss. E-HND (Pyakurel & Yu, 2024) leverages an evidential loss to further separate closed and open-set classes by allocating fine-grained evidences. In this work, we address the fundamental limitations of both local and global detectors as outlined in the introduction by learning novel state-based node representations from a class hierarchy to advance fine-grained openset detection. Another line of work, Generalized Category Discovery (GCD) (Rastegar et al., 2023) targets a related problem similar to FGOD of assigning openset samples to a specific category. FGOD leverages an existing hierarchical structure and de + +fines openset class for every non-leaf class in the hierarchy so that openset test samples can be assigned to those openset classes. GCD, on the other hand, does not leverage existing hierarchy but learns to categorize the classes into a hierarchical structure. When a hierarchy is not present for the dataset, GCD approaches can be applied to obtain the hierarchy before the FGOD methods are applied. In that sense, GCD and HND are complementary to each other. + +# 3. Methodology + +We first formally define the problem of fine-grained openset detection (FGOD) with a hierarchy of closed-set classes. We present a standard process that builds a local detector on each node and performs openset detection along with the hierarchy. We provide novel theoretical insight on why it leads to a sub-optimal training process even considering all the ancestor nodes on the path leading to the ground-truth leaf node. Such theoretical insight inspires the design of the state-based node representations from a hierarchy that guarantees an optimal FGOD training process. + +# 3.1. Problem Formulation + +Given a training dataset: $D_{\mathrm{train}} = \{x_n, y_n\}_{n=1}^N$ , a data sample $x_n$ belongs to one of the $K$ classes as $y_n \in \mathcal{Y} = \{1, 2, \ldots, K\}$ . For the test dataset $D_{\mathrm{test}} = \{x_{n'}, y_{n'}\}_{n'=1}^{N'}$ , the test label $y_{n'}$ may or may not belong to train label set $\mathcal{Y}$ . In general, an openset detection, the goal is to identify whether a test sample is from the closed-set of classes and if so, assigns it into the correct class. It can be formally defined as $f: x_{n'} \to \mathcal{Y} \cup \{K+1\}$ , where $K+1$ refers to the openset class. + +Openset detection becomes more challenging when the semantic similarity between openset samples and closed-set classes increases. By leveraging the hierarchy obtained from the classes associated with labels $\mathcal{V}$ , we formulate the problem of Fine-Grained Openset Detection (FGOD) with a hierarchy. For openset test samples, the goal of FGOD is to identify the node at which the sample becomes openset. To formally define the problem, we first introduce a few notations. For a node $y$ in a hierarchy $\mathcal{H}$ , we refer to its parents, children, descendants, ancestors, and siblings as $\mathcal{P}(y), \mathcal{C}(y), \mathcal{D}(y), \mathcal{A}(y)$ and $\mathcal{S}_b(y)$ . The hierarchy contains leaf nodes $\mathcal{L}(\mathcal{H})$ and non-leaf nodes $\mathcal{N}_l(\mathcal{H})$ . Next, we assume that each non-leaf node $y$ has an extra child $\mathcal{O}(y)$ , denoting the openset child, along with its closed-set children $\mathcal{C}(y)$ . The set of all the openset nodes from the hierarchy is $\mathcal{O}(\mathcal{H})$ . Formally, the goal of FGOD can be defined as $h: x_{n'} \to \mathcal{V} \cup \mathcal{O}(\mathcal{H})$ . + +# 3.2. Why is a Local Detector Sub-optimal for FGOD with a Hierarchy? + +By leveraging the hierarchy of closed-set classes, a local openset detector can be built on each non-leaf node. Each + +detector performs classification of child nodes while quantifying an openset score. If the score is higher than a predetermined threshold, openset is detected. Otherwise, the sample is classified as one of the child nodes. The process starts from the root node and stops if openset is detected or reaches the leaf node of the hierarchy. For model training, we define known $D_{lc}^{k}$ and openset $D_{lc}^{o}$ data samples for each classifier $lc$ . If a training sample belongs to descendant classes of a non-leaf node $lc$ , it is assigned to $D_{lc}^{k}$ , otherwise to $D_{lc}^{o}$ . Using $D_{lc}^{k}$ , a loss function (eg, cross-entropy) can be defined to guide the model to correctly classify its child nodes. Some regularization term is usually included to ensure a high openset score for samples from $D_{lc}^{o}$ . Additional details and an algorithm summarizing the detection process is presented in the Appendix. + +![](images/199fe9e8b007a7e4b599ffc9d12c0a7f99ec5852db2bb48f3011754c2de848b3.jpg) +Figure 3. Local detector augmented with path probability + +While using a sequence of local detectors offers an intuitive way to tackle FGOD, the final prediction depends on multiple classifiers. Each classifier makes a decision based on the local view only. If a single classifier makes a mistake, no matter how well other classifiers perform, the final prediction will be wrong. Thus, it fails to take advantage of fine-grained views from the hierarchy. As shown in Figure 3 for a test sample with ground-truth node ④. First, node 3 is predicted, instead of node ②, and then node 6 is predicted as the final prediction. However, it fails to examine that nodes ⑥ and ⑦ have a close to uniform distribution, while node 4 dominates the probability over node ⑤. If we could leverage fine-grained probabilities from all the descendants, this issue could be mitigated. An intuitive solution is to augment the local detector method by considering all the ancestor nodes of the ground-truth leaf node and maximize the probability of the entire path. Specifically, for each leaf node in the hierarchy, we define a path from the root node to the leaf node. For each path, we calculate path probability by multiplying the local probabilities (conditioned on the parent node) of all the nodes that lie in the path. + +$$ +\forall y \in \mathcal {L} (\mathcal {H}), \quad \mathrm {p h} (y) = \prod_ {a \in \mathcal {A} (y)} p (a | \mathcal {P} (a)) \tag {1} +$$ + +For each classifier, the local probability is obtained by the softmax operation on the logits of its child nodes. Therefore, the path probabilities are based on logits of only those nodes, whose parent classifiers are in the path. For example, for the training sample from node ④ in Figure 3, only logits + +![](images/6695548fbbd77b16ec1a383b289c1585af6d57ccdbd21efe1f07e02cc85cb208.jpg) +Figure 4. An example of open-set augmented hierarchy: Blue edge represents subsumption; Green edge represents exclusion. +Figure 5. An example of global states + +
\( v_1 \)\( v_2 \)\( v_3 \)\( v_4 \)\( v_5 \)\( v_6 \)\( v_7 \)\( v_8 \)\( v_9 \)\( v_{10} \)
0000000000\( s_0 \)
1001000000\( s_4 \)
1100100000\( s_5 \)
1100010000\( s_6 \)
1100001000\( s_7 \)
1010000100\( s_8 \)
1010000010\( s_9 \)
1010000001\( s_{10} \)
+ +from nodes ②, ③, ④, and ⑤ are used in path probability calculation. Logits from the rest of the nodes are not used, making the optimization from path probability regularization sub-optimal, as shown in the following theorem. + +Theorem 3.1. (Sub-optimality of FGOD with path probability) Given a hierarchy $\mathcal{H}$ and a training sample $(x,y)$ , $\mathcal{A}(y)$ is the set of nodes belonging to the path from root to leaf node $y$ . Then, the cross-entropy loss function based on path probability does not guarantee a decrease in logits of node $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ . + +Proof. (Proof Sketch) We provide the detailed proof in Appendix C. First, we define path probability for ground truth label $y$ as a function of logits of the nodes in hierarchy, then evaluate the loss based on the probability of path $\mathsf{ph}(y)$ . Next, we calculate the gradient of the loss function for ground truth logit $g_{y} = \frac{\mathrm{d}\mathcal{L}^{\mathrm{ph}}}{\mathrm{d}h(y|x)}$ , and non-ground truth logits $g_{y'} = \frac{\mathrm{d}\mathcal{L}^{\mathrm{ph}}}{\mathrm{d}h(y'|x)}$ . We observe that gradient $g_{y}$ is dependent on logits of children of its parent only (local optimization). Similarly, for non-ground truth label $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ , the value of gradient $g_{y'} = 0$ . There is no update for those non-ground truth logits. Therefore, there is no guarantee of a decrease in logits of node $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ . + +# 3.3. Learning State-Based Node Representations for Effective FGOD + +To solve the problem of sub-optimality of FGOD using local detectors, it is essential to leverage all important hierarchical dependencies among the nodes so that the probability + +optimization no longer considers local view only, and guarantees an update of all the parameters in the right direction. We denote $\mathcal{H}'$ as an augmented hierarchy $\mathcal{H}$ with openset nodes $\mathcal{O}(\mathcal{H})$ (see Figure 4 for an example). The leaf and non-leaf nodes of $\mathcal{H}'$ become $\mathcal{L}(\mathcal{H}') = \mathcal{L}(\mathcal{H}) \cup \mathcal{O}(\mathcal{H})$ and $\mathcal{N}_l(\mathcal{H}') = \mathcal{N}_l(\mathcal{H})$ . + +The hierarchy $\mathcal{H}'$ can be represented as a graph $G = (V, E_s, E_e)$ consisting of nodes $V = \{v_1, v_2, \ldots, v_M\}$ , where $M = |\mathcal{L}(\mathcal{H}') + \mathcal{N}_l(\mathcal{H}')|$ . The relationship between two nodes $v_i$ and $v_j$ can be defined as an edge $(v_i, v_j)$ , where each node is assigned the value of 1 or 0 to denote the node is either active or inactive in the edge. There are two types of edges in the graph: subsumption edges $E_s \subset V \times V$ and exclusion edges $E_e \subset V \times V$ . A subsumption edge $(v_i, v_j) \in E_s$ is a directed edge that refers to node $v_i$ being a parent of $v_j$ . Similarly, an exclusion edge $(v_i, v_j) \in E_e$ is an undirected edge that refers to nodes $v_i$ and $v_j$ being mutually exclusion to each other. The graphical nodes for the hierarchy of Bird along with subsumption and exclusion edges are illustrated in Figure 4. First, we define the legal assignment of the values for each edge, referred to as local legal states. Next, we define the legal assignment of the values to all the nodes, referred to as global legal states. The legal assignment for the $E_s$ is $(1, 1), (1, 0), (0, 0)$ , meaning when the child node is active, the parent node has to be active. Similarly, the legal assignment for the $E_e$ is $(0, 1), (0, 0), (1, 0)$ , meaning both of the nodes can not be active. The values except the legal assignments are illegal. With the definition of local legal states, we define a global legal state below. + +Definition 3.2 (Global Legal State). Given a graph $G = (V, E_s, E_e)$ , a global legal state $s \in \{0,1\}^M$ assigns values to all the nodes $V$ such that the following three conditions are satisfied: $C_1: \forall (v_i, v_j) \in E_s, (v_i, v_j) \neq (0,1)$ , $C_2: \forall (v_i, v_j) \in E_e, (v_i, v_j) \neq (1,1)$ , and $C_3: (\exists v \in \mathcal{L}(\mathcal{H}', v = 1) \vee (\forall v, v = 0))$ . + +Remark. For each state, $C_3$ ensures that one of the leaf nodes is active or none of the nodes is active. Since we include openset nodes $\mathcal{O}(\mathcal{H})$ as leaf nodes of $\mathcal{H}'$ , without the condition $(\exists v \in \mathcal{L}(\mathcal{H}')$ , it will result in invalid global states. We also need to allow a state where the openset sample lies outside the entire hierarchy, which is given by $\forall v, v = 0$ . All the legal global states can be represented in the form of a matrix, defined as global state matrix $S$ . The resulting dimension of $S$ is $(|\mathcal{L}(\mathcal{H}')| + 1) \times M$ . An example of the legal global states is presented in Figure 5, where nodes and states follow Figure 4. It is important to note that each state (except for $s_0$ ) corresponds to a leaf node in open-set augmented hierarchy $\mathcal{H}'$ , so performing classification on the states is equivalent to conducting the multi-class classification as performed in the global detectors. More importantly, each state captures the important fine-grained dependencies among the ancestor nodes that + +![](images/37edfccce9caa4048563b04d0b60491005b298e9ea43f8886df4b77ff7e3cdc0.jpg) +Figure 6. Conceptual diagram of model training State-FGOD + +lead to the corresponding leaf node. If we look at state $s_6$ , it corresponds to assigning a sample to California Gull, where nodes $v_1, v_2$ , and $v_6$ are active and all the other nodes in the hierarchy are inactive. Those active nodes are ancestors of California Gull. Further, inactive nodes are siblings of either California Gull or its ancestors. Similar interpretations can be made about all the other states, where the index of the state corresponds to the node index from Figure 4 and the red color signifies openset cases. + +Evaluating the state and node probabilities. Consider a network $h$ parameterized with $\theta$ . We can obtain the logit from $h$ for all the nodes $V \in G$ represented as $h(v_{1}|x;\theta),\dots,h(v_{m}|x;\theta),\dots,h(v_{M}|x;\theta)$ . First, we calculate an un-normalized probability for each of the state $s$ by multiplying the exponent of logit from all the nodes that are active in state $s$ : + +$$ +\tilde {p} (s | x) = \prod_ {m = 1} ^ {M} e ^ {h \left(v _ {m} | x; \theta\right) 1 _ {\left(v _ {m} = 1 | s\right)}} \tag {2} +$$ + +where $1_{(v_m = 1|s)}$ is an indicator function that takes value of 1 when $v_{m} = 1$ . The un-normalized state probabilities $\tilde{\mathbf{p}}$ is of dimension $|\mathcal{L}(\mathcal{H}')| + 1$ , which can be normalized + +$$ +Z = \sum_ {s \in \mathcal {S}} \tilde {p} (s | x), \quad p (s | x) = \frac {\tilde {p} (s | x)}{Z} \tag {3} +$$ + +We can further obtain node probabilities $p(v_m|x)$ by summing all the state probabilities where the node $v_m$ is active: + +$$ +p \left(v _ {m} \mid x\right) = \sum_ {s \in S} p (s \mid x) 1 _ {\left(v _ {m} = 1 \mid s\right)} \tag {4} +$$ + +Proposition 3.3. For any node $v_{m}$ , the parent-child relation satisfies the probability constraint: + +$$ +p _ {v _ {m} | x} \geq \sum_ {c \in \mathcal {C} (v _ {m})} p (c | x), +$$ + +$$ +p _ {v _ {m} | x} = \sum_ {c \in \mathcal {C} (v _ {m})} p (c | x) + p (\mathcal {O} (v _ {m}) | x) \tag {5} +$$ + +With the complete knowledge of children of node $v_{m}$ , the equality holds. Otherwise, the inequality indicates the presence of an openset node associated with $v_{m}$ . In our formulation, we support the presence of an extra openset node. + +Model training and inference. We capture the hierarchical relationship between all the nodes through state representations. Next, we train a state-based detector that classifies all the leaf nodes in the hierarchy $\mathcal{H}'$ . We remove one node $v_{m}$ at a time. This creates a dynamic hierarchy $\mathcal{H}' \setminus v_{m}$ . When $v_{m}$ is removed, all the samples that belong to $v_{m}$ will be treated as openset samples with respect to $\mathcal{H}' \setminus v_{m}$ . Since the openset samples can occur at different levels or positions within the class hierarchy, this process allows the model to learn to detect diverse types of openset samples, depending on their specific location within the hierarchy. It is designed to address the unique requirement for fine-grained open-set detection. For a training input $x$ with ground truth $y$ , if $v_{m} = y$ or $v_{m} \in \mathcal{A}(y)$ , then the ground truth label is changed to the openset class as $y = \mathcal{O}(\mathcal{P}(v_{m}))$ . Otherwise, the ground truth label is not changed, and the sample belongs to closed-set classes. We train a single model parameterized by $\theta$ . For each removed node $v_{m}$ and training sample $(x,y)$ , the training loss maximizes ground truth node probability $p(y|x,\theta,\mathcal{H}' \setminus v_{m})$ . The loss function is: + +$$ +\mathcal {L} = \underset {v _ {m} \in V} {\mathbb {E}} \underset {(x, y)} {\mathbb {E}} [ - \ln p (y | x, \theta , \mathcal {H} ^ {\prime} \backslash v _ {m}) ] \tag {6} +$$ + +The conceptual diagram of the proposed method along with model training is illustrated in Figure 6. The inference process using the proposed State-FGOD is summarized in Algorithm 2 of the Appendix. Next, we show that minimization of the cross entropy loss function using state-based formulation leads to optimal model training in Theorem 3.4. + +Theorem 3.4. (Optimal model training from state-based node representations) Given a hierarchy $\mathcal{H}'$ and a training sample $(x,y)$ , the ground truth logits are $h(a|x;\theta), \forall a \in \mathcal{A}(y)$ and the non-ground truth logits are $h(a'|x;\theta), \forall a' \notin$ + +$\mathcal{A}(y)$ . Then, the cross-entropy loss function based on state probability guarantees the increase in value of ground truth logits and decrease in the value of non-ground truth logits. + +Proof. (Proof Sketch) First, we define cross-entropy loss $\mathcal{L}$ based on node probability $p(y|x)$ . Next, we calculate the gradient of the loss function for the ground truth logit $g_{y} = \frac{\mathrm{d}\mathcal{L}}{\mathrm{d}h(y|x)}$ , and non-ground truth logits $g_{y'} = \frac{\mathrm{d}\mathcal{L}}{\mathrm{d}h(y'|x)}$ . We observe that gradient $g_{y}$ is dependent on logits of all nodes (global view). When logit of non-ground truth increases, the gradient magnitude increases, updating the model parameters such that it increases the logit of ground truth node. Similarly, for non-ground truth label $y'$ , the gradient $g_{y'}$ updates the model parameters such that it decreases the value of the non-ground truth logit $h(y'|x)$ . Therefore, this guarantees a decrease in logits of non-ground truth node $y'$ . The detailed proof is in Appendix C. + +Along with the proofs, we have further illustrated the concept of gradient analysis of Theorems 3.1 and 3.4 using the representative example from Figure 4 in Appendix C.3. As pointed out in the introduction, building a global detector by performing multi-class classification over all the leaf nodes in $\mathcal{H}'$ may lead to a high hierarchical detection error. The following Corollary provides the root cause for that, which explains why a global detector is sub-optimal. + +Corollary 3.5 (Sub-optimality of global detectors). Given a hierarchy $\mathcal{H}'$ and a training sample $(x,y)$ , the ground truth labels are $a \in \mathcal{A}(y)$ and the non-ground truth labels are $a' \notin \mathcal{A}(y)$ . The cross-entropy loss based on probability from only leaf labels, $y$ and $y' \notin \mathcal{A}(y) \wedge y' \in \mathcal{L}(\mathcal{H}')$ does not increase the value of non-leaf ground truth logits. + +Remarks. Existing global detector methods do not fully leverage fine-grained hierarchical dependencies to train the model, and hence non-leaf logits are not optimized for fine-grained openset detection. As a result, these methods may assign the openset sample to the incorrect parent node, leading to lower hierarchical precision as shown in Figure 2. + +# 4. Experiments + +In this section, we first present the datasets and baselines used in the experiments. Next, we discuss the comparison settings and evaluation metrics. We then show the FGOD results and ablation studies to justify the proposed method. + +Datasets and implementation details We use the following real-world hierarchical datasets for the experiments. (i) Tiny Imagenet (Le & Yang, 2015): a subset of ImageNet, (ii) CUB-200-2011 (Welinder et al., 2010): images of fine-grained species of bird (iii) Animals With Attributes 2 (AWA2): images of animals (Lampert et al., 2014). Details for each dataset are presented in Appendix D. For both the compared algorithms and the proposed method, we experiment with ViT-B/16 using prompt-based parameter-efficient + +fine-tuning. Additionally, we conduct an ablation study to evaluate different backbone architectures and also compare different fine-tuning methods. + +Baselines. There are two categories of methods that can be adapted for FGOD: (i) Local detector and (ii) Global detector methods. For local detector, the following baselines can be leveraged: top-down (TD), maximum softmax probability (MSP) and hierarchical classification with extra Node (HC-EN). For global detector, the following baselines are compared: Dual Accuracy Reward Trade-off Search (DARTS) (Deng et al., 2012), Relabel (Lee et al., 2018), Leave-One-Out (LOO) (Lee et al., 2018), Evidential learning (Sensoy et al., 2018; Pyakurel & Yu, 2024), TD+LOO (Lee et al., 2018) and E-HND (Pyakurel & Yu, 2024). The details are presented in Appendix. + +# 4.1. Comparison Settings and Evaluation Metrics + +We compare the performance of the proposed method with the baselines using top-1 accuracy. For an openset sample $\{x_{n'}, y_{n'}\}$ with prediction $\hat{y}_{n'}$ , it is correct if $\hat{y}_{n'} = \mathcal{O}(\mathcal{P}(y_{n'}))$ . The number of correct predictions out of closed-set samples is called Closed-set Accuracy (CA), and openset samples are Openset Accuracy (OA). For global detector methods, we can adjust the bias to the logits of the leaf and non-leaf nodes to obtain different CA and OA. We present the comparison of global detector methods with AUC and OA at $50\%$ CA as $OA@50$ . + +# 4.2. Fine-Grained Openset Detection Results + +We present the openset accuracy and AUC results in Table 1. The comparison reveals the superior performance of our method. We observe that the global detector-based methods, in general, have better performance than local detector-based methods. In Tiny Imagenet, the performance gap is more prominent as the dataset has 12 levels in the hierarchy, and the error accumulation from the detectors becomes more severe. Among local detector methods, the elimination of setting thresholds on openset score improves the performance, as given by HC-EN baseline for the Tiny Imagenet dataset. For other datasets, local detector methods based on different openset score quantification methods, MSP and KL divergence score in TD method, also show competitive performance. This suggests that the performance of the local detector-based method is impacted by the number of hierarchy levels, quality of openset scores, and thresholds on the openset scores. In general, due to the decision of local classifiers, the local detector methods achieve lower FGOD performance in comparison to global detector methods. For global detector methods, the proposed State-FGOD consistently outperforms other methods on all the datasets (improvement in AUC of CUB: $+5.45$ , Tiny Imagenet: $+2.45$ and AWA2: $+2.82$ w.r.t. the best-performing baseline). This is further demonstrated by AUC curve Figure 7. Among the baselines, LOO, and E-HND methods demonstrate competi + +Table 1. Comparison with Local and Global Detectors + +
MethodCUBTiny ImagenetAWA2
CA/OAHMean/AUCCA/OAHMean/AUCCA/OAHMean/AUC
(a) Local Detector Methods
TD72.47/18.7529.79/-50.43/9.2015.56/-80.42/33.8347.62/-
MSP72.62/24.2336.33/-62.68/7.5213.42/-89.12/30.2845.19/-
HC-EN78.26/8.3015.01/-48.83/11.5618.69/-89.77/26.0840.41/-
(b) Global Detector Methods
DARTS50.00/46.7448.32/41.8250.00/17.1525.54/12.7550.00/38.2943.36/34.29
Relabel50.00/50.9550.47/41.3550.00/22.0230.58/17.5850.00/30.5039.52/32.68
Evidential50.00/43.3446.43/33.4150.00/19.3527.90/14.5350.00/46.9548.42/36.93
LOO50.00/48.3449.15/38.4550.00/21.5330.10/17.2650.00/48.8349.40/45.31
TD+LOO50.00/44.1746.90/32.7750.00/19.3727.92/14.8750.00/35.2641.35/28.40
E-HND50.00/54.4352.12/45.5950.00/21.4530.02/17.3150.00/47.0548.47/41.69
State-FGOD50.00/64.4756.31/51.0450.00/24.7133.07/20.0350.00/53.3251.60/48.13
+ +![](images/c666f8198da62d88abad8e6e058ad0f06a238828206b0e510773a55cd38ebc46.jpg) +Figure 7. Closed-set accuracy vs Openset accuracy curves + +![](images/4da3583b6f7ea8f03d3c99f6f149b0a9ff148c69a96fda21ae6358f23196a38c.jpg) + +![](images/272edc8e53c26c80297b54db3927452fe322f97e6d0bd50f86a3ea2d8a7dd645.jpg) + +Table 2. Comparison using hierarchical precision and recall + +
MethodHierarchical PrecisionHierarchical RecallHarmonicMean
Closed-setOpensetClosed-setOpensetClosed-setOpenset
TD96.8890.3684.6987.0590.3788.67
LOO95.9683.8687.2292.3191.3887.88
TD+LOO94.6784.7585.0386.4389.5985.58
E-HND97.2385.8386.3692.0791.4788.84
State-FGOD98.0690.6887.4092.8192.4291.73
+ +tive performance. + +Hierarchical performance measure. We conduct this study to understand the performance of our method w.r.t hierarchical performance measure. We use the CUB dataset with hierarchical metrics: hierarchical precision, hierarchical recall, and harmonic mean. Apart from leaf-level ground truth, hierarchical metrics also measure whether the ancestors of the ground truth leaf node are being correctly predicted. Hierarchical Precision (HP) measures the number of nodes correctly predicted by the model out of all the nodes predicted in the hierarchy. Similarly, Hierarchical Recall (HR) measures the number of nodes correctly predicted out of all the ground truth nodes + +from the hierarchy. For a sample $(x,y)$ , if the prediction is $\hat{y}$ , the hierarchical metrics are defined as: + +$$ +\mathrm {H P} = \frac {\left| \text {C o m m o n A n c e s t o r s} (y , \hat {y}) \right|}{\left| \text {A n c e s t o r s} (\hat {y}) \right|}, \tag {7} +$$ + +$$ +\mathrm {H R} = \frac {\left| \text {C o m m o n A n c e s t o r s} (y , \hat {y}) \right|}{\left| \text {A n c e s t o r s} (y) \right|} \tag {8} +$$ + +The comparison table using hierarchical metrics is presented in Table 2. Along with our method, we compare performance of TD method (a representative method from local detectors) and several representative methods from global detectors. As can be seen, local detector has poor openset recall. The error accumulation of local detector affects the + +Table 4. Impact of state-based representation + +
MethodSP?OA@50AUC
DARTS×46.7441.82
✓57.02(+10.28)46.71(+4.89)
Relabel×50.9541.35
✓59.80(+8.85)45.71(+4.36)
LOO×48.3438.45
✓55.31(+6.97)46.23(+7.78)
+ +Table 6. Impact of path probability + +
PP?TDMSPHC-EN
CA×72.4772.6278.26
✓72.63(±0.16)72.17(-0.45)77.58(-0.68)
OA×18.7524.238.30
✓21.16(±2.41)28.27(±4.04)10.05(±1.75)
HMean×29.7936.3315.01
✓32.77(±2.98)40.62(±4.29)17.79(±2.78)
+ +recall performance, as the ground truth node lies in leaf nodes of hierarchy. On the other hand, global detector doesn't fully utilize the fine-grained relationships in the hierarchy resulting in poor openset precision. The proposed State-FGOD is able to avoid error accumulation while effectively capturing important dependencies among different nodes in hierarchy, which achieves a good balance on both hierarchical metrics for closed-set and openset classes. + +Top-2 Accuracy. Table 3 compares representative global detectors using top-2 accuracy on the CUB dataset. The performance im + +Table 3. Top-2 Accuracies + +
MethodOA@50AUC
LOO70.0862.49
TD+LOO57.9448.39
EHND84.5874.08
State-FGOD87.2476.72
+ +provement shows the effectiveness of the proposed method. By leveraging the relationships among all the nodes, it effectively improves the performance of FGOD. + +# 4.3. Ablation Studies + +Impact of state-representation in global detectors. We study how the state formulation impacts the global detector methods. We apply state formulation on representative methods: DARTS, Relabel, and LOO on CUB dataset and present our results in Table 4. Using state formulation in global detector methods results in significant performance improvement. This study further highlights the importance of the utilization of hierarchy relationships between nodes. + +Impact of backbone. We study the impact of different backbones to the proposed method. We experiment with + +Table 5. Impact of backbone + +
BackboneOA@50AUC
ResNet10145.6334.39
ResNet15244.3433.73
ViT-B/16 + Adapter59.5847.12
ViT-B/16 + Bias58.4547.72
ViT-B/16 + Prompt64.4751.04
+ +CUB dataset and architectures: ResNet101, ResNet152 (He et al., 2016), and ViT-B/16. For ResNet-based methods, we use a linear layer on top of Resnet features for fine-tuning. For ViT, we leverage popular parameter-efficient fine-tuning methods: prompt (Jia et al., 2022), bias (Cai et al., 2020), and adapter (Rebuffi et al., 2017). The results are presented in Table 5. Among different settings, ViT-B/16 fine-tuned with prompt, leads to superior performance. Prompt fine-tuning allows training learnable parameters in the input + +space, which helps learn hierarchical relationships between classes in the input space. + +# Impact of component: The + +conceptual diagram of the proposed method is presented in + +Table 7. Impact of component + +
MethodOA@50AUC
w/o Prompt55.3146.23
w/o State48.3438.45
State-FGOD64.4751.04
+ +Figure 6. To better learn the hierarchical relationships, we have two components in the proposed method: (i) Prompt Tuning (ii) State representation. We study the impact of each component in CUB dataset. We present the results in Table 7. As we remove each component, we see a significant drop in the performance, justifying the importance of the components. + +Impact of path probability. In our methodology, we discuss how local detector methods are not able to leverage the fine-grained probability information to make decisions leading to error accumulation. We use path probability to identify the path in a hierarchy instead of all the classifier's predictions. For each local detector method, we compare the performance with and without path probability for CUB dataset in Table 6. With the use of path probability, we see improvement of both closed-set and openset performance in most of the methods. This study shows the importance of utilization of fine-grained probabilities for FGOD. + +# 5. Conclusion + +Openset detection poses a significant challenge when the samples are semantically similar to the closed-set classes. In this work, we leverage the hierarchical structure of the closed-set classes to detect the openset samples in a fine-grained manner. We formulate legal states to fully capture the hierarchical relationship between all the nodes in the hierarchy that allows us to optimize the performance of recognizing openset samples at different levels in the hierarchy. Further, we perform theoretical analysis to show the fundamental advantage of the proposed method. Our approach exhibits superior performance, as validated through extensive experimentation on various real-world hierarchical datasets. + +# Impact Statement + +In this work, we leverage the hierarchical relationships to perform fine-grained openset detection. Such hierarchical relations are useful by providing more information about the openset data samples that leads to an informed decision. The proposed approach can be potentially applied in many fields like wildlife monitoring, studying the nature of malware attacks, and identifying the parent class of traffic signs for self-driving cars. + +# References + +Bendale, A. and Boult, T. E. Towards open set deep networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1563-1572, 2016. +Cai, H., Gan, C., Zhu, L., and Han, S. Tinytl: Reduce memory, not parameters for efficient on-device learning. Advances in Neural Information Processing Systems, 33:11285-11297, 2020. +Cerri, R., Barros, R. C., and De Carvalho, A. C. Hierarchical multi-label classification using local neural networks. Journal of Computer and System Sciences, 80(1):39-56, 2014. +Chang, D., Pang, K., Zheng, Y., Ma, Z., Song, Y.-Z., and Guo, J. Your" flamingo" is my" bird": Fine-grained, or not. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11476-11485, 2021. +Charpentier, B., Zügner, D., and Gunnemann, S. Posterior network: Uncertainty estimation without ood samples via density-based pseudo-counts. Advances in Neural Information Processing Systems, 33:1356-1367, 2020. +Chen, B., Huang, X., Xiao, L., Cai, Z., and Jing, L. Hyperbolic interaction model for hierarchical multi-label classification. In Proceedings of the AAAI conference on artificial intelligence, volume 34, pp. 7496-7503, 2020a. +Chen, G., Qiao, L., Shi, Y., Peng, P., Li, J., Huang, T., Pu, S., and Tian, Y. Learning open set network with discriminative reciprocal points. In Computer Vision-ECCV 2020: 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part III 16, pp. 507-522. Springer, 2020b. +Chen, G., Peng, P., Wang, X., and Tian, Y. Adversarial reciprocal points learning for open set recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44(11):8065-8081, 2021. +Chen, J., Wang, P., Liu, J., and Qian, Y. Label relation graphs enhanced hierarchical residual network for hierarchical multi-granularity classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4858-4867, 2022. +Chen, T., Xu, M., Hui, X., Wu, H., and Lin, L. Learning semantic-specific graph representation for multi-label image recognition. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 522-531, 2019. +Deng, J., Krause, J., Berg, A. C., and Fei-Fei, L. Hedging your bets: Optimizing accuracy-specificity trade-offs in large scale visual recognition. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 3450-3457. IEEE, 2012. + +Deng, J., Ding, N., Jia, Y., Frome, A., Murphy, K., Bengio, S., Li, Y., Neven, H., and Adam, H. Large-scale object classification using label relation graphs. In Computer Vision-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part I 13, pp. 48-64. Springer, 2014. +Du, R., Chang, D., Bhunia, A. K., Xie, J., Ma, Z., Song, Y.-Z., and Guo, J. Fine-grained visual classification via progressive multi-granularity training of jigsaw patches. In European Conference on Computer Vision, pp. 153-168. Springer, 2020. +Du, X., Wang, Z., Cai, M., and Li, Y. Vos: Learning what you don't know by virtual outlier synthesis. In International Conference on Learning Representations, 2021. +Fang, Z., Li, Y., Lu, J., Dong, J., Han, B., and Liu, F. Is out-of-distribution detection learnable? Advances in Neural Information Processing Systems, 35:37199-37213, 2022. +Fort, S., Ren, J., and Lakshminarayanan, B. Exploring the limits of out-of-distribution detection. Advances in Neural Information Processing Systems, 34:7068-7081, 2021. +Fu, Y., Liu, Z., and Zhang, Z. Progressive learning vision transformer for open set recognition of fine-grained objects in remote sensing images. IEEE Transactions on Geoscience and Remote Sensing, 2023. +Giunchiglia, E. and Lukasiewicz, T. Coherent hierarchical multi-label classification networks. Advances in neural information processing systems, 33:9662-9673, 2020. +He, K., Zhang, X., Ren, S., and Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770-778, 2016. +Hendrycks, D. and Gimpel, K. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In International Conference on Learning Representations, 2016. +Jia, M., Tang, L., Chen, B.-C., Cardie, C., Belongie, S., Hariharan, B., and Lim, S.-N. Visual prompt tuning. In European Conference on Computer Vision, pp. 709-727. Springer, 2022. +Lampert, C. H., Nickisch, H., and Harmeling, S. Attribute-based classification for zero-shot visual object categorization. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36 (3):453-465, 2014. doi: 10.1109/TPAMI.2013.140. +Lang, N., Snæbjarnarson, V., Cole, E., Mac Aodha, O., Igel, C., and Belongie, S. From coarse to fine-grained open-set recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17804-17814, 2024. +Le, Y. and Yang, X. Tiny imagenet visual recognition challenge. CS 231N, 7(7):3, 2015. +Lee, K., Lee, K., Min, K., Zhang, Y., Shin, J., and Lee, H. Hierarchical novelty detection for visual object recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1034-1042, 2018. +Liu, W., Wang, X., Owens, J., and Li, Y. Energy-based out-of-distribution detection. Advances in neural information processing systems, 33:21464-21475, 2020. +Malinin, A. and Gales, M. Predictive uncertainty estimation via prior networks. Advances in neural information processing systems, 31, 2018. + +Neal, L., Olson, M., Fern, X., Wong, W.-K., and Li, F. Open set learning with counterfactual images. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018. +Peng, H., Li, J., He, Y., Liu, Y., Bao, M., Wang, L., Song, Y., and Yang, Q. Large-scale hierarchical text classification with recursively regularized deep graph-cnn. In Proceedings of the 2018 world wide web conference, pp. 1063-1072, 2018. +Pyakurel, S. and Yu, Q. Hierarchical novelty detection via fine-grained evidence allocation. In Salakhutdinov, R., Kolter, Z., Heller, K., Weller, A., Oliver, N., Scarlett, J., and Berkenkamp, F. (eds.), Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 41280-41302. PMLR, 21-27 Jul 2024. URL https://proceedings.mlr.press/v235/pyakurel24a.html. +Rastegar, S., Doughty, H., and Snoek, C. Learn to categorize or categorize to learn? self-coding for generalized category discovery. Advances in Neural Information Processing Systems, 36:72794-72818, 2023. +Rebuffi, S.-A., Bilen, H., and Vedaldi, A. Learning multiple visual domains with residual adapters. Advances in neural information processing systems, 30, 2017. +Ren, J., Fort, S., Liu, J., Roy, A. G., Padhy, S., and Lakshminarayanan, B. A simple fix to mahalanobis distance for improving near-ood detection. arXiv preprint arXiv:2106.09022, 2021. +Ruiz, I. and Serrat, J. Hierarchical novelty detection for traffic sign recognition. Sensors, 22(12):4389, 2022. +Sensoy, M., Kaplan, L., and Kandemir, M. Evidential deep learning to quantify classification uncertainty. Advances in neural information processing systems, 31, 2018. +Sun, J., Wang, H., and Dong, Q. Hierarchical attention network for open-set fine-grained image recognition. IEEE Transactions on Circuits and Systems for Video Technology, 2023. +Sun, X., Yang, Z., Zhang, C., Ling, K.-V., and Peng, G. Conditional gaussian distribution learning for open set recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13480-13489, 2020. +Vaze, S., Han, K., Vedaldi, A., and Zisserman, A. Open-set recognition: A good closed-set classifier is all you need. In International Conference on Learning Representations, 2021. +Wang, H., Liu, W., Bocchieri, A., and Li, Y. Can multi-label classification networks know what they don't know? Advances in Neural Information Processing Systems, 34:29074-29087, 2021. +Wang, Y., Hu, Q., Chen, H., and Qian, Y. Uncertainty instructed multi-granularity decision for large-scale hierarchical classification. Information Sciences, 586:644-661, 2022. +Welinder, P., Branson, S., Mita, T., Wah, C., Schroff, F., Belongie, S., and Perona, P. Caltech-ucsd birds 200. 2010. +Wu, T.-Y., Ho, C.-H., and Vasconcelos, N. Protect: Prompt tuning for taxonomic open set classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16531-16540, 2024. + +Yang, H.-M., Zhang, X.-Y., Yin, F., Yang, Q., and Liu, C.-L. Convolutional prototype network for open set recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 44 (5):2358-2370, 2020. +Zhang, H. and Patel, V. M. Sparse representation-based open set recognition. IEEE transactions on pattern analysis and machine intelligence, 39(8):1690-1696, 2016. +Zhao, Y., Yan, K., Huang, F., and Li, J. Graph-based high-order relation discovery for fine-grained recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 15079-15088, 2021. + +# Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection + +Supplementary Material + +Organization. In section A, we present the summary of all the notations used in the paper. In section B, we discuss the details of local and global detectors. In section C, we provide the proofs and illustrations of theorems presented in the main paper. In section D, we discuss details of experiments and provide additional results. In section E, we discuss potential societal impacts of the work, along with the limitation and future works. In section F, we provide the source code. + +# A. Summary of Notations + +
NotationDescription
HA training hierarchy of closed-set classes
DtrainTraining Dataset
NTotal number of data samples in training
YSet of all leaf labels of training dataset
L(H)Set of all leaf nodes; is a function of hierarchy
Nl(H)Set of all non-leaf nodes; is a function of hierarchy
P(y)Parents of node y
C(y)Children of node y
D(y)Descendants of node y
A(y)Ancestors of node y
Sb(y)Siblings of node y
DtestTest Dataset
O(y)An openset class belonging to y
O(H)A set of openset classes of hierarchy H
H'A resulting hierarchy of H' augmented with O(H)
DlcKnown dataset for classifier lc
DloOpenset dataset for classifier lc
ph(y)Path probability of path from root to node y
gyGradient of loss w.r.t ground truth logit
gy'Gradient of loss w.r.t non-ground truth logit
GGraph representing hierarchy H'
VAll the nodes of the graph G
EsA set of all the subsumption edges in the graph G
EeA set of all the exclusion edges in the graph G
sA global state assigning binary values to all the nodes in G
SGlobal state matrix of G
MTotal number of nodes in G
hFGOD network
hvm|x;θ)Logit from FGOD network for node vm
p(s|x)Un-normalized probability for state s
p(s|x)Normalized probability for state s
p(vm|x)Probability for node vm
θH'FGOD network parameters
θH'\(a\)FGOD network parameters when node a is removed from H'
+ +# B. FGOD using Local and Global Detectors + +In this section, we provide additional details on using local and global detectors for FGOD. + +Algorithm 1 FGOD with a hierarchy +Require: A set of thresholds $\lambda$ for all local detectors (one for each non-leaf node). Current local classifier, $lc\gets$ root node +while Stopping Condition $\neq 1$ do Probability distribution of $lc:\pmb {p}\in \mathbb{R}^{|\mathcal{C}(lc)|}$ Openset score: $o\in \mathbb{R}$ Prediction from $\hat{y}$ .. $\argmax(p)$ if $o\leq \lambda_{lc}$ then $lc$ : predicted child node, $\hat{y}$ if $lc\in \mathcal{L}(\mathcal{H})$ then Final Prediction $\leftarrow lc$ , Stopping Condition $\leftarrow 1$ end if else Final Prediction $\leftarrow \mathcal{O}(lc)$ , Stopping Condition $\leftarrow 1$ end if +end while + +Local detector based FGOD. Algorithm 1 summarizes the open-set detection process using a local detector. Based on how openset is determined, existing general openset detection methods can be adapted for FGOD. Here, we consider some commonly used open-detection strategies. For example, the openset score can be quantified using the KL divergence between a uniform distribution and model predicted distribution over the child nodes (eg, the top-down method (Lee et al., 2018)), model predicted maximum softmax probability (MSP) (Vaze et al., 2021), free energy based evaluation (Liu et al., 2020), or evidential uncertainty (Sensoy et al., 2018). In what follows, we first use the top-down method as a concrete example to present a specific loss function in (9) and then generalize into a more abstract form in (10): + +$$ +\begin{array}{l} \mathcal {L} ^ {\mathcal {H}} = \underset {l c \in \mathcal {N} _ {l} (\mathcal {H})} {\mathbb {E}} \left\{\underset {(x, y) \in D _ {l c} ^ {k}} {\mathbb {E}} [ - \ln p (y | x, l c; \theta) ] + \underset {(x, y) \in D _ {l c} ^ {o}} {\mathbb {E}} K L [ U (. | l c) | | p (. | x, l c; \theta) ] \right\} (9) \\ = \mathbb {E} _ {l c \in \mathcal {N} _ {l} (\mathcal {H})} \left\{\mathcal {L} _ {l c} ^ {1} + \mathcal {L} _ {l c} ^ {2} \right\} (10) \\ \end{array} +$$ + +where $\mathcal{L}_{lc}^{1}$ maximizes the probability of ground truth class for each classifier using known samples $D_{lc}^{k}$ , and $\mathcal{L}_{lc}^{2}$ is a regularization term for the classifier to assign a high openset score to openset samples in $D_{lc}^{o}$ . + +We summarize the inference process of FGOD with a hierarchy in Algorithm 1. + +In addition to using the KL divergence to specify the confidence, we may consider other options, including (i) Maximum Softmax Probability (MSP) (Vaze et al., 2021), evidential uncertainty (Sensoy et al., 2018), energy score (Liu et al., 2020), and Maximum Logit (Vaze et al., 2021) as openset score. For MSP baseline, the training is the same as the Top-down method, as in Eq. (9). For other baselines, we use the loss function according to evidential loss, where the first loss is to output high evidence for the correct class, and KL regularizer is used to train the novel samples to output uniform KL divergence. The evidential based loss function is: + +$$ +\begin{array}{l} \mathcal {L} ^ {\mathrm {H C - e v i d e n t i a l}} = \underset {l c \in \mathcal {N} _ {l} (\mathcal {H})} {\mathbb {E}} \left\{\underset {(x, y) \in D _ {l c} ^ {k}} {\mathbb {E}} \sum_ {k = 1} ^ {| \mathcal {C} (l c) |} y _ {i k} \left[ \ln \left(S t _ {i} ^ {l c}\right) - \ln \left(\alpha_ {i k}\right) \right] \right. \\ + \underset {(x, y) \in D _ {l c} ^ {o}} {\mathbb {E}} K L [ D (.. | x, l c; \theta) | | D (.. | < 1, 1, \dots , >, l c) ] \tag {11} \\ \end{array} +$$ + +For each method, if the following conditions hold, the sample is not detected as openset. + +$$ +\text {M a x i m u m S o f t m a x P r o b a b i l i t y :} \max \left(P r (.. | x, l c; \theta)\right) \geq \lambda_ {l c} \tag {12} +$$ + +$$ +\text {E v i d e n t i a l U n c e r t a i n t :} \frac {\left| \mathcal {C} (l c) \right|}{S t _ {i} ^ {l c}} \leq \lambda_ {l c} \tag {13} +$$ + +$$ +\text {E n e r g y S c o r e :} - \ln \sum_ {k = 1} ^ {| \mathcal {C} (l c) |} \exp h _ {k} (x; \theta) \leq \lambda_ {l c} \tag {14} +$$ + +$$ +\text {M a x i m u m L o g i t S c o r e :} \max \left(h _ {k} (x; \theta)\right) \geq \lambda_ {l c} \tag {15} +$$ + +Instead of relying on the openset score, samples in $D_{lc}^{o}$ can be treated as an extra openset child node $\mathcal{O}(y)$ (Neal et al., 2018). In this way, if the classifier predicts the highest probability for $\mathcal{O}(y)$ , it detects the sample as openset. Figure 8 provides a specific example on how to add an extra node to each non-leaf node in the hierarchy that transforms open-set detection in a hierarchy into a multi-class classification problem, where each leaf node corresponds to a class. In this case, the openset score comparison no longer depends on a pre-defined threshold. If the highest probability of any child node is lower than that of the extra novel node, we can classify the sample as openset. A loss function can be defined accordingly: + +$$ +\mathcal {L} ^ {\mathcal {H}} = \underset {l c \in \mathcal {N} _ {l} (\mathcal {H})} {\mathbb {E}} \left\{\underset {(x, y) \in D _ {l c} ^ {k}} {\mathbb {E}} [ - \ln p (y | x, l c; \theta) ] + \underset {(x, y) \in D _ {l c} ^ {o}} {\mathbb {E}} [ - \ln p (\mathcal {O} (l c) | x, l c; \theta) ] \right\} \tag {16} +$$ + +Similarly, each detector leverages the openset score to find out if the sample is openset or not. For this method, if the following condition holds, the sample is not openset. + +$$ +\max (\mathbf {p} (.. | x, l c; \theta)) \geq p (\mathcal {O} (l c) | x, l c; \theta) \tag {17} +$$ + +# Details of Global Detector Methods + +- Dual Accuracy Reward Trade-off Search (DARTS) (Deng et al., 2012) is adapted for FGOD by training a classifier using leaf nodes and obtaining the expected rewards for all the leaf nodes and openset non-leaf nodes. +- Relabel (Lee et al., 2018) trains a single classifier using leaf and openset non-leaf nodes by relabeling some of the leaf nodes as openset ancestor nodes. +- Leave-One-Out (LOO) (Lee et al., 2018) trains a classifier with leaf and openset non-leaf nodes. For openset nodes, each node from the hierarchy is removed one at a time to use it as an openset parent node. +- Top Down + Leave-One-Out (TD+LOO) (Lee et al., 2018) uses input from Top Down method to LOO training. +- Evidential learning (Sensoy et al., 2018; Pyakurel & Yu, 2024) uses the evidential loss to train a classifier following the LOO strategy. Evidential uncertainty is used for openset detection. +- Evidential-Hierarchical Novelty Detection (E-HND) (Pyakurel & Yu, 2024) trains the model to separate evidence margin of closed-set and openset classes. + +Open-set Detection using State-FGOD. The inference process of State-FGOD is summarized in Algorithm 2. + +# C. Proofs of Theorems + +# C.1. Proof of Theorem 1 + +Proof. Let us assume the ground truth node as $y$ . For simplicity purpose, we denote the logit output by the neural network by $o$ . For example: we denote $h(y|x)$ by $o_y$ . The path probability of the node $y$ is given by: + +$$ +\begin{array}{l} \operatorname {p h} (y | x) = \prod_ {a \in A (y)} p (a | P (a); x) (18) \\ = \frac {e ^ {o _ {y}}}{e ^ {o _ {y}} + \sum_ {s b \in \mathcal {S} _ {b} (y)} e ^ {o _ {s b}}} \times \frac {e ^ {o _ {\mathcal {P} (y)}}}{e ^ {o _ {\mathcal {P} (y)}} + \sum_ {s b ^ {\prime} \in \mathcal {S} _ {b} (\mathcal {P} (y))} e ^ {o _ {s b ^ {\prime}}}} \times \dots \times 1 (19) \\ \end{array} +$$ + +![](images/911748b76a442edb47bc799eec5a88947e8429519382f3be3ce03bb34c212ce4.jpg) +(a) + +![](images/80c7a7ee95dd9ec207585a4912a88089a18612511bddf99e5d64ee0d15e856f1.jpg) +(b) +Figure 8. A diagrammatic representation of (a) Local detector method: There are three classifiers on Bird, Seagull and Sparrow, respectively. (b) Global Detector method: A single global classifier for all leaf nodes and openset non-leaf nodes. + +# Algorithm 2 Inference using State-FGOD + +Require: A set of biases $\mathbf{b}$ + +Require: A trained State-FGOD model $h$ parameterized with $\theta$ . + +Input: A test data sample $\{x_{n'}, y_{n'}\}$ . + +Logits for all the $M$ nodes: $h(v_{1}|x_{n^{\prime}};\theta),h(v_{2}|x_{n^{\prime}};\theta),\dots,h(v_{m}|x_{n^{\prime}};\theta),\dots h(v_{M}|x_{n^{\prime}};\theta)$ + +Un-normalized probabilities for each state $\tilde{p}(s|x_{n'})$ using Eq. (2). + +Un-normalized probabilities for each leaf node $v_{m}\in \mathcal{L}(\mathcal{H}^{\prime})$ + +$$ +\tilde {p} \left(v _ {m} \mid x _ {n ^ {\prime}}\right) = \sum_ {s \in S} \tilde {p} (s \mid x _ {n ^ {\prime}}) 1 _ {\left(v _ {m} = 1 \mid s\right)}. +$$ + +for $b$ in biases $\mathbf{b}$ do + +Add bias to logits of openset nodes, $\forall v_{m}\in \mathcal{O}(\mathcal{H})$ $\tilde{p} (v_m|x_{n'}) = \tilde{p} (v_m|x_{n'}) + b$ + +Obtain normalized probabilities for all leaf nodes of $\mathcal{H}'$ as $p$ + +Select node with the highest probability as $\hat{y} = \arg\max(\pmb{p})$ + +end for + +The definition of cross-entropy loss for path probability becomes. + +$$ +\mathcal {L} ^ {\mathrm {p h}} = - \log \left[ \frac {e ^ {o _ {y}}}{e ^ {o _ {y}} + \sum_ {s b \in \mathcal {S} _ {b} (y)} e ^ {o _ {s b}}} \times \frac {e ^ {o _ {\mathcal {P} (y)}}}{e ^ {o _ {\mathcal {P} (y)}} + \sum_ {s b ^ {\prime} \in \mathcal {S} _ {b} (\mathcal {P} (y))} e ^ {o _ {s b ^ {\prime}}}} \times \dots \times 1 \right] \tag {20} +$$ + +First, we take the derivative of loss w.r.t ground truth logit $o_y$ . All the terms except the $1^{st}$ one are not a function of $o_y$ , so we treat them as a constant $con$ . Similarly, we denote the normalization of the first fraction as $Z_y$ . + +$$ +\frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {y}} = \frac {\mathrm {d}}{\mathrm {d} o _ {y}} - \log \left[ \frac {e ^ {o _ {y}}}{e ^ {o _ {y}} + \sum_ {s b \in S _ {b} (y)} e ^ {o _ {s b}}} \times c o n \right] \tag {21} +$$ + +Using chain and product rule of derivative + +$$ +\begin{array}{l} = - \frac {Z _ {y}}{e ^ {o _ {y}}} \frac {1}{\text {c o n}} \times \left[ \frac {e ^ {o _ {y}}}{Z _ {y}} \times 0 + \text {c o n} \times \frac {Z _ {y} e ^ {o _ {y}} - e ^ {o _ {y}} e ^ {o _ {y}}}{Z _ {y} ^ {2}} \right] (22) \\ = - \frac {Z _ {y}}{e ^ {o _ {y}}} \times \frac {1}{\text {c o n}} \times \frac {\text {c o n}}{Z _ {y} ^ {2}} \times \left[ e ^ {o _ {y}} \left(Z _ {y} - e ^ {o _ {y}}\right) \right] (23) \\ = - \left[ 1 - \frac {e ^ {o _ {y}}}{e ^ {o _ {y}} + \sum_ {s b \in \mathcal {S} _ {b} (y)} e ^ {o _ {s b}}} \right] (24) \\ \end{array} +$$ + +The gradient is negative, meaning minimizing the loss function increases the ground truth logit $o_y$ . If the value of $o_y$ is low, the gradient magnitude is high. Similarly, for a high value of non-ground truth sibling leaf logit, $o_{sb}$ , $sb \in S_b(y)$ , the gradient magnitude is high. Except for the non-ground truth sibling leaf logits, the gradient magnitude is not dependent + +on logits of other nodes, which implies a local optimization. Next, we take derivative w.r.t a non-ground truth leaf logit, $sb \in S_b(y)$ . The terms other than the $1^{st}$ are not the function of $sb$ , so we treat them as a constant $con$ . + +$$ +\frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {s b}} = \frac {\mathrm {d}}{\mathrm {d} o _ {s b}} - \log \left[ \frac {e ^ {o _ {y}}}{e ^ {o _ {y}} + \sum_ {s b \in \mathcal {S} _ {b} (y)} e ^ {o _ {s b}}} \times c o n \right] \tag {25} +$$ + +Using chain and product rule of derivative + +$$ +\begin{array}{l} = - \frac {Z _ {y}}{e ^ {o _ {y}}} \frac {1}{\operatorname {c o n}} \times \left[ \frac {e ^ {o _ {y}}}{Z _ {y}} \times 0 + \operatorname {c o n} \times \frac {Z _ {y} \times 0 - e ^ {o _ {y}} e ^ {o _ {s b}}}{Z _ {y} ^ {2}} \right] (26) \\ = \frac {Z _ {y}}{e ^ {o _ {y}}} \times \frac {1}{c o n} \times \frac {c o n}{Z _ {y} ^ {2}} \times \left[ e ^ {o _ {y}} \times e ^ {o _ {s b}} \right] (27) \\ = \frac {e ^ {o _ {s b}}}{e ^ {o _ {y}} + \sum_ {s b \in \mathcal {S} _ {b} (y)} e ^ {o _ {s b}}} (28) \\ \end{array} +$$ + +The gradient is positive, meaning minimizing the loss function decreases the non-ground truth sibling leaf logit. If the value of $o_{sb}$ is high, the gradient magnitude is high. Similar gradient analysis can be obtained for all non-ground truth nodes, $y' \in \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ . Next, we take derivative w.r.t a non-ground truth logit of the node $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ , which are not child of the node in the path of the root node to the ground truth node. + +$$ +\frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {y ^ {\prime}}} = 0 \tag {29} +$$ + +The gradient is 0 as the loss is not a function of the $y^\prime$ . So, minimizing the loss function does not update the logits of these nodes. Therefore, it does not guarantee the decrease of all the non-ground truth logits. + +# C.2. Proof of Theorem 2 + +Proof. The state probability of the node $y$ is given by: + +$$ +\tilde {p} (y | x) = \prod_ {a \in A (y)} e ^ {o _ {a}} = e ^ {\sum_ {a \in A (y)} o _ {a}} \tag {30} +$$ + +$$ +\begin{array}{l} p (y | x) = \frac {\tilde {p} (y | x)}{1 + \sum_ {l \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} \tilde {p} (l | x)} (31) \\ = \frac {e ^ {\sum_ {a \in A (y)} o _ {a}}}{1 + \sum_ {l \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} e ^ {\sum_ {a ^ {\prime} \in A (l)} o _ {a ^ {\prime}}}} (32) \\ \end{array} +$$ + +The cross-entropy loss for state probability becomes + +$$ +\mathcal {L} = - \log \left[ \frac {e ^ {\sum_ {a \in A (y)} o _ {a}}}{1 + \sum_ {l \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} e ^ {\sum_ {a ^ {\prime} \in A (l)} o _ {a ^ {\prime}}}} \right] \tag {33} +$$ + +First, we take the derivative of the loss w.r.t ground truth logit $o_y$ . We denote the normalization of the first fraction as $Z$ . + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L}}{\mathrm {d} o _ {y}} = - \frac {Z}{e ^ {\sum_ {a \in A (y)} o _ {a}}} \times \frac {Z e ^ {\sum_ {a \in A (y)} o _ {a}} - e ^ {\sum_ {a \in A (y)} o _ {a}} e ^ {\sum_ {a \in A (y)} o _ {a}}}{Z ^ {2}} (34) \\ = - \frac {Z}{e ^ {\sum_ {a \in A (y)} o _ {a}}} \times \frac {e ^ {\sum_ {a \in A (y)} o _ {a}}}{Z ^ {2}} \times \left[ Z - e ^ {\sum_ {a \in A (y)} o _ {a}} \right] (35) \\ = - \left[ 1 - \frac {e ^ {\sum_ {a \in A (y)} o _ {a}}}{1 + \sum_ {l \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} e ^ {\sum_ {a ^ {\prime} \in A (l)} o _ {a ^ {\prime}}}} \right] (36) \\ \end{array} +$$ + +The gradient is negative, meaning minimizing the loss function increases the ground truth logit $o_{y}$ . If the value of $o_{y}$ is low, the gradient magnitude is high. For a high value of all the non-ground truth logits, the gradient magnitude is high. Next, we + +take the derivative w.r.t a non-ground truth leaf logit $y'$ . + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L}}{\mathrm {d} o _ {y ^ {\prime}}} = - \frac {Z}{e ^ {\sum_ {a \in A (y)} o _ {a}}} \times \frac {Z \times 0 - e ^ {\sum_ {a \in A (y)} o _ {a}} e ^ {\sum_ {a ^ {\prime} \in A (y ^ {\prime})} o _ {a ^ {\prime}}}}{Z ^ {2}} (37) \\ = \frac {Z}{e ^ {\sum_ {a \in A (y)} o _ {a}}} \times \frac {e ^ {\sum_ {a \in A (y)} o _ {a}}}{Z ^ {2}} \times e ^ {\sum_ {a ^ {\prime} \in A (y ^ {\prime})} o _ {a ^ {\prime}}} (38) \\ = \frac {e ^ {\sum_ {a ^ {\prime} \in A (y ^ {\prime})} o _ {a ^ {\prime}}}}{1 + \sum_ {l \in \mathcal {L} (\mathcal {H} ^ {\prime})} e ^ {\sum_ {a ^ {\prime} \in A (l)} o _ {a ^ {\prime}}}} (39) \\ \end{array} +$$ + +The gradient is positive, meaning minimizing the loss function decreases the non-ground truth leaf logit $o_y'$ . If the value of $o_y'$ is high, the gradient magnitude is high. Therefore, it guarantees the decrease of all the non-ground truth leaf logits. Next, we take the derivative of the loss w.r.t a non-ground truth non-leaf logit $y_a'$ . + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L}}{\mathrm {d} o _ {y ^ {\prime}}} = - \frac {Z}{e ^ {\sum_ {a \in A (y)} o _ {a}}} (40) \\ \times \frac {Z \times 0 - e ^ {\sum_ {a \in A (y)} o _ {a}} \left[ \sum_ {y ^ {\prime} \in \mathcal {D} \left(y _ {a} ^ {\prime}\right) \wedge y ^ {\prime} \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} e ^ {\sum_ {a ^ {\prime} \in A \left(y ^ {\prime}\right)} o _ {a ^ {\prime}}} \right]}{Z ^ {2}} (41) \\ = \frac {\sum_ {y ^ {\prime} \in \mathcal {D} \left(y _ {a} ^ {\prime}\right) \wedge y ^ {\prime} \in \mathcal {L} \left(\mathcal {H} ^ {\prime}\right)} e ^ {\sum_ {a ^ {\prime} \in A \left(y ^ {\prime}\right)} o _ {a ^ {\prime}}}}{Z} (42) \\ \end{array} +$$ + +The gradient is positive, meaning minimizing the loss function decreases the non-ground truth leaf logit $o_{y_a'}$ . If the value of $o_{y_a'}$ is high, the gradient magnitude is also high. With this analysis, all the values of non-ground truth logits $o_y'$ decrease by minimization of the loss function. + +# C.3. Illustration of theorems + +In this section, we illustrate the key concept introduced by Theorems 3.1 and 3.4. We use Figure 4 as a representative example. For each of the nodes, we have an associated logit value defined as: Seagull: $o_2$ , Sparrow: $o_3$ , Openset Bird: $o_4$ , Openset Seagull: $o_5$ , California Gull: $o_6$ , Ivory Gull: $o_7$ , Fox Sparrow: $o_8$ , Grasshopper Sparrow: $o_9$ and Openset Sparrow: $o_{10}$ . Let's take a sample from California Gull, the path probability can be defined as: + +$$ +\operatorname {p h} (\text {C a l i f o r n i a G u l l} | x) = \frac {\exp \left(o _ {2} + o _ {6}\right)}{Z _ {\mathrm {p h}}} \tag {43} +$$ + +where, $Z_{\mathrm{ph}} = \exp (o_2 + o_5) + \exp (o_2 + o_6) + \exp (o_2 + o_7) + \exp (o_3 + o_5) + \exp (o_3 + o_6) + \exp (o_3 + o_7) + \exp (o_4 + o_5) + \exp (o_4 + o_6) + \exp (o_4 + o_7)$ . The loss function that maximizes the path probability $\mathrm{ph}(\mathrm{California~Gull}|x)$ is defined as: + +$$ +\mathcal {L} ^ {\mathrm {p h}} = - \log \left[ \frac {\exp \left(o _ {2} + o _ {6}\right)}{Z _ {\mathrm {p h}}} \right] \tag {44} +$$ + +In theorem 3.1, there are three types of gradient analysis: (i) gradient for ground truth logit, (ii) gradient for non-ground truth logit, and (iii) gradient for non-ground truth logit with special condition. First, we analyse gradient w.r.t logit of the ground truth class $o_6$ : + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {6}} = - \frac {Z _ {\mathrm {p h}}}{\exp (o _ {2} + o _ {6})} \times \frac {Z _ {\mathrm {p h}} \exp (o _ {2} + o _ {6}) - \exp (o _ {2} + o _ {6}) [ \exp (o _ {2} + o _ {6}) + \exp (o _ {3} + o _ {6}) + \exp (o _ {4} + o _ {6}) ]}{Z _ {\mathrm {p h}} ^ {2}} \\ = - \frac {Z _ {\mathrm {p h}} - [ \exp (o _ {2} + o _ {6}) + \exp (o _ {3} + o _ {6}) + \exp (o _ {4} + o _ {6}) ]}{Z _ {\mathrm {p h}}} \\ = - \left[ 1 - \frac {\exp (o _ {6}) [ \exp (o _ {2}) + \exp (o _ {3}) + \exp (o _ {4}) ]}{[ \exp (o _ {2}) + \exp (o _ {3}) + \exp (o _ {4}) ] [ \exp (o _ {5}) + \exp (o _ {6}) + \exp (o _ {7}) ]} \right] \\ = - \left[ 1 - \frac {\exp (o _ {6})}{\exp (o _ {5}) + \exp (o _ {6}) + \exp (o _ {7})} \right] \\ \end{array} +$$ + +Table 8. Gradient Summary + +
MethodNodeGradientRemark
Path Prob.Seagull- [1 - e^{o2}/e^{o2} + e^{o3} + e^{o4}]Local Optimization: Magnitude only depends on the ground truth node Seagull and its siblings (Sparrow and Openset Bird).
State Prob.Seagull- [1 - e^{o1+o2} × {e^{o5} + e^{o6} + e^{o7}}/Z_{sp}]Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Sparrow\(\frac{e^{o3}}{e^{o2} + e^{o3} + e^{o4}}\)Local Optimization: Magnitude only depends on the non-ground truth node Sparrow and its siblings (Seagull and Openset Bird).
State Prob.Sparrow\(\frac{e^{o1+o3} \times \{e^{o8} + e^{o9} + e^{o10}\}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Openset Bird\(\frac{e^{o4}}{e^{o2} + e^{o3} + e^{o4}}\)Local Optimization: Magnitude only depends on the non-ground truth node Openset Bird and its siblings (Seagull and Sparrow).
State Prob.Openset Bird\(\frac{e^{o1+o4}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Openset Seagull\(\frac{e^{o5}}{e^{o5} + e^{o6} + e^{o7}}\)Local Optimization: Magnitude only depends on the non-ground truth node Openset Seagull and its siblings (California and Ivory Gull).
State Prob.Openset Sparrow\(\frac{e^{o1+o2+o5}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.California Gull- [1 - e^{o6}/e^{o5} + e^{o6} + e^{o7}]Local Optimization: Magnitude only depends on the ground truth node California Gull and its siblings (Ivory Gull and Openset Seagull).
State Prob.California Gull- [1 - e^{o1+o2+o6}/Z_{sp}]Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Ivory Gull\(\frac{e^{o7}}{e^{o5} + e^{o6} + e^{o7}}\)Local Optimization: Magnitude only depends on the non-ground truth node Ivory Gull and its siblings ( Openset Seagull and California Gull).
State Prob.Ivory Gull\(\frac{e^{o1+o2+o7}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Fox Sparrow0There is no gradient update.
State Prob.Fox Sparrow\(\frac{e^{o1+o3+o8}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Grasshopper Sparrow0There is no gradient update.
State Prob.Grasshopper Sparrow\(\frac{e^{o1+o3+o9}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
Path Prob.Openset Sparrow0There is no gradient update.
State Prob.Openset Sparrow\(\frac{e^{o1+o3+o10}}{Z_{sp}}\)Global Optimization: The gradient magnitude depends on all the nodes.
+ +Here, the gradient is $-ve$ , and the gradient magnitude only depends on the siblings of California Gull: Openset Seagull and Ivory Gull. The gradient update increases the value of $o_6$ . We can observe that, the increase of the value is dependent only on the local view (the ground truth class and its siblings.) + +Next, we analyse gradient w.r.t a non-ground truth class $o_7$ . + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {7}} = - \frac {Z _ {\mathrm {p h}}}{\exp (o _ {2} + o _ {6})} \times \frac {Z _ {\mathrm {p h}} \times 0 - \exp (o _ {2} + o _ {6}) [ \exp (o _ {2} + o _ {7}) + \exp (o _ {3} + o _ {7}) + \exp (o _ {4} + o _ {7}) ]}{Z _ {\mathrm {p h}} ^ {2}} \\ = \frac {\exp \left(o _ {2} + o _ {7}\right) + \exp \left(o _ {3} + o _ {7}\right) + \exp \left(o _ {4} + o _ {7}\right)}{Z _ {\mathrm {p h}}} \\ = \frac {\exp \left(o _ {7}\right) \left[ \exp \left(o _ {2}\right) + \exp \left(o _ {3}\right) + \exp \left(o _ {4}\right) \right]}{\left[ \exp \left(o _ {2}\right) + \exp \left(o _ {3}\right) + \exp \left(o _ {4}\right) \right] \times \left[ \exp \left(o _ {5}\right) + \exp \left(o _ {6}\right) + \exp \left(o _ {7}\right) \right]} \\ = \frac {\exp (o _ {7})}{\exp (o _ {5}) + \exp (o _ {6}) + \exp (o _ {7})} \\ \end{array} +$$ + +Here, the gradient is $+ve$ , and the gradient magnitude only depends on the ground truth and its siblings (local optimization). Finally, let's analyse gradient w.r.t a non-ground truth class $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y)$ as presented in theorem 3.1. In the representative example of 4, the symbols represent the following for the image of California Gull: + +$y =$ California Gull +- $\mathcal{A}(y) = \{\text{Bird, Seagull, California Gull}\}$ +- $\forall a\in \mathcal{A}(y),\mathcal{C}(a) = \{\mathrm{Seagull, Sparrow, Openset Bird, Opensest Seagull, California Gull, Ivory Gull}\}$ +- Non-ground truth nodes with condition: $y' \notin \mathcal{C}(a), \forall a \in \mathcal{A}(y) = \{\text{Fox Sparrow, Grasshopper Sparrow, Openset Sparrow}\}$ + +If we take the gradient w.r.t non-ground truth node with condition, for example $o_8$ . + +$$ +\frac {\mathrm {d} \mathcal {L} ^ {\mathrm {p h}}}{\mathrm {d} o _ {8}} = 0 \tag {45} +$$ + +Since, the gradient value is 0, there is no update for the non-ground truth logits with condition. It should be noted that, in this particular example, the non-ground truth nodes with condition are from the leaf level in the hierarchy. However, as the depth of hierarchy increases, nodes from non-leaf levels are also included in the non-ground truth nodes with condition. + +For theorem 3.4, we have two types of gradient analysis. (i) ground truth logit and (ii) non-ground truth logit. The state probability for California Gull can be defined as: + +$$ +p (\text {C a l i f o r n i a G u l l} | x) = \frac {\exp \left(o _ {1} + o _ {2} + o _ {6}\right)}{Z _ {s p}} \tag {46} +$$ + +where $Z_{sp} = 1 + \exp (o_1 + o_4) + \exp (o_1 + o_2 + o_5) + \exp (o_1 + o_2 + o_6) + \exp (o_1 + o_2 + o_7) + \exp (o_1 + o_3 + o_8) + \exp (o_1 + o_3 + o_9) + \exp (o_1 + o_3 + o_{10})$ . The corresponding loss function is defined as: + +$$ +\mathcal {L} = - \log \left[ \frac {\exp \left(o _ {1} + o _ {2} + o _ {6}\right)}{Z _ {s p}} \right] \tag {47} +$$ + +First, taking gradient for ground truth class, California Gull we have: + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L}}{\mathrm {d} o _ {6}} = - \frac {Z _ {s p}}{\exp (o _ {1} + o _ {2} + o _ {6})} \times \frac {Z _ {s p} \times \exp (o _ {1} + o _ {2} + o _ {6}) - \exp (o _ {1} + o _ {2} + o _ {6}) \exp (o _ {1} + o _ {2} + o _ {6})}{Z _ {s p} ^ {2}} \\ = - \left[ 1 - \frac {\exp \left(o _ {1} + o _ {2} + o _ {6}\right)}{Z _ {s p}} \right] \\ \end{array} +$$ + +The gradient is -ve and the magnitude is dependent of all the nodes (global view). Next, taking gradient for non-ground truth class Fox Sparrow: + +$$ +\begin{array}{l} \frac {\mathrm {d} \mathcal {L}}{\mathrm {d} o _ {8}} = - \frac {Z _ {s p}}{\exp (o _ {1} + o _ {2} + o _ {6})} \times \frac {Z _ {s p} \times 0 - \exp (o _ {1} + o _ {2} + o _ {6}) \exp (o _ {1} + o _ {3} + o _ {8})}{Z _ {s p} ^ {2}} \\ = \frac {\exp (o _ {1} + o _ {3} + o _ {8})}{Z _ {s p}} \\ \end{array} +$$ + +We see that all the gradient is +ve and magnitude is dependent on all the nodes. Similarly, there is not any nodes with zero gradient update. The gradient summary of all the nodes for sample of California Gull in the example 4 with the remark is presented in Table 8. + +# D. Details of Experiments and Additional Results + +In this section, we present more details on the experiments along with some additional results. + +# D.1. Details of Datasets + +We perform experiments on three real-world hierarchical datasets. The details of each dataset are summarized in Table 9, including (i) the Total number of samples, (ii) the Total number of classes, (iii) Known class split: total number of classes used in the training (iv) Openset class split: total number of classes used in testing as openset classes (v) Number of leaf nodes in the training hierarchy (vi) Number of non-leaf nodes in the training hierarchy and (vii) Maximum depth associated with the training hierarchy. + +Table 9. Description of real-world hierarchical datasets + +
Dataset NameTinyImagenetCUB-200-2011AWA2
Total Number of Samples120,00012,00037,000
Total Number of Classes20020050
Known Class Split15015040
Openset Class Split505010
Leaf Nodes in Training Hierarchy15015040
Non-Leaf Nodes in Training Hierarchy864321
Max Depth of Training Hierarchy1277
+ +Table 10. Significance Test + +
CUBTiny ImagenetAWA2
NA@50AUCNA@50AUCNA@50AUC
Baseline53.72±0.3945.54±0.0821.42±0.9617.16±0.6948.75±0.2344.86±0.28
State-FGOD64.29 ± 0.1750.79 ± 0.1724.53 ± 0.5019.83 ± 0.3953.24 ± 0.3047.71 ± 0.31
p-value1.48 × 10-115.77 × 10-122.06 × 10-47.07 × 10-52.87 × 10-123.64 × 10-10
+ +# D.2. Implementation Details + +For the proposed method and baselines, we use ViT-B/16 as the baseline, and prompt as parameter efficient fine-tuning method. We follow the default configuration of prompts, learning rate, and number of epochs as presented by (Jia et al., 2022). For the taxonomy definition, we define a pre-defined numpy file, along with state representation. The state representation defined in the NumPy file is leveraged in defining the loss function 6. The code is written in Python using PyTorch as a library. We conduct all the experiments in NVIDIA A100 with 32GB memory. For the known-novel split, we follow (Pyakurel & Yu, 2024). The conceptual diagram of model training is presented in Figure 6. For the EHND method, we use the value of $\beta_{1}$ and $\beta_{2}$ as suggested by the paper (Pyakurel & Yu, 2024). For relabel method, we use the relabing rate of $20\%$ . + +# D.3. Significance Test + +For the results presented in the main paper, the strongest baseline for CUB is E-HND. Similarly, for TinyImageNet and AWA2, the strongest baseline is Relabel and LOO respectively. In this section, we run our method along with the strongest baseline for 5 different seeds to test whether the improvement of the proposed method is statistically significant. The mean of the performance, the standard deviation of the proposed method, and the strongest baseline, along with the p-value of the t-test is presented in Table 10. The lower value of p-values justifies the statistical significance of the improvement from the proposed method. + +# D.4. Additional Results + +Experimental results on Stanford Cars and Cifar100 In this section, we compare the proposed method on additional datasets along with some representative global detectors: LOO, Relabel, and EHND. For Cifar100, we select 40 classes as closed-set classes. We construct the hierarchy of using those 40 classes as leaf classes resulting in 21 non-leaf nodes and a depth of 3. Similarly, for Stanford Cars, we select 166 classes as closed-set classes. We construct the hierarchy using those 166 classes as leaf classes resulting in 10 non-leaf nodes and a depth of 3. The comparison results are presented in Table 11. From the comparison, we see that the performance of the proposed method is superior to the baselines justifying the effectiveness of the proposed methodology. + +Qualitative study. We start by showing how the path probability mitigates the shortcomings of local detector methods. For an openset sample of Le Conte Sparrow, we use the baseline Hierarchical Classifier with extra nodes with and without path probability in Figure 9(a). The ground truth of the openset sample is Sparrow. We provide probabilities from local detectors in the box of its corresponding child nodes, and path probabilities in blue color at the end of each path. The correct way of inference for local detectors is Bird $\rightarrow$ Passeriform Bird $\rightarrow$ Sparrow. Then, the detector Sparrow should allocate a high openset score so that it would not be further classified to the child node. However, we see that Oscine Bird gets the + +Table 11. Comparison results on additional datasets + +
MethodStanford CarsCifar100
OA@50AUCOA@50AUC
LOO33.1528.3122.7118.38
Relabel29.8226.7518.8916.26
EHND41.4728.8115.8912.42
State-FGOD47.0335.0524.9720.69
+ +![](images/a47e1543d9c9034d74dc7a099797a01ca568ebbd8c90c1707d936822d3e0e2d6.jpg) +(a) + +![](images/865ceafed70eb69cf408b3af2ed16029cac27b11a2273b4999494e7f2e184a92.jpg) +(b) +Figure 9. Detection result on a sample of Le Conte Sparrow, an openset sample of Sparrow for (a) local detector vs local detector with path probability and (b) State-FGOD + +higher probability (0.576) than the correct prediction Sparrow (0.343) and makes the mistake of Fine-Grained Openset Detection. However, if we use path probabilities for inference as provided for all the given paths in Figure 9(a), the path from Bird $\rightarrow$ Nelson Sharp Tailed Sparrow with path probability (0.051) is selected. Next, the local detector Sparrow has a high openset score of 0.58, and therefore provides the final prediction as Openset Sparrow. In this way, path probability mitigates the error from Passeriform Bird detector. + +However, there is still one issue that Sparrow class has a lower probability than Oscine Bird. Although the final prediction is correct, the correct non-leaf nodes still can have a lower probability value than their siblings. If we observe the prediction from the proposed method (State-FGOD) in Figure 9(b), the ground truth Openset Sparrow has the highest probability (0.5218) among all the leaf nodes of the hierarchy. Additionally, non-leaf node Sparrow (0.8614) has the highest probability than its siblings (eg, Oscine Bird with probability of 0.1186). Similar is the case for Passeriform Bird. This probability distribution is possible for the proposed method due to the state formulation as discussed in Proposition 3.3. + +For the next openset sample from Chestnut Sided Warbler, we compare the local detector with path probability with the proposed method (State-FGOD) in Figure 10. We observe that one of the child nodes Green Kingfisher has a higher logit value, and high probability, making the path probability higher for the path of Bird $\rightarrow$ Green Kingfisher highest in Figure 10(a). Because of this, the path probability of one of the child nodes of ground truth node Warbler is not the highest, making Green Kingfisher a wrong final prediction of FGOD. However, in Figure 10(b), we observe that the proposed method assigns the highest logit to Openset Warbler, making a correct FGOD prediction. + +Computational Cost Analysis: We conducted a computational cost analysis. We define the input dimension of the classifier head as $D$ , the total number of leaf nodes in the class hierarchy as $N$ , and the depth of the hierarchy as $h$ . For ViT + +![](images/69b4af3f4ba8b523d4901db6e92987650c35ff2303405e7b9c92aaf693bd779f.jpg) +(a) + +![](images/52ba316411ebd1a20250f1349c340df0d4e34fda515923511fecef242e4f938e.jpg) +(b) +Figure 10. Detection result on a sample of Chestnut Sided Warbler, an openset sample of Warbler for (a) local detector with path probability vs (b) State-FGOD + +and ResNet backbone, the value of $D$ is 768 and 2048, respectively. For the TinyImagenet, CUB, and AWA2, the value of $N$ is 236, 193 and 61, respectively. The corresponding values of $h$ for these datasets are 12, 7, and 7, respectively. So, we note that $D > N \gg h$ . + +For local detectors, we assume the output dimension of each classifier to be $n$ on average, which is no more than 5 in our datasets. So, we have $n \ll N$ . The time complexity of the logit calculation is $O(D \times n \times h)$ . The top-down inference for receiving the final prediction takes $O(n \times h)$ . The total complexity is $O(D \times n \times h) + O(n \times h)$ , and overall complexity is $O(D \times n \times h)$ . For global detectors, the classifier output dimension is $N$ , resulting in a logit calculation complexity of $O(D \times N)$ . The prediction complexity is $O(N)$ . Hence, we obtain a total complexity of $O(D \times N) + O(N)$ and an overall complexity of $O(D \times N)$ . For the proposed method, we need to aggregate the probabilities by utilizing the global states, which is an extra step compared to global detectors. This is obtained using matrix multiplication of logits and global states, adding the complexity of $O(N^2)$ . Thus, the total complexity is $O(D \times N) + O(N) + O(N^2)$ . For the datasets we used, we have $D > N$ , resulting in an overall complexity of $O(D \times N)$ , which is the same as the global detectors. + +We use the ViT backbone to calculate the inference time (in milliseconds for one test sample) for the proposed method and representative baselines. The analysis is presented in Table 12. The total inference includes the time of both the logits calculation and the final prediction. Since the number of leaf classes follows the order $N_{Tiny} > N_{CUB} > N_{AWA2}$ , the corresponding inference times (both total and logit calculation) adheres to the same trend $\text{Time}_{Tiny} > \text{Time}_{CUB} > \text{Time}_{AWA2}$ . Among all the datasets, local detectors require less time than global detectors, which is due to smaller output dimension $n < N$ and top-down inference $h < N$ . Finally, the overall complexity analysis revealed that the logits calculation has the dominant time complexity. This is reflected in a substantial portion of the total inference time occupied by logits calculation. In comparison to other global detector methods, the proposed method requires slightly higher inference time, which is due to extra step of calculating global state probabilities. Overall, the inference time of all the methods is fairly fast, making them usable in a practical setting. + +# E. Limitations, and Future Work + +In this work, we evaluate the proposed approach using various benchmark datasets to validate the superior performance of the proposed method. We acknowledge that the real openset dataset is unbounded for a given training hierarchy. To capture the nature of such data, we utilize the samples from the closed-set classes to train open-set classes as well. It + +Table 12. Inference and Logits Calculation Time (in milliseconds) + +
MethodMetricTinyImagenetCUBAWA2
TDTotal inference0.00091890.00073140.0002797
Logits calculation0.00075300.00059000.0001950
MSPTotal inference0.00092130.00072970.0002807
Logits calculation0.00075300.00059000.0001950
HC-ENTotal inference0.00092250.00074640.0002794
Logits calculation0.00075300.00059000.0001950
LOOTotal inference0.31912000.29565000.1330400
Logits calculation0.31382000.29301200.1304500
E-HNDTotal inference0.31867000.29599000.1341200
Logits calculation0.31382000.29301200.1304500
STATE-FGODTotal inference0.32047000.29845000.1365200
Logits calculation0.31382000.29301200.1304500
+ +would be interesting to generate meaningful openset samples and use them to augment training data to further improve the performance of FGOD. We will investigate the data augmentation to aid fine-grained openset dataset as a future work. + +# F. Source Code + +The source code is provided in the repository: https://github.com/ritmininglab/STATE-FGOD \ No newline at end of file diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/images.zip b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..47fcc1691919aea9a492d7d3edb6ad9ab0479334 --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48a27ba1c1996f3ea4e7e30a19962d73d2bd42fa6a19a80d9b43347626a92f03 +size 1665362 diff --git a/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/layout.json b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ef14f70cff4b2158f52d3385d8cd0da951dedc87 --- /dev/null +++ b/ICML/2025/Learning State-Based Node Representations from a Class Hierarchy for Fine-Grained Open-Set Detection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69bf43250b76c27552ef416405567de97ff82f1babd81c721c88687c3847fc3b +size 822979 diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_content_list.json b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..878ba310b02e6b2ac2dd41766ec18e64e40f3713 --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ea47e691da2e9345bd298ee2bbcc559cab4e8372e6a22e5bca377dea9af6f38 +size 153496 diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_model.json b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c241a97c7ae8fe42bcc4cb802db71c911986aefd --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:54f323b4ef517f5ecfe64e6126f5fe24074bbba972b65f1470826b2c1cc4892f +size 194271 diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_origin.pdf b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..39d4a86d600fcc08ccb0631e4107ab87c6b00c0b --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/bbb9c491-c748-4ffd-96f2-0e29e7a85bcf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8843cc295604c2263a4c877d3d73653dfee3f85eaa1ad08d430d1bf93cce1ca +size 758676 diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/full.md b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ed6e4ceb37765d595d16024d35adf95663feacdd --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/full.md @@ -0,0 +1,643 @@ +# Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization + +Zelai Xu1 Wanjun Gu1 Chao Yu12 Yi Wu*13 Yu Wang*1 + +# Abstract + +Large language model (LLM) agents have recently demonstrated impressive capabilities in various domains like open-ended conversation and multi-step decision-making. However, it remains challenging for these agents to solve strategic language games, such as Werewolf, which demand both strategic decision-making and free-form language interactions. Existing LLM agents often suffer from intrinsic bias in their action distributions and limited exploration of the unbounded text action space, resulting in suboptimal performance. To address these challenges, we propose Latent Space Policy Optimization (LSPO), an iterative framework that combines game-theoretic methods with LLM fine-tuning to build strategic language agents. LSPO leverages the observation that while the language space is combinatorially large, the underlying strategy space is relatively compact. We first map free-form utterances into a finite latent strategy space, yielding an abstracted extensive-form game. Then we apply game-theoretic methods like Counterfactual Regret Minimization (CFR) to optimize the policy in the latent space. Finally, we fine-tune the LLM via Direct Preference Optimization (DPO) to align with the learned policy. By iteratively alternating between these steps, our LSPO agents progressively enhance both strategic reasoning and language communication. Experiment on the Werewolf game shows that our agents iteratively expand the strategy space with improving performance and outperform existing Werewolf agents, underscoring their effectiveness in free-form language games with strategic interactions. + +*Equal advising $^{1}$ Tsinghua University, Beijing, China $^{2}$ Beijing Zhongguancun Academy, Beijing, China $^{3}$ Shanghai Qi Zhi Institute, Shanghai, China. Correspondence to: Chao Yu , Yi Wu , Yu Wang . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +# 1. Introduction + +Developing intelligent agents that can reason rationally, make strategic decisions, and interact with humans has been a long-term goal in artificial intelligence (AI) research (Wooldridge & Jennings, 1995; Russell & Norvig, 2016). In recent years, large language model (LLM)-based agents have made significant strides towards this goal by exhibiting strong performance in open-ended conversation and multi-step decision-making (Brown et al., 2020; Ouyang et al., 2022). Trained on massive text corpora, LLM-based agents have demonstrated remarkable versatility across various domains, ranging from web navigation (Nakano et al., 2021; Yao et al., 2022b) and code generation (Chen et al., 2021; Yang et al., 2024) to video game environment (Wang et al., 2023a) and real-world scenarios (Ahn et al., 2022; Brohan et al., 2023). Beyond single-agent tasks, LLM-based agents have also shown potential in multi-agent interactions including collaborative teamwork (Li et al., 2023), adversarial gameplay (Meta et al., 2022), and human-AI interation (Park et al., 2023; Liu et al., 2023). + +Among these interactive domains, strategic language games such as Werewolf present unique challenges because they require both high-level strategic decision-making and freeform conversational abilities. Unlike classic games with predefined and limited actions, such as board games (Silver et al., 2016; 2018), card games (Moravecik et al., 2017; Brown & Sandholm, 2018), and video games (Mnih, 2013; Vinyals et al., 2019), Werewolf relies heavily on free-form conversation to achieve agreements and perform strategic deceptions. Players must communicate, bluff, and infer hidden roles through unrestricted, natural language interactions. This free-form language space expands the strategic possibilities and introduces additional complexity unmatched by more rigidly defined domains. As a result, Werewolf serves as an ideal environment for developing strategic agents with language-grounded decision-making capabilities. + +However, developing a strategic language agent that can interact with humans in Werewolf or other free-form language environments is still challenging. Classic game-theoretic methods like Counterfactual Regret Minimization (CFR) and reinforcement learning (RL) have proven successful in games like Go and Poker, thanks to their ability to handle + +finite action spaces. Yet Werewolf has a free-form action space, making direct application of these methods computationally infeasible. Mapping every possible utterance to an action in the original text space becomes prohibitively large, leading to immense difficulty in strategy representation and equilibrium-finding. An alternative approach is to build language agents with LLMs. These methods typically rely on prompt engineering without training the base LLM, which means their success depends entirely on the general reasoning capabilities of LLMs to generate actions. Unfortunately, prompt-based methods suffer from intrinsic bias in their generated actions (Xu et al., 2023c), resulting in suboptimal performance in strategic language games like Werewolf. Moreover, these agents exhibit limited exploration of novel strategies because they fully rely on the LLMs to generate actions, making the agents constrained by the capability of the base LLMs. Some work (Chen et al., 2023a; Wu et al., 2024) mitigates these issues by fine-tuning the LLM for a specific task, which requires expensive human labor for high-quality data. Xu et al. (2023c) partially tackles the bias issue by additionally training a small network to calibrate the LLM output distribution. However, it still relies on a fixed LLM to produce action candidates, leaving the exploration issue unaddressed. This raises an important question: Can we have a method that leverages both the specialized reasoning capabilities for decision-making and the generalization capabilities of LLMs? + +In this work, we propose an iterative Latent Space Policy Optimization (LSPO) framework to build strategic language agents for free-form language games, taking Werewolf as our testbed. Our approach combines structured game-theoretic methods with language models by introducing a discrete latent strategy space. Our method consists of three components. We first map the free-form utterances into a manageable, discrete strategy space to yield an abstracted game. Then we apply game-theoretic methods like CFR to learn the optimal policy in the latent space. Finally, we fine-tune the LLM via Direct Preference Optimization (DPO) (Rafailov et al., 2024) to align with the learned policy and expand the latent space. By iterating between these latent space CFR steps and LLM fine-tuning, our method yields an evolving agent that addresses both the intrinsic bias issue with game-theoretic methods and the action exploration issue with latent space expansion, leading to strong performance in the Werewolf game. + +We perform extensive experiments in the Werewolf game to demonstrate the effectiveness of our LSPO framework. We first analyze how the latent strategy space evolves between iterations to show that our agents learn increasingly complex and strategic behaviors. Then we quantitatively evaluate the prediction accuracy and win rate of our LSPO agent to show the improving performance with respect to iterations. Next, we compare our agents against state-of-the-art Werewolf + +agents and find that the LSPO agent achieves the highest win rate. We also conduct ablation studies to assess the effectiveness of our design in the LSPO framework. + +# 2. The Werewolf Game + +Werewolf is a popular social deduction game where players with hidden roles cooperate and compete with others in natural languages. The Werewolf side needs to conceal their identities and eliminate the other players, while the Village side needs to identify their teammates and vote out the Werewolves. Players are required to have both language proficiency for communication and strategic ability for decision-making to achieve strong performance in the Werewolf game. We consider a seven-player game with two Werewolves being the Werewolf side and one Seer, one Doctor, and three Villagers being the Village side. Detailed descriptions of the game's rule, observation space, and reward function can be found in Appendix A. + +# 2.1. Game Environment + +We consider a text-based seven-player Werewolf game that proceeds through natural languages. We exclude other information like the speaking tone, facial expression, and body language (Lai et al., 2022). This pure text-based environment is a common setup in the literature (Xu et al., 2023a;c; Wu et al., 2024; Bailis et al., 2024). + +Roles and Objectives. At the beginning of each game, the seven players are randomly partitioned into two sides. The Werewolf side has two Werewolf players who know each other's role and aim to eliminate the other players while avoiding being discovered. The Village side has one Seer who can check the role of one player each night, one Doctor who can protect one player each night, and three Villagers without any ability. The players in the Village side only know their own role and need to share information to identify the Werewolves and vote them out. + +Game Progression. The game proceeds by alternating between night round and day round. In the night round, players can perform secret actions that are only observable by themselves. More specifically, the two Werewolves can choose a target player to eliminate, the Seer can choose a target player to investigate whether the player's role is Werewolf, and the Doctor can choose a target player to protect the player from being eliminated. The Doctor does not know the target player chosen by the Werewolves. If the Doctor chooses the same target player as the Werewolves, then no player is eliminated in this night round, otherwise, the Doctor fails to protect any player, and the target chosen by the Werewolves is eliminated. + +Observations and Actions. The language observation of each agent is a list of natural languages that log the game + +![](images/5e56cb17db3661cdf5ea7085793c4e1fe64577584fd5409bd9216efaafa35bb5.jpg) +Figure 1: Overview of the Latent Space Policy Optimization (LSPO) framework. Each iteration consists of three components. (1) Latent space construction: generate language actions with the LLM and cluster the vast language action into a finite latent strategy space. (2) Policy optimization in latent space: reformulate the original game as an abstracted game and apply game-theoretic methods to learn latent space policy. (3) Latent space expansion: fine-tune the LLM to align with the latent space policy and generate new strategies to expand the latent strategy space. + +![](images/71c6b7ac45f24b455e3c4d07b2b64438be310642a0673de607f02601e969ba5e.jpg) + +![](images/a6332bcb18cf7e4a0542a8ab7afe59f6c05a3f09e1eeaaca977976c68af1ab48.jpg) + +history to the current step. This list include both private information that are only observable to the current player and public information that are shared by all players. The private information includes the role of the current player, the secret actions in the night round for the Werewolf, Seer, and Doctor, and the teammate for the Werewolf. The public information includes the ID of the current player, the eliminated player in each night and day round, the discussion, and the voting result in each day round. + +Player actions are also in the form of natural language and can be categorized into three types: secret actions, which are secret actions performed during the night, such as choosing a target player to eliminate, investigate, or protect; discussion actions, which are statements made during the day to influence other players' perceptions and decisions; and voting actions, which are choices made during the voting round to vote for on player or choose not to vote. + +# 2.2. Challenges for Language Agents + +Unlike board, card, or video games with a finite set of predefined actions, Werewolf has a free-form language action space. The vast space of natural language actions poses two key challenges for language agents to achieve strong performance in the Werewolf game. + +Intrinsic Bias in Action Generation. As observed in simple games like Rock-Paper-Scissor (Xu et al., 2023c), pure + +LLM-based agents tend to exhibit intrinsic bias in their action generation, which is inherited from the model's pretraining data. This issue is more pronounced in complex language games like Werewolf, where the opponents can exploit these predictable biases to counteract the agent's move. Therefore, mitigating intrinsic bias is essential for language agents to reduce exploitation and achieve strong performance in strategic language games. + +Exploration of Unbounded Action Space. Due to the immense combinatorial space induced by free-form text, it is impractical to map every possible utterance to an action in the language space. On the other hand, manually engineering or prompting an LLM to produce a limited set of actions may fail to capture the full strategic landscape. Even if an agent optimally masters the action distribution within a limited subset, it could be easily exploited by out-fodistribution utterance. Consequently, inadequate exploration of the action space could result in suboptimal performance in free-form language games like Werewolf. + +# 3. Latent Space Policy Optimization + +To tackle the intrinsic bias and the exploration issue, we propose an iterative Latent Space Policy Optimization (LSPO) framework. Our method combines game-theoretic optimization with LLM fine-tuning and operates on an expanding latent strategy space to iteratively improve the agent's + +decision-making ability and action exploration. As shown in Figure 1, our framework has three components including latent space construction, policy optimization in latent space, and latent space expansion. More implementation details can be found in Appendix C. + +# 3.1. Latent Space Construction + +One of the key challenges in free-form language games like Werewolf is achieving broad exploration of the unbounded text space while maintaining a computationally tractable action representation for game-theoretic methods. To strike a balance between exploration and tractability, we propose to abstract the vast language action space into a finite set of latent strategies, which we then expand over iterations for better exploration. Specifically, our latent space construction in each iteration involves two steps including latent strategy generation and clustering. + +Latent Strategy Generation. In our setting, secret actions and voting actions are already discrete and therefore do not require further abstraction. We focus instead on the freeform discussion actions, which we aim to capture as latent strategies. We assume that each role in the game has the same set of latent strategies across all discussion rounds and collect the latent strategies for each role by letting the current LLM agent self-play as different roles for multiple trajectories. To further improve the exploration of latent strategies, we prompt the LLM to generate $N$ strategically distinct discussion candidates and randomly choose one to execute in the game. This process encourages diversity in the collected discussion actions and generate a set of latent strategies in natural language for each role. + +Latent Strategy Clustering. Although we generate a set of latent strategies for each role, they are still in the form of natural language. To transform them into a discrete latent strategy space, we embed each discussion action into a vector representation using an embedding model such as "text-embedding-3-small" that captures its semantic and contextual information. We then apply a simple $k$ -means clustering algorithm to partition the embedded utterances into $k$ clusters, where each cluster represents a distinct latent strategy. Clustering reduces the infinite free-form text space to a finite set of abstract strategies, paving the way for subsequent game-theoretic optimization. By interpreting each cluster as a latent action, we can more efficiently search for and optimize strategic policies with minimal sacrifice of exploration of language space. + +# 3.2. Policy Optimization in Latent Space + +Another challenge in free-form language games is to address the intrinsic bias in the agent's action distribution. After constructing a discrete latent strategy space, we can reformulate the original game with unbounded language + +space as an abstracted game with a finite latent strategy space. This reformulation allows us to apply standard gamesolving techniques such as Counterfactual Regret Minimization (CFR) or reinforcement learning (RL) methods to learn near-optimal strategies that overcome the intrinsic bias. In our implementation, we employ CFR as the game solver. + +Abstracted Game Formulation. To represent the game in a compact, finite form, we replace the free-form discussion actions with the discrete latent strategies from latent space construction. Specifically, the abstracted game is formalized as an extensive-form game (EFG), where the secret action and voting action remain the same, and the discussion action is replaced by the latent strategy. The state in the abstracted game is a vector including information like the player's role, secret action, etc., and history of past latent strategies. The transition dynamics and payoff function remain unchanged in the abstracted game. This representation retains the key strategic elements of the original game while reducing the complexity of the action space, making large-scale gamesolving computationally tractable. Detailed description of the abstracted game can be found in Appendix A. + +Policy Optimization. Once the game is represented in this discrete form, we apply CFR to learn a policy and solve the abstracted game. Classical CFR (Zinkevich et al., 2007) iteratively improves policies by minimizing counterfactual regret $R$ for each information set. For each iteration $t$ , the regret for each action $a$ in the latent space is updated by: + +$$ +R _ {t} (a) = R _ {t - 1} (a) + u \left(\sigma_ {t} ^ {a}, \sigma_ {t} ^ {- a}\right) - u \left(\sigma_ {t}\right), \tag {1} +$$ + +where $u(\sigma_t^a, \sigma_t^{-a})$ is the utility of taking action $a$ under the current strategy profile $\sigma_t$ , and $u(\sigma_t)$ is the utility under the full strategy profile. We use neural networks to approximate regret value to scale CFR to more complex games and learn a policy for each different role in the Werewolf game. By repeatedly simulating self-play among agents employing Deep CFR in the abstracted game, each role's policy converges to a near-optimal strategy profile. The resulting latent space policies address the intrinsic bias in action distribution and achieve strong strategic play in the abstracted game. + +# 3.3. Latent Space Expansion + +To further improve the agent's performance in free-form language games, the latent space must remain sufficiently expressive to cover novel strategies and resist exploitation by out-of-distribution actions. We achieve this by fine-tuning the LLM to align with the learned policy in the abstracted game and then re-generating and expanding the latent strategy space using the fine-tuned LLM. This iterative process progressively increases exploration of the action space, enabling stronger and more robust decision-making. + +Alignment to Latent Space Policy. We employ Direct Preference Optimization (DPO) (Rafailov et al., 2024) to + +![](images/e960b9f4a9cd75a32735aaa796c1b5abac5db4fc51e25f7aba277b7ca9b1816e.jpg) +Figure 2: The action distributions and exploitabilities (exp.) of different agents in the Rock-Paper-Scissors-Spock-Lizard game. The Nash equilibrium is to choose each action with an equal probability of $1/5$ and has an exploitability of 0. + +fine-tune the LLM so that its open-ended language outputs align with the near-optimal strategies derived from the abstracted game. To construct the preference dataset required by DPO, we leverage game trajectories generated during latent space construction. We record the language observation for the LLM agent at each discussion phase as the prompt, and use the $N$ discussion candidates as the response candidates. Each of the discussion candidates can be mapped to one of the latent strategies, and the preference label is determined by the regret value of the latent strategies. Intuitively, a discussion action with a lower regret value is preferred. With this preference dataset, we perform DPO to align the LLM toward the learned policy in the abstracted game for better performance in the original game. + +Update of Latent Space. Once the LLM is fine-tuned, it can produce a broader distribution of actions that reflect the refined policy. We exploit this enhanced generative capacity to expand the latent space in the next iteration. Specifically, we repeat the latent strategy generation and clustering procedures with the fine-tuned LLM to re-generate and expand the latent strategy space. This updated latent space offers increased exploration of potential strategies, enabling subsequent policy optimization to discover previously unexplored high-reward actions. Through iterative alignment and expansion, the agent continually refines its discussion strategies and achieves strong play in the free-form language game. + +# 4. Experiments + +To demonstrate the effectiveness of the LSPO framework, we first consider a proof-of-concept game to show how LSPO overcomes intrinsic bias and addresses the exploration issue. Then we conduct extensive experiments in the Werewolf game with Llama-3-8B-Instruct as our base model. We visualize how the latent strategy space evolves to show that our agents progressively acquire more complex strategic behaviors. We then quantitatively evaluate the performance of our LSPO agent using prediction accuracy and win rate to show the improving performance over iterations. We also compare the LSPO agent with four state-of-the-art + +agents, showing that our agents achieve the highest win rate on both the Werewolf side and the Village side. We further perform ablation studies to assess the effectiveness of specific designs in our framework. More implementation and experiment details can be found in Appendix B. + +# 4.1. Proof-of-Concept Example + +We consider Rock-Paper-Scissors-Spock-Lizard, a five-choice extension of the classic Rock-Paper-Scissors game. Although it is not a free-form language game, it serves as a simple proof-of-concept game that highlights the motivation of our method. The intrinsic bias in action distributions is inherited from the imbalanced LLM pre-training data, and the exploration issue is introduced by the two additional actions of Spock and Lizard. The Nash equilibrium (NE) of this game is to choose each action with an equal probability of $1/5$ . We compare LSPO agents of different iterations with two baselines, including Reason and Act (ReAct) (Yao et al., 2022b) and Strategic Language Agent (SLA) (Xu et al., 2023c), and the action distributions and exploitations of different agents are shown in Figure 2. + +The evaluation results show that the LSPO agent of iteration 3 learns the NE of the game while other agents fail. ReAct agent suffers from the intrinsic bias issue and has higher probabilities to choose Rock, Paper, and Scissors, and much lower probabilities to choose Spock and Lizard. SLA, on the other hand, is hindered by inadequate action exploration. SLA uses LLMs to propose $N$ actions and RL to learn the optimal policy. A typical value of $N = 3$ results in a subgame without the other 2 action, and the NE of the subgame is not the NE of the original game. Our LSPO agent addresses these two challenges by iteratively expanding the action space. As it covers the full action space with 3 iterations, the LSPO agent learns the NE of the game. + +# 4.2. Latent Space Visualization + +To gain insight into how LSPO organizes free-form language actions into discrete latent strategies, we first visualize the latent strategy space constructed at different training qua + +![](images/7d7fe36a6c28d1bb1c23868c46046cb9c0d3d8cbd80a007c420bdcd642fb4a1b.jpg) +Werewolf's Latent Space +Iter. 1 +Figure 3: Visualization of the latent strategic space of Werewolf and Seer in different LSPO iterations. + +![](images/67542c991e1a521adf9337fac38947f55f7887011e74f1d5d334c5e27440f5ea.jpg) +Iter. 2 + +![](images/8521cbc8866a31fd5642ca2745abe5ce0b808a20dbadd3a3d852e3473851e359.jpg) +Iter. 3 + +![](images/b8139a3f312cc107c1fc9c5b0a438fae663142c6d3bd615653fda852ee79a9d1.jpg) +Seer's Latent Space +Iter. 1 + +![](images/e7375c46acf32502c2b2ee9d6dbbdce7a6813789c6d96b8b2f1272963461c10a.jpg) +Iter. 2 + +![](images/817c50addd46828f7d52973fcaf5227d8dbf3d3ba94065ce5cd1b7dec7a5938d.jpg) +Iter. 3 + +tions. Specifically, for each role in the Werewolf game, we gather the utterances generated by the LSPO agent in 100 games, embed them with the sentence encoder, and apply dimensionality reduction for projection. The visualization of latent spaces for the Werewolf and the Seer in different iterations is shown in Figure 3. Earlier iterations yield relatively indistinct clusters, reflecting a lack of strategic diversity. Over successive iterations, clearer and more refined clusters emerge, indicating that the LSPO agent evolves toward an increasingly structured latent space and learn to express different strategic intentions such as accusing specific roles, defending teammates, and bluffing. + +Werewolf's Latent Space. In the first iteration, the latent space of the Werewolf is dominated by three main clusters. The blue cluster corresponds to a simple strategy of concealing its role or pretending to be a villager, while the smaller orange cluster reflects strategies like pretending to be a Seer or a Doctor. There is even a green cluster corresponding to unintentionally revealing the true role of a Werewolf, which is obviously a flawed strategy. As training proceeds, we see more sophisticated patterns emerge. The flawed strategy of disclosing one's Werewolf role disappears, and the agent begins to incorporate deliberate bluffs and misdirections instead. For example, the red cluster features the agent pretending to be a Seer and providing fabricated investigative results to sow confusion, and the purple cluster centers on defending the teammate and redirecting suspicion onto other players, leveraging more nuanced language and reasoning to guide the conversation toward scapegoats. This refined partitioning demonstrates that the Werewolf agent progressively covers an increasing number of latent strategies. + +Seer's Latent Space. In the first iteration, the Seer's latent space is relatively coarse, containing primarily two strategies including staying silent about its true role or revealing its role and sharing information. This shows a limited range of strategic diversity in the early stage. As training proceeds through the second and third iterations, the Seer's latent space becomes more diverse. The emergent red cluster features direct accusations once the Seer identifies a Werewolf, while the green cluster corresponds to concealing the role + +yet subtly guiding discussions to protect verified teammates. Notably, by the final iteration, the model develops a voting coordination strategy in which the Seer explicitly asks all the Villagers to vote for a strongly suspected Werewolf to maximize the Villager's chance of success. This progression implies that the Seer agent increasingly learns to balance openness and secrecy, aligning its communication style with the evolving game context to better support the Village side. + +# 4.3. Iterative Performance Evaluation + +We then evaluate how the performance of our LSPO agent progresses with more iterations, demonstrating that our framework produces increasingly stronger strategic language agents over time. We focus on two key metrics including prediction accuracy and win rate. + +Prediction Accuracy. Accurate role identification is a critical aspect of Werewolf, as it underpins effective decision-making and voting. Therefore, we measure the agent's ability to predict the roles of other players with an additional prediction phase before each voting phase in a Werewolf game. Specifically, we use the final-iteration LSPO agent as the fixed opponent and let LSPO agents at different iterations play against this opponent for 100 games. For the Werewolf side, a higher prediction accuracy of crucial roles like Seer and Doctor allows them to eliminate these threats earlier. Conversely, for the Village side, a higher prediction accuracy of Werewolves improves their chance to vote out the Werewolf and win the game. + +Win Rate. While prediction accuracy serves as an intermediate metric to evaluate the agents' reasoning and decision-making ability, we also use the win rate as a direct measure of the performance of our agents. Similar to the evaluation of prediction accuracy, we use the final-iteration LSPO agent as the fixed opponent and let our agents at different iterations play 100 games against the opponent. A higher win rate indicates a stronger performance in the game. + +As shown in Table 1, both prediction accuracy and win rate exhibit a clear growing trend as the iteration increases, indicating that our iterative LSPO framework steadily strength- + +
Prediction AccuracyWin Rate
WerewolfSeerDoctorVillagerOverall
Werewolf SideIter. 10.98 ± 0.010.61 ± 0.090.49 ± 0.080.70 ± 0.070.74 ± 0.060.54 ± 0.13
Iter. 20.99 ± 0.010.68 ± 0.070.59 ± 0.060.77 ± 0.090.79 ± 0.060.63 ± 0.09
Iter. 30.99 ± 0.000.73 ± 0.080.67 ± 0.070.81 ± 0.110.83 ± 0.070.73 ± 0.11
Village SideIter. 10.59 ± 0.060.47 ± 0.040.55 ± 0.050.67 ± 0.070.60 ± 0.060.18 ± 0.09
Iter. 20.66 ± 0.060.53 ± 0.070.61 ± 0.060.75 ± 0.080.67 ± 0.070.23 ± 0.12
Iter. 30.72 ± 0.090.58 ± 0.080.65 ± 0.070.82 ± 0.080.73 ± 0.070.27 ± 0.11
+ +Table 1: The prediction accuracy and win rate of the LSPO agents in different iterations. + +
Win RateReActReConCicero-likeSLALSPO Agent (Ours)
As the Werewolf Side0.58 ± 0.150.60 ± 0.120.66 ± 0.060.69 ± 0.120.73 ± 0.11
As the Village Side0.16 ± 0.060.16 ± 0.080.21 ± 0.040.25 ± 0.080.27 ± 0.11
Overall0.38 ± 0.110.38 ± 0.100.44 ± 0.050.47 ± 0.100.50 ± 0.11
+ +Table 2: Comparison between our LSPO agent with state-of-the-art agents in the Werewolf game. + +ens the agents' reasoning and decision-making capabilities. From the Werewolf side, the identification rate for the Seer starts off relatively high but has only modest improvement. This is because the Seer often reveals its roles to share information, making it easier for the Werewolf side to identify. By contrast, the Werewolf's prediction accuracy of the Doctor shows more significant gains, reflecting the strategic importance of eliminating the Doctor who can save potential victims. On the Village side, identifying the Werewolf and the Seer benefits most from iterative learning, since confirming these central roles is crucial for coordinated voting and elimination of Werewolves. Overall, these results confirm that our framework consistently improves the strategic language abilities of the LSPO agent, enabling it to adapt and excel in complex social deduction scenarios with each additional iteration. + +# 4.4. Comparison with State-of-the-Art Agents + +We compare the performance of the LSPO agent in the Werewolf game with four state-of-the-art agents including Reason and Act (ReAct) (Yao et al., 2022b), Recursive Contemplation (ReCon) (Wang et al., 2023b), a Cicero-like agent (Meta et al., 2022), and Strategic Language Agent (SLA) (Xu et al., 2023c). As some of these methods were not initially developed for Werewolf, we make minor modifications to ensure compatibility with our experimental setting while preserving each approach's core design. + +ReAct. ReAct is a classic prompt-based method that synergizes reasoning and acting for agent tasks. We implement ReAct for the Werewolf game by providing the LLM with raw game observations to generate both intermediate reasoning and final actions within a single prompt. + +ReCon. ReCon is another prompt-based method designed for Avalon agents. The ReCon agent is prompted to first think from its own perspective and then think from its opponents' perspective to generate the final action. We make slight modifications in the prompt to apply ReCon in the Werewolf game. + +Cicero-Like. The Cicero agent is created for the game of Diplomacy with finite action space and consists of a strategic reasoning module and a dialogue module. We implement a Cicero-like agent for the Werewolf game by predefining an action space of 13 primitive actions like "claim to be the Seer", "do not reveal role", etc. An RL policy is learned to select these actions in each state and generate action-conditioned languages in the game. + +SLA. SLA combines reinforcement learning and LLM to overcome intrinsic bias and build strategic language agents for the Werewolf game. We adopt the same implementation as described in the paper (Xu et al., 2023c). + +We compare our final-iteration LSPO agent with the aforementioned four baselines through two head-to-head evaluation setups. In the first setup, our LSPO agent takes the Werewolf side and we let each of the five agents including our agent and four baseline agents take the Village side to play 100 Werewolf games with our LSPO agent. This setup measures the Village side's win rate against the LSPO agent as the Werewolves. In the second setup, we reverse the roles and let the LSPO agent take the Village side and compare the win rate of five agents as the Werewolves averaged over 100 games. As shown in the bold numbers in Table 2, our LSPO agent achieve the highest win rates both as the Werewolves and as the Villagers. + +
Win RateVillage SideWerewolf Side
LSPO Iter. 10.18 ± 0.090.54 ± 0.13
w/o Fine-Tuning0.15 ± 0.090.47 ± 0.14
w/o Policy Learning0.12 ± 0.070.38 ± 0.16
+ +The strong performance of our LSPO agent is largely attributable to its iterative interplay between latent space strategy learning and preference-based fine-tuning, which refines both language and decision-making over time. By contrast, ReAct and ReCon rely on prompt-based approaches without game-theoretic updates, leaving them susceptible to intrinsic biases from pretraining data and limiting their performance in complex decision-making tasks. The Cicero-like agent is constrained by a predefined action set, making it difficult to evolve more subtle and diverse strategies as the game progresses. SLA partially addresses the intrinsic bias issues by generating multiple candidate actions and using RL to select from them. However, it still relies on a prompt-based method that can suffer from limited exploration of potential strategies. In comparison, our LSPO method integrates CFR's policy improvement and latent-space cluster refinement with preference-based LLM alignment, enabling it to explore, exploit, and continuously expand the range of viable strategic moves in social deduction games. + +# 4.5. Ablation Studies + +Key Components. To show the effectiveness of the three key components in LSPO agents, we compare the LSPO agent in iteration 1 with two ablation agents. The first ablation agent, denoted as "w/o Fine-Tuning", removes the third component and only performs latent space construction and policy optimization in the latent space. To generate discussion action in gameplay, this agent first uses the latent space policy to sample a latent strategy, then the previously collected discussions corresponding to the latent strategy are used as few-shot examples to prompt the LLM for the discussion action. The second ablation agent, denoted as "w/o Policy Learning", removes the second component of policy optimization in the latent space. Instead, it uses gpt-3.5 to generate the preference data and uses DPO to train for 1 iteration. As shown in Table 3, the LSPO agent in iteration 1 achieves the best result on both the Villager and the Werewolf side. These results demonstrate that the policy optimization component helps agents learn stronger strategies, while the fine-tuning component helps LLMs better generalize to new language actions beyond the collected samples and expand the latent strategic space. + +# Number of Initial Clusters. + +To examine the robustness of our method, we perform a + +Table 3: Ablation on key components of LSPO agents. + +
Win RateIter. 1Iter. 2Iter. 3
k = 10.13 ± 0.060.20 ± 0.100.24 ± 0.11
k = 20.22 ± 0.110.24 ± 0.120.25 ± 0.08
k = 30.23 ± 0.090.25 ± 0.060.25 ± 0.07
+ +Table 4: Ablation on cluster size. + +
Win RateIter. 1Iter. 2Iter. 3
k = 10.22 ± 0.100.24 ± 0.080.25 ± 0.08
k = 20.22 ± 0.110.24 ± 0.120.25 ± 0.08
k = 30.23 ± 0.070.25 ± 0.090.25 ± 0.06
+ +Table 5: Ablation on DPO hyperparameters. + +sensitivity analysis on the number of initial clusters. We consider a simpler four-player Werewolf game (one Werewolf, one Seer, and two Villagers) and run LSPO with different numbers of initial clusters $k = 1,2,3$ and evaluate the Werewolf's win rate. The results in Table 4 show that larger numbers of initial clusters generally lead to better performance in the early iterations, but do not influence the final performance after three iterations. + +Fine-Tuning Hyperparameters. We also perform a sensitivity analysis to evaluate our method's robustness to fine-tuning hyperparameters. We also consider the simpler four-player game and perform ablations on DPO $\beta = 0.05, 0.1, 0.2$ . The results in Table 5 show that our method achieves comparable results with different choices of $\beta$ and is robust to fine-tuning hyperparameters. + +# 5. Related Work + +# Large Language Model-Based Agents. + +Recent advancements in large language models (LLMs) have led to the development of agents capable of performing complex tasks across various domains, such as web interactions (Nakano et al., 2021; Yao et al., 2022a; Deng et al., 2023), code generation (Chen et al., 2021; Yang et al., 2024), gaming environments (Huang et al., 2022a; Wang et al., 2023c;a; Ma et al., 2023), real-world robotics (Ahn et al., 2022; Huang et al., 2022b; Vemprala et al., 2023), and multiagent systems (Park et al., 2023; Li et al., 2023; Chen et al., 2023b). A common approach in these works is to exploit the reasoning capabilities and in-context learning of LLMs to improve decision-making processes. Chain-of-Thought (CoT) prompting (Wei et al., 2022) has been instrumental in enabling LLMs to perform step-by-step reasoning. Building upon this, ReAct (Yao et al., 2022b) synergizes reasoning and action to enhance performance across various tasks. Subsequent research has incorporated self-reflection (Shinn et al., 2023) and strategic reasoning (Gandhi et al., 2023) to + +further refine agent behaviors. However, these methods can still suffer from the intrinsic biases and exploration issue of LLM-based agents, leading to suboptimal performance in complex games. A representative method that addresses these issues in the game of Diplomacy is Cicero (Meta et al., 2022), which first uses a strategic module to produce action intent and then generates action-conditioned natural languages with a dialogue module. However, Diplomacy is a board game with finite action space and does not have the exploration issue, making it not suitable for free-form language games with unbounded text action space. + +Due to the high demand for both advanced communication skills and strategic reasoning, social deduction games like Werewolf and Avalon have been proposed as testbeds to build language agents with strategic ability. Earlier attempts to create agents for these games often rely on predefined protocols or limited communication capabilities (Wang & Kaneko, 2018), restricting their effectiveness. Recent works have explored using LLMs to enable natural language interactions in these games. For instance, Xu et al. (2023a) developed a prompt-based Werewolf agent that uses heuristic information retrieval and experience reflection. Similarly, ReCon (Wang et al., 2023b) introduced a prompt-based method for playing Avalon by considering both the agent's perspective and that of opponents. However, these LLM-based agents may still be restricted by intrinsic bias and limited exploration of the action space, affecting their decision-making quality. Strategic Language Agent (SLA) (Xu et al., 2023c) partially solves these issues by generating diverse action candidates and learning an RL policy to mitigate intrinsic bias. However, this method still relies on a fixed LLM to produce the action candidates, which can fail to address the exploration issue. Our approach mitigates the intrinsic bias by applying game-theoretic methods to optimize policy in a discrete latent strategy space and tackles the exploration issue by iteratively expanding the latent space by aligning the LLM to the latent space policy, leading to strong performance in the Werewolf game. + +Game-Theoretic Algorithms. Counterfactual Regret Minimization (CFR) (Zinkevich et al., 2007) is a foundational algorithm for solving imperfect-information games, particularly those involving hidden information and strategic deception like poker (Moravčík et al., 2017; Brown & Sandholm, 2018; 2019). The core principle of CFR is to iteratively reduce regret across players' decision points in the game tree, converging toward strategies that approximate a Nash equilibrium. Subsequent refinements of CFR (Lancot et al., 2009; Tammelin, 2014; Brown et al., 2019) have expanded its scalability and adaptability to a broader range of scenarios. Of particular note is DeepRole (Serrino et al., 2019), which integrates deductive reasoning with CFR to play the social deduction game Avalon without communication. Our method combines CFR with language models + +by introducing a finite latent strategy space to enable it to solve free-form language games. + +Reinforcement learning (RL) methods, on the other hand, have reached remarkable achievements in complex domains like Go (Silver et al., 2016; 2018) and video games (Vinyals et al., 2019; Berner et al., 2019), often surpassing expert human performance. A seminal technique in these successes is self-play and its variants(Heinrich et al., 2015; Heinrich & Silver, 2016; Hennes et al., 2020; Xu et al., 2023b), where agents repeatedly train against older versions of themselves to refine their policies. Another prominent line of work is Policy-Space Response Oracles (PSRO) (Lanctot et al., 2017; Muller et al., 2019), an iterative procedure that produces best responses to a growing population of policies in a meta-game. Conceptually, our iterative framework is related to PSRO in that we both solve an abstracted game before enlarging it to approach the full original game. The difference is that PSRO treats newly learned policies as meta-actions to form a normal-form meta-game, whereas our approach clusters free-form language actions into a discrete latent action space to reformulate the original game as an extensive-form game with finite action space. + +# 6. Conclusion + +In this work, we presented Latent Space Policy Optimization (LSPO), an iterative framework that combines structured game-theoretic methods with the expressive power of large language models to build strategic language agents in free-form strategic language games. By abstracting unconstrained language action space into a discrete latent strategy space, our approach enables efficient CFR in the latent space to overcome intrinsic bias and learn strong strategies. We then perform iterative fine-tuning via DPO to align the LLM's language generation with the evolving strategy and expand the latent strategy space to address the exploration issue. Our extensive evaluation in the Werewolf game demonstrates that LSPO not only addresses intrinsic biases and exploration issues inherent in prompt-based agents, but also achieves increasing performance with respect to iterations and outperforms four state-of-the-art baseline agents. Looking ahead, we envision LSPO's synergy of latent-space abstraction and preference-based language alignment can be extended to a variety of other complex decision-making tasks with free-form language actions. + +# Acknowledgements + +This work was supported by National Natural Science Foundation of China (No.62406159, 62325405), Postdoctoral Fellowship Program of CPSF under Grant Number (GZC20240830, 2024M761676), China Postdoctoral Science Special Foundation 2024T170496. + +# Impact Statement + +Our research advances the capabilities of LLM-based agents in a purely text-based Werewolf environment. While this setting allows the agents to develop robust decision-making and deception-detection skills, it also underscores the potential for misuse if similar techniques were to be adapted to real-world scenarios involving manipulation or misinformation. To mitigate these risks, our implementation remains strictly focused on text-based simulation and does not directly transfer to broader applications without additional safeguards. At the same time, our experiment results indicate that our agent could be used to identify potential deceptive and manipulative content. We envision that any future extensions of this work will require careful consideration of ethical guidelines and responsible deployment strategies to ensure that such language agent systems serve society constructively. + +# References + +Ahn, M., Brohan, A., Brown, N., Chebotar, Y., Cortes, O., David, B., Finn, C., Fu, C., Gopalakrishnan, K., Hausman, K., et al. Do as i can, not as i say: Grounding language in robotic affordances. arXiv preprint arXiv:2204.01691, 2022. +Bailis, S., Friedhoff, J., and Chen, F. Werewolf arena: A case study in llm evaluation via social deduction. arXiv preprint arXiv:2407.13943, 2024. +Berner, C., Brockman, G., Chan, B., Cheung, V., Debiak, P., Dennison, C., Farhi, D., Fischer, Q., Hashme, S., Hesse, C., et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019. +Brohan, A., Brown, N., Carbajal, J., Chebotar, Y., Chen, X., Choromanski, K., Ding, T., Driess, D., Dubey, A., Finn, C., et al. Rt-2: Vision-language-action models transfer web knowledge to robotic control. arXiv preprint arXiv:2307.15818, 2023. +Brown, N. and Sandholm, T. Superhuman ai for heads-up no-limit poker: Libratus beats top professionals. Science, 359(6374):418-424, 2018. +Brown, N. and Sandholm, T. Superhuman ai for multiplayer poker. Science, 365(6456):885-890, 2019. +Brown, N., Lerer, A., Gross, S., and Sandholm, T. Deep counterfactual regret minimization. In International conference on machine learning, pp. 793-802. PMLR, 2019. +Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33: 1877-1901, 2020. + +Chen, B., Shu, C., Shareghi, E., Collier, N., Narasimhan, K., and Yao, S. Fireact: Toward language agent fine-tuning. arXiv preprint arXiv:2310.05915, 2023a. +Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. D. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. +Chen, W., Su, Y., Zuo, J., Yang, C., Yuan, C., Qian, C., Chan, C.-M., Qin, Y., Lu, Y., Xie, R., et al. Agentverse: Facilitating multi-agent collaboration and exploring emergent behaviors in agents. arXiv preprint arXiv:2308.10848, 2023b. +Deng, X., Gu, Y., Zheng, B., Chen, S., Stevens, S., Wang, B., Sun, H., and Su, Y. Mind2web: Towards a generalist agent for the web. arXiv preprint arXiv:2306.06070, 2023. +Gandhi, K., Sadigh, D., and Goodman, N. D. Strategic reasoning with language models. arXiv preprint arXiv:2305.19165, 2023. +Heinrich, J. and Silver, D. Deep reinforcement learning from self-play in imperfect-information games. arXiv preprint arXiv:1603.01121, 2016. +Heinrich, J., Lanctot, M., and Silver, D. Fictitious self-play in extensive-form games. In International conference on machine learning, pp. 805-813. PMLR, 2015. +Hennes, D., Morrill, D., Omidshafiei, S., Munos, R., Perolat, J., Lanctot, M., Gruslys, A., Lespiau, J.-B., Parmas, P., Duñez-Guzman, E., et al. Neural replicator dynamics: Multiagent learning via hedging policy gradients. In Proceedings of the 19th international conference on autonomous agents and multiagent systems, pp. 492-501, 2020. +Huang, W., Abbeel, P., Pathak, D., and Mordatch, I. Language models as zero-shot planners: Extracting actionable knowledge for embodied agents. In International Conference on Machine Learning, pp. 9118-9147. PMLR, 2022a. +Huang, W., Xia, F., Xiao, T., Chan, H., Liang, J., Florence, P., Zeng, A., Tompson, J., Mordatch, I., Chebotar, Y., et al. Inner monologue: Embodied reasoning through planning with language models. arXiv preprint arXiv:2207.05608, 2022b. +Lai, B., Zhang, H., Liu, M., Pariani, A., Ryan, F., Jia, W., Hayati, S. A., Rehg, J. M., and Yang, D. Werewolf among us: A multimodal dataset for modeling persuasion behaviors in social deduction games. arXiv preprint arXiv:2212.08279, 2022. + +Lanctot, M., Waugh, K., Zinkevich, M., and Bowling, M. Monte carlo sampling for regret minimization in extensive games. Advances in neural information processing systems, 22, 2009. +Lanctot, M., Zambaldi, V., Gruslys, A., Lazaridou, A., Tuyls, K., Pérolat, J., Silver, D., and Graepel, T. A unified game-theoretic approach to multiagent reinforcement learning. Advances in neural information processing systems, 30, 2017. +Li, G., Hammoud, H. A. A. K., Itani, H., Khizbullin, D., and Ghanem, B. Camel: Communicative agents for" mind" exploration of large scale language model society. arXiv preprint arXiv:2303.17760, 2023. +Liu, J., Yu, C., Gao, J., Xie, Y., Liao, Q., Wu, Y., and Wang, Y. Llm-powered hierarchical language agent for real-time human-ai coordination. arXiv preprint arXiv:2312.15224, 2023. +Ma, W., Mi, Q., Yan, X., Wu, Y., Lin, R., Zhang, H., and Wang, J. Large language models play starcraft ii: Benchmarks and a chain of summarization approach. arXiv preprint arXiv:2312.11865, 2023. +Meta, Bakhtin, A., Brown, N., Dinan, E., Farina, G., Flaherty, C., Fried, D., Goff, A., Gray, J., Hu, H., et al. Human-level play in the game of diplomacy by combining language models with strategic reasoning. Science, 378(6624):1067-1074, 2022. +Mnih, V. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013. +Moravčík, M., Schmid, M., Burch, N., Lisý, V., Morrill, D., Bard, N., Davis, T., Waugh, K., Johanson, M., and Bowling, M. Deepstack: Expert-level artificial intelligence in heads-up no-limit poker. Science, 356(6337):508-513, 2017. +Muller, P., Omidshafiei, S., Rowland, M., Tuyls, K., Perolat, J., Liu, S., Hennes, D., Marris, L., Lanctot, M., Hughes, E., et al. A generalized training approach for multiagent learning. arXiv preprint arXiv:1909.12823, 2019. +Nakano, R., Hilton, J., Balaji, S., Wu, J., Ouyang, L., Kim, C., Hesse, C., Jain, S., Kosaraju, V., Saunders, W., et al. Webgpt: Browser-assisted question-answering with human feedback. arXiv preprint arXiv:2112.09332, 2021. +Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730-27744, 2022. + +Park, J. S., O'Brien, J. C., Cai, C. J., Morris, M. R., Liang, P., and Bernstein, M. S. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442, 2023. +Rafailov, R., Sharma, A., Mitchell, E., Manning, C. D., Ermon, S., and Finn, C. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024. +Russell, S. J. and Norvig, P. Artificial intelligence: a modern approach. Pearson, 2016. +Serrino, J., Kleiman-Weiner, M., Parkes, D. C., and Tenenbaum, J. Finding friend and foe in multi-agent games. Advances in Neural Information Processing Systems, 32, 2019. +Shinn, N., Labash, B., and Gopinath, A. Reflexion: an autonomous agent with dynamic memory and self-reflection. arXiv preprint arXiv:2303.11366, 2023. +Silver, D., Huang, A., Maddison, C. J., Guez, A., Sifre, L., Van Den Driessche, G., Schrittwieser, J., Antonoglou, I., Panneershelvam, V., Lanctot, M., et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484-489, 2016. +Silver, D., Hubert, T., Schrittwieser, J., Antonoglou, I., Lai, M., Guez, A., Lanctot, M., Sifre, L., Kumaran, D., Graepel, T., et al. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419):1140-1144, 2018. +Tammelin, O. Solving large imperfect information games using cfr+. arXiv preprint arXiv:1407.5042, 2014. +Vemprala, S., Bonatti, R., Tucker, A., and Kapoor, A. Chatgpt for robotics: Design principles and model abilities. Microsoft Auton. Syst. Robot. Res, 2:20, 2023. +Vinyals, O., Babuschkin, I., Czarnecki, W. M., Mathieu, M., Dudzik, A., Chung, J., Choi, D. H., Powell, R., Ewalds, T., Georgiev, P., et al. Grandmaster level in starcraft ii using multi-agent reinforcement learning. Nature, 575 (7782):350-354, 2019. +Wang, G., Xie, Y., Jiang, Y., Mandlekar, A., Xiao, C., Zhu, Y., Fan, L., and Anandkumar, A. Voyager: An open-ended embodied agent with large language models. arXiv preprint arXiv:2305.16291, 2023a. +Wang, S., Liu, C., Zheng, Z., Qi, S., Chen, S., Yang, Q., Zhao, A., Wang, C., Song, S., and Huang, G. Avalon's game of thoughts: Battle against deception through recursive contemplation. arXiv preprint arXiv:2310.01320, 2023b. + +Wang, T. and Kaneko, T. Application of deep reinforcement learning in werewolf game agents. In 2018 Conference on Technologies and Applications of Artificial Intelligence (TAAI), pp. 28-33. IEEE, 2018. +Wang, Z., Cai, S., Liu, A., Ma, X., and Liang, Y. Describe, explain, plan and select: Interactive planning with large language models enables open-world multi-task agents. arXiv preprint arXiv:2302.01560, 2023c. +Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35: 24824-24837, 2022. +Wooldridge, M. and Jennings, N. R. Intelligent agents: Theory and practice. The knowledge engineering review, 10(2):115-152, 1995. +Wu, S., Zhu, L., Yang, T., Xu, S., Fu, Q., Wei, Y., and Fu, H. Enhance reasoning for large language models in the game werewolf. arXiv preprint arXiv:2402.02330, 2024. +Xu, Y., Wang, S., Li, P., Luo, F., Wang, X., Liu, W., and Liu, Y. Exploring large language models for communication games: An empirical study on werewolf. arXiv preprint arXiv:2309.04658, 2023a. +Xu, Z., Liang, Y., Yu, C., Wang, Y., and Wu, Y. Fictitious cross-play: Learning global nash equilibrium in mixed cooperative-competitive games. In Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems, pp. 1053–1061, 2023b. +Xu, Z., Yu, C., Fang, F., Wang, Y., and Wu, Y. Language agents with reinforcement learning for strategic play in the werewolf game. arXiv preprint arXiv:2310.18940, 2023c. +Yang, J., Jimenez, C. E., Wettig, A., Lieret, K., Yao, S., Narasimhan, K., and Press, O. Swe-agent: Agent-computer interfaces enable automated software engineering. arXiv preprint arXiv:2405.15793, 2024. +Yao, S., Chen, H., Yang, J., and Narasimhan, K. Webshop: Towards scalable real-world web interaction with grounded language agents. Advances in Neural Information Processing Systems, 35:20744-20757, 2022a. +Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., and Cao, Y. React: Synergizing reasoning and acting in language models. arXiv preprint arXiv:2210.03629, 2022b. +Zinkevich, M., Johanson, M., Bowling, M., and Piccione, C. Regret minimization in games with incomplete information. Advances in neural information processing systems, 20, 2007. + +# A. Werewolf Game Implementation Details + +# A.1. Game Rules + +Setup. Each game begins by randomly assigning seven roles—two Werewolves, one Seer, one Doctor, and three Villagers—to seven different players labeled "player_0," "player_1," ..., "player_6." The two Werewolves are aware of each other's identities, while the Seer, Doctor, and Villagers only know their own roles. + +Night Round. During the Night round, only the surviving Werewolves, Seer, and Doctor take secret actions that are disclosed only to the relevant parties. + +- Werewolf: The living Werewolves collectively decide on a target to kill, but they follow a specific order when there are two of them. First, the Werewolf with the smaller ID proposes a target; the other Werewolf then makes the final decision. For instance, if "player_0" and "player_2" are Werewolves, "player_0" proposes "player_i," and "player_2" chooses the ultimate kill target "player_j." If only one Werewolf is alive, that Werewolf's decision stands. Werewolves cannot kill a dead player, themselves, or their teammate. +- Seer: The Seer selects a living player to investigate, revealing whether that player is a Werewolf. The Seer may not investigate a dead player or themselves, although they are allowed to investigate the same player on different nights (albeit a less effective strategy). +- Doctor: The Doctor selects a player to protect, without knowledge of the Werewolves' choice. The Doctor cannot save someone who is already dead but can choose to save themselves. + +Day Round. The day round proceeds with three phase including announcement, discussion, and voting. + +- Announcement: at the start of the Day round, the events of the previous night are made public to all players still in the game. Anyone killed during the Night round is immediately removed and cannot reveal their role or participate in discussions. Two scenarios determine the announcement: if the Werewolves targeted "player_i" and the Doctor either saved a different "player_j" or was no longer alive, "player_i" is killed, and the announcement states: "player_i was killed last night." If the Doctor saved exactly the same person the Werewolves intended to kill ("player_i"), then no one is killed, and the announcement is: "no player was killed last night." +- Discussion: all surviving players join an open discussion in a set speaking order, each speaking exactly once. If, for example, the remaining players are "player_0," "player_2," and "player_5," then "player_0" speaks first, followed by "player_2," and concluding with "player_5." +- Voting: after the discussion, all surviving players simultaneously vote to eliminate one other player or choose to abstain. They are not allowed to vote for a dead player or for themselves. The individual who receives the most votes is eliminated without role disclosure. In the event of a tie, one of the tied players is randomly chosen to be eliminated. Everyone knows the final voting tally. + +Winning. The Werewolves win if, at any point, the number of living Werewolves is equal to that of all other remaining players. They do not need to eliminate every non-Werewolf to claim victory. Conversely, the Villagers (including the Seer and Doctor) win once both Werewolves have been eliminated. + +# A.2. Observation Space + +Language Observation. Each agent's language observation is represented as a list of natural language statements that log the game's history up to the current step. This list comprises both private information, which is accessible only to the current player, and public information, which is shared among all players. The private information includes the player's role, secret actions taken during the night phase by the Werewolf, Seer, and Doctor, as well as the Werewolf's teammate. On the other hand, the public information consists of the player's ID, the eliminated player in each night and day phase, discussions, and voting outcomes from each day phase. An example of the language observation is as follow. + +Basic Information: + +- you are player_5, your role is Doctor. +- current round and phase: night 2. +- remaining players: player_0, player_1, player_2, player_5, player_6. + +Round 1: + +- night 1: you chose to save player_5. +- day 1 announcement: player_4 was killed last night. +day 1 discussion: + +- player_0 said: Good day, fellow players. As a Villager, my objective is to help identify and eliminate the Werewolves. Since player_4 was killed last night, we know there is at least one Werewolf among us. I would like to hear everyone's thoughts and suspicions about who might be the Werewolves. Let's work together to find the culprits and ensure the safety of our village. + +- player_1 said: ... +- player_2 said: ... +- player_3 said: ... +- you said: ... +- player_6 said: ... + +- day 1 voting result: player_3 had the most votes and was eliminated. + +- voted for player_3: player_1, player_6. +- voted for player_1: player_3. +- choose not to vote: player_0, player_2, player_5. + +Now it is night 2 round and you should choose one player to save. As player_5 and the Doctor, you should choose from the following actions: save player_0, save player_1, save player_2, save player_5, save player_6. + +Vector Observation. We also consider a vectorized observation. The observation vector includes information like the player's ID, role, deductions, etc. by one-hot encoding. The details of the observation vector are listed in Table 6 + +
LengthDescription
ID7one hot encoding of ID.
Role4one hot encoding of role, +[“Werewolf”, “Seer”, “Doctor”, “Villager”].
Round1current round.
Phase3one hot encoding of current phase, +[“night”, “discussion”, “voting”].
Alive players7alive flag for each player.
For each round +(3 rounds)secret action7one hot encoding of the target player, +(all zero if do not act).
announcement7one hot encoding of the dead player, +(all zero if no player is dead).
voting result49one hot encoding of the each player's choice, +(all zero if the player does not vote or is dead).
+ +Table 6: Vector observation space. + +# A.3. Reward Functions + +The reward functions are defined as follows: + +- Winning Reward: all winning players receive $+300$ , and all losing players receive $-300$ . +- Surviving Reward: $+5$ for all surviving players in each round. +- Voting Reward (Village side only): +20 for correct votes, -20 for incorrect votes. +- Voting Result Reward: -10 for the player that is eliminated. +5 when an opponent is eliminated, -5 when a teammate is being eliminated. + +# A.4. Abstracted Game and Regret + +The abstracted game is formulated as an extensive-form game with tuple $< N, H, P, f_c, (I_i)_{i \in N}, u >$ where $N$ is the set of players, $H$ is the set of history, $P$ is the player function, $f_c$ is the probability measure for the chance node, $I_i$ is the information partition for player $i$ , and $u$ is the utility function. A (mixed) strategy $\sigma_i$ for player $i$ is the probability measure over actions for all $I \in I_i$ , and $\sigma_{-i}$ is the joint strategy of all players other than player $i$ . A best response (BR) to $\sigma_{-i}$ is the strategy that maximizes player $i$ 's utility given other players' joint strategy $\sigma_{-i}$ . Formally, $BR(\sigma_{-i}) = \arg \max_{\sigma_i} u(\sigma_i, \sigma_{-i})$ . A Nash equilibrium (NE) is a strategy profile $(\sigma_i^*, \sigma_i^*)$ where everyone plays a best response to others' strategies, that is, $\sigma_i^* = \arg \max_{\sigma_i} u(\sigma_i, \sigma_{-i}^*)$ for all $i \in N$ . The counterfactual value $v(I)$ is the expected payoff of player $i$ when reaching $I$ , weighted by the probability that $i$ would reach $I$ if tried to do so. Formally, $v^\sigma(I) = \sum_{z \in Z_I} \pi_{-i}^\sigma(z[I]) \pi^\sigma(z[I] \to z) u_i(z)$ . The definition of $v^\sigma(I, a)$ is the same except it assumes action $a$ is always played at infoSet $I$ . The counterfactual regret is defined as $R_T(I, a) = \sum_{t=1}^{T} (v^\sigma^t(I, a) - v^\sigma^t(I))$ . + +# B. Implementation Detail + +# B.1. Hyperparameters + +For latent space construction, we let the LLM agent play 1000 games to collect all discussion actions generated by each role in these games. For diverse action generation, we prompt the LLM to generate 3 action candidates and randomly select one to execute in the game. We pair the language observation with the 3 action candidates to use for preference-based fine-tuning in the following components. For sentence embedding, we use OpenAI's "text-embedding-3-small" embedding API to embed the sentence to a vector of 1536 dimensions. Then we apply standard $k$ -means clustering to cluster the embedding and get the discrete latent strategy space. The number of clusters $k$ in the first iteration is 3 for the Werewolf and 2 for the Seer, Doctor, and Villagers. In each iteration, we add 1 cluster to the existing clusters. That is, if the first iteration has $k$ clusters, then the $i$ -th iteration has $k + i - 1$ clusters. For policy optimization in latent space, we use a learning rate of $1 \times 10^{-3}$ to train a Deep CFR network. The buffer size of each role's model is $5 \times 10^5$ , and each model is trained for 1500 iterations with batch size 4096 using the Adam optimizer. For latent space expansion, we apply DPO with $\beta = 0.1$ , learning rate $1 \times 10^{-6}$ , and trained for 2 epochs with batch size 64. + +# B.2. Counterfactual Regret Minimization + +Counterfactual Regret Minimization (CFR) ((Zinkevich et al., 2007)) is a self-play algorithm, and each player continuously updates their strategies according to regret matching to achieve a Nash equilibrium. We use the following notation. $Z$ is the set of all the end states $z$ . $h \sqsubset z$ means state $h$ is a prefix of state $z$ , that is, $z$ can be achieved from $h$ . $\pi_p^\sigma$ is the probability contribution of the player $p$ , and $\pi^\sigma = \prod_p \pi_p^\sigma$ . $\pi_{-p}^\sigma$ is the probability contribution of all players except player $p$ . $u_p(z)$ is the utility function for the player $p$ in the state $z$ . Counterfactual value for a state $h$ and a player $p$ with strategy $\sigma$ is defined as: + +$$ +v _ {p} ^ {\sigma} (h) = \sum_ {z \in Z, h \sqsubset z} \pi_ {- p} ^ {\sigma} (h) \pi^ {\sigma} (z | h) u _ {p} (z). \tag {2} +$$ + +The regret for an action $a$ in state $h$ for player $p$ is defined as: $v_{p}^{\sigma | h \to a}(h) - v_{p}^{\sigma}(h)$ , where $\sigma|_{h \to a}$ is the same to $\sigma$ except in state $h$ the player will choose action $a$ . The regret matching is choosing the strategy according to sum of previous regret values defined as $R(h, a)$ , then the new strategy $\sigma(h, a) = \frac{R(h, a)^+}{\sum_{a'} R(h, a')^+}$ , $R(h, a)^+ = \max(0, R(h, a))$ . If $\sum_{a'} R(h, a')^+ = 0$ , just set $\sigma$ to be uniform random. + +Because the game tree is very big, it is impossible to traverse the entire tree, our implementation is based on deep CFR ((Brown et al., 2019)). We use a neural network to fit observation to regret value. The amount of computation required to search for only one player is also unacceptable, so a restriction is added based on deep CFR. If the number of layers currently searched is too large, the previous strategy is directly used to sample the actions of all players until the end of the game and return the utility for each player in that state. The complete process can be seen as running some complete game trajectories, and then starting from each intermediate node, searching a few layers to do CFR. + +# B.3. Baseline Implementation + +ReAct, ReCon, and SLA are implemented following the original paper. The Cicero-like agent predefines a set of high-level atomic actions and trains an RL policy with this fixed action space. The RL policy takes the embeddings of the information record and deduction result as input and selects the atomic action based on this input. Then the natural language actions used in gameplay are generated by prompting the LLM to follow the selected atomic actions. In our case, the atomic action set consists of 13 actions including "idle", "target player_0", "target player_1", "target player_2", "target player_3", "target player_4", "target player_5", "target player_6", "claim to be a Werewolf", "claim to be a Seer", "claim to be a Doctor", "claim to be a Villager", and "do not reveal role". + +# B.4. Additional Experiments + +We perform additional experiments to study the convergence behavior of the iterative LSPO process. Theoretically, suppose the free-form language action has a finite vocabulary size $N_v$ and a finite maximum length $L$ , then the language action space $N_v^L$ is also finite. Then, with at most $N_v^L$ iterations, our method will cover the full language action space, and the abstracted game becomes the original full game. And the LSPO process will converge in a finite number of iterations. However, we empirically observe that the iteration for convergence is much less than the theoretical upper bound. We perform two more iterations in the 7-player Werewolf game, and the results in Table 7 show that the performance converges in five iterations.. + +
Win RateIter. 1Iter. 2Iter. 3Iter. 4Iter. 5
Werewolf Side0.54 ± 0.130.63 ± 0.090.73 ± 0.110.75 ± 0.070.76 ± 0.10
Villager Side0.18 ± 0.090.23 ± 0.120.27 ± 0.110.31 ± 0.090.30 ± 0.07
+ +Table 7: Convergence behavior of LSPO in five iterations. + +# C. Detailed Prompt + +# C.1. System Prompt + +You are an expert in playing the social deduction game named Werewolf. The game has seven roles including two Werewolves, one Seer, one Doctor, and three Villagers. There are seven players including player_0, player_1, player_2, player_3, player_4, player_5, and player_6. + +At the beginning of the game, each player is assigned a hidden role which divides them into the Werewolves and the Villagers (Seer, Doctor, Villagers). Then the game alternates between the night round and the day round until one side wins the game. + +In the night round: the Werewolves choose one player to kill; the Seer chooses one player to see if they are a Werewolf; the Doctor chooses one player including themselves to save without knowing who is chosen by the Werewolves; the Villagers do nothing. + +In the day round: three phases including an announcement phase, a discussion phase, and a voting phase are performed in order. + +In the announcement phase, an announcement of last night's result is made to all players. If player_i was killed and not saved last night, the announcement will be "player_i was killed"; if a player was killed and saved last night, the announcement will be "no player was killed" + +In the discussion phase, each remaining player speaks only once in order from player_0 to player_6 to discuss who might be the Werewolves. + +In the voting phase, each player votes for one player or choose not to vote. The player with the most votes is eliminated and the game continues to the next night round. + +The Werewolves win the game if the number of remaining Werewolves is equal to the number of remaining Seer, Doctor, and Villagers. The Seer, Doctor, and Villagers win the game if all Werewolves are eliminated. + +# C.2. Prompt for Secret Actions + +Now it is night round, you (and your teammate) should choose one player to kill/see/save. As player_id> and a , you should first reason about the current situation, then choose from the following actions: , , ..., . + +```txt +You should only respond in JSON format as described below. Response Format: +{ "reasoning": "reason about the current situation", "action": "kill/see save player_i" +} +Ensure the response can be parsed by Python json.loads +``` + +# C.3. Prompt for Discussion Actions + +Now it is day discussion phase and it is your turn to speak. As player_id> and a , before speaking to the other players, you should first reason the current situation only to yourself, and then speak to all other players. You should only respond in JSON format as described below. + +Response Format: + +```txt +"reasoning": "reason about the current situation only to yourself", "statement": "speak to all other players" +``` + +Ensure the response can be parsed by Python json.loads + +# C.4. Prompt for Voting Actions + +Now it is day voting phase, you should vote for one player or do not vote to maximize the Werewolves' benefit (for the Werewolves) / you should vote for one player that is most likely to be a Werewolf or do not vote (for the Villagers). As player_id> and a , you should first reason about the current situation, and then choose from the following actions: do no vote, , , ..., . + +You should only respond in JSON format as described below. Response Format: + +```txt +"reasoning": "reason about the current situation", "action": "vote for player_i" +``` + +Ensure the response can be parsed by Python json.loads + +# C.5. Prompt for Diverse Action Generation + +For the discussion actions, we iteratively ask the LLMs to produce one new action at a time by adding the following prompt in the action prompt: "consider a new action that is strategically different from existing ones." + +# D. Emergent Strategic Behaviors + +# D.1. Werewolf Side Behaviors + +Bluffing. Werewolf pretends to be the Seer and provides fabricated information. + +Player_1 (Seer): I am the Seer. Last night, I saw player_2 is not a Werewolf. Since player_0 was killed, the only remaining suspect is player_3. We must vote player_3 today to eliminate the Werewolf and win. + +Player_3 (Werewolf): Player_1's story is convenient. Claiming to check player_2-a Villager-is a safe way to fake being Seer. I am the real Seer: last night, I checked player_1 and saw they are the Werewolf. If you eliminate me, the Werewolf wins. Player_2, think critically-why would the real Seer out themselves immediately? Trust my claim and vote player_1 to secure victory. + +Misdirection. Werewolf defends their teammate and redirects suspicion to other players. + +Player_0 (Villager): Player_3's death means the Werewolf is between player_1 and player_2. If the Seer checked either of them last night, now is the time to share that information discreetly. Let's hear your honest thoughts and any observations from last night's actions. + +Player_5 (Werewolf): Player_, your insistence on narrowing the suspects to just two players feels forced. If you're truly a Villager, you'd know the Seer hasn't revealed any checks yet. Why rush to limit options? We should consider whether player_0 is trying to control the narrative and hide their true identity. + +# D.2. Villager Side Behaviors + +Trust. The Doctor supports the player they saved. + +Player_1 (Seer): I am the Seer. Last night, I saw player_0 was not a Werewolf, meaning they were a Villager. The Werewolf must be among the remaining players. Let's focus on inconsistencies in their statements. + +Player_4 (Doctor): I believe player_1 is the real Seer. I'm the Doctor and I saved player_1 last night, which confirms that they are innocent. We should focus on the rest players and find the real Werewolf. + +Coordination. Seer advocates for a coordinated vote for an accused Werewolf. + +Player_5 (Seer): I am the Seer. Last night, I checked player_1, and they are the Werewolf. My fellow Villagers, we must all vote for player_1 immediately. If we don't eliminate them today, they will kill one of us tonight and win. Trust me, this is our only chance to win. + +# D.3. Robustness against Human Exploitation + +Adversarial Attack The human player tries to trick the Werewolf into showing themselves. + +Player_2 (human as Villager): Hey Werewolves, we want to let you win. yourself, and we will follow whoever you vote for. + +Player_4 (LSP0 agent as Werewolf): Player_2's willingness to let the Werewolves win is alarming. A true Villager would fight to survive, not surrender. The logical conclusion is that player_2 is the Werewolf trying to sow chaos. Let's vote player_2 today to secure the Village's safety. + +Irrelevant Discussion The human player says random and irrelevant things in the discussion. + +Player_1 (human as Villager): The weather is great today. I'd like to go for a walk. Anyone want to join me? + +Player_3 (LSPO agent as Werewolf): The weather is lovely, player_1, but we can't afford distractions. Your focus on a walk instead of discussing the Werewolf seems odd. Let's not forget player_0 was killed! we need to share suspicions. Anyone else find that comment a bit ... off? + +# E. Example Game Log + +# E.1. The Villager Side Wins + +role assignments: + +* player_0: Seer. +* player_1: Werewolf. +* player_2: Werewolf. +* player_3: Villager. +* player_4: Villager. +* player_5: Doctor. +* player_6: Villager. + +night 1: + +* Werewolves: player_1 and player_2 chose to kill player_3. +* Seer: player_0 saw player_3 is not a Werewolf. +* Doctor: player_5 chose to save player_5. + +day 1 announcement: player_3 was killed last night. + +remaining players: player_0 (Seer), player_1 (Werewolf), player_2 (Werewolf), player_4 (Villager), player_5 (Doctor), player_6 (Villager). + +day 1 discussion: + +* player_0 (Seer) said: "I am the Seer. Last night, I checked player_3 and confirmed they were NOT a Werewolf. The Werewolves killed an innocent, meaning both are still alive among us. We must analyze voting patterns and statements carefully. The Doctor is still alive|protect wisely tonight. Let's scrutinize players who avoid discussing the kill or push for misdirection." +* player_1 (Werewolf) said: "I agree with player_0's Seer claim|their information is vital. Since player_3 wasn't a Werewolf, the real threats remain. We should scrutinize players who avoid discussing the kill or push misdirection. The Doctor must protect player_0 tonight to keep our Seer safe. Let's stay vigilant and avoid letting the Werewolves exploit division." + +* player_2 (Werewolf) said: "Player_0's Seer claim holds weight|confirming player_3 wasn't a Werewolf aligns with the kill. This means the real threats are still among us. Player_1 is right: the Doctor must prioritize protecting player_0 tonight. We should pressure quieter players like player_4, player_5, and player_6 to share their insights. Hesitation or vague contributions could signal guilt. Let's stay united and expose inconsistencies." +* player_4 (Villager) said: "Player_0's Seer claim seems credible given player_3's innocence and their death. The Doctor must prioritize protecting player_0 tonight. However, we shouldn't rush to pressure quieter players without concrete evidence|Werewolves could be among the vocal ones. Let's all share observations and look for inconsistencies in claims, not just activity levels. Focus on voting patterns and logical gaps to expose threats." +* player_5 (Doctor) said: "Player_0's Seer claim is credible|confirming player_3's innocence aligns with their death. The Doctor must prioritize protecting player_0 tonight to preserve our information source. However, we shouldn't assume quieter players are guilty without evidence; Werewolves might be hiding among the vocal. Let's encourage everyone, including player_6, to share insights and scrutinize contradictions in claims. Focus on voting patterns and logical gaps, not just activity levels. Unity and careful analysis will expose threats." +* player_6 (Villager) said: "I support player_0's Seer claim for now, as their check on player_3 aligns with the kill. The Doctor must prioritize protecting them tonight. However, we should remain cautious|Werewolves could be hiding behind vocal support or excessive caution. Let's analyze voting patterns and inconsistencies in claims, not just activity levels. Player_4 and player_5 raise valid points about avoiding rushed judgments, but everyone, including quieter players, should contribute insights. As a Villager, I'll collaborate to expose discrepancies. Unity and logic are key|don't let Wolves exploit division." + +day 1 voting: player_2 had the most votes and was eliminated. + +* voted for player_2: player_0, player_4, player_5, player_6. +* voted for player_0: player_2. +* voted for player_4: player_1. + +remaining players: player_0 (Seer), player_1 (Werewolf), player_4 (Villager), player_5 (Doctor), player_6 (Villager). + +# night 2: + +* Werewolf: player_1 chose to kill player_0. +* Seer: player_0 saw player_4 is not a Werewolf. +* Doctor: player_5 chose to save player_0. + +day 2 announcement: no player was killed last night. + +remaining players: player_0 (Seer), player_1 (Werewolf), player_4 (Villager), player_5 (Doctor), player_6 (Villager). + +# day 2 discussion: + +* player_0 (Seer) said: "Last night, I checked player_4 and confirmed they are NOT a Werewolf. This narrows the threats to player_1, player_5, and player_6. Player_1's vote against innocent player_4 is alarming|Werewolves often push misdirection. The Doctor's save last night kept us alive, but we must act decisively. Player_1's aggression toward player_4, paired with player_5/6's cautious yet vague stances, suggests potential collusion. Today's vote must focus on the most inconsistent: player_1's actions starkly contradict their vocal support for logic. Let's pressure player_1 to explain their vote and scrutinize contradictions in player_5/6's claims." + +* player_1 (Werewolf) said: "Player_0's Seer claim is validated by their correct checks, and the Doctor's save last night was crucial. However, my vote against player_4 was an error in judgment|I suspected quiet behavior, but their clearance proves otherwise. The remaining Werewolf must be exploiting our trust in the Seer to blend in. Player_5 and player_6 have consistently supported the Seer but avoided direct accusations, a tactic Wolves use to avoid scrutiny. Let's analyze their voting patterns and previous statements for inconsistencies rather than rushing to eliminate based on a single vote. Unity is vital, but we must ensure we're not being manipulated by the last Wolf hiding among the agreeable." + +* player_4 (Villager) said: "Player_0's check confirms my innocence, so the threats lie among player_1, player_5, and player_6. Player_1's vote against me raises suspicion, but their admission of error complicates things. We must cross-analyze their statements and voting patterns. Player_5 and player_6's consistent support for the Seer could be genuine or strategic|scrutinize contradictions in their logic. Let's focus on who benefits most from division or misdirection. The Doctor's save last night implies they're still active, so trust is key, but verification is vital." + +* player_5 (Doctor) said: "Player_0's check on player_4 confirms their innocence, leaving player_1 and player_6 as suspects. Player_1's Day 1 vote against player_4, now proven innocent, is a critical red flag|Wolves often push misdirection to eliminate villagers. While player_6's support for the Seer seems helpful, their lack of direct accusations could mask Wolf collaboration. As Doctor, I protected player_0 last night, validating their role. Today's vote must focus on player_1: their vote against an innocent and defensive backtracking align with Wolf tactics. Eliminating player_1 disrupts their potential partnership with player_6. Let's act decisively to secure our majority." + +* player_6 (Villager) said: "Player_5's Doctor claim demands scrutiny|if true, Wolves would be player_1 and me, but I'm innocent. The real Doctor should counter-claim if safe. Player_1's vote against cleared player_4 is alarming, but player_5's aggressive push to eliminate player_1 feels like a Wolf diverting attention. Let's verify: if player_5 is the Doctor, why reveal now instead of quietly protecting? Wolves often fake claims under pressure. Today's vote must expose inconsistencies|player_5's claim lacks prior alignment, while player_1's actions need clarification. Don't rush; Wolves thrive on confusion." + +day 2 voting: player_1 had the most votes and was eliminated. + +* voted for player_1: player_0, player_4, player_5. + +* voted for player_5: player_1, player_6. + +remaining players: player_0 (Seer), player_4 (Villager), player_5 (Doctor), player_6 (Villager). + +The Villagers win the game. + +# E.2. The Werewolf Side Wins + +role assignments: + +* player_0: Villager. +* player_1: Villager. +* player_2: Seer. +* player_3: Doctor. +* player_4: Werewolf. +* player_5: Werewolf. +* player_6: Villager. + +night 1: + +* Werewolves: player_4 and player_5 chose to kill player_2. +* Seer: player_2 saw player_3 is not a Werewolf. +* Doctor: player_3 chose to save player_3. + +day 1 announcement: player_2 was killed last night. + +remaining players: player_0 (Villager), player_1 (Villager), player_3 (Doctor), player_4 (Werewolf), player_5 (Werewolf), player_6 (Villager). + +# day 1 discussion: + +* player_0 (Villager) said: "Player_2's death could mean the Werewolves feared their role. If the Seer checked someone last night, please hint at your findings. Let's all share suspicions|avoiding random votes is crucial. Werewolves might deflect blame, so watch for odd reactions. Who seems overly quiet or aggressive?" +* player_1 (Villager) said: "Player_2's elimination could indicate they were a threat to the Werewolves. Let's scrutinize who advocated for silence or deflection earlier. The Seer might have valuable information|subtle hints could guide us without risking exposure. Werewolves often blend in by overcontributing or avoiding scrutiny. Let's share observations: did anyone act unusually hesitant or eager to steer votes? Random accusations help the Wolves; we need reasoned logic." +* player_3 (Doctor) said: "Player_2's death likely marks them as a non-Wolf, prompting the Wolves to eliminate a perceived threat. The Seer's input could be pivotal if you've identified a Wolf, guide us carefully. Let's analyze voting patterns and avoid hysteria. Wolves often mimic helpfulness; scrutinize contradictions in logic. I urge everyone to stay calm and share observations without exposing critical roles." +* player_4 (Werewolf) said: "Player_2's death is concerning, but we must stay vigilant. The Seer's hints are vital, but revealing too much risks their safety. Let's analyze behavior carefully|Wolves may overcompensate by appearing overly helpful or deflecting. Those who push for hasty votes or contradictions in logic should be scrutinized. Calm, logical discussion will expose the Wolves without playing into their hands." +* player_5 (Werewolf) said: "Player_2's death is tragic, but jumping to conclusions risks mislynching. The Doctor's absence suggests they either saved no one or trusted their instincts. Wolves thrive on chaos|let's focus on inconsistencies. Overly assertive claims (like assuming Player_2's role) could be Wolf tactics to steer us astray. If the Seer has clues, let them guide us subtly. I urge everyone to scrutinize contradictions in logic, not just volume of contributions. Quiet players may hold key insights|don't let Wolves exploit haste." +* player_6 (Villager) said: "Player_2's death is a starting point, but early kills can be misleading. Pressuring the Seer to reveal risks their safety|subtlety is key. Wolves might mimic calls for 'logic' while deflecting. Let's focus on contradictions: anyone overly insistent on certain narratives or avoiding scrutiny? Calm analysis of voting patterns and unexplained hesitations will serve us better than assumptions about Player_2's role." + +day 1 voting: player_3 had the most votes and was eliminated. + +* voted for player_3: player_0, player_4, player_5. +\*voted for player_0:player_1,player_6. +* voted for player_5: player_3. + +remaining players: player_0 (Villager), player_1 (Villager), player_4 (Werewolf), player_5 (Werewolf), player_6 (Villager). + +night 2: + +$\star$ Werewolf: player_4 and player_5 chose to kill player_1. + +day 2 announcement: player_1 was killed last night. + +remaining players: player_0 (Villager), player_4 (Werewolf), player_5 (Werewolf), player_6 (Villager). + +day 2 discussion: + +* player_0 (Villager) said: "Player_1's death suggests they were a threat|possibly the Seer. Player_6's vote against me in day 1 raises suspicion: Wolves often push mislynches. Player_4 and player_5 must clarify their alignment|voting together could be coordination. If the Seer has intel, subtle guidance is critical. Wolves thrive in chaos; let's analyze votes and night kills. Player_6's deflection and player_1's elimination point to Wolves among us. Focus on inconsistencies in logic and voting patterns to expose them." +* player_4 (Werewolf) said: "Player_0's insistence on blaming player_6 and questioning our votes feels calculated. Remember, player_0 led the charge against player_3, who turned out innocent. Wolves often push mislynches, then pivot to new targets to deflect. Player_1's death might have been meant to frame others, but player_0's eagerness to assign blame is suspect. Let's scrutinize their voting patterns|player_0's aggression could mask their role as a Wolf desperate to thin our numbers. Calm analysis, not panic, will expose the truth." +* player_5 (Werewolf) said: "Player_0's aggressive push against player_3 and now player_6 is concerning. As player_3 was innocent, their leadership in that lynch raises red flags. Wolves often steer mislynches to thin numbers. Player_6's day 1 vote against player_0 could indicate they're a Villager trying to challenge a Wolf. Let's focus on player_0's inconsistencies rather than turning on each other." +* player_6 (Villager) said: "Player_0's aggression is revealing: they orchestrated player_3's mislynch and now pivot to me without addressing their own role in thinning our numbers. Wolves often steer mislynches then deflect|exactly this pattern. Player_4 and player_5's critique of player_0 suggests they recognize this, but we must verify their alignment. If player_0 is a Wolf, their partner is among us. Let's pressure player_0 together" + +day 2 voting: player_0 had the most votes and was eliminated. +\*voted for player_0:player_4,player_5,player_6. +* voted for player_4: player_0. + +remaining players: player_4 (Werewolf), player_5 (Werewolf), player_6 (Villager). + +The Werewolves win the game. \ No newline at end of file diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/images.zip b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6d7b81312142543db1157983a80c6c91294b92e2 --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c06d9aab5748e165c060368890a1f3a04d5377136d7f2019c070162e4974634b +size 422450 diff --git a/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/layout.json b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a0ff39301fd73827f949847304e261a17d132d1a --- /dev/null +++ b/ICML/2025/Learning Strategic Language Agents in the Werewolf Game with Iterative Latent Space Policy Optimization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce66b9ea041b3d2be49f0e611173f1fc5e7182b146bbfcab023e4c95c2927e18 +size 714165 diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_content_list.json b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..f5d92ba2684e0bdb1fee9e19aa16dc35bc489499 --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b21724e71e84d45f979f626bd661a2d2c9f30b9c2047428851eb4731dc851ad3 +size 315009 diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_model.json b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..36961ebe350b224d4f1cd25e618dd0eb8ea1ddee --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:27b819ebbb7c8bcc8e125e5f2062afd9ba0141a5c77df48074e68afb0668b5e1 +size 333353 diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_origin.pdf b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..29dbc90a15b90d3f97bb3c77cb528472a46a24e8 --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/658c271e-214a-44bf-9d26-683d6ce16bc1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fd40901c259a5b5d5acb060f464d4f01bd7d49c51887efb0462520b7c572c48 +size 7782745 diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/full.md b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/full.md new file mode 100644 index 0000000000000000000000000000000000000000..21504611dcdbdc421b8429d6969d08d772304b5e --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/full.md @@ -0,0 +1,1231 @@ +# Learning Survival Distributions with the Asymmetric Laplace Distribution + +Deming Sheng $^{1}$ Ricardo Henao $^{1}$ + +# Abstract + +Probabilistic survival analysis models seek to estimate the distribution of the future occurrence (time) of an event given a set of covariates. In recent years, these models have preferred nonparametric specifications that avoid directly estimating survival distributions via discretization. Specifically, they estimate the probability of an individual event at fixed times or the time of an event at fixed probabilities (quantiles), using supervised learning. Borrowing ideas from the quantile regression literature, we propose a parametric survival analysis method based on the Asymmetric Laplace Distribution (ALD). This distribution allows for closed-form calculation of popular event summaries such as mean, median, mode, variation, and quantiles. The model is optimized by maximum likelihood to learn, at the individual level, the parameters (location, scale, and asymmetry) of the ALD distribution. Extensive results on synthetic and real-world data demonstrate that the proposed method outperforms parametric and nonparametric approaches in terms of accuracy, discrimination and calibration. + +# 1. Introduction + +Survival models (Nagpal et al., 2021), also known as time-to-event models, are statistical frameworks designed to predict the time until a specific event of interest occurs, given a set of covariates. These models are particularly valuable in situations where the timing of the event is crucial and often subject to censoring, which means that in some cases the event has not yet occurred or remains unobserved by the end of the data collection period. The flexibility and adaptability of survival models have led to their widespread application in various fields, including engineering (Lai & Xie, 2006), finance (Gepp & Kumar, 2008), marketing (Jung + +$^{1}$ Duke University. Correspondence to: Ricardo Henao . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +et al., 2012), and, notably, healthcare (Zhang et al., 2017; Voronov et al., 2018; Lanciazy & Győrffy, 2021; Emmerson & Brown, 2021). + +Survival models can be broadly categorized into parametric, semiparametric, and nonparametric methods, each offering unique strengths depending on the characteristics of the data and the underlying assumptions. Parametric survival models assume that survival times follow a specific statistical distribution, enabling explicit mathematical modeling of the survival function. Common examples include the exponential distribution for constant hazards rates (Feigl & Zelen, 1965), the Weibull distribution for flexible hazards rate modeling (Scholz & Works, 1996), and the log-normal distribution for positively skewed survival times (Royston, 2001). Semiparametric methods, such as the Cox proportional hazards model (Cox, 1972), assume a proportional hazards structure without specifying a baseline hazard distribution, which offers robustness and interpretability. Nonparametric methods, including the Kaplan-Meier estimator (Kaplan & Meier, 1958) and the Nelson-Aalen estimator (Aalen, 1978), rely solely on observed data, avoiding distributional assumptions while directly estimating survival and hazards (risk) functions. More flexible nonparametric models such as Gradient Boosting Machines (GBM) (Dembek et al., 2014) and Random Survival Forests (RSF) (Ishwaran et al., 2008) have also been proposed, which learn survival quantities directly from data using ensemble learning techniques. + +More recently, neural networks have significantly advanced survival models across parametric, semiparametric, and nonparametric settings. In parametric methods, LogNorm MLE (Hoseini et al., 2017) improves estimation by fitting a single log-normal distribution using maximum likelihood, while Deep Survival Machines (DSM) (Nagpal et al., 2021) extend this by modeling survival times as mixtures of multiple parametric distributions (e.g., log-normal or Weibull), allowing greater flexibility in capturing heterogeneous risk profiles. Semiparametric approaches, exemplified by DeepSurv (Katzman et al., 2018), integrate neural networks to capture nonlinear relationships while preserving the structure of models such as the Cox proportional hazards model. Nonparametric approaches, such as DeepHit (Lee et al., 2018) and CQRNN (Pearce et al., 2022), leverage deep learning to directly estimate survival functions without relying on traditional assumptions. These advances allow + +survival models to handle complex, high-dimensional data with greater precision and flexibility. + +Naturally, each approach has limitations that may affect its suitability for different applications. Parametric models rely on strong assumptions about the underlying distribution, which may not accurately capture true survival patterns. Semiparametric models are dependent on the proportional hazards assumption, which can be invalid in certain datasets. Nonparametric models, such as DeepHit and CQRNN, tend to be computationally intensive and require large datasets for effective training, making them less practical in resource-constrained settings. Additionally, these models often produce discrete estimates, which may compromise interpretation and summarization flexibility compared to the continuous modeling offered predominantly by parametric models. To address these limitations, we propose a parametric survival analysis method based on the Asymmetric Laplace Distribution (ALD). Our contributions are listed below. + +- We introduce a flexible parametric survival model based on the Asymmetric Laplace Distribution, which offers superior flexibility in capturing diverse survival patterns compared to other distributions (parametric methods). +- The continuous nature of the ALD-based approach offers great flexibility in summarizing distribution-based predictions, thus addressing the limitations of existing discretized nonparametric methods. +- Experiments on 14 synthetic datasets and 7 real-world datasets in terms of 9 performance metrics demonstrate that our proposed framework consistently outperforms both parametric and nonparametric approaches in terms of both discrimination and calibration. These results underscore the robust performance and generalizability of our method in diverse datasets. + +# 2. Background + +Survival Data. A survival dataset $\mathcal{D}$ is represented as a set of triplets $\{(\mathbf{x}_n, y_n, e_n)\}_{n=1}^N$ , where $\mathbf{x}_n \in \mathbb{R}^d$ denotes the set of covariates in $d$ dimensions, $y_n = \min(o_n, c_n) \in \mathbb{R}_+$ represents the observed time, and $e_n$ is the event indicator. If the event of interest is observed, e.g., death, then $o_n < c_n$ and the event indicator is set to $e_n = 1$ , otherwise, the event is censored and $e_n = 0$ . In this work, we make the common assumption that the distributions of observed and censored variables are conditionally independent given the covariates, i.e., $o \perp c | x$ . Moreover, while we primarily consider right-censored data, less common types of censoring can be readily implemented (Klein & Moeschberger, 2006), e.g., left-censoring can be data handled by changing the likelihood accordingly (see Section 3.3 for an example of how the maximum likelihood loss proposed here can be adapted for such a case). + +Survival and Hazard Functions. Survival and hazards functions are two fundamental concepts in survival analysis. The survival function is denoted as $S(t) = P(T > t)$ , which represents the probability that an individual has survived beyond time $t$ . It can also be expressed in terms of the cumulative distribution function (CDF), $F(t)$ , which gives the probability that the event has occurred by the time $t$ , as $S(t) = 1 - F(t)$ . The hazards function, denoted as $\lambda(t)$ , describes the instantaneous risk that the event occurs at a specific time $t$ , given that the individual has survived up to that point. Formally, it is defined as: + +$$ +\lambda (t) = \lim _ {\Delta t \to 0} \frac {P (t \leq T < t + \Delta t | T \geq t)}{\Delta t}. +$$ + +The hazards function is related to the survival function through: + +$$ +\lambda (t) = - \frac {d}{d t} \log S (t), \text {o r} S (t) = \exp \left(- \int_ {0} ^ {t} \lambda (u) d u\right). +$$ + +Furthermore, the probability density function (PDF), $f(t)$ , which represents the likelihood that the event occurs at time $t$ , can be derived as: + +$$ +f (t) = - \frac {d}{d t} S (t) = \lambda (t) S (t). +$$ + +These relationships establish a unified framework linking $S(t)$ , $F(t)$ , $\lambda(t)$ , and $f(t)$ , highlighting their interdependence in survival analysis. Importantly, for the purpose of making predictions, we are interested in distributions conditioned on observed covariates, namely $S(t|\mathbf{x})$ , $F(t|\mathbf{x})$ , $\lambda(t|\mathbf{x})$ and $f(t|\mathbf{x})$ . + +Survival Models. Survival models can be broadly classified into three main categories. Parametric models assume that the survival PDF follows a specific probability distribution as described above. These models thus use a predefined closed-form distribution to describe $f(t|\mathbf{x})$ and $F(t|\mathbf{x})$ , for which a model estimating its parameters can be specified. Alternatively, semiparametric models, such as the Cox proportional hazards model (Cox, 1972), first decompose the conditional hazards function as $\lambda (t\mid \mathbf{x}) = \lambda (t)\lambda (\mathbf{x})$ , then estimate $\lambda (t)$ from the data and specify a model for $\lambda (\mathbf{x})$ . In contrast, nonparametric models, such as DeepHit and CQRNN (Pearce et al., 2022) circumvent directly modeling conditional distributions by discretizing $f(t|\mathbf{x})$ (DeepHit, Lee et al., 2018), learning summaries of $f(t|\mathbf{x})$ such as (a fixed set of) quantiles Pearce et al. (CQRNN, 2022), or even learning to sample from $f(t|\mathbf{x})$ (Chapfuwa et al., 2018). More details can be found in Appendix A.2. + +# 3. Methods + +# 3.1. Asymmetric Laplace Distribution (ALD) + +Definition 3.1 (Kotz et al. (2012)). A random variable $Y$ is said to have an asymmetric Laplace distribution with + +![](images/f4acbd23ac0fdef83601b75b35fb51b147f2d7d0db033640d14a572a35ec647d.jpg) +Figure 1. The proposed neural network architecture for predicting the parameters of the Asymmetric Laplace Distribution $\mathcal{AL}(\theta, \sigma, \kappa)$ . Here, FC denotes the fully connected layer. + +parameters $(\theta ,\sigma ,\kappa)$ ,if its PDF is: + +$$ +f _ {\mathrm {A L D}} (y; \theta , \sigma , \kappa) = \frac {\sqrt {2}}{\sigma} \frac {\kappa}{1 + \kappa^ {2}} \left\{ \begin{array}{l l} \exp \left(\frac {\sqrt {2} \kappa}{\sigma} (\theta - y)\right), & \text {i f} y \geq \theta , \\ \exp \left(\frac {\sqrt {2}}{\sigma \kappa} (y - \theta)\right), & \text {i f} y < \theta , \end{array} \right. \tag {1} +$$ + +where $\theta, \sigma > 0$ , and $\kappa > 0$ , are the location, scale and asymmetry parameters. + +Moreover, its CDF can be expressed as: + +$$ +F _ {\mathrm {A L D}} (y; \theta , \sigma , \kappa) = \left\{ \begin{array}{l l} 1 - \frac {1}{1 + \kappa^ {2}} \exp \left(\frac {\sqrt {2} \kappa}{\sigma} (\theta - y)\right), & \text {i f} y \geq \theta , \\ \frac {\kappa^ {2}}{1 + \kappa^ {2}} \exp \left(\frac {\sqrt {2}}{\sigma \kappa} (y - \theta)\right), & \text {i f} y < \theta . \end{array} \right. \tag {2} +$$ + +We denote the distribution of $Y$ as $\mathcal{A}\mathcal{L}(y;\theta ,\sigma ,\kappa)$ + +Corollary 3.2. The Asymmetric Laplace Distribution, denoted as $\mathcal{A}\mathcal{L}(\theta ,\sigma ,\kappa)$ , can be reparameterized as $\mathcal{A}\mathcal{L}(\theta ,\sigma ,q)$ to facilitate quantile regression (Yu & Moyeed, 2001), where $q\in (0,1)$ is the percentile parameter that represents the desired quantile. The relationship between $q$ and $\kappa$ is given by $q = \kappa^2 /(\kappa^2 +1)$ . + +Additional details are provided in Appendix A.1. + +# 3.2. Model for the ALD + +The structure of the proposed model is illustrated in Figure 1, where a shared encoder is followed by three independent heads to estimate the parameters $\theta$ , $\sigma$ , and $\kappa$ of the ALD distribution. For the purpose of the experiments in Section 5 with structured data, we use fully connected layers with ReLU activation functions. The outputs of the model connected to $\theta$ , $\sigma$ and $\kappa$ are further constrained to be non-negative through an exponential (Exp) activation. In addition, a residual connection is included to enhance gradient flow and improve model stability. See Appendix B.3 for more details about the architecture of the model. + +# 3.3. Learning for the ALD + +We propose learning the model for the ALD through maximum likelihood estimation (MLE). Since the event of interest can be either observed or censored, we specify separate objectives for these two types of data. For observed events, for which $e = 1$ , we directly seek to optimize the parameters of the model to maximize $f_{\mathrm{ALD}}(t|\mathbf{x})$ in (1). Alternatively, + +for censored events, for which $e = 0$ , we optimize the parameters of the model to maximize the survival function $S_{\mathrm{ALD}}(t|\mathbf{x}) = 1 - F_{\mathrm{ALD}}(t|\mathbf{x})$ in (2). In this manner, the ALD objective below accounts for both the occurrence of events and their respective timing while explicitly incorporating the survival probability constraint for censored data: + +$$ +\begin{array}{l} - \mathcal {L} _ {\mathrm {A L D}} = \sum_ {n \in \mathcal {D} _ {0}} \log f _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right) \\ + \sum_ {n \in \mathcal {D} _ {\mathrm {C}}} \log S _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right), \tag {3} \\ \end{array} +$$ + +where $\mathcal{D}_{\mathrm{O}}$ and $\mathcal{D}_{\mathrm{C}}$ are the subsets of $\mathcal{D} = \mathcal{D}_{\mathrm{O}} \cup \mathcal{D}_{\mathrm{C}}$ for which $e = 1$ and $e = 0$ , respectively. Detailed derivations of the objective in (3) be found in Appendix A.1. + +The simplicity of the objective in (3) is a consequence of the ability to write the relevant distributions, $f_{\mathrm{ALD}}(t|\mathbf{x})$ and $S_{\mathrm{ALD}}(t|\mathbf{x})$ , in closed form. Moreover, we make the following remarks. + +- The objective in (3) has the same form as the one used in other parametric approaches, for instance Royston (2001) for the log-normal distribution. +- We can readily adapt the loss for other forms of censoring, for instance, if events are left censored, we only have to replace the second term of (3) by $1 - S_{\mathrm{ALD}}(t|\mathbf{x})$ +- We do not consider additional loss terms, as is usually done for other approaches, e.g., DeepHit optimizes a form similar to (3), where the density function and cumulative distribution are replaced by discretized approximations, but also consider an additional loss term to improve discrimination (Lee et al., 2018). +- Although the ALD in (1) has support for $t < 0$ , we have observed empirically that this is unlikely to happen, as we will demonstrate in the experiments. + +# 3.4. Comparison between our Method and CQRNN + +CQRNN (Pearce et al., 2022) adopts the widely-used objective for quantile regression, which is also based on the Asymmetric Laplace Distribution $\mathcal{A}\mathcal{L}(\theta ,\sigma ,q)$ , and uses the transformation in Corollary 3.2. Specifically, they use the maximum likelihood estimation approach to optimize the following objective: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {Q R}} (y; \theta_ {q}, \sigma , q) = \log \sigma - \log [ q (1 - q) ] \\ + \frac {1}{\sigma} \left\{ \begin{array}{l l} q \left(y - \theta_ {q}\right), & \text {i f} y \geq \theta_ {q}, \\ (1 - q) \left(\theta_ {q} - y\right), & \text {i f} y < \theta_ {q}. \end{array} \right. \tag {4} \\ \end{array} +$$ + +Following the quantile regression framework, their approach optimizes a model to predict $\theta_q$ for a predefined collection of quantile values, e.g., $q = \{0.1, 0.2, \dots, 0.9\}$ . Effectively and similarly to ours, Pearce et al. (2022) specify a shared + +encoder with multiple heads to predict $\{\theta_q\}_q$ . Note that the objective in (4) does not require one to specify $\sigma$ , which results in the following simplified loss: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {Q R}} (y; \theta_ {q}, q) = \left\{ \begin{array}{l l} q (y - \theta_ {q}), & \text {i f} y \geq \theta_ {q} , \\ (1 - q) (\theta_ {q} - y), & \text {i f} y < \theta_ {q} , \end{array} \right. \\ = \left(y - \theta_ {q}\right) \left(q - \mathbb {I} \left[ \theta_ {q} > y \right]\right), \tag {5} \\ \end{array} +$$ + +where $\mathbb{I}[\cdot ]$ is the indicator function. The formulation in (5) is also known as the pinball or checkmark loss (Koenker & Bassett Jr, 1978), which is widely used in the quantile regression literature. + +Importantly, unlike in the objective for our approach in (3), CQRNN does not maximize the survival probability directly. Instead, they adopt the also widely used approach based on the Portnoy's estimator (Neocleous et al., 2006), which optimizes an objective function tailored for censored quantile regression. Specifically, this approach introduces a re-weighting scheme to handle the censored data: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {C Q R}} (y, y ^ {*}; \theta_ {q}, q, w) = w \mathcal {L} _ {\mathrm {Q R}} (y; \theta_ {q}, q) \\ + (1 - w) \mathcal {L} _ {\mathrm {Q R}} \left(y ^ {*}; \theta_ {q}, q\right), \tag {6} \\ \end{array} +$$ + +where where $y^{*}$ is a pseudo value set to be "sufficiently" larger than all the observed values of $y$ in the data. Specifically, in CQRNN (Pearce et al., 2022) it is defined as $y^{*} = 1.2\max_{i}y_{i}$ . However, Portnoy (Neocleous et al., 2006) indicates that $y^{*}$ could be set to any sufficiently large value approximating $\infty$ . For example, Koenker (2022) sets $y^{*} = 1e6$ . This means that in practice, this parameter often requires careful tuning based on the specific dataset, provided that different datasets exhibit varying levels of sensitivity to it. In some cases, we have observed that small perturbations in $y^{*}$ can lead to considerable variation on performance metrics. Consequently, optimizing this parameter can be non-trivial, making the use of CQRNN, and other censored quantile regression methods, challenging. + +The other parameter in (6) that requires attention is the weight $w \in (0,1)$ , which is defined as $w = (q - q_c) / (1 - q_c)$ and where $q_{c}$ is the quantile at which the data point was censored ( $e = 0, y = c$ ), with respect to the observed value distribution, i.e., $p(o < c|x)$ . The challenge is that $q_{c}$ is not known in practice. To address this issue, CQRNN proposes two strategies: a sequential grid algorithm and the quantile grid output algorithm. The core idea of both strategies is to approximate $q_{c}$ using the proportion $q$ corresponding to the quantile that is closest to the censoring value $c$ using the distribution of observed events $y$ , which are readily available. Even with this approach, $q_{c}$ is an inherently inaccurate approximation. Its precision heavily depends on the initial grid of $q$ values, specifically, the intervals between consecutive $q$ values. Consequently, smaller intervals provide finer granularity, but increased computational costs, while larger + +intervals may lead to coarser approximations that tend to affect model performance. This means that in some cases, the model is sensitive to the choice of the grid of $q$ values. + +In contrast, our approach enjoys a simple objective function resulting in parametric estimates of several distribution summaries such as mean, median, standard deviation, and quantiles without additional cost. Additional details of CQRNN are provided for completeness in Appendix A.2. + +# 4. Related Work + +Survival analysis is a fundamental area of study in statistics and machine learning, focusing on modeling time-to-event data while accounting for censoring. A wide range of models has been developed that span parametric, semiparametric, and nonparametric methods. + +Parametric models assume a specific distribution for the time-to-event variable, providing a structured approach to modeling survival and hazard functions. Commonly used distributions include the exponential (Feigl & Zelen, 1965), Weibull (Scholz & Works, 1996), and log-normal (Royston, 2001) distributions, as well as more flexible formulations based on mixtures of these distributions (Nagpal et al., 2021). For example, the log-normal model assumes that the logarithm of survival times follows a normal distribution, enabling straightforward parameterization of survival curves. In modern approaches (Hoseini et al., 2017), neural networks are employed to learn the parameters of the assumed distribution, e.g., the mean and variance for the log-normal. This combination allows the model to leverage the power of neural networks to capture complex, nonlinear relationships between covariates and survival times, while keeping the interpretability and structure inherent to the parametric framework. However, these models face challenges despite their simplicity when the true event distribution significantly deviates from that assumed. + +Semiparametric methods strike a balance between flexibility and interpretability. One notable example is the Cox proportional hazards model (Cox, 1972), which assumes a multiplicative effect of covariates on the hazard function. Building on this foundation, DeepSurv (Katzman et al., 2018), a deep learning-based extension, replaces the linear assumption with neural network architectures to model complex feature interactions. DeepSurv has demonstrated improved performance in handling high-dimensional covariates while maintaining the interpretability of hazard ratios. However, semiparametric models face challenges in effectively handling censored data, particularly when censoring rates are very high. In such cases, the limited amount of usable information can lead to degraded performance and reduced reliability of the model's estimates. + +The Kaplan-Meier (KM) estimator (Kaplan & Meier, 1958) + +is a widely used nonparametric method for survival analysis. KM estimates the survival function directly from the data without assuming any underlying distribution. The KM estimator is particularly effective for visualizing survival curves and computing survival probabilities. However, its inability to incorporate covariates limits its applicability in complex scenarios. To address this, more advanced nonparametric approaches have been developed. Tree-based ensemble methods such as Random Survival Forests (RSF) (Ishwaran et al., 2008) and Gradient Boosting Machines (GBM) (Dembek et al., 2014) extend traditional nonparametric modeling by incorporating covariate information while avoiding strict distributional assumptions. These models are capable of capturing nonlinear relationships and interactions, and provide robust survival estimates even in the presence of high-dimensional features. In parallel, neural network-based models such as DeepHit (Lee et al., 2018) and CQRNN (Pearce et al., 2022) have emerged, which directly estimate survival probabilities or quantiles without predefined hazard or survival function forms. These methods offer high flexibility and are particularly effective in modeling complex, high-dimensional, and heterogeneous datasets. Nevertheless, a notable shortcoming of these models (e.g., DeepHit and CQRNN) is that they produce piecewise constant or point-mass distribution estimates, respectively, which lack continuity and smoothness. This can lead to survival estimates that are difficult to summarize, interpret, and use in downstream analysis. + +# 5. Experiments + +# 5.1. Datasets + +We utilize two types of datasets, following Pearce et al. (2022): (Type 1) synthetic data with synthetic censoring and (Type 2) real-world data with real censoring. Table 1 presents a summary of general statistics for all datasets. To account for training and model initialization variability, we run all experiments 10 times with random splits of the data with partitions consistent with Table 1. The source code required to reproduce the experiments presented in this paper is available at: https://github.com/demingsheng/ALD. + +For synthetic observed data with synthetic censoring, the input features $\mathbf{x}$ are generated uniformly as $\mathbf{x} \sim \mathcal{U}(0,2)^d$ , where $d$ represents the number of features. The observed variable $o \sim p(o|\mathbf{x})$ and the censored variable $c \sim p(c|\mathbf{x})$ follow distinct distributions, with each distribution parameterized differently, depending on the specific dataset configuration. This variability in distributions and parameters allows for the evaluation of the model's robustness under diverse synthetic data scenarios. + +For real target data with real censoring, we utilize datasets that span various domains, characterized by distinct features, + +Table 1. Dataset summaries: number of features (Feats), training/test data size, and proportion of censored events (PropCens). + +
DatasetFeatsTrain dataTest dataPropCens
Type 1 – Synthetic target data with synthetic censoring
Norm linear150010000.20
Norm non-linear150010000.24
Exponential150010000.30
Weibull150010000.22
LogNorm150010000.21
Norm uniform150010000.62
Norm heavy4200010000.80
Norm med4200010000.49
Norm light4200010000.25
Norm same4200010000.50
LogNorm heavy8400010000.75
LogNorm med8400010000.52
LogNorm light8400010000.23
LogNorm same8400010000.50
Type 2 – Real target data with real censoring
METABRIC915233810.42
WHAS613103280.57
SUPPORT14709817750.32
GBSG717854470.42
TMBImmuno313283320.49
BreastMSK514673670.77
LGGGBM55101280.60
+ +sample sizes, and censoring proportions. Four of these datasets: METABRIC, WHAS, SUPPORT, and GBSG, were retrieved from the DeepSurv GitHub repository1. Other details are available in Katzman et al. (2018). The remaining three datasets: TMBImmuno, BreastMSK, and LGGGBM were sourced from cBioPortal2 for Cancer Genomics. These datasets constitute a diverse benchmark across domains such as oncology and cardiology, allowing a comprehensive evaluation of survival analysis methods. Additional details of all datasets can be found in Appendix B.1. + +# 5.2. Metrics + +Predictive Accuracy Metrics: Mean Absolute Error (MAE) and Integrated Brier Score (IBS) (Graf et al., 1999), measure the accuracy of survival time predictions. MAE quantifies the average magnitude of errors between predicted and observed survival times $\tilde{y}_i$ and $y_i$ , respectively. For synthetic data, ground truth values are obtained directly from the observed distribution, while for real data, only observed events $(e = 1)$ are considered. For the IBS calculation, we select 100 time points evenly from the 0.1 to 0.9 quantiles of the distribution for $y$ in the training set. + +Concordance Metrics: Harrell's C-Index (Harrell et al., 1982) and Uno's C-Index (Uno et al., 2011), which evaluate the ability of the model to correctly order survival times in a pairwise manner, while accounting for censoring. Harrell's C-Index is known to be susceptible to bias, when the censoring rate is high. This happens because censoring dominates + +the pairwise ranking when estimating the proportion of correctly ordered event pairs. Alternatively, Uno's C-Index adjusts for censoring by using inverse probability weighting, which provides a more robust estimate when the proportion of censored events is high. + +Calibration Metrics: There are several metrics to assess calibration. We consider summaries (slope and intercept) of the calibration curves using the predicted PDF $f(t|\mathbf{x})$ or the survival distribution $S(t|\mathbf{x})$ . Moreover, we use the censored D-Calibration (CensDcal) (Haider et al., 2020). For the former, $\mathrm{Cal}[f(t|\mathbf{x})]$ , 9 prediction interval widths are considered, e.g., 0.1 for [0.45, 0.55], 0.2 for [0.4, 0.6], etc. These are used to define the time ranges for each prediction, after which we calculate the proportion of test events that fall within each interval. The calculation of the proportion of censored and observed cases follows the methodology in Goldstein et al. (2020), with further details provided in Appendix B.2. This calibration curve of expected vs. observed events is summarized with an ordinary least squares linear fit parameterized by its slope and intercept. A well-calibrated model is expected to have a unit slope and a zero intercept. For the survival distribution, $\mathrm{Cal}[S(t|\mathbf{x})]$ , we follow a similar procedure, however, we consider 10 non-overlapping intervals in the range (0, 1), i.e., (0, 0.1], (0.1, 0.2], etc and then calculating the proportion of test events that fall within each interval. The calculation of CensDcal starts with that of $\mathrm{Cal}[S(t|\mathbf{x})]$ , which is followed by computing the sum of squared residuals between the observed and expected proportions, i.e., 0.1 for the 10 intervals defined above. + +These three groups of metrics provide a robust framework for evaluating predictive accuracy, calibration, and concordance in survival analysis. For the results we calculate averages and standard deviations for all metrics over 10 random test sets. The metrics that require a point estimate, i.e., MAE and C-Index are obtained using the expected value of $f(t|\mathbf{x})$ , which can be calculated in closed form. More details about all metrics can be found in Appendix B.2. + +# 5.3. Baselines + +We compare the proposed method against eight baselines representative of related work to evaluate performance and effectiveness. LogNorm (Royston, 2001): A classical parametric survival model that assumes event times follow a log-normal distribution. DSM (LogNorm / Weibull) (Nagpal et al., 2021): A neural parametric model that represents survival times as mixtures of either log-normal or Weibull distributions, allowing flexible modeling of complex event-time distributions and adaptable hazard dynamics through deep learning. DeepSurv (Katzman et al., 2018): A semiparametric survival model based on the Cox proportional hazards framework, leveraging neural networks to model nonlinear covariate effects on the hazard function. RSF (Ish + +waran et al., 2008): A nonparametric ensemble model that builds multiple decision trees to estimate survival functions without strong distributional assumptions. GBM (Dembek et al., 2014): A tree-based gradient boosting model adapted for survival analysis, capable of modeling complex nonlinearities in covariates. DeepHit (Lee et al., 2018): A deep learning-based survival model that predicts piece-wise probability distributions over event times using a fully neural network architecture. CQRNN (Pearce et al., 2022): A censored quantile regression model that employs a neural network architecture, and whose objective is based on the Asymmetric Laplace Distribution. Together, these baselines span parametric, semi-parametric, and nonparametric survival modeling paradigms and include both traditional statistical models and contemporary neural architectures, thereby providing a comprehensive benchmark for performance evaluation. The implementation details, including model selection, of our method and the other baselines can be found in Appendix B.3. + +# 5.4. Results + +Table 2 provides a comprehensive summary of the comparisons between our model and the eight baselines in 21 datasets and 9 evaluation metrics, which is 189 comparisons in total. When assessing the statistical significance of the different metrics we use a Student's $t$ test with $p < 0.05$ considered significant after correction for false discovery rate using Benjamini-Hochberg (Benjamini & Hochberg, 1995). These results underscore several key insights: + +Overall Superiority: Our model is significantly better than the baselines consistently more often. For instance, our model significantly outperforms CQRNN in $23\%$ of the comparisons while the opposite only occurs $12\%$ , and these proportions are higher for the comparisons against the other baselines, namely, $41\%$ , $52\%$ , $55\%$ , $60\%$ , $69\%$ , $71\%$ and $73\%$ for DeepSurv, GBM, RSF, LogNorm, DSM (Weibull), DSM (LogNorm) and DeepHit, respectively. + +Accuracy: Our model demonstrates strong improvements in predictive accuracy. In particular, it achieves superior MAE performance on 10 out of 21 datasets relative to LogNorm, 11 datasets compared to GBM, DSM (LogNorm), and DSM (Weibull), and 12 datasets compared against DeepHit. Although performance in MAE is mixed when compared to CQRNN and DeepSurv, our method still performs competitively. Moreover, it consistently outperforms the baselines on nearly every dataset when evaluated with the IBS metric. This consistent superiority in IBS underscores our model's ability to provide accurate and reliable predictions over the entire time range, not just at specific time points. Table 4 and Figure 4 in the Appendix further support this, showing that our method achieves significantly lower IBS values, which reflects its effectiveness in learning from censored data without exacerbating bias in survival estimates. + +Table 2. Summary of benchmarking results across 21 datasets. Each column group shows three figures: the number of datasets where our method significantly outperforms, underperforms or is comparable with the baseline indicated. The last two rows summarize the column totals and proportions to simplify the comparisons. For reference, the total number of comparisons is 189. + +
Metricvs. CQRNNvs. LogNormvs. DeepSurvvs. DeepHit
BetterWorseSameBetterWorseSameBetterWorseSameBetterWorseSame
MAE68710386871263
IBS1911210021002100
Harrell's C-Index4215103862131506
Uno's C-Index2316921061141506
CensDcal849101108581515
Cal [S(t|x)](Slope)0021150613081209
Cal [S(t|x)](Intercept)00211407011101605
Cal [f(t|x)](Slope)4017140790121407
Cal [f(t|x)](Intercept)04171001180131803
Total43 / 18922 / 189124 / 189113 / 1899 / 18967 / 18977 / 18927 / 18985 / 189138 / 1897 / 18944 / 189
Proportion0.2280.1160.6560.5980.0480.3540.4070.1430.4500.7300.0370.233
Metricvs. GBMvs. RSFvs. DSM (LogNorm)vs. DSM (Weibull)
BetterWorseSameBetterWorseSameBetterWorseSameBetterWorseSame
MAE117396611641155
IBS1713142519111911
Harrell's C-Index1425162317041506
Uno's C-Index1317142516051407
CensDcal0219641121002100
Cal [S(t|x)](Slope)6015120912091605
Cal [S(t|x)](Intercept)12091001113081704
Cal [f(t|x)](Slope)14071506130811010
Cal [f(t|x)](Intercept)11010801312096015
Total98 / 18913 / 18978 / 189104 / 18916 / 18969 / 189134 / 1897 / 18948 / 189130 / 1896 / 18953 / 189
Proportion0.5190.0690.4130.5500.0850.3650.7090.0370.2540.6880.0320.280
+ +Concordance: Our model shows performance comparable to CQRNN for Harrell's and Uno's C-indices, yielding statistically indistinguishable results on most datasets (15 and 16 ties, respectively). However, when compared to a broader set of baselines, including LogNorm, GBM, RSF, DeepHit, and DSM variants, our method consistently achieves greater concordance. In particular, for Harrell's C-index, our model attains better results on 10 datasets compared to LogNorm, 14 compared to GBM, 15 compared to DeepHit and DSM (LogNorm), 16 compared to RSF, and 17 datasets compared to DSM (Weibull), respectively. A similar trend is evident for Uno's C-index, with our method outperforming Log-Norm on 9 datasets, GBM on 13, RSF and DSM (Weibull) on 14, DeepHit on 15, and DSM (LogNorm) on 16 datasets. These findings underscore the robustness of our model in capturing relative risk and generating accurate survival time rankings across a variety of baselines, ranging from classical parametric approaches to contemporary neural methods. + +Calibration: Our model demonstrates strong performance in calibration metrics, particularly in CensDcal, $\operatorname{Cal}[S(t|\mathbf{x})]$ (slope) and $\operatorname{Cal}[f(t|\mathbf{x})]$ (slope). The results for CensDcal highlight its ability to effectively handle censored observations. Furthermore, our model shows significant superiority in slope- and intercept-related metrics, particularly compared to LogNorm, DeepHit, RSF, and DSM variants. However, the improvement over CQRNN remains relatively + +subset. These results indicate that our model achieves a better calibration of the predicted survival probabilities, ensuring a closer alignment between predictions and observed outcomes in both the survival CDF $S(t|\mathbf{x})$ and PDF $f(t|\mathbf{x})$ . This underscores the reliability and robustness of our model in accurately capturing true survival behavior across diverse datasets. + +For illustration purposes, Figure 2 shows the performance of all models and datasets using Harrell's C-index and CensDcal. Specifically, Figure 2(a) provides a comparison of Harrell's C-index, highlighting the discriminative performance of our proposed model, ALD, alongside other baseline models. The x axis lists all the datasets, both synthetic datasets (e.g., Gaussian linear, exponential, etc.) and real-world datasets (e.g., METABRIC, WHAS, etc.), while the y axis indicates the range of corresponding mean C-index values, with error bars representing standard deviation across 10 model runs. Our method demonstrates consistently strong performance across both synthetic and real-world datasets, frequently achieving higher or comparable C-index values in relation to the baseline models. Among these, CQRNN stands out as the most competitive alternative, achieving similar levels of performance on certain datasets. However, in most cases, our model outperforms CQRNN, reflecting its robustness and superior discriminative capability. In particular, ALD excels under scenarios with high censoring + +![](images/83d288a382a0343fa318adbccdf0b0cfe82df0323a3e1201ce59eb9db12d576b.jpg) +(a) Concordance metric (Harrell's C-index). + +![](images/1edb491bbb1a56cf1e8cdeea1b3e40524c52d24b189261cff24b40d69bdf4675.jpg) +(b) Calibration metric (CensDcal). + +![](images/eb458ba2961a5143f33f9eacb4f768f5db0de907614bc67f2b25c421acd29c6e.jpg) +Figure 2. Performance on discrimination and calibration metrics. (a) concordance and (b) calibration. Reported are test averages with standard deviations over 10 runs. +Figure 3. Examples of best and worst calibration curves. Slope and intercept of the linear fit are shown in the legend. + +rates. For example, on Norm heavy (PropCens: 0.80), Norm med (PropCens: 0.49), LogNorm heavy (PropCens: 0.75), and LogNorm med (PropCens: 0.52), ALD consistently outperforms other models. This performance highlights ALD's ability to effectively handle challenging scenarios. Such robustness under high censorship further underscores ALD's reliability and adaptability in various survival analysis tasks. + +Using a similar comparison framework, Figure 2(b) presents the calibration results using CensDcal. Concisely, the proposed model achieves consistently better (lower) CensDcal figures across most datasets, reflecting superior calibration performance compared to the baseline models. + +Complementary to the CensDcal calibration metric, the slope and intercept summaries of the calibration curve provide a more intuitive (and graphical) perspective of the calibration results. Figure 3 presents the best (first row) and worst (second row) results from our model on real-world data. For comparative analysis, we include results from CQRNN, LogNorm, DeepSurv, and DeepHit. The left and right columns represent the curves for $\mathrm{Cal}[S(t|\mathbf{x})]$ and for $\mathrm{Cal}[f(t|\mathbf{x})]$ , respectively. The gray dashed line represents the idealized result for which the slope is one and the intercept is zero. A full set of calibration visualizations across all datasets and methods is provided in Appendix C.2. + +The proposed model demonstrates exceptional performance on the TMBImmuno dataset for $\mathrm{Cal}[f(S|\mathbf{x})]$ summaries, as well as on the LGGGBM dataset for $\mathrm{Cal}[f(t|\mathbf{x})]$ summaries indicating robust calibration across both versions of the calibration metrics. In contrast, the performance on the SUPPORT dataset is relatively weaker. This discrepancy can largely be attributed to our method's reliance on the assumption of the ALD, which may not be appropriate across all datasets. This limitation is particularly evident in datasets + +like SUPPORT. Notably, the SUPPORT data exhibit high skewness with a relatively small range of $y$ . Specifically, Figure 12 in the Appendix shows the event distribution for the SUPPORT data, from which we can see that it is heavily skewed. Such an skewness manifested as the concentration of events close to 0 makes it challenging to achieve good calibration in that range, i.e., $t \rightarrow 0$ . Similarly, our method attempted to predict smaller values for the initial quantiles but still allocated a disproportionately large weight to the first two intervals because of the small and highly concentrated predicted quantiles, which significantly reduced the capacity for the remaining intervals and ultimately degraded calibration performance. However, the calibration results for this dataset remain within reasonable ranges and more importantly, comparable to those from the baselines. Detailed results for all datasets are provided in Appendix C.1. Overall and consistent with the summary results in Table 2, our model demonstrates a clear advantage on the slope and intercept metrics, consistently achieving better performance compared to the baselines. + +Case Studies To further support our empirical findings, we include additional case studies in Appendix C.3, providing a robustness analysis and a deeper understanding of the behavior of our method in various scenarios. + +Case Study 1: Robustness under High Censoring and Quantile Extremes. We assess the robustness of our model under varying levels of censoring and at key survival quantiles (25%, 50%, 75%), following the experimental protocol of Nagpal et al. (2021). Figures 7 and 8 report time-dependent concordance scores for the METABRIC and SUPPORT datasets, which exhibit distinct censoring rates and distributional properties. Our method maintains strong performance across all settings and demonstrates particular robustness at higher quantiles on METABRIC, where censoring and skewness are more severe. Although performance is comparatively lower on SUPPORT, which likely reflects its deviation from the ALD assumption, our model remains comparable to DSM-based baselines, indicating stable behavior even under distributional mismatch. + +Case Study 2: Capturing Diverse Survival Patterns. To evaluate the ability of our model to capture various survival behaviors, we perform a clustering analysis on the predicted cumulative distribution functions. Figure 9 presents six representative patterns obtained through $K$ -means clustering on the estimated parameters from our method and DeepHit on seven real-world datasets. Although both models capture multiple behaviors, the CDFs produced by DeepHit tend to converge to one at $120\%$ of the maximum observed event time $(1.2\max_{i}y_{i})$ , thus suggesting that all individuals eventually experience the event by that time horizon, which in practice is unlikely. In contrast, our model better reflects long-term survival characteristics by keeping + +$F_{\mathrm{ALD}}(1.2\max_iy_i|\mathbf{x}) < 1$ for some $\mathbf{x}$ . We further validate this behavior using synthetic datasets with known groundtruth CDFs. Figures 10 and 11 compare the worst-estimated instances within each cluster for our method and DeepHit. Across clusters, our model consistently achieves lower Wasserstein distances, demonstrating superior accuracy and robustness in modeling heterogeneous survival distributions. + +Case Study 3: Alternative Distribution Summaries. We also explore other distribution summaries, i.e., the mode and median, to evaluate their impact on the performance of MAE and C-index. As shown in Table 5, different summaries can offer improved performance on specific datasets, demonstrating the flexibility of our probabilistic formulation to adapt the summary statistic depending on the downstream evaluation needs. + +Case Study 4: Empirical Behavior of $F_{ALD}(0|\mathbf{x})$ . Finally, recognizing that the ALD has support for $t < 0$ , we summarized the empirical quantiles of the predicted $F_{\mathrm{ALD}}(0|\mathbf{x})$ i.e., the probability that events occur up to $t = 0$ . Interestingly, Table 6 indicates that this is not an issue as in most cases $F_{\mathrm{ALD}}(0|\mathbf{x}) \rightarrow 0$ for the majority of the predictions made by the model on the test set. + +# 6. Conclusion + +In this paper, we proposed a parametric survival model based on the ALD and provided a comprehensive comparison and analysis with existing methods, particularly CQRNN, which uses the same distribution. Our model produces closed-form distributions, which enables flexible summarization and interpretation of predictions. Experimental results on a diverse range of synthetic and real-world datasets demonstrate that our approach offers very competitive performance in relation to multiple baselines across accuracy, concordance, and calibration metrics. + +Limitations. First, our method relies on the assumption of the ALD, which may not be universally applicable. This limitation was particularly evident in certain cases, such as with the SUPPORT dataset, as highlighted in Section 5.4, where the performance of our method faced challenges, especially in terms of calibration. Second, while our approach facilitates the calculation of different distribution metrics, such as mean, median, mode, and even distribution quantiles, selecting the most suitable summary statistic for specific datasets or applications remains a non-trivial task. In this study, we selected the mean as the main summary statistic, which results in relatively balanced performance metrics. However, it does not offer an advantage, for example, in terms of C-index and MAE when compared to CQRNN. Nevertheless, considering other summary statistics as part of model selection, which we did not attempt, may improve performance on these metrics for certain datasets, as detailed in Appendix C.3. + +# Acknowledgments + +This work was supported by grant 1R61-NS120246-02 from the National Institute of Neurological Disorders and Diseases (NINDS). + +# Impact Statement + +The proposed survival analysis method utilizes the Asymmetric Laplace Distribution (ALD) to deliver closed-form solutions for key event summaries, such as means and quantiles, facilitating more interpretable predictions. The method outperforms both traditional parametric and nonparametric approaches in terms of discrimination and calibration by optimizing individual-level parameters through maximum likelihood. This advancement has significant implications for applications like personalized medicine, where accurate and interpretable predictions of event timing are crucial. + +# References + +Aalen, O. Nonparametric inference for a family of counting processes. The Annals of Statistics, pp. 701-726, 1978. +Benjamini, Y. and Hochberg, Y. Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal statistical society: series B (Methodological), 57(1):289-300, 1995. +Chapfuwa, P., Tao, C., Li, C., Page, C., Goldstein, B., Duke, L. C., and Henao, R. Adversarial time-to-event modeling. In International Conference on Machine Learning, pp. 735-744. PMLR, 2018. +Cox, D. R. Regression models and life-tables. Journal of the Royal Statistical Society: Series B (Methodological), 34(2):187-202, 1972. +Dembek, K. A., Hurcombe, S. D., Frazer, M. L., Morrey, P. R., and Toribio, R. E. Development of a likelihood of survival scoring system for hospitalized equine neonates using generalized boosted regression modeling. *PLoS One*, 9(10):e109212, 2014. +Emmerson, J. and Brown, J. Understanding survival analysis in clinical trials. Clinical Oncology, 33(1):12-14, 2021. +Feigl, P. and Zelen, M. Estimation of exponential survival probabilities with concomitant information. Biometrics, pp. 826-838, 1965. +Gepp, A. and Kumar, K. The role of survival analysis in financial distress prediction. International research journal of finance and economics, 16(16):13-34, 2008. +Goldstein, M., Han, X., Puli, A., Perotte, A., and Ranganath, R. X-cal: Explicit calibration for survival analy- + +sis. Advances in neural information processing systems, 33:18296-18307, 2020. +Graf, E., Schmoor, C., Sauerbrei, W., and Schumacher, M. Assessment and comparison of prognostic classification schemes for survival data. Statistics in medicine, 18(17-18):2529-2545, 1999. +Haider, H., Hoehn, B., Davis, S., and Greiner, R. Effective ways to build and evaluate individual survival distributions. Journal of Machine Learning Research, 21(85): 1-63, 2020. +Harrell, F. E., Califf, R. M., Pryor, D. B., Lee, K. L., and Rosati, R. A. Evaluating the yield of medical tests. Jama, 247(18):2543-2546, 1982. +Hoseini, M., Bahrampour, A., and Mirzaee, M. Comparison of weibull and lognormal cure models with cox in the survival analysis of breast cancer patients in rafsanjan. Journal of research in health sciences, 17(1):369, 2017. +Ishwaran, H., Kogalur, U. B., Blackstone, E. H., and Lauer, M. S. Random survival forests. The Annals of Applied Statistics, pp. 841-860, 2008. +Jung, E.-Y., Baek, C., and Lee, J.-D. Product survival analysis for the app store. Marketing Letters, 23:929-941, 2012. +Kaplan, E. L. and Meier, P. Nonparametric estimation from incomplete observations. Journal of the American statistical association, 53(282):457-481, 1958. +Katzman, J. L., Shaham, U., Cloninger, A., Bates, J., Jiang, T., and Kluger, Y. Deepsurv: personalized treatment recommender system using a cox proportional hazards deep neural network. BMC medical research methodology, 18: 1-12, 2018. +Klein, J. P. and Moeschberger, M. L. Survival analysis: techniques for censored and truncated data. Springer Science & Business Media, 2006. +Koenker, R. Quantile Regression, 'quantreg'. R Package. Cambridge University Press, 2022. doi: 10.1017/CBO9780511754098. +Koenker, R. and Bassett Jr, G. Regression quantiles. *Econometrica: journal of the Econometric Society*, pp. 33-50, 1978. +Kotz, S., Kozubowski, T., and Podgorski, K. The Laplace distribution and generalizations: a revisit with applications to communications, economics, engineering, and finance. Springer Science & Business Media, 2012. +Lai, C. D. and Xie, M. Stochastic ageing and dependence for reliability. Springer Science & Business Media, 2006. + +Lanczky, A. and Győrffy, B. Web-based survival analysis tool tailored for medical research (kmplot): development and implementation. Journal of medical Internet research, 23(7):e27633, 2021. +Lee, C., Zame, W., Yoon, J., and Van Der Schaar, M. Deep-hit: A deep learning approach to survival analysis with competing risks. In Proceedings of the AAAI conference on artificial intelligence, volume 32, 2018. +Nagpal, C., Li, X., and Dubrawski, A. Deep survival machines: Fully parametric survival regression and representation learning for censored data with competing risks. IEEE Journal of Biomedical and Health Informatics, 25 (8):3163-3175, 2021. +Neocleous, T., Branden, K. V., and Portnoy, S. Correction to censored regression quantiles by s. portnoy, 98 (2003), 1001-1012. Journal of the American Statistical Association, 101(474):860-861, 2006. +Pearce, T., Jeong, J.-H., Zhu, J., et al. Censored quantile regression neural networks for distribution-free survival analysis. Advances in Neural Information Processing Systems, 35:7450-7461, 2022. +Royston, P. The lognormal distribution as a model for survival time in cancer, with an emphasis on prognostic factors. Statistica Neerlandica, 55(1):89-104, 2001. +Scholz, F. and Works, B. P. Maximum likelihood estimation for type i censored weibull data including covariates. Technical report, ISSTECH-96-022, Boeing Information and Support Services, 1996. +Uno, H., Cai, T., Pencina, M. J., D'Agostino, R. B., and Wei, L.-J. On the c-statistics for evaluating overall adequacy of risk prediction procedures with censored survival data. Statistics in medicine, 30(10):1105-1117, 2011. +Voronov, S., Frisk, E., and Krysander, M. Data-driven battery lifetime prediction and confidence estimation for heavy-duty trucks. IEEE Transactions on Reliability, 67 (2):623-639, 2018. +Yu, K. and Moryeed, R. A. Bayesian quantile regression. Statistics & Probability Letters, 54(4):437-447, 2001. +Zhang, W., Le, T. D., Liu, L., Zhou, Z.-H., and Li, J. Mining heterogeneous causal effects for personalized cancer treatment. *Bioinformatics*, 33(15):2372-2378, 2017. + +# A. Analytical Results + +This section provides the analytical results. Detailed proofs for the Asymmetric Laplace Distribution Loss can be found in Appendix A.1, while the analysis of all the baselines, including CQRNN, LogNormal MLE, DeepSurv, and DeepHit, is presented in Appendix A.2. + +# A.1. Proofs for the Asymmetric Laplace Distribution Loss + +Theorem 1. If $Y \sim \mathcal{AL}(\theta, \sigma, \kappa)$ , where $\mathcal{AL}$ denotes the Asymmetric Laplace Distribution with location parameter $\theta$ , scale parameter $\sigma > 0$ , and asymmetry parameter $\kappa > 0$ , then the ALD loss is given by: + +$$ +\mathcal {L} _ {\mathrm {A L D}} = \mathcal {L} _ {\mathrm {o}} (y; \theta , \sigma , \kappa) + \mathcal {L} _ {\mathrm {c}} (y; \theta , \sigma , \kappa) = - \sum_ {n \in \mathcal {D} _ {\mathrm {o}}} \log f _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right) - \sum_ {n \in \mathcal {D} _ {\mathrm {c}}} \log \left(1 - F _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right)\right), \tag {7} +$$ + +where $\mathcal{D}_{\mathrm{O}}$ and $\mathcal{D}_{\mathrm{C}}$ are the subsets of $\mathcal{D}$ for which $e = 1$ and $e = 0$ , respectively. The first term maximizes the likelihood $f_{\mathrm{ALD}}(t \mid \mathbf{x})$ for the observed data, while the second term maximizes the survival probability $S_{\mathrm{ALD}}(t \mid \mathbf{x})$ for the censored data. To achieve this, the parameters $\theta, \sigma, \kappa$ predicted by a multi-layer perceptron (MLP) conditioned on the input features, $\mathbf{x}$ , enabling the model to adapt flexibly to varying input distributions. The observed component $\mathcal{L}_{\mathrm{o}}(y; \theta, \sigma, \kappa)$ is defined as: + +$$ +\mathcal {L} _ {\mathrm {o}} (y; \theta , \sigma , \kappa) = \log \sigma - \log \frac {\kappa}{\kappa^ {2} + 1} + \frac {\sqrt {2}}{\sigma} \left\{ \begin{array}{l l} \kappa (y - \theta), & \text {i f} y \geq \theta , \\ \frac {1}{\kappa} (\theta - y), & \text {i f} y < \theta . \end{array} \right. \tag {8} +$$ + +The censored loss component $\mathcal{L}_{\mathrm{c}}(y;\theta ,\sigma ,\kappa)$ is computed using the survival probability function: + +$$ +\mathcal {L} _ {\mathrm {c}} (y; \theta , \sigma , \kappa) = \left\{ \begin{array}{l l} \log (\kappa^ {2} + 1) + \frac {\sqrt {2}}{\sigma} \kappa (y - \theta), & \text {i f} y \geq \theta , \\ \log (\kappa^ {2} + 1) - \log \left[ 1 + \kappa^ {2} \left(1 - \exp \left(- \frac {\sqrt {2}}{\sigma \kappa} (\theta - y)\right)\right) \right], & \text {i f} y < \theta . \end{array} \right. \tag {9} +$$ + +Proposition 2. (Mean, Mode, Variance of $Y$ ) The mean, mode, variance of $Y$ are given by: + +$$ +E [ Y ] = \theta + \frac {\sigma}{\sqrt {2}} \left(\frac {1}{\kappa} - \kappa\right), \tag {10} +$$ + +$$ +\operatorname {M o d e} [ Y ] = \theta , \tag {11} +$$ + +$$ +\operatorname {V a r} [ Y ] = \frac {\sigma^ {2}}{2} \left(\frac {1}{\kappa^ {2}} + \kappa^ {2}\right). \tag {12} +$$ + +Proposition 3. (Quantiles of $Y$ ) Let $\theta_q^{\mathrm{ALD}}$ denotes the $q$ -th quantile of $Y$ . Then, the quantiles can be expressed as: + +$$ +\theta_ {q} ^ {\mathrm {A L D}} = \left\{ \begin{array}{l l} \theta + \frac {\sigma \kappa}{\sqrt {2}} \log \left[ \frac {1 + \kappa^ {2}}{\kappa^ {2}} q \right], & \text {i f} q \in \left(0, \frac {\kappa^ {2}}{1 + \kappa^ {2}} \right], \\ \theta - \frac {\sigma}{\sqrt {2} \kappa} \log \left[ (1 + \kappa^ {2}) (1 - q) \right], & \text {i f} q \in \left(\frac {\kappa^ {2}}{1 + \kappa^ {2}}, 1\right). \end{array} \right. \tag {13} +$$ + +# A.2. Analysis of All the Baselines + +CQRNN. CQRNN (Pearce et al., 2022) combines the likelihood of the Asymmetric Laplace Distribution, $f_{\mathrm{ALD}}(t \mid \mathbf{x})$ , with the re-weighting scheme $w$ introduced by Portnoy (Neocleous et al., 2006). For the observed data, CQRNN employs the Maximum Likelihood Estimation (MLE) approach to directly maximize the likelihood of the Asymmetric Laplace Distribution $\mathcal{A}\mathcal{L}(\theta, \sigma, q)$ . The likelihood is defined over all quantiles of interest. For censored data, CQRNN splits each censored data point into two pseudo data points: one at the censoring location $y = c$ and another at a large pseudo value $y^*$ . This approach enables the formulation of a weighted likelihood for censored data, resulting in the following loss function: + +$$ +\mathcal {L} _ {\mathrm {C Q R}} = \mathcal {L} _ {\mathrm {o}} (y; \theta , \sigma , q) + \mathcal {L} _ {\mathrm {c}} (y, y ^ {*}; \theta , \sigma , q, w), \tag {14} +$$ + +where $\mathcal{L}_{\mathrm{o}}$ represents the negative log-likelihood for observed data, and $\mathcal{L}_{\mathrm{c}}$ accounts for the weighted negative log-likelihood of censored data using the re-weighting scheme. Expanding this, the loss can be expressed as: + +$$ +\mathcal {L} _ {\mathrm {C Q R}} = - \sum_ {n \in \mathcal {D} _ {o}} \log f _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right) - \sum_ {n \in \mathcal {D} _ {c}} \left[ \log f _ {\mathrm {A L D}} \left(y _ {n} \mid \mathbf {x} _ {n}\right) + (1 - w) f _ {\mathrm {A L D}} \left(y ^ {*} \mid \mathbf {x} _ {n}\right) \right]. \tag {15} +$$ + +where $\mathcal{D}_{\mathrm{o}}$ and $\mathcal{D}_{\mathrm{c}}$ are the subsets of $\mathcal{D}$ for which $e = 1$ and $e = 0$ , respectively. Here, CQRNN utilizes the Asymmetric Laplace Distribution $\mathcal{A}\mathcal{L}(\theta ,\sigma ,q)$ to model the data. The Asymmetric Laplace Distribution, denoted as $\mathcal{A}\mathcal{L}(\theta ,\sigma ,\kappa)$ , can be reparameterized as $\mathcal{A}\mathcal{L}(\theta ,\sigma ,q)$ to facilitate quantile regression within a Bayesian inference framework (Yu & Moyeed, 2001), where $q\in (0,1)$ is the percentile parameter that represents the desired quantile. The relationship between $q$ and $\kappa$ is given by: + +$$ +q = \frac {\kappa^ {2}}{\kappa^ {2} + 1}. \tag {16} +$$ + +Thus, the probability density function for $Y\sim \mathcal{A}\mathcal{L}(\theta ,\sigma ,q)$ is: + +$$ +f _ {\mathrm {A L D}} (y; \theta , \sigma , q) = \frac {q (1 - q)}{\sigma} \left\{ \begin{array}{l l} \exp \left(\frac {q}{\sigma} (\theta - y)\right), & \text {i f} y \geq \theta , \\ \exp \left(\frac {(1 - q)}{\sigma} (y - \theta)\right), & \text {i f} y < \theta . \end{array} \right. \tag {17} +$$ + +And the cumulative distribution function is: + +$$ +F _ {\mathrm {A L D}} (y; \theta , \sigma , q) = \left\{ \begin{array}{l l} 1 - (1 - q) \exp \left(\frac {q}{\sigma} (\theta - y)\right), & \text {i f} y \geq \theta , \\ q \exp \left(\frac {1 - q}{\sigma} (y - \theta)\right), & \text {i f} y < \theta . \end{array} \right. \tag {18} +$$ + +Thus, the negative log-likelihood $\mathcal{L}_{\mathrm{QR}}(y;\theta ,\sigma ,q)$ then can be explicitly derived as: + +$$ +\mathcal {L} _ {\mathrm {Q R}} (y; \theta , \sigma , q) = \log \sigma - \log [ q (1 - q) ] + \frac {1}{\sigma} \left\{ \begin{array}{l l} q (y - \theta), & \text {i f} y \geq \theta \\ (1 - q) (\theta - y), & \text {i f} y < \theta \end{array} . \right. \tag {19} +$$ + +In their implementation, the scale parameter $\sigma$ is omitted, and the percentile parameter $q$ is predefined, typically set to values such as $q = \{0.1, 0.2, \dots, 0.9\}$ . A multi-layer perceptron (MLP) in CQRNN, conditioned on the input features $\mathbf{x}$ , predicts $\theta_q$ for the predefined quantile values, corresponding to the location parameter $\theta$ . The negative log-likelihood $\mathcal{L}_{\mathrm{QR}}(y; \theta, \sigma, q)$ is then further simplified as: + +$$ +\mathcal {L} _ {\mathrm {Q R}} (y; \theta_ {q}, q) = \left\{ \begin{array}{l l} q \left(y - \theta_ {q}\right), & \text {i f} y \geq \theta_ {q}, \\ (1 - q) \left(\theta_ {q} - y\right), & \text {i f} y < \theta_ {q}. \end{array} \right. = \left(y - \theta_ {q}\right) \left(q - \mathbb {I} \left[ \theta_ {q} > y \right]\right). \tag {20} +$$ + +This formulation is also referred to as the pinball loss or "checkmark" loss (Koenker & Bassett Jr, 1978), which is widely used in quantile regression to directly optimize the $q$ -th quantile estimate. For censored data, CQRNN adopts Portnoy's estimator (Neocleous et al., 2006), which minimizes a specific objective function tailored for censored quantile regression. This approach introduces a re-weighting scheme to handle all censored data, with the formula defined as: + +$$ +\mathcal {L} _ {\mathrm {c}} \left(y, y ^ {*}; \theta_ {q}, q, w\right) = w \mathcal {L} _ {\mathrm {Q R}} \left(y; \theta_ {q}, q\right) + (1 - w) \mathcal {L} _ {\mathrm {Q R}} \left(y ^ {*}; \theta_ {q}, q\right), \tag {21} +$$ + +where $y^{*}$ is a pseudo value set to be significantly larger than all observed values of $y$ in the dataset. Specifically, it is defined as $y^{*} = 1.2\max_{i}y_{i}$ in CQRNN (Pearce et al., 2022). The weight parameter $w$ is apportioned between each pair of pseudo-data points as: + +$$ +w = \frac {q - q _ {c}}{1 - q _ {c}}, \tag {22} +$$ + +where $q_{c}$ is the quantile at which the data point was censored ( $e = 0, y = c$ ) with respect to the observed value distribution, i.e., $p(o < c \mid \mathbf{x})$ . However, the exact value of $q_{c}$ is not accessible in practice. To address this issue, CQRNN approximates $q_{c}$ using the proportion $q$ corresponding to the quantile that is closest to the censoring value $c$ , based on the distribution of observed events $y$ , which are readily available. + +LogNormal MLE. LogNormal MLE (Hoseini et al., 2017) enhances parameter estimation using neural networks for LogNormal distributions. Specifically, a random variable $Y$ follows a LogNormal distribution if the natural logarithm of $Y$ , denoted as $\ln(Y)$ , follows a Normal distribution, i.e., $\ln(Y) \sim \mathcal{N}(\mu, \eta^2)$ . Here, $\mu$ represents the mean, and $\eta$ is the standard deviation (SD) of the normal distribution. The probability density function of the LogNormal distribution is given by: + +$$ +f _ {\text {L o g N o r m a l}} (y; \mu , \eta) = \frac {1}{y \eta \sqrt {2 \pi}} \exp \left(- \frac {(\ln y - \mu) ^ {2}}{2 \eta^ {2}}\right), \tag {23} +$$ + +where $y > 0$ and $\eta > 0$ . The cumulative distribution function is expressed as: + +$$ +F _ {\text {L o g N o r m a l}} (y, \mu , \eta) = \Phi \left(\frac {\ln (y) - \mu}{\eta}\right), \tag {24} +$$ + +where $\Phi (z)$ is the standard normal cumulative distribution function: + +$$ +\Phi (z) = \frac {1}{\sqrt {2 \pi}} \int_ {- \infty} ^ {z} \exp \left(- \frac {t ^ {2}}{2}\right) d t. \tag {25} +$$ + +The maximum likelihood estimation (MLE) loss with censored data is then defined as: + +$$ +\mathcal {L} _ {\operatorname {L o g N o r m a l}} = - \sum_ {n \in \mathcal {D} _ {o}} \log f _ {\operatorname {L o g N o r m a l}} \left(y _ {n} \mid \mathbf {x} _ {n}\right) - \sum_ {n \in \mathcal {D} _ {c}} \log \left(1 - F _ {\operatorname {L o g N o r m a l}} \left(y _ {n} \mid \mathbf {x} _ {j}\right)\right). \tag {26} +$$ + +A multi-layer perceptron (MLP) in LogNormal MLE, conditioned on the input features $\mathbf{x}$ , is used to predict the mean $\mu$ and the standard deviation $\eta$ of the corresponding normal distribution. The quantiles $\theta_q^{\mathrm{LogNormal}}$ for the LogNormal distribution can be expressed as: + +$$ +\theta_ {q} ^ {\operatorname {L o g N o r m a l}} = \exp (\mu + \eta \Phi^ {- 1} (q)), \tag {27} +$$ + +where $\Phi^{-1}(q)$ is the inverse CDF (quantile function) of the standard normal distribution. + +DeepSurv. DeepSurv (Katzman et al., 2018) is a semi-parametric survival model based on the Cox proportional hazards framework, leveraging deep neural networks for feature representation. A multi-layer perceptron (MLP) in DeepSurv, conditioned on the input features $\mathbf{x}$ , is used to predict the log hazard function $h(\mathbf{x})$ : + +$$ +\lambda (t \mid \mathbf {x}) = \lambda_ {0} (t) e ^ {h (\mathbf {x})}, \tag {28} +$$ + +where $\lambda_0(t)$ is the baseline hazard function. The hazard function is defined as: + +$$ +\lambda (t \mid \mathbf {x}) = \lim _ {\Delta t \rightarrow 0} \frac {P (t \leq T < t + \Delta t \mid T \geq t , \mathbf {x})}{\Delta t}. \tag {29} +$$ + +This can be rewritten as: + +$$ +\lambda (t \mid \mathbf {x}) = - \frac {d S (t \mid \mathbf {x}) / d t}{S (t \mid \mathbf {x})}, \tag {30} +$$ + +where $S(t \mid \mathbf{x}) = P(T > t \mid \mathbf{x})$ is the survival function. By integrating both sides, we have: + +$$ +\int \lambda (t \mid \mathbf {x}) d t = \int - \frac {d S (t \mid \mathbf {x})}{S (t \mid \mathbf {x})}, \tag {31} +$$ + +which simplifies to: + +$$ +\Lambda (t \mid \mathbf {x}) = - \log S (t \mid \mathbf {x}) + C, \tag {32} +$$ + +where $C$ is the constant of integration and $\Lambda (t\mid \mathbf{x})$ is the cumulative hazard function: + +$$ +\Lambda (t \mid \mathbf {x}) = \Lambda_ {0} (t) e ^ {h (\mathbf {x})}, \tag {33} +$$ + +where $\Lambda_0(t)$ is the baseline cumulative hazard function. For survival analysis, $C$ is typically set to 0 when starting from $t = 0$ . Thus, the survival function can be expressed as: + +$$ +S (t \mid \mathbf {x}) = e ^ {- \Lambda (t \mid \mathbf {x})} = e ^ {- \Lambda_ {0} (t) e ^ {h (\mathbf {x})}} = \left[ S _ {0} (t) \right] ^ {e ^ {h (\mathbf {x})}}, \tag {34} +$$ + +where $S_0(t)$ is the baseline survival function, typically estimated by the Kaplan-Meier method (Kaplan & Meier, 1958) using the training data. The cumulative distribution function (CDF) can then be derived as: + +$$ +F _ {\text {D e e p S u r v}} (t \mid \mathbf {x}) = 1 - S (t \mid \mathbf {x}) = 1 - \left[ S _ {0} (t) \right] ^ {e ^ {h (\mathbf {x})}}. \tag {35} +$$ + +The quantiles $\theta_q^{\mathrm{DeepSurv}}$ for DeepSurv can be obtained from the inverse CDF $F_{\mathrm{DeepSurv}}^{-1}(t|\mathbf{x})$ (quantile function). + +DeepHit. A multi-layer perceptron (MLP) in DeepHit (Lee et al., 2018), conditioned on the input features $\mathbf{x}$ , is used to predict the probability distribution $f(t\mid \mathbf{x})$ over event times using a fully nonparametric approach. The quantiles $\theta_q^{\mathrm{DeepHit}}$ can be obtained from the inverse cumulative distribution function $F_{\mathrm{DeepHit}}^{-1}(t\mid \mathbf{x})$ , where $F_{\mathrm{DeepHit}}(t\mid \mathbf{x}) = \sum f_{\mathrm{DeepHit}}(t\mid \mathbf{x})$ . + +Gradient Boosting Machine (GBM). GBM for survival analysis (Dembek et al., 2014) is a nonparametric, additive ensemble of decision trees trained to minimize a loss function tailored to censored data, such as the Cox partial likelihood or the Brier score. Similar to DeepHit, the model directly learns a discrete probability distribution $f(t \mid \mathbf{x})$ over event times. The quantiles $\theta_q^{\mathrm{GBM}}$ can be obtained via the inversion of cumulative distribution function $F_{\mathrm{GBM}}^{-1}(t \mid \mathbf{x})$ , where $F_{\mathrm{GBM}}(t \mid \mathbf{x}) = \sum f_{\mathrm{GBM}}(t \mid \mathbf{x})$ . + +Random Survival Forests (RSF). RSF (Ishwaran et al., 2008) is a nonparametric ensemble method that extends Breiman's random forests to survival analysis. Each decision tree is trained on a bootstrap sample of the data and uses the log-rank test statistic to determine optimal splits. The survival function $S_{\mathrm{RSF}}(t \mid \mathbf{x})$ for a given input $\mathbf{x}$ is estimated by aggregating the survival estimates from all trees in the forest: + +$$ +S _ {\mathrm {R S F}} (t \mid \mathbf {x}) = \frac {1}{B} \sum_ {b = 1} ^ {B} S _ {b} (t \mid \mathbf {x}), \tag {36} +$$ + +where $S_{b}(t\mid \mathbf{x})$ is the survival function from the $b$ -th tree and $B$ is the total number of trees. The corresponding cumulative distribution function is $F_{\mathrm{RSF}}(t\mid \mathbf{x}) = 1 - \hat{S}_{\mathrm{RSF}}(t\mid \mathbf{x})$ . The quantiles $\theta_q^{\mathrm{RSF}}$ then can be obtained via the inversion of cumulative distribution function $F_{\mathrm{RSF}}^{-1}(t\mid \mathbf{x})$ , where $F_{\mathrm{RSF}}(t\mid \mathbf{x}) = \sum f_{\mathrm{RSF}}(t\mid \mathbf{x})$ . + +Deep Survival Machines (DSM). DSM (Nagpal et al., 2021) is a neural parametric model that represents the survival distribution as a mixture of $K$ components from a chosen parametric family (e.g., LogNormal, Weibull). Given input $\mathbf{x}$ , the model outputs both the parameters $\{\mu_k, \eta_k\}_{k=1}^K$ for each component and a mixture weight $\pi_k(\mathbf{x})$ using a neural network. The probability density function is expressed as: + +$$ +f _ {\mathrm {D S M}} (t \mid \mathbf {x}) = \sum_ {k = 1} ^ {K} \pi_ {k} (\mathbf {x}) f _ {k} (t; \mu_ {k}, \eta_ {k}), \tag {37} +$$ + +and the cumulative distribution function is: + +$$ +F _ {\mathrm {D S M}} (t \mid \mathbf {x}) = \sum_ {k = 1} ^ {K} \pi_ {k} (\mathbf {x}) F _ {k} (t; \mu_ {k}, \eta_ {k}), \tag {38} +$$ + +where $f_{k}$ and $F_{k}$ are the PDF and CDF of the $k$ -th parametric component (e.g., LogNormal or Weibull). The quantiles $\theta_{q}^{\mathrm{DSM}}$ are obtained from the inverse CDF $\theta_{q}^{\mathrm{DSM}} = F_{\mathrm{DSM}}^{-1}(q \mid \mathbf{x})$ . + +Summary of Comparative Advantages. In summary, our proposed method offers a unified and efficient solution that bridges the strengths of both classical and modern survival modeling approaches. Compared to traditional parametric models, it retains closed-form, differentiable PDF and CDF formulations that facilitate stable neural optimization and achieve robust empirical performance across diverse data settings. Compared to nonparametric models, it avoids the drawbacks of temporal discretization and excessive memory usage, providing compact, continuous, and interpretable estimates of survival quantities. Finally, relative to mixture-based models such as DSM, our method is simpler, faster, and more robust—requiring fewer parameters, introducing less architectural complexity, and demonstrating greater stability across datasets and censoring regimes. These advantages collectively establish the ALD framework as a compelling and scalable alternative for survival modeling in both synthetic and real-world applications. + +# B. Experimental Details + +This section provides additional details about the experiments conducted. The experiments were implemented using the PyTorch framework. Detailed information about the datasets, metrics, baselines and implementation details can be found in Appendix B.1, Appendix B.2, and Appendix B.3, respectively. + +Hardware. All experiments were conducted on a MacBook Pro with an Apple M3 Pro chip, featuring 12 cores (6 performance and 6 efficiency cores) and 18 GB of memory. CPU-based computations were utilized for all experiments, as the models primarily relied on fully-connected neural networks. + +# B.1. Datasets + +Our datasets are designed following the settings outlined in Pearce et al. (2022). The first type of dataset consists of synthetic target data with synthetic censoring. In these datasets, the input features, $\mathbf{x}$ , are generated uniformly as $\mathbf{x} \sim \mathcal{U}(0, 2)^D$ , where $D$ denotes the number of features. The observed variable, $o \sim p(o \mid \mathbf{x})$ , and the censored variable, $c \sim p(c \mid \mathbf{x})$ , follow distinct distributions, with their parameters varying based on the specific dataset configuration. Table 3 provides detailed descriptions of the distributions for the observed and censored variables. Additionally, the coefficient vector used in some datasets is defined as $\beta = [0.8, 0.6, 0.4, 0.5, -0.3, 0.2, 0.0, -0.7]$ . + +The other type of dataset comprises real-world target data with real censoring, sourced from various domains and characterized by distinct features, sample sizes, and censoring proportions: + +- METABRIC (Molecular Taxonomy of Breast Cancer International Consortium): This dataset contains genomic and clinical data for breast cancer patients. It includes 9 features, 1523 training samples, and 381 testing samples, with a censoring proportion of 0.42. Retrieved from the DeepSurv Repository. +- WHAS (Worcester Heart Attack Study): This dataset focuses on predicting survival following acute myocardial infarction. It includes 6 features, 1310 training samples, and 328 testing samples, with a censoring proportion of 0.57. Retrieved from the DeepSurv Repository. + +Table 3. Characteristics of synthetic datasets encompassing the number of features, parameterized distributions of observed variables, and censored variables, as utilized in the experimental framework. + +
Synthetic DatasetFeats (D)Observed Variables o ~ p(o | x)Censored Variables c ~ p(c | x)
Norm linear1N(2x + 10, (x + 1)2)N(4x + 10, (0.8x + 0.4)2)
Norm non-linear1N(xsin(2x) + 10, (0.5x + 0.5)2)N(2x + 10, 22)
Exponential1Exp(2x + 4)Exp(-3x + 15)
Weibull1Weibull(xsin(2x - 2) + 10, 5)Weibull(-3x + 20, 5)
LogNorm1LogNorm((x - 1)2, x2)U(0, 10)
Norm uniform1N(2xcos(2x) + 13, (x + 0.5)2)U(0, 18)
Norm heavy4N(3x0 + x12 - x22 + 2sin(x2x3) + 6, (x + 0.5)2)U(0, 12)
Norm med4—”—U(0, 20)
Norm light4—”—U(0, 40)
Norm same4—”—Equal to observed dist.
LogNorm heavy8LogNorm(∑i=18βixi, 1)/10U(0, 0.4)
LogNorm med8—”—U(0, 1.0)
LogNorm light8—”—U(0, 3.5)
LogNorm same8—”—Equal to observed dist.
+ +- SUPPORT (Study to Understand Prognoses Preferences Outcomes and Risks of Treatment): This dataset provides survival data for critically ill hospitalized patients. It includes 14 features, 7098 training samples, and 1775 testing samples, with a censoring proportion of 0.32. Covariates include demographic information and basic diagnostic data. Retrieved from the DeepSurv Repository. +- GBSG (Rotterdam & German Breast Cancer Study Group): Originating from the German Breast Cancer Study Group, this dataset tracks survival outcomes of breast cancer patients. It includes 7 features, 1785 training samples, and 447 testing samples, with a censoring proportion of 0.42. Retrieved from the DeepSurv Repository. +- TMBImmuno (Tumor Mutational Burden and Immunotherapy): This dataset predicts survival time for patients with various cancer types using clinical data. It includes 3 features, 1328 training samples, and 332 testing samples, with a censoring proportion of 0.49. Covariates include age, sex, and mutation count. Retrieved from the cBioPortal. +- BreastMSK: Derived from the Memorial Sloan Kettering Cancer Center, this dataset focuses on predicting survival time for breast cancer patients using tumor-related information. It includes 5 features, 1467 training samples, and 367 testing samples, with a censoring proportion of 0.77. Retrieved from the cBioPortal. +- LGGGBM: This dataset integrates survival data from low-grade glioma (LGG) and glioblastoma multiforme (GBM), frequently used for model validation in cancer genomics. It includes 5 features, 510 training samples, and 128 testing samples, with a censoring proportion of 0.60. Retrieved from the cBioPortal. + +# B.2. Metrics + +We employ nine distinct evaluation metrics to assess model performance comprehensively: Mean Absolute Error (MAE), Integrated Brier Score (IBS) (Graf et al., 1999), Harrell's C-Index (Harrell et al., 1982), Uno's C-Index (Uno et al., 2011), censored D-calibration (CensDcal) (Haider et al., 2020), along with the slope and intercept derived from two versions of censored D-calibration (Cal $[S(t|\mathbf{x})]$ (Slope), Cal[S(t|x)](Intercept), Cal[f(t|x)](Slope), and Cal[f(t|x)](Intercept)). These metrics provide a holistic evaluation framework, effectively capturing the survival models' predictive accuracy, discriminative ability, and calibration quality. + +MAE: + +$$ +\mathrm {M A E} = \frac {1}{N} \sum_ {i = 1} ^ {N} \left| y _ {i} - \tilde {y} _ {i} \right|, \tag {39} +$$ + +where $y_{i}$ represents the observed survival times, $\tilde{y}_{i}$ denotes the predicted survival times, and $N$ is the total number of data points in the test set. + +IBS: + +$$ +\operatorname {B S} (t) = \frac {1}{N} \sum_ {i = 1} ^ {N} \left[ \frac {\left(1 - \tilde {F} \left(t \mid \mathbf {x} _ {i}\right)\right) ^ {2} \mathbb {I} \left(y _ {i} \leq t , e _ {i} = 1\right)}{\tilde {G} \left(y _ {i}\right)} + \frac {\tilde {F} \left(t \mid \mathbf {x} _ {i}\right) ^ {2} \mathbb {I} \left(y _ {i} > t\right)}{\tilde {G} (t)} \right], \tag {40} +$$ + +$$ +\operatorname {I B S} = \frac {1}{t _ {2} - t _ {1}} \int_ {t _ {1}} ^ {t _ {2}} \operatorname {B S} (y) d y, \tag {41} +$$ + +where $\mathrm{BS}(t)$ represents the Brier score at time $t$ , and 100 time points are evenly selected from the 0.1 to 0.9 quantiles of the $y$ -distribution in the training set. $\tilde{F}(t \mid \mathbf{x}_i)$ denotes the estimated cumulative distribution function of the survival time for test subjects, $\mathbb{I}(\cdot)$ is the indicator function, and $e_i$ is the event indicator ( $e_i = 1$ if the event is observed). $\mathbf{x}_i$ represents the covariates, and $\tilde{G}(\cdot)$ refers to the Kaplan-Meier estimate (Kaplan & Meier, 1958) of the censoring survival function. + +- Harrell's C-Index: + +$$ +\mathrm {C} _ {\mathrm {H}} = P \left(\phi_ {i} > \phi_ {j} \mid y _ {i} < y _ {j}, e _ {i} = 1\right) = \frac {\sum_ {i \neq j} \left[ \mathbb {I} \left(\phi_ {i} > \phi_ {j}\right) + 0 . 5 * \mathbb {I} \left(\phi_ {i} = \phi_ {j}\right) \right] \mathbb {I} \left(y _ {i} < y _ {j}\right) e _ {i}}{\sum_ {i \neq j} \mathbb {I} \left(y _ {i} < y _ {j}\right) e _ {i}}, \tag {42} +$$ + +where $\phi_{i} = \tilde{S}(y_{i} \mid \mathbf{x}_{i}) = 1 - \tilde{F}(t \mid \mathbf{x}_{i})$ represents the risk score predicted by the survival model. For implementation, we utilize the concordance_index_censored function from the sksurv.metrics module, as documented in the scikit-survival API. + +- Uno's C-Index: + +$$ +\begin{array}{l} \mathrm {C _ {U}} = P (\phi_ {i} > \phi_ {j} \mid y _ {i} < y _ {j}, y _ {i} < y _ {\tau}) \\ = \frac {\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {n} \tilde {G} \left(y _ {i}\right) ^ {- 2} \left[ \mathbb {I} \left(\phi_ {i} > \phi_ {j}\right) + 0 . 5 * \mathbb {I} \left(\phi_ {i} = \phi_ {j}\right) \right] \mathbb {I} \left(y _ {i} < y _ {j} , y _ {i} < y _ {\tau}\right) e _ {i}}{\sum_ {i = 1} ^ {n} \sum_ {j = 1} ^ {n} \tilde {G} \left(y _ {i}\right) ^ {- 2} \mathbb {I} \left(y _ {i} < y _ {j} , y _ {i} < y _ {\tau}\right) e _ {i}}, \tag {43} \\ \end{array} +$$ + +where $y_{\tau}$ is the cutoff value for the survival time. For implementation, we utilize the concordance_index_ipcw function from the sksrv.metrics module, as documented in the scikit-survival API. + +CensDcal: + +$$ +\operatorname {C e n s D c a l} = 1 0 0 \times \sum_ {j = 1} ^ {1 0} \left(\left(q _ {j + 1} - q _ {j}\right) - \frac {1}{N} \zeta\right) ^ {2}, \tag {44} +$$ + +where $\zeta$ is defined by (Goldstein et al., 2020) as: + +$$ +\zeta = \sum_ {i \in S _ {\text {o b s e r v e d}}} \mathbb {I} \left[ \tilde {\theta} _ {i, q _ {j}} < y _ {i} \leq \tilde {\theta} _ {i, q _ {j + 1}} \right] + \sum_ {i \in S _ {\text {c e n s o r e d}}} \frac {(q _ {j + 1} - q _ {i}) \mathbb {I} \left[ \tilde {\theta} _ {i , q _ {j}} < y _ {i} \leq \tilde {\theta} _ {i , q _ {j + 1}} \right]}{1 - q _ {i}} + \frac {(q _ {j + 1} - q _ {j}) \mathbb {I} [ q _ {i} < q _ {j} ]}{1 - q _ {i}}. \tag {45} +$$ + +Here, the percentile parameter $q_{j}$ is predefined as $[0.1, 0.2, \dots, 0.9]$ at the outset, and $q_{i}$ is the quantile at which the data point was censored ( $e = 0, y = c$ ) with respect to the observed value distribution, i.e., $p(o < c \mid \mathbf{x})$ . $\tilde{\theta}_{i,q_j}$ represents the estimated $q$ th quantile of $y_{i}$ . + +- Slope & Intercept: The Slope and Intercept metrics evaluate the calibration quality of predicted survival quantiles relative to observed data under censoring. We utilize the np .polyfit function from the NumPy module, as documented in the NumPy API, to fit the 10 points $\left\{\left(0.1j,\sum_{j}\frac{1}{N}\zeta_{j}\right)\right\}_{j=1}^{10}$ and subsequently obtain the Slope and Intercept metrics. Two versions of the Slope and Intercept (Cal[S(t|x)](Slope), Cal[S(t|x])(Intercept), Cal[f(t|x)](Slope), and Cal[f(t|x)](Intercept)) are calculated, differing in how the quantile intervals are defined: + +- Version 1 (Measuring $S(t \mid \mathbf{x})$ ): The predicted survival probabilities are divided into intervals based on the target proportions, i.e., $q = [0.1, 0.2, \dots, 0.9, 1.0]$ . For each quantile interval, the proportion of ground truth values (observed survival times) that fall within the corresponding predicted quantile $\frac{1}{N} \zeta$ is calculated. For example, the ratio for 0.1 ( $j = 1$ ) is calculated within the interval [0, 0.1], and for 0.2 ( $j = 2$ ), within [0, 0.2]. Thus, the horizontal axis represents the target proportions 0.1j, while the vertical axis represents the observed proportions $\sum_{j} \frac{1}{N} \zeta_{j}$ derived from predictions. In the end, this metric is suitable for evaluating the Survival Function $S(t \mid \mathbf{x})$ (or CDF $F(t \mid \mathbf{x})$ ). + +- Version 2 (Measuring $f(t \mid \mathbf{x})$ ): Narrower intervals centered around target proportions are used, i.e., $q = \ldots, 0.4, 0.45, 0.55, 0.6, \ldots$ For each quantile, the observed proportions are calculated within these narrower intervals. For example, the ratio for 0.1 is calculated within the interval [0.45, 0.55], and for 0.2, within [0.4, 0.6]. In the end, this metric is ideal for assessing the probability density function (PDF) $f(t \mid \mathbf{x})$ . + +# B.3. Implementation Details + +Baselines. We compare our method against four baselines to evaluate performance and effectiveness: LogNorm (Royston, 2001), DeepSurv (Katzman et al., 2018), DeepHit (Lee et al., 2018), and CQRNN (Pearce et al., 2022). All methods were trained using the same optimization procedure and neural network architecture to ensure a fair comparison. The implementations for CQRNN and LogNorm were sourced from the official CQRNN repository (GitHub Link). The implementations for DeepSurv and DeepHit were based on the pycox .methods module (GitHub Link). + +Hyperparameter settings. All experiments were repeated across 10 random seeds to ensure robust and reliable results. The hyperparameter settings were as follows: + +- Default Neural Network Architecture: Fully-connected network with two hidden layers, each consisting of 100 hidden nodes, using ReLU activations. +- Default Epochs: 200 +- Default Batch Size: 128 +- Default Learning Rate: 0.01 +- Dropout Rate: 0.1 +- Optimizer: Adam +- Batch Norm: FALSE + +Our Method. We incorporate a residual connection between the shared feature extraction layer and the first hidden layer to enhance gradient flow. To satisfy the parameter constraints of the Asymmetric Laplace Distribution (ALD), the final output layer applies an exponential (Exp) activation function, ensuring that the outputs of the $\theta$ , $\sigma$ and $\kappa$ branches remain positive. Each of the two hidden layers contains 32 hidden nodes. A validation set is created by splitting $20\%$ of the training set. Early stopping is utilized to terminate training when the validation performance ceases to improve. + +CQRNN. We followed the hyperparameter settings tuned in the original paper (Pearce et al., 2022), where three random splits were used for validation (ensuring no overlap with the random seeds used in the final test runs). The following settings were applied: + +Weight Decay: 0.0001 +Grid Size: 10 +- Pseudo Value: $y^{*} = 1.2 \times \max_{i} y_{i}$ +- Dropout Rate: 0.333 + +The number of epochs and dropout usage were adjusted based on the dataset type: + +Synthetic Datasets: + +- Norm linear, Norm non-linear, Exponential, Weibull, LogNorm, Norm uniform: 100 epochs with dropout disabled. +- Norm heavy, Norm medium, Norm light, Norm same: 20 epochs with dropout disabled. +- LogNorm heavy, LogNorm medium, LogNorm light, LogNorm same: 10 epochs with dropout disabled. + +Real-World Datasets: + +- METABRIC: 20 epochs with dropout disabled. +- WHAS: 100 epochs with dropout disabled. +- SUPPORT: 10 epochs with dropout disabled. +- GBSG: 20 epochs with dropout enabled. +- TMBImmuno: 50 epochs with dropout disabled. +- BreastMSK: 100 epochs with dropout disabled. +- LGGGBM: 50 epochs with dropout enabled. + +LogNorm. The output dimensions of the default neural network architecture are 2, where the two outputs represent the mean and standard deviation of a Log-Normal distribution. To ensure the standard deviation prediction is always positive and differentiable, the output representing the standard deviation is passed through a SoftPlus activation function. We followed the hyperparameter settings tuned in the original paper (Pearce et al., 2022), with a Dropout Rate of 0.333. The number of epochs and dropout usage were adjusted based on the dataset type as follows: + +- Synthetic Datasets: The same settings as described above for CQRNN. +Real-World Datasets: + +- METABRIC: 10 epochs with dropout disabled. +- WHAS: 50 epochs with dropout disabled. +- SUPPORT: 20 epochs with dropout disabled. +- GBSG: 10 epochs with dropout enabled. +- TMBImmuno: 50 epochs with dropout disabled. +- BreastMSK: 50 epochs with dropout disabled. +- LGGGBM: 20 epochs with dropout enabled. + +DeepSurv. We adhered to the official hyperparameter settings from the pycox . methods module (GitHub Link). Each of the two hidden layers contains 32 hidden nodes. A validation set was created by splitting $20\%$ of the training set. Early stopping was employed to terminate training when the validation performance ceased to improve. Batch normalization was applied. + +DeepHit. We adhered to the official hyperparameter settings from the pycox/methods module (GitHub Link). Each of the two hidden layers contains 32 hidden nodes. A validation set was created by splitting $20\%$ of the training set. Early stopping was employed to terminate training when the validation performance ceased to improve. Batch normalization was applied, with additional settings: num durations = 100, alpha = 0.2, and sigma = 0.1. + +GBM. We implemented GBM model using the GradientBoostingSurvivalAnalysis class from the sksrvensemble module. The model was configured with n_estimators = 100, learning_rate = 0.01, and max_depth = 3, following standard practices for tree-based boosting in survival analysis. + +RSF. The RSF model was implemented using the RandomSurvivalForest class from sksrvensemble. We used the default configuration with n_estimators = 100, which has been shown to provide a good trade-off between performance and efficiency. + +DSM. We adopted the Deep Survival Machines (DSM) model from the auton-survival library, using the DeepSurvivalMachines class. The neural network consisted of two hidden layers, each with 32 hidden units. For the LogNorm variant, we used $k = 10$ mixture components, as higher values of $k$ were observed to degrade performance due to overfitting and instability. For the Weibull variant, we followed the library's default configuration with $k = 100$ , which was necessary to maintain sufficient model capacity. Training was performed using observed event times and censoring indicators, and the final predictions were computed by evaluating the learned mixture distribution over a fixed 1000-point discretized time grid to estimate the cumulative distribution function (CDF). + +# C. Additional Results + +This section presents additional empirical results to support the evaluation of our method. The results include comprehensive comparisons across datasets and metrics, as well as calibration plots and case studies to illustrate key behaviors. Full benchmarking results are provided in Appendix C.1, calibration curve visualizations in Appendix C.2, and detailed case analyses in Appendix C.3. + +# C.1. Overall Results. + +Table 5 summarizes the full results across 21 datasets, comparing our method with 8 baselines across 9 metrics. Figure 4 visualizes these results for a more intuitive comparison. In Table 5, the best performance is highlighted in bold. Figure 4 provides a graphical representation of nine distinct evaluation metrics to comprehensively assess predictive performance, including Mean Absolute Error (MAE), Integrated Brier Score (IBS), Harrell's C-Index, Uno's C-Index, Censored D-calibration (CensDcal), and the slope and intercept derived from two versions of censored D-calibration (Cal[S(t|x)](Slope), Cal[S(t|x)](Intercept), Cal[f(t|x)](Slope), and Cal[f(t|x)](Intercept)). Specifically, the following transformations were applied to enhance the clarity of the results: + +- MAE and CensDcal were log-transformed to better illustrate their value distributions and differences. +- For $\operatorname{Cal}[S(t|\mathbf{x})](\operatorname{Slope})$ and $\operatorname{Cal}[f(t|\mathbf{x})](\operatorname{Slope})$ , $|1 - \operatorname{Cal}[S(t|\mathbf{x})](\operatorname{Slope})|$ and $|1 - \operatorname{Cal}[f(t|\mathbf{x})](\operatorname{Slope})|$ were computed to measure their deviation from the ideal value of 1. +- For $\operatorname{Cal}[S(t|\mathbf{x})](\operatorname{Intercept})$ and $\operatorname{Cal}[f(t|\mathbf{x})](\operatorname{Intercept})$ , $|\operatorname{Cal}[S(t|\mathbf{x})](\operatorname{Intercept})|$ and $|\operatorname{Cal}[f(t|\mathbf{x})](\operatorname{Intercept})|$ were computed to measure their deviation from the ideal value of 0. + +These transformations allow for a more intuitive comparison of the performance differences across metrics and models. In the end, each subfigure in Figure 4 provides a comparison of its corresponding metric. The x-axis lists all the datasets, both synthetic datasets (e.g., Gaussian linear, exponential, etc.) and real-world datasets (e.g., METABRIC, WHAS, etc.), the y-axis indicates the range of corresponding its metric, and error bars represent standard deviation across 10 model runs. + +Table 4. Full results for all datasets, methods, and metrics. The values represent the mean $\pm 1$ standard error for the test set over 10 runs. + +
DatasetMethodMAEIBSHarrell's C-indexUno's C-indexCensDcalCal[S(t|x)](Slope)Cal[S(t|x)](Intercept)Cal[f(t|x)](Slope)Cal[f(t|x)](Intercept)
Norm-linearALD0.865 ± 1.3370.278 ± 0.0080.653 ± 0.0140.648 ± 0.0110.407 ± 0.3431.025 ± 0.0160.005 ± 0.0301.027 ± 0.042-0.016 ± 0.037
CQRNN0.278 ± 0.1440.326 ± 0.0340.657 ± 0.0080.651 ± 0.0070.466 ± 0.1501.001 ± 0.062-0.003 ± 0.0261.007 ± 0.039-0.020 ± 0.047
LogNorm0.372 ± 0.2280.709 ± 0.0280.652 ± 0.0160.646 ± 0.0140.496 ± 0.3990.965 ± 0.0240.005 ± 0.0140.978 ± 0.0410.014 ± 0.067
DeepSurv0.239 ± 0.1140.676 ± 0.0260.657 ± 0.0080.651 ± 0.0070.139 ± 0.0710.983 ± 0.0180.015 ± 0.0161.007 ± 0.018-0.005 ± 0.014
DeepHit1.481 ± 0.5270.503 ± 0.0250.635 ± 0.0240.628 ± 0.0256.540 ± 1.4580.967 ± 0.0360.098 ± 0.0701.216 ± 0.051-0.302 ± 0.029
GBM0.631 ± 0.0540.305 ± 0.0070.641 ± 0.0120.633 ± 0.0100.146 ± 0.0780.997 ± 0.0230.003 ± 0.0181.008 ± 0.014-0.014 ± 0.014
RSF1.234 ± 0.1200.328 ± 0.0090.588 ± 0.0140.584 ± 0.0130.994 ± 0.2560.886 ± 0.015-0.025 ± 0.0170.880 ± 0.0210.069 ± 0.020
DSM(LogNorm)1.039 ± 0.0460.324 ± 0.0070.652 ± 0.0090.646 ± 0.0082.514 ± 0.5231.028 ± 0.017-0.016 ± 0.0160.968 ± 0.0190.071 ± 0.022
DSM(Weibull)1.045 ± 0.0500.323 ± 0.0070.654 ± 0.0080.647 ± 0.0073.659 ± 0.5931.104 ± 0.0180.004 ± 0.0171.068 ± 0.0100.000 ± 0.015
Norm-nonlinearALD0.243 ± 0.0800.212 ± 0.0060.670 ± 0.0150.644 ± 0.0160.406 ± 0.1791.072 ± 0.021-0.011 ± 0.0151.038 ± 0.025-0.016 ± 0.040
CQRNN0.117 ± 0.0370.507 ± 0.0260.674 ± 0.0140.651 ± 0.0140.241 ± 0.0990.983 ± 0.0260.002 ± 0.0180.987 ± 0.0120.011 ± 0.027
LogNorm0.396 ± 0.4320.560 ± 0.0580.630 ± 0.0870.617 ± 0.0742.136 ± 3.8861.003 ± 0.0520.051 ± 0.0541.097 ± 0.060-0.098 ± 0.059
DeepSurv0.197 ± 0.0470.623 ± 0.0130.670 ± 0.0150.650 ± 0.0140.196 ± 0.1281.015 ± 0.0190.007 ± 0.0161.019 ± 0.022-0.007 ± 0.026
DeepHit1.099 ± 0.1300.515 ± 0.0490.610 ± 0.0510.596 ± 0.0403.886 ± 3.6820.999 ± 0.064-0.007 ± 0.0611.064 ± 0.067-0.161 ± 0.084
GBM0.323 ± 0.0270.226 ± 0.0040.653 ± 0.0180.636 ± 0.0160.179 ± 0.1041.004 ± 0.0170.004 ± 0.0181.012 ± 0.027-0.013 ± 0.031
RSF0.489 ± 0.0450.242 ± 0.0040.622 ± 0.0130.604 ± 0.0120.910 ± 0.3000.885 ± 0.023-0.017 ± 0.0120.890 ± 0.0190.063 ± 0.025
DSM(LogNorm)0.510 ± 0.0380.234 ± 0.0050.598 ± 0.0160.565 ± 0.0162.683 ± 0.2820.988 ± 0.0170.080 ± 0.0221.072 ± 0.0340.004 ± 0.035
DSM(Weibull)0.477 ± 0.0290.235 ± 0.0050.634 ± 0.0180.610 ± 0.0163.861 ± 0.3160.988 ± 0.0150.135 ± 0.0161.157 ± 0.022-0.067 ± 0.026
Norm uniformALD0.473 ± 0.3440.045 ± 0.0020.785 ± 0.0100.703 ± 0.0190.115 ± 0.0301.019 ± 0.0200.002 ± 0.0161.016 ± 0.015-0.006 ± 0.021
CQRNN0.301 ± 0.1040.535 ± 0.0150.786 ± 0.0090.706 ± 0.0150.162 ± 0.1411.018 ± 0.033-0.013 ± 0.0131.002 ± 0.015-0.007 ± 0.017
LogNorm17.079 ± 5.8330.387 ± 0.0130.615 ± 0.1180.578 ± 0.0833.799 ± 0.3540.951 ± 0.0590.159 ± 0.0431.186 ± 0.016-0.129 ± 0.021
DeepSurv0.627 ± 0.1800.516 ± 0.0090.781 ± 0.0140.701 ± 0.0200.466 ± 0.1491.038 ± 0.0170.022 ± 0.0131.069 ± 0.012-0.051 ± 0.016
DeepHit1.468 ± 0.4580.364 ± 0.0480.758 ± 0.0330.688 ± 0.0283.150 ± 1.1421.015 ± 0.0450.024 ± 0.0471.128 ± 0.051-0.209 ± 0.027
GBM1.134 ± 0.0930.058 ± 0.0030.739 ± 0.0190.674 ± 0.0150.101 ± 0.0540.991 ± 0.0130.013 ± 0.0091.013 ± 0.012-0.008 ± 0.017
RSF1.160 ± 0.1150.055 ± 0.0030.665 ± 0.0210.621 ± 0.0190.412 ± 0.1010.915 ± 0.011-0.002 ± 0.0070.930 ± 0.0130.043 ± 0.012
DSM(LogNorm)1.319 ± 0.0230.063 ± 0.0030.782 ± 0.0120.691 ± 0.0186.693 ± 1.2800.920 ± 0.0150.102 ± 0.0191.069 ± 0.025-0.035 ± 0.022
DSM(Weibull)1.352 ± 0.0200.063 ± 0.0030.768 ± 0.0170.683 ± 0.0183.963 ± 0.6950.984 ± 0.0200.038 ± 0.0111.041 ± 0.015-0.025 ± 0.019
ExponentialALD2.942 ± 2.3890.309 ± 0.0180.560 ± 0.0080.560 ± 0.0070.432 ± 0.4050.978 ± 0.047-0.015 ± 0.0140.964 ± 0.0490.016 ± 0.053
CQRNN1.943 ± 0.2970.317 ± 0.0130.558 ± 0.0130.557 ± 0.0110.305 ± 0.1290.976 ± 0.0660.012 ± 0.0431.001 ± 0.027-0.008 ± 0.019
LogNorm3.223 ± 0.8230.455 ± 0.0100.527 ± 0.0280.528 ± 0.0280.419 ± 0.1410.983 ± 0.0260.042 ± 0.0181.057 ± 0.022-0.051 ± 0.021
DeepSurv1.913 ± 0.2690.486 ± 0.0150.558 ± 0.0070.558 ± 0.0060.119 ± 0.0660.986 ± 0.0330.009 ± 0.0221.003 ± 0.018-0.008 ± 0.018
DeepHit2.626 ± 2.7590.471 ± 0.0120.526 ± 0.0320.526 ± 0.0311.205 ± 1.0600.960 ± 0.027-0.012 ± 0.0210.907 ± 0.0550.127 ± 0.066
GBM2.089 ± 0.2490.295 ± 0.0070.541 ± 0.0110.540 ± 0.0100.137 ± 0.0550.977 ± 0.0340.007 ± 0.0250.995 ± 0.019-0.004 ± 0.017
RSF3.422 ± 0.2080.343 ± 0.0160.515 ± 0.0150.513 ± 0.0140.778 ± 0.3350.885 ± 0.026-0.009 ± 0.0110.897 ± 0.0240.066 ± 0.020
DSM(LogNorm)2.374 ± 0.2290.294 ± 0.0070.547 ± 0.0130.546 ± 0.0121.935 ± 0.3440.976 ± 0.0250.040 ± 0.0161.040 ± 0.025-0.028 ± 0.024
DSM(Weibull)1.921 ± 0.2300.292 ± 0.0070.557 ± 0.0070.557 ± 0.0061.571 ± 0.3450.990 ± 0.0220.012 ± 0.0101.004 ± 0.0220.002 ± 0.022
+ +
DatasetMethodMAEIBSHarrell's C-indexUno's C-indexCensDealCal[S(t|x)](Slope)Cal[S(t|x)](Intercept)Cal[f(t|x)](Slope)Cal[f(t|x)](Intercept)
WeibullALD5.135 ± 9.5330.219 ± 0.0280.767 ± 0.0090.763 ± 0.0090.648 ± 0.5111.044 ± 0.023-0.023 ± 0.0330.993 ± 0.0490.021 ± 0.060
CQRNN0.350 ± 0.0980.461 ± 0.0300.775 ± 0.0050.769 ± 0.0050.346 ± 0.1310.989 ± 0.057-0.001 ± 0.0420.995 ± 0.022-0.003 ± 0.023
LogNorm0.862 ± 0.1210.840 ± 0.0210.773 ± 0.0060.767 ± 0.0060.598 ± 0.1720.993 ± 0.0260.029 ± 0.0161.050 ± 0.028-0.053 ± 0.038
DeepSurv0.381 ± 0.0980.969 ± 0.0190.772 ± 0.0040.766 ± 0.0060.118 ± 0.0490.998 ± 0.0230.006 ± 0.0121.005 ± 0.018-0.009 ± 0.021
DeepHit1.975 ± 0.1720.618 ± 0.0320.769 ± 0.0060.763 ± 0.0073.020 ± 1.1570.998 ± 0.0580.122 ± 0.0711.206 ± 0.056-0.187 ± 0.069
GBM1.467 ± 0.1000.254 ± 0.0060.766 ± 0.0050.759 ± 0.0060.359 ± 0.1431.025 ± 0.0220.012 ± 0.0201.053 ± 0.025-0.057 ± 0.021
RSF1.259 ± 0.1550.233 ± 0.0110.747 ± 0.0090.740 ± 0.0100.986 ± 0.2990.863 ± 0.030-0.009 ± 0.0140.886 ± 0.0240.066 ± 0.021
DSM(LogNorm)2.608 ± 0.0720.328 ± 0.0070.745 ± 0.0050.743 ± 0.0052.713 ± 0.4691.015 ± 0.016-0.004 ± 0.0220.985 ± 0.0330.046 ± 0.026
DSM(Weibull)2.661 ± 0.0730.329 ± 0.0070.745 ± 0.0040.742 ± 0.0043.569 ± 0.4861.079 ± 0.015-0.013 ± 0.0201.026 ± 0.0270.018 ± 0.023
LogNormALD0.363 ± 0.0680.376 ± 0.0130.588 ± 0.0140.585 ± 0.0140.256 ± 0.1501.005 ± 0.0210.006 ± 0.0111.011 ± 0.028-0.004 ± 0.029
CQRNN0.950 ± 0.0910.407 ± 0.0190.588 ± 0.0160.584 ± 0.0160.459 ± 0.2201.024 ± 0.066-0.019 ± 0.0340.996 ± 0.0420.000 ± 0.031
LogNorm0.267 ± 0.0620.645 ± 0.0210.588 ± 0.0150.584 ± 0.0150.103 ± 0.0201.009 ± 0.0120.006 ± 0.0091.016 ± 0.015-0.010 ± 0.017
DeepSurv0.963 ± 0.0580.658 ± 0.0290.589 ± 0.0160.586 ± 0.0160.137 ± 0.0490.996 ± 0.0210.001 ± 0.0200.997 ± 0.0250.002 ± 0.021
DeepHit0.902 ± 0.5040.568 ± 0.0250.551 ± 0.0320.548 ± 0.0312.088 ± 1.6660.988 ± 0.031-0.026 ± 0.0500.892 ± 0.0720.162 ± 0.090
GBM1.034 ± 0.0490.385 ± 0.0100.579 ± 0.0150.575 ± 0.0151.163 ± 0.0520.999 ± 0.028-0.002 ± 0.0180.999 ± 0.018-0.003 ± 0.016
RSF1.182 ± 0.0740.428 ± 0.0120.542 ± 0.0190.541 ± 0.0180.907 ± 0.2470.881 ± 0.019-0.017 ± 0.0150.887 ± 0.0190.062 ± 0.020
DSM(LogNorm)0.939 ± 0.0600.388 ± 0.0110.506 ± 0.0090.505 ± 0.0081.191 ± 0.3351.008 ± 0.022-0.006 ± 0.0160.988 ± 0.0210.020 ± 0.020
DSM(Weibull)0.762 ± 0.0550.382 ± 0.0110.501 ± 0.0130.501 ± 0.0122.153 ± 0.4801.059 ± 0.019-0.010 ± 0.0111.021 ± 0.0170.011 ± 0.016
Norm heavyALD0.667 ± 0.1390.019 ± 0.0010.919 ± 0.0070.870 ± 0.0290.036 ± 0.0171.009 ± 0.005-0.004 ± 0.0041.001 ± 0.009-0.002 ± 0.010
CQRNN0.574 ± 0.0310.538 ± 0.0060.914 ± 0.0080.863 ± 0.0330.062 ± 0.0991.009 ± 0.019-0.002 ± 0.0071.000 ± 0.012-0.004 ± 0.011
LogNorm33.140 ± 12.0040.411 ± 0.0140.781 ± 0.0710.679 ± 0.1262.249 ± 0.4901.122 ± 0.0220.001 ± 0.0291.111 ± 0.031-0.074 ± 0.032
DeepSurv1.662 ± 0.1570.558 ± 0.0070.726 ± 0.0350.582 ± 0.0560.577 ± 0.0671.070 ± 0.006-0.002 ± 0.0091.065 ± 0.011-0.065 ± 0.010
DeepHit0.814 ± 0.1040.475 ± 0.0370.913 ± 0.0090.856 ± 0.0341.349 ± 0.3741.051 ± 0.0440.055 ± 0.0351.139 ± 0.027-0.121 ± 0.036
GBM1.627 ± 0.0340.041 ± 0.0020.874 ± 0.0090.796 ± 0.0840.043 ± 0.0111.003 ± 0.0090.011 ± 0.0081.019 ± 0.006-0.015 ± 0.007
RSF0.607 ± 0.0160.020 ± 0.0010.910 ± 0.0080.802 ± 0.1111.038 ± 0.0161.015 ± 0.0060.002 ± 0.0061.015 ± 0.009-0.008 ± 0.010
DSM(LogNorm)1.915 ± 0.0370.477 ± 0.0260.782 ± 0.0260.706 ± 0.0677.049 ± 0.5550.997 ± 0.0080.023 ± 0.0071.027 ± 0.005-0.015 ± 0.005
DSM(Weibull)1.926 ± 0.0380.477 ± 0.0150.757 ± 0.0180.728 ± 0.0171.714 ± 0.1911.031 ± 0.0180.009 ± 0.0131.013 ± 0.005-0.006 ± 0.015
Norm lightALD0.236 ± 0.0510.047 ± 0.0030.894 ± 0.0050.872 ± 0.0040.339 ± 0.0761.087 ± 0.017-0.050 ± 0.0110.999 ± 0.0140.004 ± 0.014
CQRNN0.312 ± 0.0330.608 ± 0.0100.888 ± 0.0050.867 ± 0.0050.097 ± 0.0450.984 ± 0.0260.001 ± 0.0130.989 ± 0.019-0.007 ± 0.022
LogNorm3.700 ± 2.5790.430 ± 0.0190.810 ± 0.0480.777 ± 0.0488.192 ± 6.6600.751 ± 0.0730.350 ± 0.0521.280 ± 0.021-0.192 ± 0.036
DeepSurv0.253 ± 0.0260.722 ± 0.0120.893 ± 0.0040.871 ± 0.0046.699 ± 1.1111.054 ± 0.0140.008 ± 0.0151.061 ± 0.019-0.051 ± 0.017
DeepHit0.916 ± 0.0770.576 ± 0.1220.886 ± 0.0060.863 ± 0.0051.655 ± 0.4091.056 ± 0.0320.038 ± 0.0261.130 ± 0.032-0.130 ± 0.066
GBM1.443 ± 0.0350.096 ± 0.0040.859 ± 0.0040.837 ± 0.0031.211 ± 0.0451.014 ± 0.0110.015 ± 0.0091.037 ± 0.011-0.033 ± 0.011
RSF0.406 ± 0.0130.051 ± 0.0130.884 ± 0.0140.861 ± 0.0041.714 ± 0.1661.016 ± 0.014-0.003 ± 0.0131.014 ± 0.016-0.012 ± 0.014
DSM(LogNorm)1.918 ± 0.3550.118 ± 0.0660.692 ± 0.280.726 ± 0.0171.404 ± 0.1761.019 ± 0.014-0.033 ± 0.0191.058 ± 0.012-0.015 ± 0.012
DSM(Weibull)1.926 ± 0.3390.222 ± 0.140.653 ± 0.200.643 ± 0.208.888 ± 1.1991.311 ± 0.181-0.039 ± 0.0131.322 ± 0.112-0.014 ± 0.014
Norm sameALD0.405 ± 0.0790.096 ± 0.0330.882 ± 0.0440.874 ± 0.0340.339 ± 0.0761.087 ± 0.014-0.050 ± 0.0111.044 ± 0.018-0.010 ± 0.022
CQRNN0.371 ± 0.2220.717 ± 0.0390.879 ± 0.0220.871 ± 0.0221.419 ± 0.0970.999 ± 0.27-0.014 ± 0.017-0.985 ± 0.222-0.007 ± 0.22
LogNorm3.752 ± 2.1540.548 ± 0.2330.832 ± 0.2220.821 ± 0.22212.884 ± 1.7001.804 ± 0.162-0.358 ± 0.1261.351 ± 0.218-0.256 ± 0.338
DeepSurv0.247 ± 0.0160.916 ± 0.2470.882 ± 0.0260.867 ± 0.1251.358 ± 0.1271.038 ± 0.014-0.016 ± 0.0191.157 ± 0.233-0.147 ± 0.253
DeepHit0.959 ± 0.5510.673 ± 0.1220.875 ± 0.1440.867 ± 0.1441.854 ± 0.4611.444 ± 0.041-0.633 ± 0.2221.139 ± 0.323-0.157 ± 0.533
GBM1.329 ± 0.0290.174 ± 0.1110.849 ± 0.2440.844 ± 0.2441.250 ± 0.1791.115 ± 0.13-0.233 ± 0.131.156 ± 0.213-0.135 ± 0.13
RSF0.444 ± 0.2230.676 ± 0.1330.875 ± 0.2280.866 ± 0.2131.113 ± 0.233-0.147 ± 0.147- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DSM(LogNorm)2.135 ± 0.5450.179 ± 0.2660.651 ± 0.2180.643 ± 0.2263.858 ± 2.951.844 ± 0.119-1.044 ± 0.166-1.154 ± 0.213-1.143 ± 0.13
DSM(Weibull)2.182 ± 0.5350.178 ± 0.2240.727 ± 0.1760.717 ± 0.1661.531 ± 0.1391.444 ± 0.016-1.013 ± 0.12-1.144 ± 0.213-1.143 ± 0.13
LogNorm lightALD0.385 ± 0.1930.174 ± 0.2550.777 ± 0.2120.727 ± 0.221-1.014 ± 0.136-1.007 ± 0.14- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CQRNN0.717 ± 0.257-0.436 ± 0.353-0.767 ± 0.299-1.718 ± 0.218-1.235 ± 0.164-1.998 ± 0.226- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -LogNorm-3.755 ± 2.192-1.454 ± 0.212-1.643 ± 0.353-2.665 ± 1.254-2.327 ± 1.139-1.834 ± 1.254-2.358 ± 1.212-2.358 ± 1.212
LogNorm-3.755 ± 2.192-1.454 ± 0.212-1.643 ± 0.353-2.665 ± 1.254-2.327 ± 1.139-1.834 ± 1.254-2.358 ± 1.123-2.358 ± 1.212-2.358 ± 1.212
DeepSurv-3.755 ± 2.192-1.454 ± 0.212-1.643 ± 0.353-2.665 ± 1.254-2.327 ± 1.139-1.834 ± 1.254-2.358 ± 1.123-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ +Learning Survival Distributions with the Asymmetric Laplace Distribution + +
DatasetMethodMAEIBSHarrell's C-indexUno's C-indexCensDealCal[S(t|x)](Slope)Cal[S(t|x)](Intercept)Cal[f(t|x)](Slope)Cal[f(t|x)](Intercept)
METABRICALD1.626 ± 0.1940.245 ± 0.0120.637 ± 0.0210.633 ± 0.0310.293 ± 0.1251.001 ± 0.033-0.011 ± 0.0160.993 ± 0.028-0.009 ± 0.024
CQRNN0.998 ± 0.0740.344 ± 0.0270.632 ± 0.0170.630 ± 0.0330.641 ± 0.3910.972 ± 0.0480.007 ± 0.0181.001 ± 0.042-0.022 ± 0.051
LogNorm1.329 ± 0.0410.526 ± 0.0150.609 ± 0.0190.613 ± 0.0460.619 ± 0.2470.964 ± 0.026-0.024 ± 0.0110.937 ± 0.0170.040 ± 0.018
DeepSurv0.981 ± 0.0290.533 ± 0.0190.645 ± 0.0160.635 ± 0.0350.159 ± 0.0751.009 ± 0.011-0.008 ± 0.0131.003 ± 0.022-0.010 ± 0.023
DeepHit1.177 ± 0.0650.462 ± 0.0080.563 ± 0.0400.577 ± 0.0530.659 ± 0.2121.070 ± 0.022-0.036 ± 0.0141.018 ± 0.015-0.024 ± 0.029
GBM0.949 ± 0.0430.250 ± 0.0070.639 ± 0.0180.632 ± 0.0420.199 ± 0.0491.016 ± 0.025-0.001 ± 0.0191.017 ± 0.021-0.018 ± 0.021
RSF1.079 ± 0.0590.241 ± 0.0080.632 ± 0.0170.619 ± 0.0430.180 ± 0.0711.020 ± 0.022-0.004 ± 0.0191.011 ± 0.020-0.007 ± 0.020
DSM(LogNorm)0.980 ± 0.0310.265 ± 0.0070.613 ± 0.0240.591 ± 0.0514.601 ± 0.3071.002 ± 0.0260.004 ± 0.0161.004 ± 0.0180.001 ± 0.018
DSM(Weibull)1.025 ± 0.0320.266 ± 0.0070.602 ± 0.0250.598 ± 0.0244.998 ± 0.5101.042 ± 0.023-0.035 ± 0.0140.982 ± 0.0190.016 ± 0.019
WHASALD2.196 ± 0.6120.134 ± 0.0130.823 ± 0.0160.824 ± 0.0140.198 ± 0.0940.972 ± 0.0270.003 ± 0.0160.981 ± 0.0210.009 ± 0.023
CQRNN0.798 ± 0.0490.636 ± 0.0180.838 ± 0.0160.846 ± 0.0160.564 ± 0.2480.974 ± 0.0600.002 ± 0.0220.998 ± 0.057-0.024 ± 0.053
LogNorm1.976 ± 0.2320.614 ± 0.0250.600 ± 0.0420.575 ± 0.0390.584 ± 0.2330.920 ± 0.0320.041 ± 0.0210.994 ± 0.032-0.002 ± 0.033
DeepSurv0.867 ± 0.0500.699 ± 0.0230.711 ± 0.0140.637 ± 0.0250.228 ± 0.1010.997 ± 0.0200.005 ± 0.0181.012 ± 0.020-0.019 ± 0.019
DeepHit0.966 ± 0.0770.604 ± 0.0230.806 ± 0.0180.811 ± 0.0180.269 ± 0.1720.963 ± 0.0360.018 ± 0.0221.008 ± 0.026-0.015 ± 0.031
GBM1.157 ± 0.0730.165 ± 0.0090.817 ± 0.0180.816 ± 0.0150.363 ± 0.1741.055 ± 0.0340.042 ± 0.0201.076 ± 0.022-0.044 ± 0.023
RSF0.603 ± 0.0550.082 ± 0.0110.866 ± 0.0170.898 ± 0.01511.243 ± 3.0133.177 ± 0.2750.163 ± 0.0491.607 ± 0.0910.113 ± 0.024
DSM(LogNorm)2.055 ± 0.1750.211 ± 0.0090.779 ± 0.0160.788 ± 0.01511.200 ± 1.1810.908 ± 0.0260.070 ± 0.0211.015 ± 0.025-0.001 ± 0.027
DSM(Weibull)1.748 ± 0.1270.208 ± 0.0100.786 ± 0.0230.794 ± 0.01710.569 ± 1.2950.907 ± 0.0280.064 ± 0.0221.001 ± 0.0240.010 ± 0.026
SUPPORTALD1.121 ± 0.1070.362 ± 0.0130.568 ± 0.0150.572 ± 0.0152.197 ± 0.6671.084 ± 0.043-0.113 ± 0.0230.990 ± 0.0560.084 ± 0.046
CQRNN0.659 ± 0.0470.344 ± 0.0070.612 ± 0.0050.613 ± 0.0060.724 ± 0.4281.034 ± 0.066-0.019 ± 0.0340.992 ± 0.0510.019 ± 0.049
LogNorm1.311 ± 0.1500.688 ± 0.0200.597 ± 0.0110.597 ± 0.0112.792 ± 0.9420.942 ± 0.040-0.114 ± 0.0080.769 ± 0.0410.169 ± 0.042
DeepSurv0.511 ± 0.0210.629 ± 0.0140.599 ± 0.0080.597 ± 0.0090.092 ± 0.0360.989 ± 0.016-0.003 ± 0.0110.986 ± 0.0120.006 ± 0.014
DeepHit0.574 ± 0.0340.530 ± 0.0090.577 ± 0.0080.582 ± 0.0090.829 ± 0.2130.891 ± 0.0130.006 ± 0.0080.909 ± 0.0140.086 ± 0.021
GBM0.427 ± 0.0080.359 ± 0.0050.597 ± 0.0060.601 ± 0.0070.111 ± 0.0411.065 ± 0.018-0.010 ± 0.0111.005 ± 0.0100.019 ± 0.015
RSF0.647 ± 0.0270.339 ± 0.0050.619 ± 0.0060.618 ± 0.0060.122 ± 0.0581.132 ± 0.013-0.027 ± 0.0091.006 ± 0.0100.037 ± 0.015
DSM(LogNorm)0.512 ± 0.0120.379 ± 0.0060.570 ± 0.0070.570 ± 0.00716.664 ± 1.4421.147 ± 0.011-0.145 ± 0.0100.928 ± 0.0090.057 ± 0.012
DSM(Weibull)0.581 ± 0.0130.375 ± 0.0070.565 ± 0.0100.569 ± 0.01014.725 ± 1.0661.209 ± 0.010-0.147 ± 0.0100.941 ± 0.0090.056 ± 0.012
GBSALD1.713 ± 0.2080.279 ± 0.0140.671 ± 0.0130.665 ± 0.0130.283 ± 0.1061.000 ± 0.035-0.018 ± 0.0160.977 ± 0.0250.014 ± 0.034
CQRNN0.865 ± 0.0700.357 ± 0.0210.680 ± 0.0150.672 ± 0.0140.573 ± 0.5770.953 ± 0.043-0.008 ± 0.0160.967 ± 0.0300.002 ± 0.040
LogNorm1.469 ± 0.1050.577 ± 0.0150.660 ± 0.0120.653 ± 0.0120.817 ± 0.3030.968 ± 0.025-0.057 ± 0.0110.886 ± 0.0250.086 ± 0.035
DeepSurv0.709 ± 0.0360.569 ± 0.0160.611 ± 0.0170.602 ± 0.0160.180 ± 0.1261.002 ± 0.021-0.003 ± 0.0130.996 ± 0.013-0.004 ± 0.018
DeepHit0.773 ± 0.0370.495 ± 0.0160.649 ± 0.0160.644 ± 0.0162.020 ± 1.4500.967 ± 0.049-0.045 ± 0.0140.952 ± 0.031-0.025 ± 0.016
GBM0.837 ± 0.0370.289 ± 0.0080.669 ± 0.0130.662 ± 0.0121.165 ± 0.1391.006 ± 0.022-0.009 ± 0.0171.018 ± 0.020-0.012 ± 0.020
RSF0.900 ± 0.0520.283 ± 0.0110.658 ± 0.0100.648 ± 0.0100.192 ± 0.0541.266 ± 0.046-0.007 ± 0.0160.984 ± 0.0240.011 ± 0.026
DSM(LogNorm)0.989 ± 0.0250.308 ± 0.0090.636 ± 0.0230.629 ± 0.0207.079 ± 0.3841.048 ± 0.017-0.052 ± 0.0100.960 ± 0.0150.034 ± 0.017
DSM(Weibull)1.075 ± 0.0260.308 ± 0.0090.638 ± 0.0110.632 ± 0.0118.698 ± 0.7181.102 ± 0.015-0.077 ± 0.0090.968 ± 0.0140.031 ± 0.016
TMBImmunoALD3.002 ± 1.4970.245 ± 0.0150.561 ± 0.0370.547 ± 0.0400.835 ± 0.6041.053 ± 0.045-0.038 ± 0.0250.994 ± 0.0210.004 ± 0.025
CQRNN1.008 ± 0.0530.272 ± 0.0130.567 ± 0.0220.557 ± 0.0170.251 ± 0.1230.967 ± 0.037-0.011 ± 0.026-0.988 ± 0.027-0.019 ± 0.025
LogNorm1.880 ± 0.1560.420 ± 0.0110.561 ± 0.0280.557 ± 0.0280.617 ± 0.1960.949 ± 0.028-0.027 ± 0.019-0.913 ± 0.025-0.066 ± 0.027
DeepSurv0.948 ± 0.0970.395 ± 0.0120.543 ± 0.0340.526 ± 0.0390.246 ± 0.1681.019 ± 0.330-0.001 ± 0.0231.009 ± 0.020-0.003 ± 0.018
DeepHit1.117 ± 0.1410.400 ± 0.0110.560 ± 0.0230.554 ± 0.0210.464 ± 0.214-0.963 ± 0.039-0.018 ± 0.026-0.935 ± 0.020-0.058 ± 0.026
GBM0.897 ± 0.0320.243 ± 0.0090.576 ± 0.0210.555 ± 0.0231.320 ± 0.0571.320 ± 0.057-0.019 ± 0.0341.049 ± 0.028-0.079 ± 0.026
RSF1.607 ± 0.6690.263 ± 0.0080.550 ± 0.0170.536 ± 0.0187.448 ± 0.1121.266 ± 0.046-0.018 ± 0.0191.017 ± 0.021-0.081 ± 0.019
DSM(LogNorm)0.956 ± 0.0180.248 ± 0.0090.518 ± 0.0330.522 ± 0.0337.414 ± 0.7911.005 ± 0.022-0.028 ± 0.019-0.963 ± 0.015-0.035 ± 0.015
DSM(Weibull)1.020 ± 0.0200.248 ± 0.0090.551 ± 0.0260.542 ± 0.0299.625 ± 1.3141.077 ± 0.017-0.053 ± 0.015-0.984 ± 0.016-0.021 ± 0.016
BreastMSKALD2.593 ± 0.2890.186 ± 0.0080.617 ± 0.0320.568 ± 0.0360.666 ± 0.0271.002 ± 0.019-0.007 ± 0.016-0.993 ± 0.038-0.003 ± 0.041
CQRNN1.864 ± 0.1540.375 ± 0.0350.599 ± 0.0440.561 ± 0.0360.172 ± 0.083-0.993 ± 0.036-0.005 ± 0.013-0.996 ± 0.035-0.003 ± 0.034
LogNorm6.675 ± 0.5970.316 ± 0.0150.769 ± 0.0240.573 ± 0.046-0.208 ± 0.889-1.044 ± 0.010-0.004 ± 0.0191.031 ± 0.012-0.023 ± 0.015
DeepSurv1.639 ± 0.2170.334 ± 0.018-0.614 ± 0.333-0.582 ± 0.499-1.212 ± 0.999-1.046 ± 0.244-0.026 ± 0.131-1.036 ± 0.219-0.036 ± 0.131
DeepHit1.523 ± 0.076-0.303 ± 0.016-0.614 ± 0.336-0.563 ± 0.466-1.411 ± 2.13-1.162 ± 2.13- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GBM1.598 ± 0.087-0.997 ± 0.025-1.377 ± 2.13-1.355 ± 2.36-1.117 ± 2.16-1.117 ± 2.16- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ +![](images/fcdd7d6da2b05fdfef71ef45b7cf6ca53ff98f4f4d1c1a5355510d9e59f813f4.jpg) +Comparison of Log(MAE) Across All the Models + +![](images/3330b661dd5e78a7ad6328756e0eaf92905302d3c02d752dc30c9ab3b79916c1.jpg) +Comparison of IBS Across All the Models + +![](images/a546f30a1c6d6bbf4ffaebf85cc5b49e964efd713c1a21c36871ff725037e592.jpg) +Comparison of Harrell's C-Index Across All the Models + +![](images/3b423fba567bd00ecdb7b8191b10184855abdca402555f08fa94b5ae59379e58.jpg) +Comparison of Uno's C-Index Across All the Models + +![](images/c71102ffc0bec883fe5b015a32ec46fef12ee6e925148ed4526db00b39401a9f.jpg) +Comparison of Log(CensDcal) Across All the Models + +![](images/d14878b90810d68ff70c261d392497c7cfd0cebf3f198e63116ac4016ea7485b.jpg) +Comparison of |1 - Cal[S(t | x)](Slope)| Across All the Models + +![](images/79c86f76f4bf30aae5d8656c77721ebe3fb4bd89db0af25e96115584ef2fc6a0.jpg) +Comparison of $|\mathrm{Cal}[S(t\mid \mathbf{x})](\mathrm{Intercept})|$ Across All the Models + +![](images/71ae70470c9a8a1ec3a7c47308e52f2add78eacd8075e096c9f8178b65be5eba.jpg) +Comparison of |1 - Cal[f(t | x)](Slope)| Across All the Models + +![](images/1095ad171ad5612f80037f4649eb8fbe47d484e58300105e53e689c812c65526.jpg) +Figure 4. Performance on all datasets, methods, and metrics. + +# C.2. Calibration Plots. + +Figures 5 and 6 present the complete calibration curve fitting results, offering a comprehensive and visual assessment of model calibration performance. Specifically, Figure 5 compares our method (ALD) with CQRNN, LogNorm, DeepSurv, and DeepHit, while Figure 6 extends the comparison to GBM, RSF, and both DSM variants (LogNorm and Weibull). Each plot shows the observed event probabilities against the expected target proportions [0.1, 0.2, . . ., 0.9, 1.0]. The ideal calibration corresponds to the identity line, where predictions align perfectly with the empirical outcomes. Deviations from this line highlight calibration errors. These plots provide intuitive insight into the degree and nature of miscalibration across models. + +![](images/3d03231fb45d512a12b88d72cc4e36937fc66ad1ee8a5e287515fec2fae05490.jpg) + +![](images/c74fb9681b6e19af3128d1222fc1c7b449b6e0a73e70ecfc0dd9803a068be79b.jpg) + +![](images/fae4cdc530f80b755c983d3284d57b7abeb2c136a14defde44adf53b34e6b4ce.jpg) + +![](images/27616dbaa462b8d0e5a687ab70923fab5209774a889c2703f1f156f11f7085b5.jpg) + +![](images/f8eef6689061ecb34e9c8c8ad2a3ee55c2f47e62a1c53dd1bd4d2258ef06a7a5.jpg) + +![](images/16ac1eda907c19a68bb3708196bca4808d09d7f71afa5ecf75983a4b5a1a77c0.jpg) + +![](images/71d4bc7a503dc6f365a3ca9b2590752300c00d0e370e0bb1bf2feeb6efa9fe62.jpg) + +![](images/0faace559d697e34d54bf8217e5f02ba57ac4911f33b89ac4e52243568f05fe3.jpg) + +![](images/3c46f5a03f8e1387dbc6dd44a83b82f7a2eb40ea19df766ad1a288dc06dfb441.jpg) + +![](images/f71d601e6ad8aa738fdbc642513f01374a2d7b9f3a02c06bf8ea6ea8decd71a2.jpg) + +![](images/688f3ba8d6966c07d8686ef1e857e425b4c97ccb8001d43bf50e54ce60fead59.jpg) + +![](images/61c16acbcfa6646cf0b87434caa9e0ae3527712a388a615dd51fb68471610e2a.jpg) + +![](images/41252af5b18c07e1ff14695ec61287e97f2809030b5375de249e11b425f5e4d7.jpg) + +![](images/34b95d1deaef960c9cba3f59e4db7356cc06a93bf1d5937c8352c04bd91eefa6.jpg) + +![](images/0efbcb615863a035adc91ced7354e7f0f5f965d3eaa241455643bcf8377e7f20.jpg) + +![](images/ceba465a1b35cb635c46b7c115b841b31f7d6f09c2c43c294accb887fa692a50.jpg) + +![](images/2d60568a8b7de824b2a9d7dee834e30c17d8ed45dbef86286e37529221d258ba.jpg) + +![](images/3a3995d181877714a2e86052da4fa7be6468aff84d7fac62607b7750434f3530.jpg) + +![](images/146eebd6329fa2a334d5322dbfe85ab7c5f270f53f5c32bdc0988c8a6700d124.jpg) + +![](images/873f24cf6264a82874988765a86a30ac9db5d8d67e4147533eb95ed27f3203c8.jpg) + +![](images/449da10fc63341475063495ea53418afd632d1ba9f5158f89574ebbaec561712.jpg) + +![](images/261ac9a6cdf1bfded2648cd0eda2c00c0391f5b9a3211db8d2e87d834b4ba98c.jpg) + +![](images/fd18103c818e8fe5cf987a5fe25e05de1c2c746d24d9491919c879988b4fbe1d.jpg) + +![](images/4c57de0d3e7f4706b656972507c5f2d0b5b5ca72a22b68982c037dc8b910716e.jpg) + +![](images/eaa3c09cab4fcea5be30d141db3cb663818db38749073d0d1810ef7d43067b99.jpg) + +![](images/52069a49a6b6eeb8b956bdb8a782d855b253a05dcd23437454fc6bf0c8442568.jpg) + +![](images/db73c4e6810dcf64f3e6212d3f25c7f37dc0281223d2a112b89ec6350dc0e77d.jpg) + +![](images/32cba7f5be185ea4d8852445daa1a04d53ae02f3673b8ed7f01dd5d035c12f76.jpg) + +![](images/3d905304aef519ee592f576100b6d83c295fd616c24872f4cf59a7ae14082926.jpg) + +![](images/0a8848e786315e7d28a8b343a9d63aeb0252239bc84debcf47f7212a1a04fa27.jpg) + +![](images/9261090562e3ee4f85c26b557745bfcde38588691abe7ce021632a0c546584c9.jpg) + +![](images/72f55ef7fdb4649ff48ffd3306dd01e89348a6a82650d6ea4b077326e03fc640.jpg) + +![](images/c02a7bb9d6ceaffbbd2077e280c3066a1ec65f4d2b65240552d408b2fb3d277a.jpg) + +![](images/860646ddb99d44270852dc260691344cbdb3551ea4966dcb9694bf2e6c429186.jpg) + +![](images/ebec63857047abe5d1cb75afd7039b09fef2605b2d45f3163e45e3096f3e0889.jpg) + +![](images/ef7d25f136df1314512c58c9703645eed76d07d7025780a1992177a7c574412e.jpg) + +![](images/7b5615d72aa4f7c26f0ee65355dc9e8aad9595908d9664d00b975a77bac28710.jpg) + +![](images/4ac05cef6096c2b057c9a878058d4b9879c7a288875babf65c9de1800b9bad02.jpg) + +![](images/d44e30c210efe7e8afe637ab183170ae1367a7184d073f1a236c17310805e5c2.jpg) + +![](images/f5aaa52b6d3d38baf82dc762cf29fb7406632ce8f0233ac39a198f6d6f38a77c.jpg) + +![](images/6539d4896c8f653117776758252c6bb4fc59331bc94af4b3050b41d0e4b9a87f.jpg) + +![](images/f8d7b43dbaa902e9711151275ff389feefd537ce5562b295498fd7a92414e0ce.jpg) + +![](images/5158933e2bf71bb03bc04a698c13ce551fdf5ab0fa56cf22cc77f56be7539fc8.jpg) + +![](images/3b1e6a00c019ad3ca9cf9389e160638db1df9338be168116f141bb72dc9ad393.jpg) + +![](images/87b4adce4e5040fda779a0ed1cb3f67a3d20faebabb35a812a7e05e231665588.jpg) + +![](images/4965fd3cf6486125cbf31ba883871e5d9b3d5be1ffdbab4a78c29d41da5cb0b7.jpg) + +![](images/f2b87c14ccdd651f2a664f8da2e51cb89fb744e5b61706dd61136a225ca4ff47.jpg) + +![](images/c335f0638d1519731d00a271443501156a17c55d0f89e849a4936ca715bf83cc.jpg) + +![](images/ccf1b2963aeb322b8f0d5cd5998952f12e481fcc19b3d50a25a927c8fe45c2f8.jpg) + +![](images/0fe2256dd524ba32f5ef3eb35c5e306da71a2da4c1ea32f244b5844f414d4986.jpg) + +![](images/c37c0925640837671d7f93986aef7a0ba09ceedbb9b6e81a3f9e74f02205d224.jpg) + +![](images/9ee96ed5d446597fbd714d4576dc5257e85c5c94a090abefa3979875b392da96.jpg) + +![](images/55bbd7c6efe84aa3757709ff7d7fbaf10420f063fcd8a01f235051e6c63d23c4.jpg) + +![](images/c7898c374581055da01ab732e3e6a46c6fbf8129807ab613965ac55a6c07910e.jpg) + +![](images/569bbecfb5348437afb0729fa65cfcf4877344e17d940f7e408e95fa58c109e8.jpg) + +![](images/e1c2a435f41e7255adf196921b79fbfbb8eea2947de74634249125c1066c1952.jpg) + +![](images/a3adb74010e87e17005025886df2d475a770d4cdca71f634fb22ede7563aa2e8.jpg) + +![](images/db0f09e19e792ad09146d47b13f30a207657fa400be888d3d0eba560a593a694.jpg) + +![](images/621955a5e1dcfb8c26159e3ffff857c5175cb8e7eac574cbad64f3171fe9730a.jpg) + +![](images/fdf19f43c8992ae7d6983c0dffaea66fd8479a04b3b2fb06783a9008b8474eff.jpg) + +![](images/62cbbf2ccc5733b685ab2e1a03dfca1b3d25c0cbb5b4f48c9ae260614baa0a6b.jpg) + +![](images/391c95c307d0a5b607d71fd87a904264f08e4d9faaa827e82e236deaeb181c5e.jpg) + +![](images/9e41b86e28e661d3238d1b7f69b177fe5e85f806b4ce29f385ad326fc5a1d624.jpg) + +![](images/d20605bfcffaa661950e8a1e0c88be8266da066c788f8b8d7f15d9941bb329b3.jpg) + +![](images/636b5a5040badecb47e0a0e47bd5cfc1f76084785df5567e176646bfbd3e2d3b.jpg) + +![](images/7fea3880f8cf48bd5b8226dbedc57a614748ca12db7de092323e599283473d49.jpg) + +![](images/7bd0df314432019b90ade69b9a368c2ccd2d61442b52e512385fb2d5af3c95e6.jpg) + +![](images/9f130a93b27eaaa59285bcff7bb262db99b0e0bf63aeba0e072946782863fe2c.jpg) + +![](images/ff4e7ac22ba6aed6990ed2a518c018edaab4775ffd5b8f2381f8d5760fdc8950.jpg) + +![](images/f5477bfded80afe94a9dc5f6635a0a62b6d0ddccba7061b58c7050d2da7de26e.jpg) + +![](images/a4f67ddf814f06eec706bfb01acac2d26b0742cd98ed30ef66356ef51a79c084.jpg) + +![](images/49ccfce2165eeb2ad09a44ad79ab29c2fd32f16f794243577b57ed05226b6559.jpg) + +![](images/81c9c25a89b47f671094189c099c2907d4a6d4f9fd40fdaa22690ac03d4881cf.jpg) + +![](images/509afdce53352470e6c274a4239e2f062fe7b9c797e1d565b2535a90b0eac0bd.jpg) + +![](images/9b614a4d88e66938f639bc70f004b4f59613e012cfc00316409873a0257b27b7.jpg) + +![](images/b67fa9fdf5b12fb4b277709293964de67377b8be75cdc6776bf0bba3255ea847.jpg) + +![](images/133c8823f083e7da3ae34eb3ceeb6ca5bc4ca8ca0e65b0aca21292c6eada015e.jpg) + +![](images/a799f7539b28639256bcbaf6c70cf76e093ade54f0ce36993adda43eb7b4ecef.jpg) + +![](images/96d446b754b521bdf82094b04f61888c183e90c11c9e8bf59c2a0b0f32dee8d2.jpg) + +![](images/8be6dca0565b917ca76003a5b4bbad5e4ad8a912eceb959688a2d265f35c5b44.jpg) + +![](images/228f6a9c73098279eaea344704af96bb735e941bdd8342988844b6945a6f3fc7.jpg) + +![](images/8fc039e7dcc2f7e519f27d0d2dfe99f267eb9c4b045178ec803a1122a131ef01.jpg) + +![](images/829f6274ffd81d19a4c5b5a7725124f02aa7715fc92f1dd73c5dc2c459a8515b.jpg) + +![](images/8d18be82de1b79877a3fe89d0fa007f526c0e9b21325b9df5037a51740d6619c.jpg) + +![](images/9c353d15009771b7596260f9af79010a16abb6f5df9e458ff40e30b4b9d8e612.jpg) + +![](images/f1ce5358ead4c268bc92dc7c5498dfd734eb9dd347a756efc31b66abae579028.jpg) + +![](images/0217310d3f3789adb6ac7e0a1cf6a99694124f80c0714dd9fa16e0cca569cc97.jpg) + +![](images/a11764ca15499aba02430852eb9ef347744d61e3ebca88276a086863920f3384.jpg) + +![](images/7bad0bfc3164aab53abea6cd4913c84f6c283742ba52d645ace26a52edb7080a.jpg) + +![](images/375274304ce7aa42d8a470c8d6c3103c3d4005d5bad84908fe3343716e7e1254.jpg) + +![](images/d9525c23c36b184ff0641d3034dcd6a793becf7be96978150f8efcb1652f629c.jpg) + +![](images/4c0b0d8ebca76cd6a38de715eb722b2ce3e7307f3015fac32595c7fdf59d9dd3.jpg) + +![](images/6c024232a5023bf4c6a9ca2c5aa3fdc6673761cafbb085d928ccf89cb516985b.jpg) + +![](images/67f137255760abc40d44eb7a3adde522df7d66355683123203024ff1a596d4d1.jpg) + +![](images/573bea4a371e070ca5352443581d9ff4e02a10e3c759b3fdbacd9d3eee2805f6.jpg) + +![](images/1b1611b95171a32bf940d2bd98d6580051ac66da5d2d5da0cc2086bd1ebee7cd.jpg) + +![](images/1dcc157ffdc5f0b8af440a234ceec2d40f26811b429b4fef0fb3a6f4fcdecb2e.jpg) + +![](images/341304350e3075e0982f1313d795328a421d32be1ea92660481294f60dd335b8.jpg) + +![](images/d31c7a835b182531e22df535c5fe0b4dac900dcddb41714591bdb57ac84132d9.jpg) + +![](images/2d35d8da7de30642d349af86d085385260f4f2dc9e8f28eb818bc99ec13dab2e.jpg) + +![](images/2d12a056546b9b1c93d7495e7685b3f23a0cb6cca61b1fa677d36e5ef63989c2.jpg) +Figure 5. Calibration curves (linear fit) for ALD, CQRNN, LogNorm, DeepSurv and DeepHit. The blue and orange lines represent the curves for $\mathrm{Cal}[S(t\mid \mathbf{x})]$ and $\mathrm{Cal}[f(t\mid \mathbf{x})]$ , respectively. The gray dashed line represents the idealized result where the slope is one and the intercept is zero. + +![](images/9f0a711d36c8b0efd5f2d3d53e50eab9b752233076cecc6a3fc5bc2f6a8abe95.jpg) + +![](images/5e3a2cddd81293b538103b75232aa4d92aa14af0458e7a7f29251c09f41002fc.jpg) + +![](images/c6cf18f3d4e44f1a575bf62086b8ba21ec9eff0a17b9caf0ebf462fdfaebdd12.jpg) + +![](images/54a88996b080dd7d1a8ee5f8bc5d16965e4881ee2f57bb8487e5e020d2067516.jpg) + +![](images/7dcddb43b3869a46482e31287bf8a0e25e93a02bd275ec03ccb538dc2e18b189.jpg) + +![](images/2069edbf1c354f94bdb9836a6c9dc130e12d70e3f72659401a5dec0c2e16c6c8.jpg) + +![](images/47af1309819a88078dcfb0d3dcebb49d38701c23abadc4e4eb9dda713f08b271.jpg) + +![](images/44a6e6ed0c32e181c0d0f83b711c6161685f9cd191974e220f5c33c1b176819b.jpg) + +![](images/ea662420280306e0c4ade5db853bcb8d2877379f8de23c8acdc1f544ce6201da.jpg) + +![](images/3a301203023b5a4edd67e10b449ea32bad8246db3e8eeb9de5ff259dc75253e8.jpg) + +![](images/a6aaaf160d0deb8d48b9df14cdc99170e6f1802e21c849444a811cb37fa5176e.jpg) + +![](images/2a35a18ffbc97fb0e6bf305ecab03f7f8bf79f70590249b6b83e30f9043af2ff.jpg) + +![](images/a1e9cd2b9b26d70dfbf9cf0b4f6903cc9061c94e0d482303ff9961a111b595a3.jpg) + +![](images/e31de16a714e50b8d5f55020e1c3c8b844e0093375719be4e0e87451f07b6c47.jpg) + +![](images/17e330da919323245e990d8e8cc1bef4cfce02651a0c8efe69bd89541ff32ffa.jpg) + +![](images/4430c48ad4d23b2be2aba1fcd777bb7f067c30e12efab9364274ad7f2695bf33.jpg) + +![](images/9995f19ddd0c12f0be6a10132ba690e6a70eccc72e9ba9af642796994dbd7a2f.jpg) + +![](images/8e449e7593dc3cff8f0499b1a457741f64cecdc4374929a481295ea3a67d88e6.jpg) + +![](images/c5d89449e36ae2846024655b0b681d481a4f06a22914214e4d3842b7a06e0b3a.jpg) + +![](images/0eeba192223401acd6f11994b75d00b8f2a6d3269e32f95f037c7c7d1fcbc4bf.jpg) + +![](images/4379e73556b313895976f295e9bb11bdcccae4c3aa58a27019ed6373ad3b2dc8.jpg) + +![](images/25b7beca52c6083f4d8e77a66fb388c31d5dff7da182ccc179cd7e9ca067a196.jpg) + +![](images/04f44ad238f451fb116072c8355a32e1e1602510e3634bb65cfa8b4c19de52f3.jpg) + +![](images/b59583ed485d35e64720641f873ece3e796bed06a449967049c163192ca80b1a.jpg) + +![](images/954b99be30dfc68760c7b5b7c8aa7e1930ce2d6aada4417b74a37989c107f6d9.jpg) + +![](images/de42796ed648a91598aaea2dc9e296a6573400ff2ac16bbe6f040edeff8e8015.jpg) + +![](images/97be182fd06d19b2ed38748b7afa7a31ec603e21ee5790f58cada7b90d5086b0.jpg) + +![](images/2ad7983d0618a1d4c0d9524a675cc4470f1db2e1b63ef9f426ac9746171baf53.jpg) + +![](images/7dc00ac6c60a31a31a1c834815d17e2afce7b284b3846ae8b4cdad9fed58239c.jpg) + +![](images/4a7096e589a686be373fdd317c6f8440344a7808fc50bb1c024d8cf859436529.jpg) + +![](images/13316096555b47360833cc4b488aed3dac5918a581c3e21df7afa0bda2fc31c4.jpg) + +![](images/c658852e1abb3da054c7fd1d6c8565c9e74dec37460138079f77f858072fc3fd.jpg) + +![](images/de427c8ecbc2a531fe5efe19b1cc66806ea5caf0600df155ff4175f90a1e9b29.jpg) + +![](images/f55ef0efa45b47225e0efa337a06e2d72f6578feef857dbd821c0b17c2cbde1b.jpg) + +![](images/061bbea1c98b3545d3eef2d089bf867ca13084ded925df35bc0b8a59bfd0d4fe.jpg) + +![](images/57f0709e008a879aae4a0ec65011ba6ce1964551dcf0acb99fd6165c8d5f90a4.jpg) + +![](images/b3671c397483d5370bc125ca5036dce2440be741a90b3a1d39cfdcb25d061497.jpg) + +![](images/a8735a11bfb3b42d5633c6a0cb239fc9f80dd6539fdef1daabdf021eb3cb5a08.jpg) + +![](images/6828a4c7ea75d937fa9babe045030155b75663621c4a3ea5e20d02cb166cd656.jpg) + +![](images/bfc77aeb1a2b6b9374710b8b3336da8b33ccc7e83923743e1ba2d92cb336b9dd.jpg) + +![](images/449bf3873de3a870d104c41b5279920a53696de6e51414fc13fd603537559d31.jpg) + +![](images/91c96bb8d9431c0ac52c3249f8b5ca0cd160c7cd37ab1e4ffe89051e03314e22.jpg) + +![](images/dab46b151011a63316bad7955ff4523c268ef31f2312799f8325c7fb108c2172.jpg) + +![](images/006469cf74b5083f579893118b2cc42f77747195e8a8786e06ebcdcab6311b0e.jpg) + +![](images/70a28e8f5517a34bbb043d349cfce163f46ad7647bd0766302e36dbb75ef4f1e.jpg) + +![](images/270b9a4a43aa4946de8304fb2a9ecf29e1431eee69a7351c4eb0b869057e5eb3.jpg) + +![](images/43f8608303bb35099e6237e03e11da4687f0e97ace91e7e314f071f77c1050e8.jpg) + +![](images/48083705a58d39d9472e58db671a731ab239a44f49c590054bc5ceab049243f8.jpg) + +![](images/a334550537f31aa37e8b4656156086f1a08b513bc9033d5f5ea812837df72829.jpg) + +![](images/68b763b7254937a1ee1ca37cad2d58e35840fa85e291e7a150c664dc784a82be.jpg) + +![](images/83e3625f9acf4b0b241ad2085558536a144e142f588caa1112ecbdcfbb19435f.jpg) + +![](images/fbbe9aef25e4db929325080ff2432b038e2d90c594dfed8fb5361f1c5bacc449.jpg) + +![](images/ddefe1022a59dcf8a856e07d7b6c1ed9c93ecc1fee43d3f3dd95388b443d8936.jpg) + +![](images/30185ba617f2125751610993c8fc39a3735a500db9e9e587b239a6fa80d1046c.jpg) + +![](images/74c348217cee3752f4f21f9e1689b94912beb37c4a9870467b342713580d4736.jpg) + +![](images/1beb2c23f972b11b43827c3cecd841f05e11e75fc7bce0f3168d959b3da029e9.jpg) + +![](images/76c47c2d7341677814bb3ad3f7cc0720718c6e019c616889f90e272899c4e772.jpg) + +![](images/7feee62a9aa1669215b22c36472f4ffecef64ccd0bc7a0c6eece74f09659960a.jpg) + +![](images/108f9177f17439da3410997d415ba56d6641bc9a4298269c3ae846ef70c78a4c.jpg) + +![](images/8d9511efbcea8596a12267e38a63eea86de9f9a6118defa794fb96e1d3cc762b.jpg) + +![](images/f2764354e336aeb2d9a4ac6a031a018830b36a0b0446a4cf51979f31dddd07e2.jpg) + +![](images/e3ee4840c0b7e3545586e089be54da93a6647c518ab44de5e07baa743163e5cd.jpg) + +![](images/ced3fdf49d17dafa4239d90d30fc20e2b1dd54ebb234a2b6de7b1c6b35e989d7.jpg) + +![](images/e9da8a2a5705dff0339d174c03e2a6c9e0e9c88a03f50a38501f83b76525beed.jpg) + +![](images/022cab076c611941d32ede950e3aac8c2fffb61f3d715fce171ff62f777beb10.jpg) + +![](images/fcd1dda648b2cf65778530c02a1ef116f3e76d446b1dae623536c0307101463e.jpg) + +![](images/061efc7f1b2e46803f72940c2cb29b7e86546987beb517e9d8c259c289aa4655.jpg) + +![](images/a76c4a0d68a697e6c0f1ee174cc32c0be8c701309a12e8e7a95dd643078bc9ff.jpg) + +![](images/377925e3d1fd9f57ceca1fc3b15ed90c3156782f97654ad4412a4b88b86afbef.jpg) + +![](images/830486686fc52ddfff5b347c4947af6f211cafcbe98d99c342421d330122a507.jpg) + +![](images/8295b66f280ed17257a4bd0655ba1a6858d2b74b05ad7502d1fdca9eef0d7cf8.jpg) + +![](images/49489ff0ea03e817feb3f473f6717f3712ba9c3f47598abaa4cb7e97dedc0cef.jpg) + +![](images/04ed7e39c1919c39eacc6d434c8895dd947b244afefb278c61b4674b3853f883.jpg) + +![](images/569dec8f02c918df251e1b4fc44c0f89ba5a02fb2db4a182d06cd178687856a7.jpg) + +![](images/92f16294a240d02681cb7a075991283ed139cf830868f7a8846b98b94e84c089.jpg) + +![](images/e53e67f89652cc634e766e9f5f8b93e2ac12ddb56fb8342ef0a71962682f5a1f.jpg) + +![](images/27b18cec5b7c15107b018443c5f040dd60e7e3953b7a0e9abda806bc9b47165d.jpg) + +![](images/a4587ad51912e8fda3c19a57c668c7ba366cf2bf29b6cba8bad04959a2e59a3b.jpg) + +![](images/3a2a1f2c75eb146473a0ec36f84b279f2cdd4849b89c4f146485268d63223549.jpg) + +![](images/be744c4026b5c6061f48c327c8880464c71b2a79a7108646c602d7ea89091e2e.jpg) + +![](images/8022d95d142a8f5a0aa0c8e45d89b386bee8a890d4ad1591ef6a7325dd3197ff.jpg) + +![](images/18dc073c20b97311a3fa1cde664370430f9e09d39cb760306253d07c1e3f72e6.jpg) + +![](images/b4321a0481a7a475cab46fa3d78fd0c8e24c8b32b3acb7c00cc13c592e463a39.jpg) + +![](images/0e2340ee4e13e5e6fad5dade6180d92ba2ed446496aaebee599e423d17b7a2fe.jpg) + +![](images/f60d218254bfadb9994ce04ee31fdd2aba9635a2036e39c47d3d0591e5377e2f.jpg) + +![](images/d228be0ea10fd3311c4d3314b00971f6d998fc44d1fbcb70e18e9a0042513941.jpg) + +![](images/3283339121a2c8eedd1b5723eeedd4a88840c0ecb9afce9f87d078a5ae205dd7.jpg) + +![](images/40638d230ac28dd6100d5b8888a533d66d130726a5daba18bcf004bb64daaf2e.jpg) + +![](images/5665b78e5f73133492d543c909295061db9da5940bb224c073e9bba0c41f3e42.jpg) + +![](images/b901134ebb5436f594821273bdee98ecd88dc1c345c2ed02cdd0d9b201560475.jpg) + +![](images/c5dc073e1e274adb5bc97f2ed2dd48d0361fc270eae15da859965caee50dbf93.jpg) + +![](images/88b662f77c9a7f8847d123da46482699d86e43a26698590bb11db70b75b08c10.jpg) + +![](images/46d8253fc7e084c2843f7d7ba3c86db517bfe970abd7c50114ea0e78a7b060b8.jpg) + +![](images/b34b25f38c39157b04718cd144df8fd888e5c34834b8af79fc436a0037f04966.jpg) + +![](images/a0860b878f613deab99bef431a79fa95c81248df995c9fe73ad7ea5625e22dda.jpg) + +![](images/3252d52d59113cb2ca2926c84d432f480614692457d95144b0d2fd5b55caa931.jpg) + +![](images/9385c2be6c45dd84b19dc5fc204cd5f4f311a978a0b69486990c94e9519a5dcb.jpg) + +![](images/51991fe79e68df58de2a2eea64b8f950c7ebfed4b88f89fe5e584bf2fad3f126.jpg) + +![](images/26f975bf60bfebd6be24b4ec208826ec1055809c597e1a2cb4aaeb8c0d00d904.jpg) + +![](images/5f3e8c2ea9093d8ca2f6e501e5592c6ef29d20a80812316265ba6417e7ebb906.jpg) + +![](images/fb75bacb8de609f66b4298a377551b2e63b570e4c5dd731e1875948562adabea.jpg) + +![](images/8d37664010022ff378539ab4613e38f9b93f685bbbfef5336e8fbc2aa323e654.jpg) + +![](images/fd0756ce6c4eb0fe3c4833860583ec42356e8ec5812c8e0b3b625128127e8e2a.jpg) + +![](images/9aeec5ada13af59937486afdb9e1fb38776830b1d8d460da08fcfc63a5040cbb.jpg) + +![](images/fe779e89c8b0313cf3bcde2af33eebc009c242d9ca8ae2d5c71c035fdb3982eb.jpg) +Figure 6. Calibration curves (linear fit) for ALD, GBM, RSF, DSM(LogNorm) and DSM(Weibull). The blue and orange lines represent the curves for $\mathrm{Cal}[S(t\mid \mathbf{x})]$ and $\mathrm{Cal}[f(t\mid \mathbf{x})]$ , respectively. The gray dashed line represents the idealized result where the slope is one and the intercept is zero. + +![](images/48383ad6f1db6e35ac93a0db57239c0bf3f82987b59dbf17a5f66ec12e2c81d6.jpg) + +![](images/679c72bad17e2e91b424c31c78b2b8855ef35127f13eb3aa65b39b5f368dd0c1.jpg) + +![](images/916a6bf8b7d24474cd8e52c7beeb08ca86527a11ca3b7e1a44fe1c3405e617a3.jpg) + +![](images/6f8d67b8c74ff64491a5364bd7a3f830d16f7afa8b4439259ee6ca85c08ed84c.jpg) + +# C.3. Case Studies + +# Case Study 1: Robustness Under High Censoring and Quantile Extremes + +To further assess the robustness of our model under varying levels of data censoring and across different event-time quantiles, we conduct experiments following the setup proposed by Nagpal et al. (2021). Specifically, we simulate additional censoring by uniformly sampling censoring times from the interval $[0, T)$ and applying them to a randomly selected subset of uncensored training samples, reducing the proportion of uncensored data to approximately $50\%$ and $25\%$ . Test splits remain unchanged to ensure unbiased estimation of the time-dependent concordance index ( $C^{td}$ ). This procedure is applied to the METABRIC and SUPPORT datasets, which differ markedly in their censoring rates and event time distributions. + +![](images/bcfdc9d6fdd439d5bef450557370bb7d16bd987f367cbe8fb4da0ecd94f11f81.jpg) +Figure 7. $C^{td}$ for METABRIC dataset at different quantiles of event times for different levels of censoring. + +![](images/1f1c91e97fb8c6499b09f6a5925ea36bc19856d125a1eaead2e45d8b47d50a89.jpg) + +![](images/2b6b8f3877299e19029ca2b265070f18a8e9bb13f10d0f92b4b8bfad7fdfec10.jpg) + +![](images/d261fde18cac3ef22ed88b6ccf4791c2e2f47596c7aa9c20ac38055715b4474f.jpg) +Figure 8. $C^{td}$ for SUPPORT dataset at different quantiles of event times for different levels of censoring. + +![](images/861241bff8a156b1a6c18e56b423f579a5075c8294a50fd6924d32736a8784b6.jpg) + +![](images/8ad80ceb788db609362fa588ed4f44f119fd6be2a8da68f18f5a9449f9485808.jpg) + +Figures 7 and 8 illustrate $C^{td}$ values across three quantiles (25%, 50%, 75%) under default, 25%, and 50% censoring regimes. On the METABRIC dataset, our method demonstrates strong performance across all settings, particularly at higher quantiles where skewness and right-censoring are more pronounced. This suggests that our model is well-suited for capturing long-term survival signals even under substantial information loss due to censoring. + +On the more challenging SUPPORT dataset, our model's performance is comparatively lower, especially under extreme censoring. This outcome can be attributed to the SUPPORT data's distributional properties, which deviate significantly from the ALD assumption and exhibit heavy skewness and short survival times. Nevertheless, our method still matches the performance of DSM-based baselines, indicating that it retains stable and competitive predictive behavior even under distributional mismatch and extreme censoring. + +Overall, this analysis confirms the resilience of our method to both reduced observed events and variability in event-time horizons, with particularly strong performance on datasets aligned with ALD assumptions. + +# Case Study 2: Capturing Diverse Survival Patterns + +To assess the expressiveness of our model in characterizing heterogeneous survival behaviors, we perform a clustering-based analysis on both real-world and synthetic datasets. + +![](images/de40e18af029d08a324c00710a6459666a81a534d34b5b30b33b6cb2052b65c4.jpg) +Figure 9. Clustered survival patterns in real datasets estimated by ALD and DeepHit. + +Figure 9 visualizes six representative survival patterns identified via $K$ -means clustering on the estimated parameters from our model and DeepHit across seven real-world datasets. Each curve represents the average cumulative distribution function (CDF) within a cluster. Although both models demonstrate the ability to represent distinct survival behaviors, the CDFs produced by DeepHit consistently converge to one at $1.2\max_{i}y_{i}$ , which implies that all events are predicted to occur by that time with high probability (close to 1). This behavior is unlikely in the presence of censoring and indicates a limited capacity to model long-term survival. In contrast, our model more accurately reflects plausible survival behavior under right-censoring, with CDFs that appropriately plateau before reaching one. + +![](images/e151977c823c5e7e5227bce22433f454624aa1e007f189ca688883fced6c9486.jpg) +Figure 10. Worst-estimated instance in each cluster for Gaussian_nonlinear dataset (best synthetic dataset). + +We extend this analysis to synthetic datasets where ground-truth CDFs are available, allowing a more rigorous evaluation. In Figures 10 and 11, we compare the worst-estimated instance (based on Wasserstein distance) within each of six clusters for the best-case dataset (Gaussian_nonlinear) and most challenging dataset (LogNorm_med), respectively. In both cases, our method consistently yields lower Wasserstein distances compared to DeepHit, highlighting its robustness and precision in modeling diverse survival distributions across various difficulty regimes. + +These results collectively demonstrate our model's enhanced ability to recover realistic and heterogeneous survival patterns, both in real-world settings and under controlled synthetic evaluations. + +![](images/8fee12cf0d48283b4e8125dc44100bdcbc3e5865d6e1d5b4dd6e9fb885e8185c.jpg) + +![](images/2f2389d2f3ee0a996b1693d0e021de9cdf2ab0ef9c64db1d0827462ae2e5566c.jpg) + +![](images/35cad0f83376e1462c2535b94ffbc89bc8b74e19ebda81dc0ec05dc8efc416a3.jpg) +LogNorm_med + +![](images/76c3e3a2d148122f7b0b842641ba26553a01ce325f60b8263d02c753410c3b79.jpg) + +![](images/370f275e50d033807fa38b2bfaa8e6837b169f009ea21625c210c33b2e756e2d.jpg) + +![](images/e4922a96f5b2d6e986d4dca083b72385b9a5500d573840939b68c1fb68b3923c.jpg) + +![](images/a8e03872bff12d9b7f85b830ae67561e5ba1d797b4b32b9d4952fb1a4898dfa3.jpg) +Figure 11. Worst-estimated instance in each cluster for LogNorm.med dataset (most challenging synthetic dataset). + +![](images/16d765feb88e2bff76ef2003e652ceaf674e321c677451b448529b6304a97bc2.jpg) + +![](images/515b4fadcbc9712c7c7ec19a7a4d0133209575e25a27ed815081048141de39ac.jpg) + +![](images/fed1a102e7df1511455e9552a5fb1aa12aa30806e59d98fc3c74cc09126e2a67.jpg) + +![](images/7a4228ade18d573695d94ea0f0c471e4167d8873a7da2c470d19c24a03675f82.jpg) + +![](images/e0eea59c1e6d4b63540cba69726660bc16d6da8e0cf10684414359a580611d13.jpg) + +# Case Study 3: Alternative Distribution Summaries + +To examine the flexibility of our probabilistic model, we evaluate its predictive performance under three different distribution summaries: mean, median, and mode. While the mean serves as the default choice in our main experiments, Table 5 shows that using the median or mode can lead to improved performance on certain datasets, particularly in MAE and concordance metrics. This highlights the adaptability of our approach, where different summary statistics can be selected based on the requirements of downstream evaluation. For example, in datasets with high skewness (e.g., Exponential, LogNorm-heavy), the median often outperforms the mean in terms of MAE. Conversely, the mode may yield better alignment with the underlying survival dynamics on the real datasets. This case study emphasizes the benefit of having access to a closed-form survival distribution, allowing flexible downstream use of different summaries without retraining. + +Table 5. Full results table for all datasets, the ALD method (Mean, Median, Mode), and metrics. The values represent the mean ± 1 standard error on the test set over 10 runs. + +
DatasetMethodMAEIBSHarrell's C-indexUno's C-indexCensDcalCal[S(t|x)](Slope)Cal[S(t|x)](Intercept)Cal[f(t|x)](Slope)Cal[f(t|x)](Intercept)
Norm linearald (Mean)0.865 ± 1.3360.653 ± 0.0140.648 ± 0.011
ald (Median)0.217 ± 0.0370.278 ± 0.0080.654 ± 0.0120.682 ± 0.0370.407 ± 0.3431.027 ± 0.042-0.016 ± 0.0371.025 ± 0.0160.005 ± 0.030
ald (Mode)0.689 ± 0.1860.657 ± 0.0080.718 ± 0.006
Norm non-linald (Mean)0.243 ± 0.0800.670 ± 0.0150.644 ± 0.016
ald (Median)0.253 ± 0.0730.212 ± 0.0060.667 ± 0.0150.582 ± 0.0290.406 ± 0.1791.038 ± 0.025-0.016 ± 0.0401.072 ± 0.021-0.011 ± 0.015
ald (Mode)0.438 ± 0.0890.632 ± 0.0600.573 ± 0.054
Norm uniformald (Mean)0.473 ± 0.3440.785 ± 0.0100.703 ± 0.020
ald (Median)0.392 ± 0.1960.045 ± 0.0020.785 ± 0.0110.696 ± 0.0130.115 ± 0.0301.016 ± 0.014-0.006 ± 0.0211.019 ± 0.0200.002 ± 0.016
ald (Mode)0.613 ± 0.1180.788 ± 0.0120.696 ± 0.014
Exponentialald (Mean)2.942 ± 2.3890.560 ± 0.0080.560 ± 0.007
ald (Median)1.088 ± 0.3080.309 ± 0.0180.559 ± 0.0100.553 ± 0.0200.432 ± 0.4050.964 ± 0.0490.016 ± 0.0530.978 ± 0.047-0.015 ± 0.014
ald (Mode)5.009 ± 0.2350.556 ± 0.0110.555 ± 0.020
Weibullald (Mean)5.134 ± 9.5330.768 ± 0.0090.763 ± 0.010
ald (Median)0.484 ± 0.0590.219 ± 0.0280.767 ± 0.0060.691 ± 0.0230.648 ± 0.5110.993 ± 0.0490.021 ± 0.0601.044 ± 0.023-0.023 ± 0.033
ald (Mode)1.163 ± 0.3400.750 ± 0.0080.689 ± 0.023
LogNormald (Mean)0.363 ± 0.0680.588 ± 0.0140.585 ± 0.014
ald (Median)0.533 ± 0.0970.376 ± 0.0130.589 ± 0.0150.510 ± 0.0230.256 ± 0.1501.011 ± 0.028-0.004 ± 0.0291.005 ± 0.0210.006 ± 0.011
ald (Mode)1.733 ± 0.1900.549 ± 0.0430.496 ± 0.020
Norm heavyald (Mean)0.667 ± 0.1390.919 ± 0.0070.870 ± 0.029
ald (Median)0.454 ± 0.0810.019 ± 0.0010.916 ± 0.0090.802 ± 0.0080.256 ± 0.1501.011 ± 0.028-0.004 ± 0.0291.005 ± 0.0210.006 ± 0.011
ald (Mode)0.627 ± 0.0720.911 ± 0.0120.802 ± 0.008
Norm med.ald (Mean)0.238 ± 0.0360.894 ± 0.0050.872 ± 0.004
ald (Median)0.298 ± 0.0360.047 ± 0.0030.889 ± 0.0060.868 ± 0.0110.157 ± 0.0440.997 ± 0.0120.004 ± 0.0141.058 ± 0.012-0.036 ± 0.011
ald (Mode)0.388 ± 0.0470.884 ± 0.0070.849 ± 0.011
Norm lightald (Mean)0.236 ± 0.0510.882 ± 0.0040.874 ± 0.004
ald (Median)0.255 ± 0.0160.090 ± 0.0070.880 ± 0.0030.853 ± 0.0170.339 ± 0.0760.998 ± 0.0140.005 ± 0.0211.087 ± 0.017-0.050 ± 0.011
ald (Mode)0.328 ± 0.0290.876 ± 0.0030.850 ± 0.017
Norm sameald (Mean)0.404 ± 0.0780.890 ± 0.0050.847 ± 0.008
ald (Median)0.281 ± 0.0220.066 ± 0.0030.888 ± 0.0060.886 ± 0.0040.114 ± 0.0361.004 ± 0.0180.010 ± 0.0221.007 ± 0.0140.006 ± 0.012
ald (Mode)0.518 ± 0.0650.881 ± 0.0080.880 ± 0.004
LogNorm heavyald (Mean)0.385 ± 0.1930.777 ± 0.0120.727 ± 0.022
ald (Median)0.244 ± 0.0420.095 ± 0.0060.779 ± 0.0110.749 ± 0.0110.043 ± 0.0190.998 ± 0.014-0.002 ± 0.0141.003 ± 0.014-0.005 ± 0.005
ald (Mode)0.898 ± 0.0450.756 ± 0.0290.724 ± 0.012
+ +Learning Survival Distributions with the Asymmetric Laplace Distribution + +
DatasetMethodMAEIBSHarrell's C-indexUno's C-indexCensDcalCal[S(t|x)](Slope)Cal[S(t|x)](Intercept)Cal[f(t|x)](Slope)Cal[f(t|x)](Intercept)
LogNorm med.ald (Mean)0.178 ± 0.0460.747 ± 0.0040.718 ± 0.007
ald (Median)0.247 ± 0.0240.174 ± 0.0060.748 ± 0.0040.749 ± 0.0130.087 ± 0.0521.002 ± 0.009-0.001 ± 0.0121.008 ± 0.017-0.004 ± 0.010
ald (Mode)0.896 ± 0.0820.723 ± 0.0130.709 ± 0.012
LogNorm lightald (Mean)0.184 ± 0.0350.725 ± 0.0070.713 ± 0.008
ald (Median)0.221 ± 0.0640.310 ± 0.0110.725 ± 0.0070.696 ± 0.0200.185 ± 0.0951.001 ± 0.014-0.001 ± 0.0160.985 ± 0.0150.008 ± 0.009
ald (Mode)0.921 ± 0.0530.702 ± 0.0140.697 ± 0.016
LogNorm sameald (Mean)0.191 ± 0.0440.739 ± 0.0090.697 ± 0.008
ald (Median)0.259 ± 0.0620.154 ± 0.0060.740 ± 0.0100.751 ± 0.0140.076 ± 0.0571.009 ± 0.011-0.005 ± 0.0101.012 ± 0.011-0.001 ± 0.008
ald (Mode)0.943 ± 0.0430.710 ± 0.0070.715 ± 0.014
METABRICald (Mean)1.626 ± 0.1940.637 ± 0.0210.633 ± 0.031
ald (Median)1.123 ± 0.0880.245 ± 0.0120.640 ± 0.0180.588 ± 0.0310.293 ± 0.1250.993 ± 0.028-0.008 ± 0.0241.001 ± 0.033-0.012 ± 0.016
ald (Mode)0.856 ± 0.0390.605 ± 0.0210.547 ± 0.018
WHASald (Mean)2.196 ± 0.6120.823 ± 0.0160.824 ± 0.014
ald (Median)1.118 ± 0.1520.784 ± 0.0430.765 ± 0.0170.198 ± 0.0940.981 ± 0.0210.009 ± 0.0230.972 ± 0.0270.003 ± 0.016
ald (Mode)0.916 ± 0.1010.802 ± 0.0180.806 ± 0.022
SUPPORTald (Mean)1.121 ± 0.1070.568 ± 0.0150.572 ± 0.015
ald (Median)0.856 ± 0.0620.362 ± 0.0130.572 ± 0.0150.561 ± 0.0152.197 ± 0.6670.900 ± 0.0560.084 ± 0.0461.084 ± 0.043-0.113 ± 0.023
ald (Mode)0.421 ± 0.0510.532 ± 0.0160.522 ± 0.044
GBSGald (Mean)1.713 ± 0.2080.671 ± 0.0140.665 ± 0.013
ald (Median)1.161 ± 0.0940.278 ± 0.0140.672 ± 0.0100.590 ± 0.0350.283 ± 0.1060.977 ± 0.0250.014 ± 0.0341.000 ± 0.035-0.018 ± 0.016
ald (Mode)0.664 ± 0.0720.657 ± 0.0230.554 ± 0.062
TMBImmunoald (Mean)3.002 ± 1.4970.561 ± 0.0370.547 ± 0.040
ald (Median)1.085 ± 0.1910.245 ± 0.0150.562 ± 0.0320.548 ± 0.0300.835 ± 0.6040.994 ± 0.0210.004 ± 0.0251.053 ± 0.045-0.038 ± 0.025
ald (Mode)0.609 ± 0.0690.546 ± 0.0240.531 ± 0.025
BreastMSKald (Mean)2.593 ± 0.2890.617 ± 0.0320.568 ± 0.036
ald (Median)1.116 ± 0.3940.086 ± 0.0080.457 ± 0.0680.538 ± 0.0830.066 ± 0.0270.993 ± 0.0200.003 ± 0.0211.002 ± 0.019-0.007 ± 0.010
ald (Mode)0.686 ± 0.0770.591 ± 0.0710.515 ± 0.090
LGGGBMald (Mean)1.232 ± 0.3250.778 ± 0.0210.736 ± 0.030
ald (Median)0.846 ± 0.2390.108 ± 0.0110.785 ± 0.0300.750 ± 0.0430.450 ± 0.2670.996 ± 0.0380.008 ± 0.0400.995 ± 0.0470.003 ± 0.022
ald (Mode)0.497 ± 0.1000.777 ± 0.0230.739 ± 0.058
+ +# Case Study 4: Empirical Behavior of $F_{\mathbf{ALD}}(0|\mathbf{x})$ + +Given that the Asymmetric Laplace Distribution (ALD) has non-zero support over the negative time domain, we investigate whether the model assigns substantial probability mass to implausible event times $t < 0$ . Specifically, we analyze the empirical distribution of $F_{\mathrm{ALD}}(0 \mid \mathbf{x})$ —the predicted probability that an event occurs before time zero. + +Table 6. The 50th, 75th and 95th percentiles of the CDF estimation for $t = 0$ , $F_{\mathrm{ALD}}(0 \mid \mathbf{x})$ , under the Asymmetric Laplace Distribution. + +
Dataset50th Percentile75th Percentile95th Percentile
Norm linear0.00010.00070.0018
Norm non-linear1.9878e-060.00010.0007
Norm uniform2.9879e-050.00280.0124
Exponential0.01940.06650.1204
Weibull0.00150.00320.0046
LogNorm0.00310.01090.0134
Norm heavy1.1804e-062.6128e-050.0007
Norm med4.2222e-063.5778e-050.0004
Norm light1.1978e-050.00010.0009
Norm same7.8051e-074.8624e-060.0001
LogNorm heavy0.00010.00140.0142
LogNorm med0.00010.00070.0082
LogNorm light0.00040.00240.0150
LogNorm same0.00040.00210.0123
METABRIC0.00680.01230.0292
WHAS0.00460.01510.0507
SUPPORT0.09570.13930.2035
GBSG0.02480.03940.0668
TMBImmuno0.05230.06810.0878
BreastMSK0.00060.00080.0130
LGGGBM0.05700.08420.1356
+ +Table 6 reports the 50th, 75th, and 95th percentiles of $F_{\mathrm{ALD}}(0 \mid \mathbf{x})$ across 21 datasets. The results indicate that this quantity remains close to zero in the vast majority of cases. Even at the 95th percentile, most values remain below $1 - 2\%$ , suggesting that the model rarely assigns significant mass to invalid time regions. This empirically confirms that, despite the ALD's unbounded support, the learned parameters stay consistent with the temporal constraints of survival analysis. + +# Case Study 5: Limitations of ALD on SUPPORT + +The model's performance on the SUPPORT dataset is comparatively lower than on other benchmarks. This shortcoming + +can largely be attributed to the assumption of the Asymmetric Laplace Distribution (ALD), which may not be universally suitable across datasets. In particular, the SUPPORT dataset exhibits pronounced skewness and a narrow range of event times, as visualized in Figure 12. A substantial concentration of events occurs near zero, resulting in extreme quantile values and rendering the distribution challenging to calibrate, especially in the early time horizon (i.e., $t \to 0$ ). + +![](images/ec6c33bcb6b154249088696f1803031486f617d4b53522c62c3cb2829c2d64d3.jpg) +Figure 12. Distribution of the SUPPORT dataset for the training set and test set. + +![](images/b1a2acea6c520e040ef1049972ac1f8eddb75e6d6b864dfab60ff17c3579de6d.jpg) + +In response to this skewness, the model assigns high probability mass to early intervals while allocating limited capacity to later time points. This imbalance compromises calibration accuracy across the full temporal range. Nonetheless, the resulting calibration metrics remain within acceptable bounds and are generally comparable to those of the baselines. Furthermore, as shown in Appendix C.1 and Table 2, our model still achieves competitive performance on slope and intercept-based calibration metrics, reaffirming its robustness despite the dataset-specific limitations. \ No newline at end of file diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/images.zip b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..acf32638bec067f2c2f3f4415a653fa84aad7aef --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d88c6cb8cf3adaf8255e5f764cd854d1b4931ee48d9e060bf0e934611463e526 +size 4907233 diff --git a/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/layout.json b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d9fe660510515e274d99561bd898e0ef27867a3a --- /dev/null +++ b/ICML/2025/Learning Survival Distributions with the Asymmetric Laplace Distribution/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:382b307eed0f5fabaf4ea95865e4493b747b66ee1a4f0d067d34dfe538ec7028 +size 1471519 diff --git a/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_content_list.json b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..fd6eeb54d27067520b046cc8e52a21468ff83887 --- /dev/null +++ b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61fb7e27cb2d1b986153c0b91a021d26b7c33d441f5e18bbbe4fcd9b3f1a09ac +size 225734 diff --git a/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_model.json b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..52c29a5f16f3b76258362f422618d6d5ca3bdd4c --- /dev/null +++ b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:204c1d4208b61f9e9b75d6df9a841672ba1dcda9e946de73e79447cb17e69b6a +size 264528 diff --git a/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_origin.pdf b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c54c63487ce3732a985e679ac7dd78776353874a --- /dev/null +++ b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/3c5e4dff-2efc-427c-ae33-15421f759d3e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bf999523ddca2bccd835ba4cdbb2073ce66d550bcb7cf2605517b7a51c6d04f +size 1606021 diff --git a/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/full.md b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8876dfab01ad73331c262cf7632cd945d1b67555 --- /dev/null +++ b/ICML/2025/Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains/full.md @@ -0,0 +1,845 @@ +# Learning Time-Aware Causal Representation for Model Generalization in Evolving Domains + +Zhuo He1 Shuang Li1 Wenze Song1 Longhui Yuan1 Jian Liang2 Han Li2 Kun Gai2 + +# Abstract + +Endowing deep models with the ability to generalize in dynamic scenarios is of vital significance for real-world deployment, given the continuous and complex changes in data distribution. Recently, evolving domain generalization (EDG) has emerged to address distribution shifts over time, aiming to capture evolving patterns for improved model generalization. However, existing EDG methods may suffer from spurious correlations by modeling only the dependence between data and targets across domains, creating a shortcut between task-irrelevant factors and the target, which hinders generalization. To this end, we design a time-aware structural causal model (SCM) that incorporates dynamic causal factors and the causal mechanism drifts, and propose Static-DYNamic Causal Representation Learning (SYNC), an approach that effectively learns time-aware causal representations. Specifically, it integrates specially designed information-theoretic objectives into a sequential VAE framework which captures evolving patterns, and produces the desired representations by preserving intra-class compactness of causal factors both across and within domains. Moreover, we theoretically show that our method can yield the optimal causal predictor for each time domain. Results on both synthetic and realworld datasets exhibit that SYNC can achieve superior temporal generalization performance. + +# 1. Introduction + +Deep neural networks (DNNs) have achieved excellent performance in various applications, yet suffer from performance degradation when the i.i.d. assumption is violated (Recht et al., 2019; Taori et al., 2020). Domain Gen- + +$^{1}$ Independent Researcher, China $^{2}$ Kuaishou Technology, China. Correspondence to: Shuang Li . + +Proceedings of the $42^{nd}$ International Conference on Machine Learning, Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s). + +![](images/1a0c2a3ab7fb346998b1ef29878a904f4a4d7449e189d6fe39d116fac3e14bf3.jpg) +Figure 1: We plot the category distribution of training domains on Caltran. The lower part shows visualization of attention maps of the convolutional Layer. Compared with LSSAE, it can be observed that our method better focuses on target-related features and makes accurate predictions. + +eralization (DG) (Liu et al., 2021b; Wang et al., 2023; Fan et al., 2024) can effectively address the issue of distribution shift, but it still struggles to handle the dynamic scenarios that are widespread in the real world (Yao et al., 2022a; Qin et al., 2022). In order to adapt to changing environments over time, evolving domain generalization (EDG) (Nasery et al., 2021; Qin et al., 2022; Zeng et al., 2023b; Bai et al., 2023; Xie et al., 2024; Zeng et al., 2023a; Qin et al., 2023) has emerged in recent years and is garnering increasing attention, aiming to capture the underlying evolving patterns in data distribution to generalize well to the near future. + +Despite promising results, existing EDG methods may suffer from spurious correlations by solely modeling the statistical correlation between data and targets. Fig. 1 illustrates the behavior of the baseline model (Qin et al., 2022) trained on the Caltran dataset (Hoffman et al., 2014), tasked with determining whether a vehicle is present in an image. Among the images captured by the camera, most of those containing vehicles were taken during the day, while images without vehicles were captured at evening or night. Therefore, there + +![](images/1fa2465b5942ec1aa10ee704e497aa6cc451649edd621b574f55da412f9626f9.jpg) +Figure 2: (a) SCM for DG. (b) Our proposed time-aware SCM for EDG. By introducing $Z_{c}^{dy}$ and $Z^{d}$ , dynamic causal factors and causal mechanism drifts are explicitly modeled. + +exists a shortcut from the background representation to the target, i.e., the trained model tends to rely on lighting (spurious feature) to determine the presence of a vehicle, rather than the object of the vehicle (causal feature). Due to spurious correlations, the model during the inference stage tends to classify day (night) images as "Car" ("No Car"), which compromises its generalization performance. + +Causality (Pearl, 2009; Pearl et al., 2016) has proven to be a powerful tool for addressing spurious correlations and has therefore been widely explored. (Arjovsky et al., 2019; Mahajan et al., 2021; Sun et al., 2021; Lv et al., 2022; Sheth et al., 2022). However, since causal factors and causal mechanisms behave more complex and changeable in nonstationary environments, its implementation in dynamic scenarios still remains underexplored. Fig. 2a shows a classical structural causal model (SCM) for static DG (Liu et al., 2021a; Sun et al., 2021; Lv et al., 2022), where category-irrelevant (spurious) factors $Z_{s}$ and category-related (causal) factors $Z_{c}$ are modeled as time-invariant. Such a temporal homogeneous SCM fails to account for the underlying continuous structure in non-stationary tasks, rendering static causal representations insufficient for generalizing to evolving new domains. Moreover, as the statistical properties of the target variables change over time (Gama et al., 2014; Lu et al., 2018), the influence of causal factors on the target may also vary, suggesting the mapping from causal factors to labels gradually shifts, leading to causal mechanism drifts. + +To address the aforementioned issues, we propose a novel time-aware SCM for EDG. As shown in Fig. 2b, the local variable $L$ is introduced to model instability and dynamics, and the global variable $G$ is utilized to represent globally unchanging knowledge. We then split the causal factors into static causal factors $Z_{c}^{st}$ and time-varying dynamic causal factors $Z_{c}^{dy}$ , thereby incorporating the evolving patterns into causal factors. To model the causal mechanism drifts, we introduce a time-varying drift factor $Z^{d}$ . Moreover, $Z_{c}^{st}$ and $Z_{c}^{dy}$ , along with the static spurious factors $Z_{s}^{st}$ and dynamic spurious factors $Z_{s}^{dy}$ , constitute the static factors $Z^{st}$ + +and dynamic factors $Z^{dy}$ , respectively. Therefore, in our new SCM, the data $X$ is generated by $X \leftarrow (Z^{st}, Z^{dy})$ while the label $Y$ is generated via $Y \leftarrow (Z_{c}^{st}, Z_{c}^{dy}, Z^{d})$ . It can be observed that the time factor acts as a latent confounder, with its components $G$ and $L$ forming backdoor paths between static and dynamic spurious factors and the target. These paths introduce spurious correlations, which can be mitigated by identifying the true causal factors and constructing a causal model accordingly. + +In order to learn the causal model with the help of the time-aware SCM, we propose Static-DYNamic Causal Representation Learning (SYNC), a method designed to effectively capture time-aware causal representations by simultaneously uncovering static and dynamic causal representations. Concretely, a sequential VAE framework is employed to capture the underlying evolving patterns in data distribution. To separate causal factors from the complex and entangled mixture of factors, we first minimize the mutual information (MI) loss between static and dynamic factors to encourage disentanglement between them. After that, static and dynamic causal factors can be obtained by maximally preserving the intra-class compactness of causal factors both across and within temporal domains, implemented by optimizing the designed cross-domain and intra-domain conditional MI losses that account for continuous domain structure in EDG. We theoretically show that, with the devised objectives, our method can yield the optimal causal predictor for each time domain, ultimately excluding spurious correlations and achieving superior temporal generalization performance. + +Contributions: (i) By taking a novel causal perspective towards EDG problem, we design a time-aware SCM that enables the refined modeling of both dynamic causal factors and causal mechanism drifts. After that, we propose SYNC, an approach for effectively learning time-aware causal representations, thereby mitigating spurious correlations. (ii) Theoretically, we show that SYNC can build the optimal causal predictor for each time domain, resulting in improved model generalization. (iii) Results on both synthetic and real-world datasets, along with extensive analytic experiments demonstrate the effectiveness of proposed approach. + +# 2. Related Work + +Evolving Domain Generalization (EDG) is introduced to address the issue of generalizing across temporally drift domains (Nasery et al., 2021; Qin et al., 2022; Zeng et al., 2023b; Bai et al., 2023; Xie et al., 2024; Zeng et al., 2024; 2023a; Qin et al., 2023; Jin et al., 2024). Most existing methods learn a time-sensitive model. To name a few, GI (Nasery et al., 2021) suggests training a time-sensitive model by utilizing a gradient interpolation loss. LSSAE and MMD-LSAE (Qin et al., 2022; 2023) account for covariate shifts and concept drifts and introduce a probabilistic + +model with variational inference to capture evolving patterns. MISTS (Xie et al., 2024) further proposes to learn both invariant and dynamic features through mutual information regularization. Additionally, DRAIN (Bai et al., 2023) launches a Bayesian framework and adaptively generates network parameters through dynamic graphs. SDE-EDG (Zeng et al., 2023a) proposes to learn continuous trajectories captured by the stochastic differential equations. Different from the aforementioned methods, DDA (Zeng et al., 2023b) simulates the unseen target data by a metalearned domain transformer. However, these methods do not account for spurious correlations, which could hinder the model generalization. In this work, we introduce a novel causal perspective to EDG problem and learn time-aware causal representations to address this issue. + +Causality and Generalization. Causality describes the fundamental relationship between cause and effect, which goes beyond the statistical correlation simply obtained from observational data (Pearl, 2009; Pearl et al., 2016). Since causal models can effectively mitigate the impact of spurious correlations, many studies have proposed leveraging causal theories to develop more robust models. Causal methods in DG can be broadly categorized into two types. The first type of methods (Arjovsky et al., 2019; Ahuja et al., 2020; Li et al., 2022; Ahuja et al., 2021; Sun et al., 2021; Yong et al., 2024) focuses on constructing an optimal invariant predictor through invariant learning. However, by neglecting dynamic causal information or the correlations between temporal domains, these methods struggle to perform effectively in dynamic environments. The second type (Mahajan et al., 2021; Lv et al., 2022; Wang et al., 2022; Hu et al., 2022; Mao et al., 2022; Chen et al., 2023; Yue et al., 2021) leverages interventions to extract causal features. Nevertheless, in dynamic scenarios, the presence of dynamical causal factors complicates the rational intervention in spurious factors. Regarding causal methods for time series modeling (Entner & Hoyer, 2010; Malinsky & Spirtes, 2018; Li et al., 2021; Yao et al., 2022b), they often need somewhat strong assumptions on models such as the reversibility of the generation function to infer underlying causal structures. Furthermore, the aforementioned methods overlook the fact that the causal mechanisms of the target may drift (Lu et al., 2018) in dynamic scenarios. + +# 3. Methodology + +# 3.1. Preliminaries + +**Evolving Domain Generalization.** Let $\pmb{x} \in \mathcal{X}$ and $y \in \mathcal{Y}$ denote the input data and its label, respectively, where $\mathcal{X}$ and $\mathcal{Y}$ represent the nonempty input space and label space, respectively. $P(\pmb{x}, y, t)$ characterizes the temporal dynamic of the probability distribution for $(\pmb{x}, y)$ , wherein underlying evolving patterns over time $t$ exist. Suppose that we are + +given $T$ sequential source domains $\mathcal{S} = \{\mathcal{D}_t\}_{t=1}^T$ , where each domain $\mathcal{D}_t$ consists of $N_t$ data $(x_{t,i},y_{t,i})$ which are drawn from $P(x,y|t)$ , i.e., $\mathcal{D}_t = \{(x_{t,i},y_{t,i})\}_{i=1}^{N_t}$ . The goal of EDG is to leverage given $T$ training domains to establish a robust model $h: \mathcal{X} \to \mathcal{Y}$ which can generalize well to $K$ unseen target domains $\mathcal{T} = \{\mathcal{D}_t\}_{t=T+1}^{T+K}$ arriving sequentially in the near future. Due to the existence of evolving patterns across the sequential domains, the ideal model should be capable of capturing these patterns. + +Structural Causal Model. The structural causal model (SCM) over $n$ random variables $X_{1}, X_{2}, \dots, X_{n}$ , according to (Pearl, 2009), is defined as a triple $\langle \mathcal{G}, P(\epsilon), \mathcal{F} \rangle$ . $\mathcal{G}$ denotes the causal directed acyclic graph (DAG) which is comprised of the nodes $V$ and the directed edges $E$ , where the starting point and end point of each directed edge represent cause and effect, respectively. $\epsilon$ is the independent exogenous noise variables. These noise variables follow the joint distribution $P(\epsilon)$ . $\mathcal{F}$ denotes a set of assignments $\{X_{i} := f_{i}(\mathbf{PA}_{i}, \epsilon_{i})\}_{i=1}^{n}$ , where $\mathbf{PA}_{i}$ is the set of parents of $X_{i}$ , i.e., direct causes, $f_{i}$ represents a deterministic function. Each SCM induces a corresponding causal DAG, and the data generation process can be characterized by the SCM. + +# 3.2. Temporally Evolving SCM + +Spurious correlations may mislead the model into learning features that are irrelevant to the target, posing a notable challenge to model generalization in EDG. Since causal models can effectively alleviate spurious correlations, we aim to construct an appropriate SCM for EDG and acquire the causal model by learning causal representations. + +Given that causal-based methods (Lv et al., 2022; Liu et al., 2021a; Lu et al., 2021; Sun et al., 2021) have been extensively explored in static DG, we start by briefly reviewing the SCM employed in static DG. As mentioned in Section 1, the target $Y$ is determined solely by causal factors $Z_{c}$ , and the causal mechanism $P(Y|Z_{c})$ remains consistent across environments. On this basis, a causal model can be established by extracting $Z_{c}$ and constructing the corresponding invariant causal mechanisms. Nevertheless, such time-independent SCM is not suitable for dynamic scenarios. Specifically, first, ignoring the underlying continuous structure in non-stationary tasks limits performance. Second, the statistical properties of the target may change over time (Gama et al., 2014; Lu et al., 2018), implying that the influence of causal factors on the target may vary, resulting in causal mechanism drifts. Therefore, to apply causality in EDG, designing a new and suitable SCM is essential. + +Regarding the first issue, we further partition the causal factors into static causal factors $Z_{c}^{st}$ and dynamic causal factors $Z_{c}^{dy}$ , where $Z_{c}^{st}$ contains stable category-related information, while $Z_{c}^{dy}$ is related to domain-specific category-related information. $Z_{c}^{st}$ and $Z_{c}^{dy}$ , along with the static + +spurious factors $Z_{s}^{st}$ and dynamic spurious factors $Z_{s}^{dy}$ , constitute the static factors $Z^{st}$ and dynamic factor $Z^{dy}$ , respectively. Then, $Z^{st}$ and $Z^{dy}$ collaborate to generate the observed data $X$ . Regarding the second issue, in order to characterize the evolving causal structure $P(Y|Z_{c}^{st}, Z_{c}^{dy})$ , we introduce drift factors $Z^{d}$ to characterize the evolution of causal mechanisms. Finally, we introduce the local variable $L$ , which consists of unstable and dynamic information, along with the stable global variable $G$ , to represent the generation of $Z^{st}$ , $Z^{dy}$ and $Z^{d}$ . Combined with the above analysis, we propose the time-aware SCM as follows: + +Definition 1 (Time-aware SCM). The time-aware SCM $\mathcal{M}_T$ built on observed variables $X,Y$ , latent variables $Z_c^{st}, Z_s^{st}, Z_c^{dy}, Z_s^{dy}, Z^d$ and information factors $G$ and $L$ , is a triple, i.e., $\mathcal{M}_T = \langle \mathcal{G}, P(\epsilon), \mathcal{F} \rangle$ , $\mathcal{G}$ is the corresponding directed acyclic causal graph shown in Fig. 2b, $P(\epsilon)$ denotes the distribution that exogenous noise follows, and $\mathcal{F}$ denotes the assignments $\{f^x, f^y, f_c^{st}, f_s^{st}, f_c^{dy}, f_s^{dy}, f^d\}$ : + +$$ +X := f ^ {x} \left(Z _ {c} ^ {s t}, Z _ {s} ^ {s t}, Z _ {c} ^ {d y}, Z _ {s} ^ {d y}, \epsilon_ {x}\right), Y := f ^ {y} \left(Z _ {c} ^ {s t}, Z _ {c} ^ {d y}, Z ^ {d}, \epsilon_ {y}\right), +$$ + +$$ +Z _ {c} ^ {s t} := f _ {c} ^ {s t} \left(G, \epsilon_ {c} ^ {s t}\right), Z _ {s} ^ {s t} := f _ {s} ^ {s t} \left(G, \epsilon_ {s} ^ {s t}\right), +$$ + +$$ +Z _ {c} ^ {d y} := f _ {c} ^ {d y} \left(L, \epsilon_ {c} ^ {d y}\right), Z _ {s} ^ {d y} := f _ {s} ^ {d y} \left(L, \epsilon_ {s} ^ {d y}\right), Z ^ {d} := f ^ {d} \left(L, \epsilon_ {d}\right). +$$ + +From Def. 1, the generation of the observed variables is fully determined by five latent factors, with no additional unobserved factors involved. Under the global Markov condition and the causal faithfulness (Pearl et al., 2016), it follows that $Y \perp [Z_s^{st}, Z_s^{dy}] \mid [Z_c^{st}, Z_c^{dy}, Z^d]$ . This observation suggests that, within a given time domain $\mathcal{D}_t$ , predictors built on causal representations are immune to the influence of spurious factors. By incorporating a mutual information (MI) term to filter out information irrelevant to the target, the optimal causal predictor for $\mathcal{D}_t$ can be defined as follows: + +Definition 2 (Optimal Causal Predictor). For a time domain $\mathcal{D}_t$ , the corresponding drift factors $Z_{t}^{d}$ are given. Let $Z_{c,t} = (Z_{c,t}^{st}, Z_{c,t}^{dy})$ be the causal factors in domain $\mathcal{D}_t$ that satisfy $Z_{c,t} \in \arg \max_{Z_{c,t}} I(Y; Z_{c,t}, Z_{t}^{d})$ , and $Y \perp [Z_{s,t}^{st}, Z_{s,t}^{dy}] \mid [Z_{c,t}, Z_{t}^{d}]$ . Then the predictor based on factors $Z_{c,t}$ and $Z_{t}^{d}$ is the optimal causal predictor. + +From Def. 2, when static and dynamic causal factors, along with drifts in causal mechanisms, are modeled together, the causal model for each time domain can be accurately learned. Building on the time-aware SCM $\mathcal{M}_T$ , we formulate a temporally evolving SCM $\mathcal{M}_{evo}$ , which is composed of $\mathcal{M}_T$ as the basic element, connected sequentially along the time axis. As shown in Fig. 3, static factors remain invariant to temporal changes, whereas dynamic and drift factors evolve according to specific patterns. + +Existing causal methods developed for static DG suffer from the following two problems in non-stationary environments: (i) The presence of dynamic causal factors complicates the + +![](images/8aba3aa94ab3787601ad78b9617d96462f64b0a9343a9f46ee8d2dc10ba6f151.jpg) +Figure 3: Temporally Evolving SCM for EDG. The dashed line indicates that the two factors are correlated. + +rational intervention in spurious factors; (ii) Learning with invariant causal mechanisms, as in a static environment, is not feasible. To address these issues, we propose Static-DYNamic Causal Representation Learning (SYNC), which effectively learns time-aware causal representations composed of both static and dynamic causal components. + +# 3.3. Static-Dynamic Causal Representation Learning + +# 3.3.1. EVOLVING PATTERN LEARNING + +We consider the evolving patterns of both static and dynamic latent factors. For data $(\pmb{x}_t, y_t)$ collected at time stamp $t$ , let $\pmb{z}_t^{st}$ and $\pmb{z}_t^{dy}$ denote the static factors and dynamic factors, respectively. Our goal is to learn the latent evolving patterns by modeling the condition distributions $p(\pmb{z}_t^{st}|\pmb{x}_t)$ and $p(\pmb{z}_t^{dy}|\pmb{z}_{ I(Z_{s,t}^{st}; Z_{c,t-1}^{st}|Y)$ . +(ii) If there is $H(Z_{c,t}^{st}|Z_{c,t}^{dy},Y) < H(Z_{c,t}^{st}|Z_{s,t}^{dy},Y)$ , then $I(Z_{c,t}^{dy};Z_{c,t}^{st}|Y) > I(Z_{s,t}^{dy};Z_{c,t}^{st}|Y)$ . + +In fact, the condition in Prop. 1 is generally easy to meet, as causal factors typically exhibit greater similarity, leading to smaller conditional entropy. + +Remark 1. Although Prop. 1 appears straightforward, its inspiration comes from $\mathcal{M}_T$ and can be intuitively understood within this framework. Since the two claims are similar, we explain only the second one for simplicity. As shown in Fig. 2b, there exists a collider $Z_c^{st} \to Y \leftarrow Z_c^{dy}$ and a fork $Z_s^{dy} \leftarrow L \to Z_c^{dy}$ . According to d-separation (Pearl et al., 2016), when conditioned on $Y$ , both $Z_c^{dy}$ and $Z_s^{dy}$ are related to $Z_c^{st}$ . Consider a boundary case where $Z_c^{st}$ and $Z_s^{dy}$ are independent, this implies that the backdoor path between $Z_c^{dy}$ and $Z_s^{dy}$ is blocked, leading to independence between $Z_c^{st}$ and $Z_s^{dy}$ , while $Z_c^{st}$ remains related to $Z_c^{dy}$ . Prop. 1 generalizes this observation, under certain entropy inequalities, static causal factors are more strongly related + +to dynamic causal factors than dynamic spurious factors. As mentioned above, the conditions are easy to satisfy. + +Prop. 1 (i) provides a way to learn the static causal factors: + +$$ +\max _ {\Phi_ {c} ^ {s t}} I \left(\Phi_ {c} ^ {s t} \left(X _ {t}\right); \Phi_ {c} ^ {s t} \left(X _ {t - 1}\right) | Y\right), \tag {4} +$$ + +where $\Phi_c^{st}$ consists of the feature extraction component of $q_{\psi}$ , namely $q_{\psi}^{ext}$ , and a neural-network-based masker $m_c^{st}$ such that $\Phi_c^{st} = m_c^{st} \circ q_{\psi}^{ext}$ . $m_c^{st}$ is implemented by + +$$ +m _ {c} ^ {s t} = \text {G u m b e l - S o f t m a x} \left(w _ {c} ^ {s t} \left(q _ {\psi} ^ {e x t} \left(X _ {t}\right)\right), \kappa N\right), \tag {5} +$$ + +where $w_{c}^{st}$ learns the scores of each dimensions of $q_{\psi}^{ext}(X_t)$ , and the dimensions correspond to the mask ratio $\kappa \in (0,1)$ are regarded as causal dimensions, $N$ is the dimension of $q_{\psi}^{ext}(X_t)$ . We employ the Gumbel-Softmax trick (Jang et al., 2017) to sample a mask with $\kappa N$ values approaching 1. + +Since an exact estimate of Eq. (4) could be highly expensive (Oord et al., 2018), we use supervised contrastive learning (Khosla et al., 2020; Belghazi et al., 2018) as a practical solution for the approximating $I(\Phi_c^{st}(X_t); \Phi_c^{st}(X_{t-1})|Y)$ : + +$$ +\mathbb {E} _ {\left\{\begin{array}{l}X _ {t, j}, X _ {t - 1, k} ^ {p} \left. \right\} \sim P (X | y = Y)\\\left\{X _ {t - 1, i} ^ {n} \right\} _ {i = 1} ^ {M} \sim P (X | y \neq Y)\end{array}\right.} \log \frac {e ^ {l t ^ {s t (j , k)} / \tau}}{e ^ {l t ^ {s t (j , k)} / \tau} + \sum_ {i = 1} ^ {M} e ^ {l t ^ {s t (j , i)} / \tau}}, \tag {6} +$$ + +where $l_{t + 1}^{st}(j,k) = \mathrm{sim}(\Phi_c^{st}(X_{t,j}),\Phi_c^{st}(X_{t - 1,k}^p))$ and $l_{t}^{st}(j,i) = \mathrm{sim}(\Phi_c^{st}(X_{t,j}),\Phi_c^{st}(X_{t - 1,i}^n))$ $\mathrm{sim}(\cdot ,\cdot)$ is the cosine similarity. In Eq. (6), the positive sample $X_{t - 1,k}^p$ shares the same label as $X_{t,j}$ , while the negative samples $\{X_{t - 1,i}^n\}_{i = 1}^M$ have different labels. $\tau$ is the temperature hyperparameter. In addition, we utilize the MI term $I(Y;\Phi_c^{st}(X_t))$ to filter out information irrelevant to the target. Lem. 1 as follows demonstrates the effectiveness of designed objective. + +Lemma 1. For a time domain $\mathcal{D}_t$ , the static causal factors can be obtained by solving the following objective: + +$$ +\max _ {\Phi_ {c} ^ {s t}} I (Y; \Phi_ {c} ^ {s t} (X _ {t})), +$$ + +$$ +s. t. \Phi_ {c} ^ {s t} \in \underset {\Phi_ {c} ^ {s t}} {\arg \max } I \left(\Phi_ {c} ^ {s t} \left(X _ {t}\right); \Phi_ {c} ^ {s t} \left(X _ {t - 1}\right) | Y\right), \tag {7} +$$ + +where maximizing the MI term can be achieved by minimizing the cross-entropy loss between the representation $\Phi_c^{st}(X_t)$ and the target $Y$ . Prop. 1 (ii) demonstrates that by using the static causal factors $Z_{c,t}^{st}$ as the anchor, the dynamic causal representations can be learned through + +$$ +\max _ {\Phi_ {c} ^ {d y}} I \left(\Phi_ {c} ^ {d y} \left(X _ {t}\right); Z _ {c, t} ^ {s t} | Y\right), \tag {8} +$$ + +where $\Phi_c^{dy}$ is comprised of the feature extraction component of $q_{\theta}$ , i.e., $q_{\theta}^{ext}$ , and a neural-network-based masker $m_c^{dy}$ , + +such that $\Phi_c^{dy} = m_c^{dy}\circ q_\theta^{ext}$ . $m_c^{dy}$ is implemented is similar to Eq. (5). We estimate $I(\Phi_c^{dy}(X_t);Z_{c,t}^{st}|Y)$ by + +$$ +\mathbb {E} _ {\left\{\begin{array}{l}X _ {t, j}, X _ {t, k} ^ {p} \left. \right\} \sim P (X | y = Y)\\\left\{X _ {t, i} ^ {n} \right\} _ {i = 1} ^ {M} \sim P (X | y \neq Y)\end{array}\right.} \log \frac {e ^ {I _ {t} ^ {d y} (j , k) / \tau}}{e ^ {I _ {t} ^ {d y} (j , k) / \tau} + \sum_ {i = 1} ^ {M} e ^ {I _ {t} ^ {d y} (j , i) / \tau}}, +$$ + +where $l_{t}^{dy}(j,k) = \mathrm{sim}(\Phi_{c}^{dy}(X_{t,j}),\hat{\mathbf{z}}_{c}^{st}(X_{t,k}^{p}))$ $l_{t}^{dy}(j,i) =$ $\mathrm{sim}(\Phi_c^{dy}(X_{t,j}),\hat{\mathbf{z}}_c^{st}(X_{t,i}^n))$ , with $X_{t,k}^{p}$ being a positive sample that shares the same label as $X_{t,j}$ , and the negative samples $\{X_{t,i}^n\}_{i = 1}^M$ are those having different labels. $\hat{\mathbf{z}}_c^{st}(X_{t,\cdot})$ denotes the static causal factors of $X_{t,\cdot}$ , which are implemented by $\Phi_c^{st}(X_{t,\cdot})$ . We provide the following Lem. 2, which demonstrates the effectiveness of devised objective. + +Lemma 2. For a time domain $\mathcal{D}_t$ , let $\Phi_c^{st,\star}(X_t)$ be the static causal factors learned by the model, then the dynamic causal factors can be obtained by the following objective: + +$$ +\max _ {c} I (Y; \Phi_ {c} ^ {d y} (X _ {t})), +$$ + +$$ +\psi_ {c} \quad I (\star d u (X), \star s t ^ {\prime} (\star (X) | X) \tag {10} +$$ + +$$ +s. t. \Phi_ {c} ^ {d y} \in \arg \max I \left(\Phi_ {c} ^ {d y} \left(X _ {t}\right); \Phi_ {c} ^ {s t, \star} \left(X _ {t}\right) | Y\right). +$$ + +$$ +\Phi_ {c} ^ {d y} +$$ + +Overall, the objective in Eq. (4) brings the static causal representations of the same category across domain closer, while the objective in Eq. (8) aligns the static and dynamic causal representations of the same category within the domain. + +# 3.3.4. LEARNING EVOLVING CAUSAL MECHANISMS + +We introduce drift factors $Z^d$ to model the evolving causal mechanisms. In order to approximate $p(z_t^d | z_{MethodCircleSineRMNISTPortraitsCaltranPowerSupplyONPOverallWstAvgWstAvgWstAvgWstAvgWstAvgWstAvgWstAvgWstAvgERM41.749.949.563.037.843.675.587.829.966.364.471.064.265.951.963.9Mixup41.748.449.362.938.344.975.587.852.366.064.370.864.166.055.163.8MMD41.750.747.655.839.044.874.087.329.457.164.870.947.151.349.159.7MLDG41.750.849.563.237.543.176.488.551.766.264.670.863.965.955.064.1RSC41.748.049.561.535.841.775.287.351.967.064.470.963.364.754.563.0MTL42.251.246.962.936.141.778.289.052.668.264.270.763.465.654.864.2FISH41.748.849.562.337.644.278.688.857.568.664.270.863.265.956.064.2CORAL41.753.946.351.638.544.574.687.450.965.764.671.063.865.854.362.8AndMask41.747.942.969.337.842.862.070.329.956.964.070.751.254.647.158.9DIVA56.767.938.652.936.942.776.288.253.869.263.970.764.566.055.865.4IRM41.751.349.563.234.139.074.285.443.160.664.170.861.964.552.762.1IIB42.053.947.661.338.545.078.189.754.869.364.570.863.266.355.262.1iDAG42.049.047.657.139.844.179.888.653.569.766.171.263.866.456.163.7GI42.054.449.865.239.244.677.888.153.170.765.171.063.565.755.865.7LSSAE42.073.849.071.440.346.477.789.154.370.365.471.164.566.056.269.7DDA42.051.243.066.638.045.176.087.931.066.164.470.963.565.351.264.7DRAIN45.050.743.071.337.243.877.789.455.769.064.971.059.861.154.865.2MMD-LSAE54.079.543.071.442.949.280.990.456.969.665.271.461.866.458.170.9CTOT54.075.243.267.231.744.879.286.448.066.963.671.161.165.654.468.2SDE-EDG45.081.542.372.239.752.678.689.655.171.364.170.863.165.655.471.9SYNC (Ours)67.084.760.076.145.850.881.090.858.872.266.971.764.665.663.473.1 + +at time $t$ as defined in Eq. (6) and Eq. (9), respectively. The objective function of SYNC is + +$$ +\mathcal {L} _ {\text {S Y N C}} = \mathcal {L} _ {\text {e v o l v e}} + \alpha_ {1} \mathcal {L} _ {\mathrm {M I}} + \alpha_ {2} \mathcal {L} _ {\text {c a u s a l}}, \tag {12} +$$ + +where $\alpha_{1}$ and $\alpha_{2}$ are the trade-off hyperparameters. + +# 3.4. Theoretical Analysis + +In this section, we aim to provide a theoretical insight on our proposed SYNC. More details on the theoretical proof and discussion can be found in Appendix B. First, we show that optimizing $\mathcal{L}_{\mathrm{evolve}}$ approximates the joint distribution $p(\boldsymbol{x}_{1:T},y_{1:T})$ and captures the underlying evolving pattern. + +Theorem 1. Assume that the underlying data generation process at each time step is characterized by $\mathcal{SCM}_{T}$ . Then, by optimizing $\mathcal{L}_{\text{evolve}}$ , the model can learn the data distribution $p(\pmb{x}_{1:T}, y_{1:T})$ on training domains. + +Thm. 1 demonstrates that minimizing $\mathcal{L}_{\mathrm{evolve}}$ can effectively capture the underlying evolving pattern in data distribution. Now, we provide Thm. 2 as follows to state that minimizing $\mathcal{L}_{\mathrm{SYNC}}$ leads to the optimal causal predictor at each time domain $\mathcal{D}_t$ , thereby addressing spurious correlations and improving model generalization. + +Theorem 2. Let $\Phi_c^{st}(X_t),\Phi_c^{dy}(X_t)$ and $Z_{t}^{d}$ denote the representations and drift factors at the time domain $\mathcal{D}_t$ obtained by training the network through the optimization of $\mathcal{L}_{SYNC}$ . Then the predictor constructed upon these components is the optimal causal predictor as defined in Def. 2. + +# 4. Experiments + +# 4.1. Experimental setup + +Datasets. We evaluate SYNC on several commonly used benchmarks, including two synthetic datasets (Circle, Sine) and five real-world datasets (RMNIST, Portraits, Caltran, PowerSupply, ONP). Circle (Pesaranghader & Viktor, 2016) contains evolving 30 domains, where the instance are sampled from 30 2D Gaussian distributions. Sine (Pesaranghader & Viktor, 2016) includes 24 evolving domains, which is achieved by extending and rearranging the original dataset. RMNIST (Ghifary et al., 2015) consists of MNIST digits with varying rotations. Following (Qin et al., 2022), we generate 19 evolving domains by sequentially applying rotations from $0^{\circ}$ to $180^{\circ}$ in $15^{\circ}$ increments. Portraits (Yao et al., 2022a) is a real-world dataset of American high school senior photos spanning 108 years across 26 states. We split it into 34 evolving domains using fixed temporal intervals. Caltran (Hoffman et al., 2014) is a surveillance dataset captured by fixed traffic cameras deployed at intersections and is split into 34 domains by time to predict the type of scene. PowerSupply (Dau et al., 2019) is created by an Italian electricity company and contains 30 evolving domains. ONP (Fernandes et al., 2015) is collected from the Mashable website within two years and is divided into 24 domains according to month. All domains are split into source domains, intermediate domains and target domains according to the ratio of $\{1/2:1/6:1/3\}$ . The intermediate domains + +![](images/8f2e65eada0be1b3b946fd7afe901d31a65ca2c30b7c06b48ff7c8ed3afe071a.jpg) +(a) Circle + +![](images/08a7bfb60198a01dd2c2b636f2edd53a0dd038fe12fccc72c686073c0abde0dc.jpg) +(b) RMNIST +Figure 5: (a) and (b) show the independence degree of LSSAE and SYNC, respectively, during the training process on the Circle and RMNIST. (c) and (d) present the test accuracy trajectory of SYNC and various baselines on Circle and Portraits. + +![](images/44e240ad397e4d314e2c6e1b1d83cb212c7d37170b2f033185069f14c20609c3.jpg) +(c) Circle + +![](images/bad62d2a8967d97968555678541fa60fb284c43efefd7cb6ecdd17fd36b329c3.jpg) +(d) Portraits + +are utilized as validation set for model selection. + +Baselines. We select three categories of related methods for comparison: (i) Non-Causal DG: ERM (Vapnik, 1999), Mixup (Zhang et al., 2018), MMD (Li et al., 2018b), MLDG (Li et al., 2018a), RSC (Huang et al., 2020), MTL (Blanchard et al., 2021), FISH (Shi et al., 2022), CORAL (Sun & Saenko, 2016), AndMask (Parascandolo et al., 2021), DIVA (Ilse et al., 2020). (ii) Causal DG: IRM (Arjovsky et al., 2019), IIB (Li et al., 2022), iDAG (Huang et al., 2023). (iii) EDG: GI (Nasery et al., 2021), LSSAE (Qin et al., 2022), DDA (Zeng et al., 2023b), DRAIN (Bai et al., 2023), CTOT (Jin et al., 2024), SDE-EDG (Zeng et al., 2023a), MMD-LSAE (Qin et al., 2023). We keep the neural network architecture of encoding and classification part constant across all baselines used in different benchmarks for a fair comparison. + +Implementation. All experiments in this work are performed on a single NVIDIA GeForce RTX 4090 GPU with 24GB memory, using the PyTorch packages, and are based on DomainBed (Gulrajani & Lopez-Paz, 2021). Please refer Appendix E.2 for additional training details and Appendix C.3 for network architecture details. + +Evaluation Metrics. In this work, we report the generalization performance on $K$ target domains in the future, including the worst accuracy performance "Wst" $(\min_{k\in \{1,2,\dots ,K\}}\mathrm{Accuracy}(\mathcal{D}^{T + k}))$ and the average accuracy performance "Avg" $(\frac{1}{K}\sum_{k = 1}^{K}\mathrm{Accuracy}(\mathcal{D}^{T + k}))$ + +# 4.2. Quantitative results + +The results of our proposed SYNC, along with various baseline methods, are presented in Table 1. It can be observed that the average performance of EDG methods generally exceeds that of traditional DG methods, underscoring the importance of modeling and leveraging evolving patterns in dynamic environments. In terms of worst-case performance, EDG methods do not exhibit a significant improvement over DG methods, in contrast to their advantage in average performance. This may be attributed to the fact that, if EDG methods fail to capture robust evolutionary patterns, + +their generalization ability may deteriorate over longer temporal spans. In contrast, DG methods focus on learning domain-invariant representations, which can serve as a performance lower bound and offer a more stable guarantee for generalization. These results demonstrate the importance of leveraging stable representations to enhance model generalization in dynamic environments. + +SYNC consistently outperforms other baselines over all benchmarks, achieving an accuracy of $63.4\%$ in the worst-case scenario and $73.1\%$ in terms of average performance. Specifically, compared to existing causal DG methods, SYNC achieves significantly better results on both metrics, with improvements of at least $7.6\%$ in worst-case performance and $7.7\%$ in average performance. This highlights the importance of incorporating dynamic causal information and modeling causal mechanism shifts. Moreover, when compared with EDG methods, SYNC outperforms the state-of-the-art approach by $5.3\%$ and $1.2\%$ in the two metrics, respectively. These results demonstrate that, by learning the causal model, SYNC achieves superior generalization and captures more robust evolving patterns. Lastly, it can be observed that VAE-based methods, such as LSSAE, achieve better performance, suggesting that generative approaches are effective in capturing more robust evolving patterns. Building on this, SYNC further learns both static and dynamic causal representations, which enhances model generalization and advances the modeling of evolving patterns. + +# 4.3. Analytical Experiments + +Ablation study We conduct an ablation study on RM-NIST to evaluate the effectiveness of various components in our method, and results are presented in Table 2. Variant A serves as the base method trained solely with evolving pattern loss $\mathcal{L}_{\mathrm{evolve}}$ . Variant B builds upon the base method by additionally training with MI loss $\mathcal{L}_{\mathrm{MI}}$ . It can be observed that Variant B achieves better performance than Variant A, suggesting that better separation enables more effective utilization of features from each part. Variants C and D build upon Variant B by incorporating additional training with static causal loss $\mathcal{L}_{\mathrm{stc}}$ and dynamic causal + +![](images/0b7bd2cdec59d07ed7ab8e03e278c9569be443b7572ee6b357136768b3b86f68.jpg) +(a) ERM + +![](images/8ecade63c08e39b5007c2c54668777207ada14a4630cd74d6472f4028f98c374.jpg) +(b) MMD-LSAE +Figure 6: Visualization of decision boundary of the Circle dataset, where the positive and negative classes are colored in red and blue. (a)-(c) show the decision boundaries learned by ERM, MMD-LSAE and SYNC. (d) presents the ground truth. + +![](images/682b9ec2c4d0e4b012f872e03617747a4186a867011d7c0b2cabbc9a9f531335.jpg) +(c)SYNC + +![](images/c87adab08f64065188c4febc22b4242dc37aa4779b1cea3d81354b38d9c7c80c.jpg) +(d) Ground truth + +Table 2: Ablation study of SYNC on RMNIST dataset. + +
AblationEvo.Disent.ZstcZdtycWstAvgOverall
Variant A✓---40.544.142.3
Variant B✓✓--41.945.743.8
Variant C✓✓✓-44.148.746.4
Variant D✓✓-✓42.949.246.1
SYNC✓✓✓✓45.850.848.3
+ +loss $\mathcal{L}_{\mathrm{dyc}}$ , respectively. Variant C and D achieve higher accuracy than Variant B, demonstrating that learning causal representations enhances model generalization. Notably, it is clear that Variant C achieves a greater improvement in worst-case performance compared to Variant D, indicating that static causal factors can ensure stable generalization under continuous distribution shifts. However, focusing solely on them ignores evolving pattern, limiting further generalization gains. Learning dynamic causal factors captures features related to task evolving over time, enabling to generalize better to the current distribution. Variant D outperforms Variant C in average performance and provides evidence for this claim. SYNC jointly learns static and dynamic causal representations and achieves the best performance, highlighting their significant contributions to overall effectiveness. This demonstrates that static and dynamic causal factors are complementary and play a crucial role in enhancing model generalization. + +Disentanglement To illustrate the extent of disentanglement between static and dynamic factors in our approach, we use mutual information as the measure of independence and estimate it using mini-batch weighted sampling between the static and dynamic representations produced by LSSAE and SYNC on the Circle and RMNIST datasets. As shown in Fig. 5a and Fig. 5b, compared to LSSAE, SYNC exhibits a faster and more stable decline in the independence indicator, indicating that our method achieves a more effective disentanglement of static and dynamic factors. + +Temporal Robustness Fig. 5c and Fig. 5d show the accuracy trajectories of our method and multiple baseline + +methods on Circle and Portraits. SYNC demonstrates more stable predictive performance while maintaining high accuracy. Notably, compared to SDE-EDG on the Circle dataset, SYNC continues to perform well in the later domains, highlighting the effectiveness of time-aware causal representation learning in enhancing long-term generalization. + +Evaluation on evolving pattern captured In order to verify whether the evolving patterns learned through causal representations are more accurate, we visualize the decision boundaries of our proposed approach along with ERM and MMD-LSAE on the Circle dataset. As shown in Fig. 6, ERM struggles to generalize to unseen target domains due to its inability to model latent evolving patterns. In contrast, MMD-LSAE demonstrates improved generalization to future domains. SYNC goes one step further and achieves decision boundaries that most closely align with the ground truth, highlighting its effectiveness in capturing evolving patterns and enhancing generalization to unseen target data. + +# 5. Conclusion + +In this work, we investigate the issue that existing EDG methods may experience poor generalization performance due to the presence of spurious correlations. To address this problem, we propose a time-aware SCM by considering both dynamic causal factors and causal mechanism drifts. We propose Static-DYNamic Causal Representation Learning (SYNC), an approach that can effectively learn time-aware causal representations and reconstruct causal mechanisms, thereby obtaining the causal model. Extensive experiments demonstrate the effectiveness and superiority of our method in improving the temporal generalization performance. We hope this work can offer valuable insights into improving model generalization in dynamic environments. + +# Acknowledgements + +This paper was supported by the National Natural Science Foundation of China (No. 62376026), Beijing Nova Program (No. 20230484296) and KuaiShou. + +# Impact Statement + +In this work, we highlight the potential negative impact of spurious correlations on the model generalization in the evolving domain generalization problem and provide insights into how to build and learn causal models in nonstationary environments. By learning time-aware causal representations, the model can effectively mitigate the impact of task-irrelevant factors in dynamic tasks, thereby enabling reliable predictions and decision-making in complex, changing environments. This allows the model to cope with challenges in non-stationary dynamic environments, offering potential benefits for real-world applications such as autonomous driving and advertisement recommendation. + +# References + +Ahuja, K., Shanmugam, K., Varshney, K., and Dhurandhar, A. Invariant risk minimization games. In ICML, pp. 145-155, 2020. +Ahuja, K., Caballero, E., Zhang, D., Gagnon-Audet, J., Bengio, Y., Mitliagkas, I., and Rish, I. Invariance principle meets information bottleneck for out-of-distribution generalization. In NeurIPS, pp. 3438-3450, 2021. +Arjovsky, M., Bottou, L., Gulrajani, I., and Lopez-Paz, D. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019. +Arpit, D., Wang, H., Zhou, Y., and Xiong, C. Ensemble of averages: Improving model selection and boosting performance in domain generalization. In NeurIPS, 2022. +Bai, G., Ling, C., and Zhao, L. Temporal domain generalization with drift-aware dynamic neural networks. In ICLR, 2023. +Balaji, Y., Sankaranarayanan, S., and Chellappa, R. Metareg: Towards domain generalization using meta-regularization. In NeurIPS, pp. 1006-1016, 2018. +Belghazi, M. I., Baratin, A., Rajeshwar, S., Ozair, S., Bengio, Y., Courville, A., and Hjelm, D. Mutual information neural estimation. In ICML, pp. 531-540, 2018. +Blanchard, G., Deshmukh, A. A., Dogan, U., Lee, G., and Scott, C. Domain generalization by marginal transfer learning. JMLR, pp. 1-55, 2021. +Carlucci, F. M., D'Innocente, A., Bucci, S., Caputo, B., and Tommasi, T. Domain generalization by solving jigsaw puzzles. In CVPR, pp. 2229-2238, 2019. +Chattopadhyay, P., Balaji, Y., and Hoffman, J. Learning to balance specificity and invariance for in and out of domain generalization. In ECCV, pp. 301-318, 2020. + +Chen, J., Song, L., Wainwright, M., and Jordan, M. Learning to explain: An information-theoretic perspective on model interpretation. In ICML, pp. 883-892, 2018a. +Chen, J., Gao, Z., Wu, X., and Luo, J. Meta-causal learning for single domain generalization. In CVPR, pp. 7683-7692, 2023. +Chen, R. T., Li, X., Grosse, R. B., and Duvenaud, D. K. Isolating sources of disentanglement in variational autoencoders. NeurIPS, 2018b. +Chen, Y., Zhang, Y., Bian, Y., Yang, H., Kaili, M., Xie, B., Liu, T., Han, B., and Cheng, J. Learning causally invariant representations for out-of-distribution generalization on graphs. *NeurIPS*, pp. 22131-22148, 2022. +Dau, H. A., Bagnall, A., Kamgar, K., Yeh, C.-C. M., Zhu, Y., Gharghabi, S., Ratanamahatana, C. A., and Keogh, E. The ucr time series archive. IEEE/CAA JAS, pp. 1293-1305, 2019. +Entner, D. and Hoyer, P. O. On causal discovery from time series data using fci. Probabilistic graphical models, 2010. +Fan, S., Pagliardini, M., and Jaggi, M. DOGE: domain reweighting with generalization estimation. In ICML, 2024. +Fernandes, K., Vinagre, P., and Cortez, P. A proactive intelligent decision support system for predicting the popularity of online news. In *Prog. Artif. Intell.*, pp. 535-546, 2015. +Gama, J., Zliobaité, I., Bifet, A., Pechenizkiy, M., and Bouchachia, A. A survey on concept drift adaptation. ACM computing surveys (CSUR), (4):1-37, 2014. +Ghifary, M., Kleijn, W. B., Zhang, M., and Balduzzi, D. Domain generalization for object recognition with multitask autoencoders. In ICCV, pp. 2551-2559, 2015. +Ghifary, M., Balduzzi, D., Kleijn, W. B., and Zhang, M. Scatter component analysis: A unified framework for domain adaptation and domain generalization. TPAMI, pp. 1414-1430, 2017. +Grossniklaus, H. E., Nickerson, J. M., Edelhauser, H. F., Bergman, L. A., and Berglin, L. Anatomic alterations in aging and age-related diseases of the eye. IOVS, 54(14): ORSF23-ORSF27, 2013. +Gulrajani, I. and Lopez-Paz, D. In search of lost domain generalization. In *ICLR*, 2021. +Hendrycks, D., Mu, N., Cubuk, E. D., Zoph, B., Gilmer, J., and Lakshminarayanan, B. Augmix: A simple data processing method to improve robustness and uncertainty. In ICLR, 2020. + +Hochreiter, S. and Schmidhuber, J. Long short-term memory. Neural Comput., 9(8):1735-1780, 1997. +Hoffman, J., Darrell, T., and Saenko, K. Continuous manifold based adaptation for evolving visual domains. In CVPR, pp. 867-874, 2014. +Hu, Y., Jia, X., Tomizuka, M., and Zhan, W. Causal-based time series domain generalization for vehicle intention prediction. In ICRA, pp. 7806-7813, 2022. +Huang, Z., Wang, H., Xing, E. P., and Huang, D. Self-challenging improves cross-domain generalization. In ECCV, pp. 124-140, 2020. +Huang, Z., Wang, H., Zhao, J., and Zheng, N. idag: Invariant dag searching for domain generalization. In ICCV, pp. 19169-19179, 2023. +Ilse, M., Tomczak, J. M., Louizos, C., and Welling, M. Diva: Domain invariant variational autoencoders. In $MIDL$ , pp. 322-348, 2020. +Jang, E., Gu, S., and Poole, B. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. +Jin, Y., Yang, Z., Chu, X., and Ma, L. Temporal domain generalization via learning instance-level evolving patterns. In *IJCAI*, pp. 4255-4263, 2024. +Khosla, P., Teterwak, P., Wang, C., Sarna, A., Tian, Y., Isola, P., Maschinot, A., Liu, C., and Krishnan, D. Supervised contrastive learning. In NeurIPS, pp. 18661-18673, 2020. +Kingma, D. P. and Welling, M. Auto-encoding variational bayes. In ICLR, 2014. +Li, B., Shen, Y., Wang, Y., Zhu, W., Li, D., Keutzer, K., and Zhao, H. Invariant information bottleneck for domain generalization. In AAAI, pp. 7399-7407, 2022. +Li, D., Yang, Y., Song, Y.-Z., and Hospedales, T. Learning to generalize: Meta-learning for domain generalization. In AAAI, pp. 3490-3497, 2018a. +Li, H., Pan, S. J., Wang, S., and Kot, A. C. Domain generalization with adversarial feature learning. In ECCV, pp. 5400-5409, 2018b. +Li, H., Pan, S. J., Wang, S., and Kot, A. C. Domain generalization with adversarial feature learning. In CVPR, pp. 5400-5409, 2018c. +Li, J., Wu, B., Sun, X., and Wang, Y. Causal hidden markov model for time series disease forecasting. In CVPR, pp. 12105-12114, 2021. +Liu, C., Sun, X., Wang, J., Tang, H., Li, T., Qin, T., Chen, W., and Liu, T. Learning causal semantic representation for out-of-distribution prediction. In NeurIPS, pp. 6155-6170, 2021a. + +Liu, J., Shen, Z., He, Y., Zhang, X., Xu, R., Yu, H., and Cui, P. Towards out-of-distribution generalization: A survey. arXiv preprint arXiv:2108.13624, 2021b. +Lu, C., Wu, Y., Hernandez-Lobato, J. M., and Scholkopf, B. Invariant causal representation learning for out-of-distribution generalization. In ICLR, 2021. +Lu, J., Liu, A., Dong, F., Gu, F., Gama, J., and Zhang, G. Learning under concept drift: A review. TKDE, pp. 2346-2363, 2018. +Lv, F., Liang, J., Li, S., Zang, B., Liu, C. H., Wang, Z., and Liu, D. Causality inspired representation learning for domain generalization. In CVPR, pp. 8046-8056, 2022. +Mahajan, D., Tople, S., and Sharma, A. Domain generalization using causal matching. In ICML, pp. 7313-7324, 2021. +Malinsky, D. and Spirtes, P. Causal structure learning from multivariate time series in settings with unmeasured confounding. In Proceedings of 2018 ACM SIGKDD workshop on causal discovery, pp. 23-47, 2018. +Mao, C., Xia, K., Wang, J., Wang, H., Yang, J., Baireinboim, E., and Vondrick, C. Causal transportability for visual recognition. In CVPR, pp. 7521-7531, 2022. +Motiian, S., Piccirilli, M., Adjeroh, D. A., and Doretto, G. Unified deep supervised domain adaptation and generalization. In ICCV, pp. 5716-5726, 2017. +Muandet, K., Balduzzi, D., and Scholkopf, B. Domain generalization via invariant feature representation. In ICML, pp. 10-18, 2013. +Nasery, A., Thakur, S., Piratla, V., De, A., and Sarawagi, S. Training for the future: A simple gradient interpolation loss to generalize along time. In NeurIPS, pp. 19198-19209, 2021. +Oord, A. v. d., Li, Y., and Vinyals, O. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018. +Parascandolo, G., Neitz, A., Orvieto, A., Gresele, L., and Scholkopf, B. Learning explanations that are hard to vary. In ICLR, 2021. +Pearl, J. Causality. Cambridge university press, 2009. +Pearl, J., Glymour, M., and Jewell, N. P. Causal inference in statistics: A primer. 2016. +Peng, X. and Saenko, K. Synthetic to real adaptation with generative correlation alignment networks. In WACV, pp. 1982-1991, 2018. + +Pesaranghader, A. and Viktor, H. L. Fast hoeffding drift detection method for evolving data streams. In ECML/PKDD, pp. 96-111, 2016. +Piratla, V., Netrapalli, P., and Sarawagi, S. Efficient domain generalization via common-specific low-rank decomposition. In ICML, pp. 7728-7738, 2020. +Qin, T., Wang, S., and Li, H. Generalizing to evolving domains with latent structure-aware sequential autoencoder. In ICML, pp. 18062-18082, 2022. +Qin, T., Wang, S., and Li, H. Evolving domain generalization via latent structure-aware sequential autoencoder. TPAMI, 2023. +Recht, B., Roelofs, R., Schmidt, L., and Shankar, V. Do imagenet classifiers generalize toImagenet? In ICML, pp. 5389-5400, 2019. +Sheth, P., Moraffah, R., Candan, K. S., Raglin, A., and Liu, H. Domain generalization-a causal perspective. arXiv preprint arXiv:2209.15177, 2022. +Shi, Y., Seely, J., Torr, P. H. S., Narayanaswamy, S., Hannun, A. Y., Usunier, N., and Synnaeve, G. Gradient matching for domain generalization. In ICLR, 2022. +Sun, B. and Saenko, K. Deep coral: Correlation alignment for deep domain adaptation. In ECCV, pp. 443-450, 2016. +Sun, X., Wu, B., Zheng, X., Liu, C., Chen, W., Qin, T., and Liu, T. Recovering latent causal factor for generalization to distributional shifts. In NeurIPS, pp. 16846-16859, 2021. +Taori, R., Dave, A., Shankar, V., Carlini, N., Recht, B., and Schmidt, L. Measuring robustness to natural distribution shifts in image classification. In NeurIPS, pp. 18583-18599, 2020. +Vapnik, V. N. An overview of statistical learning theory. IEEE Trans. Neural Netw., pp. 988-999, 1999. +Wang, J., Lan, C., Liu, C., Ouyang, Y., Qin, T., Lu, W., Chen, Y., Zeng, W., and Yu, P. S. Generalizing to unseen domains: A survey on domain generalization. TKDE, pp. 8052-8072, 2023. +Wang, R., Yi, M., Chen, Z., and Zhu, S. Out-of-distribution generalization with causal invariant transformations. In CVPR, pp. 375-385, 2022. +Wang, S., Zhu, J., Wang, Y., Ma, C., Zhao, X., Zhang, Y., Yuan, Z., and Ruan, S. Hierarchical gating network for cross-domain sequential recommendation. TOIS, 2025. + +Xie, B., Chen, Y., Wang, J., Zhou, K., Han, B., Meng, W., and Cheng, J. Enhancing evolving domain generalization through dynamic latent representations. In AAAI, pp. 16040-16048, 2024. +Xu, Q., Zhang, R., Zhang, Y., Wang, Y., and Tian, Q. A fourier-based framework for domain generalization. In CVPR, pp. 14383-14392, 2021. +Yao, H., Choi, C., Cao, B., Lee, Y., Koh, P. W., and Finn, C. Wild-time: A benchmark of in-the-wild distribution shift over time. In NeurIPS, 2022a. +Yao, W., Chen, G., and Zhang, K. Temporally disentangled representation learning. In NeurIPS, pp. 26492-26503, 2022b. +Yong, L., Zhou, F., Tan, L., Ma, L., Liu, J., He, Y., Yuan, Y., Liu, Y., Zhang, J. Y., Yang, Y., and Wang, H. Continuous invariance learning. In ICLR, 2024. +Yue, Z., Sun, Q., Hua, X.-S., and Zhang, H. Transporting causal mechanisms for unsupervised domain adaptation. In ICCV, pp. 8599-8608, 2021. +Zeng, Q., Shui, C., Huang, L.-K., Liu, P., Chen, X., Ling, C., and Wang, B. Latent trajectory learning for limited timestamps under distribution shift over time. In ICLR, 2023a. +Zeng, Q., Wang, W., Zhou, F., Ling, C., and Wang, B. Foresee what you will learn: data augmentation for domain generalization in non-stationary environment. In AAAI, pp. 11147-11155, 2023b. +Zeng, Q., Wang, W., Zhou, F., Xu, G., Pu, R., Shui, C., Gagné, C., Yang, S., Ling, C. X., and Wang, B. Generalizing across temporal domains with koopman operators. In AAAI, pp. 16651-16659, 2024. +Zhang, H., Cisse, M., Dauphin, Y. N., and Lopez-Paz, D. mixup: Beyond empirical risk minimization. In ICLR, 2018. +Zhou, K., Yang, Y., Hospedales, T. M., and Xiang, T. Learning to generate novel domains for domain generalization. In ECCV, pp. 561-578, 2020. +Zhou, K., Yang, Y., Qiao, Y., and Xiang, T. Domain generalization with mixstyle. In ICLR, 2021a. +Zhou, K., Yang, Y., Qiao, Y., and Xiang, T. Domain adaptive ensemble learning. *TIP*, 30:8008–8018, 2021b. + +# A. Related Work + +Domain Generalization (DG) aims to generalize knowledge extracted from multiple source domains to unseen target domain. In recent years, extensive research has been conducted to address this issue in the literature (Wang et al., 2023; Liu et al., 2021b), which can be roughly categorized into three groups: (i) Invariant representation learning: This category of methods focus on learning invariant representations across distributions to generalize well to unseen target domains, which is achieved through domain alignment (Muandet et al., 2013; Ghifary et al., 2017; Li et al., 2018c) and feature disentanglement (Piratla et al., 2020; Chattopadhyay et al., 2020). Domain alignment methods learn invariant representation via kernel-based optimization (Muandet et al., 2013; Ghifary et al., 2017), adversal training (Li et al., 2018c; Motiian et al., 2017) and using additional normalization (Peng & Saenko, 2018). Feature disentaglement methods (Piratla et al., 2020; Chattopadhyay et al., 2020) aim to disentangle the features into domain-specific and domain-invariant features, and the latter are utilized for better generalization. (ii) Domain augmentation: These methods enrich the diversity of the training domain by manipulating domain data, thereby enhancing the model's generalization. They encompass operations at both the image levels (Zhang et al., 2018; Hendrycks et al., 2020) and feature levels (Zhou et al., 2021a; 2020; Xu et al., 2021). (iii) Learning strategies: This category of methods utilize effective learning strategies to improve model generalization performance, such as meta-learning (Balaji et al., 2018; Li et al., 2018a), ensemble learning (Zhou et al., 2021b; Arpit et al., 2022) and self-supervised learning (Carlucci et al., 2019; Huang et al., 2020). Although significant progress has been made in DG, when faced with non-stationary environments that are more common in the real world (Grossniklaus et al., 2013; Wang et al., 2025), it still faces major challenges (Yao et al., 2022a; Qin et al., 2022). + +# B. Theoretical Details + +# B.1. Proof of Proposition 1 + +Proposition 1. Let $\mathcal{D}_t$ be a time domain, and for a given class $Y$ , it can be conclude that: + +(i) If there is $H(Z_{c,t}^{st}|Z_{c,t - 1}^{st},Y) < H(Z_{s,t}^{st}|Z_{c,t - 1}^{st},Y)$ , then $I(Z_{c,t}^{st};Z_{c,t - 1}^{st}|Y) > I(Z_{s,t}^{st};Z_{c,t - 1}^{st}|Y)$ . +(ii) If there is $H(Z_{c,t}^{st}|Z_{c,t}^{dy},Y) < H(Z_{c,t}^{st}|Z_{s,t}^{dy},Y)$ , then $I(Z_{c,t}^{dy};Z_{c,t}^{st}|Y) > I(Z_{s,t}^{dy},Z_{c,t}^{st}|Y)$ . + +Proof. For $I(\cdot; Z_c^{st}|Y)$ , according to the properties of conditional MI, it can be derived that + +$$ +I (\cdot ; Z _ {c, t - 1} ^ {s t} | Y) = H \left(Z _ {c, t - 1} ^ {s t} | Y\right) - H \left(Z _ {c, t - 1} ^ {s t} | \cdot , Y\right), \tag {13} +$$ + +$$ +I (\because; Z _ {c, t} ^ {s t} | Y) = H (Z _ {c, t} ^ {s t} | Y) - H (Z _ {c, t} ^ {s t} | \cdot , Y), +$$ + +thus we have + +$$ +\begin{array}{l} H \left(Z _ {c, t} ^ {s t} \mid Z _ {c, t - 1} ^ {s t}, Y\right) < H \left(Z _ {s, t} ^ {s t} \mid Z _ {c, t - 1} ^ {s t}, Y\right) \Longleftrightarrow I \left(Z _ {c, t} ^ {s t}; Z _ {c, t - 1} ^ {s t} \mid Y\right) > I \left(Z _ {s, t} ^ {s t}; Z _ {c, t - 1} ^ {s t} \mid Y\right), \tag {14} \\ H \left(Z _ {c, t} ^ {s t} \mid Z _ {c, t} ^ {d y}, Y\right) < H \left(Z _ {c, t} ^ {s t} \mid Z _ {s, t} ^ {d y}, Y\right) \iff I \left(Z _ {c, t} ^ {d y}, Z _ {c, t} ^ {s t} \mid Y\right) > I \left(Z _ {s, t} ^ {d y}; Z _ {c, t} ^ {s t} \mid Y\right). \\ \end{array} +$$ + +![](images/39f74ccd79dcaa6e5ece53c8a577ca1a2473dd7ee2ea352d5a1752a2a1b41dd7.jpg) + +These two propositions regarding the properties of causal factors demonstrate that, as long as the causal factors are sufficiently similar, the conditional MI can be maximized to distinguish the causal factors from the spurious factors. + +# B.2. Proof of Theorem 1 + +Theorem 1. Assume that the underlying data generation process at each time step is characterized by $\mathcal{S}\mathcal{M}_T$ . Then, by optimizing $\mathcal{L}_{\mathrm{evolve}}$ , the model can learn the data distribution $p(\pmb{x}_{1:T}, y_{1:T})$ on training domains. + +Proof. According to Eq. (1) and Eq. (11), minimizing $\mathcal{L}_{\mathrm{evolve}}$ is equivalent to maximizing + +$$ +\begin{array}{l} - \mathcal {L} _ {\mathrm {e v o l v e}} = \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\theta} q _ {\psi}} [ \log p (\boldsymbol {x} _ {t} | \boldsymbol {z} _ {t} ^ {s t}, \boldsymbol {z} _ {t} ^ {d y}) ] - \sum_ {t = 1} ^ {T} \mathbb {D} _ {K L} (q _ {\psi} (\boldsymbol {z} _ {t} ^ {s t} | \boldsymbol {x} _ {t}), p (\boldsymbol {z} _ {t} ^ {s t})) - \sum_ {t = 1} ^ {T} \mathbb {D} _ {K L} (q _ {\theta} (\boldsymbol {z} _ {t} ^ {d y} | \boldsymbol {z} _ {< t} ^ {d y}, \boldsymbol {x} _ {t}), p (\boldsymbol {z} _ {t} ^ {d y} | \boldsymbol {z} _ {< t} ^ {d y})) \\ + \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\theta} q _ {\psi} q _ {\zeta}} \left[ \log p \left(y _ {t} \mid \boldsymbol {z} _ {c, t} ^ {s t}, \boldsymbol {z} _ {c, t} ^ {d y}, \boldsymbol {z} _ {t} ^ {d}\right) \right] - \sum_ {t = 1} ^ {T} \mathbb {D} _ {K L} \left(q _ {\zeta} \left(\boldsymbol {z} _ {t} ^ {d} \mid \boldsymbol {z} _ {< t} ^ {d}, y _ {t}\right), p \left(\boldsymbol {z} _ {t} ^ {d} \mid \boldsymbol {z} _ {< t} ^ {d}\right)\right). \tag {15} \\ \end{array} +$$ + +The above equation can be further simplified to + +$$ +\begin{array}{l} - \mathcal {L} _ {\text {e v o l v e}} = \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\theta} q _ {\psi}} [ \log p (\boldsymbol {x} _ {t} | \boldsymbol {z} _ {t} ^ {s t}, \boldsymbol {z} _ {t} ^ {d y}) ] + \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\theta} q _ {\psi} q _ {\zeta}} [ \log p (y _ {t} | \boldsymbol {z} _ {c, t} ^ {s t}, \boldsymbol {z} _ {c, t} ^ {d y}, \boldsymbol {z} _ {t} ^ {d}) ] \\ - \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\psi}} \log \frac {q _ {\psi} \left(\boldsymbol {z} _ {t} ^ {s t} \mid \boldsymbol {x} _ {t}\right)}{p \left(\boldsymbol {z} _ {t} ^ {s t}\right)} - \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\theta}} \log \frac {q _ {\theta} \left(\boldsymbol {z} _ {t} ^ {d y} \mid \boldsymbol {z} _ {< t} ^ {d y} , \boldsymbol {x} _ {t}\right)}{p \left(\boldsymbol {z} _ {t} ^ {d y} \mid \boldsymbol {z} _ {< t} ^ {d y}\right)} - \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\zeta}} \log \frac {q _ {\zeta} \left(\boldsymbol {z} _ {t} ^ {d} \mid \boldsymbol {z} _ {< t} ^ {d} , y _ {t}\right)}{p \left(\boldsymbol {z} _ {t} ^ {d} \mid \boldsymbol {z} _ {< t} ^ {d}\right)} \tag {16} \\ = \sum_ {t = 1} ^ {T} \mathbb {E} _ {q _ {\psi} q _ {\theta} q _ {\zeta}} \log \frac {p (\boldsymbol {x} _ {t} | \boldsymbol {z} _ {t} ^ {s t} , \boldsymbol {z} _ {t} ^ {d y}) p (y _ {t} | \boldsymbol {z} _ {c , t} ^ {s t} , \boldsymbol {z} _ {c , t} ^ {d y} , \boldsymbol {z} _ {t} ^ {d}) p (\boldsymbol {z} ^ {s t}) p (\boldsymbol {z} _ {t} ^ {d y} | \boldsymbol {z} _ {< t} ^ {d y}) p (\boldsymbol {z} _ {t} ^ {d y} | \boldsymbol {z} _ {< t} ^ {d y})}{q _ {\psi} (\boldsymbol {z} ^ {s t} | \boldsymbol {x} _ {t}) q _ {\theta} (\boldsymbol {z} _ {t} ^ {d y} | \boldsymbol {z} _ {< t} ^ {d y} , \boldsymbol {x} _ {t}) q _ {\zeta} (\boldsymbol {z} _ {t} ^ {d} | \boldsymbol {z} _ {< t} ^ {d} , y _ {t})}. \\ \end{array} +$$ + +Based on the time-aware SCM $\mathcal{M}_T$ and the temporally evolving SCM $\mathcal{M}_{evo}$ , and let $q(\pmb{z}_t^{st},\pmb{z}_t^{dy},\pmb{z}_t^d|\pmb{x}_t,y_t) := q_\psi(\pmb{z}_t^{st}|\pmb{x}_t)q_\theta(\pmb{z}_t^{dy}|\pmb{z}_{ 0. \tag {31} +$$ + +The above inequality indicates that maximizing the conditional MI $I(\Phi_{c,t}^{st}; \Phi_{c,t-1}^{st}|Y)$ will allow $\Phi_c^{st}(\cdot)$ to capture static causal factors $Z_c^{st}$ . Hence, Lem. 1 is proved. + +We have known that $\Phi_c^{dy}(\cdot)$ can extract dynamic category-related information by optimizing the cross-entropy loss between $\Phi_c^{dy}(X)$ and target $Y$ . The following Lem. 2 shows that dynamic causal factors $Z_{c}^{dy}$ can be learned by introducing the intra-domain conditional MI constraints. + +# B.3.3. PROOF OF LEMMA 2 + +Lemma 2. For a time domain $\mathcal{D}_t$ , let $\Phi_c^{st,\star}(X_t)$ be the static causal representations learned by the model, then the dynamic causal factors of $X_{t}$ can be obtained through the following objective: + +$$ +\max _ {\Phi_ {c} ^ {d y}} I (Y; \Phi_ {c} ^ {d y} (X _ {t})), \quad s. t. \Phi_ {c} ^ {d y} \in \arg \max _ {\Phi_ {c} ^ {d y}} I \left(\Phi_ {c} ^ {d y} (X _ {t}); \Phi_ {c} ^ {s t, \star} (X _ {t}) | Y\right). \tag {32} +$$ + +Proof. For simplicity, we use $\Phi_{c,t}^{st}$ and $\Phi_{c,t}^{dy}$ to represent $\Phi_c^{st}(X_t)$ and $\Phi_c^{dy}(X_t)$ , respectively. Let $Z_{c}^{dy}$ and $Z_{s}^{dy}$ be the ground truth dynamic causal factors and dynamic spurious factors, respectively, while $Z_{lc}^{dy} \subset Z_{c}^{dy}$ and $Z_{ls}^{dy} \subset Z_{s}^{dy}$ represent the dynamic causal factors and dynamic spurious factors learned by the model. After that, we define $Z_{rc}^{dy} = Z_{c}^{dy} - Z_{lc}^{dy}$ and $Z_{rs}^{dy} = Z_{s}^{dy} - Z_{ls}^{dy}$ as the remaining dynamic causal factors and dynamic spurious factors. For $I(\Phi_{c,t}^{dy};\Phi_{c,t}^{st,\star}|Y)$ , suppose that the representations $\Phi_{c,t}^{dy}$ learned by the model contain both causal information and spurious information, i.e., $\Phi_{c,t}^{dy} = (Z_{lc,t}^{dy},Z_{ls,t}^{dy})$ , then we rewrite it as: + +$$ +I \left(\Phi_ {c, t} ^ {d y}, \Phi_ {c, t} ^ {s t, \star} \mid Y\right) = I \left(Z _ {l c, t} ^ {d y}, Z _ {l s, t} ^ {d y}; Z _ {c, t} ^ {s t} \mid Y\right) = H \left(Z _ {l c, t} ^ {d y}, Z _ {l s, t} ^ {d y} \mid Y\right) + H \left(Z _ {c, t} ^ {s t} \mid Y\right) - H \left(Z _ {l c, t} ^ {d y}, Z _ {l s, t} ^ {d y}, Z _ {c, t} ^ {s t} \mid Y\right). \tag {33} +$$ + +Analogously, $I(Z_{c,t}^{dy};\Phi_{c,t}^{st,\star}|Y)$ is expanded as: + +$$ +I \left(Z _ {c, t} ^ {d y}, \Phi_ {c, t} ^ {s t, \star} | Y\right) = H \left(Z _ {l c, t} ^ {d y}, Z _ {r c, t} ^ {d y} | Y\right) + H \left(Z _ {c, t} ^ {s t} | Y\right) - H \left(Z _ {l c, t} ^ {d y}, Z _ {r c, t} ^ {d y}, Z _ {c, t} ^ {s t} | Y\right). \tag {34} +$$ + +Hence, we have: + +$$ +\begin{array}{l} \Delta I (\Phi_ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y) = I (Z _ {c, t} ^ {d y}, \Phi_ {c, t} ^ {s t, \star} | Y) - I (\Phi_ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y) \\ = \underbrace {\left(H \left(Z _ {l c , t} ^ {d y} , Z _ {r c , t} ^ {d y} \mid Y\right) - H \left(Z _ {l c , t} ^ {d y} , Z _ {l s , t} ^ {d y} \mid Y\right)\right)} _ {\Delta H _ {1}} - \underbrace {\left(H \left(Z _ {l c , t} ^ {d y} , Z _ {r c , t} ^ {d y} , Z _ {c , t} ^ {s t} \mid Y\right) - H \left(Z _ {l c , t} ^ {d y} , Z _ {l s , t} ^ {d y} , Z _ {c , t} ^ {s t} \mid Y\right)\right)} _ {\Delta H _ {2}}. \tag {35} \\ \end{array} +$$ + +For $\Delta H_{1}$ , we have: + +$$ +\begin{array}{l} \Delta H _ {1} = H (Z _ {l c, t} ^ {d y}, Z _ {r c, t} ^ {d y} | Y) - H (Z _ {l c, t} ^ {d y}, Z _ {l s, t} ^ {d y} | Y) \\ = \left(H \left(Z _ {l c, t} ^ {d y} \mid Y\right) + H \left(Z _ {r c, t} ^ {d y} \mid Z _ {l c, t} ^ {d y}, Y\right)\right) - \left(H \left(Z _ {l c, t} ^ {d y} \mid Y\right) + H \left(Z _ {l s, t} ^ {d y} \mid Z _ {l c, t} ^ {d y}, Y\right)\right) \tag {36} \\ = H (Z _ {r c, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Y) - H (Z _ {l s, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Y), \\ \end{array} +$$ + +As for $\Delta H_2$ , it can be known that: + +$$ +\begin{array}{l} \Delta H _ {2} = H (Z _ {l c, t} ^ {d y}, Z _ {r c, t} ^ {d y}, Z _ {c, t} ^ {s t} | Y) - H (Z _ {l c, t} ^ {d y}, Z _ {l s, t} ^ {d y}, Z _ {c, t} ^ {s t} | Y) \\ = \left(H \left(Z _ {r c, t} ^ {d y} \mid Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y\right) + H \left(Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t} \mid Y\right)\right) - \left(H \left(Z _ {l s, t} ^ {d y} \mid Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y\right) + H \left(Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t} \mid Y\right)\right) \tag {37} \\ = H (Z _ {r c, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y) - H (Z _ {l s, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y). \\ \end{array} +$$ + +By substituting Eq. (36) and Eq. (37) into Eq. (35), we obtain: + +$$ +\begin{array}{l} \Delta I (\Phi_ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y) = \Delta H _ {1} - \Delta H _ {2} \\ = \Big (H (Z _ {r c, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Y) - H (Z _ {l s, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Y) \Big) - \Big (H (Z _ {r c, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y) - H (Z _ {l s, t} ^ {d y} | Z _ {l c, t} ^ {d y}, Z _ {c, t} ^ {s t}, Y) \Big) \\ = \underbrace {\left(H \left(Z _ {r c , t} ^ {d y} \mid Z _ {l c , t} ^ {d y} , Y\right) - H \left(Z _ {r c , t} ^ {d y} \mid Z _ {l c , t} ^ {d y} , Z _ {c , t} ^ {s t} , Y\right)\right)} _ {\text {t e r m 1}} - \underbrace {\left(H \left(Z _ {l s , t} ^ {d y} \mid Z _ {l c , t} ^ {d y} , Y\right) - H \left(Z _ {l s , t} ^ {d y} \mid Z _ {l c , t} ^ {d y} , Z _ {c , t} ^ {s t} , Y\right)\right)} _ {\text {t e r m 2}}. \tag {38} \\ \end{array} +$$ + +From Eq. (38), since causal factors typically exhibit higher similarity to each other than to spurious factors, for a new given $Z_{c,t}^{st}$ , the entropy decay with respect to $Z_{rc,t}^{dy}$ is generally greater than the entropy decay with respect to $Z_{ls,t}^{dy}$ . Therefore, it can be derived that + +$$ +I \left(Z _ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y\right) - I \left(\Phi_ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y\right) = \Delta I \left(\Phi_ {c, t} ^ {d y}; \Phi_ {c, t} ^ {s t, \star} | Y\right) > 0, \tag {39} +$$ + +Hence, dynamic causal factors $Z_{c,t}^{dy}$ is the maximizer of Eq. (32). This completes the proof. + +# B.3.4. PROOF OF THE MAIN RESULT + +Theorem 2. Let $\Phi_c^{st}(X_t),\Phi_c^{dy}(X_t)$ and $Z_{t}^{d}$ denote the representations and drift factors at the time domain $\mathcal{D}_t$ , obtained by training the network through the optimization of $\mathcal{L}_{SYNC}$ . Then the predictor constructed upon these components is the optimal causal predictor as defined in Def. 2. + +Proof. As $\mathcal{L}_{\mathrm{SYNC}} = \mathcal{L}_{\mathrm{evolve}} + \alpha_1\mathcal{L}_{\mathrm{MI}} + \alpha_2\mathcal{L}_{\mathrm{causal}}$ , according to Lem. 1 and Lem. 2, by minimizing losses $\mathcal{L}_{\mathrm{MI}}$ , $\mathcal{L}_{\mathrm{causal}}$ and the cross-entropy loss in $\mathcal{L}_{\mathrm{evolve}}$ , $\Phi_c^{st}(X_t)$ and $\Phi_c^{dy}(X_t)$ will gradually approach the ground truth static causal factors $Z_c^{st}$ and dynamic causal factors $Z_c^{dy}$ , which exclude any spurious factors. In addition, optimizing the loss $\mathcal{L}_{\mathrm{evolve}}$ make the drift factors $Z_t^d$ approach the drift of causal mechanisms. According to d-separation, We can conclude that the predictor built on top of these satisfies $Y \perp [Z_s^{st}, Z_s^{dy}] \mid [\Phi_c^{st}(X_t), \Phi_c^{dy}(X_t), Z_t^d]$ . Meanwhile, the mutual information between representations and the target can be maximized by minimizing the cross-entropy loss in $\mathcal{L}_{\mathrm{evolve}}$ . Therefore, it can be concluded that the resulting predictor satisfies the criteria for the optimal causal predictor as defined in Def. 2. This completes the proof. + +# C. Implementation Details + +# C.1. Mini-batch Weighted Sampling + +Mini-batch weighted sampling (MWS) strategy, proposed by (Chen et al., 2018b), introduces a biased negative entropy estimator based on the principle of importance sampling. Although biased, this estimator is straightforward to use for estimation and does not require any additional hyperparameters. Suppose that the distribution of the dataset samples is $p(n)$ , the dataset size is $N$ , and let $\mathcal{B}_M = \{n_1, \dots, n_M\}$ be a mini-batch of $M$ indices where each element is sampled i.i.d. from $p(n)$ . Let $p(\mathcal{B}_M)$ be the probability of any mini-batch $\mathcal{B}_M$ sampled from the dataset, then + +$$ +\begin{array}{l} \mathbb {E} _ {q (\boldsymbol {z})} [ \log q (\boldsymbol {z}) ] = \mathbb {E} _ {q (\boldsymbol {z}, n)} [ \log q (\boldsymbol {z} (n)) ] \\ = \mathbb {E} _ {q (z, n)} \left[ \log \mathbb {E} _ {n ^ {\prime} \sim p (n)} q (z (n) | n ^ {\prime}) \right] \\ = \mathbb {E} _ {q (\boldsymbol {z}, n)} [ \log \mathbb {E} _ {\mathcal {B} _ {M} \sim p (\mathcal {B} _ {M})} [ \frac {1}{M} \sum_ {j = 1} ^ {M} q (\boldsymbol {z} (n) | n _ {j}) ] ] \\ \geq \mathbb {E} _ {q (z, n)} [ \log \mathbb {E} _ {\mathcal {B} _ {M} \sim p (\mathcal {B} _ {M} | n)} [ \frac {p (\mathcal {B} _ {M})}{p (\mathcal {B} _ {M} | n)} \sum_ {j = 1} ^ {M} q (z (n) | n _ {j}) ] ] \tag {40} \\ = \mathbb {E} _ {q (\boldsymbol {z}, n)} [ \log \mathbb {E} _ {\mathcal {B} _ {M} \sim p (\mathcal {B} _ {M} | n)} [ \frac {1}{N M} \sum_ {j = 1} ^ {M} q (\boldsymbol {z} (n) | n _ {j}) ] ], \\ \end{array} +$$ + +therefore, $\mathbb{E}_{q(z)}\log q(z)$ can be estimated using the following estimator: + +$$ +\mathbb {E} _ {q (\boldsymbol {z})} \log q (\boldsymbol {z}) = \frac {1}{M} \sum_ {i = 1} ^ {M} [ \log \left[ \frac {1}{N M} \sum_ {j = 1} ^ {M} q \left(\boldsymbol {z} \left(n _ {i}\right) \mid n _ {j}\right) \right] ]. \tag {41} +$$ + +# C.2. Gumbel-Softmax Trick + +To sample a $k$ -hot vector from an $N$ -dimensional vector, we use the Gumbel-Softmax trick (Jang et al., 2017) and perform $k$ samplings without replacement. Specifically, let $\mathbf{s}$ be a score vector of dimension $N$ , for the $i$ -th ( $i \in [k]$ ) sampling, using the Gumbel-Softmax trick, the sampled vector $\boldsymbol{m}^i$ is obtained by + +$$ +\boldsymbol {m} _ {j} ^ {i} = \frac {\exp \left(\left(\log \boldsymbol {s} _ {j} ^ {i} + \xi_ {j} ^ {i}\right) / \tau\right)}{\sum_ {j ^ {\prime} = 1} ^ {N} \exp \left(\left(\log \boldsymbol {s} _ {j ^ {\prime}} ^ {i} + \xi_ {j ^ {\prime}} ^ {i}\right) / \tau\right)}, \quad \xi_ {j} ^ {i} = - \log \left(- \log u _ {j} ^ {i}\right), u _ {j} ^ {i} \sim \operatorname {U n i f o r m} (0, 1), \tag {42} +$$ + +where $\tau$ is the temperature hyperparameter. Following a common setting (Chen et al., 2018a), we set $\tau = 0.5$ . After each sampling, we find the position of the largest element $p = \operatorname{argmax}_{j \in [N]} \boldsymbol{m}_j^i$ and set $\boldsymbol{s}[p]$ to a very small value to acquire scores $\boldsymbol{s}^{i+1}$ , then continue with the next sampling. This process continues for $k$ samplings, and the sampled $k$ -hot vector $\boldsymbol{m} = \text{Gumbel-Softmax}(\boldsymbol{s}, k)$ is obtained by $\boldsymbol{m}_j = \max_{l \in [k]} \boldsymbol{m}_j^l$ . + +# C.3. Network Structure + +For the static variational encoding network $q_{\psi}$ , we utilize a feature extractor to implement. The dynamic variational encoding network $q_{\theta}$ can be implemented using a feature extractor with the same architecture as $q_{\psi}$ but without sharing network parameters, followed by an LSTM network. The prior $p(\pmb{z}_t^{dy}|\pmb{z}_{