Sam Babichenko

Reading notes / Matrix scaling and optimal transport

Sinkhorn distances

Cuturi, 2013; Altschuler et al., 2017

Transport problem
nnthe number of bins of each histogram
μ,ν\mu,\nuthe histograms, positive entries summing to 1; the papers write r,cr,c
CCthe n×nn\times n cost matrix, entries in [0,L][0,L]
U(μ,ν)U(\mu,\nu)the plans: nonnegative matrices with row sums μ\mu and column sums ν\nu
⟨P,C⟩\langle P,C\ranglethe cost of a plan, ∑i,jPijCij\sum_{i,j}P_{ij}C_{ij}
HHentropy, H(P)=−∑i,jPijlog⁡PijH(P)=-\sum_{i,j}P_{ij}\log P_{ij}
KL(p ∥ q)\mathrm{KL}(p\,\|\,q)Kullback-Leibler divergence ∑ipilog⁡(pi/qi)\sum_ip_i\log(p_i/q_i)
OT\mathrm{OT}the optimal transport cost
P∗P^*an optimal plan of the linear program
ε\varepsilonthe entropy weight; Cuturi writes λ=1/ε\lambda=1/\varepsilon, Altschuler et al. η=1/ε\eta=1/\varepsilon
PεP_\varepsilonthe entropic optimum, arg⁡min⁡U(μ,ν)⟨P,C⟩−εH(P)\arg\min_{U(\mu,\nu)}\langle P,C\rangle-\varepsilon H(P)
f,gf,gmultipliers for the row and column constraints
Scaling (as in Sinkhorn's theorem)
KKe−C/εe^{-C/\varepsilon}, entrywise
x,yx,yrow and column scalings; DxD_x is diagonal with xx
AAK/sK/s, the starting matrix, entries aija_{ij}
u,vu,vlog⁡x\log x, log⁡y\log y, entrywise
BBthe current matrix, bij=aijeui+vjb_{ij}=a_{ij}e^{u_i+v_j}
FFthe potential ∑i,jaijeui+vj−μ⊤u−ν⊤v\sum_{i,j}a_{ij}e^{u_i+v_j}-\mu^\top u-\nu^\top v
F∗,u∗,v∗F^*,u^*,v^*the minimum of FF and where it is reached, the scaling of PεP_\varepsilon
kkthe number of steps until the marginal error is at most δ\delta
Rounding
μ′,ν′\mu',\nu'the marginals of the matrix the alternation stops at
P^\hat Pthe rounded output, in U(μ,ν)U(\mu,\nu)
P′P'P∗P^* rounded onto μ′,ν′\mu',\nu'
Constants
LLbound on the costs; gives log⁡(s/ℓ)≤2log⁡n+L/ε\log(s/\ell)\le2\log n+L/\varepsilon in Step 3
s,ℓs,\elltotal and smallest entry of KK (the paper's letters; ℓ\ell is unrelated to the ℓ1\ell_1 norm); the count of Step 4 grows with log⁡(s/ℓ)\log(s/\ell)
δ\deltatarget ℓ1\ell_1 marginal error of Step 4; τ/(8L)\tau/(8L) in Theorem 1
τ\tauaccuracy of the final plan in Theorem 1

Context. Optimal transport measures the lowest cost to move one histogram's mass onto another, given a unit cost between each pair of bins. Exact transport solves a linear program over n×nn\times n plans, where general solvers such as Orlin's minimum-cost-flow algorithm take O(n3log⁡n)O(n^3\log n) operations. Cuturi (2013) subtracts a multiple of the plan's entropy from its cost, turning the optimum into a row-and-column scaling of one fixed positive matrix. multiply each row of the current matrix by its target sum over its current sum, then each column, and repeat; it converges to the unique scaling DxADyD_xAD_y of a positive matrix AA with the target row and column sums (Sinkhorn's theorem). Reading note: Matrix scaling and Sinkhorn's theorem then finds that scaling via matrix-vector products that batch across histograms and run fast on GPUs. Until 2017, the best step bound for ℓ1\ell_1-accurate marginals still grew linearly in nn whenever a histogram held an entry of constant size.

Altschuler, Weed, and Rigollet (2017) prove that the Sinkhorn step count to a target ℓ1\ell_1 marginal error carries no factor of nn. Each step lowers Sinkhorn's convex potential by exactly the Kullback-Leibler divergence between a target marginal and the current one. Pinsker's inequality bounds that divergence below by half the squared ℓ1\ell_1 error. The potential can fall by at most the log ratio of the starting matrix's entry total to its smallest entry. For entropic transport that log ratio grows linearly in the inverse entropy weight, so tighter approximations to the linear program cost proportionally more steps. Setting the entropy weight and stopping tolerance to match a target additive accuracy yields a valid transport plan within that accuracy in time near-linear in the n2n^2 cost entries.

Setting. Let the two histograms: vectors in Rn\mathbb R^n with positive entries summing to 1; Cuturi and Altschuler et al. write r,cr,c be histograms in Rn\mathbb R^n with positive entries summing to 1, and let the n×nn\times n cost matrix: Cij≥0C_{ij}\ge0 is the cost of moving a unit of mass from bin ii of μ\mu to bin jj of ν\nu be an n×nn\times n cost matrix with entries between 0 and an upper bound on the entries of the cost matrix, 0≤Cij≤L0\le C_{ij}\le L. A transport plan is a nonnegative matrix with row sums μ\mu and column sums ν\nu. At entropy weight the weight of the entropy term in the entropic transport problem; Cuturi writes λ=1/ε\lambda=1/\varepsilon, Altschuler et al. η=1/ε\eta=1/\varepsilon>0{}>0, exact optimal transport and Cuturi's entropic version areOT=min⁡P∈U(μ,ν)⟨P,C⟩,Pε=arg⁡min⁡P∈U(μ,ν)⟨P,C⟩−εH(P).\begin{aligned}\mathrm{OT}&=\min_{P\in U(\mu,\nu)}\langle P,C\rangle,\\P_\varepsilon&=\arg\min_{P\in U(\mu,\nu)}\langle P,C\rangle-\varepsilon H(P).\end{aligned}Here U(μ,ν)U(\mu,\nu)={P≥0:P1=μ, P⊤1=ν}{}=\{P\ge0:P\mathbf 1=\mu,\ P^\top\mathbf 1=\nu\}, ⟨P,C⟩=∑i,jPijCij\langle P,C\rangle=\sum_{i,j}P_{ij}C_{ij}, and H(P)H(P)=−∑i,jPijlog⁡Pij{}=-\sum_{i,j}P_{ij}\log P_{ij}. On U(μ,ν)U(\mu,\nu), fixed marginals give H(P)=H(μ)+H(ν)−KL(P ∥ μν⊤)H(P)=H(\mu)+H(\nu)-\mathrm{KL}(P\,\|\,\mu\nu^\top), where KL(p ∥ q)\mathrm{KL}(p\,\|\,q)=∑ipilog⁡(pi/qi){}=\sum_ip_i\log(p_i/q_i). Raising entropy therefore pulls PP toward the independent plan μν⊤\mu\nu^\top that ignores CC. Cuturi defines the Sinkhorn distance by capping KL(P ∥ μν⊤)\mathrm{KL}(P\,\|\,\mu\nu^\top) with a constraint, which is dual to the penalty at some ε\varepsilon. Both he and Altschuler et al. compute the penalized form directly to avoid searching for that ε\varepsilon.

Start from any positive matrix with entry total the total of the entries of the positive matrix being scaled and smallest entry the smallest entry of the positive matrix being scaled; for entropic transport it is at least e−L/εe^{-L/\varepsilon}, rescaled by 1/s1/s. Sinkhorn's alternation reaches a matrix BB whose ℓ1\ell_1 marginal error is at most δ\delta:∥B1−μ∥1+∥B⊤1−ν∥1≤δ.\|B\mathbf 1-\mu\|_1+\|B^\top\mathbf 1-\nu\|_1\le\delta.This takes at most O(δ−2log⁡(s/ℓ))O(\delta^{-2}\log(s/\ell)) steps, where one step normalizes all rows or all columns (Altschuler et al., Theorem 2; Step 4 gives the constant). To reach additive cost accuracy the additive accuracy of the final plan: its cost is at most the optimal transport cost plus τ\tau, their Theorem 1 runs this alternation on K=e−C/εK=e^{-C/\varepsilon} with ε=τ/(4log⁡n)\varepsilon=\tau/(4\log n) and δ=τ/(8L)\delta=\tau/(8L). Rounding the output onto U(μ,ν)U(\mu,\nu) returns a valid plan P^∈U(μ,ν)\hat P\in U(\mu,\nu) with ⟨P^,C⟩≤OT+τ\langle\hat P,C\rangle\le\mathrm{OT}+\tau. The whole procedure takes O(n2L3log⁡n/τ3)O(n^2L^3\log n/\tau^3) operations.

Step 1

The entropic plan is a scaling of K=e−C/εK=e^{-C/\varepsilon}. Attach Lagrange multipliers Lagrange multipliers in Rn\mathbb R^n for the row constraints P1=μP\mathbf 1=\mu and the column constraints P⊤1=νP^\top\mathbf 1=\nu to the row and column constraints and differentiate with respect to PijP_{ij}:Cij+ε(log⁡Pij+1)−fi−gj=0,Pij=efi/ε−1/2 e−Cij/ε egj/ε−1/2.\begin{aligned}&C_{ij}+\varepsilon(\log P_{ij}+1)-f_i-g_j=0,\\&P_{ij}=e^{f_i/\varepsilon-1/2}\,e^{-C_{ij}/\varepsilon}\,e^{g_j/\varepsilon-1/2}.\end{aligned}Every entry of PεP_\varepsilon is positive because the slope of Pijlog⁡PijP_{ij}\log P_{ij} is −∞-\infty at 0. Hence Pε=DxKDyP_\varepsilon=D_xKD_y, where KK=e−C/ε{}=e^{-C/\varepsilon} entrywise and the positive vectors the row and column scalings, positive vectors with xi=efi/ε−1/2x_i=e^{f_i/\varepsilon-1/2} and yj=egj/ε−1/2y_j=e^{g_j/\varepsilon-1/2}; DxD_x is the diagonal matrix with diagonal xx have entries xi=efi/ε−1/2x_i=e^{f_i/\varepsilon-1/2} and yj=egj/ε−1/2y_j=e^{g_j/\varepsilon-1/2}. By for a positive matrix AA and positive targets μ,ν\mu,\nu with equal totals, exactly one matrix of the form DxADyD_xAD_y has row sums μ\mu and column sums ν\nu, and alternate row and column normalization converges to it. Reading note: Matrix scaling and Sinkhorn's theorem, only one scaling DxKDyD_xKD_y matches μ\mu and ν\nu, so Sinkhorn's alternation on KK converges to PεP_\varepsilon. Conversely, any matrix DxKDyD_xKD_y satisfies stationarity for its own marginals. Strict convexity makes it the unique entropic optimum for those marginals, a fact Step 5 uses.

The weight ε\varepsilon controls how closely PεP_\varepsilon tracks exact transport. As ε→∞\varepsilon\to\infty, PεP_\varepsilon approaches μν⊤\mu\nu^\top. As ε→0\varepsilon\to0, it converges to the optimal plan of largest entropy, which is a vertex of U(μ,ν)U(\mu,\nu) whenever the linear program's optimum is unique (Peyré and Cuturi, 2019, Proposition 4.1). Comparing the entropic objective at PεP_\varepsilon and an optimal plan an optimal plan of the unregularized problem, ⟨P∗,C⟩=OT\langle P^*,C\rangle=\mathrm{OT} bounds the cost gap through 0≤H≤2log⁡n0\le H\le2\log n (Altschuler et al., proof of Theorem 1):⟨Pε,C⟩−OT≤ε(H(Pε)−H(P∗))≤2εlog⁡n.\begin{aligned}\langle P_\varepsilon,C\rangle-\mathrm{OT}&\le\varepsilon\big(H(P_\varepsilon)-H(P^*)\big)\\&\le2\varepsilon\log n.\end{aligned}

Step 2

Each step lowers the potential by exactly a KL divergence. Divide KK by its entry total ss so AA=K/s{}=K/s has entry total 1. Track the iteration with Sinkhorn's the convex function F(u,v)=∑i,jaijeui+vj−μ⊤u−ν⊤vF(u,v)=\sum_{i,j}a_{ij}e^{u_i+v_j}-\mu^\top u-\nu^\top v of the log-scalings, whose partial derivatives are the row and column sums of the scaled matrix minus their targets. Reading note: Matrix scaling and Sinkhorn's theorem for targets μ,ν\mu,\nu:F(u,v)=∑i,jaijeui+vj−μ⊤u−ν⊤v.\begin{aligned}F(u,v)&=\textstyle\sum_{i,j}a_{ij}e^{u_i+v_j}\\&\quad-\mu^\top u-\nu^\top v.\end{aligned}Here the log-scalings u=log⁡xu=\log x, v=log⁡yv=\log y, entrywise; they start at 0 are the log-scalings, initialized at 0, and the current iterate DxADyD_xAD_y, with entries bij=aijeui+vjb_{ij}=a_{ij}e^{u_i+v_j}; its row sums are B1B\mathbf 1 and its column sums B⊤1B^\top\mathbf 1 is the current matrix bij=aijeui+vjb_{ij}=a_{ij}e^{u_i+v_j}. After a column step, BB has column sums ν\nu and entry total 1. The next row step multiplies row ii by μi/(B1)i\mu_i/(B\mathbf 1)_i, shifting uiu_i to ui′=ui+log⁡(μi/(B1)i)u'_i=u_i+\log(\mu_i/(B\mathbf 1)_i) and leaving the entry total at 1. Because the exponential sum stays 1, it cancels and only −μ⊤u-\mu^\top u changes:F(u,v)−F(u′,v)=∑iμilog⁡μi(B1)i=KL(μ ∥ B1).\begin{aligned}F(u,v)-F(u',v)&=\textstyle\sum_i\mu_i\log\frac{\mu_i}{(B\mathbf 1)_i}\\&=\mathrm{KL}(\mu\,\|\,B\mathbf 1).\end{aligned}By symmetry, a column step after a row step lowers FF by KL(ν ∥ B⊤1)\mathrm{KL}(\nu\,\|\,B^\top\mathbf 1). Because AA also sums to 1, the first row step lowers FF by KL(μ ∥ A1)\mathrm{KL}(\mu\,\|\,A\mathbf 1). Evaluating the drop directly replaces the Taylor bound from the proof of Sinkhorn's theorem with an exact KL divergence.

Step 3

The potential has at most log⁡(s/ℓ)\log(s/\ell) to fall. At initialization, F(0,0)=∑i,jaij=1F(0,0)=\sum_{i,j}a_{ij}=1. The minimum the minimum of FF, reached at the log-scalings (u∗,v∗)(u^*,v^*) of the entropic plan, Pε=(aijeui∗+vj∗)P_\varepsilon=(a_{ij}e^{u^*_i+v^*_j}) occurs at the log-scalings (u∗,v∗)(u^*,v^*) of PεP_\varepsilon (Step 1). Because PεP_\varepsilon also sums to 1, the exponential sums cancel and F(0,0)−F∗=μ⊤u∗+ν⊤v∗F(0,0)-F^*=\mu^\top u^*+\nu^\top v^*. Every entry of PεP_\varepsilon is at most 1 and every aij≥ℓ/sa_{ij}\ge\ell/s, so aijeui∗+vj∗≤1a_{ij}e^{u^*_i+v^*_j}\le1 forces ui∗+vj∗≤log⁡(1/aij)≤log⁡(s/ℓ)u^*_i+v^*_j\le\log(1/a_{ij})\le\log(s/\ell). Averaging against μiνj\mu_i\nu_j givesF(0,0)−F∗=μ⊤u∗+ν⊤v∗=∑i,jμiνj(ui∗+vj∗)≤log⁡(s/ℓ).\begin{aligned}F(0,0)-F^*&=\mu^\top u^*+\nu^\top v^*\\&=\textstyle\sum_{i,j}\mu_i\nu_j(u^*_i+v^*_j)\\&\le\log(s/\ell).\end{aligned}For K=e−C/εK=e^{-C/\varepsilon} with costs in [0,L][0,L], every entry lies in [e−L/ε,1][e^{-L/\varepsilon},1], giving s≤n2s\le n^2 and log⁡(s/ℓ)≤2log⁡n+L/ε\log(s/\ell)\le2\log n+L/\varepsilon.

Step 4

Pinsker's inequality turns the drops into an iteration count with no factor of nn. After every step from the first onward, one marginal is exact, so the entire ℓ1\ell_1 error sits on the other marginal. While that error exceeds δ\delta, ∥p−q∥12≤2 KL(p ∥ q)\|p-q\|_1^2\le2\,\mathrm{KL}(p\,\|\,q) for probability vectors p,qp,q ∥p−q∥12≤2 KL(p ∥ q)\|p-q\|_1^2\le2\,\mathrm{KL}(p\,\|\,q) ensures that the next step lowers FF by more than δ2/2\delta^2/2 (Step 2). Let the number of steps (row or column normalizations) until the marginal error is at most δ\delta be the first step that brings the error to δ\delta or below, and write (u1,v1)(u^1,v^1) for the iterate after step 1. Steps 2 through kk each drop FF by more than δ2/2\delta^2/2, while their total drop is at most F(u1,v1)−F∗≤F(0,0)−F∗≤log⁡(s/ℓ)F(u^1,v^1)-F^*\le F(0,0)-F^*\le\log(s/\ell) (Step 3):(k−1) δ2/2<log⁡(s/ℓ),k<1+2δ−2log⁡(s/ℓ).\begin{aligned}(k-1)\,\delta^2/2&\lt\log(s/\ell),\\k&\lt1+2\delta^{-2}\log(s/\ell).\end{aligned}This constant is computed here. Altschuler et al.'s proof gets 4δ−2log⁡(s/ℓ)4\delta^{-2}\log(s/\ell) because it bounds the squared sum of both marginal errors by four times the sum of both divergences, even though one error is zero after every step. Converted to ℓ1\ell_1, the earlier ℓ2\ell_2 bound of Kalantari et al. (2008) carries an extra factor of nn times the largest entry of μ\mu and ν\nu (Altschuler et al., Corollary 1).

Small ε\varepsilon. Because log⁡(s/ℓ)≤2log⁡n+L/ε\log(s/\ell)\le2\log n+L/\varepsilon, the step bound grows like L/εL/\varepsilon. Step 1 gives u∗=f/εu^*=f/\varepsilon and v∗=g/εv^*=g/\varepsilon up to constants, so the log-scalings must travel a distance of order 1/ε1/\varepsilon. Each step shifts them by log⁡(μi/(B1)i)\log(\mu_i/(B\mathbf 1)_i), which stays bounded whenever the marginals are off by a bounded factor. The figure solves a 2×32\times3 problem, since the proof does not use squareness, with cost rows (0,1,3)(0,1,3) and (2,0,1)(2,0,1), μ=(0.4,0.6)\mu=(0.4,0.6), and ν=(0.2,0.3,0.5)\nu=(0.2,0.3,0.5). For every ε≤0.1\varepsilon\le0.1, PεP_\varepsilon matches the optimal vertex of U(μ,ν)U(\mu,\nu) to four decimals, yet steps to δ=10−3\delta=10^{-3} rise from 54 at ε=0.1\varepsilon=0.1 to 238 at ε=0.01\varepsilon=0.01. At ε=0.02\varepsilon=0.02, the error stalls at 0.40 to two decimals from step 2 to step 94 while FF falls by about 0.1 per step. During that plateau, εu\varepsilon u and εv\varepsilon v march toward εu∗\varepsilon u^* and εv∗\varepsilon v^*, which sit near (0,−1)(0,-1) and (0,1,2)(0,1,2) up to a common shift. Once the error becomes small, convergence is linear as in Sinkhorn's theorem, a regime the δ−2\delta^{-2} bound misses.

Step 5

Rounding, and the choice of ε\varepsilon and δ\delta, give a plan within τ\tau of optimal. Stopping at marginal error δ\delta yields a matrix BB with marginals the row and column sums B1B\mathbf 1, B⊤1B^\top\mathbf 1 of the matrix the alternation stops at; together they are within δ\delta of μ,ν\mu,\nu in ℓ1\ell_1, not yet in U(μ,ν)U(\mu,\nu). Altschuler et al.'s rounding scales down rows whose sums exceed μ\mu, then columns whose sums exceed ν\nu, and adds back the missing mass as a rank-one matrix. Applied to BB, it produces a valid plan the rounded output, a plan in U(μ,ν)U(\mu,\nu) with ∥P^−B∥1≤2δ\|\hat P-B\|_1\le2\delta∈U(μ,ν){}\in U(\mu,\nu) satisfying ∥P^−B∥1≤2δ\|\hat P-B\|_1\le2\htmlData{gr=g11}{\delta}. Step 1's bias bound cannot compare BB directly with P∗P^* because their marginals differ. Apply the same rounding to move P∗P^* onto μ′,ν′\mu',\nu', yielding a plan P∗P^* rounded onto the marginals μ′,ν′\mu',\nu' of BB, with ∥P′−P∗∥1≤2δ\|P'-P^*\|_1\le2\delta with ∥P′−P∗∥1≤2δ\|P'-P^*\|_1\le2\delta. Because BB is the entropic optimum for μ′,ν′\mu',\nu' (Step 1) and each 2δ2\delta shift in ℓ1\ell_1 changes cost by at most 2δL2\delta L,⟨P^,C⟩≤⟨B,C⟩+2δL≤⟨P′,C⟩+2εlog⁡n+2δL≤OT+2εlog⁡n+4δL.\begin{aligned}\langle\hat P,C\rangle&\le\langle B,C\rangle+2\delta L\\&\le\langle P',C\rangle+2\varepsilon\log n+2\delta L\\&\le\mathrm{OT}+2\varepsilon\log n+4\delta L.\end{aligned}

With Theorem 1's choices ε=τ/(4log⁡n)\varepsilon=\tau/(4\log n) and δ=τ/(8L)\delta=\tau/(8L), both error terms equal τ/2\tau/2, giving ⟨P^,C⟩≤OT+τ\langle\hat P,C\rangle\le\mathrm{OT}+\tau. Combining Steps 3 and 4 yields O(L3log⁡n/τ3)O(L^3\log n/\tau^3) steps for τ≤L\tau\le L. Each step takes O(n2)O(n^2) operations, producing Theorem 1's O(n2L3log⁡n/τ3)O(n^2L^3\log n/\tau^3) total runtime.

Theorem 1's ε\varepsilon is far smaller than practice requires. Cuturi's cross-validation most often set ε\varepsilon to the median ground distance divided by 9 and stopped after 20 iterations. On MNIST digits represented as 400-bin histograms with Euclidean pixel cost, an SVM using this Sinkhorn distance beat one using exact optimal transport in classification error. That held even though the Sinkhorn distance stayed about 10% above exact transport at much smaller ε\varepsilon. The same potential analysis covers a greedy variant of the alternation (Altschuler et al., 2017) that normalizes a single row or column per step, the one whose normalization lowers FF the most, which updates one row or column per step. Its step bound is up to nn times larger, while each step costs O(n)O(n) instead of O(n2)O(n^2) work, keeping the same total operation order. In Altschuler et al.'s experiments on MNIST and synthetic images, Greenkhorn outperformed Sinkhorn.

Terms

Entropic transport
min⁡U(μ,ν)⟨P,C⟩−εH(P)\min_{U(\mu,\nu)}\langle P,C\rangle-\varepsilon H(P); equivalently a penalty ε KL(P ∥ μν⊤)\varepsilon\,\mathrm{KL}(P\,\|\,\mu\nu^\top) pulling toward the independent plan.
Scaling form
Pε=DxKDyP_\varepsilon=D_xKD_y with K=e−C/εK=e^{-C/\varepsilon}, from stationarity of the Lagrangian; Sinkhorn's alternation on KK finds it.
Exact drop
A row step lowers FF by KL(μ ∥ B1)\mathrm{KL}(\mu\,\|\,B\mathbf 1), a column step by KL(ν ∥ B⊤1)\mathrm{KL}(\nu\,\|\,B^\top\mathbf 1).
Room to fall
F(0,0)−F∗≤log⁡(s/ℓ)F(0,0)-F^*\le\log(s/\ell), since every entry of PεP_\varepsilon is at most 1.
Iteration count
k<1+2δ−2log⁡(s/ℓ)k\lt1+2\delta^{-2}\log(s/\ell) steps to ℓ1\ell_1 marginal error δ\delta, by Pinsker (constant computed here; the paper's proof gives 4δ−24\delta^{-2}); no factor of nn.
Small ε\varepsilon
log⁡(s/ℓ)≤2log⁡n+L/ε\log(s/\ell)\le2\log n+L/\varepsilon: the scalings must travel order 1/ε1/\varepsilon, so steps grow as ε\varepsilon shrinks.
Entropy bias
⟨Pε,C⟩−OT≤2εlog⁡n\langle P_\varepsilon,C\rangle-\mathrm{OT}\le2\varepsilon\log n.
Near-linear OT
ε=τ/(4log⁡n)\varepsilon=\tau/(4\log n), δ=τ/(8L)\delta=\tau/(8L), round: cost within τ\tau in O(n2L3log⁡n/τ3)O(n^2L^3\log n/\tau^3).

Sources

Connected notes

  • In a PAC-Bayes bound the KL from posterior to prior is the complexity term, and a Gaussian prior centered at the initialization makes it grow with how precisely the weights are specified and how far they move in training.

  • Noisy training minimizes a free energy, half the risk plus weight decay minus the entropy over β\beta, and its unique minimizer is the Gibbs fixed point, proportional to e−βΨλe^{-\beta\Psi_\lambda} for a potential Ψλ\Psi_\lambda that itself depends on the minimizer.

  • In-context prediction is a posterior average over latent concepts, each weighted by its prior times eNrN(θ)e^{N r_N(\theta)}, with rNr_N the per-example log likelihood ratio to the true concept, so the prompt selects the concept once rNr_N has a negative limit for every other.

  • Observing Yt=tx+WtY_t=tx+W_t turns the prior into the tilt μ(dx)e⟨Yt,x⟩−t∥x∥2/2\mu(dx)e^{\langle Y_t,x\rangle-t\|x\|^2/2}, so a diffusion sampler runs through a sequence of ever sharper tilted posteriors.

Threads