Boundary-Safe Log-Barrier Mirror Optimizer
Implementation & benchmark of arXiv:2608.22834 — Mirror descent algorithms with logarithmic barriers
Source paper: Mirror descent algorithms with logarithmic barriers arXiv:2608.22834 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace AdamW or SGD updates on simplex-valued routing probabilities with a logarithmic-barrier mirror step. The update remains strictly positive, avoids projection-induced zero coordinates, and can approach a boundary solution asymptotically while retaining the paper's theoretically motivated O(log k/k) convex convergence behavior.
Formulas
Mathematical statement
The paper considers min f(x) subject to x in C intersect S, where C is a complicated closed convex constraint set, S is a simple closed convex set, and f is convex. Its logarithmic-barrier mirror map h defines the Bregman divergence D_h(y,x) = h(y) - h(x) - inner product of grad h(x) and y-x. The mirror step is x_k = argmin over x in S of the linearized objective plus alpha_k^{-1} D_h(x,x_{k-1}). For the positive orthant C = R_{++}^m, use h(x) = -sum_i log(x_i), giving D_h(y,x) = sum_i[-log(y_i/x_i) + (y_i-x_i)/x_i]. For a simplex router S = {x >= 0 : sum_i x_i = 1}, the KKT update is y_i = [x_i^{-1} + alpha_k(g_i + lambda)]^{-1}, where g_i is the gradient of the loss with respect to x_i and lambda is chosen so that sum_i y_i = 1. Positive denominators are enforced by backtracking or safeguarded root finding. The paper states an O(log k/k) rate, where k is the iteration count, under its convex assumptions. Neural-network training is nonconvex and stochastic, so this rate should be treated as motivation rather than as an unchanged guarantee.
Implementation notes
(1) Integrate the method at the optimizer for a simplex-valued tensor, not inside the router network. Let P in R^{B x E} be per-token expert probabilities, with every row positive and summing to one. Compute the minibatch loss gradient G = dL/dP by backpropagation, and maintain P as the constrained trainable state; for a cheap first test, apply the method only to a learned global expert-prior vector. (2) For each simplex row p, initialize alpha = alpha_0, set d_i = p_i^{-1} + alpha(G_i + lambda), and compute q_i = 1/d_i. Find lambda by bisection on F(lambda) = sum_i 1/[p_i^{-1} + alpha(G_i + lambda)] - 1. Restrict the search to values for which every denominator exceeds a numerical floor epsilon_d. If the candidate is nonfinite or causes a large loss increase, halve alpha and retry. Set p to q, optionally enforce p_i >= 10^{-8} for numerical safety, and renormalize. This is the KKT form of the logarithmic-barrier mirror step; do not apply a second Adam update to the same state. (3) The barrier, Bregman divergence, reciprocal update, and simplex root condition come from the paper's mathematics. Estimate gradients by backpropagation, select alpha_0 with a short logarithmic sweep, and perform the reciprocal and bisection calculations in float32 even when the network uses mixed precision. (4) First experiment: train a small Switch-Transformer or top-1 MoE on CIFAR-100 or a toy language-model corpus with 8 experts. Compare AdamW on router logits followed by softmax, exponentiated-gradient routing, and the barrier mirror optimizer at matched optimizer FLOPs. Measure validation loss, expert-load entropy, the fraction of numerically zero routes, gradient NaNs, and loss after a fixed number of updates. Success is lower validation loss or fewer routing collapses at equal training cost, particularly when the useful routing distribution is highly imbalanced. A negative result is consistently slower loss descent or persistent expert under-utilization.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built and ran a safeguarded simplex log-barrier mirror optimizer with Bregman, positivity, root-condition, boundary-scaling, and toy routing tests. The mechanism manifested clearly: simplex residuals were at most 3.3e-16, all coordinates stayed positive, reciprocal boundary growth matched the predicted slope alpha within 0.15% at alpha=0.5 and below 0.004% for alpha>=1, and the one-step boundary approximation had under 1% relative error. However, on the imbalanced convex routing toy, the barrier method ended with higher loss than exponentiated gradient or Adam, so it is mechanism-validated but not an optimization win.
- Agent confidence
- 9/10
- Baseline
- Exponentiated gradient: final cross-entropy 0.855829, step-20 loss 0.915598, minimum probability 0.001000; Adam-logits: final cross-entropy 0.857150, step-20 loss 0.906594, minimum probability 0.003582.
- Idea
- Barrier mirror with alpha=0.08: final cross-entropy 0.924108, step-20 loss 1.236211, minimum probability 0.049750; all 13 alpha values retained positive coordinates and root residual <=1.11e-16; reciprocal boundary slope/alpha ratios ranged 0.9985-0.999999.
Limitations: This is a NumPy toy experiment, not a neural MoE or stochastic minibatch training test. Alpha tuning, loss-increase backtracking, GPU execution, FLOP accounting, multiple random seeds, and the claimed O(log k/k) convergence rate were not tested.
How to run: python3 barrier_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- barrier_experiment.py 5.7 KB View Raw
- report.md 1.6 KB View
- results.json 19.2 KB View Raw