<?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[Stories by Orchid Majumder on Medium]]></title>
        <description><![CDATA[Stories by Orchid Majumder on Medium]]></description>
        <link>https://medium.com/@orchidmajumder?source=rss-aa2273150be4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HlEYn8Z6i-Qgg1bGUVkn3g.jpeg</url>
            <title>Stories by Orchid Majumder on Medium</title>
            <link>https://medium.com/@orchidmajumder?source=rss-aa2273150be4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 01:37:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@orchidmajumder/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Hyperparameters and Network Architecture Optimization]]></title>
            <link>https://orchidmajumder.medium.com/hyperparameters-and-network-architecture-optimization-85f7672729f9?source=rss-aa2273150be4------2</link>
            <guid isPermaLink="false">https://medium.com/p/85f7672729f9</guid>
            <dc:creator><![CDATA[Orchid Majumder]]></dc:creator>
            <pubDate>Sat, 10 Apr 2021 09:26:47 GMT</pubDate>
            <atom:updated>2021-04-27T17:33:26.492Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hyperparameters and Network Architecture Search via Gradient-based Methods</h3><p>Experimental results in Deep Learning are sensitive to the choice of hyperparameters. At times, the selection of right hyperparameters can even decide whether a particular training will converge or not. Therefore, one needs to find the optimal hyperparameter for training an algorithm to evaluate its performance correctly. This procedure is known as <strong>Hyperparameter Optimization (HPO).</strong></p><p>While given a fixed architecture/ML algorithm, finding the right hyperparameters is more common, at times, the problem statement might even warrant developing a new architecture to achieve desired performance and existing network/models might not be sufficient. This is known as <strong>Network Architecture Search (NAS)</strong>. Finding the right setting of model parameters and architecture can be very challenging and time consuming, especially if one does not have relevant domain expertise.</p><p>When it comes to HPO or NAS algorithms, broadly these can be classified into two segments — black box methods and white box methods. Black box methods do not care about the underlying algorithm/model being optimized and therefore can be used with any algorithms. On the other hand, white-box methods rely on gradient information from the algorithm to find the optimal hyperparameters and therefore, can not be used for all algorithms. Black-box methods are more generic but time-consuming; white-box methods are less generic but takes far lesser time. Examples of black-box methods include <a href="https://arxiv.org/abs/1206.2944">Bayesian Optimization</a> and <a href="https://arxiv.org/abs/1603.06560">Hyperband</a> while <a href="https://arxiv.org/abs/1806.09055">DARTS</a> and <a href="https://arxiv.org/abs/1703.04782">Hypergradient-Descent</a> (HD) are examples of gradient-based white box methods. In this blog, we focus our attention on two gradient-based (white-box) methods — HD for hyperparameter optimization (HPO) and DARTS for network architecture search (NAS).</p><h3>Hypergradient-Descent (HD)</h3><p>The goal of this algorithm is to find the optimal learning-rate at the same time while the original training is going on rather than waiting for the training to finish and then use the final accuracy to update it like a Bayesian Optimization method. It can also be considered as “learning to find a learning-rate schedule” because this algorithm will tell the original training algorithm the learning-rate to use at every iteration. It uses the loss function at every time-step and compute the gradient of it with respect to the learning rate and use that gradient to update the learning-rate. This type of optimization procedure works because one can treat a continuous hyperparameter like learning-rate another parameter of the network itself and take gradient with respect to it and optimize it. We show the (first-order) gradient calculation with respect to learning-rate below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zOv2456-f-6EgFFzuIT_Rw.png" /></figure><p>From the derivation, we can see that computing the (first-order) gradient with respect to the learning rate only requires access to the past and the current gradient. We show an example of using it with SGD below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yvjp7GHV4iUNSOunydZeSg.png" /></figure><p>As this is a small modification to the original algorithm, it can easily be used to replace a conventional SGD algorithm to train any model without having to use a pre-defined learning-rate scheduler or tune the initial learning-rate. A reasonable initial value of 0.01 (for SGD) and a small value of beta will work for majority of the cases.</p><p>Using first order approximation of the gradient provides a relatively smaller computational requirement, however, in some cases it might be suboptimal. In a recent work (<a href="https://arxiv.org/pdf/1910.08525.pdf">MARTHE</a>) by myself and some colleagues at AWS and UCL, we show that using an additional (momentum-updated) second-order approximation of the gradient can help to provide a better trajectory for the learning-rate and can almost mimic the popular heuristic of linear warmup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*RuwvjqGFoAfLPKJPqXq13A.png" /></figure><p>Fig: Comparing learning-rate schedules learnt by various methods. HD refers to Hypergradient-Descent; mu=0.9 and 0.99 refers to <a href="https://arxiv.org/pdf/1910.08525.pdf">MARTHE</a>. <a href="https://arxiv.org/pdf/1703.01785.pdf">RTHO</a> refers to another algorithm that also uses Hessian but in a slightly different way. We can see that most of the methods can generate a pattern similar to linear warmup. LRS-OPT refers to the optimum schedule (oracle) where the gradient is not approximated using a single step and rather evaluated till the end after every update (not feasible in a real world setup, this is a toy example).</p><h3>Differentiable Architecture Search (DARTS)</h3><p>DARTS is an example of a gradient-based algorithm where it is used to optimize a discrete parameter — the network architecture itself such that it can achieve state-of-the-art on a visual recognition or a language modeling task. For each task, DARTS uses a predefined set of building blocks (CONV, Pooling or components of RNN) and tries to find the right combination of those. DARTS operates by converting the search space into a continuous space by using a softmax style operation over the possible computational nodes and picking the one which has the maximum probability. DARTS works in a bi-level optimization fashion where at one step it optimizes the network architecture and at the next step, uses that architecture to compute the training loss which is then used as a feedback to update the architecture and the training progresses in an interleaved fashion.</p><p>Similar to other NAS algorithms, DARTS also operates by trying to optimize one computational block (consisting of some combinations of CONV/Pooling for the visual recognition case) and then stacking those up similar to other deep networks. Such a computational block is called a cell. A cell is a directed acyclic graph consisting of an ordered sequence of N nodes. Each node is a latent representation (e.g. a feature map in convolutional networks) and each directed edge is associated with some operation that transforms the input. The algorithm assumes the cell to have two input nodes and a single output node. For convolutional cells, the input nodes are defined as the cell outputs in the previous two layers. For recurrent cells, these are defined as the input at the current step and the state carried from the previous step.</p><p>The softmax equation to pick an operator between two nodes looks like the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*cQ5ES15c-NFZaD3PqbSSog.png" /></figure><p>Where alpha are the learnable parameters. The end-to-end bi-level optimization algorithm looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PF83zcAlFw0jE5vvOoM7AQ.png" /></figure><p>Finally, if we see the experimental results, we can see that DARTS can outperform existing RL based methods both in time (significantly) as well as on the validation/test accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e_E2zE-OzbMgGDUCip1MAA.png" /></figure><h3>Conclusion</h3><p>In this blog, we discussed two different HPO/NAS algorithms based on gradient-based. From the experimental results, we can see that the gradient based methods can improve the runtime significantly in cases where it can be applied and also perform competitively or better when it comes to final accuracy (the last statement is predominantly applicable for NAS using DARTS).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85f7672729f9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The art of going away]]></title>
            <link>https://orchidmajumder.medium.com/the-art-of-going-away-593fd7f1ac97?source=rss-aa2273150be4------2</link>
            <guid isPermaLink="false">https://medium.com/p/593fd7f1ac97</guid>
            <dc:creator><![CDATA[Orchid Majumder]]></dc:creator>
            <pubDate>Wed, 11 Feb 2015 18:01:31 GMT</pubDate>
            <atom:updated>2015-10-11T17:42:45.406Z</atom:updated>
            <content:encoded><![CDATA[<p>The art of going away from someone, as I have realized in my not-so-eventful life span, is one of the most difficult art to master. It is probably more or less equally difficult for everyone and to me, it has always been a overwhelmingly daunting task to bid adieu to someone.</p><p>While analyzing the root cause of this problem, the thing that I nailed down to be most crucial is the thinking that goes in my mind in the ‘not happy case’ time period. When things are going perfect, you’d never think of all these. It is ‘happy happy’ for some time, eventually issues start gathering up and once in a while thoughts would start coming to mind is like “Should I call it a day and go away or should I try to adjust and hope for a better tomorrow?”</p><p>In this scenario, some people I have seen are strong enough to break every bond within a very short time frame, and there are people like me who decides to keep on living with these issues. People of first kind, they do get momentary sadness, but I believe killing it at one go is much less pain to bear with than riding on an uncertain flow of events for a longer duration and people who can do that are certainly happier for more amount of time that someone like me who is over optimistic about things working fine or maybe, in the hindsight, I consider it a failure on my side that I could not make it work.</p><p>I am not saying that I’d ever try to become like those set of people that I described as ‘first kind’, but I feel, had I been like that, life would have been happier for me for more number of days than it currently is.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=593fd7f1ac97" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>