<?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>Embeddings on Sanketh's Blog</title><link>https://sankethbk.github.io/blog/tags/embeddings/</link><description>Recent content in Embeddings 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/embeddings/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>Embeddings: From One-Hot Vectors to Learned Representations</title><link>https://sankethbk.github.io/blog/posts/ml/2026-09-14-4-embeddings-from-one-hot-to-learned-representations/</link><pubDate>Mon, 14 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/ml/2026-09-14-4-embeddings-from-one-hot-to-learned-representations/</guid><description>&lt;h1 id="embeddings-from-one-hot-vectors-to-learned-representations"&gt;Embeddings: From One-Hot Vectors to Learned Representations&lt;/h1&gt;
&lt;p&gt;Everything in the previous notes assumed the network&amp;rsquo;s input was already a list of numbers — &lt;code&gt;x1 = 1, x2 = 2&lt;/code&gt;, pixel intensities, whatever. But most interesting data is not numeric. &amp;ldquo;cat&amp;rdquo;, &amp;ldquo;dog&amp;rdquo;, &amp;ldquo;bank&amp;rdquo;, user IDs, product IDs, words of a sentence. Neural networks cannot multiply the string &lt;code&gt;&amp;quot;cat&amp;quot;&lt;/code&gt; by a weight matrix. Somewhere between the raw symbol and the first linear layer, a translation to numbers must happen, and the way we do it — the &lt;strong&gt;embedding layer&lt;/strong&gt; — turns out to be one of the most consequential ideas in modern deep learning.&lt;/p&gt;</description></item></channel></rss>