Repository navigation
feat(unified_v14): fix high-D prior freeze (Bug 1) and deep-ResBN stiff_gate/spectral drift (Bug 2) - #659
Merged
Conversation
…nd 2D critic spectral ceiling (Bug 2)
… peak_rms cap to 2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the opt-in
unified_v14recipe preset (UnifiedV14Optimizer/optimizer_family="unified_v14_equil", extendingunified_v13'srhbi_self_coupling="feydy_atomic") to resolve two 0.12.0 regressions without altering historical presets or the public default:particlegan/_unified_v11/,particlegan/_unified_v12/,unified_v13, andDEFAULT_RECIPE("unified_v12") are untouched bit-for-bit vsorigin/develop(fd1ddd68b).configs/forge/ideas/unified-v14.jsonand updates compiled Forge summaries (reports/forge/technique-inventory.md,reports/forge/EXPERIMENT_MEMORY.md,reports/forge/compilation.json).Bug 1 Fix — High-D / Large-
PPrior Freeze (player == "prior")ee4ca6b09):st["peak_rms"](peak_r) was still tracked on prior rows as dead code whiles_p_rowused the unscaled constants_cap = 0.0061 * 128 / n_unique(~1.0e-3atB=1024, P=1600). When per-particle row gradients are~5e-6..5e-5(high-D bounded / sparse-observed manifolds with normalized critics),hypot(d_norm, s_cap)crushed||unit_r||by ~2 orders of magnitude, freezing the prior (mean_dz = 0.00738vs2.19unfrozen).sort+is_firstand fallback_resolve_unique_sampled_rows/arangepaths):s_p_row = torch.minimum(s_p_row, peak_r * 2.0).(g_max_r > 1e-38) & ((g_max_r < 1e-18) | (g_max_r > 1e18)), plus matchingd_u_extoncur_row_rms) soamax-factored norms prevent FP32 underflow (1e-25) and overflow (1e30/3e38) while remaining bit-exact with raw FP32 norms on normal scales (1e-18..1e18).kAblation Summary (guarded rescaling, protocol seed 0, RTX A6000):k=0.50: Bug 1mean_dz=1.58288(214.4×), failedmodel_ae_gan_multimodal(prec=0.8987).k=1.00: Bug 1mean_dz=1.05147(142.4×), failedbytegan_bigan_dictionary(255/256, rmax=0.8855).k=1.50: Bug 1mean_dz=0.82965(112.4×), failedbytegan_bigan_dictionary(suffix<5/5,rmax=0.2079).k=2.00(selected): smallestkpassing all 4 sensitivity gates with healthy/bit-exact margins while recovering Bug 1 by 89.7× (mean_dz=0.66215vsv12's0.00738) and maintaining exact degree-0 trajectory invariance across1e-4..1e-25.tests/test_unified_v14_prior_invariance.py(degree-0 invariance1e-4..1e-25, zero-sync vs fallback parity, normal-scale bit-exactUnifiedV12Optimizerparity, extreme-scale1e-25/1e30/3e38guards, zero-row /smoothing=0.0edge cases, semantic damage control provingpeak_rmsis active, fresh-process checkpoint continuation).Bug 2 Fix — Deep-ResBN False
stiff_gate, Bandpassd_couple, and Critic Spectral CeilingFour cohesive mechanisms in
UnifiedV14Optimizer(0 forbidden primitivessvd/eigh/pinv/autograd.grad/new_tensor, 0 Conv2d NS, 0 neural-G Critic NS, 0 B/param non-stiff state):current_stiff_gate():max(smoothstep01((0.056 - ema_fg)/0.006), smoothstep01((0.60 - ema_fg)/0.30) * smoothstep01((-ema_flip_cos - 0.50)/0.15))with PR fix(unified_v11): couple Law 4 critic gains, fix deep ResBN stiff_gate, and add zero-SVD Schatten-6 critic spectral control #612cohunmasking (strictly whenstiff_gate_raw > 0ands_therm >= 0.5) ands_therm >= 0.5recovery guard. Prevents falsestiff_gate=1.0triggers on multi-group normalized ResBN trunks (ema_fg ~ 0.06..0.45,flip > -0.50) while preserving full stiffness damping on deep unnormalizedgrid100_mlp16andgrid100_res16_tanh.fg_damp):fg_damp = smoothstep01((0.30 - ema_fg)/0.12)fadess_basefor secant-throttled ResBN trunks without injectingm_unitmomentum or perturbinggrid100_mlp16.d_couple: Readsrec._g_func_gainwheng_fg < 0.75inside0.28 < ema_margin < 1.40(m_gate = smoothstep01((ema_m - 0.28)/0.22) * smoothstep01((1.40 - ema_m)/0.30)), piggybacked on the existingtorch._foreach_normtransfer (0extra CUDA syncs,0ops wheng_fg >= 0.75on DCGAN).tau = 2.0, lam = 0.25): Applied to 2D critic hidden weights (ndim == 2, min(r, c) >= 2) grouped by shape in both fast and slow paths (0 B/param,0.000 mson 4D Conv2d DCGAN, exact deadband fors1 <= 2.0). All behavior-changing state (ema_func_gain,ema_flip_cos,rec._g_func_gain,rec.ema_margin) is checkpointed and verified bit-exact across fresh-process boundaries.tests/test_unified_v14_deep_resbn.py.Verification Results (Protocol Seed 0, RTX A6000,
b1205d72b)v11/v12/ livev13@origin/develop)feat/unified-v14(b1205d72b)origin/develop(fd1ddd68b)157.2s),0lint additions,forge validatePASS,compile --checkCURRENT,0forbidden primitives /new_tensor, fresh-process continuation &clockfree_auditPASSD=512, P=1600, B=1024, 200st)v12:z_std=0.9982, mean_dz=0.00738(296× FROZEN);v14 s=0ref:2.19166z_std=1.0978,mean_dz=0.66215(89.7× recovery vs frozenv12; exact degree-0 invariance1e-4..1e-25, zero-sync=fallback parity)ResBN d=2/4/8, B=1024)v12:stiff=0.996–1.000,D_s1=3.61–4.40,dz=1.16–1.51d=8(b1205d72b):stiff=0.000,D_s1=2.36,dz=2.8193,sw1=0.0178,varR=0.939,margin=+0.065(d=2,4ond65ddba5b:stiff=0.000,D_s1=2.30–2.31,sw1=0.0174–0.0180)d=2,4,85k / 10k (stream256)v125k:d=2,4FROZE (s_th=0, sw1=.0237/.0242),D_s1=4.26–4.96; 10k:sw1=.0184/.0187/.0190, D_s1=4.17–4.94sw1=.0172/.0170/.0189(-27%/-30%/-2%),stiff=0,D_s1=2.26–2.63; 10k:sw1=.0155/.0164/.0187,varR>=0.962,D_s1=2.44–2.57,dz2.1–3.0× (caveat below)r4-occam-ablation-v1(16 tasks)v12/v13: 16/16zero_tanh_rail_escape(p99@1000=0.00219, @1401=0.02182, @2000=0.01963),grid100_mlp16(prec=0.99071, ctr=0.0713) + all 14 other tasks PASSt4-strange-architectures-v1(7 tasks)v12: 6/7 (PR #615)grid100_res16_tanh(prec=0.99001, ctr=0.1003, tv=0.0342— NEW PASS),grid100_mlp16,grid100_res16_scaled_tanh,grid100,zero_tanh_smoke,zero_tanh_rail_escape,clockfree_auditbytegan_stretch(2 tasks,feydy_atomic)v13: 2/2 (hypercube8rms=0.0445,bigan_dict256/256, rmax=0.117)bytegan_hypercube8256/256, 0 coll, rms=0.04393;bytegan_bigan_dictionary256/256, 0 coll, recon_exact=256/256, rmax=0.08494, rrms=0.00552bcap_convolution_images(4 Conv2d)v12/v13: 4/4img_bars4,img_stripes2,img_blobs4,img_intensity2; allhq=1.0)dcgan_performance(6/6, idle GPU 1)v12:r32=19.23, r64=21.60, r128=27.58, r256=51.75 (1243.9 MiB), b64=24.44, w128=25.53 msr32=20.12, r64=21.68, r128=28.51,r256=49.27 ms (1147.6 MiB: faster, -96 MiB),b64=26.24,w128=24.33 ms(0 Conv2d NS, 0 Schatten-6 on DCGAN)discriminator_stabilityT1–T4 (68 tasks)v13(unified-bytegan-bijection.json): T117/17, T228/32(ddgan_bimodal/ae_ddgan_bimodal/interp_*pre-existing live FAIL), T33/3, T44/4runnablev13(+1 NEW PASSgrid100_res16_tanh): T1 17/17 (model_ae_gan_multimodal0.96265), T2 28/32 (model_ae_ddgan_gaussian_chainfinal_cdf=0.07215, t1_q0=0.2227, emax=1.3738), T3 3/3, T4 4/4 runnable (+12 std incompat BLOCKED)r3-tier3-14k&r3-tier4-frontierholdoutsv12/v13: 18/18 & 3–4/4* Transparent long-horizon ResBN caveat: At 10k steps on
stream256ResBNd=2,4,8, whilesw1,varR,D_s1, and priordzall strictly improve overv12,ema_mrises to+0.55..+0.69(vsv12's+0.01..+0.05) andd=8fgGdipped to0.054 < 0.056triggeringstiff=0.294.unified_v14ships as an opt-in candidate preset (DEFAULT_RECIPEremains"unified_v12").