{'fraction_non_alphanumeric': 0.05088137941651913, 'fraction_numerical': 0.016549919174813334, 'mean_word_length': 4.3006935944512446, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thompson Sampling for Gaussian Entropic Risk Bandits

The multi-armed bandit (MAB) problem is a ubiquitous decision-making problem that exemplifies exploration-exploitation tradeoff. Standard formulations exclude risk in decision making. Risknotably complicates the basic reward-maximising objectives, in part because there is no universally agreed definition of it. In this paper, we consider an entropic risk (ER) measure and explore the performance of a Thompson sampling-based algorithm ERTS under this risk measure by providing regret bounds for ERTS and corresponding instance dependent lower bounds.


Introduction
The multi-armed bandit (MAB) problem is a classic reinforcement learning problem that analyses sequential decision making, in which the learner has access to partial feedback from her decisions. The problem has been garnering interest in recent years. It informs many critical theoretical questions about the role of exploration vs exploitation in reinforcement learning and applies to both theoretical problems and various real-world applications, such as dynamic pricing, clinical trials, and portfolio optimisation.
In the well-known stochastic MAB setting, a player chooses among K arms, each characterised by an independent reward distribution. During each period, the player plays one arm and observes a random reward from that arm. She then incorporates the information she receives from pulling that arm in choosing the next arm she selects. The player repeats the process for a horizon of n periods. In each period, the player faces a dilemma between exploring other arms' potential value or exploiting the arm that the player believes offers the highest estimated reward.
In the usual setting, the risk of pulling an arm is not being taken into account. However, in many practical settings, such as financial portfolio optimisation, the risk is often the clients' main concern.
In this regard, the MAB problem can been tweaked to model such risk-aversion. This paper uses entropic risk measure as the risk measure to minimise due to the simple exponential relationship it has with risk-aversion and utility, and devises a Thompson sampling-based learning algorithm that minimises entropic risk.

Related Work
A variety of analyses on MABs involving risk measures have been carried out. Sani et al. (2012) considered the mean-variance as their risk measure. Each arm i followed a Gaussian distribution with mean µ i ∈ [0, 1] and variance σ 2 i ∈ [0, 1]. The authors provided an LCB-based algorithm with accompanying regret analyses. Galichet et al. (2013) proposed the Multi-Armed Risk-Aware Bandit (MARAB) algorithm with the goal of minimising the number of pulls of risky arms, using the risk measure CVaR. Vakili and Zhao (2016) demonstrated that the instance-dependent and instanceindependent regrets in terms of the mean-variance of the reward process over a horizon n are lower bounded by Ω(log n) and Ω(n 2/3 ) respectively. Sun et al. (2017) analysed contextual bandits with risk constraints, and developed a meta algorithm which makes use of the online mirror descent algorithm that achieves near-optimal regret with respect to minimising the total cost. Zhu and Tan (2020) designed the first Thompson sampling algorithm for risk measures, particularly the mean-variance risk measure for Gaussian bandits, and proved near-optimal regret bounds under specific regimes. Chang et al. (2021) designed a Thompson sampling algorithm factoring a user's "risk tolerance" level, either minimising mean rewards under some "maximum risk" criterion, or simply minimising the risk measure. Baudry et al. (2020) designed and analysed Thompson sampling-based algorithms α-NPTS for bounded rewards and α-Multinomial-TS for discrete multinomial distributions.
The papers most related to our work is that by Zhu and Tan (2020) and Chang et al. (2021). Zhu and Tan (2020) considered arms with the highest mean-variance to be optimal, and their definitions and methods can be analogously defined for minimising the mean-variance. Chang et al. (2021) defined arms with the minimum CVaR as optimal in their "infeasible instance", which produced theoretical analogues for "feasible instances". This hints that the heavy duty analysis happens in trying to choose arms with the risk measure minimised. Our paper seeks to explore the efficacy of Thompson sampling in the analogous risk-minimising problem setting proposed by Zhu and Tan (2020), but instead considering the entropic risk measure. We demonstrate and prove the asymptotic optimality of ERTS, whose asymptotic upper bound matches the theoretical lower bound for consistent algorithms that solve the entropic risk MAB for Gaussian bandits.

Contributions
• ERTS Algorithm: We design ERTS, an algorithm that is similar to the structure of CVaR-TS in Chang et al. (2021) but using entropic risk instead of CVaR as the risk measure. This algorithm uses Thompson sampling (Thompson, 1933) as explored for mean-variance bandits in Zhu and Tan (2020) and CVaR bandits in Chang et al. (2021).
• Comprehensive regret bounds: We provide theoretical analysis of the ERTS algorithm for Gaussian bandits with bounded variances. We state and prove both upper and lower bounds, showing that ERTS is the first asymptotically optimal algorithm that solves the entropic risk multi-armed bandit problem. Our proof techniques solidify the novel ξ-trick in Chang et al. (2021), and affirm future analysis on MABs involving generalised risk measures.
This paper is structured as follows. We first introduce the formulation of the entropic risk MAB problem in Section 2. In Section 3, we present ERTS algorithm. We present our regret bounds and prove that the upper bound we derived is asymptotically optimal in Section 4. Section 5 provides the proof outlines of the regret bounds in Section 4. We conclude our discussion in Section 6 summarizing our work and suggesting avenues for further research. For brevity, we defer detailed proofs of the theorems to the supplementary material.

Problem formulation
In this section we define the entropic risk MAB problem. For the rest of the paper, denote [k] = {1, . . . , k} for any k ∈ N and (t) + = max{0, t} for t ∈ R.
Consider a K-armed MAB ν = (ν(i)) i∈ [K] played over a horizon of length n. Letting ER γ (X) denote the entropic risk, our objective is to select the least risky arm, that is, the arm with the lowest entropic risk. Thus, we define an arm i to be optimal precisely when i ∈ argmin k∈[K] ER γ (ν(k)). Suppose arm 1 is optimal (uniquely, without loss of generality). We can then define ∆ ER (i, γ) := ER γ (i) − ER γ (1) > 0 and the regret of a policy π by where T i,n denotes the number of times arm i was pulled in the first n rounds. This is a natural definition based on regret decomposition (Lattimore and Szepesvári, 2020, Chapter 4.5), and in fact corresponds to the regret decomposition in the case γ → 0 + (i.e. the risk-neutral setting). In the following, we design and analyse ERTS, which aims to minimise R n (π), and also attain an instance-dependent lower bound, which establishes asymptotic optimality.

The ERTS Algorithm
In this section, we introduce the Entropic Risk Thompson Sampling (ERTS) algorithm for Gaussian bandits with bounded variances, i.e., } for some σ 2 max > 1. Similar to Zhu and Tan (2020) and Chang et al. (2021), the algorithm samples from the posteriors of each arm, then chooses the arm according to a multicriterion procedure.
We present the ERTS algorithm. In each round t, for each arm i, the player samples the parameters (θ it , κ it ) from the posterior distribution of arm i, then chooses arm j = argmin i∈ Update the number of samples, the shape parameter, and the rate parameter: Play arm t and updateμ t,t = X t,t

Regret Bound for ERTS and Lower Bounds
We present our regret bounds in the following theorems. These verify the conjecture made in Chang et al. (2021, Section 5) regarding risk measures of Gaussian bandits of the form af (µ) + bg(σ 2 ), where (f (x), g(x), a, b) = (x, x, −1, γ/2). Furthermore, they establish ERTS as asymptotically optimal in the context of Gaussian entropic risk bandits.
Next, we establish an instance-dependent lower bound for the expected pulls of non-optimal arms under consistent algorithms. Consider a class C of distributions and define S i = {ν ′ (i) ∈ C : ER(ν ′ (i)) < ER(1)}. Define for each non-optimal arm i, where KL(P, P ′ ) denotes the KL-divergence between two probability measures P, P ′ .
Theorem 4 (Lower Bound). Let π be a policy over the class of distributions C satisfying R n (π) = o(n a ) for any a > 0. Then for any non-optimal arm i, we have .
Remark 5. This implies that the asymptotic lower bound for the regret matches its asymptotic upper bound in Theorem 2 unconditionally. Hence, for the Gaussian entropic risk MAB problem, ERTS is asymptotically optimal.

Proof Outlines for Theorem 2 and 4
Theorem 2: Denote the sample entropic risk asÊR γ (i, t) = −θ i,t + γ/(2κ i,t ). Fix ε > 0 and define E i (t) := Ê R γ (i, t) > ER γ (1) + ε , that is, the event that the Thompson sample mean of arm i is ε-riskier than a certain threshold or, more precisely, ε-higher than the optimal arm (which has the lowest entropic risk). Intuitively, event E i (t) occurs with high probability when the algorithm has explored sufficiently. However, the algorithm does not choose arm i when E c i (t) occurs with small probability under Thompson sampling, which contributes directly to the regret bound. Therefore, it suffices to bound the number of times E c i (t) occurs.
In order to bound E [T i,n ], we can split E [T i,n ] into two parts using a key lemma by Lattimore and Szepesvári (2020) G 1,s − 1 and Λ 2 = n−1 s=0 P G 1,s > 1 n . It remains to upper bound Λ 1 and Λ 2 . The techniques to upper bound Λ 1 are similar to those from Zhu and Tan (2020, Section 4.6) and Chang et al. (2021, Section 5). To upper bound Λ 2 , we split the event E c We then use the union bound which yields P(E c i (t)) ≤ P(Ψ 1 (ξ))+ P(Ψ 2 (ξ)), which we can upper bound by known concentration bounds. Following the strategy employed by Chang et al. (2021), a judicious selection of the free parameter ξ ∈ (0, 1) allows us to allocate "weights" on the bounds of P(Ψ 1 (ξ)) and P(Ψ 2 (ξ)) which then yield 2/(ξ 2 ∆ 2 ER (i, γ)) and h without incurring further residual terms.
Theorem 4: The proof of the lower bound follows immediately from Kagrecha et al. (2020, Theorem 4) by replacing the criterion c α (ν ′ (k)) ≤ c * α by ER(ν ′ (k)) ≤ ER(1). We then particularize the lower bounds therein by decisively setting the distribution of ν ′ (i) to have a Gaussian distribution with mean µ i + σ i 2/R i + ε and variance σ 2 i , which then returns the desired lower bound.

Conclusion
This paper applies Thompson sampling (Thompson, 1933) to provide the first solution for entropic risk MAB problems which have not been previously considered before to the best of our knowledge. We proposed a new algorithm ERTS to solve this problem and proved that this proposed algorithm is asymptotically optimal for the ER MAB problem. Further work includes analysing Thompson sampling of Gaussian MABs under general risk measures and exploring Thompson sampling's performance for Entropic-Risk sub-Gaussian bandits. We may also potentially design a general framework for proving the efficacy of Thompson sampling over the state-of-the-art L/UCB-based techniques for generalised risk-averse MABs and a wider class of bandits (under reasonable assumptions, such as the crucial properties of the risk-measures, existence of conjugate prior estimates, as well as relevant concentration bounds).

Appendix A.
Proof [Proof of Theorem 2] We first state without proof a crucial lemma from Lattimore and Szepesvári (2020) which we will use in our analysis.
Lemma 6 (Lattimore and Szepesvári (2020)). Let P t ( · ) = P( · |A 1 , X 1 , . . . , A t−1 , X t−1 ) be the probability measure conditioned on the history up to time t − 1 and G is = P t (E c i (t)|T i,t = s), where E i (t) is any specified event for arm i at time t. Then Denote the sample entropic risk at γ by ER(i, t) = −θ i,t + γ/(2κ i,t ). Fix ε > 0, and define the event that the Thompson sample entropic risk of arm i is ε-higher than the optimal arm (which has the lowest entropic risk). Intuitively, event E i (t) is highly likely to occur when the algorithm has explored sufficiently. However, the algorithm does not choose arm i when E c i (t), an event with small probability under Thompson sampling, occurs. By Lemma 6 and the linearity of expectation, we can divide E[T i,n ] into two parts as By Lemmas 8 and 11 by that which follows, we have Plugging the two displays into (1), we have Lemma 7. We can lower bound if µ > µ 1 , σ < σ 1 . (3) Proof Given T 1,t = s,μ 1,s = µ,σ 1,s = σ, a direct calculation gives us, if µ > µ 1 , σ 2 < σ 2 1 .
Proof The proof follows immediately from Lemma 7 and Zhu and Tan (2020, S-3.3) by scaling ε > 0.