cells-developmental / pages /modular_development.html
bgradowhite's picture
Add files using upload-large-folder tool
5a90c80 verified
Raw History Blame Contribute Delete
49.3 kB
<title>Modular Addition Over Training</title>
<style>
.viz-root { color-scheme: light;
--surface-1:#fcfcfb; --page:#f9f9f7; --ink:#0b0b0b; --ink-2:#52514e; --muted:#898781; --grid:#e1e0d9; --axis:#c3c2b7; --ring:rgba(11,11,11,0.10);
--s1:#2a78d6; --s2:#eb6834; --s3:#1baf7a; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .viz-root { color-scheme: dark;
--surface-1:#1a1a19; --page:#0d0d0d; --ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781; --grid:#2c2c2a; --axis:#383835; --ring:rgba(255,255,255,0.10);
--s1:#3987e5; --s2:#d95926; --s3:#199e70; } }
:root[data-theme="dark"] .viz-root { color-scheme: dark;
--surface-1:#1a1a19; --page:#0d0d0d; --ink:#ffffff; --ink-2:#c3c2b7; --muted:#898781; --grid:#2c2c2a; --axis:#383835; --ring:rgba(255,255,255,0.10);
--s1:#3987e5; --s2:#d95926; --s3:#199e70; }
body { margin: 0; }
.viz-root { background: var(--page); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.45; padding: 28px 20px 60px; }
main { max-width: 1180px; margin: 0 auto; }
h1 { font-size: 1.5rem; font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; }
p.lede { color: var(--ink-2); max-width: 80ch; margin: 0 0 18px; }
.head { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 4px; }
.head div { font-weight: 650; font-size: 1.05rem; color: var(--ink); padding-left: 4px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 18px; }
@media (max-width: 860px) { .row, .head { grid-template-columns: 1fr; } }
.panel { background: var(--surface-1); border: 1px solid var(--ring); border-radius: 6px; padding: 10px 12px 6px; position: relative; }
.panel h3 { font-size: 0.92rem; font-weight: 600; margin: 0 0 2px; color: var(--ink); }
.panel .legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.8rem; color: var(--ink-2); margin: 2px 0 4px; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 1px; }
.legend i.ref { height: 0; border-top: 1px dashed var(--muted); }
svg { display: block; width: 100%; height: auto; }
.tip { position: absolute; pointer-events: none; background: var(--surface-1); border: 1px solid var(--ring); border-radius: 4px; padding: 6px 8px; font-size: 0.78rem; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,0.12); display: none; white-space: nowrap; z-index: 2; }
.tip b { font-weight: 600; }
.tools { font-size: 0.78rem; color: var(--muted); text-align: right; }
.tools button { font: inherit; color: var(--ink-2); background: none; border: 1px solid var(--ring); border-radius: 4px; padding: 1px 8px; cursor: pointer; }
table.data { border-collapse: collapse; font-size: 0.78rem; font-variant-numeric: tabular-nums; margin-top: 6px; width: 100%; }
table.data th, table.data td { text-align: right; padding: 2px 8px; border-bottom: 1px solid var(--grid); color: var(--ink-2); }
table.data th:first-child, table.data td:first-child { text-align: left; }
.note { color: var(--ink-2); font-size: 0.86rem; max-width: 84ch; margin: 8px 0 0; }
h2 { font-size: 1.05rem; font-weight: 650; margin: 26px 0 6px; }
</style>
<div class="viz-root"><main>
<h1>Modular addition over training</h1>
<p class="lede">Each row is one quantity at every checkpoint; the left column is the MLP (100,000 steps) and the right the one-layer transformer (40,000). Training step on a logarithmic axis, step 0 drawn at the left edge. Hover for the values at a checkpoint; the table button lists them.</p>
<div class="head"><div>MLP</div><div>Transformer</div></div>
<div id="rows"></div>
<h2>MLP: the step at which each quantity is half-way from its first to its last value</h2><div style="overflow-x:auto"><table class="data" style="max-width:900px"><tr><th>half-way step</th><th>quantity</th><th>series</th><th>first</th><th>last</th></tr><tr><td>13</td><td style='text-align:left'>Wall distance at embed: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>toward other classes</td><td>2.22</td><td>1.94</td></tr><tr><td>19</td><td style='text-align:left'>Fisher energy along straight paths between pairs at embed (held-out)</td><td style='text-align:left'>same sum</td><td>0.000204</td><td>0.00183</td></tr><tr><td>19</td><td style='text-align:left'>Fisher energy along chords, a few items per class, at embed (held-out)</td><td style='text-align:left'>same sum</td><td>0.000195</td><td>0.00402</td></tr><tr><td>53</td><td style='text-align:left'>Inside the nearest-token cell, the prediction is that token's answer</td><td style='text-align:left'>random directions</td><td>0.0244</td><td>0.986</td></tr><tr><td>53</td><td style='text-align:left'>Inside the nearest-token cell, the prediction is that token's answer</td><td style='text-align:left'>toward real activations</td><td>0.0251</td><td>0.982</td></tr><tr><td>64</td><td style='text-align:left'>Fisher energy along straight paths between pairs at hidden (held-out)</td><td style='text-align:left'>different sum</td><td>0.000656</td><td>0.06</td></tr><tr><td>93</td><td style='text-align:left'>Fisher energy along straight paths between pairs at embed (held-out)</td><td style='text-align:left'>different sum</td><td>0.000205</td><td>1.64</td></tr><tr><td>93</td><td style='text-align:left'>Fisher energy along chords, a few items per class, at embed (held-out)</td><td style='text-align:left'>different sum</td><td>0.000203</td><td>1.61</td></tr><tr><td>134</td><td style='text-align:left'>Accuracy</td><td style='text-align:left'>train</td><td>0.0084</td><td>1</td></tr><tr><td>26,108</td><td style='text-align:left'>Decision map over the operand torus: agreement with each rule</td><td style='text-align:left'>clock rule round(a + b)</td><td>0.0092</td><td>1</td></tr><tr><td>26,108</td><td style='text-align:left'>Decision map over the operand torus: agreement with each rule</td><td style='text-align:left'>nearest-token rule</td><td>0.0094</td><td>0.778</td></tr><tr><td>31,411</td><td style='text-align:left'>Accuracy</td><td style='text-align:left'>test</td><td>0.0067</td><td>1</td></tr><tr><td>31,411</td><td style='text-align:left'>Share of the table's power on its final 8 clocks</td><td style='text-align:left'>sum over the 8</td><td>0.158</td><td>0.996</td></tr><tr><td>31,411</td><td style='text-align:left'>Share of the table's power on its final 8 clocks</td><td style='text-align:left'>strongest clock</td><td>0.021</td><td>0.151</td></tr><tr><td>31,411</td><td style='text-align:left'>Wall distance at embed: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>nearest wall</td><td>0.197</td><td>1.52</td></tr><tr><td>49,300</td><td style='text-align:left'>Rotation of the clock planes still to come, angle to the final plane</td><td style='text-align:left'>median clock</td><td>35.2</td><td>0</td></tr><tr><td>49,300</td><td style='text-align:left'>Rotation of the clock planes still to come, angle to the final plane</td><td style='text-align:left'>largest</td><td>47</td><td>0</td></tr><tr><td>49,300</td><td style='text-align:left'>Wall distance at embed: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>random rays</td><td>6.24</td><td>12.4</td></tr><tr><td>49,300</td><td style='text-align:left'>Fisher energy along straight paths between pairs at hidden (held-out)</td><td style='text-align:left'>same sum</td><td>0.000631</td><td>2.14e-09</td></tr></table></div><h2>Transformer: the step at which each quantity is half-way from its first to its last value</h2><div style="overflow-x:auto"><table class="data" style="max-width:900px"><tr><th>half-way step</th><th>quantity</th><th>series</th><th>first</th><th>last</th></tr><tr><td>25</td><td style='text-align:left'>Wall distance at stream: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>random rays</td><td>2.85</td><td>4.05</td></tr><tr><td>39</td><td style='text-align:left'>Wall distance at stream: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>toward other classes</td><td>5.74</td><td>0.554</td></tr><tr><td>39</td><td style='text-align:left'>Fisher energy along straight paths between pairs at mlp (held-out)</td><td style='text-align:left'>different sum</td><td>0.00246</td><td>0.00722</td></tr><tr><td>60</td><td style='text-align:left'>Fisher energy along straight paths between pairs at stream (held-out)</td><td style='text-align:left'>same sum</td><td>3.23e-05</td><td>2.12</td></tr><tr><td>60</td><td style='text-align:left'>Fisher energy along chords, a few items per class, at stream (held-out)</td><td style='text-align:left'>same sum</td><td>2.96e-05</td><td>5.6</td></tr><tr><td>60</td><td style='text-align:left'>Fisher energy along chords, a few items per class, at stream (held-out)</td><td style='text-align:left'>different sum</td><td>2.91e-05</td><td>14.2</td></tr><tr><td>94</td><td style='text-align:left'>Accuracy</td><td style='text-align:left'>train</td><td>0.0086</td><td>1</td></tr><tr><td>94</td><td style='text-align:left'>Fisher energy along straight paths between pairs at stream (held-out)</td><td style='text-align:left'>different sum</td><td>3.2e-05</td><td>13.8</td></tr><tr><td>112</td><td style='text-align:left'>Inside the nearest-token cell, the prediction is that token's answer</td><td style='text-align:left'>random directions</td><td>0</td><td>0.949</td></tr><tr><td>112</td><td style='text-align:left'>Inside the nearest-token cell, the prediction is that token's answer</td><td style='text-align:left'>toward real activations</td><td>0</td><td>0.851</td></tr><tr><td>15,020</td><td style='text-align:left'>Share of the table's power on its final 6 clocks</td><td style='text-align:left'>strongest clock</td><td>0.021</td><td>0.241</td></tr><tr><td>16,700</td><td style='text-align:left'>Decision map over the operand torus: agreement with each rule</td><td style='text-align:left'>nearest-token rule</td><td>0.0081</td><td>0.759</td></tr><tr><td>16,900</td><td style='text-align:left'>Accuracy</td><td style='text-align:left'>test</td><td>0.0082</td><td>1</td></tr><tr><td>17,400</td><td style='text-align:left'>Share of the table's power on its final 6 clocks</td><td style='text-align:left'>sum over the 6</td><td>0.117</td><td>0.96</td></tr><tr><td>17,500</td><td style='text-align:left'>Decision map over the operand torus: agreement with each rule</td><td style='text-align:left'>clock rule round(a + b)</td><td>0.0081</td><td>0.963</td></tr><tr><td>19,619</td><td style='text-align:left'>Rotation of the clock planes still to come, angle to the final plane</td><td style='text-align:left'>median clock</td><td>62.9</td><td>0</td></tr><tr><td>19,619</td><td style='text-align:left'>Wall distance at stream: L2 to the first change of prediction (held-out)</td><td style='text-align:left'>nearest wall</td><td>0.0735</td><td>0.258</td></tr><tr><td>19,619</td><td style='text-align:left'>Fisher energy along straight paths between pairs at mlp (held-out)</td><td style='text-align:left'>same sum</td><td>0.00249</td><td>8.85e-07</td></tr><tr><td>29,700</td><td style='text-align:left'>Rotation of the clock planes still to come, angle to the final plane</td><td style='text-align:left'>largest</td><td>85.6</td><td>0</td></tr></table></div>
<p class="note">Half-way steps are read on the plotted scale (logarithmic for the energies and distances), so they compare when each quantity makes the middle of its move, not how large the move is. Sources: accuracy, clock power and plane rotation from the clock-face results (27 checkpoints, the same grid as the cell properties); torus agreement from the operand-torus maps (7 and 8 checkpoints); the nearest-token-cell statistic from the token-boundary scans (111 and 130 checkpoints); wall distances, path energies and chord energies from the cell-property parts on the held-out pool, each point the median over its items or pairs.</p>
</main></div>
<script type="application/json" id="data">{"MLP":[{"title":"Accuracy","y":"fraction","ylog":false,"ylim":[0,1],"series":[{"name":"train","points":[[0,0.0084],[4,0.0084],[8,0.0084],[13,0.0084],[19,0.0084],[28,0.0084],[40,0.0084],[64,0.0084],[93,0.0084],[134,1.0],[194,1.0],[309,1.0],[447,1.0],[647,1.0],[936,1.0],[1355,1.0],[2151,1.0],[3114,1.0],[4507,1.0],[6524,1.0],[10357,1.0],[14992,1.0],[21701,1.0],[31411,1.0],[49300,1.0],[67910,1.0],[100000,1.0]]},{"name":"test","points":[[0,0.0067],[4,0.0067],[8,0.0067],[13,0.0067],[19,0.0067],[28,0.0067],[40,0.0067],[64,0.0067],[93,0.0067],[134,0.0],[194,0.0],[309,0.0],[447,0.0],[647,0.0],[936,0.0],[1355,0.0],[2151,0.0],[3114,0.0],[4507,0.0],[6524,0.0],[10357,0.0],[14992,0.0003],[21701,0.0903],[31411,0.9979],[49300,1.0],[67910,1.0],[100000,1.0]]}]},{"title":"Share of the table's power on its final 8 clocks","y":"fraction of power","ylog":false,"ylim":[0,1],"reference":{"value":0.14285714285714285,"label":"flat table"},"series":[{"name":"sum over the 8","points":[[0,0.158],[4,0.158],[8,0.1579],[13,0.158],[19,0.1579],[28,0.1579],[40,0.1579],[64,0.158],[93,0.1582],[134,0.15839999999999999],[194,0.15839999999999999],[309,0.15889999999999999],[447,0.159],[647,0.1595],[936,0.1603],[1355,0.1608],[2151,0.1617],[3114,0.163],[4507,0.1662],[6524,0.1716],[10357,0.1865],[14992,0.2176],[21701,0.3398],[31411,0.6646],[49300,0.8565999999999999],[67910,0.9959],[100000,0.9963]]},{"name":"strongest clock","points":[[0,0.021],[4,0.021],[8,0.021],[13,0.0211],[19,0.0211],[28,0.0211],[40,0.0211],[64,0.0211],[93,0.0211],[134,0.021],[194,0.021],[309,0.0209],[447,0.0208],[647,0.0208],[936,0.0209],[1355,0.0211],[2151,0.0213],[3114,0.0217],[4507,0.0225],[6524,0.0236],[10357,0.0273],[14992,0.0373],[21701,0.0737],[31411,0.1214],[49300,0.158],[67910,0.153],[100000,0.1506]]}]},{"title":"Rotation of the clock planes still to come, angle to the final plane","y":"degrees","ylog":false,"ylim":[0,90],"series":[{"name":"median clock","points":[[0,35.18],[4,35.16],[8,35.15],[13,35.14],[19,35.11],[28,35.05],[40,34.9],[64,34.52],[93,34.16],[134,33.83],[194,33.6],[309,33.3],[447,32.98],[647,32.49],[936,31.91],[1355,31.45],[2151,31.08],[3114,30.66],[4507,30.21],[6524,29.75],[10357,29.03],[14992,28.18],[21701,23.0],[31411,18.69],[49300,16.97],[67910,7.92],[100000,0.0]]},{"name":"largest","points":[[0,46.96],[4,46.96],[8,46.95],[13,46.93],[19,46.89],[28,46.8],[40,46.64],[64,46.29],[93,45.9],[134,45.55],[194,45.27],[309,44.86],[447,44.39],[647,43.77],[936,42.99],[1355,42.62],[2151,42.26],[3114,41.81],[4507,41.26],[6524,40.47],[10357,39.23],[14992,37.52],[21701,32.89],[31411,23.75],[49300,23.24],[67910,9.22],[100000,0.0]]}]},{"title":"Decision map over the operand torus: agreement with each rule","y":"fraction of the surface","ylog":false,"ylim":[0,1],"markers":true,"series":[{"name":"clock rule round(a + b)","points":[[0,0.0092],[3114,0.2389],[19784,0.2716],[26108,0.6421],[28637,0.828],[31411,0.9465],[100000,1.0]]},{"name":"nearest-token rule","points":[[0,0.0094],[3114,0.26],[19784,0.2669],[26108,0.5664],[28637,0.6965],[31411,0.7603],[100000,0.7778]]}]},{"title":"Inside the nearest-token cell, the prediction is that token's answer","y":"fraction of scans","ylog":false,"ylim":[0,1],"series":[{"name":"random directions","points":[[0,0.024412461286208782],[1,0.0249590089269448],[2,0.0249590089269448],[3,0.024594643833120787],[4,0.024412461286208782],[5,0.024230278739296774],[6,0.024230278739296774],[7,0.02350154855164875],[8,0.019129167425760613],[9,0.017674927113702624],[10,0.008381924198250729],[11,0.01967930029154519],[12,0.025145772594752185],[13,0.02806122448979592],[15,0.043002915451895045],[16,0.048104956268221574],[18,0.06650874635568513],[19,0.07270408163265306],[21,0.08090379008746355],[23,0.08473032069970846],[25,0.09493440233236151],[28,0.12190233236151604],[31,0.14267492711370264],[34,0.15105685131195334],[37,0.17857142857142858],[40,0.2325072886297376],[44,0.33655247813411077],[49,0.45408163265306123],[53,0.5174927113702624],[58,0.6036807580174927],[64,0.6955174927113703],[70,0.7560575696848242],[77,0.8127504553734062],[85,0.8470502549162418],[93,0.8610706482155863],[102,0.8714727835426906],[112,0.8800509646887513],[122,0.8860575172915909],[134,0.8907899526756462],[147,0.8942675159235669],[162,0.8959432417682373],[177,0.8983081680916863],[194,0.8994179701709712],[213,0.9016005820298291],[234,0.9026918879592579],[257,0.9039650782102583],[281,0.906147690069116],[309,0.9081651209310784],[339,0.9096363636363637],[371,0.9107272727272727],[407,0.9125454545454545],[447,0.9130909090909091],[490,0.9134388070558284],[537,0.9152573195126387],[590,0.9166818264507913],[647,0.917075831969449],[709,0.9176213857064921],[778,0.9178181818181819],[853,0.9194545454545454],[936,0.9203636363636364],[1027,0.92092346846028],[1126,0.9213299418604651],[1235,0.92188919164396],[1355,0.9222524977293369],[1486,0.922811478387214],[1630,0.922811478387214],[1788,0.9233563385397748],[1961,0.9233702560377701],[2151,0.9227000544365814],[2359,0.922909486667876],[2588,0.9234397677793904],[2839,0.9233000906618314],[3114,0.9241929633659776],[3415,0.9245967011056734],[3746,0.9247779590357078],[4109,0.9255164914824212],[4507,0.925348795071571],[4943,0.9257111795615147],[5422,0.9261003441405542],[5948,0.9259460438167663],[6524,0.9268513489045809],[7156,0.927536231884058],[7849,0.9282608695652174],[8609,0.9296846683581007],[9443,0.9291281493565343],[10357,0.9296846683581007],[11361,0.9298404641044234],[12461,0.9300217548948514],[13668,0.9305530371713508],[14992,0.929776810016331],[16444,0.9304015991277484],[18037,0.9301182893539581],[19784,0.9214351425942963],[21701,0.9252926965248095],[23803,0.9335560504825539],[26108,0.9368440434542441],[28637,0.944278792396571],[31411,0.9536643898836995],[34454,0.9671388101983003],[37791,0.9688549048862365],[41452,0.9816496405599697],[45467,0.9868945868945869],[49300,0.9870227571939063],[50802,0.9866171003717472],[55963,0.9831521739130434],[61648,0.9842676311030741],[67910,0.9853499728703201],[74808,0.9855256015921838],[82407,0.9857065315722815],[90779,0.986794500723589],[100000,0.9864351600651112]]},{"name":"toward real activations","points":[[0,0.025128611001187177],[1,0.03383458646616541],[2,0.025722200237435693],[3,0.030470914127423823],[4,0.03184965380811078],[5,0.06172106824925816],[6,0.06686449060336301],[7,0.0638971315529179],[8,0.0609297725024728],[9,0.08447082096933729],[10,0.1076375148397309],[11,0.12762168579343094],[12,0.14384645825089037],[13,0.1590819153146023],[15,0.203601108033241],[16,0.20815195884447962],[18,0.21171349426197072],[19,0.2144835773644638],[21,0.22793826671943015],[23,0.22774040364068066],[25,0.23070834982192323],[28,0.23644637910565888],[31,0.22976449633880863],[34,0.2499505244409262],[37,0.3075400752028498],[40,0.3492974470611518],[44,0.4043142687512369],[49,0.48594615993665874],[53,0.5618689368441893],[58,0.6464766429136976],[64,0.728424386381631],[70,0.7910152384721947],[77,0.8345537304571542],[85,0.8583019988125866],[93,0.8755441234665612],[102,0.8905817174515236],[112,0.9002967359050446],[122,0.9056379821958457],[134,0.9125618199802176],[147,0.9171117705242334],[162,0.9224530168150347],[177,0.9260138476755687],[194,0.9299703264094955],[213,0.9335311572700297],[234,0.9357072205736894],[257,0.9382789317507418],[281,0.9414441147378833],[309,0.9448071216617211],[339,0.9489614243323442],[371,0.9509396636993076],[407,0.9527200791295747],[447,0.954104846686449],[490,0.9556874381800198],[537,0.9568658488326078],[590,0.9576656775469832],[647,0.9582756575044493],[709,0.9592643859996045],[778,0.9600553687957287],[853,0.9596758252619094],[936,0.9594781577386835],[1027,0.9600711603083614],[1126,0.9610671936758893],[1235,0.9618501680173948],[1355,0.9620553359683794],[1486,0.9628531910689587],[1630,0.9626556016597511],[1788,0.9626629790596603],[1961,0.9622678783089688],[2151,0.9616676546137127],[2359,0.9618577075098814],[2588,0.9620703279336231],[2839,0.9620778194746198],[3114,0.9620778194746198],[3415,0.9620853080568721],[3746,0.9618803081177167],[4109,0.9620703279336231],[4507,0.9624654286843145],[4943,0.9634531805610431],[5422,0.9640387275242047],[5948,0.9652173913043478],[6524,0.966212211025489],[7156,0.9666073898439044],[7849,0.9668180920402923],[8609,0.9668180920402923],[9443,0.9670156033971954],[10357,0.9674106261110014],[11361,0.9683856945267734],[12461,0.969176052163604],[13668,0.9715246193395294],[14992,0.9713325425069197],[16444,0.9679968391939945],[18037,0.9614700652045051],[19784,0.9452244413684002],[21701,0.9671871911444949],[23803,0.9717447144833037],[26108,0.9754892271199842],[28637,0.9711348359035191],[31411,0.9762470308788599],[34454,0.9548872180451128],[37791,0.9792202651889966],[41452,0.9798299386988333],[45467,0.9778085991678225],[49300,0.9793977812995246],[50802,0.9800118741341777],[55963,0.9804038004750594],[61648,0.9813861386138614],[67910,0.981973058637084],[74808,0.9821711568938193],[82407,0.9823692551505546],[90779,0.9821711568938193],[100000,0.9823727470786294]]}]},{"title":"Wall distance at embed: L2 to the first change of prediction (held-out)","y":"L2 at the cut","ylog":true,"series":[{"name":"nearest wall","points":[[0,0.19736900000000002],[4,0.22238950000000002],[8,0.21198450000000002],[13,0.180211],[19,0.1906625],[28,0.2097365],[40,0.1886715],[64,0.1246985],[93,0.120973],[134,0.1306025],[194,0.133947],[309,0.149319],[447,0.142403],[647,0.14227800000000002],[936,0.132145],[1355,0.1218555],[2151,0.101463],[3114,0.0994522],[4507,0.0846169],[6524,0.07447609999999999],[10357,0.07713625],[14992,0.08589],[21701,0.08079435],[31411,0.7783715],[49300,1.546235],[67910,1.513525],[100000,1.5177049999999999]]},{"name":"toward other classes","points":[[0,2.21837],[4,2.61869],[8,2.2751099999999997],[13,1.88093],[19,1.9501],[28,2.0191850000000002],[40,1.88315],[64,1.3717000000000001],[93,1.48514],[134,1.424455],[194,1.50413],[309,1.425225],[447,1.52509],[647,1.5777],[936,1.391745],[1355,1.210855],[2151,1.027405],[3114,1.0578400000000001],[4507,0.900307],[6524,0.854092],[10357,0.831999],[14992,0.8811265],[21701,0.769034],[31411,2.200145],[49300,2.1462649999999996],[67910,1.94119],[100000,1.941265]]},{"name":"random rays","points":[[0,6.239495],[4,6.82888],[8,6.607065],[13,6.989725],[19,7.761044999999999],[28,7.6361799999999995],[40,6.923265],[64,4.88175],[93,4.802285],[134,4.935135],[194,4.993385],[309,5.08023],[447,4.891745],[647,4.71552],[936,4.69101],[1355,4.421015000000001],[2151,3.734285],[3114,3.4275700000000002],[4507,2.98794],[6524,2.7101949999999997],[10357,2.8172800000000002],[14992,2.95539],[21701,2.954675],[31411,8.778765],[49300,12.81385],[67910,12.255099999999999],[100000,12.38725]]}]},{"title":"Fisher energy along straight paths between pairs at embed (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,0.0002039935],[4,0.0002434275],[8,0.00034007549999999997],[13,0.0005626155],[19,0.0010614399999999999],[28,0.00247534],[40,0.00544119],[64,0.0129629],[93,0.02369285],[134,0.03329585],[194,0.0397961],[309,0.0475034],[447,0.0572213],[647,0.07124745],[936,0.09395970000000001],[1355,0.12672899999999998],[2151,0.17112],[3114,0.22414299999999998],[4507,0.291718],[6524,0.33519],[10357,0.366477],[14992,0.386433],[21701,0.5150385],[31411,0.131511],[49300,0.001266315],[67910,0.001842815],[100000,0.0018284249999999998]]},{"name":"different sum","points":[[0,0.00020494650000000002],[4,0.000239511],[8,0.00033912600000000003],[13,0.0005509460000000001],[19,0.00104733],[28,0.00241356],[40,0.0053460650000000005],[64,0.0126705],[93,0.02314745],[134,0.03198945],[194,0.03801595],[309,0.04630425],[447,0.056175199999999995],[647,0.07207775],[936,0.0986014],[1355,0.12708999999999998],[2151,0.17203400000000002],[3114,0.22885149999999999],[4507,0.29122000000000003],[6524,0.3339585],[10357,0.3705985],[14992,0.42694600000000005],[21701,0.5336965],[31411,1.014665],[49300,1.1908050000000001],[67910,1.647805],[100000,1.6388699999999998]]}]},{"title":"Fisher energy along straight paths between pairs at hidden (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,0.0006313265],[4,0.000733044],[8,0.00100177],[13,0.00155461],[19,0.0024186299999999997],[28,0.00406491],[40,0.0061465800000000004],[64,0.007890055],[93,0.008762375],[134,0.009003845],[194,0.008983885],[309,0.00906673],[447,0.0093545],[647,0.009550025],[936,0.01020455],[1355,0.01148775],[2151,0.0147222],[3114,0.0172882],[4507,0.0189683],[6524,0.0196464],[10357,0.0192853],[14992,0.0168771],[21701,0.008774995],[31411,5.4624250000000005e-06],[49300,5.24754e-10],[67910,2.032165e-09],[100000,2.139905e-09]]},{"name":"different sum","points":[[0,0.000656361],[4,0.000730635],[8,0.0009890300000000001],[13,0.001500845],[19,0.0023881550000000003],[28,0.0040085699999999995],[40,0.00594175],[64,0.007783975],[93,0.00851001],[134,0.00863253],[194,0.00879147],[309,0.008910020000000001],[447,0.008929155000000001],[647,0.00919553],[936,0.0096953],[1355,0.01085095],[2151,0.01439525],[3114,0.017125349999999998],[4507,0.01924505],[6524,0.02016455],[10357,0.01990225],[14992,0.017386449999999998],[21701,0.01038],[31411,0.033315750000000005],[49300,0.009394045],[67910,0.0596178],[100000,0.06002785]]}]},{"title":"Fisher energy along chords, a few items per class, at embed (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,0.0001950125],[4,0.0002339965],[8,0.0003364185],[13,0.0005711405000000001],[19,0.0011081],[28,0.0026555249999999997],[40,0.005833035],[64,0.01313005],[93,0.02306795],[134,0.033071050000000005],[194,0.03901755],[309,0.046129149999999994],[447,0.05627825],[647,0.07401055],[936,0.09729375],[1355,0.1284255],[2151,0.1847295],[3114,0.251142],[4507,0.318461],[6524,0.3835715],[10357,0.4117865],[14992,0.4243215],[21701,0.496983],[31411,0.044204999999999994],[49300,0.003626125],[67910,0.003919695],[100000,0.00402276]]},{"name":"different sum","points":[[0,0.0002033485],[4,0.000241656],[8,0.00034278499999999996],[13,0.0005585155],[19,0.00106476],[28,0.002546455],[40,0.005661165],[64,0.0132965],[93,0.0236815],[134,0.034071599999999994],[194,0.0403096],[309,0.048823099999999994],[447,0.058536000000000005],[647,0.07366339999999999],[936,0.09812685],[1355,0.1282875],[2151,0.174958],[3114,0.2289235],[4507,0.297252],[6524,0.3565345],[10357,0.380481],[14992,0.3908015],[21701,0.508953],[31411,0.920652],[49300,1.184025],[67910,1.6348850000000001],[100000,1.614655]]}]}],"Transformer":[{"title":"Accuracy","y":"fraction","ylog":false,"ylim":[0,1],"series":[{"name":"train","points":[[0,0.0086],[5,0.0102],[10,0.0188],[16,0.0308],[25,0.053],[39,0.089],[60,0.2321],[94,0.5928],[134,0.9319],[209,0.9517],[326,0.9671],[509,0.9872],[795,0.9997],[1135,1.0],[1772,1.0],[2766,1.0],[3613,1.0],[5159,1.0],[8053,1.0],[11498,1.0],[15020,1.0],[16418,1.0],[16900,1.0],[17400,1.0],[19619,1.0],[29700,0.993],[40000,1.0]]},{"name":"test","points":[[0,0.0082],[5,0.0075],[10,0.0057],[16,0.0057],[25,0.005],[39,0.0069],[60,0.02],[94,0.1055],[134,0.2514],[209,0.248],[326,0.2465],[509,0.2527],[795,0.2644],[1135,0.2672],[1772,0.2568],[2766,0.2709],[3613,0.2682],[5159,0.2665],[8053,0.2627],[11498,0.2686],[15020,0.3015],[16418,0.4175],[16900,0.6368],[17400,0.8938],[19619,0.9998],[29700,0.98],[40000,1.0]]}]},{"title":"Share of the table's power on its final 6 clocks","y":"fraction of power","ylog":false,"ylim":[0,1],"reference":{"value":0.10714285714285714,"label":"flat table"},"series":[{"name":"sum over the 6","points":[[0,0.11699999999999999],[5,0.1169],[10,0.11699999999999999],[16,0.1172],[25,0.1172],[39,0.1178],[60,0.1186],[94,0.1205],[134,0.1214],[209,0.1219],[326,0.1231],[509,0.1254],[795,0.12969999999999998],[1135,0.1363],[1772,0.147],[2766,0.1631],[3613,0.1756],[5159,0.1951],[8053,0.2396],[11498,0.2986],[15020,0.3902],[16418,0.4792],[16900,0.5378],[17400,0.6225],[19619,0.9045],[29700,0.9564],[40000,0.96]]},{"name":"strongest clock","points":[[0,0.021],[5,0.021],[10,0.021],[16,0.021],[25,0.021],[39,0.0212],[60,0.0215],[94,0.022],[134,0.0223],[209,0.0225],[326,0.023],[509,0.0238],[795,0.0255],[1135,0.0281],[1772,0.032],[2766,0.0396],[3613,0.0476],[5159,0.0606],[8053,0.0889],[11498,0.1176],[15020,0.1335],[16418,0.1387],[16900,0.1412],[17400,0.1492],[19619,0.2199],[29700,0.2292],[40000,0.2408]]}]},{"title":"Rotation of the clock planes still to come, angle to the final plane","y":"degrees","ylog":false,"ylim":[0,90],"series":[{"name":"median clock","points":[[0,62.89],[5,62.87],[10,62.84],[16,62.78],[25,62.67],[39,62.58],[60,62.6],[94,62.42],[134,62.31],[209,62.2],[326,62.03],[509,61.73],[795,61.09],[1135,60.43],[1772,59.27],[2766,55.15],[3613,52.89],[5159,49.28],[8053,45.74],[11498,39.16],[15020,36.66],[16418,34.4],[16900,32.42],[17400,31.73],[19619,28.1],[29700,17.71],[40000,0.0]]},{"name":"largest","points":[[0,85.57],[5,85.58],[10,85.57],[16,85.55],[25,85.53],[39,85.4],[60,85.2],[94,85.12],[134,85.1],[209,85.08],[326,85.15],[509,85.34],[795,85.43],[1135,85.11],[1772,85.18],[2766,85.61],[3613,85.53],[5159,84.49],[8053,83.89],[11498,82.69],[15020,75.12],[16418,72.47],[16900,71.86],[17400,70.39],[19619,58.48],[29700,30.28],[40000,0.0]]}]},{"title":"Decision map over the operand torus: agreement with each rule","y":"fraction of the surface","ylog":false,"ylim":[0,1],"markers":true,"series":[{"name":"clock rule round(a + b)","points":[[0,0.0081],[1039,0.1855],[15020,0.2824],[16700,0.4168],[17500,0.658],[17948,0.799],[19619,0.9443],[40000,0.9629]]},{"name":"nearest-token rule","points":[[0,0.0081],[1039,0.1899],[15020,0.2828],[16700,0.3868],[17500,0.5797],[17948,0.6782],[19619,0.754],[40000,0.7587]]}]},{"title":"Inside the nearest-token cell, the prediction is that token's answer","y":"fraction of scans","ylog":false,"ylim":[0,1],"series":[{"name":"random directions","points":[[0,0.0],[1,0.0],[2,0.012197342071727653],[3,0.006553795740032769],[4,0.0],[5,0.0],[6,0.0],[7,0.0007281995266703076],[8,0.0118332423083925],[9,0.023666484616785],[10,0.02785363189513927],[11,0.03641660597232338],[12,0.037684325505188423],[13,0.0385945749135263],[14,0.0402330238485345],[16,0.05334061532860004],[17,0.06044056071363554],[19,0.06279577721150346],[21,0.057335274845285764],[23,0.05442300691663633],[25,0.06954305479701438],[27,0.0638995084653195],[29,0.05133806663025669],[32,0.04079402658896376],[35,0.04663023679417122],[39,0.062477231329690346],[42,0.08087431693989071],[46,0.13515482695810566],[50,0.15485516487520495],[55,0.19766806339952633],[60,0.22649416909620992],[66,0.26913265306122447],[72,0.2972677595628415],[79,0.3011477500455456],[86,0.31116779012570595],[94,0.33454810495626824],[100,0.3875728862973761],[103,0.4272959183673469],[112,0.5029154518950437],[123,0.5561020036429872],[134,0.598433800764888],[146,0.6160291438979963],[160,0.6236794171220401],[175,0.6255009107468124],[191,0.6193078324225865],[209,0.6178506375227687],[229,0.6251366120218579],[250,0.639344262295082],[273,0.6449908925318761],[299,0.6568930977963942],[326,0.6636313968311783],[357,0.6632058287795993],[390,0.6806921675774135],[426,0.6781420765027323],[466,0.6911443148688047],[509,0.6935689560940062],[557,0.7176449143273788],[609,0.7348650619985412],[665,0.7305869485964273],[727,0.7366885485047411],[795,0.7450765864332604],[869,0.7610877897426538],[950,0.7752192982456141],[1039,0.7867203219315896],[1135,0.7948717948717948],[1241,0.7978001833180568],[1357,0.8013597941933113],[1483,0.8015084621044886],[1621,0.7969037965352009],[1772,0.7659966808039831],[1937,0.7877837239343052],[2118,0.7990368586775328],[2315,0.8054315476190477],[2530,0.8109619686800895],[2766,0.8097724729578516],[2900,0.7542325581395349],[3000,0.7882790697674419],[3024,0.7973601041085704],[3305,0.8221649484536082],[3613,0.8153310104529616],[3950,0.8058252427184466],[4318,0.6977172312223858],[4400,0.7761633253632518],[4720,0.7606569477763425],[5159,0.7314095449500555],[5640,0.7070051890289103],[6165,0.7598374284130797],[6739,0.7624861265260822],[7367,0.748286719762919],[8053,0.7571985881478729],[8803,0.8302062047185584],[9623,0.8078626799557033],[10500,0.7169566827101074],[10519,0.742365352581899],[11498,0.7547764793173808],[11800,0.6806769574111958],[11900,0.7609583952451708],[12569,0.7677909562638991],[13740,0.7811921510551647],[15020,0.7750046563605886],[15800,0.787317620650954],[16100,0.7824056779977587],[16300,0.7838745800671892],[16400,0.7838493099589705],[16418,0.7845953002610966],[16500,0.78735310576385],[16600,0.7906325807053555],[16700,0.7954460619634192],[16800,0.8059757236227825],[16900,0.8218025430067315],[17000,0.7586464759768181],[17100,0.8499532273152479],[17200,0.8611059044048734],[17300,0.8723802395209581],[17400,0.8837165825387923],[17500,0.8931240657698056],[17600,0.8990842833115306],[17800,0.9054382358437675],[17948,0.9094650205761317],[19619,0.9130848231266642],[21446,0.9613145539906103],[23444,0.9549971873242078],[25627,0.9488859764089121],[28014,0.9499168360746627],[29700,0.9066265060240963],[29800,0.918233082706767],[30623,0.9521354933726067],[33475,0.9427559201939213],[36592,0.9483847010768659],[40000,0.94859287054409]]},{"name":"toward real activations","points":[[0,0.0],[1,0.0],[2,0.0065528196981731535],[3,0.0],[4,0.0],[5,0.0015885623510722795],[6,0.034551231135822084],[7,0.028991262907069104],[8,0.07426528991262907],[9,0.05599682287529786],[10,0.04984114376489277],[11,0.05917394757744242],[12,0.06830818109610802],[13,0.07406671961874503],[14,0.07545671167593328],[16,0.07644956314535345],[17,0.06652104845115171],[19,0.06969817315329627],[21,0.06294678316123908],[23,0.05321683876092136],[25,0.05123113582208102],[27,0.0363383637807784],[29,0.023034154090548053],[32,0.036735504368546466],[35,0.031175536139793486],[39,0.04011119936457506],[42,0.061953931691818905],[46,0.07803812549642573],[50,0.1199364575059571],[55,0.14396346306592533],[60,0.1371576022231044],[66,0.1604129442128251],[72,0.2181854278340282],[79,0.24895771292435973],[86,0.3035537026007544],[94,0.32916418503077227],[100,0.37601747071669644],[103,0.4115544967242406],[112,0.5197538217192773],[123,0.5648203295612467],[134,0.5851528384279476],[146,0.5972608177848353],[160,0.6006351726875744],[175,0.6010321556173085],[191,0.6032155617308456],[209,0.6157205240174672],[229,0.6141325922985311],[250,0.6050019849146486],[273,0.6038110361254466],[299,0.610162763001191],[326,0.6091703056768559],[357,0.6105158730158731],[390,0.6375],[426,0.6484126984126984],[466,0.6351190476190476],[509,0.6595238095238095],[557,0.6563492063492063],[609,0.6706372840976772],[665,0.6419213973799127],[727,0.656547619047619],[795,0.6658730158730158],[869,0.6705695574518754],[950,0.6741461477362987],[1039,0.6766633565044687],[1135,0.6857994041708043],[1241,0.693026028213789],[1357,0.6962050466918339],[1483,0.6958076693820783],[1621,0.6995034756703078],[1772,0.6800317586343787],[1937,0.7150238473767886],[2118,0.70203025477707],[2315,0.6972897568752491],[2530,0.702191235059761],[2766,0.7085407127214812],[2900,0.6500796178343949],[3000,0.7008359872611465],[3024,0.7075208913649025],[3305,0.7141153081510935],[3613,0.7077870480731029],[3950,0.7104584242905339],[4318,0.6539758080507634],[4400,0.725614591593973],[4720,0.7274350327316009],[5159,0.7328699106256207],[5640,0.740571655418817],[6165,0.7460758990661633],[6739,0.7424483306836248],[7367,0.7334525939177102],[8053,0.7321676932247169],[8803,0.7445197289756875],[9623,0.7490047770700637],[10500,0.6999403459932392],[10519,0.7243984887651621],[11498,0.7325650705344725],[11800,0.6811594202898551],[11900,0.7334259626836046],[12569,0.7404322823716042],[13740,0.7421021259686071],[15020,0.7667992047713718],[15800,0.8046456223942823],[16100,0.7939598648917147],[16300,0.803057375421878],[16400,0.8078602620087336],[16418,0.8082952966858503],[16500,0.8121031746031746],[16600,0.8189210630702103],[16700,0.828112609040444],[16800,0.8389527965093218],[16900,0.844400396432111],[17000,0.825698988697204],[17100,0.8713067618481063],[17200,0.8754956383822363],[17300,0.8779519745981346],[17400,0.8681755012904506],[17500,0.8591577274533174],[17600,0.8563481025233459],[17800,0.858334989072124],[17948,0.8523449920508744],[19619,0.8409090909090909],[21446,0.8573717948717948],[23444,0.8539460539460539],[25627,0.8628115653040878],[28014,0.8528648432820922],[29700,0.664138894432249],[29800,0.8073852295409182],[30623,0.8546071001196649],[33475,0.8556],[36592,0.8564583749251348],[40000,0.8506687961668996]]}]},{"title":"Wall distance at stream: L2 to the first change of prediction (held-out)","y":"L2 at the cut","ylog":true,"series":[{"name":"nearest wall","points":[[0,0.07348055],[5,0.057017349999999994],[10,0.0550371],[16,0.0762485],[25,0.09326975],[39,0.12229100000000001],[60,0.1121385],[94,0.06905175],[134,0.0818363],[209,0.08576625],[326,0.09210765],[509,0.09340725],[795,0.08419555000000001],[1135,0.07488625],[1772,0.0589141],[2766,0.0472911],[3613,0.0370953],[5159,0.03859505],[8053,0.0354457],[11498,0.037233550000000004],[15020,0.0433665],[16418,0.05081715],[16900,0.05702455],[17400,0.1066345],[19619,0.23304],[29700,0.1789455],[40000,0.257757]]},{"name":"toward other classes","points":[[0,5.74155],[5,4.988325],[10,2.96093],[16,2.8387700000000002],[25,2.446175],[39,1.77547],[60,1.41445],[94,0.9604575],[134,0.9629225],[209,1.02933],[326,0.9727380000000001],[509,0.948509],[795,0.836303],[1135,0.6231230000000001],[1772,0.468958],[2766,0.37338550000000004],[3613,0.262172],[5159,0.29591500000000004],[8053,0.195402],[11498,0.2390335],[15020,0.27039],[16418,0.317222],[16900,0.319662],[17400,0.49303149999999996],[19619,0.5073380000000001],[29700,0.4439025],[40000,0.5539035]]},{"name":"random rays","points":[[0,2.85065],[5,2.409945],[10,2.47797],[16,2.925665],[25,3.9063350000000003],[39,5.270379999999999],[60,4.64089],[94,3.110175],[134,3.7434849999999997],[209,3.99833],[326,3.789415],[509,3.523795],[795,2.91394],[1135,2.76566],[1772,2.303395],[2766,1.832265],[3613,1.694105],[5159,1.527745],[8053,1.43179],[11498,1.628345],[15020,1.7362700000000002],[16418,1.78809],[16900,2.1102600000000002],[17400,2.717845],[19619,3.88565],[29700,3.508465],[40000,4.04526]]}]},{"title":"Fisher energy along straight paths between pairs at stream (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,3.2260599999999994e-05],[5,2.617675e-05],[10,7.305715e-05],[16,0.000169622],[25,0.0005661505],[39,0.00375042],[60,0.02274195],[94,0.151169],[134,0.5858019999999999],[209,0.8276425000000001],[326,0.7897845],[509,0.8410095],[795,1.190955],[1135,2.353415],[1772,4.482530000000001],[2766,8.25168],[3613,8.038085],[5159,11.8255],[8053,8.130299999999998],[11498,12.40385],[15020,8.937915],[16418,9.17244],[16900,8.719005],[17400,4.167775],[19619,2.223],[29700,5.756130000000001],[40000,2.11655]]},{"name":"different sum","points":[[0,3.19956e-05],[5,2.3655899999999998e-05],[10,6.48366e-05],[16,0.0001622325],[25,0.000577258],[39,0.003637385],[60,0.020778949999999997],[94,0.142509],[134,0.449178],[209,0.616042],[326,0.621183],[509,0.7920735],[795,1.126035],[1135,2.155195],[1772,4.274985],[2766,7.354755],[3613,6.971425],[5159,10.57685],[8053,7.95882],[11498,11.7558],[15020,9.896059999999999],[16418,11.154150000000001],[16900,13.67185],[17400,10.4841],[19619,20.2832],[29700,22.48995],[40000,13.800650000000001]]}]},{"title":"Fisher energy along straight paths between pairs at mlp (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,0.0024915099999999997],[5,0.0025533500000000002],[10,0.002702555],[16,0.00306633],[25,0.004218075],[39,0.006317445],[60,0.00710956],[94,0.00639524],[134,0.005249715],[209,0.005129715],[326,0.0058309699999999996],[509,0.007922675],[795,0.0102108],[1135,0.011154049999999999],[1772,0.01072215],[2766,0.008889020000000001],[3613,0.005948805],[5159,0.002922895],[8053,0.002379955],[11498,0.0008876095],[15020,0.0008123655],[16418,0.0006872675],[16900,0.000398315],[17400,6.04057e-05],[19619,3.4873699999999995e-08],[29700,2.8553349999999997e-08],[40000,8.850725e-07]]},{"name":"different sum","points":[[0,0.0024646549999999996],[5,0.00247312],[10,0.002616565],[16,0.0030549699999999997],[25,0.00412753],[39,0.00615606],[60,0.0068914449999999995],[94,0.006124255],[134,0.004829875],[209,0.004899219999999999],[326,0.00544581],[509,0.0070115049999999995],[795,0.009443690000000001],[1135,0.01049885],[1772,0.009901755],[2766,0.0093401],[3613,0.006004745000000001],[5159,0.00268148],[8053,0.002661245],[11498,0.00124131],[15020,0.001146415],[16418,0.00112689],[16900,0.00138824],[17400,0.001850315],[19619,0.002471225],[29700,0.00589716],[40000,0.007217965]]}]},{"title":"Fisher energy along chords, a few items per class, at stream (held-out)","y":"(Ju)^T F (Ju) per unit step","ylog":true,"series":[{"name":"same sum","points":[[0,2.956715e-05],[5,2.08118e-05],[10,5.93262e-05],[16,0.000157904],[25,0.00049071],[39,0.0031285],[60,0.020762299999999997],[94,0.12346399999999999],[134,0.5140215],[209,0.6455265],[326,0.642738],[509,0.7323649999999999],[795,1.04699],[1135,2.19132],[1772,5.716395],[2766,8.425785000000001],[3613,8.668949999999999],[5159,13.58985],[8053,9.25299],[11498,13.994900000000001],[15020,8.192395000000001],[16418,6.178965],[16900,5.5245750000000005],[17400,2.45737],[19619,4.0923025],[29700,7.137829999999999],[40000,5.598755000000001]]},{"name":"different sum","points":[[0,2.90868e-05],[5,2.1813499999999997e-05],[10,6.76214e-05],[16,0.00017222249999999999],[25,0.0005867555],[39,0.00371062],[60,0.023507899999999998],[94,0.143962],[134,0.525923],[209,0.6752374999999999],[326,0.806237],[509,0.856475],[795,1.1697250000000001],[1135,2.24968],[1772,4.645465],[2766,7.57043],[3613,7.455444999999999],[5159,11.78125],[8053,8.034189999999999],[11498,12.763649999999998],[15020,10.4877],[16418,10.205200000000001],[16900,12.94145],[17400,10.33775],[19619,19.64705],[29700,22.317500000000003],[40000,14.18085]]}]}]}</script>
<script>
(function () {
const DATA = JSON.parse(document.getElementById("data").textContent);
const MODELS = ["MLP", "Transformer"];
const COLOURS = ["var(--s1)", "var(--s2)", "var(--s3)"];
const W = 520, H = 190, ML = 56, MR = 14, MT = 10, MB = 30;
const rows = document.getElementById("rows");
const fmt = v => (v === null || v === undefined) ? "" : (Math.abs(v) >= 100 ? v.toFixed(0) : Math.abs(v) >= 1 ? v.toFixed(2) : v.toPrecision(3));
const xOf = (step, xmax) => ML + (Math.log10(step + 1) / Math.log10(xmax + 1)) * (W - ML - MR);
function panel(row, model) {
const box = document.createElement("div"); box.className = "panel";
const h = document.createElement("h3"); h.textContent = row.title; box.appendChild(h);
const legend = document.createElement("div"); legend.className = "legend";
row.series.forEach((s, i) => { const e = document.createElement("span"); const sw = document.createElement("i"); sw.style.background = COLOURS[i]; e.appendChild(sw); e.appendChild(document.createTextNode(s.name)); legend.appendChild(e); });
if (row.reference) { const e = document.createElement("span"); const sw = document.createElement("i"); sw.className = "ref"; e.appendChild(sw); e.appendChild(document.createTextNode(row.reference.label + " " + fmt(row.reference.value))); legend.appendChild(e); }
box.appendChild(legend);
const xmax = Math.max(...row.series.flatMap(s => s.points.map(p => p[0])));
let vals = row.series.flatMap(s => s.points.map(p => p[1])).filter(v => v !== null && isFinite(v) && (!row.ylog || v > 0));
let lo, hi;
if (row.ylim) { [lo, hi] = row.ylim; }
else if (row.ylog) { lo = Math.min(...vals); hi = Math.max(...vals); lo = Math.pow(10, Math.floor(Math.log10(lo))); hi = Math.pow(10, Math.ceil(Math.log10(hi))); }
else { lo = 0; hi = Math.max(...vals) * 1.05; }
const yOf = v => row.ylog ? MT + (1 - (Math.log10(v) - Math.log10(lo)) / (Math.log10(hi) - Math.log10(lo))) * (H - MT - MB) : MT + (1 - (v - lo) / (hi - lo)) * (H - MT - MB);
const ns = "http://www.w3.org/2000/svg";
const svg = document.createElementNS(ns, "svg"); svg.setAttribute("viewBox", `0 0 ${W} ${H}`); svg.setAttribute("role", "img"); svg.setAttribute("aria-label", row.title);
const el = (tag, attrs, text) => { const e = document.createElementNS(ns, tag); for (const k in attrs) e.setAttribute(k, attrs[k]); if (text !== undefined) e.textContent = text; return e; };
// y grid
const yticks = row.ylog ? (() => { const t = []; for (let e = Math.log10(lo); e <= Math.log10(hi) + 1e-9; e++) t.push(Math.pow(10, e)); return t; })() : [lo, lo + (hi - lo) / 2, hi];
for (const t of yticks) {
svg.appendChild(el("line", {x1: ML, x2: W - MR, y1: yOf(t), y2: yOf(t), stroke: "var(--grid)", "stroke-width": 1}));
svg.appendChild(el("text", {x: ML - 6, y: yOf(t) + 4, "text-anchor": "end", "font-size": 10, fill: "var(--muted)"}, row.ylog ? (t >= 1 ? t.toFixed(0) : t.toExponential(0)) : fmt(t)));
}
// x ticks at decades
const xt = [0, 10, 100, 1000, 10000, 100000].filter(t => t <= xmax);
for (const t of xt) {
svg.appendChild(el("line", {x1: xOf(t, xmax), x2: xOf(t, xmax), y1: H - MB, y2: H - MB + 4, stroke: "var(--axis)", "stroke-width": 1}));
svg.appendChild(el("text", {x: xOf(t, xmax), y: H - MB + 15, "text-anchor": "middle", "font-size": 10, fill: "var(--muted)"}, t >= 1000 ? (t / 1000) + "k" : String(t)));
}
svg.appendChild(el("line", {x1: ML, x2: W - MR, y1: H - MB, y2: H - MB, stroke: "var(--axis)", "stroke-width": 1}));
svg.appendChild(el("text", {x: W - MR, y: H - 3, "text-anchor": "end", "font-size": 10, fill: "var(--muted)"}, "training step"));
svg.appendChild(el("text", {x: 4, y: MT + 8, "font-size": 10, fill: "var(--muted)"}, row.y));
if (row.reference) svg.appendChild(el("line", {x1: ML, x2: W - MR, y1: yOf(row.reference.value), y2: yOf(row.reference.value), stroke: "var(--muted)", "stroke-width": 1, "stroke-dasharray": "4 3"}));
row.series.forEach((s, i) => {
const pts = s.points.filter(p => p[1] !== null && isFinite(p[1]) && (!row.ylog || p[1] > 0));
const d = pts.map((p, j) => (j ? "L" : "M") + xOf(p[0], xmax).toFixed(1) + " " + yOf(Math.min(Math.max(p[1], lo), hi)).toFixed(1)).join(" ");
svg.appendChild(el("path", {d, fill: "none", stroke: COLOURS[i], "stroke-width": 2, "stroke-linejoin": "round"}));
if (row.markers || pts.length < 12) for (const p of pts) svg.appendChild(el("circle", {cx: xOf(p[0], xmax), cy: yOf(Math.min(Math.max(p[1], lo), hi)), r: 4, fill: COLOURS[i], stroke: "var(--surface-1)", "stroke-width": 2}));
});
const cross = el("line", {x1: 0, x2: 0, y1: MT, y2: H - MB, stroke: "var(--muted)", "stroke-width": 1, opacity: 0}); svg.appendChild(cross);
box.appendChild(svg);
const tip = document.createElement("div"); tip.className = "tip"; box.appendChild(tip);
const steps = [...new Set(row.series.flatMap(s => s.points.map(p => p[0])))].sort((a, b) => a - b);
svg.addEventListener("pointermove", ev => {
const r = svg.getBoundingClientRect(); const x = (ev.clientX - r.left) / r.width * W;
let best = steps[0], dist = Infinity;
for (const st of steps) { const dd = Math.abs(xOf(st, xmax) - x); if (dd < dist) { dist = dd; best = st; } }
cross.setAttribute("x1", xOf(best, xmax)); cross.setAttribute("x2", xOf(best, xmax)); cross.setAttribute("opacity", 0.8);
while (tip.firstChild) tip.removeChild(tip.firstChild);
const b = document.createElement("b"); b.textContent = "step " + best.toLocaleString(); tip.appendChild(b);
row.series.forEach(s => { const p = s.points.find(q => q[0] === best); if (!p) return; const line = document.createElement("div"); line.textContent = s.name + ": " + fmt(p[1]); tip.appendChild(line); });
tip.style.display = "block"; tip.style.left = Math.min(ev.clientX - r.left + 12, r.width - 170) + "px"; tip.style.top = (ev.clientY - r.top - 10) + "px";
});
svg.addEventListener("pointerleave", () => { tip.style.display = "none"; cross.setAttribute("opacity", 0); });
// table view
const tools = document.createElement("div"); tools.className = "tools";
const btn = document.createElement("button"); btn.textContent = "table"; tools.appendChild(btn); box.appendChild(tools);
const table = document.createElement("table"); table.className = "data"; table.hidden = true;
const thead = document.createElement("tr"); ["step", ...row.series.map(s => s.name)].forEach(t => { const th = document.createElement("th"); th.textContent = t; thead.appendChild(th); }); table.appendChild(thead);
for (const st of steps) { const tr = document.createElement("tr"); const td0 = document.createElement("td"); td0.textContent = st.toLocaleString(); tr.appendChild(td0); row.series.forEach(s => { const p = s.points.find(q => q[0] === st); const td = document.createElement("td"); td.textContent = p ? fmt(p[1]) : ""; tr.appendChild(td); }); table.appendChild(tr); }
box.appendChild(table);
btn.onclick = () => { table.hidden = !table.hidden; btn.textContent = table.hidden ? "table" : "hide table"; };
return box;
}
const n = DATA.MLP.length;
for (let i = 0; i < n; i++) {
const r = document.createElement("div"); r.className = "row";
for (const m of MODELS) r.appendChild(panel(DATA[m][i], m));
rows.appendChild(r);
}
})();
</script>