<?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 Atharva Rao on Medium]]></title>
        <description><![CDATA[Stories by Atharva Rao on Medium]]></description>
        <link>https://medium.com/@atharva.rao007?source=rss-3adaa92f537e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GTavQksUMtTnm69Bza7jGw.png</url>
            <title>Stories by Atharva Rao on Medium</title>
            <link>https://medium.com/@atharva.rao007?source=rss-3adaa92f537e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 19:06:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atharva.rao007/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[Thermodynamic Computing Project: How to Make AI Reliable]]></title>
            <link>https://medium.com/@atharva.rao007/thermodynamic-computing-project-how-to-make-ai-reliable-2b7facc3856f?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b7facc3856f</guid>
            <category><![CDATA[thermodynamics]]></category>
            <category><![CDATA[stochastic-process]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[computing]]></category>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Sat, 06 Apr 2024 23:26:09 GMT</pubDate>
            <atom:updated>2024-04-06T23:26:09.018Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction:</p><p>What do you think are some of the best vital, high stakes use cases where AI can be deployed?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/1*jO1-BE05hRmzmwqAk1JtWQ.jpeg" /></figure><p>Health care, national security, banking, manufacturing, and other areas crucial to the economy come to mind.</p><p>The advancement of artificial intelligence (AI) has captivated imaginations worldwide, yet it has also brought to light significant challenges within the current AI infrastructure.</p><p>But more specifically, issues such as hallucinations and unwarranted confidence in large language models mean that we critically need dependable, adaptive, and auditable AI systems. However, achieving principled probabilistic reasoning, which forms the bedrock of AI reliability, comes with a substantial computational cost. This realization has highlighted the urgency for the development of probabilistic hardware.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/0*6P3SMM9hOAkG4dAM" /><figcaption>This tech has the ability to change the computational power of computers and what AI algorithms can become feasible for a wide variety of use cases</figcaption></figure><p><strong>What I did:</strong></p><p>I trained an SNGP (Spectral-normalized Neural Gaussian Process) model, and included outputs of a simulated version of the Stochastic Processing Unit as training features in the model. I then also compared this model with a model without the SPU features to see if there would be a substantial impact on the model’s performance.</p><p>In essence, SNGP focuses on enhancing a deep learning classifier’s ability to grasp the distances between data points by making straightforward adjustments to the network architecture. The concept of distance awareness in a model refers to how accurately it can estimate the likelihood of a test example based on how close or far it is from the training data points. By fine-tuning the network in a specific way, SNGP aims to improve the model’s understanding of spatial relationships within the data, ultimately leading to more precise predictions and better generalization capabilities.</p><p><strong>What Steps Did I Take?</strong></p><p>Generate SPU Outputs: First, I simulated the SPU to generate uncertainty values that will be used in the Gaussian sampling for the SNGP model. This involves setting up the SPU simulation with some parameters such as temperature, resistance, and inductance. The output of the SPU simulation will be the uncertainty values, which represent the stochastic component of the SNGP predictions.</p><p>I specifically stimulated the SPU like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cZwPBXNcplvb8Bl_" /></figure><p>Now, the interconnected electrical circuits are capable of storing and moving electrical charges/current. They are set up in a way so that they can influence each other’s behaviors. I have set them all to be initially at rest, but as time goes on, they start exchanging charge and current among themselves.</p><p>Each round, we check on each circuit to see how much charge it’s storing and how much current is flowing through it. We also consider how its neighbors might be affecting it. This interaction between gadgets mimics how a Stochastic Processing Unit (SPU) operates, where data is processed and influenced by its surroundings.</p><p>To make things more realistic, we introduce some randomness into the system, simulating the natural fluctuations that occur due to temperature. This helps us capture the real-world unpredictability that can affect electrical circuits.</p><p>Train and Test SNGP Model: Next, I trained and tested SNGP model. These functions train the SNGP model on the provided training data and evaluates its performance on the test data. During testing, the SNGP model generates logits and covariance matrices representing the predictive mean and uncertainty, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/0*19g0eI0YAC_C5wmR" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/0*S4mh2ydKYDGi0Udg" /></figure><p>A diagram of the differences between an SNGP model and a deep residual network (commonly known as a ResNet). Credit to TensorFlow</p><p>The predictive mean is like an educated guess made by the model based on what it has learned from the training data.</p><p>Uncertainty, represented by covariance matrices (which are summaries of how two variables change together,) shows how sure or unsure the model is about its predictions. High uncertainty means the model is less confident about its predictions.</p><p>A little bit more on covariance matrices — to understand it better, we can work through an example. Imagine you have a set of data points, each with two measurements (let’s say height and weight). A covariance matrix tells you how much those measurements vary together. If height tends to increase as weight increases, you’ll see a positive covariance. If one tends to decrease as the other increases, you’ll see a negative covariance. It’s a way of quantifying the relationship between different measurements in your dataset.</p><p>Incorporate SPU Outputs into SNGP Sampling: After obtaining the uncertainty values from the SPU simulation and the predictive mean and covariance matrices from the SNGP model, I had to integrate the SPU outputs into the SNGP sampling process. I did this by adjusting the sampling method in the SNGP model to incorporate the simulated uncertainty values. The uncertainty-adjusted logits (logits are the outputs of a neural network, but before the activation function — the function which compares the input value to a threshold value to see if a neuron should be activated or not — is applied.) can then be calculated by using the SNGP sampling method, resulting in probabilistic predictions that account for uncertainty.</p><p><strong>What Challenges Did I Face?</strong></p><p>Firstly, the TensorFlow tutorial that I originally tried to follow to implement the SNGP uses the official.nlp.modeling.layers library. However, I experienced a lot of difficulties trying to use this library due to discrepancies in versions when I tried to use this library.</p><p>This caused me to switch my machine learning library from TensorFlow to PyTorch. This is the first time that I have created a project in PyTorch — I decided to follow this awesome tutorial: <a href="https://github.com/Jmkernes/Spectral-Normalized-Gaussian-Process/tree/main">https://github.com/Jmkernes/Spectral-Normalized-Gaussian-Process/tree/main</a> by Jonathan M. Kernes (from UCLA).</p><p><strong>A Paradigm Shift in Computing:</strong></p><p>Why is this space so exciting? To better understand this, we should go through a brief overview of computing and why more physics-based approaches to hardware are so interesting.</p><p>We progressed from ideas like Charles Babbage’s theoretical hardware for an Analytical Engine, with applications mainly in mathematics, to the ENIAC, which used vacuum tubes, during WW2.</p><p>But what let computing truly become widespread, and what arguably led to the advent of the modern day technology industry, is the invention of the transistor in the late 1940s. This was massive because this allowed for smaller, faster, and more reliable machines.</p><p>So as you can see, hardware for computers has evolved in many ways, and can be divided into generations of technological growth, including the transition from vacuum tubes to transistors in the second generation, integrated circuits in the third generation, and microprocessors in the fourth generation.</p><p>Now, another thing I’d like to bring up is Moore’s Law: the observation that the number of transistors on a single chip doubles every two years. This has been continuing since 1975 — but the problem is, this works on the principle of chips becoming smaller and smaller.</p><p>As you can probably predict, we will most likely hit a wall, where Moore’s Law no longer holds. We cannot keep relying on previous techniques of squeezing more and more transistors on chips for increasing computational power. This is what motivates a paradigm shift in computing, and why I believe that a physics-based approach is very promising.</p><p>But it’s not just me or other individuals interested in the technology who recognize the necessity of a shift, especially with AI becoming increasingly important to businesses, governments, and consumers.</p><p>Distinguished figures like Geoffrey Hinton have highlighted the disparity between modern AI algorithms and current digital hardware. Proposing a future where hardware and software seamlessly integrate, he envisions hardware that is variable, stochastic, and transient. Thermodynamic AI emerges as a groundbreaking computing architecture where stochasticity is inherent in its fundamental components.</p><p>But what exactly is stochasticity? The technical definition is: having a random probability distribution or pattern that may be analyzed statistically but may not be predicted precisely. But that’s not exactly very useful.</p><p>Stochasticity is linked with randomness. Imagine you’re rolling dice; when you roll the dice, you can’t predict which specific number will show up. This is because the outcome is random. This type of example is what a stochastic process is like.</p><p>In math and science, we use stochastic processes to describe things that change over time in a random/unpredictable way. Think of examples like the weather, stock market, etc.</p><p>Stochastic processes are all about acknowledging the randomness — we want to deal with the uncertainty in a structured way.</p><p>As you can imagine, if we had hardware that followed these types of processes, we would be able to accomplish much more!</p><p><strong>Understanding the Stochastic Processing Unit (SPU):</strong></p><p>Central to Thermodynamic Hardware is the Stochastic Processing Unit (SPU), which can be conceptualized as an electrical coupled oscillator system. This system comprises interconnected electrical oscillators, akin to a network of coupled pendulums. The dynamics of the SPU are governed by coupled stochastic differential equations, reflecting the inherent stochasticity in the system. Unlike conventional digital hardware, the SPU facilitates continuous-time sampling, eliminating the need for digital discretization. This unique capability allows the SPU to generate samples through natural dynamics, mimicking the probabilistic nature of physical processes.</p><p><strong>Mathematical Foundations of SNGPs:</strong></p><p>SNGPs leverage the principles of Gaussian Processes (GPs), which model functions as Gaussian distributions over function values at a set of input points. Mathematically, a GP is characterized by its mean function and covariance function, which capture the prior beliefs about the function’s behavior.</p><p>In the case of SNGPs, the spectral normalization technique is applied to the covariance function, enhancing its robustness and generalization capabilities. The spectral normalization process involves scaling the eigenvalues of the covariance matrix to stabilize the learning process and mitigate overfitting.</p><p>Think of the covariance function as a tool that helps the model understand relationships in data. Spectral normalization is like giving this tool extra strength and adaptability. By scaling the eigenvalues of the covariance matrix, we make sure this tool is more stable and can handle a wide range of data patterns without getting overwhelmed. In more technical terms, a covariance function describes how much two random variables change together over time or space.</p><p>Eigenvalues are basically special numbers that tell us important things about a matrix — scaling them means that the matrix becomes more stable and is easier to work with in the context of the techniques. You can think about it in this way: It’s like making sure the key characteristics of the matrix are in the right proportion, so it behaves predictably and doesn’t cause problems when we use it in calculations.</p><p><strong>In simpler terms, SNGPs help the model learn more effectively by adjusting how it understands the relationships between different points in the data.</strong> This adjustment makes the model more stable and better at making predictions without getting too fixated on specific details.</p><p><strong>Comparative Analysis of Thermodynamic Hardware and GPUs:</strong></p><p>Normal Computing conducts a comprehensive analysis comparing the performance of Thermodynamic Hardware with state-of-the-art GPUs. Through meticulous timing models, the anticipated advantages of SPUs in terms of speed and energy efficiency are quantified. This analysis reveals the potential for significant speedups and energy savings, particularly in high-dimensional sampling tasks. The co-design of AI algorithms with Thermodynamic Hardware further augments the performance gains, promising to revolutionize AI applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/0*WgrxDuJfyoa7IMIt" /><figcaption>An image of a TPU (tensor processing unit,) which is being used for LLM model training.</figcaption></figure><p><strong>Future Implications and Challenges:</strong></p><p>Looking ahead, Thermodynamic Hardware holds immense promise for the future of AI, offering scalable, reliable, and auditable AI systems. But there remains significant engineering challenges to be addressed to realize the full potential of this paradigm shift. As researchers delve deeper into complex uncertainty quantification methods, such as Bayesian neural networks, the demand for advanced hardware solutions will continue to grow. Thermodynamic Hardware stands poised at the forefront of this technological revolution, paving the way for the next generation of AI advancements — I think that we’re in the early stages of one of the major technological changes that will change our lives.</p><p><strong>Conclusion:</strong></p><p>Thermodynamic Computing represents a watershed moment in the evolution of AI, promising to address the fundamental challenges plaguing current AI infrastructure. Through the innovative integration of probabilistic hardware accelerators like the SPU and advanced uncertainty quantification methods like SNGPs, Normal Computing is spearheading a revolution in AI reliability. We will be able to unlock the full power of AI, when we reach a stage where we know how confident a model’s output will be.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b7facc3856f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimization and its Use Cases: How Math Runs the World!]]></title>
            <link>https://medium.com/@atharva.rao007/optimization-and-its-use-cases-how-math-runs-the-world-7efbb9aac526?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/7efbb9aac526</guid>
            <category><![CDATA[linear-programming]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Mon, 05 Feb 2024 04:18:22 GMT</pubDate>
            <atom:updated>2024-02-05T04:18:22.444Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hello! It’s Atharva. I’ve been continuing my deep dive on artificial intelligence, and I’ve been studying the techniques used that make AI possible.</h4><h4>Recently I became very intrigued by optimization problems, because of the role they play in things like sampling and choosing the best model. Essentially, an optimization problem can be thought of as maximizing or minimizing functions by choosing some specific inputs for that function. These problems are a subset of applied mathematics.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/262/0*MuN6GX7bwTWdppfN" /></figure><p>Above is a diagram of all of the different types of optimization problems. We will be discussing decision variables, which are key differentiators between the types of problems throughout the rest of the article.</p><h4><strong>What I chose as an introductory project to this field was to create a frontend for solving these types of problems (specifically of the numerical type) with Google’s OR-Tools library, which is one of the best performing libraries for solving optimization problems.</strong></h4><p>Additionally, I included sections for solving the Travelling Salesman Problem and Vehicle Routing Problem, which are important optimization problems in the field of logistics. I also visualized the solutions to these problems using the Folium library:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/0*7MsKnWexnb-6ke_9" /></figure><h4>Folium allows you to do geospatial visualization (this means you can create interactive graphs)!</h4><h3>Optimization Problem:</h3><p>An optimization problem is a mathematical challenge where you want to find the best solution from a set of possible solutions. The term “best” is defined by an objective function, which we want to either maximize or minimize. These problems often involve making the most effective use of limited resources.</p><h3>Constraint:</h3><p>In optimization problems, constraints are conditions or restrictions that must be satisfied. These limitations could be related to resources, budget, time, or any other factor. Constraints play a crucial role in shaping the feasible solutions and ensuring they adhere to specific criteria.</p><h3>Objective Value:</h3><p>The objective value is the result of the objective function for a particular solution. In simple terms, it represents how good or bad a solution is according to the problem’s goal. For maximization problems, higher objective values are desirable, while for minimization problems, lower values are better.</p><h3>Variable Value:</h3><p>Variables in optimization problems are the elements we’re trying to determine to achieve the best solution. The variable values are the specific choices or amounts assigned to these variables in the optimal solution. Solving the problem involves finding the values that optimize the objective function while satisfying the constraints.</p><h3>TSP (Traveling Salesman Problem):</h3><p>The Traveling Salesman Problem (TSP) is a classic optimization problem where a salesperson needs to visit a set of cities exactly once and return to the starting city. The goal is to find the shortest possible route that visits all cities. TSP is a well-known problem with applications in logistics, transportation, and circuit design.</p><h3>VRP (Vehicle Routing Problem):</h3><p>The Vehicle Routing Problem (VRP) extends TSP to include multiple vehicles that start and end at a central depot. Each vehicle has a capacity, and the objective is to find the most efficient way for the fleet to deliver goods to a set of locations, minimizing total distance or cost. VRP is common in logistics and distribution scenarios.</p><h3>Modular Functions:</h3><h4>create_distance_matrix:</h4><p>This function calculates the distances between locations based on their coordinates. It’s essential for problems like TSP or VRP where distances play a crucial role in finding optimal routes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/0*B-F8Fdjv3sZZErx9" /></figure><h4>create_data_model:</h4><p>Creates a structured data model based on the problem type and user input. For VRP, it considers factors like vehicle capacity, depot location, and delivery demands.</p><h4>print_solution:</h4><p>Prints detailed information about the solution, including the objective value and the specific routes taken. This function helps users understand and interpret the results of the optimization.</p><h3>Linear Programming Solver:</h3><h4>linear_programming_solver:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/0*KvTyFq0_pZatioGS" /></figure><p>Solves linear programming problems using the GLOP solver from OR-Tools. Linear programming involves optimizing a linear objective function that is based on linear equality and inequality constraints. GLOP is a solver that specializes in linear optimization.</p><h3>Integer Programming Solver:</h3><h4>integer_programming_solver:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/0*PhaOGqjJ7r2RmCjX" /></figure><p>Solves integer programming problems using the CP-SAT solver from OR-Tools. Integer programming extends linear programming by adding the requirement that some or all variables must take integer (so decimals are not included) type values. CP-SAT is a powerful solver for combinatorial optimization problems. In order to explain combinatorial optimization problems, take for example that you have a set of choices, each with different outcomes and constraints. Combinatorial optimization helps identify the best combination of choices to achieve the most favorable result, considering the given limitations. The challenge lies in efficiently exploring the vast solution space to find the optimal solution. Combinatorial optimization is the act of searching for the best solution.</p><h3>Constraint Programming Solver:</h3><h4>constraint_programming_solver:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/0*qVL1HZJ07_RxzcHE" /></figure><p>Addresses constraint programming problems using the CP-SAT solver. Constraint programming is useful when the relationships between variables can be expressed as constraints. Constraints can be explicit rules, requirements, or limitations imposed on the decision variables of the problem. CP-SAT is versatile and effective for a wide range of combinatorial problems.</p><p>Decision variables are the things you get to decide or choose in a problem. For example, in a transportation optimization problem, decision variables could be the amount of goods to be transported from one location to another. In a scheduling problem, decision variables might represent the assignment of tasks to different time slots or resources.</p><h3>Vehicle Routing Solver:</h3><h4>routing_solver:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/0*iBxSckJalXzDFIHJ" /></figure><p>Solves vehicle routing problems using the OR-Tools routing library. It considers factors like distance, capacity, and constraints to determine optimal routes for a fleet of vehicles. This solver is specifically tailored for logistics and delivery scenarios.</p><h4>Geocoding Integration:</h4><p>Uses the Geopy library to convert addresses into geographical coordinates. This is important for visualizing locations on the map and solving problems involving real-world addresses.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*gqdJnMiHJo1rizHu" /></figure><h4>Data Visualization:</h4><p>Utilizes Folium, a Python library for creating interactive maps, to visualize the locations and routes. It enhances the UX by providing a dynamic and interactive representation of the optimization results.</p><h4>Dynamic Data Update:</h4><p>Allows users to dynamically add new deliveries and instantly see the updated solution. This feature is valuable for scenarios where the optimization problem evolves over time, and new data points need to be incorporated.</p><h4>Input Handling:</h4><p>Ensures smooth interaction by handling user input for various parameters, coefficients, and constraints. Streamlit’s input widgets make it easy for users to provide input without dealing with complex code.</p><h4>Optimization Results Display:</h4><p>This part displays the results of the optimization, including objective values, variable values, and routes. This feature is for interpreting and understanding the outcomes of the optimization process.</p><p>Those are the features of my code! I found this project very interesting and enjoyable to work on — it allowed me to go more in-depth when it comes to my passion for applying math to the real world in order to solve complex problems.</p><p>As always, if you’re interested in my journey in the software world and want to keep up with what I’m doing, be sure to follow me on Twitter: <a href="https://twitter.com/AtharvaRao13">https://twitter.com/AtharvaRao13</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7efbb9aac526" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSSHack 2023: My Reflection]]></title>
            <link>https://medium.com/@atharva.rao007/osshack-2023-my-reflection-eff82b72ecd7?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/eff82b72ecd7</guid>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 05:55:09 GMT</pubDate>
            <atom:updated>2023-12-13T16:10:18.049Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*E3Pks6LwChWedXwjYR9uyw.jpeg" /></figure><p>Hey everyone! I participated in OSSHack this weekend and wanted to discuss my process, idea, and what I think I can improve on for future hackathons.</p><p>I first started out with wanting to create an alternative data platform for traders — I thought this would be a cool idea that built off of some of my previous experience in Python, and would be an interesting way to tackle the challenge of Best LLM Implementation. In hindsight, I am kinda regretting that I did not choose to do any of the bounties, as I would have been able to build some experiences in forking repos and building off of them. I would have also gotten some experiences with contributing to open source code others have created.</p><p>I narrowed my alt data idea to include weather data and satellite data, and be targeted most specifically towards commodity traders. I wanted to use APIs to get the data, and then display it in a dashboard format. My list of APIs was NASA LANCE, opencage, and OpenMeteo. I highly recommend using these APIs for accessing this type of data, even though I had to change my idea for this hackathon heavily because I was not able to finish it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*K3vIK6LSXyggPXu04ze84A.jpeg" /><figcaption>OpenMeteo is great for near real-time weather data and forecasts!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*ugSeQ-X5z_tyh1odY_-18g.png" /><figcaption>I wanted to use opencagedata for getting co-ordinates based on location names, and then passing the co-ordinates to NASA LANCE</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/192/1*dG_6aQ08PgWWtgF22-ioWQ.jpeg" /><figcaption>NASA LANCE is what I would have used to actually get the satellite data</figcaption></figure><p>In my case, on Friday I started by trying to use Cursor AI to create a basic version of my app. My prompt included specific mentions of Python, React, and Flask. I used it and had it write skeleton code for my project, but as I continued to program, I realized I had underestimated how much I would be able to get done in a weekend. My original app allowed a user to pick a commodity, and then get alt data that was related to that commodtiy. I wanted my app to be able to automatically understand which area’s weather would be most important to the commodity’s price, however I was not able to finish this in time. I was also not able to query for the satellite data and present it to the user in time as well — however I think an awesome application of LLMs is the ability to query this data by using natural language! I really agree with the viewpoint that LLMs can change the way we work with data, and in the future we’ll treat SQL like we treat assembly code now, in the sense that it’s a lower level implementation we do not need to deal with.</p><p>What I eventually landed on was using the newsapi and getting news articles related to a stock ticker. I then implemented open-source LLMs to perform sentiment analysis on these articles. The two LLMs I used were VADER and spaCy NER model. I performed sentiment analysis on the articles and then displayed the differences in results between these two models. I displayed the scores and visualized the sentiment scores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*AWgag4_YrIMSiNG-L-8okg.png" /><figcaption>How I fetched the news data based on a user-inputted stock symbol</figcaption></figure><p>I learned a lot from this hackathon, and I’m glad I was able to be accepted to participate in it. I met a lot of cool people working on interesting projects and products, and I was able to learn about my strengths and weaknesses in development.</p><p>Here are my main learnings from OSSHack:<br>1) Have a clearly defined idea that uses the work of the hackathon sponsors<br>2) Know what your skills are — what stack allows you to work best?<br>3) Having a team is probably the best, as it allows you to distribute work<br>4) Enjoy the process!</p><p>I hope you all enjoyed this article and my reflections on OSSHack 2023. I look forward to doing it next year as well! If you’re interested in machine learning, programming, finance/trading, or even just enjoy the things I write about, please be sure to follow me on Twitter: <a href="https://twitter.com/AtharvaRao13">https://twitter.com/AtharvaRao13</a></p><p>Here’s a link to a repo of my project: <a href="https://github.com/PrinceZugzwang/sentiment_analysis">https://github.com/PrinceZugzwang/sentiment_analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eff82b72ecd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[November Newsletter]]></title>
            <link>https://medium.com/@atharva.rao007/november-newsletter-35620caa4fd1?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/35620caa4fd1</guid>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 06:05:08 GMT</pubDate>
            <atom:updated>2023-12-06T06:05:08.656Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey! Hope the fall/winter has been treating you all well! It’s a weird time for weather in my city because we’re meant to be having snow, but hey, all the more opportunities for meeting people!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*s2fESGp11eBxe_2DlP-dNg.png" /><figcaption>Delved into the world of algo trading over the last few weeks!</figcaption></figure><p>This month I focused in on learning some more skills in the tech space-I built on some of my data analytics skills in Python + Streamlit, and I’ve really been trying to work on the frontend side of things.</p><p>A next project I want to undertake is building a custom UI on top of Apache NiFi. I really like the drag and drop format for data ingestion- I think it’s a very useful tool that would be awesome to work with!</p><p>I also made some progress on a personal project of mine — integrating automated machine learning into the world of finance!</p><p>A quick disclaimer: My views are still that simplicity = true predictive power in the world of finance; the role of AI is not really going to be in predicting the price of financial assets. It’s going to be in risk management, portfolio optimization, etc.</p><p>I followed a tutorial from Ernest P. Chang’s awesome book for an intro to algorithmic trading- <a href="https://www.amazon.ca/Algorithmic-Trading-Winning-Strategies-Rationale/dp/1118460146">Algorithmic Trading: Winning Strategies and Their Rational</a></p><p>What I did in my program was:<br>1) Calculate a ratio between EWA and EWC, two ETFs associated with the Canadian and Australian economies, which are correlated because their economies are based on many of the same industries (natural resources, mining, etc.)</p><p>2) Compute a rolling mean, rolling standard deviation, and z-scores</p><p>3) Create positions for the algorithm to take based on the z-scores</p><p>4) Create visualizations for the trading strategy’s PnL over time</p><p>5) Predicting the values of future ratios with the AutoTS model</p><p>I thought that this was an interesting application of autoML in the finance space, also in an adjacent way because I’m not directly predicting the price of the ETFs but rather their spread.</p><p>Here are the visualizations I was able to create!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0oYO1MfBARngnB_CRsREQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*wAB2gkYzlwcYqqFGu_qWQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*vnAPB8yancbZflkT60Jyrw.png" /></figure><p>I thought it was a pretty interesting intro program to the world of algorithmic trading!</p><p>I also participated in my first ever hackathon: OSSHack! It’s a hackathon focused on open source code. They have both an in-person and remote section, and they had sponsors like Cal.com, Red Bull, Google, etc. If you’d like to learn more about what I built and my experiences, be sure to check out my reflection here: <a href="https://medium.com/@atharva.rao007/osshack-2023-my-reflection-eff82b72ecd7">https://medium.com/@atharva.rao007/osshack-2023-my-reflection-eff82b72ecd7</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAxGeMWMXLrJ-bsGbFiAug.png" /></figure><p>Here’s some other potential ideas that I want to be working on over the next few weeks and during winter break (after exams are all done haha):</p><p>Create LLM that queries for uploaded data with natural language</p><p>Create LLM that goes from language =&gt; custom objective functions (research how to make an LLM that automatically makes Python code)</p><p>Following this really cool tutorial for SQL-based algorithmic trading: <a href="https://university.redpanda.com/courses/use-cases-algorithmic-trading">https://university.redpanda.com/courses/use-cases-algorithmic-trading</a><br>(I think it would be my first step towards programming near real-time financial trading!)</p><p>In terms of some personal reflections, I’ve been getting really into learning about speeches, rhetoric, stuff like that. I find it very interesting that you can use a wide array of techniques to convince people to take a certain perspective (can you tell I’ve been learning about rhetoric in English?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*msfsU-f5M8l0e3jRZc-PxQ.png" /></figure><p>I especially find the cadence of speeches, use of silence, stuff like that in order to gain attention is a remarkable way of “hacking” the brains of listeners.</p><p>That’s all I have for now. Thank you so much for reading! I’m looking forward to learning more about the way software will continue to change the world around us. If you’re interested in connecting with me, be sure to follow my Twitter: <a href="https://twitter.com/AtharvaRao13">https://twitter.com/AtharvaRao13</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35620caa4fd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[October Newsletter]]></title>
            <link>https://medium.com/@atharva.rao007/october-newsletter-15f4da3787f4?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/15f4da3787f4</guid>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Sun, 12 Nov 2023 03:23:49 GMT</pubDate>
            <atom:updated>2023-11-12T03:23:49.457Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone! I’m Atharva, the tech enthusiast obsessed with democratizing artificial intelligence and machine learning to everyday people. I’m currently building my data centralization and automated machine learning app, TradeSynth!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o3eH6qsBgyjoO-2NLEpeVw.png" /></figure><p>In terms of some progress on TradeSynth I’ve made is:</p><ol><li>Added the ability to upload tabular data in the forms of PDFs</li><li>Added an automated cleaning feature</li><li>You can now have Exploratory Data Analysis directly in the app!</li></ol><p>Coding this was relatively challenging, because I wanted to tackle practical business applications that come with using these different data types, not just create an app that works with ideal data.</p><p>For example, I worked hard to make the app be able to accept data like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjuVaUIOWjt1U5E7Ail0Mg.png" /></figure><p>Where the data doesn’t begin in the A1 cell. Looks simple but it’s kind of difficult!</p><p>Throughout the month I gradually realized just how important listening to the customer + iterating and coding actually is. After talking to some really talented founders and interviewing super intriguing VC partners, I feel like I’ve gotten a grasp on just how disastrous the illusion of building something people seem to like/can imagine other people liking can be; it can make it so that an idea grows but eventually reaches a stage where it becomes obvious not enough people are in dire need of that idea.</p><p>Some other fun stuff I did included volunteering at the Bet On Canada Conference here in Calgary, hosted by The Peak! It was awesome to: 1) Hear from different founders about their journey, 2) Learn about how different companies want to integrate AI into their workflow(you can guess why I’m super interested in that topic!,) and 3) How to deal with the challenges of running a business. It was a really motivating and fulfilling experience, and I hope to volunteer at other conferences in the future! I had a lot of fun meeting Alex Blumenstein and the rest of The Peak team, and working alongside fellow TKS students.</p><p>In terms of some personal growth, I’ve still been focused on learning more about innovations. I read this new research paper on innovations in time series forecasting: basically, diffusion models were previously used to find anomalies on images, but now this study used them to find anomalies on time series data, which could be a really interesting way of making models competitive when it comes to real-world application: <a href="https://paperswithcode.com/paper/time-series-anomaly-detection-using-diffusion">https://paperswithcode.com/paper/time-series-anomaly-detection-using-diffusion</a></p><p>Still been reading up on Paul Graham’s always insightful articles, and this one shared with me by my TKS director Steven Ritchie really changed my perspective on many things in life, including motivations, opportunity and making the most out of any work: <a href="http://paulgraham.com/greatwork.html">http://paulgraham.com/greatwork.html</a>. If you’d like my in-depth annotations, you can find them on my Twitter (or I guess it’s called X now…)</p><p>Moving onto some of the stuff on my mind, I’ve been in deep thought about tech and ethics. Seeing the recent AI Safety Summit: (<a href="https://www.gov.uk/government/topical-events/ai-safety-summit-2023">https://www.gov.uk/government/topical-events/ai-safety-summit-2023</a> and some of the topics they discussed evoked in me an interesting reaction, because it felt like governments were finally beginning to understand the scale and use of AI as a general purpose technology, but also the potential threat associated with it. I realized that data security is one of the most important ideas to keep on our minds as we take the next great leap in the tech space.</p><p>If you’d like to learn more about me, what I’m building, and my perspectives on life as a young person, be sure to follow me on X: @AtharvaRao13</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15f4da3787f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AutoML: Machine Learning on Steroids]]></title>
            <link>https://medium.com/@atharva.rao007/automl-machine-learning-on-steroids-fdf1988405a8?source=rss-3adaa92f537e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdf1988405a8</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[automl]]></category>
            <dc:creator><![CDATA[Atharva Rao]]></dc:creator>
            <pubDate>Sun, 29 Oct 2023 18:59:08 GMT</pubDate>
            <atom:updated>2023-11-03T04:39:07.250Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*WgIJ_11nqp73JgS6ISIsyw.jpeg" /></figure><p><strong>1.1</strong></p><p>What if I told you that we could use machine learning…to improve machine learning? While that may seem super futuristic, it’s actually being used at this moment!</p><p>We call this an example of: automated machine learning. It automates a lot of the more tedious parts of machine learning — we’re talking things like:</p><ul><li>Data preprocessing</li><li>Feature selection</li><li>Hyperparameter tuning</li><li>Algorithm Selection</li></ul><p>In fact, have you heard of Auto-GPT? It’s an AI agent that uses automated machine learning in order to achieve goals (for example, it can be used as an assistant that not only does the first goal you assign it, but also finishes other related goals that you would be thinking of.)</p><p>That’s just one use of automated machine learning in the realm of natural language processing, but it works in so many more areas of machine learning.</p><p>But we should first start with how traditional machine learning works. At its core, ML comprises a spectrum of techniques including supervised learning, unsupervised learning, and reinforcement learning.</p><p>Supervised learning involves training models on labeled data to learn a mapping from inputs to outputs. In this labelling process, which is a part of the preprocessing stage, a human data scientist is necessary to label the data. As an example, if we were training a model for an autonomous vehicle on video, and we wanted it to know what humans were and avoid them, we’d have a data scientist label the humans in the frames of video prior to training the model.</p><p>In unsupervised learning, the focus is on extracting hidden structures and relationships within unlabeled data. The model learns patterns in the data by attempting to mimic the unlabeled data in the beginning, and in this process, it gradually learns hidden patterns not obvious to humans which are in the data. These types of processes are useful when we are in new territory; for example, if we have a new product, we could use unsupervised learning to predict a target demographic; you don’t have information on the target demographic yet.</p><p>Reinforcement learning, on the other hand, deals with agents learning to make sequential decisions to maximize cumulative rewards through interaction with an environment, often framed as a Markov Decision Process. What is a Markov Decision Process, you ask? It’s essentially a mathematical model for making decisions when we don’t know what future events will happen with certainty. The key idea in a MDP is that the future only depends on the current state, not anything in the past. The goal inside of this environment called an MDP is to find an optimum strategy to maximize a certain metric or accomplish a goal.</p><p>Let’s get a more specific understanding of AutoML:</p><p><strong>1.2</strong></p><p>So what actually is automated machine learning, and why is it so useful? Simply put, it’s a set of techniques and tools for making machine learning models. <strong>In reality, it’s more like a combination of many different technologies that results in an automated process for making machine learning models.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UMg9s6os65VyUv2v.png" /><figcaption>(<a href="https://learn.microsoft.com/en-us/dotnet/machine-learning/automated-machine-learning-mlnet">https://learn.microsoft.com/en-us/dotnet/machine-learning/automated-machine-learning-mlnet</a>)</figcaption></figure><p>As you can see, autoML cuts out a large chunk of the work that a data science using a traditional workflow would have to do. More specifically, it automates the parts of the workflow dealing with evaluating and training models, and preprocessing data before it is sent into the models.</p><p><strong>1.3</strong></p><p>What are some key technical aspects that make automated machine learning (and to a certain extent, machine learning in general,) work:</p><ol><li>Hyperparameter optimization — techniques that automate tuning a model’s parameters</li><li>Feature engineering — methods that create and choose vital features in the dataset</li><li>Algorithm choosing — automatically choosing among a wide variety of ML algorithms</li><li>Ensemble techniques — combining predictions from many different models</li><li>Cross-Validation — Evaluating the model’s performance on unseen data</li><li>Explainability — Automated ways of explaining the model’s performance to a non-technical audience</li><li>Metrics — Measures and ways to quantity and assess a model’s performance</li></ol><p>Let’s go through some usecases and autoML’s role in them to better understand where it’s useful:</p><p><strong>Financial Risk Assessment:</strong></p><p>When autoML is used in finance, it relies on:</p><ol><li><strong>Randomized Grid Search and Bayesian Optimization</strong>: In terms of hyperparameter optimization, these are the main techniques used in autoML to fine tune the hyperparameters, which is a parameter value set before the learning process begins. These hyperparameters impact how quickly a learning process occurs, and the quality of the model’s learning. <strong>Since these model parameters have to be guessed before actually accessing the data</strong>, automating their selection removes a step for the data scientist. Examples of these parameters would be <strong>subsampling rates </strong>(the rate of choosing a subset of data to train the model on due to time constraints, ) <strong>learning rates</strong> (the step size an optimization algorithm takes when updating the model parameters during training,) and <strong>maximum tree depth</strong> (in the context of tree-based models, the max tree depth is the number of splitting criteria the model is allowed to use, or in other words, the max number of conditions in decision trees and random forests.)</li><li><strong>Ensemble Methods: </strong>Models like Random Forest, AdaBoost, and stacking are used in AutoML to create ensemble models that combine various base models, often fine-tuned through hyperparameter optimization.</li></ol><p><strong>Drug Discovery:</strong></p><p>AutoML in drug discovery utilizes a range of techniques and models:</p><ol><li><strong>Graph Neural Networks (GNNs):</strong> AutoML harnesses GNNs for molecular graph analysis and virtual screening. These models are fine-tuned through Bayesian optimization to optimize hyperparameters such as <strong>graph convolution layers, learning rates, and graph pooling methods.</strong></li><li><strong>Autoencoders and Variational Autoencoders:</strong> Variational autoencoders (VAEs) are used to <strong>generate novel molecular structures</strong>, and their <strong>hyperparameters</strong>, including <strong>latent space dimensions and learning rates, are optimized through Bayesian optimization</strong>.</li><li>Hyperparameter Optimization Algorithms: Bayesian optimization, Tree-structured Parzen Estimators (TPE), and Sequential Model-Based Optimization (SMBO) are deployed to fine-tune hyperparameters of machine learning models used in molecular activity prediction, such as deep neural networks and gradient boosting machines.</li></ol><p><strong>Supply Chain Management:</strong></p><p>AutoML in supply chain management encompasses mathematical and statistical techniques used in machine learning like:</p><ol><li><strong>Long Short-Term Memory (LSTM):</strong> LSTM networks are based on mathematical concepts of recurrent neural networks (RNNs). <strong>The optimization of hyperparameters involves gradient-based methods such as stochastic gradient descent (SGD) and mathematical operations like backpropagation through time (BPTT</strong>).</li><li><strong>Stochastic Inventory Models:</strong> Mathematical models like the Continuous Review Model use stochastic optimization techniques to minimize inventory costs. This includes solving <strong>dynamic programming equations to find the optimal ordering policies</strong>.</li><li><strong>Combinatorial Optimization Algorithms:</strong> Combinatorial optimization involves mathematical formulations of problems like the Traveling Salesman Problem (TSP), including <strong>cost functions, constraints, and objective functions</strong>. Algorithms like branch-and-bound and integer programming solve these mathematically.</li></ol><p>In these advanced use cases, AutoML optimizes not only the choice of models and their hyperparameters but also complex aspects such as the optimization of routes, demand prediction, and real-time traffic management. The application of specific hyperparameter optimization algorithms and machine learning techniques demonstrates the sophistication and technical depth of AutoML in each domain.</p><p><strong>1.4</strong></p><p>Automated machine learning lets people who either 1) do not want to pay a data science team to create a machine learning model or 2) want an easy, streamlined way of making a model. It also is currently being used predominantly by machine learning teams to get a basic model up and running, which they can then fine tune with their expertise.</p><p><strong>1.5</strong></p><p>One of the first ever companies to dabble into autoML successfully would be DataRobot, all the way back in 2013. (<a href="https://www.datarobot.com/blog/automated-machine-learning-short-history/">https://www.datarobot.com/blog/automated-machine-learning-short-history/</a>)</p><p>Since then, many different firms, including startups and Big Tech, have taken on the implementation of AutoML. Google, Microsoft, Amazon, and Meta have all dedicated resources to creating AutoML tools. Salesforce even acquired a startup named BeyondCore, a startup focused on analyzing data using statistical and computational methods, to gain ground in the market for machine learning models.<br>(<a href="https://builtin.com/machine-learning/automl-automated-machine-learning">https://builtin.com/machine-learning/automl-automated-machine-learning</a>)</p><p><strong>1.6</strong></p><p>Some challenges that have resulted in AutoML not replacing data scientists as predicted 5 to 6 years ago include:</p><ul><li>Not understanding business context — because data scientists have specific domain knowledge, they can help correctly frame a problem, which is something that automated machine learning cannot directly help with</li><li>Model interpretability — before, we lacked good ways of understanding why models make certain predictions; we had “black box models”. Now with techniques like LIME (Local Interpretable Model-agnostic Explanations) and SHAPE (SHapley Additive exPlanations,) this problem is here to address</li><li>Legacy Systems and Problems with Integration — AutoML platforms can’t easily integrate with older systems, so data scientists may be required to fix this issue by manually extracting and transforming the data.</li></ul><p><strong>1.7</strong></p><p><strong>The future of autoML can be boiled down to some key trends:</strong></p><ol><li>User Education — investing in user education and training will lead to a significant uptick in adoption</li><li>Continuous learning and and monitoring — AutoML platforms that support continuous learning and model monitoring will become more prevalent</li><li>Automated Data Governance — solutions that can automate legal compliance with data privacy regulation will be in high demand</li><li>IoT + AutoML — if we can deploy and manage AutoML to where data is being generated, we can gather more accurate insights</li></ol><p><strong>1.8</strong></p><p>Automated machine learning is influencing the world around us to gradually require less and less specialization in the field of data science and statistics to reap the benefits of machine learning models. We are at the brink of being in a world of democratized access to machine learning models — the day when we can all create machine learning models, just like how we can all create websites, without domain-specific knowledge, is coming!</p><p>Some key takeaways I hope you’ve learned are:</p><ul><li>Automated machine learning is a set of tools and techniques</li><li>They haven’t replaced data teams yet — but are becoming more and more accurate each and every single day</li><li>The next development in the AI market may not be about creating the one best model — it could be about creating numerous, high-quality models instead</li></ul><p>That’s all I have for now — thank you so much for reading about my interest in AutoML. If you’d like to learn more about AI, machine learning, and other tech-related fields, please be sure to follow me on Twitter!: @AtharvaRao13</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdf1988405a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>