{"item": "tails7-1", "track": "B", "mechanism": "Keep the full lattice belief and its mean (so classifier, phase, rival, fee conversion and belief update are untouched). From the belief compute upper/lower partial second moments about the mean: up=E[(x-m)^2;x>m], dn=E[(x-m)^2;x<m] (v=up+dn). Ask (price at which pool sells X) is hit by the arb when the true price rises above it -> upper tail; bid is hit when price falls below it -> lower tail. sd_tail_ask=sqrt(2 up), sd_tail_bid=sqrt(2 dn) (a symmetric belief, Gaussian or not, gives exactly sd on both sides). Each side table lookup (the ask offset A with ask sd, the bid offset B with bid sd, same S-level interpolation) uses sd_side=(1-k)*sd+k*sd_tail_side. Base = thrpol:ThrLattice thr=0.9 qm_k1e-5.json (thrpol.py sha 663965707d4f20f81ab0ade8ed510742a330605fd9e889d426db1d920abc8958 verified).", "frozen_settings": {"tailk": 0.25, "thr": 0.9, "qm": "qm_k1e-5.json", "strengths_tried": [0.25, 0.5, 0.75, 1.0], "selection": "highest paired mean over unchanged base on tuning seeds 64000..64255 (max edge); frozen before confirmation"}, "seed_ranges": {"tuning": "64000..64255 (n=256/arm)", "confirmation": "64256..64511 (n=256/arm, frozen setting only)", "holdout": "10000..12047 (n=2048/arm, chunks of 256, each scored once, complete, no partial)"}, "tuning_paired_vs_base": {"tailk=0.25": {"n": 256, "mean_diff": 0.00834650024657746, "se": 0.016934062768518488, "sum": 2.1367040631238297, "sumsq": 18.737688816035263, "worst5": [[64126, -0.7307010035982557], [64075, -0.6786130870918896], [64221, -0.6619176639940179], [64081, -0.6574579783840591], [64130, -0.4949243735959499]]}, "tailk=0.50": {"n": 256, "mean_diff": 0.001810085795141525, "se": 0.020319680593635817, "sum": 0.4633819635562304, "sumsq": 26.954260061329325, "worst5": [[64126, -1.0161578070110409], [64081, -0.9815931375441096], [64159, -0.940345119623089], [64131, -0.9318405742546929], [64149, -0.8508198555803688]]}, "tailk=0.75": {"n": 256, "mean_diff": -0.015507816690571108, "se": 0.021550249584874108, "sum": -3.9700010727862036, "sumsq": 30.378463476979675, "worst5": [[64131, -1.1943582444555432], [64127, -1.1765039080819406], [64040, -0.9663290591129226], [64159, -0.930020765854124], [64196, -0.9202243717338661]]}, "tailk=1.0": {"n": 256, "mean_diff": -0.028328472593707854, "se": 0.023194011264592213, "sum": -7.252088983989211, "sumsq": 35.32361031365382, "worst5": [[64131, -1.351997155833601], [64196, -1.0702091018655437], [64127, -1.0558071806043472], [64053, -0.8136990466743441], [64149, -0.8025220260390142]]}}, "confirmation_paired_vs_base": {"n": 256, "mean_diff": 0.012069490315919529, "se": 0.01597788439461245, "sum": 3.0897895208753994, "sumsq": 16.702805498118167, "worst5": [[64477, -0.8355569540306078], [64356, -0.8308282852343041], [64265, -0.8167262448068868], [64428, -0.7022520273994814], [64267, -0.6567664988352817]]}, "holdout_paired_candidate_vs_fresh_base": {"n": 2048, "mean_diff": 0.00876964167771449, "se": 0.005523116873710509, "sum": 17.960226155959276, "sumsq": 128.04151942454945, "worst5": [[10387, -1.6661485386437107], [11266, -0.9582339470613306], [10397, -0.8480688478398406], [10393, -0.8301725327061149], [11056, -0.8066680622891909]]}, "holdout_paired_candidate_vs_ref_lattice_qm": {"n": 2048, "mean_diff": 0.3316615614882057, "se": 0.011111300754548489, "sum": 679.2428779278453, "sumsq": 742.8588902284941, "worst5": [[10942, -1.9719784809858538], [11487, -1.6279410637030196], [10336, -1.4715034024343367], [10395, -1.3984303582132043], [11811, -1.3694036419229292]]}, "holdout_paired_fresh_base_vs_ref_lattice_qm": {"n": 2048, "mean_diff": 0.3228919198104912, "se": 0.01069159987528695, "sum": 661.282651771886, "sumsq": 692.7408990952625, "worst5": [[11487, -1.9115248303883163], [10942, -1.6076924222966227], [10982, -1.4457581244053017], [11380, -1.2365145499310302], [10990, -1.1504964526710637]]}, "incremental_vs_inherited": {"incremental_gain_over_base_thr09": 0.00876964167771449, "inherited_threshold_gain_base_over_lattice_qm": 0.3228919198104912, "total_over_lattice_qm": 0.3316615614882057, "promotion_bar": 0.3, "promote_to_track_A": false, "reason": "incremental +0.009 (se 0.006) is far below +0.3; the ~+0.33 over lattice_qm is the inherited threshold gain."}, "diagnostics": {"candidate_holdout": {"n_runs": 2048, "first_trades": 14500206, "misread": 4177090, "misread_rate": 0.2880710798177626, "price_rms_bps": 13.215199526067613, "mean_edge": 534.1525859356495}, "fresh_base_holdout": {"n_runs": 2048, "first_trades": 14472181, "misread": 4180058, "misread_rate": 0.28883400504733875, "price_rms_bps": 13.277152756808208, "mean_edge": 534.1438162939719}, "note": "misread = first trade of a step whose is_arb read (pi>0.9 for thr arms) differs from truth; price RMS = (m - ln p) in bps over all callbacks. ref lattice_qm (thr 0.5) misread 16.22 pct, p rms 13.6 per run.py line. Tuning: base {\"n_runs\": 256, \"first_trades\": 1804050, \"misread\": 522465, \"misread_rate\": 0.2896067182173443, \"price_rms_bps\": 13.288132986354066, \"mean_edge\": 527.6551003749595} ; k=0.25 {\"n_runs\": 256, \"first_trades\": 1807668, \"misread\": 522005, \"misread_rate\": 0.28877260647419767, \"price_rms_bps\": 13.228261348377087, \"mean_edge\": 527.6634468752061}"}, "finding": "No gain: tail-risk side-specific uncertainty is neutral at k=0.25 and loses monotonically at larger k on tuning (k=0.75 -0.016, k=1 -0.028). Effect on retail/arb: retail +0.24, arb -0.23 per run on holdout, net +0.009. Misread rate and price RMS barely move (28.88->28.81%, 13.3->13.2 bps) as expected, since the classifier and belief are unchanged; the mechanism does not touch arb/retail reading.", "checks": {"tests_run": "test_tails.py on seeds 64001, 64300 (and 64000 earlier: all true)", "output": {"reflection_counterexamples_of_200": 0, "symmetric_prior_lookup_mismatches": 0, "symmetric_prior_max_sd_diff_bps": 1.4210854715202004e-14, "gauss_sd_bps_vs_tail": [19.9999999999778, 19.999999999977796, 19.9999999999778], "skew_example_sd_bps_base_ask_bid": [26.000000000000004, 32.887687665751145, 16.443843832875576], "per_seed": {"64001": {"callbacks": 10966, "disabled_identical_to_base_callbacks": true, "enabled_scrambled_hidden_identical": true, "enabled_differs_from_base": true, "standalone_replay_of_six_inputs_identical": true}, "64300": {"callbacks": 10903, "disabled_identical_to_base_callbacks": true, "enabled_scrambled_hidden_identical": true, "enabled_differs_from_base": true, "standalone_replay_of_six_inputs_identical": true}}}, "disabled_change": "tailk=0 (TailLattice) callback fee/m stream and edge identical to ThrLattice on the tested seeds (per_seed.disabled_identical_to_base_callbacks)", "hidden_scramble": "replay with arb flag, true price, rival spot and j replaced by random values: callbacks identical; standalone replay of the six recorded inputs into a fresh policy reproduces every fee", "blindness": "scored via unchanged run.py Blind wrapper (six inputs only); only offline label use is run.py diagnostics"}, "limitations": ["pure Python, no acceleration, so no parity claim needed", "replica only, no engine seed used, no Solidity", "tuning n=256 is small: selection of k=0.25 among differences within noise (se 0.017)", "holdout was scored once, all 8 chunks complete (n=2048), base rerun fresh and equals within rounding the ref-lattice-thr gain", "tail moments computed every callback from the 121-cell lattice, not cached (does not affect results)"], "two_gaussian_O1": {"answer": "Yes, for a belief held as a two-component Gaussian mixture (weights w_i, means mu_i, sds s_i), mean m=sum w_i mu_i exactly, and with d_i=mu_i-m, per component E[(x-m)^2; x>m]=(s_i^2+d_i^2)*Phi(d_i/s_i)+d_i*s_i*phi(d_i/s_i); up=sum w_i(...), dn=(v)-up with v=sum w_i(s_i^2+d_i^2). A point-mass component (s=0) contributes d^2 to the side it lies on. Cost: 2 Phi + 2 phi (about 2 exp + 2 erf-type) + 2 sqrt, O(1) with no lattice. Caveat: the Gaussian real.py collapses its belief to (m,v) after every first trade, so tails are only available while the arb-point/truncated-retail mixture is alive; truncation by the no-arb band is not Gaussian (use the truncated-normal moments already computed in trunc). Not implemented or measured here."}, "incremental_cost": {"python_per_callback": "one extra pass over <=121 cells (mean pass + partial-moment pass; 2 mult-adds per cell), 2 sqrt, one extra table lookup (A and B each looked up separately instead of once), +1 exp-free interpolation; no new state", "solidity_slots": "0 to 2 extra (cache sd_ask, sd_bid for non-first callbacks; otherwise recompute)", "gas_estimate": {"measured": false, "label": "unmeasured illustrative guess", "lattice_based": "not portable", "two_gaussian_based": "15,000-60,000 gas incremental"}}, "code_files": ["tailpol.py", "test_tails.py", "README.md"], "code_sha256": "52d53a0c5d1467e87e7ad454ca041bcf3130555f8456ce160328afa81c9c8e4d", "code_sha256_of": "uncompressed tar", "code_zb64": "eNrtWnuP20YOz9/+FGyLO0uJrPi9r7i4Nk0vxbXpNs3hDljsCWNrvFasVzTyrt2i3/1+nNHLu95NiiIB7ipi15JmOBwOh+SQlNyn7tO/nYvtSyl8mT36KNA3cN+13x+N63tuH/SHg+Ej2j76BLBRucgw/aM/JwyPKcqDSM4GRyfjUf9kcjJ0+6OT48F03HnUwv895CII0yR0093Hm4ONemrsfXA0GTavDOPpePpoMBkejSdH06MR2/9gPIL99z+l/QeRP3wI7339/6Pw+eef/xz4sqdSuQiWwYLSROUyC5KMWDUoC9SagpjylaR3EYVJst6kZHGfOuoNbLfztVCSZkDIWI/erLLvRZ4HCwmkVTbruyc2beLFSsRX0j+lRSiUwkQyc2guw0AuaZP6IpcOpStQcjDjtQhJxD4tpaRFEl/LTAVJ7HZ+jMOdZgT0ZAYW4nwHJJ/yhKRYrEhhJV0FxuehLFk1MyuX6KdNkkvy5TKIgxwE1akm9tXP/yArzZhjkdPNKgAhbk+TJOwoGYaK/m1ToGgV5DQ3DIhsDkxpxJJnG2BrAinLSyoS8+RaUpA7pBJc0ODzKqSRKWjxuH+en794bVqSJbd0CoFg9CanMKb0TCN+/d035fx60pSWgtkCenID8mYd3//4r4Ic1vptlkS6dbkJQwqLHSno3wT5iiIpYopOOwSAmGakNpH36/bL6Dc6J2vbi+z/DMl6QisRauYowsaxhLazWWQ7RH5MYbCWN1gwLaEu22cRWukapEDvCfo1beV7zJMnoEeY5F2WW0MgMIWyax74dZcf26TBEqR2USRzSJb+LjZQG3B8FVxDvsqnJKZ5kps9V3Y5FT+BljXorW3GekLrahrdVwOzk6SsCNTl/nWXrD7a5loL50HeA34MuUEbU5Gv7M4bloIWm6MlUm4XVFVie3f5KoivSIaKFUTWWu92NkpcyVNKgZLEI+p9R9kmhs+lw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9I3+8ZBwXXufDvpYZsMogDZ1S+anM+7+UGU44niie+Hul8ksdk2+br33o/lq3Dp9M9GRCk7qu5NSln95+1cih8qSezfQ01enMX6vwIdnTfrOK0TkK35Zttw8du/NtlvwiOWSDHOKrxtpc+jn3w2COkDvcnSFSJrFYyFBmJk3dKP4iqfV8LbTQQgsttNBCCy200EILLbTQQgsttNBCCy200EILLbTQQgsttNBCC/8f8F9kI32z", "sources_note": "solved folder README at commit e65314f8 and thr artifact c9d678ab used as given in the brief"}