<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Smash Those Papers - Medium]]></title>
        <description><![CDATA[Hey. I’m Sagnik, and welcome to Smash Those Papers. This is my attempt to keep a clean record of how my exposure progressed in ML. Every week, I will try to explain the most interesting paper I read in simplest terms and free of jargons. Thank you ❤ - Medium]]></description>
        <link>https://medium.com/smash-those-papers?source=rss----4003010df352---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Smash Those Papers - Medium</title>
            <link>https://medium.com/smash-those-papers?source=rss----4003010df352---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:50:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/smash-those-papers" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Net2Net Explained]]></title>
            <link>https://medium.com/smash-those-papers/net2net-explained-7d0321f03594?source=rss----4003010df352---4</link>
            <guid isPermaLink="false">https://medium.com/p/7d0321f03594</guid>
            <category><![CDATA[lifelong-learning]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[deep-learning]]></category>
            <dc:creator><![CDATA[Mukherjeesagnik]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 10:14:21 GMT</pubDate>
            <atom:updated>2020-11-12T06:03:27.169Z</atom:updated>
            <content:encoded><![CDATA[<p>A brief and intuitive description of the paper Net2Net</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DmUf9smSja1BOTHOTtIFew.jpeg" /><figcaption><a href="https://unsplash.com/photos/s9CC2SKySJM">https://unsplash.com/photos/s9CC2SKySJM</a></figcaption></figure><p>The paper “<a href="https://arxiv.org/pdf/1511.05641.pdf">Net2Net: ACCELERATING LEARNING VIA KNOWLEDGE TRANSFER</a>” appeared as a conference paper in the proceedings of ICLR on the year 2016. Although the paper is a pretty old one, it is probably the oldest paper I’ve come across, which is closely related to “Lifelong Learning”. With a simple and yet holistic approach the authors have established a new State-of-the-art on the ImageNet dataset. They also improved significantly over the prior art in training time.</p><h3>Introduction:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sF5Xcto1jMlXC48umVYRcg.png" /></figure><ul><li>In the traditional ML workflow, researchers often build different NN architectures and try to improve on the current model</li><li>After having trained a model, the next architecture is trained from scratch (random initialization) — Losing the entire information of the previous model</li><li>The authors suggest a <em>function preserving transformation </em>(will discuss)to transfer information from one model to other</li></ul><h3>Function Preserving Initialization:</h3><ul><li>The entire paper is based on construction of a <em>function preserving initialization </em>for the new (a.k.a. student) network.</li><li>The idea is as simple as it sounds — we initialize the student in such a way that the prediction function of the teacher (the old model) is preserved. What that means is — this initialization will allow the student model to predict the same labels as the teacher, when it has not been trained yet. i.e. <strong>Without any training the student is bound to do at least as good as the teacher.</strong></li><li>In order to change an architecture from a simpler one to a relatively complex one, we usually make some layers wider or we might make the architecture deeper. To make a layer wider, the authors suggest <strong>Net2widernet</strong> and to make a layer deeper they suggest <strong>Net2deepernet</strong>. Both are function preserving transformations of the student nets.</li></ul><h3>Net2widernet:</h3><p>This transformation allows a layer to become wider. For linear layers that means more hidden states and for convolutional layers — more channels.</p><p>For this let’s first choose a random mapping function g such that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*xFyvTd5qU0G4WevwjOxg5g.png" /><figcaption>For first n values it is the identity mapping and for the rest it chooses randomly</figcaption></figure><p>For simplicity the explanation provided will be in terms of linear layers, but can be readily extended for convolutional layers as well. Now let’s consider the layer <strong><em>i</em></strong><em> </em>that we want to make wider. If we assume that the weight matrices for layer <strong><em>i </em></strong>is <em>W_i </em>and <em>W_(i+1) </em>respectively, with dimensions <em>m*n </em>and <em>n*p.</em> Then Net2widernet substitutes <em>W_i </em>and <em>W_(i+1) </em>with <em>U_i </em>and <em>U_(i+1), </em>with dimensions <em>m*q </em>and <em>q*p</em> respectively, where <em>q&gt;n</em>. The approach for this substitution is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*TD_JYSQ19u-DR7Ue_o4yqw.png" /><figcaption>Element wise mapping from U to W</figcaption></figure><p>Simply put, in case of <em>U_i </em>the first n columns are copied directly, and the later ones are randomly samples according to the random mapping <em>g. </em>Construction of <em>U_(i+1) </em>is also similar, other than the denominator, which appears for the sake of keeping the output same as student (aka function preservation). The example provided in the paper makes it easier to understand:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*SreeGAe2coslyEFtFQGCcg.png" /></figure><p>Note that the numbers a,b,c and d are elements of <em>W_i, </em>and the left neural net is the teacher. I.e. in this case they look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/253/1*DV2aJvGsnBvXc_i4gFvdQQ.png" /><figcaption>the vector [x[1],x[2]] is kept as row vector</figcaption></figure><p>i.e. the random mapping g looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/120/1*dR2QEdWYuKzQsCjqoKqg1A.png" /></figure><p>One can easily figure out the reason of the denominator 2, in f<em>.</em></p><h3>Net2deepernet:</h3><p>The function preserving transformation for making a neural network deeper is net2deepernet. The idea is to build an identity transformation in the form of the layer one wants to insert. If it is a convolutional layer, it would be initialized with an identity kernel. Certain pointers to note regarding this:</p><ul><li>It is not a trivial task to build an identity layer in the form of any architecture, the authors argue that it is not possible for the logistic sigmoid function</li><li>Similarly the example on batch normalization is as follows:</li></ul><blockquote>when using batch normalization, we must set the output scale and output bias of the normalization layer to undo the normalization of the layer’s statistics. This requires running forward propagation through the network on training data in order to estimate the activation statistics</blockquote><h3>Convolutional layers:</h3><p>All the explanations provided here are in terms of linear layers. However, it is easy to show that any convolutional operation is basically a matrix multiplication, i.e. it can be represented as a linear layer. For further readings on this part kindly go through <a href="https://cs231n.github.io/convolutional-networks/">this lecture</a> . And read the section “<strong>Implementation as Matrix Multiplication</strong>”. For RNN’s the authors have not provided any demo, but as we know, RNN is essentially a few matrix multiplications, and hence this can be hopefully extended to RNNs as well.</p><h3>Conclusion:</h3><p>The rest of the paper explains the results obtained and from the graphs, it is clearly visible that these transformations significantly improve over <em>Random Padding</em> and <em>Random Initialization</em>, The baselines chosen by the authors. Now one thing should be clear that, the paper only talks about bloating up the net you already have, and not about deleting certain layers. And hence one cannot construct any architecture with a combination of these two. However the work is indeed a significant and important step for the systems encouraging “lifelong learning” and also improves significantly on training time.</p><p>[1]: <a href="https://arxiv.org/pdf/1511.05641.pdf">https://arxiv.org/pdf/1511.05641.pdf</a>, Net2Net: ACCELERATING LEARNING VIA KNOWLEDGE TRANSFER</p><p>[2]: <a href="https://cs231n.github.io/convolutional-networks/">https://cs231n.github.io/convolutional-networks/</a>, cs231n, Stanford University</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d0321f03594" width="1" height="1" alt=""><hr><p><a href="https://medium.com/smash-those-papers/net2net-explained-7d0321f03594">Net2Net Explained</a> was originally published in <a href="https://medium.com/smash-those-papers">Smash Those Papers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>