Learning, Regret Minimization, and Equilibria

External, internal and swap regret; greedy, randomized greedy, RWM and Polynomial Weights; the minimax theorem from regret; convergence to correlated equilibrium; the external-to-swap reduction; the bandit reduction; and Wardrop routing

· 29 min read · 5,601 words

Motivation: deciding repeatedly under uncertainty

Many situations involve repeatedly making decisions in an uncertain environment: which route to drive to work each day, or repeated play of a game against an opponent whose strategy is unknown.

The basic setting: a space of NN actions — the routes, or the rows of a matrix game like {rock,paper,scissors}\{\text{rock}, \text{paper}, \text{scissors}\}. At each time step the algorithm probabilistically chooses an action, the environment makes its “move” (setting the day’s road congestion), and the algorithm incurs the loss for the action it chose. Then the process repeats.

We want two things: adaptive algorithms that perform well in such settings, and an understanding of the dynamics when many players are all adjusting simultaneously.

IntuitionWhat “regret” means, and why it is the right question

Imagine we design a sophisticated online algorithm, sell it to a client, and it runs for a while incurring some loss. We want to avoid the embarrassment of the client returning to say that in retrospect a much lower loss was available under his simple alternative policy π\pi. The regret of our algorithm is the difference between its loss and the loss under π\pi.

Different notions of regret differ in what counts as a “simple” alternative. That single choice organizes the whole chapter.

NotionAlternative policy it competes against
External regret (combining expert advice)The best single action in retrospect — the alternative plays the same action at every step
Internal regretModify the online sequence by replacing every occurrence of one action ii by another action jj
Swap regretModify by any map {1,,N}{1,,N}\{1,\ldots,N\}\to\{1,\ldots,N\} — up to a factor NN larger than internal regret

ImportantWhy each matters

External regret provides a general methodology for making an online algorithm match an optimal static offline algorithm, by modelling the possible static solutions as actions. In machine learning it yields performance comparable to the best prediction rule from a large hypothesis class.

Swap regret matters because of its tight connection to correlated equilibrium: one way to think of a correlated equilibrium is as a distribution QQ over the joint action space such that every player would have zero internal (or swap) regret when playing it.


Model and preliminaries

DefinitionThe online model

An adversarial online model with NN actions X={1,,N}X = \{1,\ldots,N\}. At each step tt the algorithm HH selects a distribution ptp^t over actions; then the adversary selects a loss vector t[0,1]N\ell^t \in [0,1]^N.

  • Full information model: HH receives all of t\ell^t and suffers Ht=i=1Npitit\ell^t_H = \sum_{i=1}^N p_i^t\ell_i^t — the expected loss of drawing ipti \sim p^t.
  • Partial information (bandit) model: HH receives only (ktt,kt)(\ell^t_{k^t}, k^t) with ktptk^t \sim p^t, and suffers Ht=ktt\ell^t_H = \ell^t_{k^t}.

Cumulative losses: LiT=t=1TitL_i^T = \sum_{t=1}^T \ell_i^t and LHT=t=1THtL_H^T = \sum_{t=1}^T\ell_H^t.

DefinitionExternal regret

Given a comparison class GG of algorithms, the external regret is RG=LHTLG,minTR_G = L_H^T - L_{G,\min}^T where LG,minT=mingGLgTL^T_{G,\min} = \min_{g\in G}L^T_g. We take G=XG = X, the single actions, so with LminT=miniLiTL^T_{\min} = \min_i L^T_i,

R=LHTLminTR = L_H^T - L^T_{\min}

DefinitionModification rules and general regret

A modification rule FF takes the history and the currently selected action and outputs a (possibly different) action; FtF^t denotes it at time tt. Given the algorithm’s distributions ptp^t, it induces

ft=Ft(pt),fit=j:Ft(j)=ipjt,LH,F=tifititf^t = F^t(p^t), \qquad f_i^t = \sum_{j\,:\,F^t(j) = i} p_j^t, \qquad L_{H,F} = \sum_t\sum_i f_i^t\ell_i^t

— at time tt, FF shifts the probability HH assigned to jj over to Ft(j)F^t(j), so the modified distribution depends on ptp^t. For a finite set F\mathcal F of memoryless rules,

RF=maxFF(LHTLH,FT)R_{\mathcal F} = \max_{F\in\mathcal F}\big(L_H^T - L^T_{H,F}\big)

FormulaThe three regrets as classes of modification rules

  • External: Fex\mathcal F^{ex} has NN rules FiF_i, each always outputting ii.
  • Internal: Fin\mathcal F^{in} has N(N1)N(N-1) rules Fi,jF_{i,j} with Fi,j(i)=jF_{i,j}(i) = j and Fi,j(i)=iF_{i,j}(i') = i' otherwise, giving maxi,jX t=1Tpit(itjt)\max_{i,j\in X}\ \sum_{t=1}^T p_i^t\big(\ell_i^t - \ell_j^t\big)
  • Swap: Fsw\mathcal F^{sw} has all NNN^N functions, giving i=1N maxjX t=1Tpit(itjt)\sum_{i=1}^N\ \max_{j\in X}\ \sum_{t=1}^T p_i^t\big(\ell_i^t - \ell_j^t\big)

Since FexFsw\mathcal F^{ex}\subseteq\mathcal F^{sw} and FinFsw\mathcal F^{in}\subseteq\mathcal F^{sw}, swap regret upper-bounds both.

IntuitionInternal versus swap, concretely

Internal regret answers “every time you bought IBM, you should have bought Microsoft instead” — one substitution. Swap regret allows all actions to be remapped simultaneously, and is at most a factor NN larger.


External regret minimization

Why the comparison class must be restricted

TheoremNo algorithm can compete with the best sequence

Let GallG_{\text{all}} be all functions from times {1,,T}\{1,\ldots,T\} to actions. For any online algorithm HH there is a loss sequence with RGallT(11/N)R_{G_{\text{all}}} \ge T(1 - 1/N).

ProofPunish the action the algorithm is least likely to play

At each tt, give loss 0 to the action iti^t of lowest probability pittp^t_{i^t} and loss 1 to all others. Since minipit1/N\min_i p_i^t \le 1/N, the algorithm’s loss is at least T(11/N)T(1-1/N). Meanwhile g(t)=itg(t) = i^t lies in GallG_{\text{all}} and has total loss 0.

So we compare against Ga={gi:iX}G_a = \{g_i : i\in X\}the best single action.

Warmup: Greedy and Randomized Greedy

(In this subsection losses are {0,1}\{0,1\} rather than [0,1][0,1], which simplifies notation; everything extends.)

AlgorithmGreedy

Initially x1=1x^1 = 1. At time tt: let Lmint1=miniLit1L^{t-1}_{\min} = \min_i L^{t-1}_i and St1={i:Lit1=Lmint1}S^{t-1} = \{i : L^{t-1}_i = L^{t-1}_{\min}\}; play xt=minSt1x^t = \min S^{t-1}.

TheoremGreedy

LGreedyTNLminT+(N1)L^T_{\text{Greedy}} \le N\cdot L^T_{\min} + (N-1).

ProofCount actions eliminated between increments of the minimum

Each time Greedy incurs loss 1 while LmintL^t_{\min} does not increase, at least one action leaves StS^t. This can happen at most NN times before LmintL^t_{\min} rises by 1, so Greedy loses at most NN between successive increments. Formally, by induction LGreedytNSt+NLmintL^t_{\text{Greedy}} \le N - |S^t| + N\cdot L^t_{\min}.

WarningThe factor NN is not Greedy’s fault — it is determinism’s

For any deterministic algorithm DD there is a loss sequence with LDT=TL^T_D = T and LminTT/NL^T_{\min} \le \lfloor T/N\rfloor.

Proof: give loss 1 to whichever action DD selects and 0 to all others, so LDT=TL^T_D = T. Since only selected actions ever have loss, and some action is selected at most T/N\lfloor T/N\rfloor times, LminTT/NL^T_{\min}\le\lfloor T/N\rfloor.

This implies LDTNLminT+(TmodN)L^T_D \ge N\cdot L^T_{\min} + (T\bmod N)almost matching the upper bound for Greedy, so randomization is essential.

AlgorithmRandomized Greedy (RG)

pi1=1/Np_i^1 = 1/N. At time tt: put pit=1/St1p_i^t = 1/|S^{t-1}| for iSt1i \in S^{t-1} and 0 otherwise — uniform over all currently best actions, removing the deterministic tie-breaker.

TheoremRandomized Greedy

LRGT(lnN)+(1+lnN)LminTL^T_{\text{RG}} \le (\ln N) + (1 + \ln N)L^T_{\min}.

ProofA harmonic sum between successive increments

Let tjt_j be the step at which LmintL^t_{\min} first reaches jj; we bound the loss in (tj,tj+1](t_j, t_{j+1}]. At any tt, 1StN1\le|S^t|\le N. If at time tt the set StS^t shrinks by kk from size nn' to nkn'-k, RG’s loss is k/nk/n' — each such action carries weight 1/n1/n' — and

kn1n+1n1++1nk+1\frac{k}{n'} \le \frac{1}{n'} + \frac{1}{n'-1} + \cdots + \frac{1}{n'-k+1}

So over the whole interval the loss is at most 1/N+1/(N1)++1/11+lnN1/N + 1/(N-1) + \cdots + 1/1 \le 1 + \ln N. Formally, LRGt(1/N++1/(St+1))+(1+lnN)LmintL^t_{\text{RG}} \le \big(1/N + \cdots + 1/(|S^t|+1)\big) + (1+\ln N)L^t_{\min}.

IntuitionWhere RG still loses, and the fix

The losses are greatest when StS^t is small, since the online loss is proportional to 1/St1/|S^t|. The remedy is to give some weight to actions that are currently near best, letting probability mass decay gracefully with distance from optimality rather than dropping to zero.

Randomized Weighted Majority

AlgorithmRandomized Weighted Majority (RWM)

Give action ii with cumulative loss LiL_i the weight wi=(1η)Liw_i = (1-\eta)^{L_i} and play proportionally: pi=wi/jwjp_i = w_i/\sum_j w_j. Concretely, wi1=1w_i^1 = 1, pi1=1/Np_i^1 = 1/N; at time tt, if it1=1\ell_i^{t-1} = 1 then wit=wit1(1η)w_i^t = w_i^{t-1}(1-\eta), else wit=wit1w_i^t = w_i^{t-1}; and pit=wit/Wtp_i^t = w_i^t/W^t with Wt=iwitW^t = \sum_i w_i^t.

Think of η\eta as a small constant, say 0.010.01. (Losses in [0,1][0,1] are handled by the update wit=wit1(1η)it1w_i^t = w_i^{t-1}(1-\eta)^{\ell_i^{t-1}}.)

TheoremRWM

For η1/2\eta \le 1/2 and binary losses,

LRWMT(1+η)LminT+lnNηL^T_{\text{RWM}} \le (1+\eta)L^T_{\min} + \frac{\ln N}{\eta}

Setting η=min{(lnN)/T, 1/2}\eta = \min\{\sqrt{(\ln N)/T},\ 1/2\} gives LRWMTLminT+2TlnNL^T_{\text{RWM}} \le L^T_{\min} + 2\sqrt{T\ln N}.

ProofTrack the total weight

The key idea: whenever the algorithm has significant expected loss, the total weight must drop substantially; combine this with the fact that the weight of the best action gives a floor, WT+1maxiwiT+1=(1η)LminTW^{T+1}\ge\max_i w_i^{T+1} = (1-\eta)^{L^T_{\min}}.

Step 1: the weight drop equals the loss. Let Ft=(i:it=1wit)/WtF^t = \big(\sum_{i:\ell_i^t = 1}w_i^t\big)/W^t, which is exactly RWM’s expected loss at time tt. Each action with loss 1 has its weight multiplied by 1η1-\eta and the rest are unchanged, so

Wt+1=WtηFtWt=Wt(1ηFt)W^{t+1} = W^t - \eta F^tW^t = W^t(1-\eta F^t)

The proportion of weight removed is exactly proportional to the expected loss.

Step 2: sandwich. With W1=NW^1 = N,

(1η)LminTWT+1=Nt=1T(1ηFt)(1-\eta)^{L^T_{\min}} \le W^{T+1} = N\prod_{t=1}^T (1-\eta F^t)

Step 3: take logarithms and use ln(1z)z\ln(1-z)\le -z:

LminTln(1η)lnN+tln(1ηFt)lnNηtFt=lnNηLRWMTL^T_{\min}\ln(1-\eta) \le \ln N + \sum_t \ln(1-\eta F^t) \le \ln N - \eta\sum_t F^t = \ln N - \eta L^T_{\text{RWM}}

Step 4: rearrange and use ln(1z)z+z2-\ln(1-z)\le z+z^2 for 0z120\le z\le\tfrac12:

LRWMTLminTln(1η)η+lnNη(1+η)LminT+lnNηL^T_{\text{RWM}} \le \frac{-L^T_{\min}\ln(1-\eta)}{\eta} + \frac{\ln N}{\eta} \le (1+\eta)L^T_{\min} + \frac{\ln N}{\eta}

NoteTuning η\eta without knowing TT

The second bound assumes TT is known in advance; otherwise a guess and double approach costs only a constant factor. One can in fact get the potentially better LRWMTLminT+2LminTlnNL^T_{\text{RWM}} \le L^T_{\min} + 2\sqrt{L^T_{\min}\ln N} by setting η=min{(lnN)/Lmin, 1/2}\eta = \min\{\sqrt{(\ln N)/L_{\min}},\ 1/2\}.

Polynomial Weights

AlgorithmPolynomial Weights (PW)

wi1=1w_i^1 = 1, pi1=1/Np_i^1 = 1/N. At time tt: wit=wit1(1ηit1)w_i^t = w_i^{t-1}(1 - \eta\ell_i^{t-1}) and pit=wit/Wtp_i^t = w_i^t/W^t.

NoteThe only change, and what it buys

PW differs from RWM only in the update, and extends naturally to losses in [0,1][0,1] (even to both losses and gains) while keeping the same proof structure — and it performs especially well in the case of small losses.

It is no longer true that an action of total loss LL has weight (1η)L(1-\eta)^L. What is preserved is the invariant that if PW’s loss at time tt is FtF^t, then exactly an ηFt\eta F^t fraction of the total weight is removed: Wt+1=Wtηiwitit=Wt(1ηFt)W^{t+1} = W^t - \eta\sum_i w_i^t\ell_i^t = W^t(1-\eta F^t) with Ft=(iwitit)/WtF^t = \big(\sum_i w_i^t\ell_i^t\big)/W^t.

TheoremPolynomial Weights

For η1/2\eta \le 1/2, any [0,1][0,1]-valued loss sequence and any kk,

LPWTLkT+ηQkT+lnNη,QkT=t=1T(kt)2L^T_{\text{PW}} \le L^T_k + \eta Q^T_k + \frac{\ln N}{\eta}, \qquad Q^T_k = \sum_{t=1}^T(\ell_k^t)^2

Setting η=min{(lnN)/T,1/2}\eta = \min\{\sqrt{(\ln N)/T}, 1/2\} and noting QkTTQ^T_k \le T gives LPWTLminT+2TlnNL^T_{\text{PW}} \le L^T_{\min} + 2\sqrt{T\ln N}.

ProofUpper and lower bounds on lnWT+1\ln W^{T+1}

Upper, exactly as for RWM:

lnWT+1=lnN+tln(1ηFt)lnNηtFt=lnNηLPWT\ln W^{T+1} = \ln N + \sum_t\ln(1-\eta F^t) \le \ln N - \eta\sum_t F^t = \ln N - \eta L^T_{\text{PW}}

Lower, from the recursive definition of the weights and ln(1z)zz2\ln(1-z)\ge -z-z^2 for 0z120\le z\le\tfrac12:

lnWT+1  lnwkT+1=t=1Tln(1ηkt)  ηtktη2t(kt)2=ηLkTη2QkT\ln W^{T+1}\ \ge\ \ln w_k^{T+1} = \sum_{t=1}^T\ln\big(1-\eta\ell^t_k\big) \ \ge\ -\eta\sum_t\ell^t_k - \eta^2\sum_t(\ell^t_k)^2 = -\eta L^T_k - \eta^2Q^T_k

Combining, ηLkTη2QkTlnNηLPWT-\eta L^T_k - \eta^2 Q^T_k \le \ln N - \eta L^T_{\text{PW}}.

IntuitionThe quadratic term is a feature

QkTQ^T_k is the sum of squared losses of the comparison action. When the best action’s losses are small, QkTTQ^T_k \ll T and the bound is correspondingly sharper — this is a second-order bound, versus the zero-order 2TlnN2\sqrt{T\ln N}.

Lower bounds

TheoremSublinear regret is impossible when T<log2NT < \log_2 N

There is a stochastic loss generation such that any algorithm has E[LT]=T/2\mathbb{E}[L^T] = T/2 while LminT=0L^T_{\min} = 0.

ProofHalve the surviving set each step

At t=1t=1 a random half of the actions get loss 0 and the rest 1; at t=2t=2 a random half of those get 0 and everything else (including all previous losers) gets 1; and so on. At every step the expected probability mass on zero-loss actions is at most 1/21/2, so the algorithm loses 1/21/2 per step. Yet for T<log2NT<\log_2 N some action still has total loss 0.

TheoremΩ(T)\Omega(\sqrt T) even with N=2N = 2

There is a stochastic loss generation with E[LRTLminT]=Ω(T)\mathbb{E}[L^T_{R} - L^T_{\min}] = \Omega(\sqrt T).

ProofRandom walk deviation

Flip a fair coin each step, setting t=(0,1)\ell^t = (0,1) or (1,0)(1,0) with probability 1/21/2 each. Any distribution has expected loss exactly 1/21/2, so any algorithm has expected loss T/2T/2. Given T/2+yT/2 + y losses of the first kind and T/2yT/2-y of the second, T/2LminT=yT/2 - L^T_{\min} = |y|. The probability of a given yy is (TT/2+y)/2T\binom{T}{T/2+y}/2^T, which by Stirling is O(1/T)O(1/\sqrt T) — so with constant probability y=Ω(T)|y| = \Omega(\sqrt T).


Regret minimization and game theory

DefinitionGame-theoretic setup

G=M,(Xi),(si)G = \langle M, (X_i), (s_i)\rangle with mm players; player ii has NN actions and loss function si:Xi×(×jiXj)[0,1]s_i : X_i\times(\times_{j\ne i}X_j)\to[0,1].

Player ii plays for TT steps using procedure ON, playing mixed action PitP^t_i while the others play PitP^t_{-i}. Its loss is ONt=ExPt[si(xt)]\ell^t_{\text{ON}} = \mathbb{E}_{x\sim P^t}[s_i(x^t)]. The loss vector is jt=ExiPit[si(xj,xi)]\ell^t_j = \mathbb{E}_{x_{-i}\sim P^t_{-i}}[s_i(x_j, x_{-i})]the loss player ii would have observed had it played xjx_j at time tt.

Constant-sum games: reaching the value

TheoremExternal regret suffices against the game value

Let GG be a constant-sum game with value (v1,v2)(v_1,v_2). If player ii plays for TT steps with external regret RR, its average loss 1TLONT\tfrac1T L^T_{\text{ON}} is at most vi+R/Tv_i + R/T.

ProofThe empirical opponent strategy has a good response

Let qq be the mixed strategy given by the observed frequencies of player 2’s actions, qj=tP2,jt/Tq_j = \sum_t P^t_{2,j}/T. By the theory of constant-sum games there is an action xkx_k with Ex2q[s1(xk,x2)]v1\mathbb{E}_{x_2\sim q}[s_1(x_k,x_2)]\le v_1 — so had player 1 always played xkx_k, its loss would be at most v1Tv_1T. Hence LminTLkTv1TL^T_{\min}\le L^T_k \le v_1T, and LONTLminT+Rv1T+RL^T_{\text{ON}}\le L^T_{\min} + R \le v_1T + R.

NoteWhat the rate is

Using a procedure with R=O(TlogN)R = O(\sqrt{T\log N}) guarantees average loss at most vi+O((logN)/T)v_i + O(\sqrt{(\log N)/T}).

ImportantRegret algorithms prove the minimax theorem

Define vmin1=minx1maxzΔ(X2)Ex2z[s1(x1,x2)]v^1_{\min} = \min_{x_1}\max_{z\in\Delta(X_2)}\mathbb{E}_{x_2\sim z}[s_1(x_1,x_2)] — the best loss player 1 can guarantee knowing player 2’s mixed action in advance — and vmax1=maxx2minzΔ(X1)Ex1z[s1(x1,x2)]v^1_{\max} = \max_{x_2}\min_{z\in\Delta(X_1)}\mathbb{E}_{x_1\sim z}[s_1(x_1,x_2)], the best it can guarantee going first. The minimax theorem says vmin1=vmax1v^1_{\min} = v^1_{\max}.

ProofMinimax from external regret

Suppose for contradiction vmax1=vmin1+γv^1_{\max} = v^1_{\min} + \gamma with γ>0\gamma>0 (clearly vmax1vmin1v^1_{\max}\ge v^1_{\min}). Have both players run regret-minimizing algorithms for TT steps with regret at most RR, where R/T<γ/2R/T < \gamma/2. Let LONL_{\text{ON}} be player 1’s loss, so LON-L_{\text{ON}} is player 2’s.

With qiq_i the empirical frequency strategies, Lmin1/Tvmin1L^1_{\min}/T \le v^1_{\min} (we pick the best action against the specific mixed action q2q_2), and similarly Lmin2/Tvmin2L^2_{\min}/T\le v^2_{\min}. The regret guarantees give LONLmin1+RL_{\text{ON}}\le L^1_{\min}+R and LONLmin2+R-L_{\text{ON}}\le L^2_{\min}+R. Chaining,

Tvmax1R=Tvmin2RLmin2RLONLmin1+RTvmin1+RTv^1_{\max} - R = -Tv^2_{\min} - R \le -L^2_{\min} - R \le L_{\text{ON}} \le L^1_{\min}+R \le Tv^1_{\min}+R

so vmax1vmin12R/T<γv^1_{\max} - v^1_{\min}\le 2R/T < \gamma — a contradiction.

NoteA third proof of minimax

The LP treatment gave two: via Nash’s theorem, and via linear programming duality. This is a third, purely algorithmic one — no fixpoint theorem, no duality, just two learners playing each other.

Correlated equilibrium from swap regret

DefinitionSwitch functions and per-player regret

For x1,b1,b2Xix_1, b_1, b_2\in X_i let switchi(x1,b1,b2)\text{switch}_i(x_1,b_1,b_2) be b2b_2 if x1=b1x_1 = b_1 and x1x_1 otherwise. For a modification function ff,

regreti(x,f)=si(x)si(f(xi),xi)\text{regret}_i(x,f) = s_i(x) - s_i(f(x_i), x_{-i})

DefinitionCorrelated and ϵ\epsilon-correlated equilibrium

PP over XX is a correlated equilibrium if for every player ii and any b1,b2Xib_1,b_2\in X_i,

ExP[regreti(x,switchi(,b1,b2))]0\mathbb{E}_{x\sim P}\big[\text{regret}_i(x, \text{switch}_i(\cdot,b_1,b_2))\big]\le0

Equivalently — and this is the form that extends to approximation — for any F:XiXiF : X_i\to X_i, ExP[regreti(x,F)]0\mathbb{E}_{x\sim P}[\text{regret}_i(x,F)]\le 0. And PP is an ϵ\epsilon-correlated equilibrium if for every ii and every FiF_i,

ExP[regreti(x,Fi)]ϵ\mathbb{E}_{x\sim P}[\text{regret}_i(x,F_i)]\le\epsilon

TheoremSwap regret bounds the distance to correlated equilibrium

If for TT steps every player follows a strategy with swap regret at most RR, then the empirical distribution QQ of the joint actions played is an (R/T)(R/T)-correlated equilibrium.

ProofThe regret difference is the deviation incentive

QQ assigns probability 1/T1/T to each PtP^t. Fix F:XiXiF : X_i\to X_i; swap regret gives LONTLON,FT+RL^T_{\text{ON}}\le L^T_{\text{ON},F} + R. By definition of the regret function,

LONTLON,FT=tExtPt[si(xt)]tExtPt[si(F(xit),xit)]=TExQ[regreti(x,F)]L^T_{\text{ON}} - L^T_{\text{ON},F} = \sum_{t}\mathbb{E}_{x^t\sim P^t}[s_i(x^t)] - \sum_t \mathbb{E}_{x^t\sim P^t}\big[s_i(F(x_i^t), x^t_{-i})\big] = T\cdot\mathbb{E}_{x\sim Q}[\text{regret}_i(x,F)]

so ExQ[regreti(x,Fi)]R/T\mathbb{E}_{x\sim Q}[\text{regret}_i(x,F_i)]\le R/T.

ImportantThe headline dynamic result

If the average swap regret vanishes, the empirical play converges to the set of correlated equilibria. Note the contrast with best-response dynamics, which cycle in matching pennies and in general converge to nothing. Learning converges — but to the correlated equilibrium polytope, not to Nash.

Dominated strategies

Definitionϵ\epsilon-dominated

xjx_j is ϵ\epsilon-dominated by xkx_k if si(xj,xi)ϵ+si(xk,xi)s_i(x_j,x_{-i})\ge\epsilon + s_i(x_k,x_{-i}) for all xix_{-i}; likewise by a mixed action yy with Exdy[si(xd,xi)]\mathbb{E}_{x_d\sim y}[s_i(x_d,x_{-i})] on the right.

TheoremLow swap regret means rarely playing dominated actions

If player ii uses a procedure with swap regret RR for TT steps, the average weight it puts on the set of ϵ\epsilon-dominated actions is at most R/(ϵT)R/(\epsilon T).

ProofThe dominating actions witness the regret

If xjx_j is ϵ\epsilon-dominated by xkx_k then regreti(x,switchi(,xj,xk))ϵ\text{regret}_i(x,\text{switch}_i(\cdot,x_j,x_k))\ge\epsilon for every xix_{-i}. Let DϵD_\epsilon be the dominated set and w=1TtjDϵPi,jtw = \frac1T\sum_t\sum_{j\in D_\epsilon}P^t_{i,j} its time-average weight. Replacing each dominated action by its dominator shows the swap regret is at least wϵTw\epsilon T, so wϵTRw\epsilon T \le R.

NoteExternal regret is not enough in general

Low external regret does not by itself give this guarantee — though RWM and PW happen to.


From external to swap regret: a generic reduction

ImportantThe construction

Instantiate NN copies A1,,ANA_1,\ldots,A_N of an external-regret procedure. At each step each AiA_i outputs a distribution qitq_i^t, with qi,jtq^t_{i,j} its weight on action jj. We choose our own distribution ptp^t to satisfy

pjt=ipitqi,jt,i.e.pt=ptQtp_j^t = \sum_i p_i^t q^t_{i,j}, \qquad\text{i.e.}\qquad p^t = p^tQ^t

ptp^t is a stationary distribution of the Markov process defined by QtQ^t, which exists and is efficiently computable. When the loss vector t\ell^t arrives, we hand AiA_i the scaled vector pittp_i^t\ell^t, so AiA_i believes action jj costs tpitjt\sum_t p_i^t\ell_j^t — exactly what we would incur by putting ii‘s probability mass on jj. Procedure AiA_i becomes responsible for regret of the iji\to j variety.

IntuitionTwo equivalent readings of ptp^t

Either draw action jj directly with probability pjtp_j^t, or draw procedure AiA_i with probability pitp_i^t and let it choose the action — producing exactly ptQtp^tQ^t. The fixed-point condition is what makes these agree.

TheoremThe reduction

Given an RR external regret procedure, the master procedure HH satisfies, for every F:{1,,N}{1,,N}F : \{1,\ldots,N\}\to\{1,\ldots,N\},

LHLH,F+NRL_H \le L_{H,F} + NR

i.e. the swap regret of HH is at most NRNR.

ProofThe perceived losses sum to the true loss

AiA_i experiences loss (pitt)qit=pit(qitt)(p_i^t\ell^t)\cdot q_i^t = p_i^t(q_i^t\cdot\ell^t), so its external regret guarantee gives, for any jj,

t=1Tpit(qitt)t=1Tpitjt+R\sum_{t=1}^T p_i^t\big(q_i^t\cdot\ell^t\big) \le \sum_{t=1}^T p_i^t\ell_j^t + R

The key step: summing the NN procedures’ losses at time tt gives ipit(qitt)=ptQtt=ptt\sum_i p_i^t(q_i^t\cdot\ell^t) = p^tQ^t\ell^t = p^t\ell^t by design of ptp^t — the perceived losses total exactly our actual loss. So summing the displayed inequality over all ii, the left side is LHTL^T_H, and choosing j=F(i)j = F(i) on the right gives LHTLH,FT+NRL^T_H \le L^T_{H,F} + NR.

CorollaryEfficient swap regret

There is an online algorithm with swap regret O(NTlogN)O(N\sqrt{T\log N}). (This can be improved to O(NTlogN)O(\sqrt{NT\log N}).)

NoteWhy bother with a reduction

Low-internal-regret algorithms have also been developed from first principles, but this procedure gives the best bounds known for efficient algorithms — and it is a black box, inheriting any future improvement in external regret.


The partial information (bandit) model

The problem. In the bandit model the algorithm observes only the loss of the action it actually performed — you learn the travel time of the route you drove, not of the ones you didn’t. This forces an exploration versus exploitation trade-off: essentially any procedure must somehow explore to estimate losses.

ImportantThe reduction in outline

Partition the TT steps into KK blocks. Within a block the procedure uses a single distribution, except that it also samples each action once (the exploration steps). The partial-information procedure MAB passes the vector of losses gathered from exploration to a full-information procedure FIB, which returns a new distribution. The work is in relating FIB’s loss on the sequence it observes to MAB’s loss on the real sequence.

DerivationStep 1: a block-based full-information procedure

Blocks Bτ={(τ1)(T/K)+1,,τ(T/K)}B^\tau = \{(\tau-1)(T/K)+1,\ldots,\tau(T/K)\} (assume KTK\mid T). Let FIB be an RKR_K external regret procedure over KK steps, updating at the end of each block using the average loss vector cτ=tBτt/Bτc^\tau = \sum_{t\in B^\tau}\ell^t/|B^\tau|. With CiK=τciτC_i^K = \sum_\tau c_i^\tau and CminK=miniCiKC^K_{\min} = \min_i C^K_i, since FIB uses a single pτp^\tau throughout each block,

LFIBT=τtBτpτt=TKτpτcτTK(CminK+RK)L^T_{\text{FIB}} = \sum_\tau\sum_{t\in B^\tau}p^\tau\cdot\ell^t = \frac TK\sum_\tau p^\tau\cdot c^\tau \le \frac TK\big(C^K_{\min}+R_K\big)

A tempting dead end: with RK=O(KlogN)R_K = O(\sqrt{K\log N}) the regret is O((T/K)logN)O((T/\sqrt K)\sqrt{\log N}), minimized at K=TK = T — one step per block. But the sampling cost, added next, will force KTK \ll T.

DerivationStep 2: unbiased estimates instead of true averages

Feed FIB a random vector c^τ\hat c^\tau with E[c^iτ]=ciτ\mathbb{E}[\hat c_i^\tau] = c_i^\tau. Then for any block and any pτp^\tau,

1BτtBτpτt=pτcτ=ipiτE[c^iτ]\frac{1}{|B^\tau|}\sum_{t\in B^\tau}p^\tau\cdot\ell^t = p^\tau\cdot c^\tau = \sum_i p_i^\tau\,\mathbb{E}[\hat c_i^\tau]

the true loss of pτp^\tau in the block equals its expected loss under c^τ\hat c^\tau. The c^τ\hat c^\tau are random, so the pτp^\tau are random too (depending on c^1,,c^τ1\hat c^1,\ldots,\hat c^{\tau-1}); still, for any realized sequence C^FIBKC^minK+RK\hat C^K_{\text{FIB}}\le\hat C^K_{\min}+R_K, and since E[C^iK]=CiK\mathbb{E}[\hat C^K_i] = C^K_i and E[miniC^iK]miniE[C^iK]\mathbb{E}[\min_i \hat C^K_i]\le\min_i\mathbb{E}[\hat C^K_i],

E[C^FIBK]CminK+RK\mathbb{E}\big[\hat C^K_{\text{FIB}}\big] \le C^K_{\min}+R_K

Both FIB and MAB use the same p1,,pKp^1,\ldots,p^K on the same realized sequence, so E[CMABK]=E[C^FIBK]\mathbb{E}[C^K_{\text{MAB}}] = \mathbb{E}[\hat C^K_{\text{FIB}}].

DerivationStep 3: the estimates, and the price of getting them

For each action ii and block BτB^\tau, choose a random exploration time tiBτt_i\in B^\tau (these need not be independent across actions, so collisions are avoidable). At tit_i, MAB plays action ii outright, observes iti\ell^{t_i}_i, and sets c^iτ=iti\hat c_i^\tau = \ell^{t_i}_i — giving E[c^iτ]=ciτ\mathbb{E}[\hat c^\tau_i] = c^\tau_i as required.

The cost: losses are at most 1 and there are NN exploration steps in each of KK blocks, so exploration costs at most NKNK overall. Hence

E[LMABT]NK+TKE[CMABK]LminT+NK+TKRK\mathbb{E}\big[L^T_{\text{MAB}}\big] \le NK + \frac TK\mathbb{E}\big[C^K_{\text{MAB}}\big] \le L^T_{\min} + NK + \frac TK R_K

TheoremFull information to bandit

Given an O(KlogN)O(\sqrt{K\log N}) external regret procedure FIB, there is a partial information procedure MAB with

LMABTLminT+O(T2/3N1/3logN),TNL^T_{\text{MAB}} \le L^T_{\min} + O\big(T^{2/3}N^{1/3}\sqrt{\log N}\big), \qquad T\ge N

obtained by setting K=(T/N)2/3K = (T/N)^{2/3}, which balances the exploration cost NKNK against the block-granularity cost (T/K)RK(T/K)R_K.

NoteNot the best bounds

This reduction is particularly simple and generic but does not produce the best known bandit bounds; sharper direct algorithms exist.


Convergence to Nash equilibrium in routing games

The setting. Online routing is a natural home for these algorithms: choose among NN routes daily and perform nearly as well as the best fixed route in hindsight, even if traffic changes arbitrarily. Even when the number of paths in a graph GG is exponential in G|G|, there are external-regret algorithms whose running time and regret are polynomial in the graph size — and extensions handle the partial-information case where only the traversed path’s cost is revealed.

DefinitionThe Wardrop model (single commodity)

A directed network G=(V,E)G = (V,E) with one unit of flow — a large population of infinitesimal users — travelling from vstartv_{\text{start}} to vendv_{\text{end}}. Each edge has a nondecreasing latency function e\ell_e of the flow fef_e on it. The cost of a path is ePe(fe)\sum_{e\in P}\ell_e(f_e) and the average travel time is C(f)=eEe(fe)feC(f) = \sum_{e\in E}\ell_e(f_e)f_e. A flow is at Nash equilibrium if all flow-carrying paths are minimum-latency given ff.

IntuitionWhy the result is natural, and why it is not automatic

A Nash equilibrium is precisely a set of static strategies that are all no-regret with respect to each other, so convergence seems plausible. But there are many simple games where regret-minimizing algorithms do not approach Nash and can perform much worse than any Nash equilibrium. Routing is special.

WarningA nonstandard notion of convergence — and why it must be

The general result says: if each user has regret o(T)o(T)or even if just the average regret over users is o(T)o(T) — then a 1ϵ1-\epsilon fraction of days have the property that a 1ϵ1-\epsilon fraction of users experience travel time at most ϵ\epsilon above the best path that day, with ϵ\epsilon shrinking polynomially in the graph size, the regret bounds, and the maximum latency slope.

Usually an “ϵ\epsilon-approximate equilibrium” requires all participants to have at most ϵ\epsilon incentive to deviate. But low-regret algorithms are allowed to occasionally take long paths — and bandit algorithms must occasionally explore paths untried for a while, to avoid regret if they have improved. The multiple levels of hedging are genuinely necessary.

Definitionϵ\epsilon-Nash flow and the regret timescale

With P\mathcal P the simple paths and ftf^t the flow on day tt, a flow is ϵ\epsilon-Nash if C(f)ϵ+minPPePe(fe)C(f)\le\epsilon + \min_{P\in\mathcal P}\sum_{e\in P}\ell_e(f_e) — the average deviation incentive is at most ϵ\epsilon. Let R(T)R(T) be the average regret over users,

R(T)=t=1TeEe(fet)fetminPPt=1TePe(fet)R(T) = \sum_{t=1}^T\sum_{e\in E}\ell_e(f^t_e)f^t_e - \min_{P\in\mathcal P}\sum_{t=1}^T\sum_{e\in P}\ell_e(f^t_e)

and let TϵT_\epsilon be the number of steps after which R(T)ϵTR(T)\le\epsilon T for all TTϵT\ge T_\epsilon. RWM and PW achieve Tϵ=O(1ϵ2logN)T_\epsilon = O(\tfrac{1}{\epsilon^2}\log N) with η=ϵ/2\eta = \epsilon/2.

TheoremTime-average flow is approximately Nash

Suppose the latency functions are linear. Then for TTϵT\ge T_\epsilon, the average flow f^=1T(f1++fT)\hat f = \tfrac1T(f^1+\cdots+f^T) is ϵ\epsilon-Nash.

ProofLinearity, then convexity, then the regret bound

Linearity gives e(f^e)=1Tte(fet)\ell_e(\hat f_e) = \tfrac1T\sum_t\ell_e(f^t_e) for every ee. Since e(fet)fet\ell_e(f^t_e)f^t_e is a convex function of the flow,

e(f^e)f^e1Tt=1Te(fet)fet\ell_e(\hat f_e)\hat f_e \le \frac1T\sum_{t=1}^T\ell_e(f^t_e)f^t_e

Summing over all edges and applying the definition of TϵT_\epsilon, then linearity once more,

C(f^)1TtC(ft)ϵ+minP1TtePe(fet)=ϵ+minPePe(f^e)C(\hat f) \le \frac1T\sum_t C(f^t) \le \epsilon + \min_P\frac1T\sum_t\sum_{e\in P}\ell_e(f^t_e) = \epsilon + \min_P\sum_{e\in P}\ell_e(\hat f_e)

ImportantFrom the time-average to most individual days

This bounds the time-average flow. It can then be used to show most ftf^t are themselves approximately Nash. The key idea: if an edge’s cost fluctuated wildly, most of its users would experience latency substantially above the edge’s average cost — because more users are on the edge when it is congested than when it is not — which in turn implies substantial regret. These arguments carry over to general nonlinear latencies.

NoteWhy this motivates price of anarchy

routing-games and inefficiency-of-equilibria-introduction analyze the gap between Nash and optimal flows. This section says those results apply to participants using well-motivated self-interested adaptive behavior, not merely to an equilibrium assumed by fiat.


Current research directions

NoteRefined regret bounds

The bounds above are zero-order: they depend on TT alone. First-order bounds depend on the best action’s loss, second-order bounds on the sum of squares (like QkTQ^T_k in the PW theorem). An open problem is external regret proportional to the empirical variance of the best action. A second challenge is reducing the prior information the algorithm needs — ideally it should learn and adapt to parameters such as the maximum and minimum loss.

NoteLarge action spaces

We assumed NN is small enough to enumerate, with running time proportional to NN. But NN is often exponential in the natural parameters: all simple sstt paths in an nn-node graph, or all binary search trees on {1,,n}\{1,\ldots,n\}. Since the full-information bounds are only logarithmic in NN, polynomial regret is information-theoretically available — the challenge is computational efficiency.

Kalai and Vempala give an efficient algorithm whenever (a) the actions form a subset of Rn\mathbb{R}^n, (b) the loss vectors are linear functions over Rn\mathbb{R}^n, and (c) the offline problem argminxS[x]\arg\min_{x\in S}[x\cdot\ell] is efficiently solvable — covering both examples above. (Search trees add a rotation cost for changing action between steps, also addressed there.) Zinkevich extends this to convex loss functions given a projection oracle.

NoteDynamics

The classical example is swap regret, where all players minimizing it drives the empirical distribution to the set of correlated equilibria. We also saw convergence to the minimax value in two-player zero-sum games, and to Nash in a Wardrop routing game. Further convergence results in other settings would be of substantial interest: understanding these dynamics is what reveals the strengths and weaknesses of using such procedures.


Quick reference

ObjectStatementBound
Best sequence in hindsightRegret T(11/N)\ge T(1-1/N) for any algorithmImpossible — hence restrict the class
GreedyLTNLminT+(N1)L^T \le N L^T_{\min} + (N-1)factor NN
Any deterministic algorithmLDT=TL^T_D = T, LminTT/NL^T_{\min}\le\lfloor T/N\rfloorfactor NN is forced
Randomized GreedyLTlnN+(1+lnN)LminTL^T \le \ln N + (1+\ln N)L^T_{\min}factor O(logN)O(\log N)
RWMLT(1+η)LminT+lnNηL^T \le (1+\eta)L^T_{\min} + \tfrac{\ln N}{\eta}LminT+2TlnNL^T_{\min} + 2\sqrt{T\ln N}
Polynomial WeightsLTLkT+ηQkT+lnNηL^T \le L^T_k + \eta Q^T_k + \tfrac{\ln N}{\eta}second-order; handles [0,1][0,1]
Lower bound (T<log2NT<\log_2 N)E[LT]=T/2\mathbb{E}[L^T] = T/2, LminT=0L^T_{\min}=0no sublinear regret
Lower bound (N=2N = 2)E[LTLminT]=Ω(T)\mathbb{E}[L^T - L^T_{\min}] = \Omega(\sqrt T)T\sqrt T is unavoidable
External → swapswap regret NR\le NRO(NTlogN)O(N\sqrt{T\log N}), improvable to O(NTlogN)O(\sqrt{NT\log N})
Full info → banditLMABTLminT+NK+TKRKL^T_{\text{MAB}}\le L^T_{\min} + NK + \tfrac TK R_KO(T2/3N1/3logN)O(T^{2/3}N^{1/3}\sqrt{\log N}) at K=(T/N)2/3K = (T/N)^{2/3}
Constant-sumaverage loss vi+R/T\le v_i + R/Talso proves minimax
Swap regret RR for all playersempirical joint distribution is (R/T)(R/T)-correlated equilibriumconverges to the CE polytope
ϵ\epsilon-dominated actionsaverage weight R/(ϵT)\le R/(\epsilon T)vanishes for sublinear RR
Wardrop, linear latenciesf^\hat f is ϵ\epsilon-Nash for TTϵT\ge T_\epsilonTϵ=O(ϵ2logN)T_\epsilon = O(\epsilon^{-2}\log N)

Facts to keep to hand:

  • Fex,FinFsw\mathcal F^{ex},\mathcal F^{in}\subseteq\mathcal F^{sw}, so swap regret dominates both; internal-to-swap costs at most a factor NN.
  • Every weight-based proof here has the same skeleton: the fraction of total weight removed per step equals the algorithm’s expected loss, then sandwich WT+1W^{T+1} between N(1ηFt)N\prod(1-\eta F^t) above and the best action’s weight below.
  • The three equilibrium consequences pair with three regret notions: external → game value and minimax, swap → correlated equilibrium, swap → avoid dominated actions.
  • Learning converges to correlated, not Nash, equilibria in general — matching the fact that correlated equilibria are LP-easy while Nash is PPAD-complete.
  • The swap reduction works because ptp^t is chosen as the stationary distribution of QtQ^t, which is exactly what makes the subroutines’ perceived losses sum to the true loss.
  • The bandit reduction balances two costs pulling opposite ways: exploration NKNK wants KK small, block granularity (T/K)RK(T/K)R_K wants KK large.
  • Routing is a special case: regret minimization converges to Nash there, but not in general games.

References

  • [[lit/algorithmic-game-theory|Nisan, Roughgarden, Tardos & Vazirani, Algorithmic Game Theory]] — chapter 4 (Blum & Mansour)
  • Cesa-Bianchi & Lugosi, Prediction, Learning, and Games — thorough coverage of most topics here

← All notes