<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine-Learning on Can.ac</title><link>https://blog.can.ac/categories/machine-learning/</link><description>Recent content in Machine-Learning on Can.ac</description><generator>Hugo</generator><language>en-GB</language><lastBuildDate>Mon, 03 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.can.ac/categories/machine-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>The Minutiae of Tool-calling</title><link>https://blog.can.ac/2026/08/03/the-minutiae-of-tool-calling/</link><pubDate>Mon, 03 Aug 2026 00:00:00 +0000</pubDate><guid>https://blog.can.ac/2026/08/03/the-minutiae-of-tool-calling/</guid><description>&lt;p&gt;Two years ago I was hosting my own SMTP server and had a simple goal: receiving one-time codes + the occasional human email. But I kept running into two issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It was a PITA to extract the number/link in a generic way&lt;/li&gt;
&lt;li&gt;It kept receiving spam, being a wild-card inbox&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This was around the time GPT 3 came out, but we didn&amp;rsquo;t have structured output yet, let alone tool-calls, so I came up with this beautiful strategy:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;// Mail classifier.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;//
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;classifyMail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createPipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;&amp;#39;mail corpus&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;chance&lt;/span&gt;: &lt;span class="kt"&gt;z&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Chances of the email being important (password reset, verification etc.) and not filtered by the smart email filter.&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s1"&gt;&amp;#39;Promotional, scam-like, spammy, and advertising content should receive a 0 score.&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;linkOrCode&lt;/span&gt;: &lt;span class="kt"&gt;z.string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;optional&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Any important link or code&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;summary&lt;/span&gt;: &lt;span class="kt"&gt;z.string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Summary of the body&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;English&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ts" data-lang="ts"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="kr"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;createPipeline&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;Z&lt;/span&gt; &lt;span class="na"&gt;extends&lt;/span&gt; &lt;span class="na"&gt;z.ZodType&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;: &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt;: &lt;span class="kt"&gt;Z&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cfg?&lt;/span&gt;: &lt;span class="kt"&gt;GptConfig&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;lang&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;English&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;instruction&lt;/span&gt;: &lt;span class="kt"&gt;einstruction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;gpt-3.5-turbo&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;temperature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;top_p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cfg&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="kr"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;instruction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;optimizePrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;startsWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;gpt&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;User messages are &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Input is&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;einstruction&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; Reply with a JSON structured with schema&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lang&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="sb"&gt;` strictly in &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lang&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;createTypeSchema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; &amp;#34;&amp;#34;&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="sb"&gt; `&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;+ repairing JSON, stripping fences, etc., etc. Combine a bunch of these, and you end up with LangChain; which raised $10m despite being rendered obsolete within a few months &amp;amp; ofc pivoted since then, but I digress&lt;/p&gt;
&lt;p&gt;If you have not suffered through reinventing this stuff, chances are, you think tool calling is 👻 magic inference stuff 👻.&lt;/p&gt;
&lt;p&gt;This is OK, but as it goes with any engineering topic, my opinion is that if you don&amp;rsquo;t understand how the underlying layers work, you&amp;rsquo;re gonna run into issues. (duh no one would&amp;rsquo;ve guessed that coming from an RE guy).&lt;/p&gt;
&lt;p&gt;Let me first prove why it matters, and then we will ruin the magic.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x0-who-cares"&gt;&lt;span class="hx"&gt;0x0:&lt;/span&gt; Who Cares?&lt;/h2&gt;
&lt;p&gt;You are trapped in a room with Claude. There&amp;rsquo;s a keypad near him with two buttons. One shows how far he is from the right combination, other submits the combination. Two wrong guesses, you&amp;rsquo;re out.&lt;/p&gt;
&lt;p&gt;Unfortunately you&amp;rsquo;re tied and you&amp;rsquo;re gonna have to instruct Claude.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;compare_door_digit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secret_digit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;secret_digit&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;secret_digit&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;try_probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;Count one comparison and light up the position once it lands exactly.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;ROOM_DIGITS&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;invalid&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;compare_door_digit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_secret&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;position&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;submit_guess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="s2"&gt;&amp;#34;&amp;#34;&amp;#34;Consume one of two attempts for an exact-length digit-string code.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; Malformed guesses (wrong type, wrong length, non-digits) are rejected
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; without consuming an attempt, so a schema-violating placeholder such
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="s2"&gt; as `guess: 0` cannot burn the game.&amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;isinstance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;ROOM_DIGITS&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isdigit&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;invalid code: pass the full &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ROOM_DIGITS&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;-digit code as a string&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_secret&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_counters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;won&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;escaped room&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;_counters&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;guesses&amp;#34;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;failed to escape: two wrong guesses&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;wrong: one guess remaining&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;5 digits, 24 turns, optimal play is boring and obvious: binary-search all five positions in parallel (~17 comparisons), submit once. Any model can do this; a python REPL can do this, I know. Play along please.&lt;/p&gt;
&lt;p&gt;Here are five interfaces you could hand him:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-py" data-lang="py"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;Sign&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Literal&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# A. naive: one comparison per call&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;digit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Sign&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# B. batch: same thing, arrays&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Probe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TypedDict&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt; &lt;span class="n"&gt;digit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;probe_many&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;probes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Probe&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Sign&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# C. exec: &amp;#34;clever&amp;#34; packing: 27 means position 2, digit 7.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;probes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Sign&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# D. vector: try a full code, get a sign back per position, borderline cheating, but whatever.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;guess&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Sign&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt; &lt;span class="o"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# E. unicode: we give it no tools at all, ask it to reply in emoji 🔍2=7 to probe, 🔑01756 to submit&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Rank them. No seriously, actually commit to a ranking before you scroll, which one do you think wins? (efficiency &amp;amp; win-rate).&lt;/p&gt;
&lt;p&gt;If you ranked by how proper they look, or according to &amp;ldquo;le official prompting guide&amp;rdquo; you put E last. Let&amp;rsquo;s see.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x1-the-scoreboard"&gt;&lt;span class="hx"&gt;0x1:&lt;/span&gt; The Scoreboard&lt;/h2&gt;
&lt;p&gt;You can see the actual setup &lt;a href="https://i.can.ac/s/Mbxt5h"&gt;here&lt;/a&gt; so no cheating. Same system-prompt and all that, feel free to repro.&lt;/p&gt;
&lt;style&gt;
.toolcalling-scoreboard-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;toolcalling-scoreboard-20260803 class="viz-embed toolcalling-scoreboard-inline" model="gpt-oss-120b"&gt;&lt;/toolcalling-scoreboard-20260803&gt;
&lt;script src="../../toolcalling/scoreboard-20260803.js" defer&gt;&lt;/script&gt;
&lt;blockquote&gt;
&lt;p&gt;OK but Can, models got a lot better since then! This is a very weak model!!!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;style&gt;
.toolcalling-scoreboard-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;toolcalling-scoreboard-20260803 class="viz-embed toolcalling-scoreboard-inline" model="gpt-5.6-luna"&gt;&lt;/toolcalling-scoreboard-20260803&gt;
&lt;script src="../../toolcalling/scoreboard-20260803.js" defer&gt;&lt;/script&gt;
&lt;blockquote&gt;
&lt;p&gt;OK but Can, clearly parallel tool calls didn&amp;rsquo;t work here! Plus Luna is still not a frontier model! You cannot ask it to operate two tools!!!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;style&gt;
.toolcalling-scoreboard-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;toolcalling-scoreboard-20260803 class="viz-embed toolcalling-scoreboard-inline" model="opus 5"&gt;&lt;/toolcalling-scoreboard-20260803&gt;
&lt;script src="../../toolcalling/scoreboard-20260803.js" defer&gt;&lt;/script&gt;
&lt;p&gt;Now at this point, without prior knowledge, your reaction is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&amp;ldquo;Huh?&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Seeeee the frontier model can do binary search just fine!!! LGTM&amp;rdquo;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In which case I&amp;rsquo;d like to remind you:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Emoji still spent 2x less tokens&lt;/li&gt;
&lt;li&gt;If this was a real task, emoji one could have used a 100x cheaper model, matched you in wr%, and would be miles ahead in terms of speed &amp;amp; cost&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To explain any of this, we have to go a layer down.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x2-ruining-the-magic"&gt;&lt;span class="hx"&gt;0x2:&lt;/span&gt; Ruining the Magic&lt;/h2&gt;
&lt;p&gt;A language model computes one thing: given a sequence of tokens, a probability distribution over the next one. Run it in a loop and that&amp;rsquo;s autoregression. Forward pass ends in a logit per vocabulary entry; softmax =&amp;gt; probabilities; temperature flattens or sharpens; top-p chops the tail; sampler draws: 1 token.&lt;/p&gt;
&lt;p&gt;So here&amp;rsquo;s a phrase to delete from your vocabulary: &amp;ldquo;the model decided to call a tool.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s no such thing, in fact, there&amp;rsquo;s also no such thing as a user turn, assistant turn, system prompt, all your fancy concepts essentially end up being delimiters in a thread, passed to the completion loop.&lt;/p&gt;
&lt;p&gt;Claude never even receives your &lt;code&gt;tools&lt;/code&gt; array. For example, the &lt;code&gt;probe&lt;/code&gt; tool lands like this in harmony (OpenAI&amp;rsquo;s format), as a developer message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;# Tools
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;## functions
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;namespace functions {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;// Compare one digit guess against the secret door keypad digit
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;// at a 1-indexed position. Returns -1 too low, 0 exact, +1 too high.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;type probe = (_: {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;// keypad position, 1 through 5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;position: number,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;// digit guess, 0 through 9
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;digit: number,
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;}) =&amp;gt; any;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;} // namespace functions&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Your schema is documentation; validation happens in your code, maaaybe if the inference provider feels like it, they will validate it. Maaaybe they might push the inference engine towards outputting valid arguments.&lt;/p&gt;
&lt;p&gt;The descriptions you put in your schema, the mins, the maxes, you don&amp;rsquo;t even know if they will be displayed, let alone checked. Sorry!&lt;/p&gt;
&lt;p&gt;A &amp;ldquo;call&amp;rdquo; is the model outputting:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&amp;lt;function_calls&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;&amp;lt;invoke name=&amp;#34;bash&amp;#34;&amp;gt;&amp;lt;parameter name=&amp;#34;arg_name&amp;#34;&amp;gt;arg value&amp;lt;/parameter&amp;gt;&amp;lt;/invoke&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;&amp;lt;/function_calls&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Parallel tool calls? Multiple &lt;code&gt;&amp;lt;invoke&amp;gt;&lt;/code&gt; blocks inside the same &lt;code&gt;&amp;lt;function_calls&amp;gt;&lt;/code&gt; block. Not all that magical, is it?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you&amp;rsquo;re curious about the rest of the dialects, you can see the whole list of different ones &lt;a href="https://github.com/can1357/oh-my-pi/tree/main/packages/ai/src/dialect"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x3-lets-rank-again"&gt;&lt;span class="hx"&gt;0x3:&lt;/span&gt; Let&amp;rsquo;s Rank Again&lt;/h2&gt;
&lt;p&gt;Once you see the token stream, the scoreboard stops being mysterious.&lt;/p&gt;
&lt;h3 id="worst-naive"&gt;Worst: Naive&lt;/h3&gt;
&lt;p&gt;Arguably the kind of tool design most of the vibe-coded mcp&amp;rsquo;s go with, it can only be efficient with parallel-tool calls and has lots of room for failure.&lt;/p&gt;
&lt;h3 id="ok-batch--exec"&gt;OK: Batch | Exec&lt;/h3&gt;
&lt;p&gt;One step further, designed by someone who cares; see: Pi&amp;rsquo;s edit tool. But unlike the prior one, it now requires the model to emit JSON. (huh what why?)&lt;/p&gt;
&lt;p&gt;Well my friend, you should know this now! See, for each &lt;code&gt;&amp;lt;parameter&amp;gt;&lt;/code&gt; block, if the argument is a primitive, the model can just output the plain value afterwards. The delimiter &lt;code&gt;&amp;lt;/parameter&amp;gt;&lt;/code&gt; is a special token, so no need to worry about escaping!&lt;/p&gt;
&lt;p&gt;But if it&amp;rsquo;s a complex object or an array? Well, it now has to emit a valid JSON escaped value, which needs to be parsed back, or a tool calling error happens! Funny enough, for the frontier models, this one will perform the worst, as parallel-tool calls will lift up the naive one.&lt;/p&gt;
&lt;h3 id="best-vector"&gt;Best: Vector&lt;/h3&gt;
&lt;p&gt;This is again a step further, now it&amp;rsquo;s a flat parameter set! It also forces the model into making at least 5 comparisons for each round. This is arguably the best kind of design you could come up with, given the problem statement we started with. The &lt;code&gt;guess&lt;/code&gt; function being a separate thing is one drawback, but I kinda forced your hand.&lt;/p&gt;
&lt;p&gt;It still has the usual failure modes though. For instance, sampling errors that lead to calls like &lt;code&gt;to=functions.check.commentary (json.Xna 天天送钱 code 】&lt;/code&gt;, or models not emitting any calls.&lt;/p&gt;
&lt;h3 id="winner-chad-"&gt;Winner: Chad 😎&lt;/h3&gt;
&lt;p&gt;No nesting, no special tokens, very easy to parse, and &lt;code&gt;🔍2=7&lt;/code&gt; almost has no room for failure. Maybe some model will emit &lt;code&gt;2-&amp;gt;7&lt;/code&gt;, but you can easily correct. They can put garbage before, after, you don&amp;rsquo;t care.&lt;/p&gt;
&lt;p&gt;This was very very obvious, hopefully, it is to you now as well.&lt;/p&gt;
&lt;p&gt;Rule of thumb: reliability degrades with &lt;strong&gt;nesting x heterogeneity × cleverness&lt;/strong&gt;, and you &lt;strong&gt;NEED&lt;/strong&gt; the harness to handle the common failure modes of the dialect. I&amp;rsquo;m sorry, real-life isn&amp;rsquo;t pretty!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x4-wontfix"&gt;&lt;span class="hx"&gt;0x4:&lt;/span&gt; #wontfix&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;OK but Can, labs RL these models on millions of agent trajectories now! Native tool calls ARE the trained path!!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Largely true, post-training genuinely shoves probability mass toward the tool channel, but:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;exec is still 7/10 on luna.&lt;/strong&gt; RL teaches the shapes RL practiced: flat args, boring schemas. Your clever packing doesn&amp;rsquo;t inherit that reliability; it&amp;rsquo;s off-distribution for the tool-RL exactly like it was for the base model.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;it didn&amp;rsquo;t hit zero.&lt;/strong&gt; Opus still dropped a room to a call-free reply (batch, 9/10). Reliability is rate × exposure, and real agents run thousands of turns, not 24. A per-turn failure rate too small to see in this demo is still a certainty at scale.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;the meter doesn&amp;rsquo;t care.&lt;/strong&gt; Opus matched E&amp;rsquo;s 10/10 but still paid 2-3x its token bill. You still wasted a lot of envelope tokens.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;you needed the frontier.&lt;/strong&gt; Hopefully self-explanatory, but, do you really need opus for this trivial task? If you do, isn&amp;rsquo;t it your failure as the designer?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;They&amp;rsquo;re your protocol&amp;rsquo;s shortcomings, they collect rent every single turn: needing a smarter model, more tool call failures, more verbose output&amp;hellip;&lt;/p&gt;
&lt;p&gt;No, I&amp;rsquo;m not telling you to ship emoji. The moment you have 10 tools instead of 2, native tool-calls win on ergonomics alone and I use it like everyone else. The point is that you now know why E obviously won.&lt;/p&gt;
&lt;p&gt;You also know how to design tools that will try their best, just like D did; as well as why the minimal harness is not what you want. Assistant leaked the function call into its output text? Now, you have to deal with that, hf!&lt;/p&gt;
&lt;p&gt;The models may have gotten smarter, but they do not think about all these things when you ask them to &amp;ldquo;add a tool for X&amp;rdquo;, or &amp;ldquo;make me an agent loop&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;It is in fact your responsibility to get the most out of a model: making it work with the smallest model, adding as many guardrails as possible, maximizing reliability across different families of models.&lt;/p&gt;
&lt;p&gt;You shouldn&amp;rsquo;t file a bug with the provider when you see &lt;code&gt;to=functions.check.commentary (json.Xna 天天送钱 code&lt;/code&gt;, and go to lunch. There is no fix coming!&lt;/p&gt;
&lt;p&gt;Two years later, I&amp;rsquo;m still doing the same thing I did with my mailbox: babying the model into actually doing the thing &amp;amp; designing the thinnest grammar I can get away with in between.&lt;/p&gt;</description></item><item><title>Snapcompact: SoTA Compaction — Instant, Local, Free. Pick 3</title><link>https://blog.can.ac/2026/06/10/snapcompact/</link><pubDate>Wed, 10 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.can.ac/2026/06/10/snapcompact/</guid><description>&lt;p&gt;A 1568×1568 PNG fits about 40,000 characters of text in a 6×10 pixel font. That&amp;rsquo;s ~10,000 tokens worth of text, billed by Anthropic&amp;rsquo;s pixel formula as 3,279 image tokens. Do you see where I&amp;rsquo;m going with this?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Snapcompact&lt;/strong&gt;: when the context window fills up, render it into dense pixel-font bitmaps and hand those back as images. &amp;ldquo;A picture is worth a thousand words&amp;rdquo; turns out to be quite literally true — the model reads it back near-verbatim, at a third of the input price. Obligatory benchmark:&lt;/p&gt;
&lt;style&gt;
.snapcompact-price-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;snapcompact-price-20260610 class="viz-embed snapcompact-price-inline"&gt;&lt;/snapcompact-price-20260610&gt;
&lt;script src="../../snapcompact/price/price-20260610.js" defer&gt;&lt;/script&gt;
&lt;p&gt;This started as a joke (&amp;ldquo;free token glitch lol&amp;rdquo;). Then I benchmarked it, identified where it went wrong, cracked open Qwen&amp;rsquo;s attention layer, fixed the issues, benchmarked it again — and here I am writing it up, because it generalized remarkably well to frontier models.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x0-the-case-against-compaction"&gt;&lt;span class="hx"&gt;0x0:&lt;/span&gt; The Case Against Compaction&lt;/h2&gt;
&lt;p&gt;I am not a big fan of compaction. In every single harness, including my own, I&amp;rsquo;ve always felt like it &amp;ldquo;crippled&amp;rdquo; the model to the point where you would have been better off with a completely new session.&lt;/p&gt;
&lt;p&gt;Eliding tool results is an okay alternative — instant, deterministic — but sometimes not really sufficient. It also occasionally confuses the model about tool calling. LLMs complete stories; if half of your story is &lt;code&gt;[elided...]&lt;/code&gt;, how confident do you think it will be about using them?&lt;/p&gt;
&lt;p&gt;Handoffs are as good as it gets — but unlike a plan, you don&amp;rsquo;t usually steer the handoffs, and when you don&amp;rsquo;t, agents waste precious context writing an unnecessarily detailed diary, followed by a TODO list that practically begs the next agent to declare the goal impossible and ship an &amp;ldquo;MVP&amp;rdquo; instead.&lt;/p&gt;
&lt;p&gt;My thinking was essentially that if you need compaction often, you&amp;rsquo;re doing something wrong: the plan either has scope creep, or should have been explicitly orchestrated via subagents so that the main agent could stay responsible for the entire scope.&lt;/p&gt;
&lt;p&gt;However, spoiled by the 1M context window, these days I often hit the 500k mark by the end of a session — a mortal sin in my book a few months ago. But long-horizon tasks do better when one coherent agent drives the plan uninterrupted, and that easily reaches those levels even with aggressive delegation.&lt;/p&gt;
&lt;p&gt;So there I was, staring at the 5h usage limit bar going red while this thing grinned back at me, thinking: maybe I should compact regularly&amp;hellip;&lt;/p&gt;
&lt;figure class="aligncenter"&gt;&lt;img src="../../2026/06/10/snapcompact/grin.webp" width="50%"&gt;
&lt;/figure&gt;
&lt;p&gt;Fine. But if I have to compact, it&amp;rsquo;s going to lose nothing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x1-a-stupid-experiment"&gt;&lt;span class="hx"&gt;0x1:&lt;/span&gt; A Stupid Experiment&lt;/h2&gt;
&lt;p&gt;It began with a 328KB session log and a simple question: what if I just printed this thing out and started the session with it?&lt;/p&gt;
&lt;p&gt;Attempt one was maximally greedy: &lt;a href="https://robey.lag.net/2010/01/23/tiny-monospace-font.html"&gt;Tom Thumb&lt;/a&gt;, a 3×5 pixel font, 122,696 characters in a single image.&lt;/p&gt;
&lt;p&gt;I sent it to a fresh agent session, zero explanation, and got back:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The image appears to be pure noise with random pixels, which suggests it might be corrupted or a file that&amp;rsquo;s been misnamed as PNG.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Fair. Attempt two used the X11 &lt;code&gt;6x10&lt;/code&gt; font (glyphs actually designed for that cell size), 40,716 characters, with each text row cycling through six colors. Same model, and there it was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It identified the session&amp;rsquo;s topic and &lt;strong&gt;quoted me back verbatim&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It named 18 identifiers from the log with 100% recall.&lt;/li&gt;
&lt;li&gt;Asked about a single assignment in the bottom-most row of the image, where the log cuts off, it hedged (&amp;ldquo;I&amp;rsquo;d be guessing — possibly &lt;code&gt;0&lt;/code&gt;&amp;rdquo;) — and guessed the state right.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;10k tokens of text, carried by 3,279 image tokens, recalled with near-perfect precision. Okay. Now I&amp;rsquo;m invested.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x2-optimizing-the-fonts"&gt;&lt;span class="hx"&gt;0x2:&lt;/span&gt; Optimizing the Fonts&lt;/h2&gt;
&lt;p&gt;How small can the font go? I swept some font configurations and asked the model to transcribe fixed regions, scoring edit similarity against ground truth:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;font&lt;/th&gt;
&lt;th style="text-align: right"&gt;px²/char&lt;/th&gt;
&lt;th style="text-align: right"&gt;chars/image&lt;/th&gt;
&lt;th style="text-align: right"&gt;transcription&lt;/th&gt;
&lt;th style="text-align: right"&gt;identifiers read&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;8×13&lt;/td&gt;
&lt;td style="text-align: right"&gt;104&lt;/td&gt;
&lt;td style="text-align: right"&gt;23,520&lt;/td&gt;
&lt;td style="text-align: right"&gt;1.00&lt;/td&gt;
&lt;td style="text-align: right"&gt;20/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6×10&lt;/td&gt;
&lt;td style="text-align: right"&gt;60&lt;/td&gt;
&lt;td style="text-align: right"&gt;40,716&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.79&lt;/td&gt;
&lt;td style="text-align: right"&gt;20/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5×8&lt;/td&gt;
&lt;td style="text-align: right"&gt;40&lt;/td&gt;
&lt;td style="text-align: right"&gt;61,348&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.37&lt;/td&gt;
&lt;td style="text-align: right"&gt;17/19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5×7&lt;/td&gt;
&lt;td style="text-align: right"&gt;35&lt;/td&gt;
&lt;td style="text-align: right"&gt;70,112&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.30&lt;/td&gt;
&lt;td style="text-align: right"&gt;10/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4×6&lt;/td&gt;
&lt;td style="text-align: right"&gt;24&lt;/td&gt;
&lt;td style="text-align: right"&gt;102,312&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.02&lt;/td&gt;
&lt;td style="text-align: right"&gt;9/20&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The cliff is sharp and it sits around &lt;strong&gt;35–40 px² per character&lt;/strong&gt;. Above it, exact transcription degrades but &lt;em&gt;identifier-level&lt;/em&gt; recall stays weirdly strong: the model can&amp;rsquo;t reproduce every byte, but it reads the names. Below it, nothing.&lt;/p&gt;
&lt;p&gt;The funny thing is, this section was worse than useless — this exact optimization comes back to bite us in a bit.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x3-thinking"&gt;&lt;span class="hx"&gt;0x3:&lt;/span&gt; Thinking&amp;hellip;&lt;/h2&gt;
&lt;p&gt;Anecdotes about my own log don&amp;rsquo;t generalize, so let&amp;rsquo;s get a proper benchmark: SQuAD v1.1, extractive questions with gold answers. The harness packs passages into chunks sized to each technique&amp;rsquo;s carrying capacity, samples 30 questions per chunk spread evenly (so answers land at every image row, top to bottom), and runs every technique over the same corpus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;text&lt;/strong&gt; — the corpus passed verbatim; the ceiling,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;handoff&lt;/strong&gt; — a simple handoff prompt,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;compact&lt;/strong&gt; — provider-side compaction where available, a summarization call otherwise,&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;img-{font}-{variant}&lt;/strong&gt; — snapcompact, where the variant is &lt;strong&gt;bw&lt;/strong&gt; (plain black-on-white) or &lt;strong&gt;sent&lt;/strong&gt; (glyph ink cycles color per sentence).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Scores are SQuAD F1; models are told to answer UNREADABLE when they can&amp;rsquo;t extract the fact.&lt;/p&gt;
&lt;style&gt;
.snapcompact-formats-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;snapcompact-formats-20260610 class="viz-embed snapcompact-formats-inline"&gt;&lt;/snapcompact-formats-20260610&gt;
&lt;script src="../../snapcompact/formats/formats-20260610.js" defer&gt;&lt;/script&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;technique&lt;/th&gt;
&lt;th style="text-align: right"&gt;fable-5&lt;/th&gt;
&lt;th style="text-align: right"&gt;opus-4.8&lt;/th&gt;
&lt;th style="text-align: right"&gt;gpt-5.5&lt;/th&gt;
&lt;th style="text-align: right"&gt;gemini-3.5-flash&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;text (ceiling)&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.904&lt;br&gt;$0.4984&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.911&lt;br&gt;$0.6367&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.861&lt;br&gt;$0.0847&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.898&lt;br&gt;$0.0577&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;handoff&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.540&lt;br&gt;$1.2241&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.248&lt;br&gt;$1.0065&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.368&lt;br&gt;$0.2386&lt;/td&gt;
&lt;td style="text-align: right"&gt;&lt;strong&gt;0.889&lt;/strong&gt;&lt;br&gt;$0.1759&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;compact&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.406&lt;br&gt;$0.9427&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.000&lt;br&gt;$0.7576&lt;/td&gt;
&lt;td style="text-align: right"&gt;&lt;strong&gt;0.896&lt;/strong&gt;&lt;br&gt;$0.3393&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.000&lt;br&gt;$0.0420&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-6×10-sent&lt;/td&gt;
&lt;td style="text-align: right"&gt;&lt;strong&gt;0.882&lt;/strong&gt;&lt;br&gt;$0.6400&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.601&lt;br&gt;$0.2430&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.822&lt;br&gt;$0.2452&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.805&lt;br&gt;$0.0970&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-6×10-bw&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.856&lt;br&gt;$0.7568&lt;/td&gt;
&lt;td style="text-align: right"&gt;&lt;strong&gt;0.652&lt;/strong&gt;&lt;br&gt;$0.2369&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.792&lt;br&gt;$0.3026&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.767&lt;br&gt;$0.1135&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-5×8-sent&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.773&lt;br&gt;$0.4532&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.409&lt;br&gt;$0.1626&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.751&lt;br&gt;$0.1819&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.738&lt;br&gt;$0.1006&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-5×8-bw&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.830&lt;br&gt;$0.6866&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.425&lt;br&gt;$0.1619&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.778&lt;br&gt;$0.2359&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.674&lt;br&gt;$0.0941&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For a first attempt not bad&amp;hellip; wait, muh token savings, how is this more expensive? Let&amp;rsquo;s have a look at this other table.&lt;/p&gt;
&lt;h3 id="tokens-inputoutputthinking"&gt;Tokens: input/output/thinking&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;technique&lt;/th&gt;
&lt;th style="text-align: right"&gt;fable-5&lt;/th&gt;
&lt;th style="text-align: right"&gt;opus-4.8&lt;/th&gt;
&lt;th style="text-align: right"&gt;gpt-5.5&lt;/th&gt;
&lt;th style="text-align: right"&gt;gemini-3.5-flash&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;text (ceiling)&lt;/td&gt;
&lt;td style="text-align: right"&gt;37,793 / 2,410 / 1,435&lt;/td&gt;
&lt;td style="text-align: right"&gt;37,793 / 931 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;17,761 / 2,998 / 2,298&lt;/td&gt;
&lt;td style="text-align: right"&gt;24,535 / 10,745 / 9,983&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;handoff&lt;/td&gt;
&lt;td style="text-align: right"&gt;49,363 / 14,609 / 3,717&lt;/td&gt;
&lt;td style="text-align: right"&gt;43,237 / 4,773 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;25,032 / 11,710 / 4,835&lt;/td&gt;
&lt;td style="text-align: right"&gt;49,387 / 36,577 / 11,959&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;compact&lt;/td&gt;
&lt;td style="text-align: right"&gt;45,130 / 9,828 / 3,248&lt;/td&gt;
&lt;td style="text-align: right"&gt;40,436 / 2,014 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;45,562 / 15,329 / 1,032&lt;/td&gt;
&lt;td style="text-align: right"&gt;26,151 / 6,582 / 5,422&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-6×10-sent&lt;/td&gt;
&lt;td style="text-align: right"&gt;11,816 / 10,437 / 9,483&lt;/td&gt;
&lt;td style="text-align: right"&gt;11,816 / 877 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;10,188 / 14,049 / 13,368&lt;/td&gt;
&lt;td style="text-align: right"&gt;4,991 / 23,491 / 22,764&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-6×10-bw&lt;/td&gt;
&lt;td style="text-align: right"&gt;11,816 / 12,772 / 11,782&lt;/td&gt;
&lt;td style="text-align: right"&gt;11,816 / 796 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;10,188 / 17,639 / 16,958&lt;/td&gt;
&lt;td style="text-align: right"&gt;4,991 / 27,616 / 26,879&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-5×8-sent&lt;/td&gt;
&lt;td style="text-align: right"&gt;7,955 / 7,474 / 6,897&lt;/td&gt;
&lt;td style="text-align: right"&gt;7,955 / 577 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;4,519 / 10,773 / 10,336&lt;/td&gt;
&lt;td style="text-align: right"&gt;3,355 / 24,659 / 24,196&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;img-5×8-bw&lt;/td&gt;
&lt;td style="text-align: right"&gt;7,955 / 12,141 / 11,559&lt;/td&gt;
&lt;td style="text-align: right"&gt;7,955 / 568 / 0&lt;/td&gt;
&lt;td style="text-align: right"&gt;6,823 / 13,892 / 13,463&lt;/td&gt;
&lt;td style="text-align: right"&gt;3,355 / 23,014 / 22,542&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;A few conclusions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It does work: on fable, 0.86–0.96 F1 across every corpus length I tested, carrying the same information for a third of the input price. Amazing.&lt;/li&gt;
&lt;li&gt;The input savings aren&amp;rsquo;t free: models decode dense images by &lt;em&gt;reasoning&lt;/em&gt; about them, and that thinking costs ~5× the output tokens of the text condition (in this example).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At Anthropic&amp;rsquo;s output pricing the decode tax can eat the input savings in a single pass. This is a nitpick at 40k tokens — (a) nobody compacts at that range, (b) the decode happens once, not every turn — but still: suboptimal.&lt;/p&gt;
&lt;p&gt;The baselines mostly confirm why this is worth doing at all. Prose compaction is a fact shredder: on compacted context, Gemini answered UNREADABLE &lt;strong&gt;240 times out of 240&lt;/strong&gt;, Opus 209 — the summaries preserve what you were &lt;em&gt;doing&lt;/em&gt;, not what you &lt;em&gt;knew&lt;/em&gt;. Two exceptions: OpenAI&amp;rsquo;s opaque server-side compaction retains nearly everything (but they might just be skipping it, who knows?), and Gemini&amp;rsquo;s handoff documents disobey the prompt&amp;rsquo;s spirit and write down the trivia, lol.&lt;/p&gt;
&lt;p&gt;Anyhow — whether the technique works is an empirical property of each model&amp;rsquo;s vision stack, and you have to test it. So now we&amp;rsquo;re gonna have to learn how the vision stack actually works.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x4-two-carriers-one-state"&gt;&lt;span class="hx"&gt;0x4:&lt;/span&gt; Two Carriers, One State&lt;/h2&gt;
&lt;p&gt;The stronger claim, the one that makes snapcompact a memory format instead of a party trick, is that the model &lt;em&gt;thinks&lt;/em&gt; the same with either carrier. We know it reads the image; the question is whether the internal result is text-shaped.&lt;/p&gt;
&lt;p&gt;Setup, on a local Qwen2.5-VL-7B-Instruct: take one SQuAD chunk and twelve questions over it. Run each question twice: once with the chunk as plain text in the prompt, once with the chunk as a 1568² bitmap — and capture the hidden state at the &lt;strong&gt;last prompt token&lt;/strong&gt;, the model&amp;rsquo;s &amp;ldquo;about to answer&amp;rdquo; summary, at every decoder layer.&lt;/p&gt;
&lt;p&gt;Raw states look similar for boring reasons (same template, same model), so the comparison subtracts each carrier&amp;rsquo;s per-layer mean — anything that survives centering is content, not carrier. Then three measurements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Matched pairs&lt;/strong&gt; (same question, text ↔ image): cosine &lt;strong&gt;0.66&lt;/strong&gt; at layer 19. &lt;strong&gt;Mismatched pairs&lt;/strong&gt; (different questions): &lt;strong&gt;−0.06&lt;/strong&gt;. The state encodes &lt;em&gt;which question against which content&lt;/em&gt;, not which input format.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cross-carrier retrieval&lt;/strong&gt;: for every text run, find the nearest image run. From layer 2 onward it&amp;rsquo;s the same question &lt;strong&gt;12 out of 12 times&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Representational geometry&lt;/strong&gt;: the 12×12 question-similarity matrix computed inside the text carrier correlates with the image carrier&amp;rsquo;s at &lt;strong&gt;r = 0.94&lt;/strong&gt; by layer 1, settling to &lt;strong&gt;0.85&lt;/strong&gt; at the final layer. The two carriers print the same relational structure almost immediately; what deepens with depth is the per-question state fusion.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Behaviorally, both carriers generate the same answers. That&amp;rsquo;s the property the pricing math cashes in on: the PNG isn&amp;rsquo;t a picture &lt;em&gt;of&lt;/em&gt; your context — it converges to &lt;em&gt;being&lt;/em&gt; your context.&lt;/p&gt;
&lt;p&gt;If pixels become text inside the model, you can ask &lt;em&gt;where&lt;/em&gt;. The instrument is a logit lens: at every layer, take the hidden state of the visual token covering the answer word, push it through the final RMSNorm and the LM head, and check the top-1 vocabulary entry. &lt;strong&gt;Lock-on&lt;/strong&gt; is the first layer whose top-1 is a BPE piece of the answer.&lt;/p&gt;
&lt;style&gt;
.snapcompact-lockon-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;snapcompact-lockon-20260610 class="viz-embed snapcompact-lockon-inline"&gt;&lt;/snapcompact-lockon-20260610&gt;
&lt;script src="../../snapcompact/lockon/lockon-20260610.js" defer&gt;&lt;/script&gt;
&lt;p&gt;For the baseline 8×13 rendering, the patch containing the tail of &amp;ldquo;spectacular&amp;rdquo; decodes as CJK noise for seventeen layers, passes through &lt;em&gt;letter-shaped&lt;/em&gt; noise around L18 (&lt;code&gt;ALLERY&lt;/code&gt;, &lt;code&gt;IGHL&lt;/code&gt; — strokes assembling into orthography), and flips to &lt;code&gt;acular&lt;/code&gt; at &lt;strong&gt;L24&lt;/strong&gt;, climbing to p=0.39 by the last layer.&lt;/p&gt;
&lt;p&gt;This matters because layers before lock-on are spent turning pixels into words, and layers after are free to work with them. So I decided to be a simpleton. Attention accumulates evidence, yes? Repeat the lines, and the read should get stronger?&lt;/p&gt;
&lt;p&gt;Another thing that&amp;rsquo;s very obvious once you know how the vision tokens work — Qwen slices the image into 28×28-pixel windows, one visual token each — is that the font size we picked at the beginning of this article, purely by yolo, won&amp;rsquo;t fly. At 6×10, every token window holds fragments of ~13 glyphs smeared across three text rows.&lt;/p&gt;
&lt;p&gt;Less overlapping garbage in a token&amp;rsquo;s window: less thinking required. Simple.&lt;/p&gt;
&lt;style&gt;
.snapcompact-materialize-inline {
max-width: 760px;
}
&lt;/style&gt;
&lt;snapcompact-materialize-20260610 class="viz-embed snapcompact-materialize-inline"&gt;&lt;/snapcompact-materialize-20260610&gt;
&lt;script src="../../snapcompact/materialize/materialize-20260610.js" defer&gt;&lt;/script&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;condition&lt;/th&gt;
&lt;th style="text-align: right"&gt;lock-on&lt;/th&gt;
&lt;th style="text-align: right"&gt;peak p(answer)&lt;/th&gt;
&lt;th style="text-align: right"&gt;chars/visual token&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;base 8×13&lt;/td&gt;
&lt;td style="text-align: right"&gt;L24&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.39&lt;/td&gt;
&lt;td style="text-align: right"&gt;7.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;repeat lines ×2, colored&lt;/td&gt;
&lt;td style="text-align: right"&gt;L23&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.94&lt;/td&gt;
&lt;td style="text-align: right"&gt;3.75&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aligned, 4×2 chars/token&lt;/td&gt;
&lt;td style="text-align: right"&gt;L24&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.74&lt;/td&gt;
&lt;td style="text-align: right"&gt;8.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aligned, 2×1 chars/token&lt;/td&gt;
&lt;td style="text-align: right"&gt;L23&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.99&lt;/td&gt;
&lt;td style="text-align: right"&gt;2.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aligned, 1 char/token&lt;/td&gt;
&lt;td style="text-align: right"&gt;L22&lt;/td&gt;
&lt;td style="text-align: right"&gt;0.99&lt;/td&gt;
&lt;td style="text-align: right"&gt;1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aligned + repeated&lt;/td&gt;
&lt;td style="text-align: right"&gt;L23&lt;/td&gt;
&lt;td style="text-align: right"&gt;&lt;strong&gt;1.00&lt;/strong&gt;&lt;/td&gt;
&lt;td style="text-align: right"&gt;1.0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The depth refused to move (significantly): L24 to L22, best case. That&amp;rsquo;s consistent with the OCR-routing literature &lt;a href="https://arxiv.org/abs/2602.22918"&gt;where vision becomes text is an architectural property&lt;/a&gt;. But the &lt;em&gt;confidence&lt;/em&gt; is fully controllable: line repetition alone took the decode from 0.39 to 0.94 while still carrying 3.75 chars per visual token. The format can&amp;rsquo;t make the model read sooner; it can make the reading unambiguous. Grug model not think much.&lt;/p&gt;
&lt;p&gt;Now at this point, while doing lit review, I noticed this is not really a new idea: &lt;a href="https://arxiv.org/abs/2510.18234"&gt;DeepSeek-OCR&lt;/a&gt; trained a custom encoder for optical context compression, and &lt;a href="https://x.com/karpathy/status/1980397031542989305"&gt;Karpathy riffed&lt;/a&gt; on pixels maybe beating tokens as an input medium.&lt;/p&gt;
&lt;p&gt;In the agent-harness context, though, it seems like people saw the amount of thinking being wasted and called it a day. But would you look at that? The grug-brain optimization we made for Qwen generalizes remarkably well to frontier models!&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Dense-text bitmaps as context carriers, carefully adjusted, do very well.&lt;/strong&gt; Synthetic pixel-font renderings at the legibility floor, benchmarked — billing formulas, silent downscales, and adaptive-thinking costs included — against the compaction strategies agents actually ship. Go team PNG!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lock-on you can drive to certainty on a 7B open model.&lt;/strong&gt; From p=0.39 to p=1.00 with such a small change is significant. Yes, repetition doubles the pixel area — we could have had much more significant savings than a &lt;em&gt;mere&lt;/em&gt; ~3× — but that&amp;rsquo;s still cheaper than text, now with near-perfect recall. Hell, return tool results as PNGs if you want.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here it is, running live in the harness:&lt;/p&gt;
&lt;p&gt;&lt;video src="demo.webm" controls autoplay muted playsinline loop preload="metadata" width="100%"&gt;&lt;/video&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;The harness wins again: nothing about the models changed; we changed the context around them.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Eval harness, font renderer, per-question records, white-box probes: &lt;a href="https://github.com/can1357/oh-my-pi/tree/master/packages/snapcompact/research"&gt;omp&lt;/a&gt; — &lt;code&gt;uv run final.py&lt;/code&gt; reproduces the API grid (~$35 cold, free from cache after); the representation runs need a local GPU with Qwen2.5-VL-7B.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Coming very soon to &lt;a href="https://omp.sh"&gt;oh-my-pi&lt;/a&gt;!&lt;/p&gt;</description></item><item><title>I Improved 15 LLMs at Coding in One Afternoon. Only the Harness Changed.</title><link>https://blog.can.ac/2026/02/12/the-harness-problem/</link><pubDate>Thu, 12 Feb 2026 00:00:00 +0000</pubDate><guid>https://blog.can.ac/2026/02/12/the-harness-problem/</guid><description>&lt;aside class="crosspost"&gt;
&lt;svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" aria-hidden="true"&gt;&lt;path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/&gt;&lt;/svg&gt;
&lt;span&gt;Cross-posted from &lt;a href="https://x.com/_can1357/status/2021828033640911196" target="_blank" rel="noopener"&gt;X / @_can1357&lt;/a&gt;&lt;/span&gt;
&lt;/aside&gt;
&lt;p&gt;In fact only the edit tool changed. That&amp;rsquo;s it.&lt;/p&gt;
&lt;style&gt;
.benchmark-inline {
max-width: 900px;
}
&lt;/style&gt;
&lt;benchmark-embed class="viz-embed benchmark-inline"&gt;&lt;/benchmark-embed&gt;
&lt;script src="../../benchmark/benchmark_v2.js" defer&gt;&lt;/script&gt;
&lt;hr&gt;
&lt;h2 id="0x0-the-wrong-question"&gt;&lt;span class="hx"&gt;0x0:&lt;/span&gt; The Wrong Question&lt;/h2&gt;
&lt;p&gt;The conversation right now is almost entirely about which model is best at coding, GPT-5.3 or Opus. Gemini vs whatever dropped this week. This framing is increasingly misleading because it treats the model as the only variable that matters, when in reality one of the bottlenecks is something much more mundane: &lt;strong&gt;the harness.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Not only is it where you capture the first impression of the user (is it uncontrollably scrolling, or smooth as butter?), it is also the source of every input token, and the interface between their output and every change made to your workspace.&lt;/p&gt;
&lt;p&gt;I maintain a little &amp;ldquo;hobby harness&amp;rdquo;, &lt;a href="https://github.com/can1357/oh-my-pi"&gt;oh-my-pi&lt;/a&gt;, a fork of &lt;a href="https://github.com/badlogic/pi-mono"&gt;Pi&lt;/a&gt;, a wonderful open-source coding agent by Mario Zechner. I&amp;rsquo;ve so far authored ~1,300 commits, mostly playing around and making incremental improvements here and there when I see a pain point, (&lt;del&gt;or autism strikes and I see an opportunity to embed more Rust via N-API because &amp;ldquo;spawning rg feels wrong&amp;rdquo;&lt;/del&gt;).&lt;/p&gt;
&lt;p&gt;Why bother, you ask? Opus may be a great model, but Claude Code to this day leaks raw JSONL from sub-agent outputs, wasting hundreds of thousands of tokens. I get to say, &amp;ldquo;fuck it, subagents output structured data now&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;Tool schemas, error messages, state management, everything between &amp;ldquo;the model knows what to change&amp;rdquo; and &amp;ldquo;the issue is resolved.&amp;rdquo; This is where most failures happen in practice.&lt;/p&gt;
&lt;p&gt;Being model agnostic, it is a great testing ground, as the model is but a parameter. The real variable is the harness, where you have unimaginable control over.&lt;/p&gt;
&lt;p&gt;Anyhow, let me tell you about this one &lt;em&gt;variable&lt;/em&gt; I changed yesterday.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x1-edit-tool"&gt;&lt;span class="hx"&gt;0x1:&lt;/span&gt; Edit Tool!&lt;/h2&gt;
&lt;p&gt;Before I explain what I built, it&amp;rsquo;s worth understanding the state of the art.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Codex uses &lt;code&gt;apply_patch&lt;/code&gt;&lt;/strong&gt;: It takes a string as input, which is essentially an OpenAI-flavored diff, and instead of relying on a structured schema, the harness just expects this blob to follow a strict set of rules. Since OpenAI folks are without a doubt smart, I&amp;rsquo;m sure the token selection process is biased to fit this structure at the LLM gateway for the Codex variants of GPT, similar to how other constraints like JSON schemas or required tool calls work.&lt;/p&gt;
&lt;p&gt;But give this to any other model, completely unaware of it? Patch failures go through the roof. Grok 4&amp;rsquo;s patch failure rate in my benchmark was &lt;strong&gt;50.7%&lt;/strong&gt;, GLM-4.7&amp;rsquo;s was &lt;strong&gt;46.2%&lt;/strong&gt;. These aren&amp;rsquo;t bad models — they just don&amp;rsquo;t speak the language.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Claude Code (and most others) use &lt;code&gt;str_replace&lt;/code&gt;&lt;/strong&gt;: find the &lt;strong&gt;exact&lt;/strong&gt; old text, swap in the new text. Very simple to think about. But the model must reproduce every character perfectly, including whitespace and indentation. Multiple matches? Rejected. The &amp;ldquo;String to replace not found in file&amp;rdquo; error is so common it has &lt;a href="https://github.com/anthropics/claude-code/issues/3471"&gt;its own GitHub issues megathread&lt;/a&gt; (+27 other issues). Not exactly optimal. Gemini does essentially the same thing plus some fuzzy whitespace matching.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cursor trained a separate neural network&lt;/strong&gt;: a fine-tuned 70B model whose entire job is to take a draft edit and merge it into the file correctly. The harness problem is so hard that one of the most well-funded AI companies decided to throw another model at it, and even then they mention in their &lt;a href="https://cursor.com/blog/instant-apply"&gt;own blog post&lt;/a&gt; that &amp;ldquo;fully rewriting the full file outperforms aider-like diffs for files under 400 lines.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aider&amp;rsquo;s &lt;a href="https://aider.chat/docs/benchmarks.html"&gt;own benchmarks&lt;/a&gt;&lt;/strong&gt; show that format choice alone swung GPT-4 Turbo from 26% to 59%, but GPT-3.5 scored only 19% with the same format because it couldn&amp;rsquo;t reliably produce valid diffs. The format matters as much as the model.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://arxiv.org/abs/2510.12487"&gt;Diff-XYZ benchmark&lt;/a&gt; from JetBrains confirmed it systematically: no single edit format dominates across models and use cases. &lt;a href="https://arxiv.org/abs/2511.04486"&gt;EDIT-Bench&lt;/a&gt; found that only one model achieves over 60% pass@1 on realistic editing tasks.&lt;/p&gt;
&lt;p&gt;As you can see, there is no real consensus on the &amp;ldquo;best solution&amp;rdquo; to the simple &amp;ldquo;how do you change things&amp;rdquo; problem. My 5c: &lt;strong&gt;none of these tools give the model a stable, verifiable identifier for the lines it wants to change without wasting tremendous amounts of context and depending on perfect recall.&lt;/strong&gt; They all rely on the model reproducing content it already saw. When it can&amp;rsquo;t — and it often can&amp;rsquo;t — the user blames the model.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x2-hashline"&gt;&lt;span class="hx"&gt;0x2:&lt;/span&gt; Hashline!&lt;/h2&gt;
&lt;p&gt;Now bear with me here. What if, when the model reads a file, or greps for something, every line comes back tagged with a 2-3 character content hash:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;1:a3|function hello() {
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;2:f1| return &amp;#34;world&amp;#34;;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;3:0e|}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When the model edits, it references those tags — &lt;em&gt;&amp;ldquo;replace line &lt;code&gt;2:f1&lt;/code&gt;, replace range &lt;code&gt;1:a3&lt;/code&gt; through &lt;code&gt;3:0e&lt;/code&gt;, insert after &lt;code&gt;3:0e&lt;/code&gt;.&amp;rdquo;&lt;/em&gt; If the file changed since the last read, the hashes (optimistically) won&amp;rsquo;t match and the edit is rejected before anything gets corrupted.&lt;/p&gt;
&lt;p&gt;If they can recall a pseudo-random tag, chances are, they know what they&amp;rsquo;re editing. The model then wouldn&amp;rsquo;t need to reproduce old content, or god forbid whitespace, to demonstrate a trusted &amp;ldquo;anchor&amp;rdquo; to express its changes off of.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x3-the-benchmark"&gt;&lt;span class="hx"&gt;0x3:&lt;/span&gt; The Benchmark&lt;/h2&gt;
&lt;p&gt;Since my primary concern was about real-world performance, the fixtures are generated as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Take a random file from the React codebase.&lt;/li&gt;
&lt;li&gt;Introduce mutations, framed as bugs, via an edit whose inverse we can expect (e.g. operator swaps, boolean flips, off-by-one errors, optional chains removed, identifiers renamed).&lt;/li&gt;
&lt;li&gt;Generate a description of the issue in plain English.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;An average task description looks something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-markdown" data-lang="markdown"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;1&lt;/span&gt;&lt;span class="cl"&gt;&lt;span class="gh"&gt;# Fix the bug in `useCommitFilteringAndNavigation.js`
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;2&lt;/span&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;3&lt;/span&gt;&lt;span class="cl"&gt;A guard clause (early return) was removed.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;4&lt;/span&gt;&lt;span class="cl"&gt;The issue is in the &lt;span class="sb"&gt;`useCommitFilteringAndNavigation`&lt;/span&gt; function.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;5&lt;/span&gt;&lt;span class="cl"&gt;Restore the missing guard clause (if statement with early return).&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Naturally, we don&amp;rsquo;t expect 100% success rate here, since the model can come up with a unique solution that isn&amp;rsquo;t necessarily the exact same file, but the bugs are mechanical enough that most of the time, the fix is our mutation being reverted.&lt;/p&gt;
&lt;p&gt;3 runs per task, 180 tasks per run. Fresh agent session each time, four tools (read, edit, write). We simply give it a temporary workspace, pass the prompt, and once the agent stops, we compare against the original file before and after formatting.&lt;/p&gt;
&lt;p&gt;Sixteen models, three edit tools, and the outcome is unambiguous: &lt;strong&gt;patch is the worst format for nearly every model, hashline matches or beats replace for most, and the weakest models gain the most.&lt;/strong&gt; Grok Code Fast 1 went from 6.7% to 68.3%, a tenfold improvement, because patch was failing so catastrophically that the model&amp;rsquo;s actual coding ability was almost completely hidden behind mechanical edit failures. MiniMax more than doubled. Grok 4 Fast&amp;rsquo;s output tokens dropped 61% because it stopped burning tokens on retry loops.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x4-so-what"&gt;&lt;span class="hx"&gt;0x4:&lt;/span&gt; So What?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;+8% improvement in the success rate of Gemini is bigger than most model upgrades deliver, and it cost zero training compute.&lt;/strong&gt; Just a little experimenting (and ~$300 spent benchmarking).&lt;/p&gt;
&lt;p&gt;Often the model isn&amp;rsquo;t flaky at understanding the task. It&amp;rsquo;s flaky at expressing itself. You&amp;rsquo;re blaming the pilot for the landing gear.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="0x5-little-bit-about-the-vendors"&gt;&lt;span class="hx"&gt;0x5:&lt;/span&gt; Little Bit About the Vendors&lt;/h2&gt;
&lt;p&gt;Anthropic recently &lt;a href="https://news.ycombinator.com/item?id=46625918"&gt;blocked OpenCode&lt;/a&gt;, a massively popular open-source coding agent, from accessing Claude through Claude Code subscriptions.&lt;/p&gt;
&lt;p&gt;Anthropic&amp;rsquo;s position &amp;ldquo;OpenCode reverse-engineered a private API&amp;rdquo; is fair on its face. Their infrastructure, their rules. But look at what the action signals:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Don&amp;rsquo;t build harnesses. Use ours.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not just Anthropic either. While writing this article, Google banned my account from Gemini entirely:&lt;/p&gt;
&lt;p&gt;&lt;img src="gemini-ban.png" alt="Google disabled my Gemini account"&gt;&lt;/p&gt;
&lt;p&gt;Not rate-limited. Not warned. &lt;strong&gt;Disabled&lt;/strong&gt;. For running a benchmark — the same one that showed Gemini 3 Flash hitting 78.3% with a novel technique that beats their best attempt at it by 5.0 pp. I don&amp;rsquo;t even know what for.&lt;/p&gt;
&lt;p&gt;Here is why that is backwards. I just showed that a different edit format improves &lt;em&gt;their own models&lt;/em&gt; by 5 to 14 points while cutting output tokens by ~20%. That&amp;rsquo;s not a threat. It&amp;rsquo;s free R&amp;amp;D.&lt;/p&gt;
&lt;p&gt;No vendor will do harness optimization for competitors&amp;rsquo; models. Anthropic won&amp;rsquo;t tune for Grok. xAI won&amp;rsquo;t tune for Gemini. OpenAI won&amp;rsquo;t tune for Claude. But an open-source harness tunes for all of them, because contributors use different models and fix the failures they personally encounter.&lt;/p&gt;
&lt;p&gt;The model is the moat. The harness is the bridge. Burning bridges just means fewer people bother to cross. &lt;strong&gt;Treating harnesses as solved, or even inconsequential, is very short-sighted.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I come from a background of game security. Cheaters are hugely destructive to the ecosystem. Sure, they get banned, chased, sued, but a well-known secret is that eventually the security team asks, &amp;ldquo;Cool! Want to show us how you got around that?&amp;rdquo;, and they join the defense.&lt;/p&gt;
&lt;p&gt;The correct response when someone messes with your API, and manages to gather a significant following using their tools is &amp;ldquo;tell us more&amp;rdquo;, not &amp;ldquo;let&amp;rsquo;s blanket-ban them in thousands; plz beg in DMs if you want it reversed tho.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The harness problem is real, measurable, and it&amp;rsquo;s the highest-leverage place to innovate right now. The gap between &amp;ldquo;cool demo&amp;rdquo; and &amp;ldquo;reliable tool&amp;rdquo; isn&amp;rsquo;t model magic. It&amp;rsquo;s careful, rather boring, empirical engineering at the tool boundary.&lt;/p&gt;
&lt;p&gt;The harness problem will be solved. The question is whether it gets solved by one company, in private, for one model, or by a community, in the open, for all of them.&lt;/p&gt;
&lt;p&gt;The benchmark results speak for themselves.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;All code, benchmarks, and per-run reports:&lt;/em&gt; &lt;a href="https://github.com/can1357/oh-my-pi/tree/main/packages/react-edit-benchmark"&gt;oh-my-pi&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Faster Results with Deep Neural Networks via Gradient Equalization</title><link>https://blog.can.ac/2017/05/10/faster-results-with-deep-neural-networks-via-gradient-equalization/</link><pubDate>Wed, 10 May 2017 00:00:00 +0000</pubDate><guid>https://blog.can.ac/2017/05/10/faster-results-with-deep-neural-networks-via-gradient-equalization/</guid><description>&lt;p class="lead"&gt;&lt;em&gt;&lt;strong&gt;When I was 17, I wrote this paper and, armed with the unshakeable confidence only a teenager can have, tried to get it into a journal. Here it is.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The original version is available as a &lt;a href="original.pdf"&gt;PDF&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="0x0-abstract"&gt;&lt;span class="hx"&gt;0x0:&lt;/span&gt; Abstract&lt;/h2&gt;
&lt;p&gt;The field of machine learning has been dominated by deeper and deeper neural networks ever since rectified linear activation functions became commonplace instead of their non-linear, bounded, counterparts such as sigmoid or hyperbolic tangent. Regardless of this major change, deep neural networks still take much longer to train compared to their shallow alternatives. After examining the rationale behind using deeper neural networks, our objective is to investigate the cause of this problem and come up with a solution by manipulating the gradients. We propose an initialization technique that when used in combination with a smoother activation function such as arctan, keeps the variation and expected value of the gradients at a similar level for all layers regardless of the depth of the network. This allows us to train deeper networks in much less time and use bounded activators without worrying about the problem of vanishing or exploding gradients.&lt;/p&gt;
&lt;h2 id="0x1-introduction"&gt;&lt;span class="hx"&gt;0x1:&lt;/span&gt; Introduction&lt;/h2&gt;
&lt;p&gt;Artificial neural networks (ANNs) are complex modelling techniques that can be used to find the relation between the output of a complex multi-variable function and its arguments, effectively approximating it.&lt;/p&gt;
&lt;p&gt;Nowadays, ANNs are being used successfully for a variety of tasks ranging all the way from predicting liver cancer&lt;a href="#ref-1"&gt;[1]&lt;/a&gt; and approximating physics of fluids&lt;a href="#ref-2"&gt;[2]&lt;/a&gt; to autonomous vehicles and colourizing black and white videos&lt;a href="#ref-3"&gt;[3]&lt;/a&gt;. Neural networks require many layers to be stacked for such complex classification and prediction problems as they need to develop complex feature detectors for the data used for these tasks.&lt;/p&gt;
&lt;p&gt;Apart from the fact that computation power and memory required increases as layers get stacked up, there is also architectural issues that make training deep neural networks (DNNs) hard, such as vanishing/exploding gradients and numerical instabilities.&lt;/p&gt;
&lt;p&gt;As a way to address the vanishing gradient problem, researchers working in the field of machine learning have been using rectified linear units (ReLUs)&lt;a href="#ref-4"&gt;[4]&lt;/a&gt; such as \(max\{x,0\}\) with Xavier initialization&lt;a href="#ref-5"&gt;[5]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Although gradients vanish much slower when ReLUs are used compared to exponentially increasing activators (e.g., sigmoid, tanh), it is not the only way to approach the issue and it almost definitely is not a perfect solution. ReLUs not only have many cons of their own such as dying units&lt;a href="#ref-6"&gt;[6]&lt;/a&gt; and exploding gradients but also do not completely fix the vanishing gradient problem which will be demonstrated later in &lt;a href="#examination-of-the-problem"&gt;Section 1.2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The primary concern of this paper is to accelerate deep neural networks&amp;rsquo; training phase further and address the numerical problems with gradients at the same time. We propose a weight initialization technique that lets us stack up layers and have “gradient-equalized” layers when combined with &lt;em&gt;soft&lt;/em&gt; activation functions. This enables us to use much deeper networks without the need of a recurrent architecture.&lt;/p&gt;
&lt;h3 id="rationale-behind-using-deeper-networks"&gt;1.1 Rationale Behind Using Deeper Networks&lt;/h3&gt;
&lt;p&gt;Nowadays, almost all state of the art results in complex image classification, object detection and semantic segmentation problems are achieved using very deep neural networks. One example would be GoogLeNet&lt;a href="#ref-7"&gt;[7]&lt;/a&gt; with 22 convolutional layers. This is simply because of the fact that shallow neural networks sacrifice accuracy and complexity for ease of training, but they are not very suitable for everyday use due to this. With fields that use neural networks for complex recognition tasks such as autonomous driving or cancer prediction, sacrificing feature complexity is simply intolerable.&lt;/p&gt;
&lt;p&gt;We can easily prove this claim of “shallow” networks sacrificing the ability to form more complex models by testing it using a regression task.&lt;/p&gt;
&lt;p&gt;We trained neural networks with 2, 4 and 12 layers on NVIDIA&amp;rsquo;s stock value for last 200 days, normalized using Equations \(\ref{eq_normx}\) and \(\ref{eq_normy}\).&lt;/p&gt;
$$
\begin{align}
\hat{x} := \frac{x}{\max X}
\label{eq_normx}
\end{align}
$$$$
\begin{align}
\hat{y} := \frac{y - E[Y]}{\sqrt{Var[Y]}}
\label{eq_normy}
\end{align}
$$&lt;figure&gt;
&lt;div class="chart" style="--cols:3;max-width:880px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Data&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Neural Network&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;2 Layer Neural Network&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="2 Layer Neural Network" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig1-0"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;-0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="159.3" y2="159.3"/&gt;&lt;text x="38" y="163.3" text-anchor="end"&gt;-0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="120.7" y2="120.7"/&gt;&lt;text x="38" y="124.7" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="82" y2="82"/&gt;&lt;text x="38" y="86" text-anchor="end"&gt;0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="43.3" y2="43.3"/&gt;&lt;text x="38" y="47.3" text-anchor="end"&gt;0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="88.5" x2="88.5" y1="198" y2="202"/&gt;&lt;text x="88.5" y="215" text-anchor="middle"&gt;50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="131.9" x2="131.9" y1="198" y2="202"/&gt;&lt;text x="131.9" y="215" text-anchor="middle"&gt;100&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="175.3" x2="175.3" y1="198" y2="202"/&gt;&lt;text x="175.3" y="215" text-anchor="middle"&gt;150&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="218.7" x2="218.7" y1="198" y2="202"/&gt;&lt;text x="218.7" y="215" text-anchor="middle"&gt;200&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="262.1" x2="262.1" y1="198" y2="202"/&gt;&lt;text x="262.1" y="215" text-anchor="middle"&gt;250&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;NVDA Stock&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Days Since 8-Feb-16&lt;/text&gt;&lt;g clip-path="url(#fig1-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 181.4L47.7 181.4L48.6 180.6L49.5 179L50.3 177L51.2 173.9L52.1 172.5L52.9 171L53.8 170.8L54.7 170.4L55.5 170.4L56.4 170.4L57.3 170.8L58.2 168.8L59 168.6L59.9 169L60.8 169L61.6 169.6L62.5 170.4L63.4 170.4L64.2 170.4L65.1 169.8L66 169.8L66.8 169.6L67.7 168.4L68.6 168.4L69.4 167.2L70.3 166.9L71.2 166.9L72 165.9L72.9 165.7L73.8 165L74.6 164.3L75.5 163.6L76.4 163.8L77.2 163L78.1 163.6L79 163.6L79.9 163.6L80.7 164L81.6 164L82.5 163.6L83.3 163.4L84.2 161.8L85.1 161.8L85.9 161.4L86.8 161.6L87.7 162.5L88.5 162.5L89.4 162.5L90.3 162.8L91.1 162.5L92 162.3L92.9 161.2L93.7 163L94.6 163.8L95.5 163.2L96.3 164L97.2 165.2L98.1 165L98.9 164.3L99.8 164.3L100.7 163.2L101.6 163.2L102.4 162.1L103.3 155.4L104.2 152.7L105 152.4L105.9 150.5L106.8 150.2L107.6 148.7L108.5 148.7L109.4 147.3L110.2 147.3L111.1 146.7L112 146L112.8 144.9L113.7 144.7L114.6 144.2L115.4 145.1L116.3 145.4L117.2 145.4L118 145.6L118.9 144L119.8 145.2L120.6 144.7L121.5 144.3L122.4 143.7L123.3 143.5L124.1 144.5L125 143.5L125.9 144L126.7 143.8L127.6 142.7L128.5 146.2L129.3 147.1L130.2 146.2L131.1 144.7L131.9 144.3L132.8 144.7L133.7 143.7L134.5 143.3L135.4 140.8L136.3 138.2L137.1 135.5L138 134.6L138.9 134.2L139.7 133.6L140.6 134.6L141.5 134.2L142.3 132.9L143.2 132.4L144.1 133.1L145 131.5L145.8 129.1L146.7 127.8L147.6 128.8L148.4 128.4L149.3 127.1L150.2 127.7L151 128.8L151.9 128.4L152.8 126.4L153.6 124.9L154.5 124.2L155.4 124L156.2 124.4L157.1 121.8L158 117.6L158.8 117L159.7 117.6L160.6 119.7L161.4 118.6L162.3 118.1L163.2 117.7L164 117.4L164.9 118.4L165.8 119.1L166.7 118.6L167.5 118.6L168.4 119.1L169.3 119L170.1 117L171 117.6L171.9 116.8L172.7 118.1L173.6 118.1L174.5 122.2L175.3 121L176.2 122L177.1 120.8L177.9 118.1L178.8 117L179.7 115.9L180.5 116.2L181.4 114.1L182.3 113.5L183.1 113.5L184 113.9L184.9 111.2L185.7 110.3L186.6 109.4L187.5 107.4L188.4 107.4L189.2 107.7L190.1 107.9L191 109.6L191.8 110.3L192.7 110.1L193.6 111.4L194.4 111.4L195.3 112.6L196.2 111.9L197 112.3L197.9 110.8L198.8 110.8L199.6 109L200.5 108.3L201.4 104.5L202.2 101.5L203.1 101.2L204 103.6L204.8 103.7L205.7 103.4L206.6 106L207.4 107.2L208.3 108.3L209.2 107.9L210.1 103.4L210.9 103.2L211.8 105L212.7 102.1L213.5 77.3L214.4 80.5L215.3 76.6L216.1 67.3L217 66.2L217.9 65L218.7 65.3L219.6 64.4L220.5 63.7L221.3 63.5L222.2 63.7L223.1 64.8L223.9 67.9L224.8 73.5L225.7 72.4L226.5 67.9L227.4 64.2L228.3 62.3L229.1 65L230 67.3L230.9 70.8L231.8 68.1L232.6 58.8L233.5 55.9L234.4 52.2L235.2 50.3L236.1 44.3L237 43.4L237.8 40.3L238.7 35.4L239.6 27.1L240.4 36.5L241.3 34.5L242.2 42.3L243 48.7L243.9 46.5L244.8 49.5L245.6 47.2L246.5 42L247.4 42.5L248.2 44.3L249.1 47.4L250 47.8L250.8 50.9L251.7 48.5L252.6 45.1L253.5 46.3L254.3 43.9L255.2 41L256.1 39.4L256.9 36.9L257.8 33.8L258.7 36L259.5 35.8L260.4 29.8L261.3 27.5L262.1 28.7L263 28.7"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 126.1L48.6 131.5L50.3 136.7L52.1 141.6L53.8 146L55.5 149.6L57.3 153.1L59 155.9L60.8 158.5L62.5 160.5L64.2 162.1L66 163.6L67.7 164.7L69.4 165.7L71.2 166.5L72.9 167.2L74.6 167.6L76.4 167.9L78.1 167.9L79.9 167.9L81.6 167.9L83.3 167.9L85.1 167.6L86.8 167.6L88.5 167.2L90.3 166.9L92 166.5L93.7 165.9L95.5 165.3L97.2 165L98.9 164.3L100.7 164L102.4 163.2L104.2 162.5L105.9 161.9L107.6 161.4L109.4 160.7L111.1 159.9L112.8 159.2L114.6 158.5L116.3 157.8L118 157L119.8 156.3L121.5 155.4L123.3 154.5L125 153.8L126.7 152.9L128.5 152L130.2 151.2L131.9 150.2L133.7 149.1L135.4 148.3L137.1 147.3L138.9 146.2L140.6 145.1L142.3 144L144.1 142.9L145.8 141.8L147.6 140.8L149.3 139.6L151 138.6L152.8 137.1L154.5 136L156.2 135L158 133.5L159.7 132.4L161.4 130.9L163.2 129.5L164.9 128L166.7 126.6L168.4 125.1L170.1 123.7L171.9 122.2L173.6 120.5L175.3 119L177.1 117.6L178.8 115.7L180.5 114.3L182.3 112.5L184 111L185.7 109.2L187.5 107.7L189.2 106L191 104.5L192.7 102.7L194.4 101.2L196.2 99.4L197.9 98.3L199.6 96.5L201.4 95L203.1 93.6L204.8 91.8L206.6 90.3L208.3 88.9L210.1 87.4L211.8 86L213.5 84.5L215.3 83.1L217 81.6L218.7 80.5L220.5 79.1L222.2 77.6L223.9 76.6L225.7 75.3L227.4 74L229.1 72.9L230.9 71.8L232.6 70.8L234.4 69.7L236.1 68.6L237.8 67.5L239.6 66.4L241.3 65.7L243 65L244.8 63.8L246.5 63.2L248.2 62.1L250 61.3L251.7 60.6L253.5 59.7L255.2 58.8L256.9 58.1L258.7 57.3L260.4 56.7L262.1 55.9"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;4 Layer Neural Network&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="4 Layer Neural Network" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig1-1"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;-0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="159.3" y2="159.3"/&gt;&lt;text x="38" y="163.3" text-anchor="end"&gt;-0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="120.7" y2="120.7"/&gt;&lt;text x="38" y="124.7" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="82" y2="82"/&gt;&lt;text x="38" y="86" text-anchor="end"&gt;0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="43.3" y2="43.3"/&gt;&lt;text x="38" y="47.3" text-anchor="end"&gt;0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="88.5" x2="88.5" y1="198" y2="202"/&gt;&lt;text x="88.5" y="215" text-anchor="middle"&gt;50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="131.9" x2="131.9" y1="198" y2="202"/&gt;&lt;text x="131.9" y="215" text-anchor="middle"&gt;100&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="175.3" x2="175.3" y1="198" y2="202"/&gt;&lt;text x="175.3" y="215" text-anchor="middle"&gt;150&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="218.7" x2="218.7" y1="198" y2="202"/&gt;&lt;text x="218.7" y="215" text-anchor="middle"&gt;200&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="262.1" x2="262.1" y1="198" y2="202"/&gt;&lt;text x="262.1" y="215" text-anchor="middle"&gt;250&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;NVDA Stock&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Days Since 8-Feb-16&lt;/text&gt;&lt;g clip-path="url(#fig1-1)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 181.4L47.7 181.4L48.6 180.6L49.5 179L50.3 177L51.2 173.9L52.1 172.5L52.9 171L53.8 170.8L54.7 170.4L55.5 170.4L56.4 170.4L57.3 170.8L58.2 168.8L59 168.6L59.9 169L60.8 169L61.6 169.6L62.5 170.4L63.4 170.4L64.2 170.4L65.1 169.8L66 169.8L66.8 169.6L67.7 168.4L68.6 168.4L69.4 167.2L70.3 166.9L71.2 166.9L72 165.9L72.9 165.7L73.8 165L74.6 164.3L75.5 163.6L76.4 163.8L77.2 163L78.1 163.6L79 163.6L79.9 163.6L80.7 164L81.6 164L82.5 163.6L83.3 163.4L84.2 161.8L85.1 161.8L85.9 161.4L86.8 161.6L87.7 162.5L88.5 162.5L89.4 162.5L90.3 162.8L91.1 162.5L92 162.3L92.9 161.2L93.7 163L94.6 163.8L95.5 163.2L96.3 164L97.2 165.2L98.1 165L98.9 164.3L99.8 164.3L100.7 163.2L101.6 163.2L102.4 162.1L103.3 155.4L104.2 152.7L105 152.4L105.9 150.5L106.8 150.2L107.6 148.7L108.5 148.7L109.4 147.3L110.2 147.3L111.1 146.7L112 146L112.8 144.9L113.7 144.7L114.6 144.2L115.4 145.1L116.3 145.4L117.2 145.4L118 145.6L118.9 144L119.8 145.2L120.6 144.7L121.5 144.3L122.4 143.7L123.3 143.5L124.1 144.5L125 143.5L125.9 144L126.7 143.8L127.6 142.7L128.5 146.2L129.3 147.1L130.2 146.2L131.1 144.7L131.9 144.3L132.8 144.7L133.7 143.7L134.5 143.3L135.4 140.8L136.3 138.2L137.1 135.5L138 134.6L138.9 134.2L139.7 133.6L140.6 134.6L141.5 134.2L142.3 132.9L143.2 132.4L144.1 133.1L145 131.5L145.8 129.1L146.7 127.8L147.6 128.8L148.4 128.4L149.3 127.1L150.2 127.7L151 128.8L151.9 128.4L152.8 126.4L153.6 124.9L154.5 124.2L155.4 124L156.2 124.4L157.1 121.8L158 117.6L158.8 117L159.7 117.6L160.6 119.7L161.4 118.6L162.3 118.1L163.2 117.7L164 117.4L164.9 118.4L165.8 119.1L166.7 118.6L167.5 118.6L168.4 119.1L169.3 119L170.1 117L171 117.6L171.9 116.8L172.7 118.1L173.6 118.1L174.5 122.2L175.3 121L176.2 122L177.1 120.8L177.9 118.1L178.8 117L179.7 115.9L180.5 116.2L181.4 114.1L182.3 113.5L183.1 113.5L184 113.9L184.9 111.2L185.7 110.3L186.6 109.4L187.5 107.4L188.4 107.4L189.2 107.7L190.1 107.9L191 109.6L191.8 110.3L192.7 110.1L193.6 111.4L194.4 111.4L195.3 112.6L196.2 111.9L197 112.3L197.9 110.8L198.8 110.8L199.6 109L200.5 108.3L201.4 104.5L202.2 101.5L203.1 101.2L204 103.6L204.8 103.7L205.7 103.4L206.6 106L207.4 107.2L208.3 108.3L209.2 107.9L210.1 103.4L210.9 103.2L211.8 105L212.7 102.1L213.5 77.3L214.4 80.5L215.3 76.6L216.1 67.3L217 66.2L217.9 65L218.7 65.3L219.6 64.4L220.5 63.7L221.3 63.5L222.2 63.7L223.1 64.8L223.9 67.9L224.8 73.5L225.7 72.4L226.5 67.9L227.4 64.2L228.3 62.3L229.1 65L230 67.3L230.9 70.8L231.8 68.1L232.6 58.8L233.5 55.9L234.4 52.2L235.2 50.3L236.1 44.3L237 43.4L237.8 40.3L238.7 35.4L239.6 27.1L240.4 36.5L241.3 34.5L242.2 42.3L243 48.7L243.9 46.5L244.8 49.5L245.6 47.2L246.5 42L247.4 42.5L248.2 44.3L249.1 47.4L250 47.8L250.8 50.9L251.7 48.5L252.6 45.1L253.5 46.3L254.3 43.9L255.2 41L256.1 39.4L256.9 36.9L257.8 33.8L258.7 36L259.5 35.8L260.4 29.8L261.3 27.5L262.1 28.7L263 28.7"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 171.9L48.6 178.8L50.3 178.5L52.1 176.6L53.8 174.8L55.5 173L57.3 171.3L59 170.1L60.8 169L62.5 168.2L64.2 167.6L66 167L67.7 166.5L69.4 166.1L71.2 165.7L72.9 165.3L74.6 164.8L76.4 164.3L78.1 164L79.9 163.6L81.6 163.2L83.3 162.5L85.1 162.1L86.8 161.4L88.5 161L90.3 160.3L92 159.6L93.7 159L95.5 158.3L97.2 157.4L98.9 156.7L100.7 155.9L102.4 155.3L104.2 154.1L105.9 153.4L107.6 152.4L109.4 151.6L111.1 150.7L112.8 149.8L114.6 148.7L116.3 147.6L118 146.9L119.8 145.8L121.5 144.7L123.3 143.7L125 142.5L126.7 141.6L128.5 140.8L130.2 139.6L131.9 138.6L133.7 137.5L135.4 136.4L137.1 135.3L138.9 134.4L140.6 133.5L142.3 132.4L144.1 131.3L145.8 130.2L147.6 129.1L149.3 128L151 127.3L152.8 126.3L154.5 125.5L156.2 124.4L158 123.7L159.7 122.6L161.4 121.8L163.2 121L164.9 120.1L166.7 119.3L168.4 118.6L170.1 117.9L171.9 117.6L173.6 116.8L175.3 116.4L177.1 115.9L178.8 115.4L180.5 115.3L182.3 115L184 114.7L185.7 114.7L187.5 114.3L189.2 113.9L191 113.7L192.7 113.1L194.4 112.8L196.2 112.1L197.9 111.4L199.6 110.3L201.4 108.8L203.1 107.4L204.8 105.8L206.6 103.7L208.3 101.7L210.1 99.4L211.8 96.9L213.5 94.2L215.3 91.1L217 88L218.7 84.5L220.5 81.1L222.2 77.5L223.9 73.7L225.7 69.8L227.4 66.2L229.1 62.6L230.9 59.4L232.6 56.1L234.4 53.4L236.1 51.2L237.8 49L239.6 47.2L241.3 46.1L243 45.1L244.8 43.9L246.5 42.9L248.2 42.2L250 41.6L251.7 41L253.5 40.5L255.2 39.9L256.9 39.6L258.7 39.2L260.4 38.9L262.1 38.5"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;12 Layer Neural Network&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="12 Layer Neural Network" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig1-2"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;-0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="159.3" y2="159.3"/&gt;&lt;text x="38" y="163.3" text-anchor="end"&gt;-0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="120.7" y2="120.7"/&gt;&lt;text x="38" y="124.7" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="82" y2="82"/&gt;&lt;text x="38" y="86" text-anchor="end"&gt;0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="43.3" y2="43.3"/&gt;&lt;text x="38" y="47.3" text-anchor="end"&gt;0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="88.5" x2="88.5" y1="198" y2="202"/&gt;&lt;text x="88.5" y="215" text-anchor="middle"&gt;50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="131.9" x2="131.9" y1="198" y2="202"/&gt;&lt;text x="131.9" y="215" text-anchor="middle"&gt;100&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="175.3" x2="175.3" y1="198" y2="202"/&gt;&lt;text x="175.3" y="215" text-anchor="middle"&gt;150&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="218.7" x2="218.7" y1="198" y2="202"/&gt;&lt;text x="218.7" y="215" text-anchor="middle"&gt;200&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="262.1" x2="262.1" y1="198" y2="202"/&gt;&lt;text x="262.1" y="215" text-anchor="middle"&gt;250&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;NVDA Stock&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Days Since 8-Feb-16&lt;/text&gt;&lt;g clip-path="url(#fig1-2)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 181.4L47.7 181.4L48.6 180.6L49.5 179L50.3 177L51.2 173.9L52.1 172.5L52.9 171L53.8 170.8L54.7 170.4L55.5 170.4L56.4 170.4L57.3 170.8L58.2 168.8L59 168.6L59.9 169L60.8 169L61.6 169.6L62.5 170.4L63.4 170.4L64.2 170.4L65.1 169.8L66 169.8L66.8 169.6L67.7 168.4L68.6 168.4L69.4 167.2L70.3 166.9L71.2 166.9L72 165.9L72.9 165.7L73.8 165L74.6 164.3L75.5 163.6L76.4 163.8L77.2 163L78.1 163.6L79 163.6L79.9 163.6L80.7 164L81.6 164L82.5 163.6L83.3 163.4L84.2 161.8L85.1 161.8L85.9 161.4L86.8 161.6L87.7 162.5L88.5 162.5L89.4 162.5L90.3 162.8L91.1 162.5L92 162.3L92.9 161.2L93.7 163L94.6 163.8L95.5 163.2L96.3 164L97.2 165.2L98.1 165L98.9 164.3L99.8 164.3L100.7 163.2L101.6 163.2L102.4 162.1L103.3 155.4L104.2 152.7L105 152.4L105.9 150.5L106.8 150.2L107.6 148.7L108.5 148.7L109.4 147.3L110.2 147.3L111.1 146.7L112 146L112.8 144.9L113.7 144.7L114.6 144.2L115.4 145.1L116.3 145.4L117.2 145.4L118 145.6L118.9 144L119.8 145.2L120.6 144.7L121.5 144.3L122.4 143.7L123.3 143.5L124.1 144.5L125 143.5L125.9 144L126.7 143.8L127.6 142.7L128.5 146.2L129.3 147.1L130.2 146.2L131.1 144.7L131.9 144.3L132.8 144.7L133.7 143.7L134.5 143.3L135.4 140.8L136.3 138.2L137.1 135.5L138 134.6L138.9 134.2L139.7 133.6L140.6 134.6L141.5 134.2L142.3 132.9L143.2 132.4L144.1 133.1L145 131.5L145.8 129.1L146.7 127.8L147.6 128.8L148.4 128.4L149.3 127.1L150.2 127.7L151 128.8L151.9 128.4L152.8 126.4L153.6 124.9L154.5 124.2L155.4 124L156.2 124.4L157.1 121.8L158 117.6L158.8 117L159.7 117.6L160.6 119.7L161.4 118.6L162.3 118.1L163.2 117.7L164 117.4L164.9 118.4L165.8 119.1L166.7 118.6L167.5 118.6L168.4 119.1L169.3 119L170.1 117L171 117.6L171.9 116.8L172.7 118.1L173.6 118.1L174.5 122.2L175.3 121L176.2 122L177.1 120.8L177.9 118.1L178.8 117L179.7 115.9L180.5 116.2L181.4 114.1L182.3 113.5L183.1 113.5L184 113.9L184.9 111.2L185.7 110.3L186.6 109.4L187.5 107.4L188.4 107.4L189.2 107.7L190.1 107.9L191 109.6L191.8 110.3L192.7 110.1L193.6 111.4L194.4 111.4L195.3 112.6L196.2 111.9L197 112.3L197.9 110.8L198.8 110.8L199.6 109L200.5 108.3L201.4 104.5L202.2 101.5L203.1 101.2L204 103.6L204.8 103.7L205.7 103.4L206.6 106L207.4 107.2L208.3 108.3L209.2 107.9L210.1 103.4L210.9 103.2L211.8 105L212.7 102.1L213.5 77.3L214.4 80.5L215.3 76.6L216.1 67.3L217 66.2L217.9 65L218.7 65.3L219.6 64.4L220.5 63.7L221.3 63.5L222.2 63.7L223.1 64.8L223.9 67.9L224.8 73.5L225.7 72.4L226.5 67.9L227.4 64.2L228.3 62.3L229.1 65L230 67.3L230.9 70.8L231.8 68.1L232.6 58.8L233.5 55.9L234.4 52.2L235.2 50.3L236.1 44.3L237 43.4L237.8 40.3L238.7 35.4L239.6 27.1L240.4 36.5L241.3 34.5L242.2 42.3L243 48.7L243.9 46.5L244.8 49.5L245.6 47.2L246.5 42L247.4 42.5L248.2 44.3L249.1 47.4L250 47.8L250.8 50.9L251.7 48.5L252.6 45.1L253.5 46.3L254.3 43.9L255.2 41L256.1 39.4L256.9 36.9L257.8 33.8L258.7 36L259.5 35.8L260.4 29.8L261.3 27.5L262.1 28.7L263 28.7"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46.9 182.1L48.6 179L50.3 176.1L52.1 173.7L53.8 171.9L55.5 170.8L57.3 169.8L59 169L60.8 168.4L62.5 167.9L64.2 167.6L66 167L67.7 166.7L69.4 166.4L71.2 166.1L72.9 165.7L74.6 165.3L76.4 165L78.1 164.7L79.9 164.7L81.6 164.3L83.3 164.1L85.1 164L86.8 163.6L88.5 163.5L90.3 163.2L92 163L93.7 162.8L95.5 162.5L97.2 162.1L98.9 161.4L100.7 160.3L102.4 158.5L104.2 155.8L105.9 152.5L107.6 149.8L109.4 147.6L111.1 146.7L112.8 145.8L114.6 145.4L116.3 145.1L118 144.8L119.8 144.7L121.5 144.7L123.3 144.3L125 144.3L126.7 144L128.5 143.7L130.2 143.1L131.9 142.2L133.7 141.4L135.4 140L137.1 138.6L138.9 136.7L140.6 135L142.3 133.1L144.1 131.3L145.8 129.5L147.6 128L149.3 126.6L151 125.5L152.8 124.4L154.5 123.7L156.2 122.6L158 121.8L159.7 121.2L161.4 120.5L163.2 119.7L164.9 119.3L166.7 118.6L168.4 118.1L170.1 117.6L171.9 117.2L173.6 116.4L175.3 116.1L177.1 115.3L178.8 115L180.5 114.3L182.3 113.9L184 113.1L185.7 112.8L187.5 112.1L189.2 111.8L191 111L192.7 110.6L194.4 109.9L196.2 109.6L197.9 109L199.6 108.5L201.4 107.9L203.1 107.4L204.8 106.6L206.6 105.8L208.3 104.5L210.1 102.5L211.8 98.3L213.5 89.6L215.3 77.5L217 70.6L218.7 67.9L220.5 67.1L222.2 67.1L223.9 67.1L225.7 67.1L227.4 66.6L229.1 65.3L230.9 62.8L232.6 58.4L234.4 52.2L236.1 47.2L237.8 44.7L239.6 43.2L241.3 42.5L243 42L244.8 41.6L246.5 41.4L248.2 41L250 41L251.7 40.6L253.5 40.6L255.2 40.6L256.9 40.6L258.7 40.6L260.4 40.6L262.1 40.6"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 1: Output of neural networks with 2, 4 and 12 layers respectively after being trained on NVDA stock value history.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;After the training has been done as we needed to measure the complexity of networks&amp;rsquo; output in a quantitative way and both our input and output were 1 dimensional, we measured the complexity of the features by graphing the input and output of the network, computing the numerical derivative for every point on the predicted line and then calculating the array’s variance like in Equation \(\ref{eq_complexity}\).&lt;/p&gt;
$$
\begin{align}
\theta = Var\{ y'(0), y'(0.1), \ldots \}
\label{eq_complexity}
\end{align}
$$&lt;figure&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style="text-align: center"&gt;Number of Layers&lt;/th&gt;
&lt;th style="text-align: center"&gt;\(\theta\)&lt;/th&gt;
&lt;th style="text-align: center"&gt;\(\frac{\theta}{\min\theta}\)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;2&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.000063&lt;/td&gt;
&lt;td style="text-align: center"&gt;x1.000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;4&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.000977&lt;/td&gt;
&lt;td style="text-align: center"&gt;x15.460&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="text-align: center"&gt;12&lt;/td&gt;
&lt;td style="text-align: center"&gt;0.002224&lt;/td&gt;
&lt;td style="text-align: center"&gt;x35.206&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;figcaption&gt;Table 1: Computed \(\theta\) values of the graphs from Figure 1&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Referring to Table 1, the 12-layer network developed features that are \(\approx\)35 times more complex compared to the 2-layer network in 125'000 iterations.&lt;/p&gt;
&lt;h3 id="examination-of-the-problem"&gt;1.2 Examination of the Problem&lt;/h3&gt;
&lt;p&gt;It is widely known that deep neural networks have problems with unstable gradients. As a solution, ReLUs are being used by many researchers, however, ReLUs do not completely fix this issue by any means as we will demonstrate and it ends up creating new issues such as dying units and exploding gradients.&lt;/p&gt;
&lt;p&gt;In order to test whether ReLUs completely eliminate the vanishing gradients problem, we used a convolutional neural network with 8 convolutions and 3 fully-connected layers. We initialized the weights using Xavier initialization, and once the first iteration is finished we logged every gradient to a file and analysed its distribution.&lt;/p&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:2;max-width:880px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Var(δ) per Layer&lt;/div&gt;&lt;svg viewBox="0 0 426 280" role="img" aria-label="Var(δ) per Layer" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig2-0"&gt;&lt;rect x="46" y="24" width="368" height="224"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;text x="38" y="252" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−4&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="192.7" y2="192.7"/&gt;&lt;text x="38" y="196.7" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−3&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="137.4" y2="137.4"/&gt;&lt;text x="38" y="141.4" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−2&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="82.1" y2="82.1"/&gt;&lt;text x="38" y="86.1" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−1&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="26.8" y2="26.8"/&gt;&lt;text x="38" y="30.8" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;0&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="248" y2="252"/&gt;&lt;text x="46" y="265" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="62" x2="62" y1="248" y2="252"/&gt;&lt;text x="62" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="78" x2="78" y1="248" y2="252"/&gt;&lt;text x="78" y="265" text-anchor="middle"&gt;2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="94" x2="94" y1="248" y2="252"/&gt;&lt;text x="94" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="110" x2="110" y1="248" y2="252"/&gt;&lt;text x="110" y="265" text-anchor="middle"&gt;4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="126" x2="126" y1="248" y2="252"/&gt;&lt;text x="126" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="142" x2="142" y1="248" y2="252"/&gt;&lt;text x="142" y="265" text-anchor="middle"&gt;6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="158" x2="158" y1="248" y2="252"/&gt;&lt;text x="158" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="174" x2="174" y1="248" y2="252"/&gt;&lt;text x="174" y="265" text-anchor="middle"&gt;8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190" x2="190" y1="248" y2="252"/&gt;&lt;text x="190" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="206" x2="206" y1="248" y2="252"/&gt;&lt;text x="206" y="265" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="222" x2="222" y1="248" y2="252"/&gt;&lt;text x="222" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="238" x2="238" y1="248" y2="252"/&gt;&lt;text x="238" y="265" text-anchor="middle"&gt;12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="254" x2="254" y1="248" y2="252"/&gt;&lt;text x="254" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="270" x2="270" y1="248" y2="252"/&gt;&lt;text x="270" y="265" text-anchor="middle"&gt;14&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="286" x2="286" y1="248" y2="252"/&gt;&lt;text x="286" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="302" x2="302" y1="248" y2="252"/&gt;&lt;text x="302" y="265" text-anchor="middle"&gt;16&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="318" x2="318" y1="248" y2="252"/&gt;&lt;text x="318" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="334" x2="334" y1="248" y2="252"/&gt;&lt;text x="334" y="265" text-anchor="middle"&gt;18&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="350" x2="350" y1="248" y2="252"/&gt;&lt;text x="350" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="366" x2="366" y1="248" y2="252"/&gt;&lt;text x="366" y="265" text-anchor="middle"&gt;20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="382" x2="382" y1="248" y2="252"/&gt;&lt;text x="382" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="398" x2="398" y1="248" y2="252"/&gt;&lt;text x="398" y="265" text-anchor="middle"&gt;22&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="414" x2="414" y1="248" y2="252"/&gt;&lt;text x="414" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Var(δ)&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="414" y="278" text-anchor="end"&gt;Layer Id&lt;/text&gt;&lt;g clip-path="url(#fig2-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 56.5L62 30.5L78 46.5L94 47.1L110 65.7L126 54.4L142 80.7L158 74.3L174 95.7L190 92.6L206 90.7L222 122L238 111.4L254 134.7L270 122L286 146.5L302 140.2L318 164.7L334 157.8L350 185L366 196.6L382 195.7L398 222L414 232"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="248"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;E(|δ|) per Layer&lt;/div&gt;&lt;svg viewBox="0 0 426 280" role="img" aria-label="E(|δ|) per Layer" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig2-1"&gt;&lt;rect x="46" y="24" width="368" height="224"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;text x="38" y="252" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="203.2" y2="203.2"/&gt;&lt;text x="38" y="207.2" text-anchor="end"&gt;0.2&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="158.4" y2="158.4"/&gt;&lt;text x="38" y="162.4" text-anchor="end"&gt;0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="113.6" y2="113.6"/&gt;&lt;text x="38" y="117.6" text-anchor="end"&gt;0.6&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="68.8" y2="68.8"/&gt;&lt;text x="38" y="72.8" text-anchor="end"&gt;0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="24" y2="24"/&gt;&lt;text x="38" y="28" text-anchor="end"&gt;1.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="248" y2="252"/&gt;&lt;text x="46" y="265" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="62" x2="62" y1="248" y2="252"/&gt;&lt;text x="62" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="78" x2="78" y1="248" y2="252"/&gt;&lt;text x="78" y="265" text-anchor="middle"&gt;2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="94" x2="94" y1="248" y2="252"/&gt;&lt;text x="94" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="110" x2="110" y1="248" y2="252"/&gt;&lt;text x="110" y="265" text-anchor="middle"&gt;4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="126" x2="126" y1="248" y2="252"/&gt;&lt;text x="126" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="142" x2="142" y1="248" y2="252"/&gt;&lt;text x="142" y="265" text-anchor="middle"&gt;6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="158" x2="158" y1="248" y2="252"/&gt;&lt;text x="158" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="174" x2="174" y1="248" y2="252"/&gt;&lt;text x="174" y="265" text-anchor="middle"&gt;8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190" x2="190" y1="248" y2="252"/&gt;&lt;text x="190" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="206" x2="206" y1="248" y2="252"/&gt;&lt;text x="206" y="265" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="222" x2="222" y1="248" y2="252"/&gt;&lt;text x="222" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="238" x2="238" y1="248" y2="252"/&gt;&lt;text x="238" y="265" text-anchor="middle"&gt;12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="254" x2="254" y1="248" y2="252"/&gt;&lt;text x="254" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="270" x2="270" y1="248" y2="252"/&gt;&lt;text x="270" y="265" text-anchor="middle"&gt;14&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="286" x2="286" y1="248" y2="252"/&gt;&lt;text x="286" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="302" x2="302" y1="248" y2="252"/&gt;&lt;text x="302" y="265" text-anchor="middle"&gt;16&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="318" x2="318" y1="248" y2="252"/&gt;&lt;text x="318" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="334" x2="334" y1="248" y2="252"/&gt;&lt;text x="334" y="265" text-anchor="middle"&gt;18&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="350" x2="350" y1="248" y2="252"/&gt;&lt;text x="350" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="366" x2="366" y1="248" y2="252"/&gt;&lt;text x="366" y="265" text-anchor="middle"&gt;20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="382" x2="382" y1="248" y2="252"/&gt;&lt;text x="382" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="398" x2="398" y1="248" y2="252"/&gt;&lt;text x="398" y="265" text-anchor="middle"&gt;22&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="414" x2="414" y1="248" y2="252"/&gt;&lt;text x="414" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;E(|δ|)&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="414" y="278" text-anchor="end"&gt;Layer Id&lt;/text&gt;&lt;g clip-path="url(#fig2-1)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 35.6L62 99.5L78 159.7L94 127.5L110 170.9L126 142.7L142 198.7L158 179.9L174 215.3L190 207.9L206 201.9L222 224.7L238 216.4L254 229.7L270 223.4L286 234.1L302 231L318 238.5L334 236.6L350 242L366 244.2L382 243L398 245.2L414 246.1"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="248"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 2: Analysis of the distribution gradients have per layer after the first iteration has completed when using ReLUs.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;In Figure 2 the point \(x=22\) on both graphs shows us the last weight layer&amp;rsquo;s distribution. We can see that even though ReLU was used as the activator, variance of the gradients in the last weight layer reached values lower than \(0.0002\) and mean kept decreasing steadily indicating the problem was not solved.&lt;/p&gt;
&lt;h2 id="0x2-hypothetical-solution"&gt;&lt;span class="hx"&gt;0x2:&lt;/span&gt; Hypothetical Solution&lt;/h2&gt;
&lt;p&gt;In order to solve the problem of gradient instability we first need to define the problem mathematically. The problem with unstable gradients can be defined as gradients either exploding or vanishing after passing one weight and one activation layer. We will assume it is a fully-connected layer for the sake of ease. The value after passing these two layers can be defined as in Equation Set \(\ref{eq_neuron_act}\) where f is the activation function, x is the input, y is the activated final output and w is the weight of the particular connection.&lt;/p&gt;
$$
\begin{align}
\begin{split}
a_{i} &amp;= \sum_{n}^{} x_{n} w_{n \rightarrow i} \\
y_{i} &amp;= f(a_{i})
\end{split}
\label{eq_neuron_act}
\end{align}
$$&lt;p&gt;Let \(\delta_n = \frac{\partial E}{\partial y_{n}}\) where E is the error function, how \(\delta_n\) effects the gradient \(\frac{\partial E}{\partial x_{z}}\) can be seen in Equation \(\ref{eq_neuron_bprop}\).&lt;/p&gt;
$$
\begin{align}
\begin{split}
\frac{\partial E}{\partial x_{z}} &amp;= \sum_{n}^{} \frac{\partial E}{\partial y_n}\frac{\partial y_n}{\partial x_z} \\
&amp;= \sum_{n}^{} \delta_n f'(a_{n}) \sum_{k}^{} \frac{\partial}{\partial x_z} \bigg[ x_{k} w_{k\rightarrow n} \bigg] \\
&amp;= \sum_{n}^{} \delta_n f'(a_{n}) w_{z \rightarrow n}
\end{split}
\label{eq_neuron_bprop}
\end{align}
$$&lt;p&gt;We want Equation \(\ref{eq_var_fix}\) to hold true to achieve our goal of equalizing the gradients. In order to evaluate Equation \(\ref{eq_var_fix}\) we are going to make the original assumption of gradients having zero mean from Xavier initialization, \(E[f'(a)]=0\), and then use Bienaymé formula.&lt;/p&gt;
$$
\begin{align}
\begin{split}
Var\bigg[ \frac{\partial E}{\partial y_{n}} \bigg] &amp;= Var\bigg[ \frac{\partial E}{\partial x_{n}} \bigg] \\
Var[\delta_n] &amp;= Var\bigg[ \sum_{n}^{} \delta_n f'(a_{n}) w_{z \rightarrow n} \bigg] \\
Var[\delta_n] &amp;= \sum_{n}^{} Var\bigg[ \delta_n f'(a_{n}) w_{z \rightarrow n} \bigg] \\
1 &amp;= n Var[ f'(a) ] Var[ w_{z} ]
\end{split}
\label{eq_var_fix}
\end{align}
$$&lt;p&gt;We still cannot solve this for \(Var[ w_{z} ]\) as it still contains the unknown variable \(a\). So we are going to assume \(Var[f'(a)] = \max\limits_{x \in {\rm I\!R}^n} Var[f'(x)]\) in order avoid having exploding gradients.&lt;/p&gt;
$$
\begin{align}
Var[ w_{z} ] = \frac{1}{n} \frac{1}{\max\limits_{x \in {\rm I\!R}^n} Var[ f'(x) ]}
\label{eq_var_fix2}
\end{align}
$$&lt;p&gt;We will simplify things a little bit more and solve Equation \(\ref{eq_var_fix2}\) in terms of \(\frac{Z}{n}\). Distribution wise we can simplify the tensor transformed by \(f'\) of any dimension that has the maximum variance to \(\{ \max f'(x), \min f'(x) \}\). As the final solution we have the Equations \(\ref{eq_var_fix_e1}\) and \(\ref{eq_var_fix_e2}\) where \(\beta\) is the hyper parameter defining the controlled drop coefficient which we use to ensure the creation of higher level feature detectors in deeper layers.&lt;/p&gt;
$$
\begin{align}
Z = \frac{1}{Var\{ \max f'(x), \min f'(x) \}}
\label{eq_var_fix_e1}
\end{align}
$$$$
\begin{align}
W \sim \mathcal{N} \bigg( 0, \frac{Z}{n} \beta \bigg)
\label{eq_var_fix_e2}
\end{align}
$$&lt;h3 id="activation-function"&gt;2.1 Activaton Function&lt;/h3&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:3;max-width:880px"&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Distribution of Weights&lt;/div&gt;&lt;div class="chart-sub"&gt;[tanh, σ² = 4.0]&lt;/div&gt;&lt;div class="chart-sub"&gt;P(f′(x) &amp;lt; 0.001) = 3.82186%&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="Distribution of Weights [tanh, σ² = 4.0] P(f′(x) &amp;lt; 0.001) = 3.82186%" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig3-0"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;0.00&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="157.6" y2="157.6"/&gt;&lt;text x="38" y="161.6" text-anchor="end"&gt;0.05&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="117.2" y2="117.2"/&gt;&lt;text x="38" y="121.2" text-anchor="end"&gt;0.10&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="76.8" y2="76.8"/&gt;&lt;text x="38" y="80.8" text-anchor="end"&gt;0.15&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="36.5" y2="36.5"/&gt;&lt;text x="38" y="40.5" text-anchor="end"&gt;0.20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="198" y2="202"/&gt;&lt;text x="46" y="215" text-anchor="middle"&gt;-15&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="82.2" x2="82.2" y1="198" y2="202"/&gt;&lt;text x="82.2" y="215" text-anchor="middle"&gt;-10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="118.3" x2="118.3" y1="198" y2="202"/&gt;&lt;text x="118.3" y="215" text-anchor="middle"&gt;-5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="154.5" x2="154.5" y1="198" y2="202"/&gt;&lt;text x="154.5" y="215" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190.7" x2="190.7" y1="198" y2="202"/&gt;&lt;text x="190.7" y="215" text-anchor="middle"&gt;5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="226.8" x2="226.8" y1="198" y2="202"/&gt;&lt;text x="226.8" y="215" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="263" x2="263" y1="198" y2="202"/&gt;&lt;text x="263" y="215" text-anchor="middle"&gt;15&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Probability&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Weight&lt;/text&gt;&lt;g clip-path="url(#fig3-0)"&gt;&lt;path fill="#e30613" d="M46 198L46.7 198L47.4 198L48.2 198L48.9 198L49.6 198L50.3 198L51.1 198L51.8 198L52.5 198L53.2 198L54 198L54.7 198L55.4 198L56.1 198L56.9 198L57.6 198L58.3 198L59 198L59.7 198L60.5 198L61.2 198L61.9 198L62.6 198L63.4 198L64.1 198L64.8 198L65.5 198L66.3 198L67 198L67.7 198L68.4 198L69.1 198L69.9 198L70.6 198L71.3 198L72 198L72.8 198L73.5 198L74.2 198L74.9 198L75.7 198L76.4 198L77.1 198L77.8 198L78.5 198L79.3 198L80 198L80.7 198L81.4 198L82.2 198L82.9 198L83.6 198L84.3 198L85.1 198L85.8 198L86.5 198L87.2 198L88 198L88.7 198L89.4 198L90.1 198L90.8 198L91.6 198L92.3 198L93 198L93.7 198L94.5 198L95.2 198L95.9 198L96.6 197.9L97.4 197.9L98.1 197.9L98.8 197.9L99.5 197.9L100.3 197.9L101 197.8L101.7 197.8L102.4 197.8L103.1 197.7L103.9 197.6L104.6 197.6L105.3 197.5L106 197.4L106.8 197.3L107.5 197.2L108.2 197L108.9 196.9L109.7 196.7L110.4 196.5L111.1 196.2L111.8 195.9L112.5 195.6L113.3 195.2L114 194.8L114.7 194.3L115.4 193.8L116.2 193.2L116.9 192.5L117.6 191.8L118.3 190.9L119.1 190L119.8 189L120.5 187.8L121.2 186.6L121.9 185.2L122.7 183.7L123.4 182L124.1 180.2L124.1 198L46 198Z"/&gt;&lt;path fill="#e30613" d="M184.9 180.2L185.6 182L186.3 183.7L187.1 185.2L187.8 186.6L188.5 187.8L189.2 189L189.9 190L190.7 190.9L191.4 191.8L192.1 192.5L192.8 193.2L193.6 193.8L194.3 194.3L195 194.8L195.7 195.2L196.5 195.6L197.2 195.9L197.9 196.2L198.6 196.5L199.3 196.7L200.1 196.9L200.8 197L201.5 197.2L202.2 197.3L203 197.4L203.7 197.5L204.4 197.6L205.1 197.6L205.9 197.7L206.6 197.8L207.3 197.8L208 197.8L208.8 197.9L209.5 197.9L210.2 197.9L210.9 197.9L211.6 197.9L212.4 197.9L213.1 198L213.8 198L214.5 198L215.3 198L216 198L216.7 198L217.4 198L218.2 198L218.9 198L219.6 198L220.3 198L221 198L221.8 198L222.5 198L223.2 198L223.9 198L224.7 198L225.4 198L226.1 198L226.8 198L227.6 198L228.3 198L229 198L229.7 198L230.4 198L231.2 198L231.9 198L232.6 198L233.3 198L234.1 198L234.8 198L235.5 198L236.2 198L237 198L237.7 198L238.4 198L239.1 198L239.9 198L240.6 198L241.3 198L242 198L242.7 198L243.5 198L244.2 198L244.9 198L245.6 198L246.4 198L247.1 198L247.8 198L248.5 198L249.3 198L250 198L250.7 198L251.4 198L252.1 198L252.9 198L253.6 198L254.3 198L255 198L255.8 198L256.5 198L257.2 198L257.9 198L258.7 198L259.4 198L260.1 198L260.8 198L261.6 198L262.3 198L263 198L263 198L184.9 198Z"/&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 198L46.7 198L47.4 198L48.2 198L48.9 198L49.6 198L50.3 198L51.1 198L51.8 198L52.5 198L53.2 198L54 198L54.7 198L55.4 198L56.1 198L56.9 198L57.6 198L58.3 198L59 198L59.7 198L60.5 198L61.2 198L61.9 198L62.6 198L63.4 198L64.1 198L64.8 198L65.5 198L66.3 198L67 198L67.7 198L68.4 198L69.1 198L69.9 198L70.6 198L71.3 198L72 198L72.8 198L73.5 198L74.2 198L74.9 198L75.7 198L76.4 198L77.1 198L77.8 198L78.5 198L79.3 198L80 198L80.7 198L81.4 198L82.2 198L82.9 198L83.6 198L84.3 198L85.1 198L85.8 198L86.5 198L87.2 198L88 198L88.7 198L89.4 198L90.1 198L90.8 198L91.6 198L92.3 198L93 198L93.7 198L94.5 198L95.2 198L95.9 198L96.6 197.9L97.4 197.9L98.1 197.9L98.8 197.9L99.5 197.9L100.3 197.9L101 197.8L101.7 197.8L102.4 197.8L103.1 197.7L103.9 197.6L104.6 197.6L105.3 197.5L106 197.4L106.8 197.3L107.5 197.2L108.2 197L108.9 196.9L109.7 196.7L110.4 196.5L111.1 196.2L111.8 195.9L112.5 195.6L113.3 195.2L114 194.8L114.7 194.3L115.4 193.8L116.2 193.2L116.9 192.5L117.6 191.8L118.3 190.9L119.1 190L119.8 189L120.5 187.8L121.2 186.6L121.9 185.2L122.7 183.7L123.4 182L124.1 180.2L124.8 178.3L125.6 176.2L126.3 173.9L127 171.5L127.7 168.9L128.5 166.1L129.2 163.2L129.9 160L130.6 156.7L131.4 153.2L132.1 149.5L132.8 145.7L133.5 141.7L134.2 137.5L135 133.2L135.7 128.8L136.4 124.2L137.1 119.6L137.9 114.8L138.6 110L139.3 105.2L140 100.3L140.8 95.4L141.5 90.5L142.2 85.7L142.9 81L143.7 76.4L144.4 71.9L145.1 67.6L145.8 63.4L146.5 59.5L147.3 55.8L148 52.4L148.7 49.3L149.4 46.5L150.2 44L150.9 41.8L151.6 40.1L152.3 38.7L153.1 37.7L153.8 37.1L154.5 36.9L155.2 37.1L155.9 37.7L156.7 38.7L157.4 40.1L158.1 41.8L158.8 44L159.6 46.5L160.3 49.3L161 52.4L161.7 55.8L162.5 59.5L163.2 63.4L163.9 67.6L164.6 71.9L165.4 76.4L166.1 81L166.8 85.7L167.5 90.5L168.2 95.4L169 100.3L169.7 105.2L170.4 110L171.1 114.8L171.9 119.6L172.6 124.2L173.3 128.8L174 133.2L174.8 137.5L175.5 141.7L176.2 145.7L176.9 149.5L177.6 153.2L178.4 156.7L179.1 160L179.8 163.2L180.5 166.1L181.3 168.9L182 171.5L182.7 173.9L183.4 176.2L184.2 178.3L184.9 180.2L185.6 182L186.3 183.7L187.1 185.2L187.8 186.6L188.5 187.8L189.2 189L189.9 190L190.7 190.9L191.4 191.8L192.1 192.5L192.8 193.2L193.6 193.8L194.3 194.3L195 194.8L195.7 195.2L196.5 195.6L197.2 195.9L197.9 196.2L198.6 196.5L199.3 196.7L200.1 196.9L200.8 197L201.5 197.2L202.2 197.3L203 197.4L203.7 197.5L204.4 197.6L205.1 197.6L205.9 197.7L206.6 197.8L207.3 197.8L208 197.8L208.8 197.9L209.5 197.9L210.2 197.9L210.9 197.9L211.6 197.9L212.4 197.9L213.1 198L213.8 198L214.5 198L215.3 198L216 198L216.7 198L217.4 198L218.2 198L218.9 198L219.6 198L220.3 198L221 198L221.8 198L222.5 198L223.2 198L223.9 198L224.7 198L225.4 198L226.1 198L226.8 198L227.6 198L228.3 198L229 198L229.7 198L230.4 198L231.2 198L231.9 198L232.6 198L233.3 198L234.1 198L234.8 198L235.5 198L236.2 198L237 198L237.7 198L238.4 198L239.1 198L239.9 198L240.6 198L241.3 198L242 198L242.7 198L243.5 198L244.2 198L244.9 198L245.6 198L246.4 198L247.1 198L247.8 198L248.5 198L249.3 198L250 198L250.7 198L251.4 198L252.1 198L252.9 198L253.6 198L254.3 198L255 198L255.8 198L256.5 198L257.2 198L257.9 198L258.7 198L259.4 198L260.1 198L260.8 198L261.6 198L262.3 198L263 198"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Distribution of Weights&lt;/div&gt;&lt;div class="chart-sub"&gt;[arctan, γ = 1.4, σ² = 7.84]&lt;/div&gt;&lt;div class="chart-sub"&gt;P(f′(x) &amp;lt; 0.001) = 0.00000%&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="Distribution of Weights [arctan, γ = 1.4, σ² = 7.84] P(f′(x) &amp;lt; 0.001) = 0.00000%" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig3-1"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;0.00&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="152.8" y2="152.8"/&gt;&lt;text x="38" y="156.8" text-anchor="end"&gt;0.04&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="107.5" y2="107.5"/&gt;&lt;text x="38" y="111.5" text-anchor="end"&gt;0.08&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="62.3" y2="62.3"/&gt;&lt;text x="38" y="66.3" text-anchor="end"&gt;0.12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="198" y2="202"/&gt;&lt;text x="46" y="215" text-anchor="middle"&gt;-15&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="82.2" x2="82.2" y1="198" y2="202"/&gt;&lt;text x="82.2" y="215" text-anchor="middle"&gt;-10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="118.3" x2="118.3" y1="198" y2="202"/&gt;&lt;text x="118.3" y="215" text-anchor="middle"&gt;-5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="154.5" x2="154.5" y1="198" y2="202"/&gt;&lt;text x="154.5" y="215" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190.7" x2="190.7" y1="198" y2="202"/&gt;&lt;text x="190.7" y="215" text-anchor="middle"&gt;5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="226.8" x2="226.8" y1="198" y2="202"/&gt;&lt;text x="226.8" y="215" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="263" x2="263" y1="198" y2="202"/&gt;&lt;text x="263" y="215" text-anchor="middle"&gt;15&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Probability&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Weight&lt;/text&gt;&lt;g clip-path="url(#fig3-1)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 198L46.7 198L47.4 198L48.2 198L48.9 198L49.6 198L50.3 198L51.1 198L51.8 198L52.5 198L53.2 198L54 198L54.7 198L55.4 198L56.1 198L56.9 198L57.6 198L58.3 198L59 198L59.7 198L60.5 198L61.2 198L61.9 198L62.6 198L63.4 198L64.1 198L64.8 198L65.5 198L66.3 198L67 198L67.7 198L68.4 198L69.1 198L69.9 198L70.6 198L71.3 198L72 198L72.8 198L73.5 197.9L74.2 197.9L74.9 197.9L75.7 197.9L76.4 197.9L77.1 197.9L77.8 197.9L78.5 197.9L79.3 197.8L80 197.8L80.7 197.8L81.4 197.8L82.2 197.7L82.9 197.7L83.6 197.6L84.3 197.6L85.1 197.5L85.8 197.5L86.5 197.4L87.2 197.4L88 197.3L88.7 197.2L89.4 197.1L90.1 197L90.8 196.8L91.6 196.7L92.3 196.6L93 196.4L93.7 196.2L94.5 196L95.2 195.8L95.9 195.5L96.6 195.3L97.4 195L98.1 194.7L98.8 194.3L99.5 194L100.3 193.5L101 193.1L101.7 192.6L102.4 192.1L103.1 191.5L103.9 190.9L104.6 190.3L105.3 189.6L106 188.8L106.8 188L107.5 187.1L108.2 186.2L108.9 185.2L109.7 184.1L110.4 183L111.1 181.8L111.8 180.5L112.5 179.1L113.3 177.7L114 176.2L114.7 174.6L115.4 172.9L116.2 171.1L116.9 169.3L117.6 167.3L118.3 165.3L119.1 163.2L119.8 160.9L120.5 158.6L121.2 156.2L121.9 153.7L122.7 151.1L123.4 148.5L124.1 145.7L124.8 142.9L125.6 139.9L126.3 136.9L127 133.9L127.7 130.7L128.5 127.5L129.2 124.2L129.9 120.9L130.6 117.6L131.4 114.1L132.1 110.7L132.8 107.2L133.5 103.8L134.2 100.3L135 96.8L135.7 93.3L136.4 89.9L137.1 86.4L137.9 83L138.6 79.7L139.3 76.4L140 73.2L140.8 70L141.5 67L142.2 64L142.9 61.2L143.7 58.4L144.4 55.8L145.1 53.4L145.8 51L146.5 48.9L147.3 46.8L148 45L148.7 43.3L149.4 41.8L150.2 40.5L150.9 39.4L151.6 38.5L152.3 37.8L153.1 37.3L153.8 37L154.5 36.9L155.2 37L155.9 37.3L156.7 37.8L157.4 38.5L158.1 39.4L158.8 40.5L159.6 41.8L160.3 43.3L161 45L161.7 46.8L162.5 48.9L163.2 51L163.9 53.4L164.6 55.8L165.4 58.4L166.1 61.2L166.8 64L167.5 67L168.2 70L169 73.2L169.7 76.4L170.4 79.7L171.1 83L171.9 86.4L172.6 89.9L173.3 93.3L174 96.8L174.8 100.3L175.5 103.8L176.2 107.2L176.9 110.7L177.6 114.1L178.4 117.6L179.1 120.9L179.8 124.2L180.5 127.5L181.3 130.7L182 133.9L182.7 136.9L183.4 139.9L184.2 142.9L184.9 145.7L185.6 148.5L186.3 151.1L187.1 153.7L187.8 156.2L188.5 158.6L189.2 160.9L189.9 163.2L190.7 165.3L191.4 167.3L192.1 169.3L192.8 171.1L193.6 172.9L194.3 174.6L195 176.2L195.7 177.7L196.5 179.1L197.2 180.5L197.9 181.8L198.6 183L199.3 184.1L200.1 185.2L200.8 186.2L201.5 187.1L202.2 188L203 188.8L203.7 189.6L204.4 190.3L205.1 190.9L205.9 191.5L206.6 192.1L207.3 192.6L208 193.1L208.8 193.5L209.5 194L210.2 194.3L210.9 194.7L211.6 195L212.4 195.3L213.1 195.5L213.8 195.8L214.5 196L215.3 196.2L216 196.4L216.7 196.6L217.4 196.7L218.2 196.8L218.9 197L219.6 197.1L220.3 197.2L221 197.3L221.8 197.4L222.5 197.4L223.2 197.5L223.9 197.5L224.7 197.6L225.4 197.6L226.1 197.7L226.8 197.7L227.6 197.8L228.3 197.8L229 197.8L229.7 197.8L230.4 197.9L231.2 197.9L231.9 197.9L232.6 197.9L233.3 197.9L234.1 197.9L234.8 197.9L235.5 197.9L236.2 198L237 198L237.7 198L238.4 198L239.1 198L239.9 198L240.6 198L241.3 198L242 198L242.7 198L243.5 198L244.2 198L244.9 198L245.6 198L246.4 198L247.1 198L247.8 198L248.5 198L249.3 198L250 198L250.7 198L251.4 198L252.1 198L252.9 198L253.6 198L254.3 198L255 198L255.8 198L256.5 198L257.2 198L257.9 198L258.7 198L259.4 198L260.1 198L260.8 198L261.6 198L262.3 198L263 198"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Distribution of Weights&lt;/div&gt;&lt;div class="chart-sub"&gt;[arctan, γ = 1.8, σ² = 12.96]&lt;/div&gt;&lt;div class="chart-sub"&gt;P(f′(x) &amp;lt; 0.001) = 0.00000%&lt;/div&gt;&lt;svg viewBox="0 0 275 230" role="img" aria-label="Distribution of Weights [arctan, γ = 1.8, σ² = 12.96] P(f′(x) &amp;lt; 0.001) = 0.00000%" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig3-2"&gt;&lt;rect x="46" y="24" width="217" height="174"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;text x="38" y="202" text-anchor="end"&gt;0.00&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="168.9" y2="168.9"/&gt;&lt;text x="38" y="172.9" text-anchor="end"&gt;0.02&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="139.8" y2="139.8"/&gt;&lt;text x="38" y="143.8" text-anchor="end"&gt;0.04&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="110.8" y2="110.8"/&gt;&lt;text x="38" y="114.8" text-anchor="end"&gt;0.06&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="81.7" y2="81.7"/&gt;&lt;text x="38" y="85.7" text-anchor="end"&gt;0.08&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="263" y1="52.6" y2="52.6"/&gt;&lt;text x="38" y="56.6" text-anchor="end"&gt;0.10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="198" y2="202"/&gt;&lt;text x="46" y="215" text-anchor="middle"&gt;-15&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="82.2" x2="82.2" y1="198" y2="202"/&gt;&lt;text x="82.2" y="215" text-anchor="middle"&gt;-10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="118.3" x2="118.3" y1="198" y2="202"/&gt;&lt;text x="118.3" y="215" text-anchor="middle"&gt;-5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="154.5" x2="154.5" y1="198" y2="202"/&gt;&lt;text x="154.5" y="215" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190.7" x2="190.7" y1="198" y2="202"/&gt;&lt;text x="190.7" y="215" text-anchor="middle"&gt;5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="226.8" x2="226.8" y1="198" y2="202"/&gt;&lt;text x="226.8" y="215" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="263" x2="263" y1="198" y2="202"/&gt;&lt;text x="263" y="215" text-anchor="middle"&gt;15&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Probability&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="263" y="228" text-anchor="end"&gt;Weight&lt;/text&gt;&lt;g clip-path="url(#fig3-2)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 198L46.7 198L47.4 198L48.2 198L48.9 198L49.6 198L50.3 197.9L51.1 197.9L51.8 197.9L52.5 197.9L53.2 197.9L54 197.9L54.7 197.9L55.4 197.9L56.1 197.9L56.9 197.9L57.6 197.8L58.3 197.8L59 197.8L59.7 197.8L60.5 197.8L61.2 197.7L61.9 197.7L62.6 197.7L63.4 197.6L64.1 197.6L64.8 197.6L65.5 197.5L66.3 197.5L67 197.4L67.7 197.4L68.4 197.3L69.1 197.3L69.9 197.2L70.6 197.1L71.3 197L72 196.9L72.8 196.8L73.5 196.7L74.2 196.6L74.9 196.5L75.7 196.4L76.4 196.2L77.1 196.1L77.8 195.9L78.5 195.7L79.3 195.5L80 195.3L80.7 195.1L81.4 194.9L82.2 194.6L82.9 194.3L83.6 194L84.3 193.7L85.1 193.4L85.8 193L86.5 192.7L87.2 192.3L88 191.8L88.7 191.4L89.4 190.9L90.1 190.4L90.8 189.9L91.6 189.3L92.3 188.7L93 188.1L93.7 187.4L94.5 186.7L95.2 186L95.9 185.2L96.6 184.4L97.4 183.5L98.1 182.6L98.8 181.6L99.5 180.6L100.3 179.6L101 178.5L101.7 177.4L102.4 176.2L103.1 175L103.9 173.7L104.6 172.3L105.3 170.9L106 169.5L106.8 168L107.5 166.4L108.2 164.8L108.9 163.2L109.7 161.4L110.4 159.7L111.1 157.8L111.8 155.9L112.5 154L113.3 152L114 150L114.7 147.8L115.4 145.7L116.2 143.5L116.9 141.2L117.6 138.9L118.3 136.6L119.1 134.2L119.8 131.8L120.5 129.3L121.2 126.8L121.9 124.2L122.7 121.7L123.4 119.1L124.1 116.4L124.8 113.8L125.6 111.1L126.3 108.4L127 105.7L127.7 103L128.5 100.3L129.2 97.6L129.9 94.9L130.6 92.2L131.4 89.5L132.1 86.8L132.8 84.2L133.5 81.5L134.2 78.9L135 76.4L135.7 73.9L136.4 71.4L137.1 69L137.9 66.6L138.6 64.3L139.3 62.1L140 59.9L140.8 57.8L141.5 55.8L142.2 53.9L142.9 52L143.7 50.3L144.4 48.6L145.1 47.1L145.8 45.6L146.5 44.2L147.3 43L148 41.8L148.7 40.8L149.4 39.9L150.2 39.1L150.9 38.4L151.6 37.9L152.3 37.4L153.1 37.1L153.8 37L154.5 36.9L155.2 37L155.9 37.1L156.7 37.4L157.4 37.9L158.1 38.4L158.8 39.1L159.6 39.9L160.3 40.8L161 41.8L161.7 43L162.5 44.2L163.2 45.6L163.9 47.1L164.6 48.6L165.4 50.3L166.1 52L166.8 53.9L167.5 55.8L168.2 57.8L169 59.9L169.7 62.1L170.4 64.3L171.1 66.6L171.9 69L172.6 71.4L173.3 73.9L174 76.4L174.8 78.9L175.5 81.5L176.2 84.2L176.9 86.8L177.6 89.5L178.4 92.2L179.1 94.9L179.8 97.6L180.5 100.3L181.3 103L182 105.7L182.7 108.4L183.4 111.1L184.2 113.8L184.9 116.4L185.6 119.1L186.3 121.7L187.1 124.2L187.8 126.8L188.5 129.3L189.2 131.8L189.9 134.2L190.7 136.6L191.4 138.9L192.1 141.2L192.8 143.5L193.6 145.7L194.3 147.8L195 150L195.7 152L196.5 154L197.2 155.9L197.9 157.8L198.6 159.7L199.3 161.4L200.1 163.2L200.8 164.8L201.5 166.4L202.2 168L203 169.5L203.7 170.9L204.4 172.3L205.1 173.7L205.9 175L206.6 176.2L207.3 177.4L208 178.5L208.8 179.6L209.5 180.6L210.2 181.6L210.9 182.6L211.6 183.5L212.4 184.4L213.1 185.2L213.8 186L214.5 186.7L215.3 187.4L216 188.1L216.7 188.7L217.4 189.3L218.2 189.9L218.9 190.4L219.6 190.9L220.3 191.4L221 191.8L221.8 192.3L222.5 192.7L223.2 193L223.9 193.4L224.7 193.7L225.4 194L226.1 194.3L226.8 194.6L227.6 194.9L228.3 195.1L229 195.3L229.7 195.5L230.4 195.7L231.2 195.9L231.9 196.1L232.6 196.2L233.3 196.4L234.1 196.5L234.8 196.6L235.5 196.7L236.2 196.8L237 196.9L237.7 197L238.4 197.1L239.1 197.2L239.9 197.3L240.6 197.3L241.3 197.4L242 197.4L242.7 197.5L243.5 197.5L244.2 197.6L244.9 197.6L245.6 197.6L246.4 197.7L247.1 197.7L247.8 197.7L248.5 197.8L249.3 197.8L250 197.8L250.7 197.8L251.4 197.8L252.1 197.9L252.9 197.9L253.6 197.9L254.3 197.9L255 197.9L255.8 197.9L256.5 197.9L257.2 197.9L257.9 197.9L258.7 197.9L259.4 198L260.1 198L260.8 198L261.6 198L262.3 198L263 198"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="198"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="263" y1="198" y2="198"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 3: Probability distribution of weights initialized using our method. Shaded area shows gradients that cause network to learn “slowly” (\(f'(w) &lt; 0.001\)).&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;One problem that remains is the activator function. As universal as the solution in Equation \(\ref{eq_var_fix_e2}\) sounds, it cannot used with non zero-meaned or strict activators like sigmoid or tanh, nor with functions that do not follow the rules of Universal Approximation Theorem&lt;a href="#ref-8"&gt;[8]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We will declare weights where \(f'(w) &lt; 0.001\) “slow”, and visualize the problem. As it can be seen in Figure 3, when we use tanh as the activator, \(\approx 4\%\) of the network is learning “slowly” when there is only one layer. This effect increases exponentially as the number of layers increase.&lt;/p&gt;
&lt;p&gt;Instead of an exponentially increasing function like sigmoid or tanh, we are going to use arctan which increases quadratically and squash it using a hyper-parameter, \(\gamma\) as seen in Equation \(\ref{eq_arctan}\).&lt;/p&gt;
$$
\begin{align}
f(x) = \frac{1}{\gamma} \arctan(x)
\label{eq_arctan}
\end{align}
$$&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;tanh(x)&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;arctan(x)/1.495&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig4-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="284.3" y2="284.3"/&gt;&lt;text x="38" y="288.3" text-anchor="end"&gt;-1.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="225.2" y2="225.2"/&gt;&lt;text x="38" y="229.2" text-anchor="end"&gt;-0.5&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="166" y2="166"/&gt;&lt;text x="38" y="170" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="106.8" y2="106.8"/&gt;&lt;text x="38" y="110.8" text-anchor="end"&gt;0.5&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="47.7" y2="47.7"/&gt;&lt;text x="38" y="51.7" text-anchor="end"&gt;1.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="308" y2="312"/&gt;&lt;text x="46" y="325" text-anchor="middle"&gt;-10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="191.5" x2="191.5" y1="308" y2="312"/&gt;&lt;text x="191.5" y="325" text-anchor="middle"&gt;-5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="337" x2="337" y1="308" y2="312"/&gt;&lt;text x="337" y="325" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="482.5" x2="482.5" y1="308" y2="312"/&gt;&lt;text x="482.5" y="325" text-anchor="middle"&gt;5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="628" x2="628" y1="308" y2="312"/&gt;&lt;text x="628" y="325" text-anchor="middle"&gt;10&lt;/text&gt;&lt;g clip-path="url(#fig4-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 284.3L47.5 284.3L48.9 284.3L50.4 284.3L51.8 284.3L53.3 284.3L54.7 284.3L56.2 284.3L57.6 284.3L59.1 284.3L60.5 284.3L62 284.3L63.5 284.3L64.9 284.3L66.4 284.3L67.8 284.3L69.3 284.3L70.7 284.3L72.2 284.3L73.6 284.3L75.1 284.3L76.6 284.3L78 284.3L79.5 284.3L80.9 284.3L82.4 284.3L83.8 284.3L85.3 284.3L86.7 284.3L88.2 284.3L89.7 284.3L91.1 284.3L92.6 284.3L94 284.3L95.5 284.3L96.9 284.3L98.4 284.3L99.8 284.3L101.3 284.3L102.7 284.3L104.2 284.3L105.7 284.3L107.1 284.3L108.6 284.3L110 284.3L111.5 284.3L112.9 284.3L114.4 284.3L115.8 284.3L117.3 284.3L118.8 284.3L120.2 284.3L121.7 284.3L123.1 284.3L124.6 284.3L126 284.3L127.5 284.3L128.9 284.3L130.4 284.3L131.8 284.3L133.3 284.3L134.8 284.3L136.2 284.3L137.7 284.3L139.1 284.3L140.6 284.3L142 284.3L143.5 284.3L144.9 284.3L146.4 284.3L147.8 284.3L149.3 284.3L150.8 284.3L152.2 284.3L153.7 284.3L155.1 284.3L156.6 284.3L158 284.3L159.5 284.3L160.9 284.3L162.4 284.3L163.9 284.3L165.3 284.3L166.8 284.3L168.2 284.3L169.7 284.3L171.1 284.3L172.6 284.3L174 284.3L175.5 284.3L177 284.3L178.4 284.3L179.9 284.3L181.3 284.3L182.8 284.3L184.2 284.3L185.7 284.3L187.1 284.3L188.6 284.3L190 284.3L191.5 284.3L193 284.3L194.4 284.3L195.9 284.3L197.3 284.3L198.8 284.3L200.2 284.3L201.7 284.3L203.1 284.3L204.6 284.3L206.1 284.3L207.5 284.3L209 284.3L210.4 284.3L211.9 284.3L213.3 284.3L214.8 284.3L216.2 284.3L217.7 284.3L219.1 284.3L220.6 284.3L222.1 284.2L223.5 284.2L225 284.2L226.4 284.2L227.9 284.2L229.3 284.2L230.8 284.2L232.2 284.2L233.7 284.1L235.2 284.1L236.6 284.1L238.1 284.1L239.5 284L241 284L242.4 284L243.9 283.9L245.3 283.9L246.8 283.9L248.2 283.8L249.7 283.7L251.2 283.7L252.6 283.6L254.1 283.5L255.5 283.5L257 283.4L258.4 283.3L259.9 283.2L261.3 283L262.8 282.9L264.3 282.7L265.7 282.6L267.2 282.4L268.6 282.2L270.1 282L271.5 281.7L273 281.5L274.4 281.2L275.9 280.8L277.3 280.5L278.8 280.1L280.3 279.6L281.7 279.2L283.2 278.6L284.6 278L286.1 277.4L287.5 276.7L289 275.9L290.4 275.1L291.9 274.1L293.4 273.1L294.8 272L296.3 270.8L297.7 269.4L299.2 268L300.6 266.4L302.1 264.6L303.5 262.8L305 260.7L306.4 258.5L307.9 256.1L309.4 253.5L310.8 250.8L312.3 247.8L313.7 244.6L315.2 241.2L316.6 237.5L318.1 233.6L319.5 229.6L321 225.2L322.4 220.7L323.9 215.9L325.4 211L326.8 205.8L328.3 200.5L329.7 195L331.2 189.4L332.6 183.6L334.1 177.8L335.5 171.9L337 166L338.5 160.1L339.9 154.2L341.4 148.4L342.8 142.6L344.3 137L345.7 131.5L347.2 126.2L348.6 121L350.1 116.1L351.6 111.3L353 106.8L354.5 102.4L355.9 98.4L357.4 94.5L358.8 90.8L360.3 87.4L361.7 84.2L363.2 81.2L364.6 78.5L366.1 75.9L367.6 73.5L369 71.3L370.5 69.2L371.9 67.4L373.4 65.6L374.8 64L376.3 62.6L377.7 61.2L379.2 60L380.6 58.9L382.1 57.9L383.6 56.9L385 56.1L386.5 55.3L387.9 54.6L389.4 54L390.8 53.4L392.3 52.8L393.7 52.4L395.2 51.9L396.7 51.5L398.1 51.2L399.6 50.8L401 50.5L402.5 50.3L403.9 50L405.4 49.8L406.8 49.6L408.3 49.4L409.8 49.3L411.2 49.1L412.7 49L414.1 48.8L415.6 48.7L417 48.6L418.5 48.5L419.9 48.5L421.4 48.4L422.8 48.3L424.3 48.3L425.8 48.2L427.2 48.1L428.7 48.1L430.1 48.1L431.6 48L433 48L434.5 48L435.9 47.9L437.4 47.9L438.9 47.9L440.3 47.9L441.8 47.8L443.2 47.8L444.7 47.8L446.1 47.8L447.6 47.8L449 47.8L450.5 47.8L451.9 47.8L453.4 47.7L454.9 47.7L456.3 47.7L457.8 47.7L459.2 47.7L460.7 47.7L462.1 47.7L463.6 47.7L465 47.7L466.5 47.7L467.9 47.7L469.4 47.7L470.9 47.7L472.3 47.7L473.8 47.7L475.2 47.7L476.7 47.7L478.1 47.7L479.6 47.7L481 47.7L482.5 47.7L484 47.7L485.4 47.7L486.9 47.7L488.3 47.7L489.8 47.7L491.2 47.7L492.7 47.7L494.1 47.7L495.6 47.7L497.1 47.7L498.5 47.7L500 47.7L501.4 47.7L502.9 47.7L504.3 47.7L505.8 47.7L507.2 47.7L508.7 47.7L510.1 47.7L511.6 47.7L513.1 47.7L514.5 47.7L516 47.7L517.4 47.7L518.9 47.7L520.3 47.7L521.8 47.7L523.2 47.7L524.7 47.7L526.1 47.7L527.6 47.7L529.1 47.7L530.5 47.7L532 47.7L533.4 47.7L534.9 47.7L536.3 47.7L537.8 47.7L539.2 47.7L540.7 47.7L542.2 47.7L543.6 47.7L545.1 47.7L546.5 47.7L548 47.7L549.4 47.7L550.9 47.7L552.3 47.7L553.8 47.7L555.3 47.7L556.7 47.7L558.2 47.7L559.6 47.7L561.1 47.7L562.5 47.7L564 47.7L565.4 47.7L566.9 47.7L568.3 47.7L569.8 47.7L571.3 47.7L572.7 47.7L574.2 47.7L575.6 47.7L577.1 47.7L578.5 47.7L580 47.7L581.4 47.7L582.9 47.7L584.4 47.7L585.8 47.7L587.3 47.7L588.7 47.7L590.2 47.7L591.6 47.7L593.1 47.7L594.5 47.7L596 47.7L597.4 47.7L598.9 47.7L600.4 47.7L601.8 47.7L603.3 47.7L604.7 47.7L606.2 47.7L607.6 47.7L609.1 47.7L610.5 47.7L612 47.7L613.4 47.7L614.9 47.7L616.4 47.7L617.8 47.7L619.3 47.7L620.7 47.7L622.2 47.7L623.6 47.7L625.1 47.7L626.5 47.7L628 47.7"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 282.4L47.5 282.4L48.9 282.4L50.4 282.3L51.8 282.3L53.3 282.2L54.7 282.2L56.2 282.2L57.6 282.1L59.1 282.1L60.5 282L62 282L63.5 281.9L64.9 281.9L66.4 281.9L67.8 281.8L69.3 281.8L70.7 281.7L72.2 281.7L73.6 281.6L75.1 281.6L76.6 281.5L78 281.5L79.5 281.4L80.9 281.4L82.4 281.3L83.8 281.3L85.3 281.2L86.7 281.2L88.2 281.1L89.7 281.1L91.1 281L92.6 281L94 280.9L95.5 280.8L96.9 280.8L98.4 280.7L99.8 280.7L101.3 280.6L102.7 280.6L104.2 280.5L105.7 280.4L107.1 280.4L108.6 280.3L110 280.2L111.5 280.2L112.9 280.1L114.4 280L115.8 280L117.3 279.9L118.8 279.8L120.2 279.8L121.7 279.7L123.1 279.6L124.6 279.6L126 279.5L127.5 279.4L128.9 279.3L130.4 279.3L131.8 279.2L133.3 279.1L134.8 279L136.2 278.9L137.7 278.9L139.1 278.8L140.6 278.7L142 278.6L143.5 278.5L144.9 278.4L146.4 278.3L147.8 278.3L149.3 278.2L150.8 278.1L152.2 278L153.7 277.9L155.1 277.8L156.6 277.7L158 277.6L159.5 277.5L160.9 277.4L162.4 277.3L163.9 277.2L165.3 277L166.8 276.9L168.2 276.8L169.7 276.7L171.1 276.6L172.6 276.5L174 276.3L175.5 276.2L177 276.1L178.4 276L179.9 275.8L181.3 275.7L182.8 275.6L184.2 275.4L185.7 275.3L187.1 275.2L188.6 275L190 274.9L191.5 274.7L193 274.6L194.4 274.4L195.9 274.2L197.3 274.1L198.8 273.9L200.2 273.7L201.7 273.6L203.1 273.4L204.6 273.2L206.1 273L207.5 272.8L209 272.6L210.4 272.4L211.9 272.2L213.3 272L214.8 271.8L216.2 271.6L217.7 271.4L219.1 271.2L220.6 270.9L222.1 270.7L223.5 270.5L225 270.2L226.4 270L227.9 269.7L229.3 269.4L230.8 269.2L232.2 268.9L233.7 268.6L235.2 268.3L236.6 268L238.1 267.7L239.5 267.4L241 267L242.4 266.7L243.9 266.4L245.3 266L246.8 265.6L248.2 265.3L249.7 264.9L251.2 264.5L252.6 264L254.1 263.6L255.5 263.2L257 262.7L258.4 262.3L259.9 261.8L261.3 261.3L262.8 260.8L264.3 260.2L265.7 259.7L267.2 259.1L268.6 258.5L270.1 257.9L271.5 257.2L273 256.6L274.4 255.9L275.9 255.2L277.3 254.4L278.8 253.6L280.3 252.8L281.7 252L283.2 251.1L284.6 250.2L286.1 249.2L287.5 248.2L289 247.2L290.4 246.1L291.9 245L293.4 243.8L294.8 242.5L296.3 241.2L297.7 239.9L299.2 238.4L300.6 236.9L302.1 235.3L303.5 233.7L305 231.9L306.4 230.1L307.9 228.2L309.4 226.1L310.8 224L312.3 221.8L313.7 219.4L315.2 216.9L316.6 214.3L318.1 211.6L319.5 208.8L321 205.8L322.4 202.7L323.9 199.5L325.4 196.1L326.8 192.6L328.3 189.1L329.7 185.4L331.2 181.6L332.6 177.8L334.1 173.9L335.5 170L337 166L338.5 162L339.9 158.1L341.4 154.2L342.8 150.4L344.3 146.6L345.7 142.9L347.2 139.4L348.6 135.9L350.1 132.5L351.6 129.3L353 126.2L354.5 123.2L355.9 120.4L357.4 117.7L358.8 115.1L360.3 112.6L361.7 110.2L363.2 108L364.6 105.9L366.1 103.8L367.6 101.9L369 100.1L370.5 98.3L371.9 96.7L373.4 95.1L374.8 93.6L376.3 92.1L377.7 90.8L379.2 89.5L380.6 88.2L382.1 87L383.6 85.9L385 84.8L386.5 83.8L387.9 82.8L389.4 81.8L390.8 80.9L392.3 80L393.7 79.2L395.2 78.4L396.7 77.6L398.1 76.8L399.6 76.1L401 75.4L402.5 74.8L403.9 74.1L405.4 73.5L406.8 72.9L408.3 72.3L409.8 71.8L411.2 71.2L412.7 70.7L414.1 70.2L415.6 69.7L417 69.3L418.5 68.8L419.9 68.4L421.4 68L422.8 67.5L424.3 67.1L425.8 66.7L427.2 66.4L428.7 66L430.1 65.6L431.6 65.3L433 65L434.5 64.6L435.9 64.3L437.4 64L438.9 63.7L440.3 63.4L441.8 63.1L443.2 62.8L444.7 62.6L446.1 62.3L447.6 62L449 61.8L450.5 61.5L451.9 61.3L453.4 61.1L454.9 60.8L456.3 60.6L457.8 60.4L459.2 60.2L460.7 60L462.1 59.8L463.6 59.6L465 59.4L466.5 59.2L467.9 59L469.4 58.8L470.9 58.6L472.3 58.4L473.8 58.3L475.2 58.1L476.7 57.9L478.1 57.8L479.6 57.6L481 57.4L482.5 57.3L484 57.1L485.4 57L486.9 56.8L488.3 56.7L489.8 56.6L491.2 56.4L492.7 56.3L494.1 56.2L495.6 56L497.1 55.9L498.5 55.8L500 55.7L501.4 55.5L502.9 55.4L504.3 55.3L505.8 55.2L507.2 55.1L508.7 55L510.1 54.8L511.6 54.7L513.1 54.6L514.5 54.5L516 54.4L517.4 54.3L518.9 54.2L520.3 54.1L521.8 54L523.2 53.9L524.7 53.8L526.1 53.7L527.6 53.7L529.1 53.6L530.5 53.5L532 53.4L533.4 53.3L534.9 53.2L536.3 53.1L537.8 53.1L539.2 53L540.7 52.9L542.2 52.8L543.6 52.7L545.1 52.7L546.5 52.6L548 52.5L549.4 52.4L550.9 52.4L552.3 52.3L553.8 52.2L555.3 52.2L556.7 52.1L558.2 52L559.6 52L561.1 51.9L562.5 51.8L564 51.8L565.4 51.7L566.9 51.6L568.3 51.6L569.8 51.5L571.3 51.4L572.7 51.4L574.2 51.3L575.6 51.3L577.1 51.2L578.5 51.2L580 51.1L581.4 51L582.9 51L584.4 50.9L585.8 50.9L587.3 50.8L588.7 50.8L590.2 50.7L591.6 50.7L593.1 50.6L594.5 50.6L596 50.5L597.4 50.5L598.9 50.4L600.4 50.4L601.8 50.3L603.3 50.3L604.7 50.2L606.2 50.2L607.6 50.1L609.1 50.1L610.5 50.1L612 50L613.4 50L614.9 49.9L616.4 49.9L617.8 49.8L619.3 49.8L620.7 49.8L622.2 49.7L623.6 49.7L625.1 49.6L626.5 49.6L628 49.6"/&gt;&lt;path fill="none" stroke="#757575" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M46 290.3L337 290.3"/&gt;&lt;path fill="none" stroke="#757575" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M337 41.7L628 41.7"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 4: Comparison of arctan and tanh.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;As it can be seen from the 2nd and 3rd graphs of Figure 3, due to its quadratically increasing nature, the proposed activator did not experience the issue tanh activator did even though the variation was much higher with arctan.&lt;/p&gt;
&lt;h2 id="0x3-experimental-setup-and-datasets"&gt;&lt;span class="hx"&gt;0x3:&lt;/span&gt; Experimental Setup and Datasets&lt;/h2&gt;
&lt;p&gt;We are going to be using MNIST (Figure 5), STL-10 (Figure 6) and a custom dataset (Figure 7) when benchmarking our technique and compare it with other techniques. STL-10 is a particularly interesting challenge as it only contains 500 images per class.&lt;/p&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src="images/fig5.webp" alt="Examples from MNIST"&gt;&lt;/p&gt;
&lt;figcaption&gt;Figure 5: Examples from MNIST&lt;a href="#ref-9"&gt;[9]&lt;/a&gt; dataset.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src="images/fig6.webp" alt="Examples from STL-10"&gt;&lt;/p&gt;
&lt;figcaption&gt;Figure 6: Examples from STL-10&lt;a href="#ref-10"&gt;[10]&lt;/a&gt; dataset.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src="images/fig7.webp" alt="Examples from the custom dataset"&gt;&lt;/p&gt;
&lt;figcaption&gt;Figure 7: Examples from our custom dataset.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;As all of these tasks are classification tasks, cross entropy will be used and every network will be regularized using L2 regularization with regularization coefficient \(\lambda = 10^{-4}\). All benchmarks will be done using a custom CUDA library and GTX 1080.&lt;/p&gt;
&lt;h2 id="0x4-results"&gt;&lt;span class="hx"&gt;0x4:&lt;/span&gt; Results&lt;/h2&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:2;max-width:880px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Var(δ) per Layer&lt;/div&gt;&lt;svg viewBox="0 0 426 280" role="img" aria-label="Var(δ) per Layer" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig8-0"&gt;&lt;rect x="46" y="24" width="368" height="224"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;text x="38" y="252" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−4&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="205.7" y2="205.7"/&gt;&lt;text x="38" y="209.7" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−3&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="163.5" y2="163.5"/&gt;&lt;text x="38" y="167.5" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−2&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="121.2" y2="121.2"/&gt;&lt;text x="38" y="125.2" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;−1&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="78.9" y2="78.9"/&gt;&lt;text x="38" y="82.9" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;0&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="36.7" y2="36.7"/&gt;&lt;text x="38" y="40.7" text-anchor="end"&gt;10&lt;tspan dy="-5" font-size="0.72em"&gt;1&lt;/tspan&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="248" y2="252"/&gt;&lt;text x="46" y="265" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="62" x2="62" y1="248" y2="252"/&gt;&lt;text x="62" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="78" x2="78" y1="248" y2="252"/&gt;&lt;text x="78" y="265" text-anchor="middle"&gt;2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="94" x2="94" y1="248" y2="252"/&gt;&lt;text x="94" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="110" x2="110" y1="248" y2="252"/&gt;&lt;text x="110" y="265" text-anchor="middle"&gt;4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="126" x2="126" y1="248" y2="252"/&gt;&lt;text x="126" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="142" x2="142" y1="248" y2="252"/&gt;&lt;text x="142" y="265" text-anchor="middle"&gt;6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="158" x2="158" y1="248" y2="252"/&gt;&lt;text x="158" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="174" x2="174" y1="248" y2="252"/&gt;&lt;text x="174" y="265" text-anchor="middle"&gt;8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190" x2="190" y1="248" y2="252"/&gt;&lt;text x="190" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="206" x2="206" y1="248" y2="252"/&gt;&lt;text x="206" y="265" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="222" x2="222" y1="248" y2="252"/&gt;&lt;text x="222" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="238" x2="238" y1="248" y2="252"/&gt;&lt;text x="238" y="265" text-anchor="middle"&gt;12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="254" x2="254" y1="248" y2="252"/&gt;&lt;text x="254" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="270" x2="270" y1="248" y2="252"/&gt;&lt;text x="270" y="265" text-anchor="middle"&gt;14&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="286" x2="286" y1="248" y2="252"/&gt;&lt;text x="286" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="302" x2="302" y1="248" y2="252"/&gt;&lt;text x="302" y="265" text-anchor="middle"&gt;16&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="318" x2="318" y1="248" y2="252"/&gt;&lt;text x="318" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="334" x2="334" y1="248" y2="252"/&gt;&lt;text x="334" y="265" text-anchor="middle"&gt;18&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="350" x2="350" y1="248" y2="252"/&gt;&lt;text x="350" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="366" x2="366" y1="248" y2="252"/&gt;&lt;text x="366" y="265" text-anchor="middle"&gt;20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="382" x2="382" y1="248" y2="252"/&gt;&lt;text x="382" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="398" x2="398" y1="248" y2="252"/&gt;&lt;text x="398" y="265" text-anchor="middle"&gt;22&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="414" x2="414" y1="248" y2="252"/&gt;&lt;text x="414" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Var(δ)&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="414" y="278" text-anchor="end"&gt;Layer Id&lt;/text&gt;&lt;g clip-path="url(#fig8-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 101.5L62 81.6L78 93.7L94 93.7L110 107.8L126 99.6L142 119.6L158 114.6L174 131.4L190 128.6L206 127.4L222 151.4L238 143.2L254 160.7L270 151.4L286 170.1L302 165.1L318 183.8L334 178.2L350 199.7L366 208.1L382 207.5L398 227.7L414 235.8"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 110.9L62 32.9L78 95.9L94 56L110 101.5L126 60.4L142 104.6L158 60.4L174 103.4L190 104.3L206 53.5L222 101.5L238 56L254 102.1L270 56L286 102.8L302 58.5L318 104.6L334 57.9L350 104.9L366 115.8L382 69.1L398 109.6L414 123.6"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="248"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;E(|δ|) per Layer&lt;/div&gt;&lt;svg viewBox="0 0 426 280" role="img" aria-label="E(|δ|) per Layer" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig8-1"&gt;&lt;rect x="46" y="24" width="368" height="224"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;text x="38" y="252" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="210.7" y2="210.7"/&gt;&lt;text x="38" y="214.7" text-anchor="end"&gt;0.5&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="173.3" y2="173.3"/&gt;&lt;text x="38" y="177.3" text-anchor="end"&gt;1.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="136" y2="136"/&gt;&lt;text x="38" y="140" text-anchor="end"&gt;1.5&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="98.7" y2="98.7"/&gt;&lt;text x="38" y="102.7" text-anchor="end"&gt;2.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="61.3" y2="61.3"/&gt;&lt;text x="38" y="65.3" text-anchor="end"&gt;2.5&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="414" y1="24" y2="24"/&gt;&lt;text x="38" y="28" text-anchor="end"&gt;3.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="248" y2="252"/&gt;&lt;text x="46" y="265" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="62" x2="62" y1="248" y2="252"/&gt;&lt;text x="62" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="78" x2="78" y1="248" y2="252"/&gt;&lt;text x="78" y="265" text-anchor="middle"&gt;2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="94" x2="94" y1="248" y2="252"/&gt;&lt;text x="94" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="110" x2="110" y1="248" y2="252"/&gt;&lt;text x="110" y="265" text-anchor="middle"&gt;4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="126" x2="126" y1="248" y2="252"/&gt;&lt;text x="126" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="142" x2="142" y1="248" y2="252"/&gt;&lt;text x="142" y="265" text-anchor="middle"&gt;6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="158" x2="158" y1="248" y2="252"/&gt;&lt;text x="158" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="174" x2="174" y1="248" y2="252"/&gt;&lt;text x="174" y="265" text-anchor="middle"&gt;8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="190" x2="190" y1="248" y2="252"/&gt;&lt;text x="190" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="206" x2="206" y1="248" y2="252"/&gt;&lt;text x="206" y="265" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="222" x2="222" y1="248" y2="252"/&gt;&lt;text x="222" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="238" x2="238" y1="248" y2="252"/&gt;&lt;text x="238" y="265" text-anchor="middle"&gt;12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="254" x2="254" y1="248" y2="252"/&gt;&lt;text x="254" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="270" x2="270" y1="248" y2="252"/&gt;&lt;text x="270" y="265" text-anchor="middle"&gt;14&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="286" x2="286" y1="248" y2="252"/&gt;&lt;text x="286" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="302" x2="302" y1="248" y2="252"/&gt;&lt;text x="302" y="265" text-anchor="middle"&gt;16&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="318" x2="318" y1="248" y2="252"/&gt;&lt;text x="318" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="334" x2="334" y1="248" y2="252"/&gt;&lt;text x="334" y="265" text-anchor="middle"&gt;18&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="350" x2="350" y1="248" y2="252"/&gt;&lt;text x="350" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="366" x2="366" y1="248" y2="252"/&gt;&lt;text x="366" y="265" text-anchor="middle"&gt;20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="382" x2="382" y1="248" y2="252"/&gt;&lt;text x="382" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="398" x2="398" y1="248" y2="252"/&gt;&lt;text x="398" y="265" text-anchor="middle"&gt;22&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="414" x2="414" y1="248" y2="252"/&gt;&lt;text x="414" y="265" text-anchor="middle"&gt;&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;E(|δ|)&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="414" y="278" text-anchor="end"&gt;Layer Id&lt;/text&gt;&lt;g clip-path="url(#fig8-1)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 176.8L62 198.3L78 217.9L94 208.1L110 221.6L126 213L142 230.8L158 225.3L174 236.4L190 234.5L206 232.3L222 239.4L238 237.5L254 241.2L270 240L286 243.1L302 242.5L318 244.3L334 244.3L350 245.8L366 246.2L382 245.8L398 246.8L414 246.8"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 175.9L62 42.7L78 203.2L94 130.8L110 209.9L126 145L142 213.6L158 141.2L174 212.7L190 209.9L206 126.3L222 209.9L238 132.3L254 211.2L270 133.8L286 212.4L302 145L318 214.8L334 142.7L350 214L366 229.6L382 170.3L398 220.1L414 234.5"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="248"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="414" y1="248" y2="248"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 8: Comparison of the distribution gradients have per layer after the first iteration has completed.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Before starting other tests we decided to search for the most optimal value for \(\gamma\) from the set \(\big[1.1, 1.2, \dots, 1.9\big]\). For each value of \(\gamma\), we trained 25 networks for 20000 iterations on MNIST dataset and averaged the cross-entropy loss.&lt;/p&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Loss after 20000 iterations with given γ&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="Loss after 20000 iterations with given γ" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig9-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="282.2" y2="282.2"/&gt;&lt;text x="38" y="286.2" text-anchor="end"&gt;0.06&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="230.5" y2="230.5"/&gt;&lt;text x="38" y="234.5" text-anchor="end"&gt;0.07&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="178.9" y2="178.9"/&gt;&lt;text x="38" y="182.9" text-anchor="end"&gt;0.08&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="127.3" y2="127.3"/&gt;&lt;text x="38" y="131.3" text-anchor="end"&gt;0.09&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="75.6" y2="75.6"/&gt;&lt;text x="38" y="79.6" text-anchor="end"&gt;0.10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="78.3" x2="78.3" y1="308" y2="312"/&gt;&lt;text x="78.3" y="325" text-anchor="middle"&gt;1.1&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="143" x2="143" y1="308" y2="312"/&gt;&lt;text x="143" y="325" text-anchor="middle"&gt;1.2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="207.7" x2="207.7" y1="308" y2="312"/&gt;&lt;text x="207.7" y="325" text-anchor="middle"&gt;1.3&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="272.3" x2="272.3" y1="308" y2="312"/&gt;&lt;text x="272.3" y="325" text-anchor="middle"&gt;1.4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="337" x2="337" y1="308" y2="312"/&gt;&lt;text x="337" y="325" text-anchor="middle"&gt;1.5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="401.7" x2="401.7" y1="308" y2="312"/&gt;&lt;text x="401.7" y="325" text-anchor="middle"&gt;1.6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="466.3" x2="466.3" y1="308" y2="312"/&gt;&lt;text x="466.3" y="325" text-anchor="middle"&gt;1.7&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="531" x2="531" y1="308" y2="312"/&gt;&lt;text x="531" y="325" text-anchor="middle"&gt;1.8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="595.7" x2="595.7" y1="308" y2="312"/&gt;&lt;text x="595.7" y="325" text-anchor="middle"&gt;1.9&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Loss&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="628" y="338" text-anchor="end"&gt;γ&lt;/text&gt;&lt;g clip-path="url(#fig9-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M78.3 46.4L143 167.6L207.7 222.5L272.3 240.5L337 265.4L401.7 279.4L466.3 287.7L531 288.5L595.7 290.5"/&gt;&lt;rect fill="#0d0d0d" x="74.8" y="42.9" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="139.5" y="164.1" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="204.2" y="219" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="268.8" y="237" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="333.5" y="261.9" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="398.2" y="275.9" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="462.8" y="284.2" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="527.5" y="285" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="592.2" y="287" width="7" height="7"/&gt;&lt;rect fill="#e30613" x="462.8" y="284.2" width="7" height="7"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 9: Results of hyper-parameter search for \(\gamma\)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Although we originally thought \(\gamma=\pi/2\) would be the best fit, constraining the output to [-1, +1] precisely, this was not the case as seen from Figure 9. Going from \(\gamma=1.1\) to \(\gamma=1.9\), error almost halved due to higher values of \(\gamma\) allowing higher variance. As a result, we will be using \(\gamma=1.7\) for our tests.&lt;/p&gt;
&lt;h3 id="analysis-of-the-gradients"&gt;4.1 Analysis of the Gradients&lt;/h3&gt;
&lt;p&gt;For the first test, we checked whether the technique we proposed circumvents the problem of unstable gradients as expected or not. For comparison, we are going to use the network from Figure 2.&lt;/p&gt;
&lt;p&gt;As it can be seen from Figure 8, neither variance nor the mean of gradients shows any correlation with the depth of the layer.&lt;/p&gt;
&lt;p&gt;The see-saw behaviour of both graphs are due to the fact that the Z value we used for the variance of the weight tensor bumps up the variance in a way that when the activation function squishes the input (thus lowering the variance), the variance returns to the exact same previous level which means our technique works as we expected; preventing the gradients from vanishing.&lt;/p&gt;
&lt;p&gt;We tested whether this assumption was correct or not by training a network on XOR dataset. In our tests, we were not able to train a 30-layer feed forward network for XOR dataset with traditional methods within 100k iterations whereas our technique reached \(\approx 5\%\) error by 2000 iterations.&lt;/p&gt;
&lt;h3 id="effect-of-beta"&gt;4.2 Effect of β hyper-parameter&lt;/h3&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;β = 1.0&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;β = 0.7&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#757575" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;β = 0.5&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Effect of β on Learning Speed&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="Effect of β on Learning Speed" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig10-0"&gt;&lt;rect x="46" y="24" width="548" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="283.7" y2="283.7"/&gt;&lt;text x="38" y="287.7" text-anchor="end"&gt;0.225&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="243.1" y2="243.1"/&gt;&lt;text x="38" y="247.1" text-anchor="end"&gt;0.250&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="202.5" y2="202.5"/&gt;&lt;text x="38" y="206.5" text-anchor="end"&gt;0.275&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="161.9" y2="161.9"/&gt;&lt;text x="38" y="165.9" text-anchor="end"&gt;0.300&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="121.4" y2="121.4"/&gt;&lt;text x="38" y="125.4" text-anchor="end"&gt;0.325&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="80.8" y2="80.8"/&gt;&lt;text x="38" y="84.8" text-anchor="end"&gt;0.350&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="594" y1="40.2" y2="40.2"/&gt;&lt;text x="38" y="44.2" text-anchor="end"&gt;0.375&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="594" x2="598" y1="293.1" y2="293.1"/&gt;&lt;text x="602" y="297.1"&gt;0.58&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="594" x2="598" y1="233.3" y2="233.3"/&gt;&lt;text x="602" y="237.3"&gt;0.60&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="594" x2="598" y1="173.5" y2="173.5"/&gt;&lt;text x="602" y="177.5"&gt;0.62&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="594" x2="598" y1="113.7" y2="113.7"/&gt;&lt;text x="602" y="117.7"&gt;0.64&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="594" x2="598" y1="53.9" y2="53.9"/&gt;&lt;text x="602" y="57.9"&gt;0.66&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="308" y2="312"/&gt;&lt;text x="46" y="325" text-anchor="middle"&gt;0.00&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="112.8" x2="112.8" y1="308" y2="312"/&gt;&lt;text x="112.8" y="325" text-anchor="middle"&gt;0.25&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="179.7" x2="179.7" y1="308" y2="312"/&gt;&lt;text x="179.7" y="325" text-anchor="middle"&gt;0.50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="246.5" x2="246.5" y1="308" y2="312"/&gt;&lt;text x="246.5" y="325" text-anchor="middle"&gt;0.75&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="313.3" x2="313.3" y1="308" y2="312"/&gt;&lt;text x="313.3" y="325" text-anchor="middle"&gt;1.00&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="380.1" x2="380.1" y1="308" y2="312"/&gt;&lt;text x="380.1" y="325" text-anchor="middle"&gt;1.25&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="447" x2="447" y1="308" y2="312"/&gt;&lt;text x="447" y="325" text-anchor="middle"&gt;1.50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="513.8" x2="513.8" y1="308" y2="312"/&gt;&lt;text x="513.8" y="325" text-anchor="middle"&gt;1.75&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="580.6" x2="580.6" y1="308" y2="312"/&gt;&lt;text x="580.6" y="325" text-anchor="middle"&gt;2.00&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Cross Entropy Error&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="594" y="12" text-anchor="end"&gt;Percentage Validation Error&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="594" y="338" text-anchor="end"&gt;Epochs&lt;/text&gt;&lt;g clip-path="url(#fig10-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 37.5L49.5 57.8L53.2 78.4L56.7 92.6L60.2 101.6L63.9 107.7L67.4 109L70.9 111.6L74.3 123L78.1 140.4L81.6 149.4L85 153.2L88.8 151.6L92.2 142.5L95.7 128.3L99.5 122.3L102.9 134.7L106.4 148.1L109.9 160.2L113.6 170.7L117.1 177.7L120.6 176.9L124.3 173.8L127.8 162.3L131.3 144.9L135 133.1L138.5 130.1L142 130.9L145.7 141.3L149.2 158.2L152.7 169.4L156.1 166L159.9 161.5L163.4 161.3L166.8 163.1L170.6 164.2L174 160.6L177.5 157.1L181.3 156.6L184.7 157.7L188.2 160.3L191.7 165.7L195.4 172.3L198.9 184.5L202.4 201.4L206.1 212.1L209.6 201.5L213.1 190.7L216.8 180.6L220.3 171.2L223.8 167L227.2 177.4L231 188.4L234.5 194.2L237.9 195.4L241.7 198L245.2 204.9L248.6 219.2L252.4 223.3L255.8 212.3L259.3 201.4L263.1 190L266.5 178.7L270 167.6L273.5 155.9L277.2 154.3L280.7 177.7L284.2 203.3L287.9 209.7L291.4 200.1L294.9 194.7L298.6 203L302.1 212.6L305.6 208.8L309 195.4L312.8 186.1L316.3 190.3L319.7 196.2L323.5 200.9L327 204.1L330.4 205.8L334.2 207.9L337.6 208.5L341.1 204.1L344.9 196.8L348.3 189.5L351.8 182.2L355.3 175.1L359 177.7L362.5 187.4L366 196.2L369.7 203L373.2 208.7L376.7 206.6L380.4 199.3L383.9 198.9L387.4 216.6L390.8 239.4L394.6 250.2L398.1 250.2L401.5 248L405.3 244.4L408.7 238.4L412.2 228.3L416 214.5L419.4 205.8L422.9 217.9L426.7 230.6L430.1 233.5L433.6 227.2L437.1 220.5L440.8 216.1L444.3 212.9L447.8 214.8L451.5 221.7L455 227.2L458.5 226.9L462.2 224.1L465.7 224.1L469.2 225.6L472.6 225.9L476.4 220.4L479.9 213.5L483.3 214.2L487.1 221.2L490.5 227.5L494 231.2L497.8 234L501.2 235.1L504.7 234.5L508.2 234.8L511.9 238.2L515.4 241.5L518.9 231.1L522.6 211.4L526.1 195.5L529.6 213.1L533.3 235.6L536.8 249.3L540.3 243.9L544 237.2L547.5 226.4L551 214.2L554.4 214L558.2 226.9L561.7 238.1L565.1 246.5L568.9 252.7L571.3 255.1"/&gt;&lt;rect fill="#0d0d0d" x="309.8" y="86.9" width="7" height="7"/&gt;&lt;rect fill="#0d0d0d" x="577.1" y="205.5" width="7" height="7"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 118.5L49.5 122.2L53.2 127.9L56.7 139.2L60.2 153.8L63.9 164.7L67.4 170.9L70.9 175.4L74.3 178.2L78.1 180L81.6 182.2L85 186L88.8 189.5L92.2 189.9L95.7 188.7L99.5 186.9L102.9 183.9L106.4 181.1L109.9 185L113.6 191.5L117.1 198L120.6 203.8L124.3 208.7L127.8 209.7L131.3 208.2L135 207.1L138.5 207.1L142 207.1L145.7 208.4L149.2 210.3L152.7 211.9L156.1 212.6L159.9 213.5L163.4 216L166.8 219.4L170.6 218.9L174 209.7L177.5 200.1L181.3 199.8L184.7 204.6L188.2 208.2L191.7 206.2L195.4 204.8L198.9 211.1L202.4 221.8L206.1 229L209.6 224.4L213.1 219.6L216.8 229L220.3 245.4L223.8 256.9L227.2 255.3L231 250.4L234.5 237.9L237.9 217.6L241.7 204.9L245.2 214.8L248.6 227L252.4 238.2L255.8 248.9L259.3 256.2L263.1 254L266.5 249.9L270 247.3L273.5 245.7L277.2 242.1L280.7 235L284.2 227.2L287.9 219.6L291.4 212.7L294.9 211.6L298.6 226.5L302.1 244.1L305.6 256.6L309 264.7L312.8 270.5L316.3 270L319.7 267.6L323.5 260.1L327 248.4L330.4 241.9L334.2 254.1L337.6 267.3L341.1 270.5L344.9 264.3L348.3 258.2L351.8 252.5L355.3 247L359 246L362.5 248.4L366 254.9L369.7 268.7L373.2 284.8L376.7 286.1L380.4 275.5L383.9 267.8L387.4 266.1L390.8 266.3L394.6 263.9L398.1 258.5L401.5 255.3L405.3 260.3L408.7 266.8L412.2 267.8L416 265L419.4 263.9L422.9 268.9L426.7 274.9L430.1 272.8L433.6 262.9L437.1 257.2L440.8 267.6L444.3 280.2L447.8 274.7L451.5 253.6L455 237.9L458.5 246L462.2 258.8L465.7 272.3L469.2 287.2L472.6 297L476.4 282L479.9 263.2L483.3 258.8L487.1 269.1L490.5 277.7L494 283.3L497.8 287.4L501.2 286.4L504.7 280.9L508.2 274.9L511.9 269.1L515.4 263.4L518.9 258.5L522.6 254.1L526.1 254.1L529.6 268.6L533.3 286.3L536.8 292.7L540.3 286.6L544 278.3L547.5 266.8L551 253.8L554.4 253.3L558.2 266.5L561.7 277L565.1 276.4L568.9 273.1L571.3 271.5"/&gt;&lt;rect fill="#e30613" x="309.8" y="205" width="7" height="7"/&gt;&lt;rect fill="#e30613" x="577.1" y="280" width="7" height="7"/&gt;&lt;path fill="none" stroke="#757575" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 127.4L49.5 132.2L53.2 137.3L56.7 141.3L60.2 150.1L63.9 152.4L67.4 155L70.9 157.2L74.3 156.1L78.1 154.2L81.6 153.5L85 156.7L88.8 160.2L92.2 159.8L95.7 157.6L99.5 156.1L102.9 157.7L106.4 160.8L109.9 170.1L113.6 183.4L117.1 193.4L120.6 197.6L124.3 200.2L127.8 197.6L131.3 192.5L135 187.6L138.5 181.9L142 176.4L145.7 176.5L149.2 179.6L152.7 182.4L156.1 185L159.9 188.1L163.4 194.4L166.8 203.8L170.6 208.8L174 202.5L177.5 194.9L181.3 194.9L184.7 197.3L188.2 200.7L191.7 206.2L195.4 211.6L198.9 211.1L202.4 207.4L206.1 204.6L209.6 204.1L213.1 203.8L216.8 201.7L220.3 198.5L223.8 196L227.2 197.5L231 199.9L234.5 209.5L237.9 229L241.7 233.5L245.2 227.2L248.6 216.1L252.4 221.7L255.8 234.6L259.3 242.8L263.1 239.8L266.5 235.3L270 232.7L273.5 232.1L277.2 229.9L280.7 225.6L284.2 220.7L287.9 219.1L291.4 219.2L294.9 220.2L298.6 225.2L302.1 230.1L305.6 236.1L309 242.8L312.8 246.8L316.3 241.3L319.7 234.8L323.5 226.5L327 216.3L330.4 212.1L334.2 226.9L337.6 243.7L341.1 254.4L344.9 257.7L348.3 261.4L351.8 257.7L355.3 252.5L359 243.4L362.5 231.7L366 224.6L369.7 236.3L373.2 249.4L376.7 249.3L380.4 237.9L383.9 228.8L387.4 224.1L390.8 221L394.6 226.7L398.1 239.7L401.5 249.3L405.3 260.6L408.7 271L412.2 264.3L416 252.5L419.4 242.3L422.9 238.1L426.7 236.3L430.1 240.2L433.6 249.6L437.1 264.3L440.8 276.2L444.3 289.2L447.8 290.5L451.5 235L455 226L458.5 225.6L462.2 229L465.7 233L469.2 237.4L472.6 242.9L476.4 252.2L479.9 261.6L483.3 265.5L487.1 252.5L490.5 244.7L494 241.9L497.8 241.1L501.2 246.3L504.7 257.4L508.2 265.6L511.9 257.4L515.4 245.8L518.9 244.5L522.6 253.5L526.1 260.1L529.6 252L533.3 244.5L536.8 245.4L540.3 255.6L544 264.2L547.5 262.4L551 257.9L554.4 261.4L558.2 275.2L561.7 285.9L565.1 283.2L568.9 277.5L571.3 275.7"/&gt;&lt;rect fill="#757575" x="309.8" y="30.4" width="7" height="7"/&gt;&lt;rect fill="#757575" x="577.1" y="220.5" width="7" height="7"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="594" y1="308" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="594" x2="594" y1="24" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 10: Error history of networks trained on STL-10 dataset using \(\beta\) values 0.5, 0.7, 1.0.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;In order to see the effect of \(\beta\) on training accuracy, we trained 3 networks with \(\beta\) values set to 0.5, 0.7 and 1.0 on STL-10 dataset. As it can be seen from Figure 10, although the difference between 0.5 and 0.7 is hard to interpret, it is rather apparent that values other than 1.0 had better validation and training accuracy. This leads us to believe that \(\beta\) value should be included in hyper-parameter search when setting up the network as it depends on the network&amp;rsquo;s architecture and complexity of the data used.&lt;/p&gt;
&lt;h3 id="feature-complexity"&gt;4.3 Feature Complexity and Visualization of Learned Features&lt;/h3&gt;
&lt;figure&gt;
&lt;p&gt;&lt;img src="images/fig11.webp" alt="First layer weights before and after training"&gt;&lt;/p&gt;
&lt;figcaption&gt;Figure 11: Visualization of the weights after and before training. Image on the left shows how the weights were initialized in the first place whereas image on the right shows the weights after training phase was complete.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Gradient-equalization affects the development of features in a rather interesting way. When the gradient drops as layers go like in a traditional network, the filters get more complex as the layer gets deeper. On the other hand, when our method is used, complexity is distributed across layers; achieving a highly-complex network rather than highly-complex deep layers.&lt;/p&gt;
&lt;p&gt;Figure 11 visualizes first layer of a network trained on STL-10 dataset before and after training phase. As it can be seen, although some features were certainly learned, it can not be easily interpreted unlike traditional networks except for a few line patterns.&lt;/p&gt;
&lt;p&gt;This approach sacrifices the possibility of transfer learning and ease of visualizing for speed and overall complexity. It also makes it easier for these networks to over-fit training dataset but this is not as big of a problem as we thought originally since our network were able to achieve similar results to 2012 (supervised) state of the art&lt;a href="#ref-11"&gt;[11]&lt;/a&gt; within 8 epochs on STL-10 dataset which contains only 500 images per class.&lt;/p&gt;
&lt;h3 id="mnist-dataset"&gt;4.4 MNIST Dataset&lt;/h3&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization, Training Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization, Validation Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization, Training Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization, Validation Accuracy&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Accuracy per Epoch&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="Accuracy per Epoch" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig12-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="260.7" y2="260.7"/&gt;&lt;text x="38" y="264.7" text-anchor="end"&gt;80%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="201.5" y2="201.5"/&gt;&lt;text x="38" y="205.5" text-anchor="end"&gt;85%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="142.3" y2="142.3"/&gt;&lt;text x="38" y="146.3" text-anchor="end"&gt;90%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="83.2" y2="83.2"/&gt;&lt;text x="38" y="87.2" text-anchor="end"&gt;95%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="24" y2="24"/&gt;&lt;text x="38" y="28" text-anchor="end"&gt;100%&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="308" y2="312"/&gt;&lt;text x="46" y="325" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="167.3" x2="167.3" y1="308" y2="312"/&gt;&lt;text x="167.3" y="325" text-anchor="middle"&gt;5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="288.5" x2="288.5" y1="308" y2="312"/&gt;&lt;text x="288.5" y="325" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="409.8" x2="409.8" y1="308" y2="312"/&gt;&lt;text x="409.8" y="325" text-anchor="middle"&gt;15&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="531" x2="531" y1="308" y2="312"/&gt;&lt;text x="531" y="325" text-anchor="middle"&gt;20&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Accuracy&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="628" y="338" text-anchor="end"&gt;Epoch&lt;/text&gt;&lt;g clip-path="url(#fig12-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M70.3 304.3L94.5 168.1L118.8 157.5L143 142.9L167.3 139.4L191.5 135.9L215.8 126.7L240 122.8L264.3 111.9L288.5 109.8L312.8 105.8L337 97.5L361.3 104L385.5 96.9L409.8 98.4L434 95.8L458.3 101.3L482.5 100.1L506.8 96.2L531 93.7L555.3 92.6L579.5 90.3L603.8 91.8"/&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M70.3 147.9L94.5 109.6L118.8 102.3L143 96.8L167.3 92.9L191.5 96.2L215.8 82.5L240 79.5L264.3 78L288.5 77.5L312.8 71L337 71L361.3 70.3L385.5 70.3L409.8 69.4L434 69.4L458.3 69.4L482.5 69L506.8 68.7L531 68.7L555.3 68.4L579.5 68.4L603.8 67.9"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M70.3 133.6L94.5 97.5L118.8 83.6L143 73.7L167.3 68.3L191.5 65.8L215.8 59.7L240 59L264.3 62.8L288.5 58.8L312.8 46.4L337 44.5L361.3 42.2L385.5 43.1L409.8 43.2L434 42.5L458.3 42.2L482.5 38.3L506.8 38.3L531 40.4L555.3 38.3L579.5 39L603.8 39.4"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M70.3 94.2L94.5 68.7L118.8 67L143 57.7L167.3 59.7L191.5 56.8L215.8 55.2L240 55.6L264.3 57.6L288.5 52.6L312.8 46.4L337 44.5L361.3 42.2L385.5 43.1L409.8 43.2L434 42.5L458.3 43.3L482.5 42.5L506.8 42.5L531 42.5L555.3 42.1L579.5 42.5L603.8 42.5"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 12: Error history of networks trained on MNIST dataset using different techniques.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;For the first experiment we conducted, we used MNIST as it was the easiest dataset of all 3. As it can be seen from Figure 12, it took 25 epochs for the network using traditional techniques to reach the accuracy network using our technique reached in 3 epochs. Our network ended up reaching 98.44% validation accuracy by the end of 23 epochs.&lt;/p&gt;
&lt;h3 id="stl-10-dataset"&gt;4.5 STL-10 Dataset&lt;/h3&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;ConvNet Validation Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#757575" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;StochasticNet Validation Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Our Network Validation Accuracy&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Accuracy per Epoch&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="Accuracy per Epoch" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig13-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;text x="38" y="312" text-anchor="end"&gt;20%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="275.7" y2="275.7"/&gt;&lt;text x="38" y="279.7" text-anchor="end"&gt;25%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="243.5" y2="243.5"/&gt;&lt;text x="38" y="247.5" text-anchor="end"&gt;30%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="211.2" y2="211.2"/&gt;&lt;text x="38" y="215.2" text-anchor="end"&gt;35%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="178.9" y2="178.9"/&gt;&lt;text x="38" y="182.9" text-anchor="end"&gt;40%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="146.6" y2="146.6"/&gt;&lt;text x="38" y="150.6" text-anchor="end"&gt;45%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="114.4" y2="114.4"/&gt;&lt;text x="38" y="118.4" text-anchor="end"&gt;50%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="82.1" y2="82.1"/&gt;&lt;text x="38" y="86.1" text-anchor="end"&gt;55%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="49.8" y2="49.8"/&gt;&lt;text x="38" y="53.8" text-anchor="end"&gt;60%&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="104.2" x2="104.2" y1="308" y2="312"/&gt;&lt;text x="104.2" y="325" text-anchor="middle"&gt;2.5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="177" x2="177" y1="308" y2="312"/&gt;&lt;text x="177" y="325" text-anchor="middle"&gt;5.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="249.7" x2="249.7" y1="308" y2="312"/&gt;&lt;text x="249.7" y="325" text-anchor="middle"&gt;7.5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="322.4" x2="322.4" y1="308" y2="312"/&gt;&lt;text x="322.4" y="325" text-anchor="middle"&gt;10.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="395.2" x2="395.2" y1="308" y2="312"/&gt;&lt;text x="395.2" y="325" text-anchor="middle"&gt;12.5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="467.9" x2="467.9" y1="308" y2="312"/&gt;&lt;text x="467.9" y="325" text-anchor="middle"&gt;15.0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="540.7" x2="540.7" y1="308" y2="312"/&gt;&lt;text x="540.7" y="325" text-anchor="middle"&gt;17.5&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="613.4" x2="613.4" y1="308" y2="312"/&gt;&lt;text x="613.4" y="325" text-anchor="middle"&gt;20.0&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Accuracy&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="628" y="338" text-anchor="end"&gt;Epoch&lt;/text&gt;&lt;g clip-path="url(#fig13-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M60.5 295.1L89.7 268L118.8 239.6L147.8 204.1L177 180.2L206.1 152.4L235.2 138.2L264.3 133.1L293.4 140.2L322.4 146L351.6 152.4L380.6 164.1L409.8 140.2L438.9 146L467.9 151.8L497.1 137.6L526.1 100.2L555.3 88.5L584.4 94.4L613.4 87.9"/&gt;&lt;path fill="none" stroke="#757575" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M60.5 293.2L89.7 269.3L118.8 242.8L147.8 204.1L177 177.6L206.1 153.7L235.2 139.5L264.3 133.7L293.4 138.9L322.4 126.6L351.6 120.2L380.6 113.7L409.8 100.2L438.9 87.9L467.9 81.4L497.1 87.3L526.1 75L555.3 68.5L584.4 62.1L613.4 55.6"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M60.5 177.6L89.7 146.6L118.8 131.8L147.8 100.8L177 100.8L206.1 95L235.2 99.5L264.3 75.6L293.4 67.9L322.4 62.1L351.6 62.1L380.6 55.6L409.8 48.5L438.9 43.4L467.9 49.2L497.1 48.5L526.1 36.3L555.3 36.3L584.4 42.7L613.4 36.9"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 13: Error history of networks trained on STL-10 dataset using different techniques.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This dataset is especially interesting because it has less data when compared to CIFAR-10&lt;a href="#ref-12"&gt;[12]&lt;/a&gt; and yet 9 times the input volume. We compared the performance of our network to the results of StochasticNet&lt;a href="#ref-13"&gt;[13]&lt;/a&gt; published in 2015. It can be seen from Figure 13 that our network reached \(\approx\)40% accuracy within a single epoch whereas other networks took 5 epochs and our network reached \(\approx\)56% accuracy within 9 epochs whereas it took StochasticNet 18 epochs, and ConvNet could not reach it within 20 epochs. Our network ended up reaching 61.68% validation accuracy by the end of 20 epochs.&lt;/p&gt;
&lt;h3 id="our-dataset"&gt;4.6 Our Dataset&lt;/h3&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization, Training Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization, Validation Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization, Training Accuracy&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization, Validation Accuracy&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;Accuracy per Epoch&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="Accuracy per Epoch" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig14-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;text x="38" y="312" text-anchor="end"&gt;0%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="251.2" y2="251.2"/&gt;&lt;text x="38" y="255.2" text-anchor="end"&gt;20%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="194.4" y2="194.4"/&gt;&lt;text x="38" y="198.4" text-anchor="end"&gt;40%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="137.6" y2="137.6"/&gt;&lt;text x="38" y="141.6" text-anchor="end"&gt;60%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="80.8" y2="80.8"/&gt;&lt;text x="38" y="84.8" text-anchor="end"&gt;80%&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="24" y2="24"/&gt;&lt;text x="38" y="28" text-anchor="end"&gt;100%&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="72.5" x2="72.5" y1="308" y2="312"/&gt;&lt;text x="72.5" y="325" text-anchor="middle"&gt;1.00&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="138.6" x2="138.6" y1="308" y2="312"/&gt;&lt;text x="138.6" y="325" text-anchor="middle"&gt;1.25&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="204.7" x2="204.7" y1="308" y2="312"/&gt;&lt;text x="204.7" y="325" text-anchor="middle"&gt;1.50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="270.9" x2="270.9" y1="308" y2="312"/&gt;&lt;text x="270.9" y="325" text-anchor="middle"&gt;1.75&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="337" x2="337" y1="308" y2="312"/&gt;&lt;text x="337" y="325" text-anchor="middle"&gt;2.00&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="403.1" x2="403.1" y1="308" y2="312"/&gt;&lt;text x="403.1" y="325" text-anchor="middle"&gt;2.25&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="469.3" x2="469.3" y1="308" y2="312"/&gt;&lt;text x="469.3" y="325" text-anchor="middle"&gt;2.50&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="535.4" x2="535.4" y1="308" y2="312"/&gt;&lt;text x="535.4" y="325" text-anchor="middle"&gt;2.75&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="601.5" x2="601.5" y1="308" y2="312"/&gt;&lt;text x="601.5" y="325" text-anchor="middle"&gt;3.00&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;Accuracy&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="628" y="338" text-anchor="end"&gt;Epoch&lt;/text&gt;&lt;g clip-path="url(#fig14-0)"&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M72.5 241.5L85.7 239.3L98.9 237L112.1 234.4L125.4 232.7L138.6 231L151.8 228.8L165 227.1L178.3 225.4L191.5 223.7L204.7 221.9L218 220.2L231.2 218.8L244.4 217.4L257.6 216L270.9 214.6L284.1 213.4L297.3 212.3L310.5 211.2L323.8 210L337 208.9L350.2 208.3L363.5 207.5L376.7 206.6L389.9 206L403.1 205.2L416.4 204.6L429.6 204.1L442.8 203.5L456 203.2L469.3 202.9L482.5 202.9L495.7 202.9L509 202.4L522.2 202.4L535.4 202.4L548.6 202.9L561.9 202.9L575.1 202.9L588.3 203.5L601.5 203.5"/&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M72.5 187.6L85.7 187.6L98.9 187L112.1 186.7L125.4 186.4L138.6 185.9L151.8 185.9L165 185.6L178.3 185.3L191.5 184.7L204.7 184.5L218 183.6L231.2 183.3L244.4 182.8L257.6 182.5L270.9 182.2L284.1 181.3L297.3 181.1L310.5 180.5L323.8 179.9L337 179.1L350.2 178.8L363.5 177.9L376.7 177.6L389.9 176.8L403.1 175.9L416.4 175.4L429.6 174.5L442.8 174L456 173.4L469.3 172.5L482.5 171.7L495.7 170.8L509 170.3L522.2 169.1L535.4 168.3L548.6 167.4L561.9 166.9L575.1 166L588.3 164.9L601.5 164"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M72.5 69.2L85.7 67.5L98.9 65.7L112.1 64.3L125.4 62.6L138.6 61.2L151.8 59.5L165 58.1L178.3 56.7L191.5 55.5L204.7 54.4L218 53L231.2 50.7L244.4 49.8L257.6 49L270.9 48.1L284.1 47.3L297.3 46.7L310.5 46.2L323.8 45.3L337 43.6L350.2 42.7L363.5 42.2L376.7 41.3L389.9 40.8L403.1 40.2L416.4 39.6L429.6 39.1L442.8 38.5L456 38.2L469.3 37.9L482.5 37.3L495.7 37.1L509 37.1L522.2 36.8L535.4 36.8L548.6 36.2L561.9 36.2L575.1 36.2L588.3 37.1L601.5 36.8"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M72.5 56.9L85.7 56.7L98.9 55.8L112.1 55L125.4 54.4L138.6 53.8L151.8 53.3L165 52.7L178.3 52.1L191.5 51.5L204.7 51L218 50.1L231.2 50.7L244.4 49.8L257.6 49L270.9 48.1L284.1 47.3L297.3 46.7L310.5 46.2L323.8 45.3L337 43.6L350.2 42.7L363.5 42.2L376.7 44.7L389.9 43.9L403.1 43.3L416.4 43.3L429.6 42.5L442.8 41.9L456 41.6L469.3 40.8L482.5 40.8L495.7 40.2L509 40.2L522.2 40.2L535.4 36.8L548.6 39.3L561.9 36.2L575.1 36.2L588.3 37.1L601.5 36.8"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 14: Error history of networks trained on our dataset using different techniques.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We used a custom dataset in order to compare the performance for fast learning when the input data is large (96x96x3) but the pattern is easy to recognize. Our method performed significantly better reaching \(\approx 4\%\) validation error within 3 epochs with only 2000 actual examples in training set and 1000 examples in validation set whereas the traditional methods could only reach \(\approx 49\%\) error rate within this very short time as it can be seen from Figure 14. Our network ended up reaching 99.76% validation accuracy by the end of 20 epochs.&lt;/p&gt;
&lt;h3 id="performance"&gt;4.7 Performance&lt;/h3&gt;
&lt;p&gt;Although ReLUs are known for being especially fast as they do not require floating-point computations like arctan, sigmoid or tanh, we noticed in our tests that our model actually ran 5% faster compared to ReLUs. We assume this is because of the fact that our activator does not require any branching unlike ReLUs as GPUs are rather bad when it comes to branches due to the fact that they require both paths to be executed by all the threads when there is branch divergence within a warp.&lt;/p&gt;
&lt;h3 id="conclusion"&gt;4.8 Conclusion&lt;/h3&gt;
&lt;p&gt;Results from the training phases of these datasets certainly provided us concrete proof that our technique lets deep neural networks reach high training and verification accuracies much faster compared to the traditional techniques. For the networks where our technique was used, the speed of learning was affected by the complexity of dataset rather than the depth of the network as all layers of the network trained at similar speeds.&lt;/p&gt;
&lt;p&gt;Our technique also had the benefit of human-like learning where network learned the basics of the dataset (this basic knowledge covered \(\approx\)85% of the dataset for MNIST and our dataset and \(\approx\)40% of the dataset for STL-10) very fast (within a single epoch) and got better at it eventually, letting us have the best of both worlds — accuracy and speed.&lt;/p&gt;
&lt;h2 id="0x5-future-work"&gt;&lt;span class="hx"&gt;0x5:&lt;/span&gt; Future Work&lt;/h2&gt;
&lt;figure&gt;
&lt;div class="chart" style="--cols:1;max-width:640px"&gt;&lt;div class="chart-key"&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#0d0d0d" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Leaky ReLU + Xavier Initialization&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#e30613" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke"/&gt;&lt;/svg&gt;Arctan + Proposed Initialization&lt;/span&gt;&lt;span&gt;&lt;svg width="22" height="8" viewBox="0 0 22 8" aria-hidden="true"&gt;&lt;line x1="0" x2="22" y1="4" y2="4" fill="none" stroke="#757575" stroke-width="2" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4"/&gt;&lt;/svg&gt;Expected Drop&lt;/span&gt;&lt;/div&gt;&lt;div class="chart-row"&gt;&lt;div class="chart-panel"&gt;&lt;div class="chart-title"&gt;E(|δ|) per Layer&lt;/div&gt;&lt;svg viewBox="0 0 640 340" role="img" aria-label="E(|δ|) per Layer" font-family="MonoLisa, monospace" font-size="11" fill="#757575"&gt;&lt;clipPath id="fig15-0"&gt;&lt;rect x="46" y="24" width="582" height="284"/&gt;&lt;/clipPath&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;text x="38" y="312" text-anchor="end"&gt;0.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="272.5" y2="272.5"/&gt;&lt;text x="38" y="276.5" text-anchor="end"&gt;0.2&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="237" y2="237"/&gt;&lt;text x="38" y="241" text-anchor="end"&gt;0.4&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="201.5" y2="201.5"/&gt;&lt;text x="38" y="205.5" text-anchor="end"&gt;0.6&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="166" y2="166"/&gt;&lt;text x="38" y="170" text-anchor="end"&gt;0.8&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="130.5" y2="130.5"/&gt;&lt;text x="38" y="134.5" text-anchor="end"&gt;1.0&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="95" y2="95"/&gt;&lt;text x="38" y="99" text-anchor="end"&gt;1.2&lt;/text&gt;&lt;line stroke="#0d0d0d" stroke-opacity="0.08" x1="46" x2="628" y1="59.5" y2="59.5"/&gt;&lt;text x="38" y="63.5" text-anchor="end"&gt;1.4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="308" y2="312"/&gt;&lt;text x="46" y="325" text-anchor="middle"&gt;0&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="71.3" x2="71.3" y1="308" y2="312"/&gt;&lt;text x="71.3" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="96.6" x2="96.6" y1="308" y2="312"/&gt;&lt;text x="96.6" y="325" text-anchor="middle"&gt;2&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="121.9" x2="121.9" y1="308" y2="312"/&gt;&lt;text x="121.9" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="147.2" x2="147.2" y1="308" y2="312"/&gt;&lt;text x="147.2" y="325" text-anchor="middle"&gt;4&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="172.5" x2="172.5" y1="308" y2="312"/&gt;&lt;text x="172.5" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="197.8" x2="197.8" y1="308" y2="312"/&gt;&lt;text x="197.8" y="325" text-anchor="middle"&gt;6&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="223.1" x2="223.1" y1="308" y2="312"/&gt;&lt;text x="223.1" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="248.4" x2="248.4" y1="308" y2="312"/&gt;&lt;text x="248.4" y="325" text-anchor="middle"&gt;8&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="273.7" x2="273.7" y1="308" y2="312"/&gt;&lt;text x="273.7" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="299" x2="299" y1="308" y2="312"/&gt;&lt;text x="299" y="325" text-anchor="middle"&gt;10&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="324.3" x2="324.3" y1="308" y2="312"/&gt;&lt;text x="324.3" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="349.7" x2="349.7" y1="308" y2="312"/&gt;&lt;text x="349.7" y="325" text-anchor="middle"&gt;12&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="375" x2="375" y1="308" y2="312"/&gt;&lt;text x="375" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="400.3" x2="400.3" y1="308" y2="312"/&gt;&lt;text x="400.3" y="325" text-anchor="middle"&gt;14&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="425.6" x2="425.6" y1="308" y2="312"/&gt;&lt;text x="425.6" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="450.9" x2="450.9" y1="308" y2="312"/&gt;&lt;text x="450.9" y="325" text-anchor="middle"&gt;16&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="476.2" x2="476.2" y1="308" y2="312"/&gt;&lt;text x="476.2" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="501.5" x2="501.5" y1="308" y2="312"/&gt;&lt;text x="501.5" y="325" text-anchor="middle"&gt;18&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="526.8" x2="526.8" y1="308" y2="312"/&gt;&lt;text x="526.8" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="552.1" x2="552.1" y1="308" y2="312"/&gt;&lt;text x="552.1" y="325" text-anchor="middle"&gt;20&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="577.4" x2="577.4" y1="308" y2="312"/&gt;&lt;text x="577.4" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="602.7" x2="602.7" y1="308" y2="312"/&gt;&lt;text x="602.7" y="325" text-anchor="middle"&gt;22&lt;/text&gt;&lt;line stroke="#0d0d0d" x1="628" x2="628" y1="308" y2="312"/&gt;&lt;text x="628" y="325" text-anchor="middle"&gt;&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="46" y="12"&gt;E(|δ|)&lt;/text&gt;&lt;text fill="#0d0d0d" font-size="10.5" x="628" y="338" text-anchor="end"&gt;Layer Id&lt;/text&gt;&lt;g clip-path="url(#fig15-0)"&gt;&lt;path fill="none" stroke="#757575" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" stroke-dasharray="6 4" d="M46 130.5L71.3 146.7L96.6 161.9L121.9 174.5L147.2 187.3L172.5 197.8L197.8 208.1L223.1 216.8L248.4 225.6L273.7 232.7L299 239.8L324.3 246.2L349.7 251.4L375 257.1L400.3 261.5L425.6 265.8L450.9 269.3L476.2 273L501.5 276.2L526.8 278.9L552.1 281.7L577.4 284L602.7 286.2L628 287.8"/&gt;&lt;path fill="none" stroke="#0d0d0d" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 139.2L71.3 190.1L96.6 237.2L121.9 212.5L147.2 246.6L172.5 224.4L197.8 268.2L223.1 253.9L248.4 281.7L273.7 276.2L299 271.4L324.3 288.8L349.7 283.3L375 292.9L400.3 288.1L425.6 296.9L450.9 294.5L476.2 300L501.5 298.5L526.8 303.2L552.1 305.2L577.4 304L602.7 305.6L628 306.8"/&gt;&lt;path fill="none" stroke="#e30613" stroke-width="1.75" stroke-linejoin="round" vector-effect="non-scaling-stroke" d="M46 138L71.3 41.8L96.6 219.6L121.9 171L147.2 243.6L172.5 195.6L197.8 255.5L223.1 211.6L248.4 260.6L273.7 258.7L299 213.2L324.3 259.4L349.7 215.5L375 261.9L400.3 260.3L425.6 216.4L450.9 261L476.2 222.8L501.5 265.4L526.8 286.5L552.1 255.5L577.4 277.6L602.7 250.7L628 291.7"/&gt;&lt;/g&gt;&lt;line stroke="#0d0d0d" x1="46" x2="46" y1="24" y2="308"/&gt;&lt;line stroke="#0d0d0d" x1="46" x2="628" y1="308" y2="308"/&gt;&lt;/svg&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;figcaption&gt;Figure 15: Demonstration of controlled gradient drop.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;One question that still remains is whether the controlled gradient drop technique we used were satisfactory or not. After calculating the \(\beta\) hyper-parameter which would drop the gradient to \(1/10\)th of the original in the first layer, we saw that although the ratio between first and final layer were certainly \(1/10\), the hidden layers did not necessarily follow the exponential drop we wanted perfectly, as it can be seen from Figure 15.&lt;/p&gt;
&lt;h2 id="references"&gt;References&lt;/h2&gt;
&lt;ol&gt;
&lt;li id="ref-1"&gt;Q.-H. Ye, L.-X. Qin, M. Forgues, et al., “Predicting hepatitis b virus–positive metastatic hepatocellular carcinomas using gene expression profiling and supervised machine learning,” &lt;em&gt;Nature medicine&lt;/em&gt;, vol. 9, no. 4, pp. 416–423, 2003.&lt;/li&gt;
&lt;li id="ref-2"&gt;J. Tompson, K. Schlachter, P. Sprechmann, and K. Perlin, “Accelerating eulerian fluid simulation with convolutional networks,” &lt;em&gt;arXiv preprint arXiv:1607.03597&lt;/em&gt;, 2016.&lt;/li&gt;
&lt;li id="ref-3"&gt;S. Iizuka, E. Simo-Serra, and H. Ishikawa, “Let there be color!: Joint end-to-end learning of global and local image priors for automatic image colorization with simultaneous classification,” &lt;em&gt;ACM Transactions on Graphics (TOG)&lt;/em&gt;, vol. 35, no. 4, p. 110, 2016.&lt;/li&gt;
&lt;li id="ref-4"&gt;V. Nair and G. E. Hinton, “Rectified linear units improve restricted boltzmann machines,” in &lt;em&gt;Proceedings of the 27th international conference on machine learning (ICML-10)&lt;/em&gt;, 2010, pp. 807–814.&lt;/li&gt;
&lt;li id="ref-5"&gt;X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks.,” in &lt;em&gt;Aistats&lt;/em&gt;, vol. 9, 2010, pp. 249–256.&lt;/li&gt;
&lt;li id="ref-6"&gt;K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” in &lt;em&gt;The IEEE International Conference on Computer Vision (ICCV)&lt;/em&gt;, Dec. 2015.&lt;/li&gt;
&lt;li id="ref-7"&gt;C. Szegedy, W. Liu, Y. Jia, et al., “Going deeper with convolutions,” in &lt;em&gt;Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition&lt;/em&gt;, 2015, pp. 1–9.&lt;/li&gt;
&lt;li id="ref-8"&gt;A. R. Barron, “Universal approximation bounds for superpositions of a sigmoidal function,” &lt;em&gt;IEEE Transactions on Information theory&lt;/em&gt;, vol. 39, no. 3, pp. 930–945, 1993.&lt;/li&gt;
&lt;li id="ref-9"&gt;C. J. Burges, Y. LeCun, and C. Cortes, “Mnist database,” [Online]. Available: &lt;a href="http://yann.lecun.com/exdb/mnist/"&gt;http://yann.lecun.com/exdb/mnist/&lt;/a&gt;.&lt;/li&gt;
&lt;li id="ref-10"&gt;A. Coates, H. Lee, and A. Y. Ng, “An analysis of single-layer networks in unsupervised feature learning,” &lt;em&gt;Ann Arbor&lt;/em&gt;, vol. 1001, no. 48109, p. 2, 2010.&lt;/li&gt;
&lt;li id="ref-11"&gt;Y. Jia, C. Huang, and T. Darrell, “Beyond spatial pyramids: Receptive field learning for pooled image features,” in &lt;em&gt;Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on&lt;/em&gt;, IEEE, 2012, pp. 3370–3377.&lt;/li&gt;
&lt;li id="ref-12"&gt;A. Krizhevsky and G. Hinton, “Learning multiple layers of features from tiny images,” 2009.&lt;/li&gt;
&lt;li id="ref-13"&gt;M. J. Shafiee, P. Siva, and A. Wong, “Stochasticnet: Forming deep neural networks via stochastic connectivity,” &lt;em&gt;arXiv preprint arXiv:1508.05463&lt;/em&gt;, 2015.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="appendices"&gt;Appendices&lt;/h2&gt;
&lt;h3 id="network-stl-10"&gt;A.1 Network Used for STL-10 and Our Dataset&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;Convolution [96, 96, 3] → [94, 94, 32] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;Convolution [94, 94, 32] → [92, 92, 32] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;Pool [92, 92, 32] → [46, 46, 32] (2x2)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;Convolution [46, 46, 32] → [44, 44, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;Convolution [44, 44, 64] → [42, 42, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;Pool [42, 42, 64] → [21, 21, 64] (2x2)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;Convolution [21, 21, 64] → [19, 19, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;Convolution [19, 19, 128] → [17, 17, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;Pool [17, 17, 128] → [8, 8, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;Convolution [8, 8, 128] → [6, 6, 256] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;Convolution [6, 6, 256] → [4, 4, 256] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;Pool [4, 4, 256] → [2, 2, 256] (2x2)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [2, 2, 256] → [1024, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;Dropout p=0.5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [1024, 1, 1] → [1024, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;26&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [1024, 1, 1] → [1024, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;27&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;28&lt;/span&gt;&lt;span class="cl"&gt;Dropout p=0.5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;29&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [1024, 1, 1] → [10/6, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;30&lt;/span&gt;&lt;span class="cl"&gt;Softmax&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Beta, momentum, learning speed and batch-size were grid-searched. Learning speed were multiplied with 0.2 once the network&amp;rsquo;s error started to plateau.&lt;/p&gt;
&lt;h3 id="network-mnist"&gt;A.2 Network Used for MNIST&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 1&lt;/span&gt;&lt;span class="cl"&gt;Convolution [28, 28, 3] → [26, 26, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 2&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 3&lt;/span&gt;&lt;span class="cl"&gt;Convolution [26, 26, 64] → [24, 24, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 4&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 5&lt;/span&gt;&lt;span class="cl"&gt;Convolution [24, 24, 64] → [22, 22, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 6&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 7&lt;/span&gt;&lt;span class="cl"&gt;Convolution [22, 22, 64] → [20, 20, 64] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 8&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt; 9&lt;/span&gt;&lt;span class="cl"&gt;Pool [20, 20, 64] → [10, 10, 64] (2x2)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;10&lt;/span&gt;&lt;span class="cl"&gt;Convolution [10, 10, 64] → [8, 8, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;11&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;12&lt;/span&gt;&lt;span class="cl"&gt;Convolution [8, 8, 128] → [6, 6, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;13&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;14&lt;/span&gt;&lt;span class="cl"&gt;Convolution [6, 6, 128] → [4, 4, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;15&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;16&lt;/span&gt;&lt;span class="cl"&gt;Convolution [4, 4, 128] → [2, 2, 128] (3x3)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;17&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;18&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [2, 2, 128] → [512, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;19&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;20&lt;/span&gt;&lt;span class="cl"&gt;Dropout p=0.5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;21&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [512, 1, 1] → [512, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;22&lt;/span&gt;&lt;span class="cl"&gt;Activator Arctan * 1/1.7
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;23&lt;/span&gt;&lt;span class="cl"&gt;Dropout p=0.5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;24&lt;/span&gt;&lt;span class="cl"&gt;Fully Connected [512, 1, 1] → [10, 1, 1]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="ln"&gt;25&lt;/span&gt;&lt;span class="cl"&gt;Softmax&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Beta, momentum, learning speed and batch-size were grid-searched. Learning speed were multiplied with 0.2 once the network&amp;rsquo;s error started to plateau.&lt;/p&gt;</description></item></channel></rss>