<?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>Softmax on Sanketh's Blog</title><link>https://sankethbk.github.io/blog/tags/softmax/</link><description>Recent content in Softmax on Sanketh's Blog</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Sun, 20 Sep 2026 00:00:00 +0530</lastBuildDate><atom:link href="https://sankethbk.github.io/blog/tags/softmax/index.xml" rel="self" type="application/rss+xml"/><item><title>Attention: Turning Token Vectors into Context Vectors</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-20-1-attention-turning-token-vectors-into-context/</link><pubDate>Sun, 20 Sep 2026 00:00:00 +0530</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-20-1-attention-turning-token-vectors-into-context/</guid><description>&lt;h1 id="attention-turning-token-vectors-into-context-vectors"&gt;Attention: Turning Token Vectors into Context Vectors&lt;/h1&gt;
&lt;p&gt;The &lt;a href="https://sankethbk.github.io/blog/posts/ml/2026-09-14-4-embeddings-from-one-hot-to-learned-representations"&gt;embeddings note&lt;/a&gt; ended with an honest limitation: a token&amp;rsquo;s embedding is one fixed row of a learned matrix. The word &amp;ldquo;bank&amp;rdquo; gets the same vector in &amp;ldquo;river bank&amp;rdquo; and &amp;ldquo;investment bank&amp;rdquo;. Everything the model can possibly know about &amp;ldquo;bank itself&amp;rdquo; is frozen into that row at training time.&lt;/p&gt;
&lt;p&gt;But meaning is contextual. When a model processes a sentence, what it needs at the position of &amp;ldquo;bank&amp;rdquo; is not &amp;ldquo;the generic bank vector&amp;rdquo; but &amp;ldquo;the vector of bank &lt;em&gt;as it appears in this sentence&lt;/em&gt;&amp;rdquo;. Attention is the mechanism that builds that second thing from the first.&lt;/p&gt;</description></item><item><title>Softmax and Multiclass Cross-Entropy: Turning Raw Scores Into Probabilities</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-14-3-softmax-and-multiclass-cross-entropy/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-14-3-softmax-and-multiclass-cross-entropy/</guid><description>&lt;h1 id="softmax-and-multiclass-cross-entropy-turning-raw-scores-into-probabilities"&gt;Softmax and Multiclass Cross-Entropy: Turning Raw Scores Into Probabilities&lt;/h1&gt;
&lt;p&gt;So far, every classification in these notes has been binary — spam or not, XOR&amp;rsquo;s 0 or 1 — and the output has been single sigmoid feeding binary cross-entropy, whose gradient collapsed to the beautiful
$\delta = a - y$
.&lt;/p&gt;
&lt;p&gt;Real classifiers rarely answer two-way questions. &amp;ldquo;Which of 10 digits is this image?&amp;rdquo; &amp;ldquo;Which of 50,000 tokens comes next?&amp;rdquo; &amp;ldquo;Is this a cat, a dog, or a bird?&amp;rdquo; This note generalizes the output of a neural network to
$k$
classes, and it turns out almost everything we know carries over — with soft-max doing the job sigmoid did.&lt;/p&gt;</description></item></channel></rss>