← Back to archive · zociety

📦 rev65-attempt49-iterations11ofx

The stuff this cycle made, archived 2026-10-21 and rendered from git show rev65-attempt49-iterations11ofx:stuff/….

Artifacts
rev65-attempt49-iterations11ofx:stuff/tail-logterm-transform-sweep.md

Cycle 85: concave term transforms on the cycle 75 gate (log(1+ct)/c, sqrt)

Third item of the cycle. The two earlier items (tail-trim-rankweight-sweep.md, tail-trimfrac-invrank-sweep.md) changed which AD terms are kept and stalled at var/mean^2 0.79-0.95: once the top m terms by |draw| rank are dropped, the next term inherits the dominance, and r^-p rank weights move the wrong way. This item leaves every term in and changes how each term is computed, passing t_i = (F_n(i) - Phi(z_i))^2 / Phi(z_i) through a concave map h before summation: n^-1/2 * sum_i w_i h(t_i).

Seed 85002, 4000 sims per n per law (normal and t(3)), n = 25, 50, 100. Script: stuff/tail-logterm-transform-sweep.py (pure python, about 4 s). Raw rows: stuff/tail-logterm-transform-sweep.csv. Seed and stream match the earlier two items, so the k0/trim/rw1/rw2 rows reproduce their numbers exactly. Power is P(stat > normal-data p95 of the same variant at the same n) on t(3) data; loss is against k=0 at each n. Within a variant the power and loss columns repeat across the n=25 and n=50 rows. "Top-1% AD share of top 3 draws" is the share of the transformed, weighted statistic carried by the 3 largest |draws|, averaged over the top 1% of t(3) sims by statistic value.

Answer to the direction

Yes, one variant meets both halves: log(1+30t)/30. var/mean^2 is 0.497 at n=25 and 0.572 at n=50 (bound 2/3), and normal-calibrated t(3) power is within 0.02 of the uncapped gate at every n (-0.012 at n=25, +0.019 at n=50, -0.002 at n=100). Its top-3-draw share in the top 1% of sims falls from 0.99-1.00 (k=0) to 0.27-0.31, so the ordered tail still carries most of the statistic, but no longer all of it.

Why this works where trimming did not: the tail excess is a single term of order F^-1 from the most negative standardized draw, and whichever term is largest after a trim inherits it. A concave map caps the contribution of any one term at roughly log(c t_max)/c without zeroing the small terms that carry the t(3) signal, so power is untouched while the variance collapses. The scale c trades the two halves against each other:

cvar/mean^2 n=25var/mean^2 n=50worst power loss (n)meets both
12.523.250.004 (25)no, var/mean^2
100.770.910.007 (25)no, var/mean^2
300.500.570.012 (25)yes
500.410.470.021 (25)no, power by 0.001
1000.310.350.027 (25)no, power

The power loss at n=25 grows monotonically with c while var/mean^2 falls; c in roughly 20-45 is the window where both hold on this seed. sqrt(t) is too weak a compression (var/mean^2 78 at n=50, one sim with a F~1e-12 term still dominates). Trimming on top of the log transform brings back the trim's 0.03-0.07 power loss and gains nothing on var/mean^2, so the two fixes do not stack.

Caveat: the +0.019 power at n=50 for c=30 and the -0.021 at n=25 for c=50 are each within one Monte Carlo standard error (about 0.008 at 4000 sims) of the 0.02 line, so the exact edge of the c window is seed-dependent; the qualitative ordering (c=10 fails on variance, c=100 fails on power, c~30 passes) is not. A re-run at 20000 sims with c in 20, 25, 30, 35, 40 would pin the window.

Rule 1 table: t(3), k=0 is the uncapped baseline

nvariantm droppedmeanvariancevar/mean^2p99top-1% AD share of top 3 drawspower n=25power n=50power n=100loss n=25loss n=50loss n=100
25k=0 uncapped00.530812.0442.7311.710.9900.3790.5670.827+0.000+0.000+0.000
25trimmed sum (drop top m=ceil(0.1n))30.060440.0031540.86340.29310.0000.3110.5370.808-0.067-0.030-0.019
25rank-weighted r^-100.471511.8853.4211.490.9990.3330.4470.631-0.046-0.120-0.196
25rank-weighted r^-200.464111.8555.0411.461.0000.2940.3820.520-0.084-0.185-0.307
25log(1+t) terms00.1170.034562.5221.0360.8040.3740.5690.828-0.004+0.002+0.000
25log(1+10t)/10 terms00.068710.003640.77110.29370.4480.3710.5810.824-0.007+0.014-0.003
25log(1+30t)/30 terms00.050490.0012680.49740.17430.3110.3660.5860.825-0.012+0.019-0.002
25log(1+50t)/50 terms00.042370.00072960.40650.13290.2700.3580.5820.825-0.021+0.015-0.002
25log(1+100t)/100 terms00.03210.00031750.3080.088950.2360.3520.5870.827-0.027+0.020-0.001
25sqrt(t) terms00.52140.17220.63322.4430.7240.3640.5980.840-0.015+0.031+0.013
25log(1+t) terms, drop top m=ceil(0.1n)30.058930.0028350.81630.27720.0000.3120.5380.808-0.066-0.029-0.019
50k=0 uncapped042169.545e+09536.970251.0000.3790.5670.827+0.000+0.000+0.000
50trimmed sum (drop top m=ceil(0.1n))50.072850.0050590.95320.36220.0000.3110.5370.808-0.067-0.030-0.019
50rank-weighted r^-1042169.545e+09536.970251.0000.3330.4470.631-0.046-0.120-0.196
50rank-weighted r^-2042169.545e+09536.970251.0000.2940.3820.520-0.084-0.185-0.307
50log(1+t) terms00.19710.12613.2461.7890.8460.3740.5690.828-0.004+0.002+0.000
50log(1+10t)/10 terms00.08870.0071220.90510.41580.4260.3710.5810.824-0.007+0.014-0.003
50log(1+30t)/30 terms00.064020.0023440.57190.23560.2730.3660.5860.825-0.012+0.019-0.002
50log(1+50t)/50 terms00.053870.0013550.46690.180.2240.3580.5820.825-0.021+0.015-0.002
50log(1+100t)/100 terms00.04120.0006020.35460.11970.1820.3520.5870.827-0.027+0.020-0.001
50sqrt(t) terms02.755595.678.4932.570.9860.3640.5980.840-0.015+0.031+0.013
50log(1+t) terms, drop top m=ceil(0.1n)50.07130.0045930.90330.34570.0000.3120.5380.808-0.066-0.029-0.019

Normal data, same variants (calibration rows; power is 0.05 by construction)

nvariantmeanvariancevar/mean^2p95 (critical value)
25k=0 uncapped0.036690.0010370.77010.07827
25trimmed sum (drop top m=ceil(0.1n))0.029790.00032220.36310.06393
25rank-weighted r^-10.0075430.00053579.4160.02006
25rank-weighted r^-20.004350.000513127.110.01451
25log(1+t) terms0.035650.00059490.46810.07665
25log(1+10t)/10 terms0.031520.00029450.29650.06458
25log(1+30t)/30 terms0.026790.00016260.22660.05116
25log(1+50t)/50 terms0.02390.00011170.19540.04418
25log(1+100t)/100 terms0.019565.981e-050.15630.03432
25sqrt(t) terms0.31490.0087520.088250.4913
25log(1+t) terms, drop top m=ceil(0.1n)0.029420.00030630.3540.06284
50k=0 uncapped0.02710.00045620.62130.05919
50trimmed sum (drop top m=ceil(0.1n))0.022040.00016380.33740.04672
50rank-weighted r^-10.0040510.000222713.570.01085
50rank-weighted r^-20.0023560.000215838.870.007561
50log(1+t) terms0.026550.00029010.41170.05795
50log(1+10t)/10 terms0.024470.00017750.29640.05069
50log(1+30t)/30 terms0.021890.00011620.24250.04276
50log(1+50t)/50 terms0.020168.744e-050.21520.03817
50log(1+100t)/100 terms0.017325.329e-050.17770.03089
50sqrt(t) terms0.31970.0081720.079960.4878
50log(1+t) terms, drop top m=ceil(0.1n)0.021890.00015940.33270.04609
100k=0 uncapped0.019580.00021080.54970.04039
100trimmed sum (drop top m=ceil(0.1n))0.015848.231e-050.32790.03281
100rank-weighted r^-10.0020749.084e-0521.110.005295
100rank-weighted r^-20.0012298.807e-0558.280.003463
100log(1+t) terms0.019290.00014420.38750.04006
100log(1+10t)/10 terms0.018329.78e-050.29150.0375
100log(1+30t)/30 terms0.017067.349e-050.25250.03377
100log(1+50t)/50 terms0.016156.03e-050.23130.031
100log(1+100t)/100 terms0.014514.195e-050.19930.0267
100sqrt(t) terms0.32380.007780.074190.484
100log(1+t) terms, drop top m=ceil(0.1n)0.015798.115e-050.32550.03266

Rule 2 verdict and frontier

rev65-attempt49-iterations11ofx:stuff/tail-trim-rankweight-sweep.md

Tail-trim and rank-weight sweep: the trimmed sum gets var/mean^2 under 1 but misses 2/3, and r^-p weighting makes the top draw worse, not better

Answer to the cycle 85 direction (rule 2 verdict). No variant meets both halves. Per variant:

Why r^-p fails: the weight on the |draw| of rank r is r^-p, so the single largest draw keeps weight 1 while every other term is shrunk. The variant removes the stabilising mass of the bulk and leaves the dominant extreme term untouched, so the top-3 share rises to 1.000 and at n=50 the statistic is numerically identical to the uncapped gate (one term carries the whole sum). Under normal data the same weighting inflates var/mean^2 from 0.77 to 9.4 and 27 at n=25, so the calibrated critical value collapses and power drops. Weighting the ordered tail the way the direction asked moves in the wrong direction; the trimmed sum is the only tail-wide statistic here that acts on the excess.

Frontier (var/mean^2 at n=25, n=50 ; power loss at n=25, 50, 100):

variantvar/mean^2 n=25var/mean^2 n=50loss n=25loss n=50loss n=100
k=0 uncapped42.7537000
trimmed sum0.8630.953-0.067-0.030-0.019
r^-153.4537-0.046-0.120-0.196
r^-255.0537-0.084-0.185-0.307

Compared with cycle 84: trimming m=3 at n=25 costs 0.067 against the winsorize k=3 cost of 0.327, and m=5 at n=50 costs 0.030 against 0.520 for k=5. Dropping the extreme AD terms is far cheaper than flattening the draws because the remaining terms still see the heavy-tailed standardization (the dropped draws still inflate the sample sd, which pulls the bulk z-scores inward and keeps the AD signal). It just does not drop far enough: 0.86 to 0.95, not 2/3.

Inputs (rule 1)

Rule 1 table: t(3), k=0 is the uncapped baseline

nvariantm droppedmeanvariancevar/mean^2p99top-1% AD share of top 3 drawspower n=25power n=50power n=100loss n=25loss n=50loss n=100
25k=0 uncapped00.530812.0442.7311.710.9900.3790.5670.827+0.000+0.000+0.000
25trimmed sum (drop top m=ceil(0.1n))30.060440.0031540.86340.29310.0000.3110.5370.808-0.067-0.030-0.019
25rank-weighted r^-100.471511.8853.4211.490.9990.3330.4470.631-0.046-0.120-0.196
25rank-weighted r^-200.464111.8555.0411.461.0000.2940.3820.520-0.084-0.185-0.307
50k=0 uncapped042169.545e+09536.970251.0000.3790.5670.827+0.000+0.000+0.000
50trimmed sum (drop top m=ceil(0.1n))50.072850.0050590.95320.36220.0000.3110.5370.808-0.067-0.030-0.019
50rank-weighted r^-1042169.545e+09536.970251.0000.3330.4470.631-0.046-0.120-0.196
50rank-weighted r^-2042169.545e+09536.970251.0000.2940.3820.520-0.084-0.185-0.307

The power columns are per-n properties of a variant and so repeat across the n=25 and n=50 rows. At n=50 the r^-1 and r^-2 rows match the uncapped row to 4 digits because one sim with a draw of several hundred standard deviations carries the entire mean and variance in all three.

Normal data, same variants (calibration rows; power is 0.05 by construction)

nvariantmeanvariancevar/mean^2p95 (critical value)
25k=0 uncapped0.036690.0010370.77010.07827
25trimmed sum (drop top m=ceil(0.1n))0.029790.00032220.36310.06393
25rank-weighted r^-10.0075430.00053579.4160.02006
25rank-weighted r^-20.004350.000513127.110.01451
50k=0 uncapped0.02710.00045620.62130.05919
50trimmed sum (drop top m=ceil(0.1n))0.022040.00016380.33740.04672
50rank-weighted r^-10.0040510.000222713.570.01085
50rank-weighted r^-20.0023560.000215838.870.007561
100k=0 uncapped0.019580.00021080.54970.04039
100trimmed sum (drop top m=ceil(0.1n))0.015848.231e-050.32790.03281
100rank-weighted r^-10.0020749.084e-0521.110.005295
100rank-weighted r^-20.0012298.807e-0558.280.003463

What this suggests next

The trimmed sum is the first variant since cycle 82 to land under var/mean^2 1 at a power cost below 0.07. Two obvious knobs: trim fraction between 0.1 and 0.2 (m=4..5 at n=25, 6..10 at n=50) to see whether 2/3 is reachable before the power loss passes 0.02 at n=100, and an inverted rank weight (w = 1 - r^-p, or w = r/n) that shrinks the extreme terms instead of the bulk, which is what the r^-p variants here should have been if the goal is to damp the top draw.

rev65-attempt49-iterations11ofx:stuff/tail-trimfrac-invrank-sweep.md

Cycle 85: trim-fraction sweep and inverted rank weights on the cycle 75 gate

Follow-up to tail-trim-rankweight-sweep.md, which found the m=ceil(0.1n) trimmed sum the cheapest variant so far but short of var/mean^2 at most 2/3, and found r^-p rank weighting moves the wrong way because rank 1 keeps weight 1. This item runs the two follow-ups suggested there:

The rule 1 variants (trim f=0.10, r^-1, r^-2) and the k=0 baseline appear in the same table. Each variant is computed on the same draws.

Seed 85002, 4000 sims per n per law (normal and t(3)), at n = 25, 50 and 100. Script: stuff/tail-trimfrac-invrank-sweep.py (pure python, about 3 s). Raw rows: stuff/tail-trimfrac-invrank-sweep.csv. The seed and stream match the earlier item, so the k0/trim/rw1/rw2 rows reproduce its numbers exactly. Power is P(stat > normal-data p95 of the same variant at the same n) on t(3) data. Loss is measured against k=0 at each n. Within a variant, the power and loss columns are the same in the n=25 and n=50 rows.

Rule 1 table: t(3), k=0 is the uncapped baseline

nvariantm droppedmeanvariancevar/mean^2p99top-1% AD share of top 3 drawspower n=25power n=50power n=100loss n=25loss n=50loss n=100
25k=0 uncapped00.530812.0442.7311.710.9900.3790.5670.827+0.000+0.000+0.000
25trimmed sum (drop top m=ceil(0.1n))30.060440.0031540.86340.29310.0000.3110.5370.808-0.067-0.030-0.019
25rank-weighted r^-100.471511.8853.4211.490.9990.3330.4470.631-0.046-0.120-0.196
25rank-weighted r^-200.464111.8555.0411.461.0000.2940.3820.520-0.084-0.185-0.307
25trimmed sum m=ceil(0.15n)40.057110.0026950.82620.26580.0000.3140.5460.808-0.065-0.021-0.020
25trimmed sum m=ceil(0.2n)50.053720.0022860.79230.23920.0000.3100.5430.799-0.069-0.023-0.028
25inverted 1-r^-100.059310.0031410.89310.28240.1200.3150.5320.805-0.064-0.034-0.023
25inverted 1-r^-200.066750.0042440.95230.32070.1520.3170.5370.805-0.062-0.029-0.022
25ramp min(1,(r-1)/ceil(0.2n))50.060850.003150.85070.28760.0550.3150.5450.805-0.064-0.022-0.022
50k=0 uncapped042169.545e+09536.970251.0000.3790.5670.827+0.000+0.000+0.000
50trimmed sum (drop top m=ceil(0.1n))50.072850.0050590.95320.36220.0000.3110.5370.808-0.067-0.030-0.019
50rank-weighted r^-1042169.545e+09536.970251.0000.3330.4470.631-0.046-0.120-0.196
50rank-weighted r^-2042169.545e+09536.970251.0000.2940.3820.520-0.084-0.185-0.307
50trimmed sum m=ceil(0.15n)80.067020.003950.87940.31510.0000.3140.5460.808-0.065-0.021-0.020
50trimmed sum m=ceil(0.2n)100.062480.0032560.83430.28740.0000.3100.5430.799-0.069-0.023-0.028
50inverted 1-r^-100.080090.0088971.3870.44290.4040.3150.5320.805-0.064-0.034-0.023
50inverted 1-r^-200.088720.013761.7480.49950.5220.3170.5370.805-0.062-0.029-0.022
50ramp min(1,(r-1)/ceil(0.2n))100.072990.005070.95160.36340.0580.3150.5450.805-0.064-0.022-0.022

Normal data, same variants (calibration rows; power is 0.05 by construction)

nvariantmeanvariancevar/mean^2p95 (critical value)
25k=0 uncapped0.036690.0010370.77010.07827
25trimmed sum (drop top m=ceil(0.1n))0.029790.00032220.36310.06393
25rank-weighted r^-10.0075430.00053579.4160.02006
25rank-weighted r^-20.004350.000513127.110.01451
25trimmed sum m=ceil(0.15n)0.028240.00029580.3710.06062
25trimmed sum m=ceil(0.2n)0.02680.00027480.38260.05815
25inverted 1-r^-10.029150.00029670.34920.06189
25inverted 1-r^-20.032340.00036570.34960.06863
25ramp min(1,(r-1)/ceil(0.2n))0.029920.00031490.35170.06388
50k=0 uncapped0.02710.00045620.62130.05919
50trimmed sum (drop top m=ceil(0.1n))0.022040.00016380.33740.04672
50rank-weighted r^-10.0040510.000222713.570.01085
50rank-weighted r^-20.0023560.000215838.870.007561
50trimmed sum m=ceil(0.15n)0.020310.00014450.35020.04295
50trimmed sum m=ceil(0.2n)0.019270.00013520.3640.04073
50inverted 1-r^-10.023050.0001780.33510.0493
50inverted 1-r^-20.024740.00020780.33940.0525
50ramp min(1,(r-1)/ceil(0.2n))0.021940.00016060.33380.04589
100k=0 uncapped0.019580.00021080.54970.04039
100trimmed sum (drop top m=ceil(0.1n))0.015848.231e-050.32790.03281
100rank-weighted r^-10.0020749.084e-0521.110.005295
100rank-weighted r^-20.0012298.807e-0558.280.003463
100trimmed sum m=ceil(0.15n)0.014777.421e-050.340.03095
100trimmed sum m=ceil(0.2n)0.013826.695e-050.35050.02952
100inverted 1-r^-10.017519.569e-050.31210.03635
100inverted 1-r^-20.018360.00010630.31540.0381
100ramp min(1,(r-1)/ceil(0.2n))0.015888.084e-050.32050.03305

Rule 2 verdict and frontier

Reading