ArticleslgStudy

computer science

Best arm identification

Best arm identification is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Best arm identification rather than just read about it. In short: Best arm identification (BAI) is a sequential one-player game where the player has to find the best action (arm) among a list of actions (arms) by collecting information in the most efficient way. It is a multi-armed bandit game as a player only gets information about an arm by playing it.

Best arm identification — main illustration
Best arm identification — illustration

Key takeaways

  • Best arm identification belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Best arm identification to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Best arm identification from memory before moving on to harder problems.

Reference excerpt

Best arm identification (BAI) is a sequential one-player game where the player has to find the best action (arm) among a list of actions (arms) by collecting information in the most efficient way. It is a multi-armed bandit game as a player only gets information about an arm by playing it. The most common objective in multi-armed bandit games is to minimize the regret (i.e., play the best action as much as possible), but in BAI, the goal is to find the best arm as efficiently as possible. This problem naturally arises in scenarios such as adaptive clinical trials where the number of patients is limited and the quantification of the confidence in a treatment is important. It also arises in hyperparameter optimization where the goal is to find the optimal choice of hyperparameters for an algorithm with the smallest possible number of experiments, as it can be costly in terms of time, energy, or money.

Stochastic multi-armed bandit The stochastic multi-armed bandit (MAB) is a sequential game with one player and K actions (arms). Each arm has an unknown probability distribution associated with it. At each turn, the player has to choose one action and receive an observation from the probability distribution associated with the arm. The more you play an arm, the more you get information on its probability distribution.

Best arm identification In BAI the goal is to find the arm that has the probability distribution with the highest mean. BAI may be either fixed confidence or fixed horizon. In a fixed-confidence game, a confidence level δ is fixed at the beginning of the game and the goal is to find the best arm with this confidence level in as few turns as possible. In a fixed horizon game, the number of turns T is fixed, and the goal is to find the best arm with the highest possible confidence in T turns.

Math formalisation We have one player and K actions (arms). Behind each arm k∈{1,…,K} lies an unknown distribution νk with mean μk. Each distribution νk belongs to a known family 𝒟 (such as the set of Gaussian distributions or Bernoulli distributions). At each time step t, the player selects an arm at and observes an independent sample Xt∼νat from the corresponding distribution. We will note μ∗:=max⁡μa the highest mean. An arm a that satisfies μa=μ∗ is called an optimal arm; otherwise it is called suboptimal arm. In best arm identification (BAI) the objective is to identify an optimal arm. Two main settings for BAI appear in the literature:

Fixed confidence: In this setting, one typically assumes that there exists a unique optimal arm. A confidence level δ∈(0,1) is specified at the beginning. The algorithm must stop at some finite stopping time τδ<+∞ and return an arm âτδ such that the probability of error is bounded: ℙ(âτδ≠a∗)≤δ. The objective is to minimize the expected sample complexity 𝔼[τδ]. Such a setting appears, for example, when a constraint on the confidence is required (for example, if we require a confidence level of 95%, so δ=1−0.95=0.05).

Fixed horizon: In this setting, the number of samples T is fixed in advance. The goal is to design an algorithm that minimizes the probability of misidentifying the optimal arm: ℙ(âT≠a∗). This setting appears when the number of experiments is limited (for drug tests, the number of patients can be fixed in advance).

Example of simple modelling In the case where we have K treatments and we want to be sure with a confidence level of 95% which treatment is the best to heal a specific disease. Each treatment heals or does not heal the disease with a probability μk, which means that each distribution is a Bernoulli distribution, so 𝒟 is the set of Bernoulli distributions. We can use a BAI algorithm to minimize 𝔼[τ0.05], the number of patients required to find the best treatment with probability 95%.

Applications Best arm identification naturally arises in several practical domains:

Adaptive clinical trials: The objective is to identify the most effective treatment based on sequentially collected patient data. Each treatment can be modeled as having an underlying distribution of outcomes. The goal is to identify the treatment with the highest expected outcome with high confidence (fixed confidence setting δ) while minimizing the number of drug test patients (minimise 𝔼[τδ]), as it costs to pay patients for this and we would like to use as little as possible less effective drugs. Hyperparameter tuning: Selecting the best configuration for machine learning models efficiently by treating each hyperparameter setting as an arm. The goal is to find the best hyperparameter with as few experiments possible as experiments are costly in time and in energy

Fixed confidence level

In the fixed-confidence setting, the goal is to design an algorithm that identifies the best arm with a prescribed confidence level δ while minimizing the expected number of samples. Any such algorithm requires two key components:

Stopping rule: A decision criterion that determines when to stop sampling. Formally, this defines a stopping time τδ and returns an arm âτδ such that ℙ(âτδ≠a⋆)≤δ and ℙ(τδ<+∞)=1. Sampling rule: A policy π that, at each round t, selects the next arm to sample at based on all previous observations (as,Xs)s<t.

Algorithm structure The general structure of a fixed-confidence BAI algorithm can be described as follows:

Input: Distribution family 𝒟, confidence level δ Initialize: For each arm i: set Ni←1, ν̂i←None Set τ←0, stop←False while stop==False do: a← Sampling_rule(𝒟, δ, N, ν̂) Observe reward X∼νa Update: Na←Na+1 Update empirical distribution ν̂aτ τ←τ+1 stop ← Stopping_rule(𝒟, δ, N, ν̂) return âτ⋆←arg⁡maxaμ̂a

Lower bound

The minimal expected number of pulls to obtain the confidence level of 1−δ was determined in 2016. For a given instance ν and a fixed δ, it provides the minimum value of 𝔼[τδ] possible. To give the lower bound, we first need to define the function kl⁡(δ,1−δ), the Kullback–Leibler divergence between two Bernoulli distributions with means δ and 1−δ. This is equivalent to ln⁡(1/δ) when δ tend to 0. For any algorithm satisfying the δ-correctness constraint, the expected sample complexity satisfies 𝔼[τδ]≥C⋆kl⁡(δ,1−δ) where the problem-dependent constant C⋆ only depends on ν. An optimal sampling rule ω∗ is associated with this optimal constant.

… excerpt ends here. Continue reading the full article.

Illustrations

Best arm identification: C∗ when we have two Gaussian arms of variance 1 and means equal to μ and μ+x
C∗ when we have two Gaussian arms of variance 1 and means equal to μ and μ+x

Worked examples

Example 1 — a first encounter with Best arm identification

Start with the simplest possible case. Write down what Best arm identification claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Best arm identification before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Best arm identification ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Best arm identification

In research
Best arm identification appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Best arm identification in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Best arm identification is common in secondary-school and first-year university syllabi. It links to neighbouring topics Algorithms, Decision theory, Optimization algorithms and methods, so understanding it makes those chapters shorter.
In everyday life
Look for Best arm identification outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Best arm identification” →

How to study Best arm identification in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Best arm identification means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Best arm identification out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Best arm identification in simple terms?

Best arm identification (BAI) is a sequential one-player game where the player has to find the best action (arm) among a list of actions (arms) by collecting information in the most efficient way. It is a multi-armed bandit game as a player only gets information about an arm by playing it.

Why does Best arm identification matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Best arm identification?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Best arm identification.

Tags

  • Algorithms
  • Decision theory
  • Optimization algorithms and methods
  • Sequential methods
  • Stochastic optimization

Keep exploring