<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: math4mad</title>
    <description>The latest articles on DEV Community by math4mad (@math4mad).</description>
    <link>https://dev.to/math4mad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1336918%2F416a58d1-fb78-46a1-8a75-4845b0fce61b.png</url>
      <title>DEV Community: math4mad</title>
      <link>https://dev.to/math4mad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/math4mad"/>
    <language>en</language>
    <item>
      <title>The Geometry of Shadows: What a Bridge Railing Taught Me About the Mathematics of LLMs</title>
      <dc:creator>math4mad</dc:creator>
      <pubDate>Sun, 18 Oct 2026 04:54:41 +0000</pubDate>
      <link>https://dev.to/math4mad/the-geometry-of-shadows-what-a-bridge-railing-taught-me-about-the-mathematics-of-llms-18gp</link>
      <guid>https://dev.to/math4mad/the-geometry-of-shadows-what-a-bridge-railing-taught-me-about-the-mathematics-of-llms-18gp</guid>
      <description>&lt;p&gt;While running one morning, I found myself staring at the shadows cast by a stone bridge railing. The railing had a series of identical, carved镂空 (hollowed-out) structures. As I ran past, the angle of the sun shifted, and the shadows on the ground transformed. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8676vzx0j3fpzcihfm8p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8676vzx0j3fpzcihfm8p.gif" alt=" " width="200" height="356"&gt;&lt;/a&gt;&lt;br&gt;
At one moment, the shadow looked like a swimming fish; a few steps later, it looked like a rolling wave; later still, it was just an abstract, elongated blob. &lt;/p&gt;

&lt;p&gt;It struck me that I was witnessing a perfect physical metaphor for how human language—and Large Language Models (LLMs)—generate meaning. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The stone bridge hole is the concept. The sunlight is the context. The shadow on the ground is the utterance.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This realization perfectly mirrors the "Central Problem" of language modeling, beautifully stripped of its usual jargon in Joseph L. Breeden’s paper, &lt;em&gt;The Simple Mathematics of Large Language Models&lt;/em&gt;. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem of the Single Shadow
&lt;/h3&gt;

&lt;p&gt;In his paper, Breeden highlights a fundamental flaw in early AI approaches: treating words as static, unchanging symbols. He uses the classic example of the word &lt;strong&gt;"bank"&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;"I deposited money at the **bank&lt;/em&gt;&lt;em&gt;."&lt;/em&gt; (a financial institution)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"We walked along the river **bank&lt;/em&gt;&lt;em&gt;."&lt;/em&gt; (the land beside a river)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"The plane **banked&lt;/em&gt;* sharply left."* (tilted)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If we assign a single, fixed vector to the word "bank" in a high-dimensional space, we are essentially trying to capture all three meanings in one static shape. But as Breeden points out, a fixed vector for "bank" cannot simultaneously be close to "money," "river," and "tilt." &lt;/p&gt;

&lt;p&gt;In my running metaphor, a single, fixed vector is like looking at the bridge hole only at exactly high noon. You get one specific shadow. But language is dynamic. The meaning of "bank" depends entirely on the "angle of the light" provided by the surrounding words. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Mathematics of Light: Learned Weighted Averaging
&lt;/h3&gt;

&lt;p&gt;How does an LLM solve this? Breeden explains that the core mechanism of a Transformer is not magic; it is &lt;strong&gt;Learned Weighted Averaging&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Let’s map Breeden’s mathematics to the bridge railing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Bridge Hole (The Token Embedding $e$&lt;/strong&gt;&lt;br&gt;
Before any context is applied, the word "bank" is just an initial embedding vector ($e$). It is the physical stone structure itself. It contains the &lt;em&gt;potential&lt;/em&gt; for all its meanings, but it is currently unshaped by the environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The Angle of the Sunlight (Influence Scores,$a_i &lt;a href="https://dev.tourl"&gt;&lt;/a&gt;\cdot b_j$)&lt;/strong&gt;&lt;br&gt;
To determine what the shadow will look like, we need light. In an LLM, the "light" comes from the surrounding words (the context). &lt;br&gt;
Breeden explains that the model computes an &lt;strong&gt;influence score&lt;/strong&gt; between the target word and its context. It does this by projecting the vectors through learned matrices ($W^A$ and $W^B$). &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  When the context is "deposited money," the "light" hits the bridge hole from a financial angle. &lt;/li&gt;
&lt;li&gt;  When the context is "river," the light hits it from a geographical angle. 
The dot product ($a_i \cdot b_j$) measures how perfectly the angle of the light aligns with the shape of the hole. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. The Shadow on the Ground (Context-Dependent Representation, $h_i$)&lt;/strong&gt;&lt;br&gt;
Finally, the light passes through the hole and casts a shadow. Mathematically, the model takes a weighted average of the context vectors (using the content projection $W^C$), resulting in a brand new vector ($h_i$). &lt;br&gt;
This new vector is the shadow. It is a &lt;strong&gt;context-dependent representation&lt;/strong&gt;. The "bank" in the first sentence is mathematically pulled toward the geometry of finance; the "bank" in the second sentence is pulled toward the geometry of nature. They are the same material, but entirely different products.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why This Metaphor Matters
&lt;/h3&gt;

&lt;p&gt;What makes Breeden’s explanation so profound is that it removes the anthropomorphic jargon of "Queries," "Keys," and "Values." There is no little homunculus inside the computer "looking up" information in a database. &lt;/p&gt;

&lt;p&gt;There is only geometry and light.&lt;/p&gt;

&lt;p&gt;When an LLM reads the sentence &lt;em&gt;"The plane banked sharply left,"&lt;/em&gt; it doesn't "know" what a plane is. Instead, the high-dimensional vectors for "plane" and "sharply left" act as a specific angle of light. This light passes through the "bank" bridge hole and casts a shadow that aligns perfectly with the geometric region of "physical motion" in the model's latent space.&lt;/p&gt;

&lt;p&gt;Furthermore, this explains the difference between languages. In English, "bank" is a single, multi-purpose bridge hole that requires complex, dynamic lighting (Attention mechanisms) to cast the right shadow. In Chinese, the language has already carved three separate, distinct bridge holes: &lt;strong&gt;银行&lt;/strong&gt; (bank), &lt;strong&gt;岸&lt;/strong&gt; (riverbank), and &lt;strong&gt;倾斜&lt;/strong&gt; (to tilt). The Chinese model requires less "light manipulation" because the physical structures themselves are already disentangled.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion: Meaning is a Projection
&lt;/h3&gt;

&lt;p&gt;As I finished my run, I realized that the bridge railing wasn't just casting shadows; it was performing a physical projection. &lt;/p&gt;

&lt;p&gt;Large Language Models do not store a dictionary of definitions. They store a high-dimensional geometry of concepts. Meaning is not a static object you can hold in your hand; it is a projection. It is the dynamic, mathematical shadow cast when the light of context passes through the structure of language. &lt;/p&gt;

&lt;p&gt;And just like the shadows on the pavement, the beauty of language lies not in the stone itself, but in how it changes with the light.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;References:&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Breeden, J. L. (2026). The Simple Mathematics of Large Language Models. CRC Working Papers.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;post  according to  talk with Qwen 3.7 plus model &lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>What is Abstraction anyway: Part Two</title>
      <dc:creator>math4mad</dc:creator>
      <pubDate>Wed, 07 Oct 2026 02:36:55 +0000</pubDate>
      <link>https://dev.to/math4mad/what-is-abstraction-anyway-part-two-2jah</link>
      <guid>https://dev.to/math4mad/what-is-abstraction-anyway-part-two-2jah</guid>
      <description>&lt;h1&gt;
  
  
  What is Abstraction anyway: Part Two
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;The Super Power of Abstraction&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Where we left off
&lt;/h2&gt;

&lt;p&gt;In Part One, we used leaves to show what abstraction is: we took the same method, applied it to different objects, and got strikingly similar results. That was abstraction — a way of finding what is common.&lt;/p&gt;

&lt;p&gt;But abstraction is more than a neat trick. It has a hidden power. In this part, we dig into how that power was born — not in a math classroom, but out of everyday life: a hunt, and a trade.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. The hunt
&lt;/h2&gt;

&lt;p&gt;Imagine a small tribe living in the forest. Every day, the same problem returns: where is the food, and how many people should go get it?&lt;/p&gt;

&lt;p&gt;At first, the whole tribe went out together, searching in one direction. But one direction means a small space. So the tribe changed the plan.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;They split into small groups.&lt;/strong&gt; Each group went a different way. Suddenly, their search space multiplied — five small teams could cover five different directions instead of everyone crowding one path.&lt;/p&gt;

&lt;p&gt;When each group came back, they brought back more than meat. They brought back two things: &lt;strong&gt;a number and a direction.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"There is a herd of deer to the &lt;strong&gt;northeast&lt;/strong&gt;, about a day away."&lt;br&gt;
"There are wild ducks by the &lt;strong&gt;southern&lt;/strong&gt; river."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each report was really a &lt;strong&gt;vector&lt;/strong&gt; — a quantity &lt;em&gt;and&lt;/em&gt; a direction tied together.&lt;/p&gt;

&lt;p&gt;Now the leader could do something new. Instead of guessing, they could &lt;strong&gt;compare&lt;/strong&gt; the reports: this direction has more game and is farther, so send more people; that direction has little game and is near, so send fewer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The vector pointed the way, and it decided how many hands to send.&lt;/strong&gt; The hunt was no longer a guess. Spread the search, decide together, catch the prey — and the payoff multiplied.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The super power of abstraction
&lt;/h2&gt;

&lt;p&gt;Look at what happened. The tribe did not invent a magic weapon. They did one simple thing: they &lt;strong&gt;pulled the "how many" and the "which way" out of the actual deer and ducks&lt;/strong&gt;, and turned them into symbols that could be compared and counted.&lt;/p&gt;

&lt;p&gt;That is the super power of abstraction. It lets you take a messy, particular situation and boil it down to something &lt;strong&gt;you can reuse, compare, and decide with.&lt;/strong&gt; A number without the deer. A direction without the walking. Combined, they become a tool for thinking.&lt;/p&gt;

&lt;p&gt;Once the tribe had this power, they could use it again and again — for the next hunt, and the one after.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. The trade
&lt;/h2&gt;

&lt;p&gt;Now imagine the tribe by the river, where two peoples meet. One raises cattle, the other keeps sheep. They cannot eat each other's food until they agree on a way to trade.&lt;/p&gt;

&lt;p&gt;So they agree on a rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;One cow is worth five sheep.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That little rule is a &lt;strong&gt;function&lt;/strong&gt;. Write it as f(cow) = 5 sheep. It does not care about this particular cow or that particular sheep — it is a &lt;strong&gt;dependence&lt;/strong&gt; between two kinds of things, a rule you can reuse all day, every day.&lt;/p&gt;

&lt;p&gt;But here is the real magic. The function can &lt;strong&gt;compose.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tomorrow they meet a third people who grow wheat, and they agree: &lt;strong&gt;five sheep are worth two sacks of wheat.&lt;/strong&gt; Write it as g(sheep) = 2 wheat.&lt;/p&gt;

&lt;p&gt;Now, without any negotiation, the first people already know:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;f(g(sheep)) = 10 wheat, for the same five sheep.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They never touched the wheat, never haggled, and yet they can already convert their cows into wheat. Each new rule in the market &lt;strong&gt;layers onto the old ones&lt;/strong&gt;, and the whole village's ability to trade multiplies.&lt;/p&gt;

&lt;p&gt;Carry this far enough, and the layers of functions begin to point at one thing everyone can measure against — and that, in time, is the seed of &lt;strong&gt;money&lt;/strong&gt;. Money is just the universal function that maps everything onto one common scale.&lt;/p&gt;

&lt;p&gt;The trade did not invent a coin. It invented a &lt;strong&gt;rule for changing one thing into another&lt;/strong&gt; — and that rule, reused and composed, is what moves an economy.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Where it came from
&lt;/h2&gt;

&lt;p&gt;So the two great powers of mathematics — the &lt;strong&gt;quantity&lt;/strong&gt; behind numbers and vectors, and the &lt;strong&gt;correspondence&lt;/strong&gt; behind functions — were not born in a classroom.&lt;/p&gt;

&lt;p&gt;They came from ordinary life. A hunt taught people to pull out "how many" and "which way." A trade taught people to pull out "a rule that changes one thing into another."&lt;/p&gt;

&lt;p&gt;Any time, anywhere — abstraction was already working, long before anyone gave it a name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think about it:&lt;/strong&gt; can you find another example like this in your own life?&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is Abstraction anyway: Part One</title>
      <dc:creator>math4mad</dc:creator>
      <pubDate>Wed, 07 Oct 2026 02:15:55 +0000</pubDate>
      <link>https://dev.to/math4mad/what-is-abstraction-anyway-part-one-4h6d</link>
      <guid>https://dev.to/math4mad/what-is-abstraction-anyway-part-one-4h6d</guid>
      <description>&lt;h1&gt;
  
  
  What is Abstraction anyway: Part One
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. An example from real life
&lt;/h2&gt;

&lt;p&gt;Once, while I was running, it occurred to me that I might take a picture of a leaf against the sunlight. So I did — and this is what I got:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyac5ay3hjcgw5b3fp0m.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyac5ay3hjcgw5b3fp0m.jpeg" alt=" " width="240" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Maybe another one?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotfw7uditlk4jlf4wk6d.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fotfw7uditlk4jlf4wk6d.jpeg" alt=" " width="240" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgih5ajlj23qb0vdu8rya.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgih5ajlj23qb0vdu8rya.jpeg" alt=" " width="240" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look carefully, you will notice that although we used a different leaf each time, we ended up with strikingly similar pictures — and we used the same method to create them.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. What is this called?
&lt;/h2&gt;

&lt;p&gt;When we use the same method to handle different objects and obtain similar results, that is almost what we call &lt;strong&gt;abstraction&lt;/strong&gt;. But why?&lt;/p&gt;

&lt;h2&gt;
  
  
  4. When using this method, be careful about boundaries
&lt;/h2&gt;

&lt;p&gt;The method above works well for thin leaves, but it won't work for a cactus.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhpac45xpsxvwnk0mjo6j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhpac45xpsxvwnk0mjo6j.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Results
&lt;/h2&gt;

&lt;p&gt;We extract the same method from different operations — this is what we call &lt;strong&gt;abstraction&lt;/strong&gt;. The payoff: we can use it again and again.&lt;/p&gt;

&lt;p&gt;If you think abstraction belongs only to mathematics and science, you are wrong. It comes from our normal life — any time, anywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Think about it:&lt;/strong&gt; can you find another example like this?&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>learning</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
