<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Neural Network on Bitsy Wiki</title>
    <link>https://wiki.bitsy.services/wiki/ai/neural-network/</link>
    <description>Recent content in Neural Network on Bitsy Wiki</description>
    <generator>Hugo</generator>
    <language>en</language>
    <atom:link href="https://wiki.bitsy.services/wiki/ai/neural-network/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Glossary</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/glossary/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/glossary/</guid>
      <description>&lt;p&gt;The words this section uses — and it uses only these. Third column: what the same thing is called elsewhere, so you can translate when you leave.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Term&lt;/th&gt;&#xA;          &lt;th&gt;Means&lt;/th&gt;&#xA;          &lt;th&gt;Elsewhere called&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;weights&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;the numbers the network&amp;rsquo;s arithmetic is done with, and the only thing training changes. &lt;em&gt;Parameters&lt;/em&gt; means the same thing, and this section uses both — &amp;ldquo;weights&amp;rdquo; by default, &amp;ldquo;parameters&amp;rdquo; where the surrounding term of art demands it&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;n_params&lt;/code&gt;, coefficients&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;layer&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;one multiply-by-a-table-of-weights followed by one &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/bend&#34;&gt;bend&lt;/a&gt;. The unit a network&amp;rsquo;s depth is counted in&lt;/td&gt;&#xA;          &lt;td&gt;linear layer, dense layer, fully-connected layer&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;depth&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;how many layers a network stacks. The &lt;em&gt;deep&lt;/em&gt; in deep learning. &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/depth-and-width&#34;&gt;What it costs against width&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;number of layers&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;width&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;how many numbers a layer carries. Layers in one network need not all be the same width&lt;/td&gt;&#xA;          &lt;td&gt;hidden size, number of units&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;activations&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;the numbers flowing &lt;em&gt;between&lt;/em&gt; layers, as opposed to the weights they are multiplied by. They change with every input; the weights don&amp;rsquo;t&lt;/td&gt;&#xA;          &lt;td&gt;hidden states, feature maps&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;bend&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;the fixed nonlinear function applied to each number on its own between two matrix multiplications, and the reason the two don&amp;rsquo;t collapse into one. Holds no weights and learns nothing. A nonlinearity that reads more than one number at a time — softmax, a norm — is not a bend&lt;/td&gt;&#xA;          &lt;td&gt;activation function, nonlinearity&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;unit&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;one number in a layer&amp;rsquo;s output, together with the row of weights that produced it. The thing the field unfortunately calls a &lt;em&gt;neuron&lt;/em&gt;&lt;/td&gt;&#xA;          &lt;td&gt;neuron, node&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;loss&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;the single number scoring how wrong one guess was. Training is the business of making it smaller&lt;/td&gt;&#xA;          &lt;td&gt;cost, objective, criterion&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;gradient&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;for one weight, which way the loss moves if you nudge that weight up, and how sharply. &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/backprop-one-weight&#34;&gt;Backprop&lt;/a&gt; computes all of them at once&lt;/td&gt;&#xA;          &lt;td&gt;derivative, &lt;code&gt;.grad&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;MLP&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a plain chain of layers with nothing else going on — the simplest network there is. Short for &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/multi-layer-perceptron&#34;&gt;multi-layer perceptron&lt;/a&gt;&lt;/td&gt;&#xA;          &lt;td&gt;feed-forward network, FFN, dense stack&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;feature&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;a direction in activation space that means something&lt;/td&gt;&#xA;          &lt;td&gt;concept, latent&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;words-this-section-uses-carefully&#34;&gt;Words this section uses carefully&lt;a class=&#34;anchor&#34; href=&#34;#words-this-section-uses-carefully&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;&amp;ldquo;Neuron&amp;rdquo;&lt;/strong&gt; — avoided in favour of &lt;em&gt;unit&lt;/em&gt;. The word invites the expectation that one unit means one thing, which &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/superposition&#34;&gt;is often false&lt;/a&gt;, and the brain analogy behind it &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network#where-neuron-comes-from-and-why-it-misleads&#34;&gt;does not survive contact with the arithmetic&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&amp;ldquo;Layer&amp;rdquo;&lt;/strong&gt; — used freely here, where it is unambiguous. Inside a specific architecture it often isn&amp;rsquo;t: the &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/llm&#34;&gt;LLM section&lt;/a&gt; &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/llm/glossary#words-this-subsection-avoids&#34;&gt;drops the word entirely&lt;/a&gt; because in a transformer it could mean a whole block or one piece of one.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;&amp;ldquo;Deep&amp;rdquo;&lt;/strong&gt; — a statement about how many layers there are, and nothing else. It does not mean sophisticated, and it does not mean large.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;depends-on--leads-to&#34;&gt;Depends on / leads to&lt;a class=&#34;anchor&#34; href=&#34;#depends-on--leads-to&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Depends on &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network&#34;&gt;the section overview&lt;/a&gt;. Leads to every other page in the section, starting with &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/multi-layer-perceptron&#34;&gt;the MLP&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Multi-Layer Perceptron</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/multi-layer-perceptron/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/multi-layer-perceptron/</guid>
      <description>&lt;p&gt;A multi-layer perceptron is the plainest network there is, and the oldest: multiply a list of numbers by a table of learned weights, &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/bend&#34;&gt;bend the result&lt;/a&gt;, multiply by a second table, and keep going for as many &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/glossary&#34;&gt;layers&lt;/a&gt; as you chose. Everyone shortens it to &lt;strong&gt;MLP&lt;/strong&gt;. It has no structure beyond that — no notion that its inputs might be pixels near each other or words in an order, no memory, no wiring that treats any input differently from any other.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Bend</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/bend/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/bend/</guid>
      <description>&lt;p&gt;A bend is the smallest moving part in a &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network&#34;&gt;neural network&lt;/a&gt;: a fixed scrap of arithmetic applied to each number on its own, wedged between the large multiplications that do the visible work. It learns nothing, holds no weights of its own, and is the same in every model that uses it. Take the bends out and a network of any size — however many layers you paid for — is exactly equal to a single multiplication, and a single multiplication cannot express a rule that says &lt;em&gt;it depends&lt;/em&gt;. Everything conditional a model does traces back to a bend.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GELU and SwiGLU</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/activations/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/activations/</guid>
      <description>&lt;p&gt;Almost everything a network does is, arithmetically, a straight line: multiply by a matrix, add a vector, multiply by another matrix. Straight lines have an inconvenient property — chain as many as you like and the result is just another straight line. A model built only from them would be no more capable with a hundred layers than with one, however many parameters you poured in. The activation function is the small &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/neural-network/bend&#34;&gt;bend&lt;/a&gt; in the middle that breaks the straightness, and it is the reason depth buys anything at all. This page is about which bend to use — a question the field has answered twice. &lt;a href=&#34;https://wiki.bitsy.services/wiki/ai/llm/gpt-2&#34;&gt;GPT-2&lt;/a&gt; bends with GELU; nearly everything since bends with SwiGLU.&lt;/p&gt;</description>
    </item>
    <item>
      <title>LayerNorm and RMSNorm</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/normalization/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/normalization/</guid>
      <description>&lt;p&gt;Normalization is the housekeeping that keeps a network&amp;rsquo;s numbers in a range its arithmetic can actually work in. Nothing constrains the scale of what comes out of a layer: it depends on the weights, which training is busy changing, and whatever drift one layer introduces the next one inherits and compounds. Left alone that wrecks training — each layer faces inputs of wildly varying scale depending on where it sits and how far along the run is, and the gradients that train it swing between vanishing and exploding. A norm rescales the numbers to a standard size before anything reads them. It holds no opinion about the task and changes nothing the network computes in principle; without it, a stack more than a few layers deep does not train at all.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Skip Connections</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/skip-connections/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/skip-connections/</guid>
      <description>&lt;p&gt;A skip connection is the decision to &lt;em&gt;add&lt;/em&gt; a layer&amp;rsquo;s output to its input rather than replace it. It is what makes a deep stack trainable at all, and the reason a layer can leave alone the parts of its input it has nothing to say about — instead of having to rebuild everything worth keeping from whatever its predecessor handed over.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-deep-stacks-refused-to-train&#34;&gt;Why deep stacks refused to train&lt;a class=&#34;anchor&#34; href=&#34;#why-deep-stacks-refused-to-train&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Skip connections were invented for image classifiers, and the problem they solved is one every deep stack has. For a while, deeper networks were simply worse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Loss Function</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/the-loss-function/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/the-loss-function/</guid>
      <description>&lt;p&gt;The loss function is the single number that trains the entire network. Once the model has produced an answer, the loss asks one question: how far was that from the answer that was correct? A confident right answer scores well, a confident wrong answer scores terribly, and everything the model ever learns is a consequence of being pushed, over and over, to make that number smaller. Nothing else is supplied — no rules, no facts, no advice about how to improve.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Backprop Through One Weight</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/backprop-one-weight/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/backprop-one-weight/</guid>
      <description>&lt;p&gt;Backprop is how the model finds out which way to adjust each of its weights. Training needs, for every single number in the model, an answer to one question: would nudging this number up make the predictions better or worse, and by how much? Working that out separately for each weight would be hopelessly expensive, because there are far too many of them. Backprop gets every answer in a single sweep backwards through the model, reusing at each step the work it has already done. This page follows one weight through that sweep, because the story for one is the story for all of them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Superposition</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/superposition/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/superposition/</guid>
      <description>&lt;p&gt;A model keeps track of far more things than it has room for. Superposition is how it gets away with it: rather than giving every concept its own private slot, it overlaps them, cramming many more into the space than the space can strictly hold and accepting a little interference as the price. It works because on any given input almost none of those concepts are actually in play, so the collisions mostly don&amp;rsquo;t happen at the same time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Depth and Width</title>
      <link>https://wiki.bitsy.services/wiki/ai/neural-network/depth-and-width/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://wiki.bitsy.services/wiki/ai/neural-network/depth-and-width/</guid>
      <description>&lt;p&gt;Two numbers get chosen before a network is trained and cannot be changed afterwards: how many layers it stacks, and how wide each one is. Everything else in this section is machinery for making the fitting work; these two decide the size and the shape of the thing being fitted. They are usually discussed as one quantity, because together they set the parameter count and the parameter count is what the bill is written against. They are not one quantity. Depth buys the ability to build on conclusions the network has already reached; width buys the room to reach several of them at once. And they are paid for in different currencies — width costs money, and depth costs time that no amount of money buys back.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
