Algorithm IMED

From HandWiki
Short description: Algorithm for the multi-armed bandit problem
File:RunIMED.gif
A run of IMED with 3 Beta arms. The arm 1 is the optimal arm

In multi-armed bandit problems, IMED (for Indexed Minimum Empirical Divergence) is an algorithm developed in 2015 by Junya Honda and Akimichi Takemura. It is the first algorithm proved to be asymptotically optimal respect to the problem-dependant Lai–Robbins lower bound[1] for distributions in (,1][2].

Multi-armed bandit problem

The Multi-armed bandit problem is a sequential game where one player has to choose at each turn between K actions (arms). Behind every arm a there is an unknown distribution νa that lies in a set 𝒟 known by the player (for example, 𝒟 can be the set of Gaussian distributions or Bernoulli distributions).

At each turn t the player chooses (pulls) an arm at, he then gets an observation Xt of the distribution νat.

Regret minimization

The goal is to minimize the regret at time T that is defined as

RT:=a=1KΔa𝔼[Na(T)]

where

  • μa:=𝔼[νa] is the mean of arm a
  • μ*:=maxaμa is the highest mean
  • Δa:=μ*μa
  • Na(t) is the number of pulls of arm a up to turn t

The player has to find an algorithm that chooses at each turn t which arm to pull based on the previous actions and observations (as,Xs)s<t to minimize the regret RT.

This is a trade-off problem between exploration to find the best arm (the arm with the highest mean) and exploitation to play as much as possible the arm that we think is the best arm.[3]

Applications

Multi-armed bandit algorithms are used in a variety of fields; for example, they have applications in clinical trials, recommender systems, telecommunications[4], and agriculture.[5]

Algorithm IMED

The algorithm compute an index at each turn for each arm. Then it pull the arm with the smallest index.[2]

The index is the sum of two terms. The first is the cost of to transport the empirical distribution to a distribution such that the arm is optimal. The second is the cost of behing pulled to much.

Formally, the index Ia(t) of an arm a at turn t is defined as follow:

Ia(t):=Na(t)Kinf(ν^a(t),μ^*(t))+ln(Na(t))

where

  • 𝒦inf(ν,μ,𝒟):=inf{KL(ν,ν~) | ν~𝒫([,1]), 𝔼[ν~]>μ}
  • KL is the Kullback–Leibler divergence
  • 𝒫([,1]) is the set of distribution in [,1]
  • ν^a(t) is the empirical distribution of arm a at turn t
  • μ^*(t) is the highest empirical mean of turn t

Remark : For arms a that verify μ^a(t)=μ^*(t) we have Kinf(ν^a(t),μ^*(t))=0. Then there index is equal to ln(Na(t))

Pseudocode

for each arm i do:
    n[i] ← 1; nu[i] ← None; mu[i] ← None
for t from 1 to K do:
    select arm t
    observe reward r
    n[t] ← n[t] + 1
    nu[t] ← update empirical distribution
    mu[t] ← update empirical mean
for t from K+1 to T do:
    mu* ← highest mu
    for each arm i do:
        scoreK[i] ← n[i] K_inf(nu[i],mu*)
        scoreN[i] ← ln(n[i])
        index[i] ← scoreK[i] + scoreN[i]
    select arm a with smallest index[a]
    observe reward r
    n[a] ← n[a] + 1
    nu[a] ← update empirical distribution
    mu[a] ← update empirical mean

Theoretical results

In the multi-armed bandit problem we have the asymptotic Lai–Robbins lower bound[1] asymptotic lower bound on regret. The algorithm IMED is the first algorithm that matches this lower bound for distribution in (,1] in the first order. If the distribution are also bounded then it also match the second order. It is the first algorithm that match the second under of this lower bound.[2]

In 1985 Lai and Robbins proved an asymptotic, problem-dependent lower bound on regret[1]. In 2018, Aurelien Garivier, Pierre Menard and Gilles Stoltz proved a refined lower bound that gives the second order [6]

It states that for every consistent algorithm on the set 𝒫([,1]) — that is, an algorithm for which, for every (ν1,,νK)𝒫([,1])K, the regret RT is subpolynomial (i.e. RT=oT+(Tα) for all α>0) — we have:

RT(a:μa<μ*Δa𝒦inf(νa,μ*))lnTΩT+(lnlnT).

This bound is asymptotic (as T+) and gives a first-order lower bound of order lnT with the optimal constant in front of it and the second order in Ω(lnlnT).

Regret bound for IMED

If the distribution of every arm a is (,1] ( i.e. νa𝒫([,1])) then the regret of the algorithm IMED verify

RT(a:μa<μ*Δa𝒦inf(νa,μ*))lnT+O(1)[2]

If all the distribution νa are bounded then it exists a constant C>0 such that for T large enough the regret of IMED is upper bounded by

RT(a:μa<μ*Δa𝒦inf(νa,μ*))lnTClnlnT[2]

Computation time

The algorithm only requiere to compute the Kinf for suboptimal arms who are pulled O(lnT) times, which make it a lot faster than KL-UCB. A faster version of IMED was developed in 2023 to make it even faster, using a Taylor development of the Kinf in the first order [7].

See also

References

  1. 1.0 1.1 1.2 Lai, T.L.; Robbins, Herbert (1985). "Asymptotically Efficient Adaptive Allocation Rules". Advances in Applied Mathematics 6 (1): 4–22. doi:10.1016/0196-8858(85)90002-8. https://www.sciencedirect.com/science/article/pii/0196885885900028. 
  2. 2.0 2.1 2.2 2.3 2.4 Honda, Junya; Takemura, Akimichi (2015). "Non-Asymptotic Analysis of a New Bandit Algorithm for Semi-Bounded Rewards". Journal of Machine Learning Research 16 (113): 3721–3756. http://jmlr.org/papers/v16/honda15a.html. 
  3. Lattimore, Tor; Szepesvári, Csaba (2020). Bandit Algorithms. Cambridge: Cambridge University Press. 
  4. Bouneffouf, Djallel; Rish, Irina (2019). "A survey on practical applications of multi-armed and contextual bandits". arXiv:1904.10040 [cs.LG].
  5. Gautron, Romain; Baudry, Dorian; Adam, Myriam; Falconnier, Gatien N; Hoogenboom, Gerrit; King, Brian; Corbeels, Marc (2024). "A new adaptive identification strategy of best crop management with farmers". Field Crops Research (Elsevier) 307: 109249. 
  6. Garivier, Aurélien; Ménard, Pierre; Stoltz, Gilles (2019). "Explore first, exploit next: The true shape of regret in bandit problems". Mathematics of Operations Research (INFORMS) 44 (2): 377--399. 
  7. Baudry, Dorian; Pesquerel, Fabien; Degenne, Rémy; Maillard, Odalric-Ambrym (2023). "Fast Asymptotically Optimal Algorithms for Non-Parametric Stochastic Bandits". Advances in Neural Information Processing Systems 36: 11469–11514.