<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Computational-Graphs on Sanketh's Blog</title><link>https://sankethbk.github.io/blog/tags/computational-graphs/</link><description>Recent content in Computational-Graphs on Sanketh's Blog</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Sat, 12 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://sankethbk.github.io/blog/tags/computational-graphs/index.xml" rel="self" type="application/rss+xml"/><item><title>Computational Graphs, Part 2: Branching — Why Gradients Add</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-12-1-branching-why-gradients-add/</link><pubDate>Sat, 12 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-12-1-branching-why-gradients-add/</guid><description>&lt;h1 id="computational-graphs-part-2-branching--why-gradients-add"&gt;Computational Graphs, Part 2: Branching — Why Gradients Add&lt;/h1&gt;
&lt;p&gt;The &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-09-computational-graphs-and-backpropagation"&gt;previous note&lt;/a&gt; covered the forward pass, the chain rule, and the backward pass on a graph where every input had exactly one path to the output. This note adds the one remaining piece: what happens when an input feeds into &lt;strong&gt;more than one&lt;/strong&gt; operation.&lt;/p&gt;
&lt;p&gt;When that happens, there are multiple paths from the input to the output. The chain rule tells us to &lt;strong&gt;add&lt;/strong&gt; the contributions from those paths.&lt;/p&gt;</description></item><item><title>Computational Graphs, Part 3: A Single Neuron and Logistic Regression</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-12-2-single-neuron-as-a-graph/</link><pubDate>Sat, 12 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-12-2-single-neuron-as-a-graph/</guid><description>&lt;h1 id="computational-graphs-part-3-a-single-neuron-and-logistic-regression"&gt;Computational Graphs, Part 3: A Single Neuron and Logistic Regression&lt;/h1&gt;
&lt;p&gt;The &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-12-1-branching-why-gradients-add"&gt;previous note&lt;/a&gt; showed how gradients add when one input feeds multiple operations. With that in place, we can now look at a real model: a single neuron. We will draw it as a graph, run the forward pass and backward pass by hand, and then connect it back to the logistic regression from the &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-07-ml-refresher-linear-logistic-regression"&gt;first note&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="1-what-you-will-learn"&gt;1. What you will learn&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;How a single neuron is a small computational graph.&lt;/li&gt;
&lt;li&gt;The forward pass through a weighted sum and an activation function.&lt;/li&gt;
&lt;li&gt;The backward pass through the same graph.&lt;/li&gt;
&lt;li&gt;Why logistic regression is exactly a one-neuron network with sigmoid activation.&lt;/li&gt;
&lt;li&gt;How the cross-entropy loss fits into the graph as an extra node.&lt;/li&gt;
&lt;li&gt;Why the gradient formula from logistic regression matches the chain-rule result.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="2-a-single-neuron"&gt;2. A single neuron&lt;/h2&gt;
&lt;p&gt;A neuron with two inputs has three steps:&lt;/p&gt;</description></item><item><title>Computational Graphs and Backpropagation</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-09-computational-graphs-and-backpropagation/</link><pubDate>Wed, 09 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-09-computational-graphs-and-backpropagation/</guid><description>&lt;h1 id="computational-graphs-and-backpropagation"&gt;Computational Graphs and Backpropagation&lt;/h1&gt;
&lt;p&gt;This note explains how to compute gradients for any function by breaking it into a graph of simple operations. It is the bridge between the gradient-descent picture from the &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-07-ml-refresher-linear-logistic-regression"&gt;linear and logistic regression note&lt;/a&gt; and the layered functions we will later call neural networks.&lt;/p&gt;
&lt;p&gt;The ideas are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Draw the function as a graph of operations.&lt;/li&gt;
&lt;li&gt;Evaluate the graph from inputs to output: the &lt;strong&gt;forward pass&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Use the chain rule to carry sensitivities from the output back to the inputs: the &lt;strong&gt;backward pass&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We build this on one tiny example and walk through every step.&lt;/p&gt;</description></item></channel></rss>