Buckets:
| """Write the trackio logbook pages (markdown with trackio-cell headers).""" | |
| import json | |
| import os | |
| import uuid | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| PAGES = os.path.join(ROOT, ".trackio", "logbook", "pages") | |
| TS = "2026-07-25T14:00:00+00:00" | |
| def cell(kind, title, body, pinned=False, extra=None): | |
| meta = { | |
| "type": kind, | |
| "id": "cell_" + uuid.uuid4().hex[:12], | |
| "created_at": TS, | |
| "title": title, | |
| } | |
| if pinned: | |
| meta["pinned"] = True | |
| meta["pinned_at"] = TS | |
| if extra: | |
| meta.update(extra) | |
| return ( | |
| "\n---\n<!-- trackio-cell\n" | |
| + json.dumps(meta) | |
| + "\n-->\n" | |
| + body.strip() | |
| + "\n" | |
| ) | |
| def write(slug, heading, cells): | |
| d = os.path.join(PAGES, slug) | |
| os.makedirs(d, exist_ok=True) | |
| with open(os.path.join(d, "page.md"), "w") as fh: | |
| fh.write("# " + heading + "\n\n" + "\n".join(cells)) | |
| print("wrote", slug) | |
| REPO = "https://github.com/egorgladin/logsumexp-approx" | |
| ARX = "https://arxiv.org/abs/2509.24894" | |
| # ------------------------------------------------------------------ exec summary | |
| poster = open(os.path.join(ROOT, "poster", "poster_embed.html")).read() | |
| exec_md = ( | |
| """ | |
| **Outcome: 3 of 6 claims verified, 2 falsified as stated, 1 toy (reduced scale).** The Safe-KL | |
| machinery itself reproduces exactly: `f_rho` is 4rho-strongly convex and its conjugate is | |
| 1/(4rho)-smooth, so both constants claimed in Lemma 2.7 hold with a factor-4 margin; Prop. 2.6 | |
| holds in 4000/4000 random instances and both of its limiting cases converge at the predicted | |
| O(lambda) and O(rho) rates; and the continuous entropy-regularised OT experiment reproduces with | |
| the proposed semi-dual reaching an optimality gap of **0.0038** where the baseline dual, at its own | |
| best stepsize, is still at **0.55** after 10^5 iterations. Two printed statements do not survive | |
| execution. The sandwich printed after Prop. 2.4, `F_rho - O(rho) <= F <= F_rho`, has its direction | |
| inverted: `F_rho <= F` in **3000/3000** random instances (0 support for `F <= F_rho`), which is also | |
| what the paper's own Corollary 2.5 states; the substantive O(rho) accuracy is confirmed with fitted | |
| exponent 1.012 +/- 0.076. And on California Housing **no** admissible rho makes the proposed method | |
| stable at eta = 1e-4 with batch size 10 (0/10 seeds for every rho in {1e-4 ... 0.9}), while the | |
| baseline's eta = 1e-6 at |D| = 10 reproduces exactly -- a conclusion corroborated by the authors' | |
| own released code, which uses eta = 1e-6 there. Everything ran on CPU; the official implementation | |
| was located ([egorgladin/logsumexp-approx](%s)) and read only for distributions and hyper-parameter | |
| grids -- all code here is an independent re-implementation from the equations in the paper. | |
| ## Scope & cost | |
| | Item | Value | | |
| | --- | --- | | |
| | Scope | 6/6 claims attempted; 3 verified, 2 falsified as stated, 1 toy (reduced scale) | | |
| | Hardware | CPU only (shared 124-core host), no GPU, no HF Jobs | | |
| | Compute time | ~3 h wall clock end-to-end on a shared 124-core box; ~55 core-hours total | | |
| | Cost | $0 | | |
| | Scale | 3000-4000 random instances per analytic claim; 150 kernel-SGD runs x 10^5 iters (eOT); 1050 runs x 50 epochs (California Housing); 48 runs x 15k-50k batch-1 SGD steps (MNIST subset) | | |
| | Code | independent NumPy / SciPy / PyTorch-CPU re-implementation; official repo read only for setup | | |
| """ | |
| % REPO | |
| ) | |
| write( | |
| "executive-summary", | |
| "Executive summary", | |
| [ | |
| cell("markdown", "Executive summary", exec_md, pinned=True), | |
| cell( | |
| "figure", | |
| "Reproduction poster (poster_embed.html)", | |
| "````html\n" + poster.strip() + "\n````", | |
| pinned=True, | |
| extra={"poster": True}, | |
| ), | |
| ], | |
| ) | |
| # ------------------------------------------------------------------ claim 1 | |
| c1 = """ | |
| > **Claim (verbatim).** The paper defines a Safe KL divergence with a bounded-density constraint | |
| > (Definition 2.1, Equations 3-4) whose induced approximation to LogSumExp satisfies | |
| > F_rho - O(rho) <= F <= F_rho (Proposition 2.4, Section 2). | |
| ## Verdict: **falsified as stated** (direction inverted); the corrected two-sided bound is verified | |
| The definitional half of the claim reproduces exactly. The inequality as printed does not: it is | |
| `F_rho <= F` that holds, never `F <= F_rho`. | |
| ## Independent method | |
| `scripts/common.py` + `scripts/claim1_sandwich.py` implement, from Def. 2.1 / Eqs. (3)-(6) and | |
| nothing else: | |
| * `f_rho`, its derivatives, and the conjugate of Lemma 2.3; | |
| * `F_rho` by solving the stationarity condition (7) with Brent's method in log-space | |
| (`logaddexp`), cross-checked against a 4-stage grid minimisation over alpha; | |
| * the **primal** side of (5) -- maximise `<phi,nu> - D_rho(nu,mu)` over the simplex under the hard | |
| density bound `dnu/dmu <= 1/rho` with SLSQP -- to confirm the duality (5) <=> (6) independently. | |
| Random instances: 5 families (Gaussian, Student-t, spiky, uniform, bimodal), n in [5, 400], | |
| Dirichlet weights, rho in {1e-4 ... 0.9}. Seed 20260725, `numpy.random.default_rng`. | |
| ## Numerical result | |
| | test | scale | result | | |
| | --- | --- | --- | | |
| | duality (5) <=> (6), density cap active | 12 instances | max abs gap **8.9e-15**; optimal density matches `e^{phi-a*}/(1+rho e^{phi-a*})` to 1.1e-6, always < 1/rho | | |
| | Lemma 2.3 conjugate formula | 648 (s, rho) pairs | max abs err **2.9e-11** | | |
| | Prop 2.4(i): rho <= rho' => F_rho' <= F_rho | 3200 pairs | **0 violations** | | |
| | Prop 2.4(ii): F - F_rho -> 0, fitted exponent | 400 instances | **1.012 +/- 0.076** (predicted 1) | | |
| | **printed direction `F <= F_rho`** | **3000 instances** | **holds in 0** | | |
| | reverse direction `F_rho <= F` | 3000 instances | holds in **3000** (min strict gap 5.2e-5) | | |
| | Prop 2.4(iii) inside its stated rho range | 4751 checks | 0 violations (min slack 3.1e-4) | | |
| | Prop 2.4(iii) **outside** it | 7249 checks | **85 violations** (min slack -270) | | |
| | Prop 2.4(iv) inside / outside its range | 5451 / 6549 | 0 / **431** violations | | |
| | Corollary 2.5 (LogSumExp form), both sides | 3000 instances | **0 violations**; worst gap/rho = 0.826 <= 1 | | |
| **Hand-checkable counterexample.** mu = delta_0, phi == 0, rho = 0.1: F = 0, while | |
| `F_rho = log(1-rho) - 1 - log(1-rho)/rho = -0.05175536` (numeric and closed form agree to 2e-16). | |
| So `F <= F_rho` fails by 0.052 on the simplest possible instance. | |
| ## Expected value | |
| Prop. 2.4(i)+(ii) *imply* `F_rho <= F`, and Corollary 2.5 in the same section writes | |
| `LogSumExp - rho <= approx <= LogSumExp`. The printed sentence contradicts the paper's own corollary; | |
| the intended statement is `F - O(rho) <= F_rho <= F`, which every test above supports. | |
| ## Limitation | |
| Instances are finitely supported (discrete mu); the continuum statement is not tested directly, but | |
| the argument in 2.4(i)-(ii) is measure-agnostic and the discrete case is a special case of it. The | |
| boundary audit shows 2.4(iii)-(iv) genuinely need their rho ranges -- outside them the explicit | |
| lower bounds fail, so they are not vacuous side conditions. | |
| Artifacts: `scripts/common.py`, `scripts/claim1_sandwich.py`, `outputs/claim1_sandwich.json`, | |
| `figs/claim1.png`. | |
| """ | |
| write( | |
| "claim-1-safe-kl-divergence-and-the-f-rho-o-rho-f-f-rho-sandwich-prop-2-4", | |
| "Claim 1: Safe KL divergence and the F_rho - O(rho) <= F <= F_rho sandwich (Prop 2.4)", | |
| [cell("markdown", "Claim 1 - verdict: falsified as stated", c1)], | |
| ) | |
| # ------------------------------------------------------------------ claim 2 | |
| c2 = """ | |
| > **Claim (verbatim).** The rescaled SoftPlus-based conjugate of the Safe KL function is proven to | |
| > be rho-strongly convex, with its own conjugate being (1/rho)-smooth (Lemma 2.7, Section 2.2). | |
| ## Verdict: **verified** (both constants hold; the tight constants are 4rho and 1/(4rho)) | |
| ## Independent method | |
| `scripts/claim2_strong_convexity.py` re-derives the two moduli instead of quoting the proof: | |
| 1. **Curvature.** `f_rho''(t) = 1/t + rho/(1-rho t)` evaluated on a 2x10^6-point grid over the whole | |
| domain [0, 1/rho]; the minimiser is located numerically and compared to the analytic `t = 1/(2rho)`. | |
| 2. **Defining inequality.** 20000 random chords per rho: | |
| `f(la t1 + (1-la) t2) <= la f(t1) + (1-la) f(t2) - (m/2) la(1-la)(t1-t2)^2` | |
| tested at m = rho (the claim), m = 4rho (tight) and m = 4.05rho (must fail). | |
| 3. **Conjugate smoothness.** `(f_rho^*)''(s) = e^s/(1+rho e^s)^2` maximised numerically; plus the | |
| Lipschitz-gradient inequality at L = 1/rho, 1/(4rho), 1/(4.05rho). | |
| 4. **Legendre duality re-derivation.** the identity `(f^*)''(s) = 1 / f''((f^*)'(s))` -- i.e. the | |
| fact that m-strong convexity *is* 1/m-smoothness of the conjugate -- checked pointwise, plus the | |
| biconjugate `(f^*)^* = f` by brute-force sup over a 4x10^5-point grid. | |
| 5. **Transfer to the parametric objective** of Sec. 2.2: finite-difference Hessian of | |
| `G_rho(theta, alpha)` for a least-squares loss (d = 5, n = 200). | |
| ## Numerical result | |
| | quantity | rho = 0.01 | rho = 0.1 | rho = 0.9 | predicted | | |
| | --- | --- | --- | --- | --- | | |
| | `min_t f_rho''` | 0.0400 | 0.400 | 3.600 | **4 rho** | | |
| | argmin t | 50.000 | 5.000 | 0.5556 | 1/(2 rho) | | |
| | `max_s (f_rho^*)''` | 25.0 | 2.50 | 0.2778 | **1/(4 rho)** | | |
| | argmax s | 4.60517 | 2.30259 | 0.10536 | -log rho | | |
| * rho-strong convexity: **0 violations in 200000 chord tests per rho**, for all 10 values of rho. | |
| * modulus 4rho: 0 violations; modulus 4.05rho: **846-973 violations of 20000** at every rho -- so | |
| 4rho is exactly the tight constant and the claimed rho is loose by a factor 4. | |
| * (1/rho)-smoothness: 0 violations; L = 1/(4rho) is attained (max ratio 0.994) and 1/(4.05rho) fails. | |
| * Legendre identity: max relative error **8.0e-6** over 20010 points; biconjugate max abs err 9.1e-8. | |
| * `G_rho(theta, alpha)` Hessian: min eigenvalue >= 0 (convexity preserved, Sec. 2.2) and | |
| `||Hess|| / L_loss` = 2.6, 7.6, 67 for rho = 0.3, 0.1, 0.01 -- below the 1/rho = 3.3, 10, 100 | |
| scaling the paper predicts. | |
| ## Boundary audit | |
| * rho -> 1-: the strong-convexity modulus tends to 4 and `F_rho -> mean(phi) - 1` (numeric: -1.0442 | |
| at rho = 0.9999 vs -1.0452 exact) -- the density constraint forces nu = mu. | |
| * rho > 1: `f_rho(1) = +inf`, so `D_rho == +inf` and the variational problem (5) is vacuous. The | |
| paper's restriction 0 < rho < 1 is necessary, not cosmetic. | |
| ## Limitation | |
| Strong convexity is checked on the interior of the domain (t in (0, 1/rho)); at the endpoints | |
| `f_rho''` diverges, so the modulus is attained in the interior and the endpoints only help. | |
| Artifacts: `scripts/claim2_strong_convexity.py`, `outputs/claim2_strong_convexity.json`, | |
| `figs/claim2.png`. | |
| """ | |
| write( | |
| "claim-2-rescaled-softplus-conjugate-is-rho-strongly-convex-with-1-rho-smooth-conjugate-lemma-2-7", | |
| "Claim 2: Rescaled SoftPlus conjugate is rho-strongly convex with (1/rho)-smooth conjugate (Lemma 2.7)", | |
| [cell("markdown", "Claim 2 - verdict: verified", c2)], | |
| ) | |
| # ------------------------------------------------------------------ claim 3 | |
| c3 = """ | |
| > **Claim (verbatim).** The approximation family is shown to bound and connect to the CVaR | |
| > functional, recovering CVaR and LogSumExp as limiting cases (Proposition 2.6, Section 2.1). | |
| ## Verdict: **verified** (bounds hold everywhere tested; both limits converge at the predicted rate) | |
| ## Independent method | |
| `scripts/claim3_cvar.py`. CVaR is computed from the Rockafellar-Uryasev variational form (9) by | |
| exact minimisation over the kink set (the atoms), and cross-checked against the tail-average | |
| definition whenever rho*n is an integer (288 cases, max abs difference **8.9e-16**). `F_rho` comes | |
| from the same independent solver as Claim 1. Random instances as in Claim 1, with | |
| lambda log-uniform in [1e-3, 30] and rho in {1e-3 ... 0.9}; seed 20260725. | |
| ## Numerical result | |
| | test | scale | result | | |
| | --- | --- | --- | | |
| | Prop 2.6 lower bound | 4000 instances | **0 violations**, min slack 4.0e-7 | | |
| | Prop 2.6 upper bound | 4000 instances | **0 violations**, min slack 1.1e-3 | | |
| | position inside the band | 4000 instances | 7.3e-5 ... 0.689 of the band width -- both ends approached | | |
| | upper constant shrunk to 0.7 lambda/rho | 1500 | 0 violations | | |
| | upper constant shrunk to **0.5** lambda/rho | 1500 | **107 violations** | | |
| | lower constant shifted by +0.05 lambda | 1500 | **183 violations** | | |
| | **limit lambda -> 0** (CVaR) | 60 instances x 9 lambdas | error -> 0, fitted rate **lambda^1.18** (min 1.000) | | |
| | **limit rho -> 0** (LogSumExp) | 60 instances x 7 rhos | error -> 0, fitted rate **rho^(1.00 +/- 0.03)** | | |
| | rho -> 1 boundary | 400-atom instance | CVaR_0.99 = 0.0230 vs mean -0.0056; lambda*F_1 -> mean - lambda | | |
| Example of the CVaR limit (one instance, rho = 0.25): |lambda F_rho(phi/lambda) - lambda(log rho - 1) | |
| - CVaR| = 1.10, 0.112, 0.0121, 8.1e-4, 1.0e-4, 2e-5, 1e-5 for lambda = 1, 0.3, 0.1, 0.03, 1e-2, | |
| 3e-3, 1e-3. | |
| ## Expected value | |
| Prop. 2.6 predicts a band of width lambda/rho; the tightness audit shows the constant cannot be | |
| halved and the lower endpoint cannot be raised at all, so the family really is sandwiched *and* | |
| tight. The two limits are the ones the paper names: lambda -> 0 gives CVaR_rho, rho -> 0 gives the | |
| log-partition (LogSumExp) functional. | |
| ## Limitation | |
| Discrete mu (the CVaR variational form is exact there); for continuous mu the quantile definition | |
| and the variational form agree, but only the discrete case is executed here. | |
| Artifacts: `scripts/claim3_cvar.py`, `outputs/claim3_cvar.json`, `figs/claim3.png`. | |
| """ | |
| write( | |
| "claim-3-family-bounds-and-connects-to-cvar-recovering-cvar-and-logsumexp-as-limits-prop-2-6", | |
| "Claim 3: Family bounds and connects to CVaR, recovering CVaR and LogSumExp as limits (Prop 2.6)", | |
| [cell("markdown", "Claim 3 - verdict: verified", c3)], | |
| ) | |
| # ------------------------------------------------------------------ claim 4 | |
| c4 = """ | |
| > **Claim (verbatim).** In continuous entropy-regularized optimal transport experiments with | |
| > regularization eps=0.01, the proposed semi-dual formulation (Equations 14-15) avoids the numerical | |
| > overflow issues of the baseline and reaches a converged objective in roughly 10^4 iterations | |
| > (Figure 2, Section 3.1). | |
| ## Verdict: **verified** | |
| ## Independent method | |
| `scripts/claim4_eot.py` (NumPy; the authors use PyTorch). Setup from Sec. 3.1 / App. B.2: | |
| mu = N(1, 1/sqrt(8 pi)); nu = 0.5 N(0, sqrt(0.02)) + 0.5 N(2, sqrt(1/(2 pi))); c(x,y) = (x-y)^2; | |
| Gaussian kernel exp(-|x-x'|^2/sigma^2); eps = 0.01; double precision. | |
| * **Baseline** = kernel SGD on the dual (12) with the iterates (24)-(25), | |
| `beta_i = (C/sqrt(i)) (1 - exp((u+v-c)/eps))`, sigma^2 in {0.1, 1}, C = 1e-3 (the paper's best). | |
| * **Proposed** = kernel SGD on the approximate semi-dual (14)-(15) with | |
| `beta_i = (C/sqrt(i)) (1 - sigma_rho(.))` plus the scalar alpha, sigma^2 = 10, | |
| (rho, C) in {(0.03, 1), (0.1, 1), (0.3, 10)} -- the paper's best settings. | |
| * **Optimality-gap proxy** exactly as App. B.3: N = 10^4 test points, reference `W_hat` = max over 10 | |
| runs of SGD on the semi-discrete problem (2x10^5 iterations, Polyak averaging). | |
| 20 seeds per main configuration, 10^5 iterations each; 150 runs in total. | |
| ## Numerical result | |
| Reference `W_hat = 0.7672615` (10 runs, spread 2.6e-4). | |
| | configuration | seeds | gap @ 10^3 | gap @ 10^4 | gap @ 10^5 | | |
| | --- | --- | --- | --- | --- | | |
| | baseline dual, sigma^2 = 0.1, C = 1e-3 | 20 | 0.703 | 0.637 | **0.550** | | |
| | baseline dual, sigma^2 = 1, C = 1e-3 | 20 | 0.706 | 0.653 | **0.544** | | |
| | proposed, rho = 0.03, C = 1 | 20 | 0.301 | 0.0732 | 0.0988 | | |
| | proposed, rho = 0.1, C = 1 | 20 | 0.240 | 0.0377 | 0.0371 | | |
| | proposed, rho = 0.3, C = 10 | 20 | **0.0514** | **0.0143** | **0.0038** | | |
| * The proposed method first crosses gap 0.1 at iteration **10^3** (rho = 0.3) or **10^4** | |
| (rho = 0.03, 0.1) and is essentially flat afterwards -- "converged in roughly 10^4 iterations" | |
| reproduces (the paper says ~2x10^4). The baseline never reaches 0.1 in 10^5 iterations, ending | |
| **145x** worse than the proposed method at rho = 0.3. | |
| * **Divergence of the baseline at larger stepsizes** (paper Fig. 2, right): with C = 1e-2 the final | |
| gap is 3.7e8 (sigma^2 = 0.1), 79.6 (sigma^2 = 1), 178 (sigma^2 = 10) -- 4/4 seeds blow up in every | |
| case; C = 0.1 and C = 1 give 1e11-1e73. | |
| * **Overflow (Remark 3.1).** The thresholds are confirmed by bisection: exp(z/eps) overflows for | |
| z >= **7.09783** in float64 (paper: 7.1) and z >= **0.88723** in float32 (paper: 0.89). | |
| In a float32 re-run the baseline returns `inf` at **iteration 2** (2/3 seeds, C = 1) and its | |
| coefficients become non-finite immediately, while the proposed method reaches z = **14.27** -- | |
| past even the float64 threshold -- with no overflow at all, because the sigmoid/SoftPlus form | |
| never exponentiates. In float64 over 10^5 iterations the baseline's exponent argument | |
| (u+v-c)/eps reaches 13.1 at C = 1e-3 and 172 at C = 1 -- e^172 is finite but large enough to | |
| destroy the iterate without ever producing `inf`, which is the stagnation the paper describes. | |
| * Sensitivity: initialising alpha at 0 instead of the code's `-c_0/eps` changes the final gap from | |
| 0.0371 to 0.0346 (rho = 0.1) -- the result is not an artefact of the initialisation. | |
| ## Limitation | |
| The optimality gap is a proxy (App. B.3) rather than the true W_eps; it is computed against a | |
| fixed 10^4-point test set shared by all methods, so cross-method comparisons are exact even if the | |
| absolute level carries the proxy's bias. | |
| Artifacts: `scripts/claim4_eot.py`, `scripts/claim4_float32_probe.py`, `outputs/claim4_runs.json`, | |
| `outputs/claim4_reference.json`, `outputs/claim4_remark31.json`, `outputs/claim4_float32_probe.json`, | |
| `figs/claim4.png`. | |
| """ | |
| write( | |
| "claim-4-continuous-entropy-regularized-ot-at-eps-0-01-semi-dual-avoids-overflow-converges-in-1e4-iters-fig-2", | |
| "Claim 4: Continuous entropy-regularized OT at eps=0.01: semi-dual avoids overflow, converges in ~1e4 iters (Fig 2)", | |
| [cell("markdown", "Claim 4 - verdict: verified", c4)], | |
| ) | |
| # ------------------------------------------------------------------ claim 5 | |
| c5 = ( | |
| """ | |
| > **Claim (verbatim).** In KL-regularized distributionally robust optimization on California | |
| > Housing, the proposed method converges with a stepsize of eta=10^-4 across batch sizes of 10, 100, | |
| > and 1000, whereas the baseline requires a much smaller eta=10^-6 at batch size 10 (Figure 3, | |
| > Section 3.2). | |
| ## Verdict: **falsified as stated** | |
| The baseline half reproduces *exactly*. The proposed half does not: at |D| = 10, eta = 1e-4 diverges | |
| for **every** rho tested, including every rho in the paper's own grid. | |
| ## Independent method | |
| `scripts/claim5_kl_dro.py` (NumPy). California Housing via `sklearn.datasets.fetch_california_housing` | |
| (20640 x 8, standardised, intercept column), squared-error loss, lambda = 1, objective | |
| `L(theta) = lambda log((1/n) sum_i exp(l_i/lambda))` evaluated on the full dataset. SGD with Nesterov | |
| momentum 0.9 (PyTorch semantics), initialised at the least-squares solution (`L0 = 44.0181`), 50 | |
| epochs. Baseline = batch-softmax estimator (18) of Levy et al.; proposed = estimator (19) with the | |
| extra scalar alpha (alpha_0 = 0). Full grid: eta in {1e-8 ... 1e-4} x |D| in {10, 100, 1000} x | |
| rho in {1e-4, 1e-3, 1e-2, 1e-1, 0.5, 0.9} x 10 seeds = **1050 runs**. A run counts as converged if | |
| it finishes 50 epochs with finite L and L_final <= L_0. | |
| ## Numerical result -- largest stepsize that converges on all 10 seeds | |
| | method | batch 10 | batch 100 | batch 1000 | | |
| | --- | --- | --- | --- | | |
| | **baseline (18)** | **1e-6** | 1e-6 | **1e-5** | | |
| | proposed, rho = 1e-4 | diverges at every eta | 1e-8 | 1e-6 | | |
| | proposed, rho = 1e-3 | 1e-8 | 1e-7 | 1e-6 | | |
| | proposed, rho = 1e-2 | 1e-7 | 1e-6 | 1e-4 | | |
| | proposed, rho = 1e-1 | 1e-6 | 1e-5 | 1e-4 | | |
| | proposed, rho = 0.5 | 1e-5 | 1e-4 | 1e-4 | | |
| | proposed, rho = 0.9 | 1e-5 | 1e-4 | 1e-4 | | |
| * The baseline's **1e-6 at |D| = 10** and its increase to **1e-5 at |D| = 1000** are exactly the | |
| numbers in Sec. 3.2. At eta = 1e-5, |D| = 10 only 1/10 seeds survive. | |
| * At |D| = 10, eta = 1e-4 **0 of 10 seeds converge for any method or rho**: L rises from 44.0 to | |
| 1.3e4 (baseline) and 4.5e4 (proposed, rho = 0.1) within one epoch. Under the paper's own rho grid | |
| {1e-4, 1e-3, 1e-2} the proposed method is *less* stable than the baseline, not more. | |
| * Best objective after 50 epochs (over settings stable on all seeds): proposed 16.89 vs baseline | |
| 19.99 at |D| = 10; 16.37 vs 17.40 at |D| = 100; **2.13 vs 3.23** at |D| = 1000. The qualitative | |
| message of Fig. 3 -- the proposed estimator dominates at every batch size -- does reproduce. | |
| ## Why | |
| The proposed gradient weight is `sigma_rho((l_i - alpha)/lambda) <= 1/rho`, so its estimator has | |
| magnitude up to `1/rho` times the baseline's, whose softmax weights sum to 1 over the batch. Smaller | |
| rho (a *better* approximation) therefore forces a smaller stepsize. The stated pairing | |
| (eta = 1e-4 with a small rho at |D| = 10) is structurally impossible for this loss. | |
| **Corroboration from the authors' own code.** `kl-dro/main.py` in [egorgladin/logsumexp-approx](%s) | |
| lists, for lambda = 1, `(rho=1e-1, batch=10, lr=1e-6)` and `(rho=1e-1, batch=1000, lr=1e-4)` -- i.e. | |
| the released configuration also uses 1e-6 at batch 10 and 1e-4 only at batch 1000, matching this | |
| reproduction and not the claim. | |
| ## Limitation | |
| 10 seeds instead of the paper's 20, and convergence is scored by a fixed rule (finite and | |
| non-increasing after 50 epochs). The divergences are not borderline -- objectives reach 1e4 -- so | |
| the rule's threshold does not drive the verdict. | |
| Artifacts: `scripts/claim5_kl_dro.py`, `outputs/claim5_kl_dro.json`, | |
| `outputs/claim5_threshold_table.json`, `outputs/summary_456.json`, `figs/claim5.png`. | |
| """ | |
| % REPO | |
| ) | |
| write( | |
| "claim-5-kl-regularized-dro-on-california-housing-eta-1e-4-across-batch-10-100-1000-vs-baseline-eta-1e-6-fig-3", | |
| "Claim 5: KL-regularized DRO on California Housing: eta=1e-4 across batch 10/100/1000 vs baseline eta=1e-6 (Fig 3)", | |
| [cell("markdown", "Claim 5 - verdict: falsified as stated", c5)], | |
| ) | |
| # ------------------------------------------------------------------ claim 6 | |
| c6 = """ | |
| > **Claim (verbatim).** In unbalanced optimal-transport-based DRO on MNIST with label noise, the | |
| > proposed approach (Equation 22) converges faster than the baseline (Equation 21) using eta=10^-4 | |
| > versus the baseline's required eta=10^-5 (Figure 4, Section 3.3). | |
| ## Verdict: **toy** -- reproduced directionally at reduced scale (blocker: CPU budget) | |
| The comparison the claim names is observed in both of our runs -- but on a subset of MNIST, for a | |
| fraction of the epochs, and with a caveat: at the largest scale we could afford, the baseline's | |
| *requirement* of eta = 1e-5 does not hold (it survives 1e-4 and then beats the proposed method). | |
| Toy, not verified, and the negative part is reported in full below. | |
| ## Independent method | |
| `scripts/claim6_uot_dro.py` (PyTorch-CPU). Faithful to Sec. 3.3: the same CNN (conv 32 / conv 64, | |
| 3x3, ReLU, 2x2 max-pool, FC-128, FC-10), **batch size 1**, lambda = beta = 1, rho = 0.1, the inner | |
| maximisation `lhat_i = sup_z l(theta;z) - lambda||z - x_i||^2` by **5 Nesterov steps** | |
| (lr = 0.1/lambda, momentum 0.4), and the authors' own noisy-label file | |
| (`feature-dependent_25_ytrain.npy` from gorkemalgan/corrupting_labels_with_distillation; measured | |
| noise rate **0.2500**), clean test labels. Baseline optimises (21) `mean exp(lhat/(lambda beta))`; | |
| proposed optimises (22); ERM is plain cross-entropy. A run is marked diverged when a loss/gradient/ | |
| parameter becomes non-finite (floating-point exception). | |
| **Reduced scale (the blocker):** two independent runs -- **A** = 10000 training images x 5 epochs | |
| (50k batch-1 steps), **B** = 25000 images x 4 epochs (100k steps) -- instead of 50000 images x 20 | |
| epochs (1M steps); 3 seeds instead of 10; 2000 validation / 2000 test images; F(theta) evaluated on | |
| a 1000-image subset. A first exploratory run (5000 images x 3 epochs) is also archived. | |
| ## Numerical result | |
| **Run A -- 10000 images x 5 epochs (50k steps), 3 seeds** | |
| | method | eta | floating-point exceptions | F(theta) at the end | clean test acc | | |
| | --- | --- | --- | --- | --- | | |
| | baseline (21) | 1e-3 | **3/3** (steps 1393, 3533, 6906) | - | - | | |
| | baseline (21) | 1e-4 | **1/3** (step 26174) | 0.774 | 0.836 | | |
| | baseline (21) | **1e-5** | 0/3 | **0.998** | 0.793 | | |
| | baseline (21) | 1e-6 | 0/3 | 2.085 | 0.533 | | |
| | **proposed (22)** | 1e-3 | 0/3 | **0.579** | 0.812 | | |
| | **proposed (22)** | **1e-4** | 0/3 | **0.889** | 0.812 | | |
| | proposed (22) | 1e-5 | 0/3 | 1.346 | 0.706 | | |
| | ERM | 1e-3 | 0/3 | 0.965 | 0.815 | | |
| **Run B -- 25000 images x 4 epochs (100k steps), 3 seeds** (the decisive stepsizes only) | |
| | method | eta | floating-point exceptions | F(theta) at the end | clean test acc | | |
| | --- | --- | --- | --- | --- | | |
| | baseline (21) | 1e-4 | **0/3** | **0.663 +/- 0.028** | 0.817 | | |
| | baseline (21) | 1e-5 | 0/3 | 0.943 +/- 0.041 | 0.804 | | |
| | proposed (22) | 1e-4 | 0/3 | 0.783 +/- 0.014 | 0.814 | | |
| * **The comparison named in Fig. 4 reproduces in both runs**: the proposed method at eta = 1e-4 | |
| reaches a lower objective than the baseline at eta = 1e-5 (0.889 vs 0.998 in A; 0.783 vs 0.943 in | |
| B), so "converges faster" holds at the stated stepsize pair. | |
| * **The proposed method never overflowed** -- 0 floating-point exceptions in every configuration and | |
| every seed, at every stepsize from 1e-5 to 1e-3. The baseline is the only method that dies. | |
| * **Negative / sensitivity result, reported as found.** The baseline's *need* for eta = 1e-5 is | |
| horizon- and sample-dependent, not absolute: it overflows at 1e-4 in 1/3 seeds in run A but in | |
| **0/3** seeds in the longer run B -- and when it survives at 1e-4 it reaches **0.663**, i.e. it | |
| *beats* the proposed method's 0.783. At full scale (20x more steps) the paper's premise may well | |
| bite, but at the scale we can afford, "the baseline requires 1e-5" is only intermittently true, | |
| and the proposed method's advantage rests on its robustness rather than on a better objective at | |
| a matched stepsize. | |
| * Overflow at eta = 1e-3 is robust: 3/3 seeds in run A and in the exploratory run (first exception | |
| between step 1393 and 11518). | |
| ## Limitation / what a full-scale run would add | |
| At 5 epochs ERM has not yet started to fit the label noise, so the Fig. 4 (left) phenomenon -- | |
| ERM's clean-test accuracy *decreasing* while validation accuracy rises -- is not visible here; that | |
| part of the figure is not reproduced. Seeds are 3, not 10. These are compute limits, not | |
| methodological ones. | |
| Artifacts: `scripts/claim6_uot_dro.py`, `scripts/claim6_scale_probe.py`, | |
| `outputs/claim6_uot_dro_big.json` (run A), `outputs/claim6_uot_dro_xl.json` (run B), | |
| `outputs/claim6_uot_dro.json` (exploratory 5k x 3), `outputs/uot_traj*/`, `figs/claim6.png`. | |
| """ | |
| write( | |
| "claim-6-unbalanced-ot-dro-on-mnist-with-label-noise-eta-1e-4-vs-baseline-eta-1e-5-fig-4", | |
| "Claim 6: Unbalanced-OT DRO on MNIST with label noise: eta=1e-4 vs baseline eta=1e-5 (Fig 4)", | |
| [cell("markdown", "Claim 6 - verdict: toy (reduced scale)", c6)], | |
| ) | |
| # ------------------------------------------------------------------ conclusion | |
| concl_md = """ | |
| ## What reproduces, what does not | |
| | # | Claim | Verdict | Key number | | |
| | --- | --- | --- | --- | | |
| | 1 | Prop 2.4 sandwich `F_rho - O(rho) <= F <= F_rho` | **falsified as stated** | `F <= F_rho` holds in **0/3000** instances; `F_rho <= F` in 3000/3000; error exponent 1.012 | | |
| | 2 | Lemma 2.7 rho-SC / (1/rho)-smooth conjugate | **verified** | tight moduli **4rho** and **1/(4rho)**; 0 violations in 2x10^6 chord tests | | |
| | 3 | Prop 2.6 CVaR bounds and limits | **verified** | **0/4000** violations; CVaR limit rate lambda^1.18, LogSumExp limit rate rho^1.00 | | |
| | 4 | Sec 3.1 continuous eOT at eps = 0.01 | **verified** | gap **0.0038** (proposed) vs **0.550** (baseline) after 10^5 iters; plateau by ~10^4 | | |
| | 5 | Sec 3.2 KL-DRO stepsizes on California Housing | **falsified as stated** | at batch 10, eta = 1e-4 converges for **0/10** seeds at every rho; baseline's 1e-6 reproduces exactly | | |
| | 6 | Sec 3.3 UOT-DRO on noisy MNIST | **toy** (reduced scale) | proposed at 1e-4 beats baseline at 1e-5 (0.889 vs 0.998; 0.783 vs 0.943); proposed never overflows, baseline dies at 1e-3 in 3/3 seeds -- but at 100k steps the baseline survives 1e-4 and wins (0.663) | | |
| Both falsifications are about *printed statements*, not about the method. The Safe-KL / SoftPlus | |
| approximation does what the paper's algorithm sections claim: it is convex, its constants are | |
| correct (if loose by a factor 4), it interpolates CVaR and LogSumExp, and it removes the overflow | |
| that kills the exponential-form baselines. What fails is (a) the direction of the inequality printed | |
| after Prop. 2.4, contradicted by the paper's own Corollary 2.5, and (b) the specific stepsize | |
| eta = 1e-4 at batch size 10 in Sec. 3.2, contradicted by the authors' own released configuration. | |
| ## Download the reproduction bundle | |
| Everything is in the public HF Bucket | |
| **[SabaPivot/repro-logsumexp-artifacts](https://huggingface.co/buckets/SabaPivot/repro-logsumexp-artifacts)**: | |
| `scripts/` (8 scripts), `outputs/` (raw JSON for every run, including all 150 eOT trajectories, | |
| 1050 California-Housing runs and 48 MNIST runs), `figs/` and `poster/` (poster.html, GATE_REPORT.json, | |
| print PDF). | |
| ```bash | |
| hf buckets ls -R hf://buckets/SabaPivot/repro-logsumexp-artifacts | |
| hf buckets sync hf://buckets/SabaPivot/repro-logsumexp-artifacts ./logsumexp-repro | |
| ``` | |
| ## Rerun from scratch | |
| ```bash | |
| python -m venv .venv && .venv/bin/pip install numpy scipy scikit-learn matplotlib torch | |
| python scripts/claim1_sandwich.py # Claim 1 (~4 min) | |
| python scripts/claim2_strong_convexity.py # Claim 2 (~2 min) | |
| python scripts/claim3_cvar.py # Claim 3 (~5 min) | |
| python scripts/claim4_eot.py --procs 60 # Claim 4 (~35 min on 60 cores) | |
| python scripts/claim4_float32_probe.py # Claim 4 overflow probe | |
| python scripts/claim5_kl_dro.py --procs 40 # Claim 5 (~2 min on 40 cores) | |
| python scripts/claim6_uot_dro.py --procs 24 --n-train 10000 --epochs 5 --tag _big # Claim 6 (~70 min) | |
| python scripts/analyze_456.py # tables + figures | |
| ``` | |
| **Determinism.** Every script fixes its seeds; re-running `claim1_sandwich.py` and `claim3_cvar.py` | |
| from a clean process reproduces their JSON outputs **byte for byte**. | |
| MNIST is fetched once with `sklearn.datasets.fetch_openml("mnist_784")` and the noisy labels from | |
| [gorkemalgan/corrupting_labels_with_distillation](https://github.com/gorkemalgan/corrupting_labels_with_distillation); | |
| California Housing ships with scikit-learn. Everything is CPU-only and free. | |
| Paper: [arXiv 2509.24894](%s) - [OpenReview TzQElzflxR](https://openreview.net/forum?id=TzQElzflxR). | |
| Official implementation: [egorgladin/logsumexp-approx](%s) (located and read for setup only; all | |
| code in this bundle is an independent re-implementation). | |
| """ % ( | |
| ARX, | |
| REPO, | |
| ) | |
| write( | |
| "conclusion", | |
| "Conclusion", | |
| [ | |
| cell( | |
| "artifact", | |
| "Reproduction bundle", | |
| "hf://buckets/SabaPivot/repro-logsumexp-artifacts", | |
| extra={"artifact_type": "dataset"}, | |
| ), | |
| cell("markdown", "Download & rerun", concl_md), | |
| ], | |
| ) | |
| print("done") | |
Xet Storage Details
- Size:
- 31.2 kB
- Xet hash:
- aa284a88ea264ed2c9797df767762a5eeaf6f691b92a5bedbc6ba58bf8703ad0
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.