# Best-Arm Identification in Unimodal Bandits

Riccardo Poiani, Marc Jourdan, Emilie Kaufmann, Rémy Degenne

► To cite this version:

Riccardo Poiani, Marc Jourdan, Emilie Kaufmann, Rémy Degenne. Best-Arm Identification in Unimodal Bandits. AISTATS 2025 - 28th International Conference on Artificial Intelligence and Statistics, May 2025, Phuket, Thailand. hal-05125233

HAL Id: hal-05125233

https://hal.science/hal-05125233v1

Submitted on 23 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Best-Arm Identification in Unimodal Bandits

Riccardo Poiani*<fnref n="1" />

Marc Jourdan*²

Emilie Kaufmann³

Rémy Degenne³

¹Bocconi University, Milan, Italy

²EPFL, Lausanne, Switzerland

³Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189-CRISTAL

Abstract

We study the fixed-confidence best-arm identification problem in unimodal bandits, in which the means of the arms increase with the index of the arm up to their maximum, then decrease. We derive two lower bounds on the stopping time of any algorithm. The instance-dependent lower bound suggests that due to the unimodal structure, only three arms contribute to the leading confidence-dependent cost. However, a worst-case lower bound shows that a linear dependence on the number of arms is unavoidable in the confidence-independent cost. We propose modifications of Track-and-Stop and a Top Two algorithm that leverage the unimodal structure. Both versions of Track-and-Stop are asymptotically optimal for one-parameter exponential families. The Top Two algorithm is asymptotically near-optimal for Gaussian distributions and we prove a non-asymptotic guarantee matching the worse-case lower bound. The algorithms can be implemented efficiently and we demonstrate their competitive empirical performance.

# 1 INTRODUCTION

In a bandit pure exploration problem, an agent interacts with a set of K probability distributions denoted by $\nu = (\nu_i)_{i \in [K]} \in D^K$, called arms, whose means $\mu = (\mu_i)_{i \in [K]}$ belong to some subset $S \subseteq \mathbb{R}^K$ materializing the possible structure between arms. In each time step $t \ge 1$, one arm $I_t \in [K]$ is selected, and the agent observes a realization $X_t \sim \nu_{I_t}$. Based on as few

observations as possible, her goal is to confidently answer some questions about the unknown mean vector $\mu$, while leveraging the underlying structure.

The most studied pure exploration task is Best-Arm Identification (BAI), in which the agent seeks to identify the arm having the highest mean when $S = \Theta^K$ is the (unstructured) set of all possible means vectors. In this paper, we consider best-arm identification when the set $S$ of means is constrained to have a unimodal structure, namely the means are known to increase up to their unique maximum and then decrease with the index. Let $i^*(\mu) = \underset{i \in [K]}{\operatorname{argmax}} \mu_i$ be the unique maximum, which we denote by $i^*$ or $\star$ when $\mu$ is clear from the context. The set of unimodal instances is

$$S := \{\lambda \in \mathbb{R}^K \mid |i^*(\lambda)| = 1, \forall j < i^*(\lambda), \lambda_j \le \lambda_{j+1}, \\ \forall j \ge i^*(\lambda), \lambda_j \ge \lambda_{j+1}\}. \quad (1)$$

We study the fixed-confidence formulation of the problem (Even-Dar et al., 2006; Jamieson and Nowak, 2014; Garivier and Kaufmann, 2016), in which the agent aims at minimizing the number of samples used to identify $i^*(\mu)$ with confidence $1 - \delta \in (0, 1)$. The agent's strategy is given by three rules: the sampling rule $(I_t)_t$, where each $I_t$ is $F_{t-1}$-measurable,<fnref n="1" /> a stopping rule $\tau_\delta$, which is a stopping time w.r.t. $F_t$ and a recommendation rule $\hat{i}_\tau$, which is $F_\tau$-measurable. The algorithm's sample complexity corresponds to its stopping time $\tau_\delta$, which counts the number of rounds before termination. An algorithm is said to be $\delta$-correct on the problem class $D^K$ having means $S$ if its probability of stopping and not recommending a correct answer is upper bounded by $\delta$, i.e. $P_\nu(\tau_\delta < +\infty, \hat{i}_{\tau_\delta} \neq i^*(\mu)) \le \delta$ for all instances $\nu \in D^K$ having mean $\mu \in S$. The agent should design a $\delta$-correct algorithm minimizing the expected sample complexity $E_\nu[\tau_\delta]$.

Unimodal bandits have been studied extensively in the regret minimization literature (Yu and Mannor, 2011; Combes and Proutière, 2014; Paladino et al., 2017; Trinh et al., 2020; Saber et al., 2021), in which observations are rewards that the agent seeks to maximize

<footnote>Proceedings of the 28th International Conference on Artificial Intelligence and Statistics (AISTATS) 2025, Mai Khao, Thailand. PMLR: Volume 258. Copyright 2025 by the author(s). *Equal contribution.</footnote>

<footnote n="1">¹We denote by $F_t = \sigma(I_1, X_1, \dots, I_t, X_t)$ the $\sigma$-algebra generated by the observations collected up to time $t$.</footnote>
mize. It has also been tackled in the fixed-budget best-arm identification setting (Cheshire et al., 2020; Ghosh et al.), where the agent should minimize the probability of misidentifying $i^*(\mu)$ with a fixed number of samples (Karnin et al., 2013; Audibert and Bubeck, 2010). These studies were motivated by potential applications to sequential pricing (Yu and Mannor, 2011) or bidding in sponsored search auctions (Edelman and Ostrovsky, 2005). Their extension to graphical unimodal bandits (Combes and Proutière, 2014) can be relevant for recommender systems (Paladino et al., 2017; Trinh et al., 2020). In this paper, we propose the first analysis of unimodal BAI in the fixed-confidence setting. We study unimodal bandits as a theoretical curiosity, in which the structure induces a sparsity pattern in the optimal allocation. This sparsity induced by the structure is a central component of our algorithms.

**Related Work** In fixed-confidence BAI, the semi- final work of Garivier and Kaufmann (2016) introduced the Track-and-Stop (TaS) algorithm for unstructured bandits. It achieves asymptotically optimal expected sample complexity rates by computing the optimal allocation of the empirical estimator of the means at each round. Since then, several studies have proposed adaptation of TaS in different structured pure exploration problems, e.g., linear bandits (Jedra and Proutiere, 2020), multiple answers problems (Degenne and Koolen, 2019), and many others (Moulos, 2019; Agrawal et al., 2020; Russac et al., 2021). We will show how to account for the unimodal structure in TaS while providing a computationally efficient implementation. Within the class of structured bandits, it is worth mentioning that sparsity patterns in the instance-dependent lower bound have arisen in the minimum threshold problem (Kaufmann et al., 2018), good arm identification (Jourdan and Réda, 2023) and in multi-fidelity bandits (Poiani et al., 2024).

Other approaches lead to asymptotically optimal algorithms in general structured pure exploration problems: the online optimization-based approach (Ménard, 2019; Degenne et al., 2019; Wang et al., 2021) and the Top Two approach (Russo, 2016; Jourdan et al., 2022; You et al., 2023). The online optimization-based approach could be applied to solve unimodal bandits. However, it does not explicitly exploit the sparsity pattern, hence incur sub-optimal performance in the moderate regime of $\delta$. In addition to being computationally less demanding for large values of $K$, Top Two algorithms can be modified to include the sparsity pattern of unimodal BAI.

**Contributions (1)** We show that the unimodal structure induces sparsity in the optimal allocation (achieving the characteristic time $T^*(\mu)$) in which only

the best arm and its neighbors are contributing asymptotically (Theorem 2.2). However, in the moderate-confidence regime, we prove a worst-case lower bound whose linear dependence on $K$ suggests that sparsity is only possible asymptotically (Theorem 2.3). (2) We carefully exploit the unimodal structure in the recommendation and stopping rules, which ensure $\delta$-correctness (Lemma 3.1). As sampling rules, we propose adaptations of the Track-and-Stop sampling rules using forced exploration or optimism and a Top Two sampling rule using optimism. We detail an efficient implementation of those three algorithms and show that they achieve competitive empirical performance. (3) The two Track-and-Stop algorithms are asymptotically optimal for one-parameter exponential families (Theorems 3.2 and 3.6). The optimistic Top Two algorithm enjoys a non-asymptotic guarantee matching the worse-case lower bound and recovering near asymptotic optimality (Theorem 3.7).

**Setting and Notation** The arms distributions belong to a given one-parameter exponential family $\mathcal{D} \subseteq \mathcal{P}(\mathbb{R})$ (e.g. Bernoulli or Gaussian with known variance) with means in an interval $\Theta$ (Cappé et al., 2013). The instance $\nu$ is fully characterized by its mean vector $\mu \in \mathcal{S}$. For any arm $i \in [K]$, we denote by $\mathcal{N}(i)$ its set of neighboring arms, i.e. $\mathcal{N}(i)$ is defined as $\{2\}$ if $i=1$, $\{K-1\}$ if $i=K$, and $\{i-1, i+1\}$ otherwise. For two means $(\mu, \theta) \in \Theta^2$, we denote by $d(\mu, \theta)$ the KL divergence between their associated distribution in $\mathcal{D}$. The $(K-1)$-dimensional simplex is denoted by $\Delta_K = \{\omega \in \mathbb{R}_+^K | \sum_{i \in [K]} \omega_i = 1\}$.

# 2 LOWER BOUNDS

We present lower bounds on the expected sample complexity of any $\delta$-correct algorithm for Unimodal BAI: an instance-dependent one scaling as $T^*(\mu) \log(1/\delta)$ (Theorem 2.2) and a worst-case one scaling as $K/\Delta^2$ where $\Delta$ is the minimum gap (Theorem 2.3).

## 2.1 Dependence in the Bandit Model $\mu$ and the Risk Parameter $\delta$

We recall a standard instance-dependent lower bound on the expected stopping time $\mathbb{E}_{\nu}[\tau_{\delta}]$ of any $\delta$-correct BAI algorithm (Garivier and Kaufmann, 2016).

**Theorem 2.1.** For any $\delta$-correct algorithm and any unimodal instance $\nu \in \mathcal{D}^K$ with mean $\mu \in \mathcal{S}$, we have $\mathbb{E}_{\nu}[\tau_{\delta}] \ge T^*(\mu) \log \frac{1}{2.4\delta}$ with

$$T^*(\mu)^{-1} := \sup_{\omega \in \Delta_K} \min_{i \neq i^*} f_i(\omega, \mu) \quad \text{and} \quad (2)$$

$$f_i(\omega, \mu) := \inf_{\theta \in \text{Alt}(\mu): \ i^*(\theta)=i} \sum_{j \in [K]} \omega_j d(\mu_j, \theta_j),$$
where $Alt(\mu) = \{\theta \in S : i^*(\theta) \neq i^*(\mu)\}$ and $\omega^*(\mu)$ denote the maximizer of $T^*(\mu)^{-1}$.

**Theorem 2.1** introduces the value of two-player zero sum game $T^*(\mu)^{-1}$ (Degenne and Koolen, 2019). The max-player first chooses a strategy over the arm space $\omega \in \Delta_K$ and the min-player best-responds to $\omega$ by picking an alternative unimodal bandit $\theta$, whose best arm is not $i^*(\mu)$, with the goal of minimizing $\theta \mapsto \sum_{i \in [K]} \omega_i d(\mu_i, \theta_i)$. The allocation $\omega^*(\mu)$ is the expected proportion of pulls that an asymptotically optimal algorithm plays to identify $\star$ the fastest.

**Theorem 2.2.** Let $\mu \in S$. Then, we have

$$T^*(\mu)^{-1} = \sup_{\omega \in \bar{\Delta}_K(\mu)} \min_{i \in \mathcal{N}(\star)} g_i(\omega, \mu), \quad (3)$$

where $g_i(\omega, \mu) := \inf_{x \in (\mu_i, \mu_*)} \omega_* d(\mu_*, x) + \omega_i d(\mu_i, x)$ and $\bar{\Delta}_K(\mu) = \{\omega \in \Delta_K | \forall i \notin \mathcal{N}(\star) \cup \{\star\}, \omega_i = 0\}$.

**Theorem 2.2** introduces a rewriting of $T^*(\mu)^{-1}$ that reveals a sparsity pattern of the oracle weights $\omega^*$ by reducing the supremum over $\Delta_K$ in (2) to a supremum over the restricted simplex $\tilde{\Delta}_K(\mu)$ in (3). Therefore, the optimal weights $\omega^*(\mu)$ are only spread among the best arm $\star$ and its neighboring arms $\mathcal{N}(\star)$.

Given the expression of $g_i(\omega, \mu)$, Theorem 2.2 also establishes a reduction of Unimodal BAI to unstructured BAI on the three-arms set $\{\star\} \cup \mathcal{N}(\star)$. Therefore, we inherit a fast and $K$-independent algorithm to compute the oracle weights $\omega^*(\mu)$ for any unimodal bandit $\mu \in S$. The reduction from Unimodal BAI to unstructured BAI holds since, for the optimal allocation only, we have $f_i(\omega^*(\mu), \mu) = g_i(\omega^*(\mu), \mu)$. This equality does not hold for arbitrary weights $\omega$. Therefore, any algorithm computing $\min_{a \neq \star} f_i(\omega, \mu)$ for arbitrary $\omega$ (e.g. gradient-based (Ménard, 2019) or game-based (Degenne et al., 2019) approaches) is computationally demanding since it requires to solve $K$-dimensional convex problems $f_i(\omega, \mu)$ for each $i \neq \star$.

## 2.2 Dependence in the Number of Arms

The above lower bound depends on the risk parameter $\delta$ and the instance $\mu$ through $T^*(\mu)^{-1}$. Therefore, it is independent of $K$ due to the reduction to three-arm unstructured BAI (Theorem 2.2). For Gaussian distributions with unit variance, it yields that $T^*(\mu) \approx \sum_{i \in \mathcal{N}(\star)} (\mu_* - \mu_i)^{-2}$. To capture the dependency in $K$ for Unimodal BAI, we derive a second lower bound showing that a linear dependence in $K$ is actually unavoidable for moderate regime of $\delta$. The proof technique is borrowed from Simchowitz et al. (2017); Al Marjani et al. (2022), see Appendix C.

**Theorem 2.3.** Let $\Delta > 0$ and, for $i \in [K]$, let $\nu^{(i)} := \mathcal{N}(\mu^{(i)}, I_K)$ where $\mu_i^{(i)} = \Delta$ and $\mu_j^{(i)} = 0$ if $j \neq i$.

Then, for any $\delta \le 1/4$ and any $\delta$-correct strategy,

$$\frac{1}{K} \sum_{i \in [K]} \mathbb{E}_{\nu^{(i)}}[\tau_{\delta}] \ge \frac{K}{64\Delta^2}.$$

There exists an instance $\nu^{(i)}$ s.t. $\mathbb{E}_{\nu^{(i)}}[\tau_{\delta}] \ge \frac{K}{64\Delta^2}$.

Unlike Theorem 2.1, Theorem 2.3 is not valid for any instance. Among $K$ specific unimodal instances, any algorithm should use an average number of samples exceeding $K/(64\Delta^2)$ on at least one of them. On those $K$ “hard” instances, no arm reveals information about the optimal arm except the optimal arm itself, namely the instance is flat with a spike on the best arm. Therefore, an algorithm has to sample all arms before finding the best one. In this initial exploration phase, an arm $i$ will be sampled less than the others, hence the algorithm will be slower on $\nu^{(i)}$.

## 3 ALGORITHMS

After specifying our recommendation and stopping rules (Section 3.1), we propose three sampling rules to solve unimodal BAI. We introduce U-TaS, which is an asymptotically optimal variant of TaS (Section 3.2). To alleviate the (wasteful) forced exploration of U-TaS, we provide an efficient implementation of the asymptotically optimal Optimistic TaS (O-TaS) algorithm, and show that O-TaS exploits the sparsity pattern (Section 3.3). Since the non-asymptotic guaranty of O-TaS do not match Theorem 2.3, we introduce an optimistic Top Two algorithm (Section 3.4) having near matching guarantees compared to Theorems 2.1 and 2.3, as well as the lowest computational cost.

**Notation** Let $N_i(t) := \sum_{s \in [t-1]} 1(I_s = i)$ and $\hat{\mu}_i(t) := N_i(t)^{-1} \sum_{s \in [t-1]} 1(I_s = i) X_s$ denote the empirical count and mean of arm $i$ before time $t$. For any arm $i \in [K]$ and any of its neighbor $j \in \mathcal{N}(i)$, let

$$W_t(i, j) := \inf_{\theta_j \ge \theta_i} \sum_{k \in \{i, j\}} N_k(t) d(\hat{\mu}_k(t), \theta_k), \quad (4)$$

denote their empirical transportation cost. For Gaussian distributions with unit variance, we have

$$2W_t(i, j) = 1 (\hat{\mu}_i(t) > \hat{\mu}_j(t)) \frac{(\hat{\mu}_i(t) - \hat{\mu}_j(t))^2}{1/N_i(t) + 1/N_j(t)}. \quad (5)$$

### 3.1 Recommendation and Stopping Rules

As done extensively in the literature, we consider the generalized likelihood ratio (GLR) stopping rule (Garivier and Kaufmann, 2016). The GLR between two sets of bandit instances $A$ and $B$ is

$$\text{GLR}_t(A, B) = \log \frac{\sup_{\lambda \in A} \mathcal{L}_{\lambda}(X_1, \dots, X_t)}{\sup_{\theta \in B} \mathcal{L}_{\theta}(X_1, \dots, X_t)},$$
where $\mathcal{L}_{\lambda}$ is the likelihood function of the distribution associated to $\lambda$. If there exists $i \in [K]$ for which $\text{GLR}_{t,i} := \text{GLR}_t(\{\lambda \in \mathcal{S} | i^*(\lambda) = i\}, \{\lambda \in \mathcal{S} | i^*(\lambda) \neq i\})$ is large, then we have enough information to return answer $i$. Thus, we stop when $\max_i \text{GLR}_{t,i}$ is large.

**Full-sum Stopping Rule** The structure of $\mathcal{S}$ can make the GLR difficult to compute. Previous work (e.g., Degenne et al., 2019) often used an unstructured maximum likelihood, in which $\{\lambda \in \mathbb{R}^K | i^*(\lambda) = i\}$ is used as first set. In this case, we stop when

$$ \inf_{\theta \in \text{Alt}(\hat{\mu}(t))} \sum_{i \in [K]} N_i(t)d(\hat{\mu}_i(t), \theta_i) \geq c_K(t-1, \delta), \quad (6) $$

where $c_K(t, \delta) \approx \log \frac{1}{\delta} + K \log t$. Due to the linearity in $K$, the l.h.s. of (6) can be very large even if the lower bounds tells us that only 3 arms matter. The full-sum stopping rule denotes when we stop with (6).

In BAI, the heuristic threshold $\tilde{c}(t, \delta) := \log((1 + \log t)/\delta)$ provides empirically $\delta$-correct algorithms. However, for unimodal bandits the full-sum stopping rule (6) with $\tilde{c}$ violates the empirical $\delta$-correctness criterion since it stops very early and returns wrong answers. To better understand that failure, let's consider the unimodal flat instance where all arms have zero mean except for one having mean $\Delta > 0$. Suppose that $\Delta \ll \sigma$ where $\sigma$ is the standard deviation of the observations. After initialization, all empirical means are randomly spread around $0 \pm \sigma$. Hence, we have $\sum_{i \in [K]} N_i(K+1)d(\hat{\mu}_i(K+1), \hat{\theta}_i(K+1)) \approx K D_{\sigma}$ for some distribution-dependent constant $D_{\sigma}$ where $\hat{\theta}(t)$ minimizes (6). Therefore, removing the linear dependence in $K$ in $c_K(t, \delta)$ yields early stopping and errors.

**Local GLR Stopping Rule** By leveraging the unimodal structure, we derive an improved stopping rule. Intuitively, $W_t(i, j)$ represents the amount of collected evidence in favor of the hypothesis that arm $i$ has a larger mean than arm $j$ and $\min_{j \in \mathcal{N}(i)} W_t(i, j)$ is the amount of collected evidence in favor of the hypothesis that arm $i$ is the best arm locally. Given that the true instance is unimodal, being statistically confident of local optimality is a sufficient condition to be statistically confident of global optimality. Since multiple arms can be locally optimal at stage $t$, we recommend the arm $i$ having the largest evidence of local optimality, i.e. the candidate answer

$$ \hat{t}_t \in \underset{i \in [K]}{\operatorname{argmax}} \min_{j \in \mathcal{N}(i)} W_t(i, j). \quad (7) $$

Given a threshold $c(t, \delta)$, we use the local GLR stopping rule associated with our candidate answer, i.e.

$$ \tau_{\delta} = \inf \left\{ t \mid \min_{j \in \mathcal{N}(\hat{t}_t)} W_t(\hat{t}_t, j) \geq c(t-1, \delta) \right\}. \quad (8) $$

Lemma 3.1 gives a choice of threshold ensuring $\delta$-correctness regardless of the sampling rule (see Appendix D.3). For other classes of one-parameter exponential families, we refer the reader to Kaufmann and Koolen (2021) for threshold ensuring $\delta$-correctness.

**Lemma 3.1.** Let $\delta \in (0, 1)$. Given any sampling rule, using the threshold

$$ c(t, \delta) = 2C_G \left( \frac{1}{2} \log \left( \frac{K-1}{\delta} \right) \right) + 4 \log \log \frac{e^4 t}{2} \quad (9) $$

with the stopping rule (8) yields a $\delta$-correct for Gaussian distributions with known variance and mean in $\mathcal{S}$. $C_G$ satisfies that $C_G(x) \approx x + \ln(x)$.

This stopping rule does not suffer from the same limitation with the dependence in $K$ as the full-sum rule since $\min_{j \in \mathcal{N}(\hat{t}_t)} W_t(\hat{t}_t, j)$ depends on only 3 arms. It is also more computationally efficient, as computing $W_t(i, j)$ is much easier that solving the optimization problem for the infimum of the full sum.

## 3.2 Track-and-stop

Track-and-stop (Garivier and Kaufmann, 2016) (TaS) is one of the most famous meta-algorithm to design asymptotically optimal algorithms. To leverage the unimodal structure, we propose a computationally efficient variant of TaS, and refer to it as U-TaS.

After sampling each arm once, U-TaS solves the optimization problem defining the characteristic time of an empirical unimodal instance $\tilde{\mu}(t)$ obtained by transforming $\hat{\mu}(t)$. Let $t > K$ and $i^*(t) := i^*(\hat{\mu}(t))$. U-TaS computes $\omega^*(\tilde{\mu}(t))$ where

$$ \tilde{\mu}_i(t) := \begin{cases} \tilde{\mu}_{i-1}(t) & \text{if } i > i^*(t) \text{ and } \hat{\mu}_i(t) > \tilde{\mu}_{i-1}(t), \\ \tilde{\mu}_{i+1}(t) & \text{if } i < i^*(t) \text{ and } \hat{\mu}_i(t) > \tilde{\mu}_{i+1}(t), \\ \hat{\mu}_i(t) & \text{otherwise.} \end{cases} \quad (10) $$

While TaS solves $\omega^*(\hat{\mu}(t))$, $\omega^*(\lambda)$ can only be computed efficiently when $\lambda \in \mathcal{S}$ (see below). Then, U-TaS computes the $l_{\infty}$ projection $\omega(t)$ of $\omega^*(\tilde{\mu}(t))$ onto $\Delta_K^{(4(t+K^2))^{-1/2}}$ where $\Delta_K^\epsilon = \Delta_K \cap [\epsilon, 1]^K$. Given this allocation $\omega(t)$, U-TaS selects the next arm to be pulled by tracking the cumulative sum of weights, i.e.

$$ I_t \in \underset{i \in [K]}{\operatorname{argmax}} \sum_{s \in [t]} \omega_i(s) - N_i(t). \quad (11) $$

This guarantees that $\mathcal{N}(t) \approx \sum_{s \in [t-1]} \omega(s)$.

**Asymptotic Optimality** Theorem 3.2 shows that U-TaS is asymptotically optimal (see Appendix E).

**Theorem 3.2.** Using the GLR stopping rule as in (8), U-TaS is $\delta$-correct and $\limsup_{\delta \to 0} \mathbb{E}_{\nu}[\tau_{\delta}]/\log(1/\delta) \le$
$T^*(\mu)$ for all distributions $\nu$ within a class $\mathcal{D}$ of one-parameter exponential family having mean $\mu \in \mathcal{S}$.

Unfortunately, Theorem 3.2 does not provide any insight on the non-asymptotic performance of U-TaS. Figure 1 reveals that forced exploration is wasteful when arms are highly sub-optimal for large $K$ is large.

**Efficient Implementation** TaS is one of the most computationally expensive among pure exploration algorithms due to the per-round computation of $\omega^*(\hat{\mu}(t))$. In structured bandits, there is no general oracle that returns the optimal allocation efficiently, e.g. using $\omega^*(\hat{\mu}(t))$ as in Theorem 2.1 would be inefficient. Due to the equivalence with an unstructured bandit on three arms when $\mu \in \mathcal{S}$, there exists an efficient oracle to compute $\omega^*(\mu)$ as in Theorem 2.2 (Garivier and Kaufmann, 2016). Since the estimator of the mean might not be unimodal, i.e. $\hat{\mu}(t) \notin \mathcal{S}$, we modify it into a unimodal instance $\tilde{\mu}(t) \in \mathcal{S}$ for which we can compute $\omega^*(\tilde{\mu}(t))$ with a cost that is independent of $K$. We consider (10) due to its $\mathcal{O}(K)$ cost, but other choices could have been made. The computational bottleneck in $\mathcal{O}(\text{poly}(K))$ is the projection $\omega^*(\tilde{\mu}(t))$ onto $\Delta_K^\epsilon$ (convex problem with $K$ variables).

## 3.3 Optimistic Track-and-Stop

Optimistic Track-and-Stop (Degenne et al., 2019) (O-TaS) is a variant of TaS using optimism to foster exploration. We provide an efficient implementation of O-TaS for Unimodal BAI, and show it fosters sparsity.

**Structured Confidence Region** Let $\Theta_t$ be a confidence region around the empirical model $\hat{\mu}(t)$, namely

$$ \Theta_t := \{ \boldsymbol{\theta} \mid \forall i \in [K], N_i(t)d(\hat{\mu}_i(t), \theta_i) \le f(t) \}, \quad (12) $$

where $f$ is distribution-dependent (e.g. a logarithm). We have $\Theta_t = \bigotimes_{i \in [K]} [\alpha_i(t), \beta_i(t)]$ where $[\alpha_i(t), \beta_i(t)]$ by independence of the arms. Let $\gamma_1, \gamma_2 > 1$ and $f_u(t) := 2\gamma_1(1 + \gamma_2) \log t$. For $\nu = \mathcal{N}(\mu, I_K)$, let

$$ \mathcal{E}_t := \bigcap_{s \in [t^{1/\gamma_1}, t]} \bigcap_{i \in [K]} \{ \mu_i \in [\hat{\mu}_i(s) \pm \sqrt{f_u(s)/N_i(s)}] \}. $$

It satisfies that $\mathbb{P}(\mathcal{E}_t^c) \le K/t^{\gamma_2}$ for all $t \in \mathbb{N}$. The structured confidence region is defined as $\tilde{\Theta}_t := \Theta_t \cap \mathcal{S}$.

**Optimistic Unimodal Instance** After sampling each arm once, O-TaS compute an optimistic unimodal bandit $\mu^+(t)$, and its corresponding oracle weights $\omega(t)$, as the model within $\tilde{\Theta}_t$ that maximizes the func-

tion $\lambda \mapsto T^*(\lambda)^{-1}$, i.e.

$$ \mu^+(t) \in \underset{\lambda \in \tilde{\Theta}_t}{\operatorname{argmax}} \sup_{\omega \in \tilde{\Delta}_K(\lambda)} \min_{i \in \mathcal{N}(i^*(\lambda))} g_i(\omega, \lambda), $$

$$ \omega(t) \in \underset{\omega \in \tilde{\Delta}_K(\mu^+(t))}{\operatorname{argmax}} \min_{i \in \mathcal{N}(i^+(t))} g_i(\omega, \mu^+(t)), $$

where $i^+(t) := i^*(\mu^+(t))$. Given the proportions $\omega(t)$, O-TaS selects the arm $I_t$ with C-tracking as in (11).

**Theoretical Guarantees** We study the theoretical guarantees of O-TaS under the following assumptions.

**Assumption 3.3.** [Bounded parameters] There exists $M$ such that for all $\mu, \mu' \in \Theta$, $\|\nu_\mu - \nu_{\mu'}\|_\infty \le M$, where $\nu_\mu$ is the natural parameter vector corresponding to the mean vector $\mu$.

**Assumption 3.4.** [Sub-Gaussianity] There exists $\sigma^2$ such that, for all $k \in [K]$ and, all $\mu, \mu' \in \Theta$, $d(\mu_k, \mu'_k) \ge \frac{(\mu'_k - \mu_k)^2}{2\sigma^2}$.

**Assumption 3.5.** [KL Concentration] There exists a known, non decreasing function $f: \mathbb{N} \to \mathbb{R}_+$ such that, for some constant $\gamma > 0$, it holds that:

$$ \mathbb{P}(\exists k \in [K], t \le n, N_k(t)d(\hat{\mu}_k(t), \mu_k) > f(n)) \le \gamma \frac{\log n}{n^3}. $$

These assumptions are satisfied for a general class of problems. We refer the reader to Degenne et al. (2019) for a discussion on these assumptions. We now state our main result on the performance of O-TaS. Theorem 3.2 is a corollary of a non-asymptotic upper bound (Theorem F.14) showing that O-TaS is asymptotically optimal. Unfortunately, the non-asymptotic bound for O-TaS does not match the $K$-dependency from Theorem 2.3.

**Theorem 3.6.** Suppose that our distributions satisfy Assumptions 3.3, 3.4 and 3.5. Using the GLR stopping rule as in (8), O-TaS is $\delta$-correct and $\lim \sup_{\delta \to 0} \mathbb{E}_{\nu}[\tau_\delta]/\log(1/\delta) \le T^*(\mu)$ for all $\mu \in \mathcal{S}$.

As local information is sufficient for global optimality, O-TaS exploits the sparsity pattern by limiting the samples from $[K] \setminus (\mathcal{N}(i^*) \cup \{i^*\})$. By using the structured $\tilde{\Theta}_t$, we exhibit a random time after which O-TaS only pulls arms in $\mathcal{N}(i^*) \cup \{i^*\}$ (Theorem F.12). In Figure 1, we see that O-TaS improves on U-TaS which lacks this property due to forced exploration.

**Efficient Implementation** In most pure exploration problems, Optimistic TaS is computationally intractable. For Unimodal BAI, O-TaS has an efficient implementation since computing $\mu^+(t)$ requires $\mathcal{O}(K)$ operations. By iterating over the candidate optimistic answer $i \in [K]$, we notice that the associated
optimal optimistic instance $\boldsymbol{\mu}^{(i)}(t)$ is obtained as

$$ \mu_j^{(i)}(t) = \begin{cases} \beta_i(t) & \text{if } j = i, \\ \max\{\mu_{j-1}^{(i)}, \alpha_j(t)\} & \text{if } j < i, \\ \max\{\mu_{j+1}^{(i)}, \alpha_j(t)\} & \text{if } j > i. \end{cases} \quad (13) $$

By using dynamic programming, we can compute $\boldsymbol{\mu}^{(i)}(t)$ from $\boldsymbol{\mu}^{(i-1)}(t)$ and check $\boldsymbol{\mu}^{(i)}(t) \in S$ in constant time. Therefore, the above procedure computes $\boldsymbol{\mu}^{+}(t) = \underset{S \cap \{\boldsymbol{\mu}^{(i)}(t)\}_{i \in [K]}}{\operatorname{argmax}} T^{*}(\boldsymbol{\mu}^{(i)}(t))^{-1}$ with a computational cost of $\mathcal{O}(K)$. It uses at most K calls to $T^{*}(\cdot)^{-1}$. We refer the reader to Appendix F.5 for a proof and more details on the implementation.

## 3.4 Top Two Algorithm

Top Two algorithms have been studied for BAI (Russo, 2016; Qin et al., 2017; Shang et al., 2020; Jourdan et al., 2022). However, few Top Two algorithms have been analyzed in structured settings. By adapting TTUCB (Jourdan and Degenne, 2023), we propose the UniTT (Unimodal Top Two) algorithm for Unimodal BAI, which is computationally cheaper than U-TaS and O-TaS. We show that UniTT has near matching guarantees compared to Theorems 2.1 and 2.3.

After pulling each arm once, a Top Two sampling rule for Unimodal BAI defines two candidate answers, a leader $B_t \in [K]$ and a challenger $C_t \in \mathcal{N}(B_t)$. It samples the next arm $I_t \in \{B_t, C_t\}$ to verify that the leader is better than the challenger. This choice is specified by (i) a target proportion $\beta_t(B_t, C_t) \in (0, 1)$, representing the fraction of time where the leader should be sampled given this challenger arm, and (ii) a mechanism to reach it, e.g. randomization or tracking.

**Leader-Challenger Pair** Using optimism with the unimodal structure, the UCB leader is defined as

$$ B_t \in \underset{i \in [K]}{\operatorname{argmax}} \max_{\lambda \in \Theta_t \cap S} \lambda_i \quad \text{with} \quad \Theta_t \text{ as in (12)}, \quad (14) $$

where ties are broken uniformly at random, hence $B_t \sim \mathcal{U}([K])$ when $\Theta_t \cap S = \emptyset$. To account for the local structure of Unimodal BAI, we use the challenger

$$ C_t \in \underset{j \in \mathcal{N}(B_t)}{\operatorname{argmin}} W_t(B_t, j) \quad \text{with} \quad W_t(i, j) \text{ as in (4).} \quad (15) $$

This challenger is linked to the GLR stopping rule (8). When $\hat{t} = B_t$, not stopping implies that $W_t(B_t, C_t) < c(t - 1, \delta)$, hence we should pull $I_t \in \{B_t, C_t\}$.

**Fixed Tracking** Let $\beta \in (0, 1)$, e.g. $\beta = 1/2$. We consider the fixed design $\beta_t(B_t, C_t) = \beta$ and use $2(K-1)$ independent tracking procedures, i.e. one for each pair of leader $i$ and challenger $j \in \mathcal{N}(i)$. We pull

$$ I_t = \begin{cases} C_t & \text{if } N_{C_t}^{B_t}(t) \le (1-\beta)T_{t+1}(B_t, C_t), \\ B_t & \text{otherwise,} \end{cases} \quad (16) $$

$$ \begin{aligned} & \text{where } N_j^i(t) := \sum_{s \in [t-1]} \mathbb{1}((B_s, C_s) = (i, j), I_s = j) \\ & \text{and } T_t(i, j) := \sum_{s \in [t-1]} \mathbb{1}((B_s, C_s) = (i, j)). \end{aligned} $$

**Efficient Implementation** Top Two algorithms enjoy one of the lowest computational cost among BAI methods. We provide an efficient implementation of the UCB leader which is the computational bottleneck of UniTT. As for O-TaS, we use dynamic programming to find the optimal optimistic instance $\boldsymbol{\mu}^{(i)}(t)$ in (13) related to $i \in [K]$, and exclude the non-unimodal ones. Thus, this procedure computes $B_t = \underset{i \in [K]}{\operatorname{argmax}} \mu_i^{(i)}(t) \in S$, $\mu_i^{(i)}(t) \in \mathcal{O}(K)$. In Appendix G.6 we provide proof and implementation details. Contrary to TaS and O-TaS, UniTT never calls $T^{*}(\cdot)^{-1}$.

### 3.4.1 Non-asymptotic Guarantees

While UniTT is defined for general classes of distributions, we analyze it for Gaussian distributions with unit variance. Theorem 3.7 gives an upper bound on the expected sample complexity holding for any $\delta$ and any Gaussian instances having mean $\boldsymbol{\mu} \in S$. It yields non-asymptotic guarantees and recover asymptotic 1/2-optimality, defined as satisfying $\limsup_{\delta \to 0} \mathbb{E}_{\nu}[\tau_{\delta}]/\log(1/\delta) \le T_{1/2}^*(\boldsymbol{\mu})$ where

$$ 2T_{\beta}^{*}(\boldsymbol{\mu})^{-1} := \sup_{\boldsymbol{\omega}: \frac{\boldsymbol{\omega}}{\|\boldsymbol{\omega}\|} \in \Delta_{\mathcal{N}(i^*)}} \min_{i \in \mathcal{N}(i^*)} \frac{(\mu_{i^*} - \mu_i)^2}{1/\beta + 1/\omega_i}, \quad (17) $$

is achieved at the $\beta$-optimal allocation $\boldsymbol{\omega}_{\beta}^*$. It is a corollary of a result for any $\beta \in (0, 1)$ and $\gamma_1, \gamma_2 > 1$.

**Theorem 3.7.** Using the GLR stopping rule as in (8), UniTT with $\beta = 1/2$ and $f_u/2$ with $\gamma_1 = \gamma_2 = 1.2$ in (12) is $\delta$-correct and, for all Gaussian instances with unit variance and mean $\boldsymbol{\mu} \in S$, $\mathbb{E}_{\nu}[\tau_{\delta}] \le T_{\mu}(\delta) + 15K$ with

$$ \limsup_{\delta \to 0} \frac{T_{\mu}(\delta)}{\log(1/\delta)} \le \frac{T_{1/2}^{*}(\mu)}{1 - 1(|\mathcal{N}(i^*)| = 2) \gamma/a_{\mu}}, $$

for any $\gamma \in (0, a_{\mu})$ with $a_{\mu} := \min_{i \in \mathcal{N}(i^*)} \omega_{1/2,i}^*$. Define $H_1(\mu) := \sum_{i \ne i^*} \Delta_i^{-2}$ and $\Delta_{\min} := \min_i \Delta_i$ with $\Delta_i := \mu_{i^*} - \mu_i$. Then, for any $\epsilon \in (0, 1]$, we have

$$ \begin{aligned} T_{\mu}(\delta) &\le \max\{T_0(\delta), C_{\mu, |\mathcal{N}(i^*)|}\} \quad \text{with} \\ T_0(\delta) &:= \sup\{t \mid t \le \frac{(1+\epsilon)T_{1/2}^*(\mu)}{1 - 1(|\mathcal{N}(i^*)| = 2) \gamma/a_{\mu}} \\ & \phantom{:=} (\sqrt{c(t-1, \delta)} + \sqrt{3.2 \log t})^2\}, \end{aligned} $$

$$ C_{\mu,1} := \max\{h_1 (338H_1(\boldsymbol{\mu})/\epsilon, 48K/\epsilon), (4/\epsilon)^6\}, $$

$$ C_{\mu,2} := (6D_{\mu}/(a_{\mu} - \gamma) + 2)/\epsilon, $$

$$ D_{\mu} := h_1 \left( 13T_{1/2}^{*}(\boldsymbol{\mu})/\gamma^2, (L_{\mu} + 4)r(\gamma)/(a_{\mu} - \gamma) \right), $$

$$ L_{\mu} := \max\{h_1 (96 (H_1(\boldsymbol{\mu}) + 34\Delta_{\min}^{-2}), 26K), (2/\epsilon)^6\}, $$
where $h_1$ as in Lemma H.6 and $r(x) = 1+2(\sqrt{1+2x}-1)^{-1}$. We have $h_1(z, \cdot) \stackrel{\approx}{\underset{+\infty}{z \log z}}$ and $h_1(\cdot, y) \stackrel{\approx}{\underset{+\infty}{y}}$.

Moreover, on instances such that $|\mathcal{N}(i^*)| = 2$, UniTT satisfies that $\mathbb{E}_{\nu}[\tau_{\delta}] \le \tilde{T}_{\mu}(\delta) + 15K$ with

$$ \limsup_{\delta \to 0} \frac{\tilde{T}_{\mu}(\delta)}{\log \frac{1}{\delta}} \le 2T_{1/2}^{*}(\boldsymbol{\mu}), \quad \tilde{T}_{\mu}(\delta) \le \max\{\tilde{T}_{0}(\delta), C_{\mu,1}\} $$

$$ \text{and } \tilde{T}_0(\delta) = \sup\{t \mid t \le 2(1+e)T_{1/2}^*(\boldsymbol{\mu}) (\sqrt{c(t-1, \delta)} + \sqrt{3.2 \log t})^2\}. $$

**Asymptotic 1/2-Optimality** Our asymptotic upper bound is $T_{1/2}^*(\boldsymbol{\mu})$ (take $\gamma \to 0$ when $|\mathcal{N}(i^*)| = 2$), hence UniTT is asymptotically 1/2-optimal. When $|\mathcal{N}(i^*)| = 1$, UniTT is asymptotically optimal since $T^*(\boldsymbol{\mu}) = T_{1/2}^*(\boldsymbol{\mu})$ (see Appendix G.1). When $|\mathcal{N}(i^*)| = 2$, the ratio $T_{1/2}^*(\boldsymbol{\mu})/T^*(\boldsymbol{\mu})$ lies numerically in $(1, r_2]$ with $r_2 \approx 1.03$, which is achieved when neighboring arms $\mathcal{N}(i^*)$ have the same mean (see Figure 2).

**Non-asymptotic Dependency** The upper bound $\max\{T_0(\delta), C_{\mu,|\mathcal{N}(i^*)|}\} + 15K$ has a linear dependency in $K$. Since large $\epsilon \in (0,1]$ or $\gamma \in (0, a_\mu)$ trades off smaller $C_{\mu,|\mathcal{N}(i^*)|}$ for larger $T_0(\delta)$, we take $\epsilon = 1$ and $\gamma = a_\mu/2$ in the following. Then, we obtain $C_{\mu,1} = \mathcal{O}(\max\{K, H_1(\boldsymbol{\mu}) \log H_1(\boldsymbol{\mu})\})$ and $C_{\mu,2} = \mathcal{O}(\max\{K, H_1(\boldsymbol{\mu}) \log H_1(\boldsymbol{\mu})/a_\mu^3\})$ since $T_{1/2}^*(\boldsymbol{\mu}) = \mathcal{O}(H_1(\boldsymbol{\mu}))$ and $r(x) \stackrel{x\to 0}{=} 2/x$. While $a_\mu = 1/4$ when neighboring arms $\mathcal{N}(i^*)$ have the same mean, $1/a_\mu$ diverge to infinity when one neighbor has a negligible gap compared to the other one. To alleviate paying the factor $1/a_\mu$, the second part of Theorem 3.7 gives a non-asymptotic upper bound scaling as $C_{\mu,1}$ at the cost of a sub-optimal multiplicative constant 2 in the definition of $\tilde{T}_0(\delta)$. On the hard instance of Theorem 2.3 which satisfies $H_1(\boldsymbol{\mu}) = (K-1)/\Delta^2$, we obtain that $C_{\mu,1} \approx 48K + 338K\Delta^{-2} \log(K/\Delta^2) + \mathcal{O}(K\Delta^{-2} \log(\Delta^2 + \log(K\Delta^{-2})))$. Therefore, up to a logarithmic factor, our non-asymptotic upper bound matches the lower bound of Theorem 2.3.

**Optimal Design IDS** To reach asymptotic optimality, UniTT should be used with the optimal design IDS (You et al., 2023), namely by taking $\beta_t(B_t, C_t) = N_{C_t}(t)/(N_{B_t}(t) + N_{C_t}(t))$ and tracking its cumulative sum instead of $\beta T_{t+1}(B_t, C_t)$. Asymptotically, Unimodal BAI is equivalent to BAI on $\mathcal{N}(i^*) \cup \{i^*\}$, and UniTT is equivalent to TTUCB on $\mathcal{N}(i^*) \cup \{i^*\}$. Therefore, UniTT with IDS will be asymptotically optimal by adapting existing proof (Jourdan, 2024). We leave the details to the reader for two reasons. First, our focus is on obtaining non-asymptotic guarantees, yet this is challenging with IDS. Second, asymptotic

1/2-optimality is close to optimality for Unimodal BAI. When $|\mathcal{N}(i^*)| = 1$ it is the same, see above.

### 3.4.2 Proof Sketch of Theorem 3.7

We sketch the proof Theorem 3.7 below and highlight its novelties, see Appendix G for details. Under $\mathcal{E}_t$, we prove that $B_t = i^*$ except for a sublinear number of times (Lemma G.1). By definition of the stopping rule (8) with $\hat{i}_t$ as in (7), not stopping implies that

$$ c(t-1, \delta) \ge \max_{i \in [K]} \min_{j \in \mathcal{N}(i)} W_t(i, j) \ge W_t(B_t, C_t), $$

where we use the challenger in (15). Under suitable concentration and for $B_t = i^*$, using $W_t$ in (5) yields

$$ c(t-1, \delta) \ge \frac{2+1/\omega_{1/2, C_t}^*}{\frac{t}{N_{i^*}^*(t)} + \frac{t}{N_{C_t}^*(t)}} \frac{t}{T_{1/2}^*(\boldsymbol{\mu})} - \mathcal{O}(\log t). \quad (18) $$

Using tracking (Lemma H.3), we have $N_{i^*}^*(t) \approx t/2$. When $|\mathcal{N}(i^*)| = 1$, we have $N_{C_t}^*(t) \approx t/2$ as well. Re-ordering terms in (18) yields a $(t, \delta, \boldsymbol{\mu})$-dependent condition. As $T_\mu(\delta)$ is defined as the last time this condition can hold, it yields our first upper bound. When $|\mathcal{N}(i^*)| = 2$, we prove that the ratio in the r.h.s. of (18) is larger than 1, e.g. by showing that $N_{C_t}^*(t) \gtrsim t\omega_{1/2, C_t}^*$. We consider two different approaches.

**Coarse Analysis** The coarse analysis is an improvement on Jourdan and Degenne (2023) that yields the last upper bound in Theorem 3.7. While the expected sample complexity of TTUCB is in $\mathcal{O}(\max\{K, H(\boldsymbol{\mu}) \log H(\boldsymbol{\mu})\}^{\gamma_1})$ where $\gamma_1 > 1$, our bound is in $\mathcal{O}(\max\{K, H_1(\boldsymbol{\mu}) \log H_1(\boldsymbol{\mu})\})$, hence shaving this sub-optimal dependency in $\gamma_1$.

Refining their pigeonhole argument, we show that there exists an arm $i_0 \in \mathcal{N}(i^*)$ being over-sampled compared to $t\omega_{i_0}$ where $\omega_{i_0} \ge \max\{\frac{1}{4}, \omega_{1/2, i_0}^*\}$. Let $n_t$ be the last time with $(B_{n_t}, C_{n_t}) = (i^*, i_0)$. When $n_t \ge t^{1/\gamma_1}$, we show that $N_{i_0}^*(n_t)$ is larger than $t\omega_{i_0}$ (similarly as them). When $n_t < t^{1/\gamma_1}$, for all $s \in [t^{1/\gamma_1}, t]$ where $B_s = i^*$, the arm $j_0 \in \mathcal{N}(i^*) \setminus \{i_0\}$ is the challenger. Let $\tilde{n}_t$ be the last time with $B_{\tilde{n}_t} = i^*$. Then, we show that $N_{j_0}^*(\tilde{n}_t) \approx t/2$. In both cases, we can re-order terms in (18) and define $\tilde{T}_\mu(\delta)$ as the last time this condition can hold. This concludes the proof.

The refined pigeonhole argument and the dichotomy are the technical novelties yielding the improved non-asymptotic terms. The coarse analysis sacrifices a multiplicative constant 2 in the definition of $\tilde{T}_0(\delta)$. Below, we introduce an analysis recovering asymptotic 1/2-optimality, with $\mathcal{O}(1/a_\mu^3)$ as non-asymptotic cost.

**Tight Analysis** We develop a novel non-asymptotic analysis using $\gamma \in (0, a_\mu)$ to control the gap between
<figure><img src="image_2.png" /><figcaption>Figure 1: Empirical stopping time ($\delta = 0.01$) on (top) random instances with $K \in \{10, 100\}$, denoted as $\mu_{R,10}$ and $\mu_{R,100}$, and (bottom) flat instances with $K \in \{11, 101\}$, denoted as $\mu_{F,11}$ and $\mu_{F,101}$.</figcaption></figure>

$N_i^{i*}(t)/t$ and $\omega_{1/2,i}^{*}$ for any neighboring arm $i \in \mathcal{N}(i^*)$. As technical tool, we use that the number of times one can increment a bounded positive variable by one is also bounded, see Lemma H.4 by Jourdan et al. (2023).

We exhibit a time $L_\mu$ after which the UCB leader will always be the best arm provided concentration holds (Lemma G.4), hence $N_i^{i*}(t) \approx t/2$. This also implies that UniTT exploits the sparsity pattern and satisfy that $I_t \in \mathcal{N}(i^*) \cup \{i^*\}$ for all $t > L_\mu$ (similarly to O-TaS). Then, $D_\mu$ is a time after which the empirical allocations of the neighbors $\mathcal{N}(i^*)$ stay $\gamma$-close to their $1/2$-optimal allocation (Lemma G.6), hence $N_i^{i*}(t) \approx t\omega_{1/2,i}^*$ for all $i \in \mathcal{N}(i^*)$. By re-ordering terms in (18), we define $T_\mu(\delta)$ similarly as before to conclude.

# 4 EXPERIMENTS

We present experiments to (i) compare our three proposed algorithms, (ii) highlight the pitfalls of other asymptotic optimal algorithms such as DKM (Degenne et al., 2019), LMA (Ménard, 2019) or FW (Wang et al., 2021)), and (iii) showcase the benefits of exploiting the unimodal structure by comparing ourselves to unstructured TaS and TTUCB. We also compare theoretically all these choices in Appendix B. We report the boxplots of the stopping times for 1000 independent runs using $\delta = 0.01$. We use the heuristic $c_K(t, \delta) = \log(K \log(\mathit{et})/\delta)$ and observe empirical

errors lower than $\delta$. Appendix I provides additional experiments.

**Instances** As Bayesian benchmark, we randomly generate unimodal Gaussian bandits with unit variance for $K \in \{10, 100\}$. First, we draw the optimal arm $i \sim \mathcal{U}([K])$ and set $\mu_i = 1$. Then, for all $j \neq i$, we draw $x_j \sim \mathcal{U}([0.2, 0.3])$ and set $\mu_j = \mu_{j+1} - x_j$ if $j < i$, and $\mu_j = \mu_{j-1} - x_j$ otherwise. As hard instances from Theorem 2.3, we consider the flat unimodal Gaussian bandits with unit variance for $K \in \{11, 101\}$. We use $\star = \lceil K/2 \rceil$, $\mu_\star = 1.0$ and $\mu_i = 0.6$ for all $i \neq \star$.

**Results** In Figure 1, on $\mu_{R,10}$ and $\mu_{F,11}$, we see U-TaS, O-TaS, and UniTT have the best performance. Moreover, DKM, FW, and LMA perform poorly, even worse than unstructured BAI algorithms like TaS and TTUCB. Both TaS and TTUCB have worse performance in $\mu_{F,11}$, which is also the hard instance in unstructured BAI as all arms are near optimal.

For larger $K$, we use U-TaS, O-TaS, UniTT and TTUCB due to their improved empirical performance for smaller $K$ and faster implementations. In Figure 1, on $\mu_{R,100}$, UniTT and O-TaS are the most competitive methods, while U-TaS performs worse than the unstructured TTUCB algorithm. We attribute the poor results of U-TaS to the forced exploration mechanism which is wasteful when arms are highly sub-optimal
for large *K*. In constrast, on $\mu_{F,101}$, the forced exploration in U-TaS yields performance comparable to O-TaS for instances where sub-optimal arms have similar means and should be explored as much, see $\mu_{F,101}$. As before, the gap between TTUCB and UniTT or O-TaS is larger for flat instances.

# 5 PERSPECTIVES

We studied the unimodal structure in fixed-confidence BAI. The derived lower bounds suggest that sparse optimal allocations are sufficient asymptotically, yet dense exploration is unavoidable, from a minimax perspective, in the moderate confidence regime. Algorithmically, we showcased how to exploit the sparsity induced by the unimodal structure in three different algorithms having efficiently implementation. On top of their good empirical performance, the proposed algorithms enjoy strong theoretical guarantees on their expected sample complexity: asymptotic optimality or non-asymptotic guarantees.

Despite our promising results leveraging a known structural assumption, the unimodal structure is rather an exception than the norm. In all generality, it is challenging to fully exploit the structure algorithmically. Even for linear bandits, extending the analysis of Top Two algorithms is still an open problem.

## Acknowledgements

This work started while Riccardo Poiani was visiting the Scool team of Inria Lille and a student at Politecnico di Milano. He acknowledges the funding of a MOB-LIL-EX grant from the University of Lille. Riccardo Poiani is partially supported by the Cariplo CRYPTONOMEX grant and MUR - PRIN 2022 project 2022R45NBB funded by the Next Generation EU program. This work was conducted while Marc Jourdan was a PhD student in the Scool team of Inria Lille, partially supported by the THIA ANR program "AI.PhD@Lille". The authors acknowledges the support of the French National Research Agency under the projects BOLD (ANR-19-CE23-0026-04) and FATE (ANR22-CE23-0016-01).

## References

S. Agrawal, S. Juneja, and P. Glynn. Optimal $\delta$-correct best-arm selection for heavy-tailed distributions. In *Algorithmic Learning Theory*, pages 61–110. PMLR, 2020.

A. Al Marjani, T. Kocak, and A. Garivier. On the complexity of all $\varepsilon$-best arms identification. In *Joint European Conference on Machine Learning*

and *Knowledge Discovery in Databases*, pages 317–332. Springer, 2022.

J.-Y. Audibert and S. Bubeck. Best arm identification in multi-armed bandits. In *COLT-23th Conference on learning theory-2010*, pages 13–p, 2010.

O. Cappé, A. Garivier, O.-A. Maillard, R. Munos, and G. Stoltz. Kullback-leibler upper confidence bounds for optimal sequential allocation. *The Annals of Statistics*, pages 1516–1541, 2013.

J. Cheshire, P. Ménard, and A. Carpentier. The influence of shape constraints on the thresholding bandit problem. In *Conference on Learning Theory*, pages 1228–1275. PMLR, 2020.

R. Combes and A. Proutière. Unimodal bandits: Regret lower bounds and optimal algorithms. In *International Conference on Machine Learning (ICML)*, 2014.

R. Degenne and W. M. Koolen. Pure exploration with multiple correct answers. *Advances in Neural Information Processing Systems*, 32, 2019.

R. Degenne, W. M. Koolen, and P. Ménard. Non-asymptotic pure exploration by solving games. *Advances in Neural Information Processing Systems*, 32, 2019.

R. Degenne, H. Shao, and W. Koolen. Structure adaptive algorithms for stochastic bandits. In *International Conference on Machine Learning*, pages 2443–2452. PMLR, 2020.

B. Edelman and M. Ostrovsky. Strategic bidder behavior in sponsored search auctions. In *Proceedings of Workshop on Sponsored Search Auctions*, 2005.

E. Even-Dar, S. Mannor, and Y. Mansour. Action elimination and stopping conditions for the multi-armed bandit and reinforcement learning problems. *Journal of Machine Learning Research*, 2006.

A. Garivier and E. Kaufmann. Optimal best arm identification with fixed confidence. In *Conference on Learning Theory*, pages 998–1027. PMLR, 2016.

D. Ghosh, M. K. Hanawal, and N. Zlatanov. Fixed budget best arm identification in unimodal bandits. *Transactions on Machine Learning Research*.

K. Jamieson and R. Nowak. Best-arm identification algorithms for multi-armed bandits in the fixed confidence setting. In *48th Annual Conference on Information Sciences and Systems (CISS)*, 2014.

Y. Jedra and A. Proutière. Optimal best-arm identification in linear bandits. *Advances in Neural Information Processing Systems*, 33:10007–10017, 2020.

M. Jourdan. *Solving Pure Exploration Problems with the Top Two Approach*. PhD thesis, Université de Lille, 2024.
M. Jourdan and R. Degenne. Non-asymptotic analysis of a ucb-based top two algorithm. *Thirty-Seventh Conference on Neural Information Processing Systems*, 2023.

M. Jourdan and C. Réda. An anytime algorithm for good arm identification. *arXiv preprint arXiv:2310.10359*, 2023.

M. Jourdan, R. Degenne, D. Baudry, R. de Heide, and E. Kaufmann. Top two algorithms revisited. In *Advances in Neural Information Processing Systems (NeurIPS)*, 2022.

M. Jourdan, R. Degenne, and E. Kaufmann. An $\epsilon$-best-arm identification algorithm for fixed-confidence and beyond. *Thirty-Seventh Conference on Neural Information Processing Systems*, 2023.

Z. Karnin, T. Koren, and O. Somekh. Almost optimal exploration in multi-armed bandits. In *International conference on machine learning*, pages 1238–1246. PMLR, 2013.

E. Kaufmann and W. M. Koolen. Mixture martingales revisited with applications to sequential tests and confidence intervals. *Journal of Machine Learning Research*, 22(246):1–44, 2021.

E. Kaufmann, O. Cappé, and A. Garivier. On the complexity of best arm identification in multi-armed bandit models. *Journal of Machine Learning Research*, 17:1–42, 2016.

E. Kaufmann, W. M. Koolen, and A. Garivier. Sequential test for the lowest mean: From thompson to murphy sampling. *Advances in Neural Information Processing Systems*, 31, 2018.

P. Ménard. Gradient ascent for active exploration in bandit problems. *arXiv preprint arXiv:1905.08165*, 2019.

V. Moulos. Optimal best markovian arm identification with fixed confidence. *Advances in Neural Information Processing Systems*, 32, 2019.

S. Paladino, F. Trovò, M. Restelli, and N. Gatti. Unimodal thompson sampling for graph-structured arms. In AAAI, 2017.

R. Poiani, R. Degenne, E. Kaufmann, A. M. Metelli, and M. Restelli. Optimal multi-fidelity best-arm identification. In *Advances in Neural Information Processing Systems*, volume 37, pages 121882–121927, 2024.

C. Qin, D. Klabjan, and D. Russo. Improving the expected improvement algorithm. *Advances in Neural Information Processing Systems*, 30, 2017.

Y. Russac, C. Katsimerou, D. Bohle, O. Cappé, A. Garivier, and W. M. Koolen. A/b/n testing

with control in the presence of subpopulations. *Advances in Neural Information Processing Systems*, 34:25100–25110, 2021.

D. Russo. Simple bayesian algorithms for best arm identification. In *Conference on Learning Theory*, pages 1417–1418. PMLR, 2016.

H. Saber, P. Ménard, and O. Maillard. Indexed minimum empirical divergence for unimodal bandits. In *Advances in Neural Information Processing Systems (NeurIPS)*, 2021.

X. Shang, R. Heide, P. Menard, E. Kaufmann, and M. Valko. Fixed-confidence guarantees for bayesian best-arm identification. In *International Conference on Artificial Intelligence and Statistics*, pages 1823–1832. PMLR, 2020.

M. Simchowitz, K. G. Jamieson, and B. Recht. The simulator: Understanding adaptive sampling in the moderate-confidence regime. In *International Conference On Learning Theory (COLT)*, 2017.

C. Trinh, E. Kaufmann, C. Vernade, and R. Combes. Solving bernoulli rank-one bandits with unimodal thompson sampling. In *Algorithmic Learning Theory (ALT)*, 2020.

P. Wang, R. Tzeng, and A. Proutière. Fast pure exploration via frank-wolfe. In *Advances in Neural Information Processing Systems (NeurIPS)*, 2021.

W. You, C. Qin, Z. Wang, and S. Yang. Information-directed selection for top-two algorithms. In *The Thirty Sixth Annual Conference on Learning Theory*, pages 2850–2851. PMLR, 2023.

J. Y. Yu and S. Mannor. Unimodal bandits. In *International Conference on Machine Learning (ICML)*, 2011.

## Checklist

1. For all models and algorithms presented, check if you include:

(a) A clear description of the mathematical setting, assumptions, algorithm, and/or model. **Yes, see Sections 1, 2 and 3.**

(b) An analysis of the properties and complexity (time, space, sample size) of any algorithm. **Yes, see Sections 3 and 4, as well as Appendix I.**

(c) (Optional) Anonymized source code, with specification of all dependencies, including external libraries. **Yes, see Appendix I and the code attached in the supplementary materials.**

2. For any theoretical claim, check if you include:
(a) Statements of the full set of assumptions of all theoretical results. **Yes, see Sections 2 and 3.**

(b) Complete proofs of all theoretical results. **Yes, see Section 3.4.2 and Appendices C, D, E, F, G**

(c) Clear explanations of any assumptions. **Yes, see Sections 1, 2 and 3.**

3. For all figures and tables that present empirical results, check if you include:

(a) The code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL). **Yes, see Appendix I and the code attached in the supplementary materials.**

(b) All the training details (e.g., data splits, hyperparameters, how they were chosen). **Yes, see Appendix I and the code attached in the supplementary materials.**

(c) A clear definition of the specific measure or statistics and error bars (e.g., with respect to the random seed after running experiments multiple times). **Yes, see Section 4 and Appendix I.**

(d) A description of the computing infrastructure used. (e.g., type of GPUs, internal cluster, or cloud provider). **Yes, see Appendix I.**

4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets, check if you include:

(a) Citations of the creator. If your work uses existing assets. **Not Applicable.**

(b) The license information of the assets, if applicable. **Not Applicable.**

(c) New assets either in the supplemental material or as a URL, if applicable. **Not Applicable.**

(d) Information about consent from data providers/curators. **Not Applicable.**

(e) Discussion of sensible content if applicable, e.g., personally identifiable information or offensive content. **Not Applicable.**

5. If you used crowdsourcing or conducted research with human subjects, check if you include:

(a) The full text of instructions given to participants and screenshots. **Not Applicable.**

(b) Descriptions of potential participant risks, with links to Institutional Review Board (IRB) approvals if applicable. **Not Applicable.**

(c) The estimated hourly wage paid to participants and the total amount spent on participant compensation. **Not Applicable.**
# A OUTLINE

The appendices are organized as follows:

* In Appendix B, we present a table of comparison among the different algorithms that can be used to solve Unimodal BAI problems.

* In Appendix C, we present the proofs of our lower bounds on the expected sample complexity of any $\delta$-correct algorithm for Unimodal BAI: an instance-dependent one (Theorem 2.2) and a worst-case one (Theorem 2.3).

* Additional details on the stopping rules and their GLR origins is given in Appendix D.

* The asymptotic optimality of Track-and-Stop (Theorem 3.2) is proven in Appendix E.

* The asymptotic optimality of Optimistic Track-and-Stop (Theorem 3.6) is proven in Appendix F.

* In Appendix G, we prove our non-asymptotic upper bound on the expected sample complexity of UniTT (Theorem 3.7).

* Appendix H gathers existing and new technical results which are used for our proofs.

* Implementation details and additional experiments are presented in Appendix I.

# B ALGORITHM COMPARISON

Table 1 compares different algorithms that can be used to solve unimodal BAI problems. In the table, we denote by $\tilde{T}^*(\mu)$ the characteristic time over unstructured BAI problems, namely:

$$ \tilde{T}^*(\mu)^{-1} = \sup_{\omega \in \Delta_K} \inf_{\lambda \in \tilde{S}: i^*(\lambda) \neq i^*(\mu)} \sum_{k \in [K]} \omega_k d(\mu_k, \lambda_k) $$

where $\tilde{S}$ is the unstructured space of possible means. Similarly, we denote by $\tilde{T}_{\beta}^*(\mu)$ a $\beta$-optimal algorithm in the unstructured setting, i.e.,

$$ \tilde{T}_{\beta}^*(\mu)^{-1} = \sup_{\omega \in \Delta_K : \omega_* = \beta} \inf_{i^*(\lambda) \neq i^*(\mu)} \sum_{k \in [K]} \omega_k d(\mu_k, \lambda_k). $$

<table><caption>Table 1: Algorithm Comparison. (Asymp.) Upper bound on $\lim_{\delta \to 0} \mathbb{E}_{\nu}[\tau_{\delta}]/\log(1/\delta)$</caption><thead><tr><th>ALGO</th><th>ASYMP.</th><th>FINITE TIME</th><th>COMPLEXITY</th></tr></thead><tbody><tr><td>TaS</td><td>T̃*(μ)</td><td>N/A</td><td>poly(K), 1 call to T̃*(·)<sup>-1</sup></td></tr><tr><td>TTUCB</td><td>T̃<sub>β</sub>*(μ)</td><td>Thm. 2.4 in Jourdan and Degenne (2023)</td><td>O(K)</td></tr><tr><td>U-TaS</td><td>T*(μ)</td><td>N/A</td><td>poly(K), 1 call to T*(·)<sup>-1</sup></td></tr><tr><td>O-TaS</td><td>T*(μ)</td><td>Theorem F.14</td><td>O(K), K calls to T*(·)<sup>-1</sup></td></tr><tr><td>UniTT</td><td>T<sub>1/2</sub>*(μ)</td><td>Theorem 3.7</td><td>O(K), 0 calls to T*(·)<sup>-1</sup></td></tr><tr><td>LMA</td><td>T*(μ)</td><td>N/A</td><td>K - 1 convex problems of K variables</td></tr><tr><td>DKM</td><td>T*(μ)</td><td>Thm. 2 in Degenne et al. (2019)</td><td>K - 1 convex problems of K variables</td></tr><tr><td>FW</td><td>T*(μ)</td><td>N/A</td><td>K - 1 convex problems of K variables</td></tr></tbody></table>

We take the chance to remark that TTUCB enjoys a dependency on $K$ which is at least $O((K \log(K))^{\alpha})$ with $\alpha > 1$, while DKM Degenne et al. (2019) shows an $O(K^2)$ dependency.
# C LOWER BOUNDS

## C.1 Proof of Theorem 2.2

**Theorem 2.1.** For any $\delta$-correct algorithm and any unimodal instance $\nu \in D^K$ with mean $\mu \in S$, we have $\mathbb{E}_{\nu}[\tau_{\delta}] \ge T^*(\mu) \log \frac{1}{2.4\delta}$ with

$$T^*(\mu)^{-1} := \sup_{\omega \in \Delta_K} \min_{i \neq \star} f_i(\omega, \mu) \quad \text{and} \quad (2)$$

$$f_i(\omega, \mu) := \inf_{\theta \in \text{Alt}(\mu): i^*(\theta)=i} \sum_{j \in [K]} \omega_j d(\mu_j, \theta_j),$$

where $\text{Alt}(\mu) = \{\theta \in S : i^*(\theta) \neq i^*(\mu)\}$ and $\omega^*(\mu)$ denote the maximizer of $T^*(\mu)^{-1}$.

*Proof.* Given $x, y \in (0, 1)$, we denote by $\text{kl}(x, y) = x \log(x/y) + (1-x) \log((1-x)/(1-y))$ the binary relative entropy. Consider $\delta \in (0, 1)$, a unimodal bandit model $\mu$ and an alternative instance $\theta \in \text{Alt}(\mu)$. Then, by Lemma 1 in Kaufmann et al. (2016), we can connect the expected number of draws of each arm to the KL divergence of the two unimodal bandit models. More specifically, we have that:

$$\sum_{j \in [K]} \mathbb{E}_{\nu}[N_j(\tau_{\delta})] d(\mu_j, \theta_j) \ge \text{kl}(\delta, 1 - \delta).$$

Similar to Theorem 1 in (Garivier and Kaufmann, 2016), we now use the previous inequality by considering all the alternative models $\theta \in S$ in which the optimal arm is different:

$$\begin{align*}
\text{kl}(\delta, 1 - \delta) &\le \inf_{\theta \in \text{Alt}(\mu)} \sum_{j \in [K]} \mathbb{E}_{\nu}[N_j(\tau_{\delta})] d(\mu_j, \theta_j) \\
&= \mathbb{E}_{\nu}[\tau_{\delta}] \inf_{\theta \in \text{Alt}(\mu)} \sum_{j \in [K]} \frac{\mathbb{E}_{\nu}[N_j(\tau_{\delta})]}{\mathbb{E}_{\nu}[\tau_{\delta}]} d(\mu_j, \theta_j) \\
&\le \mathbb{E}_{\nu}[\tau_{\delta}] \sup_{\omega \in \Delta_K} \inf_{\theta \in \text{Alt}(\mu)} \sum_{j \in [K]} \omega_j d(\mu_j, \theta_j) \\
&= \mathbb{E}_{\nu}[\tau_{\delta}] \sup_{\omega \in \Delta_K} \min_{i \neq i^*(\mu)} \inf_{\theta \in S} \sum_{i^*(\theta)=i} \omega_j d(\mu_j, \theta_j),
\end{align*}$$

where in the last step we have used the definition of $\text{Alt}(\mu)$. We conclude the proof by using that $\text{kl}(\delta, 1 - \delta) \ge \log \frac{1}{2.4\delta}$. $\square$

Given this standard result, we continue by analyzing in greater details the shape of $T^*(\mu)^{-1}$. Before diving into the proof, we introduce the following notation. For all $i \neq \star$, we define $\theta^{*,i}(\omega)$ in the following way:

$$\theta^{*,i}(\omega) \in \underset{\substack{\theta \in \text{Alt}(\mu): \\ i^*(\theta)=i}}{\operatorname{argmin}} \sum_{j \in [K]} \omega_j d(\mu_j, \theta_j). \quad (19)$$

Given this notation, we first show an preliminary step that orders the functions $f_j$'s.

**Lemma C.1.** Fix $\omega \in \Delta_K$ and consider any unimodal bandit $\mu \in S$. Then, it holds that:

$$f_j(\omega, \mu) \ge f_{j+1}(\omega, \mu) \quad \forall j > i^*(\mu)$$

$$f_j(\omega, \mu) \le f_{j+1}(\omega, \mu) \quad \forall j < i^*(\mu) - 1.$$

*Proof.* We prove the result for $j < \star - 1$. The prove for the case in which $j > \star$ follows identical reasonings.
Specifically, we have that:

$$
\begin{align*}
f_j(\omega, \boldsymbol{\mu}) &\ge \sum_{k=j+1}^{K} \omega_k d(\mu_k, \theta_k^{*,j}(\omega)) \\
&= \sum_{k=1}^{j} \omega_k d(\mu_k, \mu_k) + \sum_{k=j+2}^{K} \omega_k d(\mu_k, \theta_k^{*,j}(\omega)) + \omega_{j+1} d(\mu_{j+1}, \theta_{j+1}^{*,j}(\omega)) \\
&\ge \sum_{k=1}^{j} \omega_k d(\mu_k, \mu_k) + \sum_{k=j+2}^{K} \omega_k d(\mu_k, \theta_k^{*,j}(\omega)) + \omega_{j+1} d(\mu_{j+1}, \max\{\mu_{j+1}, \theta_{j+1}^{*,j}(\omega)\}) \\
&\ge f_{j+1}(\omega, \boldsymbol{\mu}),
\end{align*}
$$

where in the last step we used the fact that $\theta_{j+1} = \max\{\mu_{j+1}, \theta_{j+1}^{*,j}(\omega)\}$, $\theta_k = \mu_k$ for all $k < j + 1$ and $\theta_k = \theta_{j+1}^{*,j}(\omega)$ is a unimodal bandit where $j+1$ is an optimal arm. Indeed, since $\theta^{*,j}$ is a unimodal bandit where $j$ is the optimal arm, it follows that $\theta_{j+1}^{*,j}(\omega) \ge \theta_k^{*,j}(\omega)$ for all $k > j+1$. Furthermore, $\max\{\mu_{j+1}, \theta_{j+1}^{*,j}(\omega)\} \ge \mu_j$ holds since $j < \star - 1$ and $\boldsymbol{\mu}$ is a unimodal bandit. $\square$

A direct consequence of Lemma C.1 is that we can rewrite $T^*(\boldsymbol{\mu})^{-1}$ in the following way:

$$ T^*(\boldsymbol{\mu})^{-1} = \sup_{\boldsymbol{\omega} \in \Delta_K} \min_{a \in \mathcal{N}(\boldsymbol{\star})} f_a(\boldsymbol{\omega}, \boldsymbol{\mu}). \qquad (20) $$

We now investigate in detail $f_{\star-1}(\omega, \boldsymbol{\mu})$ and $f_{\star+1}(\omega, \boldsymbol{\mu})$.

**Lemma C.2.** Fix $\omega \in \Delta_K$ and consider $i \in \mathcal{N}(\boldsymbol{\star})$. Then, if $i$ is such that $\mu_i \ge \mu_j$ for all $j \ne \star$, then it holds that:

$$ \theta_i^{*,i}(\omega) = \theta_{\star}^{i}(\omega) = \underset{\eta \in (\mu_i, \mu_{\star})}{\operatorname{argmin}} \sum_{a \in \{\star, i\}} \omega_a d(\mu_a, \eta) = \frac{\omega_{\star}}{\omega_{\star} + \omega_i} \mu_{\star} + \frac{\omega_i}{\omega_{\star} + \omega_i} \mu_i \quad (21) $$

$$ \theta_a^{*,i}(\omega) = \mu_a \quad \forall a \notin \{\star, i\}. \qquad (22) $$

If, instead, there exists $j \ne i^*(\boldsymbol{\mu})$ such that $\mu_j > \mu_i$, then,

$$ f_i(\omega) = \inf_{\eta \in \mathbb{R}} \omega_{\star} d(\star, \eta) + \omega_i d(\mu_i, \eta) + \sum_{a \notin \{\star, i\}} \omega_a d(\mu_a, \eta) \mathbf{1}\{\mu_a \ge \eta\}. \quad (23) $$

*Proof.* We begin by considering the case in which $i$ is such that $i$ is such that $\mu_i \ge \mu_j$ for all $j \ne \star$. Suppose there exists $j \notin \{i, \star\}$ such that $\theta_j^{*,i}(\omega) \ne \mu_j$. Define, for brevity:

$$ \eta^* := \frac{\omega_{\star}}{\omega_{\star} + \omega_i} \mu_{\star} + \frac{\omega_i}{\omega_{\star} + \omega_i} \mu_i. $$

Then, we have that:

$$
\begin{align*}
f_i(\omega, \boldsymbol{\mu}) &= \sum_{i=1}^{K} \omega_k d(\mu_k, \theta_k^{*,i}(\omega)) \\
&\geq \omega_{\star} d(\mu_{\star}, \theta_{\star}^{*,i}) + \omega_i d(\mu_i, \theta_i^{*,i}(\omega)) \\
&\geq \inf_{x_1, x_2 \in [\mu_i, \mu_{\star}]^2; x_1 \leq x_2} \omega_{\star} d(\mu_{\star}, x_1) + \omega_i d(\mu_i, x_2) \\
&= \inf_{\eta \in (\mu_i, \mu_{\star})} \omega_{\star} d(\mu_{\star}, \eta) + \omega_i d(\mu_i, \eta) \\
&= \omega_{\star} d(\mu_{\star}, \eta^*) + \omega_i d(\mu_i, \eta^*),
\end{align*}
$$

thus showing that $\theta_i^{*,i}(\omega) = \theta_{\star}^{i}(\omega) = \eta^*$ actually belongs to the argmin (i.e., Equation (19)).
We now conclude by proving Equation (23). The proof follows by analyzing in detail:

$$ \inf_{\substack{\theta \in \mathrm{Alt}(\mu) \\ i^*(\theta)=i}} \sum_{a \in [K]} \omega_a d(\mu_a, \theta_a) \qquad (24) $$

Suppose, without loss of generality that $i = \star - 1$. Consider $\theta^{*,\star-1}$ and fix an arbitrary optimal values for $\theta^{*,i}_{\star-1}$ (i.e., $\eta_{\star-1}$) and $\theta^{*,i}$ (i.e., $\eta_{\star}$). Then, for all $j < \star - 1$, it is easy to see that Equation (24) is minimized by (i) $\theta^{*,i}_j = \eta_{\star-1}$ if $\mu_j > \eta_{\star-1}$ and (ii) $\theta^{*,i}_j = \mu_j$ if $\mu_j \le \eta_{\star-1}$.<fnref n="2" /> For similar arguments, we have that, for all $j \ge \star + 1$, Equation (24) is minimized by (i) $\theta^{*,i}_j = \eta_{\star}$ if $\mu_j > \eta_{\star}$ and (ii) $\theta^{*,i}_j = \mu_j$ if $\mu_j \le \eta_{\star}$. Therefore, we have reduced Equation (24) to the following expression:

$$ \inf_{\eta_{\star-1} \ge \eta_{\star}} \omega_{\star} d(\mu_{\star}, \eta_{\star}) + \omega_{\star-1} d(\mu_{\star-1}, \eta_{\star-1}) + \sum_{j < \star - 1} \omega_j d(\mu_j, \eta_{\star-1}) \mathbf{1}\{\mu_j > \eta_{\star-1}\} + \sum_{j \ge \star - 1} \omega_j d(\mu_j, \eta_{\star}) \mathbf{1}\{\mu_j > \eta_{\star}\}, $$

which is a convex optimization problem of two variables. Nevertheless, we note that in its unconstrained version (i.e., $\eta_{\star-1}, \eta_{\star} \in \mathbb{R}^2$), the objective function is 0 (i.e., $\eta_{\star-1} = \mu_{\star-1}$ and $\eta_{\star} = \mu_{\star}$). Therefore, due to the convexity, an optimal of the constrained problem lies at $\eta_{\star-1} = \eta_{\star}$, thus concluding the proof. □

In other words, Lemma C.2 states that (i) for the arm whose mean is the closest to the optimal one, we have a closed form expression for the alternative model, that is the classical one of BAI problems (see Lemma 3 in Garivier and Kaufmann (2016)). Instead, (ii) if $i \in \mathcal{N}(\star)$ but its mean is not the closest to the optimal one, then, the alternative instance is expressed as the solution of a 1D-optimization problem. Furthermore, we highlight that, Equation (23) is due to the fact that $\theta^{*,i}_a(\omega) = \eta^*(\omega)$ if $a \in \{\star, i\}$ or if $\mu_a \ge \eta^*(\omega)$, and $\theta^{*,i}_a(\omega) = \mu_a$ otherwise.

It is important to note that Equation (23) also captures the case in which $i \in \mathrm{argmax}_{a \neq \star} \mu_i$ (i.e., Equation (21)). Indeed, by looking at Equation (21), we can note that:

$$ \frac{\omega_{\star}}{\omega_{\star} + \omega_{i}} \mu_{\star} + \frac{\omega_{i}}{\omega_{\star} + \omega_{i}} \mu_{i} \geq \mu_{i}. $$

Plugging this into Equation (23), we have that:

$$ f_i(\omega, \mu) = \inf_{\eta \in (\mu_i, \mu_\star)} \omega_\star d(\star, \eta) + \omega_i d(\mu_i, \eta), $$

whose optimal value is exactly $\eta_i^*(\omega) := \frac{\omega_i}{\omega_i+\omega_\star} \mu_\star + \frac{\omega_\star}{\omega_i+\omega_\star} \mu_i$. Therefore, in the following we denote by $\eta_i^*(\omega)$ a solution of the optimization problem in Equation (23), keeping in mind that, whenever $i \in \mathrm{argmax}_{a \neq \star} \mu_a$, we have a closed-form expression that is given by Equation (21).<fnref n="3" /> Given these considerations, the next result shows how $T^*(\mu)^{-1}$ can be expressed as a maximization problem over a restricted portion of the simplex.

**Lemma C.3.** Consider any unimodal bandit $\mu$, and define $\tilde{\Delta}_K(\mu) \subseteq \Delta_K$ in the following way:

$$ \tilde{\Delta}_K(\mu) = \{\omega \in \Delta_K : \omega_i = 0 \quad \forall i \notin \mathcal{N}(\star)\}. \qquad (25) $$

Then, it holds that:

$$ T^*(\mu)^{-1} = \sup_{\omega \in \tilde{\Delta}_K} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \mu). \qquad (26) $$

*Proof.* First, we prove the claim whenever $\star = 1$ (but an identical reasoning can be applied to the case in which $\star = K$). In this case, by applying Lemma C.1, we obtain that:

$$ T^*(\mu) = \sup_{\omega \in \Delta_K} f_2(\omega, \mu). $$

<footnote n="2">²These facts are due to the unimodal constraint and the fact that $d(x, y)$ is increases as the distance between $x$ and $y$ increases.</footnote>

<footnote n="3">³Note that, in $\eta_i^*(\omega)$ we have dropped the dependence on $\mu$ to simplify the notation</footnote>
Then, from Lemma C.2, we have that:

$$
\begin{align*}
T^*(\boldsymbol{\mu}) &= \sup_{\omega \in \bar{\Delta}_K} \omega_1 d(\mu_1, \eta_2^*(\omega)) + \omega_2 d(\mu_2, \eta_2^*(\omega)) \\
&= \sup_{\omega \in \bar{\Delta}_K(\boldsymbol{\mu})} \omega_1 d(\mu_1, \eta_2^*(\omega)) + \omega_2 d(\mu_2, \eta_2^*(\omega)) \\
&= \sup_{\omega \in \bar{\Delta}_K(\boldsymbol{\mu})} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \boldsymbol{\mu}),
\end{align*}
$$

where in the second equality we have used that there is no dependency on $\omega_i$ for $i > 2$.

It remains to analyze the situation in which $\star \in \{2, \dots, K-1\}$. We suppose that $\mu_{\star-1} \le \mu_{\star+1}$, as the case in which $\mu_{\star-1} \ge \mu_{\star+1}$ follows symmetrical reasonings.

We proceed by cases.

**Case 1** First of all, suppose that $\mu_{\star-1} = \mu_{\star+1}$. Then, by Lemma C.1 and C.2, we have that $\min_{a \in \mathcal{N}(\star)} f_a(\omega)$ can be rewritten as a function of $\omega_\star, \omega_{\star+1}$ and $\omega_{\star-1}$, thus showing that:

$$
T(\boldsymbol{\mu})^{-1} = \sup_{\omega \in \bar{\Delta}_K(\boldsymbol{\mu})} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \boldsymbol{\mu}).
$$

**Case 2** We now continue by analyzing the case in which $\mu_{\star-1} < \mu_{\star+1}$. We first show that for all $j < \star - 1$, it holds that $\omega_j^* = 0$. Indeed, suppose that there $j < \star - 1$, it holds that $\omega_j^* > 0$ holds. By applying Lemma C.1, we first rewrite:

$$
T^*(\boldsymbol{\mu}) = \sup_{\omega \in \bar{\Delta}_K} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \boldsymbol{\mu}).
$$

We now show that such $\boldsymbol{\omega}^*$ cannot belong to the supremum. First of all, from Lemma C.2 we have that:

$$
f_{\star+1}(\boldsymbol{\omega}^*, \boldsymbol{\mu}) = \omega_{\star+1}^* d(\mu_{\star+1}, \eta_{\star+1}^*(\boldsymbol{\omega}^*)) + \omega_{\star}^* d(\star, \eta_{\star+1}^*(\boldsymbol{\omega}^*))
$$

which is strictly increasing in $\omega_{\star+1}$ and $\omega_\star$, thus showing that there exists $\tilde{\omega}$ such that $f_{\star+1}(\tilde{\omega}, \mu) > f_{\star+1}(\omega^*, \mu)$, i.e., $\tilde{\omega}_\star = \omega_\star^* + \omega_j^*$ and $\tilde{\omega}_j = 0$. Similarly, consider $f_{\star-1}(\omega^*, \mu)$. Consider a generic $\omega$, and recall that from Lemma C.2, we have that:

$$
f_{\star-1}(\omega, \mu) = \inf_{\eta \in \mathbb{R}} \omega_{\star} d(\mu_{\star}, \eta) + \omega_{\star-1} d(\mu_{\star-1}, \eta) + \sum_{k \notin \{\star, \star-1\}} \omega_k d(\mu_k, \eta) \mathbf{1}\{\mu_k \ge \eta\}.
$$

Nevertheless, it is easy to see that there always exists $\eta \ge \mu_{\star-1}$ such that $\eta$ belongs to the argmin of $f_{\star-1}$.
Indeed:

$$
\begin{align*}
f_{\star-1}(\omega, \mu) &\ge \inf_{\eta \in \mathbb{R}} \omega_{\star} d(\mu_{\star}, \eta) + \omega_{\star-1} d(\mu_{\star-1}, \eta) + \sum_{\substack{k \notin \{\star, \star-1\}: \\ \mu_j \ge \mu_{\star-1}}} \omega_k d(\mu_k, \eta) \mathbf{1}\{\mu_k \ge \eta\} \\
&= \inf_{\eta \ge \mu_{\star-1}} \omega_{\star} d(\mu_{\star}, \eta) + \omega_{\star-1} d(\mu_{\star-1}, \eta) + \sum_{\substack{k \notin \{\star, \star-1\}: \\ \mu_j \ge \mu_{\star-1}}} \omega_k d(\mu_k, \eta) \mathbf{1}\{\mu_k \ge \eta\} \\
&= \inf_{\eta \ge \mu_{\star-1}} \omega_{\star} d(\mu_{\star}, \eta) + \omega_{\star-1} d(\mu_{\star-1}, \eta) + \sum_{k \notin \{\star, \star-1\}} \omega_k d(\mu_k, \eta) \mathbf{1}\{\mu_k \ge \eta\} \\
&\ge f_{\star-1}(\omega, \mu).
\end{align*}
$$

Therefore, by restricting the optimization of $f_{\star-1}(\omega, \mu)$ to $\eta \ge \mu_{\star-1}$, we have that $f_{\star-1}$ is a strictly continuous function of $\omega_\star$, thus showing that $\omega^*$ cannot belong to the supremum. Indeed, it holds that $\min_{a \in \mathcal{N}(\star)} f_a(\omega^*, \mu) < \min_{a \in \mathcal{N}(\star)} f(\tilde{\omega}, \mu)$.

Finally, we now show that for all $j > \star + 1$, it holds that $\omega_j^* = 0$. By applying Lemma C.1 and Lemma C.2, we can rewrite $T^*(\mu)^{-1}$ as follows:

$$
T^*(\boldsymbol{\mu})^{-1} = \sup_{\omega \in \bar{\Delta}_K} \min \{f_{\star-1}(\omega, \boldsymbol{\mu}), f_{\star+1}(\omega, \boldsymbol{\mu})\},
$$
where $f_{\star-1}(\omega, \mu)$, $f_{\star+1}(\omega, \mu)$ are given by:

$$ 
\begin{aligned}
f_{\star+1}(\omega, \mu) &= \omega_{\star+1}d(\mu_{\star+1}, \eta_{\star+1}^*(\omega)) + \omega_*d(\mu_*, \eta_{\star+1}^*(\omega)) \\
f_{\star-1}(\omega, \mu) &= \inf_{\eta \ge \mu_{\star-1}} \omega_*d(\mu_*, \eta) + \omega_{\star+1}d(\mu_{\star+1}, \eta) + \sum_{a > \star+1} \omega_a d(\mu_a, \eta) \mathbf{1}\{\mu_a \ge \eta\}
\end{aligned}
$$

We split the analysis into two further cases. First, we consider $\omega^*$ such that $\eta_{\star-1}^*(\omega^*) \ge \mu_{\star+1}$. Nevertheless, in this case, we have that $T^*(\mu)^{-1}$ is only a function of $\omega_*$, $\omega_{\star+1}$ and $\omega_{\star-1}$, thus showing that:

$$ T(\mu)^{-1} = \sup_{\omega \in \tilde{\Delta}_K(\mu)} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \mu). $$

Secondly, we consider the case in which $\eta_{\star-1}^*(\omega^*) \in [\mu_{\star-1}, \mu_{\star+1})$. Suppose that $f_{\star+1}(\omega^*, \mu) \ge f_{\star-1}(\omega^*, \mu)$. Nevertheless, we would have that:

$$ 
\begin{aligned}
f_{\star-1}(\omega^*, \mu) &> \omega_*^* d(\mu_*, \eta_{\star-1}^*(\omega^*)) + \omega_{\star-1}^* d(\mu_{\star-1}, \eta_{\star-1}^*(\omega^*)) + \omega_{\star+1}^* d(\mu_{\star+1}, \eta_{\star-1}^*(\omega^*)) \\
&\ge \omega_*^* d(\mu_*, \eta_{\star-1}^*(\omega^*)) + \omega_{\star+1}^* d(\mu_{\star+1}, \eta_{\star-1}^*(\omega^*)) \\
&\ge f_{\star+1}(\omega^*, \mu),
\end{aligned}
$$

thus leading to a contradiction.<fnref n="4" /> Similarly, if $f_{\star+1}(\omega^*, \mu) < f_{\star-1}(\omega^*, \mu)$, one can define $\tilde{\omega}$ as $\tilde{\omega}_{\star+1} = \omega_{\star+1}^* + \epsilon$ and $\tilde{\omega}_j = \omega_j^* - \epsilon$ for any $j > \star + 1$ such that $\omega_j^* > 0$. In this case, we note that $f_{\star+1}(\tilde{\omega}) > f_{\star+1}(\omega^*)$ since $f_{\star+1}$ is strictly increasing in $\omega_{\star+1}$ and it does not depend on $\omega_j$. Furthermore, since $f_{\star-1}$ is continuous in $\omega$, by picking $\epsilon$ sufficiently small, we have that $\min_{a \in \mathcal{N}(\star)} f_a(\tilde{\omega}, \mu) > \min_{a \in \mathcal{N}(\star)} f_a(\omega^*, \mu)$, thus contradicting the optimality of the non-sparse $\omega^*$.

Therefore, we have shown that:

$$ T(\mu)^{-1} = \sup_{\omega \in \tilde{\Delta}_K(\mu)} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \mu), $$

thus concluding the proof.

□

**Theorem 2.2.** Let $\mu \in S$. Then, we have

$$ T^*(\mu)^{-1} = \sup_{\omega \in \tilde{\Delta}_K(\mu)} \min_{i \in \mathcal{N}(\star)} g_i(\omega, \mu), \qquad (3) $$

where $g_i(\omega, \mu) := \inf_{x \in (\mu_i, \mu_*)} \omega_* d(\mu_*, x) + \omega_i d(\mu_i, x)$ and $\tilde{\Delta}_K(\mu) = \{\omega \in \Delta_K \mid \forall i \notin \mathcal{N}(\star) \cup \{\star\}, \omega_i = 0\}$.

*Proof.* To prove the result, we start from Lemma C.3, and we analyze:

$$ T^*(\mu)^{-1} = \sup_{\omega \in \tilde{\Delta}_K} \min_{a \in \mathcal{N}(\star)} f_a(\omega, \mu). $$

More specifically, we will be interested in proving that, for an optimal oracle allocation $\omega^*$, the following holds for all $a \in \mathcal{N}(\star)$:

$$ f_a(\omega^*, \mu) = g_a(\omega^*, \mu). \qquad (27) $$

From Lemma C.2, the claim is direct for all $\mu$ and all $a$ such that $a \in \operatorname{argmax}_{b \in \mathcal{N}(\star)} \mu_b$. It remains to show that Equation (27) holds for arm $a$ whenever $a \in \mathcal{N}(\star)$ and there exists $b \ne a$ and $b \ne \star$ such that $\mu_b > \mu_a$. To this end, suppose, without loss of generality, that $\mu_{\star-1} < \mu_{\star+1}$. Then, due to Lemma C.2, we know that, for all $\omega$:

$$ f_{\star-1}(\omega, \mu) = \inf_{\eta \in \mathbb{R}} \omega_* d(\mu_*, \eta) + \omega_{\star-1} d(\mu_{\star-1}, \eta) + \sum_{a \ge \star+1} \omega_a d(\mu_a, \eta) \mathbf{1}\{\mu_a \ge \eta\}. $$

<footnote n="4">⁴In the first step, we have used the fact that, since there exist $j > \star + 1$ such that $\omega_j^* > 0$, then it must hold that $\omega_j^* d(\mu_j, \eta_{\star-1}^*(\omega^*)) > 0$. Otherwise, one could define an alternative $\tilde{\omega}$ where $\tilde{\omega}_j = \omega_j^* - \epsilon$ and $\tilde{\omega}_* = \omega_* + \epsilon$ for a sufficiently small $\epsilon > 0$. It is direct to verify that $\tilde{\omega}$ contradicts the optimality of $\omega^*$.</footnote>
Suppose that $\eta_{\star-1}^*(\omega^*) \ge \mu_{\star+1}$. This directly implies that $f_{\star-1}(\omega^*, \mu) = g_{\star-1}(\omega^*, \mu)$. On the other hand, suppose that $\eta^*(\omega^*) < \mu_{\star+1}$. This would imply that:

$$f_{\star-1}(\omega^*, \mu) > \omega_{\star}^* d(\mu_{\star}, \eta_{\star-1}^*(\omega^*)) + \omega_{\star+1}^* d(\mu_{\star+1}, \eta_{\star-1}^*(\omega^*)) \\ \ge f_{\star+1}(\omega^*, \mu).$$

where in the first step we have used that an optimal solution $\omega^*$, it holds that $\omega_{\star-1}^* d(\mu_{\star-1}, \eta_{\star-1}^*(\omega^*)) > 0$ holds.<fnref n="5" /> Nevertheless, $f_{\star-1}(\omega^*, \mu) > f_{\star+1}(\omega^*, \mu)$ contradicts the optimality of $\omega^*$. Indeed, one can define $\tilde{\omega}$ as $\tilde{\omega}_{\star+1} = \omega_{\star+1}^* + \epsilon$ and $\tilde{\omega}_{\star-1} = \omega_{\star-1}^* - \epsilon$. In this case, we note that $f_{\star+1}(\tilde{\omega}) > f_{\star+1}(\omega^*)$ since $f_{\star+1}$ is strictly increasing in $\omega_{\star+1}$ and it does not depend on $\omega_{\star-1}$. Furthermore, since $f_{\star-1}$ is continuous in $\omega$, by picking $\epsilon$ sufficiently small, we have that $\min_{a \in \mathcal{N}(\star)} f_a(\tilde{\omega}, \mu) > \min_{a \in \mathcal{N}(\star)} f_a(\omega^*, \mu)$. $\square$

## C.2 Proof of Theorem 2.3

This proof uses techniques developed in (Al Marjani et al., 2022) for the problem of finding all good arms in a bandit.

For $i \in [K]$, let $\mu^{(i)}$ be the problem where arm $i$ has mean $\Delta > 0$ and all other arms have mean 0. All arms are Gaussian with variance 1. These are unimodal bandit problems.

We write $\mathbb{P}_{\mu}^{\tau}$ for the restriction of $\mathbb{P}_{\mu}$ to the $\sigma$-algebra generated by $\tau$. For any $\tau$-measurable event $E$ (for example $\{N_j(\tau) > n\}$), $\mathbb{P}_{\mu}^{\tau}(E) = \mathbb{P}_{\mu}(E)$.

We describe a bandit model by specifying the law of each successive reward from each arm: the first rewards queried from arm $k$ will have a given distribution, then the second reward will have a (possibly different) distribution, etc. We call the sequence of distributions an array of reward laws. In true bandit models, on which the algorithms are required to be $\delta$-correct, the distribution does not change. However for the construction of the lower bound we will use arrays where the distribution changes after some number $n$.

For $i, j \in [K]$, we write $\eta_{i \to j}^n$ for the following array of reward laws:

* For $k \notin \{i, j\}$, $\eta_{i \to j, k}^n$ is constant equal to $\mathcal{N}(0, 1)$.

* $\eta_{i \to j, i}^n$ is constant equal to $\mathcal{N}(\Delta, 1)$.

* For the first $n$ rewards, $\eta_{i \to j, j}^n$ is $\mathcal{N}(0, 1)$. For the next rewards, $\eta_{i \to j, j}^n$ is $\mathcal{N}(\Delta, 1)$.

**Lemma C.4.** For all $n \in \mathbb{N}$ and all $i, j \in [K]$,

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}) \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n).$$

*Proof.* We first show that

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}) \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) \le n)TV(\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) \le n), \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) \le n)) \\ + \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n)TV(\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) > n), \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) > n)).$$

This could be obtained by an application of the general property that conditioning increases $f$-divergences, but we give here a direct proof:

$$\begin{aligned} \mathbb{P}_{\mu^{(i)}}^{\tau} &= \mathbb{P}_{\mu^{(i)}}(N_j(\tau) \le n)\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) \le n) + \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n)\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) > n), \\ \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau} &= \mathbb{P}_{\eta_{i \to j}^{n}}(N_j(\tau) \le n)\mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) \le n) + \mathbb{P}_{\eta_{i \to j}^{n}}(N_j(\tau) > n)\mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) > n) \\ &= \mathbb{P}_{\mu^{(i)}}(N_j(\tau) \le n)\mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) \le n) + \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n)\mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) > n). \end{aligned}$$

The last equality is due to the two arrays of distributions being equal before $n$. By joint convexity of $TV$, we then have

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}) \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) \le n)TV(\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) \le n), \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) \le n)) \\ + \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n)TV(\mathbb{P}_{\mu^{(i)}}^{\tau}(\cdot | N_j(\tau) > n), \mathbb{P}_{\eta_{i \to j}^{n}}^{\tau}(\cdot | N_j(\tau) > n)).$$

<footnote n="5">⁵Indeed, if this was not the case, one could define an alternative $\tilde{\omega}$ where $\tilde{\omega}_{\star-1} = \omega_{\star-1}^* - \epsilon$ and $\tilde{\omega}_\star = \omega_\star^* + \epsilon$ for a sufficiently small $\epsilon > 0$. It is direct to verify that $\tilde{\omega}$ contradicts the optimality of $\omega^*$.</footnote>
Since $\mathbb{P}_{\mu^{(i)}}(\cdot | N_j(\tau) \le n) = \mathbb{P}_{\eta_{i \to j}^n}(\cdot | N_j(\tau) \le n)$, the first TV is zero. The second TV is at most 1. $\square$

**Lemma C.5.** For all $n \in \mathbb{N}$ and all $i, j \in [K]$,

$$KL(\mathbb{P}_{\eta_{i \to j}^n}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau}) \le n\Delta^2.$$

*Proof.* Since restricting to a sigma-algebra decreases $KL$ (data-processing inequality), $KL(\mathbb{P}_{\eta_{i \to j}^n}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau}) \le KL(\mathbb{P}_{\eta_{i \to j}^n}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau}) = n\Delta^2$. $\square$

**Lemma C.6.** For all $n \in \mathbb{N}$ and all $i, j \in [K]$,

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\mu^{(j)}}^{\tau}) \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) + \mathbb{P}_{\mu^{(j)}}(N_i(\tau) > n) + \sqrt{\frac{1}{2}n\Delta^2}.$$

*Proof.* Since TV is symmetric and satisfies the triangle inequality,

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\mu^{(j)}}^{\tau}) \le TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\eta_{i \to j}^n}^{\tau}) + TV(\mathbb{P}_{\mu^{(j)}}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau}) + TV(\mathbb{P}_{\eta_{i \to j}^n}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau})$$

For the first two distances on the r.h.s., we use Lemma C.4. For the third one, we use Pinsker's inequality to get

$$TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\mu^{(j)}}^{\tau}) \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) + \mathbb{P}_{\mu^{(j)}}(N_i(\tau) > n) + \sqrt{\frac{1}{2}KL(\mathbb{P}_{\eta_{i \to j}^n}^{\tau}, \mathbb{P}_{\eta_{j \to i}^n}^{\tau})} \\ = \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) + \mathbb{P}_{\mu^{(j)}}(N_i(\tau) > n) + \sqrt{\frac{1}{2}n\Delta^2}.$$

**Lemma C.7.** For all $n \in \mathbb{N}$ and all $i, j \in [K]$, for any $\delta$-correct algorithm,

$$1 - 2\delta \le TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\mu^{(j)}}^{\tau}).$$

*Proof.* By the $\delta$-correct assumption, and since $\{\hat{a}_{\tau} = i\}$ is $\tau$-measurable,

$$1 - 2\delta \le \mathbb{P}_{\mu^{(i)}}(\hat{a}_{\tau} = i) - \mathbb{P}_{\mu^{(j)}}(\hat{a}_{\tau} = i) \le TV(\mathbb{P}_{\mu^{(i)}}^{\tau}, \mathbb{P}_{\mu^{(j)}}^{\tau}).$$

**Lemma C.8.** For all $n \in \mathbb{N}$, for any $\delta$-correct algorithm,

$$\frac{nK}{2} \left( 1 - 2\delta - \sqrt{\frac{1}{2}n\Delta^2} \right) \le \frac{1}{K} \sum_i \mathbb{E}_{\mu^{(i)}}[\tau].$$

*Proof.* Combining Lemma C.7 and Lemma C.6, we have for all $i, j$,

$$1 - 2\delta \le \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) + \mathbb{P}_{\mu^{(j)}}(N_i(\tau) > n) + \sqrt{\frac{1}{2}n\Delta^2}.$$

We sum over all pairs $i, j$ and divide by the number of pairs, $K^2$, to get

$$1 - 2\delta \le \frac{2}{K^2} \sum_{i,j} \mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) + \sqrt{\frac{1}{2}n\Delta^2}.$$

Then use Markov's inequality: $\mathbb{P}_{\mu^{(i)}}(N_j(\tau) > n) \le \mathbb{E}_{\mu^{(i)}}[N_j(\tau)]/n$. We finally use $\sum_j \mathbb{E}_{\mu^{(i)}}[N_j(\tau)] = \mathbb{E}_{\mu^{(i)}}[\tau]$.

$$1 - 2\delta \le \frac{2}{nK^2} \sum_i \mathbb{E}_{\mu^{(i)}}[\tau] + \sqrt{\frac{1}{2}n\Delta^2}.$$

The result of the lemma is obtained by reordering that inequality.
**Theorem 2.3.** Let $\Delta > 0$ and, for $i \in [K]$, let $\nu^{(i)} := \mathcal{N}(\mu^{(i)}, I_K)$ where $\mu_i^{(i)} = \Delta$ and $\mu_j^{(i)} = 0$ if $j \neq i$. Then, for any $\delta \le 1/4$ and any $\delta$-correct strategy,

$$ \frac{1}{K} \sum_{i \in [K]} \mathbb{E}_{\nu^{(i)}}[\tau_{\delta}] \ge \frac{K}{64\Delta^2}. $$

There exists an instance $\nu^{(i)}$ s.t. $\mathbb{E}_{\nu^{(i)}}[\tau_{\delta}] \ge \frac{K}{64\Delta^2}$.

*Proof.* We choose $n = \frac{2}{\Delta^2} (\frac{1-2\delta}{2})^2$ in Lemma C.8 to obtain

$$ \frac{K}{\Delta^2} \left( \frac{1-2\delta}{2} \right)^3 \le \frac{1}{K} \sum_i \mathbb{E}_{\mu^{(i)}}[\tau]. $$

The bound of the theorem finally uses $\delta \le 1/4$.

<figure><img src="image_3.png" /></figure>

# D STOPPING RULES

## D.1 Generalized Likelihood Ratio (GLR)

The generalized log-likelihood ratio between the model space $\mathcal{M}$ and a subset $\Lambda \subseteq \mathcal{M}$ is

$$ \mathrm{GLR}_{t}^{\mathcal{M}}(\Lambda) := \log \frac{\sup_{\lambda \in \mathcal{M}} \mathcal{L}_{\lambda}(X_1, \dots, X_t)}{\sup_{\theta \in \Lambda} \mathcal{L}_{\theta}(X_1, \dots, X_t)}. $$

For a canonical one-parameter exponential family, the likelihood ratio for two models with means $\lambda, \theta \in \mathcal{M}$ is

$$ \log \frac{\mathcal{L}_{\lambda}(X_1, \dots, X_t)}{\mathcal{L}_{\theta}(X_1, \dots, X_t)} = \sum_{i \in [K]} N_i(t) (d(\hat{\mu}_i(t), \theta_i) - d(\hat{\mu}_i(t), \lambda_i)). $$

The maximum likelihood estimator (MLE) is defined as

$$ \tilde{\mu}(t) := \underset{\lambda \in \mathcal{M}}{\operatorname{argmin}} \sum_{i \in [K]} N_i(t) d(\hat{\mu}_i(t), \lambda_i). \qquad (28) $$

When $\hat{\mu}(t) \in \mathcal{M}$, the maximum likelihood estimator coincide with the empirical mean, i.e. $\hat{\mu}(t) = \tilde{\mu}(t)$.

**Model Space** In Unimodal bandits, our model space is the set $\mathcal{S}$ of unimodal instances defined in (1). Empirically, the empirical mean often fails to reflect the unimodal structure, i.e. $\hat{\mu}(t) \notin \mathcal{S}$. To the best of our knowledge, there is no efficient implementation to compute the MLE defined in (28) when considering $\mathcal{M} = \mathcal{S}$. To circumvent this computational bottleneck, we consider the unstructured model space $\mathcal{M} = \mathbb{R}^K$. Therefore, the GLR for set $\Lambda$ is

$$ \mathrm{GLR}_t(\Lambda) = \min_{\theta \in \Lambda} \sum_{i \in [K]} N_i(t) d(\hat{\mu}_i(t), \theta_i). \qquad (29) $$

At this point, it is important to note that $\mathrm{GLR}_t(\mathcal{S})$ can be large when the empirical evidence is conflicting with the unimodal structure. Due to the cumulative sum over all the arms, even small violation at the level of each arm will yield a large value of $\mathrm{GLR}_t(\mathcal{S})$. Therefore, we should be cautious when choosing the subset $\Lambda$ in our parallel testing procedures (detailed in Appendix D.2). On the one hand, $\Lambda$ should leverage the structure since smaller $\Lambda$ yields larger $\mathrm{GLR}_t(\Lambda)$. On the other hand, choosing $\Lambda$ too small by hinging too much on the structure will result in a statistic $\mathrm{GLR}_t(\Lambda)$ which is larger simply due to the cumulated violations of the structural constraint.
## D.2 Parallel Testing

We use the generalized likelihood ratio (GLR) stopping rule (Garivier and Kaufmann, 2016). The idea is to run K sequential tests in parallel. Given an answer $i \in [K]$, we should define a set $\neg i$ of alternative to $i$. Then, we consider the GLR statistic $GLR_t(\neg i)$ for the following two non-overlapping hypotheses $H_{0,i} : (\mu \in \neg i)$ against $H_{1,i} : (\mu \notin \neg i)$. Importantly, a high value of $GLR_n(\neg i)$ indicates that we have collected a large amount of evidence to reject $H_{0,i}$. Let $i_F(\hat{\mu}(t), N_t)$ be the set of instantaneous furthest (or instantaneous easiest-to-verify) answers which maximizes the GLR, i.e. $i_F(\hat{\mu}(t), N_t) = \text{argmax}_{i \in [K]} GLR_n(\neg i)$. At time $t$, it is natural to recommend $\hat{i}_t \in i_F(\hat{\mu}(t), N_t)$ as we have collected the most evidence that it is correct. The GLR stopping rule stops as soon as one of these tests can reject the null hypothesis with sufficient confidence. In other words, it stops as soon as the GLR statistic exceeds a given stopping threshold $c: \mathbb{N} \times (0, 1) \to \mathbb{R}_+$,

$$ \tau_{\delta} = \inf \left\{ t \mid \max_{i \in [K]} GLR_t(\neg i) > c(t-1, \delta) \right\}, \quad (30) $$

and recommends $\hat{i}_{\tau_{\delta}} \in \text{argmax}_{i \in [K]} GLR_{\tau_{\delta}}(\neg i)$ since $\mu$ is believed to admit $\hat{i}_{\tau_{\delta}}$ as a correct answer. When there are multiple correct answers, other tests could have rejected the null hypothesis if provided with more samples, i.e. several answers could satisfy that $GLR_t(\neg i) > 0$ at time $t$. Regardless of the sampling rule, the stopping threshold $c(t, \delta)$ is chosen to ensure $\delta$-correct by using time-uniform concentration results. Namely, it is such that the probability that there exists a time $t$ such that $GLR_t(\neg \hat{i}_t) \ge c(t-1, \delta)$ and $\hat{i}_t$ is not correct is upper bounded by $\delta$. We refer the reader to Appendix D.3 for more details on the proof of $\delta$-correctness.

The exact definition of the GLR stopping rule crucially depends on the choice of the set $\neg i$ of alternative to $i$. We explore several choices of $\neg i$ using the unimodal structure at different levels.

**Global Alternatives** Given an answer $i$, the set of global alternative to $i$ is defined as the set of unimodal instances which disagrees with the fact that arm $i$ is the best arm, i.e.

$$ \neg^{\text{G}} i = S \cap \left( \bigcup_{j \neq i} \{ \lambda \in \mathbb{R}^K \mid \lambda_j \ge \lambda_i \} \right). \quad (31) $$

Therefore, $GLR_t(\neg^{\text{G}} i)$ represents the amount of collected evidence to reject that $\theta$ is a unimodal instance for which arm $i$ is dominated by another arm. When there exists an arm $i$ such that $GLR_t(\neg^{\text{G}} i) > c(t-1, \delta)$, we can reject that $\theta \in \neg^{\text{G}} i$ at confidence level $1 - \delta$. Since we know that $\theta \in S$, it means that $i = i^*$ at confidence level $1 - \delta$.

Let $i^*(t) := i^*(\hat{\mu}(t))$ be the empirical best arm at time $t$. When $\hat{\mu}(t) \in S$, it is direct to show that $i^*(t) = i_F(\hat{\mu}(t), N_t)$ since $GLR_t(\neg^{\text{G}} i) = 0$ for all $i \neq i^*(t)$. Recall that we have $\text{Alt}(\hat{\mu}(t)) = \neg^{\text{G}} i^*(t)$. When $\hat{\mu}(t) \notin S$, multiple candidate answer $i$ will satisfy that $GLR_t(\neg^{\text{G}} i) > 0$. Since we don't necessarily have that $i^*(t) \in i_F(\hat{\mu}(t), N_t)$, using $i^*(t)$ as a recommendation rule is a principle choice only when $\hat{\mu}(t) \in S$. At early time $t$, more than being evidence to reject that arm $i$ is dominated by another arm, the statistics $(GLR_t(\neg^{\text{G}} i))_{i \in [K]}$ could be driven by the evidence in favor of rejecting that $\theta$ is unimodal. Echoing the discussion in Appendix D.1, this suggests that the global alternatives defined in (31) include too much structure.

**Local Alternatives** Instead of leveraging structure globally, we propose to use the unimodal structure locally, namely that global optimality is equivalent to local optimality in unimodal instances. Given an answer $i$, the set of local alternative to $i$ is defined as the set of instances which disagrees with the fact that arm $i$ is better than its neighbors, i.e.

$$ \neg^{\text{L}} i = \bigcup_{j \in \mathcal{N}(i)} \{ \lambda \in \mathbb{R}^K \mid \lambda_j \ge \lambda_i \}. \quad (32) $$

Therefore, $GLR_t(\neg^{\text{L}} i)$ represents the amount of collected evidence to reject that $\theta$ is an instance for which arm $i$ is dominated by one of its neighboring arms. When there exists an arm $i$ such that $GLR_t(\neg^{\text{L}} i) > c(t-1, \delta)$, we can reject that $\max_{j \in \mathcal{N}(i)} \theta_j \ge \theta_i$ at confidence level $1 - \delta$. Since it means that arm $\max_{j \in \mathcal{N}(i)} \theta_j < \theta_i$ at confidence level $1 - \delta$, knowing that $\theta \in S$ implies that $i = i^*$ at confidence level $1 - \delta$.

While $i^*(t) \in \{i \in [K] \mid GLR_t(\neg^{\text{L}} i) > 0\}$, we don't necessarily have $i^*(t) \in i_F(\hat{\mu}(t), N_t)$.
### D.3 Correctness

We now prove Lemma 3.1, i.e., the $\delta$-correctness of the stopping rule proposed in Equation (8). We now specify some notation. Let $C_G(x) = \min_{j \in \mathcal{N}(i)} \frac{g_G(\lambda)+x}{\lambda}$, where $g_G(\lambda)$ is given by:

$$g_G(\lambda) = 2\lambda - 2\lambda \log(4\lambda) + 2 \log \zeta(2\lambda) - \frac{1}{2} \log(1 - \lambda),$$

where $\zeta$ is the Riemann $\zeta$ function. We are now ready to prove Lemma 3.1.

*Proof of Lemma 3.1.* Define, for all $i \in [K]$, $\tilde{i}(i) := \underset{\mu}{\operatorname{argmax}}_{j \in \mathcal{N}(i)} \mu_i$. Then, with probabilistic arguments, we have that:

$$ \begin{aligned} \mathbb{P}_{\mu}(\tau_{\delta} < +\infty, \hat{i}_{\tau_{\delta}} \neq i^*) &\le \mathbb{P}_{\mu}\left(\exists t \in \mathbb{N}: \exists i \neq i^*: \min_{j \in \mathcal{N}(i)} W_t(i, j) \ge c(t-1, \delta)\right) \\ &\le \sum_{i \neq i^*} \mathbb{P}_{\mu}\left(\exists t \in \mathbb{N}: \min_{j \in \mathcal{N}(j)} W_t(i, j) \ge c(t-1, \delta)\right) \\ &\le \sum_{i \neq i^*} \mathbb{P}_{\mu}\left(\exists t \in \mathbb{N}: W_t(i, \tilde{i}(i)) \ge c(t-1, \delta)\right) \\ &\le \sum_{i \neq i^*} \mathbb{P}_{\mu}\left(\exists t \in \mathbb{N}: \sum_{k \in \{i, \tilde{i}(i)\}} N_k(t) d(\hat{\mu}_k(t), \mu_k) \ge c(t-1, \delta)\right) \\ &\le \delta. \end{aligned} $$

where (i) in the third inequality we used the definition of $\tilde{i}(i)$, and (ii) in the last step, we have used Theorem 9 in Kaufmann and Koolen (2021). □

## E TRACK-AND-STOP

The proof of Theorem 3.2, which shows that TaS is asymptotically optimal for unimodal bandits, follows the one of the original TaS algorithm (Garivier and Kaufmann, 2016) for unstructured best-arm identification problems. This is expected; indeed, Theorem 2.2 has reduced unimodal BAI problems to unstructured problems in which the only arms to be considered are $\star$ and $\mathcal{N}(\star)$.

Before provind the Theorem, we first recall a result on the C-Tracking forced exploration.

**Lemma E.1 (Lemma 7 in Garivier and Kaufmann (2016)).** Let $t \ge 1$ and $i \in [K]$, then, the C-Tracking rule ensures that $N_i(t) \ge \sqrt{t+K^2-2K}$ and:

$$ \left| N_i(t) - \sum_{s=0}^{t-1} \omega_i^*(s) \right| \le K(1 + \sqrt{t}). $$

As one can see from Lemma E.1, TaS pulls all the arms (even the ones for which $\omega_i^* = 0$ holds) at least $\sqrt{t}$ times.

We are now ready to prove Theorem 3.2.

*Proof of Theorem 3.2.* Let $\epsilon > 0$. Then, there exists $\xi = \xi(\epsilon) \le \frac{\min_{i \neq \star} \mu_i - \mu_i}{4}$ such that:

$$ \mathcal{I}_{\epsilon} := \prod_{i \in \star \cup \mathcal{N}(\star)} [\mu_i - \xi, \mu_i + \xi] $$

is such that, for all $\theta \in S$ in which the arms in $\star \cup \mathcal{N}(\star)$ belongs to $\mathcal{I}_{\epsilon}$, it holds that:

$$ \|\omega^*(\mu) - \omega^*(\theta)\| \le \epsilon. \qquad (33) $$

In the following, we will refer to this subset of bandit models as $S_{\epsilon}$. More precisely:

$$ S_{\epsilon} := \{\theta \in S : \forall i \in \star \cup \mathcal{N}(\star) : \theta_i \in [\mu_i - \xi, \mu_i + \xi]\}. $$
We note that the existence of $\xi$ such that Equation (33) is satisfied for all $\mu \in S_\epsilon$ is guaranteed by (i) the continuity of $\omega^*(\mu)$ in $\mu$, (ii) the sparsity of the oracle weights (i.e., Theorem 2.2) and (iii) the fact that $\omega^*(\mu)$ is not affected by the values of the arms which are not in $\star \cup \mathcal{N}(\star)$.

At this point, let $\mathcal{E}_\epsilon(T)$ be the following event:

$$ \mathcal{E}_\epsilon(T) := \bigcap_{t=h(T)}^{T} \{\tilde{\mu}(t) \in \mathcal{S}_\epsilon\} $$

where $h(T) = T^{1/4}$. Due to the definition of $\tilde{\mu}(t)$ and $S_\epsilon$, and by applying Lemma 19 in Garivier and Kaufmann (2016) together with Lemma E.1 (i.e., forced exploration), there exists constant $B$ and $C$ such that:

$$ \mathbb{P}_{\mu}(\mathcal{E}_{\epsilon}^{c}(T)) \leq B T \exp \left(-CT^{-\frac{1}{8}}\right). $$

The rest of the proof follows exactly as in the original TaS paper (Garivier and Kaufmann, 2016). □

# F OPTIMISTIC TRACK-AND-STOP

## F.1 Concentrations

We proceed by defining the event $\mathcal{E}_t$ in the following way:

$$ \mathcal{E}_n = \{\forall k \in [K], \forall t \le n, N_k(t)d(\hat{\mu}_k(t), \mu_k) \le f(n)\}. \quad (34) $$

We first show that, under Assumption 3.5, the event $\mathcal{E}_n$ enjoy nice statistical properties.

**Lemma F.1.** Under Assumption 3.5,

$$ \sum_{t=2}^{+\infty} t \mathbb{P}(\mathcal{E}_t^c) \le \gamma. $$

*Proof.*

$$ \sum_{t=2}^{+\infty} t \mathbb{P}(\mathcal{E}_t^c) \le \sum_{t=2}^{+\infty} \gamma \frac{\log t}{t^2} \le \gamma \int_{x=1}^{+\infty} \frac{\log x}{x^2} dx = \gamma. $$

As a direct consequence of the definition of $\mathcal{E}_t$, and of the exploration function $f(\cdot)$, we have the following result.

**Lemma F.2.** Under event $\mathcal{E}_t$, for all $s \in \{\lceil \sqrt{t} \rceil, \dots, t\}$ and all $k \in [K]$, $N_k(s)d(\hat{\mu}_k(s), \mu_k) \le f(s^2)$.

*Proof.* Under the event, $N_k(s)d(\hat{\mu}_k(s), \mu_k) \le f(n)$ and since $s \ge \sqrt{n}$ and $f$ is non-decreasing, $f(n) \le f(s^2)$. □

In the proof of the main theorem, we need to replace $\mu$ by $\hat{\mu}(t)$ or inversely in expressions involving divergences. We hence need to be able to control the error we introduce in those steps. To this end, we define $\Gamma(\mu_k, \mu'_k)$ as follows:

$$ \Gamma(\mu_k, \mu'_k) := \sup_{\theta \in \mathcal{S}} (d(\mu_k, \theta_k) - d(\mu'_k, \theta_k)). $$

In order to control $\Gamma(\cdot, \cdot)$, we begin by recalling some properties on the KL divergence for distributions in an exponential family.

**Lemma F.3.** For distributions in the exponential family with means $a, b, c$,

$$ d(a, b) = d(a, c) + d(c, b) + (\tilde{b} - \tilde{c})(c - a), $$

where we write $\tilde{a}$ for the natural parameter of the distribution with mean $a$.
Proof. For any $a, b$, $d(a, b) = \phi(\tilde{b}) - \phi(\tilde{a}) - (\tilde{b} - \tilde{a})a$.

$$d(a, b) - d(a, c) - d(c, b) = -(\tilde{b} - \tilde{a})a + (\tilde{c} - \tilde{a})a + (\tilde{b} - \tilde{c})c \\ = (\tilde{b} - \tilde{c})(c - a).$$

□

An immediate consequence of Lemma F.3 is $d(c, b) - d(a, b) \le (\tilde{c} - \tilde{b})(c - a)$.

At this point, we derive the following results.

**Lemma F.4.** Let $\mu \in \Theta$. Then, for all $\mu' \in \Theta$ it holds that:

$$\Gamma(\mu_k, \mu'_k) \le M|\mu_k - \mu'_k| \le M\sqrt{2\sigma^2 d(\mu_k, \mu'_k)}$$

Proof.

$$\Gamma(\mu_k, \mu'_k) = \sup_{\theta \in \mathcal{S}} (d(\mu_k, \theta_k) - d(\mu'_k, \theta_k)) \\ \le \sup_{\theta \in \mathcal{S}} (\nu_{\mu_k} - \nu_{\theta_k})(\mu_k - \mu'_k) \\ \le M|\mu_k - \mu'_k| \\ \le M\sqrt{2\sigma^2 d(\mu_k, \mu'_k)}.$$

where in the first step we have used Lemma F.3, in the second one Assumption 3.3 and the fact that $\mu \in \mathcal{S}$, and in the last step Assumption 3.4. □

## F.2 If the algorithm has not stopped at t

To inspect the behavior of our algorithm, let us introduce some additional notation. For each step $s$, we recall that $i^+(s) \in [K]$ denotes the arm that is optimal under the bandit model $\mu^+(s)$, namely $i^+(s) := i^*(\mu^+(s))$. Furthermore, for any $i \in [K]$, we denote by $q_i(t) = \sum_{s=\lceil\sqrt{t}\rceil}^t \mathbf{1}\{i^+(s) = i\}$ as the number of times between $\lceil\sqrt{t}\rceil$ and $t$ such that the $i^+(s) = i$. Given this definition, we first provide a lower bound on $q_\star$ that holds on the good event $\mathcal{E}_t$.

**Lemma F.5.** Under the good event $\mathcal{E}_t$ it holds that:

$$q_{\star}(t) \ge t - \sqrt{t} - \frac{2Kf(t^2) \ln(t)}{T^{\star}(\mu)^{-1}}.$$

Proof. Fix $i \in [K]$ and denote, for brevity, by $\neg i$ the set of unimodal bandits where $i$ is not the optimal arm. Then, let us define the following quantity:

$$\epsilon_t^i := \inf_{\theta \in \neg i} \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} \sum_{a \in [K]} \omega_i(s) d(\mu_a^+(s), \theta_a).$$

Then, it holds that:

$$\epsilon_t^i \ge \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} \inf_{\theta \in \text{Alt}(\mu^+(s))} \sum_{a \in [K]} \omega_a(s) d(\mu_a^+(s), \theta_a) \\ \ge \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} T^*(\mu)^{-1},$$

where, in the first step we have used the definition of infimum together with the fact that $i^+(s) = i$, and in the second one, we have used the definition of $\mathcal{E}_t$, and the fact that $\mu \in \tilde{\Theta}_s$ for $s \ge \lceil \sqrt{t} \rceil$. Therefore, have that:

$$\sum_{i \neq \star} \epsilon_t^i \ge (t - \sqrt{t} - q_\star(t)) T^*(\mu)^{-1}. \qquad (35)$$
Then, we proceed by upper-bounding $\sum_{i \neq \star} \epsilon_i^t$. Specifically, we have that:

$$ 
\begin{aligned}
\sum_{i \neq \star} \epsilon_t^i &= \sum_{i \neq \star} \inf_{\theta \in \neg i} \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} \sum_{a \in [K]} \omega_a(s) d(\mu_a^+(s), \theta_a) \\
&\le \sum_{i \neq \star} \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} \sum_{a \in [K]} \omega_a(s) d(\mu_a^+(s), \mu_a) \\
&\le f(t^2) \sum_{i \neq \star} \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s) = i} \sum_{a \in [K]} \frac{\omega_a(s)}{N_a(s)} \\
&\le f(t^2) \sum_{s \ge \lceil \sqrt{t} \rceil} \sum_{a \in [K]} \frac{\omega_a(s)}{N_a(s)} \\
&\le 2K f(t^2) \ln(t),
\end{aligned}
$$

where in the first inequality we used the definition of infimum together with the fact that $\mu \in \neg i$, in the second one we used Lemma F.2, and in the last one Lemma H.2. Combining this result with Equation (35) yields the desired result. □

**Lemma F.6** (If the algorithm has not stopped at $t$). If the algorithm has not stopped at $t$, then, on the event $\mathcal{E}_t$, it holds that:

$$ (t - \sqrt{t}) T^*(\mu)^{-1} \le c(t - 1, \delta) + h_1(t) + h_2(t) + h_3(t) + h_4(t). $$

where:

$$ h_1(t) := \min_{j \in \mathcal{N}(\star)} \left( \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} N_k(t) d(\mu_k, x) - W_t(\star, j) \right) $$

$$ h_2(t) := \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{j \in \{\star, j\}} \left( \sum_{s=1}^{t} \omega_k(s) - N_k(t) \right) d(\mu_k, x) $$

$$ h_3(t) := \sum_{s \in [t]} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) - \sum_{s \in [t]} \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} \omega_k(s) d(\mu_k, x) $$

$$ h_4(t) := \sum_{s \ge \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j^+(s), \mu_{i^+(s)}^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k^+(s), x) - \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)}^+)} \sum_{k \in \{j, i^+(s)\}} \omega_k(s) d(\mu_k, x) $$

*Proof.* If the algorithm has not stopped at $t$, then it holds that:

$$ c(t - 1, \delta) \ge \max_{i \in [K]} \min_{j \in \mathcal{N}(i)} W_t(i, j) \ge \min_{j \in \mathcal{N}(\star)} W_t(\star, j). $$
At this point, we further proceed by lower-bounding $\min_{j \in \mathcal{N}(\star)} W_t(\star, j)$.

$$
\begin{align*}
\min_{j \in \mathcal{N}(\star)} W_t(\star, j) &\ge \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} N_k(t) d(\mu_k, x) - h_1(t) \\
&\ge \sum_{s \in [t]} \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} \omega_k(s) d(\mu_k, x) - h_1(t) - h_2(t) \\
&= \sum_{s \in [t]} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) - h_1(t) - h_2(t) - h_3(t) \\
&\ge \sum_{s \ge \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) - h_1(t) - h_2(t) - h_3(t) - h_4(t) \\
&= \sum_{s \ge \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} g_j(\omega(s), \mu^+(s)) - h_1(t) - h_2(t) - h_3(t) - h_4(t) \\
&\ge \sum_{s \ge \sqrt{t}} \min_{j \in \mathcal{N}(\star)} g_j(\omega^*, \mu) - h_1(t) - h_2(t) - h_3(t) - h_4(t) \\
&= (t - \sqrt{t}) T^*(\mu)^{-1} - h_1(t) - h_2(t) - h_3(t) - h_4(t)
\end{align*}
$$

where the first steps follows from the definition of $h_1(t)$, $h_2(t)$, $h_3(t)$, and $h_4(t)$, while the last inequality follows from the definition of $\mu^+(s)$ together with the fact that, on $\mathcal{E}_t$, $\mu \in \tilde{\Theta}_t$.

<figure><img src="image_4.png" /></figure>

**Lemma F.7 (Upper bounds on $h(t)$).** Under the event $\mathcal{E}_t$ the following inequalities hold:

$$
\begin{align*}
h_1(t) &\le 3M \sqrt{2\sigma^2 f(t)} \\
h_3(t) &\le C_2 \sqrt{t} + \frac{2C_3 K f(t^2) \ln(t)}{T^*(\boldsymbol{\mu})^{-1}} \\
h_4(t) &\le M \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|.
\end{align*}
$$

for some problem dependent constant $C_1, C_2 \ge 0$. Furthermore, it holds that:

$$h_2(t) \le C_1 \ln(K),$$

for some problem dependent constant $C_1 \ge 0$.

*Proof.* We begin by upper-bounding $h_1(t)$. Let $\bar{\eta} \in \operatorname{argmin}_{\eta \in (\bar{\mu}_j(t), \bar{\mu}_\star(t))}$. Then, on $\mathcal{E}_t$, we have that:

$$
\begin{align*}
h_1(t) &:= \min_{j \in \mathcal{N}(\star)} \left( \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} N_k(t) d(\mu_k, x) - W_t(\star, j) \right) \\
&\le \min_{j \in \mathcal{N}(\star)} \sum_{k \in (\mu_j, \mu_\star)} N_k(t) (d(\mu_k, \bar{\eta}) - d(\hat{\mu}_k(t), \bar{\eta})) \\
&\le \min_{j \in \mathcal{N}(\star)} \sum_{k \in (\mu_j, \mu_\star)} N_k(t) \Gamma(\mu_k, \hat{\mu}_k(t)) \\
&\le M \min_{j \in \mathcal{N}(\star)} \sum_{k \in \{\star, j\}} N_k(t) \sqrt{2\sigma^2 d(\hat{\mu}_k(t), \mu_k)} \\
&\le 3M \sqrt{2\sigma^2 f(t)},
\end{align*}
$$

where (i) the first and second inequalities follow from the definition of $\bar{\eta}$ and $\Gamma$ respectively, (ii) the third one from Lemma F.4, and the (iii) by event $\mathcal{E}_t$.
Concerning $h_2(t)$, instead, we have that:

$$h_2(t) := \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{j \in \{\star, j\}} \left( \sum_{s=1}^{t} \omega_k(s) - N_k(t) \right) d(\mu_k, x) \\ \le \ln(K) \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{j \in \{\star, j\}} d(\mu_k, x) \\ := C_1 \ln(K)$$

Concerning $h_3(t)$, instead, we recall that:

$$h_3(t) := \sum_{s \in [t]} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) - \sum_{s \in [t]} \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} \omega_k(s) d(\mu_k, x). \quad (36)$$

Let us first consider $\sum_{s \le \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x)$. Specifically, for some problem dependent constant $C_2$, we have that:

$$\sum_{s \le \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) \le C_2 \sqrt{t},$$

We now analyze $\sum_{s > \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)})} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x)$. Specifically, this quantity can be rewritten as:

$$\sum_{s > \sqrt{t}} \min_{i^+(s) \neq \star} \inf_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) - \min_{j \in \mathcal{N}(\star)} \inf_{x \in (\mu_j, \mu_\star)} \sum_{k \in \{\star, j\}} \omega_k(s) d(\mu_k, x) \le \sum_{s > \sqrt{t}} C_3, \quad i^+(s) \neq \star$$

for some problem dependent constant $C_3$. Furthermore, on the good event $\mathcal{E}_t$ it holds that:

$$\sum_{s > \sqrt{t}} C_3 = C_3(t - \sqrt{t} - q_*(t)) \le \frac{2C_3 K f(t^2) \ln(t)}{T^*(\mu)^{-1}}, \quad i^+(s) \neq \star$$

where in the equality we have used the definition of $q_*(t)$, and in the inequality step Lemma F.5.

Concerning $h_4(t)$, instead, let $\bar{x}(s) \in \operatorname{argmin}_{x \in \mathbb{R}} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x)$. Then, we have that:

$$h_4(t) := \sum_{s \ge \sqrt{t}} \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j^+(s), \mu_{i^+(s)}^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k^+(s), x) - \min_{j \in \mathcal{N}(i^+(s))} \inf_{x \in (\mu_j, \mu_{i^+(s)}^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) \\ \le \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \left( \inf_{x \in (\mu_j^+(s), \mu_{i^+(s)}^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k^+(s), x) - \inf_{x \in (\mu_j, \mu_{i^+(s)}^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) \right) \\ = \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \left( \inf_{x \in \mathbb{R}} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k^+(s), x) - \inf_{x \in \mathbb{R}} \sum_{k \in \{i^+(s), j\}} \omega_k(s) d(\mu_k, x) \right) \\ \le \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) (d(\mu_k^+(s), \bar{x}(s)) - d(\mu_k, \bar{x}(s))) \\ \le \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) \Gamma(\mu_k^+(s), \mu_k) \\ \le M \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|,$$

where in the last step, we have used Assumption 3.3.

□
**Lemma F.8.** If the algorithm has not stop at t, then it holds that:

$$ (t - \sqrt{t})T^*(\boldsymbol{\mu})^{-1} \le c(t-1, \delta) + 3M\sqrt{2\sigma^2f(t)} + C_1 \ln(K) + \\ + C_2\sqrt{t} + \frac{2C_3Kf(t^2)\ln(t)}{T^*(\boldsymbol{\mu})^{-1}} + M \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|. $$

*Proof.* Combine Lemma F.6 and Lemma F.7. □

## F.3 Elimination of sub-optimal arms

In this section, we provide a more in depth the behavior of O-TaS. Specifically, we show that under a good event, the number of pulls to arms whose oracle weights is limited. To this end, we begin by providing properties of the $\tilde{\Theta}_t$.

**Proposition F.9.** Fix $j \in [K]$. Suppose there exists $j' > j$ such that $\exists \tilde{j} \in \{j, \dots, j' - 1\}$ such that $\beta_{\tilde{j}}(t) < \alpha_{j'}(t)$. Then, for all $\boldsymbol{\mu} \in \tilde{\Theta}_t$ it holds that:

$$ \mu_j \le \min_{i \in \{j, \dots, j'\}} \beta_i(t) \qquad \mu_j \ge \max_{i \le j} \alpha_i(t). \qquad (37) $$

Furthermore, suppose there exists $j' < j$ such that $\exists \tilde{j} \in \{j' + 1, \dots, j\}$ such that $\beta_{\tilde{j}}(t) < \alpha_{j'}(t)$. Then, for all $\boldsymbol{\mu} \in \tilde{\Theta}_t$ it holds that:

$$ \mu_j \le \min_{i \in \{j', \dots, j\}} \beta_i(t) \qquad \mu_j \ge \max_{i \ge j} \alpha_i(t). \qquad (38) $$

Finally, suppose there exists $j_1, j_2 \in [K]$ such that $j_1 < j < j_2$, and $\alpha_{j_1}(t) \ge \alpha_j(t)$ and $\alpha_{j_2}(t) \ge \alpha_j(t)$. Then, it holds that:

$$ \mu_j \ge \min\{\alpha_{j_1}(t), \alpha_{j_2}(t)\} \qquad (39) $$

*Proof.* We begin by proving Equation (37). Thanks to the definition of $j'$ and $\tilde{j}$, it is easy to verify that $i^*(\boldsymbol{\mu}) \ge j'$ holds for $\boldsymbol{\mu} \in \tilde{\Theta}_t$. Suppose there exists $\boldsymbol{\mu} \in \tilde{\Theta}_t$ such that $\mu_j > \min_{i \in \{j, \dots, j'\}} \beta_i(t)$. This implies that $\mu_j > \mu_i$, but since $i^*(\boldsymbol{\mu}) \ge j'$, this means that $\mu_i \le \mu_{i+1}$ holds for all $i \le i^*(\boldsymbol{\mu})$, and, therefore, $\boldsymbol{\mu} \notin \tilde{\Theta}_t$. At this point, it remains to prove that $\mu_j \ge \max_{i \le j} \alpha_i(t)$ holds. Let us proceed by contradicion and suppose that there exists $\boldsymbol{\mu} \in \tilde{\Theta}_t$ such that $\mu_j < \alpha_i(t)$ for some $i < j$. This implies that $\mu_j < \alpha_i(t) \le \mu_i$. However, since $i^*(\boldsymbol{\mu}) \ge j'$, this means that $\mu_i \le \mu_{i+1}$ holds for all $i \le i^*(\boldsymbol{\mu})$, and, therefore, $\boldsymbol{\mu} \notin \tilde{\Theta}_t$.

The proof of Equation (38) follows by simmetrical reasoning.

Finally, we prove Equation (39). We proceed by contradiction, suppose that there exists $\boldsymbol{\mu} \in \tilde{\Theta}_t$ such that $\mu_j < \min\{\alpha_{j_1}(t), \alpha_{j_2}(t)\}$, that is $\mu_j < \alpha_{j_1}(t)$ and $\mu_j < \alpha_{j_2}(t)$. By definition of $\tilde{\Theta}_t$, we also have that $\mu_{j_1} \ge \alpha_{j_1}(t)$ and $\mu_{j_2} \ge \alpha_{j_2}(t)$. Therefore, this would imply $\mu_j < \mu_{j_1}$ and $\mu_j < \mu_{j_2}$. However, since $j_1 < j < j_2$, this is impossible since the unimodal constraints are not respected, and therefore $\boldsymbol{\mu} \notin \tilde{\Theta}_t$, thus concluding the proof. □

We now provide a lower bound to the number of pulls to that any arm $a \in \mathcal{N}(\star)$.

**Lemma F.10.** Let $a \in \mathcal{N}(\star)$. Then, there exists a problem dependent constant $C_\mu$ such that, on $\mathcal{E}_t$, the following holds:

$$ N_a(t) \ge C_\mu \left( t - \sqrt{t} - \frac{2Kf(t^2)\ln(t)}{T^*(\boldsymbol{\mu})^{-1}} \right) - \ln(K). \qquad (40) $$

*Proof.* Due to Lemma H.2, we have that:

$$ N_a(t) \ge \sum_{s \in [t]} \omega_a(s) - \ln(K) \ge \sum_{s \ge \lceil \sqrt{t} \rceil, i^+(s)=\star} \omega_a(s) - \ln(K). \qquad (41) $$
Furthermore, whenever $s \ge \lceil \sqrt{t} \rceil$ and $i^+(s) = \star$, the following inequalities hold thanks to the definition of $\mu^+(s)$ and the fact that, on $\mathcal{E}_t$, $\mu \in \tilde{\Theta}_s$ (i.e., Lemma F.2):

$$ \mu_{\star}^{+}(s) \geq \mu_{\star} \geq \mu_{\star-1} \geq \mu_{\star-1}^{+}(s) $$

$$ \mu_{\star}^{+}(s) \geq \mu_{\star} \geq \mu_{\star+1} \geq \mu_{\star+1}^{+}(s) $$

As a direct consequence of Theorem 2.2, this also implies that $\omega_a(s) > 0$ for all $a \in \mathcal{N}(\star)$. Plugging this result within Equation (41) and applying Lemma F.5 yields Equation (40). $\square$

Given this result, we provide the following Lemma that shows a peculiar aspect of the behavior of O-TaS. As we shall later see, this will play in optimizing second order terms in the analysis of the expected sample complexity of O-TaS.

**Lemma F.11.** Consider $a \in \mathcal{N}(\star)$ such that $a \neq \star$, and define $t_a^* \in \mathbb{N}$ as the smallest integer $n$ such that the following condition is satisfied:

$$ \mu_{\star} - \mu_a > 4 \sqrt{\frac{2\sigma^2 f(n^2)}{C_{\mu}\left(n - \sqrt{n} - \frac{2Kf(n^2)\ln(n)}{T^{\star}(\mu)^{-1}}\right) - \ln(K)}} $$

Consider $t \ge t_a^*$. On the good event $\mathcal{E}_t$, there does not exists any unimodal bandit $\mu' \in \tilde{\Theta}_t$ such that $i^*(\mu') = a$.

*Proof.* To prove the result, we notice that a necessary condition to have a unimodal bandit $\mu' \in \tilde{\Theta}_t$ such that $i^*(\mu') = a$ is that $\alpha_{i^*(\mu)}(t) \le \beta_a(t)$ holds at a certain step $t$. Nevertheless, we notice that, on the good event $\mathcal{E}_t$, the following inequalities holds for all $s \ge \lceil \sqrt{t} \rceil$:

$$ \alpha_{i^*(\mu)}(s) \geq \hat{\mu}_{i^*(\mu)}(s) - \sqrt{\frac{2\sigma^2 f(s^2)}{N_{i^*(\mu)}(s)}} \geq \mu_{i^*(\mu)}(s) - 2\sqrt{\frac{2\sigma^2 f(s^2)}{N_{i^*(\mu)}(s)}} \quad (42) $$

$$ \beta_a(s) \leq \hat{\mu}_a(s) + \sqrt{\frac{2\sigma^2 f(s^2)}{N_a(s)}} \geq \mu_a(s) + 2\sqrt{\frac{2\sigma^2 f(s^2)}{N_a(s)}}, \quad (43) $$

where we have applied, in all the inequalities, Lemma F.2, together with Assumption 3.4. From Equations (42)-(43), and applying Lemma F.10, we obtain that $\alpha_{i^*(\mu)}(s) > \beta_a(s)$ as soon as the following condition is verified:

$$ \mu_{i^*(\mu)} - \mu_a > 4 \sqrt{\frac{2\sigma^2 f(s^2)}{C_{\mu}\left(s - \sqrt{s} - \frac{2Kf(s^2)\ln(s)}{T^{\star}(\mu)^{-1}}\right) - \ln(K)}} $$

which concludes the proof. $\square$

As a direct consequence of Lemma F.11, denote $t^* = \max_{i \in \mathcal{N}(\star)} t_i^*$. Then, on the good event $\mathcal{E}_t$, there is no bandit model $\mu'$ in $\tilde{\Theta}_t$ such that $i^*(\mu') = i$ for all $i \neq \star$.

**Theorem F.12.** There exists $T \in \mathbb{N}$ such that for all $t \ge T$, on $\mathcal{E}_t$, $N_a(t) = N_a(T)$ for all $a \notin \mathcal{N}(\star)$.

*Proof.* Let $T$ be such that $T \ge t^*$. Then, for all $t \ge T$, on $\mathcal{E}_t$, $i^+(t) = \star$ (Lemma F.11). Furthermore, due to Theorem 2.2, $\omega(t)$ is sparse on $\mathcal{N}(\star)$. The results than follows due to the C-tracking sampling rule. $\square$

## F.4 Sample Complexity Results

Given the results of Section F.3, we now upper bound the last remaining term in Lemma F.8, that is $\sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|$. Finally, we will provide a finite time analysis of O-TaS (which, in turn, will imply an asymptotic optimality result).
**Lemma F.13.** Let us define $t^* = \max_{a \in \mathcal{N}(\star)} t_a^*$. On the good event $\mathcal{E}_t$ it holds that:

$$ \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| \le \sqrt{2\sigma^2 f(t^2)} \min \{K \ln(K) + 2\sqrt{2Kt}, 2t^* + 3\ln(3) + 2\sqrt{6t}\}. $$

*Proof.* First of all, we have that:

$$ \begin{aligned} \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| & \le \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) \sqrt{2\sigma^2 d(\mu_k^+(s), \mu_k)} \\ & \le \sqrt{2\sigma^2 f(t^2)} \sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \frac{\omega_k(s)}{\sqrt{N_k(s)}} \\ & \le \sqrt{2\sigma^2 f(t^2)} (K \ln(K) + 2\sqrt{2Kt}), \end{aligned} $$

where, in the first step we have used Assumption 3.4, in the second one we have used Lemma F.2, and in the last one Lemma H.2.

Furthermore, $\sum_{s \ge \sqrt{t}} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|$ can be decomposed into the following terms:

$$ \sum_{s=\lceil\sqrt{t}\rceil}^{t^*} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| \quad (44) $$

$$ \sum_{s=t^*+1}^{t} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k|. \quad (45) $$

We now first upper bound Equation (44).

$$ \begin{aligned} \sum_{s=\lceil\sqrt{t}\rceil}^{t^*} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| & \le \sum_{s=\lceil\sqrt{t}\rceil}^{t^*} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) \sqrt{2\sigma^2 d(\mu_k^+(s), \mu_k)} \\ & \le \sum_{s=\lceil\sqrt{t}\rceil}^{t^*} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \frac{\omega_k(s)}{\sqrt{N_k(s)}} \sqrt{2\sigma^2 f((t^*)^2)} \\ & \le 2t^* \sqrt{2\sigma^2 f((t^*)^2)} \end{aligned} $$

where, in the first step we have used Assumption 3.4 and in the second one Lemma F.2. Finally, it remains to bound Equation (45). Specifically, we have that:

$$ \begin{aligned} \sum_{s=t^*+1}^{t} \max_{j \in \mathcal{N}(i^+(s))} \sum_{k \in \{i^+(s), j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| & = \sum_{s=t^*+1}^{t} \max_{j \in \mathcal{N}(\star)} \sum_{k \in \{\star, j\}} \omega_k(s) |\mu_k^+(s) - \mu_k| \\ & \le \sum_{s=t^*+1}^{t} \max_{j \in \mathcal{N}(\star)} \sum_{k \in \{\star, j\}} \omega_k(s) \sqrt{2\sigma^2 d(\mu_k^+(s), \mu_k)} \\ & \le \sum_{s=t^*+1}^{t} \max_{j \in \mathcal{N}(\star)} \sum_{k \in \{\star, j\}} \frac{\omega_k(s)}{\sqrt{N_k(s)}} \sqrt{2\sigma^2 f(t^2)} \\ & \le \sum_{s=0}^{t} \sum_{j \in \mathcal{N}(\star)} \sum_{k \in \{\star, j\}} \frac{\omega_k(s)}{\sqrt{N_k(s)}} \sqrt{2\sigma^2 f(t^2)} \\ & \le \sqrt{2\sigma^2 f(t^2)} (3 \ln(3) + 2\sqrt{6t}), \end{aligned} $$

where in the first step we have used Lemma F.11, in the second one Assumption 3.4, in the third one Lemma F.2, and in the last one Lemma H.2.

Combining these results yields the result.

□
**Theorem F.14 (O-TaS Sample Complexity).** Let $T_0(\delta)$ be defined as the first integer $t$ such that:

$$ (t - \sqrt{t})T^*(\boldsymbol{\mu})^{-1} > c(t - 1, \delta) + 3M\sqrt{2\sigma^2f(t)} + C_1\ln(K) + \\ + C_2\sqrt{t} + \frac{2C_3Kf(t^2)\ln(t)}{T^*(\boldsymbol{\mu})^{-1}} + \\ + M\sqrt{2\sigma^2f(t^2)}\min\{K\ln(K) + 2\sqrt{2Kt}, 2t^* + 3\ln(3) + 2\sqrt{6t}\}. $$

Then, it holds that:

$$ \mathbb{E}_{\nu}[\tau_{\delta}] \leq T_0(\delta) + \gamma. $$

*Proof.* The proof of $\delta$-correctness is from Lemma 3.1, which holds for any sampling rule. At this point, combining Lemma F.8 with Lemma F.13, we have that, if the algorithm has not stopped at $t$, then on the good event $\mathcal{E}_t$, $t \le T_0(\delta)$ holds. Therefore, for every $t > T_0(\delta)$, we have that $\mathcal{E}_t \subseteq \{\tau_\delta \le t\}$. Applying Lemma H.1, together with Lemma F.1 concludes the proof. $\square$

*Proof of Theorem 3.6.* The proof is a direct consequence of Theorem F.14. Specifically, due to Theorem F.14, we have that:

$$ \limsup_{\delta \to 0} \frac{\mathbb{E}_{\nu}[\tau_{\delta}]}{\log(1/\delta)} \le T^*(\boldsymbol{\mu}). $$

<figure><img src="image_5.png" /></figure>

## F.5 Efficient Implementation

We now discuss in detail how to efficiently implement the O-TaS routine. In this sense, we recall that the most crucial step is the computation of the following quantities:

$$ \begin{gathered} \boldsymbol{\mu}^+(t) \in \underset{\lambda \in \tilde{\Theta}_t}{\operatorname{argmax}} \sup_{\omega \in \tilde{\Delta}_K(\boldsymbol{\lambda})} \min_{i \in \mathcal{N}(i^*(\boldsymbol{\lambda}))} g_i(\omega, \boldsymbol{\lambda}) \\ \omega(t) \in \underset{\boldsymbol{\omega} \in \tilde{\Delta}_K(\boldsymbol{\mu}^+(t))}{\operatorname{argmax}} \min_{i \in \mathcal{N}(i^+(t))} g_i(\omega, \boldsymbol{\mu}^+(t)) \end{gathered} $$

We first show, for the sake of presentation, how to compute these quantities with a total complexity of $O(K^2)$ (i.e., Algorithm 1), and we then discuss how to leverage dynamic programming in order to obtain a fast $O(K)$ procedure.

Algorithm 1 first iterates over the different arms in order to compute an optimistic bandit model in which arm $i$ is the optimal arm (Step 1). Then, it computes the set $\mathcal{Z} \subseteq [K]$ of indices of valid unimodal bandits. Indeed, the procedure at Step 1 might produce a bandit model $\boldsymbol{\mu}^{(i)}$ that violates the unimodal constraints.<fnref n="6" /> Finally, it computes $i^+(t)$ by taking the argmax, over $j \in \mathcal{Z}$ of $T^*(\boldsymbol{\mu}^{(j)}(t))^{-1}$. Overall, the total complexity is controlled by Step 1 and Step 2, which both requires $O(K^2)$ computations.<fnref n="7" /> In the following, we will show that this simple procedure is correct, i.e., Algorithm 1 outputs $i^+(t)$.

First of all, we prove a basic property that connects $\mathcal{Z}$ with $\tilde{\Theta}_t$. Specifically, we will show that $\mathcal{Z}$ is an empty set if and only if $\tilde{\Theta}_t$ is empty.<fnref n="8" /> Furthermore, we also show that $i \in \mathcal{Z}$ if and only if there is at least one valid unimodal bandit within $\tilde{\Theta}_t$ such that $i$ is the optimal arm.

**Lemma F.15 (When $\mathcal{Z}$ is empty).** It holds that:

$$ \tilde{\Theta}_t = \emptyset \iff \mathcal{Z} = \emptyset. $$

<footnote n="6">⁶This is related to the fact that, according to the value of $\Theta_t$, there might not be any valid unimodal bandit in which $i$ is the optimal arm.</footnote>

<footnote n="7">⁷On the other hand, the computational complexity of Step 3 is $O(K)$ since each $\boldsymbol{\mu}^{(i)}$ is a unimodal bandit.</footnote>

<footnote n="8">⁸Notice that, in this case, O-TaS can return any possible weight and any possible answer $i$. Indeed, as we have seen in the proof of Theorem F.14 this events happen with low probability.</footnote>
**Algorithm 1 A $O(K^2)$ procedure for O-TaS.**

**Require:** $\Theta_t = \bigotimes_{i \in [K]} [\alpha_i(t), \beta_i(t)]$

// Step 1: Compute $\mu^{(i)}(t)$ for all $i \in [K]$

**for** $i \in [K]$ **do**

Initialize $\mu^{(i)}(t) = \{0\}_{i=1}^K$

Set $\mu_i^{(i)}(t) = \beta_i(t)$, $\mu_1^{(i)}(t) = \alpha_1(t)$, and $\mu_K^{(i)}(t) = \alpha_K(t)$

**for** $j \in \{1, \dots, i-1\}$ **do**

Set $\mu_j^{(i)}(t) = \max\{\mu_{j-1}^{(i)}(t), \alpha_j(t)\}$

**end for**

**for** $j \in \{K-1, \dots, i+1\}$ **do**

Set $\mu_j^{(i)}(t) = \max\{\mu_{j+1}^{(i)}(t), \alpha_j(t)\}$

**end for**

**end for**

// Step 2: Compute the set $\mathcal{Z}$ of valid unimodal bandits

$\mathcal{Z} := \{i \in [K] : \mu_j^{(i)}(t) \ge \mu_{j-1}^{(i)}(t) \ \forall j \le i \text{ and } \mu_j^{(i)}(t) \ge \mu_{j+1}^{(i)}(t) \ \forall j \ge i\}$

// Step 3: Return the optimistic model within $\mathcal{Z}$

**return** $i \in \operatorname{argmax}_{j \in \mathcal{Z}} T^*(\mu^{(j)}(t))^{-1}$

Furthermore, denote by $\tilde{\Theta}_{t,i}$ the subset of $\tilde{\Theta}_t$ where $i$ is the optimal arm. Formally:

$$ \tilde{\Theta}_{t,i} := \{ \mu \in \tilde{\Theta}_t : i^*(\mu) = i \}. $$

Then, for all $i \in [K]$, it holds that:

$$ i \in \mathcal{Z} \iff \tilde{\Theta}_{t,i} \neq \emptyset. $$

*Proof.* We first prove that $\tilde{\Theta}_t = \emptyset \implies \mathcal{Z} = \emptyset$. We proceed by contradiction. Suppose that $\mathcal{Z}$ is non-empty, then $\tilde{\Theta}_t$ cannot be empty. Indeed, fix $i \in \mathcal{Z}$, then $\mu^{(i)}(t) \in \tilde{\Theta}_t$ by construction.

We now show that $\mathcal{Z} = \emptyset \implies \tilde{\Theta}_t = \emptyset$. We proceed by contradiction. Suppose that $\tilde{\Theta}_t$ is non-empty. Then $\mathcal{Z}$ cannot be empty as well. Indeed, fix any $\mu \in \tilde{\Theta}_t$ and consider $i \in \operatorname{argmax}_{i \in [K]} \mu_i$. Then, $\mu^{(i)}(t) \in \tilde{\Theta}_t$ as well (and consequently, $i \in \mathcal{Z}$). Indeed, we recall that:

$$ \mu_j^{(i)}(t) = \begin{cases} \beta_j(t) & \text{if } j = i \\ \max\{\mu_{j-1}^{(i)}(t), \alpha_j(t)\} & \text{if } j < i \\ \max\{\mu_{j+1}^{(i)}(t), \alpha_j(t)\} & \text{if } j > i \end{cases} $$

To prove that $\mu^{(i)}(t)$ belongs to $\tilde{\Theta}_t$, one can start from $\mu$ and modify $\mu_i$ such that $\mu'_i = \beta_i(t)$. The resulting vector is within $\tilde{\Theta}_t$. Then, we can further modify this new vector by setting $\mu'_K = \alpha_K(t)$ and $\mu'_1 = \alpha_1(t)$. The resulting vector is within $\tilde{\Theta}_t$. The reasoning can then be iterated to modify all the remaining arms so that, in the end, the resulting vector is equal to $\mu^{(i)}$.

Finally, we prove $i \in \mathcal{Z} \iff \tilde{\Theta}_{t,i} \neq \emptyset$. We first show that $i \in \mathcal{Z} \implies \tilde{\Theta}_{t,i} \neq \emptyset$. If $i \in \mathcal{Z}$, it holds that $\mu^{(i)}(t) \in \tilde{\Theta}_t$, and consequently in $\tilde{\Theta}_{t,i}$ as its optimal arm is $i$. Now, we show that $\tilde{\Theta}_{t,i} \neq \emptyset \implies i \in \mathcal{Z}$. Fix $\mu \in \tilde{\Theta}_{t,i}$. Modifying $\mu$ as in the proof of $\mathcal{Z} = \emptyset \implies \tilde{\Theta}_t = \emptyset$, we obtain that $\mu^{(i)} \in \tilde{\Theta}_t$, and, consequently, $i \in \mathcal{Z}$, thus concluding the proof. $\square$

Given this first property, we now show the correctness of Algorithm 1.

**Lemma F.16.** It holds that:

$$ \max_{i \in \mathcal{Z}} T^*(\mu^{(j)}(t))^{-1} = \mu^+(t) $$

$$ \operatorname{argmax}_{i \in \mathcal{Z}} T^*(\mu^{(j)}(t))^{-1} = i^+(t). $$
Proof. If $\tilde{\Theta}_t = \emptyset$, then, the claim is direct from Lemma F.15. We now consider the case in which $\tilde{\Theta}_t \neq \emptyset$. Let Let us denote by $\tilde{\Theta}_{t,i}$ the subset of $\tilde{\Theta}_t$ where $i$ is the optimal arm. Formally:

$$ \tilde{\Theta}_{t,i} := \{ \boldsymbol{\mu} \in \tilde{\Theta}_t : i^*(\boldsymbol{\mu}) = i \}. $$

Then, the result follows by noticing that, for all $i \in \mathcal{Z}$, and all $\boldsymbol{\mu} \in \tilde{\Theta}_{t,i}$ it holds that:

$$ T^*(\boldsymbol{\mu}^{(i)})^{-1} \geq T^*(\boldsymbol{\mu})^{-1}. $$

Indeed, from Theorem 2.2, we know that, for any $\boldsymbol{\mu}$, $T^*(\boldsymbol{\mu})^{-1}$ is given by:

$$ T^*(\boldsymbol{\mu})^{-1} = \sup_{\boldsymbol{\omega} \in \tilde{\Delta}_K(\boldsymbol{\mu})} \min_{a \in \mathcal{N}(\star)} g_a(\boldsymbol{\omega}, \boldsymbol{\mu}), $$

where $g_a(\boldsymbol{\omega}, \boldsymbol{\mu}) := \inf_{x \in (\mu_a, \mu_*)} \omega_* d(\mu_*, x) + \omega_a d(\mu_a, x)$. Now, fix $\boldsymbol{\omega} \in \tilde{\Delta}_K(\boldsymbol{\mu})$ and $a \in \mathcal{N}(\star)$. Then, $g_a(\boldsymbol{\omega}, \boldsymbol{\mu})$ is maximized for $\mu_i$ equal to $\mu_i^{(i)}$ and $\mu_a$ equal to $\mu_a^{(i)}$. This is consequence of (i) the convexity of the KL divergence, and (ii) the fact that $\mu_i \le \mu_i^{(i)}$ for all $\boldsymbol{\mu} \in \tilde{\Theta}_{t,i}$ and $\mu_a \ge \mu_a^{(i)}$ for all $\boldsymbol{\mu} \in \tilde{\Theta}_{t,i}$.

Finally, to conclude the proof, it remains to show that $i^+(s)$ is such that $i^+(s) \notin \mathcal{Z}$. However, this is a direct consequence of Lemma F.15. □

Given the correctness of Algorithm 1, we now present a more efficient algorithm that, by exploiting dynamic programming, it obtains a computational complexity of $\mathcal{O}(K)$. The underlying idea is that it is possible to compute, in $\mathcal{O}(1)$, $\boldsymbol{\mu}^{(i)}$ starting from $\boldsymbol{\mu}^{(i-1)}$. Specifically, we have the following result.

**Lemma F.17.** Let $i > 1$. Then, it holds that:

$$ \begin{aligned} \mu_i^{(i)}(t) &= \beta_i(t) \\ \mu_{i-1}^{(i)}(t) &= \max\{\alpha_{i-1}(t), \mu_{i-2}^{(i-1)}(t)\} \\ \mu_j^{(i)}(t) &= \mu_j^{(i-1)}(t) \quad \forall j \notin \{i-1, i\}. \end{aligned} $$

Proof. The proof is direct by looking at the definition of $\mu_j^{(i)}(t)$ that we have given in Algorithm 1. Specifically, we recall that $\boldsymbol{\mu}^{(i)}$ is given by:

$$ \mu_j^{(i)}(t) = \begin{cases} \beta_j(t) & \text{if } j = i \\ \max\{\mu_{j-1}^{(i)}(t), \alpha_j(t)\} & \text{if } j < i \\ \max\{\mu_{j+1}^{(i)}(t), \alpha_j(t)\} & \text{if } j > i. \end{cases} $$

Lemma F.17 shows how to compute $\boldsymbol{\mu}^{(i)}(t)$ starting from $\boldsymbol{\mu}^{(i-1)}(t)$. Furthermore, we note that these two bandit models differ only at arms $i-1$ and $i$, which leads to a $\mathcal{O}(1)$ construction of $\boldsymbol{\mu}^{(i)}(t)$.

Given these considerations, the detail that remains to be discussed is how to compute $\mathcal{Z}$ efficiently (i.e., Step 2 in Algorithm 1). In other words, we need to determine which is the subset of indexes for which $\boldsymbol{\mu}^{(i)}(t)$ are unimodal bandits. We note that, a basic implementation of this step would require $\mathcal{O}(K^2)$ iterations, as it takes $\mathcal{O}(K)$ iterations for each $i \in [K]$. Nevertheless, as for the computation of $\boldsymbol{\mu}^{(i)}(t)$, one can resort to dynamic programming to determine if $i \in \mathcal{Z}$ in constant time. Specifically, from Lemma F.17, if $i-1 \in \mathcal{Z}$, then, $i \in \mathcal{Z}$ if an only if $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. On the other hand, if $i-1 \notin \mathcal{Z}$, the situation is more complex. Let $\mathcal{V}_i \subseteq [K]$ be the subset of arms such that $\mu_j^{(i)}(t) \notin [\alpha_j(t), \beta_j(t)]$ (note that $\mathcal{V}_i$ can be easily computed from $\mathcal{V}_{i-1}$ in $\mathcal{O}(1)$ due to Lemma F.17). Then, if $i-1 \notin \mathcal{Z}$, then $i \in \mathcal{Z}$ if and only if the following conditions are satisfied: (i) $\mathcal{V}_i = \emptyset$, and (ii) $\mu_i^{(i)}(t) > \mu_{i+1}^{(i)}(t)$ and $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. We give a formal statement of these claims in the following lemma.

**Lemma F.18.** Consider $i > 1$ and suppose that $i-1 \in \mathcal{Z}$. Then, $i \in \mathcal{Z} \iff \mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. Furthermore, for all $i \in [K]$ let $\mathcal{V}_i$ be the subset of arms such that $\mu_j^{(i)}(t) \notin [\alpha_j(t), \beta_j(t)]$. Formally:

$$ \mathcal{V}_i := \{j \in [K] : \mu_j^{(i)}(t) \notin [\alpha_j(t), \beta_j(t)]\}. $$
Then, if $i-1 \notin \mathcal{Z}$, then $i \in \mathcal{Z}$ if and only if the following conditions are satisfied:

$$ \mathcal{V}_i = \emptyset \qquad (46) $$

$$ \mu_i^{(i)}(t) > \mu_{i+1}^{(i)}(t) \text{ and } \mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t). \qquad (47) $$

*Proof.* We start by considering $i-1 \in \mathcal{Z}$, and we prove that $i \in \mathcal{Z} \iff \mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. To this end, we start by $i \in \mathcal{Z} \implies \mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. This is clearly true since, if $i \in \mathcal{Z}$, then $\mu_i^{(i)}(t)$ respects the unimodal constraints, and, therefore, $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$. We now continue by showing that $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t) \implies i \in \mathcal{Z}$. Fix $j \ge i$. Then, it holds that $\mu_j^{(i)}(t) \ge \mu_{j+1}^{(i)}(t)$ since (i) $\mu_i^{(i)}(t) = \beta_i(t) \ge \mu_i^{(i-1)}(t)$, $\mu_k^{(i)}(t) = \mu_k^{(i-1)}(t) \forall k > i$ (i.e., Lemma F.17), and (ii) $i-1 \in \mathcal{Z}$. Now, fix $j < i-1$; then, since $i-1 \in \mathcal{Z}$ and due to Lemma F.17, it holds that $\mu_j^{(i)}(t) \le \mu_{j+1}^{(i)}(t)$. Therefore, to prove $i \in \mathcal{Z}$ it remains to show that $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$, which, however, holds by assumption, thus concluding the proof.

We now continue by showing that, if $i-1 \notin \mathcal{Z}$, then $i \in \mathcal{Z}$ if and only if Equations (46)-(47) hold. We first show that $i \in \mathcal{Z}$ implies that Equations (46)-(47) hold. Nevertheless, this is direct by the definition of unimodal bandit and the fact that $\mu_i^{(i)}(t)$ belongs to $\tilde{\Theta}_t$. We now show that Equations (46)-(47) implies $i \in \mathcal{Z}$. First of all, we note that, due to the definition of $\mu_i^{(i)}(t)$, if $\mathcal{V}_i = \emptyset$, then it means that, for all $j > i$, $\mu_j^{(i)}(t) \ge \mu_{j+1}^{(i)}(t)$, and for all $j < i-1$, then $\mu_j^{(i)}(t) \le \mu_{j+1}^{(i)}(t)$. Furthermore, since $\mu_i^{(i)}(t) > \mu_{i+1}^{(i)}(t)$ and $\mu_i^{(i)}(t) > \mu_{i-1}^{(i)}(t)$ holds, we have that $i \in \mathcal{Z}$, thus concluding the proof. □

# G UNIMODAL TOP TWO

In Appendix G, we prove our upper bounds on the expected sample complexity of UniTT holding for any $\delta$ and any Gaussian instances having mean $\mu \in S$ (Theorem 3.7). Since we consider Gaussian distributions, we first recall some important properties on the $\beta$-characteristic times in Appendix G.1. In Appendix G.2, we define the concentration events under which UniTT will be analyzed and show that the UCB leader is the best arm except for a sublinear number of times. In Appendix G.3, we provide an upper bound on the expected number of samples before the UCB leader matches the best arm forever. In Appendix G.4, we give an upper bound on the time after which the challenger is not overshooting its $\beta$-optimal allocation when $|\mathcal{N}(i^*)| = 2$. In Appendix G.5, we conclude the proof of the three upper bounds contained in Theorem 3.7.

## G.1 Gaussian Characteristic Times

For Gaussian distributions with unit variance, the $\beta$-characteristic times $T_{\beta}^{*}(\mu)$ is defined in (17). Let $\omega_{\beta}^{*}(\mu)$ denotes its associated with their $\beta$-optimal allocation. The results recalled below are well-known in BAI (see e.g. Jourdan and Degenne (2023)). The $\beta$-optimal allocation is unique. Let $\omega_{\beta}^{*}$ denote its unique element. We have that $\min_{i \in \mathcal{N}(i^*) \cup \{i^*\}} \omega_{\beta,i}^{*} > 0$ and $\omega_{\beta,i}^{*} = 0$ for all $i \notin \mathcal{N}(i^*) \cup \{i^*\}$. Moreover, it satisfies the equality at equilibrium

$$ \forall i \in \mathcal{N}(i^*), \quad \frac{(\mu_{i^*} - \mu_i)^2}{1/\beta + 1/\omega_{\beta,i}^*} = 2T_{\beta}^*(\mu)^{-1}. \qquad (48) $$

When $|\mathcal{N}(i^*)| = 1$, we have $T^*(\mu) = T_{1/2}^*(\mu)$ and $\omega^*(\mu) = \omega_{1/2}^*(\mu)$.

When $|\mathcal{N}(i^*)| = 2$, let $j^* \in \operatorname*{argmax}_{j \in \mathcal{N}(i^*)} \mu_j$, $j \in \mathcal{N}(i^*) \setminus \{j^*\}$ and $x := \frac{\mu_{i^*} - \mu_j}{\mu_{i^*} - \mu_{j^*}}$. The ratio $\frac{T_{1/2}^*(\mu)}{T^*(\mu)}$ is independent of $\mu_{i^*} - \mu_j$, hence it is a function of $x$ only. Let $\Omega: [1, +\infty) \to [1, +\infty)$ be defined as $\Omega(x) := \frac{T_{1/2}^*(\mu)}{T^*(\mu)}$, and we plot it in Figure 2 (Figure 2(a) in Jourdan and Degenne (2023)). Numerically, we see that $\Omega$ is a decreasing function achieving its maximum $r_3 = 6/(1+\sqrt{2})^2 \approx 1.029$ at $x=1$, i.e. for neighbors having the same mean. Lemma C.6 in Jourdan and Degenne (2023) shows that $\Omega(1) = r_3$ and $\Omega'(1) = 0$. While 1 is an extremal point of $\Omega$, more properties should be proven to show that it is the global maximum as suggested by Figure 2.
<figure><img src="image_6.png" /><figcaption>Figure 2: Ratio of characteristic times $T_{1/2}^*(\mu)/T^*(\mu)$ when $|\mathcal{N}(i^*)| = 2$ as a function of $x = (\mu_{i^*} - \mu_j)/(\mu_{i^*} - \mu_{j^*})$ where $j^* \in \operatorname{argmax}_{i \in \mathcal{N}(i^*)} \mu_i$ and $j \in \mathcal{N}(i^*) \setminus \{j^*\}$. The dashed blue line is $r_2 = 6/(1 + \sqrt{2})^2$.</figcaption></figure>

## G.2 Concentration Events and UCB Leader

**Concentration Events** Let $\gamma_1 > 1$ and $\gamma_2 > 1$. Let $(\mathcal{E}_t)_{t>K}$ be the sequence of concentration events defined as $\mathcal{E}_t := \mathcal{E}_{1,t} \cap \mathcal{E}_{2,t}$ for all $t > K$ where

$$ \mathcal{E}_{1,t} := \left\{ \forall k \in [K], \forall s \in [t^{1/\gamma_1}, t], |\hat{\mu}_k(t) - \mu_k| < \sqrt{\frac{f_u(t)}{N_k(t)}} \right\} \quad \text{with} \quad f_u(t) = 2\gamma_1(1 + \gamma_2) \log t \quad \text{and} \quad (49) $$

$$ \mathcal{E}_{2,t} := \left\{ \forall (i, k) \in (\mathcal{N}(i^*) \cup \{i^*\})^2 \text{ s.t. } i \neq k, \forall t \le n, \frac{|(\hat{\mu}_i(t) - \hat{\mu}_k(t)) - (\mu_i - \mu_k)|}{\sqrt{1/N_i(t) + 1/N_k(t)}} < \sqrt{2(2 + \gamma_2) \log t} \right\}. \quad (50) $$

We only concentrate pairwise comparison between arms in $\mathcal{N}(i^*) \cup \{i^*\}$, which consists of three terms. Lemma E.2 in Jourdan and Degenne (2023) shows that $\mathbb{P}(\mathcal{E}_{1,t}^c) \le Kt^{-\gamma_2}$ for all $t > K$. Using the proof of Lemma 41 in Jourdan et al. (2023), we have $\mathbb{P}(\mathcal{E}_{1,t}^c) \le 3t^{-\gamma_2}$ for all $t > K$. Therefore, we have $\sum_{t>K} \mathbb{P}(\mathcal{E}_t^c) \le (K+3)\zeta(s)$.

For all $t > K$, recall that $\Theta_t = \bigotimes_{i \in [K]} [\hat{\mu}_i(t) \pm \sqrt{f_u(t)/N_i(t)}]$. Under $\mathcal{E}_{1,t}$, we have $\mu \in \Theta_s$ for all $s \in [t^{1/\gamma_1}, t]$. Since $\mu \in \mathcal{S}$, we have $\mu \in \tilde{\Theta}_s := \Theta_s \cap \mathcal{S}$. Therefore, $\tilde{\Theta}_s \neq \emptyset$ for all $s \in [t^{1/\gamma_1}, t]$.

**Unimodal UCB Leader** Lemma G.1 shows that the unimodal UCB leader is different from $i^*$ for only a sublinear number of times under a certain concentration event.

**Lemma G.1.** Let $(\mathcal{E}_{1,t})_t$ and $f_u$ as (49). Let $H_1(\mu) := \sum_{i \neq i^*} (\mu_i - \mu_i)^{-2}$. Under the event $\mathcal{E}_{1,t}$,

$$ \sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s \neq i^*) \le \frac{4f_u(t)}{\beta} H_1(\mu) + \frac{2(K-1)}{\beta}. \quad (51) $$

*Proof.* Let $s \in [t^{1/\gamma_1}, t]$ and $k \neq i^*$ such that $B_s = k$. Under the event $\mathcal{E}_{1,t}$, we have $\mu \in \tilde{\Theta}_s$ and the definition of $B_s$ in (14) yields

$$ \mu_{i^*} = \max_{i \in [K]} \mu_i \le \max_{\lambda \in \tilde{\Theta}_s} \max_{i \in [K]} \lambda_i = \max_{\lambda \in \tilde{\Theta}_s} \lambda_k \le \hat{\mu}_k(s) + \sqrt{\frac{f_u(s)}{N_k(s)}} \le \mu_k + \sqrt{\frac{4f_u(s)}{N_k(s)}} \le \mu_k + \sqrt{\frac{4f_u(t)}{N_k(s)}}. $$

Lemma H.3 yields that $N_k(s) \ge N_k^k(s) \ge \beta \sum_{j \in \mathcal{N}(k)} T_s(k, j) - 2$. By re-ordering the inequalities, we obtain

$$ \sum_{j \in \mathcal{N}(k)} T_s(k, j) \le \frac{4f_u(t)}{\beta(\mu_{i^*} - \mu_k)^2} + \frac{2}{\beta} \quad \text{and} \quad \sum_{j \in \mathcal{N}(k)} T_{s+1}(k, j) = \sum_{j \in \mathcal{N}(k)} T_s(k, j) + 1. $$

Therefore, using Lemma H.4 for $\mathcal{A} = [K] \setminus \{i^*\}$ concludes the proof. □
### G.3 Upper Bound on the Expected Number of Samples Before Leader Stays Correct

Let us define the set of undersampled arms as

$$U_s(t) = \left\{ i \in \mathcal{N}(i^*) \cup \{i^*\} \mid N_i(s) \le \frac{16 f_u(t)}{\min_{i \in \mathcal{N}(i)} (\mu_{i^*} - \mu_i)^2} \right\} \quad \text{where} \quad f_u(t) = 2\gamma_1(1 + \gamma_2) \log t.$$

Lemma G.2 shows that a necessary condition for a unimodal instance $\lambda$ in our confidence region to have a best arm $i^*(\lambda)$ which is different from $i^*$ is that there are still undersampled arms in $\mathcal{N}(i^*) \cup \{i^*\}$.

**Lemma G.2.** Let $(\mathcal{E}_{1,t})_t$ as (49). Under $\mathcal{E}_{1,t}$, there exists $\lambda \in \tilde{\Theta}_t$ such that $i^*(\lambda) \neq i^*$ implies that $U_t(t) \neq \emptyset$.

*Proof.* Under $\mathcal{E}_{1,t}$, suppose that there exists $\lambda \in \tilde{\Theta}_t$ such that $i^*(\lambda) \neq i^*$. This implies that

$$\mu_{i^*} - \sqrt{\frac{4f_u(t)}{N_{i^*}(t)}} \le \hat{\mu}_{i^*}(t) - \sqrt{\frac{f_u(t)}{N_{i^*}(t)}} \le \max_{i \in \mathcal{N}(i^*)} \left\{ \hat{\mu}_i(t) + \sqrt{\frac{f_u(t)}{N_i(t)}} \right\} \le \max_{i \in \mathcal{N}(i^*)} \left\{ \mu_i + \sqrt{\frac{4f_u(t)}{N_i(t)}} \right\},$$

since $i^*$ is the only possible choice otherwise. For the two outer inequalities, we leverage the concentration event $\mathcal{E}_{1,t}$. By rewriting this inequality, this implies that there exists $i \in \mathcal{N}(i^*)$ such that $\min\{N_i(t), N_{i^*}(t)\} \le \frac{16f_u(t)}{(\mu_{i^*} - \mu_i)^2}$, hence we have $U_t(t) \neq \emptyset$. $\square$

Lemma G.3 shows that the set of undersampled arms can be non-empty when the leader is the best arm for only a sublinear number of times under a certain concentration event.

**Lemma G.3.** Let $d_{\gamma_1, \gamma_2} = (2\sqrt{\gamma_1(1+\gamma_2)} + \sqrt{2+\gamma_2})^2$. Let $(\mathcal{E}_{1,t})_t$ and $(\mathcal{E}_{2,t})_t$ as (49) and (50). Let $H_1(\mu)$ as in Lemma G.1. Under the event $\mathcal{E}_t = \mathcal{E}_{1,t} \cap \mathcal{E}_{2,t}$,

$$\sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s = i^*, U_s(t) \neq \emptyset) \le \frac{32d_{\gamma_1, \gamma_2}}{\min\{\beta, 1-\beta\} \min_{i \in \mathcal{N}(i^*)} (\mu_{i^*} - \mu_i)^2} \log t + \frac{9}{\min\{\beta, 1-\beta\}}. \quad (52)$$

*Proof.* Let $s \in [t^{1/\gamma_1}, t]$ such that $B_s = i^*$ and $U_s(t) \neq \emptyset$. By definition in (15), we know that $C_t \in \mathcal{N}(i^*)$. When $i^* \in U_s(t)$, we satisfied the condition of Lemma H.4 since $T_{s+1}(i^*) = T_s(i^*) + 1$ and

$$T_s(i^*) \le \frac{1}{\min\{\beta, 1-\beta\}}(N_{i^*}(s) + 3) \le \frac{16f_u(t)}{\min\{\beta, 1-\beta\}\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} + \frac{3}{\min\{\beta, 1-\beta\}},$$

where we used Lemma H.3 for the first inequality. We assume that $i^* \notin U_s(t)$. When $C_s = i$ for $i \in U_s(t)$, we satisfied the condition of Lemma H.4 since $T_{s+1}(i) = T_s(i) + 1$ and

$$T_s(i) \le \frac{1}{\min\{\beta, 1-\beta\}}(N_i(s) + 3) \le \frac{16f_u(t)}{\min\{\beta, 1-\beta\}\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} + \frac{3}{\min\{\beta, 1-\beta\}},$$

where we used Lemma H.3 for the first inequality. We assume that $C_s = i$ where $i \notin U_s(t)$. Then, under $\mathcal{E}_{2,t}$,

$$\frac{\hat{\mu}_{i^*}(s) - \hat{\mu}_i(s)}{\sqrt{1/N_{i^*}(s) + 1/N_i(s)}} \ge \frac{\mu_{i^*} - \mu_i}{\sqrt{1/N_{i^*}(s) + 1/N_i(s)}} - \sqrt{2(2 + \gamma_2) \log t} \\ \ge (\mu_{i^*} - \mu_i)\sqrt{\min\{N_{i^*}(s), N_i(s)\}} - \sqrt{2(2 + \gamma_2) \log t}.$$

Let $i_0 \in U_s(t)$ for which we know that $i \neq i_0$. Then, under $\mathcal{E}_{2,t}$, we have

$$\frac{\hat{\mu}_{i^*}(s) - \hat{\mu}_{i_0}(s)}{\sqrt{1/N_{i^*}(s) + 1/N_{i_0}(s)}} \le \frac{\mu_{i^*} - \mu_{i_0}}{\sqrt{1/N_{i^*}(s) + 1/N_{i_0}(s)}} + \sqrt{2(2 + \gamma_2) \log t} \le (\mu_{i^*} - \mu_{i_0})\sqrt{N_{i_0}(s)} + \sqrt{2(2 + \gamma_2) \log t} \\ \le \sqrt{16f_u(t)} + \sqrt{2(2 + \gamma_2) \log t}.$$
Leveraging the definition of $C_s = i$ in (15) where $W_t(i, j)$ as in (5) and using Lemma H.3, we have

$$ \begin{aligned} \min\{T_s(i^*), T_s(i)\} &\le \frac{1}{\min\{\beta, 1-\beta\}}(\min\{N_{i^*}(s), N_i(s)\} + 3) \\ &\le \frac{\left(\sqrt{16f_u(t)} + \sqrt{8(2+\gamma_2)\log t}\right)^2}{\min\{\beta, 1-\beta\}\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} + \frac{3}{\min\{\beta, 1-\beta\}}. \end{aligned} $$

Therefore, there exists $j \in \{i, i^*\} = \{C_s, B_s\}$ such that $T_{s+1}(j) = T_s(j) + 1$ and

$$ T_s(j) \le \frac{\left(\sqrt{16f_u(t)} + \sqrt{8(2+\gamma_2)\log t}\right)^2}{\min\{\beta, 1-\beta\}\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} + \frac{3}{\min\{\beta, 1-\beta\}}. $$

Therefore, using $f_u(t) = 2\gamma_1(1+\gamma_2)\log t$ and Lemma H.4 for $\mathcal{A} = \mathcal{N}(i^*) \cup \{i^*\}$ concludes the proof. $\square$

Lemma G.4 gives a deterministic time after which the leader will always be the best arm provided concentration holds, and an upper bound on the expected number of samples before the leader stays the best arm forever.

**Lemma G.4.** Let $(\mathcal{E}_{1,t})_t$ and $(\mathcal{E}_{2,t})_t$ as (49) and (50). Let $H_{\gamma_1, \gamma_2}(\mu) := \gamma_1(1+\gamma_2)H_1(\mu) + \frac{4d_{\gamma_1, \gamma_2}}{\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2}.$

$$ L_{\mu} = \sup \left\{ t \mid t - 1 \le \lceil t^{1/\gamma_1} \rceil + \frac{8H_{\gamma_1, \gamma_2}(\mu)}{\min\{\beta, 1-\beta\}} \log t + \frac{7+2K}{\min\{\beta, 1-\beta\}} \right\}. $$

Then, for all $t > L_{\mu}$, under the event $\mathcal{E}_t = \mathcal{E}_{1,t} \cap \mathcal{E}_{2,t}$, we have $B_t = i^*$ and

$$ \beta(t-1) + 1 \ge N_{i^*}^{i^*}(t) \ge \beta(t-1 - L_{\mu}) - 2. $$

Moreover, we have $\mathbb{E}_{\mu}[\inf\{T \mid \forall t \ge T, B_t = i^*\}] \le L_{\mu} + 1 + (K+3)\zeta(s)$ where $\zeta$ is the Riemann $\zeta$ function.

**Proof.** Building on Lemmas G.1 and G.3, we obtain that

$$ \sum_{s \in [t^{1/\gamma_1}, t]} 1 (U_s(t) \neq \emptyset) \le \frac{8}{\min\{\beta, 1-\beta\}} \left( \gamma_1(1+\gamma_2)H_1(\mu) + \frac{4d_{\gamma_1, \gamma_2}}{\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} \right) \log t + \frac{7+2K}{\min\{\beta, 1-\beta\}}. $$

For all $i \in \mathcal{N}(i^*) \cup \{i^*\}$, let us define $n_i(t) = \max\{s \in [t^{1/\gamma_1}, t] \mid i \in U_s(t)\}$. By definition, we have $i \in U_s(t)$ for all $s \in [t^{1/\gamma_1}, n_i(t)]$ and $i \notin U_s(t)$ for all $s \in (n_i(t), n]$. Therefore, we have $U_s(t) \neq \emptyset$ for all $s \in [t^{1/\gamma_1}, \max_{i \in \mathcal{N}(i^*) \cup \{i^*\}} n_i(t)]$ and $U_s(t) = \emptyset$ for all $s > \max_{i \in \mathcal{N}(i^*) \cup \{i^*\}} n_i(t)$, hence

$$ \max_{i \in \mathcal{N}(i^*) \cup \{i^*\}} n_i(t) - \lceil t^{1/\gamma_1} \rceil - 1 = \sum_{s \in [t^{1/\gamma_1}, t]} 1 (U_s(t) \neq \emptyset). $$

Let $t > L_{\mu}$. Then, we have $t > \max_{i \in \mathcal{N}(i^*) \cup \{i^*\}} n_i(t)$ since

$$ \begin{aligned} t - \lceil t^{1/\gamma_1} \rceil - 1 &> \frac{8}{\min\{\beta, 1-\beta\}} \left( \gamma_1(1+\gamma_2)H_1(\mu) + \frac{4d_{\gamma_1, \gamma_2}}{\min_{i \in \mathcal{N}(i^*)}(\mu_{i^*} - \mu_i)^2} \right) \log t + \frac{7+2K}{\min\{\beta, 1-\beta\}} \\ &\ge \sum_{s \in [t^{1/\gamma_1}, t]} 1 (U_s(t) \neq \emptyset) = \max_{i \in \mathcal{N}(i^*) \cup \{i^*\}} n_i(t) - \lceil t^{1/\gamma_1} \rceil - 1. \end{aligned} $$

Therefore, we obtain that $U_t(t) = \emptyset$ as $U_t(t) \subseteq U_s(t)$. Using Lemma G.2, we obtain that there cannot exist $\lambda \in \tilde{\Theta}_t$ such that $i^*(\lambda) \neq i^*$. This implies that $B_t = i^*$. Therefore, we have shown that, for all $t > L_{\mu}$, we have $B_t = i^*$ under the event $\mathcal{E}_t$.

Using Lemma H.3 with the above result, we can show directly that

$$ \beta(t-1) + 1 \ge N_{i^*}^{i^*}(t) \ge \beta(t-1 - L_{\mu}) - 2. $$

Let $l_{\mu} = \inf\{T \mid \forall t \ge T, B_t = i^*\}$. Using a similar reasoning as for the proof of Lemma H.1, we have

$$ \mathbb{E}_{\mu}[l_{\mu}] = \sum_{t \ge 0} \mathbb{P}_{\mu}(l_{\mu} > t) \le L_{\mu} + 1 + \sum_{t > L_{\mu}} \mathbb{P}_{\mu}(\mathcal{E}_t^{\mathcal{C}}) \le L_{\mu} + 1 + (K+3)\zeta(s), $$

where we used the first part of the lemma. $\square$
While Lemma G.4 can be used in the non-asymptotic analysis, it is possible to obtain tighter upper bounds for the case $\mathcal{N}(i^*) = \{j^*\}$ by not using it directly.

**Explicit Upper Bound** For increased clarity, we provide a more explicit upper bound on $L_\mu$ by splitting the time. Let $\epsilon \in (0, 1)$. Then, it is direct to see that $L_\mu \le \max\{\tilde{L}_\mu, L_0\}$ with

$$ 
\begin{aligned}
\tilde{L}_\mu &= \sup \left\{ t \mid t \le (1 + \epsilon) \left( \frac{8H_{\gamma_1, \gamma_2}(\boldsymbol{\mu})}{\min\{\beta, 1 - \beta\}} \log t + \frac{9 + 2K}{\min\{\beta, 1 - \beta\}} \right) \right\} \\
&\le h_1 \left( \frac{8(1 + \epsilon)H_{\gamma_1, \gamma_2}(\boldsymbol{\mu})}{\min\{\beta, 1 - \beta\}}, \frac{(2K + 9)(1 + \epsilon)}{\min\{\beta, 1 - \beta\}} \right) = \mathcal{O}(H_1(\boldsymbol{\mu}) \log H_1(\boldsymbol{\mu})), \\
L_0 &= \sup \left\{ t \mid t^{(\gamma_1 - 1)/\gamma_1} \le \frac{1 + \epsilon}{\epsilon} \right\} \le \left( \frac{2}{\epsilon} \right)^{\gamma_1/(1 - \gamma_1)} = \mathcal{O}(1),
\end{aligned}
$$

where we used Lemma H.6 which defines $h_1(z, y) = z\bar{W}_{-1}(y/z + \log z) \approx_{z \to +\infty} z \log z$.

## G.4 Upper Bound on Overshooting Challenger When $|\mathcal{N}(i^*)| = 2$

Lemma G.5 gives a deterministic time after which the challenger will never overshoot its optimal allocation provided concentration holds.

**Lemma G.5.** Let $\gamma \in (0, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*)$. Let $(\mathcal{E}_{1,t})_t$ and $(\mathcal{E}_{2,t})_t$ as (49) and (50), $L_\mu$ as in Lemma G.4, and $S_t = \{i \in \mathcal{N}(i^*) \mid \frac{N_i^{i^*}(t)+2}{\omega_{\beta,i}^*+\gamma} \ge t - 1 - L_\mu\}$. Let $h_1$ as in Lemma H.6, $r(x) = 1 + 2(\sqrt{1 + 2x} - 1)^{-1}$ and

$$ D_{\mu} = h_1 \left( \frac{4(2 + \gamma_2)(1 - \beta)^2 T_{\beta}^{*}(\mu)}{\gamma^2 \beta^2} \frac{(L_{\mu} + 4)r(\gamma\beta/(1 - \beta))}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}} \right). $$

Then, for all $t > D_\mu$, under the event $\mathcal{E}_t = \mathcal{E}_{1,t} \cap \mathcal{E}_{2,t}$, we have $C_t \notin S_t$.

*Proof.* Let $t > L_\mu$. Under the event $\mathcal{E}_t$, Lemma G.4 yields that $B_t = i^*$, hence $C_t \in \mathcal{N}(i^*)$. Lemma H.3 yields $(N_i^{i^*}(t)+2)/\beta \ge \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) \ge t - 1 - L_\mu$. When $S_t = \mathcal{N}(i^*)$, using that $\sum_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* = 1 - \beta$, we obtain

$$ \sum_{i \in \mathcal{N}(i^*)} N_i^{i^*}(t) \ge (1 - \beta + 2\gamma)(t - 1 - L_\mu) - 4 \quad \text{and} \quad N_i^{i^*}(t) \ge \beta(t - 1 - L_\mu) - 2. $$

Therefore, we have a contradiction for $t > D_{1,\mu} = (L_\mu + 3)/\gamma + 1 \ge L_\mu \left(1 + \frac{1}{2\gamma}\right) + 3/\gamma + 1$ since

$$ t - 1 \ge \sum_{i \in \mathcal{N}(i^*) \cup \{i^*\}} N_i^{i^*}(t) \ge (1 + 2\gamma)(t - 1 - L_\mu) - 6 > t - 1. $$

In the following, we consider $t > D_{1,\mu} \ge L_\mu$. When $S_t = \emptyset$, then the result holds. Suppose that $S_t \ne \emptyset$, hence $|S_t| = 1$. Let $i \in S_t$ and $j \in S_t \setminus \{i\}$. We aim at showing that $W_t(i^*, i) > W_t(i^*, j)$ where $W_t(i, j)$ is defined in (5), hence $C_t = j \notin S_t$ by definition in (15). First,

$$ \max \left\{ (t - 1)\beta/N_i^{i^*}(t), (t - 1)(\omega_{\beta,i}^* + \gamma)/N_i^{i^*}(t) \right\} \le \left( 1 - \frac{L_\mu + 2/\min\{\beta, \omega_{\beta,i}^* + \gamma\}}{t - 1} \right)^{-1}. $$

Therefore, we obtain

$$ 
\begin{aligned}
\frac{\hat{\mu}_{i^*}(t) - \hat{\mu}_i(t)}{\sqrt{1/N_{i^*}(t) + 1/N_i(t)}} &\ge \sqrt{t-1} \frac{\mu_{i^*} - \mu_i}{\sqrt{1/\beta + 1/(\omega_{\beta,i}^* + \gamma)}} \frac{\sqrt{1/\beta + 1/(\omega_{\beta,i}^* + \gamma)}}{\sqrt{\frac{\beta(t-1)}{\beta N_{i^*}^{i^*}(t)} + \frac{(t-1)(\omega_{\beta,i}^* + \gamma)}{(\omega_{\beta,i}^* + \gamma)N_{i^*}^{i^*}(t)}}} - \sqrt{2(2 + \gamma_2) \log t} \\
&\ge \frac{\mu_{i^*} - \mu_i}{\sqrt{1/\beta + 1/(\omega_{\beta,i}^* + \gamma)}} \sqrt{t - 1 - L_\mu - 2/\min\{\beta, \omega_{\beta,i}^* + \gamma\}} - \sqrt{2(2 + \gamma_2) \log t}.
\end{aligned}
$$
Then, using that $1 - \beta - \omega_{\beta,i}^* - \gamma = \omega_{\beta,j}^* - \gamma$, we obtain

$$N_j(t) \leq t - 1 - N_{i^*}^{i^*}(t) - N_i^{i^*}(t) \leq (t-1)(\omega_{\beta,j}^* - \gamma) + (\beta + \omega_{\beta,i}^* + \gamma)L_{\mu} + 4.$$

Likewise, we have

$$N_{i^*}(t) \leq \beta \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) + (1 - \beta) \sum_{i \in \mathcal{N}(i^*)} T_t(i, i^*) + 3 \leq \beta(t-1) + (1 - \beta)L_{\mu} + 3.$$

Then, we obtain that

$$\min\{(t-1)\beta/N_{i^*}(t), (t-1)(\omega_{\beta,j}^* - \gamma)/N_j(t)\} \geq \left(1 + \frac{(L_{\mu} + 4)/\min\{\beta, \omega_{\beta,j}^* - \gamma\}}{t-1}\right)^{-1}.$$

Therefore, we obtain

$$\frac{\hat{\mu}_{i^*}(t) - \hat{\mu}_j(t)}{\sqrt{1/N_{i^*}(t) + 1/N_j(t)}} \leq \sqrt{t-1} \frac{\mu_{i^*} - \mu_j}{\sqrt{1/\beta + 1/(\omega_{\beta,j}^* - \gamma)}} \frac{\sqrt{1/\beta + 1/(\omega_{\beta,j}^* - \gamma)}}{\sqrt{\frac{\beta(t-1)}{\beta N_{i^*}(t)} + \frac{(t-1)(\omega_{\beta,j}^* - \gamma)}{(\omega_{\beta,j}^* - \gamma)N_j(t)}}} + \sqrt{2(2 + \gamma_2) \log t} \\ \leq \frac{(\mu_{i^*} - \mu_j)}{\sqrt{1/\beta + 1/(\omega_{\beta,j}^* - \gamma)}} \sqrt{t-1 + (L_{\mu} + 4)/\min\{\beta, \omega_{\beta,j}^* - \gamma\}} + \sqrt{2(2 + \gamma_2) \log t}.$$

Therefore, we have $W_t(i^*, i) > W_t(i^*, j)$ for $t > \max\{D_{2,\mu}, D_{1,\mu}, L_{\mu}\}$ where

$$D_{2,\mu} = \sup\{t \mid b_{\mu}\sqrt{t-1+c_{\mu}} \geq a_{\mu}\sqrt{t-1-c_{\mu}} - \sqrt{8(2+\gamma_2)\log t}\},$$

with $c_{\mu} = (L_{\mu} + 4)/\min\{\beta, \omega_{\beta,j}^* - \gamma, \omega_{\beta,i}^* + \gamma\}$,

$$a_{\mu} = \frac{\mu_{i^*} - \mu_i}{\sqrt{1/\beta + 1/(\omega_{\beta,i}^* + \gamma)}} \quad \text{and} \quad b_{\mu} = \frac{(\mu_{i^*} - \mu_j)}{\sqrt{1/\beta + 1/(\omega_{\beta,j}^* - \gamma)}}.$$

Combining the equality at equilibrium (48) and the fact that transportation costs are increasing function of their allocations, we know that $a_{\mu} > b_{\mu}$ hence $D_{\mu} < +\infty$. For increased clarity, we provide a more explicit upper bound. For $x \geq 0$, direct manipulation yields

$$(a_{\mu}\sqrt{x-c_{\mu}} - b_{\mu}\sqrt{x+c_{\mu}})^2 = (a_{\mu} - b_{\mu})^2 x - c_{\mu}(a_{\mu}^2 - b_{\mu}^2) + 2a_{\mu}b_{\mu}\left(x - \sqrt{x^2 - c_{\mu}^2}\right).$$

Therefore, we have

$$D_{2,\mu} \leq \sup \left\{ t \mid t - 1 \leq \frac{8(2 + \gamma_2)}{(a_{\mu} - b_{\mu})^2} \log t + c_{\mu} \left( 1 + 2 \left( \frac{a_{\mu}}{b_{\mu}} - 1 \right)^{-1} \right) \right\},$$

where we used that $\frac{a+b}{a-b} = 1 + 2(a/b - 1)^{-1}$ Note that $a_{\mu} = f(\gamma)$ and $b_{\mu} = g(\gamma)$ with $f(\gamma) = \frac{\mu_{i^*} - \mu_i}{\sqrt{1/\beta + 1/(\omega_{\beta,i}^* + \gamma)}}$ and $g(\gamma) = \frac{\mu_{i^*} - \mu_j}{\sqrt{1/\beta + 1/(\omega_{\beta,j}^* - \gamma)}}$. The equality at equilibrium (48) yields that $f(0)^2 = g(0)^2 = 2T_{\beta}^{*}(\mu)^{-1}$. Then, we have

$$\frac{f(\gamma)^2}{f(0)^2} - 1 = \gamma \frac{\beta}{\omega_{\beta,i}^*} (\beta + \omega_{\beta,i}^* + \gamma)^{-1} \geq \gamma \frac{\beta}{\omega_{\beta,i}^*} \geq \gamma \frac{\beta}{1 - \beta},$$

$$\frac{g(\gamma)^2}{g(0)^2} - 1 = -\gamma \frac{\beta}{\omega_{\beta,j}^*} (\beta + \omega_{\beta,j}^* - \gamma)^{-1} \leq -\gamma \frac{\beta}{\omega_{\beta,j}^*} \leq -\gamma \frac{\beta}{1 - \beta}.$$

Using that $(\sqrt{1+x} - \sqrt{1-x})^2 = 2(1 - \sqrt{1-x^2}) \geq x^2$ for $x \in [0, 1]$, we have

$$(a_{\mu} - b_{\mu})^{-2} \leq \frac{(1 - \beta)^2}{2\gamma^2\beta^2} T_{\beta}^{*}(\mu) \quad \text{and} \quad \left(\frac{a_{\mu}}{b_{\mu}} - 1\right)^{-1} \leq \left(\sqrt{1 + \frac{2\gamma\beta}{1 - \beta}} - 1\right)^{-1}.$$
Let $r(x) = 1 + 2(\sqrt{1 + 2x} - 1)^{-1}$. Therefore, we have

$$ D_{2,\mu} \le \sup \left\{ t \mid t-1 \le \frac{4(2+\gamma_2)(1-\beta)^2}{\gamma^2\beta^2} T_{\beta}^{*}(\mu) \log t + \frac{(L_{\mu}+4)r(\gamma\beta/(1-\beta))}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}} \right\} \\ \le D_{\mu} = h_1 \left( \frac{4(2+\gamma_2)(1-\beta)^2}{\gamma^2\beta^2} T_{\beta}^{*}(\mu), \frac{(L_{\mu}+4)r(\gamma\beta/(1-\beta))}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}} \right), $$

where $h_1(z, y)$ as in Lemma H.6. It is direct to see that $D_{\mu} \ge D_{1,\mu} = (L_{\mu} + 3)/\gamma + 1$, e.g. notice that $r(x) \ge 1/x$. □

Lemma G.6 shows that the empirical allocations of the neighbors $\mathcal{N}(i^*)$ are close to their optimal allocation provided concentration holds.

**Lemma G.6.** Let $\gamma \in (0, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*)$, $(\mathcal{E}_{1,t})_t$ and $(\mathcal{E}_{2,t})_t$ as (49) and (50), $L_{\mu}$ and $D_{\mu}$ as in Lemmas G.4 and G.5. Then, for all $t > D_{\mu}(\gamma)$, under the event $\mathcal{E}_t = \mathcal{E}_{1,t} \cap \mathcal{E}_{2,t}$, for all $i \in \mathcal{N}(i^*)$,

$$ (\omega_{\beta,i}^* - \gamma)(t - 1 - L_{\mu}) - 2D_{\mu} \le N_i^{i^*}(t) \le (\omega_{\beta,i}^* + \gamma)(t - 1 - L_{\mu}) + D_{\mu}. $$

*Proof.* Let $t \ge n > D_{\mu} \ge L_{\mu}$. Using Lemma G.4, we know that $\beta(t-1) + 1 \ge N_i^{i^*}(t) \ge \beta(t-1 - L_{\mu}) - 2$. For all $i \in \mathcal{N}(i^*)$, let $n_t(i) = \max \{n \ne t \mid \frac{N_i^{i^*}(t)+2}{\omega_{\beta,i}^*+\gamma} \le t - 1 - L_{\mu}\}$. Using Lemma G.5, we know that

$$ \frac{N_i^{i^*}(t) + 2}{\omega_{\beta,i}^* + \gamma} > t - 1 - L_{\mu} \quad \implies \quad i \in S_n \quad \implies \quad C_n \ne i. $$

Then, it is direct to show that

$$ N_i^{i^*}(t) \le D_{\mu} + \sum_{n=D_{\mu}+1}^{t} 1 \left( \frac{N_i^{i^*}(t)+2}{\omega_{\beta,i}^* + \gamma} \le t-1-L_{\mu} \right) 1(B_n = i^*, C_n = i = I_n) \\ \le N_i^{i^*}(n_t(i)) + D_{\mu} \le (\omega_{\beta,i}^* + \gamma)(t-1-L_{\mu}) + D_{\mu} - 2. $$

Let $i \in \mathcal{N}(i^*)$ and $j \in \mathcal{N}(i^*) \setminus \{i\}$. Then, we have

$$ N_i^{i^*}(t) = \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) - N_j^{i^*}(t) \ge (\omega_{\beta,i}^* - \gamma)(t - 1 - L_{\mu}) - D_{\mu} - L_{\mu} + 1. $$

This concludes the proof. □

## G.5 Non-Asymptotic Upper Bounds

Let $t > K$ such that $\mathcal{E}_t$ holds and the algorithm has not stop yet, i.e. $\mathcal{E}_t \cap \{t < \tau_\delta\}$. Let $s \in [t^{1/\gamma_1}, t]$ such that $B_s = i^*$. Let $c(t, \delta)$ as in (9), which satisfies that $t \mapsto c(t, \delta)$ is increasing. Using the stopping rule (8) where $W_t(i, j)$ is defined in (5) and $s \le t < \tau_\delta$, we obtain

$$ \sqrt{2c(t-1, \delta)} \ge \sqrt{2c(s-1, \delta)} \ge \min_{i \in \mathcal{N}(\hat{i}_s)} \frac{(\hat{\mu}_{\hat{i}_s}(s) - \hat{\mu}_i(s))_+}{\sqrt{1/N_{\hat{i}_s}(s) + 1/N_i(s)}} \ge \min_{i \in \mathcal{N}(B_s)} \frac{(\hat{\mu}_{B_s}(s) - \hat{\mu}_i(s))_+}{\sqrt{1/N_{B_s}(s) + 1/N_i(s)}} \\ = \frac{(\hat{\mu}_{B_s}(s) - \hat{\mu}_{C_s}(s))_+}{\sqrt{1/N_{B_s}(s) + 1/N_{C_s}(s)}}, $$

where the equality is obtained by definition of $C_s$ as in (15). The last inequality is true by definition of the candidate answer $\hat{i}_s$ as in (7) since $\hat{i}_s \in \operatorname*{argmax}_{i \in [K]} \min_{j \in \mathcal{N}(i)} W_s(i, j)$ implies that $\min_{j \in \mathcal{N}(\hat{i}_s)} W_s(\hat{i}_s, j) \ge$
$\min_{j \in \mathcal{N}(B_s)} W_s(B_s, j)$. Under $\mathcal{E}_{2,t}$, we obtain

$$
\begin{align*}
\frac{\hat{\mu}_{B_s}(s) - \hat{\mu}_{C_s}(s)}{\sqrt{1/N_{B_s}(s) + 1/N_{C_s}(s)}} &\ge \frac{\mu_{i^*} - \mu_{C_s}}{\sqrt{1/N_{i^*}(s) + 1/N_{C_s}(s)}} - \sqrt{2(2 + \gamma_2) \log t} \\
&\ge \frac{\mu_{i^*} - \mu_{C_s}}{\sqrt{1/N_{i^*}(s) + 1/N_{C_s}(s)}} - \sqrt{2(2 + \gamma_2) \log t} \\
&\ge \sqrt{\frac{1/\beta + 1/\omega_{\beta,C_s}^*}{1/N_{i^*}(s) + 1/N_{C_s}(s)}} \min_{i \in \mathcal{N}(i^*)} \frac{\mu_{i^*} - \mu_i}{\sqrt{1/\beta + 1/\omega_{\beta,i}^*}} - \sqrt{2(2 + \gamma_2) \log t} \\
&= \sqrt{\frac{1/\beta + 1/\omega_{\beta,C_s}^*}{1/N_{i^*}(s) + 1/N_{C_s}(s)}} \sqrt{2T_{\beta}^*(\boldsymbol{\mu})^{-1}} - \sqrt{2(2 + \gamma_2) \log t},
\end{align*}
$$

where the second inequality is obtained by artificially making appear $1/\beta + 1/\omega_{\beta,C_s}^*$ and taking the minimum of $i \in \mathcal{N}(i^*)$. The equality simply uses the definition of $\omega_{\beta}^*$ and $T_{\beta}^*(\mu)$ in (17).

**Outline** We conclude the proof of the non-asymptotic upper bound when $|\mathcal{N}(i^*)| = 1$ in Appendix G.5.1, which recovers asymptotic $\beta$-optimality. When $|\mathcal{N}(i^*)| = 2$, we provide two non-asymptotic upper bounds. First, a clipped analysis is leveraged in Appendix G.5.2 to obtain better non-asymptotic terms at the cost of a factor 2 in the asymptotic term. Second, we derive a tighter analysis in Appendix G.5.3 which recovers $\beta$-optimality at the cost of a worse non-asymptotic term.

### G.5.1 Tight Analysis When $\mathcal{N}(i^*) = \{j^*\}$

We know that $C_s = j^*, \omega_{\beta,C_s}^* = 1-\beta$ and $N_{i^*}^*(s) + N_{j^*}^*(s) = T_s(i^*, j^*) = \sum_{s \in [t-1]} 1(B_s = i^*)$. Using Lemmas H.3 and G.1, upper bounding the second order terms in $s$ by their equivalent in $t$ yields

$$
\begin{align*}
\min \left\{ \frac{1}{\beta}(N_{i^*}^{i^*}(s) + 1), \frac{1}{1-\beta}(N_{j^*}^{i^*}(s) + 1/2) \right\} &\ge T_s(i^*, j^*) \ge s - 1 - \sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s \neq i^*) - t^{1/\gamma_1} \\
&\ge s - 1 - \frac{4f_u(t)}{\beta} H_1(\boldsymbol{\mu}) - \frac{2(K-1)}{\beta} - t^{1/\gamma_1}.
\end{align*}
$$

Let $n_t = \sup\{s \in [t^{1/\gamma_1}, t] \mid B_s = i^*\}$. Then, we know that $n_t \ge t - \frac{4f_u(t)}{\beta}H_1(\boldsymbol{\mu}) - \frac{2(K-1)}{\beta}$. Therefore, we have

$$
\max \left\{ (t-1)\beta/N_{i^*}^{i^*}(n_t), (t-1)(1-\beta)/N_{j^*}^{i^*}(n_t) \right\} \le f_2(t) = \left( 1 - \frac{f_1(t) + 1/\min\{\beta, 1-\beta\}}{t-1} \right)^{-1},
$$

where $f_1(t) = t^{1/\gamma_1} + \frac{8f_u(t)}{\beta}H_1(\boldsymbol{\mu}) + \frac{4(K-1)}{\beta}$. Plugging in this inequality in the ones derived above and re-ordering the different terms in the inequalities, we obtain

$$
\begin{align*}
t - 1 &\le T_{\beta}^{*}(\boldsymbol{\mu}) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2 + \gamma_2) \log t} \right)^2 \frac{(t-1)/N_{i^*}^{i^*}(n_t) + (t-1)/N_{j^*}^{i^*}(n_t)}{1/\beta + 1/(1-\beta)} \\
&\le T_{\beta}^{*}(\boldsymbol{\mu}) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2 + \gamma_2) \log t} \right)^2 f_2(t),
\end{align*}
$$

where we removed the $(\cdot)_+$ since this will be trivially true for $t > T_{\mu}(\delta)$ where $T_{\mu}(\delta)$ is defined below. Using that $(t-1)/f_2(t) = t - 1 - f_1(t) - 1/\min\{\beta, 1-\beta\}$, we define

$$
T_{\mu}(\delta) = \sup \left\{ t \mid t \le T_{\beta}^{*}(\boldsymbol{\mu}) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2 + t^{1/\gamma_1} + \frac{16\gamma_1(1+\gamma_2)}{\beta} H_1(\boldsymbol{\mu}) + \frac{2(2K+1)}{\min\{\beta, 1-\beta\}} \right\}.
$$

Therefore, we have $\mathcal{E}_t \cap \{t < \tau_\delta\} = \emptyset$ (i.e. $\mathcal{E}_t \subset \{\tau_\delta \le t\}$) for all $t \ge T_{\mu}(\delta) + 1$. Using Lemma H.1, we have shown that $\mathbb{E}_{\mu}[\tau_\delta] \le T_{\mu}(\delta) + 1 + (K+3)\zeta(s)$.

**Asymptotic $\beta$-Optimality** It is direct to show that $\limsup_{\delta \to 0} \frac{\mathbb{E}_{\mu}[\tau_\delta]}{\log(1/\delta)} \le \limsup_{\delta \to 0} \frac{T_{\mu}(\delta)}{\log(1/\delta)} \le T_{\beta}^*(\mu)$, hence UniTT is asymptotically $\beta$-optimality. For $\beta = 1/2$, this shows asymptotic optimality since $T_{1/2}^*(\mu) = T^*(\mu)$ when $|\mathcal{N}(i^*)| = 1$.
**Explicit Upper Bound** For increased clarity, we provide a more explicit upper bound by splitting the time. Let $\epsilon \in (0, 1)$. Then, it is direct to see that $T_\mu(\delta) \le \max\{T_0(\delta), C_\mu, C_0\}$ with

$$ 
\begin{aligned}
T_0(\delta) &= \sup \left\{ t > K \mid t \le (1+\epsilon)T_\beta^*(\mu) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2)\log t} \right)^2 \right\}, \\
C_\mu &= \sup \left\{ t \mid t \le \frac{(1+\epsilon)32\gamma_1(1+\gamma_2)}{\epsilon\beta} H_1(\mu) \log t + \frac{4(1+\epsilon)(2K+1)}{\epsilon\min\{\beta, 1-\beta\}} \right\} \\
&\le h_1 \left( \frac{64\gamma_1(1+\gamma_2)}{\beta\epsilon} H_1(\mu), \frac{8(2K+1)}{\epsilon\min\{\beta, 1-\beta\}} \right), \\
C_0 &= \sup \left\{ t \mid t^{(\gamma_1-1)/\gamma_1} \le \frac{2(1+\epsilon)}{\epsilon} \right\} \le \left( \frac{4}{\epsilon} \right)^{\gamma_1/(\gamma_1-1)},
\end{aligned}
$$

where we used Lemma H.6 which defines $h_1(z, y) = z\bar{W}_{-1}(y/z + \log z) \approx z_{-1} + \infty z \log z$.

### G.5.2 Clipped Analysis When $|\mathcal{N}(i^*)| = 2$

Let $\omega_0 \in (0, 1/2]$ be an allocation threshold. Since $\sum_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* = 1-\beta$, there exists at most one arm $i \in \mathcal{N}(i^*)$ such that $\omega_{\beta,i}^* < (1-\beta)\omega_0$. Otherwise, we would have a contradiction as it would imply that $1-\beta < 2\omega_0(1-\beta)$.

We know that $\sum_{i \in \mathcal{N}(i^*) \cup \{i^*\}} N_i^{i^*}(t) = \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i)$. By the pigeonhole principle, at time $t$, there is an index $i_1 \in \mathcal{N}(i^*)$ such that

$$ N_{i_1}^{i^*}(t) \ge \frac{\omega_{\beta, i_1}^*}{1-\beta} \left( \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) \right). $$

Let $i_1$ be such an arm and denote by $i_2$ the unique arm in $\mathcal{N}(i^*) \setminus \{i_1\}$. We distinguish between three cases.

* Case 1: $\omega_{\beta, i_1}^* \ge (1-\beta)\omega_0$.

* Case 2: $\omega_{\beta, i_1}^* < (1-\beta)\omega_0$ and $N_{i_1}^{i^*}(t) \ge \omega_0 \left( \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) \right)$.

* Case 3: $\omega_{\beta, i_1}^* < (1-\beta)\omega_0$ and $N_{i_1}^{i^*}(t) < \omega_0 \left( \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) \right)$. Therefore, we have

$$ \omega_{\beta, i_2}^* > (1-\beta)(1-\omega_0) \quad \text{and} \quad N_{i_2}^{i^*}(t) \ge (1-\omega_0) \left( \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) \right). $$

Let us define $\omega_- = \max\{(1-\beta)\omega_0, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*\}$. In case 1, we define $\omega_1 = \omega_{\beta, i_1}^*$ and we have either $\omega_- = (1-\beta)\omega_0 \le \omega_1$ or $\omega_- = \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* \le \omega_1$. In case 2, we define $\omega_2 = (1-\beta)\omega_0$ and we have $\omega_- = (1-\beta)\omega_0 \le \omega_2$. In case 3, we define $\omega_3 = (1-\beta)(1-\omega_0)$ and we have $\omega_- = (1-\beta)\omega_0 \le \omega_3$. Let $k_0$ denote the case in which we are in. Combining the three above cases, we have shown that

$$ \exists i_0 \in \mathcal{N}(i^*), \quad \omega_{k_0} \ge \omega_{\beta, i_0}^* \quad \text{and} \quad N_{i_0}^{i^*}(t) \ge \frac{\omega_{k_0}}{1-\beta} \left( \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - N_{i^*}^{i^*}(t) \right). $$

We take such an arm $i_0$. Using Lemmas H.3 and G.1, we have

$$ N_{i_0}^{i^*}(t) \ge \omega_{k_0} \sum_{i \in \mathcal{N}(i^*)} T_t(i^*, i) - \frac{\omega_{k_0}}{1-\beta} \ge \omega_{k_0}(t-1) - \omega_{k_0} \left( t^{1/\gamma_1} + \frac{4f_u(t)}{\beta} H_1(\mu) + \frac{2(K-1)}{\beta} + \frac{1}{1-\beta} \right). $$

Let $n_t = \sup\{n \le t \mid (B_n, C_n) = (i^*, i_0)\}$. We distinguish between two cases in the following.

**Case A:** $n_t \ge t^{1/\gamma_1}$. Then, we have $N_{i_0}^{i^*}(n_t) \ge N_{i_0}^{i^*}(t) - 1$. Using that $\omega_{k_0} \ge \omega_-$, hence

$$ \frac{(t-1)\omega_{k_0}}{N_{i_0}^{i^*}(n_t)} \le \frac{(t-1)\omega_{k_0}}{N_{i_0}^{i^*}(n_t) - 1} \le \left(1 - \frac{f_1(t)}{t-1}\right)^{-1} \quad \text{with} \quad f_1(t) = t^{1/\gamma_1} + \frac{4f_u(t)}{\beta} H_1(\mu) + \frac{2(K-1)}{\beta} + \frac{1}{1-\beta} + \frac{2}{\omega_-}. $$
Using that $N_{i^*}^*(n_t) \ge T_{n_t}(i^*, i_0) - N_{i_0}^*(n_t)$ and $1/\beta \ge 0$, we obtain

$$1/N_{i^*}^*(n_t) + 1/N_{i_0}^*(n_t) \le \frac{1}{t-1} \left( 1/\beta + \frac{1}{\omega_{k_0}} \frac{(t-1)\omega_{k_0}}{N_{i_0}^*(n_t)} \right) \left( \frac{N_{i_0}^*(n_t)}{T_{n_t}(i^*, i_0) - N_{i_0}^*(n_t)} + 1 \right).$$

Since $T_{n_t}(i^*, i_0) \ge \frac{N_{i_0}^*(n_t)-1}{1-\beta}$, we have

$$\left( \frac{N_{i_0}^{i^*}(n_t)}{T_{n_t}(i^*, i_0) - N_{i_0}^{i^*}(n_t)} + 1 \right)^{-1} \ge \left( \frac{1-\beta}{\beta - 1/N_{i_0}^{i^*}(n_t)} + 1 \right)^{-1} = \beta - \frac{1-\beta}{N_{i_0}^{i^*}(n_t) - 1} \ge \beta - \frac{1-\beta}{(t-1-f_1(t))\omega_{k_0}}.$$

Using that $(1 - \frac{f_1(t)}{t-1})^{-1} \ge 1$ and the above results, we obtain

$$(1/N_{i^*}^{i^*}(n_t) + 1/N_{i_0}^{i^*}(n_t))^{-1/2} \ge \frac{\sqrt{t-1-f_1(t)}}{\sqrt{1/\beta + 1/\omega_{k_0}}} \sqrt{\beta - \frac{1-\beta}{(t-1-f_1(t))\omega_{-}}.}$$

Putting everything together and using that $\omega_{\beta,i_0}^* \le \omega_{k_0}$, we have

$$t-1 \le \frac{T_{\beta}^{*}(\boldsymbol{\mu})}{\beta} \left( \sqrt{c(t-1,\delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2 + f_1(t) + \frac{1-\beta}{\beta\omega_{-}}.$$

**Case B:** $n_t < t^{1/\gamma_1}$. Let $j_0 \in \mathcal{N}(i^*) \setminus \{i_0\}$. Then, we have $C_s = j_0$ for all $s \in [t^{1/\gamma_1}, t]$ such that $B_s = i^*$, i.e. $\sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s = i^*) = \sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s = i^*, C_s = j_0)$. Since $N_{i^*}^*(s) \ge T_s(i^*, j_0) - N_{j_0}^*(s)$, using Lemmas H.3 and G.1 yields

$$\min \left\{ \frac{1}{\beta}(N_{i^*}^{i^*}(s) + 1), \frac{1}{1-\beta}(N_{j_0}^{i^*}(s) + 1/2) \right\} \ge T_s(i^*, j_0) \ge s-1 - \sum_{s \in [t^{1/\gamma_1}, t]} 1(B_s \ne i^*) - t^{1/\gamma_1} \\ \ge s-1 - \left( t^{1/\gamma_1} + \frac{4f_u(t)}{\beta} H_1(\boldsymbol{\mu}) + \frac{2(K-1)}{\beta} \right).$$

Let $n_t = \sup\{s \in [t^{1/\gamma_1}, t] \mid B_s = i^*\}$. Then, we know that $C_{n_t} = j_0$ and $n_t \ge t - \frac{4f_u(t)}{\beta}H_1(\boldsymbol{\mu}) - \frac{2(K-1)}{\beta}$. Let $f_2(t) = t^{1/\gamma_1} + \frac{8f_u(t)}{\beta}H_1(\boldsymbol{\mu}) + \frac{4(K-1)}{\beta}$. Therefore, we have shown that

$$\max \left\{ (t-1)\beta/N_{i^*}^{i^*}(n_t), (t-1)(1-\beta)/N_{j_0}^{i^*}(n_t) \right\} \le \left( 1 - \frac{f_2(t) + 1/\min\{\beta, 1-\beta\}}{t-1} \right)^{-1}.$$

Using that $\omega_{\beta,j_0}^* \le 1 - \beta$, we conclude as in Appendix G.5.1 that

$$t-1 \le T_{\beta}^{*}(\boldsymbol{\mu}) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2 + f_2(t) + 1/\min\{\beta, 1-\beta\}.$$

**Summary.** Let us define

$$\tilde{T}_{\boldsymbol{\mu}}(\delta, \omega_0) = \sup \left\{ t > K \mid t \le \frac{T_{\beta}^{*}(\boldsymbol{\mu})}{\beta} \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2 + t^{1/\gamma_1} \right. \\ \left. + \frac{8f_u(t)}{\beta} H_1(\boldsymbol{\mu}) + \frac{2(2K-1)}{\min\{\beta, 1-\beta\}} + \frac{1+\beta}{\beta \max\{(1-\beta)\omega_0, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*\}} \right\}.$$

Combining both cases, for all $\omega_0 \in (0, 1/2]$, we have $\mathcal{E}_t \cap \{t < \tau_\delta\} = \emptyset$ (i.e. $\mathcal{E}_t \subset \{\tau_\delta \le t\}$) for all $t \ge \tilde{T}_{\boldsymbol{\mu}}(\delta, \omega_0) + 1$. The infimum of $\tilde{T}_{\boldsymbol{\mu}}(\delta, \omega_0)$ is achieved at $\omega_0 = 1/2$ since there is no trade-off. Using Lemma H.1, we have shown that $\mathbb{E}_{\boldsymbol{\mu}}[\tau_\delta] \le \tilde{T}_{\boldsymbol{\mu}}(\delta, 1/2) + 1 + (K+3)\zeta(s)$.
**Explicit Upper Bound** For increased clarity, we provide a more explicit upper bound by splitting the time. Let $\epsilon \in (0, 1)$. Then, it is direct to see that $\tilde{T}_{\mu}(\delta, 1/4) \le \max\{\tilde{T}_0(\delta), \tilde{C}_{\mu}, C_0\}$ with

$$
\begin{align*}
\tilde{T}_0(\delta) &= \sup \left\{ t > K \mid t \le \frac{(1+\epsilon)T_{\beta}^{*}(\boldsymbol{\mu})}{\beta} \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2)\log t} \right)^2 \right\}, \\
\tilde{C}_{\mu} &= \sup \left\{ t \mid t \le \frac{(1+\epsilon)32\gamma_1(1+\gamma_2)}{\epsilon \beta} H_1(\boldsymbol{\mu}) \log t + \frac{2(1+\epsilon)}{\epsilon} \left( \frac{2(2K-1)}{\min\{\beta, 1-\beta\}} + \frac{2(1+\beta)}{\beta(1-\beta)} \right) \right\} \\
&\le h_1 \left( \frac{64\gamma_1(1+\gamma_2)}{\beta\epsilon} H_1(\boldsymbol{\mu}), \frac{4}{\epsilon} \left( \frac{2(2K-1)}{\min\{\beta, 1-\beta\}} + \frac{2(1+\beta)}{\beta(1-\beta)} \right) \right), \\
C_0 &= \sup \left\{ t \mid t^{(\gamma_1-1)/\gamma_1} \le \frac{2(1+\epsilon)}{\epsilon} \right\} \le \left( \frac{4}{\epsilon} \right)^{\gamma_1/(\gamma_1-1)},
\end{align*}
$$

where we used Lemma H.6 which defines $h_1(z, y) = z\overline{W}_{-1}(y/z + \log z) \approx_{z \to +\infty} z \log z$.

G.5.3 Tight Analysis When $|\mathcal{N}(i^*)| = 2$

Let $L_\mu$ and $D_\mu$ as in Lemmas G.4 and G.5. Let $t \ge D_\mu \ge L_\mu$ such that $\mathcal{E}_t \cap \{t < \tau_\delta\}$ holds. Using Lemmas G.4 and G.6, we have $B_t = i^*$, $C_t = i \in \mathcal{N}(i^*)$, and

$$
\max \left\{ \frac{\beta(t-1)}{N_{i^*}^{i^*}(t)}, \frac{(\omega_{\beta,i}^* - \gamma)(t-1)}{N_{i^*}^{i^*}(t)} \right\} \le \left( 1 - \frac{L_\mu + 2D_\mu / \min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}}{t-1} \right)^{-1} .
$$

Using the stopping rule (8) and similar arguments as above, we obtain

$$
\begin{align*}
\sqrt{2c(t-1, \delta)} &\ge \frac{(\hat{\mu}_{i^*}(t) - \hat{\mu}_{C_t}(t))_+}{\sqrt{1/N_{i^*}(t) + 1/N_{C_t}(t)}} \\
&\ge \frac{\mu_{i^*} - \mu_{C_t}}{\sqrt{1/N_{i^*}^{i^*}(t) + 1/N_{C_t}^{i^*}(t)}} - \sqrt{2(2+\gamma_2)\log t} \\
&\ge \sqrt{\frac{1/\beta + 1/\omega_{\beta,C_t}^*}{1/\beta + 1/(\omega_{\beta,C_t}^* - \gamma)}} \sqrt{2T_{\beta}^*(\boldsymbol{\mu})^{-1}} \sqrt{t-1 - \frac{3D_{\mu}}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}}} - \sqrt{2(2+\gamma_2)\log t}
\end{align*}
$$

Let $j \in \mathcal{N}(i^*)$. Using the same notation as in the proof of Lemma G.5, one can show that

$$
\frac{g(\gamma)^2}{g(0)^2} - 1 = - \frac{\gamma\beta}{\omega_{\beta,j}^*(\beta + \omega_{\beta,j}^* - \gamma)} \geq - \frac{\gamma}{\min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*}.
$$

Using this result and re-ordering the terms, we obtain

$$
t - 1 \le \frac{T_{\beta}^{*}(\boldsymbol{\mu})}{1 - \frac{\gamma}{\min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^{*}}} \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2 + \frac{3D_{\mu}}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^{*} - \gamma\}}.
$$

Let us define

$$
T_{\mu}(\delta) = \sup \left\{ t > K \mid t - 1 \le \frac{T_{\beta}^{*}(\boldsymbol{\mu}) \left( \sqrt{c(t-1, \delta)} + \sqrt{(2+\gamma_2) \log t} \right)^2}{1 - \gamma / \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^{*}} + \frac{3D_{\mu}}{\min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^{*} - \gamma\}} \right\}.
$$

Therefore, we have $\mathcal{E}_t \cap \{t < \tau_\delta\} = \emptyset$ (i.e. $\mathcal{E}_t \subset \{\tau_\delta \le t\}$) for all $t \ge T_\mu(\delta) + 1$. Using Lemma H.1, we have shown that $\mathbb{E}_\mu[\tau_\delta] \le T_\mu(\delta) + 1 + (K+3)\zeta(s)$.

**Asymptotic β-Optimality** It is direct to show that $\limsup_{\delta \to 0} \frac{\mathbb{E}_{\mu}[\tau_{\delta}]}{\log(1/\delta)} \le \limsup_{\delta \to 0} \frac{T_{\mu}(\delta)}{\log(1/\delta)} \le \frac{T_{\beta}^{*}(\mu)}{1 - \gamma / \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^{*}}$. Taking $\gamma \to 0$, we obtain asymptotic β-optimality.
**Algorithm 2 A $O(K^2)$ procedure for UniTT.**

**Require:** $\Theta_t = \bigotimes_{i \in [K]} [\alpha_i(t), \beta_i(t)]$

// Step 1: Compute $\mu^{(i)}(t)$ for all $i \in [K]$

**for** $i \in [K]$ **do**

Initialize $\mu^{(i)}(t) = \{0\}_{i=1}^K$

Set $\mu_i^{(i)}(t) = \beta_i(t)$, $\mu_1^{(i)}(t) = \gamma_1(t)$, and $\mu_K^{(i)}(t) = \alpha_K(t)$

**for** $j \in \{1, \dots, i-1\}$ **do**

Set $\mu_j^{(i)}(t) = \max\{\mu_{j-1}^{(i)}(t), \alpha_j(t)\}$

**end for**

**for** $j \in \{K-1, \dots, i+1\}$ **do**

Set $\mu_j^{(i)}(t) = \max\{\mu_{j+1}^{(i)}(t), \alpha_j(t)\}$

**end for**

**end for**

// Step 2: Compute the set $\mathcal{Z}$ of valid unimodal bandits

$\mathcal{Z} := \{i \in [K] : \mu_j^{(i)}(t) \ge \mu_{j-1}^{(i)}(t) \forall j \le i \text{ and } \mu_j^{(i)}(t) \ge \mu_{j+1}^{(i)}(t) \forall j \ge i\}$

// Step 3: Return the optimistic arm within $\mathcal{Z}$

**return** $i \in \operatorname{argmax}_{j \in \mathcal{Z}} \mu_j^{(j)}$

**Explicit Upper Bound** For increased clarity, we provide a more explicit upper bound by splitting the time. Let $\epsilon \in (0, 1)$. Then, it is direct to see that $T_\mu(\delta) \le \max\{T_0(\delta), C_\mu\}$ with

$$T_0(\delta) = \sup \left\{ t > K \mid t \le \frac{(1 + \epsilon)T_\beta^*(\mu)}{1 - \gamma/\min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*} \left( \sqrt{c(t-1, \delta)} + \sqrt{(2 + \gamma_2) \log t} \right)^2 \right\}$$

$$\text{where} \quad \limsup_{\delta \to 0} \frac{T_0(\delta)}{\log(1/\delta)} \le \frac{(1 + \epsilon)T_\beta^*(\mu)}{1 - \gamma/\min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^*},$$

$$C_\mu = \frac{6D_\mu}{\epsilon \min\{\beta, \min_{i \in \mathcal{N}(i^*)} \omega_{\beta,i}^* - \gamma\}} + \frac{2}{\epsilon}.$$

## G.6 Efficient Implementation

We now discuss in detail how to efficiently implement UniTT. In this sense, we recall that the most crucial step is the computation of the leader $B_t$, that is:

$$B_t \in \operatorname{argmax}_{i \in [K]} \max \lambda_i, \quad \lambda \in \bar{\Theta}_t$$

Similar to what we have presented for O-TaS, we first show how to compute $B_t$ with a $O(K^2)$ operations (i.e., Algorithm 2), and we then discuss how to leverage dynamic programming in order to obtain a fast $O(K)$ procedure.

As one can note, Algorithm 2 is almost identical to Algorithm 1; the only difference is in the return step, as UniTT needs to compute the optimistic leader. Thus, for the same reason that we discussed in Section F.5, the computational complexity of Algorithm 2 is $O(K^2)$. Furthermore, proving that the algorithm is correct, namely:

$$\operatorname{argmax}_{j \in \mathcal{Z}} \mu_j^{(j)} = \operatorname{argmax}_{i \in [K]} \max \lambda_i, \quad \lambda \in \bar{\Theta}_t$$

is direct from the proof that we presented for Algorithm 1. Indeed, Lemma F.15 holds unchanged, and the equivalent of Lemma F.16 is even simpler, as one can verify from the following lemma.

**Lemma G.7. It holds that:**

$$\operatorname{argmax}_{j \in \mathcal{Z}} \mu_j^{(j)} = \operatorname{argmax}_{i \in [K]} \max \lambda_i.$$
Proof. If $\tilde{\Theta}_t = \emptyset$, then, the claim is direct from Lemma F.15. We now consider the case in which $\tilde{\Theta}_t \neq \emptyset$. Let Let us denote by $\tilde{\Theta}_{t,i}$ the subset of $\tilde{\Theta}_t$ where $i$ is the optimal arm, that is $\tilde{\Theta}_{t,i} := \{\mu \in \tilde{\Theta}_t : i^*(\mu) = i\}$. Then, the result follows by noticing that, for all $i \in \mathcal{Z}$, and all $\mu \in \tilde{\Theta}_{t,i}$ it holds that $\mu_i^{(i)} \ge \mu_i$. Indeed, by definition, $\mu_i^{(i)} = \beta_i$. Moreover, for all $i \notin \mathcal{Z}$, $\tilde{\Theta}_{t,i} = \emptyset$ (i.e., Lemma F.15). $\square$

At this point, one can apply the same identical tricks presented for O-TaS to reduce the computational complexity of Algorithm 2 from $\mathcal{O}(K^2)$ to $\mathcal{O}(K)$. We refer the reader to Section F.5 (in particular, Lemma F.17 and Lemma F.18).

## H TECHNICALITIES

Appendix H gathers existing and new technical results which are used for our proofs.

**Methodology** Lemma H.1 is a standard result to upper bound the expected sample complexity of an algorithm, e.g. see Lemma 1 in Degenne et al. (2019) or Garivier and Kaufmann (2016). This is a key method extensively used in the literature.

**Lemma H.1.** Let $(\mathcal{E}_t)_{t>K}$ be a sequence of events and $T(\delta) > K$ be such that for $t \ge T(\delta)$, $\mathcal{E}_t \subseteq \{\tau_\delta \le t\}$. Then, $\mathbb{E}_\mu[\tau_\delta] \le T(\delta) + \sum_{t>K} \mathbb{P}_\mu(\mathcal{E}_t^c)$.

*Proof.* Since the random variable $\tau_\delta$ is positive and $\{\tau_\delta > t\} \subseteq \mathcal{E}_t^c$ for all $t \ge T(\delta)$, we have

$$ \mathbb{E}_{\mu}[\tau_{\delta}] = \sum_{t \ge 0} \mathbb{P}_{\mu}(\tau_{\delta} > t) \le T(\delta) + \sum_{t \ge T(\delta)} \mathbb{P}_{\mu}(\mathcal{E}_{t}^{c}). $$

**Tracking** Lemma H.2 gathers properties of the C-Tracking procedure as in 11 used by TaS and O-TaS.

**Lemma H.2.** Let $t \in \mathbb{N}$ and $i \in [K]$. Then, we have

$$ - \ln(K) \le N_i(t) - \sum_{s \in [t]} \omega_i(s) \le 1. \qquad (53) $$

Furthermore, C-tracking satisfies:

$$ \sum_{s \in [t]} \sum_{i \in [K]} \frac{\omega_i(s)}{\sqrt{N_i(s)}} \le K \ln(K) + 2\sqrt{2Kt}, \qquad (54) $$

$$ \sum_{s \in [t]} \sum_{i \in [K]} \frac{\omega_i(s)}{N_i(s)} \le 2K \ln(t). \qquad (55) $$

Finally, consider any subset $A \subseteq [K]$. Then, it holds that:

$$ \sum_{s \in [t]} \sum_{i \in A} \frac{\omega_i(s)}{\sqrt{N_i(s)}} \le |A| \ln |A| + 2\sqrt{2|A|t}. \qquad (56) $$

*Proof.* The proof of Equation (53) is from Theorem 6 in Degenne et al. (2020). The proof of Equations (54)-(55) are from Lemma 6 in Degenne et al. (2020). Similarly, the proof of Equation (56) is a straightforward generalization of the proof of Equation (54). $\square$

Lemma H.3 provide general results for the $2(K - 1)$ tracking procedures with fixed design $\beta \in (0, 1)$ used by UniTT.
**Lemma H.3.** For all $t > K$, $i \in [K]$, $j \in \mathcal{N}(i)$, we have

$$-1/2 \le N_j^i(t) - (1 - \beta)T_t(i, j) \le 1 \quad \text{i.e.} \quad -1 \le T_t(i, j) - N_j^i(t) - \beta T_t(i, j) \le 1/2$$

and $(N_i^i(t) - 1)/\beta \le \sum_{j \in \mathcal{N}(i)} T_t(i, j) = \sum_{j \neq i} T_t(i, j) \le (N_i^i(t) + 2)/\beta$. Let $T_t(i) := \sum_{j \in \mathcal{N}(i)} (T_t(i, j) + T_t(j, i))$. Then, we have $N_i(t) \ge \min\{\beta, 1 - \beta\} (T_t(i) - 3)$.

*Proof.* We have $2(K - 1)$ independent two-arms C-Tracking between a leader $i \in [K]$ and a challenger $j \in \mathcal{N}(i)$. Theorem 6 in Degenne et al. (2020) yields the result. The second inequality is a simple re-ordering.

To obtain the second part, we have by definition that the challenger is a neighbor of the leader, i.e. $\sum_{j \in \mathcal{N}(i)} T_t(i, j) = \sum_{j \neq i} T_t(i, j)$. Then, direct manipulations yield that

$$\sum_{j \in \mathcal{N}(i)} T_t(i, j) \le \sum_{j \in \mathcal{N}(i)} \frac{T_t(i, j) - N_j^i(t) + 1}{\beta} \le \frac{\sum_{j \in \mathcal{N}(i)} (T_t(i, j) - N_j^i(t)) + 2}{\beta},$$

which allows to conclude since $N_i^i(t) = \sum_{j \in \mathcal{N}(i)} (T_t(i, j) - N_j^i(t))$. The lower bound is obtained similarly. Using that $j \in \mathcal{N}(i)$ if and only if $i \in \mathcal{N}(j)$, the third is a direct consequence of the first part since

$$N_i(t) = \sum_{j \in \mathcal{N}(i)} (T_t(i, j) - N_j^i(t)) + \sum_{j \in \mathcal{N}(i)} N_i^j(t) \le \beta \sum_{j \in \mathcal{N}(i)} T_t(i, j) + (1 - \beta) \sum_{j \in \mathcal{N}(i)} T_t(j, i) + 3 \\ \ge \beta \sum_{j \in \mathcal{N}(i)} T_t(i, j) + (1 - \beta) \sum_{j \in \mathcal{N}(i)} T_t(j, i) - 3.$$

□

**Simple but Key Observation** Lemma H.4 is based on the key but simple observation that the number of times one can increase a bounded positive quantity by one is also upper bounded.

**Lemma H.4** (Lemma 4 in Jourdan et al. (2023)). Let $\mathcal{A} \subseteq [K]$ and $t > K$. Let $T_t(i) := \sum_{j \neq i} (T_t(i, j) + T_t(j, i))$ be the number of times arm $i$ was selected in the leader/challenger pair. Assume there exists a sequence of events $(A_s(t))_{t \ge s \ge t^{1/\gamma_1}}$ and positive reals $(D_i(t))_{i \in \mathcal{A}}$ such that, for all $s \in \{t^{1/\gamma_1}, \dots, t\}$, under the event $A_s(t)$,

$$\exists I_s \in \mathcal{A}, \quad T_s(I_s) \le D_{I_s}(t) \quad \text{and} \quad T_{s+1}(I_s) = T_s(I_s) + 1. \qquad (57)$$

Then, we have $\sum_{s \in [t^{1/\gamma_1}, t]} 1(A_s(t)) \le \sum_{i \in \mathcal{A}} D_i(t)$.

**Inversion Result** Lemma H.5 gathers properties on the function $\overline{W}_{-1}$, which is used in the literature to obtain concentration results.

**Lemma H.5** (Appendix A in Jourdan (2024)). Let $\overline{W}_{-1}(x) = -W_{-1}(-e^{-x})$ for all $x \ge 1$, where $W_{-1}$ is the negative branch of the Lambert W function. The function $\overline{W}_{-1}$ is increasing on $(1, +\infty)$ and strictly concave on $(1, +\infty)$. In particular, $\overline{W}'_{-1}(x) = (1 - \frac{1}{\overline{W}_{-1}(x)})^{-1}$ for all $x > 1$. Then, for all $y \ge 1$ and $x \ge 1$,

$$\overline{W}_{-1}(y) \le x \iff y \le x - \ln(x).$$

Moreover, for all $x > 1$,

$$x + \log(x) \le \overline{W}_{-1}(x) \le x + \log(x) + \min \left\{ \frac{1}{2}, \frac{1}{\sqrt{x}} \right\}.$$

Lemma H.6 is an inversion result to upper bound a time which is implicitly defined.

**Lemma H.6** (Lemma 51 in Jourdan et al. (2023)). Let $\overline{W}_{-1}$ defined in Lemma H.5. Let $A > 0, B > 0$ such that $B/A + \log A > 1$ and $C(A, B) = \sup \{x | x < A \log x + B\}$. Then, $C(A, B) < h_1(A, B)$ with $h_1(z, y) := z \overline{W}_{-1}(y/z + \log z)$.
# I EXPERIMENT DETAILS AND ADDITIONAL RESULTS

This last section is structured in the following way:

* First, in Section I.1, we provide additional details on the experiments (computing infrastructure, process to generate random unimodal bandits, and implementation details).

* Then, in Section I.2, we ablate the performance of UniTT and O-TaS against TTUCB in random unimodal bandits with different values of K. As K increases, the performance gap between UniTT/O-TaS and TTUCB increases as well.

* In Section I.3, we present an ablation on UniTT, to understand which components leads to the performance improvement over TTUCB.

* Finally, in Section I.4, we present an ablation whose goal is understanding the behavior of O-TaS and UniTT. Specifically, we focus on presenting some visualization of the structured confidence intervals and how they evolve over time.

## I.1 Experiment Details

We now provide additional details on the experiments.

**Computing Infrastructure** All results are obtained using the following computer infrastructure: 100 Intel(R) Xeon(R) Gold 6238R CPU @ 2.20GHz cpus and 256GB of RAM.

**Codebase** The codebase can be found at https://github.com/riccardopoiani/unimodal-pure-exp.

**Randomly Generated Instances** We now detail the process that we used to generate the random unimodal bandits that we used in our experiments. Given the number of arms K, we first sample (with a uniform distribution over {1, ..., K}) the position of the optimal arm. We then fix the value of mean of the optimal arm to $\mu_{\star} = 1$. Once this is done, we specify three real positive parameters $k_{min}$, $k_{max}$ and k that are used as follows. For all arms $i \in \mathcal{N}(\star)$, we sample the value of $\mu_i$ uniformly in the range [$\mu_{\star} - k_{max}, \mu_{\star} - k_{min}$]. Then, for all the remaining arms $j < \star - 1$, we sample $\mu_j$ uniformly in [$\mu_{j+1} - k, \mu_{j+1}$], and for all $j > \star + 1$, we sample $\mu_j$ uniformly in [$\mu_{j-1} - k, \mu_{j-1}$]. In all cases, we set $k_{min} = 0.2$ and $k_{max} = 0.3$. These values ensure that (i) there is a minimum positive gap with the optimal arm, making the best arm identifiable, and (ii) the gap is not too large to avoid making the BAI problem too easy. Concerning k, instead, we set $k = 0.1$. Concerning the scenario with K = 10, we obtained the following $\mu$ vector (values are rounded to three decimal places for the ease of read):

$$ \mu = (0.568, 0.573, 0.598, 0.645, 0.724, 1.0, 0.770, 0.712, 0.648, 0.622). $$

The bandit model that we generated for K = 100 can be found in the codebase.

**Threshold** For all algorithms and in all domains, we calibrated the threshold $c_K(t, \delta)$ as $c_K(t, \delta) = \log(\frac{K}{\delta}) + \log(\log(t) + 1)$. This value has satisfied the $\delta$-correctness requirement for all algorithms in all experiments.

## I.2 Ablation on K in Random Instances

In this section, we study the performance of the algorithms in the random instances when varying the number of arms. As algorithms, we consider UniTT, O-TaS, and TTUCB (Jourdan and Degenne, 2023). We excluded U-TaS since, as shown in Section 4, it underperforms due to the use of forced exploration (when we further increase K, the performance of U-TaS on these random instances even amplifies).

That being said, our goal is studying the benefits of exploiting the unimodal structure against relying on algorithms for unstructured BAI. We consider $K = 10$, $K = 100$, $K = 500$ and $K = 1000$.<fnref n="9" /> We denote these bandit models as $\mu_{R,K}$ (note that $\mu_{R,10}$ and $\mu_{R,100}$ are the same bandit models that we presented in Section 4; here, we report the same results restricted to the aforementioned algorithms for the ease of read). Figures 3-6 reports

<footnote n="9">⁹The exact bandit models that have been generated can be found in the codebase.</footnote>
<figure><img src="image_7.png" /><figcaption>Figure 3: Ablation on *K* in random instances. Empirical sample complexity on $\mu_{R,10}$.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Figure 4: Ablation on *K* in random instances. Empirical sample complexity on $\mu_{R,100}$.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Figure 5: Ablation on *K* in random instances. Empirical sample complexity on $\mu_{R,500}$.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Figure 6: Ablation on *K* in random instances. Empirical sample complexity on $\mu_{R,1000}$.</figcaption></figure>

the results of 1000 independent runs. As one can see, for small values of *K*, TTUCB is competitive (although slightly worse) with UniTT and O-TaS. As soon as *K* increases, the difference between the algorithms amplifies.

As a final remark, we note that the results for *K* = 500 and *K* = 1000 are similar. The main reason is that, given the random generation process that we adopted (see Section 1.1, adding additional arms do not affect much the performance of the algorithms. Indeed, by adding new arms, we obtain mean values which are far from being optimal (and, consequently, they can be discarded with very few data).

## I.3 Ablation on UniTT

In this section, we present an ablation on UniTT, to understand which components leads to the performance improvement over TT. Specifically, we consider the following algorithms.

* UniTT, as presented in Section 3.

* UniTT, as presented in Section 3, but without the structured confidence intervals. In other words, the sampling rule is replaced with $B_t \in \text{argmax}_{i \in [K]} \max_{\lambda \in \Theta_t} \lambda_i$. We refer to this algorithm as UniTT-NO-S.

* UniTT, as presented in Section 3, but where the stopping rule is replaced with the one of TTUCB (Jourdan and Degenne, 2023) (i.e., the usual GLR tests for unstructured BAI problems). We refer to this algorithm as UniTT-BAIStop.
<figure><img src="image_11.png" /><figcaption>Figure 7: UniTT ablation. Empirical sample complexity on $\mu_{R,10}$.</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Figure 8: UniTT ablation. Empirical sample complexity on $\mu_{F,11}$.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Figure 9: UniTT ablation. Empirical sample complexity on $\mu_{R,500}$.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Figure 10: UniTT ablation. Empirical sample complexity on $\mu_{R,1000}$.</figcaption></figure>

* TTUCB from Jourdan and Degenne (2023), but we replace the stopping rule with the one that we presented in Section 3. We refer to this algorithm as TT-UniStop.

* TTUCB (Jourdan and Degenne, 2023).

We first benchmark the performance of these algorithms in $\mu_{R,10}$ and $\mu_{F,11}$ that we presented in Section 3. Figures 7 and 8 report the results.

First of all, we can observe that the gap between TTUCB and TT-UniStop only plays a minor role in the performance. Indeed, TT-UniStop is only slightly better than TTUCB for unstructured BAI. Secondly, we actually excluded UniTT-BAIStop from the plots. Indeed, we have verified that it might requires a huge number of samples in order to stop. The reason is a combination of the following two factors: (i) the goal of the sampling rule is to target arms within $\mathcal{N}(\star)$, (ii) the stopping rule from unstructured BAI requires to distinguish $\mu_*$ from every arm $a \neq \star$. From the results of TT-UniStop and UniTT-BAIStop, we can infer that, in order to gain benefits from the unimodal structure, it is important to consider the combination of both the sampling and the stopping rule.

Secondly, we observe that the performance of UniTT and UniTT-No-S are identical in these two bandits. In other words, in these domains, the structured confidence intervals do not play a role in the performance, and it is sufficient to consider the optimism from $\Theta_t$ in order to obtain a good performance level.<fnref n="10" /> Nevertheless, as we analyzed in our theory, we know that, structured confidence intervals can help in mitigating the number of pulls

<footnote n="10">¹⁰In this sense, the reason for performance improvement, conditioned on the fact that we are using a stopping rule</footnote>
<figure><img src="image_15.png" /><figcaption>Figure 11: Empirical number of active arms when running UniTT and O-TaS with $\delta = 0.01$. The considered instances are $\mu_{R,10}$ (top, left), $\mu_{R,100}$ (top, right), $\mu_{R,500}$ (bottom, left) and $\mu_{R,1000}$ (bottom right). Results are average results of 1000 independent runs with 95% confidence intervals.</figcaption></figure>

to arms for which $\omega_i^* = 0$. For this reason, we ablate UniTT against UniTT-No-S by increasing the number of arms $K$ in random unimodal bandits. Specifically, we compare the performance of the two algorithms on two random unimodal bandits with $K = 500$ and $K = 1000$. Figures 9 and 10 reports the results. As we can see, as soon as we increase the number of arms, the performance gap between the two methods increases.

## I.4 Ablation on $\tilde{\Theta}_t$

Finally, we now present a visualization of the set $\tilde{\Theta}_t$, and how it evolves during training (both for O-TaS and UniTT). Specifically, we visualize the number of arms for which there exists a unimodal bandit within $\tilde{\Theta}_t$ whose optimal arm $i$. We refer to this number as the number of "active" arms.

As bandit instances, we consider $\mu_{R,K}$ with $K \in \{10, 100, 500, 1000\}$. Figure 11 reports the average number of active arms for 1000 independent runs of O-TaS and UniTT. We observe that for a small value of $K$ (i.e., $K = 10$) the structured confidence intervals do not play a significant role as the number of active arms remain constant before that the algorithm can stop. This, intuitively, is justified by two facts: (i) for a small number of arms, both algorithms stop sooner, and (ii) given the random generation process that we described in Section I.1, the values of the means are all close to the one of the optimal arm. As soon as we increase the number of arms, both these effects vanishes, and the number of active arms significantly decrease while learning progress.

Finally, as we highlighted in Section I.2, the results for $K = 500$ and $K = 1000$ are similar (the main difference is that the starting point for $K = 1000$ is slightly higher). The reason is the same that we presented in Section I.2, i.e., given the random generation process that we adopted (see Section I.1, adding additional arms do not affect much the behavior of the algorithms. Indeed, by adding new arms, we obtain mean values which are far from being optimal. As a consequence, these new arms can easily discarded from the set of active arms.

<footnote>tailored for unimodal bandits, come from how the challenged is selected, i.e., it is searched among the arms in $\mathcal{N}(B_t)$, while in unstructured BAI the list of possible challengers is $[K]$.</footnote>